@astryx-vue/core 0.2.0 → 0.2.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.
Files changed (225) hide show
  1. package/dist/AppShell/index.js +1 -1
  2. package/dist/{AppShell-EiGyPFbA.js → AppShell-Cb41gIAj.js} +2 -2
  3. package/dist/Avatar/index.d.ts +1 -1
  4. package/dist/Avatar/index.js +1 -1
  5. package/dist/Avatar-jmHInHwj.js +244 -0
  6. package/dist/AvatarGroup/index.d.ts +1 -1
  7. package/dist/AvatarGroup/index.js +1 -1
  8. package/dist/{AvatarGroup-CZcgAMjM.js → AvatarGroup-QyzSrpYA.js} +8 -7
  9. package/dist/Badge/index.d.ts +2 -1
  10. package/dist/Badge/index.js +1 -1
  11. package/dist/Badge-CjDQPF5g.js +30 -0
  12. package/dist/Banner/index.d.ts +1 -1
  13. package/dist/Breadcrumbs/index.d.ts +2 -2
  14. package/dist/Breadcrumbs/index.js +1 -1
  15. package/dist/{Breadcrumbs-C3YZFQ9w.js → Breadcrumbs-CTQ7fjDn.js} +45 -11
  16. package/dist/ButtonGroup/index.d.ts +1 -1
  17. package/dist/Calendar/index.d.ts +2 -2
  18. package/dist/Calendar/index.js +1 -1
  19. package/dist/Calendar-BFaI5AMv.js +352 -0
  20. package/dist/Card/index.d.ts +1 -1
  21. package/dist/Carousel/index.js +1 -1
  22. package/dist/{Carousel-BTtHkKea.js → Carousel-X0cuQkvg.js} +2 -2
  23. package/dist/Chat/index.d.ts +2 -2
  24. package/dist/Chat/index.js +2 -2
  25. package/dist/Chat-M0tiGrNT.js +3148 -0
  26. package/dist/CheckboxInput/index.d.ts +1 -1
  27. package/dist/CheckboxList/index.d.ts +1 -1
  28. package/dist/CheckboxList/index.js +1 -1
  29. package/dist/Citation/index.js +1 -1
  30. package/dist/{Citation-DijdbUUu.js → Citation-C1veUk5p.js} +2 -2
  31. package/dist/ClickableCard/index.d.ts +1 -1
  32. package/dist/Code/index.js +1 -1
  33. package/dist/{CodeBlock-CxTb6j9_.js → CodeBlock-DesTJAkm.js} +1 -1
  34. package/dist/Collapsible/index.js +1 -1
  35. package/dist/{Collapsible-9MC08X39.js → Collapsible-BestK35V.js} +1 -1
  36. package/dist/CommandPalette/index.js +1 -1
  37. package/dist/{CommandPalette-BD2iODF5.js → CommandPalette-BArt97V8.js} +1 -1
  38. package/dist/ComplexSelector/index.d.ts +1 -1
  39. package/dist/ComplexSelector/index.js +1 -1
  40. package/dist/{ComplexSelector-D9iXd5cH.js → ComplexSelector-CAoig1RK.js} +2 -2
  41. package/dist/ContextMenu/index.d.ts +2 -2
  42. package/dist/ContextMenu/index.js +1 -1
  43. package/dist/{ContextMenu-HS_WqYIg.js → ContextMenu-9Im6i43E.js} +101 -63
  44. package/dist/DateInput/index.d.ts +2 -2
  45. package/dist/DateInput/index.js +1 -1
  46. package/dist/DateInput-BLocxqC3.js +376 -0
  47. package/dist/DateRangeInput/index.d.ts +1 -1
  48. package/dist/DateRangeInput/index.js +1 -1
  49. package/dist/{DateRangeInput-1bhPGG2s.js → DateRangeInput-DwDy3eRo.js} +2 -2
  50. package/dist/DateTimeInput/index.d.ts +1 -1
  51. package/dist/DateTimeInput/index.js +1 -1
  52. package/dist/{DateTimeInput-SnPdgk6P.js → DateTimeInput-BYiaC9bn.js} +5 -3
  53. package/dist/DropdownMenu/index.d.ts +3 -2
  54. package/dist/DropdownMenu/index.js +3 -2
  55. package/dist/DropdownMenu-Ddfr-aEC.js +164 -0
  56. package/dist/{DropdownMenu-UJGych6v.js → DropdownMenu-Dh-WAHKb.js} +63 -16
  57. package/dist/FileInput/index.d.ts +1 -1
  58. package/dist/FileInput/index.js +1 -1
  59. package/dist/{FileInput-BQiwE-GB.js → FileInput-DLO6V12n.js} +2 -2
  60. package/dist/Icon/index.d.ts +4 -3
  61. package/dist/Icon/index.js +3 -2
  62. package/dist/Icon/plugin.d.ts +45 -0
  63. package/dist/Icon/plugin.js +177 -0
  64. package/dist/Icon-CJKjdJy-.js +198 -0
  65. package/dist/Lightbox/index.js +1 -1
  66. package/dist/{Lightbox-CshKoB0r.js → Lightbox-CdFCS_EA.js} +2 -2
  67. package/dist/Link/index.d.ts +1 -1
  68. package/dist/Link/index.js +1 -1
  69. package/dist/Link-DqdQZ37C.js +141 -0
  70. package/dist/Markdown/index.js +1 -1
  71. package/dist/{Markdown-D-Ua055V.js → Markdown-BqKloI3w.js} +3 -3
  72. package/dist/MetadataList/index.js +1 -1
  73. package/dist/{MetadataList-sYph_d8Q.js → MetadataList-CvZkmisf.js} +1 -1
  74. package/dist/MobileNav/index.js +1 -1
  75. package/dist/{MobileNavToggle-DD9D01aj.js → MobileNavToggle-Bwi0qXXM.js} +1 -1
  76. package/dist/MoreMenu/index.d.ts +1 -1
  77. package/dist/MoreMenu/index.js +1 -1
  78. package/dist/{MoreMenu-BVrK5kkk.js → MoreMenu-BwJaJrkB.js} +2 -2
  79. package/dist/MultiSelector/index.js +1 -1
  80. package/dist/{MultiSelector-DiYov9sF.js → MultiSelector-C-ETfFy_.js} +2 -2
  81. package/dist/NumberInput/index.d.ts +2 -2
  82. package/dist/NumberInput/index.js +1 -1
  83. package/dist/NumberInput-DjetVB8O.js +210 -0
  84. package/dist/Outline/index.js +1 -1
  85. package/dist/{Outline-DQfEBxlc.js → Outline-Bz9c-u5y.js} +1 -1
  86. package/dist/OverflowList/index.d.ts +1 -1
  87. package/dist/OverflowList/index.js +1 -1
  88. package/dist/{OverflowList-BU5VCntl.js → OverflowList-ED-KN9Y5.js} +1 -1
  89. package/dist/Overlay/index.d.ts +1 -1
  90. package/dist/Pagination/index.d.ts +2 -2
  91. package/dist/Pagination/index.js +1 -1
  92. package/dist/{Pagination-HdhtykeF.js → Pagination-Cb66HMEf.js} +76 -22
  93. package/dist/PowerSearch/index.d.ts +2 -0
  94. package/dist/PowerSearch/index.js +2 -0
  95. package/dist/PowerSearch-CjU8y4mi.js +2386 -0
  96. package/dist/ProgressBar/index.d.ts +1 -1
  97. package/dist/ProgressBar/index.js +1 -1
  98. package/dist/{ProgressBar-ChDp-7oe.js → ProgressBar-DO9Chic6.js} +31 -11
  99. package/dist/Radio/index.d.ts +1 -1
  100. package/dist/RadioList/index.d.ts +1 -1
  101. package/dist/Resizable/index.d.ts +1 -1
  102. package/dist/Resizable/index.js +1 -1
  103. package/dist/{Resizable-BhSMfO5B.js → Resizable-D-TBCg0Y.js} +1 -1
  104. package/dist/ScrollableArea/index.d.ts +1 -1
  105. package/dist/SelectableCard/index.d.ts +1 -1
  106. package/dist/Selector/index.d.ts +2 -2
  107. package/dist/Selector/index.js +1 -1
  108. package/dist/Selector-DE2IEFML.js +468 -0
  109. package/dist/SideNav/index.d.ts +1 -1
  110. package/dist/SideNav/index.js +1 -1
  111. package/dist/{SideNav-B-Om6Bz3.js → SideNav-DonEfiAx.js} +17 -17
  112. package/dist/Stepper/index.js +1 -1
  113. package/dist/{Stepper-BZ_8SEZt.js → Stepper-D2ZIcUNx.js} +1 -1
  114. package/dist/Switch/index.d.ts +1 -1
  115. package/dist/TabList/index.d.ts +1 -1
  116. package/dist/TabList/index.js +1 -1
  117. package/dist/{TabList-Cnc2Hs1H.js → TabList-D3F-stq-.js} +10 -3
  118. package/dist/Table/index.d.ts +3 -3
  119. package/dist/Table/index.js +2 -2
  120. package/dist/Table-CrP2Uffq.js +1982 -0
  121. package/dist/TextArea/index.d.ts +1 -1
  122. package/dist/TextArea/index.js +1 -1
  123. package/dist/{TextArea-Cv9UVbzS.js → TextArea-CPwSytdO.js} +12 -6
  124. package/dist/TextInput/index.d.ts +1 -1
  125. package/dist/Thumbnail/index.js +1 -1
  126. package/dist/{Thumbnail-Dc1UpykG.js → Thumbnail-BC5JGPGZ.js} +11 -11
  127. package/dist/{TimeField-C7t9Knq9.js → TimeField-DpHFrNv0.js} +2 -2
  128. package/dist/TimeInput/index.d.ts +1 -1
  129. package/dist/TimeInput/index.js +1 -1
  130. package/dist/{TimeInput-BXxCOY98.js → TimeInput-DJLV0_4z.js} +1 -1
  131. package/dist/Timestamp/index.d.ts +1 -1
  132. package/dist/Timestamp/index.js +2 -1
  133. package/dist/{Timestamp-DlZSmgCJ.js → Timestamp-GKNjjt5g.js} +4 -121
  134. package/dist/Toast/index.d.ts +2 -2
  135. package/dist/Toast/index.js +1 -1
  136. package/dist/{Toast-BKXPvEMp.js → Toast-C2ML-bmi.js} +37 -7
  137. package/dist/ToggleButton/index.d.ts +1 -1
  138. package/dist/Token/index.js +1 -1
  139. package/dist/{Token-wt4e80IM.js → Token-Chu_eCVs.js} +1 -1
  140. package/dist/Tokenizer/index.js +1 -1
  141. package/dist/{Tokenizer-nmTqdS9n.js → Tokenizer-DRDpvQ_l.js} +3 -3
  142. package/dist/Toolbar/index.d.ts +1 -1
  143. package/dist/TopNav/index.d.ts +1 -1
  144. package/dist/TopNav/index.js +1 -1
  145. package/dist/{TopNav-notp-mJx.js → TopNav-CEyWddtA.js} +3 -3
  146. package/dist/TreeList/index.js +1 -1
  147. package/dist/{TreeList-s1xBQ0qq.js → TreeList-COS8US8e.js} +3 -3
  148. package/dist/Typeahead/index.js +1 -1
  149. package/dist/{Typeahead-VAuiCurV.js → Typeahead-P7cCqtaQ.js} +3 -3
  150. package/dist/{useTypeaheadMenu-Ba7XpcZl.js → TypeaheadMenu-CGvo0Tud.js} +107 -107
  151. package/dist/composables/index.d.ts +3 -3
  152. package/dist/{context-Dbo22sck.js → context-CiKncNSH.js} +184 -6
  153. package/dist/formatInstant-BDWUIxS7.js +119 -0
  154. package/dist/{index-SMh42NI8.d.ts → index-B1TG2GPS.d.ts} +2 -2
  155. package/dist/{index-DRmb-oUa.d.ts → index-B9WzWqzk.d.ts} +3 -29
  156. package/dist/{index-BuubzuE8.d.ts → index-BDZCJ9ri.d.ts} +2 -2
  157. package/dist/{index-z4p2k9VR.d.ts → index-Bgv4ZmBl.d.ts} +20 -2
  158. package/dist/{index-BoRIw-bP.d.ts → index-Bt7ewoz2.d.ts} +32 -2
  159. package/dist/{index-uQrLBZfF.d.ts → index-Bu3oXIIS.d.ts} +24 -0
  160. package/dist/index-CJlBAXwj.d.ts +100 -0
  161. package/dist/{index-DT9S92sh.d.ts → index-CNjbOgty.d.ts} +15 -0
  162. package/dist/{index-DXSs3rwa.d.ts → index-CngORuiq.d.ts} +137 -2
  163. package/dist/index-Cs5pcwY3.d.ts +416 -0
  164. package/dist/{index-NzLDrOkk.d.ts → index-D4I_obqR.d.ts} +14 -1
  165. package/dist/{index-BtPZKO20.d.ts → index-DGXviOlp.d.ts} +49 -7
  166. package/dist/{index-CTolyeii.d.ts → index-DN7MXPHM.d.ts} +15 -1
  167. package/dist/{index-C6iJwTL0.d.ts → index-DNRBbwp_.d.ts} +165 -55
  168. package/dist/{index-C59PdX9L.d.ts → index-DWH_HzXi.d.ts} +1 -1
  169. package/dist/{index-BfOtLyNH.d.ts → index-D_nYxnNv.d.ts} +1 -1
  170. package/dist/{index-Bn_odHQ9.d.ts → index-Dg3ZmwEg.d.ts} +12 -1
  171. package/dist/{index-BiMGXtD-.d.ts → index-DimuSES0.d.ts} +14 -1
  172. package/dist/{index-DEeJowZf.d.ts → index-cGagYM1g.d.ts} +15 -2
  173. package/dist/{index-Ck8qy6Rf.d.ts → index-c_TaW8mM.d.ts} +24 -2
  174. package/dist/index-kVhSuA9t.d.ts +902 -0
  175. package/dist/{index-1uRMrk63.d.ts → index-nCEmW6wa.d.ts} +1 -1
  176. package/dist/{index-DoFCm2Q2.d.ts → index-qiZtHnGK.d.ts} +26 -0
  177. package/dist/{index-Bainr_3n.d.ts → index-u5ozu0G7.d.ts} +2 -2
  178. package/dist/index.d.ts +79 -76
  179. package/dist/index.js +111 -100
  180. package/dist/locale/index.d.ts +1 -1
  181. package/dist/locale/index.js +1 -1
  182. package/dist/power-search-DrDfcoL1.d.ts +68 -0
  183. package/dist/registry-B1ObuP--.d.ts +45 -0
  184. package/dist/registry-C7OZb0PJ.js +135 -0
  185. package/dist/{types-JktRxujg.d.ts → types-Cp4liug-.d.ts} +66 -3
  186. package/dist/{index-B8MbfMwV.d.ts → types-DDAAT1Xd.d.ts} +36 -82
  187. package/dist/types-DIYwbkpe.d.ts +33 -0
  188. package/dist/{types-DZoEm_DG.d.ts → types-pnljWjEE.d.ts} +23 -6
  189. package/dist/{useResizable-CeESZS1v.d.ts → useResizable-CUoNPmUw.d.ts} +1 -1
  190. package/package.json +10 -1
  191. package/styles/avatar.css +14 -0
  192. package/styles/badge.css +8 -0
  193. package/styles/breadcrumbs.css +6 -1
  194. package/styles/button.css +13 -0
  195. package/styles/calendar.css +16 -0
  196. package/styles/card.css +2 -0
  197. package/styles/chat.css +474 -3
  198. package/styles/dropdown-menu.css +11 -0
  199. package/styles/icon.css +58 -8
  200. package/styles/link.css +5 -0
  201. package/styles/number-input.css +22 -0
  202. package/styles/pagination.css +45 -1
  203. package/styles/power-search.css +303 -0
  204. package/styles/progress-bar.css +4 -0
  205. package/styles/selector.css +58 -0
  206. package/styles/tab-list.css +15 -0
  207. package/styles/table.css +304 -1
  208. package/styles/text-area.css +17 -0
  209. package/styles/text-input.css +5 -0
  210. package/styles/toast.css +7 -0
  211. package/styles/toolbar.css +11 -0
  212. package/styles.css +1 -0
  213. package/dist/Avatar-5s3HSrtN.js +0 -136
  214. package/dist/Badge-Ba0EwsTj.js +0 -19
  215. package/dist/Calendar-BG7wEsro.js +0 -277
  216. package/dist/Chat-DjNxw5gv.js +0 -1051
  217. package/dist/DateInput-DE2TN1Rq.js +0 -250
  218. package/dist/Icon-Dfr4k6-S.js +0 -86
  219. package/dist/Link-CprjOuTI.js +0 -92
  220. package/dist/NumberInput-CTYiQxHq.js +0 -147
  221. package/dist/Selector-Da-2BO3q.js +0 -325
  222. package/dist/Table-D-LhAy_J.js +0 -967
  223. package/dist/index-DJo-BmXZ.d.ts +0 -431
  224. package/dist/index-DtjAdYEc.d.ts +0 -68
  225. package/dist/{CheckboxList-EsIEXjK_.js → CheckboxList-BbCPiend.js} +1 -1
@@ -0,0 +1,416 @@
1
+ import { a as SearchableItem, i as SearchSource } from "./useAsyncSource-xpQovjV_.js";
2
+ import { t as PowerSearchMessages } from "./power-search-DrDfcoL1.js";
3
+ import { Component, VNodeChild } from "vue";
4
+ //#region src/PowerSearch/types.d.ts
5
+ interface EmptyOperatorValue {
6
+ readonly type: 'empty';
7
+ }
8
+ interface StringOperatorValue {
9
+ readonly type: 'string';
10
+ readonly searchSource?: SearchSource;
11
+ readonly isArbitraryStringAllowed?: boolean;
12
+ }
13
+ interface OperatorTokenizationConfig {
14
+ readonly regex?: string;
15
+ readonly sort?: boolean;
16
+ }
17
+ interface StringListOperatorValue {
18
+ readonly type: 'string_list';
19
+ readonly searchSource?: SearchSource;
20
+ readonly isArbitraryStringAllowed?: boolean;
21
+ readonly tokenization?: OperatorTokenizationConfig;
22
+ }
23
+ interface IntegerOperatorValue {
24
+ readonly type: 'integer';
25
+ readonly minValue?: number;
26
+ readonly maxValue?: number;
27
+ readonly units?: string;
28
+ }
29
+ interface FloatOperatorValue {
30
+ readonly type: 'float';
31
+ readonly minValue?: number;
32
+ readonly maxValue?: number;
33
+ readonly units?: string;
34
+ }
35
+ interface TimeOperatorValue {
36
+ readonly type: 'time';
37
+ readonly minValue?: string;
38
+ readonly maxValue?: string;
39
+ }
40
+ interface DateAbsoluteOperatorValue {
41
+ readonly type: 'date_absolute';
42
+ readonly isDateOnly?: boolean;
43
+ }
44
+ interface DateRelativeOperatorValue {
45
+ readonly type: 'date_relative';
46
+ readonly isPastAllowed?: boolean;
47
+ readonly isFutureAllowed?: boolean;
48
+ }
49
+ type DateTimeRangePart = {
50
+ readonly type: 'NOW';
51
+ } | {
52
+ readonly type: 'ABSOLUTE';
53
+ readonly unixSeconds: number;
54
+ } | {
55
+ readonly type: 'RELATIVE';
56
+ readonly backValue: number;
57
+ readonly unit: 'second' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'year';
58
+ readonly anchorKey?: string;
59
+ };
60
+ interface DateTimeRange {
61
+ readonly start: DateTimeRangePart;
62
+ readonly end: DateTimeRangePart;
63
+ }
64
+ interface DateRangeFilterPreset {
65
+ readonly label: string;
66
+ readonly value: DateTimeRange;
67
+ }
68
+ interface RelativeDateFilterPreset {
69
+ readonly label: string;
70
+ readonly value: string;
71
+ }
72
+ interface DateRangeOperatorValue {
73
+ readonly type: 'date_range';
74
+ readonly intervalDatePresets?: readonly DateRangeFilterPreset[];
75
+ readonly relativeDatePresets?: readonly RelativeDateFilterPreset[];
76
+ }
77
+ interface EnumItem {
78
+ readonly value: string;
79
+ readonly label: string;
80
+ /** 内置图形名,或 `collection:icon`。 */
81
+ readonly icon?: string;
82
+ }
83
+ interface EnumOperatorValue {
84
+ readonly type: 'enum';
85
+ readonly values: readonly EnumItem[];
86
+ }
87
+ interface EnumListOperatorValue {
88
+ readonly type: 'enum_list';
89
+ readonly values: readonly EnumItem[];
90
+ }
91
+ interface EntityListOperatorValue {
92
+ readonly type: 'entity_list';
93
+ readonly searchSource?: SearchSource;
94
+ readonly isArbitraryStringAllowed?: boolean;
95
+ readonly tokenization?: OperatorTokenizationConfig;
96
+ }
97
+ interface CustomOperatorValue {
98
+ readonly type: 'custom';
99
+ readonly Editor: Component;
100
+ readonly getString: (value: string) => string;
101
+ }
102
+ interface NestedOperatorValue {
103
+ readonly type: 'nested';
104
+ }
105
+ type OperatorValue = EmptyOperatorValue | StringOperatorValue | StringListOperatorValue | IntegerOperatorValue | FloatOperatorValue | TimeOperatorValue | DateAbsoluteOperatorValue | DateRelativeOperatorValue | DateRangeOperatorValue | EnumOperatorValue | EnumListOperatorValue | EntityListOperatorValue | CustomOperatorValue | NestedOperatorValue;
106
+ interface FilterValueEmpty {
107
+ readonly type: 'empty';
108
+ }
109
+ interface FilterValueString {
110
+ readonly type: 'string';
111
+ readonly value: string;
112
+ }
113
+ interface FilterValueStringList {
114
+ readonly type: 'string_list';
115
+ readonly value: readonly string[];
116
+ }
117
+ interface FilterValueInteger {
118
+ readonly type: 'integer';
119
+ readonly value: number;
120
+ }
121
+ interface FilterValueFloat {
122
+ readonly type: 'float';
123
+ readonly value: number;
124
+ }
125
+ interface FilterValueTime {
126
+ readonly type: 'time';
127
+ readonly value: string;
128
+ }
129
+ interface FilterValueDateAbsolute {
130
+ readonly type: 'date_absolute';
131
+ readonly unixSeconds: number;
132
+ }
133
+ interface FilterValueDateRelative {
134
+ readonly type: 'date_relative';
135
+ readonly value: string;
136
+ }
137
+ interface FilterValueDateRange {
138
+ readonly type: 'date_range';
139
+ readonly value: DateTimeRange;
140
+ }
141
+ interface FilterValueEnum {
142
+ readonly type: 'enum';
143
+ readonly value: string;
144
+ }
145
+ interface FilterValueEnumList {
146
+ readonly type: 'enum_list';
147
+ readonly value: readonly string[];
148
+ }
149
+ interface PowerSearchEntity {
150
+ readonly id: string;
151
+ readonly label: string;
152
+ readonly photo?: string;
153
+ }
154
+ interface FilterValueEntityList {
155
+ readonly type: 'entity_list';
156
+ readonly value: readonly PowerSearchEntity[];
157
+ }
158
+ interface FilterValueCustom {
159
+ readonly type: 'custom';
160
+ readonly value: string;
161
+ }
162
+ interface FilterValueNested {
163
+ readonly type: 'nested';
164
+ readonly value: readonly PowerSearchFilter[];
165
+ }
166
+ type FilterValue = FilterValueEmpty | FilterValueString | FilterValueStringList | FilterValueInteger | FilterValueFloat | FilterValueTime | FilterValueDateAbsolute | FilterValueDateRelative | FilterValueDateRange | FilterValueEnum | FilterValueEnumList | FilterValueEntityList | FilterValueCustom | FilterValueNested;
167
+ interface PowerSearchOperatorBase {
168
+ readonly key: string;
169
+ readonly value: OperatorValue;
170
+ }
171
+ interface PowerSearchOperatorWithLabel extends PowerSearchOperatorBase {
172
+ readonly label: string;
173
+ readonly i18nKey?: never;
174
+ }
175
+ interface PowerSearchOperatorWithI18nKey extends PowerSearchOperatorBase {
176
+ readonly i18nKey: string;
177
+ readonly label?: never;
178
+ }
179
+ type PowerSearchOperator = PowerSearchOperatorWithLabel | PowerSearchOperatorWithI18nKey;
180
+ interface PowerSearchField {
181
+ readonly key: string;
182
+ readonly label: string;
183
+ readonly operators: readonly PowerSearchOperator[];
184
+ readonly icon?: string;
185
+ readonly defaultOperator?: string;
186
+ readonly group?: string;
187
+ readonly description?: string;
188
+ readonly typeaheadAliases?: readonly string[];
189
+ readonly typeaheadMinQueryLength?: number;
190
+ readonly isValueMatchAllowed?: boolean;
191
+ }
192
+ interface PowerSearchConfig {
193
+ readonly name: string;
194
+ readonly fields: readonly PowerSearchField[];
195
+ readonly contentSearchFieldKey?: string;
196
+ }
197
+ interface PowerSearchFilter {
198
+ readonly field: string;
199
+ readonly operator: string;
200
+ readonly value: FilterValue;
201
+ readonly isReadOnly?: boolean;
202
+ }
203
+ interface PartialFilter {
204
+ readonly field: string;
205
+ readonly operator?: string;
206
+ readonly value?: FilterValue;
207
+ readonly isReadOnly?: boolean;
208
+ }
209
+ type PowerSearchChangeType = 'add' | 'edit' | 'remove';
210
+ interface PowerSearchHandle {
211
+ focusTypeahead: () => void;
212
+ blurTypeahead: () => void;
213
+ }
214
+ interface PowerSearchAuxData {
215
+ readonly fieldKey: string;
216
+ readonly operatorKey?: string;
217
+ readonly filterValue?: FilterValue;
218
+ readonly filterIndex?: number;
219
+ readonly group?: string;
220
+ }
221
+ type PowerSearchItem = SearchableItem<PowerSearchAuxData>;
222
+ type PowerSearchSize = 'sm' | 'md' | 'lg';
223
+ type PowerSearchStatus = 'default' | 'success' | 'warning' | 'error';
224
+ type PowerSearchStatusVariant = 'attached' | 'detached';
225
+ type PowerSearchOverflow = 'none' | 'unfocused-inline' | 'unfocused-layer';
226
+ interface PowerSearchTokenProps {
227
+ config: PowerSearchConfig;
228
+ filter: PowerSearchFilter;
229
+ field: PowerSearchField;
230
+ operator: PowerSearchOperator;
231
+ maxLength: number;
232
+ disabled?: boolean;
233
+ onClick?: () => void;
234
+ onRemove?: () => void;
235
+ }
236
+ interface PowerSearchEditorProps {
237
+ config: PowerSearchConfig;
238
+ filter: PartialFilter;
239
+ mode: 'create' | 'edit';
240
+ saveLabel?: string;
241
+ readOnly?: boolean;
242
+ timeZone?: string;
243
+ maxMenuItems?: number;
244
+ onSave: (filter: PowerSearchFilter | null) => void;
245
+ onCancel: () => void;
246
+ }
247
+ interface PowerSearchComponentOverride {
248
+ token?: Component;
249
+ editor?: Component;
250
+ }
251
+ type PowerSearchComponents = Partial<Record<OperatorValue['type'], PowerSearchComponentOverride>>;
252
+ interface PowerSearchProps {
253
+ config: PowerSearchConfig;
254
+ filters?: readonly PowerSearchFilter[];
255
+ label?: string;
256
+ labelHidden?: boolean;
257
+ placeholder?: string;
258
+ autofocus?: boolean;
259
+ clearable?: boolean;
260
+ readOnly?: boolean;
261
+ disabled?: boolean;
262
+ disabledReason?: string;
263
+ status?: PowerSearchStatus;
264
+ statusMessage?: string;
265
+ statusVariant?: PowerSearchStatusVariant;
266
+ maxTokenLength?: number;
267
+ maxOperatorMenuItems?: number;
268
+ maxSearchResults?: number;
269
+ menuWidth?: number;
270
+ saveLabel?: string;
271
+ timeZone?: string;
272
+ overflow?: PowerSearchOverflow;
273
+ resultCount?: number | string;
274
+ size?: PowerSearchSize;
275
+ components?: PowerSearchComponents;
276
+ }
277
+ interface PowerSearchEmits {
278
+ 'update:filters': [filters: PowerSearchFilter[]];
279
+ 'change': [filters: PowerSearchFilter[], changeType: PowerSearchChangeType, index: number];
280
+ 'focus': [event: FocusEvent];
281
+ 'blur': [event: FocusEvent];
282
+ }
283
+ interface PowerSearchSlots {
284
+ icon?: () => VNodeChild;
285
+ end?: () => VNodeChild;
286
+ token?: (props: PowerSearchTokenProps) => VNodeChild;
287
+ editor?: (props: PowerSearchEditorProps) => VNodeChild;
288
+ }
289
+ type PowerSearchFieldType = 'string' | 'number' | 'boolean' | 'date' | 'enum' | 'enum_list' | 'string_list';
290
+ interface PowerSearchFieldDefinition<K extends string = string, T extends PowerSearchFieldType = PowerSearchFieldType> {
291
+ readonly key: K;
292
+ readonly type: T;
293
+ readonly label?: string;
294
+ readonly enumValues?: readonly EnumItem[];
295
+ }
296
+ //#endregion
297
+ //#region src/PowerSearch/config.d.ts
298
+ interface PowerSearchLookup {
299
+ readonly config: PowerSearchConfig;
300
+ getField: (key: string) => PowerSearchField | undefined;
301
+ getOperator: (fieldKey: string, operatorKey: string) => PowerSearchOperator | undefined;
302
+ getDefaultOperator: (fieldKey: string) => PowerSearchOperator | undefined;
303
+ getVisibleFields: () => readonly PowerSearchField[];
304
+ getVisibleOperators: (fieldKey: string) => readonly PowerSearchOperator[];
305
+ }
306
+ declare function createPowerSearchLookup(config: PowerSearchConfig): PowerSearchLookup;
307
+ //#endregion
308
+ //#region src/PowerSearch/complete.d.ts
309
+ /** 编辑器里的半成品条件。嵌套子条件放在 children,填完才写进 value。 */
310
+ interface EditableFilter {
311
+ readonly field: string;
312
+ readonly operator?: string;
313
+ readonly value?: FilterValue;
314
+ readonly children?: readonly EditableFilter[];
315
+ readonly isReadOnly?: boolean;
316
+ }
317
+ /** 条件齐全才返回可保存的筛选。嵌套里有没填完的子条件时返回空。 */
318
+ declare function completePowerSearchFilter(partial: EditableFilter | PartialFilter, lookup: PowerSearchLookup): PowerSearchFilter | null;
319
+ //#endregion
320
+ //#region src/PowerSearch/format.d.ts
321
+ declare function formatDateAbsolute(unixSeconds: number, locale: string, timeZone?: string): string;
322
+ declare function formatDateAbsoluteCompact(unixSeconds: number, locale: string, timeZone?: string): string;
323
+ declare function formatFilterValue(operatorValue: OperatorValue, filterValue: FilterValue, maxLength: number, messages: PowerSearchMessages, locale: string, timeZone?: string): string;
324
+ //#endregion
325
+ //#region src/PowerSearch/operators.d.ts
326
+ declare function resolveOperatorLabel(operator: PowerSearchOperator, messages: PowerSearchMessages): string;
327
+ //#endregion
328
+ //#region src/PowerSearch/placement.d.ts
329
+ interface EditorBox {
330
+ left: number;
331
+ right: number;
332
+ width: number;
333
+ }
334
+ interface EditorPlacementInput {
335
+ outer: EditorBox;
336
+ control: EditorBox;
337
+ viewportWidth: number;
338
+ direction: 'ltr' | 'rtl';
339
+ /** 视口左右各留出的安全距离。 */
340
+ viewportInset?: number;
341
+ }
342
+ interface EditorPlacement {
343
+ width: number;
344
+ /** 编辑器比外层窄,需要对齐到打开它的控件靠近的那一侧。 */
345
+ capped: boolean;
346
+ edge: 'left' | 'right';
347
+ top: number;
348
+ left: number;
349
+ }
350
+ /**
351
+ * 编辑器宽度取外层宽度,再夹在 400 到 720 之间。
352
+ * 视口放不下 400 时,下限让给视口。只有被 720 压窄时,才改贴打开控件更近的外缘。
353
+ */
354
+ declare function resolveEditorPlacement(input: EditorPlacementInput & {
355
+ anchorTop: number;
356
+ anchorBottom: number;
357
+ viewportHeight: number;
358
+ }): EditorPlacement;
359
+ //#endregion
360
+ //#region src/PowerSearch/PowerSearch.vue.d.ts
361
+ type __VLS_Slots = PowerSearchSlots;
362
+ declare const __VLS_base: import("vue").DefineComponent<PowerSearchProps, {
363
+ focusTypeahead: () => void | undefined;
364
+ blurTypeahead: () => void | undefined;
365
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
366
+ blur: (event: FocusEvent) => any;
367
+ focus: (event: FocusEvent) => any;
368
+ change: (filters: PowerSearchFilter[], changeType: PowerSearchChangeType, index: number) => any;
369
+ "update:filters": (filters: PowerSearchFilter[]) => any;
370
+ }, string, import("vue").PublicProps, Readonly<PowerSearchProps> & Readonly<{
371
+ onBlur?: ((event: FocusEvent) => any) | undefined;
372
+ onFocus?: ((event: FocusEvent) => any) | undefined;
373
+ onChange?: ((filters: PowerSearchFilter[], changeType: PowerSearchChangeType, index: number) => any) | undefined;
374
+ "onUpdate:filters"?: ((filters: PowerSearchFilter[]) => any) | undefined;
375
+ }>, {
376
+ size: PowerSearchSize;
377
+ status: PowerSearchStatus;
378
+ statusVariant: PowerSearchStatusVariant;
379
+ disabled: boolean;
380
+ labelHidden: boolean;
381
+ clearable: boolean;
382
+ overflow: PowerSearchOverflow;
383
+ readOnly: boolean;
384
+ maxTokenLength: number;
385
+ maxSearchResults: number;
386
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
387
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
388
+ declare const _default: typeof __VLS_export;
389
+ type __VLS_WithSlots<T, S> = T & {
390
+ new (): {
391
+ $slots: S;
392
+ };
393
+ };
394
+ //#endregion
395
+ //#region src/PowerSearch/query.d.ts
396
+ interface FieldTypeToValue {
397
+ string: string;
398
+ number: number;
399
+ boolean: boolean;
400
+ date: Date | number;
401
+ enum: string;
402
+ enum_list: readonly string[];
403
+ string_list: readonly string[];
404
+ }
405
+ type InferPowerSearchData<D extends readonly PowerSearchFieldDefinition[]> = { [F in D[number] as F['key']]: FieldTypeToValue[F['type']]; };
406
+ declare function applyPowerSearchFilters<T extends Record<string, unknown>>(filters: readonly PowerSearchFilter[], data: readonly T[]): T[];
407
+ declare function createPowerSearchConfig<const D extends readonly PowerSearchFieldDefinition[]>(definitions: D, configName?: string): {
408
+ config: PowerSearchConfig;
409
+ applyFilters: <T extends InferPowerSearchData<D>>(filters: readonly PowerSearchFilter[], data: readonly T[]) => T[];
410
+ };
411
+ declare function usePowerSearchConfig<const D extends readonly PowerSearchFieldDefinition[]>(definitions: D, configName?: string): ReturnType<typeof createPowerSearchConfig<D>>;
412
+ //#endregion
413
+ //#region src/PowerSearch/source.d.ts
414
+ declare function searchPowerSearchFields(lookup: PowerSearchLookup, query: string, messages: PowerSearchMessages, maxTypedResults: number): PowerSearchItem[];
415
+ //#endregion
416
+ export { PowerSearchItem as A, PowerSearchEmits as C, PowerSearchFieldType as D, PowerSearchFieldDefinition as E, PowerSearchSlots as F, PowerSearchStatus as I, PowerSearchOverflow as M, PowerSearchProps as N, PowerSearchFilter as O, PowerSearchSize as P, PowerSearchConfig as S, PowerSearchField as T, FilterValue as _, usePowerSearchConfig as a, PowerSearchChangeType as b, resolveOperatorLabel as c, formatFilterValue as d, completePowerSearchFilter as f, DateTimeRangePart as g, DateTimeRange as h, createPowerSearchConfig as i, PowerSearchOperator as j, PowerSearchHandle as k, formatDateAbsolute as l, createPowerSearchLookup as m, InferPowerSearchData as n, _default as o, PowerSearchLookup as p, applyPowerSearchFilters as r, resolveEditorPlacement as s, searchPowerSearchFields as t, formatDateAbsoluteCompact as u, OperatorValue as v, PowerSearchEntity as w, PowerSearchComponents as x, PartialFilter as y };
@@ -1,4 +1,7 @@
1
+ import { c as FieldStatusType, o as FieldStatusInput } from "./types-3eXh_5os.js";
1
2
  //#region src/NumberInput/types.d.ts
3
+ /** 带说明的校验状态。仍接受单独的状态字符串。 */
4
+ type NumberInputStatus = FieldStatusInput | 'default' | FieldStatusType;
2
5
  interface NumberInputProps {
3
6
  /** 当前值 */
4
7
  modelValue?: number | null;
@@ -18,6 +21,16 @@ interface NumberInputProps {
18
21
  size?: 'sm' | 'md' | 'lg';
19
22
  /** 标签 */
20
23
  label?: string;
24
+ /** 标签下方的说明 */
25
+ description?: string;
26
+ /** 只把标签留给读屏 */
27
+ isLabelHidden?: boolean;
28
+ /** 单位,显示在步进按钮前面,例如 % */
29
+ units?: string;
30
+ /** 有值时显示清除按钮 */
31
+ clearable?: boolean;
32
+ /** 校验状态。对象形式会在字段下方显示说明。 */
33
+ status?: NumberInputStatus;
21
34
  /** 名称(用于表单提交) */
22
35
  name?: string;
23
36
  }
@@ -42,4 +55,4 @@ declare const __VLS_export: import("vue").DefineComponent<NumberInputProps, {},
42
55
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
43
56
  declare const _default: typeof __VLS_export;
44
57
  //#endregion
45
- export { NumberInputEmits as n, NumberInputProps as r, _default as t };
58
+ export { NumberInputStatus as i, NumberInputEmits as n, NumberInputProps as r, _default as t };
@@ -1,29 +1,61 @@
1
+ import { o as FieldStatusInput } from "./types-3eXh_5os.js";
1
2
  //#region src/Selector/types.d.ts
2
3
  interface SelectorOption {
3
4
  value: string | number;
4
5
  label: string;
5
6
  disabled?: boolean;
6
7
  description?: string;
8
+ /** CSS icon class or a component, drawn before the label. */
9
+ icon?: string;
7
10
  }
11
+ /** 字符串会当成 value 和 label 相同的选项,演练场模板一直这样传。 */
12
+ type SelectorOptionInput = SelectorOption | string;
13
+ /** A titled group of options. */
14
+ interface SelectorSection {
15
+ type: 'section';
16
+ title?: string;
17
+ options: readonly SelectorOption[];
18
+ }
19
+ type SelectorEntry = SelectorOptionInput | SelectorSection;
8
20
  type SelectorSize = 'sm' | 'md' | 'lg';
9
21
  type SelectorStatus = 'default' | 'success' | 'warning' | 'error';
22
+ /** 字符串状态,或演练场里那种 `{ type, message }`。 */
23
+ type SelectorStatusInput = SelectorStatus | FieldStatusInput;
24
+ type SelectorPresentation = 'popover' | 'bottom-sheet';
25
+ type SelectorVariant = 'default' | 'ghost';
26
+ type SelectorStatusVariant = 'attached' | 'detached' | 'tooltip';
10
27
  interface SelectorProps {
11
28
  /** 选中的值 */
12
29
  modelValue?: string | number | null;
13
- /** 选项列表 */
14
- options: readonly SelectorOption[];
30
+ /** 选项列表,可以按 section 分组 */
31
+ options: readonly SelectorEntry[];
15
32
  /** 占位文本 */
16
33
  placeholder?: string;
17
34
  /** 是否禁用 */
18
35
  disabled?: boolean;
19
36
  /** 禁用原因(鼠标悬停时显示) */
20
37
  disabledReason?: string;
21
- /** 状态 */
22
- status?: SelectorStatus;
38
+ /** 状态。可以是 `'error'`,也可以是 `{ type, message }`。 */
39
+ status?: SelectorStatusInput;
23
40
  /** 状态消息 */
24
41
  statusMessage?: string;
42
+ /**
43
+ * 状态文案的呈现。tooltip 只留给读屏,不在控件下再画一行。
44
+ * @default 'attached'
45
+ */
46
+ statusVariant?: SelectorStatusVariant;
25
47
  /** 尺寸 */
26
48
  size?: SelectorSize;
49
+ /**
50
+ * default 是带边框的输入框,ghost 去掉边框,适合放进工具栏。
51
+ * @default 'default'
52
+ */
53
+ variant?: SelectorVariant;
54
+ /**
55
+ * popover 锚在触发器下,bottom-sheet 在底部弹层里展开。
56
+ * @default 'popover'
57
+ */
58
+ presentation?: SelectorPresentation;
27
59
  /** 是否可搜索 */
28
60
  searchable?: boolean;
29
61
  /** 搜索占位文本 */
@@ -34,8 +66,14 @@ interface SelectorProps {
34
66
  clearLabel?: string;
35
67
  /** 空状态文本 */
36
68
  emptyText?: string;
37
- /** 标签(用于无障碍) */
69
+ /** 可见标签。不传时用占位文本作为隐藏的无障碍名称。 */
38
70
  label?: string;
71
+ /** 隐藏可见标签,仍保留给读屏。 */
72
+ isLabelHidden?: boolean;
73
+ /** 标签下方的说明 */
74
+ description?: string;
75
+ /** 控件宽度。数字按像素,字符串原样使用。 */
76
+ width?: number | string;
39
77
  /** 名称(用于表单提交) */
40
78
  name?: string;
41
79
  }
@@ -71,10 +109,14 @@ declare const __VLS_base: import("vue").DefineComponent<SelectorProps, {}, {}, {
71
109
  "onUpdate:modelValue"?: ((value: string | number | null) => any) | undefined;
72
110
  }>, {
73
111
  size: SelectorSize;
74
- status: SelectorStatus;
112
+ variant: SelectorVariant;
113
+ status: SelectorStatusInput;
75
114
  modelValue: string | number | null;
115
+ isLabelHidden: boolean;
116
+ statusVariant: SelectorStatusVariant;
76
117
  disabled: boolean;
77
118
  clearable: boolean;
119
+ presentation: SelectorPresentation;
78
120
  searchable: boolean;
79
121
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
80
122
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -85,4 +127,4 @@ type __VLS_WithSlots<T, S> = T & {
85
127
  };
86
128
  };
87
129
  //#endregion
88
- export { SelectorSize as a, SelectorProps as i, SelectorEmits as n, SelectorSlots as o, SelectorOption as r, SelectorStatus as s, _default as t };
130
+ export { SelectorOptionInput as a, SelectorSection as c, SelectorStatus as d, SelectorStatusInput as f, SelectorOption as i, SelectorSize as l, SelectorVariant as m, SelectorEmits as n, SelectorPresentation as o, SelectorStatusVariant as p, SelectorEntry as r, SelectorProps as s, _default as t, SelectorSlots as u };
@@ -15,6 +15,14 @@ type ContextMenuSize = 'sm' | 'md' | 'lg';
15
15
  * text flow.
16
16
  */
17
17
  type ContextMenuTriggerElement = 'div' | 'span';
18
+ /**
19
+ * How the actions are presented.
20
+ *
21
+ * `popover` anchors a menu to the pointer, `bottom-sheet` presents a
22
+ * thumb-reachable sheet, and `adaptive` uses the sheet at 768px and below
23
+ * when the primary pointer is coarse.
24
+ */
25
+ type ContextMenuPresentation = 'popover' | 'bottom-sheet' | 'adaptive';
18
26
  /** A menu width as a number of pixels or any CSS length. */
19
27
  type ContextMenuWidth = number | string;
20
28
  /**
@@ -134,6 +142,11 @@ interface ContextMenuProps {
134
142
  * @default 'div'
135
143
  */
136
144
  triggerAs?: ContextMenuTriggerElement;
145
+ /**
146
+ * How the menu is presented.
147
+ * @default 'popover'
148
+ */
149
+ presentation?: ContextMenuPresentation;
137
150
  /**
138
151
  * Open state of the menu. Bind it with `v-model:is-open` to control the
139
152
  * menu from the outside; leave it unbound and the menu manages its own
@@ -316,6 +329,7 @@ declare const __VLS_base$3: import("vue").DefineComponent<__VLS_PublicProps, {
316
329
  label: string;
317
330
  size: ContextMenuSize;
318
331
  isDisabled: boolean;
332
+ presentation: ContextMenuPresentation;
319
333
  triggerAs: ContextMenuTriggerElement;
320
334
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
321
335
  declare const __VLS_export$4: __VLS_WithSlots$3<typeof __VLS_base$3, __VLS_Slots$3>;
@@ -381,4 +395,4 @@ type __VLS_WithSlots<T, S> = T & {
381
395
  };
382
396
  };
383
397
  //#endregion
384
- export { ContextMenuSlots as C, ContextMenuTriggerElement as D, ContextMenuSubMenuSlots as E, ContextMenuVariant as O, ContextMenuSize as S, ContextMenuSubMenuProps as T, ContextMenuItemSlots as _, _default$4 as a, ContextMenuProps as b, ContextMenuDividerData as c, ContextMenuGroupProps as d, ContextMenuGroupSlots as f, ContextMenuItemProps as g, ContextMenuItemIcon as h, _default$3 as i, ContextMenuWidth as k, ContextMenuDividerProps as l, ContextMenuItemEmits as m, _default$1 as n, useContextMenu as o, ContextMenuItemData as p, _default$2 as r, useContextMenuSize as s, _default as t, ContextMenuEmits as u, ContextMenuItemTarget as v, ContextMenuSubMenuEmits as w, ContextMenuSection as x, ContextMenuOption as y };
398
+ export { ContextMenuWidth as A, ContextMenuSize as C, ContextMenuSubMenuSlots as D, ContextMenuSubMenuProps as E, ContextMenuTriggerElement as O, ContextMenuSection as S, ContextMenuSubMenuEmits as T, ContextMenuItemSlots as _, _default$4 as a, ContextMenuPresentation as b, ContextMenuDividerData as c, ContextMenuGroupProps as d, ContextMenuGroupSlots as f, ContextMenuItemProps as g, ContextMenuItemIcon as h, _default$3 as i, ContextMenuVariant as k, ContextMenuDividerProps as l, ContextMenuItemEmits as m, _default$1 as n, useContextMenu as o, ContextMenuItemData as p, _default$2 as r, useContextMenuSize as s, _default as t, ContextMenuEmits as u, ContextMenuItemTarget as v, ContextMenuSlots as w, ContextMenuProps as x, ContextMenuOption as y };