@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
|
@@ -2,6 +2,15 @@ import type { SortingState } from '../../DataRepository/SortingState.js';
|
|
|
2
2
|
import type { ColumnPinningState } from '../ColumnPinningState.js';
|
|
3
3
|
import type { VisibilityState } from '../VisibilityState.js';
|
|
4
4
|
import type { ColumnDef } from './ColumnDef.svelte.js';
|
|
5
|
+
/**
|
|
6
|
+
* A named runtime preset: a snapshot of the column-defs array plus the
|
|
7
|
+
* sort / visibility / pinning state to apply when the preset is loaded.
|
|
8
|
+
* Used by the column-preset dropdown for save/load.
|
|
9
|
+
*
|
|
10
|
+
* The serialised mirror is `JSONColumnDefSet` (substitutes
|
|
11
|
+
* `JSONColumnPinningState` for `ColumnPinningState` and
|
|
12
|
+
* `Array<ColumnJSONRepresentation>` for `Array<ColumnDef<T>>`).
|
|
13
|
+
*/
|
|
5
14
|
export interface ColumnDefSet<T extends object> {
|
|
6
15
|
name: string;
|
|
7
16
|
sortingState: SortingState;
|
package/dist/Components/Table/Types/Columns/Definitions/Display/AbstractDisplayDef.svelte.d.ts
CHANGED
|
@@ -2,18 +2,58 @@ import type { Component } from 'svelte';
|
|
|
2
2
|
import type { DisplayType } from '../../DisplayType.js';
|
|
3
3
|
import type { TableCell } from '../../TableCell.js';
|
|
4
4
|
import { ColumnDef, type ColumnDefProps } from '../ColumnDef.svelte.js';
|
|
5
|
+
/**
|
|
6
|
+
* Props passed to the modal a display column may open.
|
|
7
|
+
*
|
|
8
|
+
* - `cell`: the source cell, used to read row context and the row value.
|
|
9
|
+
* - `onclose`: invoked when the user dismisses without committing.
|
|
10
|
+
* - `onsubmit`: invoked when the user commits.
|
|
11
|
+
*
|
|
12
|
+
* Note: neither callback carries a payload today (engineering F-secondary);
|
|
13
|
+
* callers persist any state through the cell's row reference.
|
|
14
|
+
*/
|
|
5
15
|
export interface DisplayDefModalProps<T extends object, in FilterValueType = never, out FilterOptionsType = unknown> {
|
|
16
|
+
/** The source cell. */
|
|
6
17
|
cell: TableCell<T, FilterValueType, FilterOptionsType>;
|
|
18
|
+
/** Invoked on dismissal without commit. */
|
|
7
19
|
onclose: () => void;
|
|
20
|
+
/** Invoked on commit. */
|
|
8
21
|
onsubmit: () => void;
|
|
9
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Construction-time props for every `AbstractDisplayDef` subclass.
|
|
25
|
+
*
|
|
26
|
+
* Note: `modal` is typed with `Component<any, any, any>` because the
|
|
27
|
+
* dynamic-dispatch site cannot statically know the consumer's full
|
|
28
|
+
* exports / events / slots triple. The narrowing is delegated to the
|
|
29
|
+
* caller via `DisplayDefModalProps`.
|
|
30
|
+
*/
|
|
10
31
|
export interface AbstractDisplayDefProps<T extends object, in FilterFnType, out FilterOptionsType> extends ColumnDefProps<T, FilterFnType, FilterOptionsType> {
|
|
32
|
+
/** Optional Svelte component opened as a modal from the cell. The
|
|
33
|
+
* `any` triple is intentional: see class JSDoc. */
|
|
11
34
|
modal?: Component<any, any, any>;
|
|
12
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* `AbstractDisplayDef<T, FilterValueType, FilterOptionsType>` is the
|
|
38
|
+
* shared base for display-only columns (Bubble, Display, ProgressBar,
|
|
39
|
+
* Validity). Each subclass pins `columnType = ColumnType.Display` and
|
|
40
|
+
* further narrows the `displayType` inner discriminator.
|
|
41
|
+
*
|
|
42
|
+
* @remarks
|
|
43
|
+
*
|
|
44
|
+
* `modal` is `Component<any, any, any>` rather than a narrower generic
|
|
45
|
+
* because the consumer-supplied modal component declares its own
|
|
46
|
+
* exports / events / slots and the cell dispatch site cannot statically
|
|
47
|
+
* know the full triple. Callers should accept `DisplayDefModalProps`
|
|
48
|
+
* as props and ignore the slot / event channels.
|
|
49
|
+
*/
|
|
13
50
|
export declare abstract class AbstractDisplayDef<T extends object, in FilterValueType = never, out FilterOptionsType = unknown> extends ColumnDef<T, FilterValueType, FilterOptionsType> {
|
|
51
|
+
/** Inner discriminator literal narrowed by each leaf subclass. */
|
|
14
52
|
abstract readonly displayType: DisplayType;
|
|
15
53
|
constructor(props: AbstractDisplayDefProps<T, FilterValueType, FilterOptionsType>);
|
|
54
|
+
/** Discriminator literal pinning every display column to `Display`. */
|
|
16
55
|
readonly columnType: "Display";
|
|
17
|
-
|
|
56
|
+
/** Optional Svelte component opened as a modal from the cell. */
|
|
57
|
+
readonly modal: // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
18
58
|
Component<DisplayDefModalProps<T>, any, any> | undefined;
|
|
19
59
|
}
|
package/dist/Components/Table/Types/Columns/Definitions/Display/AbstractDisplayDef.svelte.js
CHANGED
|
@@ -1,10 +1,26 @@
|
|
|
1
1
|
import { ColumnType } from '../../ColumnType.js';
|
|
2
2
|
import { ColumnDef } from '../ColumnDef.svelte.js';
|
|
3
|
+
/**
|
|
4
|
+
* `AbstractDisplayDef<T, FilterValueType, FilterOptionsType>` is the
|
|
5
|
+
* shared base for display-only columns (Bubble, Display, ProgressBar,
|
|
6
|
+
* Validity). Each subclass pins `columnType = ColumnType.Display` and
|
|
7
|
+
* further narrows the `displayType` inner discriminator.
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
*
|
|
11
|
+
* `modal` is `Component<any, any, any>` rather than a narrower generic
|
|
12
|
+
* because the consumer-supplied modal component declares its own
|
|
13
|
+
* exports / events / slots and the cell dispatch site cannot statically
|
|
14
|
+
* know the full triple. Callers should accept `DisplayDefModalProps`
|
|
15
|
+
* as props and ignore the slot / event channels.
|
|
16
|
+
*/
|
|
3
17
|
export class AbstractDisplayDef extends ColumnDef {
|
|
4
18
|
constructor(props) {
|
|
5
19
|
super(props);
|
|
6
20
|
this.modal = $derived(props.modal);
|
|
7
21
|
}
|
|
22
|
+
/** Discriminator literal pinning every display column to `Display`. */
|
|
8
23
|
columnType = ColumnType.Display;
|
|
24
|
+
/** Optional Svelte component opened as a modal from the cell. */
|
|
9
25
|
modal;
|
|
10
26
|
}
|
|
@@ -1,14 +1,32 @@
|
|
|
1
1
|
import type { BubbleColour } from '../../../../../BubbleColour.js';
|
|
2
2
|
import type { FilterFn, StringFilterValueType } from '../../../Filtering/FilterFn.js';
|
|
3
3
|
import { AbstractDisplayDef, type AbstractDisplayDefProps } from './AbstractDisplayDef.svelte.js';
|
|
4
|
+
/**
|
|
5
|
+
* Construction-time props for `BubbleDef`.
|
|
6
|
+
*
|
|
7
|
+
* Notes:
|
|
8
|
+
* - `getColour` may return either a sync `BubbleColour` or an async
|
|
9
|
+
* `BubbleColour | null | undefined`. The asymmetric nullability is
|
|
10
|
+
* preserved for backwards compatibility; tracked in the workorder.
|
|
11
|
+
* - `value` is a string today (the rendered cell text); a future
|
|
12
|
+
* tightening could thread the column's `TValue`.
|
|
13
|
+
*/
|
|
4
14
|
export interface BubbleDefProps<T extends object, in FilterValueType, out FilterOptionsType> extends AbstractDisplayDefProps<T, FilterValueType, FilterOptionsType> {
|
|
15
|
+
/** Per-bubble colour mapper. Invoked per bubble value per render. */
|
|
5
16
|
getColour?: (item: T, index: number, value: string) => BubbleColour | Promise<BubbleColour | null | undefined>;
|
|
6
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* `BubbleDef<T, FilterValueType, FilterOptionsType>` renders the cell
|
|
20
|
+
* value as a row of coloured bubbles.
|
|
21
|
+
*/
|
|
7
22
|
export declare class BubbleDef<T extends object, in FilterValueType = StringFilterValueType, out FilterOptionsType = unknown> extends AbstractDisplayDef<T, FilterValueType, FilterOptionsType> {
|
|
23
|
+
/** Inner discriminator literal. */
|
|
8
24
|
readonly displayType: "Bubbles";
|
|
9
25
|
constructor(props: BubbleDefProps<T, FilterValueType, FilterOptionsType>);
|
|
10
26
|
private _filterFn;
|
|
27
|
+
/** Filter predicate. Reassignable. */
|
|
11
28
|
get filterFn(): FilterFn<T, FilterValueType> | undefined;
|
|
12
29
|
set filterFn(v: FilterFn<T, FilterValueType> | undefined);
|
|
13
|
-
|
|
30
|
+
/** Per-bubble colour mapper. */
|
|
31
|
+
readonly getColour: ((item: T, index: number, value: string) => BubbleColour | Promise<BubbleColour | null | undefined>) | undefined;
|
|
14
32
|
}
|
|
@@ -1,18 +1,29 @@
|
|
|
1
|
+
import { memoiseRowValueAccessor } from '../../../../../../Helpers/memoiseByRow.js';
|
|
1
2
|
import { DisplayType } from '../../DisplayType.js';
|
|
2
3
|
import { AbstractDisplayDef } from './AbstractDisplayDef.svelte.js';
|
|
4
|
+
/**
|
|
5
|
+
* `BubbleDef<T, FilterValueType, FilterOptionsType>` renders the cell
|
|
6
|
+
* value as a row of coloured bubbles.
|
|
7
|
+
*/
|
|
3
8
|
export class BubbleDef extends AbstractDisplayDef {
|
|
9
|
+
/** Inner discriminator literal. */
|
|
4
10
|
displayType = DisplayType.Bubbles;
|
|
5
11
|
constructor(props) {
|
|
6
12
|
super(props);
|
|
7
|
-
|
|
13
|
+
// Wrap user callback in a row-keyed WeakMap cache so 1000-row renders
|
|
14
|
+
// invoke the user fn at most once per (row, value) pair. Reassigning
|
|
15
|
+
// props.getColour re-derives the wrapper and discards the stale cache.
|
|
16
|
+
this.getColour = $derived(memoiseRowValueAccessor(props.getColour));
|
|
8
17
|
this._filterFn = $state(props.filterFn);
|
|
9
18
|
}
|
|
10
19
|
_filterFn;
|
|
20
|
+
/** Filter predicate. Reassignable. */
|
|
11
21
|
get filterFn() {
|
|
12
22
|
return this._filterFn;
|
|
13
23
|
}
|
|
14
24
|
set filterFn(v) {
|
|
15
25
|
this._filterFn = v;
|
|
16
26
|
}
|
|
27
|
+
/** Per-bubble colour mapper. */
|
|
17
28
|
getColour;
|
|
18
29
|
}
|
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
import type { FilterFn } from '../../../Filtering/FilterFn.js';
|
|
2
2
|
import { DisplayType } from '../../DisplayType.js';
|
|
3
3
|
import { AbstractDisplayDef, type AbstractDisplayDefProps } from './AbstractDisplayDef.svelte.js';
|
|
4
|
+
/**
|
|
5
|
+
* Construction-time props for `DisplayDef`. The interface adds no
|
|
6
|
+
* fields over `AbstractDisplayDefProps`; it exists so future
|
|
7
|
+
* display-specific props can be added without a breaking-change rename.
|
|
8
|
+
*/
|
|
4
9
|
export interface DisplayDefProps<T extends object, in FilterValueType, out FilterOptionsType> extends AbstractDisplayDefProps<T, FilterValueType, FilterOptionsType> {
|
|
5
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* `DisplayDef<T, FilterValueType, FilterOptionsType>` renders the cell
|
|
13
|
+
* value as plain text. The default display kind for non-input columns.
|
|
14
|
+
*/
|
|
6
15
|
export declare class DisplayDef<T extends object, in FilterValueType, out FilterOptionsType> extends AbstractDisplayDef<T, FilterValueType, FilterOptionsType> {
|
|
16
|
+
/** Inner discriminator literal. */
|
|
7
17
|
readonly displayType: DisplayType;
|
|
8
18
|
constructor(props: DisplayDefProps<T, FilterValueType, FilterOptionsType>);
|
|
9
19
|
private _filterFn;
|
|
20
|
+
/** Filter predicate. Reassignable. */
|
|
10
21
|
get filterFn(): FilterFn<T, FilterValueType> | undefined;
|
|
11
22
|
set filterFn(v: FilterFn<T, FilterValueType> | undefined);
|
|
12
23
|
}
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import { DisplayType } from '../../DisplayType.js';
|
|
2
2
|
import { AbstractDisplayDef } from './AbstractDisplayDef.svelte.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
/**
|
|
4
|
+
* `DisplayDef<T, FilterValueType, FilterOptionsType>` renders the cell
|
|
5
|
+
* value as plain text. The default display kind for non-input columns.
|
|
6
|
+
*/
|
|
6
7
|
export class DisplayDef extends AbstractDisplayDef {
|
|
8
|
+
/** Inner discriminator literal. */
|
|
7
9
|
displayType = DisplayType.Normal;
|
|
8
10
|
constructor(props) {
|
|
9
11
|
super(props);
|
|
10
12
|
this._filterFn = $state(props.filterFn);
|
|
11
13
|
}
|
|
12
14
|
_filterFn;
|
|
15
|
+
/** Filter predicate. Reassignable. */
|
|
13
16
|
get filterFn() {
|
|
14
17
|
return this._filterFn;
|
|
15
18
|
}
|
|
@@ -1,14 +1,33 @@
|
|
|
1
1
|
import type { BubbleColour } from '../../../../../BubbleColour.js';
|
|
2
2
|
import type { FilterFn, NumberFilterValueType } from '../../../Filtering/FilterFn.js';
|
|
3
3
|
import { AbstractDisplayDef, type AbstractDisplayDefProps } from './AbstractDisplayDef.svelte.js';
|
|
4
|
+
/**
|
|
5
|
+
* Construction-time props for `ProgressBarDef`.
|
|
6
|
+
*
|
|
7
|
+
* Notes:
|
|
8
|
+
* - `getColour` is required. The return type is
|
|
9
|
+
* `BubbleColour | Promise<BubbleColour> | undefined`; the
|
|
10
|
+
* `| undefined` slot was historically inside the Promise and is
|
|
11
|
+
* preserved verbatim. Tracked in the workorder.
|
|
12
|
+
* - `value: [number, number]` represents `[current, total]`; the
|
|
13
|
+
* column data shape is not yet connected to this tuple.
|
|
14
|
+
*/
|
|
4
15
|
export interface ProgressBarDefProps<T extends object, in FilterValueType, out FilterOptionsType> extends AbstractDisplayDefProps<T, FilterValueType, FilterOptionsType> {
|
|
16
|
+
/** Required. Per-cell colour mapper given the `[current, total]` tuple. */
|
|
5
17
|
getColour: (item: T, index: number, value: [number, number]) => BubbleColour | Promise<BubbleColour> | undefined;
|
|
6
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* `ProgressBarDef<T, FilterValueType, FilterOptionsType>` renders the
|
|
21
|
+
* cell value as a horizontal progress bar.
|
|
22
|
+
*/
|
|
7
23
|
export declare class ProgressBarDef<T extends object, in FilterValueType = NumberFilterValueType, out FilterOptionsType = unknown> extends AbstractDisplayDef<T, FilterValueType, FilterOptionsType> {
|
|
24
|
+
/** Inner discriminator literal. */
|
|
8
25
|
readonly displayType: "Progress";
|
|
9
26
|
constructor(props: ProgressBarDefProps<T, FilterValueType, FilterOptionsType>);
|
|
27
|
+
/** Per-cell colour mapper. */
|
|
10
28
|
readonly getColour: (item: T, index: number, value: [number, number]) => BubbleColour | Promise<BubbleColour> | undefined;
|
|
11
29
|
private _filterFn;
|
|
30
|
+
/** Filter predicate. Reassignable. */
|
|
12
31
|
get filterFn(): FilterFn<T, FilterValueType> | undefined;
|
|
13
32
|
set filterFn(v: FilterFn<T, FilterValueType> | undefined);
|
|
14
33
|
}
|
|
@@ -1,14 +1,38 @@
|
|
|
1
1
|
import { DisplayType } from '../../DisplayType.js';
|
|
2
2
|
import { AbstractDisplayDef } from './AbstractDisplayDef.svelte.js';
|
|
3
|
+
/**
|
|
4
|
+
* `ProgressBarDef<T, FilterValueType, FilterOptionsType>` renders the
|
|
5
|
+
* cell value as a horizontal progress bar.
|
|
6
|
+
*/
|
|
3
7
|
export class ProgressBarDef extends AbstractDisplayDef {
|
|
8
|
+
/** Inner discriminator literal. */
|
|
4
9
|
displayType = DisplayType.Progress;
|
|
5
10
|
constructor(props) {
|
|
6
11
|
super(props);
|
|
7
|
-
|
|
12
|
+
// Row-keyed WeakMap cache. The `[done, total]` tuple is row-derived,
|
|
13
|
+
// so row identity alone is sufficient as the cache key (the same row
|
|
14
|
+
// will always be queried with the same logical tuple within a render).
|
|
15
|
+
// Reassigning props.getColour re-derives the wrapper, which constructs
|
|
16
|
+
// a fresh WeakMap and discards the stale cache.
|
|
17
|
+
this.getColour = $derived.by(() => {
|
|
18
|
+
const raw = props.getColour;
|
|
19
|
+
const cache = new WeakMap();
|
|
20
|
+
return (item, index, value) => {
|
|
21
|
+
const hit = cache.get(item);
|
|
22
|
+
if (hit !== undefined || cache.has(item)) {
|
|
23
|
+
return hit;
|
|
24
|
+
}
|
|
25
|
+
const result = raw(item, index, value);
|
|
26
|
+
cache.set(item, result);
|
|
27
|
+
return result;
|
|
28
|
+
};
|
|
29
|
+
});
|
|
8
30
|
this._filterFn = $state(props.filterFn);
|
|
9
31
|
}
|
|
32
|
+
/** Per-cell colour mapper. */
|
|
10
33
|
getColour;
|
|
11
34
|
_filterFn;
|
|
35
|
+
/** Filter predicate. Reassignable. */
|
|
12
36
|
get filterFn() {
|
|
13
37
|
return this._filterFn;
|
|
14
38
|
}
|
|
@@ -1,11 +1,37 @@
|
|
|
1
1
|
import type { ValidationFn } from '../ValidationFn.js';
|
|
2
2
|
import { AbstractDisplayDef, type AbstractDisplayDefProps } from './AbstractDisplayDef.svelte.js';
|
|
3
|
+
/**
|
|
4
|
+
* Construction-time props for `ValidityDef`. `isValid` is required
|
|
5
|
+
* because the validity column has no other content; the rest of the
|
|
6
|
+
* shape mirrors `AbstractDisplayDefProps`.
|
|
7
|
+
*/
|
|
3
8
|
export interface ValidityDefProps<T extends object, in FilterValueType, out FilterOptionsType> extends AbstractDisplayDefProps<T, FilterValueType, FilterOptionsType> {
|
|
9
|
+
/** Required per-row validity predicate. */
|
|
4
10
|
isValid: ValidationFn<T>;
|
|
5
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* `ValidityDef<T, FilterValueType, FilterOptionsType>` renders the row
|
|
14
|
+
* validity as a status icon. Non-sortable and non-filterable.
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
*
|
|
18
|
+
* The class no longer mutates the incoming `props` object. Instead it
|
|
19
|
+
* spreads `props` and overrides the relevant flags when forwarding to
|
|
20
|
+
* `super(...)`. The original implementation mutated
|
|
21
|
+
* `props.allowSorting` / `props.allowFiltering` in place before calling
|
|
22
|
+
* `super`, which surprised callers who reused the same props object.
|
|
23
|
+
*
|
|
24
|
+
* The base class' `isValid` field is `ValidationFn<T> | undefined`;
|
|
25
|
+
* the subclass narrows the public type to required (`isValid` is
|
|
26
|
+
* mandatory on the subclass props) via the `declare` re-declaration
|
|
27
|
+
* below. The runtime assignment happens in the base constructor.
|
|
28
|
+
*/
|
|
6
29
|
export declare class ValidityDef<T extends object, in FilterValueType, out FilterOptionsType> extends AbstractDisplayDef<T, FilterValueType, FilterOptionsType> {
|
|
30
|
+
/** Inner discriminator literal. */
|
|
7
31
|
readonly displayType: "Validity";
|
|
8
32
|
constructor(props: ValidityDefProps<T, FilterValueType, FilterOptionsType>);
|
|
33
|
+
/** Validity columns are never filtered. */
|
|
9
34
|
readonly filterFn: undefined;
|
|
35
|
+
/** Required per-row validity predicate (narrowed from the base optional). */
|
|
10
36
|
readonly isValid: ValidationFn<T>;
|
|
11
37
|
}
|
|
@@ -1,13 +1,28 @@
|
|
|
1
1
|
import { DisplayType } from '../../DisplayType.js';
|
|
2
2
|
import { AbstractDisplayDef } from './AbstractDisplayDef.svelte.js';
|
|
3
|
+
/**
|
|
4
|
+
* `ValidityDef<T, FilterValueType, FilterOptionsType>` renders the row
|
|
5
|
+
* validity as a status icon. Non-sortable and non-filterable.
|
|
6
|
+
*
|
|
7
|
+
* @remarks
|
|
8
|
+
*
|
|
9
|
+
* The class no longer mutates the incoming `props` object. Instead it
|
|
10
|
+
* spreads `props` and overrides the relevant flags when forwarding to
|
|
11
|
+
* `super(...)`. The original implementation mutated
|
|
12
|
+
* `props.allowSorting` / `props.allowFiltering` in place before calling
|
|
13
|
+
* `super`, which surprised callers who reused the same props object.
|
|
14
|
+
*
|
|
15
|
+
* The base class' `isValid` field is `ValidationFn<T> | undefined`;
|
|
16
|
+
* the subclass narrows the public type to required (`isValid` is
|
|
17
|
+
* mandatory on the subclass props) via the `declare` re-declaration
|
|
18
|
+
* below. The runtime assignment happens in the base constructor.
|
|
19
|
+
*/
|
|
3
20
|
export class ValidityDef extends AbstractDisplayDef {
|
|
21
|
+
/** Inner discriminator literal. */
|
|
4
22
|
displayType = DisplayType.Validity;
|
|
5
23
|
constructor(props) {
|
|
6
|
-
props
|
|
7
|
-
props.allowFiltering = false;
|
|
8
|
-
super(props);
|
|
9
|
-
this.isValid = $derived(props.isValid);
|
|
24
|
+
super({ ...props, allowSorting: false, allowFiltering: false });
|
|
10
25
|
}
|
|
26
|
+
/** Validity columns are never filtered. */
|
|
11
27
|
filterFn = undefined;
|
|
12
|
-
isValid;
|
|
13
28
|
}
|
|
@@ -1,23 +1,59 @@
|
|
|
1
1
|
import type { IconProps } from '../../../../../IconProps.js';
|
|
2
|
+
import type { ScoriaStorageKey } from '../../../../../../Types/Internal/Misc.js';
|
|
2
3
|
import type { Primitive, TableInitOptions } from '../../../Context/TableInitOptions.js';
|
|
3
4
|
import type { DefsWrapper } from '../../DefsWrapper.js';
|
|
4
5
|
import { ColumnDef, type ColumnDefProps } from '../ColumnDef.svelte.js';
|
|
5
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Construction-time props for `ExpandDef`. The generic name
|
|
8
|
+
* `InnerIdType` (previously `InnterIdType` - typo) parameterises the
|
|
9
|
+
* inner table's row id.
|
|
10
|
+
*
|
|
11
|
+
* Notes:
|
|
12
|
+
* - `getInnerColumnDefs` and `accessorFn` are invoked per expansion;
|
|
13
|
+
* caching is the consumer's responsibility (tracked in perf workorder).
|
|
14
|
+
* - The class no longer mutates the incoming `props` object before
|
|
15
|
+
* calling `super`; the override is forwarded via a spread.
|
|
16
|
+
*/
|
|
17
|
+
export interface ExpandDefProps<T extends object, R extends object, InnerIdType extends Primitive = Primitive, in FilterValueType = unknown, out FilterOptionsType = unknown> extends ColumnDefProps<T, FilterValueType, FilterOptionsType> {
|
|
18
|
+
/** Per-row enable predicate for the expansion affordance. */
|
|
6
19
|
isEnabled: (item: T, index: number) => boolean | Promise<boolean>;
|
|
20
|
+
/** Builds the inner table's column defs. Invoked per expansion. */
|
|
7
21
|
getInnerColumnDefs: (item: T, index: number) => DefsWrapper<R>;
|
|
22
|
+
/** Header icon name on the expand-toggle button. */
|
|
8
23
|
headerIcon: IconProps['name'];
|
|
9
|
-
|
|
10
|
-
|
|
24
|
+
/** Display name of the inner table; surfaces in storage / a11y. */
|
|
25
|
+
innerTableName: ScoriaStorageKey;
|
|
26
|
+
/** Init options for the inner table. */
|
|
27
|
+
innerTableOptions: TableInitOptions<R, InnerIdType>;
|
|
28
|
+
/** Accessor returning the inner-row array for a given outer row. */
|
|
11
29
|
accessorFn: (item: T, index: number) => ReadonlyArray<R> | Promise<ReadonlyArray<R>>;
|
|
12
30
|
}
|
|
13
|
-
|
|
31
|
+
/**
|
|
32
|
+
* `ExpandDef<T, R, InnerIdType, FilterValueType, FilterOptionsType>` is
|
|
33
|
+
* a column whose cells expand to reveal an inner table.
|
|
34
|
+
*
|
|
35
|
+
* @remarks
|
|
36
|
+
*
|
|
37
|
+
* Non-sortable and non-filterable; the class spreads `props` with the
|
|
38
|
+
* relevant overrides when forwarding to `super(...)` rather than
|
|
39
|
+
* mutating the incoming props object.
|
|
40
|
+
*/
|
|
41
|
+
export declare class ExpandDef<T extends object, R extends object, InnerIdType extends Primitive = Primitive, in FilterValueType = unknown, out FilterOptionsType = unknown> extends ColumnDef<T, FilterValueType, FilterOptionsType> {
|
|
42
|
+
/** Discriminator literal. */
|
|
14
43
|
readonly columnType: "Expand";
|
|
15
|
-
constructor(props: ExpandDefProps<T, R,
|
|
44
|
+
constructor(props: ExpandDefProps<T, R, InnerIdType, FilterValueType, FilterOptionsType>);
|
|
45
|
+
/** Narrowed accessorFn: returns the inner-row array. */
|
|
16
46
|
readonly accessorFn: (item: T, index: number) => ReadonlyArray<R> | Promise<ReadonlyArray<R>>;
|
|
47
|
+
/** Expand columns are never filtered. */
|
|
17
48
|
readonly filterFn: undefined;
|
|
18
|
-
|
|
49
|
+
/** Display name of the inner table. */
|
|
50
|
+
readonly innerTableName: ScoriaStorageKey;
|
|
51
|
+
/** Builds the inner table's column defs. */
|
|
19
52
|
readonly getInnerColumnDefs: (item: T, index: number) => DefsWrapper<R>;
|
|
53
|
+
/** Header icon name on the expand-toggle button. */
|
|
20
54
|
readonly headerIcon: IconProps['name'];
|
|
55
|
+
/** Per-row enable predicate for the expansion affordance. */
|
|
21
56
|
readonly isEnabled: (item: T, index: number) => boolean | Promise<boolean>;
|
|
22
|
-
|
|
57
|
+
/** Init options for the inner table. */
|
|
58
|
+
readonly innerTableOptions: TableInitOptions<R, InnerIdType>;
|
|
23
59
|
}
|
|
@@ -1,21 +1,36 @@
|
|
|
1
1
|
import { ColumnType } from '../../ColumnType.js';
|
|
2
2
|
import { ColumnDef } from '../ColumnDef.svelte.js';
|
|
3
|
+
/**
|
|
4
|
+
* `ExpandDef<T, R, InnerIdType, FilterValueType, FilterOptionsType>` is
|
|
5
|
+
* a column whose cells expand to reveal an inner table.
|
|
6
|
+
*
|
|
7
|
+
* @remarks
|
|
8
|
+
*
|
|
9
|
+
* Non-sortable and non-filterable; the class spreads `props` with the
|
|
10
|
+
* relevant overrides when forwarding to `super(...)` rather than
|
|
11
|
+
* mutating the incoming props object.
|
|
12
|
+
*/
|
|
3
13
|
export class ExpandDef extends ColumnDef {
|
|
14
|
+
/** Discriminator literal. */
|
|
4
15
|
columnType = ColumnType.Expand;
|
|
5
16
|
constructor(props) {
|
|
6
|
-
props
|
|
7
|
-
props.allowSorting = false;
|
|
8
|
-
super(props);
|
|
17
|
+
super({ ...props, allowFiltering: false, allowSorting: false });
|
|
9
18
|
this.isEnabled = $derived(props.isEnabled);
|
|
10
19
|
this.headerIcon = $derived(props.headerIcon);
|
|
11
20
|
this.getInnerColumnDefs = $derived(props.getInnerColumnDefs);
|
|
12
21
|
this.innerTableName = $derived(props.innerTableName);
|
|
13
22
|
this.innerTableOptions = $derived(props.innerTableOptions);
|
|
14
23
|
}
|
|
24
|
+
/** Expand columns are never filtered. */
|
|
15
25
|
filterFn = undefined;
|
|
26
|
+
/** Display name of the inner table. */
|
|
16
27
|
innerTableName;
|
|
28
|
+
/** Builds the inner table's column defs. */
|
|
17
29
|
getInnerColumnDefs;
|
|
30
|
+
/** Header icon name on the expand-toggle button. */
|
|
18
31
|
headerIcon;
|
|
32
|
+
/** Per-row enable predicate for the expansion affordance. */
|
|
19
33
|
isEnabled;
|
|
34
|
+
/** Init options for the inner table. */
|
|
20
35
|
innerTableOptions;
|
|
21
36
|
}
|
package/dist/Components/Table/Types/Columns/Definitions/FilterOnly/FilterOnlyDef.svelte.d.ts
CHANGED
|
@@ -1,10 +1,24 @@
|
|
|
1
1
|
import type { FilterFn } from '../../../Filtering/FilterFn.js';
|
|
2
|
-
import { ColumnType } from '../../ColumnType.js';
|
|
3
2
|
import { ColumnDef, type ColumnDefProps } from '../ColumnDef.svelte.js';
|
|
4
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Construction-time props for `FilterOnlyDef`. Adds no fields over
|
|
5
|
+
* `ColumnDefProps`; the marker exists so future filter-only-specific
|
|
6
|
+
* props can be added without a breaking-change rename.
|
|
7
|
+
*/
|
|
8
|
+
export interface FilterOnlyDefProps<T extends object, in FilterFnType = unknown, out FilterOptionsType = unknown> extends ColumnDefProps<T, FilterFnType, FilterOptionsType> {
|
|
5
9
|
}
|
|
6
|
-
|
|
10
|
+
/**
|
|
11
|
+
* `FilterOnlyDef<T, FilterFnType, FilterOptionsType>` is a column that
|
|
12
|
+
* participates in filtering but never renders a body cell. Used to
|
|
13
|
+
* surface a filter input in the filter panel without occupying a body
|
|
14
|
+
* slot.
|
|
15
|
+
*/
|
|
16
|
+
export declare class FilterOnlyDef<T extends object, in FilterFnType = unknown, out FilterOptionsType = unknown> extends ColumnDef<T, FilterFnType, FilterOptionsType> {
|
|
7
17
|
constructor(props: FilterOnlyDefProps<T, FilterFnType, FilterOptionsType>);
|
|
8
|
-
|
|
9
|
-
readonly
|
|
18
|
+
/** Discriminator literal. */
|
|
19
|
+
readonly columnType: "Filter Only";
|
|
20
|
+
private _filterFn;
|
|
21
|
+
/** Filter predicate. Reassignable; properly initialised from props. */
|
|
22
|
+
get filterFn(): FilterFn<T, FilterFnType> | undefined;
|
|
23
|
+
set filterFn(v: FilterFn<T, FilterFnType> | undefined);
|
|
10
24
|
}
|
|
@@ -1,13 +1,24 @@
|
|
|
1
1
|
import { ColumnType } from '../../ColumnType.js';
|
|
2
2
|
import { ColumnDef } from '../ColumnDef.svelte.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
/**
|
|
4
|
+
* `FilterOnlyDef<T, FilterFnType, FilterOptionsType>` is a column that
|
|
5
|
+
* participates in filtering but never renders a body cell. Used to
|
|
6
|
+
* surface a filter input in the filter panel without occupying a body
|
|
7
|
+
* slot.
|
|
8
|
+
*/
|
|
7
9
|
export class FilterOnlyDef extends ColumnDef {
|
|
8
10
|
constructor(props) {
|
|
9
11
|
super(props);
|
|
12
|
+
this._filterFn = $state(props.filterFn);
|
|
10
13
|
}
|
|
14
|
+
/** Discriminator literal. */
|
|
11
15
|
columnType = ColumnType.FilterOnly;
|
|
12
|
-
|
|
16
|
+
_filterFn;
|
|
17
|
+
/** Filter predicate. Reassignable; properly initialised from props. */
|
|
18
|
+
get filterFn() {
|
|
19
|
+
return this._filterFn;
|
|
20
|
+
}
|
|
21
|
+
set filterFn(v) {
|
|
22
|
+
this._filterFn = v;
|
|
23
|
+
}
|
|
13
24
|
}
|
|
@@ -2,6 +2,20 @@ import type { SortingState } from '../../DataRepository/SortingState.js';
|
|
|
2
2
|
import type { JSONColumnPinningState } from '../JSONColumnPinningState.js';
|
|
3
3
|
import type { VisibilityState } from '../VisibilityState.js';
|
|
4
4
|
import type { ColumnJSONRepresentation } from './ColumnDef.svelte.js';
|
|
5
|
+
/**
|
|
6
|
+
* Persisted-to-localStorage projection of `ColumnDefSet`. Differs from the
|
|
7
|
+
* runtime form in that:
|
|
8
|
+
*
|
|
9
|
+
* - `columnPinningState` is `JSONColumnPinningState` (`Array<[id, width]>`)
|
|
10
|
+
* instead of `ReadonlyMap`-based for `JSON.stringify` round-tripping.
|
|
11
|
+
* - `columnDefs` carries the JSON representation of each `ColumnDef`
|
|
12
|
+
* (a `ColumnJSONRepresentation` produced by `toJSON()` on each def) rather
|
|
13
|
+
* than the live class instances.
|
|
14
|
+
*
|
|
15
|
+
* Security note: `JSONColumnDefSet` is read back from localStorage and must
|
|
16
|
+
* pass schema validation before being trusted. The validator helper is
|
|
17
|
+
* tracked under the StoragePresetSchemaValidation cross-cutting workorder.
|
|
18
|
+
*/
|
|
5
19
|
export interface JSONColumnDefSet {
|
|
6
20
|
name: string;
|
|
7
21
|
sortingState: SortingState;
|
package/dist/Components/Table/Types/Columns/Definitions/RowSelection/RowSelectionDef.svelte.d.ts
CHANGED
|
@@ -1,9 +1,41 @@
|
|
|
1
1
|
import type { BoolFilterValueType } from '../../../Filtering/FilterFn.js';
|
|
2
|
-
import { ColumnType } from '../../ColumnType.js';
|
|
3
2
|
import { ColumnDef, type ColumnDefProps } from '../ColumnDef.svelte.js';
|
|
3
|
+
/**
|
|
4
|
+
* Construction-time props for `RowSelectionDef`. Mirrors the
|
|
5
|
+
* named-args object shape used by every other `*Def` class so callers
|
|
6
|
+
* can construct it consistently. The legacy positional signature is
|
|
7
|
+
* retained as an overload for backwards compatibility.
|
|
8
|
+
*/
|
|
9
|
+
export interface RowSelectionDefProps<T extends object, FilterValueType = BoolFilterValueType, FilterOptionsType = undefined> {
|
|
10
|
+
/** Per-row predicate for whether the row may be selected. */
|
|
11
|
+
isSelectable: (item: T, index: number) => boolean | Promise<boolean>;
|
|
12
|
+
/** Optional row validity predicate. */
|
|
13
|
+
isValid?: ColumnDefProps<T, FilterValueType, FilterOptionsType>['isValid'];
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* `RowSelectionDef<T, FilterValueType, FilterOptionsType>` is the
|
|
17
|
+
* checkbox column that drives row selection. Non-sortable and
|
|
18
|
+
* non-filterable; the header reads `'Row Selected'` and the id is
|
|
19
|
+
* generated via `generateUUID` (UUIDv7).
|
|
20
|
+
*
|
|
21
|
+
* @remarks
|
|
22
|
+
*
|
|
23
|
+
* Two construction forms are supported:
|
|
24
|
+
*
|
|
25
|
+
* - `new RowSelectionDef(isSelectable, isValid?)` - legacy positional
|
|
26
|
+
* signature retained for backwards compatibility.
|
|
27
|
+
* - `new RowSelectionDef({ isSelectable, isValid })` - props-object
|
|
28
|
+
* signature parallel to every other `*Def` class.
|
|
29
|
+
*
|
|
30
|
+
* The positional form was the only outlier in the Def family;
|
|
31
|
+
* consumers are encouraged to migrate to the props-object form.
|
|
32
|
+
*/
|
|
4
33
|
export declare class RowSelectionDef<T extends object, in FilterValueType = BoolFilterValueType, out FilterOptionsType = undefined> extends ColumnDef<T, FilterValueType, FilterOptionsType> {
|
|
34
|
+
/** Discriminator literal. */
|
|
35
|
+
readonly columnType: "RowSelect";
|
|
5
36
|
readonly isSelectable: (item: T, index: number) => boolean | Promise<boolean>;
|
|
6
|
-
|
|
37
|
+
constructor(props: RowSelectionDefProps<T, FilterValueType, FilterOptionsType>);
|
|
7
38
|
constructor(isSelectable: (item: T, index: number) => boolean | Promise<boolean>, isValid?: ColumnDefProps<T, FilterValueType, FilterOptionsType>['isValid']);
|
|
39
|
+
/** Row-selection columns are never filtered. */
|
|
8
40
|
readonly filterFn: undefined;
|
|
9
41
|
}
|