@lavalogic/scoria 0.36.0 → 0.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Components/AccordionGroup.svelte +6 -2
- package/dist/Components/AccordionGroupButton.svelte +78 -78
- package/dist/Components/AccordionGroupButtonProps.d.ts +27 -8
- package/dist/Components/AccordionGroupProps.d.ts +10 -2
- package/dist/Components/Action.svelte +31 -33
- package/dist/Components/ActionProps.d.ts +23 -3
- package/dist/Components/AlertModal.svelte +90 -39
- package/dist/Components/AppointmentCalendar/AppointmentCalendar.svelte +1126 -0
- package/dist/Components/AppointmentCalendar/AppointmentCalendar.svelte.d.ts +4 -0
- package/dist/Components/AppointmentCalendar/AppointmentCalendarProps.d.ts +92 -0
- package/dist/Components/AppointmentCalendar/AppointmentCalendarProps.js +12 -0
- package/dist/Components/Base/BaseModal.svelte +172 -0
- package/dist/Components/Base/BaseModal.svelte.d.ts +4 -0
- package/dist/Components/Base/BaseModalProps.d.ts +73 -0
- package/dist/Components/Base/BaseModalProps.js +1 -0
- package/dist/Components/Base/ContextWrapper.svelte +37 -15
- package/dist/Components/Base/ContextWrapper.svelte.d.ts +24 -5
- package/dist/Components/Base/ContextWrapperProps.d.ts +22 -0
- package/dist/Components/Base/Pagination.svelte +70 -62
- package/dist/Components/Base/Pagination.svelte.d.ts +12 -2
- package/dist/Components/Base/PaginationProps.d.ts +60 -3
- package/dist/Components/Base/Snippets.svelte +7 -0
- package/dist/Components/Base/Snippets.svelte.d.ts +5 -1
- package/dist/Components/BigRadioSet.svelte +18 -9
- package/dist/Components/BigRadioSetProps.d.ts +17 -1
- package/dist/Components/Bubble.svelte +67 -34
- package/dist/Components/Bubble.svelte.d.ts +23 -2
- package/dist/Components/BubbleProps.d.ts +55 -4
- package/dist/Components/Button.svelte +50 -38
- package/dist/Components/ButtonProps.d.ts +66 -1
- package/dist/Components/Checkbox.svelte +57 -29
- package/dist/Components/Checkbox.svelte.d.ts +1 -12
- package/dist/Components/CheckboxProps.d.ts +27 -0
- package/dist/Components/CheckboxProps.js +1 -0
- package/dist/Components/CollapsibleCard.svelte +53 -22
- package/dist/Components/CollapsibleCardProps.d.ts +22 -1
- package/dist/Components/Contexts/ContextMenu.svelte +53 -32
- package/dist/Components/Contexts/ContextMenu.svelte.d.ts +26 -0
- package/dist/Components/Contexts/ContextMenuDivider.svelte +15 -7
- package/dist/Components/Contexts/ContextMenuDivider.svelte.d.ts +9 -0
- package/dist/Components/Contexts/ContextMenuOption.svelte +27 -18
- package/dist/Components/Contexts/ContextMenuOption.svelte.d.ts +12 -1
- package/dist/Components/Contexts/ContextMenuOptionProps.d.ts +34 -2
- package/dist/Components/Contexts/Toast.svelte +28 -4
- package/dist/Components/Contexts/Toast.svelte.d.ts +14 -0
- package/dist/Components/Contexts/ToastContainer.svelte +30 -11
- package/dist/Components/Contexts/ToastContainer.svelte.d.ts +14 -0
- package/dist/Components/Contexts/ToastProps.d.ts +14 -1
- package/dist/Components/Contexts/Tooltip.svelte +21 -10
- package/dist/Components/Contexts/Tooltip.svelte.d.ts +10 -0
- package/dist/Components/DataMatrixIcon.svelte +82 -11
- package/dist/Components/DataMatrixIconProps.d.ts +73 -1
- package/dist/Components/DateInput.svelte +64 -29
- package/dist/Components/DateInput.svelte.d.ts +1 -1
- package/dist/Components/DateOnlyInputProps.d.ts +31 -5
- package/dist/Components/DatePicker.svelte +96 -108
- package/dist/Components/DatePickerProps.d.ts +18 -1
- package/dist/Components/DateTimeInputProps.d.ts +30 -5
- package/dist/Components/DesktopModal.svelte +14 -43
- package/dist/Components/DesktopModalProps.d.ts +5 -4
- package/dist/Components/Dial.svelte +103 -41
- package/dist/Components/DialProps.d.ts +74 -2
- package/dist/Components/DimensionInput.svelte +50 -64
- package/dist/Components/DimensionInput.svelte.d.ts +1 -1
- package/dist/Components/DimensionInputProps.d.ts +39 -4
- package/dist/Components/DragMenu/DragMenuHolder.svelte +41 -29
- package/dist/Components/DragMenu/DragMenuHolderProps.d.ts +30 -1
- package/dist/Components/DragMenu/DraggableCard.svelte +44 -8
- package/dist/Components/DragMenu/DraggableCardProps.d.ts +27 -1
- package/dist/Components/FileCard.svelte +6 -2
- package/dist/Components/FileCardProps.d.ts +17 -1
- package/dist/Components/FileUpload.svelte +82 -42
- package/dist/Components/FileUploadProps.d.ts +34 -4
- package/dist/Components/GridInput.svelte +27 -17
- package/dist/Components/GridInput.svelte.d.ts +5 -5
- package/dist/Components/GridInputProps.d.ts +4 -1
- package/dist/Components/GridInputSet.svelte +12 -5
- package/dist/Components/GridInputSet.svelte.d.ts +5 -5
- package/dist/Components/GridInputSetProps.d.ts +4 -2
- package/dist/Components/HorizontalTabGroup.svelte +13 -11
- package/dist/Components/HorizontalTabGroupButton.svelte +16 -68
- package/dist/Components/HorizontalTabGroupProps.d.ts +15 -2
- package/dist/Components/Icon.svelte +62 -21
- package/dist/Components/IconProps.d.ts +54 -6
- package/dist/Components/Icons.d.ts +8 -0
- package/dist/Components/Icons.js +234 -215
- package/dist/Components/LoadingAnimation.svelte +18 -18
- package/dist/Components/LoadingAnimation.svelte.d.ts +1 -3
- package/dist/Components/LoadingAnimationProps.d.ts +16 -0
- package/dist/Components/LoadingAnimationProps.js +1 -0
- package/dist/Components/LoadingModal.svelte +18 -20
- package/dist/Components/LoadingModal.svelte.d.ts +1 -4
- package/dist/Components/LoadingModalProps.d.ts +17 -0
- package/dist/Components/LoadingModalProps.js +1 -0
- package/dist/Components/LoadingOverlay.svelte +11 -13
- package/dist/Components/LoadingOverlay.svelte.d.ts +1 -5
- package/dist/Components/LoadingOverlayProps.d.ts +28 -0
- package/dist/Components/LoadingOverlayProps.js +1 -0
- package/dist/Components/Modal.svelte +77 -82
- package/dist/Components/Modal.svelte.d.ts +1 -25
- package/dist/Components/ModalProps.d.ts +65 -0
- package/dist/Components/ModalProps.js +1 -0
- package/dist/Components/MultiSelect.svelte +88 -76
- package/dist/Components/MultiSelectCommonProps.d.ts +33 -4
- package/dist/Components/MultiSelectPropsAsObject.d.ts +5 -0
- package/dist/Components/MultiSelectPropsAsPrimitive.d.ts +6 -0
- package/dist/Components/Nav/CallbackButtonWithIcon.d.ts +22 -1
- package/dist/Components/Nav/Nav.svelte +35 -30
- package/dist/Components/Nav/Nav.svelte.d.ts +23 -2
- package/dist/Components/Nav/NavProps.d.ts +50 -3
- package/dist/Components/Nav/NavServiceMenuList.svelte +12 -3
- package/dist/Components/Nav/NavServiceMenuListProps.d.ts +25 -1
- package/dist/Components/Nav/NavTab.svelte +19 -48
- package/dist/Components/Nav/NavTab.svelte.d.ts +23 -2
- package/dist/Components/Nav/NavTabProps.d.ts +16 -2
- package/dist/Components/Nav/ServiceMenuItem.svelte +29 -20
- package/dist/Components/Nav/ServicesNav.svelte +60 -34
- package/dist/Components/Nav/ServicesNav.svelte.d.ts +23 -2
- package/dist/Components/Nav/ServicesNavProps.d.ts +20 -4
- package/dist/Components/Nav/SideMenuItemProps.d.ts +16 -0
- package/dist/Components/NumberInput.svelte +37 -27
- package/dist/Components/NumberInputProps.d.ts +37 -0
- package/dist/Components/PageHeading.svelte +2 -13
- package/dist/Components/PageHeading.svelte.d.ts +1 -6
- package/dist/Components/PageHeadingProps.d.ts +23 -0
- package/dist/Components/PageHeadingProps.js +1 -0
- package/dist/Components/PasswordInput.svelte +27 -15
- package/dist/Components/PasswordInput.svelte.d.ts +2 -2
- package/dist/Components/PasswordInputProps.d.ts +21 -0
- package/dist/Components/PasswordInputProps.js +1 -0
- package/dist/Components/Portal.svelte +14 -3
- package/dist/Components/PortalProps.d.ts +20 -1
- package/dist/Components/ProgressBubble.svelte +98 -53
- package/dist/Components/ProgressBubbleProps.d.ts +23 -2
- package/dist/Components/QuerySelect.svelte +103 -159
- package/dist/Components/QuerySelect.svelte.d.ts +2 -29
- package/dist/Components/QuerySelectProps.d.ts +66 -0
- package/dist/Components/QuerySelectProps.js +1 -0
- package/dist/Components/SingleSelect.svelte +86 -108
- package/dist/Components/SingleSelectCommonProps.d.ts +43 -5
- package/dist/Components/SingleSelectPropsAsObject.d.ts +7 -0
- package/dist/Components/SingleSelectPropsAsPrimitive.d.ts +8 -0
- package/dist/Components/StepButton.svelte +19 -69
- package/dist/Components/StepForm.svelte +52 -52
- package/dist/Components/StepFormProps.d.ts +16 -2
- package/dist/Components/Switch.svelte +68 -31
- package/dist/Components/Switch.svelte.d.ts +1 -1
- package/dist/Components/SwitchProps.d.ts +46 -0
- package/dist/Components/Table/Body/HeightData.d.ts +1 -6
- package/dist/Components/Table/Body/HeightData.js +8 -0
- package/dist/Components/Table/Body/QuickSearchCell.svelte +106 -50
- package/dist/Components/Table/Body/QuickSearchCell.svelte.d.ts +12 -11
- package/dist/Components/Table/Body/QuickSearchCellProps.d.ts +6 -0
- package/dist/Components/Table/Body/Rows/ColumnHighlight.svelte +43 -9
- package/dist/Components/Table/Body/Rows/ColumnHighlight.svelte.d.ts +24 -2
- package/dist/Components/Table/Body/Rows/ColumnHighlightProps.d.ts +3 -0
- package/dist/Components/Table/Body/Rows/ColumnList.svelte +15 -5
- package/dist/Components/Table/Body/Rows/ColumnList.svelte.d.ts +12 -11
- package/dist/Components/Table/Body/Rows/ColumnListProps.d.ts +1 -0
- package/dist/Components/Table/Body/Rows/ColumnListRow.svelte +424 -91
- package/dist/Components/Table/Body/Rows/ColumnListRow.svelte.d.ts +12 -11
- package/dist/Components/Table/Body/Rows/ColumnListRowProps.d.ts +5 -0
- package/dist/Components/Table/Body/Rows/Columns/AccessorComponent.svelte +43 -13
- package/dist/Components/Table/Body/Rows/Columns/AccessorComponentProps.d.ts +12 -0
- package/dist/Components/Table/Body/Rows/Columns/ActionsCell.svelte +50 -38
- package/dist/Components/Table/Body/Rows/Columns/ActionsCell.svelte.d.ts +12 -12
- package/dist/Components/Table/Body/Rows/Columns/ActionsColumn.d.ts +9 -0
- package/dist/Components/Table/Body/Rows/Columns/ActionsTableCell.d.ts +5 -0
- package/dist/Components/Table/Body/Rows/Columns/BubbleCell.svelte +61 -26
- package/dist/Components/Table/Body/Rows/Columns/BubbleCell.svelte.d.ts +14 -13
- package/dist/Components/Table/Body/Rows/Columns/BubbleCellProps.d.ts +12 -0
- package/dist/Components/Table/Body/Rows/Columns/BubbleCellProps.js +1 -0
- package/dist/Components/Table/Body/Rows/Columns/ExpandCell.svelte +36 -16
- package/dist/Components/Table/Body/Rows/Columns/FocusableImmutableCell.svelte +47 -24
- package/dist/Components/Table/Body/Rows/Columns/FocusableImmutableCell.svelte.d.ts +12 -11
- package/dist/Components/Table/Body/Rows/Columns/FocusableImmutableCellProps.d.ts +7 -0
- package/dist/Components/Table/Body/Rows/Columns/ProgressCell.svelte +54 -20
- package/dist/Components/Table/Body/Rows/Columns/ProgressCell.svelte.d.ts +17 -11
- package/dist/Components/Table/Body/Rows/Columns/RowSelectionColumn.d.ts +8 -0
- package/dist/Components/Table/Body/Rows/Columns/RowSelectionTableCell.d.ts +5 -0
- package/dist/Components/Table/Body/Rows/Columns/SelectColumn.d.ts +11 -0
- package/dist/Components/Table/Body/Rows/Columns/SelectTableCell.d.ts +11 -0
- package/dist/Components/Table/Body/Rows/Columns/TableAction.svelte +55 -40
- package/dist/Components/Table/Body/Rows/Columns/TableAction.svelte.d.ts +11 -0
- package/dist/Components/Table/Body/Rows/Columns/TableCheckbox.svelte +38 -27
- package/dist/Components/Table/Body/Rows/Columns/TableCheckbox.svelte.d.ts +13 -18
- package/dist/Components/Table/Body/Rows/Columns/TableCheckboxProps.d.ts +17 -0
- package/dist/Components/Table/Body/Rows/Columns/TableCheckboxProps.js +1 -0
- package/dist/Components/Table/Body/Rows/Columns/TableColumn.svelte +22 -7
- package/dist/Components/Table/Body/Rows/Columns/TableColumn.svelte.d.ts +1 -7
- package/dist/Components/Table/Body/Rows/Columns/TableColumnProps.d.ts +16 -0
- package/dist/Components/Table/Body/Rows/Columns/TableColumnProps.js +1 -0
- package/dist/Components/Table/Body/Rows/Columns/TableDatePicker.svelte +61 -31
- package/dist/Components/Table/Body/Rows/Columns/TableDatePicker.svelte.d.ts +12 -11
- package/dist/Components/Table/Body/Rows/Columns/TableDatePickerProps.d.ts +9 -0
- package/dist/Components/Table/Body/Rows/Columns/TableNumberInput.svelte +123 -244
- package/dist/Components/Table/Body/Rows/Columns/TableNumberInput.svelte.d.ts +20 -12
- package/dist/Components/Table/Body/Rows/Columns/TableQueryCell.d.ts +8 -0
- package/dist/Components/Table/Body/Rows/Columns/TableQueryColumn.d.ts +9 -0
- package/dist/Components/Table/Body/Rows/Columns/TableQuerySelect.svelte +126 -189
- package/dist/Components/Table/Body/Rows/Columns/TableQuerySelect.svelte.d.ts +12 -11
- package/dist/Components/Table/Body/Rows/Columns/TableQuerySelectProps.d.ts +8 -0
- package/dist/Components/Table/Body/Rows/Columns/TableRowSelectionCheckbox.svelte +31 -19
- package/dist/Components/Table/Body/Rows/Columns/TableRowSelectionCheckbox.svelte.d.ts +2 -5
- package/dist/Components/Table/Body/Rows/Columns/TableRowSelectionCheckboxProps.d.ts +14 -0
- package/dist/Components/Table/Body/Rows/Columns/TableRowSelectionCheckboxProps.js +1 -0
- package/dist/Components/Table/Body/Rows/Columns/TableSelect.svelte +125 -187
- package/dist/Components/Table/Body/Rows/Columns/TableSelect.svelte.d.ts +13 -12
- package/dist/Components/Table/Body/Rows/Columns/TableSelectProps.d.ts +6 -0
- package/dist/Components/Table/Body/Rows/Columns/TableTextInput.svelte +119 -270
- package/dist/Components/Table/Body/Rows/Columns/TableTextInput.svelte.d.ts +12 -11
- package/dist/Components/Table/Body/Rows/Columns/TableTextInputProps.d.ts +6 -0
- package/dist/Components/Table/Body/Rows/Columns/ValidityCell.svelte +23 -13
- package/dist/Components/Table/Body/Rows/Columns/_helpers/useAsyncEditable.svelte.d.ts +104 -0
- package/dist/Components/Table/Body/Rows/Columns/_helpers/useAsyncEditable.svelte.js +215 -0
- package/dist/Components/Table/Body/Rows/TableRow.svelte +200 -132
- package/dist/Components/Table/Body/Rows/TableRow.svelte.d.ts +2 -10
- package/dist/Components/Table/Body/Rows/TableRowProps.d.ts +11 -2
- package/dist/Components/Table/Body/TableBody.svelte +170 -53
- package/dist/Components/Table/Body/TableBody.svelte.d.ts +15 -22
- package/dist/Components/Table/Body/TableBodyProps.d.ts +9 -7
- package/dist/Components/Table/ColumnDefinitions/ExampleItemColumnDefRepository.svelte.js +18 -12
- package/dist/Components/Table/ColumnFactory.svelte.d.ts +43 -0
- package/dist/Components/Table/ColumnFactory.svelte.js +339 -0
- package/dist/Components/Table/Headers/HighlightAllHeader.svelte +5 -3
- package/dist/Components/Table/Headers/HighlightAllHeader.svelte.d.ts +12 -11
- package/dist/Components/Table/Headers/SelectAllHeader.svelte +5 -3
- package/dist/Components/Table/Headers/SelectAllHeader.svelte.d.ts +12 -11
- package/dist/Components/Table/Headers/TableHead.svelte +340 -200
- package/dist/Components/Table/Headers/TableHead.svelte.d.ts +13 -16
- package/dist/Components/Table/Headers/TableHeadProps.d.ts +10 -0
- package/dist/Components/Table/Headers/TableHeadProps.js +1 -0
- package/dist/Components/Table/Misc/ColumnPanel.svelte +108 -50
- package/dist/Components/Table/Misc/ColumnPanel.svelte.d.ts +12 -11
- package/dist/Components/Table/Misc/ColumnPanelModal.svelte +20 -7
- package/dist/Components/Table/Misc/ColumnPanelModal.svelte.d.ts +12 -11
- package/dist/Components/Table/Misc/ColumnPanelModalProps.d.ts +5 -0
- package/dist/Components/Table/Misc/FilterInput.svelte +30 -41
- package/dist/Components/Table/Misc/FilterInput.svelte.d.ts +12 -11
- package/dist/Components/Table/Misc/FilterPanel.svelte +387 -29
- package/dist/Components/Table/Misc/FilterPanel.svelte.d.ts +12 -11
- package/dist/Components/Table/Misc/FilterPanelModal.svelte +4 -51
- package/dist/Components/Table/Misc/FilterPanelModal.svelte.d.ts +2 -23
- package/dist/Components/Table/Misc/SidePanel.svelte +12 -9
- package/dist/Components/Table/Misc/SidePanel.svelte.d.ts +1 -7
- package/dist/Components/Table/Misc/SidePanelProps.d.ts +17 -0
- package/dist/Components/Table/Misc/SidePanelProps.js +1 -0
- package/dist/Components/Table/Misc/TableFooter.svelte +44 -35
- package/dist/Components/Table/Misc/TableFooter.svelte.d.ts +13 -14
- package/dist/Components/Table/Misc/TableFooterProps.d.ts +8 -0
- package/dist/Components/Table/Misc/TableFooterProps.js +1 -0
- package/dist/Components/Table/Misc/TableHorizontalBar.svelte +17 -48
- package/dist/Components/Table/Misc/TableHorizontalBar.svelte.d.ts +12 -11
- package/dist/Components/Table/Misc/TableSidebar.svelte +28 -47
- package/dist/Components/Table/Misc/TableSidebar.svelte.d.ts +12 -11
- package/dist/Components/Table/Misc/ToolboxPanel.svelte +121 -55
- package/dist/Components/Table/Misc/ToolboxPanel.svelte.d.ts +12 -11
- package/dist/Components/Table/Misc/ToolboxPanelModal.svelte +31 -24
- package/dist/Components/Table/Misc/ToolboxPanelModal.svelte.d.ts +12 -11
- package/dist/Components/Table/Misc/ToolboxPanelModalProps.d.ts +5 -0
- package/dist/Components/Table/Misc/numberDateFilterTypes.d.ts +7 -4
- package/dist/Components/Table/Misc/numberDateFilterTypes.js +8 -3
- package/dist/Components/Table/Misc/stringFilterTypes.d.ts +6 -4
- package/dist/Components/Table/Misc/stringFilterTypes.js +7 -3
- package/dist/Components/Table/NestedTable.svelte +85 -41
- package/dist/Components/Table/NestedTable.svelte.d.ts +2 -10
- package/dist/Components/Table/NestedTableProps.d.ts +25 -0
- package/dist/Components/Table/NestedTableProps.js +1 -0
- package/dist/Components/Table/SubApis.svelte.d.ts +23 -0
- package/dist/Components/Table/SubApis.svelte.js +359 -0
- package/dist/Components/Table/Table.svelte +347 -172
- package/dist/Components/Table/Table.svelte.d.ts +24 -1
- package/dist/Components/Table/TableHelpers.svelte.d.ts +58 -0
- package/dist/Components/Table/TableHelpers.svelte.js +88 -0
- package/dist/Components/Table/Types/Columns/Column.d.ts +10 -0
- package/dist/Components/Table/Types/Columns/ColumnPinningState.d.ts +12 -0
- package/dist/Components/Table/Types/Columns/ColumnSizingState.d.ts +8 -0
- package/dist/Components/Table/Types/Columns/ColumnType.d.ts +17 -0
- package/dist/Components/Table/Types/Columns/ColumnType.js +18 -1
- package/dist/Components/Table/Types/Columns/DateColumn.d.ts +6 -0
- package/dist/Components/Table/Types/Columns/DateTableCell.d.ts +7 -0
- package/dist/Components/Table/Types/Columns/Definitions/AccessorFn.d.ts +13 -0
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/AccessorDef.svelte.d.ts +28 -3
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/AccessorDef.svelte.js +15 -0
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/AccessorType.d.ts +10 -0
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/AccessorType.js +11 -1
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/CheckboxDef.svelte.d.ts +23 -2
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/CheckboxDef.svelte.js +9 -2
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/DateInputDef.svelte.d.ts +21 -2
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/DateInputDef.svelte.js +8 -0
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/NumberInputDef.svelte.d.ts +29 -3
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/NumberInputDef.svelte.js +11 -0
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/QueryDef.svelte.d.ts +23 -0
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/QueryDef.svelte.js +8 -0
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/SelectDef.svelte.d.ts +31 -0
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/SelectDef.svelte.js +17 -3
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/TextInputDef.svelte.d.ts +21 -2
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/TextInputDef.svelte.js +7 -0
- package/dist/Components/Table/Types/Columns/Definitions/Actions/ActionsDef.svelte.d.ts +29 -1
- package/dist/Components/Table/Types/Columns/Definitions/Actions/ActionsDef.svelte.js +17 -3
- package/dist/Components/Table/Types/Columns/Definitions/ColumnDef.svelte.d.ts +122 -11
- package/dist/Components/Table/Types/Columns/Definitions/ColumnDef.svelte.js +77 -11
- package/dist/Components/Table/Types/Columns/Definitions/ColumnDefSet.d.ts +9 -0
- package/dist/Components/Table/Types/Columns/Definitions/Display/AbstractDisplayDef.svelte.d.ts +41 -1
- package/dist/Components/Table/Types/Columns/Definitions/Display/AbstractDisplayDef.svelte.js +16 -0
- package/dist/Components/Table/Types/Columns/Definitions/Display/BubbleDef.svelte.d.ts +19 -1
- package/dist/Components/Table/Types/Columns/Definitions/Display/BubbleDef.svelte.js +12 -1
- package/dist/Components/Table/Types/Columns/Definitions/Display/DisplayDef.svelte.d.ts +11 -0
- package/dist/Components/Table/Types/Columns/Definitions/Display/DisplayDef.svelte.js +6 -3
- package/dist/Components/Table/Types/Columns/Definitions/Display/ProgressBarDef.svelte.d.ts +19 -0
- package/dist/Components/Table/Types/Columns/Definitions/Display/ProgressBarDef.svelte.js +25 -1
- package/dist/Components/Table/Types/Columns/Definitions/Display/ValidityDef.svelte.d.ts +26 -0
- package/dist/Components/Table/Types/Columns/Definitions/Display/ValidityDef.svelte.js +20 -5
- package/dist/Components/Table/Types/Columns/Definitions/Expand/ExpandDef.svelte.d.ts +43 -7
- package/dist/Components/Table/Types/Columns/Definitions/Expand/ExpandDef.svelte.js +18 -3
- package/dist/Components/Table/Types/Columns/Definitions/FilterOnly/FilterOnlyDef.svelte.d.ts +19 -5
- package/dist/Components/Table/Types/Columns/Definitions/FilterOnly/FilterOnlyDef.svelte.js +16 -5
- package/dist/Components/Table/Types/Columns/Definitions/JSONColumnDefSet.d.ts +14 -0
- package/dist/Components/Table/Types/Columns/Definitions/RowSelection/RowSelectionDef.svelte.d.ts +34 -2
- package/dist/Components/Table/Types/Columns/Definitions/RowSelection/RowSelectionDef.svelte.js +30 -7
- package/dist/Components/Table/Types/Columns/Definitions/ValidationFn.d.ts +17 -0
- package/dist/Components/Table/Types/Columns/DefsWrapper.d.ts +10 -0
- package/dist/Components/Table/Types/Columns/DisplayType.d.ts +13 -0
- package/dist/Components/Table/Types/Columns/DisplayType.js +14 -1
- package/dist/Components/Table/Types/Columns/ExpandColumn.d.ts +5 -0
- package/dist/Components/Table/Types/Columns/ExpandTableCell.d.ts +7 -0
- package/dist/Components/Table/Types/Columns/JSONColumnPinningState.d.ts +6 -0
- package/dist/Components/Table/Types/Columns/ProgressBarColumn.d.ts +5 -0
- package/dist/Components/Table/Types/Columns/ProgressBarTableCell.d.ts +9 -0
- package/dist/Components/Table/Types/Columns/TableActionButton.d.ts +12 -0
- package/dist/Components/Table/Types/Columns/TableCell.d.ts +16 -2
- package/dist/Components/Table/Types/Columns/VisibilityState.d.ts +12 -0
- package/dist/Components/Table/Types/Context/ColumnLayoutState.svelte.d.ts +173 -0
- package/dist/Components/Table/Types/Context/ColumnLayoutState.svelte.js +241 -0
- package/dist/Components/Table/Types/Context/FilteringState.svelte.d.ts +166 -0
- package/dist/Components/Table/Types/Context/FilteringState.svelte.js +180 -0
- package/dist/Components/Table/Types/Context/FocusState.svelte.d.ts +316 -0
- package/dist/Components/Table/Types/Context/FocusState.svelte.js +751 -0
- package/dist/Components/Table/Types/Context/ITable.d.ts +10 -0
- package/dist/Components/Table/Types/Context/PreferencesState.svelte.d.ts +242 -0
- package/dist/Components/Table/Types/Context/PreferencesState.svelte.js +317 -0
- package/dist/Components/Table/Types/Context/ReadonlyRowModel.d.ts +14 -3
- package/dist/Components/Table/Types/Context/Row.d.ts +18 -0
- package/dist/Components/Table/Types/Context/RowModel.d.ts +11 -0
- package/dist/Components/Table/Types/Context/SelectionState.svelte.d.ts +260 -0
- package/dist/Components/Table/Types/Context/SelectionState.svelte.js +613 -0
- package/dist/Components/Table/Types/Context/SortingState.svelte.d.ts +112 -0
- package/dist/Components/Table/Types/Context/SortingState.svelte.js +272 -0
- package/dist/Components/Table/Types/Context/TableContext.svelte.d.ts +547 -53
- package/dist/Components/Table/Types/Context/TableContext.svelte.js +959 -1259
- package/dist/Components/Table/Types/Context/TableInitOptions.d.ts +16 -0
- package/dist/Components/Table/Types/Context/TableSettings.d.ts +20 -0
- package/dist/Components/Table/Types/Context/VirtualisationState.svelte.d.ts +167 -0
- package/dist/Components/Table/Types/Context/VirtualisationState.svelte.js +226 -0
- package/dist/Components/Table/Types/Coordinates/CellCoordinates.d.ts +12 -0
- package/dist/Components/Table/Types/Coordinates/CellCoordinatesWithoutColumn.d.ts +5 -0
- package/dist/Components/Table/Types/Coordinates/ColumnIndices.d.ts +16 -2
- package/dist/Components/Table/Types/DataRepository/BuiltInRemoteRepository.svelte.d.ts +143 -0
- package/dist/Components/Table/Types/DataRepository/BuiltInRemoteRepository.svelte.js +454 -0
- package/dist/Components/Table/Types/DataRepository/IDataRepository.d.ts +21 -0
- package/dist/Components/Table/Types/DataRepository/ILocalDataRepository.d.ts +10 -0
- package/dist/Components/Table/Types/DataRepository/IRemoteDataRepository.d.ts +16 -0
- package/dist/Components/Table/Types/DataRepository/LocalTableDataRepository.svelte.d.ts +87 -3
- package/dist/Components/Table/Types/DataRepository/LocalTableDataRepository.svelte.js +112 -7
- package/dist/Components/Table/Types/DataRepository/SortingState.d.ts +12 -0
- package/dist/Components/Table/Types/DataRepository/TableDataRepository.svelte.d.ts +87 -2
- package/dist/Components/Table/Types/DataRepository/TableDataRepository.svelte.js +74 -1
- package/dist/Components/Table/Types/ExpandedPanel.d.ts +9 -0
- package/dist/Components/Table/Types/ExpandedPanel.js +10 -1
- package/dist/Components/Table/Types/Filtering/ColumnFiltersState.d.ts +17 -0
- package/dist/Components/Table/Types/Filtering/CustomFilter.d.ts +21 -0
- package/dist/Components/Table/Types/Filtering/CustomFilterType.d.ts +5 -0
- package/dist/Components/Table/Types/Filtering/CustomFilterType.js +6 -1
- package/dist/Components/Table/Types/Filtering/CustomRemoteFilters.d.ts +6 -0
- package/dist/Components/Table/Types/Filtering/FilterFn.d.ts +28 -0
- package/dist/Components/Table/Types/Filtering/FilterMode.d.ts +7 -0
- package/dist/Components/Table/Types/Filtering/FilterType.d.ts +8 -0
- package/dist/Components/Table/Types/Filtering/FilterType.js +9 -1
- package/dist/Components/Table/Types/Filtering/FilterValueType.d.ts +11 -0
- package/dist/Components/Table/Types/Filtering/FilterValueType.js +12 -1
- package/dist/Components/Table/Types/Filtering/HasCustomFilterFunction.d.ts +23 -2
- package/dist/Components/Table/Types/Filtering/NumberDateFilterMode.d.ts +19 -12
- package/dist/Components/Table/Types/Filtering/NumberDateFilterMode.js +18 -14
- package/dist/Components/Table/Types/Filtering/StringFilterMode.d.ts +22 -15
- package/dist/Components/Table/Types/Filtering/StringFilterMode.js +22 -16
- package/dist/Components/Table/Types/Focus/MultiFocusEdge.d.ts +8 -0
- package/dist/Components/Table/Types/Focus/MultiFocusEdge.js +9 -1
- package/dist/Components/Table/Types/Focus/TableFocusDetails.svelte.d.ts +22 -0
- package/dist/Components/Table/Types/Focus/TableFocusDetails.svelte.js +22 -0
- package/dist/Components/Table/Types/Header.d.ts +8 -0
- package/dist/Components/Table/Types/HeaderGroup.d.ts +7 -0
- package/dist/Components/Table/Types/Layout/CellPinning.d.ts +1 -0
- package/dist/Components/Table/Types/Layout/CellPinning.js +8 -0
- package/dist/Components/Table/Types/OnChangeFn.d.ts +11 -0
- package/dist/Components/Table/Types/Pagination/PaginationState.d.ts +9 -0
- package/dist/Components/Table/Types/Pagination/PaginationType.d.ts +10 -0
- package/dist/Components/Table/Types/Pagination/PaginationType.js +11 -1
- package/dist/Components/Table/Types/Public/AnyEditEvent.d.ts +30 -0
- package/dist/Components/Table/Types/Public/AnyEditEvent.js +1 -0
- package/dist/Components/Table/Types/Public/BaseColumnOptions.d.ts +44 -0
- package/dist/Components/Table/Types/Public/BaseColumnOptions.js +1 -0
- package/dist/Components/Table/Types/Public/ColumnFactory.d.ts +35 -0
- package/dist/Components/Table/Types/Public/ColumnFactory.js +1 -0
- package/dist/Components/Table/Types/Public/ColumnOptions.d.ts +238 -0
- package/dist/Components/Table/Types/Public/ColumnOptions.js +1 -0
- package/dist/Components/Table/Types/Public/ColumnSpec.d.ts +39 -0
- package/dist/Components/Table/Types/Public/ColumnSpec.js +1 -0
- package/dist/Components/Table/Types/Public/CreateTableOptions.d.ts +87 -0
- package/dist/Components/Table/Types/Public/CreateTableOptions.js +1 -0
- package/dist/Components/Table/Types/Public/KeyConstraints.d.ts +42 -0
- package/dist/Components/Table/Types/Public/KeyConstraints.js +22 -0
- package/dist/Components/Table/Types/Public/RowSource.d.ts +87 -0
- package/dist/Components/Table/Types/Public/RowSource.js +1 -0
- package/dist/Components/Table/Types/Public/SelectionOptions.d.ts +26 -0
- package/dist/Components/Table/Types/Public/SelectionOptions.js +1 -0
- package/dist/Components/Table/Types/Public/Table.d.ts +39 -0
- package/dist/Components/Table/Types/Public/Table.js +1 -0
- package/dist/Components/Table/Types/Public/TableInitialState.d.ts +26 -0
- package/dist/Components/Table/Types/Public/TableInitialState.js +1 -0
- package/dist/Components/Table/Types/Public/TablePersistence.d.ts +38 -0
- package/dist/Components/Table/Types/Public/TablePersistence.js +1 -0
- package/dist/Components/Table/Types/Public/TableSubApis.d.ts +157 -0
- package/dist/Components/Table/Types/Public/TableSubApis.js +1 -0
- package/dist/Components/Table/Types/Public/index.d.ts +20 -0
- package/dist/Components/Table/Types/Public/index.js +8 -0
- package/dist/Components/Table/Types/Toolbar/ToolbarPosition.d.ts +4 -0
- package/dist/Components/Table/Types/Toolbar/ToolbarPosition.js +5 -1
- package/dist/Components/Table/createTable.svelte.d.ts +53 -0
- package/dist/Components/Table/createTable.svelte.js +269 -0
- package/dist/Components/TextArea.svelte +37 -18
- package/dist/Components/TextAreaProps.d.ts +37 -0
- package/dist/Components/TextInput.svelte +41 -22
- package/dist/Components/TextInputProps.d.ts +58 -1
- package/dist/Components/ThreeStateRadio.svelte +61 -64
- package/dist/Components/ThreeStateRadioProps.d.ts +29 -1
- package/dist/Components/Touch/BoolCard.svelte +8 -15
- package/dist/Components/Touch/BoolCard.svelte.d.ts +1 -10
- package/dist/Components/Touch/BoolCardProps.d.ts +21 -0
- package/dist/Components/Touch/BoolCardProps.js +1 -0
- package/dist/Components/Touch/DateModal.svelte +17 -25
- package/dist/Components/Touch/DateModal.svelte.d.ts +1 -17
- package/dist/Components/Touch/DateModalProps.d.ts +36 -0
- package/dist/Components/Touch/DateModalProps.js +1 -0
- package/dist/Components/Touch/EditCard.svelte +10 -3
- package/dist/Components/Touch/EditCardProps.d.ts +21 -0
- package/dist/Components/Touch/InfoCard.svelte +14 -7
- package/dist/Components/Touch/InfoCardProps.d.ts +9 -0
- package/dist/Components/Touch/InfoTextCard.svelte +9 -2
- package/dist/Components/Touch/InfoTextCardProps.d.ts +8 -0
- package/dist/Components/Touch/ModalExplanation.svelte +9 -12
- package/dist/Components/Touch/ModalExplanation.svelte.d.ts +1 -6
- package/dist/Components/Touch/ModalExplanationProps.d.ts +22 -0
- package/dist/Components/Touch/ModalExplanationProps.js +1 -0
- package/dist/Components/Touch/NumberKeyboard.svelte +62 -105
- package/dist/Components/Touch/NumberKeyboardProps.d.ts +19 -0
- package/dist/Components/Touch/NumberModal.svelte +16 -6
- package/dist/Components/Touch/NumberModalProps.d.ts +23 -1
- package/dist/Components/Touch/PlusMinusCard.svelte +12 -16
- package/dist/Components/Touch/PlusMinusCard.svelte.d.ts +1 -6
- package/dist/Components/Touch/PlusMinusCardProps.d.ts +18 -0
- package/dist/Components/Touch/PlusMinusCardProps.js +1 -0
- package/dist/Components/Touch/SelectModal.svelte +33 -15
- package/dist/Components/Touch/SelectModalProps.d.ts +22 -1
- package/dist/Components/Touch/SummaryCard.svelte +56 -14
- package/dist/Components/Touch/SummaryCardProps.d.ts +16 -3
- package/dist/Components/Touch/TextAreaModal.svelte +18 -9
- package/dist/Components/Touch/TextAreaModalProps.d.ts +21 -0
- package/dist/Components/Touch/TextModal.svelte +15 -32
- package/dist/Components/Touch/TextModalProps.d.ts +28 -1
- package/dist/Components/Touch/TouchCard.svelte +9 -47
- package/dist/Components/Touch/TouchCardProps.d.ts +21 -0
- package/dist/Components/Touch/TouchModal.svelte +105 -99
- package/dist/Components/Touch/TouchModalProps.d.ts +35 -1
- package/dist/Components/Touch/UtilityButton.svelte +36 -18
- package/dist/Components/Touch/UtilityButtonProps.d.ts +16 -0
- package/dist/Components/VerticalTabGroup.svelte +18 -40
- package/dist/Components/VerticalTabGroupButton.svelte +11 -50
- package/dist/Components/VerticalTabGroupProps.d.ts +15 -2
- package/dist/Contexts/AlertContext.svelte.d.ts +92 -8
- package/dist/Contexts/AlertContext.svelte.js +69 -6
- package/dist/Contexts/ContextMenuContext.svelte.d.ts +54 -8
- package/dist/Contexts/ContextMenuContext.svelte.js +48 -2
- package/dist/Contexts/TestContext.svelte.d.ts +27 -1
- package/dist/Contexts/TestContext.svelte.js +29 -1
- package/dist/Contexts/ToastContext.svelte.d.ts +29 -1
- package/dist/Contexts/ToastContext.svelte.js +93 -24
- package/dist/Contexts/TooltipContext.svelte.d.ts +68 -1
- package/dist/Contexts/TooltipContext.svelte.js +70 -7
- package/dist/Contexts/UntypedInputContext.svelte.d.ts +54 -5
- package/dist/Contexts/UntypedInputContext.svelte.js +87 -34
- package/dist/Delay/Delay.js +1 -1
- package/dist/Helpers/AsyncFlag.svelte.d.ts +39 -0
- package/dist/Helpers/AsyncFlag.svelte.js +72 -0
- package/dist/Helpers/Datamatrix.d.ts +10 -1
- package/dist/Helpers/Datamatrix.js +290 -1
- package/dist/Helpers/Helpers.svelte.d.ts +252 -18
- package/dist/Helpers/Helpers.svelte.js +271 -75
- package/dist/Helpers/INamed.d.ts +6 -0
- package/dist/Helpers/Storage.d.ts +67 -0
- package/dist/Helpers/Storage.js +138 -0
- package/dist/Helpers/dropdownPortal.d.ts +52 -0
- package/dist/Helpers/dropdownPortal.js +232 -0
- package/dist/Helpers/dropdownPortal.svelte.d.ts +2 -0
- package/dist/Helpers/dropdownPortal.svelte.js +5 -0
- package/dist/Helpers/memoiseByRow.d.ts +45 -0
- package/dist/Helpers/memoiseByRow.js +78 -0
- package/dist/Helpers/prefersReducedMotion.svelte.d.ts +27 -0
- package/dist/Helpers/prefersReducedMotion.svelte.js +18 -0
- package/dist/Helpers/useTooltip.svelte.d.ts +53 -0
- package/dist/Helpers/useTooltip.svelte.js +62 -0
- package/dist/Types/Examples/ExampleModal.svelte +2 -1
- package/dist/Types/Examples/ExampleSelectEnum.js +1 -1
- package/dist/Types/Internal/AsyncFlag.d.ts +7 -0
- package/dist/Types/Internal/AsyncFlag.js +1 -0
- package/dist/Types/Internal/BigRadioOption.d.ts +8 -0
- package/dist/Types/Internal/ButtonProp.d.ts +24 -2
- package/dist/Types/Internal/CallbackButton.d.ts +12 -0
- package/dist/Types/Internal/DateChange.d.ts +8 -0
- package/dist/Types/Internal/DatePickerType.d.ts +5 -0
- package/dist/Types/Internal/DatePickerType.js +6 -1
- package/dist/Types/Internal/IdentifiableToastMessage.d.ts +8 -0
- package/dist/Types/Internal/InputVariant.d.ts +5 -0
- package/dist/Types/Internal/InputVariant.js +6 -1
- package/dist/Types/Internal/Misc.d.ts +91 -0
- package/dist/Types/Internal/RefWrapper.d.ts +6 -0
- package/dist/Types/Internal/SelectOption.d.ts +8 -0
- package/dist/Types/Internal/Shape.d.ts +1 -0
- package/dist/Types/Internal/Shape.js +2 -1
- package/dist/Types/Internal/Side.d.ts +1 -0
- package/dist/Types/Internal/Side.js +2 -1
- package/dist/Types/Internal/Size.d.ts +5 -0
- package/dist/Types/Internal/Size.js +6 -1
- package/dist/Types/Internal/TabOption.d.ts +15 -5
- package/dist/Types/Internal/Ternary.d.ts +6 -0
- package/dist/Types/Internal/Ternary.js +7 -1
- package/dist/Types/Internal/ToastMessage.d.ts +28 -0
- package/dist/Types/Internal/Validity.d.ts +6 -0
- package/dist/Types/Internal/Validity.js +7 -1
- package/dist/Types/Internal/ValidityWrapper.d.ts +8 -0
- package/dist/Types/Internal/Variant.d.ts +5 -0
- package/dist/Types/Internal/Variant.js +6 -1
- package/dist/index.d.ts +27 -82
- package/dist/index.js +24 -62
- package/dist/scss/_mixins.scss +451 -167
- package/dist/scss/_motion.scss +57 -0
- package/dist/scss/_sizing.scss +16 -0
- package/dist/scss/colours.js +2 -2
- package/dist/scss/sizing.d.ts +9 -0
- package/dist/scss/sizing.js +10 -1
- package/package.json +35 -31
|
@@ -0,0 +1,1126 @@
|
|
|
1
|
+
<svelte:options runes />
|
|
2
|
+
|
|
3
|
+
<script lang="ts">
|
|
4
|
+
import { Colour } from '../../scss/colours.js';
|
|
5
|
+
import { Size } from '../../Types/Internal/Size.js';
|
|
6
|
+
import Button from '../Button.svelte';
|
|
7
|
+
import Icon from '../Icon.svelte';
|
|
8
|
+
import LoadingOverlay from '../LoadingOverlay.svelte';
|
|
9
|
+
import { CalendarViewMode } from './AppointmentCalendarProps.js';
|
|
10
|
+
import type {
|
|
11
|
+
AppointmentCalendarProps,
|
|
12
|
+
CalendarAppointment,
|
|
13
|
+
DragSelection,
|
|
14
|
+
} from './AppointmentCalendarProps.js';
|
|
15
|
+
|
|
16
|
+
let {
|
|
17
|
+
doors,
|
|
18
|
+
appointments,
|
|
19
|
+
selectedDate,
|
|
20
|
+
viewMode,
|
|
21
|
+
ondatechange,
|
|
22
|
+
onviewmodechange,
|
|
23
|
+
ondragcreate,
|
|
24
|
+
onappointmentclick,
|
|
25
|
+
onappointmentmove,
|
|
26
|
+
startHour = 0,
|
|
27
|
+
endHour = 24,
|
|
28
|
+
slotIntervalMinutes = 15,
|
|
29
|
+
isLoading = false,
|
|
30
|
+
headerExtra,
|
|
31
|
+
}: AppointmentCalendarProps = $props();
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* `selectedDate` is always read by the component, never written. The
|
|
35
|
+
* runtime type may be either a plain `Date` or a `SvelteDate`; both
|
|
36
|
+
* expose the same `Date` interface that we use here. Cast to `Date`
|
|
37
|
+
* for narrowing inside the script.
|
|
38
|
+
*/
|
|
39
|
+
const selected = $derived(selectedDate as Date);
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Today's reference Date hoisted out of the per-cell loops so that
|
|
43
|
+
* rendering the month grid does not allocate 42 fresh `Date`
|
|
44
|
+
* instances on every state change. `$derived` does not invalidate
|
|
45
|
+
* over time on its own; if you need real day-rollover semantics
|
|
46
|
+
* track it with a `SvelteDate` and a `setInterval`.
|
|
47
|
+
*/
|
|
48
|
+
const today = $derived(new Date());
|
|
49
|
+
|
|
50
|
+
// ---- Date helpers ----
|
|
51
|
+
|
|
52
|
+
const dayNames = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
|
|
53
|
+
const monthNames = [
|
|
54
|
+
'January',
|
|
55
|
+
'February',
|
|
56
|
+
'March',
|
|
57
|
+
'April',
|
|
58
|
+
'May',
|
|
59
|
+
'June',
|
|
60
|
+
'July',
|
|
61
|
+
'August',
|
|
62
|
+
'September',
|
|
63
|
+
'October',
|
|
64
|
+
'November',
|
|
65
|
+
'December',
|
|
66
|
+
];
|
|
67
|
+
|
|
68
|
+
function formatDate(d: Date): string {
|
|
69
|
+
if (viewMode === CalendarViewMode.Month) {
|
|
70
|
+
return `${monthNames[d.getMonth()]} ${d.getFullYear()}`;
|
|
71
|
+
}
|
|
72
|
+
return `${dayNames[d.getDay()]} ${d.getDate()} ${monthNames[d.getMonth()]} ${d.getFullYear()}`;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function sameDay(a: Date, b: Date): boolean {
|
|
76
|
+
return (
|
|
77
|
+
a.getFullYear() === b.getFullYear() &&
|
|
78
|
+
a.getMonth() === b.getMonth() &&
|
|
79
|
+
a.getDate() === b.getDate()
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function addDays(d: Date, n: number): Date {
|
|
84
|
+
// eslint-disable-next-line svelte/prefer-svelte-reactivity
|
|
85
|
+
const result = new Date(d);
|
|
86
|
+
result.setDate(result.getDate() + n);
|
|
87
|
+
return result;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
function navigateDate(direction: number): void {
|
|
91
|
+
if (viewMode === CalendarViewMode.Day) {
|
|
92
|
+
ondatechange(addDays(selected, direction));
|
|
93
|
+
} else if (viewMode === CalendarViewMode.Week) {
|
|
94
|
+
ondatechange(addDays(selected, direction * 7));
|
|
95
|
+
} else {
|
|
96
|
+
// eslint-disable-next-line svelte/prefer-svelte-reactivity
|
|
97
|
+
const d = new Date(selected);
|
|
98
|
+
d.setMonth(d.getMonth() + direction);
|
|
99
|
+
ondatechange(d);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function goToToday(): void {
|
|
104
|
+
ondatechange(new Date());
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// ---- Time slot generation ----
|
|
108
|
+
|
|
109
|
+
const timeSlots: Array<{ hour: number; minute: number; label: string }> = $derived.by(() => {
|
|
110
|
+
const slots: Array<{ hour: number; minute: number; label: string }> = [];
|
|
111
|
+
for (let h = startHour; h < endHour; h++) {
|
|
112
|
+
for (let m = 0; m < 60; m += slotIntervalMinutes) {
|
|
113
|
+
const hh = String(h).padStart(2, '0');
|
|
114
|
+
const mm = String(m).padStart(2, '0');
|
|
115
|
+
slots.push({ hour: h, minute: m, label: `${hh}:${mm}` });
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
return slots;
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
// ---- Appointment positioning (day view) ----
|
|
122
|
+
|
|
123
|
+
type PositionedAppointment = CalendarAppointment & {
|
|
124
|
+
readonly topPercent: number;
|
|
125
|
+
readonly heightPercent: number;
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Build a `YYYY-MM-DD` key for date bucketing. Avoids `toISOString`
|
|
130
|
+
* timezone conversions that would smear appointments across days.
|
|
131
|
+
*/
|
|
132
|
+
function dayKey(d: Date): string {
|
|
133
|
+
const y = d.getFullYear();
|
|
134
|
+
const m = String(d.getMonth() + 1).padStart(2, '0');
|
|
135
|
+
const day = String(d.getDate()).padStart(2, '0');
|
|
136
|
+
return `${y}-${m}-${day}`;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Precomputed `Map<doorId, Map<dayKey, PositionedAppointment[]>>` for
|
|
141
|
+
* day and week views. Replaces the previous per-cell
|
|
142
|
+
* `appointments.filter(...)` calls which were `O(doors * appointments)`
|
|
143
|
+
* per render and allocated a fresh `Date` per appointment per pass.
|
|
144
|
+
*/
|
|
145
|
+
const positionedByDoorAndDay = $derived.by(() => {
|
|
146
|
+
const totalMinutes = (endHour - startHour) * 60;
|
|
147
|
+
// Local indexes built inside a $derived; outer reactivity already covers reads.
|
|
148
|
+
// eslint-disable-next-line svelte/prefer-svelte-reactivity
|
|
149
|
+
const byDoor = new Map<number, Map<string, Array<PositionedAppointment>>>();
|
|
150
|
+
for (const apt of appointments) {
|
|
151
|
+
const from = new Date(apt.dateFrom);
|
|
152
|
+
const to = new Date(apt.dateTo);
|
|
153
|
+
const startMin = (from.getHours() - startHour) * 60 + from.getMinutes();
|
|
154
|
+
const endMin = (to.getHours() - startHour) * 60 + to.getMinutes();
|
|
155
|
+
const durationMin = Math.max(endMin - startMin, slotIntervalMinutes);
|
|
156
|
+
const positioned: PositionedAppointment = {
|
|
157
|
+
...apt,
|
|
158
|
+
topPercent: (Math.max(0, startMin) / totalMinutes) * 100,
|
|
159
|
+
heightPercent: (Math.min(durationMin, totalMinutes - startMin) / totalMinutes) * 100,
|
|
160
|
+
};
|
|
161
|
+
const key = dayKey(from);
|
|
162
|
+
let perDay = byDoor.get(apt.segmentId);
|
|
163
|
+
if (!perDay) {
|
|
164
|
+
// eslint-disable-next-line svelte/prefer-svelte-reactivity
|
|
165
|
+
perDay = new Map();
|
|
166
|
+
byDoor.set(apt.segmentId, perDay);
|
|
167
|
+
}
|
|
168
|
+
const list = perDay.get(key);
|
|
169
|
+
if (list) {
|
|
170
|
+
list.push(positioned);
|
|
171
|
+
} else {
|
|
172
|
+
perDay.set(key, [positioned]);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
return byDoor;
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
function appointmentsAt(doorId: number, day: Date): ReadonlyArray<PositionedAppointment> {
|
|
179
|
+
return positionedByDoorAndDay.get(doorId)?.get(dayKey(day)) ?? [];
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Precomputed appointment-count badges per day for the month view.
|
|
184
|
+
* Replaces the previous `O(cells * doors * appointments)` recomputation
|
|
185
|
+
* which scaled to ~42 000 ops on a single render with 10 doors and
|
|
186
|
+
* 100 appointments.
|
|
187
|
+
*/
|
|
188
|
+
const countsByDay = $derived.by(() => {
|
|
189
|
+
// Local indexes built inside a $derived; outer reactivity already covers reads.
|
|
190
|
+
// eslint-disable-next-line svelte/prefer-svelte-reactivity
|
|
191
|
+
const map = new Map<string, Array<{ doorId: number; doorName: string; count: number }>>();
|
|
192
|
+
// One scan over appointments builds a nested Map<dayKey, Map<doorId, count>>.
|
|
193
|
+
// eslint-disable-next-line svelte/prefer-svelte-reactivity
|
|
194
|
+
const intermediate = new Map<string, Map<number, number>>();
|
|
195
|
+
for (const apt of appointments) {
|
|
196
|
+
const key = dayKey(new Date(apt.dateFrom));
|
|
197
|
+
let perDay = intermediate.get(key);
|
|
198
|
+
if (!perDay) {
|
|
199
|
+
// eslint-disable-next-line svelte/prefer-svelte-reactivity
|
|
200
|
+
perDay = new Map();
|
|
201
|
+
intermediate.set(key, perDay);
|
|
202
|
+
}
|
|
203
|
+
perDay.set(apt.segmentId, (perDay.get(apt.segmentId) ?? 0) + 1);
|
|
204
|
+
}
|
|
205
|
+
// Flatten to the door-ordered list the markup expects.
|
|
206
|
+
for (const [key, perDay] of intermediate) {
|
|
207
|
+
const list: Array<{ doorId: number; doorName: string; count: number }> = [];
|
|
208
|
+
for (const door of doors) {
|
|
209
|
+
const count = perDay.get(door.id);
|
|
210
|
+
if (count) {
|
|
211
|
+
list.push({ doorId: door.id, doorName: door.name, count });
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
if (list.length > 0) {
|
|
215
|
+
map.set(key, list);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
return map;
|
|
219
|
+
});
|
|
220
|
+
|
|
221
|
+
function countsAt(day: Date): ReadonlyArray<{ doorId: number; doorName: string; count: number }> {
|
|
222
|
+
return countsByDay.get(dayKey(day)) ?? [];
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
// ---- Click and drag logic ----
|
|
226
|
+
|
|
227
|
+
let isDragging = $state(false);
|
|
228
|
+
let dragDoorId: number | null = $state(null);
|
|
229
|
+
let dragStartSlotIndex: number | null = $state(null);
|
|
230
|
+
let dragEndSlotIndex: number | null = $state(null);
|
|
231
|
+
|
|
232
|
+
function onSlotMouseDown(doorId: number, slotIndex: number): void {
|
|
233
|
+
if (!ondragcreate || appointmentDragStarted) {
|
|
234
|
+
return;
|
|
235
|
+
}
|
|
236
|
+
isDragging = true;
|
|
237
|
+
dragDoorId = doorId;
|
|
238
|
+
dragStartSlotIndex = slotIndex;
|
|
239
|
+
dragEndSlotIndex = slotIndex;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
function onSlotMouseEnter(doorId: number, slotIndex: number): void {
|
|
243
|
+
// Appointment move drag
|
|
244
|
+
if (appointmentDragStarted) {
|
|
245
|
+
isDraggingAppointment = true;
|
|
246
|
+
moveTargetDoorId = doorId;
|
|
247
|
+
moveTargetSlotIndex = slotIndex;
|
|
248
|
+
return;
|
|
249
|
+
}
|
|
250
|
+
// Slot drag-create
|
|
251
|
+
if (!isDragging || doorId !== dragDoorId) {
|
|
252
|
+
return;
|
|
253
|
+
}
|
|
254
|
+
dragEndSlotIndex = slotIndex;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
function onSlotMouseUp(): void {
|
|
258
|
+
// ---- Handle appointment drag-move ----
|
|
259
|
+
if (
|
|
260
|
+
isDraggingAppointment &&
|
|
261
|
+
draggedAppointment &&
|
|
262
|
+
moveTargetDoorId != null &&
|
|
263
|
+
moveTargetSlotIndex != null
|
|
264
|
+
) {
|
|
265
|
+
const slot = timeSlots[moveTargetSlotIndex];
|
|
266
|
+
// eslint-disable-next-line svelte/prefer-svelte-reactivity
|
|
267
|
+
const newDateFrom = new Date(selected);
|
|
268
|
+
newDateFrom.setHours(slot.hour, slot.minute, 0, 0);
|
|
269
|
+
const newDateTo = new Date(
|
|
270
|
+
newDateFrom.getTime() + draggedAptSlotCount * slotIntervalMinutes * 60000
|
|
271
|
+
);
|
|
272
|
+
|
|
273
|
+
// Check whether the position actually changed
|
|
274
|
+
const origFrom = new Date(draggedAppointment.dateFrom);
|
|
275
|
+
const samePosition =
|
|
276
|
+
moveTargetDoorId === draggedAppointment.segmentId &&
|
|
277
|
+
newDateFrom.getTime() === origFrom.getTime();
|
|
278
|
+
|
|
279
|
+
if (samePosition) {
|
|
280
|
+
// Dropped in the same spot - treat as a click
|
|
281
|
+
onappointmentclick?.(draggedAppointment);
|
|
282
|
+
} else if (!hasOverlap(moveTargetDoorId, newDateFrom, newDateTo, draggedAppointment.id)) {
|
|
283
|
+
const door = doors.find((d) => d.id === moveTargetDoorId);
|
|
284
|
+
onappointmentmove?.({
|
|
285
|
+
appointment: draggedAppointment,
|
|
286
|
+
newDoorId: moveTargetDoorId,
|
|
287
|
+
newDoorName: door?.name ?? '',
|
|
288
|
+
newDateFrom,
|
|
289
|
+
newDateTo,
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
resetAppointmentDrag();
|
|
294
|
+
return;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
// ---- Handle appointment click (mousedown + mouseup without leaving the block) ----
|
|
298
|
+
if (appointmentDragStarted && !isDraggingAppointment && draggedAppointment) {
|
|
299
|
+
onappointmentclick?.(draggedAppointment);
|
|
300
|
+
resetAppointmentDrag();
|
|
301
|
+
return;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
resetAppointmentDrag();
|
|
305
|
+
|
|
306
|
+
// ---- Handle drag-create ----
|
|
307
|
+
if (
|
|
308
|
+
!isDragging ||
|
|
309
|
+
dragDoorId == null ||
|
|
310
|
+
dragStartSlotIndex == null ||
|
|
311
|
+
dragEndSlotIndex == null
|
|
312
|
+
) {
|
|
313
|
+
return;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
const startIdx = Math.min(dragStartSlotIndex, dragEndSlotIndex);
|
|
317
|
+
const endIdx = Math.max(dragStartSlotIndex, dragEndSlotIndex);
|
|
318
|
+
|
|
319
|
+
const startSlot = timeSlots[startIdx];
|
|
320
|
+
const endSlot = timeSlots[endIdx];
|
|
321
|
+
|
|
322
|
+
// eslint-disable-next-line svelte/prefer-svelte-reactivity
|
|
323
|
+
const dateFrom = new Date(selected);
|
|
324
|
+
dateFrom.setHours(startSlot.hour, startSlot.minute, 0, 0);
|
|
325
|
+
|
|
326
|
+
// eslint-disable-next-line svelte/prefer-svelte-reactivity
|
|
327
|
+
const dateTo = new Date(selected);
|
|
328
|
+
// End slot is the start of the last selected slot; add one interval for the end time
|
|
329
|
+
dateTo.setHours(endSlot.hour, endSlot.minute + slotIntervalMinutes, 0, 0);
|
|
330
|
+
|
|
331
|
+
const door = doors.find((d) => d.id === dragDoorId);
|
|
332
|
+
|
|
333
|
+
const selection: DragSelection = {
|
|
334
|
+
doorId: dragDoorId,
|
|
335
|
+
doorName: door?.name ?? '',
|
|
336
|
+
dateFrom,
|
|
337
|
+
dateTo,
|
|
338
|
+
};
|
|
339
|
+
|
|
340
|
+
isDragging = false;
|
|
341
|
+
dragDoorId = null;
|
|
342
|
+
dragStartSlotIndex = null;
|
|
343
|
+
dragEndSlotIndex = null;
|
|
344
|
+
|
|
345
|
+
ondragcreate?.(selection);
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
function isSlotInDragRange(doorId: number, slotIndex: number): boolean {
|
|
349
|
+
if (!isDragging || doorId !== dragDoorId) {
|
|
350
|
+
return false;
|
|
351
|
+
}
|
|
352
|
+
if (dragStartSlotIndex == null || dragEndSlotIndex == null) {
|
|
353
|
+
return false;
|
|
354
|
+
}
|
|
355
|
+
const min = Math.min(dragStartSlotIndex, dragEndSlotIndex);
|
|
356
|
+
const max = Math.max(dragStartSlotIndex, dragEndSlotIndex);
|
|
357
|
+
return slotIndex >= min && slotIndex <= max;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
// ---- Row hover tracking ----
|
|
361
|
+
|
|
362
|
+
let hoveredSlotIndex: number | null = $state(null);
|
|
363
|
+
|
|
364
|
+
// ---- Appointment drag-move logic ----
|
|
365
|
+
|
|
366
|
+
let appointmentDragStarted = $state(false);
|
|
367
|
+
let isDraggingAppointment = $state(false);
|
|
368
|
+
let draggedAppointment: CalendarAppointment | null = $state(null);
|
|
369
|
+
let draggedAptSlotCount = $state(0);
|
|
370
|
+
let moveTargetDoorId: number | null = $state(null);
|
|
371
|
+
let moveTargetSlotIndex: number | null = $state(null);
|
|
372
|
+
|
|
373
|
+
function onAppointmentMouseDown(apt: CalendarAppointment, e: MouseEvent): void {
|
|
374
|
+
if (!onappointmentmove) {
|
|
375
|
+
return;
|
|
376
|
+
}
|
|
377
|
+
e.preventDefault();
|
|
378
|
+
appointmentDragStarted = true;
|
|
379
|
+
draggedAppointment = apt;
|
|
380
|
+
|
|
381
|
+
const from = new Date(apt.dateFrom);
|
|
382
|
+
const to = new Date(apt.dateTo);
|
|
383
|
+
const durationMin = (to.getTime() - from.getTime()) / 60000;
|
|
384
|
+
draggedAptSlotCount = Math.max(1, Math.ceil(durationMin / slotIntervalMinutes));
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
function resetAppointmentDrag(): void {
|
|
388
|
+
appointmentDragStarted = false;
|
|
389
|
+
isDraggingAppointment = false;
|
|
390
|
+
draggedAppointment = null;
|
|
391
|
+
draggedAptSlotCount = 0;
|
|
392
|
+
moveTargetDoorId = null;
|
|
393
|
+
moveTargetSlotIndex = null;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
function isSlotInMoveTarget(doorId: number, slotIndex: number): boolean {
|
|
397
|
+
if (!isDraggingAppointment || moveTargetDoorId !== doorId) {
|
|
398
|
+
return false;
|
|
399
|
+
}
|
|
400
|
+
if (moveTargetSlotIndex == null) {
|
|
401
|
+
return false;
|
|
402
|
+
}
|
|
403
|
+
return (
|
|
404
|
+
slotIndex >= moveTargetSlotIndex && slotIndex < moveTargetSlotIndex + draggedAptSlotCount
|
|
405
|
+
);
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
function hasOverlap(doorId: number, dateFrom: Date, dateTo: Date, excludeAptId: number): boolean {
|
|
409
|
+
return appointments.some((apt) => {
|
|
410
|
+
if (apt.id === excludeAptId) {
|
|
411
|
+
return false;
|
|
412
|
+
}
|
|
413
|
+
if (apt.segmentId !== doorId) {
|
|
414
|
+
return false;
|
|
415
|
+
}
|
|
416
|
+
const aptFrom = new Date(apt.dateFrom);
|
|
417
|
+
const aptTo = new Date(apt.dateTo);
|
|
418
|
+
return dateFrom < aptTo && dateTo > aptFrom;
|
|
419
|
+
});
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
// ---- Month view helpers ----
|
|
423
|
+
|
|
424
|
+
function getMonthDays(date: Date): Array<{ date: Date; isCurrentMonth: boolean }> {
|
|
425
|
+
const year = date.getFullYear();
|
|
426
|
+
const month = date.getMonth();
|
|
427
|
+
|
|
428
|
+
const firstDayOfMonth = new Date(year, month, 1);
|
|
429
|
+
|
|
430
|
+
// Start from Monday of the week containing the first day
|
|
431
|
+
// eslint-disable-next-line svelte/prefer-svelte-reactivity
|
|
432
|
+
const startDate = new Date(firstDayOfMonth);
|
|
433
|
+
const dayOfWeek = startDate.getDay();
|
|
434
|
+
const daysFromMonday = dayOfWeek === 0 ? 6 : dayOfWeek - 1;
|
|
435
|
+
startDate.setDate(startDate.getDate() - daysFromMonday);
|
|
436
|
+
|
|
437
|
+
const days: Array<{ date: Date; isCurrentMonth: boolean }> = [];
|
|
438
|
+
// eslint-disable-next-line svelte/prefer-svelte-reactivity
|
|
439
|
+
const current = new Date(startDate);
|
|
440
|
+
|
|
441
|
+
// Generate 6 weeks (42 days) to fill the grid
|
|
442
|
+
for (let i = 0; i < 42; i++) {
|
|
443
|
+
days.push({
|
|
444
|
+
date: new Date(current),
|
|
445
|
+
isCurrentMonth: current.getMonth() === month,
|
|
446
|
+
});
|
|
447
|
+
current.setDate(current.getDate() + 1);
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
return days;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
/** Cached month grid; rebuilt only when `selected` changes. */
|
|
454
|
+
const monthDays = $derived(getMonthDays(selected));
|
|
455
|
+
|
|
456
|
+
// ---- Week view helpers ----
|
|
457
|
+
|
|
458
|
+
function getWeekDays(date: Date): Array<Date> {
|
|
459
|
+
// eslint-disable-next-line svelte/prefer-svelte-reactivity
|
|
460
|
+
const d = new Date(date);
|
|
461
|
+
const day = d.getDay();
|
|
462
|
+
const mondayOffset = day === 0 ? -6 : 1 - day;
|
|
463
|
+
d.setDate(d.getDate() + mondayOffset);
|
|
464
|
+
|
|
465
|
+
const week: Array<Date> = [];
|
|
466
|
+
for (let i = 0; i < 7; i++) {
|
|
467
|
+
week.push(new Date(d));
|
|
468
|
+
d.setDate(d.getDate() + 1);
|
|
469
|
+
}
|
|
470
|
+
return week;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
const weekDays = $derived(getWeekDays(selected));
|
|
474
|
+
|
|
475
|
+
// ---- View mode buttons ----
|
|
476
|
+
|
|
477
|
+
const viewModes: ReadonlyArray<{ mode: CalendarViewMode; label: string }> = [
|
|
478
|
+
{ mode: CalendarViewMode.Day, label: 'Day' },
|
|
479
|
+
{ mode: CalendarViewMode.Week, label: 'Week' },
|
|
480
|
+
{ mode: CalendarViewMode.Month, label: 'Month' },
|
|
481
|
+
];
|
|
482
|
+
</script>
|
|
483
|
+
|
|
484
|
+
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
485
|
+
<!-- svelte-ignore a11y_no_noninteractive_element_interactions -->
|
|
486
|
+
<div
|
|
487
|
+
class="appointment-calendar"
|
|
488
|
+
class:is-moving-appointment={isDraggingAppointment}
|
|
489
|
+
onmouseup={onSlotMouseUp}
|
|
490
|
+
role="application"
|
|
491
|
+
>
|
|
492
|
+
<!-- Header: navigation + view toggle -->
|
|
493
|
+
<div class="calendar-header">
|
|
494
|
+
<div class="header-left">
|
|
495
|
+
<Button
|
|
496
|
+
label="Today"
|
|
497
|
+
size={Size.Small}
|
|
498
|
+
onclick={goToToday}
|
|
499
|
+
/>
|
|
500
|
+
<div class="nav-arrows">
|
|
501
|
+
<button
|
|
502
|
+
class="nav-btn"
|
|
503
|
+
onclick={() => {
|
|
504
|
+
navigateDate(-1);
|
|
505
|
+
}}
|
|
506
|
+
aria-label="Previous"
|
|
507
|
+
>
|
|
508
|
+
<Icon
|
|
509
|
+
name="chevron-left"
|
|
510
|
+
size={Size.Small}
|
|
511
|
+
colour={Colour['$ui-blue-14']}
|
|
512
|
+
/>
|
|
513
|
+
</button>
|
|
514
|
+
<button
|
|
515
|
+
class="nav-btn"
|
|
516
|
+
onclick={() => {
|
|
517
|
+
navigateDate(1);
|
|
518
|
+
}}
|
|
519
|
+
aria-label="Next"
|
|
520
|
+
>
|
|
521
|
+
<Icon
|
|
522
|
+
name="chevron-right"
|
|
523
|
+
size={Size.Small}
|
|
524
|
+
colour={Colour['$ui-blue-14']}
|
|
525
|
+
/>
|
|
526
|
+
</button>
|
|
527
|
+
</div>
|
|
528
|
+
<h2 class="current-date-label">{formatDate(selected)}</h2>
|
|
529
|
+
</div>
|
|
530
|
+
<div class="header-right">
|
|
531
|
+
{#if headerExtra}
|
|
532
|
+
{@render headerExtra()}
|
|
533
|
+
{/if}
|
|
534
|
+
<div class="view-toggle">
|
|
535
|
+
{#each viewModes as { mode, label } (mode)}
|
|
536
|
+
<button
|
|
537
|
+
class="view-btn"
|
|
538
|
+
class:active={viewMode === mode}
|
|
539
|
+
onclick={() => {
|
|
540
|
+
onviewmodechange(mode);
|
|
541
|
+
}}
|
|
542
|
+
>
|
|
543
|
+
{label}
|
|
544
|
+
</button>
|
|
545
|
+
{/each}
|
|
546
|
+
</div>
|
|
547
|
+
</div>
|
|
548
|
+
</div>
|
|
549
|
+
|
|
550
|
+
<!-- Week day tabs rendered OUTSIDE the scrollable body so they stay frozen -->
|
|
551
|
+
{#if viewMode === CalendarViewMode.Week}
|
|
552
|
+
<div class="week-day-tabs">
|
|
553
|
+
{#each weekDays as day (day.getTime())}
|
|
554
|
+
<button
|
|
555
|
+
class="week-day-tab"
|
|
556
|
+
class:active={sameDay(day, selected)}
|
|
557
|
+
class:today={sameDay(day, today)}
|
|
558
|
+
onclick={() => {
|
|
559
|
+
ondatechange(day);
|
|
560
|
+
}}
|
|
561
|
+
>
|
|
562
|
+
<span class="day-name">{dayNames[day.getDay()].slice(0, 3)}</span>
|
|
563
|
+
<span class="day-num">{day.getDate()}</span>
|
|
564
|
+
</button>
|
|
565
|
+
{/each}
|
|
566
|
+
</div>
|
|
567
|
+
{/if}
|
|
568
|
+
|
|
569
|
+
<!-- Calendar body -->
|
|
570
|
+
<div class="calendar-body">
|
|
571
|
+
{#if isLoading}
|
|
572
|
+
<LoadingOverlay />
|
|
573
|
+
{/if}
|
|
574
|
+
|
|
575
|
+
{#if viewMode === CalendarViewMode.Day}
|
|
576
|
+
<!-- DAY VIEW -->
|
|
577
|
+
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
578
|
+
<div
|
|
579
|
+
class="day-view"
|
|
580
|
+
onmouseleave={() => {
|
|
581
|
+
hoveredSlotIndex = null;
|
|
582
|
+
}}
|
|
583
|
+
>
|
|
584
|
+
<!-- eslint-disable-next-line @typescript-eslint/no-confusing-void-expression -->
|
|
585
|
+
{@render doorGrid(selected)}
|
|
586
|
+
</div>
|
|
587
|
+
{:else if viewMode === CalendarViewMode.Week}
|
|
588
|
+
<!-- WEEK VIEW: day grid only, tabs are above calendar-body -->
|
|
589
|
+
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
590
|
+
<div
|
|
591
|
+
class="day-view"
|
|
592
|
+
onmouseleave={() => {
|
|
593
|
+
hoveredSlotIndex = null;
|
|
594
|
+
}}
|
|
595
|
+
>
|
|
596
|
+
<!-- eslint-disable-next-line @typescript-eslint/no-confusing-void-expression -->
|
|
597
|
+
{@render doorGrid(selected)}
|
|
598
|
+
</div>
|
|
599
|
+
{:else}
|
|
600
|
+
<!-- MONTH VIEW -->
|
|
601
|
+
<div class="month-view">
|
|
602
|
+
<div class="month-header-row">
|
|
603
|
+
{#each ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] as dayLabel (dayLabel)}
|
|
604
|
+
<div class="month-day-header">{dayLabel}</div>
|
|
605
|
+
{/each}
|
|
606
|
+
</div>
|
|
607
|
+
<div class="month-grid">
|
|
608
|
+
{#each monthDays as { date: dayDate, isCurrentMonth } (dayDate.getTime())}
|
|
609
|
+
<button
|
|
610
|
+
class="month-day-cell"
|
|
611
|
+
class:other-month={!isCurrentMonth}
|
|
612
|
+
class:today={sameDay(dayDate, today)}
|
|
613
|
+
class:selected={sameDay(dayDate, selected)}
|
|
614
|
+
onclick={() => {
|
|
615
|
+
ondatechange(dayDate);
|
|
616
|
+
onviewmodechange(CalendarViewMode.Day);
|
|
617
|
+
}}
|
|
618
|
+
>
|
|
619
|
+
<span class="day-number">{dayDate.getDate()}</span>
|
|
620
|
+
<div class="day-badges">
|
|
621
|
+
{#each countsAt(dayDate) as { doorId, doorName, count } (doorId)}
|
|
622
|
+
<span class="door-badge">
|
|
623
|
+
{doorName}: {count}
|
|
624
|
+
</span>
|
|
625
|
+
{/each}
|
|
626
|
+
</div>
|
|
627
|
+
</button>
|
|
628
|
+
{/each}
|
|
629
|
+
</div>
|
|
630
|
+
</div>
|
|
631
|
+
{/if}
|
|
632
|
+
</div>
|
|
633
|
+
</div>
|
|
634
|
+
|
|
635
|
+
{#snippet doorGrid(day: Date)}
|
|
636
|
+
<div class="grid-header">
|
|
637
|
+
<div class="time-header">Time</div>
|
|
638
|
+
{#each doors as door (door.id)}
|
|
639
|
+
<div class="door-header">{door.name}</div>
|
|
640
|
+
{/each}
|
|
641
|
+
</div>
|
|
642
|
+
<div class="grid-body">
|
|
643
|
+
<div class="time-column">
|
|
644
|
+
{#each timeSlots as slot, slotIdx (slot.hour * 60 + slot.minute)}
|
|
645
|
+
<div
|
|
646
|
+
class="time-label"
|
|
647
|
+
class:hour-start={slot.minute === 0}
|
|
648
|
+
class:row-hover={hoveredSlotIndex === slotIdx}
|
|
649
|
+
>
|
|
650
|
+
{#if slot.minute === 0}
|
|
651
|
+
<span>{slot.label}</span>
|
|
652
|
+
{/if}
|
|
653
|
+
</div>
|
|
654
|
+
{/each}
|
|
655
|
+
</div>
|
|
656
|
+
{#each doors as door (door.id)}
|
|
657
|
+
<div class="door-column">
|
|
658
|
+
<!-- Slot cells for drag interaction (rendered first, sit below appointments) -->
|
|
659
|
+
{#each timeSlots as slot, slotIdx (slot.hour * 60 + slot.minute)}
|
|
660
|
+
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
661
|
+
<div
|
|
662
|
+
class="slot-cell"
|
|
663
|
+
class:hour-start={slot.minute === 0}
|
|
664
|
+
class:drag-selected={isSlotInDragRange(door.id, slotIdx)}
|
|
665
|
+
class:move-target={isSlotInMoveTarget(door.id, slotIdx)}
|
|
666
|
+
class:row-hover={hoveredSlotIndex === slotIdx}
|
|
667
|
+
onmousedown={() => {
|
|
668
|
+
onSlotMouseDown(door.id, slotIdx);
|
|
669
|
+
}}
|
|
670
|
+
onmouseenter={() => {
|
|
671
|
+
hoveredSlotIndex = slotIdx;
|
|
672
|
+
onSlotMouseEnter(door.id, slotIdx);
|
|
673
|
+
}}
|
|
674
|
+
></div>
|
|
675
|
+
{/each}
|
|
676
|
+
<!-- Appointment blocks positioned absolutely (rendered after, sit above slots) -->
|
|
677
|
+
{#each appointmentsAt(door.id, day) as apt (apt.id)}
|
|
678
|
+
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
679
|
+
<div
|
|
680
|
+
class="appointment-block"
|
|
681
|
+
class:inbound={apt.typeCode === 'INBOUND'}
|
|
682
|
+
class:outbound={apt.typeCode === 'OUTBOUND'}
|
|
683
|
+
class:dragging={isDraggingAppointment && draggedAppointment?.id === apt.id}
|
|
684
|
+
class:movable={!!onappointmentmove}
|
|
685
|
+
style="top: {apt.topPercent}%; height: {apt.heightPercent}%;"
|
|
686
|
+
onmousedown={(e) => {
|
|
687
|
+
onAppointmentMouseDown(apt, e);
|
|
688
|
+
}}
|
|
689
|
+
>
|
|
690
|
+
<span class="apt-type">{apt.typeCode}</span>
|
|
691
|
+
<span class="apt-label">{apt.label}</span>
|
|
692
|
+
{#if apt.sublabel}
|
|
693
|
+
<span class="apt-sublabel">{apt.sublabel}</span>
|
|
694
|
+
{/if}
|
|
695
|
+
</div>
|
|
696
|
+
{/each}
|
|
697
|
+
</div>
|
|
698
|
+
{/each}
|
|
699
|
+
</div>
|
|
700
|
+
{/snippet}
|
|
701
|
+
|
|
702
|
+
<style>.appointment-calendar {
|
|
703
|
+
display: flex;
|
|
704
|
+
flex-flow: column nowrap;
|
|
705
|
+
height: 100%;
|
|
706
|
+
background-color: #ffffff;
|
|
707
|
+
overflow: hidden;
|
|
708
|
+
}
|
|
709
|
+
.appointment-calendar.is-moving-appointment {
|
|
710
|
+
cursor: grabbing;
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
.calendar-header {
|
|
714
|
+
display: flex;
|
|
715
|
+
flex-flow: row nowrap;
|
|
716
|
+
align-items: center;
|
|
717
|
+
justify-content: space-between;
|
|
718
|
+
padding: 0.75rem 1.5rem;
|
|
719
|
+
background-color: #ffffff;
|
|
720
|
+
border-bottom: solid 1px #cbd4da;
|
|
721
|
+
flex-shrink: 0;
|
|
722
|
+
gap: 1.5rem;
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
.header-left {
|
|
726
|
+
display: flex;
|
|
727
|
+
flex-flow: row nowrap;
|
|
728
|
+
align-items: center;
|
|
729
|
+
gap: 0.75rem;
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
.header-right {
|
|
733
|
+
display: flex;
|
|
734
|
+
flex-flow: row nowrap;
|
|
735
|
+
align-items: center;
|
|
736
|
+
gap: 1.5rem;
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
.current-date-label {
|
|
740
|
+
margin: 0;
|
|
741
|
+
font-size: 1.25rem;
|
|
742
|
+
font-weight: 500;
|
|
743
|
+
color: #3a4952;
|
|
744
|
+
white-space: nowrap;
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
.nav-arrows {
|
|
748
|
+
display: flex;
|
|
749
|
+
flex-flow: row nowrap;
|
|
750
|
+
gap: 2px;
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
.nav-btn {
|
|
754
|
+
border: solid 1px #cbd4da;
|
|
755
|
+
background: #ffffff;
|
|
756
|
+
cursor: pointer;
|
|
757
|
+
border-radius: 4px;
|
|
758
|
+
padding: 0.35rem 0.5rem;
|
|
759
|
+
display: flex;
|
|
760
|
+
align-items: center;
|
|
761
|
+
transition: border-color ease-out 0.15s 0s, background-color ease-out 0.15s 0s, color ease-out 0.15s 0s, fill ease-out 0.15s 0s;
|
|
762
|
+
}
|
|
763
|
+
.nav-btn:hover {
|
|
764
|
+
background-color: #f4f7f9;
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
.view-toggle {
|
|
768
|
+
display: flex;
|
|
769
|
+
flex-flow: row nowrap;
|
|
770
|
+
border: solid 1px #cbd4da;
|
|
771
|
+
border-radius: 4px;
|
|
772
|
+
overflow: hidden;
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
.view-btn {
|
|
776
|
+
border: none;
|
|
777
|
+
background: #ffffff;
|
|
778
|
+
cursor: pointer;
|
|
779
|
+
padding: 0.4rem 0.75rem;
|
|
780
|
+
font-size: 0.875rem;
|
|
781
|
+
color: #3a4952;
|
|
782
|
+
transition: border-color ease-out 0.15s 0s, background-color ease-out 0.15s 0s, color ease-out 0.15s 0s, fill ease-out 0.15s 0s;
|
|
783
|
+
}
|
|
784
|
+
.view-btn:not(:last-child) {
|
|
785
|
+
border-right: solid 1px #cbd4da;
|
|
786
|
+
}
|
|
787
|
+
.view-btn.active {
|
|
788
|
+
background-color: #259fc7;
|
|
789
|
+
color: #ffffff;
|
|
790
|
+
}
|
|
791
|
+
.view-btn:hover:not(.active) {
|
|
792
|
+
background-color: #f4f7f9;
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
.calendar-body {
|
|
796
|
+
flex: 1;
|
|
797
|
+
overflow: auto;
|
|
798
|
+
position: relative;
|
|
799
|
+
background-color: #ffffff;
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
.day-view {
|
|
803
|
+
display: inline-flex;
|
|
804
|
+
flex-flow: column nowrap;
|
|
805
|
+
min-height: 100%;
|
|
806
|
+
min-width: 100%;
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
.grid-header {
|
|
810
|
+
display: flex;
|
|
811
|
+
flex-flow: row nowrap;
|
|
812
|
+
position: sticky;
|
|
813
|
+
top: 0;
|
|
814
|
+
z-index: 10;
|
|
815
|
+
background-color: #e9ecf1;
|
|
816
|
+
border-bottom: solid 1px #cbd4da;
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
.time-header,
|
|
820
|
+
.door-header {
|
|
821
|
+
padding: 0.5rem;
|
|
822
|
+
font-size: 0.875rem;
|
|
823
|
+
font-weight: 600;
|
|
824
|
+
text-align: center;
|
|
825
|
+
color: #3a4952;
|
|
826
|
+
border-right: solid 1px #cbd4da;
|
|
827
|
+
box-sizing: border-box;
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
.time-header {
|
|
831
|
+
width: 4.5rem;
|
|
832
|
+
min-width: 4.5rem;
|
|
833
|
+
flex-shrink: 0;
|
|
834
|
+
position: sticky;
|
|
835
|
+
left: 0;
|
|
836
|
+
z-index: 2;
|
|
837
|
+
background-color: #e9ecf1;
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
.door-header {
|
|
841
|
+
flex: 1;
|
|
842
|
+
min-width: 8rem;
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
.grid-body {
|
|
846
|
+
display: flex;
|
|
847
|
+
flex-flow: row nowrap;
|
|
848
|
+
flex: 1;
|
|
849
|
+
padding-top: 0.625rem;
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
.time-column {
|
|
853
|
+
width: 4.5rem;
|
|
854
|
+
min-width: 4.5rem;
|
|
855
|
+
flex-shrink: 0;
|
|
856
|
+
display: flex;
|
|
857
|
+
flex-flow: column nowrap;
|
|
858
|
+
position: sticky;
|
|
859
|
+
left: 0;
|
|
860
|
+
z-index: 6;
|
|
861
|
+
background-color: #ffffff;
|
|
862
|
+
border-right: solid 1px #cbd4da;
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
.time-label {
|
|
866
|
+
height: 1.25rem;
|
|
867
|
+
display: flex;
|
|
868
|
+
align-items: flex-start;
|
|
869
|
+
justify-content: flex-end;
|
|
870
|
+
padding-right: 0.5rem;
|
|
871
|
+
box-sizing: border-box;
|
|
872
|
+
font-size: 0.875rem;
|
|
873
|
+
font-weight: 600;
|
|
874
|
+
color: #3a4952;
|
|
875
|
+
transition: background-color 0.05s ease;
|
|
876
|
+
}
|
|
877
|
+
.time-label.row-hover {
|
|
878
|
+
background-color: #f4fbfd;
|
|
879
|
+
}
|
|
880
|
+
.time-label span {
|
|
881
|
+
transform: translateY(-50%);
|
|
882
|
+
white-space: nowrap;
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
.door-column {
|
|
886
|
+
flex: 1;
|
|
887
|
+
min-width: 8rem;
|
|
888
|
+
position: relative;
|
|
889
|
+
display: flex;
|
|
890
|
+
flex-flow: column nowrap;
|
|
891
|
+
border-right: solid 1px #cbd4da;
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
.slot-cell {
|
|
895
|
+
height: 1.25rem;
|
|
896
|
+
box-sizing: border-box;
|
|
897
|
+
cursor: pointer;
|
|
898
|
+
transition: background-color 0.05s ease;
|
|
899
|
+
border-bottom: solid 1px #e9ecf1;
|
|
900
|
+
z-index: 1;
|
|
901
|
+
}
|
|
902
|
+
.slot-cell.hour-start {
|
|
903
|
+
border-top: solid 1px #dae0e5;
|
|
904
|
+
}
|
|
905
|
+
.slot-cell.row-hover {
|
|
906
|
+
background-color: #f4fbfd;
|
|
907
|
+
}
|
|
908
|
+
.slot-cell.drag-selected {
|
|
909
|
+
background-color: #caeaf5;
|
|
910
|
+
z-index: 2;
|
|
911
|
+
}
|
|
912
|
+
.slot-cell.move-target {
|
|
913
|
+
background-color: #e6f8fd;
|
|
914
|
+
border-bottom-color: #b4e2f0;
|
|
915
|
+
z-index: 2;
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
.appointment-block {
|
|
919
|
+
position: absolute;
|
|
920
|
+
left: 2px;
|
|
921
|
+
right: 2px;
|
|
922
|
+
z-index: 5;
|
|
923
|
+
border-radius: 4px;
|
|
924
|
+
border: solid 1px #9fdaec;
|
|
925
|
+
background-color: #f4fbfd;
|
|
926
|
+
padding: 0.25rem 0.4rem;
|
|
927
|
+
display: flex;
|
|
928
|
+
flex-flow: column nowrap;
|
|
929
|
+
gap: 0.15rem;
|
|
930
|
+
overflow: hidden;
|
|
931
|
+
cursor: pointer;
|
|
932
|
+
font-size: 0.75rem;
|
|
933
|
+
text-align: left;
|
|
934
|
+
transition: border-color ease-out 0.15s 0s, background-color ease-out 0.15s 0s, color ease-out 0.15s 0s, fill ease-out 0.15s 0s;
|
|
935
|
+
user-select: none;
|
|
936
|
+
}
|
|
937
|
+
.appointment-block.movable {
|
|
938
|
+
cursor: grab;
|
|
939
|
+
}
|
|
940
|
+
.appointment-block.dragging {
|
|
941
|
+
opacity: 0.4;
|
|
942
|
+
cursor: grabbing;
|
|
943
|
+
}
|
|
944
|
+
.appointment-block:hover {
|
|
945
|
+
background-color: #e6f8fd;
|
|
946
|
+
border-color: #74c9e4;
|
|
947
|
+
}
|
|
948
|
+
.appointment-block.inbound {
|
|
949
|
+
border-color: #9fdaec;
|
|
950
|
+
}
|
|
951
|
+
.appointment-block.inbound .apt-type {
|
|
952
|
+
color: #259fc7;
|
|
953
|
+
}
|
|
954
|
+
.appointment-block.outbound {
|
|
955
|
+
border-color: #e7b100;
|
|
956
|
+
background-color: #f0faf0;
|
|
957
|
+
}
|
|
958
|
+
.appointment-block.outbound .apt-type {
|
|
959
|
+
color: #e7b100;
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
.apt-type {
|
|
963
|
+
font-weight: 600;
|
|
964
|
+
font-size: 0.75rem;
|
|
965
|
+
text-transform: uppercase;
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
.apt-label {
|
|
969
|
+
color: #3a4952;
|
|
970
|
+
font-weight: 500;
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
.apt-sublabel {
|
|
974
|
+
color: #647d8e;
|
|
975
|
+
font-size: 0.75rem;
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
.week-day-tabs {
|
|
979
|
+
display: flex;
|
|
980
|
+
flex-flow: row nowrap;
|
|
981
|
+
border-bottom: solid 1px #cbd4da;
|
|
982
|
+
background-color: #ffffff;
|
|
983
|
+
flex-shrink: 0;
|
|
984
|
+
}
|
|
985
|
+
|
|
986
|
+
.week-day-tab {
|
|
987
|
+
flex: 1;
|
|
988
|
+
display: flex;
|
|
989
|
+
flex-flow: column nowrap;
|
|
990
|
+
align-items: center;
|
|
991
|
+
gap: 0.15rem;
|
|
992
|
+
padding: 0.5rem 0.25rem;
|
|
993
|
+
border: none;
|
|
994
|
+
border-right: solid 1px #cbd4da;
|
|
995
|
+
background: #ffffff;
|
|
996
|
+
cursor: pointer;
|
|
997
|
+
transition: border-color ease-out 0.15s 0s, background-color ease-out 0.15s 0s, color ease-out 0.15s 0s, fill ease-out 0.15s 0s;
|
|
998
|
+
}
|
|
999
|
+
.week-day-tab:last-child {
|
|
1000
|
+
border-right: none;
|
|
1001
|
+
}
|
|
1002
|
+
.week-day-tab:hover {
|
|
1003
|
+
background-color: #f4f7f9;
|
|
1004
|
+
}
|
|
1005
|
+
.week-day-tab.active {
|
|
1006
|
+
background-color: #e6f8fd;
|
|
1007
|
+
border-bottom: solid 2px #259fc7;
|
|
1008
|
+
}
|
|
1009
|
+
.week-day-tab.today .day-num {
|
|
1010
|
+
background-color: #259fc7;
|
|
1011
|
+
color: #ffffff;
|
|
1012
|
+
border-radius: 50%;
|
|
1013
|
+
width: 1.5rem;
|
|
1014
|
+
height: 1.5rem;
|
|
1015
|
+
display: flex;
|
|
1016
|
+
align-items: center;
|
|
1017
|
+
justify-content: center;
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
.day-name {
|
|
1021
|
+
font-size: 0.75rem;
|
|
1022
|
+
color: #647d8e;
|
|
1023
|
+
text-transform: uppercase;
|
|
1024
|
+
font-weight: 600;
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
.day-num {
|
|
1028
|
+
font-size: 1rem;
|
|
1029
|
+
color: #3a4952;
|
|
1030
|
+
font-weight: 500;
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
.month-view {
|
|
1034
|
+
display: flex;
|
|
1035
|
+
flex-flow: column nowrap;
|
|
1036
|
+
height: 100%;
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1039
|
+
.month-header-row {
|
|
1040
|
+
display: grid;
|
|
1041
|
+
grid-template-columns: repeat(7, 1fr);
|
|
1042
|
+
background-color: #e9ecf1;
|
|
1043
|
+
border-bottom: solid 1px #cbd4da;
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
.month-day-header {
|
|
1047
|
+
padding: 0.5rem;
|
|
1048
|
+
text-align: center;
|
|
1049
|
+
font-size: 0.875rem;
|
|
1050
|
+
font-weight: 600;
|
|
1051
|
+
color: #3a4952;
|
|
1052
|
+
border-right: solid 1px #cbd4da;
|
|
1053
|
+
}
|
|
1054
|
+
.month-day-header:last-child {
|
|
1055
|
+
border-right: none;
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
.month-grid {
|
|
1059
|
+
display: grid;
|
|
1060
|
+
grid-template-columns: repeat(7, 1fr);
|
|
1061
|
+
grid-template-rows: repeat(6, 1fr);
|
|
1062
|
+
flex: 1;
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
.month-day-cell {
|
|
1066
|
+
border: none;
|
|
1067
|
+
border-right: solid 1px #cbd4da;
|
|
1068
|
+
border-bottom: solid 1px #cbd4da;
|
|
1069
|
+
background: #ffffff;
|
|
1070
|
+
padding: 0.35rem;
|
|
1071
|
+
display: flex;
|
|
1072
|
+
flex-flow: column nowrap;
|
|
1073
|
+
gap: 0.2rem;
|
|
1074
|
+
cursor: pointer;
|
|
1075
|
+
text-align: left;
|
|
1076
|
+
min-height: 4.5rem;
|
|
1077
|
+
transition: border-color ease-out 0.15s 0s, background-color ease-out 0.15s 0s, color ease-out 0.15s 0s, fill ease-out 0.15s 0s;
|
|
1078
|
+
}
|
|
1079
|
+
.month-day-cell:hover {
|
|
1080
|
+
background-color: #f4f7f9;
|
|
1081
|
+
}
|
|
1082
|
+
.month-day-cell.other-month {
|
|
1083
|
+
background-color: #f4f7f9;
|
|
1084
|
+
}
|
|
1085
|
+
.month-day-cell.other-month .day-number {
|
|
1086
|
+
color: #8096a5;
|
|
1087
|
+
}
|
|
1088
|
+
.month-day-cell.today .day-number {
|
|
1089
|
+
background-color: #259fc7;
|
|
1090
|
+
color: #ffffff;
|
|
1091
|
+
border-radius: 50%;
|
|
1092
|
+
width: 1.5rem;
|
|
1093
|
+
height: 1.5rem;
|
|
1094
|
+
display: flex;
|
|
1095
|
+
align-items: center;
|
|
1096
|
+
justify-content: center;
|
|
1097
|
+
font-weight: 600;
|
|
1098
|
+
}
|
|
1099
|
+
.month-day-cell.selected {
|
|
1100
|
+
outline: solid 2px #259fc7;
|
|
1101
|
+
outline-offset: -2px;
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
.day-number {
|
|
1105
|
+
font-size: 0.875rem;
|
|
1106
|
+
color: #3a4952;
|
|
1107
|
+
font-weight: 500;
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1110
|
+
.day-badges {
|
|
1111
|
+
display: flex;
|
|
1112
|
+
flex-flow: column nowrap;
|
|
1113
|
+
gap: 1px;
|
|
1114
|
+
overflow: hidden;
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1117
|
+
.door-badge {
|
|
1118
|
+
font-size: 0.75rem;
|
|
1119
|
+
color: #259fc7;
|
|
1120
|
+
background-color: #e6f8fd;
|
|
1121
|
+
border-radius: 2px;
|
|
1122
|
+
padding: 0 0.25rem;
|
|
1123
|
+
white-space: nowrap;
|
|
1124
|
+
overflow: hidden;
|
|
1125
|
+
text-overflow: ellipsis;
|
|
1126
|
+
}</style>
|