@milaboratories/uikit 2.10.14 → 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 +191 -191
- 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 +16 -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 +22 -23
- 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,4 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type {
|
|
2
|
+
FilterSpec,
|
|
3
|
+
FilterSpecOfType,
|
|
4
|
+
FilterSpecType,
|
|
5
|
+
SimplifiedPColumnSpec,
|
|
6
|
+
SUniversalPColumnId,
|
|
7
|
+
} from "@platforma-sdk/model";
|
|
2
8
|
|
|
3
9
|
/** Metadata about a single field in FilterSpec */
|
|
4
10
|
export type FilterSpecTypeField<V> = {
|
|
@@ -8,11 +14,13 @@ export type FilterSpecTypeField<V> = {
|
|
|
8
14
|
};
|
|
9
15
|
|
|
10
16
|
/** Converts each field in FilterSpec to FilterSpecTypeField */
|
|
11
|
-
export type FilterSpecTypeFieldRecord<T extends FilterSpec> = {
|
|
17
|
+
export type FilterSpecTypeFieldRecord<T extends FilterSpec> = {
|
|
18
|
+
[K in keyof T]: FilterSpecTypeField<T[K]>;
|
|
19
|
+
};
|
|
12
20
|
|
|
13
21
|
/** Extracts FilterSpecOfType from FilterSpecType */
|
|
14
22
|
export type FilterSpecFormField<T extends FilterSpec> = {
|
|
15
|
-
[K in keyof T]: FilterSpecTypeField<T[K]
|
|
23
|
+
[K in keyof T]: FilterSpecTypeField<T[K]>;
|
|
16
24
|
};
|
|
17
25
|
|
|
18
26
|
/** Metadata about all supported filter types */
|
|
@@ -21,24 +29,39 @@ export type FilterSpecMetadataRecord<T extends FilterSpecType> = {
|
|
|
21
29
|
label: string;
|
|
22
30
|
labelNot?: string;
|
|
23
31
|
form: FilterSpecFormField<FilterSpecOfType<P>>;
|
|
24
|
-
supportedFor: (
|
|
25
|
-
|
|
32
|
+
supportedFor: (
|
|
33
|
+
spec1: SimplifiedPColumnSpec,
|
|
34
|
+
spec2: SimplifiedPColumnSpec | undefined,
|
|
35
|
+
) => boolean;
|
|
36
|
+
};
|
|
26
37
|
};
|
|
27
38
|
|
|
28
39
|
/** Converts FilterSpecType to a literal string representing the type */
|
|
29
|
-
export type FilterSpecTypeToLiteral<T> =
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
export type FilterSpecTypeToLiteral<T> = [T] extends [FilterSpecType]
|
|
41
|
+
? "FilterType"
|
|
42
|
+
: [T] extends [SUniversalPColumnId]
|
|
43
|
+
? "SUniversalPColumnId"
|
|
44
|
+
: [T] extends [number]
|
|
45
|
+
? "number"
|
|
46
|
+
: [T] extends [number | undefined]
|
|
47
|
+
? "number?"
|
|
48
|
+
: [T] extends [string]
|
|
49
|
+
? "string"
|
|
50
|
+
: [T] extends [string | undefined]
|
|
51
|
+
? "string?"
|
|
52
|
+
: [T] extends [boolean]
|
|
53
|
+
? "boolean"
|
|
54
|
+
: [T] extends [boolean | undefined]
|
|
55
|
+
? "boolean?"
|
|
56
|
+
: [T] extends [unknown[]]
|
|
57
|
+
? "unknown[]"
|
|
58
|
+
: // this is special
|
|
59
|
+
T extends number
|
|
60
|
+
? "number"
|
|
61
|
+
: T extends string
|
|
62
|
+
? "string"
|
|
63
|
+
: T extends boolean
|
|
64
|
+
? "boolean"
|
|
65
|
+
: T extends Record<string, unknown>
|
|
66
|
+
? "form"
|
|
67
|
+
: "unknown";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { Ref } from
|
|
2
|
-
import { useEventListener } from
|
|
3
|
-
import { flatValue } from
|
|
1
|
+
import type { Ref } from "vue";
|
|
2
|
+
import { useEventListener } from "./useEventListener";
|
|
3
|
+
import { flatValue } from "../helpers/functions";
|
|
4
4
|
|
|
5
5
|
type HtmlRef = Ref<HTMLElement | undefined>;
|
|
6
6
|
|
|
7
7
|
export function useClickOutside(el: HtmlRef | HtmlRef[], cb: () => void) {
|
|
8
|
-
useEventListener(document,
|
|
8
|
+
useEventListener(document, "click", (event) => {
|
|
9
9
|
if (!document.contains(event.target as Node)) {
|
|
10
10
|
return;
|
|
11
11
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { InferComponentProps } from
|
|
2
|
-
import { computed, type Component, type ComputedRef } from
|
|
1
|
+
import type { InferComponentProps } from "../types";
|
|
2
|
+
import { computed, type Component, type ComputedRef } from "vue";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* A utility function that creates a reactive computed property
|
|
@@ -31,6 +31,8 @@ import { computed, type Component, type ComputedRef } from 'vue';
|
|
|
31
31
|
* console.log(propValue.value); // Outputs: 'example'
|
|
32
32
|
* ```
|
|
33
33
|
*/
|
|
34
|
-
export function useComponentProp<C extends Component, P extends keyof InferComponentProps<C>>(
|
|
34
|
+
export function useComponentProp<C extends Component, P extends keyof InferComponentProps<C>>(
|
|
35
|
+
cb: () => InferComponentProps<C>[P],
|
|
36
|
+
): ComputedRef<InferComponentProps<C>[P]> {
|
|
35
37
|
return computed(cb);
|
|
36
38
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { h, render } from
|
|
2
|
-
import PlConfirmDialog from
|
|
1
|
+
import { h, render } from "vue";
|
|
2
|
+
import PlConfirmDialog from "../components/PlConfirmDialog.vue";
|
|
3
3
|
|
|
4
4
|
export type ConfirmProps = {
|
|
5
5
|
title: string;
|
|
@@ -15,13 +15,13 @@ export function useConfirm(props: ConfirmProps) {
|
|
|
15
15
|
opened: true,
|
|
16
16
|
title: props.title,
|
|
17
17
|
message: props.message,
|
|
18
|
-
confirmLabel: props.confirmLabel ??
|
|
19
|
-
cancelLabel: props.cancelLabel ??
|
|
18
|
+
confirmLabel: props.confirmLabel ?? "Confirm",
|
|
19
|
+
cancelLabel: props.cancelLabel ?? "Cancel",
|
|
20
20
|
onConfirm: () => finish(true),
|
|
21
21
|
onCancel: () => finish(false),
|
|
22
22
|
});
|
|
23
23
|
|
|
24
|
-
const mountPoint = document.createElement(
|
|
24
|
+
const mountPoint = document.createElement("div");
|
|
25
25
|
document.body.appendChild(mountPoint);
|
|
26
26
|
render(vnode, mountPoint);
|
|
27
27
|
|
|
@@ -1,44 +1,47 @@
|
|
|
1
|
-
import type { MaybeRef } from
|
|
2
|
-
import { onMounted, onUnmounted, unref } from
|
|
1
|
+
import type { MaybeRef } from "../types";
|
|
2
|
+
import { onMounted, onUnmounted, unref } from "vue";
|
|
3
3
|
|
|
4
4
|
type Position = {
|
|
5
5
|
x: number;
|
|
6
6
|
y: number;
|
|
7
7
|
};
|
|
8
8
|
|
|
9
|
-
export function useDraggable<T extends HTMLElement>(
|
|
9
|
+
export function useDraggable<T extends HTMLElement>(
|
|
10
|
+
elRef: MaybeRef<T | undefined>,
|
|
11
|
+
cb: (ev: MouseEvent) => void,
|
|
12
|
+
) {
|
|
10
13
|
function onMove(down: Position, ev: MouseEvent) {
|
|
11
14
|
const el = unref(elRef);
|
|
12
15
|
if (!el) {
|
|
13
16
|
return;
|
|
14
17
|
}
|
|
15
18
|
const translate = `translate(${ev.x - down.x}px, ${ev.y - down.y}px)`;
|
|
16
|
-
el.style.setProperty(
|
|
19
|
+
el.style.setProperty("transform", translate);
|
|
17
20
|
cb(ev);
|
|
18
21
|
}
|
|
19
22
|
|
|
20
23
|
function onDown(down: Position) {
|
|
21
24
|
const listener = (e: MouseEvent) => onMove(down, e);
|
|
22
25
|
|
|
23
|
-
document.addEventListener(
|
|
26
|
+
document.addEventListener("mousemove", listener);
|
|
24
27
|
|
|
25
28
|
document.addEventListener(
|
|
26
|
-
|
|
29
|
+
"mouseup",
|
|
27
30
|
() => {
|
|
28
31
|
const el = unref(elRef);
|
|
29
32
|
|
|
30
|
-
document.removeEventListener(
|
|
33
|
+
document.removeEventListener("mousemove", listener);
|
|
31
34
|
|
|
32
35
|
if (!el) {
|
|
33
36
|
return;
|
|
34
37
|
}
|
|
35
38
|
|
|
36
|
-
el.style.setProperty(
|
|
39
|
+
el.style.setProperty("transition", "all .3s ease-in-out");
|
|
37
40
|
|
|
38
|
-
el.style.removeProperty(
|
|
41
|
+
el.style.removeProperty("transform");
|
|
39
42
|
|
|
40
|
-
el.addEventListener(
|
|
41
|
-
el.style.removeProperty(
|
|
43
|
+
el.addEventListener("transitionend", () => {
|
|
44
|
+
el.style.removeProperty("transition");
|
|
42
45
|
});
|
|
43
46
|
},
|
|
44
47
|
{ once: true },
|
|
@@ -46,11 +49,11 @@ export function useDraggable<T extends HTMLElement>(elRef: MaybeRef<T | undefine
|
|
|
46
49
|
}
|
|
47
50
|
|
|
48
51
|
function init() {
|
|
49
|
-
unref(elRef)?.addEventListener(
|
|
52
|
+
unref(elRef)?.addEventListener("mousedown", onDown);
|
|
50
53
|
}
|
|
51
54
|
|
|
52
55
|
function clear() {
|
|
53
|
-
unref(elRef)?.removeEventListener(
|
|
56
|
+
unref(elRef)?.removeEventListener("mousedown", onDown);
|
|
54
57
|
}
|
|
55
58
|
|
|
56
59
|
onMounted(init);
|
|
@@ -1,14 +1,22 @@
|
|
|
1
|
-
import { onMounted, onUnmounted, unref } from
|
|
2
|
-
import type { MaybeRef } from
|
|
1
|
+
import { onMounted, onUnmounted, unref } from "vue";
|
|
2
|
+
import type { MaybeRef } from "../types";
|
|
3
3
|
|
|
4
4
|
type EventMap = WindowEventMap & HTMLElementEventMap & { adjust: Event };
|
|
5
5
|
|
|
6
|
-
export function useEventListener<
|
|
6
|
+
export function useEventListener<
|
|
7
|
+
T extends EventTarget,
|
|
8
|
+
E extends EventMap[K],
|
|
9
|
+
K extends keyof EventMap,
|
|
10
|
+
>(
|
|
7
11
|
target: MaybeRef<T | undefined>,
|
|
8
12
|
type: K,
|
|
9
13
|
callback: (this: T, evt: E) => void,
|
|
10
14
|
options?: AddEventListenerOptions | boolean,
|
|
11
15
|
) {
|
|
12
|
-
onMounted(() =>
|
|
13
|
-
|
|
16
|
+
onMounted(() =>
|
|
17
|
+
unref(target)?.addEventListener(type, callback as (this: T, evt: Event) => void, options),
|
|
18
|
+
);
|
|
19
|
+
onUnmounted(() =>
|
|
20
|
+
unref(target)?.removeEventListener(type, callback as (this: T, evt: Event) => void, options),
|
|
21
|
+
);
|
|
14
22
|
}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import type { ComputedRef, Ref } from
|
|
2
|
-
import { computed } from
|
|
3
|
-
import type { ListOption } from
|
|
4
|
-
import { normalizeListOptions } from
|
|
5
|
-
import type { ListOptionBase } from
|
|
1
|
+
import type { ComputedRef, Ref } from "vue";
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import type { ListOption } from "../types";
|
|
4
|
+
import { normalizeListOptions } from "../helpers/utils";
|
|
5
|
+
import type { ListOptionBase } from "@platforma-sdk/model";
|
|
6
6
|
|
|
7
|
-
export function useFilteredList<V = unknown>(
|
|
7
|
+
export function useFilteredList<V = unknown>(
|
|
8
|
+
optionsRef: Ref<ListOption<V>[]>,
|
|
9
|
+
searchPhrase: Ref<string>,
|
|
10
|
+
): ComputedRef<Readonly<ListOptionBase<V>[]>> {
|
|
8
11
|
return computed(() => {
|
|
9
12
|
const options = normalizeListOptions(optionsRef.value);
|
|
10
13
|
if (searchPhrase.value) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Ref, UnwrapRef } from
|
|
2
|
-
import { reactive, watch } from
|
|
3
|
-
import { objects } from
|
|
1
|
+
import type { Ref, UnwrapRef } from "vue";
|
|
2
|
+
import { reactive, watch } from "vue";
|
|
3
|
+
import { objects } from "@milaboratories/helpers";
|
|
4
4
|
|
|
5
5
|
export function useFormState<Source, D extends Record<string, unknown>>(
|
|
6
6
|
source: Ref<Source>,
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
import type { Ref } from
|
|
2
|
-
import { ref } from
|
|
3
|
-
import { useEventListener } from
|
|
4
|
-
import type { MaybeRef } from
|
|
1
|
+
import type { Ref } from "vue";
|
|
2
|
+
import { ref } from "vue";
|
|
3
|
+
import { useEventListener } from "./useEventListener";
|
|
4
|
+
import type { MaybeRef } from "../types";
|
|
5
5
|
|
|
6
6
|
export interface UseElementHoverOptions {
|
|
7
7
|
delayEnter?: number;
|
|
8
8
|
delayLeave?: number;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
export function useHover(
|
|
11
|
+
export function useHover(
|
|
12
|
+
el: MaybeRef<EventTarget | undefined>,
|
|
13
|
+
options: UseElementHoverOptions = {},
|
|
14
|
+
): Ref<boolean> {
|
|
12
15
|
const { delayEnter = 0, delayLeave = 0 } = options;
|
|
13
16
|
|
|
14
17
|
const isHovered = ref(false);
|
|
@@ -28,8 +31,8 @@ export function useHover(el: MaybeRef<EventTarget | undefined>, options: UseElem
|
|
|
28
31
|
|
|
29
32
|
if (!window) return isHovered;
|
|
30
33
|
|
|
31
|
-
useEventListener(el,
|
|
32
|
-
useEventListener(el,
|
|
34
|
+
useEventListener(el, "mouseenter", () => toggle(true));
|
|
35
|
+
useEventListener(el, "mouseleave", () => toggle(false));
|
|
33
36
|
|
|
34
37
|
return isHovered;
|
|
35
38
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Ref } from
|
|
2
|
-
import { ref, watch } from
|
|
3
|
-
import { notEmpty } from
|
|
1
|
+
import type { Ref } from "vue";
|
|
2
|
+
import { ref, watch } from "vue";
|
|
3
|
+
import { notEmpty } from "@milaboratories/helpers";
|
|
4
4
|
|
|
5
5
|
const $store = new Map<string, Ref<string | null>>();
|
|
6
6
|
|
|
@@ -9,7 +9,7 @@ function getValue(key: string) {
|
|
|
9
9
|
$store.set(key, ref(localStorage.getItem(key)));
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
return notEmpty($store.get(key),
|
|
12
|
+
return notEmpty($store.get(key), "...");
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
function setValue(key: string, v: string | null | undefined) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { onMounted, onUnmounted, reactive } from
|
|
1
|
+
import { onMounted, onUnmounted, reactive } from "vue";
|
|
2
2
|
|
|
3
3
|
export function useMouse() {
|
|
4
4
|
const pos = reactive({
|
|
@@ -11,8 +11,8 @@ export function useMouse() {
|
|
|
11
11
|
pos.y = event.pageY;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
onMounted(() => window.addEventListener(
|
|
15
|
-
onUnmounted(() => window.removeEventListener(
|
|
14
|
+
onMounted(() => window.addEventListener("mousemove", update));
|
|
15
|
+
onUnmounted(() => window.removeEventListener("mousemove", update));
|
|
16
16
|
|
|
17
17
|
return pos;
|
|
18
18
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { MaybeRef } from
|
|
2
|
-
import { unref } from
|
|
3
|
-
import { useEventListener } from
|
|
1
|
+
import type { MaybeRef } from "../types";
|
|
2
|
+
import { unref } from "vue";
|
|
3
|
+
import { useEventListener } from "./useEventListener";
|
|
4
4
|
|
|
5
5
|
type CustomEvent = {
|
|
6
6
|
x: number;
|
|
@@ -16,7 +16,10 @@ type CaptureState = {
|
|
|
16
16
|
y: number;
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
-
export function useMouseCapture<T extends HTMLElement>(
|
|
19
|
+
export function useMouseCapture<T extends HTMLElement>(
|
|
20
|
+
elRef: MaybeRef<T | undefined>,
|
|
21
|
+
cb: (ev: CustomEvent, state: CaptureState) => void,
|
|
22
|
+
) {
|
|
20
23
|
const state: CaptureState = {
|
|
21
24
|
el: undefined as HTMLElement | undefined,
|
|
22
25
|
x: 0,
|
|
@@ -30,7 +33,7 @@ export function useMouseCapture<T extends HTMLElement>(elRef: MaybeRef<T | undef
|
|
|
30
33
|
dy: ev.y - state.y,
|
|
31
34
|
});
|
|
32
35
|
|
|
33
|
-
useEventListener(document,
|
|
36
|
+
useEventListener(document, "mousedown", (ev) => {
|
|
34
37
|
if (ev.target === unref(elRef)) {
|
|
35
38
|
// disable selection when moving
|
|
36
39
|
if (ev.stopPropagation) ev.stopPropagation();
|
|
@@ -41,7 +44,7 @@ export function useMouseCapture<T extends HTMLElement>(elRef: MaybeRef<T | undef
|
|
|
41
44
|
}
|
|
42
45
|
});
|
|
43
46
|
|
|
44
|
-
useEventListener(document,
|
|
47
|
+
useEventListener(document, "mouseup", (ev) => {
|
|
45
48
|
if (!state.el) {
|
|
46
49
|
return;
|
|
47
50
|
}
|
|
@@ -57,7 +60,7 @@ export function useMouseCapture<T extends HTMLElement>(elRef: MaybeRef<T | undef
|
|
|
57
60
|
);
|
|
58
61
|
});
|
|
59
62
|
|
|
60
|
-
useEventListener(document,
|
|
63
|
+
useEventListener(document, "mousemove", (ev) => {
|
|
61
64
|
if (state.el) {
|
|
62
65
|
cb(createCustom(ev), state);
|
|
63
66
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { type Ref, ref } from
|
|
2
|
-
import { call } from
|
|
3
|
-
import { useElementPosition } from
|
|
1
|
+
import { type Ref, ref } from "vue";
|
|
2
|
+
import { call } from "../helpers/utils";
|
|
3
|
+
import { useElementPosition } from "./usePosition";
|
|
4
4
|
|
|
5
5
|
export function useNotificationPosition(el: Ref<HTMLElement | undefined>) {
|
|
6
|
-
const style = ref(
|
|
6
|
+
const style = ref("");
|
|
7
7
|
|
|
8
8
|
useElementPosition(el, (pos) => {
|
|
9
9
|
style.value = call(() => {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type { MaybeRef, WatchSource } from
|
|
2
|
-
import { onScopeDispose, readonly, ref, shallowRef, toValue, watch } from
|
|
1
|
+
import type { MaybeRef, WatchSource } from "vue";
|
|
2
|
+
import { onScopeDispose, readonly, ref, shallowRef, toValue, watch } from "vue";
|
|
3
3
|
|
|
4
|
-
type AbortReason =
|
|
4
|
+
type AbortReason = "args" | "pause" | "dispose";
|
|
5
5
|
|
|
6
6
|
type PollingData<Result> =
|
|
7
|
-
| { status:
|
|
8
|
-
| { status:
|
|
9
|
-
| { status:
|
|
7
|
+
| { status: "idle" }
|
|
8
|
+
| { status: "synced"; value: Result }
|
|
9
|
+
| { status: "stale"; value: Result };
|
|
10
10
|
|
|
11
11
|
interface InternalOptions {
|
|
12
12
|
minInterval: MaybeRef<number>;
|
|
@@ -23,13 +23,13 @@ interface Waiter {
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
const enum ScheduleSource {
|
|
26
|
-
Normal =
|
|
27
|
-
External =
|
|
26
|
+
Normal = "normal",
|
|
27
|
+
External = "external",
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
function toError(error: unknown): Error {
|
|
31
31
|
if (error instanceof Error) return error;
|
|
32
|
-
return new Error(typeof error ===
|
|
32
|
+
return new Error(typeof error === "string" ? error : JSON.stringify(error));
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
/**
|
|
@@ -147,7 +147,7 @@ export function usePollingQuery<Args, Result>(
|
|
|
147
147
|
};
|
|
148
148
|
const canRun = () => resolveMinInterval() > 0;
|
|
149
149
|
|
|
150
|
-
const data = shallowRef<PollingData<Result>>({ status:
|
|
150
|
+
const data = shallowRef<PollingData<Result>>({ status: "idle" });
|
|
151
151
|
const lastError = ref<Error | null>(null);
|
|
152
152
|
const isActive = ref(false);
|
|
153
153
|
|
|
@@ -175,9 +175,9 @@ export function usePollingQuery<Args, Result>(
|
|
|
175
175
|
};
|
|
176
176
|
|
|
177
177
|
const markStale = () => {
|
|
178
|
-
if (data.value.status ===
|
|
178
|
+
if (data.value.status === "synced" || data.value.status === "stale") {
|
|
179
179
|
const { value } = data.value;
|
|
180
|
-
data.value = { status:
|
|
180
|
+
data.value = { status: "stale", value };
|
|
181
181
|
}
|
|
182
182
|
};
|
|
183
183
|
|
|
@@ -279,11 +279,14 @@ export function usePollingQuery<Args, Result>(
|
|
|
279
279
|
};
|
|
280
280
|
|
|
281
281
|
try {
|
|
282
|
-
const result = await queryFn(argsSnapshot, {
|
|
282
|
+
const result = await queryFn(argsSnapshot, {
|
|
283
|
+
signal: controller.signal,
|
|
284
|
+
pause: pauseFromCallback,
|
|
285
|
+
});
|
|
283
286
|
if (!controller.signal.aborted) {
|
|
284
287
|
if (version === latestVersion && assignedArgsVersion === argsVersion) {
|
|
285
288
|
lastError.value = null;
|
|
286
|
-
data.value = { status:
|
|
289
|
+
data.value = { status: "synced", value: result };
|
|
287
290
|
}
|
|
288
291
|
}
|
|
289
292
|
} catch (error) {
|
|
@@ -312,8 +315,7 @@ export function usePollingQuery<Args, Result>(
|
|
|
312
315
|
abortReasons.delete(version);
|
|
313
316
|
}
|
|
314
317
|
|
|
315
|
-
const shouldSchedule
|
|
316
|
-
= isActive.value && !disposed && reason !== 'args';
|
|
318
|
+
const shouldSchedule = isActive.value && !disposed && reason !== "args";
|
|
317
319
|
|
|
318
320
|
if (shouldSchedule) {
|
|
319
321
|
queueExecution();
|
|
@@ -329,7 +331,7 @@ export function usePollingQuery<Args, Result>(
|
|
|
329
331
|
const handleArgsChange = () => {
|
|
330
332
|
argsVersion += 1;
|
|
331
333
|
markStale();
|
|
332
|
-
abortAll(
|
|
334
|
+
abortAll("args");
|
|
333
335
|
|
|
334
336
|
if (!isActive.value || !canRun()) {
|
|
335
337
|
return;
|
|
@@ -355,7 +357,7 @@ export function usePollingQuery<Args, Result>(
|
|
|
355
357
|
isActive.value = false;
|
|
356
358
|
clearScheduled();
|
|
357
359
|
clearDebounce();
|
|
358
|
-
abortAll(
|
|
360
|
+
abortAll("pause");
|
|
359
361
|
nextMinIntervalStart = Date.now();
|
|
360
362
|
nextMinDelayStart = Date.now();
|
|
361
363
|
};
|
|
@@ -382,7 +384,7 @@ export function usePollingQuery<Args, Result>(
|
|
|
382
384
|
disposed = true;
|
|
383
385
|
clearScheduled();
|
|
384
386
|
clearDebounce();
|
|
385
|
-
abortAll(
|
|
387
|
+
abortAll("dispose");
|
|
386
388
|
isActive.value = false;
|
|
387
389
|
waiters.splice(0, waiters.length).forEach(({ resolve }) => resolve());
|
|
388
390
|
});
|
|
@@ -397,7 +399,7 @@ export function usePollingQuery<Args, Result>(
|
|
|
397
399
|
}
|
|
398
400
|
handleArgsChange();
|
|
399
401
|
},
|
|
400
|
-
{ flush:
|
|
402
|
+
{ flush: "sync", immediate: true },
|
|
401
403
|
);
|
|
402
404
|
|
|
403
405
|
if (internal.autoStart && canRun()) {
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
import { type Ref, onMounted } from
|
|
2
|
-
import { useEventListener } from
|
|
3
|
-
import { requestTick } from
|
|
4
|
-
import type { ElementPosition } from
|
|
1
|
+
import { type Ref, onMounted } from "vue";
|
|
2
|
+
import { useEventListener } from "./useEventListener";
|
|
3
|
+
import { requestTick } from "../helpers/utils";
|
|
4
|
+
import type { ElementPosition } from "../types";
|
|
5
5
|
|
|
6
|
-
export function useElementPosition(
|
|
6
|
+
export function useElementPosition(
|
|
7
|
+
el: Ref<HTMLElement | undefined>,
|
|
8
|
+
cb: (pos: ElementPosition) => void,
|
|
9
|
+
) {
|
|
7
10
|
const update = () => {
|
|
8
11
|
if (el.value) {
|
|
9
|
-
const { scrollTop, scrollLeft, scrollHeight, scrollWidth, clientHeight, clientWidth } =
|
|
12
|
+
const { scrollTop, scrollLeft, scrollHeight, scrollWidth, clientHeight, clientWidth } =
|
|
13
|
+
document.documentElement;
|
|
10
14
|
const rect = el.value.getBoundingClientRect();
|
|
11
15
|
cb({
|
|
12
16
|
scrollTop,
|
|
@@ -33,9 +37,9 @@ export function useElementPosition(el: Ref<HTMLElement | undefined>, cb: (pos: E
|
|
|
33
37
|
|
|
34
38
|
onMounted(handle);
|
|
35
39
|
|
|
36
|
-
useEventListener(window,
|
|
40
|
+
useEventListener(window, "scroll", handle, { capture: true, passive: true });
|
|
37
41
|
|
|
38
|
-
useEventListener(window,
|
|
42
|
+
useEventListener(window, "resize", handle, { passive: true });
|
|
39
43
|
|
|
40
|
-
useEventListener(window,
|
|
44
|
+
useEventListener(window, "adjust", handle, true);
|
|
41
45
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { reactive } from
|
|
2
|
-
import { debounce } from
|
|
1
|
+
import { reactive } from "vue";
|
|
2
|
+
import { debounce } from "@milaboratories/helpers";
|
|
3
3
|
|
|
4
4
|
export function useQuery<P extends unknown[], R>(fn: (...args: P) => Promise<R>) {
|
|
5
5
|
const self = reactive({
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import { onUnmounted, unref } from
|
|
2
|
-
import { tapIf } from
|
|
3
|
-
import { onChanged } from
|
|
4
|
-
import { startResizeObserving, stopResizeObserving } from
|
|
5
|
-
import type { MaybeRef } from
|
|
1
|
+
import { onUnmounted, unref } from "vue";
|
|
2
|
+
import { tapIf } from "../helpers/functions";
|
|
3
|
+
import { onChanged } from "./utils";
|
|
4
|
+
import { startResizeObserving, stopResizeObserving } from "../global/resizeObserver";
|
|
5
|
+
import type { MaybeRef } from "../types";
|
|
6
6
|
|
|
7
|
-
export function useResizeObserver<T extends HTMLElement>(
|
|
7
|
+
export function useResizeObserver<T extends HTMLElement>(
|
|
8
|
+
target: MaybeRef<T | undefined>,
|
|
9
|
+
cb: (el?: T | undefined) => void,
|
|
10
|
+
) {
|
|
8
11
|
onChanged(() => {
|
|
9
12
|
tapIf(unref(target), (el) => {
|
|
10
13
|
startResizeObserving(el, () => cb(el));
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import type { Ref } from
|
|
2
|
-
import { onMounted } from
|
|
1
|
+
import type { Ref } from "vue";
|
|
2
|
+
import { onMounted } from "vue";
|
|
3
3
|
|
|
4
4
|
export function useRipple(el: Ref<HTMLElement | undefined>) {
|
|
5
5
|
function createRipple(event: MouseEvent) {
|
|
6
6
|
const button = event.currentTarget as HTMLButtonElement;
|
|
7
7
|
|
|
8
|
-
const circle = document.createElement(
|
|
8
|
+
const circle = document.createElement("span");
|
|
9
9
|
const diameter = Math.max(button.clientWidth, button.clientHeight);
|
|
10
10
|
const radius = diameter / 2;
|
|
11
11
|
|
|
12
12
|
circle.style.width = circle.style.height = `${diameter}px`;
|
|
13
13
|
circle.style.left = `${event.clientX - button.offsetLeft - radius}px`;
|
|
14
14
|
circle.style.top = `${event.clientY - button.offsetTop - radius}px`;
|
|
15
|
-
circle.classList.add(
|
|
15
|
+
circle.classList.add("ripple");
|
|
16
16
|
|
|
17
|
-
const ripple = button.getElementsByClassName(
|
|
17
|
+
const ripple = button.getElementsByClassName("ripple")[0];
|
|
18
18
|
|
|
19
19
|
if (ripple) {
|
|
20
20
|
ripple.remove();
|
|
@@ -24,6 +24,6 @@ export function useRipple(el: Ref<HTMLElement | undefined>) {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
onMounted(() => {
|
|
27
|
-
el.value?.addEventListener(
|
|
27
|
+
el.value?.addEventListener("click", createRipple);
|
|
28
28
|
});
|
|
29
29
|
}
|