@cwellt_software/cwellt-reactjs-lib 1.4.4 → 1.4.5
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/new-cw-icons/NewCwIcons.json +1 -204
- package/dist/content/icons/new-cw-icons/css/new-cw-icons.css +9 -1
- package/dist/content/icons/new-cw-icons/fonts/NewCwIcons.woff +0 -0
- package/dist/index.cjs.js +2809 -738
- package/dist/index.css +3 -1
- package/dist/index.d.ts +790 -33
- package/dist/index.es.js +2797 -739
- package/dist/src/common/functions/collections.d.ts.map +1 -1
- package/dist/src/common/functions/colorManipulation.d.ts.map +1 -1
- package/dist/src/common/functions/dsl/UiEventDSL.d.ts +1 -1
- package/dist/src/common/functions/useSingleAndDoubleClicks.d.ts.map +1 -1
- package/dist/src/common/hooks/useDropdownPortal.d.ts +86 -0
- package/dist/src/common/hooks/useDropdownPortal.d.ts.map +1 -0
- package/dist/src/common/interfaces/CwFormTypes.d.ts +5 -0
- package/dist/src/common/interfaces/CwFormTypes.d.ts.map +1 -0
- package/dist/src/components/control/action/search/CwSearch.d.ts +22 -0
- package/dist/src/components/control/action/search/CwSearch.d.ts.map +1 -1
- package/dist/src/components/control/choice/checkbox/CwCheck.d.ts +15 -0
- package/dist/src/components/control/choice/checkbox/CwCheck.d.ts.map +1 -0
- package/dist/src/components/control/choice/checkbox/CwCheckbox.d.ts +4 -0
- package/dist/src/components/control/choice/checkbox/CwCheckbox.d.ts.map +1 -1
- package/dist/src/components/control/choice/checkbox/CwCheckboxGroup.d.ts +35 -0
- package/dist/src/components/control/choice/checkbox/CwCheckboxGroup.d.ts.map +1 -0
- package/dist/src/components/control/choice/dropdown/CwPopoverButton.d.ts +35 -0
- package/dist/src/components/control/choice/dropdown/CwPopoverButton.d.ts.map +1 -0
- package/dist/src/components/control/choice/multi-filter/CwMultiFilter.d.ts +6 -0
- package/dist/src/components/control/choice/multi-filter/CwMultiFilter.d.ts.map +1 -1
- package/dist/src/components/control/choice/multi-filter/components/tag/CwMultiFilterTag.d.ts +1 -0
- package/dist/src/components/control/choice/multi-filter/components/tag/CwMultiFilterTag.d.ts.map +1 -1
- package/dist/src/components/control/choice/option/CwOption.d.ts +3 -1
- package/dist/src/components/control/choice/option/CwOption.d.ts.map +1 -1
- package/dist/src/components/control/choice/select/CwDropdown.d.ts +56 -0
- package/dist/src/components/control/choice/select/CwDropdown.d.ts.map +1 -0
- package/dist/src/components/control/choice/select/CwSelect.d.ts +7 -1
- package/dist/src/components/control/choice/select/CwSelect.d.ts.map +1 -1
- package/dist/src/components/control/choice/tag-selector/CwTagSelector.d.ts +68 -0
- package/dist/src/components/control/choice/tag-selector/CwTagSelector.d.ts.map +1 -0
- package/dist/src/components/control/choice/toggle/CwToggle.d.ts +1 -1
- package/dist/src/components/control/choice/toggle/CwToggle.d.ts.map +1 -1
- package/dist/src/components/control/input/color/CwInputColor.d.ts +30 -0
- package/dist/src/components/control/input/color/CwInputColor.d.ts.map +1 -1
- package/dist/src/components/control/input/date-picker/CwInputDatePicker.d.ts.map +1 -1
- package/dist/src/components/control/input/date-picker/datePickerUtils.d.ts +38 -0
- package/dist/src/components/control/input/date-picker/datePickerUtils.d.ts.map +1 -0
- package/dist/src/components/control/input/date-text/CwInputDateText.d.ts +4 -4
- package/dist/src/components/control/input/date-text/CwInputDateText.d.ts.map +1 -1
- package/dist/src/components/control/input/file/CwFileUploadMultiple.d.ts +17 -0
- package/dist/src/components/control/input/file/CwFileUploadMultiple.d.ts.map +1 -1
- package/dist/src/components/control/input/new-dates/CwDatePicker.d.ts +10 -1
- package/dist/src/components/control/input/new-dates/CwDatePicker.d.ts.map +1 -1
- package/dist/src/components/control/input/new-dates/CwDatePickerTemporal.d.ts +48 -0
- package/dist/src/components/control/input/new-dates/CwDatePickerTemporal.d.ts.map +1 -0
- package/dist/src/components/control/input/new-dates/CwDateRangePicker.d.ts.map +1 -1
- package/dist/src/components/control/input/new-dates/CwDateTimePicker.d.ts +8 -1
- package/dist/src/components/control/input/new-dates/CwDateTimePicker.d.ts.map +1 -1
- package/dist/src/components/control/input/new-dates/CwDateTimePickerCompact.d.ts +8 -1
- package/dist/src/components/control/input/new-dates/CwDateTimePickerCompact.d.ts.map +1 -1
- package/dist/src/components/control/input/new-dates/CwTimePicker.d.ts.map +1 -1
- package/dist/src/components/control/input/new-dates/datePickerHelpers.d.ts +20 -0
- package/dist/src/components/control/input/new-dates/datePickerHelpers.d.ts.map +1 -0
- package/dist/src/components/control/input/new-dates/dateRangePresets.d.ts.map +1 -1
- package/dist/src/components/control/input/new-dates/usePickerPopup.d.ts +23 -0
- package/dist/src/components/control/input/new-dates/usePickerPopup.d.ts.map +1 -0
- package/dist/src/components/control/input/new-dates/utils/timezoneHelpers.d.ts +38 -0
- package/dist/src/components/control/input/new-dates/utils/timezoneHelpers.d.ts.map +1 -0
- package/dist/src/components/control/input/text/CwInputText.d.ts +7 -0
- package/dist/src/components/control/input/text/CwInputText.d.ts.map +1 -1
- package/dist/src/components/control/input/text-area/CwTextArea.d.ts +6 -0
- package/dist/src/components/control/input/text-area/CwTextArea.d.ts.map +1 -1
- package/dist/src/components/custom/find-airport/CwFindAirportComp.d.ts +37 -1
- package/dist/src/components/custom/find-airport/CwFindAirportComp.d.ts.map +1 -1
- package/dist/src/components/custom/find-crewmember/CwFindCrewmemberComp.d.ts +44 -0
- package/dist/src/components/custom/find-crewmember/CwFindCrewmemberComp.d.ts.map +1 -0
- package/dist/src/components/custom/scheduler/CwSchedulerComp.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler/CwSuperSchedulerComp.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler/components/day_headers/MyDaysHeader.d.ts +0 -3
- package/dist/src/components/custom/scheduler/components/day_headers/MyDaysHeader.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler/components/scheduler_content_area/SchedulerContentArea.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler/components/time_line/TimeLine.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler/logic/dates/addMinutesToDateFromPx.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler/logic/dates/daysBetweenTwoDates.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler/logic/dates/daysBetweenTwoDatesWithoutCeil.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler/logic/dates/getFormatedTimeForHeader.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler/logic/dates/getMonthHeaderData.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler/logic/dates/getWeekHeaderDataFromWeekRange.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler/logic/dates/listOfDatesToWeeks.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler/logic/divisions/calculateDivisionType.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler/logic/divisions/calculateDivisions.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler/logic/filtering/filterEvents.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler/logic/filtering/filterResources.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler/logic/filtering/hasSameProperties.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler/logic/pixels/getHeightLineScheduler.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler/logic/pixels/getPixelsForEvent.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler/logic/pixels/heightScheduler.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler/logic/pixels/heightSchedulerPinned.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler/logic/state_handle/doubleClickOnResource.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler/logic/state_handle/onDragOver.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler/logic/state_handle/onDropEventToResource.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler/logic/strings/compareStrings.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler/logic/ui/checkIfSlotAvailable.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler/logic/ui/getEventsOfResource.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler/logic/ui/getTimeHeaders.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler/logic/ui/isAllowedToMove.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler/logic/ui/updateResourceVisibility.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler-new/presentation/NewScheduler.d.ts +4 -1
- package/dist/src/components/custom/scheduler-new/presentation/NewScheduler.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler-new/presentation/SchedulerPresenter.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler-new/presentation/components/header/HeaderDivision.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler-new/presentation/components/header/SchedulerHeader.d.ts +6 -1
- package/dist/src/components/custom/scheduler-new/presentation/components/header/SchedulerHeader.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler-new/presentation/components/row/BackgroundEvent.d.ts +1 -0
- package/dist/src/components/custom/scheduler-new/presentation/components/row/BackgroundEvent.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler-new/presentation/components/row/DefaultRowHeader.d.ts +1 -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.map +1 -1
- package/dist/src/components/custom/scheduler-new/presentation/components/row/IndicatorRow.d.ts +18 -0
- package/dist/src/components/custom/scheduler-new/presentation/components/row/IndicatorRow.d.ts.map +1 -0
- package/dist/src/components/custom/scheduler-new/presentation/components/row/SchedulerRow.d.ts +3 -1
- package/dist/src/components/custom/scheduler-new/presentation/components/row/SchedulerRow.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler-new/presentation/components/timeline/DivisionLine.d.ts +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/helpers.d.ts +0 -9
- package/dist/src/components/custom/scheduler-new/presentation/helpers.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler-new/presentation/logic/WeekendCalc.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler-new/presentation/logic/dateFromPercentage.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler-new/presentation/logic/eventIsVisible.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler-new/presentation/logic/filterVisibleEvents.d.ts +3 -0
- package/dist/src/components/custom/scheduler-new/presentation/logic/filterVisibleEvents.d.ts.map +1 -0
- package/dist/src/components/custom/scheduler-new/presentation/logic/getDefaultDivisions.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler-new/presentation/logic/getDivisions.d.ts +1 -1
- package/dist/src/components/custom/scheduler-new/presentation/logic/getDivisions.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler-new/presentation/logic/getEventSizes.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler-new/presentation/logic/getLinesByDivisions.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler-new/presentation/logic/isToday.d.ts +2 -0
- package/dist/src/components/custom/scheduler-new/presentation/logic/isToday.d.ts.map +1 -0
- package/dist/src/components/custom/scheduler-new/presentation/logic/separateEventsToInnerRows.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler-new/presentation/logic/sortByCategoryAndTitle.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler-new/presentation/state/ui/SchedulerState.d.ts +1 -0
- package/dist/src/components/custom/scheduler-new/presentation/state/ui/SchedulerState.d.ts.map +1 -1
- package/dist/src/components/custom/super-scheduler/PinRowHeader.d.ts +1 -2
- package/dist/src/components/custom/super-scheduler/PinRowHeader.d.ts.map +1 -1
- package/dist/src/components/custom/super-scheduler/SuperScheduler.d.ts +3 -0
- package/dist/src/components/custom/super-scheduler/SuperScheduler.d.ts.map +1 -1
- package/dist/src/components/custom/super-scheduler/SuperSchedulerPresenter.d.ts.map +1 -1
- package/dist/src/components/display/data/generic_tooltip/CwGenericTooltip.d.ts +13 -0
- package/dist/src/components/display/data/generic_tooltip/CwGenericTooltip.d.ts.map +1 -1
- package/dist/src/components/display/data/table/CwTable.d.ts +4 -1
- package/dist/src/components/display/data/table/CwTable.d.ts.map +1 -1
- package/dist/src/components/display/data/table-serverside/CwTableServerSide.d.ts +4 -1
- package/dist/src/components/display/data/table-serverside/CwTableServerSide.d.ts.map +1 -1
- package/dist/src/components/display/data/table_sortable/CwSortableTable.d.ts +74 -0
- package/dist/src/components/display/data/table_sortable/CwSortableTable.d.ts.map +1 -0
- package/dist/src/components/display/data/table_sortable/useSortableTable.d.ts +42 -0
- package/dist/src/components/display/data/table_sortable/useSortableTable.d.ts.map +1 -0
- package/dist/src/components/display/data/tooltip_manager/CwTooltip.d.ts +25 -0
- package/dist/src/components/display/data/tooltip_manager/CwTooltip.d.ts.map +1 -0
- package/dist/src/components/display/data/tooltip_manager/CwTooltipManager.d.ts +19 -0
- package/dist/src/components/display/data/tooltip_manager/CwTooltipManager.d.ts.map +1 -0
- package/dist/src/components/display/text/message/CwMessage.d.ts +3 -2
- package/dist/src/components/display/text/message/CwMessage.d.ts.map +1 -1
- package/dist/src/components/display/text/note/CwNote.d.ts +1 -1
- package/dist/src/components/display/text/note/CwNote.d.ts.map +1 -1
- package/dist/src/components/display/text/tag/CwChip.d.ts +1 -1
- package/dist/src/components/display/text/tag/CwChip.d.ts.map +1 -1
- package/dist/src/components/layout/dialog/CwDialog.d.ts +2 -0
- package/dist/src/components/layout/dialog/CwDialog.d.ts.map +1 -1
- package/dist/src/components/layout/dialog/CwDialogManager.d.ts.map +1 -1
- package/dist/src/components/layout/list/sortable/CwSortableList.d.ts +2 -1
- package/dist/src/components/layout/list/sortable/CwSortableList.d.ts.map +1 -1
- package/dist/src/components/layout/master-detail/CwMasterDetail.d.ts +41 -0
- package/dist/src/components/layout/master-detail/CwMasterDetail.d.ts.map +1 -0
- package/dist/src/components/layout/modal/legacy/cw_modal.d.ts.map +1 -1
- package/dist/src/components/layout/modal/legacy/cw_modal_report.d.ts +0 -1
- package/dist/src/components/layout/modal/legacy/cw_modal_report.d.ts.map +1 -1
- package/dist/src/components/layout/table/grouped/CwTableGrouped.d.ts +2 -0
- package/dist/src/components/layout/table/grouped/CwTableGrouped.d.ts.map +1 -1
- package/dist/src/components/layout/tabs/CwTabs.d.ts +2 -0
- package/dist/src/components/layout/tabs/CwTabs.d.ts.map +1 -1
- package/dist/src/dev/index.d.ts +5 -0
- package/dist/src/dev/index.d.ts.map +1 -0
- package/dist/src/dev/palette.d.ts +3 -0
- package/dist/src/dev/palette.d.ts.map +1 -0
- package/dist/src/dev/previews.d.ts +3 -0
- package/dist/src/dev/previews.d.ts.map +1 -0
- package/dist/src/dev/useInitial.d.ts +3 -0
- package/dist/src/dev/useInitial.d.ts.map +1 -0
- package/dist/src/index.d.ts +15 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/main.d.ts +2 -0
- package/dist/src/main.d.ts.map +1 -0
- package/dist/src/playground/PlaygroundApp.d.ts +4 -0
- package/dist/src/playground/PlaygroundApp.d.ts.map +1 -0
- package/dist/src/playground/pages/ColorContrastPage.d.ts +3 -0
- package/dist/src/playground/pages/ColorContrastPage.d.ts.map +1 -0
- package/dist/src/playground/pages/DatePickerLocalePage.d.ts +3 -0
- package/dist/src/playground/pages/DatePickerLocalePage.d.ts.map +1 -0
- package/dist/src/playground/pages/DatePickerTemporalPage.d.ts +3 -0
- package/dist/src/playground/pages/DatePickerTemporalPage.d.ts.map +1 -0
- package/dist/src/playground/pages/SelectorsPage.d.ts +3 -0
- package/dist/src/playground/pages/SelectorsPage.d.ts.map +1 -0
- package/dist/src/playground/pages/TablePaginationPage.d.ts +3 -0
- package/dist/src/playground/pages/TablePaginationPage.d.ts.map +1 -0
- package/dist/src/playground/pages/TableServerSideComparePage.d.ts +3 -0
- package/dist/src/playground/pages/TableServerSideComparePage.d.ts.map +1 -0
- package/dist/test/components/control/input/date-picker/datePickerUtils.test.d.ts +2 -0
- package/dist/test/components/control/input/date-picker/datePickerUtils.test.d.ts.map +1 -0
- package/dist/test/components/control/input/new-dates/datePickerHelpers.test.d.ts +2 -0
- package/dist/test/components/control/input/new-dates/datePickerHelpers.test.d.ts.map +1 -0
- package/dist/test/components/control/input/new-dates/timezoneHelpers.test.d.ts +2 -0
- package/dist/test/components/control/input/new-dates/timezoneHelpers.test.d.ts.map +1 -0
- package/dist/test/components/custom/new-scheduler/presentation/header/getStartEnd.test.d.ts +2 -0
- package/dist/test/components/custom/new-scheduler/presentation/header/getStartEnd.test.d.ts.map +1 -0
- package/dist/test/components/custom/new-scheduler/presentation/logic/dateFromPercentage.test.d.ts +2 -0
- package/dist/test/components/custom/new-scheduler/presentation/logic/dateFromPercentage.test.d.ts.map +1 -0
- package/dist/test/components/custom/new-scheduler/presentation/logic/eventIsVisible.test.d.ts +2 -0
- package/dist/test/components/custom/new-scheduler/presentation/logic/eventIsVisible.test.d.ts.map +1 -0
- package/dist/test/components/custom/new-scheduler/presentation/logic/filterVisibleEvents.test.d.ts +2 -0
- package/dist/test/components/custom/new-scheduler/presentation/logic/filterVisibleEvents.test.d.ts.map +1 -0
- package/dist/test/components/custom/new-scheduler/presentation/logic/isToday.test.d.ts +2 -0
- package/dist/test/components/custom/new-scheduler/presentation/logic/isToday.test.d.ts.map +1 -0
- package/dist/test/components/custom/scheduler/getFormattedTimeForHeader.test.d.ts +2 -0
- package/dist/test/components/custom/scheduler/getFormattedTimeForHeader.test.d.ts.map +1 -0
- package/dist/test/vitest.setup.d.ts +2 -0
- package/dist/test/vitest.setup.d.ts.map +1 -0
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
3
|
import React__default, { HTMLProps, PropsWithChildren, FC, ReactNode, CSSProperties, ReactElement, HTMLAttributes, DetailedHTMLProps, TextareaHTMLAttributes, InputHTMLAttributes, SelectHTMLAttributes, Component, ComponentType } from 'react';
|
|
4
4
|
import * as CSS from 'csstype';
|
|
5
|
+
import { DayPickerLocale } from 'react-day-picker/locale';
|
|
5
6
|
import { Matcher } from 'react-day-picker';
|
|
6
7
|
|
|
7
8
|
declare class CwSelectList {
|
|
@@ -57,18 +58,11 @@ interface CwLabelProps extends Omit<HTMLProps<PropsWithChildren<HTMLLabelElement
|
|
|
57
58
|
*/
|
|
58
59
|
declare function CwLabel(props: CwLabelProps): react_jsx_runtime.JSX.Element;
|
|
59
60
|
|
|
60
|
-
interface CwTooltipProps {
|
|
61
|
-
children?: any;
|
|
62
|
-
tooltipTitle?: any;
|
|
63
|
-
tooltipTitleStyle?: React$1.CSSProperties;
|
|
64
|
-
}
|
|
65
|
-
declare function CwTooltip(CwelltTooltipProps: React$1.PropsWithChildren<CwTooltipProps>): react_jsx_runtime.JSX.Element;
|
|
66
|
-
|
|
67
61
|
type ChipColorScheme = 'danger' | 'warning' | 'success' | 'info' | 'neutral' | 'custom';
|
|
68
62
|
type ChipVariant = 'soft' | 'solid' | 'outline';
|
|
69
63
|
interface CwChipProps {
|
|
70
64
|
/*** Text content of the chip **/
|
|
71
|
-
label
|
|
65
|
+
label?: string;
|
|
72
66
|
/*** Predefined color scheme of the chip **/
|
|
73
67
|
colorScheme?: ChipColorScheme;
|
|
74
68
|
/*** Custom color (only used when colorScheme is 'custom') **/
|
|
@@ -114,6 +108,7 @@ interface CwMessageProps {
|
|
|
114
108
|
messageType?: CwMessageType;
|
|
115
109
|
duration?: number;
|
|
116
110
|
onClose?: () => void;
|
|
111
|
+
onClick?: () => void;
|
|
117
112
|
}
|
|
118
113
|
declare const CwMessage: FC<CwMessageProps>;
|
|
119
114
|
/**
|
|
@@ -153,7 +148,7 @@ declare class CwMessageManager {
|
|
|
153
148
|
root: any;
|
|
154
149
|
static getInstance(): CwMessageManager;
|
|
155
150
|
private init;
|
|
156
|
-
showMessage(message: string, type?: CwMessageType, duration?: number): void;
|
|
151
|
+
showMessage(message: string, type?: CwMessageType, duration?: number, onClick?: () => void): void;
|
|
157
152
|
private closeMessage;
|
|
158
153
|
}
|
|
159
154
|
/**
|
|
@@ -172,7 +167,7 @@ declare class CwMessageManager {
|
|
|
172
167
|
*
|
|
173
168
|
* @note For inline messages within components, use `CwNote` or `useCwMessage` hook instead
|
|
174
169
|
*/
|
|
175
|
-
declare function CwDisplayMessage(message: string, type?: CwMessageType, duration?: number): void;
|
|
170
|
+
declare function CwDisplayMessage(message: string, type?: CwMessageType, duration?: number, onClick?: () => void): void;
|
|
176
171
|
|
|
177
172
|
interface CwNoteProps {
|
|
178
173
|
/** Message content (used when no children provided) */
|
|
@@ -184,7 +179,7 @@ interface CwNoteProps {
|
|
|
184
179
|
/** Custom color - if provided, overrides color prop */
|
|
185
180
|
customColor?: string;
|
|
186
181
|
/** Size of the message */
|
|
187
|
-
fontSize?: 'small' | 'regular' | 'large';
|
|
182
|
+
fontSize?: 'small' | 'regular' | 'medium' | 'large' | 'huge';
|
|
188
183
|
/** Optional icon from your custom font (always rendered if provided) */
|
|
189
184
|
icon?: string;
|
|
190
185
|
/** Whether the note can be dismissed manually (default: false) */
|
|
@@ -354,8 +349,57 @@ interface CwGenericTooltipProps {
|
|
|
354
349
|
showDelay?: number;
|
|
355
350
|
displayInline?: boolean;
|
|
356
351
|
}
|
|
352
|
+
/**
|
|
353
|
+
* Standalone tooltip component. Each instance manages its own portal,
|
|
354
|
+
* requiring no external dependencies or global setup.
|
|
355
|
+
*
|
|
356
|
+
* Suitable for low-density use cases with few tooltip instances.
|
|
357
|
+
* For high-density scenarios (e.g. schedulers, tables, lists),
|
|
358
|
+
* prefer CwTooltipNew which shares a single DOM portal for better performance.
|
|
359
|
+
*
|
|
360
|
+
* @remarks Not formally deprecated, but CwTooltipNew is now the recommended
|
|
361
|
+
* approach for new implementations. Cannot be deprecated yet due to potential use on projects such as Operon and Improve.
|
|
362
|
+
*
|
|
363
|
+
* @see CwTooltipNew
|
|
364
|
+
*/
|
|
357
365
|
declare const CwGenericTooltip: FC<CwGenericTooltipProps>;
|
|
358
366
|
|
|
367
|
+
interface CwTooltipProps {
|
|
368
|
+
children: ReactNode;
|
|
369
|
+
content?: ReactNode;
|
|
370
|
+
dissapearsWhenHover?: boolean;
|
|
371
|
+
hide?: boolean;
|
|
372
|
+
position?: "top" | "bottom" | "left" | "right";
|
|
373
|
+
overlayStyle?: CSSProperties;
|
|
374
|
+
showDelay?: number;
|
|
375
|
+
displayInline?: boolean;
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* Tooltip component backed by the global CwTooltipManager singleton.
|
|
379
|
+
* More performant than CwGenericTooltip for high-density scenarios (e.g. schedulers)
|
|
380
|
+
* as it shares a single DOM portal across all instances.
|
|
381
|
+
*
|
|
382
|
+
* Self-initializes the Manager if not already mounted via ensureTooltipManager().
|
|
383
|
+
* Drop-in replacement for CwGenericTooltip with the same API.
|
|
384
|
+
*
|
|
385
|
+
* @see CwTooltipManager
|
|
386
|
+
* @see CwGenericTooltip
|
|
387
|
+
*/
|
|
388
|
+
declare const CwTooltipNew: FC<CwTooltipProps>;
|
|
389
|
+
|
|
390
|
+
/**
|
|
391
|
+
* Global tooltip renderer. Manages a single portal instance in the DOM,
|
|
392
|
+
* shared across all CwTooltipNew instances for optimal performance.
|
|
393
|
+
*
|
|
394
|
+
* Mount once at the app root, or let CwTooltipNew handle it automatically
|
|
395
|
+
* via ensureTooltipManager().
|
|
396
|
+
*
|
|
397
|
+
* @see CwTooltipNew
|
|
398
|
+
* @see showTooltip
|
|
399
|
+
* @see hideTooltip
|
|
400
|
+
*/
|
|
401
|
+
declare const CwTooltipManager: React__default.FC;
|
|
402
|
+
|
|
359
403
|
interface CwModalProps {
|
|
360
404
|
modalState?: boolean;
|
|
361
405
|
classNameModalOverlay?: string;
|
|
@@ -431,7 +475,6 @@ interface State$2 {
|
|
|
431
475
|
isModal: boolean;
|
|
432
476
|
}
|
|
433
477
|
declare class CwReportModal extends React$1.Component<CwReportModalProps, State$2> {
|
|
434
|
-
formRef: React$1.RefObject<FormInstance>;
|
|
435
478
|
constructor(props: Readonly<CwReportModalProps>);
|
|
436
479
|
render(): react_jsx_runtime.JSX.Element;
|
|
437
480
|
}
|
|
@@ -480,6 +523,8 @@ interface CwDialogProps extends HTMLProps<PropsWithChildren<HTMLDialogElement>>
|
|
|
480
523
|
hideFooter?: boolean;
|
|
481
524
|
/*** Reposition the dialog when content size changes after opening. For modals with slow loading content. Default: false **/
|
|
482
525
|
autoReposition?: boolean;
|
|
526
|
+
/** If true, the save button will be disabled */
|
|
527
|
+
disableSave?: boolean;
|
|
483
528
|
}
|
|
484
529
|
declare const CwDialog: FC<CwDialogProps>;
|
|
485
530
|
|
|
@@ -646,7 +691,7 @@ interface CwAccordionContainerProps {
|
|
|
646
691
|
*/
|
|
647
692
|
declare function CwAccordionContainer(CwelltAccordionContainerProps: React$1.PropsWithChildren<CwAccordionContainerProps>): react_jsx_runtime.JSX.Element;
|
|
648
693
|
|
|
649
|
-
interface Column<T = any> {
|
|
694
|
+
interface Column$1<T = any> {
|
|
650
695
|
title: string;
|
|
651
696
|
dataIndex?: keyof T;
|
|
652
697
|
key: string;
|
|
@@ -659,7 +704,7 @@ interface DataItem {
|
|
|
659
704
|
[key: string]: any;
|
|
660
705
|
}
|
|
661
706
|
interface CwTableProps<T = any> {
|
|
662
|
-
columns: Column<T>[];
|
|
707
|
+
columns: Column$1<T>[];
|
|
663
708
|
data: T[];
|
|
664
709
|
pagination?: boolean;
|
|
665
710
|
pageSizeOptions?: number[];
|
|
@@ -670,11 +715,14 @@ interface CwTableProps<T = any> {
|
|
|
670
715
|
classNameRow?: string | ((record: T) => string);
|
|
671
716
|
style?: React__default.CSSProperties;
|
|
672
717
|
id?: string;
|
|
718
|
+
/** Sets `data-testid` on the outer wrapper. Use for stable Selenium / e2e selectors. */
|
|
719
|
+
testId?: string;
|
|
673
720
|
textNoData?: string;
|
|
674
721
|
rowKey?: keyof T;
|
|
675
722
|
loading?: boolean;
|
|
676
723
|
scrollHeight?: number | string;
|
|
677
724
|
stickyHeader?: boolean;
|
|
725
|
+
pageLabel?: string;
|
|
678
726
|
rowSelection?: {
|
|
679
727
|
selectedRowKeys?: T[keyof T][];
|
|
680
728
|
onChange?: (selectedKeys: T[keyof T][], selectedRows: T[]) => void;
|
|
@@ -750,7 +798,221 @@ interface CwTableProps<T = any> {
|
|
|
750
798
|
*
|
|
751
799
|
* @returns React component
|
|
752
800
|
*/
|
|
753
|
-
declare function CwTable<T = any>({ columns, data, pagination, pageSizeOptions, expandedRowRender, onExpand, className, classNameRow, style, classNameContainer, id, textNoData, rowKey, loading, scrollHeight, stickyHeader, rowSelection }: Readonly<CwTableProps<T>>): react_jsx_runtime.JSX.Element;
|
|
801
|
+
declare function CwTable<T = any>({ columns, data, pagination, pageSizeOptions, expandedRowRender, onExpand, className, classNameRow, style, classNameContainer, id, testId, textNoData, rowKey, loading, scrollHeight, stickyHeader, pageLabel, rowSelection }: Readonly<CwTableProps<T>>): react_jsx_runtime.JSX.Element;
|
|
802
|
+
|
|
803
|
+
interface SortableColumn<T = any> {
|
|
804
|
+
/** Header label */
|
|
805
|
+
title: string;
|
|
806
|
+
/** Key of the data field to display (skipped when `render` is provided) */
|
|
807
|
+
dataIndex?: keyof T;
|
|
808
|
+
/** Unique column identifier */
|
|
809
|
+
key: string;
|
|
810
|
+
/** Custom cell renderer — receives the full row item */
|
|
811
|
+
render?: (item: T) => React__default.ReactNode;
|
|
812
|
+
/** Additional CSS class for <th> and <td> */
|
|
813
|
+
className?: string;
|
|
814
|
+
/** Fixed column width */
|
|
815
|
+
width?: number | string;
|
|
816
|
+
}
|
|
817
|
+
interface CwSortableTableProps<T = any> {
|
|
818
|
+
/** Column definitions */
|
|
819
|
+
columns: SortableColumn<T>[];
|
|
820
|
+
/** Data array — each item must have the field specified in `rowKey` */
|
|
821
|
+
data: T[];
|
|
822
|
+
/**
|
|
823
|
+
* Field used as unique row identifier.
|
|
824
|
+
* @default "key"
|
|
825
|
+
*/
|
|
826
|
+
rowKey?: keyof T;
|
|
827
|
+
/**
|
|
828
|
+
* Async callback fired when the user clicks Save.
|
|
829
|
+
* Receives the full re-ordered array — persist it however you need.
|
|
830
|
+
*
|
|
831
|
+
* @example
|
|
832
|
+
* onReorder={async (newOrder) => {
|
|
833
|
+
* await Promise.all(newOrder.map((item, i) => api.updateOrder(item.id, i)));
|
|
834
|
+
* }}
|
|
835
|
+
*/
|
|
836
|
+
onReorder: (newData: T[]) => Promise<void>;
|
|
837
|
+
/** Show a loading skeleton instead of rows */
|
|
838
|
+
loading?: boolean;
|
|
839
|
+
/** Message shown when data is empty */
|
|
840
|
+
textNoData?: string;
|
|
841
|
+
/** CSS class for the outer container */
|
|
842
|
+
className?: string;
|
|
843
|
+
/** CSS class for the <table> element */
|
|
844
|
+
tableClassName?: string;
|
|
845
|
+
/** Constrain height and enable vertical scroll */
|
|
846
|
+
maxHeight?: number | string;
|
|
847
|
+
/**
|
|
848
|
+
* Whether to show the drag handle column.
|
|
849
|
+
* @default true
|
|
850
|
+
*/
|
|
851
|
+
showHandle?: boolean;
|
|
852
|
+
/** Optional inline styles for the outer container */
|
|
853
|
+
style?: React__default.CSSProperties;
|
|
854
|
+
/** Label for the Save button. @default "Save order" */
|
|
855
|
+
saveLabel?: string;
|
|
856
|
+
/** Label for the Discard button. @default "Discard" */
|
|
857
|
+
discardLabel?: string;
|
|
858
|
+
}
|
|
859
|
+
/**
|
|
860
|
+
* CwSortableTable
|
|
861
|
+
*
|
|
862
|
+
* A table with drag-and-drop row reordering and save/discard support.
|
|
863
|
+
* Shares visual styles with CwTable but is intentionally simpler:
|
|
864
|
+
* no column sorting, no pagination.
|
|
865
|
+
*
|
|
866
|
+
* When the user reorders rows, changes are held locally until they
|
|
867
|
+
* click Save. A save bar appears automatically when there are pending changes.
|
|
868
|
+
*
|
|
869
|
+
* Follows the same pattern as CwSortableList:
|
|
870
|
+
* - All rows are draggable — the handle is visual only
|
|
871
|
+
* - Reorder is calculated in onDragEnd using lastValidDropIndex
|
|
872
|
+
* - draggedItem is tracked in state, not via dataTransfer
|
|
873
|
+
*/
|
|
874
|
+
declare function CwSortableTable<T = any>({ columns, data, rowKey, onReorder, loading, textNoData, className, tableClassName, maxHeight, showHandle, style, saveLabel, discardLabel, }: Readonly<CwSortableTableProps<T>>): react_jsx_runtime.JSX.Element;
|
|
875
|
+
|
|
876
|
+
interface SortableTableDragState {
|
|
877
|
+
/** Index of the row currently being dragged (-1 if none) */
|
|
878
|
+
dragSourceIndex: number;
|
|
879
|
+
/** Index where the drop indicator should appear (-1 if none) */
|
|
880
|
+
dropTargetIndex: number;
|
|
881
|
+
}
|
|
882
|
+
interface UseSortableTableReturn<T> {
|
|
883
|
+
/** Current ordered items */
|
|
884
|
+
items: T[];
|
|
885
|
+
/** Current drag state (for rendering drop indicators) */
|
|
886
|
+
dragState: SortableTableDragState;
|
|
887
|
+
/** Whether there are unsaved reorder changes */
|
|
888
|
+
hasChanges: boolean;
|
|
889
|
+
/**
|
|
890
|
+
* Call this after each drag-and-drop with the already-reordered array.
|
|
891
|
+
* The hook just stores it — reorder logic lives in the component, same pattern as useSortableList.
|
|
892
|
+
*/
|
|
893
|
+
handleReorder: (newItems: T[]) => void;
|
|
894
|
+
/** Save current order — receives an async callback to persist the data */
|
|
895
|
+
handleSave: (onSave: (items: T[]) => Promise<void>) => Promise<void>;
|
|
896
|
+
/** Discard changes and restore original order */
|
|
897
|
+
handleDiscard: () => void;
|
|
898
|
+
}
|
|
899
|
+
/**
|
|
900
|
+
* Hook that provides state management for CwSortableTable.
|
|
901
|
+
*
|
|
902
|
+
* Follows the same pattern as useSortableList:
|
|
903
|
+
* - The hook only manages STATE (items, hasChanges, save, discard)
|
|
904
|
+
* - The component manages INTERACTION (drag, drop, calculating new order)
|
|
905
|
+
* - handleReorder receives the already-reordered array and just stores it
|
|
906
|
+
* - Changes are only persisted when handleSave is called
|
|
907
|
+
* - handleDiscard restores the original order
|
|
908
|
+
*
|
|
909
|
+
* @param initialItems - The initial array of items to display
|
|
910
|
+
*
|
|
911
|
+
* @example
|
|
912
|
+
* ```tsx
|
|
913
|
+
* const { items, hasChanges, handleReorder, handleSave, handleDiscard } = useSortableTable(data);
|
|
914
|
+
* ```
|
|
915
|
+
*/
|
|
916
|
+
declare function useSortableTable<T>(initialItems: T[]): UseSortableTableReturn<T>;
|
|
917
|
+
|
|
918
|
+
interface ServerSideTableState<T = any> {
|
|
919
|
+
page: number;
|
|
920
|
+
pageSize: number;
|
|
921
|
+
sortKey?: keyof T | null;
|
|
922
|
+
sortDirection?: "asc" | "desc" | null;
|
|
923
|
+
}
|
|
924
|
+
interface Column<T = any> {
|
|
925
|
+
title: string;
|
|
926
|
+
dataIndex?: keyof T;
|
|
927
|
+
key: string;
|
|
928
|
+
render?: (item: T) => React__default.ReactNode;
|
|
929
|
+
className?: string;
|
|
930
|
+
sortable?: boolean;
|
|
931
|
+
width?: number | string;
|
|
932
|
+
}
|
|
933
|
+
interface CwTableServerSideProps<T = any> {
|
|
934
|
+
columns: Column<T>[];
|
|
935
|
+
data: T[];
|
|
936
|
+
totalItems: number;
|
|
937
|
+
pagination?: boolean;
|
|
938
|
+
pageSizeOptions?: number[];
|
|
939
|
+
pageLabel?: string;
|
|
940
|
+
expandedRowRender?: (record: T) => React__default.ReactNode;
|
|
941
|
+
onExpand?: (record: T) => void;
|
|
942
|
+
classNameContainer?: string;
|
|
943
|
+
className?: string;
|
|
944
|
+
classNameRow?: string | ((record: T) => string);
|
|
945
|
+
style?: React__default.CSSProperties;
|
|
946
|
+
id?: string;
|
|
947
|
+
/** Sets `data-testid` on the outer wrapper. Use for stable Selenium / e2e selectors. */
|
|
948
|
+
testId?: string;
|
|
949
|
+
textNoData?: string;
|
|
950
|
+
rowKey?: keyof T;
|
|
951
|
+
loading?: boolean;
|
|
952
|
+
scrollHeight?: number | string;
|
|
953
|
+
stickyHeader?: boolean;
|
|
954
|
+
rowSelection?: {
|
|
955
|
+
selectedRowKeys?: T[keyof T][];
|
|
956
|
+
onChange?: (selectedKeys: T[keyof T][], selectedRows: T[]) => void;
|
|
957
|
+
type?: "single" | "multiple";
|
|
958
|
+
};
|
|
959
|
+
onChange?: (state: ServerSideTableState<T>) => void;
|
|
960
|
+
serverState?: ServerSideTableState<T>;
|
|
961
|
+
}
|
|
962
|
+
/**
|
|
963
|
+
* A reusable and customizable table component (server-side pagination and sorting).
|
|
964
|
+
*
|
|
965
|
+
* @param props - Component props to configure columns, data, styles, pagination, expanded rows, and more.
|
|
966
|
+
*
|
|
967
|
+
* @example
|
|
968
|
+
* // --- Component ---
|
|
969
|
+
* const columns: Column<User>[] = [
|
|
970
|
+
* { title: "Name", dataIndex: "name", key: "name", sortable: true },
|
|
971
|
+
* { title: "Age", dataIndex: "age", key: "age", sortable: true },
|
|
972
|
+
* { title: "Address", dataIndex: "address", key: "address" }
|
|
973
|
+
* ];
|
|
974
|
+
*
|
|
975
|
+
*
|
|
976
|
+
* const [tableState, setTableState] = useState<ServerSideTableState<User>>({
|
|
977
|
+
* page: 1,
|
|
978
|
+
* pageSize: 5,
|
|
979
|
+
* sortKey: null,
|
|
980
|
+
* sortDirection: null
|
|
981
|
+
* });
|
|
982
|
+
* const [data, setData] = useState<User[]>([]);
|
|
983
|
+
* const [totalItems, setTotalItems] = useState(0);
|
|
984
|
+
* const [loading, setLoading] = useState(false);
|
|
985
|
+
*
|
|
986
|
+
* // Fetch simulation on table state change
|
|
987
|
+
* useEffect(() => {
|
|
988
|
+
* setLoading(true);
|
|
989
|
+
* fetch(`/api/users?page=${tableState.page}&pageSize=${tableState.pageSize}` +
|
|
990
|
+
* (tableState.sortKey ? `&sortKey=${tableState.sortKey}&sortDirection=${tableState.sortDirection}` : "")
|
|
991
|
+
* )
|
|
992
|
+
* .then(res => res.json())
|
|
993
|
+
* .then(({ items, total }) => {
|
|
994
|
+
* setData(items);
|
|
995
|
+
* setTotalItems(total);
|
|
996
|
+
* })
|
|
997
|
+
* .finally(() => setLoading(false));
|
|
998
|
+
* }, [tableState]);
|
|
999
|
+
*
|
|
1000
|
+
* <CwTableServerSide<User>
|
|
1001
|
+
* columns={columns}
|
|
1002
|
+
* data={data}
|
|
1003
|
+
* totalItems={totalItems}
|
|
1004
|
+
* pagination={true}
|
|
1005
|
+
* pageSizeOptions={[5, 10, 20]}
|
|
1006
|
+
* loading={loading}
|
|
1007
|
+
* serverState={tableState}
|
|
1008
|
+
* onChange={setTableState}
|
|
1009
|
+
* rowKey="id"
|
|
1010
|
+
* textNoData="No data available"
|
|
1011
|
+
* />
|
|
1012
|
+
*
|
|
1013
|
+
* @returns React component
|
|
1014
|
+
*/
|
|
1015
|
+
declare function CwTableServerSide<T = any>({ columns, data, totalItems, pagination, pageSizeOptions, pageLabel, expandedRowRender, onExpand, className, classNameRow, style, classNameContainer, id, testId, textNoData, rowKey, loading, scrollHeight, stickyHeader, rowSelection, onChange, serverState, }: Readonly<CwTableServerSideProps<T>>): react_jsx_runtime.JSX.Element;
|
|
754
1016
|
|
|
755
1017
|
interface Tab {
|
|
756
1018
|
key: string;
|
|
@@ -763,6 +1025,8 @@ interface Tab {
|
|
|
763
1025
|
}
|
|
764
1026
|
interface CwTabsProps {
|
|
765
1027
|
id?: string;
|
|
1028
|
+
/** Sets `data-testid` on the outer wrapper. Use for stable Selenium / e2e selectors. */
|
|
1029
|
+
testId?: string;
|
|
766
1030
|
onTabClick?: any;
|
|
767
1031
|
defaultActiveKey?: string;
|
|
768
1032
|
className?: string;
|
|
@@ -819,6 +1083,46 @@ interface CwExpandableProps extends Omit<HTMLProps<PropsWithChildren<HTMLDetails
|
|
|
819
1083
|
*/
|
|
820
1084
|
declare const CwExpandable: FC<CwExpandableProps>;
|
|
821
1085
|
|
|
1086
|
+
interface CwMasterDetailItem {
|
|
1087
|
+
key: string;
|
|
1088
|
+
content: ReactNode;
|
|
1089
|
+
disabled?: boolean;
|
|
1090
|
+
}
|
|
1091
|
+
interface CwMasterDetailProps {
|
|
1092
|
+
id?: string;
|
|
1093
|
+
className?: string;
|
|
1094
|
+
style?: React__default.CSSProperties;
|
|
1095
|
+
/** Items displayed in the master list */
|
|
1096
|
+
items: CwMasterDetailItem[];
|
|
1097
|
+
/** Key of the currently selected item */
|
|
1098
|
+
selectedKey?: string;
|
|
1099
|
+
/** Called when an item is selected */
|
|
1100
|
+
onSelect?: (key: string) => void;
|
|
1101
|
+
/** Content rendered in the detail panel for the selected item */
|
|
1102
|
+
detailContent?: ReactNode;
|
|
1103
|
+
/** Placeholder shown when no item is selected */
|
|
1104
|
+
emptyDetail?: ReactNode;
|
|
1105
|
+
/** Search placeholder text */
|
|
1106
|
+
searchPlaceholder?: string;
|
|
1107
|
+
/** Called when the search value changes */
|
|
1108
|
+
onSearch?: (value: string) => void;
|
|
1109
|
+
/** Optional header content rendered above the list (below search) */
|
|
1110
|
+
masterHeader?: ReactNode;
|
|
1111
|
+
/** Optional footer content at the bottom of the master panel */
|
|
1112
|
+
masterFooter?: ReactNode;
|
|
1113
|
+
/** Initial width of the master panel in pixels */
|
|
1114
|
+
masterWidth?: number;
|
|
1115
|
+
/** Minimum width of the master panel in pixels */
|
|
1116
|
+
minMasterWidth?: number;
|
|
1117
|
+
/** Maximum width of the master panel in pixels */
|
|
1118
|
+
maxMasterWidth?: number;
|
|
1119
|
+
/** Whether the master panel is resizable */
|
|
1120
|
+
resizable?: boolean;
|
|
1121
|
+
/** Whether to show the search input */
|
|
1122
|
+
showSearch?: boolean;
|
|
1123
|
+
}
|
|
1124
|
+
declare const CwMasterDetail: React__default.FC<CwMasterDetailProps>;
|
|
1125
|
+
|
|
822
1126
|
/**
|
|
823
1127
|
* Props for the CwKeyValueList component
|
|
824
1128
|
*/
|
|
@@ -905,8 +1209,9 @@ interface CwSortableListProps<T extends SortableItem$1> {
|
|
|
905
1209
|
movedItems?: Set<string | number>;
|
|
906
1210
|
emptyMessage?: ReactNode;
|
|
907
1211
|
readOnly?: boolean;
|
|
1212
|
+
maxHeight?: number | string;
|
|
908
1213
|
}
|
|
909
|
-
declare function CwSortableList<T extends SortableItem$1>({ items, onReorder, renderItem, className, movedItems, emptyMessage, readOnly, }: CwSortableListProps<T>): react_jsx_runtime.JSX.Element;
|
|
1214
|
+
declare function CwSortableList<T extends SortableItem$1>({ items, onReorder, renderItem, className, movedItems, emptyMessage, readOnly, maxHeight, }: CwSortableListProps<T>): react_jsx_runtime.JSX.Element;
|
|
910
1215
|
|
|
911
1216
|
/**
|
|
912
1217
|
* useSortableList
|
|
@@ -985,6 +1290,8 @@ interface CwTableGroupedData {
|
|
|
985
1290
|
}
|
|
986
1291
|
interface CwTableGroupedProps {
|
|
987
1292
|
tableData: CwTableGroupedData;
|
|
1293
|
+
/** Sets `data-testid` on the outer wrapper. Use for stable Selenium / e2e selectors. */
|
|
1294
|
+
testId?: string;
|
|
988
1295
|
}
|
|
989
1296
|
/**
|
|
990
1297
|
* A table with expandable row groups.
|
|
@@ -1061,6 +1368,21 @@ interface CwFileUploadProps {
|
|
|
1061
1368
|
}
|
|
1062
1369
|
declare function CwFileUpload(fileUploadProps: React__default.PropsWithChildren<CwFileUploadProps>): react_jsx_runtime.JSX.Element;
|
|
1063
1370
|
|
|
1371
|
+
interface CwFileUploadMultipleLabels {
|
|
1372
|
+
uploadDisabled: string;
|
|
1373
|
+
clickToUpload: string;
|
|
1374
|
+
acceptedFiles: (accept: string) => string;
|
|
1375
|
+
singleFileOnly: string;
|
|
1376
|
+
allTypesAccepted: string;
|
|
1377
|
+
changeFile: string;
|
|
1378
|
+
clearAll: string;
|
|
1379
|
+
addMoreFiles: string;
|
|
1380
|
+
filesSelected: (count: number) => string;
|
|
1381
|
+
fileTooLarge: (name: string, maxSize: number) => string;
|
|
1382
|
+
invalidFormat: (name: string, accepted: string) => string;
|
|
1383
|
+
invalidMimeType: (name: string, types: string) => string;
|
|
1384
|
+
alreadySelected: (name: string) => string;
|
|
1385
|
+
}
|
|
1064
1386
|
interface CwFileUploadMultipleProps {
|
|
1065
1387
|
name?: string;
|
|
1066
1388
|
accept?: string;
|
|
@@ -1071,7 +1393,9 @@ interface CwFileUploadMultipleProps {
|
|
|
1071
1393
|
onError?: (error: string) => void;
|
|
1072
1394
|
className?: string;
|
|
1073
1395
|
disabled?: boolean;
|
|
1396
|
+
hideClearAll?: boolean;
|
|
1074
1397
|
initialFileName?: string;
|
|
1398
|
+
labels?: Partial<CwFileUploadMultipleLabels>;
|
|
1075
1399
|
}
|
|
1076
1400
|
declare function CwFileUploadMultiple(fileUploadProps: React__default.PropsWithChildren<CwFileUploadMultipleProps>): react_jsx_runtime.JSX.Element;
|
|
1077
1401
|
|
|
@@ -1170,16 +1494,50 @@ interface ColorPickerProps {
|
|
|
1170
1494
|
}
|
|
1171
1495
|
declare const CwColorPicker: React__default.FC<ColorPickerProps>;
|
|
1172
1496
|
|
|
1497
|
+
interface CwInputLayoutProps {
|
|
1498
|
+
direction?: "row" | "column";
|
|
1499
|
+
align?: "start" | "center" | "end";
|
|
1500
|
+
}
|
|
1501
|
+
/**
|
|
1502
|
+
* Color input that displays a swatch trigger and opens a color picker dropdown via portal.
|
|
1503
|
+
*
|
|
1504
|
+
* @param value - Current color value (hex, rgb, etc.)
|
|
1505
|
+
* @param onChange - Callback fired when the color changes
|
|
1506
|
+
* @param previewText - Text shown inside the color picker preview
|
|
1507
|
+
* @param disabled - Disables the trigger and prevents opening the picker
|
|
1508
|
+
* @param readOnly - Makes the input read-only: focusable and visible, but cannot open the picker
|
|
1509
|
+
* @param width - Width of the color swatch trigger (default: '4rem')
|
|
1510
|
+
* @param height - Height of the color swatch trigger (default: '2rem')
|
|
1511
|
+
* @param labelProps - Props for the optional label rendered above or beside the input (default: no label)
|
|
1512
|
+
* @param layoutProps - Controls label/input layout direction and alignment (default: row direction with center alignment)
|
|
1513
|
+
*
|
|
1514
|
+
* @example
|
|
1515
|
+
* // With label on the left
|
|
1516
|
+
* <CwInputColor
|
|
1517
|
+
* value={color}
|
|
1518
|
+
* onChange={setColor}
|
|
1519
|
+
* labelProps={{ text: "Background", labelWidth: "10rem" }}
|
|
1520
|
+
* layoutProps={{ direction: "row", align: "center" }}
|
|
1521
|
+
* />
|
|
1522
|
+
*/
|
|
1173
1523
|
interface CwInputColorProps {
|
|
1174
1524
|
value: string;
|
|
1175
1525
|
onChange: (color: string) => void;
|
|
1176
1526
|
previewText?: string;
|
|
1177
1527
|
disabled?: boolean;
|
|
1528
|
+
readOnly?: boolean;
|
|
1178
1529
|
width?: string;
|
|
1179
1530
|
height?: string;
|
|
1531
|
+
labelProps?: CwLabelProps;
|
|
1532
|
+
layoutProps?: CwInputLayoutProps;
|
|
1180
1533
|
}
|
|
1181
1534
|
declare const CwInputColor: React__default.FC<CwInputColorProps>;
|
|
1182
1535
|
|
|
1536
|
+
interface CwInputFeedback {
|
|
1537
|
+
type: "danger" | "warning" | "success" | "info" | "neutral";
|
|
1538
|
+
message: string;
|
|
1539
|
+
}
|
|
1540
|
+
|
|
1183
1541
|
interface CwInputTextProps extends Omit<HTMLProps<HTMLInputElement>, never> {
|
|
1184
1542
|
/** Props to define alignment and size; undefined == column
|
|
1185
1543
|
* @example alignProps={{direction:"row"}} */
|
|
@@ -1193,6 +1551,11 @@ interface CwInputTextProps extends Omit<HTMLProps<HTMLInputElement>, never> {
|
|
|
1193
1551
|
/** Props of the icon; undefined == no icon
|
|
1194
1552
|
* @example iconProps={{iconId:"phone"}} */
|
|
1195
1553
|
iconProps?: CwIconProps;
|
|
1554
|
+
/** Feedback messages shown below the input; accepts a single message or an array for multiple
|
|
1555
|
+
* @example feedback={{ type: "danger", message: "This field is required" }}
|
|
1556
|
+
* @example feedback={[{ type: "neutral", message: "Enter your full name" }, { type: "warning", message: "This name is already in use" }]}
|
|
1557
|
+
*/
|
|
1558
|
+
feedback?: CwInputFeedback | CwInputFeedback[];
|
|
1196
1559
|
}
|
|
1197
1560
|
/**
|
|
1198
1561
|
* Input for entering a string of text.
|
|
@@ -1210,6 +1573,7 @@ interface CwInputTextProps extends Omit<HTMLProps<HTMLInputElement>, never> {
|
|
|
1210
1573
|
* iconProps={{ id: "home" }}
|
|
1211
1574
|
* labelProps={{ children: "Name", width: "100px" }}
|
|
1212
1575
|
* buttonProps={{ children: "Ok", onclick:()=>{alert("hi")} }}
|
|
1576
|
+
* feedback={{ type: "danger", message: "This field is required" }}
|
|
1213
1577
|
* />
|
|
1214
1578
|
* ```
|
|
1215
1579
|
*/
|
|
@@ -1280,6 +1644,11 @@ interface CwTextAreaProps extends Omit<DetailedHTMLProps<TextareaHTMLAttributes<
|
|
|
1280
1644
|
/** Props of the icon; undefined == no icon
|
|
1281
1645
|
* @example iconProps={{iconId:"phone"}} */
|
|
1282
1646
|
iconProps?: CwIconProps;
|
|
1647
|
+
/** Feedback messages shown below the select; accepts a single message or an array for multiple
|
|
1648
|
+
* @example feedback={{ type: "neutral", message: "Select the cat breed that best matches your preference" }}
|
|
1649
|
+
* @example feedback={[{ type: "neutral", message: "Select a breed" }, { type: "danger", message: "This field is required" }]}
|
|
1650
|
+
*/
|
|
1651
|
+
feedback?: CwInputFeedback | CwInputFeedback[];
|
|
1283
1652
|
}
|
|
1284
1653
|
declare function CwTextArea(props: CwTextAreaProps): react_jsx_runtime.JSX.Element;
|
|
1285
1654
|
|
|
@@ -1534,6 +1903,22 @@ declare class Weekdays {
|
|
|
1534
1903
|
}
|
|
1535
1904
|
declare const CwWeekdaySelector: FC<CwWeekdaySelectorProps>;
|
|
1536
1905
|
|
|
1906
|
+
interface CwCheckProps extends Omit<React__default.DetailedHTMLProps<React__default.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type"> {
|
|
1907
|
+
/** Props for the label component */
|
|
1908
|
+
labelProps?: CwLabelProps;
|
|
1909
|
+
/** Text content for the checkbox label */
|
|
1910
|
+
labelText?: string;
|
|
1911
|
+
/** Props for the icon component - iconId is required */
|
|
1912
|
+
iconProps?: CwIconProps;
|
|
1913
|
+
/** Layout alignment: "row" (side by side) | "column" (label above) @default "row" */
|
|
1914
|
+
alignment?: "row" | "column";
|
|
1915
|
+
}
|
|
1916
|
+
declare function CwCheck(props: CwCheckProps): react_jsx_runtime.JSX.Element;
|
|
1917
|
+
|
|
1918
|
+
/**
|
|
1919
|
+
* @deprecated Use {@link CwCheck} for single checkboxes or {@link CwCheckboxGroup} for multiple options.
|
|
1920
|
+
* This component will be removed in a future version.
|
|
1921
|
+
*/
|
|
1537
1922
|
interface CwCheckboxProps {
|
|
1538
1923
|
id?: string;
|
|
1539
1924
|
labelName?: string;
|
|
@@ -1550,8 +1935,40 @@ interface CwCheckboxProps {
|
|
|
1550
1935
|
}
|
|
1551
1936
|
declare function CwCheckbox(CwCheckboxProps: React__default.PropsWithChildren<CwCheckboxProps>): react_jsx_runtime.JSX.Element;
|
|
1552
1937
|
|
|
1938
|
+
interface CheckboxOption {
|
|
1939
|
+
/** Value sent to onChange */
|
|
1940
|
+
value: string;
|
|
1941
|
+
/** Text displayed next to the checkbox */
|
|
1942
|
+
label: string;
|
|
1943
|
+
/** Disables this specific option */
|
|
1944
|
+
disabled?: boolean;
|
|
1945
|
+
}
|
|
1946
|
+
interface CwCheckboxGroupProps {
|
|
1947
|
+
/** List of options to display */
|
|
1948
|
+
options: CheckboxOption[];
|
|
1949
|
+
/** Currently selected values */
|
|
1950
|
+
value?: string[];
|
|
1951
|
+
/** Callback when selection changes - returns full array of selected values */
|
|
1952
|
+
onChange: (selected: string[]) => void;
|
|
1953
|
+
/** Props for the label component */
|
|
1954
|
+
labelProps?: CwLabelProps;
|
|
1955
|
+
/** Props for alignment */
|
|
1956
|
+
alignProps?: CwAlignProps;
|
|
1957
|
+
/** Marks the group as required */
|
|
1958
|
+
required?: boolean;
|
|
1959
|
+
/** Disables all options */
|
|
1960
|
+
disabled?: boolean;
|
|
1961
|
+
/** Layout alignment of each individual checkbox: "row" (default) | "column" */
|
|
1962
|
+
optionsAlignment?: "row" | "column";
|
|
1963
|
+
/** Additional CSS class for the container */
|
|
1964
|
+
className?: string;
|
|
1965
|
+
/** Error or info messages below the group */
|
|
1966
|
+
feedback?: CwInputFeedback | CwInputFeedback[];
|
|
1967
|
+
}
|
|
1968
|
+
declare function CwCheckboxGroup({ options, value, onChange, labelProps, alignProps, required, disabled, optionsAlignment, className, feedback, }: CwCheckboxGroupProps): react_jsx_runtime.JSX.Element;
|
|
1969
|
+
|
|
1553
1970
|
interface CwToggleProps extends Omit<React__default.DetailedHTMLProps<React__default.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type"> {
|
|
1554
|
-
/** Props for the label component
|
|
1971
|
+
/** Props for the label component */
|
|
1555
1972
|
labelProps?: CwLabelProps;
|
|
1556
1973
|
/** Text content for the toggle label */
|
|
1557
1974
|
labelText?: string;
|
|
@@ -1562,7 +1979,7 @@ interface CwToggleProps extends Omit<React__default.DetailedHTMLProps<React__def
|
|
|
1562
1979
|
}
|
|
1563
1980
|
declare function CwToggle(props: CwToggleProps): react_jsx_runtime.JSX.Element;
|
|
1564
1981
|
|
|
1565
|
-
interface CwSelectProps extends
|
|
1982
|
+
interface CwSelectProps extends DetailedHTMLProps<SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement> {
|
|
1566
1983
|
/** Props to define alignment and size; undefined == column
|
|
1567
1984
|
* @example alignProps={{_direction:"row"}} */
|
|
1568
1985
|
alignProps?: CwAlignProps;
|
|
@@ -1578,6 +1995,11 @@ interface CwSelectProps extends Omit<DetailedHTMLProps<SelectHTMLAttributes<HTML
|
|
|
1578
1995
|
/** Default item
|
|
1579
1996
|
* @example placeholder="Select something" */
|
|
1580
1997
|
placeholder?: string;
|
|
1998
|
+
/** Feedback messages shown below the select; accepts a single message or an array for multiple
|
|
1999
|
+
* @example feedback={{ type: "neutral", message: "Select the cat breed that best matches your preference" }}
|
|
2000
|
+
* @example feedback={[{ type: "neutral", message: "Select a breed" }, { type: "danger", message: "This field is required" }]}
|
|
2001
|
+
*/
|
|
2002
|
+
feedback?: CwInputFeedback | CwInputFeedback[];
|
|
1581
2003
|
}
|
|
1582
2004
|
/**
|
|
1583
2005
|
* Input for selecting an option from a list
|
|
@@ -1605,8 +2027,61 @@ interface CwSelectProps extends Omit<DetailedHTMLProps<SelectHTMLAttributes<HTML
|
|
|
1605
2027
|
*/
|
|
1606
2028
|
declare function CwSelect(props: CwSelectProps): react_jsx_runtime.JSX.Element;
|
|
1607
2029
|
|
|
2030
|
+
/** A single selectable option in a {@link CwDropdown}. */
|
|
2031
|
+
interface CwDropdownOption {
|
|
2032
|
+
/** Unique option identifier passed to `onChange`. */
|
|
2033
|
+
value: string | number;
|
|
2034
|
+
/** Display text shown in the trigger and option list. */
|
|
2035
|
+
label: string;
|
|
2036
|
+
/** Optional background color (any valid CSS value). Shown as a small dot next to the label. */
|
|
2037
|
+
color?: string;
|
|
2038
|
+
/** When `true` the option is rendered but cannot be selected. */
|
|
2039
|
+
disabled?: boolean;
|
|
2040
|
+
}
|
|
2041
|
+
/** Props for {@link CwDropdown}. */
|
|
2042
|
+
interface CwDropdownProps extends Omit<React__default.HTMLAttributes<HTMLDivElement>, "onChange"> {
|
|
2043
|
+
/** Array of options to display */
|
|
2044
|
+
options: CwDropdownOption[];
|
|
2045
|
+
/** Current selected value */
|
|
2046
|
+
value?: string | number;
|
|
2047
|
+
/** Callback when value changes */
|
|
2048
|
+
onChange?: (value: string | number | undefined) => void;
|
|
2049
|
+
/** Props for label component */
|
|
2050
|
+
labelProps?: CwLabelProps;
|
|
2051
|
+
/** Props for alignment */
|
|
2052
|
+
alignProps?: CwAlignProps;
|
|
2053
|
+
/** Placeholder text */
|
|
2054
|
+
placeholder?: string;
|
|
2055
|
+
/** Show search input (optional) */
|
|
2056
|
+
allowSearch?: boolean;
|
|
2057
|
+
/** Is disabled */
|
|
2058
|
+
disabled?: boolean;
|
|
2059
|
+
/** Is required */
|
|
2060
|
+
required?: boolean;
|
|
2061
|
+
/** Feedback messages */
|
|
2062
|
+
feedback?: CwInputFeedback | CwInputFeedback[];
|
|
2063
|
+
}
|
|
2064
|
+
/**
|
|
2065
|
+
* Custom dropdown component with colour-coded options, optional search filter, and full
|
|
2066
|
+
* keyboard navigation (↑ ↓ Enter Esc Tab).
|
|
2067
|
+
*
|
|
2068
|
+
* Use `CwDropdown` instead of the native `<select>` when options need colour indicators or
|
|
2069
|
+
* when inline search filtering is required.
|
|
2070
|
+
*
|
|
2071
|
+
* @example
|
|
2072
|
+
* <CwDropdown
|
|
2073
|
+
* options={[{ value: 'a', label: 'Option A', color: '#1976D2' }]}
|
|
2074
|
+
* value={selected}
|
|
2075
|
+
* onChange={setSelected}
|
|
2076
|
+
* labelProps={{ text: 'My Label' }}
|
|
2077
|
+
* />
|
|
2078
|
+
*/
|
|
2079
|
+
declare function CwDropdown({ options, value, onChange, labelProps, alignProps, placeholder, allowSearch, disabled, required, feedback, className, style, ...otherProps }: CwDropdownProps): react_jsx_runtime.JSX.Element;
|
|
2080
|
+
|
|
1608
2081
|
interface CwOptionProps extends Omit<HTMLProps<PropsWithChildren<HTMLOptionElement>>, "className"> {
|
|
1609
2082
|
text?: string;
|
|
2083
|
+
/** Background color for the option (hex or CSS color). Renders as a colored bar on the left of the option text. */
|
|
2084
|
+
color?: string;
|
|
1610
2085
|
}
|
|
1611
2086
|
/**
|
|
1612
2087
|
* Option to display in the CwSelect
|
|
@@ -1615,7 +2090,7 @@ interface CwOptionProps extends Omit<HTMLProps<PropsWithChildren<HTMLOptionEleme
|
|
|
1615
2090
|
* @example
|
|
1616
2091
|
* <CwSelect>
|
|
1617
2092
|
* <CwOption>A</CwOption>
|
|
1618
|
-
* <CwOption>
|
|
2093
|
+
* <CwOption color="#4a90d9">Blue option</CwOption>
|
|
1619
2094
|
* <CwOption>C</CwOption>
|
|
1620
2095
|
* </CwSelect>
|
|
1621
2096
|
*/
|
|
@@ -1637,6 +2112,39 @@ interface CwDropdownFilterProps {
|
|
|
1637
2112
|
}
|
|
1638
2113
|
declare function CwDropdownFilter(props: React$1.PropsWithChildren<CwDropdownFilterProps>): react_jsx_runtime.JSX.Element;
|
|
1639
2114
|
|
|
2115
|
+
interface CwPopoverButtonProps extends Omit<CwButtonProps, "onClick" | "children"> {
|
|
2116
|
+
/** Content rendered inside the floating panel */
|
|
2117
|
+
children: React__default.ReactNode;
|
|
2118
|
+
/** Panel width — CSS value (e.g. "auto", "16rem"). @default "auto" */
|
|
2119
|
+
panelWidth?: string;
|
|
2120
|
+
/** Horizontal alignment relative to the button. @default "bottom-start" */
|
|
2121
|
+
placement?: "bottom-start" | "bottom-end";
|
|
2122
|
+
/** Additional CSS class for the panel */
|
|
2123
|
+
panelClassName?: string;
|
|
2124
|
+
}
|
|
2125
|
+
/**
|
|
2126
|
+
* Button that toggles a floating panel with arbitrary children.
|
|
2127
|
+
* Uses the native Popover API — panel renders in the browser's top layer,
|
|
2128
|
+
* escaping all overflow/stacking contexts. Light dismiss (click outside)
|
|
2129
|
+
* and Escape key are handled natively by the browser.
|
|
2130
|
+
*
|
|
2131
|
+
* Designed as a composable primitive:
|
|
2132
|
+
* - Column picker: put `<CwCheckboxGroup>` inside
|
|
2133
|
+
* - Options menu: put toggles / links inside
|
|
2134
|
+
* - Future CwTable integration: use internally for column visibility
|
|
2135
|
+
*
|
|
2136
|
+
* @example
|
|
2137
|
+
* <CwPopoverButton text="Columns" icon="table" variant="outline">
|
|
2138
|
+
* <CwCheckboxGroup options={opts} value={val} onChange={setVal} />
|
|
2139
|
+
* </CwPopoverButton>
|
|
2140
|
+
*
|
|
2141
|
+
* @example
|
|
2142
|
+
* <CwPopoverButton text="Options" icon="options" variant="outline" placement="bottom-end">
|
|
2143
|
+
* <CwToggle labelText="Show assigned" checked={v} onChange={setV} />
|
|
2144
|
+
* </CwPopoverButton>
|
|
2145
|
+
*/
|
|
2146
|
+
declare function CwPopoverButton({ children, panelWidth, placement, panelClassName, ...buttonProps }: CwPopoverButtonProps): react_jsx_runtime.JSX.Element;
|
|
2147
|
+
|
|
1640
2148
|
interface CwMultiFilterTagProps {
|
|
1641
2149
|
/** Make sure each ID is unique */
|
|
1642
2150
|
ID: string;
|
|
@@ -1663,6 +2171,7 @@ interface CwMultiFilterTagProps {
|
|
|
1663
2171
|
Selected?: boolean;
|
|
1664
2172
|
OnSelect?: (props: Omit<CwMultiFilterTagProps, "OnClick">) => void;
|
|
1665
2173
|
OnRemove?: (props: Omit<CwMultiFilterTagProps, "OnRemove">) => void;
|
|
2174
|
+
tooltip?: string;
|
|
1666
2175
|
}
|
|
1667
2176
|
/** @inheritdoc */
|
|
1668
2177
|
interface ICwMultiFilterTag extends Omit<CwMultiFilterTagProps, "Removable" | "Selectable" | "Selected" | "OnSelect" | "OnRemove"> {
|
|
@@ -1688,6 +2197,12 @@ interface CwMultiFilterProps {
|
|
|
1688
2197
|
allTags: Set<ICwMultiFilterTag>;
|
|
1689
2198
|
/** Selected tags/filters passed as props */
|
|
1690
2199
|
selectedTags: Set<CwMultiFilterTagProps>;
|
|
2200
|
+
/** Placeholder text for the search input */
|
|
2201
|
+
placeholder?: string;
|
|
2202
|
+
/** Label for the "All categories" button */
|
|
2203
|
+
allCategoriesLabel?: string;
|
|
2204
|
+
/** Additional CSS class for the container */
|
|
2205
|
+
className?: string;
|
|
1691
2206
|
style?: React__default.CSSProperties;
|
|
1692
2207
|
}
|
|
1693
2208
|
/**
|
|
@@ -1831,6 +2346,69 @@ interface CwMultiFilterProps {
|
|
|
1831
2346
|
*/
|
|
1832
2347
|
declare const CwMultiFilter: FC<CwMultiFilterProps>;
|
|
1833
2348
|
|
|
2349
|
+
interface CwTagSelectorOption {
|
|
2350
|
+
/** Unique value identifying this option */
|
|
2351
|
+
value: string;
|
|
2352
|
+
/** Display text */
|
|
2353
|
+
label: string;
|
|
2354
|
+
/** Background color for the chip tag (any valid CSS color) */
|
|
2355
|
+
color?: string;
|
|
2356
|
+
/** Tooltip text shown on hover */
|
|
2357
|
+
tooltip?: string;
|
|
2358
|
+
}
|
|
2359
|
+
interface CwTagSelectorProps {
|
|
2360
|
+
/** HTML id */
|
|
2361
|
+
id?: string;
|
|
2362
|
+
/** All available options */
|
|
2363
|
+
options: CwTagSelectorOption[];
|
|
2364
|
+
/** Currently selected values */
|
|
2365
|
+
value: string[];
|
|
2366
|
+
/** Called when selection changes */
|
|
2367
|
+
onChange: (selectedValues: string[]) => void;
|
|
2368
|
+
/** Label */
|
|
2369
|
+
labelProps?: CwLabelProps;
|
|
2370
|
+
/** Icon */
|
|
2371
|
+
iconProps?: CwIconProps;
|
|
2372
|
+
/** Layout */
|
|
2373
|
+
alignProps?: CwAlignProps;
|
|
2374
|
+
/** Placeholder when nothing is selected */
|
|
2375
|
+
placeholder?: string;
|
|
2376
|
+
/** Disabled state */
|
|
2377
|
+
disabled?: boolean;
|
|
2378
|
+
/** Show a "Select all" toggle at the top of the dropdown */
|
|
2379
|
+
showSelectAll?: boolean;
|
|
2380
|
+
/** Feedback messages */
|
|
2381
|
+
feedback?: CwInputFeedback | CwInputFeedback[];
|
|
2382
|
+
/** Additional CSS class */
|
|
2383
|
+
className?: string;
|
|
2384
|
+
/** Inline styles */
|
|
2385
|
+
style?: React__default.CSSProperties;
|
|
2386
|
+
}
|
|
2387
|
+
/**
|
|
2388
|
+
* Multi-select input with chip tags and searchable dropdown.
|
|
2389
|
+
* Works like a Kendo MultiSelect: selected items appear as removable chips
|
|
2390
|
+
* inside the input area, and a filtered dropdown lets the user pick more.
|
|
2391
|
+
*
|
|
2392
|
+
* @example
|
|
2393
|
+
* ```tsx
|
|
2394
|
+
* const options = [
|
|
2395
|
+
* { value: "1", label: "Alpha" },
|
|
2396
|
+
* { value: "2", label: "Bravo" },
|
|
2397
|
+
* { value: "3", label: "Charlie" },
|
|
2398
|
+
* ];
|
|
2399
|
+
* const [selected, setSelected] = useState<string[]>([]);
|
|
2400
|
+
*
|
|
2401
|
+
* <CwTagSelector
|
|
2402
|
+
* labelProps={{ text: "Tags" }}
|
|
2403
|
+
* options={options}
|
|
2404
|
+
* value={selected}
|
|
2405
|
+
* onChange={setSelected}
|
|
2406
|
+
* placeholder="Select items…"
|
|
2407
|
+
* />
|
|
2408
|
+
* ```
|
|
2409
|
+
*/
|
|
2410
|
+
declare function CwTagSelector({ id, options, value, onChange, labelProps, iconProps, alignProps, placeholder, disabled, showSelectAll, feedback, className, style, }: CwTagSelectorProps): react_jsx_runtime.JSX.Element;
|
|
2411
|
+
|
|
1834
2412
|
type CwTreeNode<T> = {
|
|
1835
2413
|
id: string | number;
|
|
1836
2414
|
label: string;
|
|
@@ -1845,19 +2423,41 @@ type TreeViewProps<T> = {
|
|
|
1845
2423
|
};
|
|
1846
2424
|
declare function CwTreeView<T>({ data, onSelect, allowParentSelection, selectedId: initialSelectedId }: TreeViewProps<T>): react_jsx_runtime.JSX.Element;
|
|
1847
2425
|
|
|
2426
|
+
/** Props for {@link CwSearchInput}. */
|
|
1848
2427
|
interface CwSearchInputProps extends HTMLProps<HTMLDivElement> {
|
|
2428
|
+
/** List of items to search through. Each item must be a `CwSelectList` instance. */
|
|
1849
2429
|
selectList: Array<CwSelectList>;
|
|
2430
|
+
/** Props forwarded to the internal `CwLabel`. */
|
|
1850
2431
|
labelProps?: CwLabelProps;
|
|
2432
|
+
/** Props forwarded to the optional leading icon. */
|
|
1851
2433
|
iconProps?: CwIconProps;
|
|
2434
|
+
/** Props forwarded to the `CwAlign` layout wrapper. */
|
|
1852
2435
|
alignProps?: CwAlignProps;
|
|
2436
|
+
/** Called with the `id` of the selected `CwSelectList` item. */
|
|
1853
2437
|
handleChange?: (value: any) => void;
|
|
2438
|
+
/** Input placeholder text. Defaults to `"Search…"`. */
|
|
1854
2439
|
placeholder?: string;
|
|
1855
2440
|
className?: string;
|
|
1856
2441
|
style?: React__default.CSSProperties;
|
|
2442
|
+
/** Disables the input when `true`. */
|
|
1857
2443
|
disabled?: boolean;
|
|
2444
|
+
/** Renders the input in error state when `true`. */
|
|
1858
2445
|
error?: boolean;
|
|
2446
|
+
/** Custom renderer for each suggestion item. Receives the matching `CwSelectList` entry. */
|
|
1859
2447
|
renderOption?: (option: CwSelectList) => React__default.ReactNode;
|
|
1860
2448
|
}
|
|
2449
|
+
/**
|
|
2450
|
+
* Text input with a live-filtered suggestion dropdown backed by a local `CwSelectList` array.
|
|
2451
|
+
* Use `CwFindAirport` or `CwFindCrewmember` for API-backed search inputs.
|
|
2452
|
+
*
|
|
2453
|
+
* @example
|
|
2454
|
+
* <CwSearchInput
|
|
2455
|
+
* selectList={myItems}
|
|
2456
|
+
* handleChange={(id) => console.log('selected', id)}
|
|
2457
|
+
* labelProps={{ text: 'Employee' }}
|
|
2458
|
+
* placeholder="Search by name…"
|
|
2459
|
+
* />
|
|
2460
|
+
*/
|
|
1861
2461
|
declare function CwSearchInput(optionsProps: React__default.PropsWithChildren<CwSearchInputProps>): react_jsx_runtime.JSX.Element;
|
|
1862
2462
|
|
|
1863
2463
|
type Placement = 'bottom' | 'top' | 'left' | 'right';
|
|
@@ -1976,7 +2576,7 @@ declare function CwBtnEdit({ cw_btnOnclick, cw_btn_disabled, onClick, disabled,
|
|
|
1976
2576
|
*/
|
|
1977
2577
|
declare function CwBtnDelete({ cw_btnOnclick, cw_btn_disabled, onClick, disabled, ...rest }: cw_btnProps): react_jsx_runtime.JSX.Element;
|
|
1978
2578
|
|
|
1979
|
-
type DateMatcher$
|
|
2579
|
+
type DateMatcher$3 = Matcher;
|
|
1980
2580
|
interface CwDatePickerProps {
|
|
1981
2581
|
/** Current selected date */
|
|
1982
2582
|
value?: Date;
|
|
@@ -1989,7 +2589,7 @@ interface CwDatePickerProps {
|
|
|
1989
2589
|
/** Array of specific dates to disable */
|
|
1990
2590
|
disabledDates?: Date[];
|
|
1991
2591
|
/** Function to determine if a date should be disabled */
|
|
1992
|
-
disabledMatcher?: DateMatcher$
|
|
2592
|
+
disabledMatcher?: DateMatcher$3;
|
|
1993
2593
|
/** Default month to display when calendar opens */
|
|
1994
2594
|
defaultMonth?: Date;
|
|
1995
2595
|
/** Props for label component */
|
|
@@ -2013,8 +2613,15 @@ interface CwDatePickerProps {
|
|
|
2013
2613
|
/** Number of months to display (default: 1) */
|
|
2014
2614
|
numberOfMonths?: number;
|
|
2015
2615
|
showTodayButton?: boolean;
|
|
2616
|
+
locale?: DayPickerLocale;
|
|
2617
|
+
todayLabel?: string;
|
|
2618
|
+
/** Feedback messages shown below the input; accepts a single message or an array for multiple
|
|
2619
|
+
* @example feedback={{ type: "danger", message: "This field is required" }}
|
|
2620
|
+
* @example feedback={[{ type: "neutral", message: "Select a departure date" }, { type: "warning", message: "Date is in the past" }]}
|
|
2621
|
+
*/
|
|
2622
|
+
feedback?: CwInputFeedback | CwInputFeedback[];
|
|
2016
2623
|
}
|
|
2017
|
-
declare function CwDatePicker({ value, onChange, minDate, maxDate, disabledDates, disabledMatcher, defaultMonth, labelProps, alignProps, placeholder, displayFormat, disabled, required, className, showClear, popupPosition, numberOfMonths, showTodayButton, }: Readonly<CwDatePickerProps>): react_jsx_runtime.JSX.Element;
|
|
2624
|
+
declare function CwDatePicker({ value, onChange, minDate, maxDate, disabledDates, disabledMatcher, defaultMonth, labelProps, alignProps, placeholder, displayFormat, disabled, required, className, showClear, popupPosition, numberOfMonths, showTodayButton, locale, todayLabel, feedback, }: Readonly<CwDatePickerProps>): react_jsx_runtime.JSX.Element;
|
|
2018
2625
|
|
|
2019
2626
|
interface DateRangePreset {
|
|
2020
2627
|
key: string;
|
|
@@ -2025,7 +2632,7 @@ interface DateRangePreset {
|
|
|
2025
2632
|
};
|
|
2026
2633
|
}
|
|
2027
2634
|
|
|
2028
|
-
type DateMatcher$
|
|
2635
|
+
type DateMatcher$2 = Matcher;
|
|
2029
2636
|
interface DateRangeValue {
|
|
2030
2637
|
from: Date | undefined;
|
|
2031
2638
|
to: Date | undefined;
|
|
@@ -2042,7 +2649,7 @@ interface CwDateRangePickerProps {
|
|
|
2042
2649
|
/** Array of specific dates to disable */
|
|
2043
2650
|
disabledDates?: Date[];
|
|
2044
2651
|
/** Function to determine if a date should be disabled */
|
|
2045
|
-
disabledMatcher?: DateMatcher$
|
|
2652
|
+
disabledMatcher?: DateMatcher$2;
|
|
2046
2653
|
/** Maximum number of days allowed in range (optional) */
|
|
2047
2654
|
maxRangeDays?: number;
|
|
2048
2655
|
/** Default month to display when calendar opens */
|
|
@@ -2098,7 +2705,7 @@ interface CwDateTimePickerProps {
|
|
|
2098
2705
|
/** Array of specific dates to disable */
|
|
2099
2706
|
disabledDates?: Date[];
|
|
2100
2707
|
/** Function to determine if a date should be disabled */
|
|
2101
|
-
disabledMatcher?: DateMatcher$
|
|
2708
|
+
disabledMatcher?: DateMatcher$3;
|
|
2102
2709
|
/** Interval in minutes for time selection (default: 15) */
|
|
2103
2710
|
timeInterval?: 5 | 10 | 15 | 30 | 60;
|
|
2104
2711
|
/** Minimum selectable time in format "HH:mm" */
|
|
@@ -2127,10 +2734,16 @@ interface CwDateTimePickerProps {
|
|
|
2127
2734
|
numberOfMonths?: number;
|
|
2128
2735
|
/** Show "Now" button to select current date and time */
|
|
2129
2736
|
showNowButton?: boolean;
|
|
2737
|
+
/** Label for the "Now" button */
|
|
2738
|
+
nowLabel?: string;
|
|
2739
|
+
/** Locale for date formatting and calendar strings (default: enGB) */
|
|
2740
|
+
locale?: DayPickerLocale;
|
|
2741
|
+
/** Numeric timezone offset in hours (e.g., 1, 5.5, -3) */
|
|
2742
|
+
timezoneOffset?: number;
|
|
2130
2743
|
}
|
|
2131
|
-
declare function CwDateTimePicker({ value, onChange, minDateTime, maxDateTime, disabledDates, disabledMatcher, timeInterval, minTime, maxTime, labelProps, alignProps, datePlaceholder, timePlaceholder, disabled, required, className, showClear, popupPosition, numberOfMonths, showNowButton, }: Readonly<CwDateTimePickerProps>): react_jsx_runtime.JSX.Element;
|
|
2744
|
+
declare function CwDateTimePicker({ value, onChange, minDateTime, maxDateTime, disabledDates, disabledMatcher, timeInterval, minTime, maxTime, labelProps, alignProps, datePlaceholder, timePlaceholder, disabled, required, className, showClear, popupPosition, numberOfMonths, showNowButton, nowLabel, locale, timezoneOffset, }: Readonly<CwDateTimePickerProps>): react_jsx_runtime.JSX.Element;
|
|
2132
2745
|
|
|
2133
|
-
type DateMatcher = Matcher;
|
|
2746
|
+
type DateMatcher$1 = Matcher;
|
|
2134
2747
|
interface CwDateTimePickerCompactProps {
|
|
2135
2748
|
/** Current selected datetime */
|
|
2136
2749
|
value?: Date;
|
|
@@ -2143,7 +2756,7 @@ interface CwDateTimePickerCompactProps {
|
|
|
2143
2756
|
/** Array of specific dates to disable */
|
|
2144
2757
|
disabledDates?: Date[];
|
|
2145
2758
|
/** Function to determine if a date should be disabled */
|
|
2146
|
-
disabledMatcher?: DateMatcher;
|
|
2759
|
+
disabledMatcher?: DateMatcher$1;
|
|
2147
2760
|
/** Interval in minutes for time selection (default: 15) */
|
|
2148
2761
|
timeInterval?: 5 | 10 | 15 | 30 | 60;
|
|
2149
2762
|
/** Minimum selectable time in format "HH:mm" */
|
|
@@ -2169,8 +2782,14 @@ interface CwDateTimePickerCompactProps {
|
|
|
2169
2782
|
/** Number of months to display (default: 1) */
|
|
2170
2783
|
numberOfMonths?: number;
|
|
2171
2784
|
showTodayButton?: boolean;
|
|
2785
|
+
/** Label for the "Now" button */
|
|
2786
|
+
nowLabel?: string;
|
|
2787
|
+
/** Label for the time column header */
|
|
2788
|
+
timeLabel?: string;
|
|
2789
|
+
/** Locale for date formatting and calendar strings (default: enGB) */
|
|
2790
|
+
locale?: DayPickerLocale;
|
|
2172
2791
|
}
|
|
2173
|
-
declare function CwDateTimePickerCompact({ value, onChange, minDateTime, maxDateTime, disabledDates, disabledMatcher, timeInterval, minTime, maxTime, labelProps, alignProps, placeholder, disabled, required, className, showClear, popupPosition, numberOfMonths, showTodayButton, }: Readonly<CwDateTimePickerCompactProps>): react_jsx_runtime.JSX.Element;
|
|
2792
|
+
declare function CwDateTimePickerCompact({ value, onChange, minDateTime, maxDateTime, disabledDates, disabledMatcher, timeInterval, minTime, maxTime, labelProps, alignProps, placeholder, disabled, required, className, showClear, popupPosition, numberOfMonths, showTodayButton, nowLabel, timeLabel, locale, }: Readonly<CwDateTimePickerCompactProps>): react_jsx_runtime.JSX.Element;
|
|
2174
2793
|
|
|
2175
2794
|
interface CwTimePickerProps {
|
|
2176
2795
|
/** Current selected time in format "HH:mm" (24h format) */
|
|
@@ -2208,6 +2827,49 @@ interface CwTimePickerProps {
|
|
|
2208
2827
|
}
|
|
2209
2828
|
declare function CwTimePicker({ value, onChange, interval, minTime, maxTime, labelProps, alignProps, placeholder, disabled, required, className, showClear, popupPosition, useNative, }: CwTimePickerProps): react_jsx_runtime.JSX.Element;
|
|
2210
2829
|
|
|
2830
|
+
type DateMatcher = Matcher;
|
|
2831
|
+
interface CwDatePickerTemporalProps {
|
|
2832
|
+
/** Current selected date */
|
|
2833
|
+
value?: Temporal.PlainDate;
|
|
2834
|
+
/** Callback when date changes */
|
|
2835
|
+
onChange: (date: Temporal.PlainDate | undefined) => void;
|
|
2836
|
+
/** Minimum selectable date */
|
|
2837
|
+
minDate?: Temporal.PlainDate;
|
|
2838
|
+
/** Maximum selectable date */
|
|
2839
|
+
maxDate?: Temporal.PlainDate;
|
|
2840
|
+
/** Array of specific dates to disable */
|
|
2841
|
+
disabledDates?: Temporal.PlainDate[];
|
|
2842
|
+
/** Function to determine if a date should be disabled */
|
|
2843
|
+
disabledMatcher?: DateMatcher;
|
|
2844
|
+
/** Default month to display when calendar opens */
|
|
2845
|
+
defaultMonth?: Temporal.PlainYearMonth;
|
|
2846
|
+
/** Props for label component */
|
|
2847
|
+
labelProps?: CwLabelProps;
|
|
2848
|
+
/** Props for alignment */
|
|
2849
|
+
alignProps?: CwAlignProps;
|
|
2850
|
+
/** Placeholder text for input */
|
|
2851
|
+
placeholder?: string;
|
|
2852
|
+
/** Display format for the input (default: dd/MM/yyyy) */
|
|
2853
|
+
displayFormat?: string;
|
|
2854
|
+
/** Is the input disabled */
|
|
2855
|
+
disabled?: boolean;
|
|
2856
|
+
/** Is the input required */
|
|
2857
|
+
required?: boolean;
|
|
2858
|
+
/** Additional CSS class for container */
|
|
2859
|
+
className?: string;
|
|
2860
|
+
/** Show clear button */
|
|
2861
|
+
showClear?: boolean;
|
|
2862
|
+
/** Pop Up Position */
|
|
2863
|
+
popupPosition?: "left-bottom" | "left-top" | "right-top" | "right-bottom";
|
|
2864
|
+
/** Number of months to display (default: 1) */
|
|
2865
|
+
numberOfMonths?: number;
|
|
2866
|
+
showTodayButton?: boolean;
|
|
2867
|
+
todayLabel?: string;
|
|
2868
|
+
/** Feedback messages shown below the input */
|
|
2869
|
+
feedback?: CwInputFeedback | CwInputFeedback[];
|
|
2870
|
+
}
|
|
2871
|
+
declare function CwDatePickerTemporal({ value, onChange, minDate, maxDate, disabledDates, disabledMatcher, defaultMonth, labelProps, alignProps, placeholder, displayFormat, disabled, required, className, showClear, popupPosition, numberOfMonths, showTodayButton, todayLabel, feedback, }: Readonly<CwDatePickerTemporalProps>): react_jsx_runtime.JSX.Element;
|
|
2872
|
+
|
|
2211
2873
|
declare class cblEvent {
|
|
2212
2874
|
id: string;
|
|
2213
2875
|
start: Date;
|
|
@@ -2457,6 +3119,7 @@ declare const SchedulerEvent: FC<SchedulerEventState<SchedulerEventDm>>;
|
|
|
2457
3119
|
|
|
2458
3120
|
interface BackgroundEventDm extends SchedulerEventDm {
|
|
2459
3121
|
isVisible: boolean;
|
|
3122
|
+
contentAlign?: "center" | "flex-end";
|
|
2460
3123
|
}
|
|
2461
3124
|
|
|
2462
3125
|
interface RowHeaderDm {
|
|
@@ -2466,6 +3129,7 @@ interface RowHeaderDm {
|
|
|
2466
3129
|
title3?: string;
|
|
2467
3130
|
subtitle?: string;
|
|
2468
3131
|
subtitle2?: string;
|
|
3132
|
+
rowHeightRem?: number;
|
|
2469
3133
|
}
|
|
2470
3134
|
interface RowHeaderProps<T extends RowHeaderDm> {
|
|
2471
3135
|
value: T;
|
|
@@ -2474,6 +3138,15 @@ interface RowHeaderProps<T extends RowHeaderDm> {
|
|
|
2474
3138
|
}
|
|
2475
3139
|
declare const DefaultRowHeader: FC<RowHeaderProps<RowHeaderDm>>;
|
|
2476
3140
|
|
|
3141
|
+
interface IndicatorRowDm {
|
|
3142
|
+
id: string;
|
|
3143
|
+
rowId: string;
|
|
3144
|
+
start: Date;
|
|
3145
|
+
end: Date;
|
|
3146
|
+
color: string;
|
|
3147
|
+
tooltip?: ReactNode;
|
|
3148
|
+
}
|
|
3149
|
+
|
|
2477
3150
|
interface SchedulerState {
|
|
2478
3151
|
selectedDate: Date;
|
|
2479
3152
|
isUtc: boolean;
|
|
@@ -2484,6 +3157,7 @@ interface SchedulerState {
|
|
|
2484
3157
|
type LineState = {
|
|
2485
3158
|
left: number;
|
|
2486
3159
|
width: number;
|
|
3160
|
+
isDayBoundary?: boolean;
|
|
2487
3161
|
};
|
|
2488
3162
|
|
|
2489
3163
|
type OrderCategory<T> = keyof T & string;
|
|
@@ -2494,6 +3168,7 @@ interface SchedulerProps<T extends RowHeaderDm, P extends SchedulerEventDm> {
|
|
|
2494
3168
|
EventComp: React__default.ComponentType<SchedulerEventState<P>>;
|
|
2495
3169
|
events: P[];
|
|
2496
3170
|
backgroundEvents: BackgroundEventDm[];
|
|
3171
|
+
indicatorRows?: IndicatorRowDm[];
|
|
2497
3172
|
rows: T[];
|
|
2498
3173
|
contextMenuItems: MenuOption[];
|
|
2499
3174
|
orderCategories?: OrderCategory<T>[];
|
|
@@ -2503,12 +3178,14 @@ interface SchedulerProps<T extends RowHeaderDm, P extends SchedulerEventDm> {
|
|
|
2503
3178
|
onEvent: OnEvent;
|
|
2504
3179
|
groupRowColors?: boolean;
|
|
2505
3180
|
rowHeaderWidth?: number;
|
|
3181
|
+
rowHeightRem?: number;
|
|
2506
3182
|
}
|
|
2507
3183
|
declare const Scheduler: <T extends RowHeaderDm, P extends SchedulerEventDm>(props: SchedulerProps<T, P>) => react_jsx_runtime.JSX.Element;
|
|
2508
3184
|
|
|
2509
3185
|
interface SchedulerRowProps<T extends RowHeaderDm, P extends SchedulerEventDm> {
|
|
2510
3186
|
events: P[];
|
|
2511
3187
|
backgroundEvents: BackgroundEventDm[];
|
|
3188
|
+
indicatorRows: IndicatorRowDm[];
|
|
2512
3189
|
rowHeader: RowHeaderProps<T>;
|
|
2513
3190
|
contextMenuItems?: MenuOption[];
|
|
2514
3191
|
EventComp: ComponentType<SchedulerEventState<P>>;
|
|
@@ -2525,6 +3202,8 @@ interface SchedulerRowProps<T extends RowHeaderDm, P extends SchedulerEventDm> {
|
|
|
2525
3202
|
|
|
2526
3203
|
declare const eventIsVisible: (startDate: Date, endDate: Date, selectedDate: Date, visibleDays: number) => boolean;
|
|
2527
3204
|
|
|
3205
|
+
declare const filterVisibleEvents: <P extends SchedulerEventDm>(events: P[], selectedDate: Date, visibleDays: number) => P[];
|
|
3206
|
+
|
|
2528
3207
|
declare const getDefaultDivisions: (visibleDays: number, selectedDate: Date) => HeaderDivision[];
|
|
2529
3208
|
|
|
2530
3209
|
declare const getEventSizes: (schedulerDate: Date, totalDays: number, startDate: Date, endDate: Date) => {
|
|
@@ -2543,7 +3222,6 @@ interface PinRowHeaderProps extends RowHeaderDm {
|
|
|
2543
3222
|
isLoading: boolean;
|
|
2544
3223
|
highlightColor?: string;
|
|
2545
3224
|
tooltip?: ReactNode;
|
|
2546
|
-
overlayTooltipStyle?: CSSProperties;
|
|
2547
3225
|
indicators?: ReactNode;
|
|
2548
3226
|
}
|
|
2549
3227
|
declare const PinRowHeader: FC<RowHeaderProps<PinRowHeaderProps>>;
|
|
@@ -2555,10 +3233,12 @@ interface SuperSchedulerProps {
|
|
|
2555
3233
|
rows: PinRowHeaderProps[];
|
|
2556
3234
|
events: SchedulerEventDm[];
|
|
2557
3235
|
backgroundEvents: BackgroundEventDm[];
|
|
3236
|
+
indicatorRows?: IndicatorRowDm[];
|
|
2558
3237
|
contextMenuItems: MenuOption[];
|
|
2559
3238
|
pinnedOrderCategory?: OrderCategory<PinRowHeaderProps>[];
|
|
2560
3239
|
unPinnedOrderCategory?: OrderCategory<PinRowHeaderProps>[];
|
|
2561
3240
|
onEvent: OnEvent;
|
|
3241
|
+
rowHeightRem?: number;
|
|
2562
3242
|
}
|
|
2563
3243
|
declare const SuperScheduler: FC<SuperSchedulerProps>;
|
|
2564
3244
|
|
|
@@ -2575,22 +3255,99 @@ declare class OnClearPinned implements UiEvent {
|
|
|
2575
3255
|
}
|
|
2576
3256
|
|
|
2577
3257
|
type DisplayMode = "default" | "icao-only" | "iata-only" | "full-text";
|
|
3258
|
+
/** Props for {@link CwFindAirport}. */
|
|
2578
3259
|
interface CwFindAirportProps {
|
|
3260
|
+
/** Called with the selected airport's `AptKey` when a result is chosen. */
|
|
2579
3261
|
handleChange: (value: number) => void;
|
|
3262
|
+
/** API search mode passed to the WinOps backend. Defaults to `"OnlyDatabase"`. */
|
|
2580
3263
|
searchType?: string;
|
|
3264
|
+
/** Input placeholder text. Defaults to `"Search airport…"`. */
|
|
2581
3265
|
placeHolder?: string;
|
|
3266
|
+
/** Marks the field as required (visual indicator only). */
|
|
2582
3267
|
required?: boolean;
|
|
3268
|
+
/** Base URL of the WinOps backend, e.g. `"https://localhost:44300"`. */
|
|
2583
3269
|
cblConfig: string;
|
|
2584
3270
|
className?: string;
|
|
3271
|
+
/** Pre-select an airport by its `AptKey`. Triggers an initial fetch to resolve the display text. */
|
|
2585
3272
|
value?: number;
|
|
2586
3273
|
disabled?: boolean;
|
|
2587
|
-
|
|
3274
|
+
/**
|
|
3275
|
+
* Controls what part of the airport name is shown in the input after selection.
|
|
3276
|
+
* - `"default"` — short `ICAO(IATA)` code format
|
|
3277
|
+
* - `"icao-only"` — only the 4-letter ICAO code
|
|
3278
|
+
* - `"iata-only"` — only the 3-letter IATA code
|
|
3279
|
+
* - `"full-text"` — full `DisplayAirportText` from the API
|
|
3280
|
+
*/
|
|
3281
|
+
displayMode?: DisplayMode; /** Fixed CSS width for the input wrapper, e.g. `"400px"`. */
|
|
2588
3282
|
width?: string;
|
|
3283
|
+
/** Text shown in the input on first render before any API data is loaded. */
|
|
3284
|
+
initialDisplayText?: string;
|
|
3285
|
+
/** Props forwarded to the internal `CwLabel`. */
|
|
2589
3286
|
labelProps?: CwLabelProps;
|
|
3287
|
+
/** Props forwarded to the `CwAlign` layout wrapper. */
|
|
2590
3288
|
alignProps?: CwAlignProps;
|
|
2591
3289
|
}
|
|
3290
|
+
/**
|
|
3291
|
+
* API-backed airport search input for WinOps.
|
|
3292
|
+
*
|
|
3293
|
+
* Fetches matching airports from the WinOps backend as the user types (debounced).
|
|
3294
|
+
* Renders results in a shared `cw-choice-dropdown` styled panel with keyboard navigation.
|
|
3295
|
+
* Supports pre-selecting an airport by `value` (AptKey) and customising the displayed text
|
|
3296
|
+
* format via `displayMode`.
|
|
3297
|
+
*
|
|
3298
|
+
* Requires a running WinOps backend — set `cblConfig` to its base URL.
|
|
3299
|
+
*
|
|
3300
|
+
* @example
|
|
3301
|
+
* <CwFindAirport
|
|
3302
|
+
* cblConfig="https://localhost:44300"
|
|
3303
|
+
* handleChange={(key) => setAirportKey(key)}
|
|
3304
|
+
* labelProps={{ text: 'Departure Airport' }}
|
|
3305
|
+
* displayMode="iata-only"
|
|
3306
|
+
* />
|
|
3307
|
+
*/
|
|
2592
3308
|
declare const CwFindAirport: React__default.FC<CwFindAirportProps>;
|
|
2593
3309
|
|
|
3310
|
+
/** Props for {@link CwFindCrewmember}. */
|
|
3311
|
+
interface CwFindCrewmemberProps {
|
|
3312
|
+
/** Called with the selected crewmember's numeric ID when a result is chosen. */
|
|
3313
|
+
handleChange: (value: number) => void;
|
|
3314
|
+
/** Input placeholder text. Defaults to `"Search crew…"`. */
|
|
3315
|
+
placeHolder?: string;
|
|
3316
|
+
/** Marks the field as required (visual indicator only). */
|
|
3317
|
+
required?: boolean;
|
|
3318
|
+
/** Base URL of the WinOps backend, e.g. `"https://localhost:44300"`. */
|
|
3319
|
+
cblConfig: string;
|
|
3320
|
+
className?: string;
|
|
3321
|
+
/** Pre-select a crewmember by their numeric ID. Triggers an initial fetch to resolve the display text. */
|
|
3322
|
+
value?: number;
|
|
3323
|
+
disabled?: boolean;
|
|
3324
|
+
/** Fixed CSS width for the input wrapper, e.g. `"400px"`. */
|
|
3325
|
+
width?: string;
|
|
3326
|
+
/** Text shown in the input on first render before any API data is loaded. */
|
|
3327
|
+
initialDisplayText?: string;
|
|
3328
|
+
/** Props forwarded to the internal `CwLabel`. */
|
|
3329
|
+
labelProps?: CwLabelProps;
|
|
3330
|
+
/** Props forwarded to the `CwAlign` layout wrapper. */
|
|
3331
|
+
alignProps?: CwAlignProps;
|
|
3332
|
+
}
|
|
3333
|
+
/**
|
|
3334
|
+
* API-backed crewmember search input for WinOps.
|
|
3335
|
+
*
|
|
3336
|
+
* Fetches matching crewmembers from the WinOps backend as the user types (debounced).
|
|
3337
|
+
* Renders results in a shared `cw-choice-dropdown` styled panel with keyboard navigation.
|
|
3338
|
+
* Supports pre-selecting a crewmember by numeric `value` (ID).
|
|
3339
|
+
*
|
|
3340
|
+
* Requires a running WinOps backend — set `cblConfig` to its base URL.
|
|
3341
|
+
*
|
|
3342
|
+
* @example
|
|
3343
|
+
* <CwFindCrewmember
|
|
3344
|
+
* cblConfig="https://localhost:44300"
|
|
3345
|
+
* handleChange={(id) => setCrewId(id)}
|
|
3346
|
+
* labelProps={{ text: 'Crew Member' }}
|
|
3347
|
+
* />
|
|
3348
|
+
*/
|
|
3349
|
+
declare const CwFindCrewmember: React__default.FC<CwFindCrewmemberProps>;
|
|
3350
|
+
|
|
2594
3351
|
declare class OnClickEvent implements UiEvent {
|
|
2595
3352
|
readonly id: string;
|
|
2596
3353
|
constructor(id: string);
|
|
@@ -2668,5 +3425,5 @@ declare class OnClickContextMenu implements UiEvent {
|
|
|
2668
3425
|
constructor(id: string, clickedMenu: string);
|
|
2669
3426
|
}
|
|
2670
3427
|
|
|
2671
|
-
export { CblDragAndDrop$1 as CblDragAndDrop, CwAccordionContainer, CwAlign, CwAnchoredMenu, CwBtnDelete, CwBtnEdit, CwBtnSave, CwButton, CwCard, CwCardList, CwCheckbox, CwChip, CwColorPicker, CwConfirmationPopup, CwContextMenu, CwDatePicker, CwDateRangePicker, CwDateTimePicker, CwDateTimePickerCompact, CwDialog, CwDialogManager, CwDigit, CwDisplayMessage, CwDropdownFilter, CwExpandable, CwFileUpload, CwFileUploadMultiple, CwFindAirport, CwGenericTooltip, CwHeadingMain, CwHeadingSecond, CwIcon, CwImageArea, CwImageGallery, CwImageZoom, CwInput, CwInputColor, CwInputDate, CwInputDatePicker, CwInputDateText, CwInputDatetime, CwInputImage, CwInputNumber, CwInputPhone, CwInputText, CwKeyValueList, CwLabel, CwLoading, CwLoadingSmall, CwMessage, CwMessageManager, CwMessageType, CwModal, CwModalHover, CwModalReportFunctional, CwMultiFilter, CwMultiFilterTag, CwNote, CwOption, CwReportModal, CwScheduler, CwSearchInput, CwSelect, CwSelectList, CwSelectListItems, CwSortableList, CwSuperScheduler, CwTable, CwTableGrouped, CwTabs, CwTextArea, CwTime, CwTimePicker, CwToggle,
|
|
2672
|
-
export type { BackgroundEventDm, CardChip, ChipColorScheme, ChipVariant, Column, ConfirmationPopupProps, CwAlignProps, CwCardListProps, CwCardProps, CwChipProps, CwDialogProps, CwExpandableProps, CwImageAreaMethods, CwImageAreaProps, CwInputDatePickerProps, CwInputDateProps, CwInputDateTextProps, CwInputDatetimeProps, CwInputImageProps, CwInputNumberProps, CwInputPhoneProps, CwInputTextProps, CwInputTimeProps, CwKeyValueListProps, CwLabelProps, CwMessageProps, CwModalHoverProps, CwMultiFilterProps, CwMultiFilterTagProps, CwNoteProps, CwReportModalFunctionalProps, CwSelectListProps, CwSortableListProps, CwTableGroupedData, CwTableGroupedData_Group, CwTableGroupedData_Row, CwTableGroupedProps, CwTextAreaProps, CwTreeNode, DataItem, DateRangeValue, ICwMultiFilterTag, ImageItem, MenuOption, OnEvent, PinRowHeaderProps, RowHeaderDm, RowHeaderProps, SchedulerEventDm, SchedulerEventState, SchedulerRowProps, SchedulerState, SuperSchedulerProps, Tab, Weekday, ZoomImageItem, cblEventCompProps, resourceCompProps2 };
|
|
3428
|
+
export { CblDragAndDrop$1 as CblDragAndDrop, CwAccordionContainer, CwAlign, CwAnchoredMenu, CwBtnDelete, CwBtnEdit, CwBtnSave, CwButton, CwCard, CwCardList, CwCheck, CwCheckbox, CwCheckboxGroup, CwChip, CwColorPicker, CwConfirmationPopup, CwContextMenu, CwDatePicker, CwDatePickerTemporal, CwDateRangePicker, CwDateTimePicker, CwDateTimePickerCompact, CwDialog, CwDialogManager, CwDigit, CwDisplayMessage, CwDropdown, CwDropdownFilter, CwExpandable, CwFileUpload, CwFileUploadMultiple, CwFindAirport, CwFindCrewmember, CwGenericTooltip, CwHeadingMain, CwHeadingSecond, CwIcon, CwImageArea, CwImageGallery, CwImageZoom, CwInput, CwInputColor, CwInputDate, CwInputDatePicker, CwInputDateText, CwInputDatetime, CwInputImage, CwInputNumber, CwInputPhone, CwInputText, CwKeyValueList, CwLabel, CwLoading, CwLoadingSmall, CwMasterDetail, CwMessage, CwMessageManager, CwMessageType, CwModal, CwModalHover, CwModalReportFunctional, CwMultiFilter, CwMultiFilterTag, CwNote, CwOption, CwPopoverButton, CwReportModal, CwScheduler, CwSearchInput, CwSelect, CwSelectList, CwSelectListItems, CwSortableList, CwSortableTable, CwSuperScheduler, CwTable, CwTableGrouped, CwTableServerSide, CwTabs, CwTagSelector, CwTextArea, CwTime, CwTimePicker, CwToggle, CwTooltipManager, CwTooltipNew, CwTreeView, CwWeekdaySelector, DefaultRowHeader, OnClearPinned, OnClickContextMenu, OnClickEvent, OnClickRowEvent, OnClickRowHeader, OnClickUtc, OnDoubleClickEvent, OnDoubleClickRowEvent, OnDragEvent, OnDropCtrlEvent, OnDropEvent, OnEndClickHeaderEvent, OnLeftDragStart, OnMultiClickEvent, OnPinRow, OnRangeClickEvent, OnRightClickEvent, OnRightClickRow, OnRightDragStart, OnStartClickHeaderEvent, OnUnpinRow, PinRowHeader, Resource, Scheduler, SchedulerEvent, SuperScheduler, UiEvent, Weekdays, cblEvent, eventIsVisible, filterVisibleEvents, getDefaultDivisions, getEventSizes, itemsToMultiFilterTags, useCwMessage, useSortableList, useSortableTable };
|
|
3429
|
+
export type { BackgroundEventDm, CardChip, ChipColorScheme, ChipVariant, Column$1 as Column, ConfirmationPopupProps, CwAlignProps, CwCardListProps, CwCardProps, CwChipProps, CwDialogProps, CwDropdownOption, CwDropdownProps, CwExpandableProps, CwImageAreaMethods, CwImageAreaProps, CwInputDatePickerProps, CwInputDateProps, CwInputDateTextProps, CwInputDatetimeProps, CwInputImageProps, CwInputNumberProps, CwInputPhoneProps, CwInputTextProps, CwInputTimeProps, CwKeyValueListProps, CwLabelProps, CwMasterDetailItem, CwMasterDetailProps, CwMessageProps, CwModalHoverProps, CwMultiFilterProps, CwMultiFilterTagProps, CwNoteProps, CwPopoverButtonProps, CwReportModalFunctionalProps, CwSelectListProps, CwSortableListProps, CwSortableTableProps, CwTableGroupedData, CwTableGroupedData_Group, CwTableGroupedData_Row, CwTableGroupedProps, CwTagSelectorOption, CwTagSelectorProps, CwTextAreaProps, CwTreeNode, DataItem, DateRangeValue, ICwMultiFilterTag, ImageItem, IndicatorRowDm, MenuOption, OnEvent, PinRowHeaderProps, RowHeaderDm, RowHeaderProps, SchedulerEventDm, SchedulerEventState, SchedulerRowProps, SchedulerState, ServerSideTableState, SortableColumn, SortableTableDragState, SuperSchedulerProps, Tab, UseSortableTableReturn, Weekday, ZoomImageItem, cblEventCompProps, resourceCompProps2 };
|