@lavalogic/scoria 0.35.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/README.md +58 -58
- package/dist/Components/AccordionGroup.svelte +46 -42
- package/dist/Components/AccordionGroupButton.svelte +106 -106
- package/dist/Components/AccordionGroupButtonProps.d.ts +27 -8
- package/dist/Components/AccordionGroupProps.d.ts +10 -2
- package/dist/Components/Action.svelte +137 -139
- package/dist/Components/ActionProps.d.ts +23 -3
- package/dist/Components/AlertModal.svelte +176 -125
- 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 +72 -50
- 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 +198 -190
- 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 +36 -29
- package/dist/Components/Base/Snippets.svelte.d.ts +5 -1
- package/dist/Components/BigRadioSet.svelte +39 -30
- package/dist/Components/BigRadioSetProps.d.ts +17 -1
- package/dist/Components/Bubble.svelte +110 -77
- package/dist/Components/Bubble.svelte.d.ts +23 -2
- package/dist/Components/BubbleProps.d.ts +55 -4
- package/dist/Components/Button.svelte +209 -197
- package/dist/Components/ButtonProps.d.ts +66 -1
- package/dist/Components/Checkbox.svelte +100 -72
- 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 +114 -83
- package/dist/Components/CollapsibleCardProps.d.ts +22 -1
- package/dist/Components/Contexts/ContextMenu.svelte +178 -157
- package/dist/Components/Contexts/ContextMenu.svelte.d.ts +26 -0
- package/dist/Components/Contexts/ContextMenuDivider.svelte +19 -11
- package/dist/Components/Contexts/ContextMenuDivider.svelte.d.ts +9 -0
- package/dist/Components/Contexts/ContextMenuOption.svelte +66 -57
- 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 +88 -64
- package/dist/Components/Contexts/Toast.svelte.d.ts +14 -0
- package/dist/Components/Contexts/ToastContainer.svelte +68 -49
- 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 +47 -36
- package/dist/Components/Contexts/Tooltip.svelte.d.ts +10 -0
- package/dist/Components/DataMatrixIcon.svelte +113 -42
- package/dist/Components/DataMatrixIconProps.d.ts +73 -1
- package/dist/Components/DateInput.svelte +144 -109
- package/dist/Components/DateInput.svelte.d.ts +1 -1
- package/dist/Components/DateOnlyInputProps.d.ts +31 -5
- package/dist/Components/DatePicker.svelte +301 -313
- package/dist/Components/DatePickerProps.d.ts +18 -1
- package/dist/Components/DateTimeInputProps.d.ts +30 -5
- package/dist/Components/DesktopModal.svelte +90 -119
- package/dist/Components/DesktopModalProps.d.ts +5 -4
- package/dist/Components/Dial.svelte +213 -151
- package/dist/Components/DialProps.d.ts +74 -2
- package/dist/Components/DimensionInput.svelte +171 -185
- package/dist/Components/DimensionInput.svelte.d.ts +1 -1
- package/dist/Components/DimensionInputProps.d.ts +39 -4
- package/dist/Components/DragMenu/DragMenuHolder.svelte +119 -107
- package/dist/Components/DragMenu/DragMenuHolderProps.d.ts +30 -1
- package/dist/Components/DragMenu/DraggableCard.svelte +77 -41
- package/dist/Components/DragMenu/DraggableCardProps.d.ts +27 -1
- package/dist/Components/FileCard.svelte +24 -20
- package/dist/Components/FileCardProps.d.ts +17 -1
- package/dist/Components/FileUpload.svelte +236 -196
- package/dist/Components/FileUploadProps.d.ts +34 -4
- package/dist/Components/GridInput.svelte +201 -191
- package/dist/Components/GridInput.svelte.d.ts +5 -5
- package/dist/Components/GridInputProps.d.ts +4 -1
- package/dist/Components/GridInputSet.svelte +31 -24
- package/dist/Components/GridInputSet.svelte.d.ts +5 -5
- package/dist/Components/GridInputSetProps.d.ts +4 -2
- package/dist/Components/HorizontalTabGroup.svelte +81 -79
- package/dist/Components/HorizontalTabGroupButton.svelte +51 -103
- package/dist/Components/HorizontalTabGroupProps.d.ts +15 -2
- package/dist/Components/Icon.svelte +144 -103
- package/dist/Components/IconProps.d.ts +54 -6
- package/dist/Components/Icons.d.ts +8 -0
- package/dist/Components/Icons.js +591 -572
- package/dist/Components/LoadingAnimation.svelte +39 -39
- 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 +48 -50
- 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 +28 -30
- 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 +250 -255
- 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 +238 -226
- 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 +115 -110
- 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 +44 -35
- package/dist/Components/Nav/NavServiceMenuListProps.d.ts +25 -1
- package/dist/Components/Nav/NavTab.svelte +62 -91
- 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 +101 -92
- package/dist/Components/Nav/ServicesNav.svelte +96 -70
- 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 +155 -145
- package/dist/Components/NumberInputProps.d.ts +37 -0
- package/dist/Components/PageHeading.svelte +25 -36
- 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 +85 -73
- 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 +36 -25
- package/dist/Components/PortalProps.d.ts +20 -1
- package/dist/Components/ProgressBubble.svelte +129 -84
- package/dist/Components/ProgressBubbleProps.d.ts +23 -2
- package/dist/Components/QuerySelect.svelte +384 -440
- 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 +268 -290
- 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 +70 -120
- package/dist/Components/StepForm.svelte +147 -147
- package/dist/Components/StepFormProps.d.ts +16 -2
- package/dist/Components/Switch.svelte +84 -47
- 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 +697 -641
- 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 +68 -34
- 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 +66 -56
- 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 +515 -182
- 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 +79 -49
- package/dist/Components/Table/Body/Rows/Columns/AccessorComponentProps.d.ts +12 -0
- package/dist/Components/Table/Body/Rows/Columns/ActionsCell.svelte +203 -191
- 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 +150 -115
- 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 +149 -129
- package/dist/Components/Table/Body/Rows/Columns/FocusableImmutableCell.svelte +149 -126
- 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 +142 -108
- 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 +87 -72
- package/dist/Components/Table/Body/Rows/Columns/TableAction.svelte.d.ts +11 -0
- package/dist/Components/Table/Body/Rows/Columns/TableCheckbox.svelte +148 -137
- 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 +159 -144
- 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 +279 -249
- 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 +249 -370
- 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 +291 -354
- 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 +201 -189
- 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 +263 -325
- 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 +230 -381
- 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 +187 -177
- 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 +331 -263
- 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 +198 -81
- 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 +41 -39
- package/dist/Components/Table/Headers/HighlightAllHeader.svelte.d.ts +12 -11
- package/dist/Components/Table/Headers/SelectAllHeader.svelte +30 -28
- package/dist/Components/Table/Headers/SelectAllHeader.svelte.d.ts +12 -11
- package/dist/Components/Table/Headers/TableHead.svelte +434 -294
- 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 +154 -96
- package/dist/Components/Table/Misc/ColumnPanel.svelte.d.ts +12 -11
- package/dist/Components/Table/Misc/ColumnPanelModal.svelte +112 -99
- 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 +545 -556
- package/dist/Components/Table/Misc/FilterInput.svelte.d.ts +12 -11
- package/dist/Components/Table/Misc/FilterPanel.svelte +409 -51
- package/dist/Components/Table/Misc/FilterPanel.svelte.d.ts +12 -11
- package/dist/Components/Table/Misc/FilterPanelModal.svelte +30 -77
- package/dist/Components/Table/Misc/FilterPanelModal.svelte.d.ts +2 -23
- package/dist/Components/Table/Misc/SidePanel.svelte +35 -32
- 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 +315 -306
- 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 +126 -157
- package/dist/Components/Table/Misc/TableHorizontalBar.svelte.d.ts +12 -11
- package/dist/Components/Table/Misc/TableSidebar.svelte +158 -177
- package/dist/Components/Table/Misc/TableSidebar.svelte.d.ts +12 -11
- package/dist/Components/Table/Misc/ToolboxPanel.svelte +147 -81
- package/dist/Components/Table/Misc/ToolboxPanel.svelte.d.ts +12 -11
- package/dist/Components/Table/Misc/ToolboxPanelModal.svelte +107 -100
- 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 +132 -88
- 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 +694 -519
- 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/Test/TestContextConsumer.svelte +13 -13
- package/dist/Components/TextArea.svelte +127 -108
- package/dist/Components/TextAreaProps.d.ts +37 -0
- package/dist/Components/TextInput.svelte +166 -147
- package/dist/Components/TextInputProps.d.ts +58 -1
- package/dist/Components/ThreeStateRadio.svelte +140 -143
- package/dist/Components/ThreeStateRadioProps.d.ts +29 -1
- package/dist/Components/Touch/BoolCard.svelte +45 -52
- 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 +209 -217
- 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 +59 -52
- package/dist/Components/Touch/EditCardProps.d.ts +21 -0
- package/dist/Components/Touch/InfoCard.svelte +35 -28
- package/dist/Components/Touch/InfoCardProps.d.ts +9 -0
- package/dist/Components/Touch/InfoTextCard.svelte +28 -21
- package/dist/Components/Touch/InfoTextCardProps.d.ts +8 -0
- package/dist/Components/Touch/ModalExplanation.svelte +17 -20
- 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 +225 -268
- package/dist/Components/Touch/NumberKeyboardProps.d.ts +19 -0
- package/dist/Components/Touch/NumberModal.svelte +79 -69
- package/dist/Components/Touch/NumberModalProps.d.ts +23 -1
- package/dist/Components/Touch/PlusMinusCard.svelte +48 -52
- 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 +123 -105
- package/dist/Components/Touch/SelectModalProps.d.ts +22 -1
- package/dist/Components/Touch/SummaryCard.svelte +107 -65
- package/dist/Components/Touch/SummaryCardProps.d.ts +16 -3
- package/dist/Components/Touch/TextAreaModal.svelte +95 -86
- package/dist/Components/Touch/TextAreaModalProps.d.ts +21 -0
- package/dist/Components/Touch/TextModal.svelte +106 -123
- package/dist/Components/Touch/TextModalProps.d.ts +28 -1
- package/dist/Components/Touch/TouchCard.svelte +34 -72
- package/dist/Components/Touch/TouchCardProps.d.ts +21 -0
- package/dist/Components/Touch/TouchModal.svelte +265 -259
- package/dist/Components/Touch/TouchModalProps.d.ts +35 -1
- package/dist/Components/Touch/UtilityButton.svelte +116 -98
- package/dist/Components/Touch/UtilityButtonProps.d.ts +16 -0
- package/dist/Components/VerticalTabGroup.svelte +80 -102
- package/dist/Components/VerticalTabGroupButton.svelte +59 -98
- 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 +19 -10
- package/dist/Helpers/Datamatrix.js +291 -2
- package/dist/Helpers/Helpers.svelte.d.ts +252 -17
- package/dist/Helpers/Helpers.svelte.js +271 -60
- 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 +35 -34
- 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/_basics.scss +12 -12
- package/dist/scss/_colours.scss +134 -134
- package/dist/scss/_mixins.scss +3300 -3016
- package/dist/scss/_motion.scss +57 -0
- package/dist/scss/_sizing.scss +85 -69
- package/dist/scss/_transitions.scss +8 -8
- 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 +6 -2
|
@@ -1,181 +1,458 @@
|
|
|
1
|
-
<svelte:options runes />
|
|
2
|
-
|
|
3
|
-
<script
|
|
4
|
-
lang="ts"
|
|
5
|
-
generics="T extends object"
|
|
6
|
-
>
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import type {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
1
|
+
<svelte:options runes />
|
|
2
|
+
|
|
3
|
+
<script
|
|
4
|
+
lang="ts"
|
|
5
|
+
generics="T extends object, IdType extends Primitive"
|
|
6
|
+
>
|
|
7
|
+
import Action from '../../../Action.svelte';
|
|
8
|
+
import Checkbox from '../../../Checkbox.svelte';
|
|
9
|
+
import ThreeStateRadio from '../../../ThreeStateRadio.svelte';
|
|
10
|
+
import { ColumnType } from '../../Types/Columns/ColumnType.js';
|
|
11
|
+
import { TableContext } from '../../Types/Context/TableContext.svelte.js';
|
|
12
|
+
import type { Primitive } from '../../Types/Context/TableInitOptions.js';
|
|
13
|
+
import { Size } from '../../../../Types/Internal/Size.js';
|
|
14
|
+
import { Ternary } from '../../../../Types/Internal/Ternary.js';
|
|
15
|
+
import { getContext } from 'svelte';
|
|
16
|
+
import type { ColumnListRowProps } from './ColumnListRowProps.js';
|
|
17
|
+
const tableContext = getContext<TableContext<T, IdType>>(TableContext.identifier);
|
|
18
|
+
|
|
19
|
+
const { columnDef }: ColumnListRowProps<T> = $props();
|
|
20
|
+
|
|
21
|
+
const isExpandColumn = $derived(columnDef?.columnType === ColumnType.Expand);
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Position of this column inside the sorted column list, used to
|
|
25
|
+
* drive the disabled state of the "move up" / "move down" buttons
|
|
26
|
+
* (and to know which target index to pass `moveColumnTo`). The
|
|
27
|
+
* underlying `index` property is a stable identity for layout
|
|
28
|
+
* pinning, so we sort by it rather than relying on iteration
|
|
29
|
+
* order from the `columnDefs` array.
|
|
30
|
+
*/
|
|
31
|
+
const sortedColumns = $derived(tableContext.columnDefs.slice().sort((a, b) => a.index - b.index));
|
|
32
|
+
const currentIndex = $derived(
|
|
33
|
+
columnDef == null ? -1 : sortedColumns.findIndex((it) => it.id === columnDef.id)
|
|
34
|
+
);
|
|
35
|
+
const isAtTop = $derived(currentIndex <= 0);
|
|
36
|
+
const isAtBottom = $derived(currentIndex === -1 || currentIndex >= sortedColumns.length - 1);
|
|
37
|
+
|
|
38
|
+
function moveUp(): void {
|
|
39
|
+
if (columnDef == null || isAtTop) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
preserveListScroll(() => {
|
|
43
|
+
tableContext.moveColumnTo(currentIndex, currentIndex - 1);
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function moveDown(): void {
|
|
48
|
+
if (columnDef == null || isAtBottom) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
preserveListScroll(() => {
|
|
52
|
+
tableContext.moveColumnTo(currentIndex, currentIndex + 1);
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
let isBeingTargeted = $state(false);
|
|
57
|
+
/** Bound `<li>` element used by `preserveListScroll` to find the
|
|
58
|
+
* enclosing `.column-list` even when the event target is the
|
|
59
|
+
* visibility checkbox's hidden `<input>` (which is
|
|
60
|
+
* `position: absolute` with no positioned ancestor and therefore
|
|
61
|
+
* drifts away from the row in the layout tree). */
|
|
62
|
+
let rowEl: HTMLLIElement | undefined = $state();
|
|
63
|
+
|
|
64
|
+
function disableDragVisual() {
|
|
65
|
+
isBeingTargeted = false;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function makeKVPairs(item: string, index: number): readonly [string, number] {
|
|
69
|
+
return [item, index];
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Pre-click scroll snapshot. The key insight: when the user
|
|
74
|
+
* clicks a checkbox label, the browser fires a synthetic click
|
|
75
|
+
* on the associated hidden `<input>` *before* `onchange` fires.
|
|
76
|
+
* The synthetic click focuses the input, and the focus side
|
|
77
|
+
* effect already scrolls the column-list (and sometimes the
|
|
78
|
+
* window) to bring the 1x1px, `clip-path`-ed input's bounding
|
|
79
|
+
* box into view. By the time our `onchange` handler runs, the
|
|
80
|
+
* scroll has already happened, so reading `scrollTop` at that
|
|
81
|
+
* point gives us the *post-jump* position - "restoring" to it
|
|
82
|
+
* just freezes the list at the wrong spot.
|
|
83
|
+
*
|
|
84
|
+
* Snapshotting on `mousedown` (which fires before the focus
|
|
85
|
+
* step) captures the genuine pre-click position. We then use
|
|
86
|
+
* that snapshot to restore at multiple time points after the
|
|
87
|
+
* mutation so any further focus / layout shift gets undone.
|
|
88
|
+
*/
|
|
89
|
+
let preClickListScroll = 0;
|
|
90
|
+
let preClickWindowScrollX = 0;
|
|
91
|
+
let preClickWindowScrollY = 0;
|
|
92
|
+
/** Milliseconds `Date.now()` stamp of the last `snapshotScrollPosition`
|
|
93
|
+
* call. Lets `preserveListScroll` tell apart "click triggered toggle
|
|
94
|
+
* whose mousedown just snapshotted real pre-click state" from
|
|
95
|
+
* "keyboard or other path where the mousedown snapshot is stale". */
|
|
96
|
+
let lastSnapshotAt = 0;
|
|
97
|
+
|
|
98
|
+
/** Stale snapshots more than this many ms old are ignored. Tuned
|
|
99
|
+
* loose enough to survive any focus / click latency the browser
|
|
100
|
+
* might insert, but tight enough that an old click from minutes
|
|
101
|
+
* ago can't poison a later keyboard toggle. */
|
|
102
|
+
const SNAPSHOT_FRESHNESS_MS = 500;
|
|
103
|
+
|
|
104
|
+
function snapshotScrollPosition(): void {
|
|
105
|
+
const list = rowEl?.closest('.column-list') as HTMLElement | null;
|
|
106
|
+
preClickListScroll = list?.scrollTop ?? 0;
|
|
107
|
+
preClickWindowScrollX = typeof window !== 'undefined' ? window.scrollX : 0;
|
|
108
|
+
preClickWindowScrollY = typeof window !== 'undefined' ? window.scrollY : 0;
|
|
109
|
+
lastSnapshotAt = Date.now();
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
function restoreScrollPosition(): void {
|
|
113
|
+
const list = rowEl?.closest('.column-list') as HTMLElement | null;
|
|
114
|
+
if (list != null) {
|
|
115
|
+
list.scrollTop = preClickListScroll;
|
|
116
|
+
}
|
|
117
|
+
if (typeof window !== 'undefined') {
|
|
118
|
+
window.scrollTo(preClickWindowScrollX, preClickWindowScrollY);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Run `mutate` and then re-apply the pre-click scroll snapshot
|
|
124
|
+
* aggressively across the next ~400ms so any deferred focus /
|
|
125
|
+
* layout work that fights us at the tail of the event loop still
|
|
126
|
+
* ends up at the user's original scroll position.
|
|
127
|
+
*
|
|
128
|
+
* The snapshot itself is taken in capture phase from the row's
|
|
129
|
+
* `{@attach}` listener below, *before* the focus side effect has
|
|
130
|
+
* a chance to scroll us. If `preserveListScroll` is invoked
|
|
131
|
+
* without a recent mousedown (keyboard toggle, programmatic
|
|
132
|
+
* call) we take a fresh snapshot here.
|
|
133
|
+
*
|
|
134
|
+
* In addition to the discrete `rAF` / `setTimeout` restores, a
|
|
135
|
+
* temporary scroll listener installed on the list and the
|
|
136
|
+
* window forcibly reverts any scroll event during the lock
|
|
137
|
+
* window. The listener short-circuits when `scrollTop` is
|
|
138
|
+
* already at the snapshot value, so it doesn't loop.
|
|
139
|
+
*
|
|
140
|
+
* The active hidden input is also blurred immediately after the
|
|
141
|
+
* mutation so the browser stops treating it as the "currently
|
|
142
|
+
* focused element to keep visible" on subsequent layout passes.
|
|
143
|
+
*/
|
|
144
|
+
function preserveListScroll(mutate: () => void): void {
|
|
145
|
+
if (Date.now() - lastSnapshotAt > SNAPSHOT_FRESHNESS_MS) {
|
|
146
|
+
snapshotScrollPosition();
|
|
147
|
+
}
|
|
148
|
+
const focused =
|
|
149
|
+
typeof document !== 'undefined' && document.activeElement instanceof HTMLElement
|
|
150
|
+
? document.activeElement
|
|
151
|
+
: null;
|
|
152
|
+
const list = rowEl?.closest('.column-list') as HTMLElement | null;
|
|
153
|
+
mutate();
|
|
154
|
+
if (focused != null && rowEl?.contains(focused) === true) {
|
|
155
|
+
focused.blur();
|
|
156
|
+
}
|
|
157
|
+
if (typeof requestAnimationFrame !== 'undefined') {
|
|
158
|
+
requestAnimationFrame(restoreScrollPosition);
|
|
159
|
+
}
|
|
160
|
+
setTimeout(restoreScrollPosition, 0);
|
|
161
|
+
setTimeout(restoreScrollPosition, 60);
|
|
162
|
+
setTimeout(restoreScrollPosition, 120);
|
|
163
|
+
setTimeout(restoreScrollPosition, 240);
|
|
164
|
+
|
|
165
|
+
// Scroll-lock: forcibly revert any rogue scroll for the next
|
|
166
|
+
// ~400ms. Anything inside this window that scrolls the list
|
|
167
|
+
// or the page (focus auto-scroll, scrollIntoView from a
|
|
168
|
+
// deferred reactive effect, etc.) is snapped back to the
|
|
169
|
+
// pre-click snapshot. The handler is a no-op when the value
|
|
170
|
+
// is already at the snapshot, so the restore call inside it
|
|
171
|
+
// does not retrigger.
|
|
172
|
+
if (list != null && typeof window !== 'undefined') {
|
|
173
|
+
const lockListHandler = (): void => {
|
|
174
|
+
if (list.scrollTop !== preClickListScroll) {
|
|
175
|
+
list.scrollTop = preClickListScroll;
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
const lockWindowHandler = (): void => {
|
|
179
|
+
if (window.scrollX !== preClickWindowScrollX || window.scrollY !== preClickWindowScrollY) {
|
|
180
|
+
window.scrollTo(preClickWindowScrollX, preClickWindowScrollY);
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
list.addEventListener('scroll', lockListHandler, { passive: true });
|
|
184
|
+
window.addEventListener('scroll', lockWindowHandler, { passive: true });
|
|
185
|
+
setTimeout(() => {
|
|
186
|
+
list.removeEventListener('scroll', lockListHandler);
|
|
187
|
+
window.removeEventListener('scroll', lockWindowHandler);
|
|
188
|
+
}, 400);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Current pin state of this column expressed as a `Ternary` so the
|
|
194
|
+
* three states (`pinned-left` / `unpinned` / `pinned-right`) map
|
|
195
|
+
* cleanly onto `ThreeStateRadio`:
|
|
196
|
+
*
|
|
197
|
+
* - `Ternary.False` → pinned to the LEFT side (leftmost segment)
|
|
198
|
+
* - `Ternary.Neutral` → unpinned (middle segment)
|
|
199
|
+
* - `Ternary.True` → pinned to the RIGHT side (rightmost segment)
|
|
200
|
+
*/
|
|
201
|
+
const pinSide: Ternary = $derived(
|
|
202
|
+
columnDef == null
|
|
203
|
+
? Ternary.Neutral
|
|
204
|
+
: tableContext.columnPinning.left?.has(columnDef.id)
|
|
205
|
+
? Ternary.False
|
|
206
|
+
: tableContext.columnPinning.right?.has(columnDef.id)
|
|
207
|
+
? Ternary.True
|
|
208
|
+
: Ternary.Neutral
|
|
209
|
+
);
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Set this column's pin state from a `Ternary`. The previous
|
|
213
|
+
* side (if any) is removed first so the column is never pinned
|
|
214
|
+
* to both sides. Wrapped in `preserveListScroll` to keep the
|
|
215
|
+
* column-list scroll position pinned across any focus side
|
|
216
|
+
* effect inside the ThreeStateRadio's hidden inputs.
|
|
217
|
+
*/
|
|
218
|
+
function setPin(next: Ternary): void {
|
|
219
|
+
if (columnDef == null) {
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
preserveListScroll(() => {
|
|
223
|
+
tableContext.setColumnPinning((pinning) => {
|
|
224
|
+
const leftKeys = [...(pinning.left?.keys() ?? [])].filter((id) => id !== columnDef.id);
|
|
225
|
+
const rightKeys = [...(pinning.right?.keys() ?? [])].filter((id) => id !== columnDef.id);
|
|
226
|
+
if (next === Ternary.False) {
|
|
227
|
+
leftKeys.push(columnDef.id);
|
|
228
|
+
} else if (next === Ternary.True) {
|
|
229
|
+
rightKeys.push(columnDef.id);
|
|
230
|
+
}
|
|
231
|
+
return {
|
|
232
|
+
...pinning,
|
|
233
|
+
left: new Map(leftKeys.map(makeKVPairs)),
|
|
234
|
+
right: new Map(rightKeys.map(makeKVPairs)),
|
|
235
|
+
};
|
|
236
|
+
});
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
const onVisibilityChange = (e: Event) => {
|
|
241
|
+
if (!columnDef) {
|
|
242
|
+
console.warn('no def found', e);
|
|
243
|
+
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
const checked = (e.target as HTMLInputElement).checked;
|
|
247
|
+
preserveListScroll(() => {
|
|
248
|
+
tableContext.updateVisibility((defs) => {
|
|
249
|
+
defs[columnDef.id] = checked;
|
|
250
|
+
return defs;
|
|
251
|
+
});
|
|
252
|
+
});
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* Keyboard reorder support for power users. Arrow keys nudge the
|
|
257
|
+
* column up / down, Home / End jump to the ends. Bound on the row
|
|
258
|
+
* itself so any focusable child (eye, pin selector, move buttons)
|
|
259
|
+
* lets the user reorder without having to seek out a dedicated
|
|
260
|
+
* "drag handle" - the affordance is now the explicit up / down
|
|
261
|
+
* buttons in the row's right gutter.
|
|
262
|
+
*
|
|
263
|
+
* `Alt` is required as the modifier so plain arrow keys still
|
|
264
|
+
* navigate radio groups inside the row (ThreeStateRadio) and the
|
|
265
|
+
* row's own scroll container.
|
|
266
|
+
*/
|
|
267
|
+
function onRowKeydown(e: KeyboardEvent) {
|
|
268
|
+
if (!columnDef || !tableContext.allowColumnReordering) {
|
|
269
|
+
return;
|
|
270
|
+
}
|
|
271
|
+
if (!e.altKey) {
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
if (currentIndex === -1) {
|
|
275
|
+
return;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
const lastIndex = sortedColumns.length - 1;
|
|
279
|
+
let targetIndex: number;
|
|
280
|
+
|
|
281
|
+
switch (e.key) {
|
|
282
|
+
case 'ArrowUp':
|
|
283
|
+
targetIndex = Math.max(0, currentIndex - 1);
|
|
284
|
+
break;
|
|
285
|
+
case 'ArrowDown':
|
|
286
|
+
targetIndex = Math.min(lastIndex, currentIndex + 1);
|
|
287
|
+
break;
|
|
288
|
+
case 'Home':
|
|
289
|
+
targetIndex = 0;
|
|
290
|
+
break;
|
|
291
|
+
case 'End':
|
|
292
|
+
targetIndex = lastIndex;
|
|
293
|
+
break;
|
|
294
|
+
default:
|
|
295
|
+
return;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
if (targetIndex === currentIndex) {
|
|
299
|
+
e.preventDefault();
|
|
300
|
+
return;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
e.preventDefault();
|
|
304
|
+
preserveListScroll(() => {
|
|
305
|
+
tableContext.moveColumnTo(currentIndex, targetIndex);
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
</script>
|
|
309
|
+
|
|
310
|
+
{#if columnDef}
|
|
311
|
+
{@const reorderLabel = typeof columnDef.header === 'string' ? columnDef.header : columnDef.id}
|
|
312
|
+
<li
|
|
313
|
+
bind:this={rowEl}
|
|
314
|
+
class="single-column"
|
|
315
|
+
class:targeted={isBeingTargeted}
|
|
316
|
+
class:draggable={tableContext.allowColumnReordering}
|
|
317
|
+
id="{tableContext.tableName}-column-settings-{columnDef.id}"
|
|
318
|
+
draggable={tableContext.allowColumnReordering}
|
|
319
|
+
onkeydown={onRowKeydown}
|
|
320
|
+
{@attach (node: HTMLLIElement) => {
|
|
321
|
+
// Capture-phase listeners for `mousedown` and
|
|
322
|
+
// `pointerdown`. Both must fire BEFORE the synthetic
|
|
323
|
+
// click on the visibility / pin checkbox focuses its
|
|
324
|
+
// hidden input (which is what causes the browser to
|
|
325
|
+
// auto-scroll the column list to bring that input's
|
|
326
|
+
// 1x1px clip-pathed box into view). Capture phase runs
|
|
327
|
+
// before target / bubble phases, so this listener
|
|
328
|
+
// reliably snapshots the user's actual pre-click scroll
|
|
329
|
+
// position before any focus side effect lands.
|
|
330
|
+
//
|
|
331
|
+
// Both event types are wired because some browsers
|
|
332
|
+
// dispatch `pointerdown` before `mousedown` and others
|
|
333
|
+
// the reverse; whichever fires first wins (the second
|
|
334
|
+
// is a cheap no-op snapshot of the same state).
|
|
335
|
+
const snapshot = (): void => {
|
|
336
|
+
snapshotScrollPosition();
|
|
337
|
+
};
|
|
338
|
+
node.addEventListener('pointerdown', snapshot, { capture: true });
|
|
339
|
+
node.addEventListener('mousedown', snapshot, { capture: true });
|
|
340
|
+
return () => {
|
|
341
|
+
node.removeEventListener('pointerdown', snapshot, { capture: true });
|
|
342
|
+
node.removeEventListener('mousedown', snapshot, { capture: true });
|
|
343
|
+
};
|
|
344
|
+
}}
|
|
345
|
+
ondragstart={() => {
|
|
346
|
+
tableContext.dragTarget = columnDef;
|
|
347
|
+
}}
|
|
348
|
+
ondragend={disableDragVisual}
|
|
349
|
+
ondragover={(e) => {
|
|
350
|
+
e.preventDefault();
|
|
351
|
+
if (tableContext.dragTarget?.id !== columnDef.id) {
|
|
352
|
+
isBeingTargeted = true;
|
|
353
|
+
}
|
|
354
|
+
}}
|
|
355
|
+
ondragleave={disableDragVisual}
|
|
356
|
+
ondrop={disableDragVisual}
|
|
357
|
+
>
|
|
358
|
+
<div class="visibility-wrapper">
|
|
359
|
+
<Checkbox
|
|
360
|
+
icon={{ name: 'assessment', size: Size.Medium }}
|
|
361
|
+
size={Size.FillWidth}
|
|
362
|
+
id={`is-visible-${tableContext.tableName}-${columnDef.id}`}
|
|
363
|
+
value={tableContext.columnVisibility[columnDef.id] !== false}
|
|
364
|
+
onchange={onVisibilityChange}
|
|
365
|
+
/>
|
|
366
|
+
</div>
|
|
367
|
+
|
|
368
|
+
{#if tableContext.allowColumnReordering}
|
|
369
|
+
<!--
|
|
370
|
+
Tri-state pin selector rendered via `ThreeStateRadio`,
|
|
371
|
+
matching the visual segmented-control used elsewhere in
|
|
372
|
+
the table (filter Active state, etc.). The three
|
|
373
|
+
`Ternary` slots map to:
|
|
374
|
+
False → pinned LEFT (pin-left icon, leftmost)
|
|
375
|
+
Neutral → unpinned (circle-cross icon, middle)
|
|
376
|
+
True → pinned RIGHT (pin-right icon, rightmost)
|
|
377
|
+
Expand columns can never be pinned, so the group goes
|
|
378
|
+
fully disabled for them.
|
|
379
|
+
-->
|
|
380
|
+
<div
|
|
381
|
+
class="pin-selector"
|
|
382
|
+
class:disabled={isExpandColumn}
|
|
383
|
+
>
|
|
384
|
+
<ThreeStateRadio
|
|
385
|
+
value={pinSide}
|
|
386
|
+
disabled={isExpandColumn}
|
|
387
|
+
noLabel="Pin to left"
|
|
388
|
+
neutralLabel="Unpinned"
|
|
389
|
+
yesLabel="Pin to right"
|
|
390
|
+
noIcon={{ name: 'pin-left', size: Size.Medium }}
|
|
391
|
+
neutralIcon={{ name: 'circle-cross', size: Size.Medium }}
|
|
392
|
+
yesIcon={{ name: 'pin-right', size: Size.Medium }}
|
|
393
|
+
onchange={(next: Ternary) => {
|
|
394
|
+
setPin(next);
|
|
395
|
+
}}
|
|
396
|
+
/>
|
|
397
|
+
</div>
|
|
398
|
+
{/if}
|
|
399
|
+
|
|
400
|
+
<span class="column-label">
|
|
401
|
+
{#if typeof columnDef.header === 'function'}
|
|
402
|
+
<!-- FIXME this needs testing -->
|
|
403
|
+
{@render columnDef.header()}
|
|
404
|
+
{:else}
|
|
405
|
+
{columnDef.header}
|
|
406
|
+
{/if}
|
|
407
|
+
</span>
|
|
408
|
+
|
|
409
|
+
{#if tableContext.allowColumnReordering}
|
|
410
|
+
<!--
|
|
411
|
+
Up / down "move" buttons make column reordering
|
|
412
|
+
discoverable without relying on the user noticing a
|
|
413
|
+
drag-cursor. The row remains draggable too (whole row
|
|
414
|
+
is the drag target now that the dedicated handle is
|
|
415
|
+
gone), so power users keep the drag-and-drop path.
|
|
416
|
+
Buttons disable at the list boundaries so we never
|
|
417
|
+
dispatch a no-op `moveColumnTo`.
|
|
418
|
+
-->
|
|
419
|
+
<div class="reorder-buttons">
|
|
420
|
+
<Action
|
|
421
|
+
icon={{ name: 'chevron-up', size: Size.Medium }}
|
|
422
|
+
size={Size.Medium}
|
|
423
|
+
paddingSize={Size.Small}
|
|
424
|
+
label="Move {reorderLabel} up"
|
|
425
|
+
disabled={isAtTop}
|
|
426
|
+
onclick={moveUp}
|
|
427
|
+
/>
|
|
428
|
+
<Action
|
|
429
|
+
icon={{ name: 'chevron-down', size: Size.Medium }}
|
|
430
|
+
size={Size.Medium}
|
|
431
|
+
paddingSize={Size.Small}
|
|
432
|
+
label="Move {reorderLabel} down"
|
|
433
|
+
disabled={isAtBottom}
|
|
434
|
+
onclick={moveDown}
|
|
435
|
+
/>
|
|
436
|
+
</div>
|
|
437
|
+
{/if}
|
|
438
|
+
</li>
|
|
439
|
+
{:else}
|
|
440
|
+
<li
|
|
441
|
+
id="{tableContext.tableName}-column-settings-top-anchor"
|
|
442
|
+
class="single-column anchor"
|
|
443
|
+
class:targeted={isBeingTargeted}
|
|
444
|
+
ondragover={(e) => {
|
|
445
|
+
e.preventDefault();
|
|
446
|
+
|
|
447
|
+
if (tableContext.dragTarget?.id !== undefined) {
|
|
448
|
+
isBeingTargeted = true;
|
|
449
|
+
}
|
|
450
|
+
}}
|
|
451
|
+
ondragleave={disableDragVisual}
|
|
452
|
+
ondrop={disableDragVisual}
|
|
453
|
+
></li>
|
|
454
|
+
{/if}
|
|
455
|
+
|
|
179
456
|
<style>li {
|
|
180
457
|
box-sizing: border-box;
|
|
181
458
|
}
|
|
@@ -186,9 +463,65 @@ li.targeted {
|
|
|
186
463
|
border-bottom: solid 2px #259fc7;
|
|
187
464
|
}
|
|
188
465
|
|
|
189
|
-
li.single-column {
|
|
466
|
+
li.single-column:not(.anchor) {
|
|
467
|
+
display: flex;
|
|
468
|
+
gap: 0.75rem;
|
|
469
|
+
padding: 0.5rem 0.75rem;
|
|
470
|
+
margin-bottom: 0.5rem;
|
|
471
|
+
align-items: center;
|
|
472
|
+
background-color: #ffffff;
|
|
473
|
+
border: solid 1px #cbd4da;
|
|
474
|
+
border-radius: 4px;
|
|
475
|
+
position: relative;
|
|
476
|
+
}
|
|
477
|
+
li.single-column:not(.anchor).draggable {
|
|
478
|
+
cursor: grab;
|
|
479
|
+
}
|
|
480
|
+
li.single-column:not(.anchor).targeted {
|
|
481
|
+
border-color: #259fc7;
|
|
482
|
+
border-bottom-width: 2px;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
li.single-column:not(.anchor):last-of-type {
|
|
486
|
+
margin-bottom: 0;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
.visibility-wrapper {
|
|
490
|
+
width: 3rem;
|
|
491
|
+
height: 3rem;
|
|
492
|
+
display: flex;
|
|
493
|
+
flex-shrink: 0;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
.pin-selector {
|
|
497
|
+
--input-height: 3rem;
|
|
498
|
+
--input-width: auto;
|
|
499
|
+
flex-shrink: 0;
|
|
500
|
+
display: flex;
|
|
501
|
+
flex-flow: row nowrap;
|
|
502
|
+
align-items: center;
|
|
503
|
+
}
|
|
504
|
+
.pin-selector.disabled {
|
|
505
|
+
opacity: 0.5;
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
.column-label {
|
|
509
|
+
flex: 1 1 auto;
|
|
510
|
+
min-width: 0;
|
|
511
|
+
overflow: hidden;
|
|
512
|
+
text-overflow: ellipsis;
|
|
513
|
+
white-space: nowrap;
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
.reorder-buttons {
|
|
517
|
+
flex-shrink: 0;
|
|
190
518
|
display: flex;
|
|
191
|
-
|
|
192
|
-
padding: 0.5rem 0.5rem;
|
|
519
|
+
flex-flow: column nowrap;
|
|
193
520
|
align-items: center;
|
|
194
|
-
|
|
521
|
+
gap: 0.125rem;
|
|
522
|
+
}
|
|
523
|
+
.reorder-buttons :global(button[disabled]) {
|
|
524
|
+
--colour: #1f81a0;
|
|
525
|
+
color: #1f81a0;
|
|
526
|
+
background-color: transparent;
|
|
527
|
+
}</style>
|