@raystack/apsara 0.31.1 → 0.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/command/command.cjs +3 -0
- package/dist/command/command.cjs.map +1 -1
- package/dist/command/command.d.ts.map +1 -1
- package/dist/command/command.js +3 -0
- package/dist/command/command.js.map +1 -1
- package/dist/dialog/dialog.cjs +12 -0
- package/dist/dialog/dialog.cjs.map +1 -1
- package/dist/dialog/dialog.d.ts.map +1 -1
- package/dist/dialog/dialog.js +12 -0
- package/dist/dialog/dialog.js.map +1 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-icons@1.3.0_react@18.2.0/node_modules/@radix-ui/react-icons/dist/react-icons.esm.cjs +92 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-icons@1.3.0_react@18.2.0/node_modules/@radix-ui/react-icons/dist/react-icons.esm.cjs.map +1 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-icons@1.3.0_react@18.2.0/node_modules/@radix-ui/react-icons/dist/react-icons.esm.js +89 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-icons@1.3.0_react@18.2.0/node_modules/@radix-ui/react-icons/dist/react-icons.esm.js.map +1 -1
- package/dist/node_modules/.pnpm/@tanstack_react-table@8.9.2_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@tanstack/react-table/build/lib/index.cjs +1 -0
- package/dist/node_modules/.pnpm/@tanstack_react-table@8.9.2_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@tanstack/react-table/build/lib/index.cjs.map +1 -1
- package/dist/node_modules/.pnpm/@tanstack_react-table@8.9.2_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@tanstack/react-table/build/lib/index.js +1 -1
- package/dist/node_modules/.pnpm/@tanstack_table-core@8.9.2/node_modules/@tanstack/table-core/build/lib/index.cjs +20 -0
- package/dist/node_modules/.pnpm/@tanstack_table-core@8.9.2/node_modules/@tanstack/table-core/build/lib/index.cjs.map +1 -1
- package/dist/node_modules/.pnpm/@tanstack_table-core@8.9.2/node_modules/@tanstack/table-core/build/lib/index.js +20 -1
- package/dist/node_modules/.pnpm/@tanstack_table-core@8.9.2/node_modules/@tanstack/table-core/build/lib/index.js.map +1 -1
- package/dist/select/select.cjs +3 -0
- package/dist/select/select.cjs.map +1 -1
- package/dist/select/select.d.ts.map +1 -1
- package/dist/select/select.js +3 -0
- package/dist/select/select.js.map +1 -1
- package/dist/sheet/sheet.cjs +9 -0
- package/dist/sheet/sheet.cjs.map +1 -1
- package/dist/sheet/sheet.d.ts +12 -0
- package/dist/sheet/sheet.d.ts.map +1 -1
- package/dist/sheet/sheet.js +9 -0
- package/dist/sheet/sheet.js.map +1 -1
- package/dist/sidebar/sidebar.cjs +6 -6
- package/dist/sidebar/sidebar.cjs.map +1 -1
- package/dist/sidebar/sidebar.d.ts +4 -4
- package/dist/sidebar/sidebar.js +6 -6
- package/dist/sidebar/sidebar.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/table/table.cjs +24 -0
- package/dist/table/table.cjs.map +1 -1
- package/dist/table/table.d.ts.map +1 -1
- package/dist/table/table.js +24 -0
- package/dist/table/table.js.map +1 -1
- package/dist/toggle-group/togglegroup.cjs +9 -0
- package/dist/toggle-group/togglegroup.cjs.map +1 -1
- package/dist/toggle-group/togglegroup.d.ts.map +1 -1
- package/dist/toggle-group/togglegroup.js +9 -0
- package/dist/toggle-group/togglegroup.js.map +1 -1
- package/dist/v1/_virtual/isSameOrAfter.cjs +6 -0
- package/dist/v1/_virtual/isSameOrAfter.cjs.map +1 -0
- package/dist/v1/_virtual/isSameOrAfter.js +4 -0
- package/dist/v1/_virtual/isSameOrAfter.js.map +1 -0
- package/dist/v1/_virtual/isSameOrBefore.cjs +6 -0
- package/dist/v1/_virtual/isSameOrBefore.cjs.map +1 -0
- package/dist/v1/_virtual/isSameOrBefore.js +4 -0
- package/dist/v1/_virtual/isSameOrBefore.js.map +1 -0
- package/dist/v1/components/calendar/calendar.cjs +1 -1
- package/dist/v1/components/calendar/calendar.cjs.map +1 -1
- package/dist/v1/components/calendar/calendar.js +1 -1
- package/dist/v1/components/calendar/calendar.js.map +1 -1
- package/dist/v1/components/calendar/date-picker.cjs +26 -17
- package/dist/v1/components/calendar/date-picker.cjs.map +1 -1
- package/dist/v1/components/calendar/date-picker.d.ts.map +1 -1
- package/dist/v1/components/calendar/date-picker.js +26 -17
- package/dist/v1/components/calendar/date-picker.js.map +1 -1
- package/dist/v1/components/calendar/range-picker.cjs +2 -2
- package/dist/v1/components/calendar/range-picker.cjs.map +1 -1
- package/dist/v1/components/calendar/range-picker.d.ts +5 -1
- package/dist/v1/components/calendar/range-picker.d.ts.map +1 -1
- package/dist/v1/components/calendar/range-picker.js +2 -2
- package/dist/v1/components/calendar/range-picker.js.map +1 -1
- package/dist/v1/components/chip/chip.cjs +6 -6
- package/dist/v1/components/chip/chip.cjs.map +1 -1
- package/dist/v1/components/chip/chip.d.ts +4 -3
- package/dist/v1/components/chip/chip.d.ts.map +1 -1
- package/dist/v1/components/chip/chip.js +6 -6
- package/dist/v1/components/chip/chip.js.map +1 -1
- package/dist/v1/components/chip/chip.module.css.cjs +1 -1
- package/dist/v1/components/chip/chip.module.css.js +1 -1
- package/dist/v1/components/command/command.cjs +52 -0
- package/dist/v1/components/command/command.cjs.map +1 -0
- package/dist/v1/components/command/command.d.ts +2 -0
- package/dist/v1/components/command/command.d.ts.map +1 -0
- package/dist/v1/components/command/command.js +50 -0
- package/dist/v1/components/command/command.js.map +1 -0
- package/dist/v1/components/command/command.module.css.cjs +8 -0
- package/dist/v1/components/command/command.module.css.cjs.map +1 -0
- package/dist/v1/components/command/command.module.css.js +4 -0
- package/dist/v1/components/command/command.module.css.js.map +1 -0
- package/dist/v1/components/command/index.d.ts +2 -0
- package/dist/v1/components/command/index.d.ts.map +1 -0
- package/dist/v1/components/data-table/components/content.cjs +81 -0
- package/dist/v1/components/data-table/components/content.cjs.map +1 -0
- package/dist/v1/components/data-table/components/content.d.ts +3 -0
- package/dist/v1/components/data-table/components/content.d.ts.map +1 -0
- package/dist/v1/components/data-table/components/content.js +79 -0
- package/dist/v1/components/data-table/components/content.js.map +1 -0
- package/dist/v1/components/data-table/components/display-properties.cjs +14 -0
- package/dist/v1/components/data-table/components/display-properties.cjs.map +1 -0
- package/dist/v1/components/data-table/components/display-properties.d.ts +5 -0
- package/dist/v1/components/data-table/components/display-properties.d.ts.map +1 -0
- package/dist/v1/components/data-table/components/display-properties.js +12 -0
- package/dist/v1/components/data-table/components/display-properties.js.map +1 -0
- package/dist/v1/components/data-table/components/display-settings.cjs +51 -0
- package/dist/v1/components/data-table/components/display-settings.cjs.map +1 -0
- package/dist/v1/components/data-table/components/display-settings.d.ts +2 -0
- package/dist/v1/components/data-table/components/display-settings.d.ts.map +1 -0
- package/dist/v1/components/data-table/components/display-settings.js +49 -0
- package/dist/v1/components/data-table/components/display-settings.js.map +1 -0
- package/dist/v1/components/data-table/components/filters.cjs +44 -0
- package/dist/v1/components/data-table/components/filters.cjs.map +1 -0
- package/dist/v1/components/data-table/components/filters.d.ts +2 -0
- package/dist/v1/components/data-table/components/filters.d.ts.map +1 -0
- package/dist/v1/components/data-table/components/filters.js +42 -0
- package/dist/v1/components/data-table/components/filters.js.map +1 -0
- package/dist/v1/components/data-table/components/grouping.cjs +31 -0
- package/dist/v1/components/data-table/components/grouping.cjs.map +1 -0
- package/dist/v1/components/data-table/components/grouping.d.ts +9 -0
- package/dist/v1/components/data-table/components/grouping.d.ts.map +1 -0
- package/dist/v1/components/data-table/components/grouping.js +29 -0
- package/dist/v1/components/data-table/components/grouping.js.map +1 -0
- package/dist/v1/components/data-table/components/ordering.cjs +24 -0
- package/dist/v1/components/data-table/components/ordering.cjs.map +1 -0
- package/dist/v1/components/data-table/components/ordering.d.ts +8 -0
- package/dist/v1/components/data-table/components/ordering.d.ts.map +1 -0
- package/dist/v1/components/data-table/components/ordering.js +22 -0
- package/dist/v1/components/data-table/components/ordering.js.map +1 -0
- package/dist/v1/components/data-table/components/search.cjs +22 -0
- package/dist/v1/components/data-table/components/search.cjs.map +1 -0
- package/dist/v1/components/data-table/components/search.d.ts +3 -0
- package/dist/v1/components/data-table/components/search.d.ts.map +1 -0
- package/dist/v1/components/data-table/components/search.js +20 -0
- package/dist/v1/components/data-table/components/search.js.map +1 -0
- package/dist/v1/components/data-table/components/toolbar.cjs +15 -0
- package/dist/v1/components/data-table/components/toolbar.cjs.map +1 -0
- package/dist/v1/components/data-table/components/toolbar.d.ts +4 -0
- package/dist/v1/components/data-table/components/toolbar.d.ts.map +1 -0
- package/dist/v1/components/data-table/components/toolbar.js +13 -0
- package/dist/v1/components/data-table/components/toolbar.js.map +1 -0
- package/dist/v1/components/data-table/context.cjs +8 -0
- package/dist/v1/components/data-table/context.cjs.map +1 -0
- package/dist/v1/components/data-table/context.d.ts +3 -0
- package/dist/v1/components/data-table/context.d.ts.map +1 -0
- package/dist/v1/components/data-table/context.js +6 -0
- package/dist/v1/components/data-table/context.js.map +1 -0
- package/dist/v1/components/data-table/data-table.cjs +87 -0
- package/dist/v1/components/data-table/data-table.cjs.map +1 -0
- package/dist/v1/components/data-table/data-table.d.ts +12 -0
- package/dist/v1/components/data-table/data-table.d.ts.map +1 -0
- package/dist/v1/components/data-table/data-table.js +85 -0
- package/dist/v1/components/data-table/data-table.js.map +1 -0
- package/dist/v1/components/data-table/data-table.module.css.cjs +8 -0
- package/dist/v1/components/data-table/data-table.module.css.cjs.map +1 -0
- package/dist/v1/components/data-table/data-table.module.css.js +4 -0
- package/dist/v1/components/data-table/data-table.module.css.js.map +1 -0
- package/dist/v1/components/data-table/data-table.types.cjs +9 -0
- package/dist/v1/components/data-table/data-table.types.cjs.map +1 -0
- package/dist/v1/components/data-table/data-table.types.d.ts +102 -0
- package/dist/v1/components/data-table/data-table.types.d.ts.map +1 -0
- package/dist/v1/components/data-table/data-table.types.js +7 -0
- package/dist/v1/components/data-table/data-table.types.js.map +1 -0
- package/dist/v1/components/data-table/hooks/useDataTable.cjs +15 -0
- package/dist/v1/components/data-table/hooks/useDataTable.cjs.map +1 -0
- package/dist/v1/components/data-table/hooks/useDataTable.d.ts +2 -0
- package/dist/v1/components/data-table/hooks/useDataTable.d.ts.map +1 -0
- package/dist/v1/components/data-table/hooks/useDataTable.js +13 -0
- package/dist/v1/components/data-table/hooks/useDataTable.js.map +1 -0
- package/dist/v1/components/data-table/hooks/useFilters.cjs +78 -0
- package/dist/v1/components/data-table/hooks/useFilters.cjs.map +1 -0
- package/dist/v1/components/data-table/hooks/useFilters.d.ts +9 -0
- package/dist/v1/components/data-table/hooks/useFilters.d.ts.map +1 -0
- package/dist/v1/components/data-table/hooks/useFilters.js +76 -0
- package/dist/v1/components/data-table/hooks/useFilters.js.map +1 -0
- package/dist/v1/components/data-table/index.d.ts +4 -0
- package/dist/v1/components/data-table/index.d.ts.map +1 -0
- package/dist/v1/components/data-table/utils/filter-operations.cjs +83 -0
- package/dist/v1/components/data-table/utils/filter-operations.cjs.map +1 -0
- package/dist/v1/components/data-table/utils/filter-operations.d.ts +11 -0
- package/dist/v1/components/data-table/utils/filter-operations.d.ts.map +1 -0
- package/dist/v1/components/data-table/utils/filter-operations.js +80 -0
- package/dist/v1/components/data-table/utils/filter-operations.js.map +1 -0
- package/dist/v1/components/data-table/utils/index.cjs +156 -0
- package/dist/v1/components/data-table/utils/index.cjs.map +1 -0
- package/dist/v1/components/data-table/utils/index.d.ts +14 -0
- package/dist/v1/components/data-table/utils/index.d.ts.map +1 -0
- package/dist/v1/components/data-table/utils/index.js +147 -0
- package/dist/v1/components/data-table/utils/index.js.map +1 -0
- package/dist/v1/components/dialog/dialog.cjs +33 -0
- package/dist/v1/components/dialog/dialog.cjs.map +1 -0
- package/dist/v1/components/dialog/dialog.d.ts +33 -0
- package/dist/v1/components/dialog/dialog.d.ts.map +1 -0
- package/dist/v1/components/dialog/dialog.js +30 -0
- package/dist/v1/components/dialog/dialog.js.map +1 -0
- package/dist/v1/components/dialog/dialog.module.css.cjs +8 -0
- package/dist/v1/components/dialog/dialog.module.css.cjs.map +1 -0
- package/dist/v1/components/dialog/dialog.module.css.js +4 -0
- package/dist/v1/components/dialog/dialog.module.css.js.map +1 -0
- package/dist/v1/components/dialog/index.d.ts +2 -0
- package/dist/v1/components/dialog/index.d.ts.map +1 -0
- package/dist/v1/components/filter-chip/filter-chip.cjs +28 -19
- package/dist/v1/components/filter-chip/filter-chip.cjs.map +1 -1
- package/dist/v1/components/filter-chip/filter-chip.d.ts +3 -7
- package/dist/v1/components/filter-chip/filter-chip.d.ts.map +1 -1
- package/dist/v1/components/filter-chip/filter-chip.js +28 -19
- package/dist/v1/components/filter-chip/filter-chip.js.map +1 -1
- package/dist/v1/components/flex/flex.cjs +9 -0
- package/dist/v1/components/flex/flex.cjs.map +1 -1
- package/dist/v1/components/flex/flex.d.ts +1 -1
- package/dist/v1/components/flex/flex.d.ts.map +1 -1
- package/dist/v1/components/flex/flex.js +9 -0
- package/dist/v1/components/flex/flex.js.map +1 -1
- package/dist/v1/components/flex/flex.module.css.cjs +1 -1
- package/dist/v1/components/flex/flex.module.css.js +1 -1
- package/dist/v1/components/icon-button/icon-button.cjs +1 -1
- package/dist/v1/components/icon-button/icon-button.cjs.map +1 -1
- package/dist/v1/components/icon-button/icon-button.d.ts +1 -2
- package/dist/v1/components/icon-button/icon-button.d.ts.map +1 -1
- package/dist/v1/components/icon-button/icon-button.js +1 -1
- package/dist/v1/components/icon-button/icon-button.js.map +1 -1
- package/dist/v1/components/icons/assets/filter.svg.cjs +41 -0
- package/dist/v1/components/icons/assets/filter.svg.cjs.map +1 -0
- package/dist/v1/components/icons/assets/filter.svg.js +20 -0
- package/dist/v1/components/icons/assets/filter.svg.js.map +1 -0
- package/dist/v1/components/icons/icons.d.ts +3 -0
- package/dist/v1/components/icons/icons.d.ts.map +1 -0
- package/dist/v1/components/icons/index.d.ts +2 -0
- package/dist/v1/components/icons/index.d.ts.map +1 -0
- package/dist/v1/components/input-field/input-field.cjs +1 -1
- package/dist/v1/components/input-field/input-field.cjs.map +1 -1
- package/dist/v1/components/input-field/input-field.js +1 -1
- package/dist/v1/components/input-field/input-field.js.map +1 -1
- package/dist/v1/components/input-field/input-field.module.css.cjs +1 -1
- package/dist/v1/components/input-field/input-field.module.css.js +1 -1
- package/dist/v1/components/select/select.cjs +5 -5
- package/dist/v1/components/select/select.cjs.map +1 -1
- package/dist/v1/components/select/select.d.ts +12 -1
- package/dist/v1/components/select/select.d.ts.map +1 -1
- package/dist/v1/components/select/select.js +5 -5
- package/dist/v1/components/select/select.js.map +1 -1
- package/dist/v1/components/select/select.module.css.cjs +1 -1
- package/dist/v1/components/select/select.module.css.js +1 -1
- package/dist/v1/components/sheet/index.d.ts +2 -0
- package/dist/v1/components/sheet/index.d.ts.map +1 -0
- package/dist/v1/components/sheet/sheet.cjs +48 -0
- package/dist/v1/components/sheet/sheet.cjs.map +1 -0
- package/dist/v1/components/sheet/sheet.d.ts +35 -0
- package/dist/v1/components/sheet/sheet.d.ts.map +1 -0
- package/dist/v1/components/sheet/sheet.js +43 -0
- package/dist/v1/components/sheet/sheet.js.map +1 -0
- package/dist/v1/components/sheet/sheet.module.css.cjs +8 -0
- package/dist/v1/components/sheet/sheet.module.css.cjs.map +1 -0
- package/dist/v1/components/sheet/sheet.module.css.js +4 -0
- package/dist/v1/components/sheet/sheet.module.css.js.map +1 -0
- package/dist/v1/components/sidebar/index.d.ts +2 -0
- package/dist/v1/components/sidebar/index.d.ts.map +1 -0
- package/dist/v1/components/sidebar/sidebar.cjs +47 -0
- package/dist/v1/components/sidebar/sidebar.cjs.map +1 -0
- package/dist/v1/components/{sidepanel/sidepanel.d.ts → sidebar/sidebar.d.ts} +22 -11
- package/dist/v1/components/sidebar/sidebar.d.ts.map +1 -0
- package/dist/v1/components/sidebar/sidebar.js +45 -0
- package/dist/v1/components/sidebar/sidebar.js.map +1 -0
- package/dist/v1/components/sidebar/sidebar.module.css.cjs +8 -0
- package/dist/v1/components/sidebar/sidebar.module.css.cjs.map +1 -0
- package/dist/v1/components/sidebar/sidebar.module.css.js +4 -0
- package/dist/v1/components/sidebar/sidebar.module.css.js.map +1 -0
- package/dist/v1/components/table/index.d.ts +2 -0
- package/dist/v1/components/table/index.d.ts.map +1 -0
- package/dist/v1/components/table/table.cjs +44 -0
- package/dist/v1/components/table/table.cjs.map +1 -0
- package/dist/v1/components/table/table.d.ts +30 -0
- package/dist/v1/components/table/table.d.ts.map +1 -0
- package/dist/v1/components/table/table.js +42 -0
- package/dist/v1/components/table/table.js.map +1 -0
- package/dist/v1/components/table/table.module.css.cjs +8 -0
- package/dist/v1/components/table/table.module.css.cjs.map +1 -0
- package/dist/v1/components/table/table.module.css.js +4 -0
- package/dist/v1/components/table/table.module.css.js.map +1 -0
- package/dist/v1/components/tooltip/tooltip.cjs +3 -2
- package/dist/v1/components/tooltip/tooltip.cjs.map +1 -1
- package/dist/v1/components/tooltip/tooltip.d.ts +8 -2
- package/dist/v1/components/tooltip/tooltip.d.ts.map +1 -1
- package/dist/v1/components/tooltip/tooltip.js +3 -2
- package/dist/v1/components/tooltip/tooltip.js.map +1 -1
- package/dist/v1/index.cjs +16 -2
- package/dist/v1/index.cjs.map +1 -1
- package/dist/v1/index.d.ts +7 -1
- package/dist/v1/index.d.ts.map +1 -1
- package/dist/v1/index.js +9 -1
- package/dist/v1/index.js.map +1 -1
- package/dist/v1/node_modules/.pnpm/@radix-ui_primitive@1.0.0/node_modules/@radix-ui/primitive/dist/index.module.cjs +11 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_primitive@1.0.0/node_modules/@radix-ui/primitive/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_primitive@1.0.0/node_modules/@radix-ui/primitive/dist/index.module.js +9 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_primitive@1.0.0/node_modules/@radix-ui/primitive/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-compose-refs@1.0.0_react@18.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.module.cjs +30 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-compose-refs@1.0.0_react@18.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-compose-refs@1.0.0_react@18.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.module.js +27 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-compose-refs@1.0.0_react@18.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-context@1.0.0_react@18.2.0/node_modules/@radix-ui/react-context/dist/index.module.cjs +103 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-context@1.0.0_react@18.2.0/node_modules/@radix-ui/react-context/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-context@1.0.0_react@18.2.0/node_modules/@radix-ui/react-context/dist/index.module.js +101 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-context@1.0.0_react@18.2.0/node_modules/@radix-ui/react-context/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-dialog@1.0.0_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-dialog/dist/index.module.cjs +224 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-dialog@1.0.0_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-dialog/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-dialog@1.0.0_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-dialog/dist/index.module.js +214 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-dialog@1.0.0_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-dialog/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-dialog@1.0.4_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-dialog/dist/index.cjs +298 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-dialog@1.0.4_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-dialog/dist/index.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-dialog@1.0.4_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-dialog/dist/index.js +280 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-dialog@1.0.4_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-dialog/dist/index.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-dismissable-layer/dist/index.module.cjs +235 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-dismissable-layer/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-dismissable-layer/dist/index.module.js +233 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-dismissable-layer/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-focus-guards@1.0.0_react@18.2.0/node_modules/@radix-ui/react-focus-guards/dist/index.module.cjs +32 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-focus-guards@1.0.0_react@18.2.0/node_modules/@radix-ui/react-focus-guards/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-focus-guards@1.0.0_react@18.2.0/node_modules/@radix-ui/react-focus-guards/dist/index.module.js +30 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-focus-guards@1.0.0_react@18.2.0/node_modules/@radix-ui/react-focus-guards/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-focus-scope@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-focus-scope/dist/index.module.cjs +254 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-focus-scope@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-focus-scope/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-focus-scope@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-focus-scope/dist/index.module.js +252 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-focus-scope@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-focus-scope/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-icons@1.3.0_react@18.2.0/node_modules/@radix-ui/react-icons/dist/react-icons.esm.cjs +92 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-icons@1.3.0_react@18.2.0/node_modules/@radix-ui/react-icons/dist/react-icons.esm.cjs.map +1 -1
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-icons@1.3.0_react@18.2.0/node_modules/@radix-ui/react-icons/dist/react-icons.esm.js +89 -1
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-icons@1.3.0_react@18.2.0/node_modules/@radix-ui/react-icons/dist/react-icons.esm.js.map +1 -1
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-id@1.0.0_react@18.2.0/node_modules/@radix-ui/react-id/dist/index.module.cjs +40 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-id@1.0.0_react@18.2.0/node_modules/@radix-ui/react-id/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-id@1.0.0_react@18.2.0/node_modules/@radix-ui/react-id/dist/index.module.js +19 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-id@1.0.0_react@18.2.0/node_modules/@radix-ui/react-id/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-menu@2.0.5_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-menu/dist/index.js +2 -2
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-popover@1.0.6_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-popover/dist/index.js +2 -2
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-popover@1.0.6_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-popover/dist/index.js.map +1 -1
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-portal@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-portal/dist/index.module.cjs +17 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-portal@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-portal/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-portal@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-portal/dist/index.module.js +15 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-portal@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-portal/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-presence@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-presence/dist/index.module.cjs +133 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-presence@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-presence/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-presence@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-presence/dist/index.module.js +131 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-presence@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-presence/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-primitive@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-primitive/dist/index.module.cjs +88 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-primitive@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-primitive/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-primitive@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-primitive/dist/index.module.js +85 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-primitive@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-primitive/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-slot@1.0.0_react@18.2.0/node_modules/@radix-ui/react-slot/dist/index.module.cjs +82 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-slot@1.0.0_react@18.2.0/node_modules/@radix-ui/react-slot/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-slot@1.0.0_react@18.2.0/node_modules/@radix-ui/react-slot/dist/index.module.js +79 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-slot@1.0.0_react@18.2.0/node_modules/@radix-ui/react-slot/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-callback-ref@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.module.cjs +21 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-callback-ref@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-callback-ref@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.module.js +19 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-callback-ref@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-controllable-state@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.module.cjs +50 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-controllable-state@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-controllable-state@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.module.js +48 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-controllable-state@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-escape-keydown@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.module.cjs +23 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-escape-keydown@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-escape-keydown@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.module.js +21 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-escape-keydown@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-layout-effect@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.module.cjs +14 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-layout-effect@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-layout-effect@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.module.js +12 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-layout-effect@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@tanstack_react-table@8.9.2_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@tanstack/react-table/build/lib/index.cjs +131 -0
- package/dist/v1/node_modules/.pnpm/@tanstack_react-table@8.9.2_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@tanstack/react-table/build/lib/index.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@tanstack_react-table@8.9.2_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@tanstack/react-table/build/lib/index.js +72 -0
- package/dist/v1/node_modules/.pnpm/@tanstack_react-table@8.9.2_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@tanstack/react-table/build/lib/index.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@tanstack_table-core@8.9.2/node_modules/@tanstack/table-core/build/lib/index.cjs +3338 -0
- package/dist/v1/node_modules/.pnpm/@tanstack_table-core@8.9.2/node_modules/@tanstack/table-core/build/lib/index.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@tanstack_table-core@8.9.2/node_modules/@tanstack/table-core/build/lib/index.js +3299 -0
- package/dist/v1/node_modules/.pnpm/@tanstack_table-core@8.9.2/node_modules/@tanstack/table-core/build/lib/index.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/cmdk@0.2.0_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/cmdk/dist/index.cjs +39 -0
- package/dist/v1/node_modules/.pnpm/cmdk@0.2.0_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/cmdk/dist/index.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/cmdk@0.2.0_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/cmdk/dist/index.js +8 -0
- package/dist/v1/node_modules/.pnpm/cmdk@0.2.0_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/cmdk/dist/index.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/command-score@0.1.2/node_modules/command-score/index.cjs +146 -0
- package/dist/v1/node_modules/.pnpm/command-score@0.1.2/node_modules/command-score/index.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/command-score@0.1.2/node_modules/command-score/index.js +142 -0
- package/dist/v1/node_modules/.pnpm/command-score@0.1.2/node_modules/command-score/index.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/dayjs@1.11.11/node_modules/dayjs/plugin/isSameOrAfter.cjs +16 -0
- package/dist/v1/node_modules/.pnpm/dayjs@1.11.11/node_modules/dayjs/plugin/isSameOrAfter.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/dayjs@1.11.11/node_modules/dayjs/plugin/isSameOrAfter.js +12 -0
- package/dist/v1/node_modules/.pnpm/dayjs@1.11.11/node_modules/dayjs/plugin/isSameOrAfter.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/dayjs@1.11.11/node_modules/dayjs/plugin/isSameOrBefore.cjs +16 -0
- package/dist/v1/node_modules/.pnpm/dayjs@1.11.11/node_modules/dayjs/plugin/isSameOrBefore.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/dayjs@1.11.11/node_modules/dayjs/plugin/isSameOrBefore.js +12 -0
- package/dist/v1/node_modules/.pnpm/dayjs@1.11.11/node_modules/dayjs/plugin/isSameOrBefore.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/Combination.cjs +34 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/Combination.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/Combination.js +11 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/Combination.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/SideEffect.cjs +169 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/SideEffect.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +146 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/SideEffect.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/UI.cjs +60 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/UI.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/UI.js +39 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/UI.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.cjs +24 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +22 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/handleScroll.cjs +100 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/handleScroll.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +97 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/handleScroll.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/medium.cjs +8 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/medium.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/medium.js +6 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/medium.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/sidecar.cjs +12 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/sidecar.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/sidecar.js +8 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/sidecar.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.5_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/Combination.cjs +2 -2
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.5_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/Combination.js +2 -2
- package/dist/v1/style.css +1 -1
- package/dist/v1/types/filters.cjs +39 -0
- package/dist/v1/types/filters.cjs.map +1 -0
- package/dist/v1/types/filters.d.ts +42 -0
- package/dist/v1/types/filters.d.ts.map +1 -0
- package/dist/v1/types/filters.js +36 -0
- package/dist/v1/types/filters.js.map +1 -0
- package/package.json +2 -1
- package/dist/v1/components/sidepanel/index.d.ts +0 -2
- package/dist/v1/components/sidepanel/index.d.ts.map +0 -1
- package/dist/v1/components/sidepanel/sidepanel.cjs +0 -44
- package/dist/v1/components/sidepanel/sidepanel.cjs.map +0 -1
- package/dist/v1/components/sidepanel/sidepanel.d.ts.map +0 -1
- package/dist/v1/components/sidepanel/sidepanel.js +0 -42
- package/dist/v1/components/sidepanel/sidepanel.js.map +0 -1
- package/dist/v1/components/sidepanel/sidepanel.module.css.cjs +0 -8
- package/dist/v1/components/sidepanel/sidepanel.module.css.cjs.map +0 -1
- package/dist/v1/components/sidepanel/sidepanel.module.css.js +0 -4
- package/dist/v1/components/sidepanel/sidepanel.module.css.js.map +0 -1
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { j as jsxRuntimeExports } from '../../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js';
|
|
2
|
+
import { useState, useRef, useMemo, useEffect } from 'react';
|
|
3
|
+
import { TableContext } from './context.js';
|
|
4
|
+
import { useReactTable } from '../../node_modules/.pnpm/@tanstack_react-table@8.9.2_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@tanstack/react-table/build/lib/index.js';
|
|
5
|
+
import { getDefaultTableQuery, getInitialColumnVisibility, queryToTableState, getColumnsWithFilterFn, groupData, hasQueryChanged, sanitizeTableQuery, defaultGroupOption } from './utils/index.js';
|
|
6
|
+
import { Content } from './components/content.js';
|
|
7
|
+
import { Toolbar } from './components/toolbar.js';
|
|
8
|
+
import { TableSearch } from './components/search.js';
|
|
9
|
+
import { getCoreRowModel, getExpandedRowModel, getSortedRowModel, getFilteredRowModel } from '../../node_modules/.pnpm/@tanstack_table-core@8.9.2/node_modules/@tanstack/table-core/build/lib/index.js';
|
|
10
|
+
|
|
11
|
+
function DataTableRoot({ data = [], columns, query, mode = "client", isLoading = false, loadingRowCount = 3, defaultSort, children, onTableQueryChange, onLoadMore, }) {
|
|
12
|
+
const defaultTableQuery = getDefaultTableQuery(defaultSort, query);
|
|
13
|
+
const initialColumnVisibility = getInitialColumnVisibility(columns);
|
|
14
|
+
const [columnVisibility, setColumnVisibility] = useState(initialColumnVisibility);
|
|
15
|
+
const [tableQuery, setTableQuery] = useState(defaultTableQuery);
|
|
16
|
+
const oldQueryRef = useRef(null);
|
|
17
|
+
const reactTableState = useMemo(() => queryToTableState(tableQuery), [tableQuery]);
|
|
18
|
+
function onDisplaySettingsReset() {
|
|
19
|
+
setTableQuery((prev) => ({ ...prev, ...defaultTableQuery }));
|
|
20
|
+
setColumnVisibility(initialColumnVisibility);
|
|
21
|
+
}
|
|
22
|
+
const group_by = tableQuery.group_by?.[0];
|
|
23
|
+
const columnsWithFilters = useMemo(() => getColumnsWithFilterFn(columns, tableQuery.filters), [columns, tableQuery.filters]);
|
|
24
|
+
const groupedData = useMemo(() => groupData(data, group_by, columns), [data, group_by, columns]);
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
if (tableQuery &&
|
|
27
|
+
onTableQueryChange &&
|
|
28
|
+
hasQueryChanged(oldQueryRef.current, tableQuery) &&
|
|
29
|
+
mode === "server") {
|
|
30
|
+
onTableQueryChange(sanitizeTableQuery(tableQuery));
|
|
31
|
+
oldQueryRef.current = tableQuery;
|
|
32
|
+
}
|
|
33
|
+
}, [tableQuery, onTableQueryChange]);
|
|
34
|
+
const table = useReactTable({
|
|
35
|
+
data: groupedData,
|
|
36
|
+
columns: columnsWithFilters,
|
|
37
|
+
getCoreRowModel: getCoreRowModel(),
|
|
38
|
+
getExpandedRowModel: getExpandedRowModel(),
|
|
39
|
+
getSubRows: (row) => row?.subRows || [],
|
|
40
|
+
getSortedRowModel: mode === "server" ? undefined : getSortedRowModel(),
|
|
41
|
+
getFilteredRowModel: mode === "server" ? undefined : getFilteredRowModel(),
|
|
42
|
+
manualSorting: mode === "server",
|
|
43
|
+
manualFiltering: mode === "server",
|
|
44
|
+
onColumnVisibilityChange: setColumnVisibility,
|
|
45
|
+
globalFilterFn: mode === "server" ? undefined : "auto",
|
|
46
|
+
initialState: {
|
|
47
|
+
columnVisibility: initialColumnVisibility,
|
|
48
|
+
},
|
|
49
|
+
filterFromLeafRows: true,
|
|
50
|
+
state: {
|
|
51
|
+
...reactTableState,
|
|
52
|
+
columnVisibility: columnVisibility,
|
|
53
|
+
expanded: group_by && group_by !== defaultGroupOption.id ? true : undefined,
|
|
54
|
+
},
|
|
55
|
+
});
|
|
56
|
+
function updateTableQuery(fn) {
|
|
57
|
+
setTableQuery((prev) => fn(prev));
|
|
58
|
+
}
|
|
59
|
+
function loadMoreData() {
|
|
60
|
+
if (mode === "server" && onLoadMore) {
|
|
61
|
+
onLoadMore();
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
const contextValue = {
|
|
65
|
+
table,
|
|
66
|
+
columns,
|
|
67
|
+
mode,
|
|
68
|
+
isLoading,
|
|
69
|
+
loadMoreData,
|
|
70
|
+
tableQuery,
|
|
71
|
+
updateTableQuery,
|
|
72
|
+
onDisplaySettingsReset,
|
|
73
|
+
defaultSort,
|
|
74
|
+
loadingRowCount,
|
|
75
|
+
};
|
|
76
|
+
return (jsxRuntimeExports.jsx(TableContext.Provider, { value: contextValue, children: children }));
|
|
77
|
+
}
|
|
78
|
+
const DataTable = Object.assign(DataTableRoot, {
|
|
79
|
+
Content: Content,
|
|
80
|
+
Toolbar: Toolbar,
|
|
81
|
+
Search: TableSearch,
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
export { DataTable };
|
|
85
|
+
//# sourceMappingURL=data-table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-table.js","sources":["../../../../v1/components/data-table/data-table.tsx"],"sourcesContent":["import { useEffect, useMemo, useRef, useState } from \"react\";\nimport { TableContext } from \"./context\";\nimport {\n DataTableProps,\n DataTableQuery,\n GroupedData,\n TableContextType,\n TableQueryUpdateFn,\n} from \"./data-table.types\";\nimport {\n VisibilityState,\n getCoreRowModel,\n getFilteredRowModel,\n getSortedRowModel,\n useReactTable,\n getExpandedRowModel,\n} from \"@tanstack/react-table\";\nimport {\n defaultGroupOption,\n getColumnsWithFilterFn,\n getDefaultTableQuery,\n getInitialColumnVisibility,\n groupData,\n hasQueryChanged,\n queryToTableState,\n sanitizeTableQuery,\n} from \"./utils\";\nimport { Content } from \"./components/content\";\nimport { Toolbar } from \"./components/toolbar\";\nimport { TableSearch } from \"./components/search\";\n\nfunction DataTableRoot<TData, TValue>({\n data = [],\n columns,\n query,\n mode = \"client\",\n isLoading = false,\n loadingRowCount = 3,\n defaultSort,\n children,\n onTableQueryChange,\n onLoadMore,\n}: React.PropsWithChildren<DataTableProps<TData, TValue>>) {\n const defaultTableQuery = getDefaultTableQuery(defaultSort, query);\n const initialColumnVisibility = getInitialColumnVisibility(columns);\n\n const [columnVisibility, setColumnVisibility] = useState<VisibilityState>(\n initialColumnVisibility\n );\n const [tableQuery, setTableQuery] =\n useState<DataTableQuery>(defaultTableQuery);\n\n const oldQueryRef = useRef<DataTableQuery | null>(null);\n\n const reactTableState = useMemo(\n () => queryToTableState(tableQuery),\n [tableQuery]\n );\n\n function onDisplaySettingsReset() {\n setTableQuery((prev) => ({ ...prev, ...defaultTableQuery }));\n setColumnVisibility(initialColumnVisibility);\n }\n\n const group_by = tableQuery.group_by?.[0];\n\n const columnsWithFilters = useMemo(\n () => getColumnsWithFilterFn<TData, TValue>(columns, tableQuery.filters),\n [columns, tableQuery.filters]\n );\n\n const groupedData = useMemo(\n () => groupData(data, group_by, columns),\n [data, group_by, columns]\n );\n\n useEffect(() => {\n if (\n tableQuery &&\n onTableQueryChange &&\n hasQueryChanged(oldQueryRef.current, tableQuery) &&\n mode === \"server\"\n ) {\n onTableQueryChange(sanitizeTableQuery(tableQuery));\n oldQueryRef.current = tableQuery;\n }\n }, [tableQuery, onTableQueryChange]);\n\n const table = useReactTable({\n data: groupedData as TData[],\n columns: columnsWithFilters,\n getCoreRowModel: getCoreRowModel(),\n getExpandedRowModel: getExpandedRowModel(),\n getSubRows: (row) => (row as GroupedData<TData>)?.subRows || [],\n getSortedRowModel: mode === \"server\" ? undefined : getSortedRowModel(),\n getFilteredRowModel: mode === \"server\" ? undefined : getFilteredRowModel(),\n manualSorting: mode === \"server\",\n manualFiltering: mode === \"server\",\n onColumnVisibilityChange: setColumnVisibility,\n globalFilterFn: mode === \"server\" ? undefined : \"auto\",\n initialState: {\n columnVisibility: initialColumnVisibility,\n },\n filterFromLeafRows: true,\n state: {\n ...reactTableState,\n columnVisibility: columnVisibility,\n expanded:\n group_by && group_by !== defaultGroupOption.id ? true : undefined,\n },\n });\n\n function updateTableQuery(fn: TableQueryUpdateFn) {\n setTableQuery((prev) => fn(prev));\n }\n\n function loadMoreData() {\n if (mode === \"server\" && onLoadMore) {\n onLoadMore();\n }\n }\n\n const contextValue: TableContextType<TData, TValue> = {\n table,\n columns,\n mode,\n isLoading,\n loadMoreData,\n tableQuery,\n updateTableQuery,\n onDisplaySettingsReset,\n defaultSort,\n loadingRowCount,\n };\n\n return (\n <TableContext.Provider value={contextValue}>\n {children}\n </TableContext.Provider>\n );\n}\n\nexport const DataTable = Object.assign(DataTableRoot, {\n Content: Content,\n Toolbar: Toolbar,\n Search: TableSearch,\n});\n"],"names":["_jsx"],"mappings":";;;;;;;;;;AA+BA,SAAS,aAAa,CAAgB,EACpC,IAAI,GAAG,EAAE,EACT,OAAO,EACP,KAAK,EACL,IAAI,GAAG,QAAQ,EACf,SAAS,GAAG,KAAK,EACjB,eAAe,GAAG,CAAC,EACnB,WAAW,EACX,QAAQ,EACR,kBAAkB,EAClB,UAAU,GAC6C,EAAA;IACvD,MAAM,iBAAiB,GAAG,oBAAoB,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;AACnE,IAAA,MAAM,uBAAuB,GAAG,0BAA0B,CAAC,OAAO,CAAC,CAAC;IAEpE,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAAG,QAAQ,CACtD,uBAAuB,CACxB,CAAC;IACF,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAC/B,QAAQ,CAAiB,iBAAiB,CAAC,CAAC;AAE9C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CACa,EACxB;AACJ,CAAC;MAEY,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE;AACpD,IAAA,OAAO,EAAE,OAAO;AAChB,IAAA,OAAO,EAAE,OAAO;AAChB,IAAA,MAAM,EAAE,WAAW;AACpB,CAAA;;;;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var styles = {"toolbar":"data-table-module_toolbar__qdolw","display-popover-content":"data-table-module_display-popover-content__A7AAg","display-popover-properties-container":"data-table-module_display-popover-properties-container__kxNzW","display-popover-properties-select":"data-table-module_display-popover-properties-select__oX7TC","display-popover-reset-container":"data-table-module_display-popover-reset-container__xEaUH","display-popover-sort-icon":"data-table-module_display-popover-sort-icon__8pk8D","flex-1":"data-table-module_flex-1__Cnet-","display___popover___content":"data-table-module_display-popover-content__A7AAg","display___popover___properties___container":"data-table-module_display-popover-properties-container__kxNzW","display___popover___properties___select":"data-table-module_display-popover-properties-select__oX7TC","display___popover___reset___container":"data-table-module_display-popover-reset-container__xEaUH","display___popover___sort___icon":"data-table-module_display-popover-sort-icon__8pk8D","flex___1":"data-table-module_flex-1__Cnet-"};
|
|
6
|
+
|
|
7
|
+
exports.default = styles;
|
|
8
|
+
//# sourceMappingURL=data-table.module.css.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-table.module.css.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var styles = {"toolbar":"data-table-module_toolbar__qdolw","display-popover-content":"data-table-module_display-popover-content__A7AAg","display-popover-properties-container":"data-table-module_display-popover-properties-container__kxNzW","display-popover-properties-select":"data-table-module_display-popover-properties-select__oX7TC","display-popover-reset-container":"data-table-module_display-popover-reset-container__xEaUH","display-popover-sort-icon":"data-table-module_display-popover-sort-icon__8pk8D","flex-1":"data-table-module_flex-1__Cnet-","display___popover___content":"data-table-module_display-popover-content__A7AAg","display___popover___properties___container":"data-table-module_display-popover-properties-container__kxNzW","display___popover___properties___select":"data-table-module_display-popover-properties-select__oX7TC","display___popover___reset___container":"data-table-module_display-popover-reset-container__xEaUH","display___popover___sort___icon":"data-table-module_display-popover-sort-icon__8pk8D","flex___1":"data-table-module_flex-1__Cnet-"};
|
|
2
|
+
|
|
3
|
+
export { styles as default };
|
|
4
|
+
//# sourceMappingURL=data-table.module.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-table.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-table.types.cjs","sources":["../../../../v1/components/data-table/data-table.types.tsx"],"sourcesContent":["import type { Column, ColumnDef, Table } from \"@tanstack/table-core\";\nimport type {\n FilterOperatorTypes,\n FilterSelectOption,\n FilterTypes,\n} from \"~/v1/types/filters\";\n\nexport type DataTableMode = \"client\" | \"server\";\n\nexport const SortOrders = {\n ASC: \"asc\",\n DESC: \"desc\",\n} as const;\n\nexport interface RQLFilter {\n _type: FilterTypes;\n name: string;\n operator: FilterOperatorTypes;\n value: any;\n}\n\ntype SortOrdersKeys = keyof typeof SortOrders;\nexport type SortOrdersValues = typeof SortOrders[SortOrdersKeys];\n\nexport interface Sort {\n name: string;\n order: SortOrdersValues;\n}\n\nexport interface DataTableQuery {\n filters?: RQLFilter[];\n sort?: Sort[];\n group_by?: string[];\n offset?: number;\n limit?: number;\n search?: string;\n __group_by_sort?: SortOrdersValues;\n}\n\nexport type DataTableColumn<TData, TValue> = Omit<\n Column<TData, TValue>,\n \"columnDef\"\n> & {\n columnDef: DataTableColumnDef<TData, TValue>;\n};\n\nexport type DataTableColumnDef<TData, TValue> = ColumnDef<TData, TValue> & {\n accessorKey: string;\n header: string;\n columnType: FilterTypes;\n enableColumnFilter?: boolean;\n enableSorting?: boolean;\n enableHiding?: boolean;\n defaultHidden?: boolean;\n filterOptions?: FilterSelectOption[];\n classNames?: {\n cell?: string;\n header?: string;\n };\n styles?: {\n cell?: React.CSSProperties;\n header?: React.CSSProperties;\n };\n enableGrouping?: boolean;\n groupSortOrder?: SortOrdersValues;\n showGroupCount?: boolean;\n groupCountMap?: Record<string, number>;\n // TODO: implement these\n icon?: React.ReactNode;\n};\n\nexport interface DataTableProps<TData, TValue> {\n columns: DataTableColumnDef<TData, TValue>[];\n data: TData[];\n query?: DataTableQuery;\n mode?: DataTableMode;\n isLoading?: boolean;\n loadingRowCount?: number;\n tableQuery?: DataTableQuery;\n onTableQueryChange?: (query: DataTableQuery) => void;\n defaultSort: Sort;\n onLoadMore?: () => Promise<void>;\n}\n\nexport type DataTableContentProps = {\n emptyState?: React.ReactNode;\n classNames?: {\n table?: string;\n header?: string;\n body?: string;\n };\n};\n\nexport type TableQueryUpdateFn = (query: DataTableQuery) => DataTableQuery;\n\nexport type TableContextType<TData, TValue> = {\n table: Table<TData>;\n columns: DataTableColumnDef<TData, TValue>[];\n isLoading?: boolean;\n loadMoreData: () => void;\n mode: DataTableMode;\n defaultSort: Sort;\n tableQuery?: DataTableQuery;\n loadingRowCount?: number;\n onDisplaySettingsReset: () => void;\n updateTableQuery: (fn: TableQueryUpdateFn) => void;\n};\n\nexport interface ColumnData {\n label: string;\n id: string;\n isVisible?: boolean;\n}\n\ninterface SubRows<T> {}\n\nexport interface GroupedData<T> extends SubRows<T> {\n group_key: string;\n subRows: T[];\n count?: number;\n showGroupCount?: boolean;\n}\n"],"names":[],"mappings":";;AASa,MAAA,UAAU,GAAG;AACxB,IAAA,GAAG,EAAE,KAAK;AACV,IAAA,IAAI,EAAE,MAAM;;;;;"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import type { Column, ColumnDef, Table } from "@tanstack/table-core";
|
|
2
|
+
import type { FilterOperatorTypes, FilterSelectOption, FilterTypes } from "~/v1/types/filters";
|
|
3
|
+
export type DataTableMode = "client" | "server";
|
|
4
|
+
export declare const SortOrders: {
|
|
5
|
+
readonly ASC: "asc";
|
|
6
|
+
readonly DESC: "desc";
|
|
7
|
+
};
|
|
8
|
+
export interface RQLFilter {
|
|
9
|
+
_type: FilterTypes;
|
|
10
|
+
name: string;
|
|
11
|
+
operator: FilterOperatorTypes;
|
|
12
|
+
value: any;
|
|
13
|
+
}
|
|
14
|
+
type SortOrdersKeys = keyof typeof SortOrders;
|
|
15
|
+
export type SortOrdersValues = typeof SortOrders[SortOrdersKeys];
|
|
16
|
+
export interface Sort {
|
|
17
|
+
name: string;
|
|
18
|
+
order: SortOrdersValues;
|
|
19
|
+
}
|
|
20
|
+
export interface DataTableQuery {
|
|
21
|
+
filters?: RQLFilter[];
|
|
22
|
+
sort?: Sort[];
|
|
23
|
+
group_by?: string[];
|
|
24
|
+
offset?: number;
|
|
25
|
+
limit?: number;
|
|
26
|
+
search?: string;
|
|
27
|
+
__group_by_sort?: SortOrdersValues;
|
|
28
|
+
}
|
|
29
|
+
export type DataTableColumn<TData, TValue> = Omit<Column<TData, TValue>, "columnDef"> & {
|
|
30
|
+
columnDef: DataTableColumnDef<TData, TValue>;
|
|
31
|
+
};
|
|
32
|
+
export type DataTableColumnDef<TData, TValue> = ColumnDef<TData, TValue> & {
|
|
33
|
+
accessorKey: string;
|
|
34
|
+
header: string;
|
|
35
|
+
columnType: FilterTypes;
|
|
36
|
+
enableColumnFilter?: boolean;
|
|
37
|
+
enableSorting?: boolean;
|
|
38
|
+
enableHiding?: boolean;
|
|
39
|
+
defaultHidden?: boolean;
|
|
40
|
+
filterOptions?: FilterSelectOption[];
|
|
41
|
+
classNames?: {
|
|
42
|
+
cell?: string;
|
|
43
|
+
header?: string;
|
|
44
|
+
};
|
|
45
|
+
styles?: {
|
|
46
|
+
cell?: React.CSSProperties;
|
|
47
|
+
header?: React.CSSProperties;
|
|
48
|
+
};
|
|
49
|
+
enableGrouping?: boolean;
|
|
50
|
+
groupSortOrder?: SortOrdersValues;
|
|
51
|
+
showGroupCount?: boolean;
|
|
52
|
+
groupCountMap?: Record<string, number>;
|
|
53
|
+
icon?: React.ReactNode;
|
|
54
|
+
};
|
|
55
|
+
export interface DataTableProps<TData, TValue> {
|
|
56
|
+
columns: DataTableColumnDef<TData, TValue>[];
|
|
57
|
+
data: TData[];
|
|
58
|
+
query?: DataTableQuery;
|
|
59
|
+
mode?: DataTableMode;
|
|
60
|
+
isLoading?: boolean;
|
|
61
|
+
loadingRowCount?: number;
|
|
62
|
+
tableQuery?: DataTableQuery;
|
|
63
|
+
onTableQueryChange?: (query: DataTableQuery) => void;
|
|
64
|
+
defaultSort: Sort;
|
|
65
|
+
onLoadMore?: () => Promise<void>;
|
|
66
|
+
}
|
|
67
|
+
export type DataTableContentProps = {
|
|
68
|
+
emptyState?: React.ReactNode;
|
|
69
|
+
classNames?: {
|
|
70
|
+
table?: string;
|
|
71
|
+
header?: string;
|
|
72
|
+
body?: string;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
export type TableQueryUpdateFn = (query: DataTableQuery) => DataTableQuery;
|
|
76
|
+
export type TableContextType<TData, TValue> = {
|
|
77
|
+
table: Table<TData>;
|
|
78
|
+
columns: DataTableColumnDef<TData, TValue>[];
|
|
79
|
+
isLoading?: boolean;
|
|
80
|
+
loadMoreData: () => void;
|
|
81
|
+
mode: DataTableMode;
|
|
82
|
+
defaultSort: Sort;
|
|
83
|
+
tableQuery?: DataTableQuery;
|
|
84
|
+
loadingRowCount?: number;
|
|
85
|
+
onDisplaySettingsReset: () => void;
|
|
86
|
+
updateTableQuery: (fn: TableQueryUpdateFn) => void;
|
|
87
|
+
};
|
|
88
|
+
export interface ColumnData {
|
|
89
|
+
label: string;
|
|
90
|
+
id: string;
|
|
91
|
+
isVisible?: boolean;
|
|
92
|
+
}
|
|
93
|
+
interface SubRows<T> {
|
|
94
|
+
}
|
|
95
|
+
export interface GroupedData<T> extends SubRows<T> {
|
|
96
|
+
group_key: string;
|
|
97
|
+
subRows: T[];
|
|
98
|
+
count?: number;
|
|
99
|
+
showGroupCount?: boolean;
|
|
100
|
+
}
|
|
101
|
+
export {};
|
|
102
|
+
//# sourceMappingURL=data-table.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-table.types.d.ts","sourceRoot":"","sources":["../../../../v1/components/data-table/data-table.types.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,KAAK,EACV,mBAAmB,EACnB,kBAAkB,EAClB,WAAW,EACZ,MAAM,oBAAoB,CAAC;AAE5B,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEhD,eAAO,MAAM,UAAU;;;CAGb,CAAC;AAEX,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,WAAW,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,KAAK,EAAE,GAAG,CAAC;CACZ;AAED,KAAK,cAAc,GAAG,MAAM,OAAO,UAAU,CAAC;AAC9C,MAAM,MAAM,gBAAgB,GAAG,OAAO,UAAU,CAAC,cAAc,CAAC,CAAC;AAEjE,MAAM,WAAW,IAAI;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,gBAAgB,CAAC;CACzB;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC;IACtB,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,gBAAgB,CAAC;CACpC;AAED,MAAM,MAAM,eAAe,CAAC,KAAK,EAAE,MAAM,IA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;CAAI;AAEvB,MAAM,WAAW,WAAW,CAAC,CAAC,CAAE,SAAQ,OAAO,CAAC,CAAC,CAAC;IAChD,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,CAAC,EAAE,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-table.types.js","sources":["../../../../v1/components/data-table/data-table.types.tsx"],"sourcesContent":["import type { Column, ColumnDef, Table } from \"@tanstack/table-core\";\nimport type {\n FilterOperatorTypes,\n FilterSelectOption,\n FilterTypes,\n} from \"~/v1/types/filters\";\n\nexport type DataTableMode = \"client\" | \"server\";\n\nexport const SortOrders = {\n ASC: \"asc\",\n DESC: \"desc\",\n} as const;\n\nexport interface RQLFilter {\n _type: FilterTypes;\n name: string;\n operator: FilterOperatorTypes;\n value: any;\n}\n\ntype SortOrdersKeys = keyof typeof SortOrders;\nexport type SortOrdersValues = typeof SortOrders[SortOrdersKeys];\n\nexport interface Sort {\n name: string;\n order: SortOrdersValues;\n}\n\nexport interface DataTableQuery {\n filters?: RQLFilter[];\n sort?: Sort[];\n group_by?: string[];\n offset?: number;\n limit?: number;\n search?: string;\n __group_by_sort?: SortOrdersValues;\n}\n\nexport type DataTableColumn<TData, TValue> = Omit<\n Column<TData, TValue>,\n \"columnDef\"\n> & {\n columnDef: DataTableColumnDef<TData, TValue>;\n};\n\nexport type DataTableColumnDef<TData, TValue> = ColumnDef<TData, TValue> & {\n accessorKey: string;\n header: string;\n columnType: FilterTypes;\n enableColumnFilter?: boolean;\n enableSorting?: boolean;\n enableHiding?: boolean;\n defaultHidden?: boolean;\n filterOptions?: FilterSelectOption[];\n classNames?: {\n cell?: string;\n header?: string;\n };\n styles?: {\n cell?: React.CSSProperties;\n header?: React.CSSProperties;\n };\n enableGrouping?: boolean;\n groupSortOrder?: SortOrdersValues;\n showGroupCount?: boolean;\n groupCountMap?: Record<string, number>;\n // TODO: implement these\n icon?: React.ReactNode;\n};\n\nexport interface DataTableProps<TData, TValue> {\n columns: DataTableColumnDef<TData, TValue>[];\n data: TData[];\n query?: DataTableQuery;\n mode?: DataTableMode;\n isLoading?: boolean;\n loadingRowCount?: number;\n tableQuery?: DataTableQuery;\n onTableQueryChange?: (query: DataTableQuery) => void;\n defaultSort: Sort;\n onLoadMore?: () => Promise<void>;\n}\n\nexport type DataTableContentProps = {\n emptyState?: React.ReactNode;\n classNames?: {\n table?: string;\n header?: string;\n body?: string;\n };\n};\n\nexport type TableQueryUpdateFn = (query: DataTableQuery) => DataTableQuery;\n\nexport type TableContextType<TData, TValue> = {\n table: Table<TData>;\n columns: DataTableColumnDef<TData, TValue>[];\n isLoading?: boolean;\n loadMoreData: () => void;\n mode: DataTableMode;\n defaultSort: Sort;\n tableQuery?: DataTableQuery;\n loadingRowCount?: number;\n onDisplaySettingsReset: () => void;\n updateTableQuery: (fn: TableQueryUpdateFn) => void;\n};\n\nexport interface ColumnData {\n label: string;\n id: string;\n isVisible?: boolean;\n}\n\ninterface SubRows<T> {}\n\nexport interface GroupedData<T> extends SubRows<T> {\n group_key: string;\n subRows: T[];\n count?: number;\n showGroupCount?: boolean;\n}\n"],"names":[],"mappings":"AASa,MAAA,UAAU,GAAG;AACxB,IAAA,GAAG,EAAE,KAAK;AACV,IAAA,IAAI,EAAE,MAAM;;;;;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var context = require('../context.cjs');
|
|
5
|
+
|
|
6
|
+
const useDataTable = () => {
|
|
7
|
+
const ctx = React.useContext(context.TableContext);
|
|
8
|
+
if (ctx === null) {
|
|
9
|
+
throw new Error("useDataTable must be used inside of a DataTable.Provider");
|
|
10
|
+
}
|
|
11
|
+
return ctx;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
exports.useDataTable = useDataTable;
|
|
15
|
+
//# sourceMappingURL=useDataTable.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDataTable.cjs","sources":["../../../../../v1/components/data-table/hooks/useDataTable.tsx"],"sourcesContent":["import { useContext } from \"react\";\nimport { TableContext } from \"../context\";\n\nexport const useDataTable = () => {\n const ctx = useContext(TableContext);\n if (ctx === null) {\n throw new Error(\"useDataTable must be used inside of a DataTable.Provider\");\n }\n\n return ctx;\n};\n"],"names":["useContext","TableContext"],"mappings":";;;;;AAGO,MAAM,YAAY,GAAG,MAAK;AAC/B,IAAA,MAAM,GAAG,GAAGA,gBAAU,CAACC,oBAAY,CAAC,CAAC;AACrC,IAAA,IAAI,GAAG,KAAK,IAAI,EAAE;AAChB,QAAA,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC;KAC7E;AAED,IAAA,OAAO,GAAG,CAAC;AACb;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDataTable.d.ts","sourceRoot":"","sources":["../../../../../v1/components/data-table/hooks/useDataTable.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY,gEAOxB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { useContext } from 'react';
|
|
2
|
+
import { TableContext } from '../context.js';
|
|
3
|
+
|
|
4
|
+
const useDataTable = () => {
|
|
5
|
+
const ctx = useContext(TableContext);
|
|
6
|
+
if (ctx === null) {
|
|
7
|
+
throw new Error("useDataTable must be used inside of a DataTable.Provider");
|
|
8
|
+
}
|
|
9
|
+
return ctx;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export { useDataTable };
|
|
13
|
+
//# sourceMappingURL=useDataTable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDataTable.js","sources":["../../../../../v1/components/data-table/hooks/useDataTable.tsx"],"sourcesContent":["import { useContext } from \"react\";\nimport { TableContext } from \"../context\";\n\nexport const useDataTable = () => {\n const ctx = useContext(TableContext);\n if (ctx === null) {\n throw new Error(\"useDataTable must be used inside of a DataTable.Provider\");\n }\n\n return ctx;\n};\n"],"names":[],"mappings":";;;AAGO,MAAM,YAAY,GAAG,MAAK;AAC/B,IAAA,MAAM,GAAG,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC;AACrC,IAAA,IAAI,GAAG,KAAK,IAAI,EAAE;AAChB,QAAA,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC;KAC7E;AAED,IAAA,OAAO,GAAG,CAAC;AACb;;;;"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var useDataTable = require('./useDataTable.cjs');
|
|
4
|
+
var filters = require('../../../types/filters.cjs');
|
|
5
|
+
|
|
6
|
+
function useFilters() {
|
|
7
|
+
const { updateTableQuery } = useDataTable.useDataTable();
|
|
8
|
+
function onAddFilter(column) {
|
|
9
|
+
const columnDef = column.columnDef;
|
|
10
|
+
const id = columnDef.accessorKey || column.id;
|
|
11
|
+
const options = columnDef.filterOptions || [];
|
|
12
|
+
const columnType = columnDef.columnType || "text";
|
|
13
|
+
const defaultFilter = filters.filterOperators[columnType][0];
|
|
14
|
+
const defaultValue = columnType === filters.FilterType.date
|
|
15
|
+
? new Date()
|
|
16
|
+
: columnType === filters.FilterType.select
|
|
17
|
+
? options[0].value
|
|
18
|
+
: "";
|
|
19
|
+
updateTableQuery((query) => {
|
|
20
|
+
return {
|
|
21
|
+
...query,
|
|
22
|
+
filters: [
|
|
23
|
+
...(query.filters || []),
|
|
24
|
+
// TODO: Add default filter value in column definition
|
|
25
|
+
{
|
|
26
|
+
_type: columnType,
|
|
27
|
+
name: id,
|
|
28
|
+
value: defaultValue,
|
|
29
|
+
operator: defaultFilter.value,
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
};
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
function handleRemoveFilter(columnId) {
|
|
36
|
+
updateTableQuery((query) => {
|
|
37
|
+
return {
|
|
38
|
+
...query,
|
|
39
|
+
filters: query.filters?.filter((filter) => filter.name !== columnId),
|
|
40
|
+
};
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
function handleFilterValueChange(columnId, value) {
|
|
44
|
+
updateTableQuery((query) => {
|
|
45
|
+
return {
|
|
46
|
+
...query,
|
|
47
|
+
filters: query.filters?.map((filter) => {
|
|
48
|
+
if (filter.name === columnId) {
|
|
49
|
+
return { ...filter, value };
|
|
50
|
+
}
|
|
51
|
+
return filter;
|
|
52
|
+
}),
|
|
53
|
+
};
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
function handleFilterOperationChange(columnId, operator) {
|
|
57
|
+
updateTableQuery((query) => {
|
|
58
|
+
return {
|
|
59
|
+
...query,
|
|
60
|
+
filters: query.filters?.map((filter) => {
|
|
61
|
+
if (filter.name === columnId) {
|
|
62
|
+
return { ...filter, operator };
|
|
63
|
+
}
|
|
64
|
+
return filter;
|
|
65
|
+
}),
|
|
66
|
+
};
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
return {
|
|
70
|
+
onAddFilter,
|
|
71
|
+
handleRemoveFilter,
|
|
72
|
+
handleFilterValueChange,
|
|
73
|
+
handleFilterOperationChange,
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
exports.useFilters = useFilters;
|
|
78
|
+
//# sourceMappingURL=useFilters.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFilters.cjs","sources":["../../../../../v1/components/data-table/hooks/useFilters.tsx"],"sourcesContent":["import { useDataTable } from \"./useDataTable\";\nimport {\n FilterOperatorTypes,\n FilterType,\n filterOperators,\n} from \"~/v1/types/filters\";\nimport { DataTableColumn } from \"../data-table.types\";\n\nexport function useFilters<TData, TValue>() {\n const { updateTableQuery } = useDataTable();\n\n function onAddFilter(column: DataTableColumn<TData, TValue>) {\n const columnDef = column.columnDef;\n const id = columnDef.accessorKey || column.id;\n const options = columnDef.filterOptions || [];\n const columnType = columnDef.columnType || \"text\";\n const defaultFilter = filterOperators[columnType][0];\n const defaultValue =\n columnType === FilterType.date\n ? new Date()\n : columnType === FilterType.select\n ? options[0].value\n : \"\";\n\n updateTableQuery((query) => {\n return {\n ...query,\n filters: [\n ...(query.filters || []),\n // TODO: Add default filter value in column definition\n {\n _type: columnType,\n name: id,\n value: defaultValue,\n operator: defaultFilter.value,\n },\n ],\n };\n });\n }\n\n function handleRemoveFilter(columnId: string) {\n updateTableQuery((query) => {\n return {\n ...query,\n filters: query.filters?.filter((filter) => filter.name !== columnId),\n };\n });\n }\n\n function handleFilterValueChange(columnId: string, value: any) {\n updateTableQuery((query) => {\n return {\n ...query,\n filters: query.filters?.map((filter) => {\n if (filter.name === columnId) {\n return { ...filter, value };\n }\n return filter;\n }),\n };\n });\n }\n\n function handleFilterOperationChange(\n columnId: string,\n operator: FilterOperatorTypes\n ) {\n updateTableQuery((query) => {\n return {\n ...query,\n filters: query.filters?.map((filter) => {\n if (filter.name === columnId) {\n return { ...filter, operator };\n }\n return filter;\n }),\n };\n });\n }\n\n return {\n onAddFilter,\n handleRemoveFilter,\n handleFilterValueChange,\n handleFilterOperationChange,\n };\n}\n"],"names":["useDataTable","filterOperators","FilterType"],"mappings":";;;;;SAQgB,UAAU,GAAA;AACxB,IAAA,MAAM,EAAE,gBAAgB,EAAE,GAAGA,yBAAY,EAAE,CAAC;IAE5C,SAAS,WAAW,CAAC,MAAsC,EAAA;AACzD,QAAA,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;QACnC,MAAM,EAAE,GAAG,SAAS,CAAC,WAAW,IAAI,MAAM,CAAC,EAAE,CAAC;AAC9C,QAAA,MAAM,OAAO,GAAG,SAAS,CAAC,aAAa,IAAI,EAAE,CAAC;AAC9C,QAAA,MAAM,UAAU,GAAG,SAAS,CAAC,UAAU,IAAI,MAAM,CAAC;QAClD,MAAM,aAAa,GAAGC,uBAAe,CAAC,U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,OAAO,MAAM,CAAC;AAChB,iBAAC,CAAC;aACH,CAAC;AACJ,SAAC,CAAC,CAAC;KACJ;AAED,IAAA,SAAS,2BAA2B,CAClC,QAAgB,EAChB,QAA6B,EAAA;AAE7B,QAAA,gBAAgB,CAAC,CAAC,KAAK,KAAI;YACzB,OAAO;AACL,gBAAA,GAAG,KAAK;gBACR,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,MAAM,KAAI;AACrC,oBAAA,IAAI,MAAM,CAAC,IAAI,KAAK,QAAQ,EAAE;AAC5B,wBAAA,OAAO,EAAE,GAAG,MAAM,EAAE,QAAQ,EAAE,CAAC;qBAChC;AACD,oBAAA,OAAO,MAAM,CAAC;AAChB,iBAAC,CAAC;aACH,CAAC;AACJ,SAAC,CAAC,CAAC;KACJ;IAED,OAAO;QACL,WAAW;QACX,kBAAkB;QAClB,uBAAuB;QACvB,2BAA2B;KAC5B,CAAC;AACJ;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FilterOperatorTypes } from "~/v1/types/filters";
|
|
2
|
+
import { DataTableColumn } from "../data-table.types";
|
|
3
|
+
export declare function useFilters<TData, TValue>(): {
|
|
4
|
+
onAddFilter: (column: DataTableColumn<TData, TValue>) => void;
|
|
5
|
+
handleRemoveFilter: (columnId: string) => void;
|
|
6
|
+
handleFilterValueChange: (columnId: string, value: any) => void;
|
|
7
|
+
handleFilterOperationChange: (columnId: string, operator: FilterOperatorTypes) => void;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=useFilters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFilters.d.ts","sourceRoot":"","sources":["../../../../../v1/components/data-table/hooks/useFilters.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,mBAAmB,EAGpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM;0BAGT,gBAAgB,KAAK,EAAE,MAAM,CAAC;mCA8BrB,MAAM;wCASD,MAAM,SAAS,GAAG;4CAejD,MAAM,YACN,mBAAmB;EAqBhC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { useDataTable } from './useDataTable.js';
|
|
2
|
+
import { filterOperators, FilterType } from '../../../types/filters.js';
|
|
3
|
+
|
|
4
|
+
function useFilters() {
|
|
5
|
+
const { updateTableQuery } = useDataTable();
|
|
6
|
+
function onAddFilter(column) {
|
|
7
|
+
const columnDef = column.columnDef;
|
|
8
|
+
const id = columnDef.accessorKey || column.id;
|
|
9
|
+
const options = columnDef.filterOptions || [];
|
|
10
|
+
const columnType = columnDef.columnType || "text";
|
|
11
|
+
const defaultFilter = filterOperators[columnType][0];
|
|
12
|
+
const defaultValue = columnType === FilterType.date
|
|
13
|
+
? new Date()
|
|
14
|
+
: columnType === FilterType.select
|
|
15
|
+
? options[0].value
|
|
16
|
+
: "";
|
|
17
|
+
updateTableQuery((query) => {
|
|
18
|
+
return {
|
|
19
|
+
...query,
|
|
20
|
+
filters: [
|
|
21
|
+
...(query.filters || []),
|
|
22
|
+
// TODO: Add default filter value in column definition
|
|
23
|
+
{
|
|
24
|
+
_type: columnType,
|
|
25
|
+
name: id,
|
|
26
|
+
value: defaultValue,
|
|
27
|
+
operator: defaultFilter.value,
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
};
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
function handleRemoveFilter(columnId) {
|
|
34
|
+
updateTableQuery((query) => {
|
|
35
|
+
return {
|
|
36
|
+
...query,
|
|
37
|
+
filters: query.filters?.filter((filter) => filter.name !== columnId),
|
|
38
|
+
};
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
function handleFilterValueChange(columnId, value) {
|
|
42
|
+
updateTableQuery((query) => {
|
|
43
|
+
return {
|
|
44
|
+
...query,
|
|
45
|
+
filters: query.filters?.map((filter) => {
|
|
46
|
+
if (filter.name === columnId) {
|
|
47
|
+
return { ...filter, value };
|
|
48
|
+
}
|
|
49
|
+
return filter;
|
|
50
|
+
}),
|
|
51
|
+
};
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
function handleFilterOperationChange(columnId, operator) {
|
|
55
|
+
updateTableQuery((query) => {
|
|
56
|
+
return {
|
|
57
|
+
...query,
|
|
58
|
+
filters: query.filters?.map((filter) => {
|
|
59
|
+
if (filter.name === columnId) {
|
|
60
|
+
return { ...filter, operator };
|
|
61
|
+
}
|
|
62
|
+
return filter;
|
|
63
|
+
}),
|
|
64
|
+
};
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
onAddFilter,
|
|
69
|
+
handleRemoveFilter,
|
|
70
|
+
handleFilterValueChange,
|
|
71
|
+
handleFilterOperationChange,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export { useFilters };
|
|
76
|
+
//# sourceMappingURL=useFilters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFilters.js","sources":["../../../../../v1/components/data-table/hooks/useFilters.tsx"],"sourcesContent":["import { useDataTable } from \"./useDataTable\";\nimport {\n FilterOperatorTypes,\n FilterType,\n filterOperators,\n} from \"~/v1/types/filters\";\nimport { DataTableColumn } from \"../data-table.types\";\n\nexport function useFilters<TData, TValue>() {\n const { updateTableQuery } = useDataTable();\n\n function onAddFilter(column: DataTableColumn<TData, TValue>) {\n const columnDef = column.columnDef;\n const id = columnDef.accessorKey || column.id;\n const options = columnDef.filterOptions || [];\n const columnType = columnDef.columnType || \"text\";\n const defaultFilter = filterOperators[columnType][0];\n const defaultValue =\n columnType === FilterType.date\n ? new Date()\n : columnType === FilterType.select\n ? options[0].value\n : \"\";\n\n updateTableQuery((query) => {\n return {\n ...query,\n filters: [\n ...(query.filters || []),\n // TODO: Add default filter value in column definition\n {\n _type: columnType,\n name: id,\n value: defaultValue,\n operator: defaultFilter.value,\n },\n ],\n };\n });\n }\n\n function handleRemoveFilter(columnId: string) {\n updateTableQuery((query) => {\n return {\n ...query,\n filters: query.filters?.filter((filter) => filter.name !== columnId),\n };\n });\n }\n\n function handleFilterValueChange(columnId: string, value: any) {\n updateTableQuery((query) => {\n return {\n ...query,\n filters: query.filters?.map((filter) => {\n if (filter.name === columnId) {\n return { ...filter, value };\n }\n return filter;\n }),\n };\n });\n }\n\n function handleFilterOperationChange(\n columnId: string,\n operator: FilterOperatorTypes\n ) {\n updateTableQuery((query) => {\n return {\n ...query,\n filters: query.filters?.map((filter) => {\n if (filter.name === columnId) {\n return { ...filter, operator };\n }\n return filter;\n }),\n };\n });\n }\n\n return {\n onAddFilter,\n handleRemoveFilter,\n handleFilterValueChange,\n handleFilterOperationChange,\n };\n}\n"],"names":[],"mappings":";;;SAQgB,UAAU,GAAA;AACxB,IAAA,MAAM,EAAE,gBAAgB,EAAE,GAAG,YAAY,EAAE,CAAC;IAE5C,SAAS,WAAW,CAAC,MAAsC,EAAA;AACzD,QAAA,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;QACnC,MAAM,EAAE,GAAG,SAAS,CAAC,WAAW,IAAI,MAAM,CAAC,EAAE,CAAC;AAC9C,QAAA,MAAM,OAAO,GAAG,SAAS,CAAC,aAAa,IAAI,EAAE,CAAC;AAC9C,QAAA,MAAM,UAAU,GAAG,SAAS,CAAC,UAAU,IAAI,MAAM,CAAC;QAClD,MAAM,aAAa,GAAG,eAAe,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;AACrD,QAAA,MAAM,YAAY,GAChB,UAAU,KAAK,UAAU,CAAC,IAAI;cAC1B,IAAI,IAAI,EAAE;AACZ,cAAE,UAAU,KAAK,UAAU,CAAC,MAAM;AAClC,kBAAE,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK;kBAChB,EAAE,CAAC;AAET,QAAA,gBAAgB,CAAC,CAAC,KAAK,KAAI;YACzB,OAAO;AACL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C,oBAAA,IAAI,MAAM,CAAC,IAAI,KAAK,QAAQ,EAAE;AAC5B,wBAAA,OAAO,EAAE,GAAG,MAAM,EAAE,QAAQ,EAAE,CAAC;qBAChC;AACD,oBAAA,OAAO,MAAM,CAAC;AAChB,iBAAC,CAAC;aACH,CAAC;AACJ,SAAC,CAAC,CAAC;KACJ;IAED,OAAO;QACL,WAAW;QACX,kBAAkB;QAClB,uBAAuB;QACvB,2BAA2B;KAC5B,CAAC;AACJ;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../v1/components/data-table/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var dayjs_min = require('../../../node_modules/.pnpm/dayjs@1.11.11/node_modules/dayjs/dayjs.min.cjs');
|
|
4
|
+
var isSameOrAfter = require('../../../node_modules/.pnpm/dayjs@1.11.11/node_modules/dayjs/plugin/isSameOrAfter.cjs');
|
|
5
|
+
var isSameOrBefore = require('../../../node_modules/.pnpm/dayjs@1.11.11/node_modules/dayjs/plugin/isSameOrBefore.cjs');
|
|
6
|
+
|
|
7
|
+
dayjs_min.default.extend(isSameOrAfter.default);
|
|
8
|
+
dayjs_min.default.extend(isSameOrBefore.default);
|
|
9
|
+
const filterOperationsMap = {
|
|
10
|
+
number: {
|
|
11
|
+
eq: (row, columnId, filterValue) => {
|
|
12
|
+
return Number(row.getValue(columnId)) === Number(filterValue.value);
|
|
13
|
+
},
|
|
14
|
+
neq: (row, columnId, filterValue) => {
|
|
15
|
+
return Number(row.getValue(columnId)) !== Number(filterValue.value);
|
|
16
|
+
},
|
|
17
|
+
lt: (row, columnId, filterValue) => {
|
|
18
|
+
return Number(row.getValue(columnId)) < Number(filterValue.value);
|
|
19
|
+
},
|
|
20
|
+
lte: (row, columnId, filterValue) => {
|
|
21
|
+
return Number(row.getValue(columnId)) <= Number(filterValue.value);
|
|
22
|
+
},
|
|
23
|
+
gt: (row, columnId, filterValue) => {
|
|
24
|
+
return Number(row.getValue(columnId)) > Number(filterValue.value);
|
|
25
|
+
},
|
|
26
|
+
gte: (row, columnId, filterValue) => {
|
|
27
|
+
return Number(row.getValue(columnId)) >= Number(filterValue.value);
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
text: {
|
|
31
|
+
eq: (row, columnId, filterValue) => {
|
|
32
|
+
return (String(row.getValue(columnId)).toLowerCase() ===
|
|
33
|
+
String(filterValue.value).toLowerCase());
|
|
34
|
+
},
|
|
35
|
+
neq: (row, columnId, filterValue) => {
|
|
36
|
+
return (String(row.getValue(columnId)).toLowerCase() !==
|
|
37
|
+
String(filterValue.value).toLowerCase());
|
|
38
|
+
},
|
|
39
|
+
like: (row, columnId, filterValue) => {
|
|
40
|
+
const columnValue = row.getValue(columnId).toLowerCase();
|
|
41
|
+
const filterStr = filterValue.value.toLowerCase();
|
|
42
|
+
return columnValue.includes(filterStr);
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
date: {
|
|
46
|
+
eq: (row, columnId, filterValue) => {
|
|
47
|
+
return dayjs_min.default(row.getValue(columnId)).isSame(dayjs_min.default(filterValue.date), "day");
|
|
48
|
+
},
|
|
49
|
+
neq: (row, columnId, filterValue) => {
|
|
50
|
+
return !dayjs_min.default(row.getValue(columnId)).isSame(dayjs_min.default(filterValue.date), "day");
|
|
51
|
+
},
|
|
52
|
+
lt: (row, columnId, filterValue) => {
|
|
53
|
+
return dayjs_min.default(row.getValue(columnId)).isBefore(dayjs_min.default(filterValue.date), "day");
|
|
54
|
+
},
|
|
55
|
+
lte: (row, columnId, filterValue) => {
|
|
56
|
+
return dayjs_min.default(row.getValue(columnId)).isSameOrBefore(dayjs_min.default(filterValue.date), "day");
|
|
57
|
+
},
|
|
58
|
+
gt: (row, columnId, filterValue) => {
|
|
59
|
+
return dayjs_min.default(row.getValue(columnId)).isAfter(dayjs_min.default(filterValue.date), "day");
|
|
60
|
+
},
|
|
61
|
+
gte: (row, columnId, filterValue) => {
|
|
62
|
+
return dayjs_min.default(row.getValue(columnId)).isSameOrAfter(dayjs_min.default(filterValue.date), "day");
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
select: {
|
|
66
|
+
eq: (row, columnId, filterValue) => {
|
|
67
|
+
// Select only supports string values
|
|
68
|
+
return String(row.getValue(columnId)) === String(filterValue.value);
|
|
69
|
+
},
|
|
70
|
+
neq: (row, columnId, filterValue) => {
|
|
71
|
+
// Select only supports string values
|
|
72
|
+
return String(row.getValue(columnId)) !== String(filterValue.value);
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
};
|
|
76
|
+
function getFilterFn(type, operator) {
|
|
77
|
+
// @ts-expect-error FilterOperatorTypes is union of all possible operators
|
|
78
|
+
return filterOperationsMap[type][operator];
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
exports.filterOperationsMap = filterOperationsMap;
|
|
82
|
+
exports.getFilterFn = getFilterFn;
|
|
83
|
+
//# sourceMappingURL=filter-operations.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filter-operations.cjs","sources":["../../../../../v1/components/data-table/utils/filter-operations.tsx"],"sourcesContent":["import dayjs from \"dayjs\";\nimport isSameOrAfter from \"dayjs/plugin/isSameOrAfter\";\nimport isSameOrBefore from \"dayjs/plugin/isSameOrBefore\";\n\nimport type { FilterFn } from \"@tanstack/table-core\";\nimport {\n FilterValue,\n NumberFilterOperatorType,\n TextFilterOperatorType,\n DateFilterOperatorType,\n SelectFilterOperatorType,\n FilterOperatorTypes,\n} from \"~/v1/types/filters\";\n\ndayjs.extend(isSameOrAfter);\ndayjs.extend(isSameOrBefore);\n\nexport type FilterFunctionsMap = {\n number: Record<NumberFilterOperatorType, FilterFn<any>>;\n text: Record<TextFilterOperatorType, FilterFn<any>>;\n date: Record<DateFilterOperatorType, FilterFn<any>>;\n select: Record<SelectFilterOperatorType, FilterFn<any>>;\n};\n\nexport const filterOperationsMap: FilterFunctionsMap = {\n number: {\n eq: (row, columnId, filterValue: FilterValue) => {\n return Number(row.getValue(columnId)) === Number(filterValue.value);\n },\n neq: (row, columnId, filterValue: FilterValue) => {\n return Number(row.getValue(columnId)) !== Number(filterValue.value);\n },\n lt: (row, columnId, filterValue: FilterValue) => {\n return Number(row.getValue(columnId)) < Number(filterValue.value);\n },\n lte: (row, columnId, filterValue: FilterValue) => {\n return Number(row.getValue(columnId)) <= Number(filterValue.value);\n },\n gt: (row, columnId, filterValue: FilterValue) => {\n return Number(row.getValue(columnId)) > Number(filterValue.value);\n },\n gte: (row, columnId, filterValue: FilterValue) => {\n return Number(row.getValue(columnId)) >= Number(filterValue.value);\n },\n },\n text: {\n eq: (row, columnId, filterValue: FilterValue) => {\n return (\n String(row.getValue(columnId)).toLowerCase() ===\n String(filterValue.value).toLowerCase()\n );\n },\n neq: (row, columnId, filterValue: FilterValue) => {\n return (\n String(row.getValue(columnId)).toLowerCase() !==\n String(filterValue.value).toLowerCase()\n );\n },\n like: (row, columnId, filterValue: FilterValue) => {\n const columnValue = (row.getValue(columnId) as string).toLowerCase();\n const filterStr = (filterValue.value as string).toLowerCase();\n return columnValue.includes(filterStr);\n },\n },\n date: {\n eq: (row, columnId, filterValue: FilterValue) => {\n return dayjs(row.getValue(columnId)).isSame(\n dayjs(filterValue.date),\n \"day\"\n );\n },\n neq: (row, columnId, filterValue: FilterValue) => {\n return !dayjs(row.getValue(columnId)).isSame(\n dayjs(filterValue.date),\n \"day\"\n );\n },\n lt: (row, columnId, filterValue: FilterValue) => {\n return dayjs(row.getValue(columnId)).isBefore(\n dayjs(filterValue.date),\n \"day\"\n );\n },\n lte: (row, columnId, filterValue: FilterValue) => {\n return dayjs(row.getValue(columnId)).isSameOrBefore(\n dayjs(filterValue.date),\n \"day\"\n );\n },\n gt: (row, columnId, filterValue: FilterValue) => {\n return dayjs(row.getValue(columnId)).isAfter(\n dayjs(filterValue.date),\n \"day\"\n );\n },\n gte: (row, columnId, filterValue: FilterValue) => {\n return dayjs(row.getValue(columnId)).isSameOrAfter(\n dayjs(filterValue.date),\n \"day\"\n );\n },\n },\n select: {\n eq: (row, columnId, filterValue: FilterValue) => {\n // Select only supports string values\n return String(row.getValue(columnId)) === String(filterValue.value);\n },\n neq: (row, columnId, filterValue: FilterValue) => {\n // Select only supports string values\n return String(row.getValue(columnId)) !== String(filterValue.value);\n },\n },\n} as const;\n\nexport function getFilterFn<T extends keyof FilterFunctionsMap>(\n type: T,\n operator: FilterOperatorTypes\n) {\n // @ts-expect-error FilterOperatorTypes is union of all possible operators\n return filterOperationsMap[type][operator];\n}\n"],"names":["dayjs","isSameOrAfter","isSameOrBefore"],"mappings":";;;;;;AAcAA,iBAAK,CAAC,MAAM,CAACC,qBAAa,CAAC,CAAC;AAC5BD,iBAAK,CAAC,MAAM,CAACE,sBAAc,CAAC,CAAC;AAShB,MAAA,mBAAmB,GAAuB;AACrD,IAAA,MAAM,EAAE;QACN,EAAE,EAAE,CAAC,GAAG,EAAE,QAAQ,EAAE,WAAwB,KAAI;AAC9C,YAAA,OAAO,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,KAAK,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;SACrE;QACD,GAAG,EAAE,CAAC,GAAG,EAAE,QAAQ,EAAE,WAAwB,KAAI;AAC/C,YAAA,OAAO,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,KAAK,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;SACrE;QACD,EAAE,EAAE,CAAC,GAAG,EAAE,QAAQ,EAAE,WAAwB,KAAI;AAC9C,YAAA,OAA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