@cryptlex/web-components 3.8.1 → 4.1.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/components/data-table/data-table-filter.es.js +178 -0
- package/dist/components/data-table/data-table-filter.es.js.map +1 -0
- package/dist/components/data-table/data-table.es.js +402 -153
- package/dist/components/data-table/data-table.es.js.map +1 -1
- package/dist/components/data-table/table-commons.es.js +267 -19
- package/dist/components/data-table/table-commons.es.js.map +1 -1
- package/dist/components/inputs/calendar.es.js +12 -12
- package/dist/components/inputs/calendar.es.js.map +1 -1
- package/dist/components/inputs/checkbox.es.js +13 -13
- package/dist/components/inputs/checkbox.es.js.map +1 -1
- package/dist/components/inputs/country-select.es.js +3 -3
- package/dist/components/inputs/country-select.es.js.map +1 -1
- package/dist/components/inputs/form-field.es.js +1 -1
- package/dist/components/inputs/input-otp.es.js +2 -2
- package/dist/components/inputs/input-otp.es.js.map +1 -1
- package/dist/components/inputs/input.es.js +7 -7
- package/dist/components/inputs/input.es.js.map +1 -1
- package/dist/components/inputs/multi-select.es.js +7 -7
- package/dist/components/inputs/multi-select.es.js.map +1 -1
- package/dist/components/inputs/radio-group.es.js +1 -1
- package/dist/components/inputs/search-input.es.js.map +1 -1
- package/dist/components/inputs/select.es.js +10 -10
- package/dist/components/inputs/select.es.js.map +1 -1
- package/dist/components/inputs/textarea.es.js +4 -4
- package/dist/components/key-value-card/key-value-card.es.js +6 -9
- package/dist/components/key-value-card/key-value-card.es.js.map +1 -1
- package/dist/components/ui/accordion.es.js +6 -6
- package/dist/components/ui/accordion.es.js.map +1 -1
- package/dist/components/ui/alert.es.js +4 -4
- package/dist/components/ui/avatar.es.js +1 -1
- package/dist/components/ui/badge.es.js +1 -1
- package/dist/components/ui/breadcrumb.es.js +2 -2
- package/dist/components/ui/breadcrumb.es.js.map +1 -1
- package/dist/components/ui/button.es.js +27 -25
- package/dist/components/ui/button.es.js.map +1 -1
- package/dist/components/ui/card.es.js +8 -8
- package/dist/components/ui/card.es.js.map +1 -1
- package/dist/components/ui/copy-button.es.js +12 -14
- package/dist/components/ui/copy-button.es.js.map +1 -1
- package/dist/components/ui/dialog.es.js +4 -4
- package/dist/components/ui/dialog.es.js.map +1 -1
- package/dist/components/ui/drawer.es.js +10 -10
- package/dist/components/ui/drawer.es.js.map +1 -1
- package/dist/components/ui/dropdown-menu.es.js +13 -13
- package/dist/components/ui/dropdown-menu.es.js.map +1 -1
- package/dist/components/ui/label.es.js +1 -1
- package/dist/components/ui/loader.es.js +3 -3
- package/dist/components/ui/pagination.es.js +2 -2
- package/dist/components/ui/pagination.es.js.map +1 -1
- package/dist/components/ui/popover.es.js +5 -5
- package/dist/components/ui/popover.es.js.map +1 -1
- package/dist/components/ui/separator.es.js +1 -1
- package/dist/components/ui/sheet.es.js +59 -55
- package/dist/components/ui/sheet.es.js.map +1 -1
- package/dist/components/ui/sidebar.es.js +105 -105
- package/dist/components/ui/sidebar.es.js.map +1 -1
- package/dist/components/ui/skeleton.es.js +1 -1
- package/dist/components/ui/static-data-table.es.js +1 -1
- package/dist/components/ui/static-data-table.es.js.map +1 -1
- package/dist/components/ui/table.es.js +8 -8
- package/dist/components/ui/table.es.js.map +1 -1
- package/dist/components/ui/tabs.es.js +1 -1
- package/dist/components/ui/tabs.es.js.map +1 -1
- package/dist/components/ui/timeline.es.js +3 -3
- package/dist/components/ui/timeline.es.js.map +1 -1
- package/dist/components/ui/tooltip.es.js +1 -1
- package/dist/index.es.d.ts +128 -32
- package/dist/index.es.js +237 -238
- package/dist/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/@date-fns_tz@1.2.0/node_modules/@date-fns/tz/date/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/@date-fns_tz@1.2.0/node_modules/@date-fns/tz/date/mini.es.js.map +1 -1
- package/dist/node_modules/.pnpm/@date-fns_tz@1.2.0/node_modules/@date-fns/tz/tzOffset/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/@floating-ui_core@1.7.2/node_modules/@floating-ui/core/dist/floating-ui.core.es.js.map +1 -1
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.2/node_modules/@floating-ui/dom/dist/floating-ui.dom.es.js.map +1 -1
- package/dist/node_modules/.pnpm/@floating-ui_react-dom@2.1.4_react-dom@19.1.0_react@19.1.0/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.es.js.map +1 -1
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.es.js.map +1 -1
- package/dist/node_modules/.pnpm/@radix-ui_primitive@1.1.2/node_modules/@radix-ui/primitive/dist/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-accordion@1.2.11_@types_react-dom@19.1.0_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0/node_modules/@radix-ui/react-accordion/dist/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-collapsible@1.1.11_@types_react-dom@19.1.0_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0/node_modules/@radix-ui/react-collapsible/dist/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-collection@1.1.7_@types_react-dom@19.1.0_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0/node_modules/@radix-ui/react-collection/dist/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-compose-refs@1.1.2_@types_react@19.1.0_react@19.1.0/node_modules/@radix-ui/react-compose-refs/dist/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-context@1.1.2_@types_react@19.1.0_react@19.1.0/node_modules/@radix-ui/react-context/dist/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-dialog@1.1.14_@types_react-dom@19.1.0_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0/node_modules/@radix-ui/react-dialog/dist/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.1.10_@types_react-dom@19.1.0_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0/node_modules/@radix-ui/react-dismissable-layer/dist/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-dropdown-menu@2.1.15_@types_react-dom@19.1.0_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0/node_modules/@radix-ui/react-dropdown-menu/dist/index.es.js +10 -10
- package/dist/node_modules/.pnpm/@radix-ui_react-dropdown-menu@2.1.15_@types_react-dom@19.1.0_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0/node_modules/@radix-ui/react-dropdown-menu/dist/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-focus-guards@1.1.2_@types_react@19.1.0_react@19.1.0/node_modules/@radix-ui/react-focus-guards/dist/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-focus-scope@1.1.7_@types_react-dom@19.1.0_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0/node_modules/@radix-ui/react-focus-scope/dist/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-id@1.1.1_@types_react@19.1.0_react@19.1.0/node_modules/@radix-ui/react-id/dist/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-label@2.1.7_@types_react-dom@19.1.0_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0/node_modules/@radix-ui/react-label/dist/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-menu@2.1.15_@types_react-dom@19.1.0_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0/node_modules/@radix-ui/react-menu/dist/index.es.js +4 -4
- package/dist/node_modules/.pnpm/@radix-ui_react-menu@2.1.15_@types_react-dom@19.1.0_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0/node_modules/@radix-ui/react-menu/dist/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-popover@1.1.14_@types_react-dom@19.1.0_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0/node_modules/@radix-ui/react-popover/dist/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-popper@1.2.7_@types_react-dom@19.1.0_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0/node_modules/@radix-ui/react-popper/dist/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-presence@1.1.4_@types_react-dom@19.1.0_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0/node_modules/@radix-ui/react-presence/dist/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2.1.3_@types_react-dom@19.1.0_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0/node_modules/@radix-ui/react-primitive/dist/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-radio-group@1.3.7_@types_react-dom@19.1.0_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0/node_modules/@radix-ui/react-radio-group/dist/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-roving-focus@1.1.10_@types_react-dom@19.1.0_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0/node_modules/@radix-ui/react-roving-focus/dist/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-slot@1.2.3_@types_react@19.1.0_react@19.1.0/node_modules/@radix-ui/react-slot/dist/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-tabs@1.1.12_@types_react-dom@19.1.0_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0/node_modules/@radix-ui/react-tabs/dist/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-tooltip@1.2.7_@types_react-dom@19.1.0_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0/node_modules/@radix-ui/react-tooltip/dist/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-use-callback-ref@1.1.1_@types_react@19.1.0_react@19.1.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-use-controllable-state@1.2.2_@types_react@19.1.0_react@19.1.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-use-escape-keydown@1.1.1_@types_react@19.1.0_react@19.1.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-use-size@1.1.1_@types_react@19.1.0_react@19.1.0/node_modules/@radix-ui/react-use-size/dist/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.es.js.map +1 -1
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.es.js.map +1 -1
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildMatchFn.es.js.map +1 -1
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.es.js.map +1 -1
- package/dist/node_modules/.pnpm/react-day-picker@9.7.0_react@19.1.0/node_modules/react-day-picker/dist/esm/DayPicker.es.js.map +1 -1
- package/dist/node_modules/.pnpm/react-day-picker@9.7.0_react@19.1.0/node_modules/react-day-picker/dist/esm/classes/CalendarDay.es.js.map +1 -1
- package/dist/node_modules/.pnpm/react-day-picker@9.7.0_react@19.1.0/node_modules/react-day-picker/dist/esm/classes/CalendarMonth.es.js.map +1 -1
- package/dist/node_modules/.pnpm/react-day-picker@9.7.0_react@19.1.0/node_modules/react-day-picker/dist/esm/classes/CalendarWeek.es.js.map +1 -1
- package/dist/node_modules/.pnpm/react-day-picker@9.7.0_react@19.1.0/node_modules/react-day-picker/dist/esm/classes/DateLib.es.js.map +1 -1
- package/dist/node_modules/.pnpm/react-day-picker@9.7.0_react@19.1.0/node_modules/react-day-picker/dist/esm/components/DayButton.es.js.map +1 -1
- package/dist/node_modules/.pnpm/react-day-picker@9.7.0_react@19.1.0/node_modules/react-day-picker/dist/esm/components/Nav.es.js.map +1 -1
- package/dist/node_modules/.pnpm/react-day-picker@9.7.0_react@19.1.0/node_modules/react-day-picker/dist/esm/helpers/calculateFocusTarget.es.js.map +1 -1
- package/dist/node_modules/.pnpm/react-day-picker@9.7.0_react@19.1.0/node_modules/react-day-picker/dist/esm/helpers/createGetModifiers.es.js.map +1 -1
- package/dist/node_modules/.pnpm/react-day-picker@9.7.0_react@19.1.0/node_modules/react-day-picker/dist/esm/helpers/getDataAttributes.es.js.map +1 -1
- package/dist/node_modules/.pnpm/react-day-picker@9.7.0_react@19.1.0/node_modules/react-day-picker/dist/esm/helpers/getDates.es.js.map +1 -1
- package/dist/node_modules/.pnpm/react-day-picker@9.7.0_react@19.1.0/node_modules/react-day-picker/dist/esm/helpers/getDays.es.js.map +1 -1
- package/dist/node_modules/.pnpm/react-day-picker@9.7.0_react@19.1.0/node_modules/react-day-picker/dist/esm/helpers/getDisplayMonths.es.js.map +1 -1
- package/dist/node_modules/.pnpm/react-day-picker@9.7.0_react@19.1.0/node_modules/react-day-picker/dist/esm/helpers/getInitialMonth.es.js.map +1 -1
- package/dist/node_modules/.pnpm/react-day-picker@9.7.0_react@19.1.0/node_modules/react-day-picker/dist/esm/helpers/getMonthOptions.es.js.map +1 -1
- package/dist/node_modules/.pnpm/react-day-picker@9.7.0_react@19.1.0/node_modules/react-day-picker/dist/esm/helpers/getMonths.es.js.map +1 -1
- package/dist/node_modules/.pnpm/react-day-picker@9.7.0_react@19.1.0/node_modules/react-day-picker/dist/esm/helpers/getStyleForModifiers.es.js.map +1 -1
- package/dist/node_modules/.pnpm/react-day-picker@9.7.0_react@19.1.0/node_modules/react-day-picker/dist/esm/helpers/getWeekdays.es.js.map +1 -1
- package/dist/node_modules/.pnpm/react-day-picker@9.7.0_react@19.1.0/node_modules/react-day-picker/dist/esm/helpers/getYearOptions.es.js.map +1 -1
- package/dist/node_modules/.pnpm/react-day-picker@9.7.0_react@19.1.0/node_modules/react-day-picker/dist/esm/selection/useMulti.es.js.map +1 -1
- package/dist/node_modules/.pnpm/react-day-picker@9.7.0_react@19.1.0/node_modules/react-day-picker/dist/esm/selection/useRange.es.js.map +1 -1
- package/dist/node_modules/.pnpm/react-day-picker@9.7.0_react@19.1.0/node_modules/react-day-picker/dist/esm/selection/useSingle.es.js.map +1 -1
- package/dist/node_modules/.pnpm/react-day-picker@9.7.0_react@19.1.0/node_modules/react-day-picker/dist/esm/useAnimation.es.js.map +1 -1
- package/dist/node_modules/.pnpm/react-day-picker@9.7.0_react@19.1.0/node_modules/react-day-picker/dist/esm/useCalendar.es.js.map +1 -1
- package/dist/node_modules/.pnpm/react-day-picker@9.7.0_react@19.1.0/node_modules/react-day-picker/dist/esm/useFocus.es.js.map +1 -1
- package/dist/node_modules/.pnpm/react-day-picker@9.7.0_react@19.1.0/node_modules/react-day-picker/dist/esm/utils/addToRange.es.js.map +1 -1
- package/dist/node_modules/.pnpm/react-day-picker@9.7.0_react@19.1.0/node_modules/react-day-picker/dist/esm/utils/dateMatchModifiers.es.js.map +1 -1
- package/dist/node_modules/.pnpm/react-day-picker@9.7.0_react@19.1.0/node_modules/react-day-picker/dist/esm/utils/rangeContainsDayOfWeek.es.js.map +1 -1
- package/dist/node_modules/.pnpm/react-day-picker@9.7.0_react@19.1.0/node_modules/react-day-picker/dist/esm/utils/rangeContainsModifiers.es.js.map +1 -1
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.1.0_react@19.1.0/node_modules/react-remove-scroll-bar/dist/es2015/component.es.js.map +1 -1
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.1.0_react@19.1.0/node_modules/react-remove-scroll-bar/dist/es2015/utils.es.js.map +1 -1
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.1.0_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/Combination.es.js.map +1 -1
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.1.0_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/SideEffect.es.js.map +1 -1
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.1.0_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.es.js.map +1 -1
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.1.0_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/handleScroll.es.js.map +1 -1
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.1.0_react@19.1.0/node_modules/react-style-singleton/dist/es2015/component.es.js.map +1 -1
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.1.0_react@19.1.0/node_modules/react-style-singleton/dist/es2015/hook.es.js.map +1 -1
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.1.0_react@19.1.0/node_modules/react-style-singleton/dist/es2015/singleton.es.js.map +1 -1
- package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.es.js.map +1 -1
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.1.0_react@19.1.0/node_modules/use-callback-ref/dist/es2015/useMergeRef.es.js.map +1 -1
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.1.0_react@19.1.0/node_modules/use-callback-ref/dist/es2015/useRef.es.js.map +1 -1
- package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.1.0_react@19.1.0/node_modules/use-sidecar/dist/es2015/medium.es.js.map +1 -1
- package/dist/utils/{index.es.js → primitives.es.js} +1 -1
- package/dist/utils/primitives.es.js.map +1 -0
- package/dist/{hooks → utils}/use-mobile.es.js.map +1 -1
- package/lib/theme.css +10 -12
- package/lib/tokens.css +3 -3
- package/lib/utilities.css +8 -8
- package/package.json +9 -11
- package/dist/components/data-table/column-picker.es.js +0 -50
- package/dist/components/data-table/column-picker.es.js.map +0 -1
- package/dist/components/data-table/page-size.es.js +0 -25
- package/dist/components/data-table/page-size.es.js.map +0 -1
- package/dist/components/data-table/paginator.es.js +0 -64
- package/dist/components/data-table/paginator.es.js.map +0 -1
- package/dist/components/data-table/table-actions.es.js +0 -26
- package/dist/components/data-table/table-actions.es.js.map +0 -1
- package/dist/components/data-table/table-content.es.js +0 -65
- package/dist/components/data-table/table-content.es.js.map +0 -1
- package/dist/components/data-table/table-utils/constants.es.js +0 -288
- package/dist/components/data-table/table-utils/constants.es.js.map +0 -1
- package/dist/components/data-table/table-utils/createTableFetchFn.es.js +0 -25
- package/dist/components/data-table/table-utils/createTableFetchFn.es.js.map +0 -1
- package/dist/components/data-table/table-utils/date.es.js +0 -12
- package/dist/components/data-table/table-utils/date.es.js.map +0 -1
- package/dist/components/data-table/table-utils/string.es.js +0 -19
- package/dist/components/data-table/table-utils/string.es.js.map +0 -1
- package/dist/components/data-table/table-utils/types.es.js +0 -5
- package/dist/components/data-table/table-utils/types.es.js.map +0 -1
- package/dist/utils/index.es.js.map +0 -1
- /package/dist/{hooks → utils}/use-mobile.es.js +0 -0
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { RotateCw as o } from "lucide-react";
|
|
3
|
-
import { Button as i } from "../ui/button.es.js";
|
|
4
|
-
import { useState as r } from "react";
|
|
5
|
-
function p({
|
|
6
|
-
tableActions: n,
|
|
7
|
-
getSelectedRowModel: a,
|
|
8
|
-
handleSearching: c,
|
|
9
|
-
dataQuery: t
|
|
10
|
-
}) {
|
|
11
|
-
const [l, s] = r("");
|
|
12
|
-
return /* @__PURE__ */ e("div", { className: "flex bg-card justify-between my-0 p-4 border gap-4 overflow-auto", children: /* @__PURE__ */ e("div", { className: "flex gap-4", children: /* @__PURE__ */ e(
|
|
13
|
-
i,
|
|
14
|
-
{
|
|
15
|
-
loading: t.isFetching,
|
|
16
|
-
icon: () => o,
|
|
17
|
-
onClick: () => t.refetch(),
|
|
18
|
-
variant: "outline",
|
|
19
|
-
size: "icon"
|
|
20
|
-
}
|
|
21
|
-
) }) });
|
|
22
|
-
}
|
|
23
|
-
export {
|
|
24
|
-
p as default
|
|
25
|
-
};
|
|
26
|
-
//# sourceMappingURL=table-actions.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"table-actions.es.js","sources":["../../../lib/components/data-table/table-actions.tsx"],"sourcesContent":["import { RotateCw } from \"lucide-react\";\n\nimport type { TableActions } from \"@/components/data-table/table-utils/index\";\nimport { Button } from \"@/components/ui/button\";\nimport type { UseQueryResult } from \"@tanstack/react-query\";\nimport type { RowModel } from \"@tanstack/react-table\";\nimport { useState } from \"react\";\n\nexport default function Actions({\n\ttableActions,\n\tgetSelectedRowModel,\n\thandleSearching,\n\tdataQuery,\n}: {\n\ttableActions: TableActions;\n\tgetSelectedRowModel: () => RowModel<any>;\n\thandleSearching: (value: string) => void;\n\tdataQuery: UseQueryResult<any, unknown>;\n}) {\n\t// const { location: { href } = {} } = useRouterState();\n\tconst [search, setSearch] = useState<string>(\"\");\n\treturn (\n\t\t<div className=\"flex bg-card justify-between my-0 p-4 border gap-4 overflow-auto\">\n\t\t\t<div className=\"flex gap-4\">\n\t\t\t\t<Button\n\t\t\t\t\tloading={dataQuery.isFetching}\n\t\t\t\t\ticon={() => RotateCw}\n\t\t\t\t\tonClick={() => dataQuery.refetch()}\n\t\t\t\t\tvariant={\"outline\"}\n\t\t\t\t\tsize={\"icon\"}\n\t\t\t\t/>\n\t\t\t\t{/* //TODO: we can show the create, delete button based on permsission\n\t\t\t\t{/* All the creating routes will be with url /create in host app */}\n\t\t\t\t{/* */}\n\t\t\t</div>\n\t\t\t{/* {tableActions?.search && (\n\t\t\t\t<SearchInput\n\t\t\t\t\tvalue={search}\n\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\tsetSearch(e);\n\t\t\t\t\t\thandleSearching(e);\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t)} */}\n\t\t</div>\n\t);\n}\n"],"names":["Actions","tableActions","getSelectedRowModel","handleSearching","dataQuery","search","setSearch","useState","jsx","Button","RotateCw"],"mappings":";;;;AAQA,SAAwBA,EAAQ;AAAA,EAC/B,cAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,WAAAC;AACD,GAKG;AAEF,QAAM,CAACC,GAAQC,CAAS,IAAIC,EAAiB,EAAE;AAC/C,2BACE,OAAA,EAAI,WAAU,oEACd,UAAA,gBAAAC,EAAC,OAAA,EAAI,WAAU,cACd,UAAA,gBAAAA;AAAA,IAACC;AAAA,IAAA;AAAA,MACA,SAASL,EAAU;AAAA,MACnB,MAAM,MAAMM;AAAA,MACZ,SAAS,MAAMN,EAAU,QAAA;AAAA,MACzB,SAAS;AAAA,MACT,MAAM;AAAA,IAAA;AAAA,EAAA,GAKR,EAAA,CAUD;AAEF;"}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { jsxs as i, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { ACTIONS_COLUMN_ID as l } from "./data-table.es.js";
|
|
3
|
-
import { Table as d, TableHeader as p, TableRow as a, TableHead as u, TableBody as f, TableCell as g } from "../ui/table.es.js";
|
|
4
|
-
import { flexRender as s } from "@tanstack/react-table";
|
|
5
|
-
import { ArrowDownNarrowWide as x, ArrowDownWideNarrow as w, ArrowUpDown as b } from "lucide-react";
|
|
6
|
-
import { Button as h } from "../ui/button.es.js";
|
|
7
|
-
function k({
|
|
8
|
-
className: c,
|
|
9
|
-
getHeaderGroups: m,
|
|
10
|
-
getRowModel: r
|
|
11
|
-
}) {
|
|
12
|
-
return /* @__PURE__ */ i(d, { className: c, children: [
|
|
13
|
-
/* @__PURE__ */ t(p, { className: "sticky top-0 z-10", children: m().map((o) => /* @__PURE__ */ t(a, { children: o.headers.map((e) => /* @__PURE__ */ t(
|
|
14
|
-
u,
|
|
15
|
-
{
|
|
16
|
-
className: `px-4 py-2 text-left text-sm font-medium bg-card whitespace-nowrap ${e.id === l ? "sticky right-0 z-50 text-center" : ""}`,
|
|
17
|
-
children: /* @__PURE__ */ i("span", { className: "inline-flex items-center gap-1", children: [
|
|
18
|
-
/* @__PURE__ */ t("span", { children: e.isPlaceholder ? null : s(
|
|
19
|
-
e.column.columnDef.header,
|
|
20
|
-
e.getContext()
|
|
21
|
-
) }),
|
|
22
|
-
e.column.getCanSort() && /* @__PURE__ */ t(
|
|
23
|
-
h,
|
|
24
|
-
{
|
|
25
|
-
size: "icon",
|
|
26
|
-
variant: "ghost",
|
|
27
|
-
onClick: e.column.getToggleSortingHandler(),
|
|
28
|
-
icon: () => {
|
|
29
|
-
const n = e.column.getIsSorted();
|
|
30
|
-
return n === "asc" ? x : n === "desc" ? w : b;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
)
|
|
34
|
-
] })
|
|
35
|
-
},
|
|
36
|
-
e.id
|
|
37
|
-
)) }, o.id)) }),
|
|
38
|
-
/* @__PURE__ */ t(f, { className: "flex-1 overflow-y-auto relative", children: r().rows.length !== 0 && r().rows.map((o) => /* @__PURE__ */ t(
|
|
39
|
-
a,
|
|
40
|
-
{
|
|
41
|
-
className: "h-input transition-colors data-[state=selected]:bg-muted-foreground/30 hover:bg-muted-foreground/20",
|
|
42
|
-
"data-state": o.getIsSelected() && "selected",
|
|
43
|
-
children: o.getVisibleCells().map((e) => /* @__PURE__ */ t(
|
|
44
|
-
g,
|
|
45
|
-
{
|
|
46
|
-
className: `
|
|
47
|
-
px-4 py-2 text-left text-sm whitespace-nowrap
|
|
48
|
-
${e.column.id === l ? "sticky right-0 w-20 bg-card" : ""}
|
|
49
|
-
`,
|
|
50
|
-
children: s(
|
|
51
|
-
e.column.columnDef.cell,
|
|
52
|
-
e.getContext()
|
|
53
|
-
)
|
|
54
|
-
},
|
|
55
|
-
e.id
|
|
56
|
-
))
|
|
57
|
-
},
|
|
58
|
-
o.id
|
|
59
|
-
)) })
|
|
60
|
-
] });
|
|
61
|
-
}
|
|
62
|
-
export {
|
|
63
|
-
k as TableContent
|
|
64
|
-
};
|
|
65
|
-
//# sourceMappingURL=table-content.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"table-content.es.js","sources":["../../../lib/components/data-table/table-content.tsx"],"sourcesContent":["import { ACTIONS_COLUMN_ID } from \"@/components/data-table/data-table\";\nimport { Button } from \"@/components/ui\";\nimport {\n\tTableBody,\n\tTableCell,\n\tTable as TableComponent,\n\tTableHead,\n\tTableHeader,\n\tTableRow,\n} from \"@/components/ui/table\";\nimport {\n\ttype HeaderGroup,\n\ttype RowModel,\n\tflexRender,\n} from \"@tanstack/react-table\";\nimport {\n\tArrowDownNarrowWide,\n\tArrowDownWideNarrow,\n\tArrowUpDown\n} from \"lucide-react\";\n\n// TODO, automate checking valid HTML\nexport function TableContent({\n\tclassName,\n\tgetHeaderGroups,\n\tgetRowModel,\n}: {\n\tclassName?: string;\n\tgetRowModel: () => RowModel<any>;\n\tgetHeaderGroups: () => HeaderGroup<any>[];\n}) {\n\treturn (\n\t\t<TableComponent className={className}>\n\t\t\t<TableHeader className=\"sticky top-0 z-10\">\n\t\t\t\t{getHeaderGroups().map((headerGroup) => (\n\t\t\t\t\t<TableRow key={headerGroup.id}>\n\t\t\t\t\t\t{headerGroup.headers.map((header) => (\n\t\t\t\t\t\t\t<TableHead\n\t\t\t\t\t\t\t\tkey={header.id}\n\t\t\t\t\t\t\t\tclassName={`px-4 py-2 text-left text-sm font-medium bg-card whitespace-nowrap ${header.id === ACTIONS_COLUMN_ID ? \"sticky right-0 z-50 text-center\" : \"\"}`}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<span className=\"inline-flex items-center gap-1\">\n\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t\t{header.isPlaceholder\n\t\t\t\t\t\t\t\t\t\t\t? null\n\t\t\t\t\t\t\t\t\t\t\t: flexRender(\n\t\t\t\t\t\t\t\t\t\t\t\theader.column.columnDef.header,\n\t\t\t\t\t\t\t\t\t\t\t\theader.getContext(),\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t{header.column.getCanSort() && (\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\tonClick={header.column.getToggleSortingHandler()}\n\t\t\t\t\t\t\t\t\t\t\ticon={() => {\n\t\t\t\t\t\t\t\t\t\t\t\tconst sort = header.column.getIsSorted();\n\t\t\t\t\t\t\t\t\t\t\t\tif (sort === \"asc\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\treturn ArrowDownNarrowWide;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tif (sort === \"desc\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\treturn ArrowDownWideNarrow;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\treturn ArrowUpDown;\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</TableHead>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</TableRow>\n\t\t\t\t))}\n\t\t\t</TableHeader>\n\t\t\t<TableBody className=\"flex-1 overflow-y-auto relative\">\n\t\t\t\t{getRowModel().rows.length !== 0 &&\n\t\t\t\t\tgetRowModel().rows.map((row) => (\n\t\t\t\t\t\t<TableRow\n\t\t\t\t\t\t\tclassName=\"h-input transition-colors data-[state=selected]:bg-muted-foreground/30 hover:bg-muted-foreground/20\"\n\t\t\t\t\t\t\tkey={row.id}\n\t\t\t\t\t\t\tdata-state={row.getIsSelected() && \"selected\"}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{row.getVisibleCells().map((cell) => (\n\t\t\t\t\t\t\t\t<TableCell\n\t\t\t\t\t\t\t\t\tkey={cell.id}\n\t\t\t\t\t\t\t\t\tclassName={`\n px-4 py-2 text-left text-sm whitespace-nowrap\n ${cell.column.id === ACTIONS_COLUMN_ID\n\t\t\t\t\t\t\t\t\t\t\t? \"sticky right-0 w-20 bg-card\"\n\t\t\t\t\t\t\t\t\t\t\t: \"\"\n\t\t\t\t\t\t\t\t\t\t}\n `}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{flexRender(\n\t\t\t\t\t\t\t\t\t\tcell.column.columnDef.cell,\n\t\t\t\t\t\t\t\t\t\tcell.getContext(),\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t))}\n\t\t\t</TableBody>\n\t\t</TableComponent>\n\t);\n}\n"],"names":["TableContent","className","getHeaderGroups","getRowModel","jsxs","TableComponent","jsx","TableHeader","headerGroup","TableRow","header","TableHead","ACTIONS_COLUMN_ID","flexRender","Button","sort","ArrowDownNarrowWide","ArrowDownWideNarrow","ArrowUpDown","TableBody","row","cell","TableCell"],"mappings":";;;;;;AAsBO,SAASA,EAAa;AAAA,EAC5B,WAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,aAAAC;AACD,GAIG;AACF,SACC,gBAAAC,EAACC,KAAe,WAAAJ,GACf,UAAA;AAAA,IAAA,gBAAAK,EAACC,GAAA,EAAY,WAAU,qBACrB,UAAAL,EAAA,EAAkB,IAAI,CAACM,MACvB,gBAAAF,EAACG,GAAA,EACC,UAAAD,EAAY,QAAQ,IAAI,CAACE,MACzB,gBAAAJ;AAAA,MAACK;AAAA,MAAA;AAAA,QAEA,WAAW,qEAAqED,EAAO,OAAOE,IAAoB,oCAAoC,EA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@@
|
|
|
1
|
-
import { intervalToDuration as i } from "date-fns";
|
|
2
|
-
import { convertCamelCaseToTitleCase as l } from "./string.es.js";
|
|
3
|
-
const m = [
|
|
4
|
-
"objectString",
|
|
5
|
-
"string",
|
|
6
|
-
"number",
|
|
7
|
-
"objectNumber",
|
|
8
|
-
"boolean",
|
|
9
|
-
"objectDate",
|
|
10
|
-
"licenseType",
|
|
11
|
-
"product",
|
|
12
|
-
"product-version",
|
|
13
|
-
"user",
|
|
14
|
-
"webhook",
|
|
15
|
-
"automated-email",
|
|
16
|
-
"organization",
|
|
17
|
-
"country",
|
|
18
|
-
"tag",
|
|
19
|
-
"resource",
|
|
20
|
-
"resourceId",
|
|
21
|
-
"reseller",
|
|
22
|
-
"role",
|
|
23
|
-
"note",
|
|
24
|
-
"os",
|
|
25
|
-
"action"
|
|
26
|
-
], p = {
|
|
27
|
-
createdAt: "objectDate",
|
|
28
|
-
updatedAt: "objectDate"
|
|
29
|
-
}, g = [
|
|
30
|
-
"eq",
|
|
31
|
-
"ne",
|
|
32
|
-
"cn",
|
|
33
|
-
"nc",
|
|
34
|
-
"sw",
|
|
35
|
-
"ew",
|
|
36
|
-
"in",
|
|
37
|
-
"nin",
|
|
38
|
-
"gt",
|
|
39
|
-
"gte",
|
|
40
|
-
"lt",
|
|
41
|
-
"lte"
|
|
42
|
-
], f = {
|
|
43
|
-
eq: "equal to",
|
|
44
|
-
ne: "not equal to",
|
|
45
|
-
cn: "contains",
|
|
46
|
-
nc: "does not contain",
|
|
47
|
-
sw: "starts with",
|
|
48
|
-
ew: "ends with",
|
|
49
|
-
in: "includes",
|
|
50
|
-
nin: "does not include",
|
|
51
|
-
gt: "greater than",
|
|
52
|
-
gte: "greater than or equal to",
|
|
53
|
-
lt: "less than",
|
|
54
|
-
lte: "less than or equal to"
|
|
55
|
-
}, h = {
|
|
56
|
-
objectString: ["eq", "ne", "cn", "nc", "sw", "ew", "in", "nin"],
|
|
57
|
-
objectDate: ["gt", "lt", "eq"],
|
|
58
|
-
objectNumber: ["eq", "ne", "gt", "gte", "lt", "lte"],
|
|
59
|
-
tag: ["in", "nin"],
|
|
60
|
-
string: ["eq"],
|
|
61
|
-
number: ["eq"],
|
|
62
|
-
boolean: ["eq"],
|
|
63
|
-
licenseType: ["in", "nin"],
|
|
64
|
-
product: ["in", "nin"],
|
|
65
|
-
"product-version": ["in", "nin"],
|
|
66
|
-
user: ["eq"],
|
|
67
|
-
reseller: ["eq"],
|
|
68
|
-
webhook: ["in", "nin"],
|
|
69
|
-
"automated-email": ["in", "nin"],
|
|
70
|
-
organization: ["eq"],
|
|
71
|
-
country: ["in", "nin"],
|
|
72
|
-
resource: ["in", "nin"],
|
|
73
|
-
resourceId: ["eq", "ne", "in", "nin"],
|
|
74
|
-
role: ["in", "nin"],
|
|
75
|
-
note: ["eq", "ne", "cn", "nc", "sw", "ew"],
|
|
76
|
-
os: ["in", "nin"],
|
|
77
|
-
action: ["in", "nin"]
|
|
78
|
-
}, a = {
|
|
79
|
-
"product.displayName": "Product"
|
|
80
|
-
}, y = [
|
|
81
|
-
"access-token",
|
|
82
|
-
"account",
|
|
83
|
-
"activation",
|
|
84
|
-
"activation-log",
|
|
85
|
-
"admin-role",
|
|
86
|
-
"audit-log",
|
|
87
|
-
"automated-email",
|
|
88
|
-
"automated-email-event-log",
|
|
89
|
-
"card",
|
|
90
|
-
"feature-flag",
|
|
91
|
-
"invoice",
|
|
92
|
-
"license",
|
|
93
|
-
"license-template",
|
|
94
|
-
"maintenance-policy",
|
|
95
|
-
"organization",
|
|
96
|
-
"plan",
|
|
97
|
-
"product",
|
|
98
|
-
"product-version",
|
|
99
|
-
"profile",
|
|
100
|
-
"release",
|
|
101
|
-
"release-channel",
|
|
102
|
-
"release-file",
|
|
103
|
-
"release-platform",
|
|
104
|
-
"report",
|
|
105
|
-
"role",
|
|
106
|
-
"role-claim",
|
|
107
|
-
"saml-configuration",
|
|
108
|
-
"segment",
|
|
109
|
-
"sending-domain",
|
|
110
|
-
"setting",
|
|
111
|
-
"tag",
|
|
112
|
-
"team-member",
|
|
113
|
-
"trial",
|
|
114
|
-
"trial-policy",
|
|
115
|
-
"user",
|
|
116
|
-
"user-group",
|
|
117
|
-
"webhook",
|
|
118
|
-
"webhook-event-log",
|
|
119
|
-
"webhook-trigger",
|
|
120
|
-
"reseller",
|
|
121
|
-
"oidc-configuration",
|
|
122
|
-
"organization-claim",
|
|
123
|
-
"reseller-claim"
|
|
124
|
-
], A = {
|
|
125
|
-
account: "Your organization account.",
|
|
126
|
-
product: "Products are the software products you want to license",
|
|
127
|
-
license: "Licenses represent a purchase of your software. These can be linked to customers, and the license key is required to use the product.",
|
|
128
|
-
"access-token": "Access Tokens are used to authenticate your API requests.",
|
|
129
|
-
activation: "Activations, also known as devices/machines/seats are the devices consuming licenses.",
|
|
130
|
-
"activation-log": "Activation Log is a log entry of activation/deactivation of a particular license.",
|
|
131
|
-
trial: "Trial/Trial Activation is a device that has activated a trial of your product.",
|
|
132
|
-
"audit-log": "Audit logs contain all the changes made to your account.",
|
|
133
|
-
"automated-email": "Automated Email allow you to send marketing emails based on events on the linked product.",
|
|
134
|
-
"automated-email-event-log": "Automated email event log is the log of all the automated email events for your product.",
|
|
135
|
-
card: "The payment card for your account.",
|
|
136
|
-
"feature-flag": "Feature flags define features that make up tiers for your products.",
|
|
137
|
-
invoice: "",
|
|
138
|
-
"license-template": "License templates are a blueprint for the licenses you create for your customers and prevent repetition when creating licenses.",
|
|
139
|
-
"maintenance-policy": "Maintenance policies represent support contracts and can be linked to licenses.",
|
|
140
|
-
plan: "",
|
|
141
|
-
"product-version": "Product Versions are sets of Feature Flags that define the tiers of your products.",
|
|
142
|
-
"release-channel": "Release channel is the release channel for your product.",
|
|
143
|
-
"release-file": "Release files are files within your created releases.",
|
|
144
|
-
"release-platform": 'Release Platforms differentiate the target platform for your release. Common platforms include "Windows", "macOS", and "Linux".',
|
|
145
|
-
release: "Releases help you to manage different versions of your app, and secure distribute it to licensed users.",
|
|
146
|
-
report: "Analytics data for your account",
|
|
147
|
-
"role-claim": "",
|
|
148
|
-
role: "Roles define permissions for your team.",
|
|
149
|
-
"saml-configuration": "",
|
|
150
|
-
segment: "Sets of filters that can be saved to filter resources.",
|
|
151
|
-
"trial-policy": "Trial policies are templates for creating trials for your products.",
|
|
152
|
-
"webhook-event-log": "Webhook Event Logs are logs of events that have occured on webhooks.",
|
|
153
|
-
"webhook-trigger": "",
|
|
154
|
-
webhook: "Webhooks are HTTP callbacks which are triggered by specific events.",
|
|
155
|
-
organization: "",
|
|
156
|
-
profile: "",
|
|
157
|
-
setting: "",
|
|
158
|
-
tag: "Tags allow you to manage your licenses and customers on the dashboard.",
|
|
159
|
-
"team-member": "Team members can access the account based on their roles.",
|
|
160
|
-
user: "A user refers to your customer whom you want to license your product.",
|
|
161
|
-
"sending-domain": "Allows Cryptlex to send emails on your behalf using your From Email address",
|
|
162
|
-
"admin-role": "Roles that have type admin",
|
|
163
|
-
"user-group": "Groups of users that you can assign licenses to.",
|
|
164
|
-
reseller: "Resellers allow you to delegate user management to third parties or partners",
|
|
165
|
-
"oidc-configuration": "",
|
|
166
|
-
"organization-claim": "",
|
|
167
|
-
"reseller-claim": ""
|
|
168
|
-
}, r = {
|
|
169
|
-
id: "ID",
|
|
170
|
-
createdAt: "Creation Date",
|
|
171
|
-
scopes: "Permissions",
|
|
172
|
-
updatedAt: "Last Updated",
|
|
173
|
-
expiresAt: "Expiration Date",
|
|
174
|
-
lastSeenAt: "Last Seen",
|
|
175
|
-
os: "OS",
|
|
176
|
-
osVersion: "OS Version",
|
|
177
|
-
key: "License Key",
|
|
178
|
-
vmName: "VM Name",
|
|
179
|
-
container: "Container",
|
|
180
|
-
allowedIpRange: "Allowed IP Range",
|
|
181
|
-
allowedIpRanges: "Allowed IP Ranges",
|
|
182
|
-
allowedIpAddresses: "Allowed IP Addresses",
|
|
183
|
-
disallowedIpAddresses: "Disallowed IP Addresses",
|
|
184
|
-
allowVmActivation: "Allow VM Activation",
|
|
185
|
-
disableGeoLocation: "Disable Geolocation",
|
|
186
|
-
"user.id": "User ID",
|
|
187
|
-
userId: "User",
|
|
188
|
-
productId: "Product",
|
|
189
|
-
downloads: "Total Downloads",
|
|
190
|
-
claims: "Permissions",
|
|
191
|
-
googleSsoEnabled: "Google Login Enabled",
|
|
192
|
-
lastAttemptedAt: "Last Attempt Date",
|
|
193
|
-
url: "URL",
|
|
194
|
-
"trialPolicy.name": "Trial Policy Name",
|
|
195
|
-
"licensePolicy.name": "License Template Name",
|
|
196
|
-
licensePolicy: "License Template",
|
|
197
|
-
eventLog: "Audit Log",
|
|
198
|
-
cc: "CC Recepients",
|
|
199
|
-
bcc: "BCC Recepients",
|
|
200
|
-
ipAddress: "IP Address",
|
|
201
|
-
resellerId: "Reseller",
|
|
202
|
-
productVersionId: "Product Version",
|
|
203
|
-
releaseId: "Release",
|
|
204
|
-
maintenancePolicyId: "Maintenance Policy",
|
|
205
|
-
webhookId: "Webhook",
|
|
206
|
-
automatedEmailId: "Automated Email",
|
|
207
|
-
"location.countryName": "Country",
|
|
208
|
-
"location.ipAddress": "IP Address",
|
|
209
|
-
"location.countryCode": "Country",
|
|
210
|
-
organizationId: "Organization",
|
|
211
|
-
"address.country": "Country",
|
|
212
|
-
"address.addressLine1": "Address Line 1",
|
|
213
|
-
"address.addressLine2": "Address Line 2",
|
|
214
|
-
responseStatusCode: "HTTP Status Code",
|
|
215
|
-
resourceId: "Resource ID",
|
|
216
|
-
Sso: "SAML SSO 2.0",
|
|
217
|
-
"reseller.name": "Reseller",
|
|
218
|
-
sendingDomain: "Email Sending Domain"
|
|
219
|
-
};
|
|
220
|
-
function w(e, t) {
|
|
221
|
-
return t !== "admin-portal" && e in a ? a[e] : e in r ? r[e] : l(e);
|
|
222
|
-
}
|
|
223
|
-
function b(e) {
|
|
224
|
-
const t = e.expiresAt && new Date(e.expiresAt) < /* @__PURE__ */ new Date();
|
|
225
|
-
switch (!0) {
|
|
226
|
-
case (e.revoked && e.suspended && t):
|
|
227
|
-
return "Revoked, Suspended, Expired";
|
|
228
|
-
case (e.revoked && e.suspended):
|
|
229
|
-
return "Revoked, Suspended";
|
|
230
|
-
case (e.revoked && t):
|
|
231
|
-
return "Revoked, Expired";
|
|
232
|
-
case (e.suspended && t):
|
|
233
|
-
return "Suspended, Expired";
|
|
234
|
-
case e.suspended:
|
|
235
|
-
return "Suspended";
|
|
236
|
-
case e.revoked:
|
|
237
|
-
return "Revoked";
|
|
238
|
-
case t:
|
|
239
|
-
return "Expired";
|
|
240
|
-
default:
|
|
241
|
-
return "Active";
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
function v(e) {
|
|
245
|
-
return e === 0 || !e ? "Lifetime" : c(e);
|
|
246
|
-
}
|
|
247
|
-
function c(e) {
|
|
248
|
-
const t = i({
|
|
249
|
-
start: 0,
|
|
250
|
-
end: e * 1e3
|
|
251
|
-
});
|
|
252
|
-
return [
|
|
253
|
-
t.years && `${t.years}y`,
|
|
254
|
-
t.months && `${t.months}m`,
|
|
255
|
-
t.days && `${t.days}d`,
|
|
256
|
-
t.hours && `${t.hours}h`
|
|
257
|
-
].filter(Boolean).join(" ").trim();
|
|
258
|
-
}
|
|
259
|
-
function R(e, t) {
|
|
260
|
-
const n = t.toString().split(".");
|
|
261
|
-
let o = e;
|
|
262
|
-
for (const s of n)
|
|
263
|
-
o = o == null ? void 0 : o[s];
|
|
264
|
-
return o;
|
|
265
|
-
}
|
|
266
|
-
const S = {
|
|
267
|
-
windows: "Windows",
|
|
268
|
-
macos: "macOS",
|
|
269
|
-
linux: "Linux",
|
|
270
|
-
ios: "iOS",
|
|
271
|
-
android: "Android"
|
|
272
|
-
};
|
|
273
|
-
export {
|
|
274
|
-
S as ALL_OS,
|
|
275
|
-
f as COMPARISON_OPERATOR_LABELS,
|
|
276
|
-
p as DEFAULT_FILTERABLE_FIELDS,
|
|
277
|
-
m as FILTERABLE_PROPERTY_TYPES,
|
|
278
|
-
g as FILTER_COMPARISON_OPERATORS,
|
|
279
|
-
h as OPERATORS_FOR_FILTER_TYPE,
|
|
280
|
-
A as RESOURCE_DEFINITIONS,
|
|
281
|
-
y as RESOURCE_NAMES,
|
|
282
|
-
b as getLicenseStatus,
|
|
283
|
-
w as getResourceDisplayName,
|
|
284
|
-
v as getValidityDisplay,
|
|
285
|
-
R as getValueFromData,
|
|
286
|
-
c as secondsToDuration
|
|
287
|
-
};
|
|
288
|
-
//# sourceMappingURL=constants.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.es.js","sources":["../../../../lib/components/data-table/table-utils/constants.ts"],"sourcesContent":["import { intervalToDuration } from \"date-fns\";\nimport { convertCamelCaseToTitleCase } from \"./string\";\n\nexport const FILTERABLE_PROPERTY_TYPES = [\n\t\"objectString\",\n\t\"string\",\n\t\"number\",\n\t\"objectNumber\",\n\t\"boolean\",\n\t\"objectDate\",\n\t\"licenseType\",\n\t\"product\",\n\t\"product-version\",\n\t\"user\",\n\t\"webhook\",\n\t\"automated-email\",\n\t\"organization\",\n\t\"country\",\n\t\"tag\",\n\t\"resource\",\n\t\"resourceId\",\n\t\"reseller\",\n\t\"role\",\n\t\"note\",\n\t\"os\",\n\t\"action\",\n] as const;\nexport type FilterablePropertyType = (typeof FILTERABLE_PROPERTY_TYPES)[number];\nexport type FilterableProperties<T> = {\n\t[K in keyof T]?: FilterablePropertyType;\n};\n\nexport const DEFAULT_FILTERABLE_FIELDS: FilterableProperties<any> = {\n\tcreatedAt: \"objectDate\",\n\tupdatedAt: \"objectDate\",\n};\nexport const FILTER_COMPARISON_OPERATORS = [\n\t\"eq\",\n\t\"ne\",\n\t\"cn\",\n\t\"nc\",\n\t\"sw\",\n\t\"ew\",\n\t\"in\",\n\t\"nin\",\n\t\"gt\",\n\t\"gte\",\n\t\"lt\",\n\t\"lte\",\n] as const;\nexport type FilterComparisonOperator =\n\t(typeof FILTER_COMPARISON_OPERATORS)[number];\nexport type OperatorsForFilterType = Record<\n\tFilterablePropertyType,\n\tFilterComparisonOperator[]\n>;\nexport const COMPARISON_OPERATOR_LABELS: Record<\n\tFilterComparisonOperator,\n\tstring\n> = {\n\teq: \"equal to\",\n\tne: \"not equal to\",\n\tcn: \"contains\",\n\tnc: \"does not contain\",\n\tsw: \"starts with\",\n\tew: \"ends with\",\n\tin: \"includes\",\n\tnin: \"does not include\",\n\tgt: \"greater than\",\n\tgte: \"greater than or equal to\",\n\tlt: \"less than\",\n\tlte: \"less than or equal to\",\n};\n\nexport const OPERATORS_FOR_FILTER_TYPE: OperatorsForFilterType = {\n\tobjectString: [\"eq\", \"ne\", \"cn\", \"nc\", \"sw\", \"ew\", \"in\", \"nin\"],\n\tobjectDate: [\"gt\", \"lt\", \"eq\"],\n\tobjectNumber: [\"eq\", \"ne\", \"gt\", \"gte\", \"lt\", \"lte\"],\n\ttag: [\"in\", \"nin\"],\n\tstring: [\"eq\"],\n\tnumber: [\"eq\"],\n\tboolean: [\"eq\"],\n\tlicenseType: [\"in\", \"nin\"],\n\tproduct: [\"in\", \"nin\"],\n\t\"product-version\": [\"in\", \"nin\"],\n\tuser: [\"eq\"],\n\treseller: [\"eq\"],\n\twebhook: [\"in\", \"nin\"],\n\t\"automated-email\": [\"in\", \"nin\"],\n\torganization: [\"eq\"],\n\tcountry: [\"in\", \"nin\"],\n\tresource: [\"in\", \"nin\"],\n\tresourceId: [\"eq\", \"ne\", \"in\", \"nin\"],\n\trole: [\"in\", \"nin\"],\n\tnote: [\"eq\", \"ne\", \"cn\", \"nc\", \"sw\", \"ew\"],\n\tos: [\"in\", \"nin\"],\n\taction: [\"in\", \"nin\"],\n};\n\n/** Application Names */\nexport type CtxProjectName =\n\t| \"admin-portal\"\n\t| \"customer-portal\"\n\t| \"internal-portal\"\n\t| \"reseller-portal\";\n// Display names specific to customer and reseller portal\nconst OTHER_PORTALS_DISPLAY_NAME: Record<string, string> = {\n\t\"product.displayName\": \"Product\",\n};\n\n/** Resource Name should ALWAYS be in singular form */\nexport const RESOURCE_NAMES = [\n\t\"access-token\",\n\t\"account\",\n\t\"activation\",\n\t\"activation-log\",\n\t\"admin-role\",\n\t\"audit-log\",\n\t\"automated-email\",\n\t\"automated-email-event-log\",\n\t\"card\",\n\t\"feature-flag\",\n\t\"invoice\",\n\t\"license\",\n\t\"license-template\",\n\t\"maintenance-policy\",\n\t\"organization\",\n\t\"plan\",\n\t\"product\",\n\t\"product-version\",\n\t\"profile\",\n\t\"release\",\n\t\"release-channel\",\n\t\"release-file\",\n\t\"release-platform\",\n\t\"report\",\n\t\"role\",\n\t\"role-claim\",\n\t\"saml-configuration\",\n\t\"segment\",\n\t\"sending-domain\",\n\t\"setting\",\n\t\"tag\",\n\t\"team-member\",\n\t\"trial\",\n\t\"trial-policy\",\n\t\"user\",\n\t\"user-group\",\n\t\"webhook\",\n\t\"webhook-event-log\",\n\t\"webhook-trigger\",\n\t\"reseller\",\n\t\"oidc-configuration\",\n\t\"organization-claim\",\n\t\"reseller-claim\",\n] as const;\nexport type ResourceName = (typeof RESOURCE_NAMES)[number];\nexport const RESOURCE_DEFINITIONS: Record<ResourceName, string> = {\n\taccount: \"Your organization account.\",\n\tproduct: \"Products are the software products you want to license\",\n\tlicense:\n\t\t\"Licenses represent a purchase of your software. These can be linked to customers, and the license key is required to use the product.\",\n\t\"access-token\": \"Access Tokens are used to authenticate your API requests.\",\n\tactivation:\n\t\t\"Activations, also known as devices/machines/seats are the devices consuming licenses.\",\n\t\"activation-log\":\n\t\t\"Activation Log is a log entry of activation/deactivation of a particular license.\",\n\ttrial:\n\t\t\"Trial/Trial Activation is a device that has activated a trial of your product.\",\n\t\"audit-log\": \"Audit logs contain all the changes made to your account.\",\n\t\"automated-email\":\n\t\t\"Automated Email allow you to send marketing emails based on events on the linked product.\",\n\t\"automated-email-event-log\":\n\t\t\"Automated email event log is the log of all the automated email events for your product.\",\n\tcard: \"The payment card for your account.\",\n\t\"feature-flag\":\n\t\t\"Feature flags define features that make up tiers for your products.\",\n\tinvoice: \"\",\n\t\"license-template\":\n\t\t\"License templates are a blueprint for the licenses you create for your customers and prevent repetition when creating licenses.\",\n\t\"maintenance-policy\":\n\t\t\"Maintenance policies represent support contracts and can be linked to licenses.\",\n\tplan: \"\",\n\t\"product-version\":\n\t\t\"Product Versions are sets of Feature Flags that define the tiers of your products.\",\n\t\"release-channel\": \"Release channel is the release channel for your product.\",\n\t\"release-file\": \"Release files are files within your created releases.\",\n\t\"release-platform\":\n\t\t'Release Platforms differentiate the target platform for your release. Common platforms include \"Windows\", \"macOS\", and \"Linux\".',\n\trelease:\n\t\t\"Releases help you to manage different versions of your app, and secure distribute it to licensed users.\",\n\treport: \"Analytics data for your account\",\n\t\"role-claim\": \"\",\n\trole: \"Roles define permissions for your team.\",\n\t\"saml-configuration\": \"\",\n\tsegment: \"Sets of filters that can be saved to filter resources.\",\n\t\"trial-policy\":\n\t\t\"Trial policies are templates for creating trials for your products.\",\n\t\"webhook-event-log\":\n\t\t\"Webhook Event Logs are logs of events that have occured on webhooks.\",\n\t\"webhook-trigger\": \"\",\n\twebhook:\n\t\t\"Webhooks are HTTP callbacks which are triggered by specific events.\",\n\torganization: \"\",\n\tprofile: \"\",\n\tsetting: \"\",\n\ttag: \"Tags allow you to manage your licenses and customers on the dashboard.\",\n\t\"team-member\": \"Team members can access the account based on their roles.\",\n\tuser: \"A user refers to your customer whom you want to license your product.\",\n\t\"sending-domain\":\n\t\t\"Allows Cryptlex to send emails on your behalf using your From Email address\",\n\t\"admin-role\": \"Roles that have type admin\",\n\t\"user-group\": \"Groups of users that you can assign licenses to.\",\n\treseller:\n\t\t\"Resellers allow you to delegate user management to third parties or partners\",\n\t\"oidc-configuration\": \"\",\n\t\"organization-claim\": \"\",\n\t\"reseller-claim\": \"\",\n};\n\nconst RESOURCE_DISPLAY_NAMES: Record<string, string> = {\n\tid: \"ID\",\n\tcreatedAt: \"Creation Date\",\n\tscopes: \"Permissions\",\n\tupdatedAt: \"Last Updated\",\n\texpiresAt: \"Expiration Date\",\n\tlastSeenAt: \"Last Seen\",\n\tos: \"OS\",\n\tosVersion: \"OS Version\",\n\tkey: \"License Key\",\n\tvmName: \"VM Name\",\n\tcontainer: \"Container\",\n\tallowedIpRange: \"Allowed IP Range\",\n\tallowedIpRanges: \"Allowed IP Ranges\",\n\tallowedIpAddresses: \"Allowed IP Addresses\",\n\tdisallowedIpAddresses: \"Disallowed IP Addresses\",\n\tallowVmActivation: \"Allow VM Activation\",\n\tdisableGeoLocation: \"Disable Geolocation\",\n\t\"user.id\": \"User ID\",\n\tuserId: \"User\",\n\tproductId: \"Product\",\n\tdownloads: \"Total Downloads\",\n\tclaims: \"Permissions\",\n\tgoogleSsoEnabled: \"Google Login Enabled\",\n\tlastAttemptedAt: \"Last Attempt Date\",\n\turl: \"URL\",\n\t\"trialPolicy.name\": \"Trial Policy Name\",\n\t\"licensePolicy.name\": \"License Template Name\",\n\tlicensePolicy: \"License Template\",\n\teventLog: \"Audit Log\",\n\tcc: \"CC Recepients\",\n\tbcc: \"BCC Recepients\",\n\tipAddress: \"IP Address\",\n\tresellerId: \"Reseller\",\n\tproductVersionId: \"Product Version\",\n\treleaseId: \"Release\",\n\tmaintenancePolicyId: \"Maintenance Policy\",\n\twebhookId: \"Webhook\",\n\tautomatedEmailId: \"Automated Email\",\n\t\"location.countryName\": \"Country\",\n\t\"location.ipAddress\": \"IP Address\",\n\t\"location.countryCode\": \"Country\",\n\torganizationId: \"Organization\",\n\t\"address.country\": \"Country\",\n\t\"address.addressLine1\": \"Address Line 1\",\n\t\"address.addressLine2\": \"Address Line 2\",\n\tresponseStatusCode: \"HTTP Status Code\",\n\tresourceId: \"Resource ID\",\n\tSso: \"SAML SSO 2.0\",\n\t\"reseller.name\": \"Reseller\",\n\tsendingDomain: \"Email Sending Domain\",\n};\nexport function getResourceDisplayName(\n\tresourceName: string,\n\tportal: CtxProjectName,\n) {\n\tif (portal !== \"admin-portal\" && resourceName in OTHER_PORTALS_DISPLAY_NAME) {\n\t\treturn OTHER_PORTALS_DISPLAY_NAME[resourceName];\n\t} else if (resourceName in RESOURCE_DISPLAY_NAMES) {\n\t\treturn RESOURCE_DISPLAY_NAMES[resourceName];\n\t} else {\n\t\treturn convertCamelCaseToTitleCase(resourceName);\n\t}\n}\n\n/**\n * Format multiple license parameters (expired, suspended, revoked) into a single status\n */\nexport function getLicenseStatus(license: any): string {\n\tconst licenseExpired =\n\t\tlicense.expiresAt && new Date(license.expiresAt) < new Date();\n\t// Status Column\n\tswitch (true) {\n\t\tcase license.revoked && license.suspended && licenseExpired:\n\t\t\treturn \"Revoked, Suspended, Expired\";\n\t\tcase license.revoked && license.suspended:\n\t\t\treturn \"Revoked, Suspended\";\n\t\tcase license.revoked && licenseExpired:\n\t\t\treturn \"Revoked, Expired\";\n\t\tcase license.suspended && licenseExpired:\n\t\t\treturn \"Suspended, Expired\";\n\t\tcase license.suspended:\n\t\t\treturn \"Suspended\";\n\t\tcase license.revoked:\n\t\t\treturn \"Revoked\";\n\t\tcase licenseExpired:\n\t\t\treturn \"Expired\";\n\t\tdefault:\n\t\t\treturn \"Active\";\n\t}\n}\n\nexport function getValidityDisplay(validity: number | undefined) {\n\tif (validity === 0 || !validity) {\n\t\treturn \"Lifetime\";\n\t} else {\n\t\treturn secondsToDuration(validity);\n\t}\n}\nexport function secondsToDuration(seconds: number): string {\n\tconst duration = intervalToDuration({\n\t\tstart: 0,\n\t\tend: seconds * 1000,\n\t});\n\n\tconst parts = [\n\t\tduration.years && `${duration.years}y`,\n\t\tduration.months && `${duration.months}m`,\n\t\tduration.days && `${duration.days}d`,\n\t\tduration.hours && `${duration.hours}h`,\n\t];\n\n\t// Filter out undefined values and join\n\treturn parts.filter(Boolean).join(\" \").trim();\n}\n\nexport function getValueFromData(\n\tdata: any,\n\taccessor: string | number | symbol,\n) {\n\tconst accessors = accessor.toString().split(\".\");\n\tlet value = data;\n\tfor (const acc of accessors) {\n\t\tvalue = value?.[acc];\n\t}\n\treturn value;\n}\nexport const ALL_OS: { [key: string]: string } = {\n\twindows: \"Windows\",\n\tmacos: \"macOS\",\n\tlinux: \"Linux\",\n\tios: \"iOS\",\n\tandroid: \"Android\",\n};\n"],"names":["FILTERABLE_PROPERTY_TYPES","DEFAULT_FILTERABLE_FIELDS","FILTER_COMPARISON_OPERATORS","COMPARISON_OPERATOR_LABELS","OPERATORS_FOR_FILTER_TYPE","OTHER_PORTALS_DISPLAY_NAME","RESOURCE_NAMES","RESOURCE_DEFINITIONS","RESOURCE_DISPLAY_NAMES","getResourceDisplayName","resourceName","portal","convertCamelCaseToTitleCase","getLicenseStatus","license","licenseExpired","getValidityDisplay","validity","secondsToDuration","seconds","duration","intervalToDuration","getValueFromData","data","accessor","accessors","value","acc","ALL_OS"],"mappings":";;AAGO,MAAMA,IAA4B;AAAA,EACxC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GAMaC,IAAuD;AAAA,EACnE,WAAW;AAAA,EACX,WAAW;AACZ,GACaC,IAA8B;AAAA,EAC1C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GAOaC,IAGT;AAAA,EACH,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,KAAK;AAAA,EACL,IAAI;AAAA,EACJ,KAAK;AAAA,EACL,IAAI;AAAA,EACJ,KAAK;AACN,GAEaC,IAAoD;AAAA,EAChE,cAAc,CAAC,MAAM,MAAM,MAAM,MAAM,MAAM,MAAM,MAAM,KAAK;AAAA,EAC9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ChE,SAAIA,MAAa,KAAK,CAACA,IACf,aAEAC,EAAkBD,CAAQ;AAEnC;AACO,SAASC,EAAkBC,GAAyB;AAC1D,QAAMC,IAAWC,EAAmB;AAAA,IACnC,OAAO;AAAA,IACP,KAAKF,IAAU;AAAA,EAAA,CACf;AAUD,SARc;AAAA,IACbC,EAAS,SAAS,GAAGA,EAAS,KAAK;AAAA,IACnCA,EAAS,UAAU,GAAGA,EAAS,MAAM;AAAA,IACrCA,EAAS,QAAQ,GAAGA,EAAS,IAAI;AAAA,IACjCA,EAAS,SAAS,GAAGA,EAAS,KAAK;AAAA,EAAA,EAIvB,OAAO,OAAO,EAAE,KAAK,GAAG,EAAE,KAAA;AACxC;AAEO,SAASE,EACfC,GACAC,GACC;AACD,QAAMC,IAAYD,EAAS,SAAA,EAAW,MAAM,GAAG;AAC/C,MAAIE,IAAQH;AACZ,aAAWI,KAAOF;AACjB,IAAAC,IAAQA,KAAA,gBAAAA,EAAQC;AAEjB,SAAOD;AACR;AACO,MAAME,IAAoC;AAAA,EAChD,SAAS;AAAA,EACT,OAAO;AAAA,EACP,OAAO;AAAA,EACP,KAAK;AAAA,EACL,SAAS;AACV;"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { merge as i } from "lodash-es";
|
|
2
|
-
function g(e, n, a) {
|
|
3
|
-
return async (r, o, u) => {
|
|
4
|
-
const s = {
|
|
5
|
-
params: {
|
|
6
|
-
query: {
|
|
7
|
-
page: r.pageIndex + 1,
|
|
8
|
-
limit: r.pageSize,
|
|
9
|
-
sort: d(o[0]),
|
|
10
|
-
query: u
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
}, c = i(s, a);
|
|
14
|
-
return e.GET(n, c).then((t) => ({ total: Number.parseInt(
|
|
15
|
-
t.response.headers.get("Pagination-Count") || "0"
|
|
16
|
-
), data: t.data }));
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
function d(e) {
|
|
20
|
-
return e ? e.desc ? `-${e.id}` : `+${e.id}` : "-createdAt";
|
|
21
|
-
}
|
|
22
|
-
export {
|
|
23
|
-
g as createTableFetchFn
|
|
24
|
-
};
|
|
25
|
-
//# sourceMappingURL=createTableFetchFn.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createTableFetchFn.es.js","sources":["../../../../lib/components/data-table/table-utils/createTableFetchFn.ts"],"sourcesContent":["import type { paths } from \"@cryptlex/web-api-types\";\nimport { merge } from \"lodash-es\";\nimport type createClient from \"openapi-fetch\";\nimport type { ParamsOption } from \"openapi-fetch\";\nimport type { TableFetchFn } from \"./types\";\n\ninterface Params {\n\tquery: Record<\n\t\tstring,\n\t\tstring | number | boolean | Record<string, string | number | boolean>\n\t>;\n}\n\ntype Client = ReturnType<typeof createClient<paths>>;\n\n// Helper type to extract valid GET paths\ntype GetPaths = {\n\t[P in keyof paths]: paths[P] extends { get: any } ? P : never;\n}[keyof paths];\n\nexport function createTableFetchFn<_any, Return>(\n\tctxclient: Client,\n\tpath: GetPaths,\n\t// TODO: Use generic type instead\n\tparams?: ParamsOption<any>,\n): TableFetchFn<Return> {\n\treturn async (pagination, sorting, searching) => {\n\t\tconst ab: { params: Params } = {\n\t\t\tparams: {\n\t\t\t\tquery: {\n\t\t\t\t\tpage: pagination.pageIndex + 1,\n\t\t\t\t\tlimit: pagination.pageSize,\n\t\t\t\t\tsort: generateSortParam(sorting[0]),\n\t\t\t\t\tquery: searching,\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\n\t\tconst pathParams = merge(ab, params) as { params: Params };\n\n\t\treturn ctxclient.GET(path, pathParams).then((value) => {\n\t\t\tconst rowCount = Number.parseInt(\n\t\t\t\tvalue.response.headers.get(\"Pagination-Count\") || \"0\",\n\t\t\t);\n\t\t\treturn { total: rowCount, data: value.data };\n\t\t});\n\t};\n}\n\nfunction generateSortParam(\n\tsort: { id: string; desc: boolean } | undefined,\n): string {\n\tif (sort) {\n\t\tif (sort.desc) {\n\t\t\treturn `-${sort.id}`;\n\t\t} else {\n\t\t\treturn `+${sort.id}`;\n\t\t}\n\t} else {\n\t\treturn \"-createdAt\";\n\t}\n}\n"],"names":["createTableFetchFn","ctxclient","path","params","pagination","sorting","searching","ab","generateSortParam","pathParams","merge","value","sort"],"mappings":";AAoBO,SAASA,EACfC,GACAC,GAEAC,GACuB;AACvB,SAAO,OAAOC,GAAYC,GAASC,MAAc;AAChD,UAAMC,IAAyB;AAAA,MAC9B,QAAQ;AAAA,QACP,OAAO;AAAA,UACN,MAAMH,EAAW,YAAY;AAAA,UAC7B,OAAOA,EAAW;AAAA,UAClB,MAAMI,EAAkBH,EAAQ,CAAC,CAAC;AAAA,UAClC,OAAOC;AAAA,QAAA;AAAA,MACR;AAAA,IACD,GAGKG,IAAaC,EAAMH,GAAIJ,CAAM;AAEnC,WAAOF,EAAU,IAAIC,GAAMO,CAAU,EAAE,KAAK,CAACE,OAIrC,EAAE,OAHQ,OAAO;AAAA,MACvBA,EAAM,SAAS,QAAQ,IAAI,kBAAkB,KAAK;AAAA,IAAA,GAEzB,MAAMA,EAAM,KAAA,EACtC;AAAA,EAAA;AAEH;AAEA,SAASH,EACRI,GACS;AACT,SAAIA,IACCA,EAAK,OACD,IAAIA,EAAK,EAAE,KAEX,IAAIA,EAAK,EAAE,KAGZ;AAET;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"date.es.js","sources":["../../../../lib/components/data-table/table-utils/date.ts"],"sourcesContent":["export function FormatDate(date: string | null | undefined) {\n\tif (!date) return null;\n\tconst _date = new Date(date);\n\treturn new Intl.DateTimeFormat(undefined, {\n\t\tdateStyle: \"medium\",\n\t\ttimeStyle: \"short\",\n\t}).format(_date);\n}\n"],"names":["FormatDate","date","_date"],"mappings":"AAAO,SAASA,EAAWC,GAAiC;AAC3D,MAAI,CAACA,EAAM,QAAO;AAClB,QAAMC,IAAQ,IAAI,KAAKD,CAAI;AAC3B,SAAO,IAAI,KAAK,eAAe,QAAW;AAAA,IACzC,WAAW;AAAA,IACX,WAAW;AAAA,EAAA,CACX,EAAE,OAAOC,CAAK;AAChB;"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
function a(e) {
|
|
2
|
-
return e.replace(/([A-Z])/g, " $1").trim().split(" ").map((t) => t.charAt(0).toUpperCase() + t.slice(1).toLowerCase()).join(" ");
|
|
3
|
-
}
|
|
4
|
-
function n(e, t) {
|
|
5
|
-
return t > 1 ? /y$/.test(e) ? e === "Day" ? "Days" : e.replace(/y$/, "ies") : e.concat("s") : e;
|
|
6
|
-
}
|
|
7
|
-
function c(e) {
|
|
8
|
-
if (e) {
|
|
9
|
-
const t = e.replace(/([A-Z])/g, " $1");
|
|
10
|
-
return t.charAt(0).toUpperCase().concat(t.slice(1)).replace(/\.[a-z]/, (r) => r.replace(".", " ").toUpperCase());
|
|
11
|
-
}
|
|
12
|
-
return e;
|
|
13
|
-
}
|
|
14
|
-
export {
|
|
15
|
-
c as convertCamelCaseToTitleCase,
|
|
16
|
-
a as convertToTitleCase,
|
|
17
|
-
n as pluralizeTimes
|
|
18
|
-
};
|
|
19
|
-
//# sourceMappingURL=string.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"string.es.js","sources":["../../../../lib/components/data-table/table-utils/string.ts"],"sourcesContent":["/**\n *\n * @param input camelCase\n * @returns title case for the camelCase string\n */\nexport function convertToTitleCase(input: string): string {\n\treturn input\n\t\t.replace(/([A-Z])/g, \" $1\") // Insert space before capital letters\n\t\t.trim() // Remove any leading/trailing spaces\n\t\t.split(\" \") // Split into words\n\t\t.map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()) // Capitalize each word\n\t\t.join(\" \"); // Join back into a single string\n}\nexport function pluralizeTimes(resourceName: string, count: number) {\n\tif (count > 1) {\n\t\tif (/y$/.test(resourceName)) {\n\t\t\tif (resourceName === \"Day\") return \"Days\";\n\t\t\treturn resourceName.replace(/y$/, \"ies\");\n\t\t}\n\t\treturn resourceName.concat(\"s\");\n\t}\n\treturn resourceName;\n}\n\n/**\n * Converts a string from 'camelCase' to 'Title Case'\n * @param string String to convert to `Title Case`\n */\nexport function convertCamelCaseToTitleCase(string: string) {\n\tif (string) {\n\t\tconst spacedString = string.replace(/([A-Z])/g, \" $1\");\n\t\treturn spacedString\n\t\t\t.charAt(0)\n\t\t\t.toUpperCase()\n\t\t\t.concat(spacedString.slice(1))\n\t\t\t.replace(/\\.[a-z]/, (substr: string) => {\n\t\t\t\treturn substr.replace(\".\", \" \").toUpperCase();\n\t\t\t});\n\t}\n\treturn string;\n}\n"],"names":["convertToTitleCase","input","word","pluralizeTimes","resourceName","count","convertCamelCaseToTitleCase","string","spacedString","substr"],"mappings":"AAKO,SAASA,EAAmBC,GAAuB;AACzD,SAAOA,EACL,QAAQ,YAAY,KAAK,EACzB,KAAA,EACA,MAAM,GAAG,EACT,IAAI,CAACC,MAASA,EAAK,OAAO,CAAC,EAAE,YAAA,IAAgBA,EAAK,MAAM,CAAC,EAAE,YAAA,CAAa,EACxE,KAAK,GAAG;AACX;AACO,SAASC,EAAeC,GAAsBC,GAAe;AACnE,SAAIA,IAAQ,IACP,KAAK,KAAKD,CAAY,IACrBA,MAAiB,QAAc,SAC5BA,EAAa,QAAQ,MAAM,KAAK,IAEjCA,EAAa,OAAO,GAAG,IAExBA;AACR;AAMO,SAASE,EAA4BC,GAAgB;AAC3D,MAAIA,GAAQ;AACX,UAAMC,IAAeD,EAAO,QAAQ,YAAY,KAAK;AACrD,WAAOC,EACL,OAAO,CAAC,EACR,cACA,OAAOA,EAAa,MAAM,CAAC,CAAC,EAC5B,QAAQ,WAAW,CAACC,MACbA,EAAO,QAAQ,KAAK,GAAG,EAAE,YAAA,CAChC;AAAA,EAAA;AAEH,SAAOF;AACR;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.es.js","sources":["../../../../lib/components/data-table/table-utils/types.ts"],"sourcesContent":["import type { Button } from \"@/components/ui\";\nimport type { components } from \"@cryptlex/web-api-types\";\nimport type { PaginationState, SortingState } from \"@tanstack/react-table\";\n// export type RoutePath = RoutePaths<typeof routeTree>;\nexport type fieldsToDisplay = {\n\tdisplay: string;\n\taccessor: string;\n};\n[];\nexport enum DYNAMIC_INPUT_TARGET {\n\tUSER = 0,\n\tORGANIZATION = 1,\n\tRESELLER = 2,\n}\nexport type VisibilityState<T> = {\n\t[K in keyof T]?: boolean;\n};\n\nexport type TableActions = Required<Pick<React.ComponentProps<typeof Button>, 'onClick' | 'children' | 'variant' | 'id' | 'icon'>>[]\n\nexport type MetadataDto = components[\"schemas\"][\"MetadataDto\"];\n\nexport type TableFetchFn<TData> = (\n\tp: PaginationState,\n\ts: SortingState,\n\tq: string,\n\t// f: any,\n) => Promise<{\n\ttotal: number;\n\tdata: TData[] | undefined;\n}>;\n/*** Type for hide some of the columns based on the dto of the particular page\n ** `id`, `updatedAt` are by default hidden\n */\nexport type DefaultVisibilityState<T> = {\n\t[K in keyof T]?: boolean;\n};\n"],"names":["DYNAMIC_INPUT_TARGET"],"mappings":"AASO,IAAKA,sBAAAA,OACXA,EAAAA,EAAA,OAAO,CAAA,IAAP,QACAA,EAAAA,EAAA,eAAe,CAAA,IAAf,gBACAA,EAAAA,EAAA,WAAW,CAAA,IAAX,YAHWA,IAAAA,KAAA,CAAA,CAAA;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":["../../lib/utils/index.ts"],"sourcesContent":["import { clsx, type ClassValue } from \"clsx\";\n\n/** Classnames */\nexport function cn(...inputs: ClassValue[]) {\n\treturn clsx(inputs);\n}\n\n/**\n * This is the variable name representing the primary hue.\n * Referenced in tokens.scss -> token.css\n */\nconst PRIMARY_HUE_PROPERTY = \"--primary-hue\";\n\n/**\n *\n * @returns\n */\nexport function getThemeHue() {\n\treturn document.documentElement.style.getPropertyValue(PRIMARY_HUE_PROPERTY);\n}\n\n/**\n * @param hue the hue value to set in the document style\n */\nexport function setThemeHue(hue: number) {\n\tdocument.documentElement.style.setProperty(\n\t\tPRIMARY_HUE_PROPERTY,\n\t\t// In this case, it must be a number.\n\t\thue as unknown as string,\n\t);\n}\n\nconst ACCESS_TOKEN = \"AT\";\nconst REFRESH_TOKEN = \"RT\";\nexport function logout() {\n\tif (typeof window !== \"undefined\" && window.localStorage) {\n\t\ttry {\n\t\t\tlocalStorage.removeItem(REFRESH_TOKEN);\n\t\t\tlocalStorage.removeItem(ACCESS_TOKEN);\n\t\t\twindow.location.replace(\"/auth/login\");\n\t\t} catch (error) {\n\t\t\tconsole.error(\"Logout failed:\", error);\n\t\t}\n\t}\n}\n"],"names":["cn","inputs","clsx","PRIMARY_HUE_PROPERTY","getThemeHue","setThemeHue","hue","ACCESS_TOKEN","REFRESH_TOKEN","logout","error"],"mappings":";AAGO,SAASA,KAAMC,GAAsB;AAC3C,SAAOC,EAAKD,CAAM;AACnB;AAMA,MAAME,IAAuB;AAMtB,SAASC,IAAc;AAC7B,SAAO,SAAS,gBAAgB,MAAM,iBAAiBD,CAAoB;AAC5E;AAKO,SAASE,EAAYC,GAAa;AACxC,WAAS,gBAAgB,MAAM;AAAA,IAC9BH;AAAA;AAAA,IAEAG;AAAA,EAAA;AAEF;AAEA,MAAMC,IAAe,MACfC,IAAgB;AACf,SAASC,IAAS;AACxB,MAAI,OAAO,SAAW,OAAe,OAAO;AAC3C,QAAI;AACH,mBAAa,WAAWD,CAAa,GACrC,aAAa,WAAWD,CAAY,GACpC,OAAO,SAAS,QAAQ,aAAa;AAAA,IAAA,SAC7BG,GAAO;AACf,cAAQ,MAAM,kBAAkBA,CAAK;AAAA,IAAA;AAGxC;"}
|
|
File without changes
|