@iris-ui-kit/react 0.3.0 → 0.3.1
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/admin.cjs +6 -3
- package/dist/admin.cjs.map +1 -1
- package/dist/admin.js +1 -1
- package/dist/async.cjs +16 -7
- package/dist/async.cjs.map +1 -1
- package/dist/async.d.cts +7 -6
- package/dist/async.d.ts +7 -6
- package/dist/async.js +1 -1
- package/dist/chunk-3772LKJP.js +942 -0
- package/dist/chunk-3772LKJP.js.map +1 -0
- package/dist/{chunk-TO7YVSAI.js → chunk-3KYNBLRY.js} +18 -9
- package/dist/chunk-3KYNBLRY.js.map +1 -0
- package/dist/{chunk-KRFZ5KL4.js → chunk-TDVRIHE6.js} +8 -5
- package/dist/chunk-TDVRIHE6.js.map +1 -0
- package/dist/{chunk-QZJXMCRR.js → chunk-VLWZSOTH.js} +2 -2
- package/dist/chunk-VLWZSOTH.js.map +1 -0
- package/dist/data.cjs.map +1 -1
- package/dist/data.d.cts +2 -2
- package/dist/data.d.ts +2 -2
- package/dist/data.js +1 -1
- package/dist/grid.cjs +1007 -0
- package/dist/grid.cjs.map +1 -0
- package/dist/grid.d.cts +324 -0
- package/dist/grid.d.ts +324 -0
- package/dist/grid.js +5 -0
- package/dist/grid.js.map +1 -0
- package/dist/index.cjs +6248 -3722
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +293 -8
- package/dist/index.d.ts +293 -8
- package/dist/index.js +4803 -3241
- package/dist/index.js.map +1 -1
- package/package.json +10 -5
- package/dist/chunk-KRFZ5KL4.js.map +0 -1
- package/dist/chunk-QZJXMCRR.js.map +0 -1
- package/dist/chunk-TO7YVSAI.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/grid/useGridCore.ts","../src/grid/legacyGridOptions.ts","../src/grid/useGridFeature.ts","../src/grid/useGridColumns.ts","../src/grid/useGridClipboard.ts","../src/grid/useGridFiltering.ts","../src/grid/useGridEditing.ts","../src/grid/useGridExpansion.ts","../src/grid/useGridPagination.ts","../src/grid/useGridRange.ts","../src/grid/useGridSelection.ts","../src/grid/useGridRows.ts","../src/grid/useGridSorting.ts","../src/grid/useGridVirtual.ts"],"names":["React","core","ownership","React2","React4","React5","React6","state","React7","React8","React9","React10","React11","React12","React13"],"mappings":";;;;;;AAsBO,SAAS,WAAA,CACd,OAAA,GAAmC,EAAC,EACrB;AACf,EAAA,MAAM,OAAA,GAAgBA,cAA6B,IAAI,CAAA;AACvD,EAAA,MAAM,YAAA,GAAqBA,cAA+B,IAAI,CAAA;AAC9D,EAAA,IAAI,OAAA,CAAQ,YAAY,IAAA,EAAM;AAC5B,IAAA,MAAMC,KAAAA,GAAO,eAAe,OAAO,CAAA;AACnC,IAAA,MAAMC,UAAAA,GAA6B,EAAE,SAAA,EAAW,KAAA,EAAM;AACtD,IAAA,OAAA,CAAQ,OAAA,GAAUD,KAAAA;AAClB,IAAA,YAAA,CAAa,OAAA,GAAUC,UAAAA;AAIvB,IAAA,cAAA,CAAe,MAAM;AACnB,MAAA,IAAI,CAACA,UAAAA,CAAU,SAAA,EAAWD,MAAK,OAAA,EAAQ;AAAA,IACzC,CAAC,CAAA;AAAA,EACH;AACA,EAAA,MAAM,OAAO,OAAA,CAAQ,OAAA;AACrB,EAAA,MAAM,YAAY,YAAA,CAAa,OAAA;AAC/B,EAAA,MAAM,mBAAA,GAA4BD,cAAO,CAAC,CAAA;AAI1C,EAAMA,0BAAmB,MAAM;AAC7B,IAAA,SAAA,CAAW,SAAA,GAAY,IAAA;AAAA,EACzB,CAAA,EAAG,CAAC,IAAA,EAAM,SAAS,CAAC,CAAA;AAEpB,EAAMA,iBAAU,MAAM;AACpB,IAAA,MAAM,UAAA,GAAa,EAAE,mBAAA,CAAoB,OAAA;AACzC,IAAA,IAAA,CAAK,KAAA,EAAM;AACX,IAAA,OAAO,MAAM;AAIX,MAAA,cAAA,CAAe,MAAM;AACnB,QAAA,IAAI,m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A,EACrC,GAAG,CAAC,KAAA,EAAO,QAAQ,KAAA,EAAO,OAAA,CAAQ,UAAU,CAAC,CAAA;AAE7C,EAAA,yBAAA,CAA0B,MAAM;AAC9B,IAAA,KAAA,CAAM,SAAA,CAAU,OAAA,CAAQ,MAAA,IAAU,CAAC,CAAA;AAAA,EACrC,CAAA,EAAG,CAAC,KAAA,EAAO,OAAA,CAAQ,MAAM,CAAC,CAAA;AAE1B,EAAA,yBAAA,CAA0B,MAAM;AAC9B,IAAA,KAAA,CAAM,eAAA;AAAA,MACJ,OAAA,CAAQ,YAAA;AAAA,MACR,OAAO,OAAA,CAAQ,YAAA,KAAiB,QAAA,GAAW,QAAQ,YAAA,GAAe;AAAA,KACpE;AAAA,EACF,CAAA,EAAG,CAAC,KAAA,EAAO,OAAA,CAAQ,YAAY,CAAC,CAAA;AAEhC,EAAA,yBAAA,CAA0B,MAAM;AAC9B,IAAA,IAAI,QAAQ,YAAA,KAAiB,MAAA,EAAW,KAAA,CAAM,eAAA,CAAgB,QAAQ,YAAY,CAAA;AAAA,EACpF,CAAA,EAAG,CAAC,KAAA,EAAO,OAAA,CAAQ,YAAY,CAAC,CAAA;AAEhC,EAAA,yBAAA,CAA0B,MAAM;AAC9B,IAAA,IAAI,QAAQ,YAAA,KAAiB,MAAA,EAAW,KAAA,CAAM,SAAA,CAAU,QAAQ,YAAY,CAAA;AAAA,EAC9E,CAAA,EAAG,CAAC,KAAA,EAAO,OAAA,CAAQ,YAAY,CAAC,CAAA;AAEhC,EAAA,OAAO,EAAE,KAAA,EAAM;AACjB","file":"chunk-3772LKJP.js","sourcesContent":["import * as React from 'react'\nimport {\n createGridCore,\n type GridCore,\n type GridCoreOptions,\n type GridFeature,\n} from '@iris-ui-kit/core/grid'\n\nexport interface UseGridCoreOptions<\n Row extends Record<string, unknown>,\n> extends GridCoreOptions<Row> {\n readonly features?: readonly GridFeature<Row>[]\n}\n\ninterface RenderOwnership {\n committed: boolean\n}\n\n/**\n * React lifecycle bridge for one framework-agnostic Grid Core. Features are\n * captured on the first render; use `core.use()` for an explicit late install.\n */\nexport function useGridCore<Row extends Record<string, unknown> = Record<string, unknown>>(\n options: UseGridCoreOptions<Row> = {},\n): GridCore<Row> {\n const coreRef = React.useRef<GridCore<Row> | null>(null)\n const ownershipRef = React.useRef<RenderOwnership | null>(null)\n if (coreRef.current === null) {\n const core = createGridCore(options)\n const ownership: RenderOwnership = { committed: false }\n coreRef.current = core\n ownershipRef.current = ownership\n // A render which never commits cannot receive an effect cleanup. A\n // committed render claims this ticket in the commit phase before this\n // microtask can run, while a discarded render is deterministically closed.\n queueMicrotask(() => {\n if (!ownership.committed) core.destroy()\n })\n }\n const core = coreRef.current\n const ownership = ownershipRef.current\n const lifecycleGeneration = React.useRef(0)\n\n // Insertion effects run during commit and are a safe commit marker for the\n // render ticket. Unlike a layout effect, they are also silent in SSR.\n React.useInsertionEffect(() => {\n ownership!.committed = true\n }, [core, ownership])\n\n React.useEffect(() => {\n const generation = ++lifecycleGeneration.current\n core.ready()\n return () => {\n // React Strict Mode replays effects without discarding hook state. Delay\n // teardown by one microtask so the replay can advance the generation;\n // a real unmount has no next effect and therefore destroys the core.\n queueMicrotask(() => {\n if (lifecycleGeneration.current === generation) core.destroy()\n })\n }\n }, [core])\n\n return core\n}\n","import type {\n GridExpansionKey,\n GridPaginationChange,\n GridRowKey,\n SelectionKey,\n} from '@iris-ui-kit/core/grid'\nimport type { GridFilterColumn, UseGridFilteringOptions } from './useGridFiltering'\nimport type { UseGridColumnsOptions } from './useGridColumns'\nimport type { UseGridExpansionOptions } from './useGridExpansion'\nimport type { UseGridPaginationOptions } from './useGridPagination'\nimport type { UseGridRowsOptions } from './useGridRows'\nimport type { UseGridSelectionOptions } from './useGridSelection'\nimport type { GridSortColumn, UseGridSortingOptions } from './useGridSorting'\n\nexport interface LegacyGridRowsProps<Row extends Record<string, unknown>, Meta = unknown> {\n readonly data?: Row[]\n readonly keepSource?: boolean\n readonly rowKeyField?: string\n readonly getRowKey?: (row: Row, index: number) => GridRowKey | undefined\n readonly getChildren?: UseGridRowsOptions<Row, Meta>['getChildren']\n readonly setChildren?: UseGridRowsOptions<Row, Meta>['setChildren']\n readonly beforeChange?: UseGridRowsOptions<Row, Meta>['onBeforeRowsChange']\n readonly onChange?: UseGridRowsOptions<Row, Meta>['onRowsChange']\n}\n\nexport interface LegacyGridColumnsProps {\n readonly columnVisibility?: UseGridColumnsOptions['visibility']\n readonly onColumnVisibilityChange?: UseGridColumnsOptions['onVisibilityChange']\n readonly columnOrder?: UseGridColumnsOptions['order']\n readonly onColumnOrderChange?: UseGridColumnsOptions['onOrderChange']\n readonly columnWidths?: UseGridColumnsOptions['widths']\n readonly defaultColumnWidths?: UseGridColumnsOptions['defaultWidths']\n readonly onColumnWidthsChange?: UseGridColumnsOptions['onWidthsChange']\n readonly pinnedColumns?: UseGridColumnsOptions['pinned']\n readonly onColumnPinnedChange?: UseGridColumnsOptions['onPinnedChange']\n}\n\n/** Map the four legacy column channels into one feature boundary. */\nexport function toGridColumnsOptions(props: LegacyGridColumnsProps): UseGridColumnsOptions {\n return {\n visibility: props.columnVisibility,\n visibilityControlled: true,\n onVisibilityChange: props.onColumnVisibilityChange,\n order: props.columnOrder,\n orderControlled: true,\n onOrderChange: props.onColumnOrderChange,\n widths: props.columnWidths,\n defaultWidths: props.defaultColumnWidths,\n onWidthsChange: props.onColumnWidthsChange,\n pinned: props.pinnedColumns,\n onPinnedChange: props.onColumnPinnedChange,\n }\n}\n\nexport interface LegacyGridRowsOptions<Row extends Record<string, unknown>, Meta = unknown> {\n readonly initialRows: Row[]\n readonly options: UseGridRowsOptions<Row, Meta>\n}\n\n/** Map the legacy `data` ownership contract into the rows feature boundary. */\nexport function toGridRowsOptions<Row extends Record<string, unknown>, Meta = unknown>(\n props: LegacyGridRowsProps<Row, Meta>,\n): LegacyGridRowsOptions<Row, Meta> {\n const rows = props.data ?? []\n return {\n initialRows: props.keepSource ? [...rows] : rows,\n options: {\n ...(props.rowKeyField === undefined ? {} : { rowKeyField: props.rowKeyField }),\n ...(props.getRowKey === undefined ? {} : { getRowKey: props.getRowKey }),\n ...(props.getChildren === undefined ? {} : { getChildren: props.getChildren }),\n ...(props.setChildren === undefined ? {} : { setChildren: props.setChildren }),\n onBeforeRowsChange: props.beforeChange,\n onRowsChange: props.onChange,\n },\n }\n}\n\nexport interface LegacyGridSelectionProps<K extends SelectionKey = string> {\n readonly selectable?: 'none' | 'single' | 'multi'\n readonly selection?: K[]\n readonly defaultSelection?: K[]\n readonly onSelectionChange?: (keys: K[]) => void\n}\n\n/** `none` still uses a dormant multiple model, matching the legacy Table. */\nexport function toGridSelectionOptions<K extends SelectionKey = string>(\n props: LegacyGridSelectionProps<K>,\n): UseGridSelectionOptions<K> {\n return {\n mode: props.selectable === 'single' ? 'single' : 'multiple',\n value: props.selection,\n defaultValue: props.defaultSelection,\n onChange: props.onSelectionChange,\n }\n}\n\nexport interface LegacyGridExpansionProps<K extends GridExpansionKey = string> {\n readonly defaultExpandedRowKeys?: readonly K[]\n readonly onChange?: (keys: string[]) => void\n}\n\nexport function toGridExpansionOptions<K extends GridExpansionKey = string>(\n props: LegacyGridExpansionProps<K>,\n): UseGridExpansionOptions<string> {\n return {\n mode: 'multiple',\n defaultValue: (props.defaultExpandedRowKeys ?? []).map(String),\n onChange: props.onChange,\n }\n}\n\nexport interface LegacyGridPaginationProxyConfig {\n readonly defaultPage?: number\n readonly pageSize?: number\n readonly onPageChange?: (page: number, pageSize: number) => void\n}\n\nexport interface LegacyGridPaginationState {\n readonly page: number\n readonly pageSize: number\n readonly total: number\n}\n\nexport interface LegacyGridPaginationProps {\n readonly proxyConfig?: LegacyGridPaginationProxyConfig\n readonly state?: LegacyGridPaginationState\n readonly request?: (pagination: Pick<LegacyGridPaginationState, 'page' | 'pageSize'>) => void\n}\n\n/** Map proxy pagination into a controlled feature; request policy stays outside core. */\nexport function toGridPaginationOptions(\n props: LegacyGridPaginationProps,\n): UseGridPaginationOptions {\n const state = props.state\n const onChange = state\n ? (change: GridPaginationChange) => {\n props.request?.({ page: change.page, pageSize: change.pageSize })\n props.proxyConfig?.onPageChange?.(change.page, change.pageSize)\n }\n : undefined\n return {\n page: state?.page,\n pageSize: state?.pageSize,\n total: state?.total,\n defaultPage: props.proxyConfig?.defaultPage,\n defaultPageSize: props.proxyConfig?.pageSize,\n onChange,\n }\n}\n\nexport interface LegacyGridSortingProps<Row extends Record<string, unknown>> {\n readonly columns: GridSortColumn<Row>[]\n readonly sort?: UseGridSortingOptions<Row>['sort']\n readonly defaultSort?: UseGridSortingOptions<Row>['defaultSort']\n readonly onSortChange?: UseGridSortingOptions<Row>['onSortChange']\n readonly multiSort?: boolean\n readonly multiSortState?: UseGridSortingOptions<Row>['multiSortState']\n readonly defaultMultiSort?: UseGridSortingOptions<Row>['defaultMultiSort']\n readonly onMultiSortChange?: UseGridSortingOptions<Row>['onMultiSortChange']\n readonly formulaTables?: UseGridSortingOptions<Row>['formulaTables']\n}\n\nexport function toGridSortingOptions<Row extends Record<string, unknown>>(\n props: LegacyGridSortingProps<Row>,\n): UseGridSortingOptions<Row> {\n return {\n leafColumns: props.columns,\n sort: props.sort,\n defaultSort: props.defaultSort,\n onSortChange: props.onSortChange,\n multiSort: props.multiSort,\n multiSortState: props.multiSortState,\n defaultMultiSort: props.defaultMultiSort,\n onMultiSortChange: props.onMultiSortChange,\n formulaTables: props.formulaTables,\n }\n}\n\nexport interface LegacyGridFilteringProps<\n Row extends Record<string, unknown>,\n Column extends GridFilterColumn<Row>,\n> extends Omit<UseGridFilteringOptions<Row, Column>, 'controlled' | 'proxy' | 'remote'> {\n readonly proxy?: unknown\n readonly remoteFilter?: boolean\n}\n\nexport function toGridFilteringOptions<\n Row extends Record<string, unknown>,\n Column extends GridFilterColumn<Row>,\n>(props: LegacyGridFilteringProps<Row, Column>): UseGridFilteringOptions<Row, Column> {\n return {\n columns: props.columns,\n getValue: props.getValue,\n filters: props.filters,\n defaultFilters: props.defaultFilters,\n onFiltersChange: props.onFiltersChange,\n filterValues: props.filterValues,\n defaultFilterValues: props.defaultFilterValues,\n onFilterValuesChange: props.onFilterValuesChange,\n controlled: true,\n formFilters: props.formFilters,\n query: props.query,\n proxy: Boolean(props.proxy),\n remote: props.remoteFilter,\n }\n}\n","import * as React from 'react'\nimport type { GridCore, GridFeature } from '@iris-ui-kit/core/grid'\n\n/** Install one feature once per Grid Core bridge and return its model. */\nexport function useGridFeature<Row extends Record<string, unknown>, Model>(\n core: GridCore<Row>,\n name: string,\n modelMethod: string,\n create: () => GridFeature<Row>,\n): Model {\n const feature = React.useRef<GridFeature<Row> | null>(null)\n if (feature.current === null) feature.current = create()\n if (!core.hasFeature(name)) core.use(feature.current)\n return core.invoke<Model>(modelMethod)\n}\n","import * as React from 'react'\nimport {\n createGridColumnsFeature,\n type GridColumnPin,\n type GridColumnPinned,\n type GridColumnsModel,\n type GridColumnsState,\n type GridColumnVisibility,\n type GridColumnWidths,\n type GridCore,\n} from '@iris-ui-kit/core/grid'\nimport { useStore } from '../useStore'\nimport { useGridFeature } from './useGridFeature'\n\nconst EMPTY_VISIBILITY: GridColumnVisibility = {}\nconst EMPTY_ORDER: string[] = []\nconst EMPTY_WIDTHS: GridColumnWidths = {}\nconst EMPTY_PINNED: GridColumnPinned = {}\n\nfunction visibilitySignature(visibility: GridColumnVisibility | undefined): string {\n return visibility\n ? JSON.stringify(Object.keys(visibility).map((key) => [key, visibility[key]]))\n : ''\n}\n\nfunction cloneColumnsState(state: GridColumnsState): GridColumnsState {\n return {\n visibility: { ...state.visibility },\n order: [...state.order],\n widths: { ...state.widths },\n pinned: { ...state.pinned },\n }\n}\n\nexport interface UseGridColumnsOptions {\n visibility?: GridColumnVisibility\n defaultVisibility?: GridColumnVisibility\n visibilityControlled?: boolean\n onVisibilityChange?: (visibility: GridColumnVisibility) => void\n order?: string[]\n defaultOrder?: string[]\n /** Keeps the legacy `undefined` order controlled as an empty source-order override. */\n orderControlled?: boolean\n onOrderChange?: (order: string[] | undefined) => void\n widths?: GridColumnWidths\n defaultWidths?: GridColumnWidths\n onWidthsChange?: (widths: GridColumnWidths) => void\n pinned?: GridColumnPinned\n defaultPinned?: GridColumnPinned\n onPinnedChange?: (key: string, side: GridColumnPin) => void\n}\n\nexport interface UseGridColumnsResult {\n model: GridColumnsModel\n state: GridColumnsState\n controlled: {\n visibility: boolean\n order: boolean\n widths: boolean\n pinned: boolean\n }\n setVisibility(visibility: GridColumnVisibility): void\n toggleVisibility(key: string): void\n setOrder(order: string[] | undefined): void\n clearOrder(): void\n setWidths(widths: GridColumnWidths): void\n setWidth(key: string, width: number): void\n resetWidths(): void\n setPinned(key: string, side: GridColumnPin): void\n}\n\n/** Installs the four column-state channels and mirrors optional controlled props. */\nexport function useGridColumns<Row extends Record<string, unknown> = Record<string, unknown>>(\n core: GridCore<Row>,\n options: UseGridColumnsOptions = {},\n): UseGridColumnsResult {\n const latest = React.useRef(options)\n latest.current = options\n\n const model = useGridFeature<Row, GridColumnsModel>(core, 'columns', 'getColumnsModel', () =>\n createGridColumnsFeature<Row>({\n defaultVisibility: options.visibility ?? options.defaultVisibility,\n defaultOrder: options.order ?? options.defaultOrder,\n defaultWidths: options.widths ?? options.defaultWidths,\n defaultPinned: options.pinned ?? options.defaultPinned,\n onVisibilityChange: (visibility) => latest.current.onVisibilityChange?.(visibility),\n onOrderChange: (order) => latest.current.onOrderChange?.(order),\n onWidthsChange: (widths) => latest.current.onWidthsChange?.(widths),\n onPinnedChange: (key, side) => latest.current.onPinnedChange?.(key, side),\n }),\n )\n const internal = useStore(model.store)\n const visibilityControlled = options.visibilityControlled ?? options.visibility !== undefined\n const orderControlled = options.orderControlled ?? options.order !== undefined\n const widthsControlled = options.widths !== undefined\n const pinnedControlled = options.pinned !== undefined\n const visibilityVersion = visibilitySignature(\n visibilityControlled ? options.visibility : undefined,\n )\n const lastUncontrolledVisibility = React.useRef<GridColumnVisibility>({\n ...(options.defaultVisibility ?? EMPTY_VISIBILITY),\n })\n const lastUncontrolledOrder = React.useRef<string[]>([...(options.defaultOrder ?? EMPTY_ORDER)])\n const lastUncontrolledWidths = React.useRef<GridColumnWidths>({\n ...(options.defaultWidths ?? EMPTY_WIDTHS),\n })\n const lastUncontrolledPinned = React.useRef<GridColumnPinned>({\n ...(options.defaultPinned ?? EMPTY_PINNED),\n })\n const wasVisibilityControlled = React.useRef(visibilityControlled)\n const wasOrderControlled = React.useRef(orderControlled)\n const wasWidthsControlled = React.useRef(widthsControlled)\n const wasPinnedControlled = React.useRef(pinnedControlled)\n const enteringVisibilityControlled = visibilityControlled && !wasVisibilityControlled.current\n const enteringOrderControlled = orderControlled && !wasOrderControlled.current\n const enteringWidthsControlled = widthsControlled && !wasWidthsControlled.current\n const enteringPinnedControlled = pinnedControlled && !wasPinnedControlled.current\n if (\n enteringVisibilityControlled ||\n enteringOrderControlled ||\n enteringWidthsControlled ||\n enteringPinnedControlled\n ) {\n // Capture all entering channels from the live Core state before the\n // controlled effects synchronize any of them.\n const liveState = model.store.getState()\n if (enteringVisibilityControlled) {\n lastUncontrolledVisibility.current = { ...liveState.visibility }\n }\n if (enteringOrderControlled) lastUncontrolledOrder.current = [...liveState.order]\n if (enteringWidthsControlled) lastUncontrolledWidths.current = { ...liveState.widths }\n if (enteringPinnedControlled) lastUncontrolledPinned.current = { ...liveState.pinned }\n }\n if (!visibilityControlled && !wasVisibilityControlled.current) {\n lastUncontrolledVisibility.current = { ...internal.visibility }\n }\n if (!orderControlled && !wasOrderControlled.current) {\n lastUncontrolledOrder.current = [...internal.order]\n }\n if (!widthsControlled && !wasWidthsControlled.current) {\n lastUncontrolledWidths.current = { ...internal.widths }\n }\n if (!pinnedControlled && !wasPinnedControlled.current) {\n lastUncontrolledPinned.current = { ...internal.pinned }\n }\n const state: GridColumnsState = cloneColumnsState({\n visibility: visibilityControlled\n ? { ...(options.visibility ?? EMPTY_VISIBILITY) }\n : wasVisibilityControlled.current\n ? lastUncontrolledVisibility.current\n : internal.visibility,\n order: orderControlled\n ? [...(options.order ?? EMPTY_ORDER)]\n : wasOrderControlled.current\n ? lastUncontrolledOrder.current\n : internal.order,\n // Removing a controlled order must restore the last uncontrolled/default\n // snapshot rather than exposing a rejected controlled proposal. Widths\n // use the same handoff policy below.\n // Removing a controlled width map must restore the last uncontrolled or\n // default snapshot immediately; otherwise one render leaks the rejected\n // controlled widths before the silent model rebase runs.\n widths: widthsControlled\n ? { ...options.widths! }\n : wasWidthsControlled.current\n ? lastUncontrolledWidths.current\n : internal.widths,\n pinned: pinnedControlled\n ? { ...options.pinned! }\n : wasPinnedControlled.current\n ? lastUncontrolledPinned.current\n : internal.pinned,\n })\n\n React.useEffect(() => {\n if (visibilityControlled) model.syncVisibility(options.visibility ?? {})\n else if (wasVisibilityControlled.current)\n model.syncVisibility(lastUncontrolledVisibility.current)\n wasVisibilityControlled.current = visibilityControlled\n }, [model, options.visibility, visibilityControlled, visibilityVersion])\n React.useEffect(() => {\n if (orderControlled) model.syncOrder(options.order ?? [])\n else if (wasOrderControlled.current) model.syncOrder(lastUncontrolledOrder.current)\n wasOrderControlled.current = orderControlled\n }, [model, options.order, orderControlled])\n React.useEffect(() => {\n if (widthsControlled) model.syncWidths(options.widths ?? {})\n else if (wasWidthsControlled.current) model.syncWidths(lastUncontrolledWidths.current)\n wasWidthsControlled.current = widthsControlled\n }, [model, options.widths, widthsControlled])\n React.useEffect(() => {\n if (pinnedControlled) model.syncPinned(options.pinned ?? {})\n else if (wasPinnedControlled.current) model.syncPinned(lastUncontrolledPinned.current)\n wasPinnedControlled.current = pinnedControlled\n }, [model, options.pinned, pinnedControlled])\n\n const rebaseVisibility = React.useCallback((): void => {\n if (latest.current.visibilityControlled ?? latest.current.visibility !== undefined) {\n model.syncVisibility(latest.current.visibility ?? {})\n } else if (wasVisibilityControlled.current) {\n model.syncVisibility(lastUncontrolledVisibility.current)\n }\n }, [model])\n const rebaseOrder = React.useCallback((): void => {\n if (latest.current.orderControlled ?? latest.current.order !== undefined) {\n model.syncOrder(latest.current.order ?? [])\n }\n }, [model])\n const rebaseWidths = React.useCallback((): void => {\n if (latest.current.widths !== undefined) model.syncWidths(latest.current.widths)\n else if (wasWidthsControlled.current) model.syncWidths(lastUncontrolledWidths.current)\n }, [model])\n const rebasePinned = React.useCallback((): void => {\n if (latest.current.pinned !== undefined) model.syncPinned(latest.current.pinned)\n else if (wasPinnedControlled.current) model.syncPinned(lastUncontrolledPinned.current)\n }, [model])\n const setVisibility = React.useCallback(\n (visibility: GridColumnVisibility): void => {\n rebaseVisibility()\n model.setVisibility(visibility)\n },\n [model, rebaseVisibility],\n )\n const toggleVisibility = React.useCallback(\n (key: string): void => {\n rebaseVisibility()\n model.toggleVisibility(key)\n },\n [model, rebaseVisibility],\n )\n const setOrder = React.useCallback(\n (order: string[] | undefined): void => {\n rebaseOrder()\n model.setOrder(order)\n },\n [model, rebaseOrder],\n )\n const clearOrder = React.useCallback((): void => {\n rebaseOrder()\n model.setOrder(undefined)\n }, [model, rebaseOrder])\n const setWidths = React.useCallback(\n (widths: GridColumnWidths): void => {\n rebaseWidths()\n model.setWidths(widths)\n },\n [model, rebaseWidths],\n )\n const setWidth = React.useCallback(\n (key: string, width: number): void => {\n rebaseWidths()\n model.setWidth(key, width)\n },\n [model, rebaseWidths],\n )\n const resetWidths = React.useCallback((): void => {\n rebaseWidths()\n model.setWidths({})\n }, [model, rebaseWidths])\n const setPinned = React.useCallback(\n (key: string, side: GridColumnPin): void => {\n rebasePinned()\n model.setPinned(key, side)\n },\n [model, rebasePinned],\n )\n\n return {\n model,\n state,\n controlled: {\n visibility: visibilityControlled,\n order: orderControlled,\n widths: widthsControlled,\n pinned: pinnedControlled,\n },\n setVisibility,\n toggleVisibility,\n setOrder,\n clearOrder,\n setWidths,\n setWidth,\n resetWidths,\n setPinned,\n }\n}\n","import * as React from 'react'\nimport {\n createGridClipboardFeature,\n type GridClipboardFeatureOptions,\n type GridClipboardModel,\n type GridCore,\n} from '@iris-ui-kit/core/grid'\nimport type {\n GridRowsCommitOptions,\n TableClipboardColumn,\n TableClipboardRange,\n TableCopyFormat,\n} from '@iris-ui-kit/core'\nimport { useGridFeature } from './useGridFeature'\n\nexport type UseGridClipboardOptions<Row extends Record<string, unknown>> =\n GridClipboardFeatureOptions<Row>\n\nexport interface UseGridClipboardResult<Row extends Record<string, unknown>> {\n core: GridCore<Row>\n model: GridClipboardModel\n serialize(format?: TableCopyFormat, copyWithFormat?: boolean): string | null\n paste(text: string, range?: TableClipboardRange): boolean\n}\n\nfunction defaultValue<Row extends Record<string, unknown>>(\n row: Row,\n column: TableClipboardColumn<Row>,\n): unknown {\n return row[(column.dataIndex ?? column.key) as keyof Row]\n}\n\nfunction defaultSetValue<Row extends Record<string, unknown>>(\n row: Row,\n column: TableClipboardColumn<Row>,\n value: unknown,\n): Row {\n return { ...row, [column.dataIndex ?? column.key]: value }\n}\n\nfunction resolveCommitOptions(\n options: GridClipboardFeatureOptions<Record<string, unknown>>['commitOptions'],\n): GridRowsCommitOptions {\n if (typeof options === 'function') return options()\n return options ?? {}\n}\n\n/** Installs clipboard pure logic while leaving system clipboard I/O in React. */\nexport function useGridClipboard<Row extends Record<string, unknown> = Record<string, unknown>>(\n core: GridCore<Row>,\n options: UseGridClipboardOptions<Row>,\n): UseGridClipboardResult<Row> {\n const latest = React.useRef(options)\n latest.current = options\n\n const model = useGridFeature<Row, GridClipboardModel>(\n core,\n 'clipboard',\n 'getClipboardModel',\n () =>\n createGridClipboardFeature<Row>({\n getRows: () => latest.current.getRows?.() ?? core.invoke<Row[]>('getRows'),\n getColumns: () => latest.current.getColumns(),\n rowKeyField: latest.current.rowKeyField,\n overflowRows: (context) => latest.current.overflowRows?.(context),\n resolveValue: (row, column) => {\n const resolve = latest.current.resolveValue\n return resolve ? resolve(row, column) : defaultValue(row, column)\n },\n parseValue: (text, row, column) => {\n const parse = latest.current.parseValue\n return parse ? parse(text, row, column) : text\n },\n setValue: (row, column, value) =>\n latest.current.setValue?.(row, column, value) ?? defaultSetValue(row, column, value),\n isCellEditable: (row, column, rowIndex, columnIndex) =>\n latest.current.isCellEditable?.(row, column, rowIndex, columnIndex) ?? true,\n reconcileRows: (sourceRows, previousRows, rows) =>\n latest.current.reconcileRows?.(sourceRows, previousRows, rows) ?? rows,\n commitOptions: () => resolveCommitOptions(latest.current.commitOptions),\n onCopy: (change) => latest.current.onCopy?.(change),\n onPaste: (change) => latest.current.onPaste?.(change),\n }),\n )\n\n const serialize = React.useCallback(\n (format?: TableCopyFormat, copyWithFormat?: boolean) =>\n model.serialize(\n format ?? latest.current.copyFormat ?? 'tsv',\n copyWithFormat ?? latest.current.copyWithFormat ?? false,\n ),\n [model],\n )\n const paste = React.useCallback(\n (text: string, range?: TableClipboardRange) => model.paste(text, range),\n [model],\n )\n\n return { core, model, serialize, paste }\n}\n","import * as React from 'react'\nimport { filterTableRows, mergeFormFilters, type FilterRule } from '@iris-ui-kit/core'\nimport {\n createGridFilteringFeature,\n type GridCore,\n type GridFilteringModel,\n type GridFilterValues,\n} from '@iris-ui-kit/core/grid'\nimport { useStore } from '../useStore'\nimport { useGridFeature } from './useGridFeature'\n\nexport interface GridFilterColumn<Row> {\n key: string\n filterMethod?: (value: unknown, row: Row, filterValue: string) => boolean\n}\n\nexport interface GridFilterQuery {\n readonly filters: Readonly<Record<string, string>>\n readonly inValues: Readonly<Record<string, readonly string[]>>\n readonly rules: readonly FilterRule[]\n}\n\nexport interface UseGridFilteringOptions<\n Row,\n Column extends GridFilterColumn<Row> = GridFilterColumn<Row>,\n> {\n columns: Column[]\n getValue: (row: Row, column: Column) => unknown\n filters?: Record<string, string>\n defaultFilters?: Record<string, string>\n onFiltersChange?: (filters: Record<string, string>) => void\n filterValues?: GridFilterValues\n defaultFilterValues?: GridFilterValues\n onFilterValuesChange?: (filterValues: GridFilterValues) => void\n /** Treat missing filter props as controlled empty maps. */\n controlled?: boolean\n formFilters?: Record<string, string>\n query?: GridFilterQuery\n proxy?: boolean\n remote?: boolean\n}\n\nexport interface UseGridFilteringResult<Row> {\n core: GridCore\n model: GridFilteringModel\n filters: Record<string, string>\n filterValues: GridFilterValues\n filteredData: Row[]\n}\n\nfunction cloneFilters(\n filters: Readonly<Record<string, string>> | null | undefined,\n): Record<string, string> {\n return { ...(filters ?? {}) }\n}\n\nfunction cloneFilterValues(\n filterValues: Readonly<GridFilterValues> | null | undefined,\n): GridFilterValues {\n return Object.fromEntries(\n Object.entries(filterValues ?? {}).map(([key, values]) => [key, [...values]]),\n )\n}\n\n/** Installs filtering state in Grid Core and derives the React row view. */\nexport function useGridFiltering<\n Row extends Record<string, unknown> = Record<string, unknown>,\n Column extends GridFilterColumn<Row> = GridFilterColumn<Row>,\n>(\n core: GridCore<Row>,\n data: Row[],\n options: UseGridFilteringOptions<Row, Column>,\n): UseGridFilteringResult<Row> {\n const latest = React.useRef(options)\n latest.current = options\n const filtersControlled = options.controlled === true || options.filters !== undefined\n const valuesControlled = options.controlled === true || options.filterValues !== undefined\n\n const model = useGridFeature<Row, GridFilteringModel>(\n core,\n 'filtering',\n 'getFilteringModel',\n () =>\n createGridFilteringFeature<Row>({\n defaultFilters: filtersControlled ? (options.filters ?? {}) : options.defaultFilters,\n defaultFilterValues: valuesControlled\n ? (options.filterValues ?? {})\n : options.defaultFilterValues,\n onFiltersChange: (next) => latest.current.onFiltersChange?.(next),\n onFilterValuesChange: (next) => latest.current.onFilterValuesChange?.(next),\n }),\n )\n const internalState = useStore(model.store)\n // React dependency checks cannot observe mutations made through a stable prop\n // reference. Recompute these signatures on every render so controlled sync\n // remains content-sensitive without changing the Core model contract.\n const filtersSignature = JSON.stringify(options.filters)\n const filterValuesSignature = JSON.stringify(options.filterValues)\n const wasFiltersControlled = React.useRef(filtersControlled)\n const uncontrolledFilters = React.useRef<Record<string, string>>({})\n const hasUncontrolledFilters = React.useRef(!filtersControlled)\n const lastControlledFilters = React.useRef<Record<string, string>>(cloneFilters(options.filters))\n const wasFilterValuesControlled = React.useRef(valuesControlled)\n const uncontrolledFilterValues = React.useRef<GridFilterValues>({})\n const hasUncontrolledFilterValues = React.useRef(!valuesControlled)\n const lastControlledFilterValues = React.useRef<GridFilterValues>(\n cloneFilterValues(options.filterValues),\n )\n const leavingFiltersControlled = wasFiltersControlled.current && !filtersControlled\n const leavingFilterValuesControlled = wasFilterValuesControlled.current && !valuesControlled\n\n // Capture only genuine uncontrolled state. A rejected controlled proposal may\n // be ahead of the prop in the model, so it must not become the handoff value.\n if (!filtersControlled && !leavingFiltersControlled) {\n uncontrolledFilters.current = cloneFilters(internalState.filters)\n hasUncontrolledFilters.current = true\n }\n if (!valuesControlled && !leavingFilterValuesControlled) {\n uncontrolledFilterValues.current = cloneFilterValues(internalState.filterValues)\n hasUncontrolledFilterValues.current = true\n }\n // Capture model updates batched with the transition into controlled mode.\n if (filtersControlled && !wasFiltersControlled.current) {\n uncontrolledFilters.current = cloneFilters(internalState.filters)\n hasUncontrolledFilters.current = true\n }\n if (valuesControlled && !wasFilterValuesControlled.current) {\n uncontrolledFilterValues.current = cloneFilterValues(internalState.filterValues)\n hasUncontrolledFilterValues.current = true\n }\n if (filtersControlled) lastControlledFilters.current = cloneFilters(options.filters)\n if (valuesControlled) {\n lastControlledFilterValues.current = cloneFilterValues(options.filterValues)\n }\n\n const filters = cloneFilters(\n filtersControlled\n ? options.filters\n : leavingFiltersControlled\n ? hasUncontrolledFilters.current\n ? uncontrolledFilters.current\n : lastControlledFilters.current\n : internalState.filters,\n )\n const filterValues = cloneFilterValues(\n valuesControlled\n ? options.filterValues\n : leavingFilterValuesControlled\n ? hasUncontrolledFilterValues.current\n ? uncontrolledFilterValues.current\n : lastControlledFilterValues.current\n : internalState.filterValues,\n )\n\n React.useEffect(() => {\n if (filtersControlled) {\n const next = cloneFilters(options.filters)\n lastControlledFilters.current = cloneFilters(next)\n model.syncFilters(next)\n } else if (wasFiltersControlled.current) {\n const restore = hasUncontrolledFilters.current\n ? uncontrolledFilters.current\n : lastControlledFilters.current\n // A no-op Core sync still establishes the restored value as the next\n // uncontrolled baseline for a later controlled detour.\n uncontrolledFilters.current = cloneFilters(restore)\n hasUncontrolledFilters.current = true\n model.syncFilters(restore)\n }\n wasFiltersControlled.current = filtersControlled\n }, [filtersControlled, model, options.filters, filtersSignature])\n\n React.useEffect(() => {\n if (valuesControlled) {\n const next = cloneFilterValues(options.filterValues)\n lastControlledFilterValues.current = cloneFilterValues(next)\n model.syncFilterValues(next)\n } else if (wasFilterValuesControlled.current) {\n const restore = hasUncontrolledFilterValues.current\n ? uncontrolledFilterValues.current\n : lastControlledFilterValues.current\n // A no-op Core sync still establishes the restored value as the next\n // uncontrolled baseline for a later controlled detour.\n uncontrolledFilterValues.current = cloneFilterValues(restore)\n hasUncontrolledFilterValues.current = true\n model.syncFilterValues(restore)\n }\n wasFilterValuesControlled.current = valuesControlled\n }, [model, options.filterValues, valuesControlled, filterValuesSignature])\n\n const filteredData = React.useMemo(() => {\n if (options.remote) return data\n const merged = options.proxy\n ? { ...filters }\n : mergeFormFilters(filters, options.formFilters ?? {})\n for (const [key, value] of Object.entries(options.query?.filters ?? {})) {\n if (value !== '') merged[key] = value\n }\n return filterTableRows(data, options.columns, {\n getValue: options.getValue,\n filters: merged,\n filterValues,\n additionalFilterValues: options.query?.inValues ? [options.query.inValues] : undefined,\n filterRules: options.query?.rules,\n })\n }, [\n data,\n filterValues,\n filters,\n options.columns,\n options.formFilters,\n options.getValue,\n options.proxy,\n options.query,\n options.remote,\n ])\n\n return { core, model, filters, filterValues, filteredData }\n}\n","import * as React from 'react'\nimport {\n createGridEditingFeature,\n type GridCore,\n type GridEditingCommit,\n type GridEditingFeatureOptions,\n type GridEditingKey,\n type GridEditingModel,\n type GridEditingValidation,\n} from '@iris-ui-kit/core/grid'\nimport type { CellEditState } from '@iris-ui-kit/core'\nimport { useStoreSelector } from '../useStore'\nimport { useGridFeature } from './useGridFeature'\n\nexport interface UseGridEditingOptions<Row extends Record<string, unknown>> extends Omit<\n GridEditingFeatureOptions<Row>,\n 'onStateChange' | 'onCommit'\n> {\n onStateChange?: (state: CellEditState<GridEditingKey>) => void\n onValidation?: (validation: GridEditingValidation) => void\n onCommit?: (commit: GridEditingCommit<Row>) => void\n}\n\nexport interface UseGridEditingResult<Row extends Record<string, unknown>> {\n core: GridCore<Row>\n model: GridEditingModel\n state: CellEditState<GridEditingKey>\n startCellEdit(rowKey: GridEditingKey, columnKey: string, initialDraft?: unknown): boolean\n setCellDraft(value: unknown): void\n cancelCellEdit(): void\n commitCellEdit(value?: unknown): boolean\n isCellEditing(rowKey: GridEditingKey, columnKey: string): boolean\n}\n\n/** Installs the framework-independent editing feature and bridges its state. */\nexport function useGridEditing<Row extends Record<string, unknown>>(\n core: GridCore<Row>,\n options: UseGridEditingOptions<Row>,\n): UseGridEditingResult<Row> {\n const latest = React.useRef(options)\n latest.current = options\n\n const model = useGridFeature<Row, GridEditingModel>(core, 'editing', 'getEditingModel', () =>\n createGridEditingFeature<Row>({\n getRowKey: (row, index) => latest.current.getRowKey(row, index),\n getRowIndex: (rowKey, row, rootRows) => latest.current.getRowIndex?.(rowKey, row, rootRows),\n getRules: (columnKey) => latest.current.getRules?.(columnKey),\n getValue: (row, columnKey) => {\n const getValue = latest.current.getValue\n return getValue ? getValue(row, columnKey) : row[columnKey]\n },\n setValue: (row, columnKey, value) =>\n latest.current.setValue?.(row, columnKey, value) ?? { ...row, [columnKey]: value },\n coerce: (draft, row, columnKey) => {\n const coerce = latest.current.coerce\n return coerce ? coerce(draft, row, columnKey) : draft\n },\n validate: (value, row, columnKey) => latest.current.validate?.(value, row, columnKey) ?? null,\n isEditable: (row, columnKey) => latest.current.isEditable?.(row, columnKey) ?? true,\n missingRowMessage: options.missingRowMessage,\n commitOptions: () => {\n const configured = latest.current.commitOptions\n return typeof configured === 'function' ? configured() : (configured ?? {})\n },\n onStateChange: (state) => latest.current.onStateChange?.(state),\n onValidation: (validation) => latest.current.onValidation?.(validation),\n onCommit: (commit) => latest.current.onCommit?.(commit),\n }),\n )\n const state = useStoreSelector(model.store, () => model.getState())\n\n return {\n core,\n model,\n state,\n startCellEdit: (rowKey, columnKey, initialDraft) =>\n model.start(rowKey, columnKey, initialDraft),\n setCellDraft: (value) => model.setDraft(value),\n cancelCellEdit: () => model.cancelEdit(),\n commitCellEdit: (value) => model.commitEdit(value),\n isCellEditing: (rowKey, columnKey) => model.isEditing(rowKey, columnKey),\n }\n}\n","import * as React from 'react'\nimport {\n createGridExpansionFeature,\n type ExpansionMode,\n type ExpansionModel,\n type GridCore,\n type GridExpansionKey,\n} from '@iris-ui-kit/core/grid'\nimport { useStore } from '../useStore'\nimport { useGridFeature } from './useGridFeature'\n\nexport interface UseGridExpansionOptions<K extends GridExpansionKey = string> {\n mode?: ExpansionMode\n defaultValue?: K[]\n onChange?: (keys: K[]) => void\n getKeys?: () => readonly K[]\n}\n\nexport interface UseGridExpansionResult<K extends GridExpansionKey = string> {\n core: GridCore\n model: ExpansionModel<K>\n expandedKeys: K[]\n}\n\n/** Installs one expansion feature and bridges its store into React. */\nexport function useGridExpansion<\n Row extends Record<string, unknown> = Record<string, unknown>,\n K extends GridExpansionKey = string,\n>(core: GridCore<Row>, options: UseGridExpansionOptions<K> = {}): UseGridExpansionResult<K> {\n const latest = React.useRef(options)\n latest.current = options\n\n const model = useGridFeature<Row, ExpansionModel<K>>(core, 'expansion', 'getExpansionModel', () =>\n createGridExpansionFeature<Row, K>({\n mode: options.mode,\n defaultExpanded: options.defaultValue,\n getKeys: () => latest.current.getKeys?.() ?? [],\n onChange: (keys) => latest.current.onChange?.(keys),\n }),\n )\n const expandedKeys = useStore(model.store)\n\n // The core store owns its mutable array; expose a snapshot so consumers\n // cannot mutate the controller by editing the bridge result in place.\n return { core, model, expandedKeys: [...expandedKeys] }\n}\n","import * as React from 'react'\nimport {\n createGridPaginationFeature,\n createGridPaginationProjection,\n type GridCore,\n type GridPaginationChange,\n type GridPaginationModel,\n type GridPaginationProjection,\n type GridPaginationState,\n} from '@iris-ui-kit/core/grid'\nimport { useStore } from '../useStore'\nimport { useGridFeature } from './useGridFeature'\n\nexport interface UseGridPaginationOptions {\n page?: number\n defaultPage?: number\n pageSize?: number\n defaultPageSize?: number\n total?: number\n defaultTotal?: number\n onChange?: (change: GridPaginationChange) => void\n}\n\nexport interface UseGridPaginationResult {\n model: GridPaginationModel\n pagination: GridPaginationState\n controlled: boolean\n setPage(page: number): void\n setPageSize(pageSize: number): void\n setPagination(page: number, pageSize: number): void\n}\n\nfunction controlledState(options: UseGridPaginationOptions): Partial<GridPaginationState> {\n return {\n ...(options.page !== undefined ? { page: options.page } : {}),\n ...(options.pageSize !== undefined ? { pageSize: options.pageSize } : {}),\n ...(options.total !== undefined ? { total: options.total } : {}),\n }\n}\n\n/** Installs pagination in Grid Core and mirrors optional controlled proxy state. */\nexport function useGridPagination<Row extends Record<string, unknown> = Record<string, unknown>>(\n core: GridCore<Row>,\n options: UseGridPaginationOptions = {},\n): UseGridPaginationResult {\n const latest = React.useRef(options)\n latest.current = options\n\n const model = useGridFeature<Row, GridPaginationModel>(\n core,\n 'pagination',\n 'getPaginationModel',\n () =>\n createGridPaginationFeature<Row>({\n defaultPage: options.page ?? options.defaultPage,\n defaultPageSize: options.pageSize ?? options.defaultPageSize,\n defaultTotal: options.total ?? options.defaultTotal,\n onChange: (change) => latest.current.onChange?.(change),\n }),\n )\n const internal = useStore(model.store)\n const projectionRef = React.useRef<GridPaginationProjection | null>(null)\n if (projectionRef.current === null) {\n projectionRef.current = createGridPaginationProjection(model, controlledState(options))\n }\n const projection = projectionRef.current\n const controlled =\n options.page !== undefined || options.pageSize !== undefined || options.total !== undefined\n const controlledProps = controlledState(options)\n const pagination: GridPaginationState = projection.project(internal, controlledProps)\n\n React.useEffect(() => {\n projection.sync(controlledState(options))\n return () => projection.dispose()\n }, [options.page, options.pageSize, options.total, projection])\n\n const rebase = React.useCallback(() => {\n projection.sync(controlledState(latest.current))\n }, [projection])\n const setPage = React.useCallback(\n (page: number) => {\n rebase()\n model.setPage(page)\n },\n [model, rebase],\n )\n const setPageSize = React.useCallback(\n (pageSize: number) => {\n rebase()\n model.setPageSize(pageSize)\n },\n [model, rebase],\n )\n const setPagination = React.useCallback(\n (page: number, pageSize: number) => {\n rebase()\n model.set(page, pageSize)\n },\n [model, rebase],\n )\n\n return { model, pagination, controlled, setPage, setPageSize, setPagination }\n}\n","import * as React from 'react'\nimport {\n createGridRangeFeature,\n type GridCore,\n type GridRangeChange,\n type GridRangeModel,\n} from '@iris-ui-kit/core/grid'\nimport type { CellRange, CellRangeState } from '@iris-ui-kit/core'\nimport { useGridFeature } from './useGridFeature'\n\nexport interface UseGridRangeOptions {\n onChange?: (change: GridRangeChange) => void\n}\n\nexport interface UseGridRangeResult<Row extends Record<string, unknown>> {\n core: GridCore<Row>\n model: GridRangeModel\n state: CellRangeState\n range: CellRange | null\n}\n\n/** Installs the range feature and bridges its controller snapshot into React. */\nexport function useGridRange<Row extends Record<string, unknown> = Record<string, unknown>>(\n core: GridCore<Row>,\n options: UseGridRangeOptions = {},\n): UseGridRangeResult<Row> {\n const latest = React.useRef(options)\n latest.current = options\n\n const model = useGridFeature<Row, GridRangeModel>(core, 'range', 'getRangeModel', () =>\n createGridRangeFeature<Row>({\n onChange: (change) => latest.current.onChange?.(change),\n }),\n )\n const state = React.useSyncExternalStore(model.subscribe, model.getState, model.getState)\n // Keep the subscription as the render dependency, but let the Core model\n // own normalization so adapters cannot drift on inverted ranges.\n const range = React.useMemo(() => model.getRange(), [model, state])\n\n return { core, model, state, range }\n}\n","import * as React from 'react'\nimport {\n createGridSelectionFeature,\n type GridCore,\n type SelectionKey,\n type SelectionMode,\n} from '@iris-ui-kit/core/grid'\nimport type { SelectionModel } from '@iris-ui-kit/core'\nimport { useStore } from '../useStore'\nimport { useGridFeature } from './useGridFeature'\n\nfunction sameKeys<K extends SelectionKey>(left: readonly K[], right: readonly K[]): boolean {\n return (\n left.length === right.length &&\n left.every(\n (key, index) => key === right[index] || (key !== key && right[index] !== right[index]),\n )\n )\n}\n\nexport interface UseGridSelectionOptions<K extends SelectionKey = string> {\n mode?: SelectionMode\n value?: K[]\n defaultValue?: K[]\n onChange?: (keys: K[]) => void\n getKeys?: () => readonly K[]\n}\n\nexport interface UseGridSelectionResult<K extends SelectionKey = string> {\n core: GridCore\n model: SelectionModel<K>\n selection: K[]\n controlled: boolean\n /** Rebase mutations on the latest controlled prop before applying them. */\n rebase(): void\n}\n\n/** Selection feature + React controlled/uncontrolled reactivity bridge. */\nexport function useGridSelection<\n Row extends Record<string, unknown> = Record<string, unknown>,\n K extends SelectionKey = string,\n>(core: GridCore<Row>, options: UseGridSelectionOptions<K> = {}): UseGridSelectionResult<K> {\n const latest = React.useRef(options)\n latest.current = options\n\n const model = useGridFeature<Row, SelectionModel<K>>(core, 'selection', 'getSelectionModel', () =>\n createGridSelectionFeature<Row, K>({\n mode: options.mode,\n defaultSelected: options.value ?? options.defaultValue,\n getKeys: () => latest.current.getKeys?.() ?? [],\n onChange: (keys) => latest.current.onChange?.(keys),\n }),\n )\n const internalSelection = useStore(model.store)\n const controlled = options.value !== undefined\n const wasControlled = React.useRef(controlled)\n const uncontrolledSnapshot = React.useRef<K[]>([])\n const hasUncontrolledSnapshot = React.useRef(!controlled)\n const lastControlledSnapshot = React.useRef<K[]>([...(options.value ?? [])])\n const leavingControlled = wasControlled.current && !controlled\n\n // Capture only genuine uncontrolled state. A rejected controlled mutation may\n // have left the model ahead of the prop; never let that proposal become the\n // next uncontrolled snapshot during the handoff render.\n if (controlled && !wasControlled.current) {\n // Store.batch updates Core synchronously while React may still expose the\n // previous external-store snapshot during this render.\n uncontrolledSnapshot.current = [...model.store.getState()]\n hasUncontrolledSnapshot.current = true\n }\n if (!controlled && !leavingControlled) {\n uncontrolledSnapshot.current = [...internalSelection]\n hasUncontrolledSnapshot.current = true\n }\n if (controlled) lastControlledSnapshot.current = [...(options.value ?? [])]\n const uncontrolledValue = leavingControlled\n ? hasUncontrolledSnapshot.current\n ? uncontrolledSnapshot.current\n : lastControlledSnapshot.current\n : internalSelection\n\n React.useEffect(() => {\n if (controlled) {\n const next = options.value ?? []\n lastControlledSnapshot.current = [...next]\n if (!sameKeys(model.get(), next)) model.sync(next)\n } else if (wasControlled.current) {\n const next = hasUncontrolledSnapshot.current\n ? uncontrolledSnapshot.current\n : lastControlledSnapshot.current\n if (!hasUncontrolledSnapshot.current) {\n uncontrolledSnapshot.current = [...next]\n hasUncontrolledSnapshot.current = true\n }\n if (!sameKeys(model.get(), next)) model.sync(next)\n }\n wasControlled.current = controlled\n }, [controlled, model, options.value ? [...options.value] : undefined])\n\n const rebase = React.useCallback(() => {\n if (latest.current.value !== undefined) model.sync(latest.current.value)\n }, [model])\n\n return {\n core,\n model,\n selection: [...(controlled ? (options.value ?? []) : uncontrolledValue)],\n controlled,\n rebase,\n }\n}\n","import * as React from 'react'\nimport {\n createGridRowsFeature,\n type GridRowKey,\n type GridCore,\n type GridRowsModel,\n type GridRowsTransaction,\n} from '@iris-ui-kit/core/grid'\nimport { useStoreSelector } from '../useStore'\nimport { useGridFeature } from './useGridFeature'\n\nexport interface UseGridRowsOptions<Row extends Record<string, unknown>, Meta = unknown> {\n cloneDefaultRows?: boolean\n rowKeyField?: string\n getRowKey?: (row: Row, index: number) => GridRowKey | undefined\n /** Read nested rows when the source is a tree; omitted keeps flat-row semantics. */\n getChildren?: (row: Row) => readonly Row[] | undefined\n /** Replace nested rows immutably when `getChildren` is not a direct property. */\n setChildren?: (row: Row, children: Row[]) => Row\n onBeforeRowsChange?: (transaction: GridRowsTransaction<Row, Meta>) => void\n onRowsChange?: (transaction: GridRowsTransaction<Row, Meta>) => void\n}\n\nexport interface UseGridRowsResult<Row extends Record<string, unknown>, Meta = unknown> {\n model: GridRowsModel<Row, Meta>\n rows: Row[]\n}\n\n/** Installs the single Grid Core row source and bridges it to React rendering. */\nexport function useGridRows<\n Row extends Record<string, unknown> = Record<string, unknown>,\n Meta = unknown,\n>(\n core: GridCore<Row>,\n initialRows: readonly Row[],\n options: UseGridRowsOptions<Row, Meta> = {},\n): UseGridRowsResult<Row, Meta> {\n const latest = React.useRef(options)\n latest.current = options\n\n const model = useGridFeature<Row, GridRowsModel<Row, Meta>>(core, 'rows', 'getRowsModel', () =>\n createGridRowsFeature<Row, Meta>({\n defaultRows: initialRows,\n cloneDefaultRows: options.cloneDefaultRows,\n rowKeyField: options.rowKeyField,\n getRowKey: (row: Row, index: number) => latest.current.getRowKey?.(row, index),\n getChildren: options.getChildren ? (row) => latest.current.getChildren?.(row) : undefined,\n setChildren: options.setChildren\n ? (row, children) => latest.current.setChildren?.(row, children) as Row\n : undefined,\n onBeforeRowsChange: (transaction) => latest.current.onBeforeRowsChange?.(transaction),\n onRowsChange: (transaction) => latest.current.onRowsChange?.(transaction),\n }),\n )\n const rows = useStoreSelector(model.store, (current) => [...current])\n return { model, rows }\n}\n","import * as React from 'react'\nimport {\n createTableMultiSortComparator,\n createTableSortComparator,\n resolveTableColumnValue,\n sortTableRows,\n} from '@iris-ui-kit/core'\nimport {\n createGridSortingFeature,\n type GridCore,\n type GridSortingModel,\n type SortState,\n} from '@iris-ui-kit/core/grid'\nimport { useStore } from '../useStore'\nimport { useGridFeature } from './useGridFeature'\n\nexport interface GridSortColumn<Row> {\n key: string\n dataIndex?: keyof Row | string\n formula?: string\n sortable?: boolean\n sorter?: (a: Row, b: Row) => number\n sortBy?: string\n sortType?: 'number' | 'string' | 'auto'\n}\n\nexport interface UseGridSortingOptions<Row> {\n leafColumns: GridSortColumn<Row>[]\n sort?: SortState | null\n defaultSort?: SortState | null\n onSortChange?: (next: SortState | null) => void\n multiSort?: boolean\n multiSortState?: SortState[]\n defaultMultiSort?: SortState[]\n onMultiSortChange?: (next: SortState[]) => void\n formulaTables?: Record<string, Row[]>\n}\n\nexport interface UseGridSortingResult<Row> {\n core: GridCore\n model: GridSortingModel\n sortState: SortState | null\n cycleSort: (column: GridSortColumn<Row>) => void\n setSort: (next: SortState | null) => void\n sortComparator: ((a: Row, b: Row) => number) | null\n sortedData: Row[]\n multiSortState: SortState[]\n cycleMultiSort: (column: GridSortColumn<Row>) => void\n setMultiSort: (next: SortState[]) => void\n multiSortComparator: ((a: Row, b: Row) => number) | null\n}\n\nfunction cloneSort(sort: SortState | null): SortState | null {\n return sort ? { ...sort } : null\n}\n\nfunction cloneSorts(sorts: readonly SortState[]): SortState[] {\n return sorts.map((sort) => ({ ...sort }))\n}\n\n/** Installs sorting state in Grid Core and derives React column comparators. */\nexport function useGridSorting<Row extends Record<string, unknown> = Record<string, unknown>>(\n core: GridCore<Row>,\n data: Row[],\n options: UseGridSortingOptions<Row>,\n): UseGridSortingResult<Row> {\n const latest = React.useRef(options)\n latest.current = options\n\n const model = useGridFeature<Row, GridSortingModel>(core, 'sorting', 'getSortingModel', () =>\n createGridSortingFeature<Row>({\n mode: options.multiSort ? 'multiple' : 'single',\n defaultSort: options.sort !== undefined ? options.sort : options.defaultSort,\n defaultMultiSort:\n options.multiSortState !== undefined ? options.multiSortState : options.defaultMultiSort,\n onSortChange: (next) => latest.current.onSortChange?.(next),\n onMultiSortChange: (next) => latest.current.onMultiSortChange?.(next),\n }),\n )\n const internalState = useStore(model.store)\n const sortControlled = options.sort !== undefined\n const multiControlled = options.multiSortState !== undefined\n // React dependency checks cannot observe mutations made through a stable prop\n // reference. Recompute these signatures on every render so controlled sync\n // remains content-sensitive without changing the Core model contract.\n const sortSignature = JSON.stringify(options.sort)\n const multiSortSignature = JSON.stringify(options.multiSortState)\n const wasSortControlled = React.useRef(sortControlled)\n const uncontrolledSort = React.useRef<SortState | null>(null)\n const hasUncontrolledSort = React.useRef(!sortControlled)\n const lastControlledSort = React.useRef<SortState | null>(cloneSort(options.sort ?? null))\n const wasMultiSortControlled = React.useRef(multiControlled)\n const uncontrolledMultiSort = React.useRef<SortState[]>([])\n const hasUncontrolledMultiSort = React.useRef(!multiControlled)\n const lastControlledMultiSort = React.useRef<SortState[]>(\n cloneSorts(options.multiSortState ?? []),\n )\n const leavingSortControlled = wasSortControlled.current && !sortControlled\n const leavingMultiSortControlled = wasMultiSortControlled.current && !multiControlled\n const enteringSortControlled = sortControlled && !wasSortControlled.current\n const enteringMultiSortControlled = multiControlled && !wasMultiSortControlled.current\n\n // Capture only genuine uncontrolled state. A rejected controlled proposal may\n // be ahead of the prop in the model, so it must not become the handoff value.\n if (enteringSortControlled || enteringMultiSortControlled) {\n // Read once before either controlled effect can synchronize its channel.\n const liveState = model.store.getState()\n if (enteringSortControlled) {\n uncontrolledSort.current = cloneSort(liveState.sort)\n hasUncontrolledSort.current = true\n }\n if (enteringMultiSortControlled) {\n uncontrolledMultiSort.current = cloneSorts(liveState.multiSort)\n hasUncontrolledMultiSort.current = true\n }\n }\n if (!sortControlled && !leavingSortControlled) {\n uncontrolledSort.current = cloneSort(internalState.sort)\n hasUncontrolledSort.current = true\n }\n if (!multiControlled && !leavingMultiSortControlled) {\n uncontrolledMultiSort.current = cloneSorts(internalState.multiSort)\n hasUncontrolledMultiSort.current = true\n }\n if (sortControlled) lastControlledSort.current = cloneSort(options.sort ?? null)\n if (multiControlled) {\n lastControlledMultiSort.current = cloneSorts(options.multiSortState ?? [])\n }\n\n const sortState = sortControlled\n ? cloneSort(options.sort ?? null)\n : cloneSort(\n leavingSortControlled\n ? hasUncontrolledSort.current\n ? uncontrolledSort.current\n : lastControlledSort.current\n : internalState.sort,\n )\n const multiSortState = multiControlled\n ? cloneSorts(options.multiSortState ?? [])\n : cloneSorts(\n leavingMultiSortControlled\n ? hasUncontrolledMultiSort.current\n ? uncontrolledMultiSort.current\n : lastControlledMultiSort.current\n : internalState.multiSort,\n )\n\n React.useEffect(() => {\n if (sortControlled) {\n const next = options.sort ?? null\n lastControlledSort.current = cloneSort(next)\n model.syncSort(next)\n } else if (wasSortControlled.current) {\n const restore = hasUncontrolledSort.current\n ? uncontrolledSort.current\n : lastControlledSort.current\n if (!hasUncontrolledSort.current) {\n uncontrolledSort.current = cloneSort(restore)\n hasUncontrolledSort.current = true\n }\n model.syncSort(restore)\n }\n wasSortControlled.current = sortControlled\n }, [model, options.sort, sortControlled, sortSignature])\n\n React.useEffect(() => {\n if (multiControlled) {\n const next = cloneSorts(options.multiSortState ?? [])\n lastControlledMultiSort.current = cloneSorts(next)\n model.syncMultiSort(next)\n } else if (wasMultiSortControlled.current) {\n const restore = hasUncontrolledMultiSort.current\n ? uncontrolledMultiSort.current\n : lastControlledMultiSort.current\n // Preserve the handoff value as the next uncontrolled baseline even if\n // Core was already equal and therefore emitted no store notification.\n uncontrolledMultiSort.current = cloneSorts(restore)\n hasUncontrolledMultiSort.current = true\n model.syncMultiSort(restore)\n }\n wasMultiSortControlled.current = multiControlled\n }, [model, multiControlled, options.multiSortState, multiSortSignature])\n\n const setSort = React.useCallback(\n (next: SortState | null) => {\n if (latest.current.sort !== undefined) model.syncSort(latest.current.sort ?? null)\n model.setSort(next)\n },\n [model],\n )\n const cycleSort = React.useCallback(\n (column: GridSortColumn<Row>) => {\n if (!column.sortable) return\n if (latest.current.sort !== undefined) model.syncSort(latest.current.sort ?? null)\n model.cycleSort(column.key)\n },\n [model],\n )\n const setMultiSort = React.useCallback(\n (next: SortState[]) => {\n if (latest.current.multiSortState !== undefined) {\n model.syncMultiSort(latest.current.multiSortState)\n }\n model.setMultiSort(next)\n },\n [model],\n )\n const cycleMultiSort = React.useCallback(\n (column: GridSortColumn<Row>) => {\n if (!column.sortable) return\n if (latest.current.multiSortState !== undefined) {\n model.syncMultiSort(latest.current.multiSortState)\n }\n model.cycleMultiSort(column.key)\n },\n [model],\n )\n\n const getValue = React.useCallback(\n (row: Row, column: GridSortColumn<Row>): unknown => {\n if (column.sortBy !== undefined) return row[column.sortBy as keyof Row]\n return resolveTableColumnValue(row, column, options.formulaTables)\n },\n [options.formulaTables],\n )\n\n const sortComparator = React.useMemo(\n () => createTableSortComparator(sortState, options.leafColumns, getValue),\n [getValue, options.leafColumns, sortState],\n )\n\n const multiSortComparator = React.useMemo(\n () => createTableMultiSortComparator(multiSortState, options.leafColumns, getValue),\n [getValue, options.leafColumns, multiSortState],\n )\n\n const sortedData = React.useMemo(\n () =>\n sortTableRows(data, options.leafColumns, {\n mode: options.multiSort ? 'multiple' : 'single',\n sort: sortState,\n multiSort: multiSortState,\n getValue,\n }),\n [data, getValue, multiSortState, options.leafColumns, options.multiSort, sortState],\n )\n\n return {\n core,\n model,\n sortState,\n cycleSort,\n setSort,\n sortComparator,\n sortedData,\n multiSortState,\n cycleMultiSort,\n setMultiSort,\n multiSortComparator,\n }\n}\n","import * as React from 'react'\nimport {\n createGridVirtualFeature,\n type GridCore,\n type GridVirtualModel,\n type GridVirtualRangeChange,\n} from '@iris-ui-kit/core/grid'\nimport { useGridFeature } from './useGridFeature'\n\nconst useIsomorphicLayoutEffect =\n typeof window === 'undefined' || typeof document === 'undefined'\n ? React.useEffect\n : React.useLayoutEffect\n\nexport interface UseGridVirtualOptions<Item> {\n items: readonly Item[]\n estimateSize: number | ((index: number) => number)\n viewportSize?: number\n scrollOffset?: number\n buffer?: number\n getItemKey?: (item: Item, index: number) => string | number\n onRangeChange?: (change: GridVirtualRangeChange) => void\n}\n\nexport interface UseGridVirtualResult {\n model: GridVirtualModel\n}\n\n/** Installs the virtual window controller; the viewport component remains the DOM bridge. */\nexport function useGridVirtual<\n Row extends Record<string, unknown> = Record<string, unknown>,\n Item = Row,\n>(core: GridCore<Row>, options: UseGridVirtualOptions<Item>): UseGridVirtualResult {\n const latest = React.useRef(options)\n latest.current = options\n\n const model = useGridFeature<Row, GridVirtualModel>(core, 'virtual', 'getVirtualModel', () =>\n createGridVirtualFeature<Row>({\n count: options.items.length,\n estimateSize: (index) => {\n const estimate = latest.current.estimateSize\n return typeof estimate === 'function' ? estimate(index) : estimate\n },\n viewportSize: options.viewportSize,\n scrollOffset: options.scrollOffset,\n buffer: options.buffer,\n fixedSize: typeof options.estimateSize === 'number' ? options.estimateSize : null,\n getItemKey: (index) => {\n const item = latest.current.items[index]\n const keyOf = latest.current.getItemKey\n return item !== undefined && keyOf ? keyOf(item, index) : index\n },\n onRangeChange: (change) => latest.current.onRangeChange?.(change),\n }),\n )\n\n // An item identity change can be a same-length reorder. setCount intentionally\n // rebuilds the offset tree so keyed measurements are re-seated correctly.\n useIsomorphicLayoutEffect(() => {\n model.setCount(options.items.length)\n }, [model, options.items, options.getItemKey])\n\n useIsomorphicLayoutEffect(() => {\n model.setBuffer(options.buffer ?? 0)\n }, [model, options.buffer])\n\n useIsomorphicLayoutEffect(() => {\n model.setEstimateSize(\n options.estimateSize,\n typeof options.estimateSize === 'number' ? options.estimateSize : null,\n )\n }, [model, options.estimateSize])\n\n useIsomorphicLayoutEffect(() => {\n if (options.viewportSize !== undefined) model.setViewportSize(options.viewportSize)\n }, [model, options.viewportSize])\n\n useIsomorphicLayoutEffect(() => {\n if (options.scrollOffset !== undefined) model.setScroll(options.scrollOffset)\n }, [model, options.scrollOffset])\n\n return { model }\n}\n"]}
|
|
@@ -34,17 +34,25 @@ function usePaginatedResource(fetcher, options = {}) {
|
|
|
34
34
|
latest.current = fetcher;
|
|
35
35
|
const ref = React.useRef(null);
|
|
36
36
|
if (ref.current === null) {
|
|
37
|
-
ref.current = createPaginatedResource(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
ref.current = createPaginatedResource(
|
|
38
|
+
(query, signal) => {
|
|
39
|
+
const current = latest.current;
|
|
40
|
+
return signal === void 0 ? current(query) : current(query, signal);
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
pageSize: options.pageSize,
|
|
44
|
+
mode: options.mode
|
|
45
|
+
}
|
|
46
|
+
);
|
|
41
47
|
}
|
|
42
48
|
const resource = ref.current;
|
|
43
49
|
const state = useStore(resource.store);
|
|
44
50
|
const initial = React.useRef({ immediate: options.immediate ?? false, mode: options.mode });
|
|
45
51
|
React.useEffect(() => {
|
|
46
|
-
if (
|
|
47
|
-
|
|
52
|
+
if (initial.current.immediate) {
|
|
53
|
+
void (initial.current.mode === "infinite" ? resource.loadMore() : resource.goToPage(1));
|
|
54
|
+
}
|
|
55
|
+
return () => resource.cancel();
|
|
48
56
|
}, [resource]);
|
|
49
57
|
return {
|
|
50
58
|
...state,
|
|
@@ -55,10 +63,11 @@ function usePaginatedResource(fetcher, options = {}) {
|
|
|
55
63
|
goToPage: resource.goToPage,
|
|
56
64
|
loadMore: resource.loadMore,
|
|
57
65
|
refresh: resource.refresh,
|
|
58
|
-
setPageSize: resource.setPageSize
|
|
66
|
+
setPageSize: resource.setPageSize,
|
|
67
|
+
cancel: resource.cancel
|
|
59
68
|
};
|
|
60
69
|
}
|
|
61
70
|
|
|
62
71
|
export { useAsyncResource, usePaginatedResource };
|
|
63
|
-
//# sourceMappingURL=chunk-
|
|
64
|
-
//# sourceMappingURL=chunk-
|
|
72
|
+
//# sourceMappingURL=chunk-3KYNBLRY.js.map
|
|
73
|
+
//# sourceMappingURL=chunk-3KYNBLRY.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/async/useAsyncResource.ts","../src/async/usePaginatedResource.ts"],"names":["React2"],"mappings":";;;;;AAmCO,SAAS,gBAAA,CACd,OAAA,EACA,OAAA,GAAsC,EAAC,EACT;AAC9B,EAAA,MAAM,MAAA,GAAe,aAAO,OAAO,CAAA;AACnC,EAAA,MAAA,CAAO,OAAA,GAAU,OAAA;AAEjB,EAAA,MAAM,GAAA,GAAY,aAAmC,IAAI,CAAA;AACzD,EAAA,IAAI,GAAA,CAAI,YAAY,IAAA,EAAM;AACxB,IAAA,MAAM,MAAA,GACJ,iBAAiB,OAAA,GAAU,EAAE,aAAa,OAAA,CAAQ,WAAA,KAAgB,EAAC;AACrE,IAAA,GAAA,CAAI,OAAA,GAAU,oBAA0B,CAAA,GAAI,MAAA,KAAW,OAAO,OAAA,CAAQ,GAAG,MAAM,CAAA,EAAG,MAAM,CAAA;AAAA,EAC1F;AACA,EAAA,MAAM,WAAW,GAAA,CAAI,OAAA;AACrB,EAAA,MAAM,KAAA,GAAQ,QAAA,CAAS,QAAA,CAAS,KAAK,CAAA;AAErC,EAAA,MAAM,SAAA,GAAkB,KAAA,CA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,MAAM,KAAA,GAAQ,QAAA,CAAS,QAAA,CAAS,KAAK,CAAA;AAErC,EAAA,MAAM,OAAA,GAAgBA,KAAA,CAAA,MAAA,CAAO,EAAE,SAAA,EAAW,OAAA,CAAQ,aAAa,KAAA,EAAO,IAAA,EAAM,OAAA,CAAQ,IAAA,EAAM,CAAA;AAC1F,EAAMA,gBAAU,MAAM;AACpB,IAAA,IAAI,OAAA,CAAQ,QAAQ,SAAA,EAAW;AAC7B,MAAA,MAAM,OAAA,CAAQ,QAAQ,IAAA,KAAS,UAAA,GAAa,SAAS,QAAA,EAAS,GAAI,QAAA,CAAS,QAAA,CAAS,CAAC,CAAA,CAAA;AAAA,IACvF;AACA,IAAA,OAAO,MAAM,SAAS,MAAA,EAAO;AAAA,EAC/B,CAAA,EAAG,CAAC,QAAQ,CAAC,CAAA;AAEb,EAAA,OAAO;AAAA,IACL,GAAG,KAAA;AAAA,IACH,SAAA,EAAW,MAAM,MAAA,KAAW,SAAA;AAAA,IAC5B,OAAA,EAAS,MAAM,MAAA,KAAW,OAAA;AAAA;AAAA,IAE1B,OAAA,EAAS,SAAS,OAAA,EAAQ;AAAA,IAC1B,UAAU,QAAA,CAAS,QAAA;AAAA,IACnB,UAAU,QAAA,CAAS,QAAA;AAAA,IACnB,SAAS,QAAA,CAAS,OAAA;AAAA,IAClB,aAAa,QAAA,CAAS,WAAA;AAAA,IACtB,QAAQ,QAAA,CAAS;AAAA,GACnB;AACF","file":"chunk-3KYNBLRY.js","sourcesContent":["import * as React from 'react'\nimport {\n createAsyncResource,\n type AsyncResource,\n type AsyncResourceConfig,\n type AsyncState,\n} from '@iris-ui-kit/core'\nimport { useStore } from '../useStore'\n\nexport interface UseAsyncResourceOptions<T> extends AsyncResourceConfig<T> {\n /** Run `load()` (no params) once on mount. Default `false`. */\n immediate?: boolean\n}\n\nexport interface UseAsyncResourceReturn<T, P extends unknown[]> extends AsyncState<T> {\n isLoading: boolean\n isError: boolean\n load: AsyncResource<T, P>['load']\n reload: AsyncResource<T, P>['reload']\n mutate: AsyncResource<T, P>['mutate']\n cancel: AsyncResource<T, P>['cancel']\n reset: AsyncResource<T, P>['reset']\n}\n\n/**\n * React binding for the framework-agnostic async resource. Instantiates the\n * resource once and bridges it via `useSyncExternalStore`. The fetcher is read\n * through a ref each render so it never goes stale, while seeding/immediacy are\n * captured on first render.\n *\n * ```tsx\n * const users = useAsyncResource(() => api.listUsers(), { immediate: true })\n * <IrisTable data={users.data ?? []} loading={users.isLoading} error={users.isError} />\n * ```\n */\nexport function useAsyncResource<T, P extends unknown[] = []>(\n fetcher: (...params: P) => Promise<T>,\n options: UseAsyncResourceOptions<T> = {},\n): UseAsyncResourceReturn<T, P> {\n const latest = React.useRef(fetcher)\n latest.current = fetcher\n\n const ref = React.useRef<AsyncResource<T, P> | null>(null)\n if (ref.current === null) {\n const config: AsyncResourceConfig<T> =\n 'initialData' in options ? { initialData: options.initialData } : {}\n ref.current = createAsyncResource<T, P>((...params) => latest.current(...params), config)\n }\n const resource = ref.current\n const state = useStore(resource.store)\n\n const immediate = React.useRef(options.immediate ?? false)\n React.useEffect(() => {\n if (immediate.current) void resource.load(...([] as unknown as P))\n // Abort any in-flight request on unmount so it can't write back into an\n // unmounted component (the token guard already prevents the state write;\n // this also cancels the underlying request when the fetcher honors signal).\n return () => resource.cancel()\n }, [resource])\n\n return {\n ...state,\n isLoading: state.status === 'loading',\n isError: state.status === 'error',\n load: resource.load,\n reload: resource.reload,\n mutate: resource.mutate,\n cancel: resource.cancel,\n reset: resource.reset,\n }\n}\n","import * as React from 'react'\nimport {\n createPaginatedResource,\n type PageQuery,\n type PageResult,\n type AdvancedPaginatedResource,\n type PaginatedState,\n type PaginationMode,\n} from '@iris-ui-kit/core'\nimport { useStore } from '../useStore'\n\nexport interface UsePaginatedResourceOptions {\n pageSize?: number\n mode?: PaginationMode\n /** Load the first page on mount (page 1, or `loadMore` in infinite mode). */\n immediate?: boolean\n}\n\nexport interface UsePaginatedResourceReturn<T> extends PaginatedState<T> {\n isLoading: boolean\n isError: boolean\n hasMore: boolean\n goToPage: AdvancedPaginatedResource<T>['goToPage']\n loadMore: AdvancedPaginatedResource<T>['loadMore']\n refresh: AdvancedPaginatedResource<T>['refresh']\n setPageSize: AdvancedPaginatedResource<T>['setPageSize']\n cancel: AdvancedPaginatedResource<T>['cancel']\n}\n\n/**\n * React binding for the server-side pagination resource. Instantiates once and\n * bridges via `useSyncExternalStore`; the fetcher is read through a ref so it\n * never goes stale.\n *\n * ```tsx\n * const p = usePaginatedResource((q) => api.rows(q), { pageSize: 25, immediate: true })\n * <IrisTable data={p.items} loading={p.isLoading} error={p.isError} />\n * <IrisPagination total={p.total ?? 0} value={p.page} onValueChange={p.goToPage} />\n * ```\n */\nexport function usePaginatedResource<T>(\n fetcher: (query: PageQuery, signal?: AbortSignal) => Promise<PageResult<T>>,\n options: UsePaginatedResourceOptions = {},\n): UsePaginatedResourceReturn<T> {\n const latest = React.useRef(fetcher)\n latest.current = fetcher\n\n const ref = React.useRef<AdvancedPaginatedResource<T> | null>(null)\n if (ref.current === null) {\n ref.current = createPaginatedResource<T>(\n (query, signal) => {\n const current = latest.current\n return signal === undefined ? current(query) : current(query, signal)\n },\n {\n pageSize: options.pageSize,\n mode: options.mode,\n },\n )\n }\n const resource = ref.current\n const state = useStore(resource.store)\n\n const initial = React.useRef({ immediate: options.immediate ?? false, mode: options.mode })\n React.useEffect(() => {\n if (initial.current.immediate) {\n void (initial.current.mode === 'infinite' ? resource.loadMore() : resource.goToPage(1))\n }\n return () => resource.cancel()\n }, [resource])\n\n return {\n ...state,\n isLoading: state.status === 'loading',\n isError: state.status === 'error',\n // `state` drives the re-render; hasMore() then reads the fresh batch state.\n hasMore: resource.hasMore(),\n goToPage: resource.goToPage,\n loadMore: resource.loadMore,\n refresh: resource.refresh,\n setPageSize: resource.setPageSize,\n cancel: resource.cancel,\n }\n}\n"]}
|
|
@@ -106,8 +106,11 @@ function IrisNavMenu({
|
|
|
106
106
|
boxSizing: "border-box",
|
|
107
107
|
border: "none",
|
|
108
108
|
borderRadius: "var(--iris-radius-md, 6px)",
|
|
109
|
-
background: opts.
|
|
110
|
-
|
|
109
|
+
background: opts.hovered && !opts.disabled ? horizontal && opts.depth === 0 ? "var(--iris-surface-hover, var(--iris-surface))" : opts.active ? "var(--iris-nav-item-active-hover, color-mix(in srgb, var(--iris-primary) 88%, black))" : "var(--iris-surface-hover, var(--iris-surface))" : opts.active && !(horizontal && opts.depth === 0) ? "var(--iris-primary)" : "transparent",
|
|
110
|
+
// antd 风格:水平模式选中 = 底部下划线(boxShadow 模拟)+ 文字色,
|
|
111
|
+
// 背景透明(hover 时浅背景,与 vertical 整块 primary 区分)
|
|
112
|
+
boxShadow: horizontal && opts.depth === 0 && opts.active ? "inset 0 -2px 0 0 var(--iris-primary)" : void 0,
|
|
113
|
+
color: opts.active ? horizontal && opts.depth === 0 ? "var(--iris-primary)" : "var(--iris-primary-foreground, #fff)" : opts.trail ? "var(--iris-primary)" : "var(--iris-foreground)",
|
|
111
114
|
font: "inherit",
|
|
112
115
|
fontSize: "var(--iris-font-size-md, 14px)",
|
|
113
116
|
fontWeight: opts.active || opts.trail ? 600 : 400,
|
|
@@ -925,7 +928,7 @@ function IrisAdminTabs({
|
|
|
925
928
|
width: 16,
|
|
926
929
|
height: 16,
|
|
927
930
|
border: "none",
|
|
928
|
-
borderRadius:
|
|
931
|
+
borderRadius: "var(--iris-radius-sm, 4px)",
|
|
929
932
|
background: "transparent",
|
|
930
933
|
color: "inherit",
|
|
931
934
|
cursor: "pointer",
|
|
@@ -1382,5 +1385,5 @@ function useAdminPreferences(preferences, hydrate = true) {
|
|
|
1382
1385
|
}
|
|
1383
1386
|
|
|
1384
1387
|
export { DropdownContext, IrisAdminBreadcrumb, IrisAdminLayout, IrisAdminTabs, IrisBreadcrumb, IrisBreadcrumbItem, IrisDropdown, IrisDropdownItem, IrisDropdownMenu, IrisDropdownSeparator, IrisDropdownTrigger, IrisIcon, IrisNavMenu, IrisSlot, useAdminPreferences, useAdminShell, useDropdownContext, useMachine, useTabsNav };
|
|
1385
|
-
//# sourceMappingURL=chunk-
|
|
1386
|
-
//# sourceMappingURL=chunk-
|
|
1388
|
+
//# sourceMappingURL=chunk-TDVRIHE6.js.map
|
|
1389
|
+
//# sourceMappingURL=chunk-TDVRIHE6.js.map
|