@milaboratories/uikit 2.10.15 → 2.10.16
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/.oxfmtrc.json +4 -0
- package/.oxlintrc.json +3 -0
- package/.prettierrc +1 -1
- package/.turbo/turbo-build.log +190 -190
- package/.turbo/turbo-formatter$colon$check.log +12 -0
- package/.turbo/turbo-linter$colon$check.log +10 -0
- package/.turbo/{turbo-type-check.log → turbo-types$colon$check.log} +2 -2
- package/CHANGELOG.md +9 -0
- package/build.browser-lib.config.js +6 -6
- package/dist/base/BtnBase.vue.js.map +1 -1
- package/dist/colors/color.d.ts.map +1 -1
- package/dist/colors/color.js.map +1 -1
- package/dist/colors/gradient.d.ts.map +1 -1
- package/dist/colors/gradient.js.map +1 -1
- package/dist/colors/palette.js.map +1 -1
- package/dist/components/ContextProvider.vue.js.map +1 -1
- package/dist/components/DataTable/BaseCellComponent.vue.js.map +1 -1
- package/dist/components/DataTable/ColumnCaret.vue.js.map +1 -1
- package/dist/components/DataTable/ColumnsCommandMenu.vue.d.ts.map +1 -1
- package/dist/components/DataTable/ColumnsCommandMenu.vue.js.map +1 -1
- package/dist/components/DataTable/RowsCommandMenu.vue.d.ts.map +1 -1
- package/dist/components/DataTable/RowsCommandMenu.vue.js.map +1 -1
- package/dist/components/DataTable/TScroll.vue.d.ts.map +1 -1
- package/dist/components/DataTable/TScroll.vue.js +6 -1
- package/dist/components/DataTable/TScroll.vue.js.map +1 -1
- package/dist/components/DataTable/TableComponent.vue.d.ts.map +1 -1
- package/dist/components/DataTable/TableComponent.vue.js.map +1 -1
- package/dist/components/DataTable/TdCell.vue.d.ts.map +1 -1
- package/dist/components/DataTable/TdCell.vue.js +3 -1
- package/dist/components/DataTable/TdCell.vue.js.map +1 -1
- package/dist/components/DataTable/ThCell.vue.d.ts.map +1 -1
- package/dist/components/DataTable/ThCell.vue.js.map +1 -1
- package/dist/components/DataTable/TrBody.vue.d.ts.map +1 -1
- package/dist/components/DataTable/TrBody.vue.js.map +1 -1
- package/dist/components/DataTable/adapters/AsyncData.d.ts +1 -1
- package/dist/components/DataTable/adapters/AsyncData.js.map +1 -1
- package/dist/components/DataTable/adapters/RawData.d.ts +1 -1
- package/dist/components/DataTable/adapters/RawData.js.map +1 -1
- package/dist/components/DataTable/assets/TableIcon.vue.d.ts.map +1 -1
- package/dist/components/DataTable/assets/TableIcon.vue.js.map +1 -1
- package/dist/components/DataTable/composition/useColumn.d.ts.map +1 -1
- package/dist/components/DataTable/composition/useColumn.js.map +1 -1
- package/dist/components/DataTable/composition/useMouseUp.js.map +1 -1
- package/dist/components/DataTable/composition/useResize.js.map +1 -1
- package/dist/components/DataTable/composition/useTableColumns.js.map +1 -1
- package/dist/components/DataTable/composition/useTableRows.js.map +1 -1
- package/dist/components/DataTable/domain.d.ts +1 -1
- package/dist/components/DataTable/domain.d.ts.map +1 -1
- package/dist/components/DataTable/domain.js.map +1 -1
- package/dist/components/DataTable/index.d.ts +1 -1
- package/dist/components/DataTable/index.d.ts.map +1 -1
- package/dist/components/DataTable/index.js +5 -1
- package/dist/components/DataTable/index.js.map +1 -1
- package/dist/components/DataTable/keys.js.map +1 -1
- package/dist/components/DataTable/state.d.ts.map +1 -1
- package/dist/components/DataTable/state.js +10 -4
- package/dist/components/DataTable/state.js.map +1 -1
- package/dist/components/DataTable/types.d.ts +3 -3
- package/dist/components/DropdownListItem.vue.d.ts +1 -1
- package/dist/components/DropdownListItem.vue.d.ts.map +1 -1
- package/dist/components/DropdownListItem.vue.js.map +1 -1
- package/dist/components/GridTable/domain.d.ts +1 -1
- package/dist/components/GridTable/domain.d.ts.map +1 -1
- package/dist/components/GridTable/types.d.ts +4 -4
- package/dist/components/GridTable/types.d.ts.map +1 -1
- package/dist/components/GridTable/useColumn.d.ts.map +1 -1
- package/dist/components/HScroll.vue.js.map +1 -1
- package/dist/components/InputRange.vue.d.ts.map +1 -1
- package/dist/components/InputRange.vue.js +3 -1
- package/dist/components/InputRange.vue.js.map +1 -1
- package/dist/components/LongText.vue.d.ts.map +1 -1
- package/dist/components/LongText.vue.js +9 -7
- package/dist/components/LongText.vue.js.map +1 -1
- package/dist/components/PlAccordion/ExpandTransition.vue.d.ts.map +1 -1
- package/dist/components/PlAccordion/ExpandTransition.vue2.js.map +1 -1
- package/dist/components/PlAccordion/PlAccordion.vue.js.map +1 -1
- package/dist/components/PlAccordion/PlAccordionSection.vue2.js.map +1 -1
- package/dist/components/PlAlert/PlAlert.vue.d.ts.map +1 -1
- package/dist/components/PlAlert/PlAlert.vue.js.map +1 -1
- package/dist/components/PlAutocomplete/PlAutocomplete.vue.d.ts.map +1 -1
- package/dist/components/PlAutocomplete/PlAutocomplete.vue.js +40 -19
- package/dist/components/PlAutocomplete/PlAutocomplete.vue.js.map +1 -1
- package/dist/components/PlAutocompleteMulti/PlAutocompleteMulti.vue.d.ts +2 -2
- package/dist/components/PlAutocompleteMulti/PlAutocompleteMulti.vue.d.ts.map +1 -1
- package/dist/components/PlAutocompleteMulti/PlAutocompleteMulti.vue.js +22 -12
- package/dist/components/PlAutocompleteMulti/PlAutocompleteMulti.vue.js.map +1 -1
- package/dist/components/PlAutocompleteMulti/index.d.ts +1 -1
- package/dist/components/PlAutocompleteMulti/index.d.ts.map +1 -1
- package/dist/components/PlBtnAccent/PlBtnAccent.vue.js.map +1 -1
- package/dist/components/PlBtnDanger/PlBtnDanger.vue.js.map +1 -1
- package/dist/components/PlBtnGhost/PlBtnGhost.vue.js.map +1 -1
- package/dist/components/PlBtnGroup/PlBtnGroup.vue.js.map +1 -1
- package/dist/components/PlBtnLink/PlBtnLink.vue.d.ts.map +1 -1
- package/dist/components/PlBtnLink/PlBtnLink.vue.js.map +1 -1
- package/dist/components/PlBtnPrimary/PlBtnPrimary.vue.js.map +1 -1
- package/dist/components/PlBtnSecondary/PlBtnSecondary.vue.js.map +1 -1
- package/dist/components/PlBtnSplit/PlBtnSplit.vue.d.ts.map +1 -1
- package/dist/components/PlBtnSplit/PlBtnSplit.vue.js +6 -4
- package/dist/components/PlBtnSplit/PlBtnSplit.vue.js.map +1 -1
- package/dist/components/PlChartHistogram/PlChartHistogram.vue.d.ts.map +1 -1
- package/dist/components/PlChartHistogram/PlChartHistogram.vue2.js +8 -1
- package/dist/components/PlChartHistogram/PlChartHistogram.vue2.js.map +1 -1
- package/dist/components/PlChartHistogram/PlChartHistogram.vue3.js +4 -4
- package/dist/components/PlChartHistogram/createGridlines.d.ts.map +1 -1
- package/dist/components/PlChartHistogram/createGridlines.js +5 -1
- package/dist/components/PlChartHistogram/createGridlines.js.map +1 -1
- package/dist/components/PlChartHistogram/createLabels.d.ts.map +1 -1
- package/dist/components/PlChartHistogram/createLabels.js.map +1 -1
- package/dist/components/PlChartHistogram/createSvgContainer.js.map +1 -1
- package/dist/components/PlChartHistogram/drawBins.d.ts.map +1 -1
- package/dist/components/PlChartHistogram/drawBins.js.map +1 -1
- package/dist/components/PlChartHistogram/drawThreshold.js.map +1 -1
- package/dist/components/PlChartHistogram/histogram.d.ts.map +1 -1
- package/dist/components/PlChartHistogram/histogram.js +6 -2
- package/dist/components/PlChartHistogram/histogram.js.map +1 -1
- package/dist/components/PlChartHistogram/normalizeBins.js.map +1 -1
- package/dist/components/PlChartHistogram/types.d.ts +2 -2
- package/dist/components/PlChartHistogram/types.d.ts.map +1 -1
- package/dist/components/PlChartStackedBar/Legends.vue2.js.map +1 -1
- package/dist/components/PlChartStackedBar/PlChartStackedBar.vue.d.ts.map +1 -1
- package/dist/components/PlChartStackedBar/PlChartStackedBar.vue2.js +6 -4
- package/dist/components/PlChartStackedBar/PlChartStackedBar.vue2.js.map +1 -1
- package/dist/components/PlChartStackedBar/PlChartStackedBarCompact.vue2.js.map +1 -1
- package/dist/components/PlChartStackedBar/StackedRow.vue.d.ts.map +1 -1
- package/dist/components/PlChartStackedBar/StackedRow.vue2.js.map +1 -1
- package/dist/components/PlChartStackedBar/StackedRowCompact.vue.d.ts.map +1 -1
- package/dist/components/PlChartStackedBar/StackedRowCompact.vue2.js.map +1 -1
- package/dist/components/PlCheckbox/PlCheckbox.vue.js.map +1 -1
- package/dist/components/PlCheckbox/PlCheckboxBase.vue.d.ts.map +1 -1
- package/dist/components/PlCheckbox/PlCheckboxBase.vue.js.map +1 -1
- package/dist/components/PlCheckboxGroup/PlCheckboxGroup.vue.d.ts.map +1 -1
- package/dist/components/PlCheckboxGroup/PlCheckboxGroup.vue.js +8 -2
- package/dist/components/PlCheckboxGroup/PlCheckboxGroup.vue.js.map +1 -1
- package/dist/components/PlChip/PlChip.vue.d.ts.map +1 -1
- package/dist/components/PlChip/PlChip.vue.js.map +1 -1
- package/dist/components/PlClipboard/PlClipboard.vue2.js.map +1 -1
- package/dist/components/PlConfirmDialog.vue.d.ts.map +1 -1
- package/dist/components/PlConfirmDialog.vue.js.map +1 -1
- package/dist/components/PlDialogModal/PlDialogModal.vue.d.ts.map +1 -1
- package/dist/components/PlDialogModal/PlDialogModal.vue.js +4 -1
- package/dist/components/PlDialogModal/PlDialogModal.vue.js.map +1 -1
- package/dist/components/PlDropdown/OptionList.vue.d.ts +1 -1
- package/dist/components/PlDropdown/OptionList.vue.d.ts.map +1 -1
- package/dist/components/PlDropdown/OptionList.vue.js.map +1 -1
- package/dist/components/PlDropdown/PlDropdown.vue.d.ts.map +1 -1
- package/dist/components/PlDropdown/PlDropdown.vue.js.map +1 -1
- package/dist/components/PlDropdown/types.d.ts.map +1 -1
- package/dist/components/PlDropdown/useGroupBy.d.ts.map +1 -1
- package/dist/components/PlDropdown/useGroupBy.js.map +1 -1
- package/dist/components/PlDropdownLegacy/PlDropdownLegacy.vue.d.ts.map +1 -1
- package/dist/components/PlDropdownLegacy/PlDropdownLegacy.vue.js.map +1 -1
- package/dist/components/PlDropdownLine/PlDropdownLine.vue.d.ts +1 -1
- package/dist/components/PlDropdownLine/PlDropdownLine.vue.d.ts.map +1 -1
- package/dist/components/PlDropdownLine/PlDropdownLine.vue.js +5 -3
- package/dist/components/PlDropdownLine/PlDropdownLine.vue.js.map +1 -1
- package/dist/components/PlDropdownLine/ResizableInput.vue.d.ts.map +1 -1
- package/dist/components/PlDropdownLine/ResizableInput.vue.js.map +1 -1
- package/dist/components/PlDropdownMulti/PlDropdownMulti.vue.d.ts.map +1 -1
- package/dist/components/PlDropdownMulti/PlDropdownMulti.vue.js.map +1 -1
- package/dist/components/PlDropdownMultiRef/PlDropdownMultiRef.vue.js.map +1 -1
- package/dist/components/PlDropdownRef/PlDropdownRef.vue.js.map +1 -1
- package/dist/components/PlEditableTitle/PlEditableTitle.vue.d.ts.map +1 -1
- package/dist/components/PlEditableTitle/PlEditableTitle.vue.js.map +1 -1
- package/dist/components/PlElementList/PlElementList.vue.d.ts.map +1 -1
- package/dist/components/PlElementList/PlElementList.vue2.js +9 -2
- package/dist/components/PlElementList/PlElementList.vue2.js.map +1 -1
- package/dist/components/PlElementList/PlElementList.vue3.js +4 -4
- package/dist/components/PlElementList/PlElementListItem.vue.d.ts.map +1 -1
- package/dist/components/PlElementList/PlElementListItem.vue2.js +25 -13
- package/dist/components/PlElementList/PlElementListItem.vue2.js.map +1 -1
- package/dist/components/PlElementList/PlElementListItem.vue3.js +20 -20
- package/dist/components/PlElementList/utils.d.ts.map +1 -1
- package/dist/components/PlElementList/utils.js +3 -1
- package/dist/components/PlElementList/utils.js.map +1 -1
- package/dist/components/PlErrorAlert/PlErrorAlert.vue2.js.map +1 -1
- package/dist/components/PlErrorBoundary/PlErrorBoundary.vue.d.ts.map +1 -1
- package/dist/components/PlErrorBoundary/PlErrorBoundary.vue.js +4 -1
- package/dist/components/PlErrorBoundary/PlErrorBoundary.vue.js.map +1 -1
- package/dist/components/PlFileDialog/Local.vue.d.ts.map +1 -1
- package/dist/components/PlFileDialog/Local.vue.js +6 -2
- package/dist/components/PlFileDialog/Local.vue.js.map +1 -1
- package/dist/components/PlFileDialog/PlFileDialog.vue.d.ts.map +1 -1
- package/dist/components/PlFileDialog/PlFileDialog.vue.js +3 -1
- package/dist/components/PlFileDialog/PlFileDialog.vue.js.map +1 -1
- package/dist/components/PlFileDialog/Remote.vue.d.ts.map +1 -1
- package/dist/components/PlFileDialog/Remote.vue.js +6 -2
- package/dist/components/PlFileDialog/Remote.vue.js.map +1 -1
- package/dist/components/PlFileDialog/Shortcuts.vue2.js.map +1 -1
- package/dist/components/PlFileDialog/Shortcuts.vue3.js +4 -4
- package/dist/components/PlFileDialog/pl-file-dialog.module.scss.js +21 -21
- package/dist/components/PlFileDialog/remote.js.map +1 -1
- package/dist/components/PlFileDialog/utils.js.map +1 -1
- package/dist/components/PlFileInput/PlFileInput.vue.d.ts.map +1 -1
- package/dist/components/PlFileInput/PlFileInput.vue.js.map +1 -1
- package/dist/components/PlIcon16/PlIcon16.vue2.js.map +1 -1
- package/dist/components/PlIcon24/PlIcon24.vue2.js.map +1 -1
- package/dist/components/PlLoaderCircular/PlLoaderCircular.vue.d.ts +1 -1
- package/dist/components/PlLoaderCircular/PlLoaderCircular.vue.d.ts.map +1 -1
- package/dist/components/PlLoaderCircular/PlLoaderCircular.vue.js +5 -1
- package/dist/components/PlLoaderCircular/PlLoaderCircular.vue.js.map +1 -1
- package/dist/components/PlLoaderLogo.vue.d.ts.map +1 -1
- package/dist/components/PlLoaderLogo.vue2.js +8 -8
- package/dist/components/PlLoaderLogo.vue2.js.map +1 -1
- package/dist/components/PlLogView/PlLogView.vue.d.ts.map +1 -1
- package/dist/components/PlLogView/PlLogView.vue.js +11 -7
- package/dist/components/PlLogView/PlLogView.vue.js.map +1 -1
- package/dist/components/PlLogView/useLogHandle.d.ts.map +1 -1
- package/dist/components/PlLogView/useLogHandle.js +16 -3
- package/dist/components/PlLogView/useLogHandle.js.map +1 -1
- package/dist/components/PlNotificationAlert/PlNotificationAlert.vue.d.ts +1 -1
- package/dist/components/PlNotificationAlert/PlNotificationAlert.vue.d.ts.map +1 -1
- package/dist/components/PlNotificationAlert/PlNotificationAlert.vue.js.map +1 -1
- package/dist/components/PlNumberField/PlNumberField.vue.d.ts.map +1 -1
- package/dist/components/PlNumberField/PlNumberField.vue.js +4 -6
- package/dist/components/PlNumberField/PlNumberField.vue.js.map +1 -1
- package/dist/components/PlNumberField/parseNumber.d.ts.map +1 -1
- package/dist/components/PlNumberField/parseNumber.js.map +1 -1
- package/dist/components/PlProgressBar/PlProgressBar.vue.js.map +1 -1
- package/dist/components/PlProgressCell/PlProgressCell.vue.d.ts.map +1 -1
- package/dist/components/PlProgressCell/PlProgressCell.vue.js +11 -2
- package/dist/components/PlProgressCell/PlProgressCell.vue.js.map +1 -1
- package/dist/components/PlProgressCell/types.d.ts +1 -1
- package/dist/components/PlRadio/PlRadio.vue2.js.map +1 -1
- package/dist/components/PlRadio/PlRadio.vue3.js +3 -3
- package/dist/components/PlRadio/PlRadioGroup.vue2.js.map +1 -1
- package/dist/components/PlRadio/PlRadioGroup.vue3.js +6 -6
- package/dist/components/PlRadio/keys.js.map +1 -1
- package/dist/components/PlSearchField/PlSearchField.vue.d.ts.map +1 -1
- package/dist/components/PlSearchField/PlSearchField.vue2.js.map +1 -1
- package/dist/components/PlSectionSeparator/PlSectionSeparator.vue2.js.map +1 -1
- package/dist/components/PlSectionSeparator/PlSectionSeparator.vue3.js +1 -1
- package/dist/components/PlSidebar/PlSidebarGroup.vue2.js.map +1 -1
- package/dist/components/PlSidebar/PlSidebarGroup.vue3.js +6 -6
- package/dist/components/PlSidebar/PlSidebarItem.vue.d.ts +6 -6
- package/dist/components/PlSidebar/PlSidebarItem.vue.d.ts.map +1 -1
- package/dist/components/PlSidebar/PlSidebarItem.vue2.js.map +1 -1
- package/dist/components/PlSidebar/PlSidebarItem.vue3.js +8 -8
- package/dist/components/PlSlideModal/PlPureSlideModal.vue.d.ts.map +1 -1
- package/dist/components/PlSlideModal/PlPureSlideModal.vue.js.map +1 -1
- package/dist/components/PlSlideModal/PlSlideModal.vue.d.ts.map +1 -1
- package/dist/components/PlSlideModal/PlSlideModal.vue2.js.map +1 -1
- package/dist/components/PlSlideModal/props.d.ts +8 -8
- package/dist/components/PlSlideModal/props.d.ts.map +1 -1
- package/dist/components/PlSlideModal/props.js.map +1 -1
- package/dist/components/PlSplash/PlSplash.vue.d.ts +1 -1
- package/dist/components/PlSplash/PlSplash.vue.d.ts.map +1 -1
- package/dist/components/PlSplash/PlSplash.vue.js +4 -1
- package/dist/components/PlSplash/PlSplash.vue.js.map +1 -1
- package/dist/components/PlStatusTag/PlStatusTag.vue.d.ts.map +1 -1
- package/dist/components/PlStatusTag/PlStatusTag.vue.js.map +1 -1
- package/dist/components/PlStatusTag/types.d.ts +1 -1
- package/dist/components/PlSvg/PlSvg.vue.d.ts.map +1 -1
- package/dist/components/PlSvg/PlSvg.vue2.js +7 -2
- package/dist/components/PlSvg/PlSvg.vue2.js.map +1 -1
- package/dist/components/PlSvg/registry.d.ts.map +1 -1
- package/dist/components/PlSvg/registry.js.map +1 -1
- package/dist/components/PlTabs/PlTabs.vue.d.ts.map +1 -1
- package/dist/components/PlTabs/PlTabs.vue.js +4 -1
- package/dist/components/PlTabs/PlTabs.vue.js.map +1 -1
- package/dist/components/PlTabs/Tab.vue.js.map +1 -1
- package/dist/components/PlTextArea/PlTextArea.vue.js.map +1 -1
- package/dist/components/PlTextField/PlTextField.vue.d.ts.map +1 -1
- package/dist/components/PlTextField/PlTextField.vue.js +3 -1
- package/dist/components/PlTextField/PlTextField.vue.js.map +1 -1
- package/dist/components/PlToggleSwitch/PlToggleSwitch.vue.js.map +1 -1
- package/dist/components/PlTooltip/Beak.vue.d.ts.map +1 -1
- package/dist/components/PlTooltip/Beak.vue.js.map +1 -1
- package/dist/components/PlTooltip/PlTooltip.vue.d.ts.map +1 -1
- package/dist/components/PlTooltip/PlTooltip.vue.js.map +1 -1
- package/dist/components/PlTooltip/useTooltipPosition.d.ts +1 -1
- package/dist/components/PlTooltip/useTooltipPosition.js.map +1 -1
- package/dist/components/Scrollable.vue.d.ts.map +1 -1
- package/dist/components/Scrollable.vue.js +10 -1
- package/dist/components/Scrollable.vue.js.map +1 -1
- package/dist/components/Slider.vue.d.ts.map +1 -1
- package/dist/components/Slider.vue.js +3 -1
- package/dist/components/Slider.vue.js.map +1 -1
- package/dist/components/SliderRange.vue.d.ts.map +1 -1
- package/dist/components/SliderRange.vue.js +15 -3
- package/dist/components/SliderRange.vue.js.map +1 -1
- package/dist/components/SliderRangeTriple.vue.d.ts.map +1 -1
- package/dist/components/SliderRangeTriple.vue.js +7 -1
- package/dist/components/SliderRangeTriple.vue.js.map +1 -1
- package/dist/components/TabItem.vue.js.map +1 -1
- package/dist/components/ThemeSwitcher.vue.js.map +1 -1
- package/dist/components/TransitionSlidePanel.vue.js.map +1 -1
- package/dist/components/VScroll.vue.js.map +1 -1
- package/dist/components/contextMenu/Menu.vue.js +1 -1
- package/dist/components/contextMenu/Menu.vue2.js.map +1 -1
- package/dist/components/contextMenu/index.js.map +1 -1
- package/dist/composition/computedCached.js.map +1 -1
- package/dist/composition/filters/metadata.d.ts.map +1 -1
- package/dist/composition/filters/metadata.js.map +1 -1
- package/dist/composition/filters/types.d.ts +1 -19
- package/dist/composition/filters/types.d.ts.map +1 -1
- package/dist/composition/useClickOutside.js.map +1 -1
- package/dist/composition/useComponentProp.d.ts.map +1 -1
- package/dist/composition/useComponentProp.js.map +1 -1
- package/dist/composition/useConfirm.js.map +1 -1
- package/dist/composition/useDraggable.d.ts.map +1 -1
- package/dist/composition/useDraggable.js.map +1 -1
- package/dist/composition/useEventListener.d.ts.map +1 -1
- package/dist/composition/useEventListener.js +11 -7
- package/dist/composition/useEventListener.js.map +1 -1
- package/dist/composition/useFilteredList.d.ts.map +1 -1
- package/dist/composition/useFilteredList.js.map +1 -1
- package/dist/composition/useFormState.js.map +1 -1
- package/dist/composition/useHover.d.ts.map +1 -1
- package/dist/composition/useHover.js.map +1 -1
- package/dist/composition/useInterval.js.map +1 -1
- package/dist/composition/useLocalStorage.js.map +1 -1
- package/dist/composition/useMouse.js.map +1 -1
- package/dist/composition/useMouseCapture.d.ts.map +1 -1
- package/dist/composition/useMouseCapture.js.map +1 -1
- package/dist/composition/usePollingQuery.d.ts.map +1 -1
- package/dist/composition/usePollingQuery.js +4 -1
- package/dist/composition/usePollingQuery.js.map +1 -1
- package/dist/composition/usePosition.d.ts.map +1 -1
- package/dist/composition/usePosition.js.map +1 -1
- package/dist/composition/useQuery.js.map +1 -1
- package/dist/composition/useResizeObserver.d.ts.map +1 -1
- package/dist/composition/useResizeObserver.js.map +1 -1
- package/dist/composition/useRipple.js.map +1 -1
- package/dist/composition/useScroll.d.ts.map +1 -1
- package/dist/composition/useScroll.js.map +1 -1
- package/dist/composition/useSliderBreakpoints.d.ts.map +1 -1
- package/dist/composition/useSliderBreakpoints.js.map +1 -1
- package/dist/composition/useSortable.js.map +1 -1
- package/dist/composition/useSortable2.d.ts.map +1 -1
- package/dist/composition/useSortable2.js +8 -5
- package/dist/composition/useSortable2.js.map +1 -1
- package/dist/composition/useTheme.d.ts +1 -1
- package/dist/composition/useTheme.d.ts.map +1 -1
- package/dist/composition/useTheme.js.map +1 -1
- package/dist/composition/useTransformedModel.d.ts.map +1 -1
- package/dist/composition/useTransformedModel.js.map +1 -1
- package/dist/composition/useWatchFetch.js.map +1 -1
- package/dist/composition/utils.js.map +1 -1
- package/dist/composition/watchCached.d.ts.map +1 -1
- package/dist/composition/watchCached.js.map +1 -1
- package/dist/demo-site-data/all-css-variables.d.ts.map +1 -1
- package/dist/demo-site-data/all-css-variables.js +52 -13
- package/dist/demo-site-data/all-css-variables.js.map +1 -1
- package/dist/generated/icons-16.js.map +1 -1
- package/dist/generated/icons-24.js.map +1 -1
- package/dist/global/resizeObserver.js.map +1 -1
- package/dist/helpers/dom.d.ts.map +1 -1
- package/dist/helpers/dom.js.map +1 -1
- package/dist/helpers/downloadContent.d.ts +1 -1
- package/dist/helpers/downloadContent.d.ts.map +1 -1
- package/dist/helpers/downloadContent.js +3 -1
- package/dist/helpers/downloadContent.js.map +1 -1
- package/dist/helpers/error.js +4 -1
- package/dist/helpers/error.js.map +1 -1
- package/dist/helpers/functions.d.ts.map +1 -1
- package/dist/helpers/functions.js.map +1 -1
- package/dist/helpers/objects.js.map +1 -1
- package/dist/helpers/utils.d.ts.map +1 -1
- package/dist/helpers/utils.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/layout/PlBlockPage/PlBlockPage.vue.d.ts.map +1 -1
- package/dist/layout/PlBlockPage/PlBlockPage.vue2.js.map +1 -1
- package/dist/layout/PlBlockPage/PlBlockPage.vue3.js +4 -4
- package/dist/layout/PlBlockPage/PlBlockPageTitleTeleportTarget.js.map +1 -1
- package/dist/layout/PlBlockPage/usePlBlockPageTitleTeleportTarget.js.map +1 -1
- package/dist/layout/PlContainer/PlContainer.vue.d.ts.map +1 -1
- package/dist/layout/PlContainer/PlContainer.vue.js.map +1 -1
- package/dist/layout/PlGrid/PlGrid.vue.js.map +1 -1
- package/dist/layout/PlPlaceholder/PlPlaceholder.vue.d.ts +1 -1
- package/dist/layout/PlPlaceholder/PlPlaceholder.vue.d.ts.map +1 -1
- package/dist/layout/PlPlaceholder/PlPlaceholder.vue2.js +8 -8
- package/dist/layout/PlPlaceholder/PlPlaceholder.vue2.js.map +1 -1
- package/dist/layout/PlPlaceholder/PlPlaceholder.vue3.js +15 -15
- package/dist/layout/PlPlaceholder/index.d.ts +1 -1
- package/dist/layout/PlPlaceholder/index.d.ts.map +1 -1
- package/dist/layout/PlPlaceholder/index.js.map +1 -1
- package/dist/layout/PlPlaceholder/paint-worklet.js +6 -6
- package/dist/layout/PlPlaceholder/paint-worklet.js.map +1 -1
- package/dist/layout/PlRow/PlRow.vue.js.map +1 -1
- package/dist/layout/PlSpacer/PlSpacer.vue.js.map +1 -1
- package/dist/types.d.ts +5 -5
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/DoubleContour.vue.d.ts.map +1 -1
- package/dist/utils/DoubleContour.vue.js.map +1 -1
- package/dist/utils/DropdownOverlay/DropdownOverlay.vue.js.map +1 -1
- package/dist/utils/PlCloseModalBtn.vue.js.map +1 -1
- package/dist/utils/TextLabel.vue.js.map +1 -1
- package/dist/utils/useLabelNotch.d.ts.map +1 -1
- package/dist/utils/useLabelNotch.js.map +1 -1
- package/dist/utils/useValidation.js.map +1 -1
- package/package.json +23 -24
- package/scripts/parse-icons.js +20 -14
- package/src/__tests__/compositions/usePollingQuery.spec.ts +163 -165
- package/src/__tests__/compositions/useValidation.spec.ts +41 -28
- package/src/__tests__/setup.ts +1 -1
- package/src/__tests__/use-debounce-fn.test.ts +15 -11
- package/src/assets/animations.scss +5 -5
- package/src/assets/base-btn.scss +4 -3
- package/src/assets/base.scss +11 -8
- package/src/assets/common.scss +43 -43
- package/src/assets/dropdown-list-item.scss +53 -53
- package/src/assets/dropdown-tab-item.scss +4 -4
- package/src/assets/icons.scss +1 -1
- package/src/assets/input-range.scss +26 -27
- package/src/assets/layout.scss +1 -1
- package/src/assets/masks.scss +1 -1
- package/src/assets/mixins.scss +9 -17
- package/src/assets/scroll.scss +6 -6
- package/src/assets/slider.scss +6 -5
- package/src/assets/sortable.scss +1 -1
- package/src/assets/theme-switcher.scss +2 -2
- package/src/assets/typography.scss +16 -13
- package/src/assets/ui.scss +19 -19
- package/src/assets/utils.scss +19 -19
- package/src/assets/variables.scss +9 -10
- package/src/base/BtnBase.vue +6 -6
- package/src/colors/__tests__/colors.spec.ts +12 -10
- package/src/colors/color.ts +17 -12
- package/src/colors/gradient.ts +20 -17
- package/src/colors/index.ts +3 -3
- package/src/colors/palette.ts +194 -194
- package/src/components/ContextProvider.vue +1 -1
- package/src/components/DataTable/BaseCellComponent.vue +8 -8
- package/src/components/DataTable/ColumnCaret.vue +3 -3
- package/src/components/DataTable/ColumnsCommandMenu.vue +5 -3
- package/src/components/DataTable/RowsCommandMenu.vue +5 -3
- package/src/components/DataTable/TScroll.vue +11 -6
- package/src/components/DataTable/TableComponent.vue +41 -24
- package/src/components/DataTable/TdCell.vue +28 -15
- package/src/components/DataTable/ThCell.vue +14 -9
- package/src/components/DataTable/TrBody.vue +11 -4
- package/src/components/DataTable/adapters/AsyncData.ts +4 -4
- package/src/components/DataTable/adapters/RawData.ts +5 -5
- package/src/components/DataTable/assets/TableIcon.vue +6 -1
- package/src/components/DataTable/assets/data-table-style.scss +12 -10
- package/src/components/DataTable/composition/useColumn.ts +8 -5
- package/src/components/DataTable/composition/useMouseUp.ts +3 -3
- package/src/components/DataTable/composition/useResize.ts +16 -16
- package/src/components/DataTable/composition/useTableColumns.ts +8 -8
- package/src/components/DataTable/composition/useTableRows.ts +5 -5
- package/src/components/DataTable/domain.ts +8 -4
- package/src/components/DataTable/index.ts +26 -13
- package/src/components/DataTable/keys.ts +3 -3
- package/src/components/DataTable/state.ts +38 -18
- package/src/components/DataTable/types.ts +10 -10
- package/src/components/DropdownListItem.vue +18 -15
- package/src/components/GridTable/TdCell.vue +7 -7
- package/src/components/GridTable/ThCell.vue +14 -9
- package/src/components/GridTable/assets/TableIcon.vue +6 -1
- package/src/components/GridTable/assets/style.scss +6 -6
- package/src/components/GridTable/constants.ts +10 -10
- package/src/components/GridTable/domain.ts +8 -4
- package/src/components/GridTable/getColumnPositions.ts +4 -4
- package/src/components/GridTable/index.vue +41 -32
- package/src/components/GridTable/types.ts +14 -11
- package/src/components/GridTable/useColumn.ts +8 -5
- package/src/components/GridTable/useMouseUp.ts +3 -3
- package/src/components/GridTable/useResize.ts +13 -13
- package/src/components/HScroll.vue +10 -10
- package/src/components/InputRange.vue +9 -7
- package/src/components/LongText.vue +7 -5
- package/src/components/PlAccordion/ExpandTransition.vue +12 -6
- package/src/components/PlAccordion/PlAccordion.vue +3 -3
- package/src/components/PlAccordion/PlAccordionSection.vue +9 -9
- package/src/components/PlAccordion/index.ts +2 -2
- package/src/components/PlAlert/PlAlert.vue +21 -10
- package/src/components/PlAlert/index.ts +1 -1
- package/src/components/PlAlert/pl-alert.scss +1 -1
- package/src/components/PlAutocomplete/PlAutocomplete.vue +142 -82
- package/src/components/PlAutocomplete/__tests__/PlAutocomplete.spec.ts +19 -17
- package/src/components/PlAutocomplete/index.ts +1 -1
- package/src/components/PlAutocomplete/pl-autocomplete.scss +9 -7
- package/src/components/PlAutocompleteMulti/PlAutocompleteMulti.vue +92 -62
- package/src/components/PlAutocompleteMulti/__tests__/PlAutocompleteMulti.spec.ts +17 -16
- package/src/components/PlAutocompleteMulti/index.ts +4 -1
- package/src/components/PlAutocompleteMulti/pl-autocomplete-multi.scss +8 -6
- package/src/components/PlBtnAccent/PlBtnAccent.vue +4 -4
- package/src/components/PlBtnAccent/index.ts +1 -1
- package/src/components/PlBtnDanger/PlBtnDanger.vue +4 -4
- package/src/components/PlBtnDanger/index.ts +1 -1
- package/src/components/PlBtnDanger/pl-btn-danger.scss +1 -1
- package/src/components/PlBtnGhost/PlBtnGhost.vue +8 -8
- package/src/components/PlBtnGhost/index.ts +1 -1
- package/src/components/PlBtnGroup/PlBtnGroup.vue +10 -10
- package/src/components/PlBtnGroup/index.ts +1 -1
- package/src/components/PlBtnGroup/pl-btn-group.scss +4 -4
- package/src/components/PlBtnLink/PlBtnLink.vue +10 -5
- package/src/components/PlBtnLink/index.ts +1 -1
- package/src/components/PlBtnLink/pl-btn-link.scss +2 -1
- package/src/components/PlBtnPrimary/PlBtnPrimary.vue +4 -4
- package/src/components/PlBtnPrimary/__tests__/BtnPrimary.spec.ts +7 -7
- package/src/components/PlBtnPrimary/index.ts +1 -1
- package/src/components/PlBtnPrimary/pl-btn-primary.scss +2 -2
- package/src/components/PlBtnSecondary/PlBtnSecondary.vue +4 -4
- package/src/components/PlBtnSecondary/index.ts +1 -1
- package/src/components/PlBtnSecondary/pl-btn-secondary.scss +1 -1
- package/src/components/PlBtnSplit/PlBtnSplit.vue +42 -28
- package/src/components/PlBtnSplit/__tests__/PlBtnSplit.spec.ts +66 -66
- package/src/components/PlBtnSplit/index.ts +1 -1
- package/src/components/PlBtnSplit/pl-btn-split.scss +72 -75
- package/src/components/PlChartHistogram/PlChartHistogram.vue +29 -20
- package/src/components/PlChartHistogram/createGridlines.ts +28 -22
- package/src/components/PlChartHistogram/createLabels.ts +19 -17
- package/src/components/PlChartHistogram/createSvgContainer.ts +9 -9
- package/src/components/PlChartHistogram/drawBins.ts +27 -34
- package/src/components/PlChartHistogram/drawThreshold.ts +9 -9
- package/src/components/PlChartHistogram/histogram.ts +31 -34
- package/src/components/PlChartHistogram/index.ts +1 -1
- package/src/components/PlChartHistogram/normalizeBins.ts +3 -3
- package/src/components/PlChartHistogram/scales.spec.ts +5 -5
- package/src/components/PlChartHistogram/types.ts +6 -6
- package/src/components/PlChartStackedBar/Legends.vue +2 -2
- package/src/components/PlChartStackedBar/PlChartStackedBar.vue +16 -10
- package/src/components/PlChartStackedBar/PlChartStackedBarCompact.vue +4 -4
- package/src/components/PlChartStackedBar/StackedRow.vue +7 -9
- package/src/components/PlChartStackedBar/StackedRowCompact.vue +6 -8
- package/src/components/PlChartStackedBar/index.ts +3 -3
- package/src/components/PlChartStackedBar/types.ts +1 -1
- package/src/components/PlCheckbox/PlCheckbox.vue +5 -5
- package/src/components/PlCheckbox/PlCheckboxBase.vue +3 -5
- package/src/components/PlCheckbox/__tests__/PlCheckbox.spec.ts +15 -15
- package/src/components/PlCheckbox/index.ts +1 -1
- package/src/components/PlCheckbox/pl-checkbox-base.scss +13 -13
- package/src/components/PlCheckbox/pl-checkbox.scss +2 -2
- package/src/components/PlCheckboxGroup/PlCheckboxGroup.vue +24 -10
- package/src/components/PlCheckboxGroup/index.ts +1 -1
- package/src/components/PlCheckboxGroup/pl-checkbox-group.scss +1 -1
- package/src/components/PlChip/PlChip.vue +11 -5
- package/src/components/PlChip/index.ts +1 -1
- package/src/components/PlChip/pl-chip.scss +2 -2
- package/src/components/PlClipboard/PlClipboard.vue +7 -7
- package/src/components/PlClipboard/index.ts +1 -1
- package/src/components/PlConfirmDialog.vue +7 -6
- package/src/components/PlDialogModal/PlDialogModal.vue +52 -33
- package/src/components/PlDialogModal/index.ts +1 -1
- package/src/components/PlDialogModal/pl-dialog-modal.scss +2 -2
- package/src/components/PlDropdown/OptionList.vue +21 -10
- package/src/components/PlDropdown/PlDropdown.vue +65 -46
- package/src/components/PlDropdown/__tests__/PlDropdown.spec.ts +15 -15
- package/src/components/PlDropdown/index.ts +1 -1
- package/src/components/PlDropdown/pl-dropdown.scss +4 -2
- package/src/components/PlDropdown/types.ts +6 -2
- package/src/components/PlDropdown/useGroupBy.ts +7 -10
- package/src/components/PlDropdownLegacy/PlDropdownLegacy.vue +60 -43
- package/src/components/PlDropdownLegacy/__tests__/PlDropdownLegacy.spec.ts +16 -16
- package/src/components/PlDropdownLegacy/index.ts +1 -1
- package/src/components/PlDropdownLegacy/pl-dropdown-legacy.scss +6 -6
- package/src/components/PlDropdownLine/PlDropdownLine.vue +76 -54
- package/src/components/PlDropdownLine/ResizableInput.vue +15 -8
- package/src/components/PlDropdownLine/index.ts +1 -1
- package/src/components/PlDropdownLine/pl-dropdown-line.scss +132 -132
- package/src/components/PlDropdownLine/resizable-input.scss +38 -38
- package/src/components/PlDropdownMulti/PlDropdownMulti.vue +79 -45
- package/src/components/PlDropdownMulti/__tests__/PlDropdownMulti.spec.ts +15 -14
- package/src/components/PlDropdownMulti/index.ts +1 -1
- package/src/components/PlDropdownMulti/pl-dropdown-multi.scss +8 -6
- package/src/components/PlDropdownMultiRef/PlDropdownMultiRef.vue +5 -5
- package/src/components/PlDropdownMultiRef/__tests__/PlDropdownMultiRef.spec.ts +25 -24
- package/src/components/PlDropdownMultiRef/index.ts +1 -1
- package/src/components/PlDropdownRef/PlDropdownRef.vue +12 -12
- package/src/components/PlDropdownRef/__tests__/PlDropdownRef.spec.ts +23 -23
- package/src/components/PlDropdownRef/index.ts +1 -1
- package/src/components/PlEditableTitle/PlEditableTitle.vue +9 -10
- package/src/components/PlEditableTitle/index.ts +1 -1
- package/src/components/PlEditableTitle/pl-editable-title.module.scss +4 -4
- package/src/components/PlElementList/PlElementList.vue +60 -37
- package/src/components/PlElementList/PlElementListItem.vue +45 -29
- package/src/components/PlElementList/README.md +102 -119
- package/src/components/PlElementList/index.ts +1 -1
- package/src/components/PlElementList/utils.ts +3 -1
- package/src/components/PlErrorAlert/PlErrorAlert.vue +5 -5
- package/src/components/PlErrorAlert/index.ts +1 -1
- package/src/components/PlErrorBoundary/PlErrorBoundary.vue +8 -5
- package/src/components/PlErrorBoundary/index.ts +1 -1
- package/src/components/PlFileDialog/Local.vue +22 -16
- package/src/components/PlFileDialog/PlFileDialog.vue +27 -23
- package/src/components/PlFileDialog/Remote.vue +44 -34
- package/src/components/PlFileDialog/Shortcuts.vue +4 -4
- package/src/components/PlFileDialog/index.ts +1 -1
- package/src/components/PlFileDialog/pl-file-dialog.module.scss +15 -12
- package/src/components/PlFileDialog/remote.ts +9 -9
- package/src/components/PlFileDialog/utils.test.ts +20 -24
- package/src/components/PlFileDialog/utils.ts +8 -8
- package/src/components/PlFileInput/PlFileInput.vue +37 -26
- package/src/components/PlFileInput/index.ts +1 -1
- package/src/components/PlFileInput/pl-file-input.scss +3 -3
- package/src/components/PlFileInput/utils.ts +6 -6
- package/src/components/PlIcon16/PlIcon16.vue +7 -7
- package/src/components/PlIcon16/index.ts +1 -1
- package/src/components/PlIcon24/PlIcon24.vue +7 -7
- package/src/components/PlIcon24/index.ts +1 -1
- package/src/components/PlLoaderCircular/PlLoaderCircular.vue +24 -6
- package/src/components/PlLoaderCircular/index.ts +1 -1
- package/src/components/PlLoaderCircular/pl-loader-circular.scss +54 -50
- package/src/components/PlLoaderLogo.vue +8 -10
- package/src/components/PlLogView/PlLogView.vue +28 -22
- package/src/components/PlLogView/index.ts +1 -1
- package/src/components/PlLogView/pl-log-view.scss +10 -4
- package/src/components/PlLogView/useLogHandle.ts +32 -12
- package/src/components/PlMaskIcon16/index.ts +1 -1
- package/src/components/PlMaskIcon24/index.ts +1 -1
- package/src/components/PlNotificationAlert/PlNotificationAlert.vue +10 -5
- package/src/components/PlNotificationAlert/index.ts +1 -1
- package/src/components/PlNotificationAlert/pl-notification-alert.scss +43 -44
- package/src/components/PlNumberField/PlNumberField.vue +95 -68
- package/src/components/PlNumberField/__tests__/PlNumberField.spec.ts +71 -69
- package/src/components/PlNumberField/index.ts +1 -1
- package/src/components/PlNumberField/parseNumber.ts +20 -17
- package/src/components/PlProgressBar/PlProgressBar.vue +5 -5
- package/src/components/PlProgressBar/index.ts +1 -1
- package/src/components/PlProgressCell/PlProgressCell.vue +33 -14
- package/src/components/PlProgressCell/index.ts +2 -2
- package/src/components/PlProgressCell/pl-progress-cell.scss +70 -70
- package/src/components/PlProgressCell/types.ts +1 -1
- package/src/components/PlRadio/PlRadio.vue +54 -54
- package/src/components/PlRadio/PlRadioGroup.vue +16 -16
- package/src/components/PlRadio/__tests__/PlRadioGroup.spec.ts +50 -50
- package/src/components/PlRadio/index.ts +2 -2
- package/src/components/PlRadio/keys.ts +1 -1
- package/src/components/PlSearchField/PlSearchField.vue +21 -9
- package/src/components/PlSearchField/index.ts +1 -1
- package/src/components/PlSectionSeparator/PlSectionSeparator.vue +1 -1
- package/src/components/PlSectionSeparator/index.ts +1 -1
- package/src/components/PlSidebar/PlSidebarGroup.vue +2 -2
- package/src/components/PlSidebar/PlSidebarItem.vue +7 -7
- package/src/components/PlSidebar/index.ts +2 -2
- package/src/components/PlSlideModal/PlPureSlideModal.vue +18 -17
- package/src/components/PlSlideModal/PlSlideModal.vue +8 -12
- package/src/components/PlSlideModal/index.ts +2 -2
- package/src/components/PlSlideModal/pl-slide-modal.scss +2 -2
- package/src/components/PlSlideModal/props.ts +9 -9
- package/src/components/PlSpacer/PlSpacer.vue +1 -1
- package/src/components/PlSpacer/index.ts +1 -1
- package/src/components/PlSplash/PlSplash.vue +25 -17
- package/src/components/PlSplash/index.ts +1 -1
- package/src/components/PlSplash/pl-splash.module.scss +1 -1
- package/src/components/PlStatusTag/PlStatusTag.vue +13 -8
- package/src/components/PlStatusTag/index.ts +2 -2
- package/src/components/PlStatusTag/pl-status-tag.scss +18 -18
- package/src/components/PlStatusTag/types.ts +1 -1
- package/src/components/PlSvg/PlSvg.vue +24 -16
- package/src/components/PlSvg/index.ts +1 -1
- package/src/components/PlSvg/registry.ts +17 -21
- package/src/components/PlTabs/PlTabs.vue +10 -7
- package/src/components/PlTabs/Tab.vue +4 -4
- package/src/components/PlTabs/index.ts +2 -2
- package/src/components/PlTabs/pl-tabs.module.scss +3 -3
- package/src/components/PlTextArea/PlTextArea.vue +15 -15
- package/src/components/PlTextArea/__tests__/PlTextArea.spec.ts +12 -12
- package/src/components/PlTextArea/index.ts +1 -1
- package/src/components/PlTextArea/pl-textarea.scss +1 -1
- package/src/components/PlTextField/PlTextField.vue +48 -27
- package/src/components/PlTextField/__tests__/TextField.spec.ts +19 -19
- package/src/components/PlTextField/index.ts +1 -1
- package/src/components/PlToggleSwitch/PlToggleSwitch.vue +3 -3
- package/src/components/PlToggleSwitch/index.ts +1 -1
- package/src/components/PlToggleSwitch/pl-toggle-switch.scss +3 -2
- package/src/components/PlTooltip/Beak.vue +8 -1
- package/src/components/PlTooltip/PlTooltip.vue +33 -19
- package/src/components/PlTooltip/index.ts +1 -1
- package/src/components/PlTooltip/pl-tooltip.scss +4 -2
- package/src/components/PlTooltip/useTooltipPosition.ts +12 -12
- package/src/components/Scrollable.vue +17 -8
- package/src/components/Slider.vue +47 -23
- package/src/components/SliderRange.vue +72 -32
- package/src/components/SliderRangeTriple.vue +49 -31
- package/src/components/TabItem.vue +5 -5
- package/src/components/ThemeSwitcher.vue +1 -1
- package/src/components/TransitionSlidePanel.vue +2 -2
- package/src/components/VScroll.vue +10 -10
- package/src/components/contextMenu/Menu.vue +4 -4
- package/src/components/contextMenu/index.ts +6 -6
- package/src/composition/computedCached.ts +11 -7
- package/src/composition/filters/index.ts +2 -2
- package/src/composition/filters/metadata.ts +227 -220
- package/src/composition/filters/types.ts +44 -21
- package/src/composition/useClickOutside.ts +4 -4
- package/src/composition/useComponentProp.ts +5 -3
- package/src/composition/useConfirm.ts +5 -5
- package/src/composition/useDraggable.ts +16 -13
- package/src/composition/useEventListener.ts +13 -5
- package/src/composition/useFilteredList.ts +9 -6
- package/src/composition/useFormState.ts +3 -3
- package/src/composition/useHover.ts +10 -7
- package/src/composition/useInterval.ts +1 -1
- package/src/composition/useLocalStorage.ts +4 -4
- package/src/composition/useMouse.ts +3 -3
- package/src/composition/useMouseCapture.ts +10 -7
- package/src/composition/useNotificationPosition.ts +4 -4
- package/src/composition/usePollingQuery.ts +22 -20
- package/src/composition/usePosition.ts +13 -9
- package/src/composition/useQuery.ts +2 -2
- package/src/composition/useResizeObserver.ts +9 -6
- package/src/composition/useRipple.ts +6 -6
- package/src/composition/useScroll.ts +18 -12
- package/src/composition/useSliderBreakpoints.ts +6 -4
- package/src/composition/useSortable.ts +17 -17
- package/src/composition/useSortable2.ts +27 -24
- package/src/composition/useTheme.ts +11 -9
- package/src/composition/useTransformedModel.ts +6 -3
- package/src/composition/useWatchFetch.ts +3 -3
- package/src/composition/utils.ts +1 -1
- package/src/composition/watchCached.ts +2 -8
- package/src/demo-site-data/all-css-variables.ts +208 -169
- package/src/drafts/FileBaseInput.vue +35 -18
- package/src/generated/icons-16.ts +68 -68
- package/src/generated/icons-24.ts +211 -211
- package/src/global/resizeObserver.ts +1 -1
- package/src/helpers/dom.ts +12 -8
- package/src/helpers/downloadContent.ts +23 -21
- package/src/helpers/error.ts +6 -3
- package/src/helpers/functions.ts +5 -1
- package/src/helpers/objects.ts +1 -1
- package/src/helpers/utils.ts +23 -9
- package/src/index.ts +110 -110
- package/src/layout/PlBlockPage/PlBlockPage.vue +14 -19
- package/src/layout/PlBlockPage/PlBlockPageTitleTeleportTarget.ts +1 -1
- package/src/layout/PlBlockPage/index.ts +2 -2
- package/src/layout/PlBlockPage/pl-block-page.scss +1 -1
- package/src/layout/PlBlockPage/usePlBlockPageTitleTeleportTarget.ts +2 -2
- package/src/layout/PlContainer/PlContainer.vue +10 -5
- package/src/layout/PlContainer/index.ts +1 -1
- package/src/layout/PlContainer/pl-container.scss +1 -1
- package/src/layout/PlGrid/PlGrid.vue +3 -3
- package/src/layout/PlGrid/index.ts +1 -1
- package/src/layout/PlGrid/pl-grid.scss +1 -1
- package/src/layout/PlPlaceholder/PlPlaceholder.vue +19 -18
- package/src/layout/PlPlaceholder/index.ts +11 -14
- package/src/layout/PlPlaceholder/paint-worklet.js +6 -6
- package/src/layout/PlRow/PlRow.vue +2 -2
- package/src/layout/PlRow/index.ts +1 -1
- package/src/layout/PlRow/pl-row.scss +1 -1
- package/src/layout/PlSpacer/PlSpacer.vue +1 -1
- package/src/layout/PlSpacer/index.ts +1 -1
- package/src/types.ts +23 -17
- package/src/utils/DoubleContour.vue +18 -7
- package/src/utils/DropdownOverlay/DropdownOverlay.vue +13 -13
- package/src/utils/DropdownOverlay/index.ts +1 -1
- package/src/utils/PlCloseModalBtn.vue +1 -1
- package/src/utils/TextLabel.vue +1 -1
- package/src/utils/WebStopWatchElement.ts +5 -5
- package/src/utils/useLabelNotch.ts +12 -9
- package/src/utils/useValidation.ts +2 -2
- package/tsconfig.json +2 -7
- package/vitest.config.mts +9 -9
- package/.turbo/turbo-lint.log +0 -5
- package/eslint.config.mjs +0 -4
|
@@ -1,13 +1,24 @@
|
|
|
1
|
-
import { computed, provide, reactive, watch } from
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { computed, provide, reactive, watch } from "vue";
|
|
2
|
+
import type {
|
|
3
|
+
TableProps,
|
|
4
|
+
TableData,
|
|
5
|
+
DataWindow,
|
|
6
|
+
PrimaryKey,
|
|
7
|
+
Row,
|
|
8
|
+
ColumnSpecSettings,
|
|
9
|
+
DataSource,
|
|
10
|
+
} from "./types";
|
|
11
|
+
import { deepClone, deepEqual } from "@milaboratories/helpers";
|
|
12
|
+
import { stateKey } from "./keys";
|
|
13
|
+
import { clamp, delay, resolveAwaited, tap } from "@milaboratories/helpers";
|
|
14
|
+
import { useTableColumns } from "./composition/useTableColumns";
|
|
15
|
+
import { useTableRows } from "./composition/useTableRows";
|
|
16
|
+
import { GAP, WINDOW_DELTA } from "./constants";
|
|
17
|
+
|
|
18
|
+
const loadRows = async (
|
|
19
|
+
dataWindow: { scrollTop: number; bodyHeight: number },
|
|
20
|
+
dataSource: DataSource,
|
|
21
|
+
) => {
|
|
11
22
|
const { scrollTop, bodyHeight } = dataWindow;
|
|
12
23
|
|
|
13
24
|
await delay(0);
|
|
@@ -60,8 +71,12 @@ export function createState(props: TableProps) {
|
|
|
60
71
|
return data.columns.reduce((acc, col) => acc + col.width + GAP, 0);
|
|
61
72
|
});
|
|
62
73
|
|
|
63
|
-
const maxScrollTop = computed(() =>
|
|
64
|
-
|
|
74
|
+
const maxScrollTop = computed(() =>
|
|
75
|
+
tap(state.data.dataHeight - state.data.bodyHeight, (v) => (v > 0 ? v : 0)),
|
|
76
|
+
);
|
|
77
|
+
const maxScrollLeft = computed(() =>
|
|
78
|
+
tap(columnsWidth.value - state.data.bodyWidth, (v) => (v > 0 ? v : 0)),
|
|
79
|
+
);
|
|
65
80
|
|
|
66
81
|
const dataDimensions = computed<DataWindow & { current?: DataWindow }>(() => {
|
|
67
82
|
return {
|
|
@@ -143,18 +158,23 @@ export function createState(props: TableProps) {
|
|
|
143
158
|
(n, _o) => {
|
|
144
159
|
const current = n.current;
|
|
145
160
|
|
|
146
|
-
const needToLoad =
|
|
161
|
+
const needToLoad =
|
|
162
|
+
!current ||
|
|
163
|
+
n.scrollTop < current.scrollTop ||
|
|
164
|
+
n.scrollTop + n.bodyHeight > current.bodyHeight + current.scrollTop;
|
|
147
165
|
|
|
148
166
|
if (needToLoad) {
|
|
149
167
|
data.currentWindow = {
|
|
150
168
|
scrollTop: n.scrollTop - WINDOW_DELTA,
|
|
151
169
|
bodyHeight: n.bodyHeight + WINDOW_DELTA * 2,
|
|
152
170
|
};
|
|
153
|
-
loadRows(deepClone(data.currentWindow), settings.value.dataSource).then(
|
|
154
|
-
|
|
155
|
-
data.
|
|
156
|
-
|
|
157
|
-
|
|
171
|
+
loadRows(deepClone(data.currentWindow), settings.value.dataSource).then(
|
|
172
|
+
({ rows, dataWindow }) => {
|
|
173
|
+
if (deepEqual(data.currentWindow, dataWindow)) {
|
|
174
|
+
data.rows = rows;
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
);
|
|
158
178
|
}
|
|
159
179
|
},
|
|
160
180
|
{ deep: true, immediate: true },
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Component } from
|
|
2
|
-
import type { Branded, Equal, Expect, Values } from
|
|
1
|
+
import type { Component } from "vue";
|
|
2
|
+
import type { Branded, Equal, Expect, Values } from "@milaboratories/helpers";
|
|
3
3
|
|
|
4
4
|
type TypeMap = {
|
|
5
5
|
integer: number;
|
|
@@ -42,7 +42,7 @@ export type TableData = {
|
|
|
42
42
|
|
|
43
43
|
export type DataRow = Record<string, unknown>;
|
|
44
44
|
|
|
45
|
-
export type PrimaryKey = Branded<string,
|
|
45
|
+
export type PrimaryKey = Branded<string, "PrimaryKey">;
|
|
46
46
|
|
|
47
47
|
export type ResolvePrimaryKey<D extends DataRow = DataRow> = (dataRow: D, index: number) => string;
|
|
48
48
|
|
|
@@ -75,9 +75,9 @@ export type ColumnSpecSettings<ID = string, _Value = unknown> = {
|
|
|
75
75
|
label: string;
|
|
76
76
|
id: ID;
|
|
77
77
|
width: number;
|
|
78
|
-
justify?:
|
|
78
|
+
justify?: "center" | "start";
|
|
79
79
|
sort?: {
|
|
80
|
-
direction:
|
|
80
|
+
direction: "DESC" | "ASC" | undefined;
|
|
81
81
|
};
|
|
82
82
|
component?: () => Component;
|
|
83
83
|
editable?: boolean;
|
|
@@ -171,11 +171,11 @@ export type RawTableSettings<D extends DataRow = DataRow> = Readonly<{
|
|
|
171
171
|
|
|
172
172
|
type _cell = TableCell<{ age: number; name: string; payload: unknown }>;
|
|
173
173
|
|
|
174
|
-
type _age = Extract<_cell, { id:
|
|
174
|
+
type _age = Extract<_cell, { id: "age" }>;
|
|
175
175
|
|
|
176
176
|
type _cases = [
|
|
177
|
-
Expect<Equal<number, Extract<_cell, { id:
|
|
178
|
-
Expect<Equal<string, Extract<_cell, { id:
|
|
179
|
-
Expect<Equal<unknown, Extract<_cell, { id:
|
|
180
|
-
Expect<Equal<_age[
|
|
177
|
+
Expect<Equal<number, Extract<_cell, { id: "age" }>["value"]>>,
|
|
178
|
+
Expect<Equal<string, Extract<_cell, { id: "name" }>["value"]>>,
|
|
179
|
+
Expect<Equal<unknown, Extract<_cell, { id: "payload" }>["value"]>>,
|
|
180
|
+
Expect<Equal<_age["column"]["id"], "age">>,
|
|
181
181
|
];
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { computed } from
|
|
3
|
-
import CheckboxUncheckedSvg from
|
|
4
|
-
import CheckboxCheckedSvg from
|
|
5
|
-
import type { ListOptionNormalized } from
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import CheckboxUncheckedSvg from "../assets/images/24_checkbox-light-enabled-unchecked.svg?raw";
|
|
4
|
+
import CheckboxCheckedSvg from "../assets/images/24_checkbox-light-enabled-checked.svg?raw";
|
|
5
|
+
import type { ListOptionNormalized } from "../types";
|
|
6
6
|
|
|
7
7
|
const props = withDefaults(
|
|
8
8
|
defineProps<{
|
|
9
9
|
option: ListOptionNormalized;
|
|
10
10
|
isSelected: boolean;
|
|
11
|
-
size:
|
|
11
|
+
size: "small" | "medium";
|
|
12
12
|
isHovered: boolean;
|
|
13
13
|
useCheckbox?: boolean;
|
|
14
14
|
}>(),
|
|
15
15
|
{
|
|
16
|
-
size:
|
|
16
|
+
size: "small",
|
|
17
17
|
isSelected: false,
|
|
18
18
|
isHovered: false,
|
|
19
19
|
useCheckbox: false,
|
|
@@ -22,24 +22,24 @@ const props = withDefaults(
|
|
|
22
22
|
|
|
23
23
|
const classes = computed<string>(() => {
|
|
24
24
|
const classItems: string[] = [];
|
|
25
|
-
if (props.size ===
|
|
26
|
-
classItems.push(
|
|
25
|
+
if (props.size === "small") {
|
|
26
|
+
classItems.push("dropdown-list-item__small");
|
|
27
27
|
}
|
|
28
28
|
if (props.isSelected) {
|
|
29
|
-
classItems.push(
|
|
29
|
+
classItems.push("dropdown-list-item__selected");
|
|
30
30
|
}
|
|
31
31
|
if (props.isHovered) {
|
|
32
|
-
classItems.push(
|
|
32
|
+
classItems.push("hovered-item");
|
|
33
33
|
}
|
|
34
|
-
return classItems.join(
|
|
34
|
+
return classItems.join(" ");
|
|
35
35
|
});
|
|
36
36
|
|
|
37
37
|
const checkboxClasses = computed(() => {
|
|
38
|
-
const classes: string[] = [
|
|
38
|
+
const classes: string[] = ["dropdown-list-item__checkbox", "flex-self-start"];
|
|
39
39
|
if (props.isSelected) {
|
|
40
|
-
classes.push(
|
|
40
|
+
classes.push("checked");
|
|
41
41
|
}
|
|
42
|
-
return classes.join(
|
|
42
|
+
return classes.join(" ");
|
|
43
43
|
});
|
|
44
44
|
|
|
45
45
|
// Why??
|
|
@@ -59,6 +59,9 @@ const checkboxSvg = computed(() => (props.isSelected ? CheckboxCheckedSvg : Chec
|
|
|
59
59
|
{{ option.description }}
|
|
60
60
|
</div>
|
|
61
61
|
</div>
|
|
62
|
-
<div
|
|
62
|
+
<div
|
|
63
|
+
v-if="!props.useCheckbox && props.isSelected"
|
|
64
|
+
class="dropdown-list-item__icon flex-self-start"
|
|
65
|
+
/>
|
|
63
66
|
</div>
|
|
64
67
|
</template>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import { cellEventOptions } from
|
|
3
|
-
import type { CellEvent, CellProps, ShowContextOptions } from
|
|
4
|
-
import { reactive, ref } from
|
|
2
|
+
import { cellEventOptions } from "./constants";
|
|
3
|
+
import type { CellEvent, CellProps, ShowContextOptions } from "./types";
|
|
4
|
+
import { reactive, ref } from "vue";
|
|
5
5
|
|
|
6
|
-
const emit = defineEmits([
|
|
6
|
+
const emit = defineEmits(["delete:row", "update:value"]);
|
|
7
7
|
|
|
8
8
|
const props = defineProps<{
|
|
9
9
|
cell: CellProps;
|
|
@@ -17,7 +17,7 @@ const data = reactive({
|
|
|
17
17
|
|
|
18
18
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
19
19
|
function onInput(ev: any) {
|
|
20
|
-
emit(
|
|
20
|
+
emit("update:value", {
|
|
21
21
|
rowIndex: props.cell.rowIndex,
|
|
22
22
|
name: props.cell.colName,
|
|
23
23
|
value: ev.target.value,
|
|
@@ -29,7 +29,7 @@ function showContextMenu() {
|
|
|
29
29
|
const cellEvents = props.cellEvents ?? [];
|
|
30
30
|
|
|
31
31
|
if (!props.showContextOptions) {
|
|
32
|
-
console.warn(
|
|
32
|
+
console.warn("inject showContextOptions interface for the table");
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
35
35
|
|
|
@@ -50,7 +50,7 @@ function onClick() {
|
|
|
50
50
|
if (props.cell.editable) {
|
|
51
51
|
data.edit = true;
|
|
52
52
|
requestAnimationFrame(() => {
|
|
53
|
-
cellRef.value?.querySelector(
|
|
53
|
+
cellRef.value?.querySelector("input")?.focus();
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
56
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import { columnEventOptions } from
|
|
3
|
-
import type { ColumnEvent, ColumnSettings, ShowContextOptions } from
|
|
2
|
+
import { columnEventOptions } from "./constants";
|
|
3
|
+
import type { ColumnEvent, ColumnSettings, ShowContextOptions } from "./types";
|
|
4
4
|
|
|
5
|
-
const emit = defineEmits([
|
|
5
|
+
const emit = defineEmits(["delete:column", "expand:column", "change:sort"]);
|
|
6
6
|
|
|
7
7
|
const props = defineProps<{
|
|
8
8
|
col: ColumnSettings;
|
|
@@ -19,7 +19,7 @@ function onContextMenu() {
|
|
|
19
19
|
const columnEvents = props.columnEvents ?? [];
|
|
20
20
|
|
|
21
21
|
if (!props.showContextOptions) {
|
|
22
|
-
console.warn(
|
|
22
|
+
console.warn("inject showContextOptions interface for the table");
|
|
23
23
|
return;
|
|
24
24
|
}
|
|
25
25
|
|
|
@@ -34,11 +34,11 @@ function onContextMenu() {
|
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
function onSort(colName: string, _v:
|
|
38
|
-
const v = _v ??
|
|
39
|
-
emit(
|
|
37
|
+
function onSort(colName: string, _v: "DESC" | "ASC" | undefined) {
|
|
38
|
+
const v = _v ?? "DESC";
|
|
39
|
+
emit("change:sort", {
|
|
40
40
|
colName,
|
|
41
|
-
direction: rotate(v, [
|
|
41
|
+
direction: rotate(v, ["DESC", "ASC"]),
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
44
|
</script>
|
|
@@ -47,6 +47,11 @@ function onSort(colName: string, _v: 'DESC' | 'ASC' | undefined) {
|
|
|
47
47
|
<div class="cell th-cell" :class="{ 'justify-center': col.justify }" @contextmenu="onContextMenu">
|
|
48
48
|
<div v-if="col.valueType" :class="col.valueType" />
|
|
49
49
|
{{ col.text }}
|
|
50
|
-
<div
|
|
50
|
+
<div
|
|
51
|
+
v-if="col.sort"
|
|
52
|
+
class="sort"
|
|
53
|
+
:class="col.sort.direction"
|
|
54
|
+
@click.stop="() => onSort(col.name, col.sort?.direction)"
|
|
55
|
+
/>
|
|
51
56
|
</div>
|
|
52
57
|
</template>
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
-
<path
|
|
3
|
+
<path
|
|
4
|
+
fill-rule="evenodd"
|
|
5
|
+
clip-rule="evenodd"
|
|
6
|
+
d="M24 41.5H9C7.61929 41.5 6.5 40.3807 6.5 39V24H9.5V38.5H24V41.5Z"
|
|
7
|
+
fill="#CFD1DB"
|
|
8
|
+
/>
|
|
4
9
|
<path
|
|
5
10
|
fill-rule="evenodd"
|
|
6
11
|
clip-rule="evenodd"
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
justify-content: center;
|
|
32
32
|
align-items: center;
|
|
33
33
|
border-left: 1px solid var(--color-div-grey);
|
|
34
|
-
background-color: #
|
|
34
|
+
background-color: #f7f8fa;
|
|
35
35
|
cursor: pointer;
|
|
36
36
|
z-index: 1;
|
|
37
37
|
|
|
38
|
-
>div {
|
|
38
|
+
> div {
|
|
39
39
|
background-color: var(--color-text);
|
|
40
40
|
@include mask(url(./16_add.svg), 16px);
|
|
41
41
|
}
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
padding-right: 8px;
|
|
54
54
|
|
|
55
55
|
.cell {
|
|
56
|
-
background-color: #
|
|
56
|
+
background-color: #f7f8fa;
|
|
57
57
|
font-weight: 600;
|
|
58
58
|
font-size: 14px;
|
|
59
59
|
user-select: none;
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
&__no-data {
|
|
137
|
-
background-color: #
|
|
137
|
+
background-color: #f7f8fa;
|
|
138
138
|
display: flex;
|
|
139
139
|
align-items: center;
|
|
140
140
|
justify-content: center;
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
line-height: 32px;
|
|
148
148
|
letter-spacing: -0.56px;
|
|
149
149
|
|
|
150
|
-
>div {
|
|
150
|
+
> div {
|
|
151
151
|
display: flex;
|
|
152
152
|
flex-direction: column;
|
|
153
153
|
gap: 4px;
|
|
@@ -181,4 +181,4 @@
|
|
|
181
181
|
// // background-color: rgba(99, 224, 36, 0.12);
|
|
182
182
|
// }
|
|
183
183
|
}
|
|
184
|
-
}
|
|
184
|
+
}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import type { ListOption } from
|
|
2
|
-
import type { CellEvent, ColumnEvent } from
|
|
1
|
+
import type { ListOption } from "../../types";
|
|
2
|
+
import type { CellEvent, ColumnEvent } from "./types";
|
|
3
3
|
|
|
4
4
|
export const RESIZE_GAP = 10;
|
|
5
5
|
export const MIN_COLUMN_WIDTH = 30;
|
|
6
6
|
|
|
7
7
|
export const cellEventOptions: ListOption<CellEvent>[] = [
|
|
8
8
|
{
|
|
9
|
-
text:
|
|
10
|
-
value:
|
|
9
|
+
text: "Delete row",
|
|
10
|
+
value: "delete:row",
|
|
11
11
|
},
|
|
12
12
|
{
|
|
13
|
-
text:
|
|
14
|
-
value:
|
|
13
|
+
text: "Update value",
|
|
14
|
+
value: "update:value",
|
|
15
15
|
},
|
|
16
16
|
];
|
|
17
17
|
|
|
18
18
|
export const columnEventOptions: ListOption<ColumnEvent>[] = [
|
|
19
19
|
{
|
|
20
|
-
text:
|
|
21
|
-
value:
|
|
20
|
+
text: "Delete column",
|
|
21
|
+
value: "delete:column",
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
|
-
text:
|
|
25
|
-
value:
|
|
24
|
+
text: "Fit content",
|
|
25
|
+
value: "expand:column",
|
|
26
26
|
},
|
|
27
27
|
];
|
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
export function toComparable(v: unknown) {
|
|
2
|
-
if (typeof v ===
|
|
2
|
+
if (typeof v === "number") {
|
|
3
3
|
return v;
|
|
4
|
-
} else if (typeof v ===
|
|
4
|
+
} else if (typeof v === "string") {
|
|
5
5
|
return v;
|
|
6
6
|
} else {
|
|
7
7
|
return String(v);
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
export function compareRecords(
|
|
11
|
+
export function compareRecords(
|
|
12
|
+
sorts: Record<string, "ASC" | "DESC">,
|
|
13
|
+
a: Record<string, unknown>,
|
|
14
|
+
b: Record<string, unknown>,
|
|
15
|
+
) {
|
|
12
16
|
for (const [name, direction] of Object.entries(sorts)) {
|
|
13
17
|
const v1 = toComparable(a[name]);
|
|
14
18
|
const v2 = toComparable(b[name]);
|
|
15
19
|
|
|
16
|
-
const rev = direction ===
|
|
20
|
+
const rev = direction === "DESC" ? -1 : 1;
|
|
17
21
|
|
|
18
22
|
if (v1 === v2) {
|
|
19
23
|
continue;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { Ref } from
|
|
2
|
-
import { unref } from
|
|
3
|
-
import { utils } from
|
|
1
|
+
import type { Ref } from "vue";
|
|
2
|
+
import { unref } from "vue";
|
|
3
|
+
import { utils } from "@milaboratories/helpers";
|
|
4
4
|
|
|
5
5
|
type MaybeRef<T> = T | Ref<T>;
|
|
6
6
|
|
|
7
7
|
export function getColumnPositions(tableRef: MaybeRef<HTMLElement | undefined>) {
|
|
8
|
-
const ths = utils.tapIf(unref(tableRef)?.querySelectorAll(
|
|
8
|
+
const ths = utils.tapIf(unref(tableRef)?.querySelectorAll(".th-cell"), (l) => [...l]) ?? [];
|
|
9
9
|
return ths
|
|
10
10
|
.map((th, index) => {
|
|
11
11
|
const { width, x } = th.getBoundingClientRect();
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import
|
|
3
|
-
import { computed, reactive, ref, unref, onMounted, nextTick, watchPostEffect } from
|
|
4
|
-
import TdCell from
|
|
5
|
-
import type { Settings, Data } from
|
|
6
|
-
import { useResize } from
|
|
7
|
-
import { utils, strings } from
|
|
8
|
-
import AddColumnBtn from
|
|
9
|
-
import TableIcon from
|
|
10
|
-
import ThCell from
|
|
11
|
-
import TRow from
|
|
12
|
-
import { compareRecords } from
|
|
13
|
-
import { throttle } from
|
|
14
|
-
import { useEventListener } from
|
|
2
|
+
import "./assets/style.scss";
|
|
3
|
+
import { computed, reactive, ref, unref, onMounted, nextTick, watchPostEffect } from "vue";
|
|
4
|
+
import TdCell from "./TdCell.vue";
|
|
5
|
+
import type { Settings, Data } from "./types";
|
|
6
|
+
import { useResize } from "./useResize";
|
|
7
|
+
import { utils, strings } from "@milaboratories/helpers";
|
|
8
|
+
import AddColumnBtn from "./AddColumnBtn.vue";
|
|
9
|
+
import TableIcon from "./assets/TableIcon.vue";
|
|
10
|
+
import ThCell from "./ThCell.vue";
|
|
11
|
+
import TRow from "./TRow.vue";
|
|
12
|
+
import { compareRecords } from "./domain";
|
|
13
|
+
import { throttle } from "../../helpers/utils";
|
|
14
|
+
import { useEventListener } from "../../index";
|
|
15
15
|
|
|
16
16
|
const minRowHeight = 40;
|
|
17
17
|
|
|
@@ -19,7 +19,7 @@ const { tapIf, tap } = utils;
|
|
|
19
19
|
|
|
20
20
|
const { uniqueId } = strings;
|
|
21
21
|
|
|
22
|
-
defineEmits([
|
|
22
|
+
defineEmits(["click:cell", "delete:row", "delete:column", "change:sort", "update:value"]);
|
|
23
23
|
|
|
24
24
|
const props = defineProps<{
|
|
25
25
|
settings: Settings;
|
|
@@ -46,7 +46,7 @@ const updateBodyHeight = () => {
|
|
|
46
46
|
|
|
47
47
|
const columnsRef = computed(() => {
|
|
48
48
|
if (props.settings.autoLastColumn) {
|
|
49
|
-
return [...props.settings.columns, { name: uniqueId(), text:
|
|
49
|
+
return [...props.settings.columns, { name: uniqueId(), text: "_" }];
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
return props.settings.columns;
|
|
@@ -60,27 +60,27 @@ const gridTemplateColumns = computed(() => {
|
|
|
60
60
|
.map((col, index) => {
|
|
61
61
|
if (index == columns.length - 1) {
|
|
62
62
|
if (hasMeta) {
|
|
63
|
-
return
|
|
63
|
+
return "minmax(100px, 1fr)";
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
return col.width ??
|
|
66
|
+
return col.width ?? "minmax(100px, 1fr)";
|
|
67
67
|
}
|
|
68
68
|
if (columnsMeta[index]) {
|
|
69
|
-
return columnsMeta[index].width +
|
|
69
|
+
return columnsMeta[index].width + "px";
|
|
70
70
|
}
|
|
71
|
-
return col.width ??
|
|
71
|
+
return col.width ?? "140px";
|
|
72
72
|
})
|
|
73
|
-
.join(
|
|
73
|
+
.join(" ");
|
|
74
74
|
});
|
|
75
75
|
|
|
76
76
|
const noDataStyle = computed(() => ({
|
|
77
|
-
gridColumn:
|
|
77
|
+
gridColumn: "1 / " + unref(columnsRef).length + 1,
|
|
78
78
|
}));
|
|
79
79
|
|
|
80
80
|
const classes = computed(() => {
|
|
81
81
|
return unref(columnsRef).reduce(
|
|
82
82
|
(r, col) => {
|
|
83
|
-
r[col.name] = col.justify ?
|
|
83
|
+
r[col.name] = col.justify ? "justify-" + col.justify : "";
|
|
84
84
|
return r;
|
|
85
85
|
},
|
|
86
86
|
{} as Record<string, string>,
|
|
@@ -102,7 +102,7 @@ const rows = computed(() => {
|
|
|
102
102
|
}
|
|
103
103
|
return acc;
|
|
104
104
|
},
|
|
105
|
-
{} as Record<string,
|
|
105
|
+
{} as Record<string, "DESC" | "ASC">,
|
|
106
106
|
);
|
|
107
107
|
|
|
108
108
|
if (Object.keys(sorts).length) {
|
|
@@ -115,7 +115,7 @@ const rows = computed(() => {
|
|
|
115
115
|
let offset = 0;
|
|
116
116
|
|
|
117
117
|
return rows.map((row, rowIndex) => {
|
|
118
|
-
const height = tap(row[
|
|
118
|
+
const height = tap(row["__height"] ? Number(row["__height"]) : minRowHeight, (n) => {
|
|
119
119
|
return !Number.isFinite(n) || n < minRowHeight ? minRowHeight : n;
|
|
120
120
|
});
|
|
121
121
|
|
|
@@ -125,13 +125,15 @@ const rows = computed(() => {
|
|
|
125
125
|
colName,
|
|
126
126
|
rowIndex,
|
|
127
127
|
value: row[colName],
|
|
128
|
-
class: classes.value[colName] + (rowIndex === data.rowIndex ?
|
|
128
|
+
class: classes.value[colName] + (rowIndex === data.rowIndex ? " hovered" : ""),
|
|
129
129
|
slot: col.slot,
|
|
130
130
|
editable: col.editable,
|
|
131
131
|
};
|
|
132
132
|
});
|
|
133
133
|
|
|
134
|
-
const visible = bodyHeight
|
|
134
|
+
const visible = bodyHeight
|
|
135
|
+
? scrollTop < offset + height + safeGap && offset < bodyHeight + scrollTop + safeGap
|
|
136
|
+
: false;
|
|
135
137
|
|
|
136
138
|
offset += height + 1;
|
|
137
139
|
|
|
@@ -169,12 +171,12 @@ function onExpand(colName: string) {
|
|
|
169
171
|
const length = utils.call(() => {
|
|
170
172
|
const value = row[colName];
|
|
171
173
|
|
|
172
|
-
if (value && typeof value ===
|
|
173
|
-
const segments = value[
|
|
174
|
-
return segments.map((s) => s.sequence).join(
|
|
174
|
+
if (value && typeof value === "object" && "segments" in value) {
|
|
175
|
+
const segments = value["segments"] as { sequence: string }[];
|
|
176
|
+
return segments.map((s) => s.sequence).join("").length;
|
|
175
177
|
}
|
|
176
178
|
|
|
177
|
-
return String(value ??
|
|
179
|
+
return String(value ?? "").length;
|
|
178
180
|
});
|
|
179
181
|
const w = 9.52 * length;
|
|
180
182
|
return w > width ? w : width;
|
|
@@ -191,7 +193,7 @@ watchPostEffect(() => {
|
|
|
191
193
|
nextTick(updateBodyHeight);
|
|
192
194
|
});
|
|
193
195
|
|
|
194
|
-
useEventListener(window,
|
|
196
|
+
useEventListener(window, "resize", () => nextTick(updateBodyHeight));
|
|
195
197
|
</script>
|
|
196
198
|
|
|
197
199
|
<template>
|
|
@@ -216,7 +218,14 @@ useEventListener(window, 'resize', () => nextTick(updateBodyHeight));
|
|
|
216
218
|
<div>No Data To Show</div>
|
|
217
219
|
</div>
|
|
218
220
|
</div>
|
|
219
|
-
<TRow
|
|
221
|
+
<TRow
|
|
222
|
+
v-for="(row, i) in rows"
|
|
223
|
+
:key="i"
|
|
224
|
+
:visible="row.visible"
|
|
225
|
+
:height="row.height"
|
|
226
|
+
:index="i"
|
|
227
|
+
:style="{ gridTemplateColumns }"
|
|
228
|
+
>
|
|
220
229
|
<TdCell
|
|
221
230
|
v-for="(cell, k) in row.cells"
|
|
222
231
|
:key="k"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ListOption } from
|
|
1
|
+
import type { ListOption } from "../../types";
|
|
2
2
|
|
|
3
3
|
type TypeMap = {
|
|
4
4
|
integer: number;
|
|
@@ -13,20 +13,23 @@ export type ColumnSettings = {
|
|
|
13
13
|
text: string;
|
|
14
14
|
name: string;
|
|
15
15
|
width?: string;
|
|
16
|
-
justify?:
|
|
16
|
+
justify?: "center" | "start";
|
|
17
17
|
sort?: {
|
|
18
|
-
direction:
|
|
18
|
+
direction: "DESC" | "ASC" | undefined;
|
|
19
19
|
};
|
|
20
20
|
slot?: boolean;
|
|
21
21
|
editable?: boolean;
|
|
22
22
|
valueType?: ValueType;
|
|
23
23
|
};
|
|
24
24
|
|
|
25
|
-
export type ShowContextOptions = <T extends string = string>(
|
|
25
|
+
export type ShowContextOptions = <T extends string = string>(
|
|
26
|
+
options: ListOption<T>[],
|
|
27
|
+
onSelect: (op: T) => void,
|
|
28
|
+
) => void;
|
|
26
29
|
|
|
27
|
-
export type ColumnEvent =
|
|
30
|
+
export type ColumnEvent = "delete:column" | "expand:column";
|
|
28
31
|
|
|
29
|
-
export type CellEvent =
|
|
32
|
+
export type CellEvent = "delete:row" | "update:value";
|
|
30
33
|
|
|
31
34
|
export type Settings = {
|
|
32
35
|
columns: ColumnSettings[];
|
|
@@ -53,11 +56,11 @@ export type Data = {
|
|
|
53
56
|
resize: boolean;
|
|
54
57
|
resizeTh:
|
|
55
58
|
| {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
index: number;
|
|
60
|
+
width: number;
|
|
61
|
+
x: number;
|
|
62
|
+
right: number;
|
|
63
|
+
}
|
|
61
64
|
| undefined;
|
|
62
65
|
bodyHeight: number;
|
|
63
66
|
scrollTop: number;
|