@economic/taco 0.0.33-alpha.6 → 1.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +84 -84
- package/dist/components/Icon/components/{Minus.d.ts → CircleClose.d.ts} +0 -0
- package/dist/components/Icon/components/{PlusCircle.d.ts → CircleMinus.d.ts} +0 -0
- package/dist/components/Icon/components/{TickCircle.d.ts → CirclePlus.d.ts} +0 -0
- package/dist/components/Icon/components/CircleTick.d.ts +3 -0
- package/dist/components/Icon/components/index.d.ts +1 -1
- package/dist/components/Input/Input.d.ts +1 -1
- package/dist/components/Menu/Menu.d.ts +2 -2
- package/dist/components/Menu/components/Item.d.ts +1 -1
- package/dist/components/Menu/components/Link.d.ts +1 -1
- package/dist/esm/components/Accordion/Accordion.js.map +1 -1
- package/dist/esm/components/Backdrop/Backdrop.js.map +1 -1
- package/dist/esm/components/Badge/Badge.js.map +1 -1
- package/dist/esm/components/Banner/Banner.js +5 -7
- package/dist/esm/components/Banner/Banner.js.map +1 -1
- package/dist/esm/components/Banner/util.js +1 -1
- package/dist/esm/components/Banner/util.js.map +1 -1
- package/dist/esm/components/Button/Button.js.map +1 -1
- package/dist/esm/components/Button/util.js +23 -18
- package/dist/esm/components/Button/util.js.map +1 -1
- package/dist/esm/components/Calendar/Calendar.js.map +1 -1
- package/dist/esm/components/Checkbox/Checkbox.js +18 -15
- package/dist/esm/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/esm/components/Combobox/Combobox.js.map +1 -1
- package/dist/esm/components/Combobox/useCombobox.js +87 -67
- package/dist/esm/components/Combobox/useCombobox.js.map +1 -1
- package/dist/esm/components/Datepicker/Datepicker.js +52 -48
- package/dist/esm/components/Datepicker/Datepicker.js.map +1 -1
- package/dist/esm/components/Datepicker/useDatepicker.js +34 -27
- package/dist/esm/components/Datepicker/useDatepicker.js.map +1 -1
- package/dist/esm/components/Dialog/Context.js +4 -4
- package/dist/esm/components/Dialog/Context.js.map +1 -1
- package/dist/esm/components/Dialog/Dialog.js +58 -39
- package/dist/esm/components/Dialog/Dialog.js.map +1 -1
- package/dist/esm/components/Dialog/components/Content.js +44 -39
- package/dist/esm/components/Dialog/components/Content.js.map +1 -1
- package/dist/esm/components/Dialog/components/Drawer.js +3 -3
- package/dist/esm/components/Dialog/components/Drawer.js.map +1 -1
- package/dist/esm/components/Dialog/components/Extra.js +2 -2
- package/dist/esm/components/Dialog/components/Extra.js.map +1 -1
- package/dist/esm/components/Dialog/components/Trigger.js +2 -2
- package/dist/esm/components/Dialog/components/Trigger.js.map +1 -1
- package/dist/esm/components/Field/Field.js +12 -10
- package/dist/esm/components/Field/Field.js.map +1 -1
- package/dist/esm/components/Form/Form.js +8 -6
- package/dist/esm/components/Form/Form.js.map +1 -1
- package/dist/esm/components/Group/Group.js +8 -6
- package/dist/esm/components/Group/Group.js.map +1 -1
- package/dist/esm/components/Hanger/Hanger.js +33 -25
- package/dist/esm/components/Hanger/Hanger.js.map +1 -1
- package/dist/esm/components/Icon/Icon.js +8 -7
- package/dist/esm/components/Icon/Icon.js.map +1 -1
- package/dist/esm/components/Icon/components/AccountPreview.js.map +1 -1
- package/dist/esm/components/Icon/components/Accounting.js.map +1 -1
- package/dist/esm/components/Icon/components/AccountingYear.js.map +1 -1
- package/dist/esm/components/Icon/components/AccountingYearCancel.js.map +1 -1
- package/dist/esm/components/Icon/components/ArrowBottom.js.map +1 -1
- package/dist/esm/components/Icon/components/ArrowDown.js.map +1 -1
- package/dist/esm/components/Icon/components/ArrowEnd.js.map +1 -1
- package/dist/esm/components/Icon/components/ArrowLeft.js.map +1 -1
- package/dist/esm/components/Icon/components/ArrowRight.js.map +1 -1
- package/dist/esm/components/Icon/components/ArrowStart.js.map +1 -1
- package/dist/esm/components/Icon/components/ArrowTop.js.map +1 -1
- package/dist/esm/components/Icon/components/ArrowUp.js.map +1 -1
- package/dist/esm/components/Icon/components/Attach.js.map +1 -1
- package/dist/esm/components/Icon/components/AttachAuto.js.map +1 -1
- package/dist/esm/components/Icon/components/AttachCancel.js.map +1 -1
- package/dist/esm/components/Icon/components/Autotext.js.map +1 -1
- package/dist/esm/components/Icon/components/AutotextInsert.js.map +1 -1
- package/dist/esm/components/Icon/components/Basic.js.map +1 -1
- package/dist/esm/components/Icon/components/BasicTabs.js.map +1 -1
- package/dist/esm/components/Icon/components/BellSolid.js.map +1 -1
- package/dist/esm/components/Icon/components/Book.js.map +1 -1
- package/dist/esm/components/Icon/components/Booking.js.map +1 -1
- package/dist/esm/components/Icon/components/Budget.js.map +1 -1
- package/dist/esm/components/Icon/components/Calendar.js.map +1 -1
- package/dist/esm/components/Icon/components/CashAccount.js.map +1 -1
- package/dist/esm/components/Icon/components/CashReports.js.map +1 -1
- package/dist/esm/components/Icon/components/Chat.js.map +1 -1
- package/dist/esm/components/Icon/components/ChatSolid.js.map +1 -1
- package/dist/esm/components/Icon/components/ChevronDown.js.map +1 -1
- package/dist/esm/components/Icon/components/ChevronDownDouble.js.map +1 -1
- package/dist/esm/components/Icon/components/ChevronDownSolid.js.map +1 -1
- package/dist/esm/components/Icon/components/ChevronLeft.js.map +1 -1
- package/dist/esm/components/Icon/components/ChevronLeftDouble.js.map +1 -1
- package/dist/esm/components/Icon/components/ChevronRight.js.map +1 -1
- package/dist/esm/components/Icon/components/ChevronRightDouble.js.map +1 -1
- package/dist/esm/components/Icon/components/ChevronUp.js.map +1 -1
- package/dist/esm/components/Icon/components/ChevronUpDouble.js.map +1 -1
- package/dist/esm/components/Icon/components/ChevronUpSolid.js.map +1 -1
- package/dist/esm/components/Icon/components/CircleClose.js +19 -0
- package/dist/esm/components/Icon/components/CircleClose.js.map +1 -0
- package/dist/esm/components/Icon/components/{Minus.js → CircleMinus.js} +4 -4
- package/dist/esm/components/Icon/components/CircleMinus.js.map +1 -0
- package/dist/esm/components/Icon/components/{PlusCircle.js → CirclePlus.js} +4 -4
- package/dist/esm/components/Icon/components/CirclePlus.js.map +1 -0
- package/dist/esm/components/Icon/components/{TickCircle.js → CircleTick.js} +4 -4
- package/dist/esm/components/Icon/components/CircleTick.js.map +1 -0
- package/dist/esm/components/Icon/components/Clamp.js.map +1 -1
- package/dist/esm/components/Icon/components/ClampOpen.js.map +1 -1
- package/dist/esm/components/Icon/components/Close.js.map +1 -1
- package/dist/esm/components/Icon/components/ConnectionEnable.js.map +1 -1
- package/dist/esm/components/Icon/components/ConnectionRevoke.js.map +1 -1
- package/dist/esm/components/Icon/components/Contacts.js.map +1 -1
- package/dist/esm/components/Icon/components/Copy.js.map +1 -1
- package/dist/esm/components/Icon/components/Courses.js.map +1 -1
- package/dist/esm/components/Icon/components/Credit.js.map +1 -1
- package/dist/esm/components/Icon/components/Delete.js.map +1 -1
- package/dist/esm/components/Icon/components/DeletePermanently.js.map +1 -1
- package/dist/esm/components/Icon/components/Depecriate.js.map +1 -1
- package/dist/esm/components/Icon/components/Developer.js.map +1 -1
- package/dist/esm/components/Icon/components/DistributionTemplate.js.map +1 -1
- package/dist/esm/components/Icon/components/Document.js.map +1 -1
- package/dist/esm/components/Icon/components/DocumentApprove.js.map +1 -1
- package/dist/esm/components/Icon/components/DocumentCreateEntry.js.map +1 -1
- package/dist/esm/components/Icon/components/DocumentCut.js.map +1 -1
- package/dist/esm/components/Icon/components/DocumentError.js.map +1 -1
- package/dist/esm/components/Icon/components/DocumentIsolatePage.js.map +1 -1
- package/dist/esm/components/Icon/components/DocumentMerge.js.map +1 -1
- package/dist/esm/components/Icon/components/DocumentMove.js.map +1 -1
- package/dist/esm/components/Icon/components/DocumentPreview.js.map +1 -1
- package/dist/esm/components/Icon/components/DocumentReceived.js.map +1 -1
- package/dist/esm/components/Icon/components/DocumentRejectedRequest.js.map +1 -1
- package/dist/esm/components/Icon/components/DocumentSplit.js.map +1 -1
- package/dist/esm/components/Icon/components/DocumentTime.js.map +1 -1
- package/dist/esm/components/Icon/components/Download.js.map +1 -1
- package/dist/esm/components/Icon/components/Drag.js.map +1 -1
- package/dist/esm/components/Icon/components/ECopedia.js.map +1 -1
- package/dist/esm/components/Icon/components/ESignature.js.map +1 -1
- package/dist/esm/components/Icon/components/Edit.js.map +1 -1
- package/dist/esm/components/Icon/components/EllipsisHorizontal.js.map +1 -1
- package/dist/esm/components/Icon/components/EllipsisVertical.js.map +1 -1
- package/dist/esm/components/Icon/components/EntriesOnAccount.js.map +1 -1
- package/dist/esm/components/Icon/components/EntriesOpen.js.map +1 -1
- package/dist/esm/components/Icon/components/EntriesWarning.js.map +1 -1
- package/dist/esm/components/Icon/components/EntryTypeCustomerInvoice.js.map +1 -1
- package/dist/esm/components/Icon/components/EntryTypeCustomerPayment.js.map +1 -1
- package/dist/esm/components/Icon/components/EntryTypeJournalEntry.js.map +1 -1
- package/dist/esm/components/Icon/components/EntryTypeManualCustomerInvoice.js.map +1 -1
- package/dist/esm/components/Icon/components/EntryTypeSupplierInvoice.js.map +1 -1
- package/dist/esm/components/Icon/components/EntryTypeSupplierPayment.js.map +1 -1
- package/dist/esm/components/Icon/components/Envelope.js.map +1 -1
- package/dist/esm/components/Icon/components/EnvelopeApproved.js.map +1 -1
- package/dist/esm/components/Icon/components/ExpandView.js.map +1 -1
- package/dist/esm/components/Icon/components/Expenses.js.map +1 -1
- package/dist/esm/components/Icon/components/Export.js.map +1 -1
- package/dist/esm/components/Icon/components/ExportToExcel.js.map +1 -1
- package/dist/esm/components/Icon/components/ExportToPdf.js.map +1 -1
- package/dist/esm/components/Icon/components/Filter.js.map +1 -1
- package/dist/esm/components/Icon/components/FilterSolid.js.map +1 -1
- package/dist/esm/components/Icon/components/GraphSolid.js.map +1 -1
- package/dist/esm/components/Icon/components/Hash.js.map +1 -1
- package/dist/esm/components/Icon/components/Home.js.map +1 -1
- package/dist/esm/components/Icon/components/Images.js.map +1 -1
- package/dist/esm/components/Icon/components/Import.js.map +1 -1
- package/dist/esm/components/Icon/components/Inbox.js.map +1 -1
- package/dist/esm/components/Icon/components/InboxEinvoicing.js.map +1 -1
- package/dist/esm/components/Icon/components/InboxScanning.js.map +1 -1
- package/dist/esm/components/Icon/components/InboxSmart.js.map +1 -1
- package/dist/esm/components/Icon/components/Info.js.map +1 -1
- package/dist/esm/components/Icon/components/Inventory.js.map +1 -1
- package/dist/esm/components/Icon/components/InventoryMatrix.js.map +1 -1
- package/dist/esm/components/Icon/components/JournalPro.js.map +1 -1
- package/dist/esm/components/Icon/components/Layout.js.map +1 -1
- package/dist/esm/components/Icon/components/LayoutBoth.js.map +1 -1
- package/dist/esm/components/Icon/components/LayoutFirst.js.map +1 -1
- package/dist/esm/components/Icon/components/LayoutLast.js.map +1 -1
- package/dist/esm/components/Icon/components/LayoutNone.js.map +1 -1
- package/dist/esm/components/Icon/components/LedgerCard.js.map +1 -1
- package/dist/esm/components/Icon/components/LedgerCardCustomerReminder.js.map +1 -1
- package/dist/esm/components/Icon/components/LedgerCardManualCustomerInvoice.js.map +1 -1
- package/dist/esm/components/Icon/components/LedgerCardObsoleteStock.js.map +1 -1
- package/dist/esm/components/Icon/components/LedgerCardOpeningEntry.js.map +1 -1
- package/dist/esm/components/Icon/components/LedgerCardReservedEntry.js.map +1 -1
- package/dist/esm/components/Icon/components/LedgerCardShrinkagePilferage.js.map +1 -1
- package/dist/esm/components/Icon/components/LedgerCardStockAdjustment.js.map +1 -1
- package/dist/esm/components/Icon/components/LedgerCardTransferredOpeningEntry.js.map +1 -1
- package/dist/esm/components/Icon/components/Lightbulb.js.map +1 -1
- package/dist/esm/components/Icon/components/Line.js.map +1 -1
- package/dist/esm/components/Icon/components/List.js.map +1 -1
- package/dist/esm/components/Icon/components/ListBulleted.js.map +1 -1
- package/dist/esm/components/Icon/components/ListSearch.js.map +1 -1
- package/dist/esm/components/Icon/components/LockOpen.js.map +1 -1
- package/dist/esm/components/Icon/components/Log.js.map +1 -1
- package/dist/esm/components/Icon/components/Market.js.map +1 -1
- package/dist/esm/components/Icon/components/MatchAmount.js.map +1 -1
- package/dist/esm/components/Icon/components/MatchEntries.js.map +1 -1
- package/dist/esm/components/Icon/components/Mileage.js.map +1 -1
- package/dist/esm/components/Icon/components/ModalResize.js.map +1 -1
- package/dist/esm/components/Icon/components/ModalShrink.js.map +1 -1
- package/dist/esm/components/Icon/components/More.js.map +1 -1
- package/dist/esm/components/Icon/components/MoreSolid.js.map +1 -1
- package/dist/esm/components/Icon/components/Move.js.map +1 -1
- package/dist/esm/components/Icon/components/NavigationList.js.map +1 -1
- package/dist/esm/components/Icon/components/Note.js.map +1 -1
- package/dist/esm/components/Icon/components/NoteFollowUp.js.map +1 -1
- package/dist/esm/components/Icon/components/NoteRead.js.map +1 -1
- package/dist/esm/components/Icon/components/PartnerApi.js.map +1 -1
- package/dist/esm/components/Icon/components/Period.js.map +1 -1
- package/dist/esm/components/Icon/components/PersonChange.js.map +1 -1
- package/dist/esm/components/Icon/components/PersonMinus.js.map +1 -1
- package/dist/esm/components/Icon/components/PersonPlus.js.map +1 -1
- package/dist/esm/components/Icon/components/PersonTick.js.map +1 -1
- package/dist/esm/components/Icon/components/Play.js.map +1 -1
- package/dist/esm/components/Icon/components/PlusMinus.js.map +1 -1
- package/dist/esm/components/Icon/components/Print.js.map +1 -1
- package/dist/esm/components/Icon/components/ProcessPayment.js.map +1 -1
- package/dist/esm/components/Icon/components/ProductLedgerCard.js.map +1 -1
- package/dist/esm/components/Icon/components/ProjectCards.js.map +1 -1
- package/dist/esm/components/Icon/components/Projects.js.map +1 -1
- package/dist/esm/components/Icon/components/Quicklinks.js.map +1 -1
- package/dist/esm/components/Icon/components/RatingBankruptcy.js.map +1 -1
- package/dist/esm/components/Icon/components/RatingPaymentProblems.js.map +1 -1
- package/dist/esm/components/Icon/components/Reconciled.js.map +1 -1
- package/dist/esm/components/Icon/components/Refresh.js.map +1 -1
- package/dist/esm/components/Icon/components/Report.js.map +1 -1
- package/dist/esm/components/Icon/components/ReportSolid.js.map +1 -1
- package/dist/esm/components/Icon/components/Restore.js.map +1 -1
- package/dist/esm/components/Icon/components/RotateLeft.js.map +1 -1
- package/dist/esm/components/Icon/components/RotateRight.js.map +1 -1
- package/dist/esm/components/Icon/components/Sales.js.map +1 -1
- package/dist/esm/components/Icon/components/Search.js.map +1 -1
- package/dist/esm/components/Icon/components/SearchBold.js.map +1 -1
- package/dist/esm/components/Icon/components/Secure.js.map +1 -1
- package/dist/esm/components/Icon/components/SecureTick.js.map +1 -1
- package/dist/esm/components/Icon/components/Settings.js.map +1 -1
- package/dist/esm/components/Icon/components/SettingsSolid.js.map +1 -1
- package/dist/esm/components/Icon/components/Shortcuts.js.map +1 -1
- package/dist/esm/components/Icon/components/ShowAll.js.map +1 -1
- package/dist/esm/components/Icon/components/ShowLess.js.map +1 -1
- package/dist/esm/components/Icon/components/ShowMore.js.map +1 -1
- package/dist/esm/components/Icon/components/ShowTemplate.js.map +1 -1
- package/dist/esm/components/Icon/components/Sliders.js.map +1 -1
- package/dist/esm/components/Icon/components/Smartpay.js.map +1 -1
- package/dist/esm/components/Icon/components/SortBy.js.map +1 -1
- package/dist/esm/components/Icon/components/Spinner.js.map +1 -1
- package/dist/esm/components/Icon/components/Star.js.map +1 -1
- package/dist/esm/components/Icon/components/StarSolid.js.map +1 -1
- package/dist/esm/components/Icon/components/Subscriptions.js.map +1 -1
- package/dist/esm/components/Icon/components/SystemEntries.js.map +1 -1
- package/dist/esm/components/Icon/components/Tag.js.map +1 -1
- package/dist/esm/components/Icon/components/TemplateOverride.js.map +1 -1
- package/dist/esm/components/Icon/components/Templates.js.map +1 -1
- package/dist/esm/components/Icon/components/ThumbBoth.js.map +1 -1
- package/dist/esm/components/Icon/components/ThumbDown.js.map +1 -1
- package/dist/esm/components/Icon/components/ThumbDownSolid.js.map +1 -1
- package/dist/esm/components/Icon/components/ThumbUp.js.map +1 -1
- package/dist/esm/components/Icon/components/ThumbUpSolid.js.map +1 -1
- package/dist/esm/components/Icon/components/Tick.js.map +1 -1
- package/dist/esm/components/Icon/components/Time.js.map +1 -1
- package/dist/esm/components/Icon/components/Transfer.js.map +1 -1
- package/dist/esm/components/Icon/components/TransferCancel.js.map +1 -1
- package/dist/esm/components/Icon/components/TransferLocked.js.map +1 -1
- package/dist/esm/components/Icon/components/Undock.js.map +1 -1
- package/dist/esm/components/Icon/components/Unreconciled.js.map +1 -1
- package/dist/esm/components/Icon/components/Warning.js.map +1 -1
- package/dist/esm/components/Icon/components/Webshop.js.map +1 -1
- package/dist/esm/components/Icon/components/Website.js.map +1 -1
- package/dist/esm/components/Icon/components/Workflow.js.map +1 -1
- package/dist/esm/components/Icon/components/Zoom.js.map +1 -1
- package/dist/esm/components/Icon/components/index.js +12 -10
- package/dist/esm/components/Icon/components/index.js.map +1 -1
- package/dist/esm/components/IconButton/IconButton.js +11 -9
- package/dist/esm/components/IconButton/IconButton.js.map +1 -1
- package/dist/esm/components/Input/Input.js +25 -27
- package/dist/esm/components/Input/Input.js.map +1 -1
- package/dist/esm/components/Input/util.js +2 -2
- package/dist/esm/components/Input/util.js.map +1 -1
- package/dist/esm/components/Listbox/Listbox.js +25 -24
- package/dist/esm/components/Listbox/Listbox.js.map +1 -1
- package/dist/esm/components/Listbox/ScrollableList.js +83 -64
- package/dist/esm/components/Listbox/ScrollableList.js.map +1 -1
- package/dist/esm/components/Listbox/useListbox.js +60 -51
- package/dist/esm/components/Listbox/useListbox.js.map +1 -1
- package/dist/esm/components/Listbox/useMultiListbox.js +91 -64
- package/dist/esm/components/Listbox/useMultiListbox.js.map +1 -1
- package/dist/esm/components/Listbox/useTypeahead.js +9 -10
- package/dist/esm/components/Listbox/useTypeahead.js.map +1 -1
- package/dist/esm/components/Listbox/util.js +85 -48
- package/dist/esm/components/Listbox/util.js.map +1 -1
- package/dist/esm/components/Menu/Context.js +2 -2
- package/dist/esm/components/Menu/Context.js.map +1 -1
- package/dist/esm/components/Menu/Menu.js +43 -20
- package/dist/esm/components/Menu/Menu.js.map +1 -1
- package/dist/esm/components/Menu/components/Checkbox.js +9 -8
- package/dist/esm/components/Menu/components/Checkbox.js.map +1 -1
- package/dist/esm/components/Menu/components/Content.js +13 -10
- package/dist/esm/components/Menu/components/Content.js.map +1 -1
- package/dist/esm/components/Menu/components/Header.js +4 -4
- package/dist/esm/components/Menu/components/Header.js.map +1 -1
- package/dist/esm/components/Menu/components/Item.js +35 -34
- package/dist/esm/components/Menu/components/Item.js.map +1 -1
- package/dist/esm/components/Menu/components/Link.js +11 -10
- package/dist/esm/components/Menu/components/Link.js.map +1 -1
- package/dist/esm/components/Menu/components/RadioGroup.js +18 -16
- package/dist/esm/components/Menu/components/RadioGroup.js.map +1 -1
- package/dist/esm/components/Menu/components/Separator.js +4 -4
- package/dist/esm/components/Menu/components/Separator.js.map +1 -1
- package/dist/esm/components/Menu/components/Trigger.js +5 -5
- package/dist/esm/components/Menu/components/Trigger.js.map +1 -1
- package/dist/esm/components/Navigation/Navigation.js +44 -35
- package/dist/esm/components/Navigation/Navigation.js.map +1 -1
- package/dist/esm/components/Pagination/PageNumbers.js +28 -23
- package/dist/esm/components/Pagination/PageNumbers.js.map +1 -1
- package/dist/esm/components/Pagination/Pagination.js +56 -39
- package/dist/esm/components/Pagination/Pagination.js.map +1 -1
- package/dist/esm/components/Pagination/usePagination.js +21 -7
- package/dist/esm/components/Pagination/usePagination.js.map +1 -1
- package/dist/esm/components/Pagination/usePaginationShortcuts.js +9 -9
- package/dist/esm/components/Pagination/usePaginationShortcuts.js.map +1 -1
- package/dist/esm/components/Popover/Popover.js +34 -29
- package/dist/esm/components/Popover/Popover.js.map +1 -1
- package/dist/esm/components/Popover/Primitives.js +8 -7
- package/dist/esm/components/Popover/Primitives.js.map +1 -1
- package/dist/esm/components/Progress/Progress.js +15 -11
- package/dist/esm/components/Progress/Progress.js.map +1 -1
- package/dist/esm/components/Provider/Provider.js +18 -13
- package/dist/esm/components/Provider/Provider.js.map +1 -1
- package/dist/esm/components/RadioGroup/RadioGroup.js +57 -45
- package/dist/esm/components/RadioGroup/RadioGroup.js.map +1 -1
- package/dist/esm/components/SearchInput/SearchInput.js +11 -10
- package/dist/esm/components/SearchInput/SearchInput.js.map +1 -1
- package/dist/esm/components/Select/Select.js +31 -30
- package/dist/esm/components/Select/Select.js.map +1 -1
- package/dist/esm/components/Select/useSelect.js +82 -64
- package/dist/esm/components/Select/useSelect.js.map +1 -1
- package/dist/esm/components/Spinner/Spinner.js +19 -12
- package/dist/esm/components/Spinner/Spinner.js.map +1 -1
- package/dist/esm/components/Switch/Switch.js +10 -9
- package/dist/esm/components/Switch/Switch.js.map +1 -1
- package/dist/esm/components/Table/components/BaseTable.js +30 -23
- package/dist/esm/components/Table/components/BaseTable.js.map +1 -1
- package/dist/esm/components/Table/components/PaginatedTable.js +7 -3
- package/dist/esm/components/Table/components/PaginatedTable.js.map +1 -1
- package/dist/esm/components/Table/components/Table.js +25 -18
- package/dist/esm/components/Table/components/Table.js.map +1 -1
- package/dist/esm/components/Table/components/WindowedTable.js +104 -88
- package/dist/esm/components/Table/components/WindowedTable.js.map +1 -1
- package/dist/esm/components/Table/hooks/plugins/useRowActions.js +146 -122
- package/dist/esm/components/Table/hooks/plugins/useRowActions.js.map +1 -1
- package/dist/esm/components/Table/hooks/plugins/useRowDraggable.js +61 -57
- package/dist/esm/components/Table/hooks/plugins/useRowDraggable.js.map +1 -1
- package/dist/esm/components/Table/hooks/plugins/useRowEditing.js +36 -39
- package/dist/esm/components/Table/hooks/plugins/useRowEditing.js.map +1 -1
- package/dist/esm/components/Table/hooks/plugins/useRowSelect.js +90 -80
- package/dist/esm/components/Table/hooks/plugins/useRowSelect.js.map +1 -1
- package/dist/esm/components/Table/hooks/useRowCreation.js +64 -29
- package/dist/esm/components/Table/hooks/useRowCreation.js.map +1 -1
- package/dist/esm/components/Table/hooks/useTable.js +141 -119
- package/dist/esm/components/Table/hooks/useTable.js.map +1 -1
- package/dist/esm/components/Table/hooks/useTableKeyboardNavigation.js +15 -12
- package/dist/esm/components/Table/hooks/useTableKeyboardNavigation.js.map +1 -1
- package/dist/esm/components/Table/util/renderColumn.js +10 -10
- package/dist/esm/components/Table/util/renderColumn.js.map +1 -1
- package/dist/esm/components/Table/util/renderRow.js +46 -37
- package/dist/esm/components/Table/util/renderRow.js.map +1 -1
- package/dist/esm/components/Table/util/rowIndexPath.js +16 -14
- package/dist/esm/components/Table/util/rowIndexPath.js.map +1 -1
- package/dist/esm/components/Table/util/sortTypes.js +31 -23
- package/dist/esm/components/Table/util/sortTypes.js.map +1 -1
- package/dist/esm/components/Table/util.js +41 -29
- package/dist/esm/components/Table/util.js.map +1 -1
- package/dist/esm/components/Tabs/Tabs.js +27 -25
- package/dist/esm/components/Tabs/Tabs.js.map +1 -1
- package/dist/esm/components/Textarea/Textarea.js +9 -11
- package/dist/esm/components/Textarea/Textarea.js.map +1 -1
- package/dist/esm/components/Toast/Toast.js +21 -20
- package/dist/esm/components/Toast/Toast.js.map +1 -1
- package/dist/esm/components/Toast/Toaster.js +118 -88
- package/dist/esm/components/Toast/Toaster.js.map +1 -1
- package/dist/esm/components/Toast/util.js +2 -2
- package/dist/esm/components/Toast/util.js.map +1 -1
- package/dist/esm/components/Tooltip/Tooltip.js +8 -7
- package/dist/esm/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/esm/components/Tour/Tour.js +50 -44
- package/dist/esm/components/Tour/Tour.js.map +1 -1
- package/dist/esm/components/Treeview/Treeview.js +36 -26
- package/dist/esm/components/Treeview/Treeview.js.map +1 -1
- package/dist/esm/components/VisuallyHidden/VisuallyHidden.js +1 -1
- package/dist/esm/components/VisuallyHidden/VisuallyHidden.js.map +1 -1
- package/dist/esm/index.css +665 -665
- package/dist/esm/index.js +1 -1
- package/dist/esm/primitives/Button.js +13 -9
- package/dist/esm/primitives/Button.js.map +1 -1
- package/dist/esm/utils/date.js.map +1 -1
- package/dist/esm/utils/hooks/useBoundingClientRectListener.js.map +1 -1
- package/dist/esm/utils/hooks/useDraggable.js +18 -16
- package/dist/esm/utils/hooks/useDraggable.js.map +1 -1
- package/dist/esm/utils/hooks/useDropTarget.js +10 -7
- package/dist/esm/utils/hooks/useDropTarget.js.map +1 -1
- package/dist/esm/utils/hooks/useListKeyboardNavigation.js.map +1 -1
- package/dist/esm/utils/hooks/useListScrollTo.js.map +1 -1
- package/dist/esm/utils/hooks/useOnClickOutside.js.map +1 -1
- package/dist/esm/utils/hooks/useProxiedRef.js +3 -3
- package/dist/esm/utils/hooks/useProxiedRef.js.map +1 -1
- package/dist/esm/utils/hooks/useTimer.js +17 -9
- package/dist/esm/utils/hooks/useTimer.js.map +1 -1
- package/dist/esm/utils/input.js +11 -7
- package/dist/esm/utils/input.js.map +1 -1
- package/dist/esm/utils/mergeRefs.js +2 -2
- package/dist/esm/utils/mergeRefs.js.map +1 -1
- package/dist/esm/utils/taillwind.js +2 -2
- package/dist/esm/utils/taillwind.js.map +1 -1
- package/dist/index.css +665 -665
- package/dist/taco.cjs.development.js +2717 -2214
- package/dist/taco.cjs.development.js.map +1 -1
- package/dist/taco.cjs.production.min.js +1 -1
- package/dist/taco.cjs.production.min.js.map +1 -1
- package/dist/utils/tailwind.d.ts +1 -1
- package/package.json +2 -3
- package/plugins/tailwindcss-aria-attributes.js +73 -73
- package/tailwind.config.js +297 -297
- package/types.json +16 -12
- package/dist/esm/components/Icon/components/Minus.js.map +0 -1
- package/dist/esm/components/Icon/components/PlusCircle.js.map +0 -1
- package/dist/esm/components/Icon/components/TickCircle.js.map +0 -1
@@ -1,14 +1,14 @@
|
|
1
|
+
import { extends as _extends } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
1
2
|
import React__default from 'react';
|
2
3
|
import cn from 'classnames';
|
3
4
|
import { Icon } from '../../Icon/Icon.js';
|
4
5
|
|
5
|
-
|
6
|
-
cell
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
})),
|
6
|
+
var Column = function Column(_ref) {
|
7
|
+
var cell = _ref.cell;
|
8
|
+
|
9
|
+
var props = _extends({}, cell.getHeaderProps(), cell.getSortByToggleProps && cell.getSortByToggleProps({
|
10
|
+
title: undefined
|
11
|
+
}), {
|
12
12
|
className: cn('yt-table__cell flex flex-1 truncate p-2 align-middle text-grey-darkest hover:text-black', cell.className, {
|
13
13
|
'yt-table__cell__group': !!cell.columns,
|
14
14
|
'cursor-pointer': !cell.disableSorting,
|
@@ -16,10 +16,10 @@ const Column = ({
|
|
16
16
|
'justify-end text-right': cell.align === 'right',
|
17
17
|
'justify-center text-center': cell.align === 'center' || !cell.align
|
18
18
|
}),
|
19
|
-
style: {
|
19
|
+
style: _extends({}, cell.style, {
|
20
20
|
flex: cell.flex
|
21
|
-
}
|
22
|
-
};
|
21
|
+
})
|
22
|
+
});
|
23
23
|
|
24
24
|
if (cell.isSorted) {
|
25
25
|
props['aria-sort'] = cell.isSortedDesc ? 'descending' : 'ascending';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"renderColumn.js","sources":["../../../../../src/components/Table/util/renderColumn.tsx"],"sourcesContent":["import React from 'react';\
|
1
|
+
{"version":3,"file":"renderColumn.js","sources":["../../../../../src/components/Table/util/renderColumn.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\nimport { Icon } from '../../Icon/Icon';\n\nexport const Column = ({ cell }: any): any => {\n const props = {\n ...cell.getHeaderProps(),\n ...(cell.getSortByToggleProps && cell.getSortByToggleProps({ title: undefined })),\n className: cn('yt-table__cell flex flex-1 truncate p-2 align-middle text-grey-darkest hover:text-black', cell.className, {\n 'yt-table__cell__group': !!cell.columns,\n 'cursor-pointer': !cell.disableSorting,\n 'justify-start text-left': cell.align === 'left',\n 'justify-end text-right': cell.align === 'right',\n 'justify-center text-center': cell.align === 'center' || !cell.align,\n }),\n style: { ...cell.style, flex: cell.flex },\n };\n\n if (cell.isSorted) {\n props['aria-sort'] = cell.isSortedDesc ? 'descending' : 'ascending';\n }\n\n return (\n <div {...props} key={cell.id} data-taco=\"table-column\">\n <span className=\"truncate\">{cell.render('Header')}</span>\n {cell.isSorted ? <Icon name={cell.isSortedDesc ? 'chevron-down-solid' : 'chevron-up-solid'} /> : null}\n </div>\n );\n};\n"],"names":["Column","cell","props","getHeaderProps","getSortByToggleProps","title","undefined","className","cn","columns","disableSorting","align","style","flex","isSorted","isSortedDesc","React","key","id","render","Icon","name"],"mappings":";;;;;IAIaA,MAAM,GAAG,SAATA,MAAS;MAAGC,YAAAA;;AACrB,MAAMC,KAAK,gBACJD,IAAI,CAACE,cAAL,EADI,EAEHF,IAAI,CAACG,oBAAL,IAA6BH,IAAI,CAACG,oBAAL,CAA0B;AAAEC,IAAAA,KAAK,EAAEC;AAAT,GAA1B,CAF1B;AAGPC,IAAAA,SAAS,EAAEC,EAAE,CAAC,yFAAD,EAA4FP,IAAI,CAACM,SAAjG,EAA4G;AACrH,+BAAyB,CAAC,CAACN,IAAI,CAACQ,OADqF;AAErH,wBAAkB,CAACR,IAAI,CAACS,cAF6F;AAGrH,iCAA2BT,IAAI,CAACU,KAAL,KAAe,MAH2E;AAIrH,gCAA0BV,IAAI,CAACU,KAAL,KAAe,OAJ4E;AAKrH,oCAA8BV,IAAI,CAACU,KAAL,KAAe,QAAf,IAA2B,CAACV,IAAI,CAACU;AALsD,KAA5G,CAHN;AAUPC,IAAAA,KAAK,eAAOX,IAAI,CAACW,KAAZ;AAAmBC,MAAAA,IAAI,EAAEZ,IAAI,CAACY;AAA9B;AAVE,IAAX;;AAaA,MAAIZ,IAAI,CAACa,QAAT,EAAmB;AACfZ,IAAAA,KAAK,CAAC,WAAD,CAAL,GAAqBD,IAAI,CAACc,YAAL,GAAoB,YAApB,GAAmC,WAAxD;AACH;;AAED,SACIC,4BAAA,MAAA,oBAASd;AAAOe,IAAAA,GAAG,EAAEhB,IAAI,CAACiB;iBAAc;IAAxC,EACIF,4BAAA,OAAA;AAAMT,IAAAA,SAAS,EAAC;GAAhB,EAA4BN,IAAI,CAACkB,MAAL,CAAY,QAAZ,CAA5B,CADJ,EAEKlB,IAAI,CAACa,QAAL,GAAgBE,4BAAA,CAACI,IAAD;AAAMC,IAAAA,IAAI,EAAEpB,IAAI,CAACc,YAAL,GAAoB,oBAApB,GAA2C;GAAvD,CAAhB,GAAgG,IAFrG,CADJ;AAMH;;;;"}
|
@@ -1,73 +1,78 @@
|
|
1
|
+
import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose, extends as _extends } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
1
2
|
import React__default from 'react';
|
2
3
|
import cn from 'classnames';
|
3
4
|
import { sanitizeRowProps } from '../util.js';
|
4
5
|
import { FocusScope } from '@react-aria/focus';
|
5
6
|
|
6
|
-
|
7
|
-
|
7
|
+
var _excluded = ["row", "index", "instance", "headerGroups"];
|
8
|
+
|
9
|
+
var renderCell = function renderCell(cell, row) {
|
10
|
+
var props = _extends({}, cell.getCellProps(), {
|
8
11
|
className: cn('yt-table__cell flex-1 truncate p-2 align-middle', cell.column.className, {
|
9
12
|
'justify-start text-left': cell.column.align === 'left',
|
10
13
|
'justify-end text-right': cell.column.align === 'right',
|
11
14
|
'text-center': !cell.column.align
|
12
15
|
}),
|
13
|
-
style: {
|
16
|
+
style: _extends({}, cell.column.style, {
|
14
17
|
flex: typeof cell.column.flex === 'function' ? cell.column.flex(row) : cell.column.flex
|
15
|
-
}
|
16
|
-
};
|
18
|
+
})
|
19
|
+
});
|
20
|
+
|
17
21
|
return React__default.createElement("div", Object.assign({}, props, {
|
18
22
|
role: "gridcell",
|
19
23
|
"data-taco": "table-cell"
|
20
24
|
}), cell.render('Cell') || null);
|
21
25
|
};
|
22
26
|
|
23
|
-
|
24
|
-
row,
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
paddingLeft: row.depth ? `${row.depth * 2}rem` : undefined
|
45
|
-
},
|
27
|
+
var Row = /*#__PURE__*/React__default.forwardRef(function TableRow(_ref, ref) {
|
28
|
+
var row = _ref.row,
|
29
|
+
index = _ref.index,
|
30
|
+
instance = _ref.instance,
|
31
|
+
rowProps = _objectWithoutPropertiesLoose(_ref, _excluded);
|
32
|
+
|
33
|
+
var activeIndex = rowProps.activeIndex,
|
34
|
+
onRowClick = rowProps.onRowClick,
|
35
|
+
rowClassName = rowProps.rowClassName,
|
36
|
+
rowExpansionRenderer = rowProps.rowExpansionRenderer,
|
37
|
+
rowHeight = rowProps.rowHeight,
|
38
|
+
setActiveIndex = rowProps.setActiveIndex,
|
39
|
+
style = rowProps.style,
|
40
|
+
inlineEditingUniqueId = rowProps.inlineEditingUniqueId;
|
41
|
+
var sanitizedRow = sanitizeRowProps(row, rowExpansionRenderer);
|
42
|
+
|
43
|
+
var props = _extends({}, row.getRowProps(), {
|
44
|
+
style: _extends({}, style, {
|
45
|
+
minHeight: rowHeight ? rowHeight + "px" : undefined,
|
46
|
+
paddingLeft: row.depth ? row.depth * 2 + "rem" : undefined
|
47
|
+
}),
|
46
48
|
className: cn('yt-table__row border-grey-light flex border-b min-h-[2.5rem] hover:bg-grey-light', {
|
47
49
|
'yt-table__row--active bg-grey-light hover:bg-grey-light': activeIndex === index,
|
48
50
|
'yt-table__row--clickable': !!onRowClick,
|
49
51
|
'yt-table__row--dragging': !!row.isDragging,
|
50
52
|
'yt-table__row--editing': !!row.isEditing
|
51
53
|
}, typeof rowClassName === 'function' ? rowClassName(sanitizedRow) : rowClassName),
|
52
|
-
onClick: onRowClick ? event
|
54
|
+
onClick: onRowClick ? function (event) {
|
53
55
|
if (event.target === event.currentTarget || event.target.classList.contains('yt-table__cell')) {
|
54
56
|
event.preventDefault();
|
55
57
|
event.persist();
|
56
58
|
setActiveIndex(index);
|
57
59
|
onRowClick(sanitizedRow);
|
58
60
|
}
|
59
|
-
} : ()
|
61
|
+
} : function () {
|
60
62
|
setActiveIndex(index);
|
61
63
|
}
|
62
|
-
};
|
63
|
-
|
64
|
+
});
|
65
|
+
|
66
|
+
var cells = row.cells;
|
64
67
|
|
65
68
|
if (row.depth > 0) {
|
66
|
-
cells = row.cells.filter(
|
69
|
+
cells = row.cells.filter(function (cell) {
|
70
|
+
return !cell.column.hiddenOnSubRows;
|
71
|
+
});
|
67
72
|
}
|
68
73
|
|
69
|
-
|
70
|
-
|
74
|
+
var expandedRow = rowExpansionRenderer && row.isExpanded && React__default.createElement("div", null, rowExpansionRenderer(sanitizedRow, instance));
|
75
|
+
var rowContent = React__default.useMemo(function () {
|
71
76
|
return React__default.createElement(React__default.Fragment, null, React__default.createElement(FocusScope, {
|
72
77
|
key: row.original._createKey,
|
73
78
|
contain: true,
|
@@ -84,7 +89,9 @@ const Row = /*#__PURE__*/React__default.forwardRef(function TableRow({
|
|
84
89
|
type: "hidden",
|
85
90
|
name: "_inlineEditingUniqueId",
|
86
91
|
value: row.original[inlineEditingUniqueId]
|
87
|
-
}), cells.map(
|
92
|
+
}), cells.map(function (cell) {
|
93
|
+
return renderCell(cell, sanitizedRow);
|
94
|
+
}))), expandedRow);
|
88
95
|
}, [row.original._createKey]);
|
89
96
|
|
90
97
|
if (row.isEditing) {
|
@@ -94,7 +101,9 @@ const Row = /*#__PURE__*/React__default.forwardRef(function TableRow({
|
|
94
101
|
return React__default.createElement(React__default.Fragment, null, React__default.createElement("div", Object.assign({}, props, {
|
95
102
|
role: "row",
|
96
103
|
ref: ref
|
97
|
-
}), cells.map(
|
104
|
+
}), cells.map(function (cell) {
|
105
|
+
return renderCell(cell, sanitizedRow);
|
106
|
+
})), expandedRow);
|
98
107
|
});
|
99
108
|
|
100
109
|
export { Row };
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"renderRow.js","sources":["../../../../../src/components/Table/util/renderRow.tsx"],"sourcesContent":["import React from 'react';\
|
1
|
+
{"version":3,"file":"renderRow.js","sources":["../../../../../src/components/Table/util/renderRow.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\nimport { FocusScope } from '@react-aria/focus';\nimport { InternalTableCell, TableRow } from '../types';\nimport { sanitizeRowProps } from '../util';\n\nconst renderCell = (cell: InternalTableCell, row: TableRow<any>): JSX.Element => {\n const props = {\n ...cell.getCellProps(),\n className: cn('yt-table__cell flex-1 truncate p-2 align-middle', cell.column.className, {\n 'justify-start text-left': cell.column.align === 'left',\n 'justify-end text-right': cell.column.align === 'right',\n 'text-center': !cell.column.align,\n }),\n style: {\n ...cell.column.style,\n flex: typeof cell.column.flex === 'function' ? cell.column.flex(row) : cell.column.flex,\n },\n };\n return (\n <div {...props} role=\"gridcell\" data-taco=\"table-cell\">\n {cell.render('Cell') || null}\n </div>\n );\n};\n\nexport const Row = React.forwardRef(function TableRow({ row, index, instance, headerGroups, ...rowProps }: any, ref: any) {\n const {\n activeIndex,\n onRowClick,\n rowClassName,\n rowExpansionRenderer,\n rowHeight,\n setActiveIndex,\n style,\n inlineEditingUniqueId,\n } = rowProps;\n const sanitizedRow = sanitizeRowProps(row, rowExpansionRenderer);\n\n const props = {\n ...row.getRowProps(),\n style: {\n ...style,\n minHeight: rowHeight ? `${rowHeight}px` : undefined,\n paddingLeft: row.depth ? `${row.depth * 2}rem` : undefined,\n },\n className: cn(\n 'yt-table__row border-grey-light flex border-b min-h-[2.5rem] hover:bg-grey-light',\n {\n 'yt-table__row--active bg-grey-light hover:bg-grey-light': activeIndex === index,\n 'yt-table__row--clickable': !!onRowClick,\n 'yt-table__row--dragging': !!row.isDragging,\n 'yt-table__row--editing': !!row.isEditing,\n },\n typeof rowClassName === 'function' ? rowClassName(sanitizedRow) : rowClassName\n ),\n onClick: onRowClick\n ? (event: React.MouseEvent<HTMLElement>) => {\n if (\n event.target === event.currentTarget ||\n (event.target as HTMLElement).classList.contains('yt-table__cell')\n ) {\n event.preventDefault();\n event.persist();\n setActiveIndex(index);\n onRowClick(sanitizedRow);\n }\n }\n : () => {\n setActiveIndex(index);\n },\n };\n\n let cells = row.cells;\n\n if (row.depth > 0) {\n cells = row.cells.filter((cell: any) => !cell.column.hiddenOnSubRows);\n }\n\n const expandedRow = rowExpansionRenderer && row.isExpanded && <div>{rowExpansionRenderer(sanitizedRow, instance)}</div>;\n const rowContent = React.useMemo(() => {\n return (\n <>\n <FocusScope key={row.original._createKey} contain restoreFocus autoFocus>\n <div {...props} role=\"row\" ref={ref}>\n <input type=\"hidden\" name=\"_rowIndexPath\" value={row.id} />\n <input type=\"hidden\" name=\"_inlineEditingUniqueId\" value={row.original[inlineEditingUniqueId]} />\n {cells.map((cell: InternalTableCell) => renderCell(cell, sanitizedRow))}\n </div>\n </FocusScope>\n {expandedRow}\n </>\n );\n }, [row.original._createKey]);\n\n if (row.isEditing) {\n return rowContent;\n }\n\n return (\n <>\n <div {...props} role=\"row\" ref={ref}>\n {cells.map((cell: InternalTableCell) => renderCell(cell, sanitizedRow))}\n </div>\n {expandedRow}\n </>\n );\n});\n"],"names":["renderCell","cell","row","props","getCellProps","className","cn","column","align","style","flex","React","role","render","Row","forwardRef","TableRow","ref","index","instance","rowProps","activeIndex","onRowClick","rowClassName","rowExpansionRenderer","rowHeight","setActiveIndex","inlineEditingUniqueId","sanitizedRow","sanitizeRowProps","getRowProps","minHeight","undefined","paddingLeft","depth","isDragging","isEditing","onClick","event","target","currentTarget","classList","contains","preventDefault","persist","cells","filter","hiddenOnSubRows","expandedRow","isExpanded","rowContent","useMemo","FocusScope","key","original","_createKey","contain","restoreFocus","autoFocus","type","name","value","id","map"],"mappings":";;;;;;;;AAMA,IAAMA,UAAU,GAAG,SAAbA,UAAa,CAACC,IAAD,EAA0BC,GAA1B;AACf,MAAMC,KAAK,gBACJF,IAAI,CAACG,YAAL,EADI;AAEPC,IAAAA,SAAS,EAAEC,EAAE,CAAC,iDAAD,EAAoDL,IAAI,CAACM,MAAL,CAAYF,SAAhE,EAA2E;AACpF,iCAA2BJ,IAAI,CAACM,MAAL,CAAYC,KAAZ,KAAsB,MADmC;AAEpF,gCAA0BP,IAAI,CAACM,MAAL,CAAYC,KAAZ,KAAsB,OAFoC;AAGpF,qBAAe,CAACP,IAAI,CAACM,MAAL,CAAYC;AAHwD,KAA3E,CAFN;AAOPC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
var _rowIndexPath$split$m;
|
5
5
|
|
6
6
|
return (_rowIndexPath$split$m = rowIndexPath === null || rowIndexPath === void 0 ? void 0 : rowIndexPath.split('.').map(Number)) !== null && _rowIndexPath$split$m !== void 0 ? _rowIndexPath$split$m : [];
|
7
7
|
};
|
8
|
-
|
8
|
+
var getByRowIndexPath = function getByRowIndexPath(data, rowIndexPath) {
|
9
9
|
if (!rowIndexPath) {
|
10
10
|
return undefined;
|
11
11
|
}
|
12
12
|
|
13
|
-
|
14
|
-
|
13
|
+
var currenTRow = [].concat(data);
|
14
|
+
var indexes = convertRowIndexPathToNumberArray(String(rowIndexPath));
|
15
15
|
|
16
16
|
if (indexes.length) {
|
17
|
-
|
18
|
-
return indexes.reduce((value, index)
|
17
|
+
var startIndex = indexes.shift();
|
18
|
+
return indexes.reduce(function (value, index) {
|
19
19
|
var _value$subRows;
|
20
20
|
|
21
21
|
return value === null || value === void 0 ? void 0 : (_value$subRows = value.subRows) === null || _value$subRows === void 0 ? void 0 : _value$subRows[index];
|
@@ -24,13 +24,15 @@ const getByRowIndexPath = (data, rowIndexPath) => {
|
|
24
24
|
|
25
25
|
return undefined;
|
26
26
|
};
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
27
|
+
var setByRowIndexPath = function setByRowIndexPath(data, rowIndexPath, values) {
|
28
|
+
var nexTRow = [].concat(data);
|
29
|
+
var rowIndexes = convertRowIndexPathToNumberArray(rowIndexPath);
|
30
|
+
var rootIndex = rowIndexes.shift();
|
31
31
|
|
32
32
|
if (rowIndexes.length) {
|
33
|
-
|
33
|
+
var path = rowIndexes.map(function (index) {
|
34
|
+
return "subRows[" + index + "]";
|
35
|
+
}).join('.');
|
34
36
|
set(nexTRow[rootIndex], path, values);
|
35
37
|
} else {
|
36
38
|
nexTRow[rootIndex] = values;
|
@@ -38,11 +40,11 @@ const setByRowIndexPath = (data, rowIndexPath, values) => {
|
|
38
40
|
|
39
41
|
return nexTRow;
|
40
42
|
};
|
41
|
-
|
42
|
-
|
43
|
+
var getParentRowIndexPath = function getParentRowIndexPath(rowIndexPath) {
|
44
|
+
var parentIndexPath;
|
43
45
|
|
44
46
|
if (rowIndexPath) {
|
45
|
-
|
47
|
+
var rowIndexes = convertRowIndexPathToNumberArray(rowIndexPath);
|
46
48
|
rowIndexes.pop();
|
47
49
|
|
48
50
|
if (rowIndexes.length) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"rowIndexPath.js","sources":["../../../../../src/components/Table/util/rowIndexPath.ts"],"sourcesContent":["import set from 'lodash/set';\
|
1
|
+
{"version":3,"file":"rowIndexPath.js","sources":["../../../../../src/components/Table/util/rowIndexPath.ts"],"sourcesContent":["import set from 'lodash/set';\nimport { Row, RowIndexPath } from '../types';\n\nexport const convertRowIndexPathToNumberArray = (rowIndexPath: RowIndexPath): number[] =>\n rowIndexPath?.split('.').map(Number) ?? [];\n\nexport const getByRowIndexPath = <TRow>(data: Row<TRow>[], rowIndexPath: RowIndexPath): Row<TRow> | undefined => {\n if (!rowIndexPath) {\n return undefined;\n }\n\n const currenTRow = [...data];\n const indexes = convertRowIndexPathToNumberArray(String(rowIndexPath));\n\n if (indexes.length) {\n const startIndex = indexes.shift() as number;\n return indexes.reduce((value, index) => value?.subRows?.[index], currenTRow[startIndex]);\n }\n\n return undefined;\n};\n\nexport const setByRowIndexPath = <TRow>(data: Row<TRow>[], rowIndexPath: RowIndexPath, values: any): Row<TRow>[] => {\n const nexTRow = [...data];\n\n const rowIndexes = convertRowIndexPathToNumberArray(rowIndexPath);\n const rootIndex = rowIndexes.shift() as number;\n\n if (rowIndexes.length) {\n const path = rowIndexes.map(index => `subRows[${index}]`).join('.');\n set(nexTRow[rootIndex], path, values);\n } else {\n nexTRow[rootIndex] = values;\n }\n\n return nexTRow;\n};\n\nexport const getParentRowIndexPath = (rowIndexPath: RowIndexPath): RowIndexPath => {\n let parentIndexPath;\n\n if (rowIndexPath) {\n const rowIndexes = convertRowIndexPathToNumberArray(rowIndexPath);\n rowIndexes.pop();\n\n if (rowIndexes.length) {\n parentIndexPath = rowIndexes.join('.');\n }\n }\n\n return parentIndexPath;\n};\n"],"names":["convertRowIndexPathToNumberArray","rowIndexPath","split","map","Number","getByRowIndexPath","data","undefined","currenTRow","indexes","String","length","startIndex","shift","reduce","value","index","subRows","setByRowIndexPath","values","nexTRow","rowIndexes","rootIndex","path","join","set","getParentRowIndexPath","parentIndexPath","pop"],"mappings":";;IAGaA,gCAAgC,GAAG,SAAnCA,gCAAmC,CAACC,YAAD;AAAA;;AAAA,kCAC5CA,YAD4C,aAC5CA,YAD4C,uBAC5CA,YAAY,CAAEC,KAAd,CAAoB,GAApB,EAAyBC,GAAzB,CAA6BC,MAA7B,CAD4C,yEACJ,EADI;AAAA;IAGnCC,iBAAiB,GAAG,SAApBA,iBAAoB,CAAOC,IAAP,EAA0BL,YAA1B;AAC7B,MAAI,CAACA,YAAL,EAAmB;AACf,WAAOM,SAAP;AACH;;AAED,MAAMC,UAAU,aAAOF,IAAP,CAAhB;AACA,MAAMG,OAAO,GAAGT,gCAAgC,CAACU,MAAM,CAACT,YAAD,CAAP,CAAhD;;AAEA,MAAIQ,OAAO,CAACE,MAAZ,EAAoB;AAChB,QAAMC,UAAU,GAAGH,OAAO,CAACI,KAAR,EAAnB;AACA,WAAOJ,OAAO,CAACK,MAAR,CAAe,UAACC,KAAD,EAAQC,KAAR;AAAA;;AAAA,aAAkBD,KAAlB,aAAkBA,KAAlB,yCAAkBA,KAAK,CAAEE,OAAzB,mDAAkB,eAAiBD,KAAjB,CAAlB;AAAA,KAAf,EAA0DR,UAAU,CAACI,UAAD,CAApE,CAAP;AACH;;AAED,SAAOL,SAAP;AACH;IAEYW,iBAAiB,GAAG,SAApBA,iBAAoB,CAAOZ,IAAP,EAA0BL,YAA1B,EAAsDkB,MAAtD;AAC7B,MAAMC,OAAO,aAAOd,IAAP,CAAb;AAEA,MAAMe,UAAU,GAAGrB,gCAAgC,CAACC,YAAD,CAAnD;AACA,MAAMqB,SAAS,GAAGD,UAAU,CAACR,KAAX,EAAlB;;AAEA,MAAIQ,UAAU,CAACV,MAAf,EAAuB;AACnB,QAAMY,IAAI,GAAGF,UAAU,CAAClB,GAAX,CAAe,UAAAa,KAAK;AAAA,0BAAeA,KAAf;AAAA,KAApB,EAA6CQ,IAA7C,CAAkD,GAAlD,CAAb;AACAC,IAAAA,GAAG,CAACL,OAAO,CAACE,SAAD,CAAR,EAAqBC,IAArB,EAA2BJ,MAA3B,CAAH;AACH,GAHD,MAGO;AACHC,IAAAA,OAAO,CAACE,SAAD,CAAP,GAAqBH,MAArB;AACH;;AAED,SAAOC,OAAP;AACH;IAEYM,qBAAqB,GAAG,SAAxBA,qBAAwB,CAACzB,YAAD;AACjC,MAAI0B,eAAJ;;AAEA,MAAI1B,YAAJ,EAAkB;AACd,QAAMoB,UAAU,GAAGrB,gCAAgC,CAACC,YAAD,CAAnD;AACAoB,IAAAA,UAAU,CAACO,GAAX;;AAEA,QAAIP,UAAU,CAACV,MAAf,EAAuB;AACnBgB,MAAAA,eAAe,GAAGN,UAAU,CAACG,IAAX,CAAgB,GAAhB,CAAlB;AACH;AACJ;;AAED,SAAOG,eAAP;AACH;;;;"}
|
@@ -1,9 +1,17 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
var getTime = function getTime(value) {
|
2
|
+
var parsedValue = typeof value === 'string' ? new Date(value) : value;
|
3
3
|
return parsedValue !== null && parsedValue !== void 0 && parsedValue.getTime ? parsedValue.getTime() : undefined;
|
4
4
|
};
|
5
5
|
|
6
|
-
|
6
|
+
var getNumber = function getNumber(amount, decimalSeparator) {
|
7
|
+
if (amount === void 0) {
|
8
|
+
amount = '';
|
9
|
+
}
|
10
|
+
|
11
|
+
if (decimalSeparator === void 0) {
|
12
|
+
decimalSeparator = ',';
|
13
|
+
}
|
14
|
+
|
7
15
|
if (typeof amount === 'number') {
|
8
16
|
return amount;
|
9
17
|
}
|
@@ -12,7 +20,7 @@ const getNumber = (amount = '', decimalSeparator = ',') => {
|
|
12
20
|
return undefined;
|
13
21
|
}
|
14
22
|
|
15
|
-
|
23
|
+
var value;
|
16
24
|
|
17
25
|
if (decimalSeparator === ',') {
|
18
26
|
// replace digit seperator then replace decimal separator
|
@@ -25,7 +33,7 @@ const getNumber = (amount = '', decimalSeparator = ',') => {
|
|
25
33
|
return Number.isNaN(value) ? undefined : value;
|
26
34
|
};
|
27
35
|
|
28
|
-
|
36
|
+
var getString = function getString(value) {
|
29
37
|
if (value) {
|
30
38
|
return String(value).toLowerCase();
|
31
39
|
}
|
@@ -33,7 +41,7 @@ const getString = value => {
|
|
33
41
|
return undefined;
|
34
42
|
};
|
35
43
|
|
36
|
-
|
44
|
+
var guess = function guess(value) {
|
37
45
|
if (typeof value === 'boolean') {
|
38
46
|
return !!value;
|
39
47
|
}
|
@@ -41,7 +49,7 @@ const guess = value => {
|
|
41
49
|
return isNaN(value) ? getString(value) : Number(value);
|
42
50
|
};
|
43
51
|
|
44
|
-
|
52
|
+
var compareBasic = function compareBasic(a, b) {
|
45
53
|
// places undefined values first in ascending order instead of descending
|
46
54
|
if (a !== undefined && b === undefined) {
|
47
55
|
return 1;
|
@@ -50,30 +58,30 @@ const compareBasic = (a, b) => {
|
|
50
58
|
return a === b ? 0 : a > b ? 1 : -1;
|
51
59
|
};
|
52
60
|
|
53
|
-
|
54
|
-
datetime: (rowA, rowB, columnId)
|
55
|
-
|
56
|
-
|
61
|
+
var sortTypes = {
|
62
|
+
datetime: function datetime(rowA, rowB, columnId) {
|
63
|
+
var a = getTime(rowA.values[columnId]);
|
64
|
+
var b = getTime(rowB.values[columnId]);
|
57
65
|
return compareBasic(a, b);
|
58
66
|
},
|
59
|
-
string: (rowA, rowB, columnId)
|
60
|
-
|
61
|
-
|
67
|
+
string: function string(rowA, rowB, columnId) {
|
68
|
+
var a = getString(rowA.values[columnId]);
|
69
|
+
var b = getString(rowB.values[columnId]);
|
62
70
|
return compareBasic(a, b);
|
63
71
|
},
|
64
|
-
number: (rowA, rowB, columnId)
|
65
|
-
|
66
|
-
|
72
|
+
number: function number(rowA, rowB, columnId) {
|
73
|
+
var a = getNumber(rowA.values[columnId]);
|
74
|
+
var b = getNumber(rowB.values[columnId]);
|
67
75
|
return compareBasic(a, b);
|
68
76
|
},
|
69
|
-
boolean: (rowA, rowB, columnId)
|
70
|
-
|
71
|
-
|
77
|
+
"boolean": function boolean(rowA, rowB, columnId) {
|
78
|
+
var a = !!rowA.values[columnId];
|
79
|
+
var b = !!rowB.values[columnId];
|
72
80
|
return compareBasic(a, b);
|
73
81
|
},
|
74
|
-
auto: (rowA, rowB, columnId)
|
75
|
-
|
76
|
-
|
82
|
+
auto: function auto(rowA, rowB, columnId) {
|
83
|
+
var a = guess(rowA.values[columnId]);
|
84
|
+
var b = guess(rowB.values[columnId]);
|
77
85
|
return compareBasic(a, b);
|
78
86
|
}
|
79
87
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"sortTypes.js","sources":["../../../../../src/components/Table/util/sortTypes.ts"],"sourcesContent":["import { SortTypes, TableRow } from '../types';\
|
1
|
+
{"version":3,"file":"sortTypes.js","sources":["../../../../../src/components/Table/util/sortTypes.ts"],"sourcesContent":["import { SortTypes, TableRow } from '../types';\n\nconst getTime = (value: any): number | undefined => {\n const parsedValue: Date = typeof value === 'string' ? new Date(value) : value;\n return parsedValue?.getTime ? parsedValue.getTime() : undefined;\n};\n\nconst getNumber = (amount = '', decimalSeparator = ','): number | undefined => {\n if (typeof amount === 'number') {\n return amount;\n }\n\n if (amount === null || !amount.length) {\n return undefined;\n }\n\n let value;\n\n if (decimalSeparator === ',') {\n // replace digit seperator then replace decimal separator\n value = Number(amount.replace(/\\./g, '').replace(',', '.'));\n } else {\n // replace digit seperator\n value = Number(amount.replace(/,/g, ''));\n }\n\n return Number.isNaN(value) ? undefined : value;\n};\n\nconst getString = (value: any): string | undefined => {\n if (value) {\n return String(value).toLowerCase();\n }\n\n return undefined;\n};\n\nconst guess = (value: any): any => {\n if (typeof value === 'boolean') {\n return !!value;\n }\n\n return isNaN(value) ? getString(value) : Number(value);\n};\n\nconst compareBasic = (a: any, b: any) => {\n // places undefined values first in ascending order instead of descending\n if (a !== undefined && b === undefined) {\n return 1;\n }\n\n return a === b ? 0 : a > b ? 1 : -1;\n};\n\ntype SortHandler<T> = (rowA: TableRow<T>, rowB: TableRow<T>, columnId: string) => 0 | 1 | -1;\n\nexport const sortTypes: Record<SortTypes, SortHandler<any>> = {\n datetime: (rowA, rowB, columnId) => {\n const a = getTime(rowA.values[columnId]);\n const b = getTime(rowB.values[columnId]);\n return compareBasic(a, b);\n },\n string: (rowA, rowB, columnId) => {\n const a = getString(rowA.values[columnId]);\n const b = getString(rowB.values[columnId]);\n return compareBasic(a, b);\n },\n number: (rowA, rowB, columnId) => {\n const a = getNumber(rowA.values[columnId]);\n const b = getNumber(rowB.values[columnId]);\n return compareBasic(a, b);\n },\n boolean: (rowA, rowB, columnId) => {\n const a = !!rowA.values[columnId];\n const b = !!rowB.values[columnId];\n return compareBasic(a, b);\n },\n auto: (rowA, rowB, columnId) => {\n const a = guess(rowA.values[columnId]);\n const b = guess(rowB.values[columnId]);\n return compareBasic(a, b);\n },\n};\n"],"names":["getTime","value","parsedValue","Date","undefined","getNumber","amount","decimalSeparator","length","Number","replace","isNaN","getString","String","toLowerCase","guess","compareBasic","a","b","sortTypes","datetime","rowA","rowB","columnId","values","string","number","auto"],"mappings":"AAEA,IAAMA,OAAO,GAAG,SAAVA,OAAU,CAACC,KAAD;AACZ,MAAMC,WAAW,GAAS,OAAOD,KAAP,KAAiB,QAAjB,GAA4B,IAAIE,IAAJ,CAASF,KAAT,CAA5B,GAA8CA,KAAxE;AACA,SAAOC,WAAW,SAAX,IAAAA,WAAW,WAAX,IAAAA,WAAW,CAAEF,OAAb,GAAuBE,WAAW,CAACF,OAAZ,EAAvB,GAA+CI,SAAtD;AACH,CAHD;;AAKA,IAAMC,SAAS,GAAG,SAAZA,SAAY,CAACC,MAAD,EAAcC,gBAAd;MA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AACA,WAAOP,YAAY,CAACC,CAAD,EAAIC,CAAJ,CAAnB;AACH,GApByD;AAqB1DS,EAAAA,IAAI,EAAE,cAACN,IAAD,EAAOC,IAAP,EAAaC,QAAb;AACF,QAAMN,CAAC,GAAGF,KAAK,CAACM,IAAI,CAACG,MAAL,CAAYD,QAAZ,CAAD,CAAf;AACA,QAAML,CAAC,GAAGH,KAAK,CAACO,IAAI,CAACE,MAAL,CAAYD,QAAZ,CAAD,CAAf;AACA,WAAOP,YAAY,CAACC,CAAD,EAAIC,CAAJ,CAAnB;AACH;AAzByD;;;;"}
|
@@ -1,9 +1,11 @@
|
|
1
|
+
import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
1
2
|
import React__default from 'react';
|
2
3
|
|
3
|
-
|
4
|
+
var _excluded = ["children"];
|
5
|
+
var sanitizeRowProps = function sanitizeRowProps(row, rowExpansionRenderer) {
|
4
6
|
var _row$subRows;
|
5
7
|
|
6
|
-
|
8
|
+
var props = {
|
7
9
|
index: row.index,
|
8
10
|
indexPath: row.id,
|
9
11
|
values: row.original
|
@@ -13,11 +15,15 @@ const sanitizeRowProps = (row, rowExpansionRenderer) => {
|
|
13
15
|
props.isExpanded = !!row.isExpanded;
|
14
16
|
props.depth = row.depth;
|
15
17
|
|
16
|
-
props.toggleRowExpanded = ()
|
18
|
+
props.toggleRowExpanded = function () {
|
19
|
+
return row.toggleRowExpanded(!props.isExpanded);
|
20
|
+
};
|
17
21
|
} else if (rowExpansionRenderer) {
|
18
22
|
props.isExpanded = !!row.isExpanded;
|
19
23
|
|
20
|
-
props.toggleRowExpanded = ()
|
24
|
+
props.toggleRowExpanded = function () {
|
25
|
+
return row.toggleRowExpanded(!props.isExpanded);
|
26
|
+
};
|
21
27
|
}
|
22
28
|
|
23
29
|
if (row.toggleRowEditing) {
|
@@ -27,36 +33,40 @@ const sanitizeRowProps = (row, rowExpansionRenderer) => {
|
|
27
33
|
|
28
34
|
return props;
|
29
35
|
};
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
};
|
36
|
+
var getColumnsFromChildren = function getColumnsFromChildren(children, rowExpansionRenderer) {
|
37
|
+
var sortRules = [];
|
38
|
+
var columns = React__default.Children.toArray(children).filter(function (child) {
|
39
|
+
return !!child && !child.props.hidden;
|
40
|
+
}) // skip falsey or hidden columns
|
41
|
+
.map(function (_ref) {
|
42
|
+
var _ref$props = _ref.props,
|
43
|
+
groupChildren = _ref$props.children,
|
44
|
+
props = _objectWithoutPropertiesLoose(_ref$props, _excluded);
|
45
|
+
|
46
|
+
var column = _extends({}, props);
|
47
|
+
|
41
48
|
column.sortType = column.sortType || 'auto';
|
42
49
|
column.disableSortBy = column.disableSorting; // this is a Table.Group - TODO: Find a better way to determine the child type
|
43
50
|
|
44
51
|
if (props.title && groupChildren) {
|
45
52
|
column.Header = props.title;
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
53
|
+
|
54
|
+
var _getColumnsFromChildr = getColumnsFromChildren(groupChildren, rowExpansionRenderer),
|
55
|
+
groupColumns = _getColumnsFromChildr.columns,
|
56
|
+
groupSortRules = _getColumnsFromChildr.sortRules;
|
57
|
+
|
50
58
|
column.columns = groupColumns;
|
51
|
-
groupSortRules.forEach(
|
59
|
+
groupSortRules.forEach(function (sort) {
|
60
|
+
return sortRules.push(sort);
|
61
|
+
});
|
52
62
|
} else {
|
53
63
|
column.accessor = props.accessor;
|
54
64
|
column.Header = props.headRenderer || '';
|
55
65
|
|
56
|
-
column.Cell = columnProps
|
66
|
+
column.Cell = function (columnProps) {
|
57
67
|
var _props$cellRenderer, _cell$value;
|
58
68
|
|
59
|
-
|
69
|
+
var cell = {
|
60
70
|
accessor: columnProps.cell.column.id,
|
61
71
|
row: sanitizeRowProps(columnProps.cell.row, rowExpansionRenderer),
|
62
72
|
value: columnProps.cell.value
|
@@ -84,15 +94,17 @@ const getColumnsFromChildren = (children, rowExpansionRenderer) => {
|
|
84
94
|
return column;
|
85
95
|
});
|
86
96
|
return {
|
87
|
-
columns,
|
88
|
-
sortRules
|
97
|
+
columns: columns,
|
98
|
+
sortRules: sortRules
|
89
99
|
};
|
90
100
|
};
|
91
|
-
|
92
|
-
return sortRules === null || sortRules === void 0 ? void 0 : sortRules.map(rule
|
93
|
-
|
94
|
-
|
95
|
-
|
101
|
+
var getInternalSortRules = function getInternalSortRules(sortRules) {
|
102
|
+
return sortRules === null || sortRules === void 0 ? void 0 : sortRules.map(function (rule) {
|
103
|
+
return {
|
104
|
+
id: rule.accessor,
|
105
|
+
desc: rule.desc
|
106
|
+
};
|
107
|
+
});
|
96
108
|
};
|
97
109
|
|
98
110
|
export { getColumnsFromChildren, getInternalSortRules, sanitizeRowProps };
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"util.js","sources":["../../../../src/components/Table/util.ts"],"sourcesContent":["import React from 'react';\
|
1
|
+
{"version":3,"file":"util.js","sources":["../../../../src/components/Table/util.ts"],"sourcesContent":["import React from 'react';\nimport { TableRow, TableCell, TableChildren, InternalTableRow, InternalTableColumn, SortRule } from './types';\nimport { SortingRule } from 'react-table';\n\nexport const sanitizeRowProps = (row: InternalTableRow, rowExpansionRenderer: any): TableRow<any> => {\n const props: TableRow<any> = {\n index: row.index,\n indexPath: row.id,\n values: row.original,\n };\n\n if (row.subRows?.length > 0) {\n props.isExpanded = !!row.isExpanded;\n props.depth = row.depth;\n props.toggleRowExpanded = () => row.toggleRowExpanded(!props.isExpanded);\n } else if (rowExpansionRenderer) {\n props.isExpanded = !!row.isExpanded;\n props.toggleRowExpanded = () => row.toggleRowExpanded(!props.isExpanded);\n }\n\n if (row.toggleRowEditing) {\n props.isEditing = !!row.isEditing;\n props.toggleRowEditing = row.toggleRowEditing;\n }\n\n return props;\n};\n\nexport const getColumnsFromChildren = (children: TableChildren<any>, rowExpansionRenderer: any) => {\n const sortRules: SortingRule<any>[] = [];\n\n const columns = React.Children.toArray(children)\n .filter((child: any) => !!child && !child.props.hidden) // skip falsey or hidden columns\n .map(({ props: { children: groupChildren, ...props } }: any) => {\n const column: InternalTableColumn & { disableSortBy: boolean | undefined } = { ...props };\n\n column.sortType = column.sortType || 'auto';\n column.disableSortBy = column.disableSorting;\n\n // this is a Table.Group - TODO: Find a better way to determine the child type\n if (props.title && groupChildren) {\n column.Header = props.title;\n\n const { columns: groupColumns, sortRules: groupSortRules } = getColumnsFromChildren(\n groupChildren,\n rowExpansionRenderer\n );\n column.columns = groupColumns;\n groupSortRules.forEach(sort => sortRules.push(sort));\n } else {\n column.accessor = props.accessor;\n column.Header = props.headRenderer || '';\n column.Cell = (columnProps: any) => {\n const cell: TableCell<any> = {\n accessor: columnProps.cell.column.id,\n row: sanitizeRowProps(columnProps.cell.row, rowExpansionRenderer),\n value: columnProps.cell.value,\n };\n\n if (cell.row.isEditing && typeof props.editRenderer === 'function') {\n return props.editRenderer(cell);\n }\n\n return typeof props.cellRenderer === 'function' ? props.cellRenderer(cell) ?? null : cell.value ?? null;\n };\n\n // custom props\n column.align = props.align;\n column.flex = props.flex;\n\n if (props.sort && !props.disableSorting) {\n sortRules.push({\n id: props.accessor,\n desc: props.sort === 'desc',\n });\n }\n }\n\n return column;\n });\n\n return { columns, sortRules };\n};\n\nexport const getInternalSortRules = <T>(sortRules: SortRule<T>[] | undefined): SortingRule<T>[] | undefined => {\n return sortRules?.map<SortingRule<T>>(rule => ({ id: rule.accessor, desc: rule.desc }));\n};\n"],"names":["sanitizeRowProps","row","rowExpansionRenderer","props","index","indexPath","id","values","original","subRows","length","isExpanded","depth","toggleRowExpanded","toggleRowEditing","isEditing","getColumnsFromChildren","children","sortRules","columns","React","Children","toArray","filter","child","hidden","map","groupChildren","column","sortType","disableSortBy","disableSorting","title","Header","groupColumns","groupSortRules","forEach","sort","push","accessor","headRenderer","Cell","columnProps","cell","value","editRenderer","cellRenderer","align","flex","desc","getIntern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