@neo4j-ndl/react 4.18.1 → 4.18.3

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.
Files changed (57) hide show
  1. package/lib/cjs/_generated/style-rules/index.js +10 -1
  2. package/lib/cjs/_generated/style-rules/index.js.map +1 -1
  3. package/lib/cjs/_generated/style-rules/literal-schemas.js +16 -1
  4. package/lib/cjs/_generated/style-rules/literal-schemas.js.map +1 -1
  5. package/lib/cjs/_generated/style-rules/numeric-utils.js +163 -0
  6. package/lib/cjs/_generated/style-rules/numeric-utils.js.map +1 -0
  7. package/lib/cjs/breadcrumbs/Breadcrumbs.js +1 -1
  8. package/lib/cjs/breadcrumbs/Breadcrumbs.js.map +1 -1
  9. package/lib/cjs/breadcrumbs/stories/breadcrumbs-header.story.js +1 -1
  10. package/lib/cjs/breadcrumbs/stories/breadcrumbs-header.story.js.map +1 -1
  11. package/lib/cjs/data-grid/stories/datagrid-rule-based-styling.story.js +40 -1
  12. package/lib/cjs/data-grid/stories/datagrid-rule-based-styling.story.js.map +1 -1
  13. package/lib/cjs/data-grid/style-rules/evaluate.js +56 -22
  14. package/lib/cjs/data-grid/style-rules/evaluate.js.map +1 -1
  15. package/lib/cjs/data-grid/style-rules/index.js +3 -1
  16. package/lib/cjs/data-grid/style-rules/index.js.map +1 -1
  17. package/lib/cjs/data-grid/style-rules/types.js +10 -6
  18. package/lib/cjs/data-grid/style-rules/types.js.map +1 -1
  19. package/lib/cjs/date-picker/DatePicker.js +46 -2
  20. package/lib/cjs/date-picker/DatePicker.js.map +1 -1
  21. package/lib/esm/_generated/style-rules/index.js +2 -1
  22. package/lib/esm/_generated/style-rules/index.js.map +1 -1
  23. package/lib/esm/_generated/style-rules/literal-schemas.js +15 -0
  24. package/lib/esm/_generated/style-rules/literal-schemas.js.map +1 -1
  25. package/lib/esm/_generated/style-rules/numeric-utils.js +155 -0
  26. package/lib/esm/_generated/style-rules/numeric-utils.js.map +1 -0
  27. package/lib/esm/breadcrumbs/Breadcrumbs.js +1 -1
  28. package/lib/esm/breadcrumbs/Breadcrumbs.js.map +1 -1
  29. package/lib/esm/breadcrumbs/stories/breadcrumbs-header.story.js +2 -2
  30. package/lib/esm/breadcrumbs/stories/breadcrumbs-header.story.js.map +1 -1
  31. package/lib/esm/data-grid/stories/datagrid-rule-based-styling.story.js +40 -1
  32. package/lib/esm/data-grid/stories/datagrid-rule-based-styling.story.js.map +1 -1
  33. package/lib/esm/data-grid/style-rules/evaluate.js +57 -23
  34. package/lib/esm/data-grid/style-rules/evaluate.js.map +1 -1
  35. package/lib/esm/data-grid/style-rules/index.js +1 -1
  36. package/lib/esm/data-grid/style-rules/index.js.map +1 -1
  37. package/lib/esm/data-grid/style-rules/types.js +10 -6
  38. package/lib/esm/data-grid/style-rules/types.js.map +1 -1
  39. package/lib/esm/date-picker/DatePicker.js +46 -2
  40. package/lib/esm/date-picker/DatePicker.js.map +1 -1
  41. package/lib/types/_generated/style-rules/index.d.ts +4 -2
  42. package/lib/types/_generated/style-rules/index.d.ts.map +1 -1
  43. package/lib/types/_generated/style-rules/literal-schemas.d.ts +13 -0
  44. package/lib/types/_generated/style-rules/literal-schemas.d.ts.map +1 -1
  45. package/lib/types/_generated/style-rules/numeric-utils.d.ts +45 -0
  46. package/lib/types/_generated/style-rules/numeric-utils.d.ts.map +1 -0
  47. package/lib/types/breadcrumbs/Breadcrumbs.d.ts.map +1 -1
  48. package/lib/types/data-grid/stories/datagrid-rule-based-styling.story.d.ts.map +1 -1
  49. package/lib/types/data-grid/style-rules/evaluate.d.ts.map +1 -1
  50. package/lib/types/data-grid/style-rules/index.d.ts +2 -2
  51. package/lib/types/data-grid/style-rules/index.d.ts.map +1 -1
  52. package/lib/types/data-grid/style-rules/types.d.ts +66 -21
  53. package/lib/types/data-grid/style-rules/types.d.ts.map +1 -1
  54. package/lib/types/date-picker/DatePicker.d.ts.map +1 -1
  55. package/package.json +2 -2
  56. package/skills/ndl-react/components/data-grid.md +48 -3
  57. package/skills/ndl-react/components/date-picker.md +54 -0
@@ -1 +1 @@
1
- {"version":3,"file":"DatePicker.js","sourceRoot":"","sources":["../../../src/date-picker/DatePicker.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iCAAiC;AACjC,yDAAyD;AAEzD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAiB,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,eAEN,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,oBAAoB,EAAE,MAAM,mDAAmD,CAAC;AACzF,OAAO,EAAE,qBAAqB,EAAE,MAAM,oDAAoD,CAAC;AAC3F,OAAO,EAAE,uBAAuB,EAAE,MAAM,sDAAsD,CAAC;AAC/F,OAAO,EAAE,sBAAsB,EAAE,MAAM,qDAAqD,CAAC;AAC7F,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,UAAU,EAAwB,MAAM,gBAAgB,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAU5D,2EAA2E;AAC3E,6EAA6E;AAC7E,8DAA8D;AAC9D,MAAM,0BAA0B,GAAG,CAAC,EAOF,EAAE,EAAE;QAPF,EAClC,cAAc,EAC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c,EAAE,QAAQ,EAAE;wBACjD,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,WAAW,CACjC,mCAAmC,EACnC,GAAG,eAAe,IAAI,CACvB,CAAC;wBACF,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,EAAE;4BACrC,QAAQ,EAAE,GAAG,cAAc,IAAI;yBAChC,CAAC,CAAC;oBACL,CAAC;oBACD,QAAQ,EAAE,gBAAgB;oBAC1B,OAAO,EAAE,CAAC;iBACX,CAAC;gBACF,GAAG,CAAC,MAAA,oBAAoB,CAAC,eAAe,mCAAI,EAAE,CAAC;aAChD,EACD,WAAW,kBACT,QAAQ,EAAE,cAAc,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,IAC5C,oBAAoB,CAAC,WAAW,KAErC,IACE,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// TODO: try to fix as some point\n/* eslint-disable @typescript-eslint/naming-convention */\n\n/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport { type Boundary, shift, size } from '@floating-ui/react';\nimport classNames from 'classnames';\nimport { format } from 'date-fns';\nimport { useCallback, useRef, useState } from 'react';\nimport ReactDatePicker, {\n type ReactDatePickerCustomHeaderProps,\n} from 'react-datepicker';\n\nimport type { CommonProps, HtmlAttributes } from '../_common/types';\nimport { CleanIconButton } from '../clean-icon-button';\nimport { useIsInsideDialog } from '../dialog/dialog-context';\nimport { Divider } from '../divider';\nimport { ArrowLeftIconOutline } from '../icons/generated/heroIcons/ArrowLeftIconOutline';\nimport { ArrowRightIconOutline } from '../icons/generated/heroIcons/ArrowRightIconOutline';\nimport { CalendarDaysIconOutline } from '../icons/generated/heroIcons/CalendarDaysIconOutline';\nimport { ChevronDownIconOutline } from '../icons/generated/heroIcons/ChevronDownIconOutline';\nimport { TextInput } from '../text-input';\nimport { NeedleTime, TimePicker, type TimePickerProps } from '../time-picker';\nimport { TimeZonePicker } from '../timezone-picker';\nimport { Typography } from '../typography';\nimport { daysInMonth, getYearsPeriodString } from './utils';\n\ntype DatePickerTextInputWrapperProps = React.ComponentProps<'input'> & {\n textInputProps?: React.ComponentProps<typeof TextInput>;\n isDisabled?: boolean;\n isClearable?: boolean;\n value?: string;\n ariaLabel?: string;\n};\n\n// This wrapper is needed due to react-datepicker injecting html attributes\n// into the custom input component on root level, since we use htmlAttributes\n// we need to help spread them there instead of the root level\nconst DatePickerTextInputWrapper = ({\n textInputProps,\n isDisabled,\n isClearable,\n value,\n placeholder,\n ...restProps\n}: DatePickerTextInputWrapperProps) => {\n // deconstruct textInputProps to avoid bugs with react-datepicker injecting props\n const {\n placeholder: textInputPlaceholder,\n htmlAttributes: textInputHtmlAttributes,\n onChange: textInputOnChange,\n ref,\n ...restTextInputProps\n } = textInputProps ?? {};\n const { onChange: injectedOnChange, ...restInjectedProps } = restProps;\n\n const handleChange: React.ChangeEventHandler<HTMLInputElement> = (event) => {\n injectedOnChange?.(event);\n textInputOnChange?.(event);\n };\n\n return (\n <TextInput\n ref={ref}\n trailingElement={<CalendarDaysIconOutline />}\n value={value}\n placeholder={placeholder ?? textInputPlaceholder}\n isDisabled={isDisabled}\n isClearable={isClearable}\n onChange={handleChange}\n // react-datepicker injects html attributes into the custom input\n htmlAttributes={{\n ...textInputHtmlAttributes,\n ...restInjectedProps,\n }}\n {...restTextInputProps}\n />\n );\n};\n\n/**\n *\n *\n * Types\n *\n *\n */\n\ntype PickerType = 'day' | 'month' | 'year';\n\n// Define a more flexible type for onChange\ntype DatePickerChangeHandler = (\n date: Date | null | [Date | null, Date | null] | Date[],\n event?: React.SyntheticEvent | undefined,\n) => void;\n\n/**\n * @remarks\n * The `reactDatePickerProps` prop is forwarded to the underlying `react-datepicker` component. See the [react-datepicker documentation](https://reactdatepicker.com/) for more information.\n *\n * @remarks\n * Where `TextInputProps` is defined in the `TextInput` component and `TimePickerProps` is defined in the `TimePicker` component.\n */\ninterface DatePickerProps {\n /** Props for the embedded `TextInput` component. */\n textInputProps?: React.ComponentProps<typeof TextInput>;\n /** Whether the date picker is disabled. */\n isDisabled?: boolean;\n /**\n * Whether to show the clear button.\n * @default false\n */\n isClearable?: boolean;\n /** Props for the embedded `TimePicker` component. */\n timePickerProps?: TimePickerProps;\n /** Props for the embedded `TimeZonePicker` component. */\n timeZonePickerProps?: React.ComponentProps<typeof TimeZonePicker>;\n /** Props forwarded to underlying `react-datepicker` component. */\n reactDatePickerProps: React.ComponentProps<typeof ReactDatePicker>;\n /**\n * WARNING: these attributes do not apply to the underlying input element currently. This will be fixed in a future version.\n */\n htmlAttributes?: HtmlAttributes<'div'>;\n}\n\nexport const DatePicker = ({\n reactDatePickerProps,\n textInputProps,\n timePickerProps,\n timeZonePickerProps,\n isDisabled,\n isClearable = false,\n ref,\n className,\n style,\n htmlAttributes,\n ...restProps\n}: CommonProps<'div', DatePickerProps>) => {\n const classes = classNames(`ndl-datepicker`, className, {});\n const datetimeRef = useRef<ReactDatePicker>(null);\n const [picker, setPicker] = useState<PickerType>('day');\n const [preSelectedDate, setPreSelectedDate] = useState<Date | null>(\n (reactDatePickerProps.selected as Date | null) ||\n (reactDatePickerProps.startDate as Date | null),\n );\n const [selectedTimeZone, setSelectedTimeZone] = useState<string | undefined>(\n timeZonePickerProps?.value,\n );\n\n const isInsideDialog = useIsInsideDialog();\n\n // Inside a Dialog the popper is fixed and not portaled. A transformed\n // ancestor (e.g. Popover) can make Floating UI under-measure available\n // space, so use the viewport as the boundary instead.\n const floatingBoundary: Boundary = isInsideDialog ? [] : 'clippingAncestors';\n\n const headerAction = useCallback(\n (action: PickerType) => {\n setPicker(picker === action ? 'day' : action);\n },\n [picker],\n );\n\n const CustomHeader = useCallback(\n (props: ReactDatePickerCustomHeaderProps) => {\n const {\n decreaseMonth,\n increaseMonth,\n increaseYear,\n decreaseYear,\n nextMonthButtonDisabled,\n nextYearButtonDisabled,\n prevMonthButtonDisabled,\n prevYearButtonDisabled,\n } = props;\n\n const prevCallback = picker === 'year' ? decreaseYear : decreaseMonth;\n const nextCallback = picker === 'year' ? increaseYear : increaseMonth;\n const prevDisabled =\n picker === 'year' ? prevYearButtonDisabled : prevMonthButtonDisabled;\n const nextDisabled =\n picker === 'year' ? nextYearButtonDisabled : nextMonthButtonDisabled;\n\n return (\n <div className=\"ndl-datepicker-header\">\n <div className=\"ndl-datepicker-selects\">\n {picker !== 'year' && (\n <button\n type=\"button\"\n aria-label={`${picker === 'month' ? 'Close' : 'Open'} month picker`}\n aria-pressed={picker === 'month'}\n onClick={() => headerAction('month')}\n >\n <div className=\"n-flex n-items-center n-gap-token-4\">\n <Typography variant=\"subheading-small\">\n {format(props.date, 'MMM')}\n </Typography>\n <ChevronDownIconOutline\n className={classNames('ndl-datepicker-chevron', {\n 'n-rotate-180': picker === 'month',\n })}\n aria-label=\"Chevron icon\"\n />\n </div>\n </button>\n )}\n {picker !== 'month' && (\n <button\n type=\"button\"\n aria-label={`${picker === 'year' ? 'Close' : 'Open'} year picker`}\n onClick={() => headerAction('year')}\n >\n <div className=\"n-flex n-items-center n-gap-token-4\">\n <Typography variant=\"subheading-small\">\n {picker === 'year'\n ? getYearsPeriodString(\n props.date,\n reactDatePickerProps?.yearItemNumber,\n )\n : format(props.date, 'yyyy')}\n </Typography>\n <ChevronDownIconOutline\n className={classNames('ndl-datepicker-chevron', {\n 'n-rotate-180': picker === 'year',\n })}\n aria-label=\"Chevron icon\"\n />\n </div>\n </button>\n )}\n </div>\n {picker !== 'month' && (\n <div className=\"n-flex n-justify-center n-gap-token-16\">\n <CleanIconButton\n description={\n picker === 'year' ? 'Previous period' : 'Previous month'\n }\n onClick={prevCallback}\n isDisabled={prevDisabled}\n className=\"n-text-neutral-text-weak\"\n size=\"small\"\n >\n <ArrowLeftIconOutline />\n </CleanIconButton>\n <CleanIconButton\n description={picker === 'year' ? 'Next period' : 'Next month'}\n onClick={nextCallback}\n isDisabled={nextDisabled}\n className=\"n-text-neutral-text-weak\"\n size=\"small\"\n >\n <ArrowRightIconOutline />\n </CleanIconButton>\n </div>\n )}\n </div>\n );\n },\n [picker, headerAction, reactDatePickerProps?.yearItemNumber],\n );\n\n const handleTimeChange = (newTime: NeedleTime) => {\n if (\n reactDatePickerProps.selectsRange ||\n reactDatePickerProps.selectsMultiple\n ) {\n // this is consistent with the behavior of react-datepicker\n return;\n }\n\n if (!preSelectedDate) {\n return;\n }\n\n const newDate = new Date(preSelectedDate);\n newDate.setHours(newTime.hour, newTime.minute, 0, 0);\n setPreSelectedDate(newDate);\n\n if (reactDatePickerProps.onChange) {\n // For single date selection\n reactDatePickerProps.onChange(newDate, undefined);\n }\n };\n\n const handleTimeZoneChange = (timezone: string) => {\n setSelectedTimeZone(timezone);\n if (timeZonePickerProps?.onChange) {\n timeZonePickerProps.onChange(timezone);\n }\n };\n\n /**\n * Intercept onChange so we can work with\n * Month and Year pickers\n */\n const interceptedChange: DatePickerChangeHandler = useCallback(\n (\n date: Date | null | [Date | null, Date | null] | Date[],\n event?: React.SyntheticEvent,\n ) => {\n if (picker !== 'day') {\n // setTimeout to prevent picker change before the handleMonthChange logic\n setTimeout(() => {\n setPicker('day');\n });\n } else if (picker === 'day') {\n if (date instanceof Date) {\n setPreSelectedDate(date);\n } else if (\n Array.isArray(date) &&\n date.length > 0 &&\n date[0] instanceof Date\n ) {\n setPreSelectedDate(date[0]);\n } else if (date === null) {\n setPreSelectedDate(null);\n }\n\n if (reactDatePickerProps.onChange && date !== null) {\n (reactDatePickerProps.onChange as DatePickerChangeHandler)(\n date,\n event,\n );\n }\n }\n },\n [picker, reactDatePickerProps],\n );\n\n /**\n * Intercept onCalendarClose so we can\n * switch to \"day\" picker if we close on \"month\" or \"year\"\n * view\n */\n const interceptedOnCalendarClose = useCallback(() => {\n if (picker !== 'day') {\n setPicker('day');\n }\n reactDatePickerProps?.onCalendarClose?.();\n }, [picker, reactDatePickerProps]);\n\n const handleMonthChange = useCallback(\n (date: Date) => {\n if (picker === 'month') {\n const selectedDay = preSelectedDate?.getDate() ?? 1;\n const daysInNewMonth = daysInMonth(date.getMonth(), date.getFullYear());\n date.setDate(Math.min(selectedDay, daysInNewMonth));\n reactDatePickerProps?.onMonthChange?.(date);\n } else if (picker === 'year') {\n const selectedDay = preSelectedDate?.getDate() ?? 1;\n const selectedMonth = preSelectedDate?.getMonth() ?? 0;\n const daysInNewMonth = daysInMonth(selectedMonth, date.getFullYear());\n date.setMonth(selectedMonth, Math.min(selectedDay, daysInNewMonth));\n reactDatePickerProps?.onMonthChange?.(date);\n }\n setPreSelectedDate(date);\n },\n [picker, preSelectedDate, reactDatePickerProps],\n );\n\n /**\n * Intercept onChangeRaw to handle clearing the input\n * When the user clears the text input, set the date to null\n */\n const interceptedOnChangeRaw = useCallback(\n (\n event?:\n | React.KeyboardEvent<HTMLElement>\n | React.MouseEvent<HTMLElement, MouseEvent>,\n ) => {\n const target = event?.target as HTMLInputElement | undefined;\n if (target?.value === '') {\n setPreSelectedDate(null);\n if (reactDatePickerProps.onChange) {\n (reactDatePickerProps.onChange as DatePickerChangeHandler)(\n null,\n event,\n );\n }\n }\n reactDatePickerProps?.onChangeRaw?.(event);\n },\n [reactDatePickerProps],\n );\n\n const datePickerProps = {\n ...reactDatePickerProps,\n onCalendarClose: interceptedOnCalendarClose,\n onChange: interceptedChange,\n onChangeRaw: interceptedOnChangeRaw,\n onMonthChange: handleMonthChange,\n };\n\n return (\n <div\n className={classes}\n ref={ref}\n style={style}\n {...restProps}\n {...htmlAttributes}\n >\n {/** TODO v5: Remove the div wrapper, type the component as an input, and apply all root props to the TextInput */}\n <ReactDatePicker\n ref={datetimeRef}\n customInput={\n <DatePickerTextInputWrapper\n isDisabled={isDisabled}\n isClearable={isClearable}\n textInputProps={textInputProps}\n />\n }\n customTimeInput={\n <span className=\"ndl-time-picker-wrapper\">\n <Divider />\n <TimePicker\n isFluid\n value={\n preSelectedDate\n ? new NeedleTime(\n preSelectedDate.getHours(),\n preSelectedDate.getMinutes(),\n )\n : undefined\n }\n onChange={handleTimeChange}\n {...timePickerProps}\n floatingStrategy=\"absolute\"\n isPortaled={false}\n />\n {timeZonePickerProps && (\n <TimeZonePicker\n isFluid\n value={selectedTimeZone}\n onChange={handleTimeZoneChange}\n referenceDate={preSelectedDate || undefined}\n {...timeZonePickerProps}\n floatingStrategy=\"absolute\"\n isPortaled={false}\n />\n )}\n </span>\n }\n disabled={isDisabled}\n showPopperArrow={false}\n showMonthYearPicker={picker === 'month'}\n showYearPicker={picker === 'year'}\n shouldCloseOnSelect={\n picker === 'day' && !(reactDatePickerProps.showTimeInput ?? false)\n }\n dayClassName={() => 'ndl-datepicker-day'}\n renderCustomHeader={CustomHeader}\n {...datePickerProps}\n isClearable={isClearable}\n popperClassName={classNames(\n 'ndl-datepicker-popper',\n reactDatePickerProps.popperClassName,\n )}\n popperModifiers={[\n shift({ boundary: floatingBoundary, padding: 8 }),\n size({\n apply({ availableHeight, availableWidth, elements }) {\n elements.floating.style.setProperty(\n '--ndl-datepicker-available-height',\n `${availableHeight}px`,\n );\n Object.assign(elements.floating.style, {\n maxWidth: `${availableWidth}px`,\n });\n },\n boundary: floatingBoundary,\n padding: 8,\n }),\n ...(reactDatePickerProps.popperModifiers ?? []),\n ]}\n popperProps={{\n strategy: isInsideDialog ? 'fixed' : 'absolute',\n ...reactDatePickerProps.popperProps,\n }}\n />\n </div>\n );\n};\n"]}
1
+ {"version":3,"file":"DatePicker.js","sourceRoot":"","sources":["../../../src/date-picker/DatePicker.tsx"],"names":[],"mappings":";;;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AAE;gBACf,KAAK,CAAC,EAAE,QAAQ,EAAE,gBAAgB,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;gBACjD,IAAI,CAAC;oBACH,KAAK,CAAC,EAAE,eAAe,EAAE,cAAc,EAAE,QAAQ,EAAE;wBACjD,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,WAAW,CACjC,mCAAmC,EACnC,GAAG,eAAe,IAAI,CACvB,CAAC;wBACF,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,EAAE;4BACrC,QAAQ,EAAE,GAAG,cAAc,IAAI;yBAChC,CAAC,CAAC;oBACL,CAAC;oBACD,QAAQ,EAAE,gBAAgB;oBAC1B,OAAO,EAAE,CAAC;iBACX,CAAC;gBACF,GAAG,CAAC,MAAA,oBAAoB,CAAC,eAAe,mCAAI,EAAE,CAAC;aAChD,EACD,WAAW,kBACT,QAAQ,EAAE,cAAc,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,IAC5C,oBAAoB,CAAC,WAAW,KAErC,IACE,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// TODO: try to fix as some point\n/* eslint-disable @typescript-eslint/naming-convention */\n\n/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport { type Boundary, shift, size } from '@floating-ui/react';\nimport classNames from 'classnames';\nimport { format } from 'date-fns';\nimport { useCallback, useRef, useState } from 'react';\nimport ReactDatePicker, {\n type ReactDatePickerCustomHeaderProps,\n} from 'react-datepicker';\n\nimport type { CommonProps, HtmlAttributes } from '../_common/types';\nimport { CleanIconButton } from '../clean-icon-button';\nimport { useIsInsideDialog } from '../dialog/dialog-context';\nimport { Divider } from '../divider';\nimport { ArrowLeftIconOutline } from '../icons/generated/heroIcons/ArrowLeftIconOutline';\nimport { ArrowRightIconOutline } from '../icons/generated/heroIcons/ArrowRightIconOutline';\nimport { CalendarDaysIconOutline } from '../icons/generated/heroIcons/CalendarDaysIconOutline';\nimport { ChevronDownIconOutline } from '../icons/generated/heroIcons/ChevronDownIconOutline';\nimport { TextInput } from '../text-input';\nimport { NeedleTime, TimePicker, type TimePickerProps } from '../time-picker';\nimport { TimeZonePicker } from '../timezone-picker';\nimport { Typography } from '../typography';\nimport { daysInMonth, getYearsPeriodString } from './utils';\n\ntype DatePickerTextInputWrapperProps = React.ComponentProps<'input'> & {\n textInputProps?: React.ComponentProps<typeof TextInput>;\n isDisabled?: boolean;\n isClearable?: boolean;\n value?: string;\n ariaLabel?: string;\n};\n\n// This wrapper is needed due to react-datepicker injecting html attributes\n// into the custom input component on root level, since we use htmlAttributes\n// we need to help spread them there instead of the root level\nconst DatePickerTextInputWrapper = ({\n textInputProps,\n isDisabled,\n isClearable,\n value,\n placeholder,\n ...restProps\n}: DatePickerTextInputWrapperProps) => {\n // deconstruct textInputProps to avoid bugs with react-datepicker injecting props\n const {\n placeholder: textInputPlaceholder,\n htmlAttributes: textInputHtmlAttributes,\n onChange: textInputOnChange,\n ref,\n ...restTextInputProps\n } = textInputProps ?? {};\n const { onChange: injectedOnChange, ...restInjectedProps } = restProps;\n\n const handleChange: React.ChangeEventHandler<HTMLInputElement> = (event) => {\n injectedOnChange?.(event);\n textInputOnChange?.(event);\n };\n\n return (\n <TextInput\n ref={ref}\n trailingElement={<CalendarDaysIconOutline />}\n value={value}\n placeholder={placeholder ?? textInputPlaceholder}\n isDisabled={isDisabled}\n isClearable={isClearable}\n onChange={handleChange}\n // react-datepicker injects html attributes into the custom input\n htmlAttributes={{\n ...textInputHtmlAttributes,\n ...restInjectedProps,\n }}\n {...restTextInputProps}\n />\n );\n};\n\n/**\n *\n *\n * Types\n *\n *\n */\n\ntype PickerType = 'day' | 'month' | 'year';\n\n// Define a more flexible type for onChange\ntype DatePickerChangeHandler = (\n date: Date | null | [Date | null, Date | null] | Date[],\n event?: React.SyntheticEvent | undefined,\n) => void;\n\n/**\n * @remarks\n * The `reactDatePickerProps` prop is forwarded to the underlying `react-datepicker` component. See the [react-datepicker documentation](https://reactdatepicker.com/) for more information.\n *\n * @remarks\n * Where `TextInputProps` is defined in the `TextInput` component and `TimePickerProps` is defined in the `TimePicker` component.\n */\ninterface DatePickerProps {\n /** Props for the embedded `TextInput` component. */\n textInputProps?: React.ComponentProps<typeof TextInput>;\n /** Whether the date picker is disabled. */\n isDisabled?: boolean;\n /**\n * Whether to show the clear button.\n * @default false\n */\n isClearable?: boolean;\n /** Props for the embedded `TimePicker` component. */\n timePickerProps?: TimePickerProps;\n /** Props for the embedded `TimeZonePicker` component. */\n timeZonePickerProps?: React.ComponentProps<typeof TimeZonePicker>;\n /** Props forwarded to underlying `react-datepicker` component. */\n reactDatePickerProps: React.ComponentProps<typeof ReactDatePicker>;\n /**\n * WARNING: these attributes do not apply to the underlying input element currently. This will be fixed in a future version.\n */\n htmlAttributes?: HtmlAttributes<'div'>;\n}\n\nexport const DatePicker = ({\n reactDatePickerProps,\n textInputProps,\n timePickerProps,\n timeZonePickerProps,\n isDisabled,\n isClearable = false,\n ref,\n className,\n style,\n htmlAttributes,\n ...restProps\n}: CommonProps<'div', DatePickerProps>) => {\n const classes = classNames(`ndl-datepicker`, className, {});\n const datetimeRef = useRef<ReactDatePicker>(null);\n const shouldRestoreFocusAfterEscapeRef = useRef(false);\n const [picker, setPicker] = useState<PickerType>('day');\n const [preSelectedDate, setPreSelectedDate] = useState<Date | null>(\n (reactDatePickerProps.selected as Date | null) ||\n (reactDatePickerProps.startDate as Date | null),\n );\n const [selectedTimeZone, setSelectedTimeZone] = useState<string | undefined>(\n timeZonePickerProps?.value,\n );\n\n const isInsideDialog = useIsInsideDialog();\n\n // Inside a Dialog the popper is fixed and not portaled. A transformed\n // ancestor (e.g. Popover) can make Floating UI under-measure available\n // space, so use the viewport as the boundary instead.\n const floatingBoundary: Boundary = isInsideDialog ? [] : 'clippingAncestors';\n\n const headerAction = useCallback(\n (action: PickerType) => {\n setPicker(picker === action ? 'day' : action);\n },\n [picker],\n );\n\n const CustomHeader = useCallback(\n (props: ReactDatePickerCustomHeaderProps) => {\n const {\n decreaseMonth,\n increaseMonth,\n increaseYear,\n decreaseYear,\n nextMonthButtonDisabled,\n nextYearButtonDisabled,\n prevMonthButtonDisabled,\n prevYearButtonDisabled,\n } = props;\n\n const prevCallback = picker === 'year' ? decreaseYear : decreaseMonth;\n const nextCallback = picker === 'year' ? increaseYear : increaseMonth;\n const prevDisabled =\n picker === 'year' ? prevYearButtonDisabled : prevMonthButtonDisabled;\n const nextDisabled =\n picker === 'year' ? nextYearButtonDisabled : nextMonthButtonDisabled;\n\n return (\n <div className=\"ndl-datepicker-header\">\n <div className=\"ndl-datepicker-selects\">\n {picker !== 'year' && (\n <button\n type=\"button\"\n aria-label={`${picker === 'month' ? 'Close' : 'Open'} month picker`}\n aria-pressed={picker === 'month'}\n onClick={() => headerAction('month')}\n >\n <div className=\"n-flex n-items-center n-gap-token-4\">\n <Typography variant=\"subheading-small\">\n {format(props.date, 'MMM')}\n </Typography>\n <ChevronDownIconOutline\n className={classNames('ndl-datepicker-chevron', {\n 'n-rotate-180': picker === 'month',\n })}\n aria-label=\"Chevron icon\"\n />\n </div>\n </button>\n )}\n {picker !== 'month' && (\n <button\n type=\"button\"\n aria-label={`${picker === 'year' ? 'Close' : 'Open'} year picker`}\n onClick={() => headerAction('year')}\n >\n <div className=\"n-flex n-items-center n-gap-token-4\">\n <Typography variant=\"subheading-small\">\n {picker === 'year'\n ? getYearsPeriodString(\n props.date,\n reactDatePickerProps?.yearItemNumber,\n )\n : format(props.date, 'yyyy')}\n </Typography>\n <ChevronDownIconOutline\n className={classNames('ndl-datepicker-chevron', {\n 'n-rotate-180': picker === 'year',\n })}\n aria-label=\"Chevron icon\"\n />\n </div>\n </button>\n )}\n </div>\n {picker !== 'month' && (\n <div className=\"n-flex n-justify-center n-gap-token-16\">\n <CleanIconButton\n description={\n picker === 'year' ? 'Previous period' : 'Previous month'\n }\n onClick={prevCallback}\n isDisabled={prevDisabled}\n className=\"n-text-neutral-text-weak\"\n size=\"small\"\n >\n <ArrowLeftIconOutline />\n </CleanIconButton>\n <CleanIconButton\n description={picker === 'year' ? 'Next period' : 'Next month'}\n onClick={nextCallback}\n isDisabled={nextDisabled}\n className=\"n-text-neutral-text-weak\"\n size=\"small\"\n >\n <ArrowRightIconOutline />\n </CleanIconButton>\n </div>\n )}\n </div>\n );\n },\n [picker, headerAction, reactDatePickerProps?.yearItemNumber],\n );\n\n const handleTimeChange = (newTime: NeedleTime) => {\n if (\n reactDatePickerProps.selectsRange ||\n reactDatePickerProps.selectsMultiple\n ) {\n // this is consistent with the behavior of react-datepicker\n return;\n }\n\n if (!preSelectedDate) {\n return;\n }\n\n const newDate = new Date(preSelectedDate);\n newDate.setHours(newTime.hour, newTime.minute, 0, 0);\n setPreSelectedDate(newDate);\n\n if (reactDatePickerProps.onChange) {\n // For single date selection\n reactDatePickerProps.onChange(newDate, undefined);\n }\n };\n\n const handleTimeZoneChange = (timezone: string) => {\n setSelectedTimeZone(timezone);\n if (timeZonePickerProps?.onChange) {\n timeZonePickerProps.onChange(timezone);\n }\n };\n\n /**\n * Intercept onChange so we can work with\n * Month and Year pickers\n */\n const interceptedChange: DatePickerChangeHandler = useCallback(\n (\n date: Date | null | [Date | null, Date | null] | Date[],\n event?: React.SyntheticEvent,\n ) => {\n if (picker !== 'day') {\n // setTimeout to prevent picker change before the handleMonthChange logic\n setTimeout(() => {\n setPicker('day');\n });\n } else if (picker === 'day') {\n if (date instanceof Date) {\n setPreSelectedDate(date);\n } else if (\n Array.isArray(date) &&\n date.length > 0 &&\n date[0] instanceof Date\n ) {\n setPreSelectedDate(date[0]);\n } else if (date === null) {\n setPreSelectedDate(null);\n }\n\n if (reactDatePickerProps.onChange && date !== null) {\n (reactDatePickerProps.onChange as DatePickerChangeHandler)(\n date,\n event,\n );\n }\n }\n },\n [picker, reactDatePickerProps],\n );\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {\n // react-datepicker prevents Escape when it closes the calendar, but\n // otherwise lets the event bubble and dismiss ancestor overlays.\n if (event.key === 'Escape' && event.defaultPrevented) {\n shouldRestoreFocusAfterEscapeRef.current = true;\n event.stopPropagation();\n }\n htmlAttributes?.onKeyDown?.(event);\n };\n\n /** These intercepts are needed for webkit to ensure that focus is restored to the input when the calendar is closed. */\n const interceptedOnBlur = useCallback(\n (event: React.FocusEvent<HTMLElement>) => {\n reactDatePickerProps.onBlur?.(event);\n\n if (\n !shouldRestoreFocusAfterEscapeRef.current ||\n event.relatedTarget !== null\n ) {\n return;\n }\n\n const input = event.currentTarget;\n queueMicrotask(() => {\n if (\n shouldRestoreFocusAfterEscapeRef.current &&\n input.isConnected &&\n document.activeElement === document.body\n ) {\n datetimeRef.current?.sendFocusBackToInput();\n }\n shouldRestoreFocusAfterEscapeRef.current = false;\n });\n },\n [reactDatePickerProps],\n );\n\n const interceptedOnFocus = useCallback(\n (event: React.FocusEvent<HTMLElement>) => {\n reactDatePickerProps.onFocus?.(event);\n\n if (!shouldRestoreFocusAfterEscapeRef.current) {\n return;\n }\n\n // react-datepicker schedules both focus and blur while closing. If blur\n // ran first, focus is now stable and the Escape marker can be cleared.\n requestAnimationFrame(() => {\n shouldRestoreFocusAfterEscapeRef.current = false;\n });\n },\n [reactDatePickerProps],\n );\n\n /**\n * Intercept onCalendarClose so we can\n * switch to \"day\" picker if we close on \"month\" or \"year\"\n * view\n */\n const interceptedOnCalendarClose = useCallback(() => {\n if (picker !== 'day') {\n setPicker('day');\n }\n reactDatePickerProps?.onCalendarClose?.();\n }, [picker, reactDatePickerProps]);\n\n const handleMonthChange = useCallback(\n (date: Date) => {\n if (picker === 'month') {\n const selectedDay = preSelectedDate?.getDate() ?? 1;\n const daysInNewMonth = daysInMonth(date.getMonth(), date.getFullYear());\n date.setDate(Math.min(selectedDay, daysInNewMonth));\n reactDatePickerProps?.onMonthChange?.(date);\n } else if (picker === 'year') {\n const selectedDay = preSelectedDate?.getDate() ?? 1;\n const selectedMonth = preSelectedDate?.getMonth() ?? 0;\n const daysInNewMonth = daysInMonth(selectedMonth, date.getFullYear());\n date.setMonth(selectedMonth, Math.min(selectedDay, daysInNewMonth));\n reactDatePickerProps?.onMonthChange?.(date);\n }\n setPreSelectedDate(date);\n },\n [picker, preSelectedDate, reactDatePickerProps],\n );\n\n /**\n * Intercept onChangeRaw to handle clearing the input\n * When the user clears the text input, set the date to null\n */\n const interceptedOnChangeRaw = useCallback(\n (\n event?:\n | React.KeyboardEvent<HTMLElement>\n | React.MouseEvent<HTMLElement, MouseEvent>,\n ) => {\n const target = event?.target as HTMLInputElement | undefined;\n if (target?.value === '') {\n setPreSelectedDate(null);\n if (reactDatePickerProps.onChange) {\n (reactDatePickerProps.onChange as DatePickerChangeHandler)(\n null,\n event,\n );\n }\n }\n reactDatePickerProps?.onChangeRaw?.(event);\n },\n [reactDatePickerProps],\n );\n\n const datePickerProps = {\n ...reactDatePickerProps,\n onBlur: interceptedOnBlur,\n onCalendarClose: interceptedOnCalendarClose,\n onChange: interceptedChange,\n onChangeRaw: interceptedOnChangeRaw,\n onFocus: interceptedOnFocus,\n onMonthChange: handleMonthChange,\n };\n\n return (\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions -- the key handlers only stop Escape from propagating, they add no interaction\n <div\n className={classes}\n ref={ref}\n style={style}\n {...restProps}\n {...htmlAttributes}\n onKeyDown={handleKeyDown}\n >\n {/** TODO v5: Remove the div wrapper, type the component as an input, and apply all root props to the TextInput */}\n <ReactDatePicker\n ref={datetimeRef}\n customInput={\n <DatePickerTextInputWrapper\n isDisabled={isDisabled}\n isClearable={isClearable}\n textInputProps={textInputProps}\n />\n }\n customTimeInput={\n <span className=\"ndl-time-picker-wrapper\">\n <Divider />\n <TimePicker\n isFluid\n value={\n preSelectedDate\n ? new NeedleTime(\n preSelectedDate.getHours(),\n preSelectedDate.getMinutes(),\n )\n : undefined\n }\n onChange={handleTimeChange}\n {...timePickerProps}\n floatingStrategy=\"absolute\"\n isPortaled={false}\n />\n {timeZonePickerProps && (\n <TimeZonePicker\n isFluid\n value={selectedTimeZone}\n onChange={handleTimeZoneChange}\n referenceDate={preSelectedDate || undefined}\n {...timeZonePickerProps}\n floatingStrategy=\"absolute\"\n isPortaled={false}\n />\n )}\n </span>\n }\n disabled={isDisabled}\n showPopperArrow={false}\n showMonthYearPicker={picker === 'month'}\n showYearPicker={picker === 'year'}\n shouldCloseOnSelect={\n picker === 'day' && !(reactDatePickerProps.showTimeInput ?? false)\n }\n dayClassName={() => 'ndl-datepicker-day'}\n renderCustomHeader={CustomHeader}\n {...datePickerProps}\n isClearable={isClearable}\n popperClassName={classNames(\n 'ndl-datepicker-popper',\n reactDatePickerProps.popperClassName,\n )}\n popperModifiers={[\n shift({ boundary: floatingBoundary, padding: 8 }),\n size({\n apply({ availableHeight, availableWidth, elements }) {\n elements.floating.style.setProperty(\n '--ndl-datepicker-available-height',\n `${availableHeight}px`,\n );\n Object.assign(elements.floating.style, {\n maxWidth: `${availableWidth}px`,\n });\n },\n boundary: floatingBoundary,\n padding: 8,\n }),\n ...(reactDatePickerProps.popperModifiers ?? []),\n ]}\n popperProps={{\n strategy: isInsideDialog ? 'fixed' : 'absolute',\n ...reactDatePickerProps.popperProps,\n }}\n />\n </div>\n );\n};\n"]}
@@ -20,6 +20,8 @@
20
20
  */
21
21
  export { getWeight, lerpColor } from './color-utils';
22
22
  export { parseDateString, parseLocalDateString, parseTimeString, } from './date-utils';
23
- export { DatetimeLiteralSchema, LocalDatetimeLiteralSchema, TimeLiteralSchema, } from './literal-schemas';
24
- export type { DatetimeLiteral, LocalDatetimeLiteral, TimeLiteral, } from './literal-schemas';
23
+ export { BigintLiteralSchema, DatetimeLiteralSchema, LocalDatetimeLiteralSchema, NumericLiteralSchema, TimeLiteralSchema, } from './literal-schemas';
24
+ export type { BigintLiteral, DatetimeLiteral, LocalDatetimeLiteral, NumericLiteral, TimeLiteral, } from './literal-schemas';
25
+ export { clampNumericValue, compareNumericValues, getNumericWeight, isBigintLiteral, numericValuesEqual, resolveNumericLiteral, } from './numeric-utils';
26
+ export type { NumericValue } from './numeric-utils';
25
27
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/_generated/style-rules/index.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,eAAe,GAChB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,qBAAqB,EACrB,0BAA0B,EAC1B,iBAAiB,GAClB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EACV,eAAe,EACf,oBAAoB,EACpB,WAAW,GACZ,MAAM,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/_generated/style-rules/index.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,eAAe,GAChB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,0BAA0B,EAC1B,oBAAoB,EACpB,iBAAiB,GAClB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EACV,aAAa,EACb,eAAe,EACf,oBAAoB,EACpB,cAAc,EACd,WAAW,GACZ,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC"}
@@ -19,6 +19,19 @@
19
19
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20
20
  */
21
21
  import { z } from 'zod';
22
+ /**
23
+ * A JSON-safe bigint literal. Native bigint values cannot be serialized as
24
+ * JSON, so persisted style rules can use a signed decimal string instead.
25
+ */
26
+ export declare const BigintLiteralSchema: z.ZodObject<{
27
+ bigint: z.ZodString;
28
+ }, z.core.$strip>;
29
+ export type BigintLiteral = z.infer<typeof BigintLiteralSchema>;
30
+ /** A numeric style-rule literal, including native and JSON-safe bigints. */
31
+ export declare const NumericLiteralSchema: z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
32
+ bigint: z.ZodString;
33
+ }, z.core.$strip>]>;
34
+ export type NumericLiteral = z.infer<typeof NumericLiteralSchema>;
22
35
  /**
23
36
  * An ISO 8601 or RFC 9557 datetime literal that resolves to a Unix millisecond
24
37
  * timestamp at evaluation time. Supported formats:
@@ -1 +1 @@
1
- {"version":3,"file":"literal-schemas.d.ts","sourceRoot":"","sources":["../../../../src/_generated/style-rules/literal-schemas.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB;;;;;;;;;GASG;AACH,eAAO,MAAM,qBAAqB;;iBAKhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,0BAA0B;;iBAKrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,iBAAiB;;iBAK5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
1
+ {"version":3,"file":"literal-schemas.d.ts","sourceRoot":"","sources":["../../../../src/_generated/style-rules/literal-schemas.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB;;;GAGG;AACH,eAAO,MAAM,mBAAmB;;iBAI9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,4EAA4E;AAC5E,eAAO,MAAM,oBAAoB;;mBAI/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE;;;;;;;;;GASG;AACH,eAAO,MAAM,qBAAqB;;iBAKhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,0BAA0B;;iBAKrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,iBAAiB;;iBAK5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ *
3
+ * Copyright (c) "Neo4j"
4
+ * Neo4j Sweden AB [http://neo4j.com]
5
+ *
6
+ * This file is part of Neo4j.
7
+ *
8
+ * Neo4j is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
20
+ */
21
+ import type { BigintLiteral, NumericLiteral } from './literal-schemas';
22
+ export type NumericValue = number | bigint;
23
+ /** Resolves a native or JSON-safe numeric literal without reducing bigints. */
24
+ export declare function resolveNumericLiteral(value: NumericLiteral): NumericValue;
25
+ /** Returns whether a value is the JSON-safe bigint literal shape. */
26
+ export declare function isBigintLiteral(value: unknown): value is BigintLiteral;
27
+ /**
28
+ * Compares numeric values without coercing bigint operands to number.
29
+ * Returns null for NaN, otherwise -1, 0, or 1.
30
+ */
31
+ export declare function compareNumericValues(left: NumericValue, right: NumericValue): -1 | 0 | 1 | null;
32
+ /** Numeric equality that treats equivalent number and bigint values as equal. */
33
+ export declare function numericValuesEqual(left: NumericValue, right: NumericValue): boolean;
34
+ /**
35
+ * Clamps a numeric value between two endpoints. Inverted endpoints are
36
+ * supported, and the original number/bigint representation is retained.
37
+ */
38
+ export declare function clampNumericValue(value: NumericValue, firstBound: NumericValue, secondBound: NumericValue): NumericValue | null;
39
+ /**
40
+ * Computes `(value - startValue) / (endValue - startValue)` while retaining
41
+ * bigint precision. Only the final dimensionless interpolation weight is
42
+ * converted to number.
43
+ */
44
+ export declare function getNumericWeight(startValue: NumericValue, endValue: NumericValue, value: NumericValue): number | null;
45
+ //# sourceMappingURL=numeric-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"numeric-utils.d.ts","sourceRoot":"","sources":["../../../../src/_generated/style-rules/numeric-utils.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;GAmBG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A9Qd,WAAW,CAAC,KAAK,EAAE,gBAAgB,CAAC;aAyGZ,CAAC,SAAS,KAAK,CAAC,WAAW,qHAUnD,sBAAsB,CAAC,CAAC,EAAE,sBAAsB,CAAC;8EAnEjD,WAAW,CAAC,IAAI,EAAE,oBAAoB,CAAC;WA0LjB,CAAC,SAAS,KAAK,CAAC,WAAW,4FASjD,sBAAsB,CAAC,CAAC,EAAE,oBAAoB,CAAC;oHA9C/C,WAAW,CAAC,QAAQ,EAAE,4BAA4B,CAAC;CA8EpD,CAAC;AAEH,OAAO,EAAE,WAAW,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"datagrid-rule-based-styling.story.d.ts","sourceRoot":"","sources":["../../../../src/data-grid/stories/datagrid-rule-based-styling.story.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AA0EjD,QAAA,MAAM,SAAS,+CAyDd,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"datagrid-rule-based-styling.story.d.ts","sourceRoot":"","sources":["../../../../src/data-grid/stories/datagrid-rule-based-styling.story.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAiHjD,QAAA,MAAM,SAAS,+CA+Dd,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"evaluate.d.ts","sourceRoot":"","sources":["../../../../src/data-grid/style-rules/evaluate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAWH,OAAO,EAKL,KAAK,iBAAiB,EAGtB,KAAK,gCAAgC,EAGtC,MAAM,SAAS,CAAC;AA0VjB,MAAM,MAAM,sBAAsB,GAAG;IACnC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,aAAa,GAAG,SAAS,CAAC,CAAC;CAC7D,CAAC;AAKF;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,iBAAiB,EAAE,EAC1B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,UAAU,CAAC,EAAE,gCAAgC,GAC5C,sBAAsB,CAsExB;AAED;;;;;;;;GAQG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,iBAAiB,EAAE,EAC1B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,QAAQ,EAAE,MAAM,EAChB,UAAU,CAAC,EAAE,gCAAgC,GAC5C,KAAK,CAAC,aAAa,GAAG,SAAS,CAGjC"}
1
+ {"version":3,"file":"evaluate.d.ts","sourceRoot":"","sources":["../../../../src/data-grid/style-rules/evaluate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAiBH,OAAO,EAKL,KAAK,iBAAiB,EAGtB,KAAK,gCAAgC,EAGtC,MAAM,SAAS,CAAC;AAgZjB,MAAM,MAAM,sBAAsB,GAAG;IACnC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,aAAa,GAAG,SAAS,CAAC,CAAC;CAC7D,CAAC;AAKF;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,iBAAiB,EAAE,EAC1B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,UAAU,CAAC,EAAE,gCAAgC,GAC5C,sBAAsB,CAsExB;AAED;;;;;;;;GAQG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,iBAAiB,EAAE,EAC1B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,QAAQ,EAAE,MAAM,EAChB,UAAU,CAAC,EAAE,gCAAgC,GAC5C,KAAK,CAAC,aAAa,GAAG,SAAS,CAGjC"}
@@ -21,6 +21,6 @@
21
21
  export { evaluateDataGridStyleRules } from './evaluate';
22
22
  export { useDataGridCellStyle } from './hooks';
23
23
  export { isDataGridStyleRule } from './types';
24
- export { DataGridCellStyleSchema, DataGridColorRangeSchema, DataGridColumnRefSchema, DataGridDatetimeLiteralSchema, DataGridDisableableColorSchema, DataGridStyleRuleLiteralSchema, DataGridStyleRuleOperandSchema, DataGridStyleRuleSchema, DataGridStyleRuleWhereSchema, DataGridTimeLiteralSchema, DataGridLocalDatetimeLiteralSchema, } from './types';
25
- export type { DataGridCellStyle, DataGridColorRange, DataGridColumnRef, DataGridDatetimeLiteral, DataGridDisableableColor, DataGridStyleRuleLiteral, DataGridStyleRuleOperand, DataGridStyleRule, DataGridStyleRuleWhere, DataGridStyleRuleValueConverter, DataGridStyleRuleValueConverters, DataGridTimeLiteral, DataGridLocalDatetimeLiteral, } from './types';
24
+ export { DataGridBigintLiteralSchema, DataGridCellStyleSchema, DataGridColorRangeSchema, DataGridColumnRefSchema, DataGridDatetimeLiteralSchema, DataGridDisableableColorSchema, DataGridStyleRuleLiteralSchema, DataGridStyleRuleOperandSchema, DataGridStyleRuleSchema, DataGridStyleRuleWhereSchema, DataGridTimeLiteralSchema, DataGridLocalDatetimeLiteralSchema, DataGridNumericLiteralSchema, } from './types';
25
+ export type { DataGridBigintLiteral, DataGridCellStyle, DataGridColorRange, DataGridColumnRef, DataGridDatetimeLiteral, DataGridDisableableColor, DataGridStyleRuleLiteral, DataGridStyleRuleOperand, DataGridStyleRule, DataGridStyleRuleWhere, DataGridStyleRuleValueConverter, DataGridStyleRuleValueConverters, DataGridTimeLiteral, DataGridLocalDatetimeLiteral, DataGridNumericLiteral, } from './types';
26
26
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/data-grid/style-rules/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAE9C,OAAO,EACL,uBAAuB,EACvB,wBAAwB,EACxB,uBAAuB,EACvB,6BAA6B,EAC7B,8BAA8B,EAC9B,8BAA8B,EAC9B,8BAA8B,EAC9B,uBAAuB,EACvB,4BAA4B,EAC5B,yBAAyB,EACzB,kCAAkC,GACnC,MAAM,SAAS,CAAC;AACjB,YAAY,EACV,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,uBAAuB,EACvB,wBAAwB,EACxB,wBAAwB,EACxB,wBAAwB,EACxB,iBAAiB,EACjB,sBAAsB,EACtB,+BAA+B,EAC/B,gCAAgC,EAChC,mBAAmB,EACnB,4BAA4B,GAC7B,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/data-grid/style-rules/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAE9C,OAAO,EACL,2BAA2B,EAC3B,uBAAuB,EACvB,wBAAwB,EACxB,uBAAuB,EACvB,6BAA6B,EAC7B,8BAA8B,EAC9B,8BAA8B,EAC9B,8BAA8B,EAC9B,uBAAuB,EACvB,4BAA4B,EAC5B,yBAAyB,EACzB,kCAAkC,EAClC,4BAA4B,GAC7B,MAAM,SAAS,CAAC;AACjB,YAAY,EACV,qBAAqB,EACrB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,uBAAuB,EACvB,wBAAwB,EACxB,wBAAwB,EACxB,wBAAwB,EACxB,iBAAiB,EACjB,sBAAsB,EACtB,+BAA+B,EAC/B,gCAAgC,EAChC,mBAAmB,EACnB,4BAA4B,EAC5B,sBAAsB,GACvB,MAAM,SAAS,CAAC"}
@@ -19,9 +19,21 @@
19
19
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20
20
  */
21
21
  import { z } from 'zod';
22
- /** A scalar literal that can appear as an operand in a style-rule where clause. */
23
- export declare const DataGridStyleRuleLiteralSchema: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
22
+ /** A literal that can appear as an operand in a style-rule where clause. */
23
+ export declare const DataGridStyleRuleLiteralSchema: z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
24
+ bigint: z.ZodString;
25
+ }, z.core.$strip>]>, z.ZodBoolean, z.ZodNull]>;
24
26
  export type DataGridStyleRuleLiteral = z.infer<typeof DataGridStyleRuleLiteralSchema>;
27
+ /** A JSON-safe bigint literal represented by a signed decimal string. */
28
+ export declare const DataGridBigintLiteralSchema: z.ZodObject<{
29
+ bigint: z.ZodString;
30
+ }, z.core.$strip>;
31
+ export type DataGridBigintLiteral = z.infer<typeof DataGridBigintLiteralSchema>;
32
+ /** A number, native bigint, or JSON-safe bigint literal. */
33
+ export declare const DataGridNumericLiteralSchema: z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
34
+ bigint: z.ZodString;
35
+ }, z.core.$strip>]>;
36
+ export type DataGridNumericLiteral = z.infer<typeof DataGridNumericLiteralSchema>;
25
37
  /** A reference to a column whose cell value is resolved at evaluation time. */
26
38
  export declare const DataGridColumnRefSchema: z.ZodObject<{
27
39
  column: z.ZodString;
@@ -79,7 +91,9 @@ export declare const DataGridStyleRuleOperandSchema: z.ZodUnion<readonly [z.ZodO
79
91
  localdatetime: z.ZodString;
80
92
  }, z.core.$strip>, z.ZodObject<{
81
93
  time: z.ZodString;
82
- }, z.core.$strip>, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>]>;
94
+ }, z.core.$strip>, z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
95
+ bigint: z.ZodString;
96
+ }, z.core.$strip>]>, z.ZodBoolean, z.ZodNull]>]>;
83
97
  export type DataGridStyleRuleOperand = DataGridColumnRef | DataGridDatetimeLiteral | DataGridLocalDatetimeLiteral | DataGridTimeLiteral | DataGridStyleRuleLiteral;
84
98
  /**
85
99
  * Recursive WHERE clause for conditional expressions.
@@ -122,11 +136,17 @@ export declare const DataGridStyleRuleWhereSchema: z.ZodType<DataGridStyleRuleWh
122
136
  export declare const DataGridColorRangeSchema: z.ZodObject<{
123
137
  isDisabled: z.ZodOptional<z.ZodBoolean>;
124
138
  maxColor: z.ZodString;
125
- maxValue: z.ZodNumber;
139
+ maxValue: z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
140
+ bigint: z.ZodString;
141
+ }, z.core.$strip>]>;
126
142
  midColor: z.ZodOptional<z.ZodString>;
127
- midValue: z.ZodOptional<z.ZodNumber>;
143
+ midValue: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
144
+ bigint: z.ZodString;
145
+ }, z.core.$strip>]>>;
128
146
  minColor: z.ZodString;
129
- minValue: z.ZodNumber;
147
+ minValue: z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
148
+ bigint: z.ZodString;
149
+ }, z.core.$strip>]>;
130
150
  onColumn: z.ZodString;
131
151
  }, z.core.$strip>;
132
152
  export type DataGridColorRange = z.infer<typeof DataGridColorRangeSchema>;
@@ -145,11 +165,17 @@ export declare const DataGridCellStyleSchema: z.ZodObject<{
145
165
  colorRange: z.ZodOptional<z.ZodObject<{
146
166
  isDisabled: z.ZodOptional<z.ZodBoolean>;
147
167
  maxColor: z.ZodString;
148
- maxValue: z.ZodNumber;
168
+ maxValue: z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
169
+ bigint: z.ZodString;
170
+ }, z.core.$strip>]>;
149
171
  midColor: z.ZodOptional<z.ZodString>;
150
- midValue: z.ZodOptional<z.ZodNumber>;
172
+ midValue: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
173
+ bigint: z.ZodString;
174
+ }, z.core.$strip>]>>;
151
175
  minColor: z.ZodString;
152
- minValue: z.ZodNumber;
176
+ minValue: z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
177
+ bigint: z.ZodString;
178
+ }, z.core.$strip>]>;
153
179
  onColumn: z.ZodString;
154
180
  }, z.core.$strip>>;
155
181
  textColor: z.ZodOptional<z.ZodObject<{
@@ -159,11 +185,17 @@ export declare const DataGridCellStyleSchema: z.ZodObject<{
159
185
  textColorRange: z.ZodOptional<z.ZodObject<{
160
186
  isDisabled: z.ZodOptional<z.ZodBoolean>;
161
187
  maxColor: z.ZodString;
162
- maxValue: z.ZodNumber;
188
+ maxValue: z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
189
+ bigint: z.ZodString;
190
+ }, z.core.$strip>]>;
163
191
  midColor: z.ZodOptional<z.ZodString>;
164
- midValue: z.ZodOptional<z.ZodNumber>;
192
+ midValue: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
193
+ bigint: z.ZodString;
194
+ }, z.core.$strip>]>>;
165
195
  minColor: z.ZodString;
166
- minValue: z.ZodNumber;
196
+ minValue: z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
197
+ bigint: z.ZodString;
198
+ }, z.core.$strip>]>;
167
199
  onColumn: z.ZodString;
168
200
  }, z.core.$strip>>;
169
201
  }, z.core.$strip>;
@@ -174,13 +206,14 @@ export type DataGridCellStyle = z.infer<typeof DataGridCellStyleSchema>;
174
206
  * and color-range interpolation.
175
207
  *
176
208
  * The function receives the raw cell value (`unknown`) and must return a scalar
177
- * (`string | number | boolean | null`). Return `null` to signal that the value
178
- * is missing or cannot be represented.
209
+ * (`string | number | bigint | { bigint: string } | boolean | null`). Return
210
+ * `null` or `undefined` to signal that the value is missing or cannot be
211
+ * represented.
179
212
  *
180
213
  * Note: converter functions are TypeScript-only — they cannot be serialized as
181
214
  * JSON, so no Zod schema is provided.
182
215
  */
183
- export type DataGridStyleRuleValueConverter = (value: unknown) => DataGridStyleRuleLiteral;
216
+ export type DataGridStyleRuleValueConverter = (value: unknown) => DataGridStyleRuleLiteral | undefined;
184
217
  /**
185
218
  * A map of column id → converter function.
186
219
  * Pass this as the `styleRuleValueConverters` prop on `DataGrid` to teach the
@@ -207,11 +240,17 @@ export declare const DataGridStyleRuleSchema: z.ZodObject<{
207
240
  colorRange: z.ZodOptional<z.ZodObject<{
208
241
  isDisabled: z.ZodOptional<z.ZodBoolean>;
209
242
  maxColor: z.ZodString;
210
- maxValue: z.ZodNumber;
243
+ maxValue: z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
244
+ bigint: z.ZodString;
245
+ }, z.core.$strip>]>;
211
246
  midColor: z.ZodOptional<z.ZodString>;
212
- midValue: z.ZodOptional<z.ZodNumber>;
247
+ midValue: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
248
+ bigint: z.ZodString;
249
+ }, z.core.$strip>]>>;
213
250
  minColor: z.ZodString;
214
- minValue: z.ZodNumber;
251
+ minValue: z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
252
+ bigint: z.ZodString;
253
+ }, z.core.$strip>]>;
215
254
  onColumn: z.ZodString;
216
255
  }, z.core.$strip>>;
217
256
  textColor: z.ZodOptional<z.ZodObject<{
@@ -221,11 +260,17 @@ export declare const DataGridStyleRuleSchema: z.ZodObject<{
221
260
  textColorRange: z.ZodOptional<z.ZodObject<{
222
261
  isDisabled: z.ZodOptional<z.ZodBoolean>;
223
262
  maxColor: z.ZodString;
224
- maxValue: z.ZodNumber;
263
+ maxValue: z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
264
+ bigint: z.ZodString;
265
+ }, z.core.$strip>]>;
225
266
  midColor: z.ZodOptional<z.ZodString>;
226
- midValue: z.ZodOptional<z.ZodNumber>;
267
+ midValue: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
268
+ bigint: z.ZodString;
269
+ }, z.core.$strip>]>>;
227
270
  minColor: z.ZodString;
228
- minValue: z.ZodNumber;
271
+ minValue: z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
272
+ bigint: z.ZodString;
273
+ }, z.core.$strip>]>;
229
274
  onColumn: z.ZodString;
230
275
  }, z.core.$strip>>;
231
276
  }, z.core.$strip>;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/data-grid/style-rules/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAaxB,mFAAmF;AACnF,eAAO,MAAM,8BAA8B,0EAKzC,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAC5C,OAAO,8BAA8B,CACtC,CAAC;AAEF,+EAA+E;AAC/E,eAAO,MAAM,uBAAuB;;iBAAmC,CAAC;AACxE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,6BAA6B;;iBAAwB,CAAC;AACnE,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,6BAA6B,CACrC,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,kCAAkC;;iBAA6B,CAAC;AAC7E,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAChD,OAAO,kCAAkC,CAC1C,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB;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CAAC,OAAO,eAAe,CAAC,CAAC;IACnE;;OAEG;IACH,cAAc,CAAC,EAAE,cAAc,CAAC,KAAK,CAAC,CAAC;CACxC;AAED,eAAO,MAAM,UAAU,GAAI,8JAYxB,WAAW,CAAC,KAAK,EAAE,eAAe,CAAC,4CAwVrC,CAAC"}
1
+ {"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../../src/date-picker/DatePicker.tsx"],"names":[],"mappings":"AA2BA,OAAO,eAEN,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAQpE,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAA0B,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAyEpD;;;;;;GAMG;AACH,UAAU,eAAe;IACvB,oDAAoD;IACpD,cAAc,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,CAAC;IACxD,2CAA2C;IAC3C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,qDAAqD;IACrD,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,yDAAyD;IACzD,mBAAmB,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,CAAC;IAClE,kEAAkE;IAClE,oBAAoB,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,CAAC;IACnE;;OAEG;IACH,cAAc,CAAC,EAAE,cAAc,CAAC,KAAK,CAAC,CAAC;CACxC;AAED,eAAO,MAAM,UAAU,GAAI,8JAYxB,WAAW,CAAC,KAAK,EAAE,eAAe,CAAC,4CAmZrC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neo4j-ndl/react",
3
- "version": "4.18.1",
3
+ "version": "4.18.3",
4
4
  "sideEffects": false,
5
5
  "description": "React implementation of Neo4j Design System",
6
6
  "keywords": [
@@ -399,7 +399,7 @@
399
399
  "@tanstack/react-table": "8.21.3",
400
400
  "react": ">=19.0.0",
401
401
  "react-dom": ">=19.0.0",
402
- "@neo4j-ndl/base": "^4.17.2"
402
+ "@neo4j-ndl/base": "^4.17.3"
403
403
  },
404
404
  "dependencies": {
405
405
  "@dnd-kit/core": "6.3.1",
@@ -18,7 +18,7 @@ Import: `import { DataGrid } from '@neo4j-ndl/react'`
18
18
  | `ref` | `Ref<HTMLDivElement>` | | | A ref to apply to the root element. |
19
19
  | `rootProps` | `HtmlAttributes<"div">` | | | @deprecated Use htmlAttributes, className and style on the root element instead |
20
20
  | `skeletonProps` | `(SkeletonProps & { as?: ElementType<any, keyof IntrinsicElements>; } & BaseProps<ElementType<any, keyof IntrinsicElements>>)` | | | |
21
- | `styleRules` | `{ apply: { color?: { value: string; isDisabled?: boolean; }; colorRange?: { maxColor: string; maxValue: number; minColor: string; minValue: number; onColumn: string; isDisabled?: boolean \| undefined; midColor?: string \| undefined; midValue?: number \| undefined; } \| undefined; textColor?: { .....` | | | Rule-based conditional styling for cells and rows. |
21
+ | `styleRules` | `{ apply: { color?: { value: string; isDisabled?: boolean; }; colorRange?: { maxColor: string; maxValue: number \| bigint \| { bigint: string; }; minColor: string; minValue: number \| ... 1 more ... \| { ...; }; onColumn: string; isDisabled?: boolean \| undefined; midColor?: string \| undefined; mid...` | | | Rule-based conditional styling for cells and rows. |
22
22
  | `styleRuleValueConverters` | `DataGridStyleRuleValueConverters` | | | Per-column converters that teach the style-rule engine how to interpret complex cell values. |
23
23
  | `styling` | `Partial<{ hasZebraStriping: boolean; borderStyle: "all-sides" \| "horizontal" \| "vertical" \| "none"; headerStyle: "filled" \| "clean"; hasHoverEffects: boolean; isCompact: boolean; }>` | | `{}` | |
24
24
  | `tableInstance` | `Table<T>` | ✅ | | Table instance created from `useTable` |
@@ -1708,6 +1708,14 @@ import {
1708
1708
  import { type DataGridStyleRule } from '../style-rules/types';
1709
1709
  import { TABLE_DEMO_DATA, type TestDataFormat } from './staticData';
1710
1710
 
1711
+ type BigintTestDataFormat = TestDataFormat & { preciseId: bigint };
1712
+
1713
+ const BIGINT_ID_START = BigInt('9007199254740993');
1714
+ const tableData: BigintTestDataFormat[] = TABLE_DEMO_DATA.map((row, index) => ({
1715
+ ...row,
1716
+ preciseId: BIGINT_ID_START + BigInt(index),
1717
+ }));
1718
+
1711
1719
  const styleRules: DataGridStyleRule[] = [
1712
1720
  // Row coloring: all cells styled when name contains "Alicia"
1713
1721
  {
@@ -1766,10 +1774,41 @@ const styleRules: DataGridStyleRule[] = [
1766
1774
  ],
1767
1775
  },
1768
1776
  },
1777
+ // Bigint range: adjacent values above Number.MAX_SAFE_INTEGER retain their
1778
+ // precision. Wrapped literals are JSON-safe; BigInt(...) is programmatic.
1779
+ {
1780
+ apply: {
1781
+ colorRange: {
1782
+ maxColor: '#7c3aed',
1783
+ maxValue: BIGINT_ID_START + BigInt(tableData.length - 1),
1784
+ minColor: '#ede9fe',
1785
+ minValue: { bigint: BIGINT_ID_START.toString() },
1786
+ onColumn: 'preciseId',
1787
+ },
1788
+ textColor: { value: '#111827' },
1789
+ },
1790
+ column: 'preciseId',
1791
+ priority: 1,
1792
+ },
1793
+ // Exact bigint comparison using the JSON-safe literal form.
1794
+ {
1795
+ apply: {
1796
+ color: { value: '#4c1d95' },
1797
+ textColor: { value: '#ffffff' },
1798
+ },
1799
+ column: 'preciseId',
1800
+ priority: 2,
1801
+ where: {
1802
+ equal: [
1803
+ { column: 'preciseId' },
1804
+ { bigint: (BIGINT_ID_START + BigInt(2)).toString() },
1805
+ ],
1806
+ },
1807
+ },
1769
1808
  ];
1770
1809
 
1771
1810
  const Component = () => {
1772
- const columnHelper = createColumnHelper<TestDataFormat>();
1811
+ const columnHelper = createColumnHelper<BigintTestDataFormat>();
1773
1812
 
1774
1813
  const columns = [
1775
1814
  columnHelper.accessor('name', {
@@ -1783,6 +1822,12 @@ const Component = () => {
1783
1822
  header: () => 'Age',
1784
1823
  minSize: 80,
1785
1824
  }),
1825
+ columnHelper.accessor('preciseId', {
1826
+ cell: (info) => info.getValue().toString(),
1827
+ header: () => 'Bigint ID',
1828
+ minSize: 180,
1829
+ size: 180,
1830
+ }),
1786
1831
  columnHelper.accessor('cypherCommand', {
1787
1832
  cell: (info) => info.getValue(),
1788
1833
  header: () => 'Cypher Command',
@@ -1794,7 +1839,7 @@ const Component = () => {
1794
1839
  const table = useReactTable({
1795
1840
  columnResizeMode: 'onChange',
1796
1841
  columns,
1797
- data: TABLE_DEMO_DATA,
1842
+ data: tableData,
1798
1843
  defaultColumn: {
1799
1844
  maxSize: 800,
1800
1845
  minSize: 80,