@astryx-vue/core 0.2.1 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD_PARTY_NOTICES.md +2 -0
- package/dist/AppShell/index.d.ts +1 -1
- package/dist/AppShell/index.js +1 -1
- package/dist/{AppShell-1wNIEtK_.js → AppShell-Dd-D4bA2.js} +2 -2
- package/dist/AvatarGroup/index.d.ts +1 -1
- package/dist/Badge/index.d.ts +2 -1
- package/dist/Banner/index.d.ts +1 -1
- package/dist/Breadcrumbs/index.d.ts +3 -2
- package/dist/Breadcrumbs/index.js +3 -2
- package/dist/{Breadcrumbs-C97HmjkC.js → Breadcrumbs-CWGfgLNK.js} +13 -8
- package/dist/Button/index.d.ts +1 -1
- package/dist/ButtonGroup/index.d.ts +1 -1
- package/dist/Calendar/index.d.ts +2 -2
- package/dist/Calendar/index.js +1 -1
- package/dist/Calendar-CnOsSjMY.js +656 -0
- package/dist/Card/index.d.ts +1 -1
- package/dist/Carousel/index.js +1 -1
- package/dist/{Carousel-BGUnskjo.js → Carousel-JA7ilqI_.js} +2 -2
- package/dist/Chat/index.d.ts +2 -2
- package/dist/Chat/index.js +2 -2
- package/dist/Chat-C7WrCOE4.js +3148 -0
- package/dist/CheckboxIndicator/index.js +1 -1
- package/dist/CheckboxIndicator-D37cm2Rh.js +68 -0
- package/dist/CheckboxInput/index.d.ts +1 -1
- package/dist/CheckboxInput/index.js +1 -1
- package/dist/{CheckboxInput-CMsEE1_4.js → CheckboxInput-25Q8ItH-.js} +10 -9
- package/dist/CheckboxList/index.d.ts +1 -1
- package/dist/CheckboxList/index.js +1 -1
- package/dist/{CheckboxList-BbCPiend.js → CheckboxList-CnCGnkZk.js} +77 -24
- package/dist/Citation/index.js +1 -1
- package/dist/{Citation-DunoAqVH.js → Citation-CtwrU33I.js} +2 -2
- package/dist/ClickableCard/index.d.ts +1 -1
- package/dist/Code/index.d.ts +1 -1
- package/dist/Code/index.js +2 -2
- package/dist/{Code-yb_KOFtJ.js → Code-BvefYRpx.js} +2 -1
- package/dist/{CodeBlock-CAF-VJnh.js → CodeBlock-BZGzYeoL.js} +1 -1
- package/dist/Collapsible/index.d.ts +1 -1
- package/dist/Collapsible/index.js +1 -1
- package/dist/{Collapsible-DvMiYJp7.js → Collapsible-3YerR-FO.js} +1 -1
- package/dist/CommandPalette/index.js +1 -1
- package/dist/{CommandPalette-xfm9ldUI.js → CommandPalette-BNbM9T9y.js} +1 -1
- package/dist/ComplexSelector/index.d.ts +1 -1
- package/dist/ComplexSelector/index.js +1 -1
- package/dist/{ComplexSelector-B6lBTRhP.js → ComplexSelector-LtbLlrcj.js} +3 -3
- package/dist/ContextMenu/index.d.ts +3 -2
- package/dist/ContextMenu/index.js +3 -2
- package/dist/{ContextMenu-DUkED3Z3.js → ContextMenu-DVQl0xL5.js} +204 -56
- package/dist/DateInput/index.d.ts +2 -2
- package/dist/DateInput/index.js +1 -1
- package/dist/DateInput-zm8sNc0t.js +743 -0
- package/dist/DateRangeInput/index.d.ts +1 -1
- package/dist/DateRangeInput/index.js +1 -1
- package/dist/{DateRangeInput-e9KSxBBK.js → DateRangeInput-DlVFzrf7.js} +54 -19
- package/dist/DateTimeInput/index.d.ts +1 -1
- package/dist/DateTimeInput/index.js +1 -1
- package/dist/{DateTimeInput-fSOfuLex.js → DateTimeInput-C7Z-p6Yd.js} +54 -15
- package/dist/Dialog/index.d.ts +1 -1
- package/dist/Divider/index.d.ts +1 -1
- package/dist/DropdownMenu/index.d.ts +3 -3
- package/dist/DropdownMenu/index.js +4 -3
- package/dist/{DropdownMenu-8G0B1UND.js → DropdownMenu-BoZChdev.js} +308 -63
- package/dist/DropdownMenu-u1psFjis.js +325 -0
- package/dist/DropdownMenuRadioItem.vue-uVM0FD2f.d.ts +564 -0
- package/dist/FileInput/index.d.ts +1 -1
- package/dist/FileInput/index.js +1 -1
- package/dist/{FileInput-D-fchyQH.js → FileInput-QdlZn7qK.js} +2 -2
- package/dist/Icon/index.d.ts +4 -3
- package/dist/Icon/index.js +2 -2
- package/dist/{Icon-Bku25g_K.js → Icon-bteSId7T.js} +114 -14
- package/dist/Indicator/index.d.ts +3 -0
- package/dist/Indicator/index.js +2 -0
- package/dist/InputGroup/index.d.ts +2 -2
- package/dist/InputGroup/index.js +3 -2
- package/dist/InputGroup-BzR6JRZb.js +129 -0
- package/dist/Lightbox/index.js +1 -1
- package/dist/{Lightbox-uuVGgHxW.js → Lightbox-BSzfqZ-u.js} +2 -2
- package/dist/List/index.d.ts +1 -1
- package/dist/Markdown/index.js +1 -1
- package/dist/{Markdown-DLICa3db.js → Markdown-B6tSqenv.js} +8 -5
- package/dist/MetadataList/index.d.ts +1 -1
- package/dist/MetadataList/index.js +1 -1
- package/dist/{MetadataList-h492rqEN.js → MetadataList-aN1tRn6W.js} +1 -1
- package/dist/MobileNav/index.js +1 -1
- package/dist/{MobileNavToggle-BMj3Wtuq.js → MobileNavToggle-fqcSafkc.js} +1 -1
- package/dist/MoreMenu/index.d.ts +1 -1
- package/dist/MoreMenu/index.js +1 -1
- package/dist/{MoreMenu-DkYi5az5.js → MoreMenu-B3brqdK_.js} +1 -1
- package/dist/MultiSelector/index.d.ts +2 -2
- package/dist/MultiSelector/index.js +1 -1
- package/dist/{MultiSelector-C2IS-EaU.js → MultiSelector-BD5PMgez.js} +303 -121
- package/dist/{NavDisclosure-DHrSNRDR.js → NavDisclosure-DbYLDXK0.js} +1 -1
- package/dist/NavItem/index.d.ts +1 -1
- package/dist/NavMenu/index.js +2 -2
- package/dist/{NavMenuItem-B-k7olt5.js → NavMenuItem-DrwIMHKO.js} +1 -1
- package/dist/NumberInput/index.js +1 -1
- package/dist/{NumberInput-CjfAsFwj.js → NumberInput-CBeU4lEl.js} +1 -1
- package/dist/Outline/index.js +1 -1
- package/dist/{Outline-BTmrtvXR.js → Outline--HVMSB6i.js} +1 -1
- package/dist/OverflowList/index.d.ts +1 -1
- package/dist/OverflowList/index.js +1 -1
- package/dist/{OverflowList-CRE8BE7V.js → OverflowList-FMh7r-r_.js} +3 -3
- package/dist/Pagination/index.d.ts +1 -1
- package/dist/Pagination/index.js +1 -1
- package/dist/{Pagination-BpGXPmc7.js → Pagination-DlIvESjx.js} +2 -2
- package/dist/Popover/index.d.ts +1 -1
- package/dist/Popover/index.js +1 -1
- package/dist/{Popover-Crhk9PNP.js → Popover-D7zqpFwU.js} +1 -1
- package/dist/PowerSearch/index.d.ts +2 -0
- package/dist/PowerSearch/index.js +2 -0
- package/dist/PowerSearch-CMG7Rb69.js +2386 -0
- package/dist/ProgressBar/index.d.ts +1 -1
- package/dist/Radio/index.d.ts +1 -1
- package/dist/Radio/index.js +1 -1
- package/dist/{RadioGroup-BqjdSCfJ.js → RadioGroup-CBqUPq_L.js} +16 -8
- package/dist/RadioList/index.d.ts +1 -1
- package/dist/RadioList/index.js +1 -1
- package/dist/{RadioList-DI8ujXcT.js → RadioList-CPOJn9Th.js} +1 -1
- package/dist/Resizable/index.d.ts +1 -1
- package/dist/Resizable/index.js +1 -1
- package/dist/{Resizable-CE8XQDL2.js → Resizable-CXpvj1TZ.js} +1 -1
- package/dist/ScrollableArea/index.d.ts +1 -1
- package/dist/SelectableCard/index.d.ts +1 -1
- package/dist/Selector/index.d.ts +2 -2
- package/dist/Selector/index.js +1 -1
- package/dist/Selector-BpPnuWH3.js +618 -0
- package/dist/SideNav/index.d.ts +1 -1
- package/dist/SideNav/index.js +1 -1
- package/dist/{SideNav-DcDWBnXJ.js → SideNav-D4TupqgE.js} +3 -3
- package/dist/Stack/index.d.ts +1 -1
- package/dist/Stepper/index.d.ts +1 -1
- package/dist/Stepper/index.js +1 -1
- package/dist/{Stepper-DZKaqEoz.js → Stepper-H-6-T5Ps.js} +1 -1
- package/dist/Switch/index.d.ts +1 -1
- package/dist/TabList/index.d.ts +1 -1
- package/dist/TabList/index.js +1 -1
- package/dist/{TabList-hm06QPiW.js → TabList-BlzkrObv.js} +2 -2
- package/dist/Table/index.d.ts +3 -3
- package/dist/Table/index.js +2 -2
- package/dist/Table-nqA_njNz.js +1982 -0
- package/dist/TextArea/index.d.ts +1 -1
- package/dist/TextInput/index.d.ts +1 -1
- package/dist/Theme/index.d.ts +2 -1
- package/dist/Theme/index.js +1 -1
- package/dist/{Theme-BuUiiJNr.js → Theme-CejS9MHm.js} +21 -3
- package/dist/Thumbnail/index.js +1 -1
- package/dist/{Thumbnail-CAOYds8t.js → Thumbnail-CXb3m_Hv.js} +2 -2
- package/dist/{TimeField-BGbxCoKU.js → TimeField-B3cndWb0.js} +2 -2
- package/dist/TimeInput/index.d.ts +1 -1
- package/dist/TimeInput/index.js +1 -1
- package/dist/{TimeInput-DJP3l4ZS.js → TimeInput-BHQ_LKGm.js} +1 -1
- package/dist/Timestamp/index.d.ts +1 -1
- package/dist/Timestamp/index.js +1 -1
- package/dist/{Timestamp-BzRp8uWc.js → Timestamp-Cfuxbb3i.js} +3 -3
- package/dist/ToggleButton/index.d.ts +1 -1
- package/dist/Token/index.d.ts +1 -1
- package/dist/Token/index.js +1 -1
- package/dist/{Token-CjocuhzE.js → Token-CdVLH0_H.js} +2 -2
- package/dist/Tokenizer/index.d.ts +1 -1
- package/dist/Tokenizer/index.js +1 -1
- package/dist/{Tokenizer-mYES5SPM.js → Tokenizer-DlD-S_8-.js} +4 -4
- package/dist/Toolbar/index.d.ts +1 -1
- package/dist/TopNav/index.d.ts +1 -1
- package/dist/TopNav/index.js +1 -1
- package/dist/{TopNav-C2t6JkZb.js → TopNav-DzV874G7.js} +5 -5
- package/dist/TreeList/index.d.ts +1 -1
- package/dist/TreeList/index.js +1 -1
- package/dist/{TreeList-THJ0KamE.js → TreeList-DEwvlZRV.js} +2 -2
- package/dist/Typeahead/index.d.ts +1 -1
- package/dist/Typeahead/index.js +1 -1
- package/dist/{Typeahead-D7VnvRpK.js → Typeahead-DQ3tmqYe.js} +4 -4
- package/dist/{useTypeaheadMenu-Ba7XpcZl.js → TypeaheadMenu-CGvo0Tud.js} +107 -107
- package/dist/{context-O2Vb8cJl.js → colorMode-CBgdgDSn.js} +1 -7
- package/dist/composables/index.d.ts +4 -4
- package/dist/composables/index.js +10 -5
- package/dist/{composables-CVfjp9h4.js → composables-DDI08XFF.js} +98 -1
- package/dist/context-Cws_tXTr.js +7 -0
- package/dist/context-D5-MwxnN.js +4 -0
- package/dist/{context-DzcK4T_C.js → context-DmOLCubj.js} +262 -12
- package/dist/{index-DimuSES0.d.ts → index-B1x05arQ.d.ts} +3 -1
- package/dist/index-B9WzWqzk.d.ts +18 -0
- package/dist/index-B9f1rUEv.d.ts +77 -0
- package/dist/{index-DnSrjbjP.d.ts → index-BB5yVIN-.d.ts} +2 -2
- package/dist/{index-Bu0Zd1uw.d.ts → index-BMn9ghAX.d.ts} +3 -3
- package/dist/{index-CJlBAXwj.d.ts → index-BRfR0lhb.d.ts} +41 -4
- package/dist/{index-DeOftUMq.d.ts → index-BTAgQRP0.d.ts} +762 -114
- package/dist/{index-DA52oIdw.d.ts → index-BcJBLWJ0.d.ts} +2 -2
- package/dist/{index-jdjcb3Js.d.ts → index-Bqb_Fyju.d.ts} +2 -2
- package/dist/{index-CNjbOgty.d.ts → index-C-QpeUlQ.d.ts} +2 -2
- package/dist/{index-I4J7gwa1.d.ts → index-C2sfHfBw.d.ts} +31 -5
- package/dist/{index-By2mSzUA.d.ts → index-CA6RbRWx.d.ts} +1 -1
- package/dist/{index-DnEh-HA0.d.ts → index-C_2Z65Rp.d.ts} +1 -1
- package/dist/{index-cG1E0U2s.d.ts → index-Ca8VIE4l.d.ts} +1 -1
- package/dist/{index-CRizexSC.d.ts → index-Ch6BbxCP.d.ts} +2 -67
- package/dist/{index-CBym0hSq.d.ts → index-ChWlKHjc.d.ts} +1 -1
- package/dist/{index-DXSs3rwa.d.ts → index-CngORuiq.d.ts} +137 -2
- package/dist/index-Ctu32CLv.d.ts +902 -0
- package/dist/{index-DQAnGHu7.d.ts → index-D1Twv_fL.d.ts} +65 -6
- package/dist/{index-D_nYxnNv.d.ts → index-D7-WTV6I.d.ts} +1 -1
- package/dist/{index-c_TaW8mM.d.ts → index-D8o50qOE.d.ts} +1 -1
- package/dist/index-DMQG6kdM.d.ts +416 -0
- package/dist/index-D_UEJIU5.d.ts +83 -0
- package/dist/{index-D2bSSSBP.d.ts → index-DkVEBdWa.d.ts} +2 -2
- package/dist/{index-SMh42NI8.d.ts → index-DxsKyAxq.d.ts} +118 -46
- package/dist/{index-BHqRH7QW.d.ts → index-FEy8qFSD.d.ts} +2 -2
- package/dist/{index-Byar3h1e.d.ts → index-HV6W3xCx.d.ts} +1 -1
- package/dist/{index-Clmz00IK.d.ts → index-LIyvJTW3.d.ts} +63 -0
- package/dist/{index-BKr7yvVv.d.ts → index-MPcg1Pm4.d.ts} +1 -1
- package/dist/{index-cGagYM1g.d.ts → index-ViSV0RBx.d.ts} +1 -1
- package/dist/{index-Z_onS2lR.d.ts → index-f4NGT-e2.d.ts} +3 -3
- package/dist/{index-DsyKhauk.d.ts → index-foQMNKZO.d.ts} +1 -1
- package/dist/{index-1uRMrk63.d.ts → index-nCEmW6wa.d.ts} +1 -1
- package/dist/{index-NOXYEdOI.d.ts → index-utZGF4GR.d.ts} +1 -1
- package/dist/{index-3p2BDVHq.d.ts → index-vP0EtrJJ.d.ts} +13 -3
- package/dist/{index-CZeoAr0a.d.ts → index-xfkEuGLY.d.ts} +2 -2
- package/dist/index.d.ts +81 -78
- package/dist/index.js +122 -106
- package/dist/locale/index.d.ts +1 -1
- package/dist/locale/index.js +2 -2
- package/dist/{locale-Cpk_nrLA.js → locale-CCwVnyMZ.js} +25 -1
- package/dist/power-search-DrDfcoL1.d.ts +68 -0
- package/dist/searchResultMessage-DN0HeRRB.js +94 -0
- package/dist/semantic-CKH9XVqa.d.ts +54 -0
- package/dist/{types-JktRxujg.d.ts → types-Cp4liug-.d.ts} +66 -3
- package/dist/{types-BKcxXW--.d.ts → types-CwyibrRB.d.ts} +12 -11
- package/dist/types-DIYwbkpe.d.ts +33 -0
- package/dist/types-jmqqnkKA.d.ts +163 -0
- package/dist/{useAnchoredListbox-7W90Ny-9.js → useAnchoredListbox-BN9LQnon.js} +1 -1
- package/dist/useDatePresentation-C07PnOCw.js +21 -0
- package/dist/{useMonthGrid-CmJsZTcB.js → useDateRange-CIXoE_8k.js} +1 -42
- package/dist/useDisclosureHandle-Df3HhAfC.js +24 -0
- package/dist/{useDismiss-CAiHU6QD.js → useDismiss-Cj8x_51F.js} +8 -4
- package/dist/useFieldControlState-voICDrys.js +18 -0
- package/dist/useHandleRef-6cdKugm8.js +17 -0
- package/dist/useIndicator-i1NORM7W.js +147 -0
- package/dist/useMenuDrillIn-OaEwjK44.js +520 -0
- package/dist/useMonthGrid-fGHSSrFc.js +43 -0
- package/dist/usePendingChange-ib-h8FZK.js +25 -0
- package/dist/{useResizable-CeESZS1v.d.ts → useResizable-CUoNPmUw.d.ts} +1 -1
- package/dist/useSubmenuMode-CZN9qrUo.js +37 -0
- package/package.json +9 -1
- package/styles/calendar.css +38 -3
- package/styles/chat.css +469 -1
- package/styles/check-indicator.css +17 -0
- package/styles/checkbox-indicator.css +29 -10
- package/styles/checkbox-input.css +0 -11
- package/styles/date-input.css +48 -0
- package/styles/dropdown-menu.css +163 -0
- package/styles/field.css +48 -0
- package/styles/icon.css +69 -1
- package/styles/input-group.css +32 -3
- package/styles/multi-selector.css +26 -0
- package/styles/power-search.css +303 -0
- package/styles/radio-indicator.css +90 -0
- package/styles/radio.css +9 -42
- package/styles/selector.css +112 -14
- package/styles/table.css +304 -1
- package/styles.css +3 -0
- package/dist/Calendar-DqC3EDN1.js +0 -352
- package/dist/Chat-DCjXRiOF.js +0 -1051
- package/dist/CheckboxIndicator-DdJmksHt.js +0 -52
- package/dist/DateInput-Crcg-CCj.js +0 -376
- package/dist/DropdownMenu-XvW4BJob.js +0 -164
- package/dist/InputGroup-ChrFVxzV.js +0 -42
- package/dist/Selector-DkJOLZSR.js +0 -468
- package/dist/Table-DwehtMap.js +0 -967
- package/dist/index-BLOEjvaM.d.ts +0 -398
- package/dist/index-Bgv4ZmBl.d.ts +0 -72
- package/dist/index-CuFLztiI.d.ts +0 -49
- package/dist/index-DJo-BmXZ.d.ts +0 -431
- package/dist/index-IbUN4M8V.d.ts +0 -40
- package/dist/types-DDAAT1Xd.d.ts +0 -285
- package/dist/useGridRovingFocus-DQQAOYH5.js +0 -99
- /package/dist/{index-BUXNRekN.d.ts → index-BXkNZF3q.d.ts} +0 -0
|
@@ -1,10 +1,32 @@
|
|
|
1
|
+
import { Ref } from "vue";
|
|
1
2
|
//#region src/MultiSelector/types.d.ts
|
|
2
3
|
type MultiSelectorSize = 'sm' | 'md' | 'lg';
|
|
3
4
|
type MultiSelectorVariant = 'input' | 'ghost';
|
|
4
5
|
type MultiSelectorPresentation = 'popover' | 'bottom-sheet';
|
|
5
6
|
type MultiSelectorStatus = 'default' | 'success' | 'warning' | 'error';
|
|
7
|
+
type MultiSelectorStatusVariant = 'attached' | 'detached' | 'tooltip';
|
|
6
8
|
type MultiSelectorTriggerDisplay = 'count' | 'labels' | 'badges';
|
|
7
9
|
type MultiSelectorCheckboxPosition = 'start' | 'end';
|
|
10
|
+
interface MultiSelectorSelectedItem {
|
|
11
|
+
value: string | number;
|
|
12
|
+
label: string;
|
|
13
|
+
}
|
|
14
|
+
/** 只有创建会带这个描述。普通勾选仍然只传新的值数组。 */
|
|
15
|
+
interface MultiSelectorCreateChange {
|
|
16
|
+
type: 'create';
|
|
17
|
+
query: string;
|
|
18
|
+
}
|
|
19
|
+
interface MultiSelectorHandle {
|
|
20
|
+
open: () => void;
|
|
21
|
+
close: () => void;
|
|
22
|
+
toggle: () => void;
|
|
23
|
+
isOpen: () => boolean;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* 模板里的 ref 会被自动解包,`:handle-ref="someRef"` 会拿到 null。
|
|
27
|
+
* 模板里传回调,或者在脚本里把 ref 对象本身传进来。
|
|
28
|
+
*/
|
|
29
|
+
type MultiSelectorHandleRef = Ref<MultiSelectorHandle | null> | ((handle: MultiSelectorHandle | null) => void);
|
|
8
30
|
interface MultiSelectorOptionData {
|
|
9
31
|
value: string | number;
|
|
10
32
|
label: string;
|
|
@@ -31,6 +53,11 @@ interface MultiSelectorProps {
|
|
|
31
53
|
disabledReason?: string;
|
|
32
54
|
status?: MultiSelectorStatus;
|
|
33
55
|
statusMessage?: string;
|
|
56
|
+
/**
|
|
57
|
+
* 状态文案怎么放。工具栏里的 ghost 会把 attached 收成独立说明,避免把行高撑开。
|
|
58
|
+
* tooltip 把说明留在图标上。
|
|
59
|
+
*/
|
|
60
|
+
statusVariant?: MultiSelectorStatusVariant;
|
|
34
61
|
size?: MultiSelectorSize;
|
|
35
62
|
/** input 是带边框的表单控件,ghost 适合放在工具栏里。 */
|
|
36
63
|
variant?: MultiSelectorVariant;
|
|
@@ -53,10 +80,34 @@ interface MultiSelectorProps {
|
|
|
53
80
|
optional?: boolean;
|
|
54
81
|
name?: string;
|
|
55
82
|
width?: number | string;
|
|
83
|
+
/**
|
|
84
|
+
* 只读。已选值还在,可以聚焦,也会随表单提交,但打不开列表,也没有清除和展开箭头。
|
|
85
|
+
* 不会变暗。和 disabled 同时设置时按禁用处理。
|
|
86
|
+
*/
|
|
87
|
+
isReadOnly?: boolean;
|
|
88
|
+
/** 触发器里显示加载指示。加载时不提供创建行,面板也不声称没有选项。 */
|
|
89
|
+
isLoading?: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* 自定义关闭后的文字。只在 count 和 labels 两种展示里使用,badges 忽略。
|
|
92
|
+
* 没有任何选中项时不调用,触发器继续显示占位符。
|
|
93
|
+
*/
|
|
94
|
+
formatValue?: (items: MultiSelectorSelectedItem[]) => string;
|
|
95
|
+
/**
|
|
96
|
+
* 和 searchable 一起用。输入的文字和任何选项标签都不相同(忽略大小写)时,
|
|
97
|
+
* 列表第一行是「创建」。选中后 change 会多带 `{ type: 'create', query }`,
|
|
98
|
+
* 调用方要在同一次更新里把这个选项加进 options。没有搜索时不会出现创建行。
|
|
99
|
+
*/
|
|
100
|
+
hasCreate?: boolean;
|
|
101
|
+
/** 从外面打开、关闭或查询面板。只读和禁用时 open 不会打开。 */
|
|
102
|
+
handleRef?: MultiSelectorHandleRef;
|
|
103
|
+
/** 面板里没有任何选项时的文案。 */
|
|
104
|
+
emptyText?: string;
|
|
105
|
+
/** 搜索没有命中时的文案。 */
|
|
106
|
+
emptySearchText?: string;
|
|
56
107
|
}
|
|
57
108
|
interface MultiSelectorEmits {
|
|
58
109
|
'update:modelValue': [value: (string | number)[]];
|
|
59
|
-
'change': [value: (string | number)[]];
|
|
110
|
+
'change': [value: (string | number)[], change?: MultiSelectorCreateChange];
|
|
60
111
|
'search': [query: string];
|
|
61
112
|
'openChange': [isOpen: boolean];
|
|
62
113
|
}
|
|
@@ -73,34 +124,42 @@ interface MultiSelectorSlots {
|
|
|
73
124
|
//#region src/MultiSelector/MultiSelector.vue.d.ts
|
|
74
125
|
type __VLS_Slots = MultiSelectorSlots;
|
|
75
126
|
declare const __VLS_base: import("vue").DefineComponent<MultiSelectorProps, {
|
|
127
|
+
open: () => void;
|
|
128
|
+
close: () => void;
|
|
129
|
+
toggle: () => void;
|
|
130
|
+
isOpen: () => boolean;
|
|
76
131
|
focus: () => void | undefined;
|
|
77
132
|
blur: () => void | undefined;
|
|
78
133
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
134
|
+
change: (value: (string | number)[], change?: MultiSelectorCreateChange | undefined) => any;
|
|
79
135
|
search: (query: string) => any;
|
|
80
|
-
change: (value: (string | number)[]) => any;
|
|
81
136
|
"update:modelValue": (value: (string | number)[]) => any;
|
|
82
137
|
openChange: (isOpen: boolean) => any;
|
|
83
138
|
}, string, import("vue").PublicProps, Readonly<MultiSelectorProps> & Readonly<{
|
|
139
|
+
onChange?: ((value: (string | number)[], change?: MultiSelectorCreateChange | undefined) => any) | undefined;
|
|
84
140
|
onSearch?: ((query: string) => any) | undefined;
|
|
85
|
-
onChange?: ((value: (string | number)[]) => any) | undefined;
|
|
86
141
|
"onUpdate:modelValue"?: ((value: (string | number)[]) => any) | undefined;
|
|
87
142
|
onOpenChange?: ((isOpen: boolean) => any) | undefined;
|
|
88
143
|
}>, {
|
|
89
|
-
|
|
144
|
+
variant: MultiSelectorVariant;
|
|
90
145
|
required: boolean;
|
|
146
|
+
status: MultiSelectorStatus;
|
|
147
|
+
isLoading: boolean;
|
|
91
148
|
size: MultiSelectorSize;
|
|
92
|
-
variant: MultiSelectorVariant;
|
|
93
149
|
modelValue: readonly (string | number)[];
|
|
150
|
+
statusVariant: MultiSelectorStatusVariant;
|
|
94
151
|
disabled: boolean;
|
|
95
152
|
labelHidden: boolean;
|
|
96
153
|
clearable: boolean;
|
|
97
154
|
optional: boolean;
|
|
155
|
+
isReadOnly: boolean;
|
|
98
156
|
presentation: MultiSelectorPresentation;
|
|
99
157
|
searchable: boolean;
|
|
100
158
|
selectAll: boolean;
|
|
101
159
|
triggerDisplay: MultiSelectorTriggerDisplay;
|
|
102
160
|
maxBadges: number;
|
|
103
161
|
checkboxPosition: MultiSelectorCheckboxPosition;
|
|
162
|
+
hasCreate: boolean;
|
|
104
163
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
105
164
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
106
165
|
declare const _default: typeof __VLS_export;
|
|
@@ -123,4 +182,4 @@ interface MultiSelectorRow {
|
|
|
123
182
|
*/
|
|
124
183
|
declare function flattenOptions(options: readonly MultiSelectorOption[], query: string): MultiSelectorRow[];
|
|
125
184
|
//#endregion
|
|
126
|
-
export {
|
|
185
|
+
export { MultiSelectorSlots as _, MultiSelectorCreateChange as a, MultiSelectorTriggerDisplay as b, MultiSelectorHandle as c, MultiSelectorOptionData as d, MultiSelectorPresentation as f, MultiSelectorSize as g, MultiSelectorSelectedItem as h, MultiSelectorCheckboxPosition as i, MultiSelectorHandleRef as l, MultiSelectorSection as m, flattenOptions as n, MultiSelectorDivider as o, MultiSelectorProps as p, _default as r, MultiSelectorEmits as s, SELECT_ALL_VALUE as t, MultiSelectorOption as u, MultiSelectorStatus as v, MultiSelectorVariant as x, MultiSelectorStatusVariant as y };
|
|
@@ -82,8 +82,8 @@ type __VLS_Slots = CardSlots;
|
|
|
82
82
|
declare const __VLS_base: import("vue").DefineComponent<CardProps, {
|
|
83
83
|
element: Readonly<import("vue").ShallowRef<HTMLDivElement | null>>;
|
|
84
84
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CardProps> & Readonly<{}>, {
|
|
85
|
-
elevation: CardElevation;
|
|
86
85
|
variant: CardVariant;
|
|
86
|
+
elevation: CardElevation;
|
|
87
87
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
88
88
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
89
89
|
declare const _default: typeof __VLS_export;
|
|
@@ -66,8 +66,8 @@ declare const __VLS_base: import("vue").DefineComponent<PaginationProps, {}, {},
|
|
|
66
66
|
"onUpdate:page"?: ((value: number) => any) | undefined;
|
|
67
67
|
"onUpdate:pageSize"?: ((value: number) => any) | undefined;
|
|
68
68
|
}>, {
|
|
69
|
-
size: PaginationSize;
|
|
70
69
|
variant: PaginationVariant;
|
|
70
|
+
size: PaginationSize;
|
|
71
71
|
disabled: boolean;
|
|
72
72
|
page: number;
|
|
73
73
|
pageSize: number;
|
|
@@ -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
|
+
change: (filters: PowerSearchFilter[], changeType: PowerSearchChangeType, index: number) => any;
|
|
367
|
+
blur: (event: FocusEvent) => any;
|
|
368
|
+
focus: (event: FocusEvent) => any;
|
|
369
|
+
"update:filters": (filters: PowerSearchFilter[]) => any;
|
|
370
|
+
}, string, import("vue").PublicProps, Readonly<PowerSearchProps> & Readonly<{
|
|
371
|
+
onChange?: ((filters: PowerSearchFilter[], changeType: PowerSearchChangeType, index: number) => any) | undefined;
|
|
372
|
+
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
373
|
+
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
374
|
+
"onUpdate:filters"?: ((filters: PowerSearchFilter[]) => any) | undefined;
|
|
375
|
+
}>, {
|
|
376
|
+
status: PowerSearchStatus;
|
|
377
|
+
size: PowerSearchSize;
|
|
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 };
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { o as FieldStatusInput } from "./types-3eXh_5os.js";
|
|
2
|
+
import { ComputedRef, InjectionKey } from "vue";
|
|
3
|
+
//#region src/InputGroup/context.d.ts
|
|
4
|
+
interface InputGroupContext {
|
|
5
|
+
size: ComputedRef<'sm' | 'md' | 'lg'>;
|
|
6
|
+
disabled: ComputedRef<boolean>;
|
|
7
|
+
/** 组标签的 id。没有标签时为空。 */
|
|
8
|
+
labelId: ComputedRef<string | undefined>;
|
|
9
|
+
/** 组的说明和状态文案 id,组内控件可以接进 aria-describedby。 */
|
|
10
|
+
describedBy: ComputedRef<string | undefined>;
|
|
11
|
+
}
|
|
12
|
+
declare const INPUT_GROUP_KEY: InjectionKey<InputGroupContext>;
|
|
13
|
+
//#endregion
|
|
14
|
+
//#region src/InputGroup/types.d.ts
|
|
15
|
+
type InputGroupSize = 'sm' | 'md' | 'lg';
|
|
16
|
+
interface InputGroupProps {
|
|
17
|
+
/**
|
|
18
|
+
* 整组的无障碍名称。写上之后,组会带上标签、说明、可选或必填,以及状态。
|
|
19
|
+
* 组内输入框自己的标签继续说明这一格填什么,通常隐藏起来。
|
|
20
|
+
*/
|
|
21
|
+
label?: string;
|
|
22
|
+
/** 视觉上隐藏标签,读屏仍能读到。 */
|
|
23
|
+
isLabelHidden?: boolean;
|
|
24
|
+
/** 标签和控件之间的说明。 */
|
|
25
|
+
description?: string;
|
|
26
|
+
/** 是否禁用整组,并传给组内控件。 */
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
/** 在标签旁标成可选。 */
|
|
29
|
+
isOptional?: boolean;
|
|
30
|
+
/** 在标签旁标成必填。 */
|
|
31
|
+
isRequired?: boolean;
|
|
32
|
+
/** 尺寸,传给组内控件。 */
|
|
33
|
+
size?: InputGroupSize;
|
|
34
|
+
/** 整组边框和控件下方的状态。 */
|
|
35
|
+
status?: FieldStatusInput;
|
|
36
|
+
/** 标签末尾的提示。 */
|
|
37
|
+
labelTooltip?: string;
|
|
38
|
+
}
|
|
39
|
+
interface InputGroupSlots {
|
|
40
|
+
/** 前缀内容(图标或文本) */
|
|
41
|
+
before?: () => any;
|
|
42
|
+
/** 主输入框 */
|
|
43
|
+
default?: () => any;
|
|
44
|
+
/** 后缀内容(图标或按钮) */
|
|
45
|
+
after?: () => any;
|
|
46
|
+
}
|
|
47
|
+
interface InputGroupTextProps {
|
|
48
|
+
/** 供测试定位。 */
|
|
49
|
+
id?: string;
|
|
50
|
+
}
|
|
51
|
+
interface InputGroupTextSlots {
|
|
52
|
+
default?: () => any;
|
|
53
|
+
}
|
|
54
|
+
//#endregion
|
|
55
|
+
//#region src/InputGroup/InputGroup.vue.d.ts
|
|
56
|
+
type __VLS_Slots$1 = InputGroupSlots;
|
|
57
|
+
declare const __VLS_base$1: import("vue").DefineComponent<InputGroupProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<InputGroupProps> & Readonly<{}>, {
|
|
58
|
+
isOptional: boolean;
|
|
59
|
+
size: InputGroupSize;
|
|
60
|
+
isLabelHidden: boolean;
|
|
61
|
+
isRequired: boolean;
|
|
62
|
+
disabled: boolean;
|
|
63
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
64
|
+
declare const __VLS_export$1: __VLS_WithSlots$1<typeof __VLS_base$1, __VLS_Slots$1>;
|
|
65
|
+
declare const _default$1: typeof __VLS_export$1;
|
|
66
|
+
type __VLS_WithSlots$1<T, S> = T & {
|
|
67
|
+
new (): {
|
|
68
|
+
$slots: S;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
//#endregion
|
|
72
|
+
//#region src/InputGroup/InputGroupText.vue.d.ts
|
|
73
|
+
type __VLS_Slots = InputGroupTextSlots;
|
|
74
|
+
declare const __VLS_base: import("vue").DefineComponent<InputGroupTextProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<InputGroupTextProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
75
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
76
|
+
declare const _default: typeof __VLS_export;
|
|
77
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
78
|
+
new (): {
|
|
79
|
+
$slots: S;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
//#endregion
|
|
83
|
+
export { InputGroupSlots as a, INPUT_GROUP_KEY as c, InputGroupSize as i, InputGroupContext as l, _default$1 as n, InputGroupTextProps as o, InputGroupProps as r, InputGroupTextSlots as s, _default as t };
|
|
@@ -24,10 +24,10 @@ declare const __VLS_base: import("vue").DefineComponent<NavItemProps, {}, {}, {}
|
|
|
24
24
|
}, string, import("vue").PublicProps, Readonly<NavItemProps> & Readonly<{
|
|
25
25
|
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
26
26
|
}>, {
|
|
27
|
+
isSelected: boolean;
|
|
27
28
|
isDisabled: boolean;
|
|
28
|
-
size: NavItemSize;
|
|
29
29
|
isIconOnly: boolean;
|
|
30
|
-
|
|
30
|
+
size: NavItemSize;
|
|
31
31
|
block: boolean;
|
|
32
32
|
plain: boolean;
|
|
33
33
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|