@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.
- package/dist/AppShell/index.js +1 -1
- package/dist/{AppShell-EiGyPFbA.js → AppShell-Cb41gIAj.js} +2 -2
- package/dist/Avatar/index.d.ts +1 -1
- package/dist/Avatar/index.js +1 -1
- package/dist/Avatar-jmHInHwj.js +244 -0
- package/dist/AvatarGroup/index.d.ts +1 -1
- package/dist/AvatarGroup/index.js +1 -1
- package/dist/{AvatarGroup-CZcgAMjM.js → AvatarGroup-QyzSrpYA.js} +8 -7
- package/dist/Badge/index.d.ts +2 -1
- package/dist/Badge/index.js +1 -1
- package/dist/Badge-CjDQPF5g.js +30 -0
- package/dist/Banner/index.d.ts +1 -1
- package/dist/Breadcrumbs/index.d.ts +2 -2
- package/dist/Breadcrumbs/index.js +1 -1
- package/dist/{Breadcrumbs-C3YZFQ9w.js → Breadcrumbs-CTQ7fjDn.js} +45 -11
- 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-BFaI5AMv.js +352 -0
- package/dist/Card/index.d.ts +1 -1
- package/dist/Carousel/index.js +1 -1
- package/dist/{Carousel-BTtHkKea.js → Carousel-X0cuQkvg.js} +2 -2
- package/dist/Chat/index.d.ts +2 -2
- package/dist/Chat/index.js +2 -2
- package/dist/Chat-M0tiGrNT.js +3148 -0
- package/dist/CheckboxInput/index.d.ts +1 -1
- package/dist/CheckboxList/index.d.ts +1 -1
- package/dist/CheckboxList/index.js +1 -1
- package/dist/Citation/index.js +1 -1
- package/dist/{Citation-DijdbUUu.js → Citation-C1veUk5p.js} +2 -2
- package/dist/ClickableCard/index.d.ts +1 -1
- package/dist/Code/index.js +1 -1
- package/dist/{CodeBlock-CxTb6j9_.js → CodeBlock-DesTJAkm.js} +1 -1
- package/dist/Collapsible/index.js +1 -1
- package/dist/{Collapsible-9MC08X39.js → Collapsible-BestK35V.js} +1 -1
- package/dist/CommandPalette/index.js +1 -1
- package/dist/{CommandPalette-BD2iODF5.js → CommandPalette-BArt97V8.js} +1 -1
- package/dist/ComplexSelector/index.d.ts +1 -1
- package/dist/ComplexSelector/index.js +1 -1
- package/dist/{ComplexSelector-D9iXd5cH.js → ComplexSelector-CAoig1RK.js} +2 -2
- package/dist/ContextMenu/index.d.ts +2 -2
- package/dist/ContextMenu/index.js +1 -1
- package/dist/{ContextMenu-HS_WqYIg.js → ContextMenu-9Im6i43E.js} +101 -63
- package/dist/DateInput/index.d.ts +2 -2
- package/dist/DateInput/index.js +1 -1
- package/dist/DateInput-BLocxqC3.js +376 -0
- package/dist/DateRangeInput/index.d.ts +1 -1
- package/dist/DateRangeInput/index.js +1 -1
- package/dist/{DateRangeInput-1bhPGG2s.js → DateRangeInput-DwDy3eRo.js} +2 -2
- package/dist/DateTimeInput/index.d.ts +1 -1
- package/dist/DateTimeInput/index.js +1 -1
- package/dist/{DateTimeInput-SnPdgk6P.js → DateTimeInput-BYiaC9bn.js} +5 -3
- package/dist/DropdownMenu/index.d.ts +3 -2
- package/dist/DropdownMenu/index.js +3 -2
- package/dist/DropdownMenu-Ddfr-aEC.js +164 -0
- package/dist/{DropdownMenu-UJGych6v.js → DropdownMenu-Dh-WAHKb.js} +63 -16
- package/dist/FileInput/index.d.ts +1 -1
- package/dist/FileInput/index.js +1 -1
- package/dist/{FileInput-BQiwE-GB.js → FileInput-DLO6V12n.js} +2 -2
- package/dist/Icon/index.d.ts +4 -3
- package/dist/Icon/index.js +3 -2
- package/dist/Icon/plugin.d.ts +45 -0
- package/dist/Icon/plugin.js +177 -0
- package/dist/Icon-CJKjdJy-.js +198 -0
- package/dist/Lightbox/index.js +1 -1
- package/dist/{Lightbox-CshKoB0r.js → Lightbox-CdFCS_EA.js} +2 -2
- package/dist/Link/index.d.ts +1 -1
- package/dist/Link/index.js +1 -1
- package/dist/Link-DqdQZ37C.js +141 -0
- package/dist/Markdown/index.js +1 -1
- package/dist/{Markdown-D-Ua055V.js → Markdown-BqKloI3w.js} +3 -3
- package/dist/MetadataList/index.js +1 -1
- package/dist/{MetadataList-sYph_d8Q.js → MetadataList-CvZkmisf.js} +1 -1
- package/dist/MobileNav/index.js +1 -1
- package/dist/{MobileNavToggle-DD9D01aj.js → MobileNavToggle-Bwi0qXXM.js} +1 -1
- package/dist/MoreMenu/index.d.ts +1 -1
- package/dist/MoreMenu/index.js +1 -1
- package/dist/{MoreMenu-BVrK5kkk.js → MoreMenu-BwJaJrkB.js} +2 -2
- package/dist/MultiSelector/index.js +1 -1
- package/dist/{MultiSelector-DiYov9sF.js → MultiSelector-C-ETfFy_.js} +2 -2
- package/dist/NumberInput/index.d.ts +2 -2
- package/dist/NumberInput/index.js +1 -1
- package/dist/NumberInput-DjetVB8O.js +210 -0
- package/dist/Outline/index.js +1 -1
- package/dist/{Outline-DQfEBxlc.js → Outline-Bz9c-u5y.js} +1 -1
- package/dist/OverflowList/index.d.ts +1 -1
- package/dist/OverflowList/index.js +1 -1
- package/dist/{OverflowList-BU5VCntl.js → OverflowList-ED-KN9Y5.js} +1 -1
- package/dist/Overlay/index.d.ts +1 -1
- package/dist/Pagination/index.d.ts +2 -2
- package/dist/Pagination/index.js +1 -1
- package/dist/{Pagination-HdhtykeF.js → Pagination-Cb66HMEf.js} +76 -22
- package/dist/PowerSearch/index.d.ts +2 -0
- package/dist/PowerSearch/index.js +2 -0
- package/dist/PowerSearch-CjU8y4mi.js +2386 -0
- package/dist/ProgressBar/index.d.ts +1 -1
- package/dist/ProgressBar/index.js +1 -1
- package/dist/{ProgressBar-ChDp-7oe.js → ProgressBar-DO9Chic6.js} +31 -11
- package/dist/Radio/index.d.ts +1 -1
- package/dist/RadioList/index.d.ts +1 -1
- package/dist/Resizable/index.d.ts +1 -1
- package/dist/Resizable/index.js +1 -1
- package/dist/{Resizable-BhSMfO5B.js → Resizable-D-TBCg0Y.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-DE2IEFML.js +468 -0
- package/dist/SideNav/index.d.ts +1 -1
- package/dist/SideNav/index.js +1 -1
- package/dist/{SideNav-B-Om6Bz3.js → SideNav-DonEfiAx.js} +17 -17
- package/dist/Stepper/index.js +1 -1
- package/dist/{Stepper-BZ_8SEZt.js → Stepper-D2ZIcUNx.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-Cnc2Hs1H.js → TabList-D3F-stq-.js} +10 -3
- package/dist/Table/index.d.ts +3 -3
- package/dist/Table/index.js +2 -2
- package/dist/Table-CrP2Uffq.js +1982 -0
- package/dist/TextArea/index.d.ts +1 -1
- package/dist/TextArea/index.js +1 -1
- package/dist/{TextArea-Cv9UVbzS.js → TextArea-CPwSytdO.js} +12 -6
- package/dist/TextInput/index.d.ts +1 -1
- package/dist/Thumbnail/index.js +1 -1
- package/dist/{Thumbnail-Dc1UpykG.js → Thumbnail-BC5JGPGZ.js} +11 -11
- package/dist/{TimeField-C7t9Knq9.js → TimeField-DpHFrNv0.js} +2 -2
- package/dist/TimeInput/index.d.ts +1 -1
- package/dist/TimeInput/index.js +1 -1
- package/dist/{TimeInput-BXxCOY98.js → TimeInput-DJLV0_4z.js} +1 -1
- package/dist/Timestamp/index.d.ts +1 -1
- package/dist/Timestamp/index.js +2 -1
- package/dist/{Timestamp-DlZSmgCJ.js → Timestamp-GKNjjt5g.js} +4 -121
- package/dist/Toast/index.d.ts +2 -2
- package/dist/Toast/index.js +1 -1
- package/dist/{Toast-BKXPvEMp.js → Toast-C2ML-bmi.js} +37 -7
- package/dist/ToggleButton/index.d.ts +1 -1
- package/dist/Token/index.js +1 -1
- package/dist/{Token-wt4e80IM.js → Token-Chu_eCVs.js} +1 -1
- package/dist/Tokenizer/index.js +1 -1
- package/dist/{Tokenizer-nmTqdS9n.js → Tokenizer-DRDpvQ_l.js} +3 -3
- 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-notp-mJx.js → TopNav-CEyWddtA.js} +3 -3
- package/dist/TreeList/index.js +1 -1
- package/dist/{TreeList-s1xBQ0qq.js → TreeList-COS8US8e.js} +3 -3
- package/dist/Typeahead/index.js +1 -1
- package/dist/{Typeahead-VAuiCurV.js → Typeahead-P7cCqtaQ.js} +3 -3
- package/dist/{useTypeaheadMenu-Ba7XpcZl.js → TypeaheadMenu-CGvo0Tud.js} +107 -107
- package/dist/composables/index.d.ts +3 -3
- package/dist/{context-Dbo22sck.js → context-CiKncNSH.js} +184 -6
- package/dist/formatInstant-BDWUIxS7.js +119 -0
- package/dist/{index-SMh42NI8.d.ts → index-B1TG2GPS.d.ts} +2 -2
- package/dist/{index-DRmb-oUa.d.ts → index-B9WzWqzk.d.ts} +3 -29
- package/dist/{index-BuubzuE8.d.ts → index-BDZCJ9ri.d.ts} +2 -2
- package/dist/{index-z4p2k9VR.d.ts → index-Bgv4ZmBl.d.ts} +20 -2
- package/dist/{index-BoRIw-bP.d.ts → index-Bt7ewoz2.d.ts} +32 -2
- package/dist/{index-uQrLBZfF.d.ts → index-Bu3oXIIS.d.ts} +24 -0
- package/dist/index-CJlBAXwj.d.ts +100 -0
- package/dist/{index-DT9S92sh.d.ts → index-CNjbOgty.d.ts} +15 -0
- package/dist/{index-DXSs3rwa.d.ts → index-CngORuiq.d.ts} +137 -2
- package/dist/index-Cs5pcwY3.d.ts +416 -0
- package/dist/{index-NzLDrOkk.d.ts → index-D4I_obqR.d.ts} +14 -1
- package/dist/{index-BtPZKO20.d.ts → index-DGXviOlp.d.ts} +49 -7
- package/dist/{index-CTolyeii.d.ts → index-DN7MXPHM.d.ts} +15 -1
- package/dist/{index-C6iJwTL0.d.ts → index-DNRBbwp_.d.ts} +165 -55
- package/dist/{index-C59PdX9L.d.ts → index-DWH_HzXi.d.ts} +1 -1
- package/dist/{index-BfOtLyNH.d.ts → index-D_nYxnNv.d.ts} +1 -1
- package/dist/{index-Bn_odHQ9.d.ts → index-Dg3ZmwEg.d.ts} +12 -1
- package/dist/{index-BiMGXtD-.d.ts → index-DimuSES0.d.ts} +14 -1
- package/dist/{index-DEeJowZf.d.ts → index-cGagYM1g.d.ts} +15 -2
- package/dist/{index-Ck8qy6Rf.d.ts → index-c_TaW8mM.d.ts} +24 -2
- package/dist/index-kVhSuA9t.d.ts +902 -0
- package/dist/{index-1uRMrk63.d.ts → index-nCEmW6wa.d.ts} +1 -1
- package/dist/{index-DoFCm2Q2.d.ts → index-qiZtHnGK.d.ts} +26 -0
- package/dist/{index-Bainr_3n.d.ts → index-u5ozu0G7.d.ts} +2 -2
- package/dist/index.d.ts +79 -76
- package/dist/index.js +111 -100
- package/dist/locale/index.d.ts +1 -1
- package/dist/locale/index.js +1 -1
- package/dist/power-search-DrDfcoL1.d.ts +68 -0
- package/dist/registry-B1ObuP--.d.ts +45 -0
- package/dist/registry-C7OZb0PJ.js +135 -0
- package/dist/{types-JktRxujg.d.ts → types-Cp4liug-.d.ts} +66 -3
- package/dist/{index-B8MbfMwV.d.ts → types-DDAAT1Xd.d.ts} +36 -82
- package/dist/types-DIYwbkpe.d.ts +33 -0
- package/dist/{types-DZoEm_DG.d.ts → types-pnljWjEE.d.ts} +23 -6
- package/dist/{useResizable-CeESZS1v.d.ts → useResizable-CUoNPmUw.d.ts} +1 -1
- package/package.json +10 -1
- package/styles/avatar.css +14 -0
- package/styles/badge.css +8 -0
- package/styles/breadcrumbs.css +6 -1
- package/styles/button.css +13 -0
- package/styles/calendar.css +16 -0
- package/styles/card.css +2 -0
- package/styles/chat.css +474 -3
- package/styles/dropdown-menu.css +11 -0
- package/styles/icon.css +58 -8
- package/styles/link.css +5 -0
- package/styles/number-input.css +22 -0
- package/styles/pagination.css +45 -1
- package/styles/power-search.css +303 -0
- package/styles/progress-bar.css +4 -0
- package/styles/selector.css +58 -0
- package/styles/tab-list.css +15 -0
- package/styles/table.css +304 -1
- package/styles/text-area.css +17 -0
- package/styles/text-input.css +5 -0
- package/styles/toast.css +7 -0
- package/styles/toolbar.css +11 -0
- package/styles.css +1 -0
- package/dist/Avatar-5s3HSrtN.js +0 -136
- package/dist/Badge-Ba0EwsTj.js +0 -19
- package/dist/Calendar-BG7wEsro.js +0 -277
- package/dist/Chat-DjNxw5gv.js +0 -1051
- package/dist/DateInput-DE2TN1Rq.js +0 -250
- package/dist/Icon-Dfr4k6-S.js +0 -86
- package/dist/Link-CprjOuTI.js +0 -92
- package/dist/NumberInput-CTYiQxHq.js +0 -147
- package/dist/Selector-Da-2BO3q.js +0 -325
- package/dist/Table-D-LhAy_J.js +0 -967
- package/dist/index-DJo-BmXZ.d.ts +0 -431
- package/dist/index-DtjAdYEc.d.ts +0 -68
- package/dist/{CheckboxList-EsIEXjK_.js → CheckboxList-BbCPiend.js} +1 -1
|
@@ -2,112 +2,6 @@ import { n as useAsyncSource } from "./useAsyncSource-Gk0VtE7_.js";
|
|
|
2
2
|
import { t as useCombobox } from "./useCombobox-CTo5C-gc.js";
|
|
3
3
|
import { t as _sfc_main$1 } from "./Spinner-9cYUCnDy.js";
|
|
4
4
|
import { Fragment, computed, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeClass, openBlock, ref, renderList, renderSlot, toDisplayString, toValue, watch, withModifiers } from "vue";
|
|
5
|
-
//#region src/Typeahead/TypeaheadMenu.vue
|
|
6
|
-
const _hoisted_1 = {
|
|
7
|
-
class: "astryx-typeahead-menu",
|
|
8
|
-
role: "presentation"
|
|
9
|
-
};
|
|
10
|
-
const _hoisted_2 = {
|
|
11
|
-
key: 0,
|
|
12
|
-
class: "astryx-typeahead-state",
|
|
13
|
-
role: "status"
|
|
14
|
-
};
|
|
15
|
-
const _hoisted_3 = {
|
|
16
|
-
key: 1,
|
|
17
|
-
class: "astryx-typeahead-state",
|
|
18
|
-
role: "alert"
|
|
19
|
-
};
|
|
20
|
-
const _hoisted_4 = {
|
|
21
|
-
key: 2,
|
|
22
|
-
class: "astryx-typeahead-state"
|
|
23
|
-
};
|
|
24
|
-
const _hoisted_5 = {
|
|
25
|
-
key: 3,
|
|
26
|
-
class: "astryx-typeahead-options",
|
|
27
|
-
role: "presentation"
|
|
28
|
-
};
|
|
29
|
-
const _hoisted_6 = [
|
|
30
|
-
"id",
|
|
31
|
-
"aria-selected",
|
|
32
|
-
"aria-disabled",
|
|
33
|
-
"data-option-id",
|
|
34
|
-
"onMouseenter",
|
|
35
|
-
"onClick"
|
|
36
|
-
];
|
|
37
|
-
const _hoisted_7 = { class: "astryx-typeahead-option-copy" };
|
|
38
|
-
const _hoisted_8 = { class: "astryx-typeahead-option-label" };
|
|
39
|
-
const _hoisted_9 = {
|
|
40
|
-
key: 0,
|
|
41
|
-
class: "astryx-typeahead-option-description"
|
|
42
|
-
};
|
|
43
|
-
const _hoisted_10 = {
|
|
44
|
-
key: 0,
|
|
45
|
-
class: "astryx-typeahead-check",
|
|
46
|
-
width: "16",
|
|
47
|
-
height: "16",
|
|
48
|
-
viewBox: "0 0 16 16",
|
|
49
|
-
fill: "none",
|
|
50
|
-
"aria-hidden": "true"
|
|
51
|
-
};
|
|
52
|
-
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
53
|
-
name: "AstryxTypeaheadMenu",
|
|
54
|
-
__name: "TypeaheadMenu",
|
|
55
|
-
props: {
|
|
56
|
-
entries: {},
|
|
57
|
-
activeIndex: {},
|
|
58
|
-
status: {},
|
|
59
|
-
listboxId: {},
|
|
60
|
-
emptyText: {},
|
|
61
|
-
loadingText: {},
|
|
62
|
-
errorText: {}
|
|
63
|
-
},
|
|
64
|
-
emits: ["select", "highlight"],
|
|
65
|
-
setup(__props, { emit: __emit }) {
|
|
66
|
-
const props = __props;
|
|
67
|
-
const emit = __emit;
|
|
68
|
-
function optionId(index) {
|
|
69
|
-
return `${props.listboxId}-option-${index}`;
|
|
70
|
-
}
|
|
71
|
-
function onOptionClick(id, disabled) {
|
|
72
|
-
if (!disabled) emit("select", id);
|
|
73
|
-
}
|
|
74
|
-
return (_ctx, _cache) => {
|
|
75
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [props.status === "loading" && props.entries.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_2, [createVNode(_sfc_main$1, {
|
|
76
|
-
size: "sm",
|
|
77
|
-
label: props.loadingText
|
|
78
|
-
}, null, 8, ["label"])])) : props.status === "error" ? (openBlock(), createElementBlock("div", _hoisted_3, toDisplayString(props.errorText), 1)) : props.entries.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_4, [renderSlot(_ctx.$slots, "empty", {}, () => [createTextVNode(toDisplayString(props.emptyText), 1)])])) : (openBlock(), createElementBlock("div", _hoisted_5, [createCommentVNode(" eslint-disable-next-line vue-a11y/click-events-have-key-events, vue-a11y/mouse-events-have-key-events -- 选项不进 Tab 序,方向键和 Enter 由组合框输入处理。 "), (openBlock(true), createElementBlock(Fragment, null, renderList(props.entries, (entry, index) => {
|
|
79
|
-
return openBlock(), createElementBlock("div", {
|
|
80
|
-
id: optionId(index),
|
|
81
|
-
key: entry.id,
|
|
82
|
-
class: normalizeClass(["astryx-typeahead-option", {
|
|
83
|
-
"is-active": index === props.activeIndex,
|
|
84
|
-
"is-selected": entry.selected,
|
|
85
|
-
"is-disabled": entry.disabled
|
|
86
|
-
}]),
|
|
87
|
-
role: "option",
|
|
88
|
-
"aria-selected": entry.selected ? "true" : "false",
|
|
89
|
-
"aria-disabled": entry.disabled || void 0,
|
|
90
|
-
"data-option-id": entry.id,
|
|
91
|
-
tabindex: "-1",
|
|
92
|
-
onMousedown: _cache[0] || (_cache[0] = withModifiers(() => {}, ["prevent"])),
|
|
93
|
-
onMouseenter: ($event) => emit("highlight", index),
|
|
94
|
-
onClick: ($event) => onOptionClick(entry.id, entry.disabled)
|
|
95
|
-
}, [createElementVNode("span", _hoisted_7, [renderSlot(_ctx.$slots, "item", {
|
|
96
|
-
entry,
|
|
97
|
-
isActive: index === props.activeIndex,
|
|
98
|
-
isSelected: Boolean(entry.selected)
|
|
99
|
-
}, () => [createElementVNode("span", _hoisted_8, toDisplayString(entry.label), 1), entry.description ? (openBlock(), createElementBlock("span", _hoisted_9, toDisplayString(entry.description), 1)) : createCommentVNode("v-if", true)])]), entry.selected ? (openBlock(), createElementBlock("svg", _hoisted_10, [..._cache[1] || (_cache[1] = [createElementVNode("path", {
|
|
100
|
-
d: "M3.5 8.5L6.5 11.5L12.5 4.5",
|
|
101
|
-
stroke: "currentColor",
|
|
102
|
-
"stroke-width": "1.5",
|
|
103
|
-
"stroke-linecap": "round",
|
|
104
|
-
"stroke-linejoin": "round"
|
|
105
|
-
}, null, -1)])])) : createCommentVNode("v-if", true)], 42, _hoisted_6);
|
|
106
|
-
}), 128))]))]);
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
|
-
//#endregion
|
|
111
5
|
//#region src/Typeahead/useTypeaheadMenu.ts
|
|
112
6
|
function isEditableTarget(event) {
|
|
113
7
|
const target = event.target;
|
|
@@ -273,4 +167,110 @@ function useTypeaheadMenu(options) {
|
|
|
273
167
|
};
|
|
274
168
|
}
|
|
275
169
|
//#endregion
|
|
276
|
-
|
|
170
|
+
//#region src/Typeahead/TypeaheadMenu.vue
|
|
171
|
+
const _hoisted_1 = {
|
|
172
|
+
class: "astryx-typeahead-menu",
|
|
173
|
+
role: "presentation"
|
|
174
|
+
};
|
|
175
|
+
const _hoisted_2 = {
|
|
176
|
+
key: 0,
|
|
177
|
+
class: "astryx-typeahead-state",
|
|
178
|
+
role: "status"
|
|
179
|
+
};
|
|
180
|
+
const _hoisted_3 = {
|
|
181
|
+
key: 1,
|
|
182
|
+
class: "astryx-typeahead-state",
|
|
183
|
+
role: "alert"
|
|
184
|
+
};
|
|
185
|
+
const _hoisted_4 = {
|
|
186
|
+
key: 2,
|
|
187
|
+
class: "astryx-typeahead-state"
|
|
188
|
+
};
|
|
189
|
+
const _hoisted_5 = {
|
|
190
|
+
key: 3,
|
|
191
|
+
class: "astryx-typeahead-options",
|
|
192
|
+
role: "presentation"
|
|
193
|
+
};
|
|
194
|
+
const _hoisted_6 = [
|
|
195
|
+
"id",
|
|
196
|
+
"aria-selected",
|
|
197
|
+
"aria-disabled",
|
|
198
|
+
"data-option-id",
|
|
199
|
+
"onMouseenter",
|
|
200
|
+
"onClick"
|
|
201
|
+
];
|
|
202
|
+
const _hoisted_7 = { class: "astryx-typeahead-option-copy" };
|
|
203
|
+
const _hoisted_8 = { class: "astryx-typeahead-option-label" };
|
|
204
|
+
const _hoisted_9 = {
|
|
205
|
+
key: 0,
|
|
206
|
+
class: "astryx-typeahead-option-description"
|
|
207
|
+
};
|
|
208
|
+
const _hoisted_10 = {
|
|
209
|
+
key: 0,
|
|
210
|
+
class: "astryx-typeahead-check",
|
|
211
|
+
width: "16",
|
|
212
|
+
height: "16",
|
|
213
|
+
viewBox: "0 0 16 16",
|
|
214
|
+
fill: "none",
|
|
215
|
+
"aria-hidden": "true"
|
|
216
|
+
};
|
|
217
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
218
|
+
name: "AstryxTypeaheadMenu",
|
|
219
|
+
__name: "TypeaheadMenu",
|
|
220
|
+
props: {
|
|
221
|
+
entries: {},
|
|
222
|
+
activeIndex: {},
|
|
223
|
+
status: {},
|
|
224
|
+
listboxId: {},
|
|
225
|
+
emptyText: {},
|
|
226
|
+
loadingText: {},
|
|
227
|
+
errorText: {}
|
|
228
|
+
},
|
|
229
|
+
emits: ["select", "highlight"],
|
|
230
|
+
setup(__props, { emit: __emit }) {
|
|
231
|
+
const props = __props;
|
|
232
|
+
const emit = __emit;
|
|
233
|
+
function optionId(index) {
|
|
234
|
+
return `${props.listboxId}-option-${index}`;
|
|
235
|
+
}
|
|
236
|
+
function onOptionClick(id, disabled) {
|
|
237
|
+
if (!disabled) emit("select", id);
|
|
238
|
+
}
|
|
239
|
+
return (_ctx, _cache) => {
|
|
240
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [props.status === "loading" && props.entries.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_2, [createVNode(_sfc_main$1, {
|
|
241
|
+
size: "sm",
|
|
242
|
+
label: props.loadingText
|
|
243
|
+
}, null, 8, ["label"])])) : props.status === "error" ? (openBlock(), createElementBlock("div", _hoisted_3, toDisplayString(props.errorText), 1)) : props.entries.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_4, [renderSlot(_ctx.$slots, "empty", {}, () => [createTextVNode(toDisplayString(props.emptyText), 1)])])) : (openBlock(), createElementBlock("div", _hoisted_5, [createCommentVNode(" eslint-disable-next-line vue-a11y/click-events-have-key-events, vue-a11y/mouse-events-have-key-events -- 选项不进 Tab 序,方向键和 Enter 由组合框输入处理。 "), (openBlock(true), createElementBlock(Fragment, null, renderList(props.entries, (entry, index) => {
|
|
244
|
+
return openBlock(), createElementBlock("div", {
|
|
245
|
+
id: optionId(index),
|
|
246
|
+
key: entry.id,
|
|
247
|
+
class: normalizeClass(["astryx-typeahead-option", {
|
|
248
|
+
"is-active": index === props.activeIndex,
|
|
249
|
+
"is-selected": entry.selected,
|
|
250
|
+
"is-disabled": entry.disabled
|
|
251
|
+
}]),
|
|
252
|
+
role: "option",
|
|
253
|
+
"aria-selected": entry.selected ? "true" : "false",
|
|
254
|
+
"aria-disabled": entry.disabled || void 0,
|
|
255
|
+
"data-option-id": entry.id,
|
|
256
|
+
tabindex: "-1",
|
|
257
|
+
onMousedown: _cache[0] || (_cache[0] = withModifiers(() => {}, ["prevent"])),
|
|
258
|
+
onMouseenter: ($event) => emit("highlight", index),
|
|
259
|
+
onClick: ($event) => onOptionClick(entry.id, entry.disabled)
|
|
260
|
+
}, [createElementVNode("span", _hoisted_7, [renderSlot(_ctx.$slots, "item", {
|
|
261
|
+
entry,
|
|
262
|
+
isActive: index === props.activeIndex,
|
|
263
|
+
isSelected: Boolean(entry.selected)
|
|
264
|
+
}, () => [createElementVNode("span", _hoisted_8, toDisplayString(entry.label), 1), entry.description ? (openBlock(), createElementBlock("span", _hoisted_9, toDisplayString(entry.description), 1)) : createCommentVNode("v-if", true)])]), entry.selected ? (openBlock(), createElementBlock("svg", _hoisted_10, [..._cache[1] || (_cache[1] = [createElementVNode("path", {
|
|
265
|
+
d: "M3.5 8.5L6.5 11.5L12.5 4.5",
|
|
266
|
+
stroke: "currentColor",
|
|
267
|
+
"stroke-width": "1.5",
|
|
268
|
+
"stroke-linecap": "round",
|
|
269
|
+
"stroke-linejoin": "round"
|
|
270
|
+
}, null, -1)])])) : createCommentVNode("v-if", true)], 42, _hoisted_6);
|
|
271
|
+
}), 128))]))]);
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
});
|
|
275
|
+
//#endregion
|
|
276
|
+
export { useTypeaheadMenu as n, _sfc_main as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as UseClipboardReturn, r as useClipboard, t as UseClipboardOptions } from "../useClipboard-CU-kfqeJ.js";
|
|
2
1
|
import { a as SearchableItem, c as useAsyncSource, i as SearchSource, n as AsyncSourceStatus, o as UseAsyncSourceOptions, r as CreateStaticSourceOptions, s as createStaticSource, t as AsyncSource } from "../useAsyncSource-xpQovjV_.js";
|
|
3
|
-
import {
|
|
4
|
-
import { a as
|
|
2
|
+
import { n as UseClipboardReturn, r as useClipboard, t as UseClipboardOptions } from "../useClipboard-CU-kfqeJ.js";
|
|
3
|
+
import { $ as useLongPress, $t as useAppShellMobile, A as UseScrollableAreaOptions, At as spanDays, B as computeOverflow, Bt as INTERACTIVE_SELECTORS, C as useScrollLock, Ct as compareISODate, D as ScrollRole, Dt as isSameRange, E as ScrollOverscroll, Et as isRangeWithinSpan, F as useRestoreFocus, Ft as ComboboxOption, G as addMonths, Gt as UseChatStreamScrollReturn, H as NumberField, Ht as useClickableContainer, I as ComputeOverflowInput, It as UseComboboxOptions, J as toISODate, Jt as UseChatNewMessagesOptions, K as buildMonthGrid, Kt as useChatStreamScroll, L as ComputeOverflowResult, Lt as useCombobox, M as useScrollableArea, Mt as UseControllableStateOptions, N as RestoreFocus, Nt as useControllableState, O as ScrollStickyContainment, Ot as orderRange, P as UseRestoreFocusOptions, Pt as Combobox, Q as LongPressOptions, Qt as appShellMobileKey, R as UseOverflowOptions, Rt as useCoarsePointer, S as useScrollOverflow, St as applyRangeClick, T as ScrollAxisState, Tt as isDayOutsideSpan, U as UseNumberFieldOptions, Ut as ChatScrollToBottomOptions, V as useOverflow, Vt as UseClickableContainerOptions, W as useNumberField, Wt as UseChatStreamScrollOptions, X as useMediaQuery, Xt as useChatNewMessages, Y as todayISODate, Yt as UseChatNewMessagesReturn, Z as LongPressHandlers, Zt as AppShellMobile, _ as UseStreamingTextOptions, _t as UseDismissOptions, a as ISOTimeString, at as useHotkeys, b as ScrollOverflowState, bt as RangeClickResult, c as TimePresentation, ct as useGridRovingFocus, d as isTimeInRange, dt as useFocusTrap, en as AnnounceFn, et as ListFocus, f as parseDisplayTime, ft as FileRejection, g as StreamingTextSpeed, gt as selectFiles, h as shiftTime, ht as formatFileSize, i as HourFormat, it as Hotkey, j as UseScrollableAreaResult, jt as ControllableState, k as ScrollableAreaState, kt as resolveWeekStart, l as formatDisplayTime, lt as FocusTrap, m as resolveTimeSurface, mt as FileSelectionResult, n as UseTypeaheadReturn, nn as useAnnounce, nt as UseListFocusOptions, o as NativePicker, ot as GridRovingFocus, p as parseISOTime, pt as FileSelectionOptions, q as parseISODate, qt as CHAT_MESSAGE_CLASS, r as useTypeahead, rt as useListFocus, s as ParsedTime, st as UseGridRovingFocusOptions, t as UseTypeaheadOptions, tn as AnnouncePoliteness, tt as ListFocusOrientation, u as formatISOTime, ut as UseFocusTrapOptions, v as snapToGraphemeBoundary, vt as useDismiss, w as ScrollAxis, wt as formatDateRange, x as UseScrollOverflowResult, xt as WeekStartsOn, y as useStreamingText, yt as ISODateRange, z as UseOverflowReturn, zt as ClickableContainerHandlers } from "../index-B1TG2GPS.js";
|
|
4
|
+
import { a as ResizableRegionConfig, c as UseResizableMultiConfig, d as percent, f as useResizable, i as ResizableRegion, l as UseResizableOptions, n as ResizablePercentSize, o as ResizableSize, r as ResizableProps, s as ResizableState, t as ResizableDirection, u as UseResizableSingleOptions } from "../useResizable-CUoNPmUw.js";
|
|
5
5
|
export { type AnnounceFn, type AnnouncePoliteness, type AppShellMobile, type AsyncSource, type AsyncSourceStatus, CHAT_MESSAGE_CLASS, type ChatScrollToBottomOptions, type ClickableContainerHandlers, type Combobox, type ComboboxOption, type ComputeOverflowInput, type ComputeOverflowResult, type ControllableState, type CreateStaticSourceOptions, type FileRejection, type FileSelectionOptions, type FileSelectionResult, type FocusTrap, type GridRovingFocus, type Hotkey, type HourFormat, INTERACTIVE_SELECTORS, type ISODateRange, type ISOTimeString, type ListFocus, type ListFocusOrientation, type LongPressHandlers, type LongPressOptions, type NativePicker, type NumberField, type ParsedTime, type RangeClickResult, type ResizableDirection, type ResizablePercentSize, type ResizableProps, type ResizableRegion, type ResizableRegionConfig, type ResizableSize, type ResizableState, type RestoreFocus, type ScrollAxis, type ScrollAxisState, type ScrollOverflowState, type ScrollOverscroll, type ScrollRole, type ScrollStickyContainment, type ScrollableAreaState, type SearchSource, type SearchableItem, type StreamingTextSpeed, type TimePresentation, type UseAsyncSourceOptions, type UseChatNewMessagesOptions, type UseChatNewMessagesReturn, type UseChatStreamScrollOptions, type UseChatStreamScrollReturn, type UseClickableContainerOptions, type UseClipboardOptions, type UseClipboardReturn, type UseComboboxOptions, type UseControllableStateOptions, type UseDismissOptions, type UseFocusTrapOptions, type UseGridRovingFocusOptions, type UseListFocusOptions, type UseNumberFieldOptions, type UseOverflowOptions, type UseOverflowReturn, type UseResizableMultiConfig, type UseResizableOptions, type UseResizableSingleOptions, type UseRestoreFocusOptions, type UseScrollOverflowResult, type UseScrollableAreaOptions, type UseScrollableAreaResult, type UseStreamingTextOptions, type UseTypeaheadOptions, type UseTypeaheadReturn, type WeekStartsOn, addMonths, appShellMobileKey, applyRangeClick, buildMonthGrid, compareISODate, computeOverflow, createStaticSource, formatDateRange, formatDisplayTime, formatFileSize, formatISOTime, isDayOutsideSpan, isRangeWithinSpan, isSameRange, isTimeInRange, orderRange, parseDisplayTime, parseISODate, parseISOTime, percent, resolveTimeSurface, resolveWeekStart, selectFiles, shiftTime, snapToGraphemeBoundary, spanDays, toISODate, todayISODate, useAnnounce, useAppShellMobile, useAsyncSource, useChatNewMessages, useChatStreamScroll, useClickableContainer, useClipboard, useCoarsePointer, useCombobox, useControllableState, useDismiss, useFocusTrap, useGridRovingFocus, useHotkeys, useListFocus, useLongPress, useMediaQuery, useNumberField, useOverflow, useResizable, useRestoreFocus, useScrollLock, useScrollOverflow, useScrollableArea, useStreamingText, useTypeahead };
|
|
@@ -54,7 +54,21 @@ const chatMessages = {
|
|
|
54
54
|
typingTwo: (first, second) => `${first} and ${second} are typing…`,
|
|
55
55
|
typingMany: (name, others) => `${name} and ${others} others are typing…`,
|
|
56
56
|
unreadBelow: (label) => `${label} messages below`,
|
|
57
|
-
unreadLabel: "New"
|
|
57
|
+
unreadLabel: "New",
|
|
58
|
+
placeholder: "Type a message…",
|
|
59
|
+
drawerLabel: "Items",
|
|
60
|
+
inputLabel: "Message input",
|
|
61
|
+
noSpeechDetected: "No speech was detected.",
|
|
62
|
+
expandPastedText: "Expand",
|
|
63
|
+
drawerExpand: (label) => `Expand ${label}`,
|
|
64
|
+
drawerCollapse: (label) => `Collapse ${label}`,
|
|
65
|
+
startDictation: "Start dictation",
|
|
66
|
+
stopDictation: "Stop dictation",
|
|
67
|
+
send: "Send",
|
|
68
|
+
stop: "Stop",
|
|
69
|
+
suggestions: "Suggestions",
|
|
70
|
+
searching: "Searching…",
|
|
71
|
+
noResults: "No results"
|
|
58
72
|
},
|
|
59
73
|
"zh-CN": {
|
|
60
74
|
log: "消息列表",
|
|
@@ -79,7 +93,21 @@ const chatMessages = {
|
|
|
79
93
|
typingTwo: (first, second) => `${first} 和 ${second} 正在输入…`,
|
|
80
94
|
typingMany: (name, others) => `${name} 和其他 ${others} 人正在输入…`,
|
|
81
95
|
unreadBelow: (label) => `${label}以下是未读消息`,
|
|
82
|
-
unreadLabel: "新消息"
|
|
96
|
+
unreadLabel: "新消息",
|
|
97
|
+
placeholder: "输入消息……",
|
|
98
|
+
drawerLabel: "项目",
|
|
99
|
+
inputLabel: "消息输入框",
|
|
100
|
+
noSpeechDetected: "未检测到语音。",
|
|
101
|
+
expandPastedText: "展开",
|
|
102
|
+
drawerExpand: (label) => `展开 ${label}`,
|
|
103
|
+
drawerCollapse: (label) => `折叠 ${label}`,
|
|
104
|
+
startDictation: "开始语音输入",
|
|
105
|
+
stopDictation: "停止语音输入",
|
|
106
|
+
send: "发送",
|
|
107
|
+
stop: "停止",
|
|
108
|
+
suggestions: "建议",
|
|
109
|
+
searching: "正在搜索…",
|
|
110
|
+
noResults: "没有结果"
|
|
83
111
|
}
|
|
84
112
|
};
|
|
85
113
|
//#endregion
|
|
@@ -351,7 +379,8 @@ const paginationMessages = {
|
|
|
351
379
|
perPage: "Per page",
|
|
352
380
|
pageSize: (count) => `${count} / page`,
|
|
353
381
|
total: (total, from, to) => `${from}–${to} of ${total}`,
|
|
354
|
-
compact: (page, totalPages) => `${page} / ${totalPages}
|
|
382
|
+
compact: (page, totalPages) => `${page} / ${totalPages}`,
|
|
383
|
+
pageOf: (page, totalPages) => `Page ${page} of ${totalPages}`
|
|
355
384
|
},
|
|
356
385
|
"zh-CN": {
|
|
357
386
|
nav: "分页导航",
|
|
@@ -362,7 +391,138 @@ const paginationMessages = {
|
|
|
362
391
|
perPage: "每页",
|
|
363
392
|
pageSize: (count) => `${count} 条/页`,
|
|
364
393
|
total: (total, from, to) => `共 ${total} 条,显示 ${from}-${to}`,
|
|
365
|
-
compact: (page, totalPages) => `${page} / ${totalPages}
|
|
394
|
+
compact: (page, totalPages) => `${page} / ${totalPages}`,
|
|
395
|
+
pageOf: (page, totalPages) => `第 ${page} 页,共 ${totalPages} 页`
|
|
396
|
+
}
|
|
397
|
+
};
|
|
398
|
+
const powerSearchMessages = {
|
|
399
|
+
"en": {
|
|
400
|
+
label: "Search",
|
|
401
|
+
placeholder: "Search…",
|
|
402
|
+
clear: "Clear all",
|
|
403
|
+
results: "Search results",
|
|
404
|
+
empty: "No results",
|
|
405
|
+
removeFilter: (label) => `Remove ${label}`,
|
|
406
|
+
resultCount: (count) => `${new Intl.NumberFormat("en").format(count)} ${count === 1 ? "result" : "results"}`,
|
|
407
|
+
itemsCount: (count) => `${new Intl.NumberFormat("en").format(count)} ${count === 1 ? "item" : "items"}`,
|
|
408
|
+
entitiesCount: (count) => `${new Intl.NumberFormat("en").format(count)} ${count === 1 ? "entity" : "entities"}`,
|
|
409
|
+
filtersCount: (count) => `${new Intl.NumberFormat("en").format(count)} ${count === 1 ? "filter" : "filters"}`,
|
|
410
|
+
more: (count) => `${new Intl.NumberFormat("en").format(count)} more`,
|
|
411
|
+
dateRange: "date range",
|
|
412
|
+
operators: {
|
|
413
|
+
contains: "contains",
|
|
414
|
+
notContains: "does not contain",
|
|
415
|
+
startsWith: "starts with",
|
|
416
|
+
notStartsWith: "does not start with",
|
|
417
|
+
endsWith: "ends with",
|
|
418
|
+
notEndsWith: "does not end with",
|
|
419
|
+
is: "is",
|
|
420
|
+
isNot: "is not",
|
|
421
|
+
equals: "equals",
|
|
422
|
+
notEquals: "does not equal",
|
|
423
|
+
greaterThan: "is greater than",
|
|
424
|
+
lessThan: "is less than",
|
|
425
|
+
greaterThanOrEqual: "is greater than or equal to",
|
|
426
|
+
lessThanOrEqual: "is less than or equal to",
|
|
427
|
+
before: "is before",
|
|
428
|
+
after: "is after",
|
|
429
|
+
between: "is between",
|
|
430
|
+
isTrue: "is true",
|
|
431
|
+
isFalse: "is false",
|
|
432
|
+
isAnyOf: "is any of",
|
|
433
|
+
isNoneOf: "is none of"
|
|
434
|
+
},
|
|
435
|
+
editor: {
|
|
436
|
+
field: "Field",
|
|
437
|
+
operator: "Operator",
|
|
438
|
+
addFilter: "+ Add filter",
|
|
439
|
+
removeFilter: "Remove filter",
|
|
440
|
+
group: "Group",
|
|
441
|
+
delete: "Delete",
|
|
442
|
+
cancel: "Cancel",
|
|
443
|
+
apply: "Apply",
|
|
444
|
+
editing: "Edit filter"
|
|
445
|
+
},
|
|
446
|
+
value: {
|
|
447
|
+
value: "Value",
|
|
448
|
+
values: "Values",
|
|
449
|
+
time: "Time",
|
|
450
|
+
date: "Date",
|
|
451
|
+
relativeDate: "Relative date",
|
|
452
|
+
startDate: "Start date",
|
|
453
|
+
endDate: "End date",
|
|
454
|
+
entities: "Entities",
|
|
455
|
+
searchPlaceholder: "Search…",
|
|
456
|
+
enterValuePlaceholder: "Enter value…",
|
|
457
|
+
addValuesPlaceholder: "Add values…",
|
|
458
|
+
enterNumberPlaceholder: "Enter number…",
|
|
459
|
+
selectPlaceholder: "Select…",
|
|
460
|
+
selectValuesPlaceholder: "Select values…"
|
|
461
|
+
}
|
|
462
|
+
},
|
|
463
|
+
"zh-CN": {
|
|
464
|
+
label: "搜索",
|
|
465
|
+
placeholder: "搜索……",
|
|
466
|
+
clear: "全部清除",
|
|
467
|
+
results: "搜索结果",
|
|
468
|
+
empty: "没有结果",
|
|
469
|
+
removeFilter: (label) => `移除${label}`,
|
|
470
|
+
resultCount: (count) => `${new Intl.NumberFormat("zh-CN").format(count)} 个结果`,
|
|
471
|
+
itemsCount: (count) => `${new Intl.NumberFormat("zh-CN").format(count)} 个项目`,
|
|
472
|
+
entitiesCount: (count) => `${new Intl.NumberFormat("zh-CN").format(count)} 个实体`,
|
|
473
|
+
filtersCount: (count) => `${new Intl.NumberFormat("zh-CN").format(count)} 个筛选条件`,
|
|
474
|
+
more: (count) => `另外 ${new Intl.NumberFormat("zh-CN").format(count)} 个`,
|
|
475
|
+
dateRange: "日期范围",
|
|
476
|
+
operators: {
|
|
477
|
+
contains: "包含",
|
|
478
|
+
notContains: "不包含",
|
|
479
|
+
startsWith: "开头是",
|
|
480
|
+
notStartsWith: "开头不是",
|
|
481
|
+
endsWith: "结尾是",
|
|
482
|
+
notEndsWith: "结尾不是",
|
|
483
|
+
is: "是",
|
|
484
|
+
isNot: "不是",
|
|
485
|
+
equals: "等于",
|
|
486
|
+
notEquals: "不等于",
|
|
487
|
+
greaterThan: "大于",
|
|
488
|
+
lessThan: "小于",
|
|
489
|
+
greaterThanOrEqual: "大于或等于",
|
|
490
|
+
lessThanOrEqual: "小于或等于",
|
|
491
|
+
before: "早于",
|
|
492
|
+
after: "晚于",
|
|
493
|
+
between: "介于",
|
|
494
|
+
isTrue: "为真",
|
|
495
|
+
isFalse: "为假",
|
|
496
|
+
isAnyOf: "是其中任一",
|
|
497
|
+
isNoneOf: "不是其中任何一个"
|
|
498
|
+
},
|
|
499
|
+
editor: {
|
|
500
|
+
field: "字段",
|
|
501
|
+
operator: "运算符",
|
|
502
|
+
addFilter: "+ 添加筛选条件",
|
|
503
|
+
removeFilter: "移除筛选条件",
|
|
504
|
+
group: "分组",
|
|
505
|
+
delete: "删除",
|
|
506
|
+
cancel: "取消",
|
|
507
|
+
apply: "应用",
|
|
508
|
+
editing: "编辑筛选条件"
|
|
509
|
+
},
|
|
510
|
+
value: {
|
|
511
|
+
value: "值",
|
|
512
|
+
values: "值",
|
|
513
|
+
time: "时间",
|
|
514
|
+
date: "日期",
|
|
515
|
+
relativeDate: "相对日期",
|
|
516
|
+
startDate: "开始日期",
|
|
517
|
+
endDate: "结束日期",
|
|
518
|
+
entities: "实体",
|
|
519
|
+
searchPlaceholder: "搜索……",
|
|
520
|
+
enterValuePlaceholder: "输入值……",
|
|
521
|
+
addValuesPlaceholder: "添加值……",
|
|
522
|
+
enterNumberPlaceholder: "输入数字……",
|
|
523
|
+
selectPlaceholder: "选择……",
|
|
524
|
+
selectValuesPlaceholder: "选择值……"
|
|
525
|
+
}
|
|
366
526
|
}
|
|
367
527
|
};
|
|
368
528
|
//#endregion
|
|
@@ -432,7 +592,15 @@ const tableMessages = {
|
|
|
432
592
|
bulkActionsLabel: "Bulk actions",
|
|
433
593
|
clearAll: "Unselect All",
|
|
434
594
|
selectedCount: (count) => `${count} selected`,
|
|
435
|
-
paginationLabel: "Table pagination"
|
|
595
|
+
paginationLabel: "Table pagination",
|
|
596
|
+
expandGroup: (groupKey) => `Expand group ${groupKey}`,
|
|
597
|
+
collapseGroup: (groupKey) => `Collapse group ${groupKey}`,
|
|
598
|
+
expandRow: "Expand row",
|
|
599
|
+
collapseRow: "Collapse row",
|
|
600
|
+
expandAllRows: "Expand all rows",
|
|
601
|
+
collapseAllRows: "Collapse all rows",
|
|
602
|
+
rowExpansion: "Row expansion",
|
|
603
|
+
rowStatus: "Row status"
|
|
436
604
|
},
|
|
437
605
|
"zh-CN": {
|
|
438
606
|
label: "表格",
|
|
@@ -452,7 +620,15 @@ const tableMessages = {
|
|
|
452
620
|
bulkActionsLabel: "批量操作",
|
|
453
621
|
clearAll: "取消全选",
|
|
454
622
|
selectedCount: (count) => `已选择 ${count} 项`,
|
|
455
|
-
paginationLabel: "表格分页"
|
|
623
|
+
paginationLabel: "表格分页",
|
|
624
|
+
expandGroup: (groupKey) => `展开分组 ${groupKey}`,
|
|
625
|
+
collapseGroup: (groupKey) => `折叠分组 ${groupKey}`,
|
|
626
|
+
expandRow: "展开行",
|
|
627
|
+
collapseRow: "折叠行",
|
|
628
|
+
expandAllRows: "展开所有行",
|
|
629
|
+
collapseAllRows: "折叠所有行",
|
|
630
|
+
rowExpansion: "行展开",
|
|
631
|
+
rowStatus: "行状态"
|
|
456
632
|
}
|
|
457
633
|
};
|
|
458
634
|
//#endregion
|
|
@@ -585,6 +761,7 @@ const astryxMessages = {
|
|
|
585
761
|
numberInput: numberInputMessages.en,
|
|
586
762
|
outline: outlineMessages.en,
|
|
587
763
|
pagination: paginationMessages.en,
|
|
764
|
+
powerSearch: powerSearchMessages.en,
|
|
588
765
|
selector: selectorMessages.en,
|
|
589
766
|
stepper: stepperMessages.en,
|
|
590
767
|
table: tableMessages.en,
|
|
@@ -615,6 +792,7 @@ const astryxMessages = {
|
|
|
615
792
|
numberInput: numberInputMessages["zh-CN"],
|
|
616
793
|
outline: outlineMessages["zh-CN"],
|
|
617
794
|
pagination: paginationMessages["zh-CN"],
|
|
795
|
+
powerSearch: powerSearchMessages["zh-CN"],
|
|
618
796
|
selector: selectorMessages["zh-CN"],
|
|
619
797
|
stepper: stepperMessages["zh-CN"],
|
|
620
798
|
table: tableMessages["zh-CN"],
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
//#region src/Timestamp/formatInstant.ts
|
|
2
|
+
const DATE_SHORT = {
|
|
3
|
+
month: "short",
|
|
4
|
+
day: "numeric",
|
|
5
|
+
year: "numeric"
|
|
6
|
+
};
|
|
7
|
+
const DATE_LONG = {
|
|
8
|
+
year: "numeric",
|
|
9
|
+
month: "long",
|
|
10
|
+
day: "numeric"
|
|
11
|
+
};
|
|
12
|
+
const DATE_WEEKDAY = {
|
|
13
|
+
weekday: "short",
|
|
14
|
+
month: "short",
|
|
15
|
+
day: "numeric",
|
|
16
|
+
year: "numeric"
|
|
17
|
+
};
|
|
18
|
+
const TIME = {
|
|
19
|
+
hour: "numeric",
|
|
20
|
+
minute: "2-digit"
|
|
21
|
+
};
|
|
22
|
+
const DATE_TIME = {
|
|
23
|
+
...DATE_SHORT,
|
|
24
|
+
...TIME
|
|
25
|
+
};
|
|
26
|
+
const FULL = {
|
|
27
|
+
year: "numeric",
|
|
28
|
+
month: "long",
|
|
29
|
+
day: "numeric",
|
|
30
|
+
hour: "numeric",
|
|
31
|
+
minute: "2-digit",
|
|
32
|
+
second: "2-digit",
|
|
33
|
+
timeZoneName: "short"
|
|
34
|
+
};
|
|
35
|
+
function pad(value) {
|
|
36
|
+
return String(value).padStart(2, "0");
|
|
37
|
+
}
|
|
38
|
+
function wallClock(date, timeZone) {
|
|
39
|
+
if (timeZone == null) return {
|
|
40
|
+
year: date.getFullYear(),
|
|
41
|
+
month: date.getMonth() + 1,
|
|
42
|
+
day: date.getDate(),
|
|
43
|
+
hour: date.getHours(),
|
|
44
|
+
minute: date.getMinutes(),
|
|
45
|
+
second: date.getSeconds()
|
|
46
|
+
};
|
|
47
|
+
const parts = new Intl.DateTimeFormat("en-US", {
|
|
48
|
+
timeZone,
|
|
49
|
+
hourCycle: "h23",
|
|
50
|
+
year: "numeric",
|
|
51
|
+
month: "2-digit",
|
|
52
|
+
day: "2-digit",
|
|
53
|
+
hour: "2-digit",
|
|
54
|
+
minute: "2-digit",
|
|
55
|
+
second: "2-digit"
|
|
56
|
+
}).formatToParts(date);
|
|
57
|
+
const read = (type) => Number(parts.find((part) => part.type === type)?.value ?? 0);
|
|
58
|
+
return {
|
|
59
|
+
year: read("year"),
|
|
60
|
+
month: read("month"),
|
|
61
|
+
day: read("day"),
|
|
62
|
+
hour: read("hour"),
|
|
63
|
+
minute: read("minute"),
|
|
64
|
+
second: read("second")
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
function formatInstant(date, format, locale, { timeZone, isTimezoneShown = false, timeZoneNameStyle = "short" } = {}) {
|
|
68
|
+
const zone = timeZone == null ? {} : { timeZone };
|
|
69
|
+
const zoneName = isTimezoneShown ? { timeZoneName: "short" } : {};
|
|
70
|
+
switch (format) {
|
|
71
|
+
case "full": return new Intl.DateTimeFormat(locale, {
|
|
72
|
+
...FULL,
|
|
73
|
+
timeZoneName: timeZoneNameStyle,
|
|
74
|
+
...zone,
|
|
75
|
+
calendar: "gregory"
|
|
76
|
+
}).format(date);
|
|
77
|
+
case "date": return new Intl.DateTimeFormat(locale, {
|
|
78
|
+
...DATE_SHORT,
|
|
79
|
+
...zone,
|
|
80
|
+
calendar: "gregory"
|
|
81
|
+
}).format(date);
|
|
82
|
+
case "date_long": return new Intl.DateTimeFormat(locale, {
|
|
83
|
+
...DATE_LONG,
|
|
84
|
+
...zone,
|
|
85
|
+
calendar: "gregory"
|
|
86
|
+
}).format(date);
|
|
87
|
+
case "date_weekday": return new Intl.DateTimeFormat(locale, {
|
|
88
|
+
...DATE_WEEKDAY,
|
|
89
|
+
...zone,
|
|
90
|
+
calendar: "gregory"
|
|
91
|
+
}).format(date);
|
|
92
|
+
case "date_time": return new Intl.DateTimeFormat(locale, {
|
|
93
|
+
...DATE_TIME,
|
|
94
|
+
...zoneName,
|
|
95
|
+
...zone,
|
|
96
|
+
calendar: "gregory"
|
|
97
|
+
}).format(date);
|
|
98
|
+
case "time": return new Intl.DateTimeFormat(locale, {
|
|
99
|
+
...TIME,
|
|
100
|
+
...zoneName,
|
|
101
|
+
...zone
|
|
102
|
+
}).format(date);
|
|
103
|
+
case "system_date": {
|
|
104
|
+
const clock = wallClock(date, timeZone);
|
|
105
|
+
return `${clock.year}-${pad(clock.month)}-${pad(clock.day)}`;
|
|
106
|
+
}
|
|
107
|
+
case "system_date_time": {
|
|
108
|
+
const clock = wallClock(date, timeZone);
|
|
109
|
+
return `${clock.year}-${pad(clock.month)}-${pad(clock.day)} ${pad(clock.hour)}:${pad(clock.minute)}:${pad(clock.second)}`;
|
|
110
|
+
}
|
|
111
|
+
case "system_time": {
|
|
112
|
+
const clock = wallClock(date, timeZone);
|
|
113
|
+
return `${pad(clock.hour)}:${pad(clock.minute)}:${pad(clock.second)}`;
|
|
114
|
+
}
|
|
115
|
+
case "unix_seconds": return String(Math.floor(date.getTime() / 1e3));
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
//#endregion
|
|
119
|
+
export { formatInstant as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./useClipboard-CU-kfqeJ.js";
|
|
2
1
|
import "./useAsyncSource-xpQovjV_.js";
|
|
3
|
-
import "./
|
|
2
|
+
import "./useClipboard-CU-kfqeJ.js";
|
|
3
|
+
import "./useResizable-CUoNPmUw.js";
|
|
4
4
|
import { CSSProperties, ComputedRef, InjectionKey, MaybeRefOrGetter, Ref } from "vue";
|
|
5
5
|
import { CalendarDate } from "@internationalized/date";
|
|
6
6
|
//#region src/composables/internal/announce.d.ts
|
|
@@ -1,33 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
interface BadgeVariantMap {
|
|
3
|
-
blue: true;
|
|
4
|
-
cyan: true;
|
|
5
|
-
error: true;
|
|
6
|
-
green: true;
|
|
7
|
-
info: true;
|
|
8
|
-
neutral: true;
|
|
9
|
-
orange: true;
|
|
10
|
-
pink: true;
|
|
11
|
-
purple: true;
|
|
12
|
-
red: true;
|
|
13
|
-
success: true;
|
|
14
|
-
teal: true;
|
|
15
|
-
warning: true;
|
|
16
|
-
yellow: true;
|
|
17
|
-
}
|
|
18
|
-
type BadgeVariant = Extract<keyof BadgeVariantMap, string>;
|
|
19
|
-
interface BadgeProps {
|
|
20
|
-
/**
|
|
21
|
-
* The visual style of the badge.
|
|
22
|
-
*
|
|
23
|
-
* @default 'neutral'
|
|
24
|
-
*/
|
|
25
|
-
variant?: BadgeVariant;
|
|
26
|
-
}
|
|
27
|
-
//#endregion
|
|
1
|
+
import { n as BadgeVariant, t as BadgeProps } from "./types-DIYwbkpe.js";
|
|
28
2
|
//#region src/Badge/Badge.vue.d.ts
|
|
29
3
|
type __VLS_Slots = {
|
|
30
|
-
default
|
|
4
|
+
default?: () => unknown;
|
|
31
5
|
icon?: () => unknown;
|
|
32
6
|
};
|
|
33
7
|
declare const __VLS_base: import("vue").DefineComponent<BadgeProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<BadgeProps> & Readonly<{}>, {
|
|
@@ -41,4 +15,4 @@ type __VLS_WithSlots<T, S> = T & {
|
|
|
41
15
|
};
|
|
42
16
|
};
|
|
43
17
|
//#endregion
|
|
44
|
-
export {
|
|
18
|
+
export { _default as t };
|
|
@@ -175,8 +175,8 @@ declare const __VLS_base$1: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
175
175
|
}>, {
|
|
176
176
|
position: OverlayPosition;
|
|
177
177
|
align: OverlayAlign;
|
|
178
|
-
scrim: OverlayScrimMode;
|
|
179
178
|
showOn: OverlayShowOn;
|
|
179
|
+
scrim: OverlayScrimMode;
|
|
180
180
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
181
181
|
declare const __VLS_export$1: __VLS_WithSlots$1<typeof __VLS_base$1, __VLS_Slots$1>;
|
|
182
182
|
declare const _default$1: typeof __VLS_export$1;
|
|
@@ -192,8 +192,8 @@ declare const __VLS_base: import("vue").DefineComponent<OverlayScrimProps, {}, {
|
|
|
192
192
|
isOpen: boolean;
|
|
193
193
|
position: OverlayPosition;
|
|
194
194
|
align: OverlayAlign;
|
|
195
|
-
scrim: OverlayScrimMode;
|
|
196
195
|
showOn: OverlayShowOn;
|
|
196
|
+
scrim: OverlayScrimMode;
|
|
197
197
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
198
198
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
199
199
|
declare const _default: typeof __VLS_export;
|