urfu-ui-kit-react 2.1.3 → 2.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -25
- package/dist/components/Accordion/Accordion.js +18 -0
- package/dist/components/BreadCrumbs/BreadCrumbs.d.ts +1 -1
- package/dist/components/BreadCrumbs/BreadCrumbs.d.ts.map +1 -1
- package/dist/components/BreadCrumbs/BreadCrumbs.js +32 -0
- package/dist/components/Button/Button.d.ts +1 -0
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/Button.js +88 -0
- package/dist/components/Button/Button.types.d.ts +9 -3
- package/dist/components/Button/Button.types.d.ts.map +1 -1
- package/dist/components/Button/ButtonRefreshIcon.js +35 -0
- package/dist/components/Calendar/Calendar.d.ts +1 -5
- package/dist/components/Calendar/Calendar.d.ts.map +1 -1
- package/dist/components/Calendar/Calendar.js +355 -0
- package/dist/components/Calendar/CalendarSelect.js +149 -0
- package/dist/components/Calendar/MaskedDateInput.d.ts.map +1 -1
- package/dist/components/Calendar/MaskedDateInput.js +191 -0
- package/dist/components/Calendar/dateMask.d.ts +0 -1
- package/dist/components/Calendar/dateMask.d.ts.map +1 -1
- package/dist/components/Card/Card.d.ts +1 -1
- package/dist/components/Card/Card.d.ts.map +1 -1
- package/dist/components/Card/Card.js +75 -0
- package/dist/components/Checkbox/Checkbox.js +30 -0
- package/dist/components/ColumnSettings/ColumnSettings.js +216 -0
- package/dist/components/ConfirmModal/ConfirmModal.d.ts +1 -0
- package/dist/components/ConfirmModal/ConfirmModal.d.ts.map +1 -1
- package/dist/components/ConfirmModal/ConfirmModal.js +40 -0
- package/dist/components/ErrorScreen/ErrorScreen.d.ts +1 -1
- package/dist/components/ErrorScreen/ErrorScreen.d.ts.map +1 -1
- package/dist/components/ErrorScreen/ErrorScreen.js +221 -0
- package/dist/components/ErrorScreen/ErrorScreenIllustration.js +57 -0
- package/dist/components/FormField/FormField.d.ts +1 -1
- package/dist/components/FormField/FormField.d.ts.map +1 -1
- package/dist/components/FormField/FormField.js +40 -0
- package/dist/components/Icon/Icon.d.ts +1 -1
- package/dist/components/Icon/Icon.d.ts.map +1 -1
- package/dist/components/Icon/Icon.js +32 -0
- package/dist/components/Icon/Icon.types.d.ts +3 -1
- package/dist/components/Icon/Icon.types.d.ts.map +1 -1
- package/dist/components/InputExpandTextarea/InputExpandTextarea.d.ts +1 -1
- package/dist/components/InputExpandTextarea/InputExpandTextarea.d.ts.map +1 -1
- package/dist/components/InputExpandTextarea/InputExpandTextarea.js +144 -0
- package/dist/components/InputFile/InputFile.d.ts +1 -1
- package/dist/components/InputFile/InputFile.d.ts.map +1 -1
- package/dist/components/InputFile/InputFile.js +203 -0
- package/dist/components/InputFile/InputFile.types.d.ts +0 -6
- package/dist/components/InputFile/InputFile.types.d.ts.map +1 -1
- package/dist/components/InputNumber/InputNumber.d.ts +1 -1
- package/dist/components/InputNumber/InputNumber.d.ts.map +1 -1
- package/dist/components/InputNumber/InputNumber.js +220 -0
- package/dist/components/InputText/InputAffix.d.ts +1 -1
- package/dist/components/InputText/InputAffix.js +109 -0
- package/dist/components/InputText/InputText.d.ts +2 -1
- package/dist/components/InputText/InputText.d.ts.map +1 -1
- package/dist/components/InputText/InputText.js +137 -0
- package/dist/components/InputTime/InputTime.d.ts +1 -1
- package/dist/components/InputTime/InputTime.d.ts.map +1 -1
- package/dist/components/InputTime/InputTime.js +335 -0
- package/dist/components/InputTime/InputTimeDropdown.js +31 -0
- package/dist/components/InputTime/inputTimeKeyDown.js +63 -0
- package/dist/components/InputTime/useInputTimeWheel.js +45 -0
- package/dist/components/Menu/Menu.d.ts +1 -1
- package/dist/components/Menu/Menu.d.ts.map +1 -1
- package/dist/components/Menu/Menu.js +113 -0
- package/dist/components/Message/Message.js +29 -0
- package/dist/components/Modal/Modal.d.ts +1 -0
- package/dist/components/Modal/Modal.d.ts.map +1 -1
- package/dist/components/Modal/Modal.js +102 -0
- package/dist/components/Modal/editorFocus.js +15 -0
- package/dist/components/Modal/useModalFocus.js +112 -0
- package/dist/components/Modal/useModalTitleClearance.js +48 -0
- package/dist/components/Multiselect/Multiselect.d.ts +1 -0
- package/dist/components/Multiselect/Multiselect.d.ts.map +1 -1
- package/dist/components/Multiselect/Multiselect.js +408 -0
- package/dist/components/Notification/Notification.d.ts +1 -1
- package/dist/components/Notification/Notification.d.ts.map +1 -1
- package/dist/components/Notification/Notification.js +156 -0
- package/dist/components/OfflineBanner/OfflineBanner.d.ts +1 -1
- package/dist/components/OfflineBanner/OfflineBanner.d.ts.map +1 -1
- package/dist/components/OfflineBanner/OfflineBanner.js +40 -0
- package/dist/components/Pagination/Pagination.d.ts +1 -1
- package/dist/components/Pagination/Pagination.d.ts.map +1 -1
- package/dist/components/Pagination/Pagination.js +126 -0
- package/dist/components/Preloader/Preloader.d.ts.map +1 -1
- package/dist/components/Preloader/Preloader.js +60 -0
- package/dist/components/Radio/Radio.js +34 -0
- package/dist/components/Search/Search.d.ts +1 -1
- package/dist/components/Search/Search.d.ts.map +1 -1
- package/dist/components/Search/Search.js +47 -0
- package/dist/components/SearchSelect/SearchSelect.js +295 -0
- package/dist/components/SearchSelect/SearchSelectOption.js +41 -0
- package/dist/components/SearchSelect/useFlippedPlacement.js +25 -0
- package/dist/components/Select/MobileOptionSheet.d.ts +1 -1
- package/dist/components/Select/MobileOptionSheet.d.ts.map +1 -1
- package/dist/components/Select/MobileOptionSheet.js +116 -0
- package/dist/components/Select/Select.js +319 -0
- package/dist/components/Skeleton/Skeleton.js +38 -0
- package/dist/components/Skeleton/Skeleton.types.d.ts +4 -2
- package/dist/components/Skeleton/Skeleton.types.d.ts.map +1 -1
- package/dist/components/Status/Status.js +43 -0
- package/dist/components/StickyActionBar/StickyActionBar.d.ts +1 -1
- package/dist/components/StickyActionBar/StickyActionBar.d.ts.map +1 -1
- package/dist/components/StickyActionBar/StickyActionBar.js +73 -0
- package/dist/components/Switch/Switch.d.ts +1 -1
- package/dist/components/Switch/Switch.d.ts.map +1 -1
- package/dist/components/Switch/Switch.js +29 -0
- package/dist/components/Table/Filter/DefaultInput.d.ts.map +1 -1
- package/dist/components/Table/Filter/DefaultInput.js +22 -0
- package/dist/components/Table/Filter/Filter.js +233 -0
- package/dist/components/Table/Filter/Filter.types.d.ts +17 -13
- package/dist/components/Table/Filter/Filter.types.d.ts.map +1 -1
- package/dist/components/Table/Filter/FilterBooleanBox.d.ts +1 -0
- package/dist/components/Table/Filter/FilterBooleanBox.d.ts.map +1 -1
- package/dist/components/Table/Filter/FilterBooleanBox.js +40 -0
- package/dist/components/Table/Filter/FilterBoxShell.js +89 -0
- package/dist/components/Table/Filter/FilterConditionSelect.js +14 -0
- package/dist/components/Table/Filter/FilterDateBox.d.ts +1 -0
- package/dist/components/Table/Filter/FilterDateBox.d.ts.map +1 -1
- package/dist/components/Table/Filter/FilterDateBox.js +173 -0
- package/dist/components/Table/Filter/FilterPanel.js +25 -0
- package/dist/components/Table/Filter/FilterSortIndicator.js +24 -0
- package/dist/components/Table/Filter/FilterStringBox.js +115 -0
- package/dist/components/Table/Filter/Functions.d.ts +0 -6
- package/dist/components/Table/Filter/Functions.d.ts.map +1 -1
- package/dist/components/Table/Filter/Functions.js +76 -0
- package/dist/components/Table/Filter/SelectFilter.js +114 -0
- package/dist/components/Table/Filter/SelectOptions.js +21 -0
- package/dist/components/Table/Filter/TableFilterOptions.d.ts +1 -0
- package/dist/components/Table/Filter/TableFilterOptions.d.ts.map +1 -1
- package/dist/components/Table/Filter/TableFilterOptions.js +268 -0
- package/dist/components/Table/Filter/TableFilterSortButton.js +17 -0
- package/dist/components/Table/Filter/filterBoxHelpers.js +2 -0
- package/dist/components/Table/Filter/filterExpression.js +48 -0
- package/dist/components/Table/Filter/filterLoading.js +2 -0
- package/dist/components/Table/Filter/useFilterDates.js +33 -0
- package/dist/components/Table/Filter/useFilterOptionsPreload.js +22 -0
- package/dist/components/Table/Filter/useLocalFilterSearch.js +32 -0
- package/dist/components/Table/Filter/usePagedFilterOptions.js +71 -0
- package/dist/components/Table/Filter/useServerFilterOptions.js +35 -0
- package/dist/components/Table/Filter/useVirtualOptionWindow.js +80 -0
- package/dist/components/Table/Functions.js +54 -0
- package/dist/components/Table/Skeleton/TableSkeleton.js +28 -0
- package/dist/components/Table/Skeleton/createSkeletonColumns.js +9 -0
- package/dist/components/Table/Table.d.ts +1 -0
- package/dist/components/Table/Table.d.ts.map +1 -1
- package/dist/components/Table/Table.dataPipeline.d.ts.map +1 -1
- package/dist/components/Table/Table.dataPipeline.js +75 -0
- package/dist/components/Table/Table.helpers.d.ts +2 -2
- package/dist/components/Table/Table.helpers.d.ts.map +1 -1
- package/dist/components/Table/Table.helpers.js +72 -0
- package/dist/components/Table/Table.js +419 -0
- package/dist/components/Table/Table.types.d.ts +6 -2
- package/dist/components/Table/Table.types.d.ts.map +1 -1
- package/dist/components/Table/TableHead.d.ts.map +1 -1
- package/dist/components/Table/TableHead.js +189 -0
- package/dist/components/Table/TableMobileCard.js +215 -0
- package/dist/components/Table/TableMobileFilters.js +56 -0
- package/dist/components/Table/TableMobileView.js +316 -0
- package/dist/components/Table/TableRow.js +136 -0
- package/dist/components/Table/useColumnResize.d.ts +3 -2
- package/dist/components/Table/useColumnResize.d.ts.map +1 -1
- package/dist/components/Table/useColumnResize.js +44 -0
- package/dist/components/Table/useDelayedSkeleton.d.ts +0 -2
- package/dist/components/Table/useDelayedSkeleton.d.ts.map +1 -1
- package/dist/components/Table/useDelayedSkeleton.js +32 -0
- package/dist/components/Table/useMobileFilterColumns.d.ts +1 -1
- package/dist/components/Table/useMobileFilterColumns.d.ts.map +1 -1
- package/dist/components/Table/useMobileFilterColumns.js +52 -0
- package/dist/components/Table/useStableColumnWidths.js +22 -0
- package/dist/components/Table/useTableColumnPinning.d.ts +2 -57
- package/dist/components/Table/useTableColumnPinning.d.ts.map +1 -1
- package/dist/components/Table/useTableColumnPinning.js +52 -0
- package/dist/components/Table/useTableFilters.js +39 -0
- package/dist/components/Table/useTableSortState.js +38 -0
- package/dist/components/Table/useTableVirtualization.js +145 -0
- package/dist/components/Tabs/Tabs.d.ts +1 -0
- package/dist/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/components/Tabs/Tabs.js +135 -0
- package/dist/components/Tabs/useTabsOverflow.js +49 -0
- package/dist/components/Textarea/Textarea.js +102 -0
- package/dist/components/Tooltip/Tooltip.d.ts +1 -0
- package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/components/Tooltip/Tooltip.js +218 -0
- package/dist/components/TreeView/TreeView.d.ts +1 -0
- package/dist/components/TreeView/TreeView.d.ts.map +1 -1
- package/dist/components/TreeView/TreeView.js +323 -0
- package/dist/components/TreeView/TreeView.types.d.ts +0 -4
- package/dist/components/TreeView/TreeView.types.d.ts.map +1 -1
- package/dist/dev/index.js +2 -2
- package/dist/dev/types/vanilla/src/dev/shown.d.ts +0 -2
- package/dist/dev/types/vanilla/src/dev/store.d.ts +0 -4
- package/dist/fonts/icons/urfu-ui-icon-font.eot +0 -0
- package/dist/fonts/icons/urfu-ui-icon-font.svg +3 -0
- package/dist/fonts/icons/urfu-ui-icon-font.ttf +0 -0
- package/dist/fonts/icons/urfu-ui-icon-font.woff +0 -0
- package/dist/fonts/icons/urfu-ui-icon-font.woff2 +0 -0
- package/dist/hooks/useActiveOptionScroll.js +20 -0
- package/dist/hooks/useAnchoredPosition.js +37 -0
- package/dist/hooks/useAutoId.d.ts +0 -1
- package/dist/hooks/useAutoId.d.ts.map +1 -1
- package/dist/hooks/useAutoId.js +7 -0
- package/dist/hooks/useAutoPortal.js +11 -0
- package/dist/hooks/useDebounce.js +11 -0
- package/dist/hooks/useDismiss.d.ts +1 -1
- package/dist/hooks/useDismiss.d.ts.map +1 -1
- package/dist/hooks/useDismiss.js +20 -0
- package/dist/hooks/useInputOverflow.d.ts +9 -0
- package/dist/hooks/useInputOverflow.d.ts.map +1 -0
- package/dist/hooks/useInputOverflow.js +16 -0
- package/dist/hooks/useMediaQuery.js +21 -0
- package/dist/hooks/useMobilePicker.js +7 -0
- package/dist/hooks/useMountTransition.d.ts +1 -1
- package/dist/hooks/useMountTransition.d.ts.map +1 -1
- package/dist/hooks/useMountTransition.js +21 -0
- package/dist/hooks/useOnlineStatus.js +11 -0
- package/dist/hooks/useOptionKeyboardNavigation.js +63 -0
- package/dist/hooks/usePagination.js +31 -0
- package/dist/hooks/useSelectEngine.d.ts +3 -3
- package/dist/hooks/useSelectEngine.d.ts.map +1 -1
- package/dist/hooks/useSelectEngine.js +96 -0
- package/dist/hooks/useTableSort.js +13 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/responsive/uiKitResponsive.js +44 -0
- package/dist/shared/fieldAccessibility.js +8 -0
- package/dist/shared/iconNames.d.ts +5 -0
- package/dist/shared/iconNames.d.ts.map +1 -0
- package/dist/shared/inputOverflow.d.ts +10 -0
- package/dist/shared/inputOverflow.d.ts.map +1 -0
- package/dist/shared/kitCopy.js +9 -0
- package/dist/shared/optionStateColors.js +5 -0
- package/dist/shared/optionValue.d.ts +1 -1
- package/dist/shared/optionValue.d.ts.map +1 -1
- package/dist/shared/optionValue.js +11 -0
- package/dist/shared/popupTransition.js +11 -0
- package/dist/shared/size.d.ts +0 -1
- package/dist/shared/size.d.ts.map +1 -1
- package/dist/shared/size.js +4 -0
- package/dist/shared/sortRows.js +24 -0
- package/dist/shared/uiKitDefaults.js +25 -0
- package/dist/style-no-fonts.css +1 -1
- package/dist/style.css +1 -1
- package/dist/style.layer.css +8 -8
- package/dist/style.shell.css +15 -11
- package/dist/urfu-ui-kit-react.js +57 -17543
- package/dist/vanilla/core/BoundedOptionPageCache.js +41 -0
- package/dist/vanilla/core/dateMask.js +28 -0
- package/dist/vanilla/core/describeError.js +243 -0
- package/dist/vanilla/core/devLauncherOffset.js +20 -0
- package/dist/vanilla/core/distributeTabs.js +25 -0
- package/dist/vanilla/core/hasPreviousPage.js +6 -0
- package/dist/vanilla/core/inputMode.js +17 -0
- package/dist/vanilla/core/inputOverflow.js +34 -0
- package/dist/vanilla/core/kitRegistry.js +160 -0
- package/dist/vanilla/core/reconcileColumnOrder.js +5 -0
- package/dist/vanilla/core/sheetTitle.js +11 -0
- package/dist/vanilla/core/validation.js +21 -0
- package/dist/vendor/@floating-ui/core/dist/floating-ui.core.js +323 -0
- package/dist/vendor/@floating-ui/dom/dist/floating-ui.dom.js +383 -0
- package/dist/vendor/@floating-ui/react/dist/floating-ui.react.js +255 -0
- package/dist/vendor/@floating-ui/react-dom/dist/floating-ui.react-dom.js +183 -0
- package/dist/vendor/@floating-ui/utils/dist/floating-ui.utils.dom.js +110 -0
- package/dist/vendor/@floating-ui/utils/dist/floating-ui.utils.js +106 -0
- package/dist/vendor/clsx/dist/clsx.js +14 -0
- package/dist/vendor/date-fns/_lib/addLeadingZeros.js +5 -0
- package/dist/vendor/date-fns/_lib/defaultOptions.js +5 -0
- package/dist/vendor/date-fns/_lib/format/formatters.js +547 -0
- package/dist/vendor/date-fns/_lib/format/lightFormatters.js +56 -0
- package/dist/vendor/date-fns/_lib/format/longFormatters.js +47 -0
- package/dist/vendor/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +16 -0
- package/dist/vendor/date-fns/_lib/protectedTokens.js +16 -0
- package/dist/vendor/date-fns/addDays.js +7 -0
- package/dist/vendor/date-fns/addHours.js +6 -0
- package/dist/vendor/date-fns/addMilliseconds.js +7 -0
- package/dist/vendor/date-fns/addMinutes.js +6 -0
- package/dist/vendor/date-fns/addMonths.js +17 -0
- package/dist/vendor/date-fns/addQuarters.js +6 -0
- package/dist/vendor/date-fns/addSeconds.js +5 -0
- package/dist/vendor/date-fns/addWeeks.js +6 -0
- package/dist/vendor/date-fns/addYears.js +5 -0
- package/dist/vendor/date-fns/constants.js +2 -0
- package/dist/vendor/date-fns/constructFrom.js +4 -0
- package/dist/vendor/date-fns/differenceInCalendarDays.js +8 -0
- package/dist/vendor/date-fns/differenceInCalendarMonths.js +6 -0
- package/dist/vendor/date-fns/differenceInCalendarQuarters.js +7 -0
- package/dist/vendor/date-fns/differenceInCalendarYears.js +6 -0
- package/dist/vendor/date-fns/differenceInDays.js +13 -0
- package/dist/vendor/date-fns/endOfDay.js +6 -0
- package/dist/vendor/date-fns/endOfMonth.js +6 -0
- package/dist/vendor/date-fns/endOfWeek.js +8 -0
- package/dist/vendor/date-fns/endOfYear.js +6 -0
- package/dist/vendor/date-fns/format.js +53 -0
- package/dist/vendor/date-fns/getDate.js +5 -0
- package/dist/vendor/date-fns/getDay.js +5 -0
- package/dist/vendor/date-fns/getDayOfYear.js +8 -0
- package/dist/vendor/date-fns/getDaysInMonth.js +7 -0
- package/dist/vendor/date-fns/getDefaultOptions.js +5 -0
- package/dist/vendor/date-fns/getHours.js +5 -0
- package/dist/vendor/date-fns/getISODay.js +6 -0
- package/dist/vendor/date-fns/getISOWeek.js +9 -0
- package/dist/vendor/date-fns/getISOWeekYear.js +12 -0
- package/dist/vendor/date-fns/getMinutes.js +5 -0
- package/dist/vendor/date-fns/getMonth.js +5 -0
- package/dist/vendor/date-fns/getQuarter.js +6 -0
- package/dist/vendor/date-fns/getSeconds.js +5 -0
- package/dist/vendor/date-fns/getTime.js +5 -0
- package/dist/vendor/date-fns/getWeek.js +9 -0
- package/dist/vendor/date-fns/getWeekYear.js +14 -0
- package/dist/vendor/date-fns/getYear.js +5 -0
- package/dist/vendor/date-fns/isAfter.js +6 -0
- package/dist/vendor/date-fns/isBefore.js +6 -0
- package/dist/vendor/date-fns/isDate.js +4 -0
- package/dist/vendor/date-fns/isEqual.js +6 -0
- package/dist/vendor/date-fns/isSameDay.js +6 -0
- package/dist/vendor/date-fns/isSameMonth.js +6 -0
- package/dist/vendor/date-fns/isSameQuarter.js +6 -0
- package/dist/vendor/date-fns/isSameWeek.js +6 -0
- package/dist/vendor/date-fns/isSameYear.js +6 -0
- package/dist/vendor/date-fns/isValid.js +9 -0
- package/dist/vendor/date-fns/isWithinInterval.js +9 -0
- package/dist/vendor/date-fns/locale/_lib/buildFormatLongFn.js +7 -0
- package/dist/vendor/date-fns/locale/_lib/buildLocalizeFn.js +16 -0
- package/dist/vendor/date-fns/locale/_lib/buildMatchFn.js +29 -0
- package/dist/vendor/date-fns/locale/_lib/buildMatchPatternFn.js +13 -0
- package/dist/vendor/date-fns/locale/en-US/_lib/formatDistance.js +68 -0
- package/dist/vendor/date-fns/locale/en-US/_lib/formatLong.js +31 -0
- package/dist/vendor/date-fns/locale/en-US/_lib/formatRelative.js +9 -0
- package/dist/vendor/date-fns/locale/en-US/_lib/localize.js +153 -0
- package/dist/vendor/date-fns/locale/en-US/_lib/match.js +108 -0
- package/dist/vendor/date-fns/locale/en-US.js +18 -0
- package/dist/vendor/date-fns/locale/ru/_lib/formatDistance.js +182 -0
- package/dist/vendor/date-fns/locale/ru/_lib/formatLong.js +28 -0
- package/dist/vendor/date-fns/locale/ru/_lib/formatRelative.js +62 -0
- package/dist/vendor/date-fns/locale/ru/_lib/localize.js +177 -0
- package/dist/vendor/date-fns/locale/ru/_lib/match.js +109 -0
- package/dist/vendor/date-fns/locale/ru.js +18 -0
- package/dist/vendor/date-fns/max.js +9 -0
- package/dist/vendor/date-fns/min.js +9 -0
- package/dist/vendor/date-fns/parse/_lib/Parser.js +20 -0
- package/dist/vendor/date-fns/parse/_lib/Setter.js +36 -0
- package/dist/vendor/date-fns/parse/_lib/constants.js +46 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/AMPMMidnightParser.js +46 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/AMPMParser.js +46 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/DateParser.js +59 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/DayOfYearParser.js +49 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/DayParser.js +45 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/DayPeriodParser.js +46 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/EraParser.js +29 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/ExtendedYearParser.js +19 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/FractionOfSecondParser.js +20 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/Hour0To11Parser.js +30 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/Hour0to23Parser.js +30 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/Hour1To24Parser.js +31 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/Hour1to12Parser.js +31 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/ISODayParser.js +101 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/ISOTimezoneParser.js +45 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.js +45 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/ISOWeekParser.js +47 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/ISOWeekYearParser.js +38 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/LocalDayParser.js +76 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/LocalWeekParser.js +46 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/LocalWeekYearParser.js +67 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/MinuteParser.js +30 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/MonthParser.js +73 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/QuarterParser.js +71 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/SecondParser.js +30 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.js +76 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/StandAloneMonthParser.js +73 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/StandAloneQuarterParser.js +71 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.js +20 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/TimestampSecondsParser.js +20 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/YearParser.js +47 -0
- package/dist/vendor/date-fns/parse/_lib/parsers.js +65 -0
- package/dist/vendor/date-fns/parse/_lib/utils.js +90 -0
- package/dist/vendor/date-fns/parse.js +85 -0
- package/dist/vendor/date-fns/parseISO.js +119 -0
- package/dist/vendor/date-fns/set.js +8 -0
- package/dist/vendor/date-fns/setDay.js +9 -0
- package/dist/vendor/date-fns/setHours.js +6 -0
- package/dist/vendor/date-fns/setISODay.js +8 -0
- package/dist/vendor/date-fns/setISOWeek.js +7 -0
- package/dist/vendor/date-fns/setMinutes.js +6 -0
- package/dist/vendor/date-fns/setMonth.js +10 -0
- package/dist/vendor/date-fns/setQuarter.js +7 -0
- package/dist/vendor/date-fns/setSeconds.js +6 -0
- package/dist/vendor/date-fns/setWeek.js +7 -0
- package/dist/vendor/date-fns/setYear.js +7 -0
- package/dist/vendor/date-fns/startOfDay.js +6 -0
- package/dist/vendor/date-fns/startOfISOWeek.js +5 -0
- package/dist/vendor/date-fns/startOfISOWeekYear.js +8 -0
- package/dist/vendor/date-fns/startOfMonth.js +6 -0
- package/dist/vendor/date-fns/startOfQuarter.js +6 -0
- package/dist/vendor/date-fns/startOfWeek.js +8 -0
- package/dist/vendor/date-fns/startOfWeekYear.js +10 -0
- package/dist/vendor/date-fns/startOfYear.js +7 -0
- package/dist/vendor/date-fns/subDays.js +5 -0
- package/dist/vendor/date-fns/subMonths.js +5 -0
- package/dist/vendor/date-fns/subQuarters.js +5 -0
- package/dist/vendor/date-fns/subWeeks.js +5 -0
- package/dist/vendor/date-fns/subYears.js +5 -0
- package/dist/vendor/date-fns/toDate.js +5 -0
- package/dist/vendor/date-fns/transpose.js +15 -0
- package/dist/vendor/react-datepicker/dist/es/index.js +2696 -0
- package/package.json +37 -35
- package/dist/hooks/useOutsideAlerter.d.ts +0 -3
- package/dist/hooks/useOutsideAlerter.d.ts.map +0 -1
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { jsx as p, jsxs as X } from "react/jsx-runtime";
|
|
2
|
+
import { adaptTypographyStyle$u as S, pxAdd$u as w } from "./Table.helpers.js";
|
|
3
|
+
import { handleDragOver$u as Y, handleDragStart$u as o } from "./Functions.js";
|
|
4
|
+
const q = "auto", J = ({
|
|
5
|
+
item: r,
|
|
6
|
+
i: e,
|
|
7
|
+
level: k,
|
|
8
|
+
rowKey: b,
|
|
9
|
+
absoluteIndex: s,
|
|
10
|
+
filteredColumns: f,
|
|
11
|
+
id: $,
|
|
12
|
+
virtualizationOn: h,
|
|
13
|
+
start: j,
|
|
14
|
+
draggable: L,
|
|
15
|
+
rowRefs: D,
|
|
16
|
+
resize: a,
|
|
17
|
+
columnWidths: y,
|
|
18
|
+
parentDataField: i,
|
|
19
|
+
calcLeftValues: W,
|
|
20
|
+
handleDrop: x,
|
|
21
|
+
insertChildRows: B,
|
|
22
|
+
removeChildRows: E,
|
|
23
|
+
cellStyle: N,
|
|
24
|
+
tdStyle: A,
|
|
25
|
+
allTdStyleFunction: g,
|
|
26
|
+
cellContentStyle: M,
|
|
27
|
+
tdContentStyle: R,
|
|
28
|
+
allTdContentStyleFunction: v,
|
|
29
|
+
fillColumnIndex: O = -1
|
|
30
|
+
}) => /* @__PURE__ */ p(
|
|
31
|
+
"tr",
|
|
32
|
+
{
|
|
33
|
+
"data-virtual-index": h && s !== void 0 ? s : void 0,
|
|
34
|
+
id: `row${k ? `${k}.` : ""}${e}`,
|
|
35
|
+
draggable: L,
|
|
36
|
+
onDragStart: (t) => o(t, String(e)),
|
|
37
|
+
onDragOver: (t) => Y(t),
|
|
38
|
+
onDrop: (t) => x(t, e),
|
|
39
|
+
ref: h && s !== void 0 ? (t) => {
|
|
40
|
+
D.current[s] = t;
|
|
41
|
+
} : void 0,
|
|
42
|
+
children: f == null ? void 0 : f.map((t, d) => /* @__PURE__ */ X(
|
|
43
|
+
"td",
|
|
44
|
+
{
|
|
45
|
+
id: `${$}td${e}${d}`,
|
|
46
|
+
className: `${t.sticky ? "sticky" : ""}`,
|
|
47
|
+
style: S(
|
|
48
|
+
Object.assign(
|
|
49
|
+
{
|
|
50
|
+
left: t.sticky ? W(d) : "",
|
|
51
|
+
// Вид по умолчанию 2.0 — как в Meetings: 15px сверху и снизу,
|
|
52
|
+
// боковой отступ держит блок содержимого (.u-table-td-content).
|
|
53
|
+
// Инлайном, потому что vanilla задаёт ячейке свои 20px и порядок
|
|
54
|
+
// подключения стилей у проектов разный. tdStyle по-прежнему главнее.
|
|
55
|
+
padding: "calc(15 * var(--u-unit, 1px)) 0",
|
|
56
|
+
display: i && d === 0 && r[i] ? "flex" : "table-cell",
|
|
57
|
+
gap: "calc(4 * var(--u-preset-unit, 1px))"
|
|
58
|
+
},
|
|
59
|
+
N,
|
|
60
|
+
A,
|
|
61
|
+
t.tdStyle,
|
|
62
|
+
t.cellStyle,
|
|
63
|
+
g && g(r),
|
|
64
|
+
t.tdStyleFunction && t.tdStyleFunction(r)
|
|
65
|
+
)
|
|
66
|
+
),
|
|
67
|
+
children: [
|
|
68
|
+
/* @__PURE__ */ p(
|
|
69
|
+
"div",
|
|
70
|
+
{
|
|
71
|
+
className: "u-table-td-content",
|
|
72
|
+
style: S(
|
|
73
|
+
Object.assign(
|
|
74
|
+
{
|
|
75
|
+
// Растянутая колонка: width колонки — нижняя граница, иначе текст
|
|
76
|
+
// переносится по ней посреди широкой пустой ячейки, а скелетон
|
|
77
|
+
// меряет тот же узкий блок и висит по центру.
|
|
78
|
+
width: d === O && !(a && !t.resizeOff) ? "100%" : a && !t.resizeOff && (t != null && t.width) ? y[t.field] >= t.width ? y[t.field] : w(t.width) : a && !t.resizeOff || t != null && t.width ? y[t.field] || (t == null ? void 0 : t.width) : q,
|
|
79
|
+
minWidth: d === O && !(a && !t.resizeOff) && t.width ? w(t.width) : a && !t.resizeOff && t.width ? w(t.width) : "",
|
|
80
|
+
position: t.sticky ? "sticky" : "",
|
|
81
|
+
overflowX: "hidden",
|
|
82
|
+
// break-word, а не anywhere: с anywhere минимальная ширина колонки без width — одна буква,
|
|
83
|
+
// и на узком экране слова рвались посередине («Петр/ов»). Как во Vue-ките.
|
|
84
|
+
overflowWrap: "break-word",
|
|
85
|
+
overflowY: "hidden",
|
|
86
|
+
display: "-webkit-box",
|
|
87
|
+
WebkitLineClamp: 15,
|
|
88
|
+
WebkitBoxOrient: "vertical"
|
|
89
|
+
},
|
|
90
|
+
M,
|
|
91
|
+
R,
|
|
92
|
+
t.tdContentStyle,
|
|
93
|
+
t.cellContentStyle,
|
|
94
|
+
v && v(r),
|
|
95
|
+
t.tdContentStyleFunction && t.tdContentStyleFunction(r)
|
|
96
|
+
)
|
|
97
|
+
),
|
|
98
|
+
children: t.render ? t.render(r, e) : r[t.field]
|
|
99
|
+
}
|
|
100
|
+
),
|
|
101
|
+
!r.notExpandable && i && d === 0 && r[i] && r[i].length > 0 && /* @__PURE__ */ p(
|
|
102
|
+
"svg",
|
|
103
|
+
{
|
|
104
|
+
width: "12",
|
|
105
|
+
height: "12",
|
|
106
|
+
viewBox: "0 0 12 13",
|
|
107
|
+
fill: "none",
|
|
108
|
+
style: {
|
|
109
|
+
cursor: "pointer",
|
|
110
|
+
margin: "auto calc(8 * var(--u-preset-unit, 1px)) auto auto",
|
|
111
|
+
transform: r.parentDataOpened ? "rotate(180deg)" : "",
|
|
112
|
+
transition: "transform 0.2s ease"
|
|
113
|
+
},
|
|
114
|
+
onClick: () => {
|
|
115
|
+
r.parentDataOpened ? E(e) : B(e);
|
|
116
|
+
},
|
|
117
|
+
children: /* @__PURE__ */ p(
|
|
118
|
+
"path",
|
|
119
|
+
{
|
|
120
|
+
d: "M1 4.5625L5.99999 9.5625L11 4.5625",
|
|
121
|
+
stroke: "#1E4391",
|
|
122
|
+
strokeWidth: "2",
|
|
123
|
+
strokeLinecap: "round",
|
|
124
|
+
strokeLinejoin: "round"
|
|
125
|
+
}
|
|
126
|
+
)
|
|
127
|
+
}
|
|
128
|
+
)
|
|
129
|
+
]
|
|
130
|
+
},
|
|
131
|
+
t.key ? t.key : t.field ? t.field : d
|
|
132
|
+
))
|
|
133
|
+
},
|
|
134
|
+
b ?? r.id ?? (h ? j + e : e)
|
|
135
|
+
);
|
|
136
|
+
export { J as TableRow$u };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { type MouseEvent as ReactMouseEvent } from "react";
|
|
1
2
|
import type { TableColumnsProperties } from "./Table.types";
|
|
2
3
|
export declare const useColumnResize: (columns: TableColumnsProperties[], resize?: boolean) => {
|
|
3
4
|
columnWidths: Record<string, number>;
|
|
4
5
|
lookColumnWidths: Record<string, number>;
|
|
5
6
|
setLookColumnWidths: import("react").Dispatch<import("react").SetStateAction<Record<string, number>>>;
|
|
6
|
-
handleMouseDown: (e:
|
|
7
|
-
thRefs: import("react").MutableRefObject<
|
|
7
|
+
handleMouseDown: (e: ReactMouseEvent, id: string) => void;
|
|
8
|
+
thRefs: import("react").MutableRefObject<Record<string, HTMLElement>>;
|
|
8
9
|
};
|
|
9
10
|
//# sourceMappingURL=useColumnResize.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useColumnResize.d.ts","sourceRoot":"","sources":["../../../src/components/Table/useColumnResize.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useColumnResize.d.ts","sourceRoot":"","sources":["../../../src/components/Table/useColumnResize.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,KAAK,UAAU,IAAI,eAAe,EAAE,MAAM,OAAO,CAAC;AAExF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAK5D,eAAO,MAAM,eAAe,GAC1B,SAAS,sBAAsB,EAAE,EACjC,SAAS,OAAO;;;;yBA2BY,eAAe,MAAM,MAAM;;CAsDxD,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { useState as f, useRef as w, useEffect as E } from "react";
|
|
2
|
+
import { columnWidthsFormatter$u as L } from "./Functions.js";
|
|
3
|
+
const X = (u, h) => {
|
|
4
|
+
const i = u.reduce(
|
|
5
|
+
(t, e) => (e.field != null && e.width != null && (t[e.field] = e.width), t),
|
|
6
|
+
{}
|
|
7
|
+
), [r, v] = f({}), [d, c] = f({}), m = w({}), a = (t, e) => {
|
|
8
|
+
const n = { ...r };
|
|
9
|
+
n[t] = i[t] ? e < i[t] ? i[t] : e : e > 30 ? e : 30, c(n);
|
|
10
|
+
}, C = (t, e) => {
|
|
11
|
+
t.preventDefault();
|
|
12
|
+
const n = t.clientX, o = (l) => {
|
|
13
|
+
const W = l.clientX - n, p = r[e] + W;
|
|
14
|
+
a(e, p);
|
|
15
|
+
}, s = () => {
|
|
16
|
+
document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", s);
|
|
17
|
+
};
|
|
18
|
+
document.addEventListener("mousemove", o), document.addEventListener("mouseup", s);
|
|
19
|
+
};
|
|
20
|
+
return E(() => {
|
|
21
|
+
if (h) {
|
|
22
|
+
const t = u.reduce((e, n) => {
|
|
23
|
+
var s, l;
|
|
24
|
+
const o = (l = (s = m.current[n.field]) == null ? void 0 : s.getBoundingClientRect()) == null ? void 0 : l.width;
|
|
25
|
+
return n.field != null && o != null && (e[n.field] = o), e;
|
|
26
|
+
}, {});
|
|
27
|
+
v(
|
|
28
|
+
L(
|
|
29
|
+
t,
|
|
30
|
+
Object.keys(d).length === 0 ? t : d,
|
|
31
|
+
i,
|
|
32
|
+
u
|
|
33
|
+
)
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
}, [u, d]), {
|
|
37
|
+
columnWidths: r,
|
|
38
|
+
lookColumnWidths: d,
|
|
39
|
+
setLookColumnWidths: c,
|
|
40
|
+
handleMouseDown: C,
|
|
41
|
+
thRefs: m
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
export { X as useColumnResize$u };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDelayedSkeleton.d.ts","sourceRoot":"","sources":["../../../src/components/Table/useDelayedSkeleton.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useDelayedSkeleton.d.ts","sourceRoot":"","sources":["../../../src/components/Table/useDelayedSkeleton.ts"],"names":[],"mappings":"AAkBA;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,SAAS,EAAE,OAAO,GAAG,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,SAAS,EAAE,KAAK,EAAE,MAAM;IAsDtG,2BAA2B;;IAE3B,wDAAwD;;IAExD,gFAAgF;;EAGnF"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { useReducer as f, useRef as d, useEffect as c } from "react";
|
|
2
|
+
const u = 300, p = (n) => !!n && n.length > 0;
|
|
3
|
+
function g(n, o, i) {
|
|
4
|
+
const [, l] = f((t) => t + 1, 0), r = d({ phase: "idle", shown: void 0, skeletonAt: 0, delayed: !1 }), h = d(o);
|
|
5
|
+
h.current = o;
|
|
6
|
+
const e = r.current;
|
|
7
|
+
n ? e.phase === "idle" ? i > 0 && p(e.shown) ? e.phase = "waiting" : (e.phase = "skeleton", e.skeletonAt = Date.now(), e.delayed = !1) : e.phase === "holding" && (e.phase = "skeleton") : (e.phase === "waiting" ? e.phase = "idle" : e.phase === "skeleton" && (e.phase = e.delayed && Date.now() - e.skeletonAt < u ? "holding" : "idle"), e.phase === "idle" && (e.shown = o));
|
|
8
|
+
const { phase: s } = e;
|
|
9
|
+
return c(() => {
|
|
10
|
+
const t = r.current;
|
|
11
|
+
if (s === "waiting") {
|
|
12
|
+
const a = setTimeout(() => {
|
|
13
|
+
t.phase === "waiting" && (t.phase = "skeleton", t.skeletonAt = Date.now(), t.delayed = !0, l());
|
|
14
|
+
}, i);
|
|
15
|
+
return () => clearTimeout(a);
|
|
16
|
+
}
|
|
17
|
+
if (s === "holding") {
|
|
18
|
+
const a = setTimeout(() => {
|
|
19
|
+
t.phase === "holding" && (t.phase = "idle", t.shown = h.current, l());
|
|
20
|
+
}, Math.max(0, u - (Date.now() - t.skeletonAt)));
|
|
21
|
+
return () => clearTimeout(a);
|
|
22
|
+
}
|
|
23
|
+
}, [s, i]), {
|
|
24
|
+
/** Показывать скелетон. */
|
|
25
|
+
isLoading: s === "skeleton" || s === "holding",
|
|
26
|
+
/** Строки для таблицы: пока ждём задержку — прежние. */
|
|
27
|
+
data: s === "waiting" ? e.shown : o,
|
|
28
|
+
/** Идёт загрузка (для aria-busy), в том числе пока на экране прежние строки. */
|
|
29
|
+
isBusy: !!n || s !== "idle"
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export { g as useDelayedSkeleton$u };
|
|
@@ -7,7 +7,7 @@ interface Options<Row> {
|
|
|
7
7
|
enabled: boolean;
|
|
8
8
|
columns?: readonly TableColumnsProperties<Row>[];
|
|
9
9
|
rows: readonly Row[];
|
|
10
|
-
sort: TableSortState;
|
|
10
|
+
sort: TableSortState | undefined;
|
|
11
11
|
sortField?: string;
|
|
12
12
|
sortDir?: 'asc' | 'desc';
|
|
13
13
|
onSortToggle: (field: string) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMobileFilterColumns.d.ts","sourceRoot":"","sources":["../../../src/components/Table/useMobileFilterColumns.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAG1D,UAAU,OAAO,CAAC,GAAG;IACnB,iDAAiD;IACjD,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,SAAS,sBAAsB,CAAC,GAAG,CAAC,EAAE,CAAC;IACjD,IAAI,EAAE,SAAS,GAAG,EAAE,CAAC;IACrB,IAAI,EAAE,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"useMobileFilterColumns.d.ts","sourceRoot":"","sources":["../../../src/components/Table/useMobileFilterColumns.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAG1D,UAAU,OAAO,CAAC,GAAG;IACnB,iDAAiD;IACjD,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,SAAS,sBAAsB,CAAC,GAAG,CAAC,EAAE,CAAC;IACjD,IAAI,EAAE,SAAS,GAAG,EAAE,CAAC;IACrB,IAAI,EAAE,cAAc,GAAG,SAAS,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IACzB,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,OAAO,EAAE,kBAAkB,CAAC,SAAS,CAAC,CAAC;IACvC,UAAU,EAAE,kBAAkB,CAAC,YAAY,CAAC,CAAC;CAC9C;AAID;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,OAAO,CAAC,GAAG,CAAC;;wBAqCpH,MAAM;EAclC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { jsx as E } from "react/jsx-runtime";
|
|
2
|
+
import { useState as P, useRef as v, useCallback as R } from "react";
|
|
3
|
+
import { FilterPanel$u as V } from "./Filter/FilterPanel.js";
|
|
4
|
+
import { getServerFilterSelectionKey$u as C, getFilterSelectedCount$u as _, hasColumnValues$u as S, isServerFilterActive$u as q } from "./Table.helpers.js";
|
|
5
|
+
function I({ enabled: p, columns: i, rows: c, sort: F, sortField: b, sortDir: g, onSortToggle: h, filters: x, setFilters: K }) {
|
|
6
|
+
const [A, M] = P({}), f = v(i);
|
|
7
|
+
f.current = i;
|
|
8
|
+
const o = v(/* @__PURE__ */ new Map()), j = R((e) => {
|
|
9
|
+
let t = o.current.get(e);
|
|
10
|
+
return t || (t = (r) => {
|
|
11
|
+
var d;
|
|
12
|
+
const l = (d = f.current) == null ? void 0 : d.find((n) => n.field === e), s = C(l == null ? void 0 : l.filterServer);
|
|
13
|
+
s && M((n) => {
|
|
14
|
+
var a, u;
|
|
15
|
+
return ((a = n[e]) == null ? void 0 : a.selectionKey) === s && ((u = n[e]) == null ? void 0 : u.count) === r ? n : { ...n, [e]: { selectionKey: s, count: r } };
|
|
16
|
+
});
|
|
17
|
+
}, o.current.set(e, t)), t;
|
|
18
|
+
}, []);
|
|
19
|
+
return !p || !i ? { options: void 0, renderFilter: void 0 } : (o.current.forEach((e, t) => {
|
|
20
|
+
i.some((r) => r.field === t) || o.current.delete(t);
|
|
21
|
+
}), { options: i.map((e) => {
|
|
22
|
+
const t = A[e.field];
|
|
23
|
+
return {
|
|
24
|
+
key: e.field,
|
|
25
|
+
label: e.title,
|
|
26
|
+
active: e.filterActive ?? q(e.filterServer),
|
|
27
|
+
disabled: !S(c, e),
|
|
28
|
+
selectedCount: _({ filter: e.filterServer, explicitCount: e.filterSelectedCount }) ?? ((t == null ? void 0 : t.selectionKey) === C(e.filterServer) ? t == null ? void 0 : t.count : void 0),
|
|
29
|
+
sort: b === e.field ? g : void 0
|
|
30
|
+
};
|
|
31
|
+
}), renderFilter: (e) => {
|
|
32
|
+
const t = i.find((l) => l.field === e);
|
|
33
|
+
if (!(t != null && t.filterServer)) return null;
|
|
34
|
+
const r = { ...t, sticky: !1 };
|
|
35
|
+
return /* @__PURE__ */ E(
|
|
36
|
+
V,
|
|
37
|
+
{
|
|
38
|
+
column: r,
|
|
39
|
+
common: {
|
|
40
|
+
column: r,
|
|
41
|
+
embedded: !0,
|
|
42
|
+
sort: F,
|
|
43
|
+
handleSort: S(c, t) ? () => h(e) : void 0,
|
|
44
|
+
onSelectedCountChange: j(e)
|
|
45
|
+
},
|
|
46
|
+
context: { filters: x, setFilters: K, close: () => {
|
|
47
|
+
} }
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
} });
|
|
51
|
+
}
|
|
52
|
+
export { I as useMobileFilterColumns$u };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { useState as a, useLayoutEffect as b } from "react";
|
|
2
|
+
const d = (n, i) => n.field ?? n.title ?? String(i);
|
|
3
|
+
function O(n, i, c, g) {
|
|
4
|
+
const [o, f] = a({}), S = JSON.stringify(i.map((t, s) => [d(t, s), t.width]));
|
|
5
|
+
return b(() => {
|
|
6
|
+
var s;
|
|
7
|
+
if (!c) {
|
|
8
|
+
f((e) => Object.keys(e).length ? {} : e);
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
if (!g) return;
|
|
12
|
+
const t = (s = n.current) == null ? void 0 : s.querySelectorAll("thead > tr > th");
|
|
13
|
+
!(t != null && t.length) || t.length !== i.length || f((e) => {
|
|
14
|
+
const r = {};
|
|
15
|
+
return i.forEach((h, l) => {
|
|
16
|
+
const y = d(h, l), u = h.width || e[y] || t[l].getBoundingClientRect().width;
|
|
17
|
+
u > 0 && (r[y] = u);
|
|
18
|
+
}), Object.keys(e).length === Object.keys(r).length && Object.keys(r).every((h) => e[h] === r[h]) ? e : r;
|
|
19
|
+
});
|
|
20
|
+
}, [n, S, c, g]), o;
|
|
21
|
+
}
|
|
22
|
+
export { d as getStableColumnKey$u, O as useStableColumnWidths$u };
|
|
@@ -1,60 +1,5 @@
|
|
|
1
1
|
import type { RefObject } from 'react';
|
|
2
2
|
import type { TableColumnsProperties } from './Table.types';
|
|
3
|
-
/** Явные стороны — opt-in группировка; legacy boolean сохраняет переданный порядок. */
|
|
4
|
-
export declare function orderPinnedColumns<Row>(columns: TableColumnsProperties<Row>[]): Partial<{
|
|
5
|
-
sticky: boolean | "left" | "right";
|
|
6
|
-
stickyOverflowOnly: boolean;
|
|
7
|
-
width: number;
|
|
8
|
-
tdStyle: import("react").CSSProperties;
|
|
9
|
-
thStyle: import("react").CSSProperties;
|
|
10
|
-
cellStyle: import("react").CSSProperties;
|
|
11
|
-
tdContentStyle: import("react").CSSProperties;
|
|
12
|
-
thContentStyle: import("react").CSSProperties;
|
|
13
|
-
cellContentStyle: import("react").CSSProperties;
|
|
14
|
-
title: string;
|
|
15
|
-
field: string;
|
|
16
|
-
filterHasValues: boolean;
|
|
17
|
-
sortOn?: boolean;
|
|
18
|
-
headerIcon?: import("react").ReactNode;
|
|
19
|
-
headerTooltip?: import("react").ReactNode;
|
|
20
|
-
render: (row: Row) => import("react").ReactNode;
|
|
21
|
-
renderMobile: (row: Row, index: number) => import("react").ReactNode;
|
|
22
|
-
renderHeader: () => import("react").ReactNode;
|
|
23
|
-
tdStyleFunction: (...args: unknown[]) => unknown;
|
|
24
|
-
tdContentStyleFunction: (...args: unknown[]) => unknown;
|
|
25
|
-
filterOn: boolean;
|
|
26
|
-
filterServer: import("./Table.filterTypes").TableServerFilter;
|
|
27
|
-
renderFilter: (context: import("./Table.filterTypes").TableFilterContext) => import("react").ReactNode;
|
|
28
|
-
filterShowConditions: boolean;
|
|
29
|
-
filterWidth: number;
|
|
30
|
-
filterAdaptiveHeight: boolean;
|
|
31
|
-
filterActive: boolean;
|
|
32
|
-
filterSelectedCount: number;
|
|
33
|
-
filterType: string;
|
|
34
|
-
filterOptions: Array<string | number>;
|
|
35
|
-
filterValue: (row: Row) => string | number;
|
|
36
|
-
hidden: boolean;
|
|
37
|
-
key: string;
|
|
38
|
-
roundUpTo: number;
|
|
39
|
-
resizeOff: boolean;
|
|
40
|
-
bitDepth: boolean;
|
|
41
|
-
sortValue: (row: Row) => string | number;
|
|
42
|
-
sortComparator: (a: Row, b: Row) => number;
|
|
43
|
-
mobilePrimary: boolean;
|
|
44
|
-
mobileHidden: boolean;
|
|
45
|
-
mobileActions: boolean;
|
|
46
|
-
mobileLabel: string;
|
|
47
|
-
mobileCollapsible: boolean;
|
|
48
|
-
mobileExpandLines: number;
|
|
49
|
-
mobileGridSpan: 2 | "narrow" | "full";
|
|
50
|
-
mobileGridRowSpan: 2;
|
|
51
|
-
mobileSecondary: boolean;
|
|
52
|
-
mobileInline: boolean;
|
|
53
|
-
mobileSubtitle: boolean;
|
|
54
|
-
mobileHideLabel: boolean;
|
|
55
|
-
mobileValueColor: string;
|
|
56
|
-
mobileLabelColor: string;
|
|
57
|
-
}>[];
|
|
58
3
|
/** Одни измеренные смещения для обычной шапки, Filter и всех строк. */
|
|
59
4
|
export declare function useTableColumnPinning<Row>(rootRef: RefObject<HTMLDivElement>, columns: TableColumnsProperties<Row>[], enabled: boolean, layoutRevision: unknown): (Partial<{
|
|
60
5
|
sticky: boolean | "left" | "right";
|
|
@@ -85,7 +30,7 @@ export declare function useTableColumnPinning<Row>(rootRef: RefObject<HTMLDivEle
|
|
|
85
30
|
filterAdaptiveHeight: boolean;
|
|
86
31
|
filterActive: boolean;
|
|
87
32
|
filterSelectedCount: number;
|
|
88
|
-
filterType:
|
|
33
|
+
filterType: import("./Table.types").TableFilterType;
|
|
89
34
|
filterOptions: Array<string | number>;
|
|
90
35
|
filterValue: (row: Row) => string | number;
|
|
91
36
|
hidden: boolean;
|
|
@@ -1000,7 +945,7 @@ export declare function useTableColumnPinning<Row>(rootRef: RefObject<HTMLDivEle
|
|
|
1000
945
|
filterAdaptiveHeight?: boolean;
|
|
1001
946
|
filterActive?: boolean;
|
|
1002
947
|
filterSelectedCount?: number;
|
|
1003
|
-
filterType?:
|
|
948
|
+
filterType?: import("./Table.types").TableFilterType;
|
|
1004
949
|
filterOptions?: Array<string | number>;
|
|
1005
950
|
filterValue?: (row: Row) => string | number;
|
|
1006
951
|
hidden?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTableColumnPinning.d.ts","sourceRoot":"","sources":["../../../src/components/Table/useTableColumnPinning.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"useTableColumnPinning.d.ts","sourceRoot":"","sources":["../../../src/components/Table/useTableColumnPinning.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAa5D,uEAAuE;AACvE,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,OAAO,EAAE,SAAS,CAAC,cAAc,CAAC,EAC3E,OAAO,EAAE,sBAAsB,CAAC,GAAG,CAAC,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,OAAO;;;;;;;;;;;;;;;;;;;sBAiBa,GAAG;6BAGzE,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAHmE,GAAG;8BAGzE,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAyC5B"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { useMemo as b, useState as L, useLayoutEffect as z } from "react";
|
|
2
|
+
const u = (i) => i.sticky === !0 || i.sticky === "left" ? "left" : i.sticky === "right" ? "right" : void 0;
|
|
3
|
+
function q(i) {
|
|
4
|
+
return i.some((n) => typeof n.sticky == "string") ? [
|
|
5
|
+
...i.filter((n) => u(n) === "left"),
|
|
6
|
+
...i.filter((n) => !u(n)),
|
|
7
|
+
...i.filter((n) => u(n) === "right")
|
|
8
|
+
] : i;
|
|
9
|
+
}
|
|
10
|
+
function C(i, n, h, m) {
|
|
11
|
+
const o = b(() => h ? q(n) : n, [n, h]), p = o.some((t) => !!u(t)), [y, E] = L({ overflow: !1, widths: [] });
|
|
12
|
+
z(() => {
|
|
13
|
+
var v;
|
|
14
|
+
const t = i.current, e = t == null ? void 0 : t.querySelector("table");
|
|
15
|
+
if (!h || !p || !t || !e) return;
|
|
16
|
+
let s = !1;
|
|
17
|
+
const f = Array.from(e.querySelectorAll("thead > tr:first-child > th"));
|
|
18
|
+
f.length || f.push(...e.querySelectorAll("tbody > tr:not(.u-empty-table-row) > td"));
|
|
19
|
+
const c = () => {
|
|
20
|
+
if (s) return;
|
|
21
|
+
const l = f.slice(0, o.length).map((d) => d.getBoundingClientRect().width), k = t.clientWidth > 0 && t.scrollWidth > t.clientWidth + 1;
|
|
22
|
+
E((d) => d.overflow === k && d.widths.length === l.length && d.widths.every((S, O) => S === l[O]) ? d : { overflow: k, widths: l });
|
|
23
|
+
};
|
|
24
|
+
c();
|
|
25
|
+
const r = typeof ResizeObserver > "u" ? null : new ResizeObserver(c);
|
|
26
|
+
return r == null || r.observe(t), r == null || r.observe(e), f.slice(0, o.length).forEach((l) => r == null ? void 0 : r.observe(l)), window.addEventListener("resize", c), (v = document.fonts) == null || v.addEventListener("loadingdone", c), () => {
|
|
27
|
+
var l;
|
|
28
|
+
s = !0, r == null || r.disconnect(), window.removeEventListener("resize", c), (l = document.fonts) == null || l.removeEventListener("loadingdone", c);
|
|
29
|
+
};
|
|
30
|
+
}, [i, o, h, p, m]);
|
|
31
|
+
const a = o.map((t) => h && (!t.stickyOverflowOnly || y.overflow) ? u(t) : void 0), g = { left: 0, right: 0 }, w = [];
|
|
32
|
+
o.forEach((t, e) => {
|
|
33
|
+
a[e] === "left" && (w[e] = g.left, g.left += y.widths[e] || t.width || 0);
|
|
34
|
+
});
|
|
35
|
+
for (let t = o.length - 1; t >= 0; t--)
|
|
36
|
+
a[t] === "right" && (w[t] = g.right, g.right += y.widths[t] || o[t].width || 0);
|
|
37
|
+
return o.map((t, e) => {
|
|
38
|
+
const s = a[e];
|
|
39
|
+
if (!s) return t.sticky ? { ...t, sticky: !1 } : t;
|
|
40
|
+
const f = s === "left" ? a.lastIndexOf("left") === e : a.indexOf("right") === e;
|
|
41
|
+
return { ...t, sticky: !0, cellStyle: {
|
|
42
|
+
...t.cellStyle,
|
|
43
|
+
left: s === "left" ? w[e] : "auto",
|
|
44
|
+
right: s === "right" ? w[e] : "auto",
|
|
45
|
+
"--u-table-pin-shadow-left": s === "right" ? "calc(-4 * var(--u-unit, 1px))" : "auto",
|
|
46
|
+
"--u-table-pin-shadow-right": s === "left" ? "calc(-4 * var(--u-unit, 1px))" : "auto",
|
|
47
|
+
"--u-table-pin-shadow-transform": s === "right" ? "none" : "matrix(-1, 0, 0, 1, 0, 0)",
|
|
48
|
+
"--u-table-pin-shadow-display": f ? "block" : "none"
|
|
49
|
+
} };
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
export { C as useTableColumnPinning$u };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { useState as j, useRef as V, useCallback as d, useEffect as m } from "react";
|
|
2
|
+
const a = () => ({ uncheckedValues: {}, dates: [] }), h = (t, c) => t instanceof Date && c instanceof Date ? t.getTime() === c.getTime() : Object.is(t, c), D = (t, c) => {
|
|
3
|
+
const r = Object.keys(t.uncheckedValues);
|
|
4
|
+
return r.length === Object.keys(c.uncheckedValues).length && r.every((e) => {
|
|
5
|
+
var i;
|
|
6
|
+
return t.uncheckedValues[e].length === ((i = c.uncheckedValues[e]) == null ? void 0 : i.length) && t.uncheckedValues[e].every((u, l) => h(u, c.uncheckedValues[e][l]));
|
|
7
|
+
}) && t.dates.length === c.dates.length && t.dates.every((e, i) => {
|
|
8
|
+
const u = c.dates[i];
|
|
9
|
+
return e.id === u.id && e.type === u.type && h(e.begin, u.begin) && h(e.end, u.end);
|
|
10
|
+
});
|
|
11
|
+
}, v = ({ filters: t, defaultFilters: c, onFiltersChange: r, filterResetParam: e }) => {
|
|
12
|
+
const [i, u] = j(() => c ?? a()), l = t ?? i, f = V(l);
|
|
13
|
+
f.current = l;
|
|
14
|
+
const k = V(e), o = d((s) => {
|
|
15
|
+
const n = typeof s == "function" ? s(f.current) : s;
|
|
16
|
+
D(f.current, n) || (f.current = n, t === void 0 && u(n), r == null || r(n));
|
|
17
|
+
}, [t, r]), y = d((s) => {
|
|
18
|
+
o((n) => ({
|
|
19
|
+
...n,
|
|
20
|
+
uncheckedValues: typeof s == "function" ? s(n.uncheckedValues) : s
|
|
21
|
+
}));
|
|
22
|
+
}, [o]), g = d((s) => {
|
|
23
|
+
o((n) => ({
|
|
24
|
+
...n,
|
|
25
|
+
dates: typeof s == "function" ? s(n.dates) : s
|
|
26
|
+
}));
|
|
27
|
+
}, [o]);
|
|
28
|
+
return m(() => {
|
|
29
|
+
Object.is(k.current, e) || (k.current = e, o(a()));
|
|
30
|
+
}, [e, o]), {
|
|
31
|
+
filters: l,
|
|
32
|
+
setFilters: o,
|
|
33
|
+
uncheckedValues: l.uncheckedValues,
|
|
34
|
+
setUncheckedValues: y,
|
|
35
|
+
filterDates: l.dates,
|
|
36
|
+
setFilterDates: g
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
export { v as useTableFilters$u };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { useState as a, useMemo as F } from "react";
|
|
2
|
+
import { nextSort$u as T } from "../../shared/sortRows.js";
|
|
3
|
+
const M = ({
|
|
4
|
+
defaultSort: d,
|
|
5
|
+
controlledSort: v,
|
|
6
|
+
controlledSortDir: n,
|
|
7
|
+
onSortChange: r,
|
|
8
|
+
managedSort: f
|
|
9
|
+
}) => {
|
|
10
|
+
const [c, m] = a(
|
|
11
|
+
d != null && d.field ? { column: d.field, asc: d.dir !== "desc" } : void 0
|
|
12
|
+
), [u, p] = a(null), i = typeof r == "function" && !f, o = i ? v : (c == null ? void 0 : c.asc) !== void 0 ? c == null ? void 0 : c.column : void 0, e = i ? n ?? (v ? "asc" : void 0) : (c == null ? void 0 : c.asc) === !0 ? "asc" : (c == null ? void 0 : c.asc) === !1 ? "desc" : void 0, l = (s, t) => {
|
|
13
|
+
i || m({
|
|
14
|
+
column: s,
|
|
15
|
+
asc: t === "asc" ? !0 : t === "desc" ? !1 : void 0
|
|
16
|
+
}), r == null || r(s, t);
|
|
17
|
+
}, S = (s) => {
|
|
18
|
+
const t = T({ field: o, dir: e }, s);
|
|
19
|
+
l(t.field, t.dir);
|
|
20
|
+
}, y = (s) => l(s, o === s ? e ?? "asc" : "asc"), D = () => {
|
|
21
|
+
o && l(o, e === "asc" ? "desc" : "asc");
|
|
22
|
+
};
|
|
23
|
+
return {
|
|
24
|
+
sort: F(() => i ? { column: o, asc: e === void 0 ? void 0 : e === "asc" } : c, [i, o, e, c]),
|
|
25
|
+
// Прежний попап тоже проходит через controlled-обработчик, а не меняет локальные строки.
|
|
26
|
+
setSort: (s) => l(s.column, s.asc === void 0 ? void 0 : s.asc ? "asc" : "desc"),
|
|
27
|
+
hoveredSortCol: u,
|
|
28
|
+
setHoveredSortCol: p,
|
|
29
|
+
isSortControlled: i,
|
|
30
|
+
effectiveSortField: o,
|
|
31
|
+
effectiveSortDir: e,
|
|
32
|
+
applySort: l,
|
|
33
|
+
handleSortToggle: S,
|
|
34
|
+
setSortField: y,
|
|
35
|
+
toggleSortDir: D
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
export { M as useTableSortState$u };
|