@reopt-ai/opt-ui 1.12.0 → 1.12.2
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/COMPONENT_CATALOG.md +138 -66
- package/README.md +6 -1
- package/dist/core/index.cjs +2 -2
- package/dist/core/index.js +2 -2
- package/dist/docs/02-components/01-core.md +41 -38
- package/dist/docs/02-components/02-visuals.md +1 -1
- package/dist/docs/02-components/03-shells.md +92 -33
- package/dist/docs/02-components/04-surfaces.md +1 -1
- package/dist/docs/02-components/index.md +1 -1
- package/dist/{field-sidebar-BuO37l4c.js → field-sidebar-BXAXigMS.js} +2 -2
- package/dist/{field-sidebar-BYgEmdy0.cjs → field-sidebar-D0ITbhfJ.cjs} +2 -2
- package/dist/index.cjs +29 -10
- package/dist/index.d.cts +10 -5
- package/dist/index.d.ts +10 -5
- package/dist/index.js +29 -10
- package/dist/{key-pad-menu-SItoHPLu.cjs → key-pad-menu-1YN221Oi.cjs} +1 -1
- package/dist/{key-pad-menu-Di2aRGbM.js → key-pad-menu-CUiQ-vKw.js} +1 -1
- package/dist/meta.cjs +218 -11
- package/dist/meta.js +218 -11
- package/dist/query.cjs +19 -6
- package/dist/query.js +19 -6
- package/dist/shells/index.cjs +1 -1
- package/dist/shells/index.js +1 -1
- package/dist/tailwind.css +7 -0
- package/dist/{text-truncate-DSuZECy0.js → text-truncate-BFWd2cE_.js} +116 -116
- package/dist/{text-truncate-I1XLWmRa.cjs → text-truncate-DsG5UAOY.cjs} +115 -115
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Shell Components"
|
|
3
3
|
description: "86 Shell layer components — props, examples, keyboard shortcuts."
|
|
4
|
-
version: "1.12.
|
|
4
|
+
version: "1.12.1"
|
|
5
5
|
generated: true
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -299,37 +299,38 @@ import { AppShell } from "@reopt-ai/opt-ui";
|
|
|
299
299
|
|
|
300
300
|
## Data Display
|
|
301
301
|
|
|
302
|
-
| Component | Description
|
|
303
|
-
| ------------------- |
|
|
304
|
-
| DataTable | 제네릭 데이터 테이블.
|
|
305
|
-
| InlineEditTable | 인라인 편집 테이블. 더블클릭으로 셀 편집, Enter 확정, Escape 취소.
|
|
306
|
-
| TreeTable | 계층형 트리 테이블. 재귀 행 렌더링 + 펼침/접기 셰브론.
|
|
307
|
-
| DomainTable | 도메인 테이블. Composite 기반 그리드로 키보드 탐색 지원.
|
|
308
|
-
| QueryResultsTable | 쿼리 결과 테이블. SQL 결과와 스크린 리더에 안내되는 로딩, 에러, 빈 상태를 지원합니다.
|
|
309
|
-
| DashboardGrid | Composite 기반 통계 카드 그리드. 유효한 1–4열 레이아웃과 화살표 키 2D 탐색을 지원합니다.
|
|
310
|
-
| SummaryRow | 통계 요약 행. StatCard 그리드 레이아웃을 표준화합니다. loading 시 SkeletonCard 표시.
|
|
311
|
-
| CodeSnippetViewer | 코드 스니펫 뷰어. 줄 번호, 복사 버튼, 포커스 가능한 스크롤 영역, syntaxTheme 톤을 지원합니다.
|
|
312
|
-
| CodeDiffViewer | 코드 비교 뷰어. LCS 알고리즘 기반 unified/split 모드 diff와 포커스 가능한 스크롤 영역을 제공합니다.
|
|
313
|
-
| ConnectionIndicator | 연결 상태 표시기. connected, connecting, disconnected, error 상태를 지원합니다.
|
|
314
|
-
| EventIcon | 이벤트 아이콘. semantic key 또는 ReactNode 아이콘과 배경색을 표시합니다.
|
|
302
|
+
| Component | Description | Key Exports |
|
|
303
|
+
| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------- |
|
|
304
|
+
| DataTable | 제네릭 데이터 테이블. 제목은 opt-in이고 ariaLabel로 grid를 이름 붙이며, 동적 컬럼·안전 정렬·키보드 리사이즈·Composite 탐색을 지원합니다. | `DataTable` |
|
|
305
|
+
| InlineEditTable | 인라인 편집 테이블. 더블클릭으로 셀 편집, Enter 확정, Escape 취소. | `InlineEditTable` |
|
|
306
|
+
| TreeTable | 계층형 트리 테이블. 재귀 행 렌더링 + 펼침/접기 셰브론. | `TreeTable` |
|
|
307
|
+
| DomainTable | 도메인 테이블. Composite 기반 그리드로 키보드 탐색 지원. | `DomainTable` |
|
|
308
|
+
| QueryResultsTable | 쿼리 결과 테이블. SQL 결과와 스크린 리더에 안내되는 로딩, 에러, 빈 상태를 지원합니다. | `QueryResultsTable` |
|
|
309
|
+
| DashboardGrid | Composite 기반 통계 카드 그리드. 유효한 1–4열 레이아웃과 화살표 키 2D 탐색을 지원합니다. | `DashboardGrid` |
|
|
310
|
+
| SummaryRow | 통계 요약 행. StatCard 그리드 레이아웃을 표준화합니다. loading 시 SkeletonCard 표시. | `SummaryRow` |
|
|
311
|
+
| CodeSnippetViewer | 코드 스니펫 뷰어. 줄 번호, 복사 버튼, 포커스 가능한 스크롤 영역, syntaxTheme 톤을 지원합니다. | `CodeSnippetViewer` |
|
|
312
|
+
| CodeDiffViewer | 코드 비교 뷰어. LCS 알고리즘 기반 unified/split 모드 diff와 포커스 가능한 스크롤 영역을 제공합니다. | `CodeDiffViewer` |
|
|
313
|
+
| ConnectionIndicator | 연결 상태 표시기. connected, connecting, disconnected, error 상태를 지원합니다. | `ConnectionIndicator` |
|
|
314
|
+
| EventIcon | 이벤트 아이콘. semantic key 또는 ReactNode 아이콘과 배경색을 표시합니다. | `EventIcon`, `POPULAR_ICONS`, `COLOR_PRESETS` |
|
|
315
315
|
|
|
316
316
|
### DataTable
|
|
317
317
|
|
|
318
|
-
> 제네릭 데이터 테이블.
|
|
318
|
+
> 제네릭 데이터 테이블. 제목은 opt-in이고 ariaLabel로 grid를 이름 붙이며, 동적 컬럼·안전 정렬·키보드 리사이즈·Composite 탐색을 지원합니다.
|
|
319
319
|
|
|
320
320
|
**Import:** `import { DataTable } from "@reopt-ai/opt-ui"`
|
|
321
321
|
**Dependencies:** composite-zone (core), button (core), checkbox (core)
|
|
322
322
|
|
|
323
323
|
**DataTable:**
|
|
324
324
|
|
|
325
|
-
| Prop | Type | Required | Default | Description
|
|
326
|
-
| -------------- | -------------------- | -------- | ------------------- |
|
|
327
|
-
| `data` | `T[]` | Yes | | 테이블 데이터 배열
|
|
328
|
-
| `columns` | `ColumnDef<T>[]` | Yes | | 컬럼 정의. { id, header, accessor, width?, align? }
|
|
329
|
-
| `keyExtractor` | `(row: T) => string` | Yes | | 각 행의 고유 키 추출 함수
|
|
330
|
-
| `title` | `string` | |
|
|
331
|
-
| `
|
|
332
|
-
| `
|
|
325
|
+
| Prop | Type | Required | Default | Description |
|
|
326
|
+
| -------------- | -------------------- | -------- | ------------------- | ----------------------------------------------------------- |
|
|
327
|
+
| `data` | `T[]` | Yes | | 테이블 데이터 배열 |
|
|
328
|
+
| `columns` | `ColumnDef<T>[]` | Yes | | 컬럼 정의. { id, header, accessor, width?, align? } |
|
|
329
|
+
| `keyExtractor` | `(row: T) => string` | Yes | | 각 행의 고유 키 추출 함수 |
|
|
330
|
+
| `title` | `string` | | | 테이블 위에 표시할 제목. 생략하면 제목 영역을 렌더하지 않음 |
|
|
331
|
+
| `ariaLabel` | `string` | | | 보이는 제목이 없을 때 grid에 제공할 접근 가능한 이름 |
|
|
332
|
+
| `onRowClick` | `(row: T) => void` | | | 행 클릭 핸들러 |
|
|
333
|
+
| `emptyMessage` | `string` | | "No data available" | 데이터 없을 때 표시할 메시지 |
|
|
333
334
|
|
|
334
335
|
**ColumnDef:**
|
|
335
336
|
|
|
@@ -1135,14 +1136,14 @@ const fields = [
|
|
|
1135
1136
|
|
|
1136
1137
|
## Analytics
|
|
1137
1138
|
|
|
1138
|
-
| Component | Description
|
|
1139
|
-
| ---------------- |
|
|
1140
|
-
| SqlEditor | SQL 에디터. CodeMirror 기반의 SQL 편집기로 구문 강조와 자동 완성을 지원합니다.
|
|
1141
|
-
| EventMetaEditor | 이벤트
|
|
1142
|
-
| PropertyExplorer |
|
|
1143
|
-
| RichTextEditor | 마크다운 리치 텍스트 에디터. 서식 툴바 + textarea 조합.
|
|
1144
|
-
| ExportButton | 데이터 내보내기 버튼. CSV/JSON 변환 내장, PDF는 콜백 위임. DropdownMenu 기반.
|
|
1145
|
-
| InsightsPanel | 이상 탐지 인사이트 패널. severity별 카드, 통계 필터, dismiss 기능, 검출 설정(유형/Z-score/days).
|
|
1139
|
+
| Component | Description | Key Exports |
|
|
1140
|
+
| ---------------- | ---------------------------------------------------------------------------------------------------------- | ------------------ |
|
|
1141
|
+
| SqlEditor | SQL 에디터. CodeMirror 기반의 SQL 편집기로 구문 강조와 자동 완성을 지원합니다. | `SqlEditor` |
|
|
1142
|
+
| EventMetaEditor | 기본 이벤트 메타와 호출자 소유 섹션을 한 폼에서 편집하고, footer의 한 액션으로 함께 저장할 수 있습니다. | `EventMetaEditor` |
|
|
1143
|
+
| PropertyExplorer | 검색 가능한 속성 목록을 그룹별로 표시하고, 숨김 상태와 호출자 소유의 명시적인 편집 액션을 함께 제공합니다. | `PropertyExplorer` |
|
|
1144
|
+
| RichTextEditor | 마크다운 리치 텍스트 에디터. 서식 툴바 + textarea 조합. | `RichTextEditor` |
|
|
1145
|
+
| ExportButton | 데이터 내보내기 버튼. CSV/JSON 변환 내장, PDF는 콜백 위임. DropdownMenu 기반. | `ExportButton` |
|
|
1146
|
+
| InsightsPanel | 이상 탐지 인사이트 패널. severity별 카드, 통계 필터, dismiss 기능, 검출 설정(유형/Z-score/days). | `InsightsPanel` |
|
|
1146
1147
|
|
|
1147
1148
|
### SqlEditor
|
|
1148
1149
|
|
|
@@ -1172,18 +1173,61 @@ const fields = [
|
|
|
1172
1173
|
|
|
1173
1174
|
### EventMetaEditor
|
|
1174
1175
|
|
|
1175
|
-
> 이벤트
|
|
1176
|
+
> 기본 이벤트 메타와 호출자 소유 섹션을 한 폼에서 편집하고, footer의 한 액션으로 함께 저장할 수 있습니다.
|
|
1176
1177
|
|
|
1177
1178
|
**Import:** `import { EventMetaEditor } from "@reopt-ai/opt-ui"`
|
|
1178
1179
|
**Dependencies:** input (core), icon-picker (core), color-picker (core), tag-input (core)
|
|
1179
1180
|
|
|
1181
|
+
**EventMetaEditor:**
|
|
1182
|
+
|
|
1183
|
+
| Prop | Type | Required | Default | Description |
|
|
1184
|
+
| ----------- | --------------------------- | -------- | ------- | ------------------------------------------------------ |
|
|
1185
|
+
| `value` | `EventMeta` | Yes | | 편집 중인 이벤트 메타데이터 |
|
|
1186
|
+
| `onChange` | `(meta: EventMeta) => void` | Yes | | 메타데이터 변경 |
|
|
1187
|
+
| `icons` | `IconDef[]` | | | 선택 가능한 아이콘 |
|
|
1188
|
+
| `sections` | `EventMetaEditorSection[]` | | | 기본 여섯 필드 뒤에 렌더할 호출자 소유 섹션 |
|
|
1189
|
+
| `footer` | `ReactNode` | | | 내장 필드와 추가 섹션을 함께 저장하는 마지막 액션 영역 |
|
|
1190
|
+
| `className` | `string` | | | 추가 CSS 클래스 |
|
|
1191
|
+
| `labels` | `EventMetaEditorLabels` | | | 필드 레이블과 placeholder 문구 |
|
|
1192
|
+
|
|
1193
|
+
**EventMetaEditorSection:**
|
|
1194
|
+
|
|
1195
|
+
| Prop | Type | Required | Default | Description |
|
|
1196
|
+
| ------------- | ----------- | -------- | ------- | ---------------------------- |
|
|
1197
|
+
| `id` | `string` | Yes | | 섹션 키 |
|
|
1198
|
+
| `title` | `ReactNode` | | | 섹션 제목 |
|
|
1199
|
+
| `description` | `ReactNode` | | | 섹션 변경이 미치는 영향 안내 |
|
|
1200
|
+
| `children` | `ReactNode` | Yes | | 호출자가 소유하는 필드 |
|
|
1201
|
+
|
|
1180
1202
|
### PropertyExplorer
|
|
1181
1203
|
|
|
1182
|
-
>
|
|
1204
|
+
> 검색 가능한 속성 목록을 그룹별로 표시하고, 숨김 상태와 호출자 소유의 명시적인 편집 액션을 함께 제공합니다.
|
|
1183
1205
|
|
|
1184
1206
|
**Import:** `import { PropertyExplorer } from "@reopt-ai/opt-ui"`
|
|
1185
1207
|
**Dependencies:** input (core)
|
|
1186
1208
|
|
|
1209
|
+
**PropertyExplorer:**
|
|
1210
|
+
|
|
1211
|
+
| Prop | Type | Required | Default | Description |
|
|
1212
|
+
| ----------- | --------------------------------- | -------- | ------- | -------------------------------------------------------------- |
|
|
1213
|
+
| `groups` | `PropertyGroup[]` | Yes | | 그룹별 속성 목록. 각 속성은 dataType과 hidden 상태를 포함 가능 |
|
|
1214
|
+
| `onSelect` | `(property: PropertyDef) => void` | | | 속성 선택 |
|
|
1215
|
+
| `onEdit` | `(property: PropertyDef) => void` | | | 행에 명시적인 편집 버튼을 표시하고 선택한 속성을 전달 |
|
|
1216
|
+
| `className` | `string` | | | 추가 CSS 클래스 |
|
|
1217
|
+
| `labels` | `PropertyExplorerLabels` | | | 검색·빈 상태·편집·숨김 문구 |
|
|
1218
|
+
|
|
1219
|
+
**PropertyDef:**
|
|
1220
|
+
|
|
1221
|
+
| Prop | Type | Required | Default | Description |
|
|
1222
|
+
| -------------- | --------------- | -------- | ------- | ------------------------------------------------- |
|
|
1223
|
+
| `name` | `string` | Yes | | 속성 이름 |
|
|
1224
|
+
| `type` | `string` | Yes | | 원본 스키마 타입 |
|
|
1225
|
+
| `dataType` | `FieldDataType` | | | 호출자가 이미 판정한 opt-ui 필드 타입 |
|
|
1226
|
+
| `description` | `string` | | | 속성 설명 |
|
|
1227
|
+
| `exampleValue` | `string` | | | 예시 값 |
|
|
1228
|
+
| `eventCount` | `number` | | | 관측 이벤트 수 |
|
|
1229
|
+
| `hidden` | `boolean` | | | 피커에서는 숨기되 탐색기에서는 흐리게 표시할 상태 |
|
|
1230
|
+
|
|
1187
1231
|
### RichTextEditor
|
|
1188
1232
|
|
|
1189
1233
|
> 마크다운 리치 텍스트 에디터. 서식 툴바 + textarea 조합.
|
|
@@ -1724,6 +1768,8 @@ const messages = [
|
|
|
1724
1768
|
| `footer` | `ReactNode` | | | 인스펙터 하단 |
|
|
1725
1769
|
| `breakpoint` | `"lg" \| "xl" \| "2xl"` | | "xl" | 이 폭 이상이면 push |
|
|
1726
1770
|
| `width` | `"sm" \| "md" \| "lg"` | | "md" | push 레이아웃에서의 인스펙터 폭 |
|
|
1771
|
+
| `labels` | `InspectorLayoutLabels` | | | 닫기 버튼 등 인스펙터 문구 |
|
|
1772
|
+
| `className` | `string` | | | 추가 CSS 클래스 |
|
|
1727
1773
|
|
|
1728
1774
|
### QueryFilterBar
|
|
1729
1775
|
|
|
@@ -1742,6 +1788,8 @@ const messages = [
|
|
|
1742
1788
|
| `live` | `boolean` | | false | 매 입력마다 커밋 |
|
|
1743
1789
|
| `disabled` | `boolean` | | false | 전체 비활성 |
|
|
1744
1790
|
| `queryBarLabels` | `QueryBarLabels` | | | QueryBar로 통과되는 나머지 문구. placeholder/ariaLabel은 labels가 이깁니다 |
|
|
1791
|
+
| `labels` | `QueryFilterBarLabels` | | | 검색·필터·초기화 문구 |
|
|
1792
|
+
| `className` | `string` | | | 추가 CSS 클래스 |
|
|
1745
1793
|
|
|
1746
1794
|
### CatalogFrame
|
|
1747
1795
|
|
|
@@ -1784,6 +1832,7 @@ const messages = [
|
|
|
1784
1832
|
| `error` | `ReactNode` | | | 읽기 실패. 빈 목록과 다른 답 |
|
|
1785
1833
|
| `onRetry` | `() => void` | | | 재시도 |
|
|
1786
1834
|
| `labels` | `CatalogFrameLabels` | | | 빈/필터된 빈/에러 문구 |
|
|
1835
|
+
| `className` | `string` | | | 추가 CSS 클래스 |
|
|
1787
1836
|
|
|
1788
1837
|
**CatalogRowActions:**
|
|
1789
1838
|
|
|
@@ -1794,6 +1843,16 @@ const messages = [
|
|
|
1794
1843
|
| `visibleCount` | `number` | | 2 | 오버플로 전에 노출할 개수. available 필터링 후에 적용됨 |
|
|
1795
1844
|
| `labels` | `CatalogRowActionsLabels` | | | 그룹·오버플로 라벨 |
|
|
1796
1845
|
|
|
1846
|
+
**CatalogRowAction:**
|
|
1847
|
+
|
|
1848
|
+
| Prop | Type | Required | Default | Description |
|
|
1849
|
+
| ----------- | ---------------------- | -------- | ------- | ----------------------------------------------- |
|
|
1850
|
+
| `id` | `string` | Yes | | 액션 키 |
|
|
1851
|
+
| `label` | `string` | Yes | | 액션 문구 |
|
|
1852
|
+
| `icon` | `ReactNode` | | | 선택적 액션 아이콘 |
|
|
1853
|
+
| `onSelect` | `(item: T) => void` | Yes | | 행과 함께 호출되는 액션 |
|
|
1854
|
+
| `available` | `(item: T) => boolean` | | | 이 행에 적용되지 않는 액션을 비활성화 대신 제거 |
|
|
1855
|
+
|
|
1797
1856
|
**CatalogCellControls:**
|
|
1798
1857
|
|
|
1799
1858
|
| Prop | Type | Required | Default | Description |
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { $n as OPT_TEXT_LABEL, $t as
|
|
2
|
+
import { $n as OPT_TEXT_LABEL, $t as ToolbarButton$1, A as FormRadio$1, An as OPT_BADGE_RED, At as DialogPanel$1, B as FormSubmit$1, Bn as OPT_FOCUS, Bt as TabsRoot$1, Dn as OPT_BADGE_BLUE, E as FormLabel$1, En as OPT_ANIMATE_ENTER_EXIT, F as FormSelect, Fn as OPT_DIVIDER, Ft as SelectRoot$1, Gn as OPT_ITEM_BASE, Gt as CompositeItem, Ht as DisclosureRoot$1, I as FormSelectItem, It as SelectTrigger$1, K as useFormStore, Kn as OPT_SURFACE, Kt as CompositeProvider, L as FormSelectPopover, Ln as OPT_DOT_GREEN, Lt as Tab$1, Mn as OPT_BORDER, Mt as SelectItem$1, Nn as OPT_DISCLOSURE_CONTENT, Nt as SelectLabel$1, On as OPT_BADGE_GREEN, P as FormRoot$1, Pn as OPT_DISCLOSURE_TRIGGER, Pt as SelectPopover$1, Rn as OPT_DOT_RED, Rt as TabList$1, T as FormInput$1, U as FormTextarea, Un as OPT_INPUT, Ut as DisclosureTrigger$1, V as FormSwitch$1, Vn as OPT_FOCUS_VISIBLE, Vt as DisclosureContent$1, Wt as Composite, Xn as OPT_TD, Y as TagInput, Yn as OPT_TABLE_ROW_ACTIVE, Yt as Meter$1, Zn as OPT_TD_MUTED, Zt as Input, an as TooltipProvider$1, ar as _objectWithoutProperties, at as MenuButtonArrow$1, b as FormError$1, bt as ComboboxPopover$1, c as Checkbox, cn as Badge, ct as MenuItemRadio$1, dt as MenuSeparator$1, en as ToolbarContainer$1, er as OPT_TEXT_PRIMARY, et as PopoverContent$1, ft as MenuTrigger$1, h as FormCheckbox$1, hn as Skeleton, ht as ComboboxEmpty, i as FieldToken, in as TooltipAnchor$1, ir as _objectSpread2, j as FormRadioGroup$1, jn as OPT_BADGE_YELLOW, jt as DialogRoot$1, kn as OPT_BADGE_NEUTRAL, kt as DialogHeading$1, ln as EmptyState, lt as MenuPopover$1, m as formatOptTime, mn as StatCard, mt as MenubarRoot$1, n as Highlight, nn as ToolbarSeparator$1, nr as OPT_TEXT_TERTIARY, nt as PopoverTrigger$1, on as Alert, or as Kbd, ot as MenuItem$1, pt as MenubarContainer$1, qn as OPT_SURFACE_POPOVER, qt as CompositeRow, rn as Tooltip$1, rr as OPT_TH, s as Pagination, sn as Spinner, sr as cn, st as MenuItemCheckbox$1, t as TextTruncate, tn as ToolbarRoot$1, tr as OPT_TEXT_SECONDARY, tt as PopoverRoot$1, u as OPT_UI_DEFAULT_LOCALE, un as Button, ut as MenuRoot$1, vt as ComboboxInput$1, wn as OPT_ACTIVE_ITEM, wt as DialogDescription$1, xt as ComboboxRoot$1, yt as ComboboxItem$1, zn as OPT_DOT_YELLOW, zt as TabPanel$1 } from "./text-truncate-BFWd2cE_.js";
|
|
3
3
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { Fragment as Fragment$1, createContext, forwardRef, memo, useCallback, useContext, useEffect, useId, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
@@ -2943,7 +2943,7 @@ function Flyout({ open, onClose, title, description, type = "overlay", side = "r
|
|
|
2943
2943
|
});
|
|
2944
2944
|
if (type === "inline") return panel;
|
|
2945
2945
|
return /* @__PURE__ */ jsxs(Fragment, { children: [scrim && /* @__PURE__ */ jsx("div", {
|
|
2946
|
-
className: "bg-
|
|
2946
|
+
className: "bg-scrim fixed inset-0 z-30",
|
|
2947
2947
|
"aria-hidden": "true"
|
|
2948
2948
|
}), panel] });
|
|
2949
2949
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
const require_text_truncate = require("./text-truncate-
|
|
2
|
+
const require_text_truncate = require("./text-truncate-DsG5UAOY.cjs");
|
|
3
3
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
4
|
let react = require("react");
|
|
5
5
|
react = require_text_truncate.__toESM(react, 1);
|
|
@@ -2944,7 +2944,7 @@ function Flyout({ open, onClose, title, description, type = "overlay", side = "r
|
|
|
2944
2944
|
});
|
|
2945
2945
|
if (type === "inline") return panel;
|
|
2946
2946
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [scrim && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2947
|
-
className: "bg-
|
|
2947
|
+
className: "bg-scrim fixed inset-0 z-30",
|
|
2948
2948
|
"aria-hidden": "true"
|
|
2949
2949
|
}), panel] });
|
|
2950
2950
|
}
|
package/dist/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const require_text_truncate = require("./text-truncate-
|
|
4
|
-
const require_key_pad_menu = require("./key-pad-menu-
|
|
5
|
-
const require_field_sidebar = require("./field-sidebar-
|
|
3
|
+
const require_text_truncate = require("./text-truncate-DsG5UAOY.cjs");
|
|
4
|
+
const require_key_pad_menu = require("./key-pad-menu-1YN221Oi.cjs");
|
|
5
|
+
const require_field_sidebar = require("./field-sidebar-D0ITbhfJ.cjs");
|
|
6
6
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
7
|
let react = require("react");
|
|
8
8
|
react = require_text_truncate.__toESM(react, 1);
|
|
@@ -149,6 +149,10 @@ const dotSize = {
|
|
|
149
149
|
* The dot is decorative on purpose. It never carries meaning the text does not
|
|
150
150
|
* also carry, so the component cannot be used to say something in colour alone.
|
|
151
151
|
*
|
|
152
|
+
* Without a `hint` this renders one span and nothing else: a table repeats this
|
|
153
|
+
* on every row, and a tooltip's provider, listeners and floating context are
|
|
154
|
+
* not a cost worth paying hundreds of times for rows that have nothing to say.
|
|
155
|
+
*
|
|
152
156
|
* @example
|
|
153
157
|
* ```tsx
|
|
154
158
|
* <StatusDot tone="warning" hint="7일 이상 수신되지 않음">비활성</StatusDot>
|
|
@@ -156,9 +160,9 @@ const dotSize = {
|
|
|
156
160
|
*/
|
|
157
161
|
function StatusDot(_ref) {
|
|
158
162
|
let { tone = "neutral", size = "md", hint, className, children } = _ref, props = require_text_truncate._objectWithoutProperties(_ref, _excluded$1);
|
|
159
|
-
|
|
160
|
-
className: require_text_truncate.cn("inline-flex items-center whitespace-nowrap", sizeStyles$2[size], textTone[tone], className),
|
|
161
|
-
|
|
163
|
+
const dot = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({
|
|
164
|
+
className: require_text_truncate.cn("inline-flex items-center whitespace-nowrap", sizeStyles$2[size], textTone[tone], hint && "focus-visible:ring-ring rounded-sm outline-none focus-visible:ring-2", className),
|
|
165
|
+
tabIndex: hint ? 0 : void 0
|
|
162
166
|
}, props), {}, {
|
|
163
167
|
"data-opt-id": "N51AT",
|
|
164
168
|
"data-opt-slug": "status-dot.StatusDot",
|
|
@@ -168,6 +172,8 @@ function StatusDot(_ref) {
|
|
|
168
172
|
"aria-hidden": "true"
|
|
169
173
|
}), children]
|
|
170
174
|
}));
|
|
175
|
+
if (!hint) return dot;
|
|
176
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.TooltipProvider, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.TooltipAnchor, { render: dot }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Tooltip, { children: hint })] });
|
|
171
177
|
}
|
|
172
178
|
//#endregion
|
|
173
179
|
//#region src/core/copy-button.tsx
|
|
@@ -4478,6 +4484,19 @@ function toText(value) {
|
|
|
4478
4484
|
if (typeof value === "number" || typeof value === "boolean") return String(value);
|
|
4479
4485
|
return JSON.stringify(value);
|
|
4480
4486
|
}
|
|
4487
|
+
/**
|
|
4488
|
+
* The values one field holds, as a list.
|
|
4489
|
+
*
|
|
4490
|
+
* A clause names a single value, so an array field has to be read element by
|
|
4491
|
+
* element: `tag:pay` asks whether *any* tag is `pay`, not whether the whole
|
|
4492
|
+
* list stringifies to it — and `toText` on an array produces `["pay","cart"]`,
|
|
4493
|
+
* which no user ever types. Scalars read as a list of one so both shapes take
|
|
4494
|
+
* the same path, and negation stays where it already is: `matchesQuery` flips
|
|
4495
|
+
* the result, so `-tag:pay` correctly means "no element matches".
|
|
4496
|
+
*/
|
|
4497
|
+
function readValues(value) {
|
|
4498
|
+
return Array.isArray(value) ? value : [value];
|
|
4499
|
+
}
|
|
4481
4500
|
function compare(left, right) {
|
|
4482
4501
|
const leftNumber = typeof left === "number" ? left : Number(toText(left));
|
|
4483
4502
|
const rightNumber = Number(right);
|
|
@@ -4488,9 +4507,9 @@ function matchesClause(clause, read, searchable) {
|
|
|
4488
4507
|
if (clause.type === "term") return searchable().toLowerCase().includes(clause.value.toLowerCase());
|
|
4489
4508
|
const value = read(clause.field);
|
|
4490
4509
|
switch (clause.operator) {
|
|
4491
|
-
case "exists": return value !== void 0 &&
|
|
4492
|
-
case "eq": return clause.values.some((candidate) =>
|
|
4493
|
-
case "contains": return clause.values.some((candidate) =>
|
|
4510
|
+
case "exists": return readValues(value).some((item) => item !== void 0 && item !== null && item !== "");
|
|
4511
|
+
case "eq": return clause.values.some((candidate) => readValues(value).some((item) => toText(item).toLowerCase() === candidate.toLowerCase()));
|
|
4512
|
+
case "contains": return clause.values.some((candidate) => readValues(value).some((item) => toText(item).toLowerCase().includes(candidate.toLowerCase())));
|
|
4494
4513
|
case "gt":
|
|
4495
4514
|
var _clause$values$;
|
|
4496
4515
|
return compare(value, (_clause$values$ = clause.values[0]) !== null && _clause$values$ !== void 0 ? _clause$values$ : "") > 0;
|
|
@@ -4526,7 +4545,7 @@ function matchesQueryObject(query, row, options = {}) {
|
|
|
4526
4545
|
let cached = null;
|
|
4527
4546
|
const searchable = () => {
|
|
4528
4547
|
var _cached;
|
|
4529
|
-
(_cached = cached) !== null && _cached !== void 0 || (cached = [...Object.values(row).
|
|
4548
|
+
(_cached = cached) !== null && _cached !== void 0 || (cached = [...Object.values(row).flatMap((value) => Array.isArray(value) ? value.filter((item) => typeof item !== "object") : typeof value === "object" ? [] : [value]), ...Object.values(nested !== null && nested !== void 0 ? nested : {})].map(toText).join(" "));
|
|
4530
4549
|
return cached;
|
|
4531
4550
|
};
|
|
4532
4551
|
return matchesQuery(query, read, searchable);
|
package/dist/index.d.cts
CHANGED
|
@@ -64,12 +64,13 @@ interface StatusDotProps extends Omit<ComponentPropsWithoutRef<"span">, "childre
|
|
|
64
64
|
*/
|
|
65
65
|
children: ReactNode;
|
|
66
66
|
/**
|
|
67
|
-
* How the state was decided
|
|
67
|
+
* How the state was decided.
|
|
68
68
|
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
69
|
+
* Shown in a tooltip that opens on hover and on keyboard focus, so the rule
|
|
70
|
+
* is reachable without a pointer. Giving a hint makes the dot a tab stop —
|
|
71
|
+
* the only way a keyboard reader can reach it — so it is still a bonus for
|
|
72
|
+
* the curious rather than the only place a rule lives: if knowing the rule is
|
|
73
|
+
* required to act, put it in text beside the status instead.
|
|
73
74
|
*/
|
|
74
75
|
hint?: string;
|
|
75
76
|
}
|
|
@@ -84,6 +85,10 @@ interface StatusDotProps extends Omit<ComponentPropsWithoutRef<"span">, "childre
|
|
|
84
85
|
* The dot is decorative on purpose. It never carries meaning the text does not
|
|
85
86
|
* also carry, so the component cannot be used to say something in colour alone.
|
|
86
87
|
*
|
|
88
|
+
* Without a `hint` this renders one span and nothing else: a table repeats this
|
|
89
|
+
* on every row, and a tooltip's provider, listeners and floating context are
|
|
90
|
+
* not a cost worth paying hundreds of times for rows that have nothing to say.
|
|
91
|
+
*
|
|
87
92
|
* @example
|
|
88
93
|
* ```tsx
|
|
89
94
|
* <StatusDot tone="warning" hint="7일 이상 수신되지 않음">비활성</StatusDot>
|
package/dist/index.d.ts
CHANGED
|
@@ -64,12 +64,13 @@ interface StatusDotProps extends Omit<ComponentPropsWithoutRef<"span">, "childre
|
|
|
64
64
|
*/
|
|
65
65
|
children: ReactNode;
|
|
66
66
|
/**
|
|
67
|
-
* How the state was decided
|
|
67
|
+
* How the state was decided.
|
|
68
68
|
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
69
|
+
* Shown in a tooltip that opens on hover and on keyboard focus, so the rule
|
|
70
|
+
* is reachable without a pointer. Giving a hint makes the dot a tab stop —
|
|
71
|
+
* the only way a keyboard reader can reach it — so it is still a bonus for
|
|
72
|
+
* the curious rather than the only place a rule lives: if knowing the rule is
|
|
73
|
+
* required to act, put it in text beside the status instead.
|
|
73
74
|
*/
|
|
74
75
|
hint?: string;
|
|
75
76
|
}
|
|
@@ -84,6 +85,10 @@ interface StatusDotProps extends Omit<ComponentPropsWithoutRef<"span">, "childre
|
|
|
84
85
|
* The dot is decorative on purpose. It never carries meaning the text does not
|
|
85
86
|
* also carry, so the component cannot be used to say something in colour alone.
|
|
86
87
|
*
|
|
88
|
+
* Without a `hint` this renders one span and nothing else: a table repeats this
|
|
89
|
+
* on every row, and a tooltip's provider, listeners and floating context are
|
|
90
|
+
* not a cost worth paying hundreds of times for rows that have nothing to say.
|
|
91
|
+
*
|
|
87
92
|
* @example
|
|
88
93
|
* ```tsx
|
|
89
94
|
* <StatusDot tone="warning" hint="7일 이상 수신되지 않음">비활성</StatusDot>
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { $ as PopoverClose, $t as
|
|
3
|
-
import { $ as Identity, A as PageHeader, B as DropdownTrigger, C as Logo, D as Section, E as ResizablePanelGroup, F as RadioGroup, G as Textarea, H as StepBuilder, I as DropdownContent, J as CardContent, K as Switch, L as DropdownItem, M as BlockLayout, N as LoadingOverlay, O as Container, P as Radio, Q as CardTitle, R as DropdownMenu, S as DrawerRoot, T as ResizablePanel, U as CircularProgress, V as ConditionBuilder, W as Progress, X as CardFooter, Y as CardDescription, Z as CardHeader, _ as getShaderFragment, a as THEME_PALETTES, at as AccordionItem, b as DrawerClose, c as ExpressionGroup, ct as Toggle, d as ShaderSurface, dt as Separator, et as Avatar, f as SHADER_OVERLAY_PARAM_KEYS, ft as Heading, g as SHADER_PRESET_IDS, h as SHADER_PRESETS, i as ColorPalettePicker, it as AccordionContent, j as createBlock, k as ScrollArea, l as Facet, lt as ToggleGroup, m as SHADER_PARAM_KEYS, n as InlineEdit, nt as DescriptionList, o as LiveRegion, ot as AccordionRoot, p as SHADER_PARAM_FALLBACK, pt as Text, q as Card, r as ColorPaletteDisplay, rt as Breadcrumb, s as Expression, st as AccordionTrigger, t as KeyPadMenu, tt as AvatarGroup, u as FacetGroup, ut as OtpField, v as getShaderPreset, w as ResizableHandle, x as DrawerPanel, y as VirtualList, z as DropdownSeparator } from "./key-pad-menu-
|
|
4
|
-
import { $ as CommandGroup, A as ToastProvider, B as FaqAccordion, C as Flyout, D as KeyValueEditor, E as WorkflowCanvas, F as BranchSelect, G as StatusSelect, H as EditorToolbar, I as EnvPanel, J as CommandPaletteTrigger, K as SearchCombobox, L as ProjectSwitcher, M as useToast, N as DataTable, O as FailureList, P as DomainTable, Q as CommandEmpty, R as DeploymentTimeline, S as withoutField, T as EventTimeline, U as SidebarNav, V as ContentTabs, W as AppMenubar, X as Command, Y as CommandPalette, Z as CommandDialog, _ as fieldValues, a as TimeRangeControl, b as removeClause, c as describeClause, d as quoteValue, et as CommandInput, f as parseQuery, g as applyCellAction, h as addClause, i as DEFAULT_TIME_PRESETS, it as CommandShortcut, j as toast, k as NotificationToast, l as formatClause, m as EMPTY_QUERY, n as LogTable, nt as CommandList, o as useAutoRefresh, p as parseQueryWithDiagnostics, q as DashboardGrid, r as TimeSeriesPanel, rt as CommandSeparator, s as QueryBar, t as FieldSidebar, tt as CommandItem, u as formatQuery, v as isEmptyQuery, w as ScoreBreakdown, x as withFieldValue, y as queryFields, z as SettingsForm } from "./field-sidebar-
|
|
2
|
+
import { $ as PopoverClose, $t as ToolbarButton, A as FormRadio, An as OPT_BADGE_RED, At as DialogPanel, B as FormSubmit, Bn as OPT_FOCUS, Bt as TabsRoot, C as FormGroupLabel, Ct as DialogBody, D as FormNumberInput, Dn as OPT_BADGE_BLUE, Dt as DialogFooter, E as FormLabel, Et as DialogDismiss, F as FormSelect, Ft as SelectRoot, G as useFormContext, Gt as CompositeItem, H as FormTagInput, Hn as OPT_HOVER_ITEM, Ht as DisclosureRoot, I as FormSelectItem, In as OPT_DOT_GRAY, It as SelectTrigger, J as DateRangePicker, Jt as CompositeZone, K as useFormStore, Kt as CompositeProvider, L as FormSelectPopover, Ln as OPT_DOT_GREEN, Lt as Tab, M as FormRemove, Mn as OPT_BORDER, Mt as SelectItem, N as FormReset, Nt as SelectLabel, O as FormProvider, On as OPT_BADGE_GREEN, Ot as DialogHeader, P as FormRoot, Pt as SelectPopover, Q as ColorPicker, Qt as useInputId, R as FormSlider, Rn as OPT_DOT_RED, Rt as TabList, S as FormGroup, St as AlertDialogPanel, T as FormInput, Tt as DialogDisclosure, U as FormTextarea, Un as OPT_INPUT, Ut as DisclosureTrigger, V as FormSwitch, Vn as OPT_FOCUS_VISIBLE, Vt as DisclosureContent, W as useFieldValue, Wt as Composite, X as IconPicker, Xn as OPT_TD, Xt as StarRating, Y as TagInput, Yt as Meter, Z as getIconRegistryEntry, Zt as Input, _ as FormControl, _n as SkeletonCard, _t as ComboboxGroupLabel, a as FieldTokenLegend, an as TooltipProvider, ar as _objectWithoutProperties, at as MenuButtonArrow, b as FormError, bn as useControlledState, bt as ComboboxPopover, c as Checkbox, cn as Badge, ct as MenuItemRadio, d as formatOptDateTime, dn as koBreadcrumbLabels, dt as MenuSeparator, en as ToolbarContainer, er as OPT_TEXT_PRIMARY, et as PopoverContent, f as formatOptNumber, fn as koComboboxLabels, ft as MenuTrigger, g as FormColorPicker, gn as SkeletonAvatar, gt as ComboboxGroup, h as FormCheckbox, hn as Skeleton, ht as ComboboxEmpty, i as FieldToken, in as TooltipAnchor, ir as _objectSpread2, it as NumberInput, j as FormRadioGroup, jn as OPT_BADGE_YELLOW, jt as DialogRoot, k as FormPush, kn as OPT_BADGE_NEUTRAL, kt as DialogHeading, l as CheckboxGroup, ln as EmptyState, lt as MenuPopover, m as formatOptTime, mn as StatCard, mt as MenubarRoot, n as Highlight, nn as ToolbarSeparator, nr as OPT_TEXT_TERTIARY, nt as PopoverTrigger, o as resolveFieldType, on as Alert, or as Kbd, ot as MenuItem, p as formatOptShortDate, pn as koStarRatingLabels, pt as MenubarContainer, q as DEFAULT_PRESETS, qt as CompositeRow, r as FIELD_TYPE_TOKENS, rn as Tooltip, rr as OPT_TH, rt as Slider, s as Pagination, sn as Spinner, sr as cn, st as MenuItemCheckbox, t as TextTruncate, tn as ToolbarRoot, tr as OPT_TEXT_SECONDARY, tt as PopoverRoot, un as Button, ut as MenuRoot, v as FormDateRangePicker, vn as SkeletonTable, vt as ComboboxInput, w as FormIconPicker, wt as DialogDescription, x as FormField, xt as ComboboxRoot, y as FormDescription, yn as SkeletonText, yt as ComboboxItem, z as FormStarRating, zn as OPT_DOT_YELLOW, zt as TabPanel } from "./text-truncate-BFWd2cE_.js";
|
|
3
|
+
import { $ as Identity, A as PageHeader, B as DropdownTrigger, C as Logo, D as Section, E as ResizablePanelGroup, F as RadioGroup, G as Textarea, H as StepBuilder, I as DropdownContent, J as CardContent, K as Switch, L as DropdownItem, M as BlockLayout, N as LoadingOverlay, O as Container, P as Radio, Q as CardTitle, R as DropdownMenu, S as DrawerRoot, T as ResizablePanel, U as CircularProgress, V as ConditionBuilder, W as Progress, X as CardFooter, Y as CardDescription, Z as CardHeader, _ as getShaderFragment, a as THEME_PALETTES, at as AccordionItem, b as DrawerClose, c as ExpressionGroup, ct as Toggle, d as ShaderSurface, dt as Separator, et as Avatar, f as SHADER_OVERLAY_PARAM_KEYS, ft as Heading, g as SHADER_PRESET_IDS, h as SHADER_PRESETS, i as ColorPalettePicker, it as AccordionContent, j as createBlock, k as ScrollArea, l as Facet, lt as ToggleGroup, m as SHADER_PARAM_KEYS, n as InlineEdit, nt as DescriptionList, o as LiveRegion, ot as AccordionRoot, p as SHADER_PARAM_FALLBACK, pt as Text, q as Card, r as ColorPaletteDisplay, rt as Breadcrumb, s as Expression, st as AccordionTrigger, t as KeyPadMenu, tt as AvatarGroup, u as FacetGroup, ut as OtpField, v as getShaderPreset, w as ResizableHandle, x as DrawerPanel, y as VirtualList, z as DropdownSeparator } from "./key-pad-menu-CUiQ-vKw.js";
|
|
4
|
+
import { $ as CommandGroup, A as ToastProvider, B as FaqAccordion, C as Flyout, D as KeyValueEditor, E as WorkflowCanvas, F as BranchSelect, G as StatusSelect, H as EditorToolbar, I as EnvPanel, J as CommandPaletteTrigger, K as SearchCombobox, L as ProjectSwitcher, M as useToast, N as DataTable, O as FailureList, P as DomainTable, Q as CommandEmpty, R as DeploymentTimeline, S as withoutField, T as EventTimeline, U as SidebarNav, V as ContentTabs, W as AppMenubar, X as Command, Y as CommandPalette, Z as CommandDialog, _ as fieldValues, a as TimeRangeControl, b as removeClause, c as describeClause, d as quoteValue, et as CommandInput, f as parseQuery, g as applyCellAction, h as addClause, i as DEFAULT_TIME_PRESETS, it as CommandShortcut, j as toast, k as NotificationToast, l as formatClause, m as EMPTY_QUERY, n as LogTable, nt as CommandList, o as useAutoRefresh, p as parseQueryWithDiagnostics, q as DashboardGrid, r as TimeSeriesPanel, rt as CommandSeparator, s as QueryBar, t as FieldSidebar, tt as CommandItem, u as formatQuery, v as isEmptyQuery, w as ScoreBreakdown, x as withFieldValue, y as queryFields, z as SettingsForm } from "./field-sidebar-BXAXigMS.js";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
import { Component, createContext, useCallback, useContext, useEffect, useId, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
@@ -149,6 +149,10 @@ const dotSize = {
|
|
|
149
149
|
* The dot is decorative on purpose. It never carries meaning the text does not
|
|
150
150
|
* also carry, so the component cannot be used to say something in colour alone.
|
|
151
151
|
*
|
|
152
|
+
* Without a `hint` this renders one span and nothing else: a table repeats this
|
|
153
|
+
* on every row, and a tooltip's provider, listeners and floating context are
|
|
154
|
+
* not a cost worth paying hundreds of times for rows that have nothing to say.
|
|
155
|
+
*
|
|
152
156
|
* @example
|
|
153
157
|
* ```tsx
|
|
154
158
|
* <StatusDot tone="warning" hint="7일 이상 수신되지 않음">비활성</StatusDot>
|
|
@@ -156,9 +160,9 @@ const dotSize = {
|
|
|
156
160
|
*/
|
|
157
161
|
function StatusDot(_ref) {
|
|
158
162
|
let { tone = "neutral", size = "md", hint, className, children } = _ref, props = _objectWithoutProperties(_ref, _excluded$1);
|
|
159
|
-
|
|
160
|
-
className: cn("inline-flex items-center whitespace-nowrap", sizeStyles$2[size], textTone[tone], className),
|
|
161
|
-
|
|
163
|
+
const dot = /* @__PURE__ */ jsxs("span", _objectSpread2(_objectSpread2({
|
|
164
|
+
className: cn("inline-flex items-center whitespace-nowrap", sizeStyles$2[size], textTone[tone], hint && "focus-visible:ring-ring rounded-sm outline-none focus-visible:ring-2", className),
|
|
165
|
+
tabIndex: hint ? 0 : void 0
|
|
162
166
|
}, props), {}, {
|
|
163
167
|
"data-opt-id": "N51AT",
|
|
164
168
|
"data-opt-slug": "status-dot.StatusDot",
|
|
@@ -168,6 +172,8 @@ function StatusDot(_ref) {
|
|
|
168
172
|
"aria-hidden": "true"
|
|
169
173
|
}), children]
|
|
170
174
|
}));
|
|
175
|
+
if (!hint) return dot;
|
|
176
|
+
return /* @__PURE__ */ jsxs(TooltipProvider, { children: [/* @__PURE__ */ jsx(TooltipAnchor, { render: dot }), /* @__PURE__ */ jsx(Tooltip, { children: hint })] });
|
|
171
177
|
}
|
|
172
178
|
//#endregion
|
|
173
179
|
//#region src/core/copy-button.tsx
|
|
@@ -4478,6 +4484,19 @@ function toText(value) {
|
|
|
4478
4484
|
if (typeof value === "number" || typeof value === "boolean") return String(value);
|
|
4479
4485
|
return JSON.stringify(value);
|
|
4480
4486
|
}
|
|
4487
|
+
/**
|
|
4488
|
+
* The values one field holds, as a list.
|
|
4489
|
+
*
|
|
4490
|
+
* A clause names a single value, so an array field has to be read element by
|
|
4491
|
+
* element: `tag:pay` asks whether *any* tag is `pay`, not whether the whole
|
|
4492
|
+
* list stringifies to it — and `toText` on an array produces `["pay","cart"]`,
|
|
4493
|
+
* which no user ever types. Scalars read as a list of one so both shapes take
|
|
4494
|
+
* the same path, and negation stays where it already is: `matchesQuery` flips
|
|
4495
|
+
* the result, so `-tag:pay` correctly means "no element matches".
|
|
4496
|
+
*/
|
|
4497
|
+
function readValues(value) {
|
|
4498
|
+
return Array.isArray(value) ? value : [value];
|
|
4499
|
+
}
|
|
4481
4500
|
function compare(left, right) {
|
|
4482
4501
|
const leftNumber = typeof left === "number" ? left : Number(toText(left));
|
|
4483
4502
|
const rightNumber = Number(right);
|
|
@@ -4488,9 +4507,9 @@ function matchesClause(clause, read, searchable) {
|
|
|
4488
4507
|
if (clause.type === "term") return searchable().toLowerCase().includes(clause.value.toLowerCase());
|
|
4489
4508
|
const value = read(clause.field);
|
|
4490
4509
|
switch (clause.operator) {
|
|
4491
|
-
case "exists": return value !== void 0 &&
|
|
4492
|
-
case "eq": return clause.values.some((candidate) =>
|
|
4493
|
-
case "contains": return clause.values.some((candidate) =>
|
|
4510
|
+
case "exists": return readValues(value).some((item) => item !== void 0 && item !== null && item !== "");
|
|
4511
|
+
case "eq": return clause.values.some((candidate) => readValues(value).some((item) => toText(item).toLowerCase() === candidate.toLowerCase()));
|
|
4512
|
+
case "contains": return clause.values.some((candidate) => readValues(value).some((item) => toText(item).toLowerCase().includes(candidate.toLowerCase())));
|
|
4494
4513
|
case "gt":
|
|
4495
4514
|
var _clause$values$;
|
|
4496
4515
|
return compare(value, (_clause$values$ = clause.values[0]) !== null && _clause$values$ !== void 0 ? _clause$values$ : "") > 0;
|
|
@@ -4526,7 +4545,7 @@ function matchesQueryObject(query, row, options = {}) {
|
|
|
4526
4545
|
let cached = null;
|
|
4527
4546
|
const searchable = () => {
|
|
4528
4547
|
var _cached;
|
|
4529
|
-
(_cached = cached) !== null && _cached !== void 0 || (cached = [...Object.values(row).
|
|
4548
|
+
(_cached = cached) !== null && _cached !== void 0 || (cached = [...Object.values(row).flatMap((value) => Array.isArray(value) ? value.filter((item) => typeof item !== "object") : typeof value === "object" ? [] : [value]), ...Object.values(nested !== null && nested !== void 0 ? nested : {})].map(toText).join(" "));
|
|
4530
4549
|
return cached;
|
|
4531
4550
|
};
|
|
4532
4551
|
return matchesQuery(query, read, searchable);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
const require_text_truncate = require("./text-truncate-
|
|
2
|
+
const require_text_truncate = require("./text-truncate-DsG5UAOY.cjs");
|
|
3
3
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
4
|
let react = require("react");
|
|
5
5
|
react = require_text_truncate.__toESM(react, 1);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { Bn as OPT_FOCUS, Cn as getDescribedBy, En as OPT_ANIMATE_ENTER_EXIT,
|
|
2
|
+
import { Bn as OPT_FOCUS, Cn as getDescribedBy, En as OPT_ANIMATE_ENTER_EXIT, Ft as SelectRoot$1, It as SelectTrigger$1, Kn as OPT_SURFACE, Mn as OPT_BORDER, Mt as SelectItem$1, Pt as SelectPopover$1, Qn as OPT_TEXTAREA_SIZE, Qt as useInputId, Sn as RequiredMark, Tn as OPT_ANIMATE_DRAWER, Un as OPT_INPUT, Vn as OPT_FOCUS_VISIBLE, ar as _objectWithoutProperties, bn as useControlledState, cn as Badge, dn as koBreadcrumbLabels, dt as MenuSeparator$1, er as OPT_TEXT_PRIMARY, f as formatOptNumber, ft as MenuTrigger$1, ir as _objectSpread2, lt as MenuPopover$1, nr as OPT_TEXT_TERTIARY, ot as MenuItem$1, sn as Spinner, sr as cn, tr as OPT_TEXT_SECONDARY, un as Button, ut as MenuRoot$1, xn as FieldMessages } from "./text-truncate-BFWd2cE_.js";
|
|
3
3
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { createContext, createElement, forwardRef, useCallback, useContext, useEffect, useId, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState } from "react";
|