@astryx-vue/core 0.3.0 → 0.4.0
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/AlertDialog/index.js +1 -1
- package/dist/{AlertDialog-RAVA_cT1.js → AlertDialog-C2inDZWG.js} +5 -5
- package/dist/AppShell/index.js +1 -1
- package/dist/{AppShell-0wTvOo3H.js → AppShell-CumzH-8z.js} +3 -3
- package/dist/Avatar/index.js +1 -1
- package/dist/{Avatar-pPZ4dI_s.js → Avatar-BW0TE8t9.js} +47 -34
- package/dist/AvatarGroup/index.d.ts +1 -1
- package/dist/AvatarGroup/index.js +1 -1
- package/dist/{AvatarGroup-B--NQSB3.js → AvatarGroup-DLC_FFR5.js} +57 -13
- package/dist/Banner/index.d.ts +1 -1
- package/dist/Banner/index.js +1 -1
- package/dist/{Banner-GbGxrqQO.js → Banner-C5VAwo4D.js} +68 -34
- package/dist/Blockquote/index.js +1 -1
- package/dist/Blockquote-DRoKdcxZ.js +27 -0
- package/dist/BottomSheet/index.d.ts +1 -1
- package/dist/BottomSheet/index.js +2 -2
- package/dist/{BottomSheet-pt7m4CvC.js → BottomSheet-B4sc3F1S.js} +286 -140
- package/dist/{BottomSheet-JYMB_Ofl.js → BottomSheet-m54uCMJN.js} +20 -4
- package/dist/Breadcrumbs/index.d.ts +2 -2
- package/dist/Breadcrumbs/index.js +2 -2
- package/dist/Breadcrumbs-CTaz7Kh4.js +223 -0
- package/dist/Button/index.d.ts +1 -1
- package/dist/Button/index.js +1 -1
- package/dist/{Button-B6Hj_O_s.js → Button-ONOoHdkg.js} +25 -15
- package/dist/ButtonGroup/index.d.ts +1 -1
- package/dist/ButtonGroup/index.js +1 -1
- package/dist/ButtonGroup-DnkSZ9a5.js +87 -0
- package/dist/{ButtonTooltip-nWWrth8j.js → ButtonTooltip-CNKOQHYR.js} +7 -4
- package/dist/Calendar/index.d.ts +1 -1
- package/dist/Calendar/index.js +1 -1
- package/dist/{Calendar-B7vIowKq.js → Calendar-BAqzzQm2.js} +5 -5
- package/dist/Card/index.d.ts +2 -2
- package/dist/Carousel/index.js +1 -1
- package/dist/{Carousel-CA8zpD9v.js → Carousel-DXC22UWq.js} +4 -4
- package/dist/Chat/index.d.ts +1 -1
- package/dist/Chat/index.js +1 -1
- package/dist/{Chat-Bmna9EOA.js → Chat-BdJW6IX5.js} +147 -83
- package/dist/CheckboxIndicator/index.js +1 -1
- package/dist/{CheckboxIndicator-D37cm2Rh.js → CheckboxIndicator-fH4d-JE1.js} +9 -3
- package/dist/CheckboxInput/index.d.ts +1 -1
- package/dist/CheckboxInput/index.js +1 -1
- package/dist/{CheckboxInput-BS9J6edf.js → CheckboxInput-DJHCbwgC.js} +19 -11
- package/dist/CheckboxList/index.d.ts +1 -1
- package/dist/CheckboxList/index.js +1 -1
- package/dist/{CheckboxList-CX1i_jVP.js → CheckboxList-BdZIP4_J.js} +155 -38
- package/dist/Citation/index.js +1 -1
- package/dist/{Citation-Djgwa0ko.js → Citation-DbZn2vms.js} +8 -3
- package/dist/ClickableCard/index.d.ts +1 -1
- package/dist/ClickableCard/index.js +1 -1
- package/dist/{ClickableCard-DUsC-j03.js → ClickableCard-ChAfiw9T.js} +9 -6
- package/dist/Code/index.js +3 -3
- package/dist/{Code-XnPuGxey.js → Code-Bg7GBdxy.js} +2 -1
- package/dist/{CodeBlock-D0BFubut.js → CodeBlock-Caaflp7C.js} +3 -3
- package/dist/Collapsible/index.d.ts +1 -1
- package/dist/Collapsible/index.js +1 -1
- package/dist/{Collapsible-Cov3Pyq5.js → Collapsible-Bdj0WYpb.js} +13 -11
- package/dist/CommandPalette/index.d.ts +1 -1
- package/dist/CommandPalette/index.js +1 -1
- package/dist/{CommandPalette-YHsUNg3V.js → CommandPalette-C_MClfAg.js} +143 -63
- package/dist/ComplexSelector/index.d.ts +1 -1
- package/dist/ComplexSelector/index.js +1 -1
- package/dist/{ComplexSelector-DWLdKPGI.js → ComplexSelector-BeVQaqRf.js} +85 -20
- package/dist/ContextMenu/index.d.ts +2 -2
- package/dist/ContextMenu/index.js +2 -2
- package/dist/{ContextMenu-Bq9b3Ti5.js → ContextMenu-C6hPYvYz.js} +297 -179
- package/dist/DateInput/index.d.ts +1 -1
- package/dist/DateInput/index.js +1 -1
- package/dist/{DateInput-DT518j5E.js → DateInput-BjLdmYor.js} +567 -76
- package/dist/DateRangeInput/index.d.ts +1 -1
- package/dist/DateRangeInput/index.js +1 -1
- package/dist/{DateRangeInput-Bqi5tlIA.js → DateRangeInput-Br3wVEfD.js} +85 -20
- package/dist/DateTimeInput/index.d.ts +1 -1
- package/dist/DateTimeInput/index.js +1 -1
- package/dist/DateTimeInput-CAZBwoRe.js +562 -0
- package/dist/Dialog/index.d.ts +1 -1
- package/dist/Dialog/index.js +2 -2
- package/dist/{Dialog-BiOSKQso.js → Dialog-Dce4Y97V.js} +28 -11
- package/dist/{Dialog-FGHfDu5M.js → Dialog-fhyxB00e.js} +32 -5
- package/dist/Divider/index.d.ts +1 -1
- package/dist/Divider/index.js +1 -1
- package/dist/{Divider-BtwnL18I.js → Divider-mOZ6vIQw.js} +5 -1
- package/dist/DropdownMenu/index.d.ts +2 -2
- package/dist/DropdownMenu/index.js +3 -3
- package/dist/{DropdownMenu-CoOQVlRp.js → DropdownMenu-BdGmQVb1.js} +85 -57
- package/dist/{DropdownMenu-DEb2dSSP.js → DropdownMenu-BzQrNV9C.js} +479 -264
- package/dist/{DropdownMenuRadioItem.vue-CXEURBcq.d.ts → DropdownMenuRadioItem.vue-Qd-8Rg4Q.d.ts} +236 -230
- package/dist/EmptyState/index.js +1 -1
- package/dist/{EmptyState-C_GH7IV5.js → EmptyState-CmOQf2SH.js} +2 -2
- package/dist/Field/index.d.ts +4 -3
- package/dist/Field/index.js +4 -3
- package/dist/{Field-D5gUEGw4.js → Field--OEsLBfE.js} +4 -3
- package/dist/{FieldInfoTip-Ds-sW_jY.js → FieldInfoTip-gxsnfkZw.js} +3 -3
- package/dist/{FieldLabel-BNeXRuGH.js → FieldLabel-jxIiWgLw.js} +12 -7
- package/dist/FieldStatus/index.d.ts +1 -1
- package/dist/FileInput/index.d.ts +1 -1
- package/dist/FileInput/index.js +1 -1
- package/dist/{FileInput-BpdiO1V8.js → FileInput-B_pUxB0Y.js} +106 -29
- package/dist/FormLayout/index.d.ts +1 -1
- package/dist/FormLayout/index.js +1 -1
- package/dist/{FormLayout-D47FjiOq.js → FormLayout-B9dUB6Ps.js} +1 -1
- package/dist/Heading/index.d.ts +1 -1
- package/dist/Heading/index.js +1 -1
- package/dist/{Heading-BnwWEWkp.js → Heading-BzBunfN7.js} +1 -1
- package/dist/HoverCard/index.js +1 -1
- package/dist/{HoverCard-ycY50pRN.js → HoverCard-BpJhT0sn.js} +35 -22
- package/dist/Icon/index.d.ts +4 -4
- package/dist/Icon/index.js +1 -1
- package/dist/{Icon-bteSId7T.js → Icon-KDnUyY7f.js} +12 -20
- package/dist/IconButton/index.js +1 -1
- package/dist/{IconButton-DDNgNl7B.js → IconButton-DI-XBbtV.js} +1 -1
- package/dist/Indicator/index.d.ts +2 -2
- package/dist/Indicator/index.js +2 -1
- package/dist/InputClearButton-CwXPan8c.js +40 -0
- package/dist/InputGroup/index.d.ts +1 -1
- package/dist/InputGroup/index.js +2 -2
- package/dist/{InputGroup-CA03Smrs.js → InputGroup-DiiocoIW.js} +2 -2
- package/dist/InternationalizationProvider/index.d.ts +1 -1
- package/dist/InternationalizationProvider/index.js +1 -1
- package/dist/{InternationalizationProvider-DJay_w3B.js → InternationalizationProvider-kBapgKAQ.js} +5 -9
- package/dist/{Item-KhFKX9St.js → Item-DWMIjN8n.js} +34 -9
- package/dist/Kbd/index.js +1 -1
- package/dist/{Kbd-BB-Dw6zE.js → Kbd-CV3LO2Ge.js} +18 -2
- package/dist/LayerContentBoundary-CvsKxwwm.js +27 -0
- package/dist/LayerProvider/index.js +1 -1
- package/dist/{LayerProvider-D9NsQFzL.js → LayerProvider-B6zpMBWC.js} +15 -3
- package/dist/Layout/index.d.ts +1 -1
- package/dist/Layout/index.js +2 -2
- package/dist/{Layout-C6RHllr-.js → Layout-JJRCG7Mf.js} +1 -1
- package/dist/{LayoutPanel-DXOsaeQb.js → LayoutPanel-zM5vjrKS.js} +12 -8
- package/dist/Lightbox/index.js +1 -1
- package/dist/{Lightbox-DTF9EdTG.js → Lightbox-D8wyPgMK.js} +8 -6
- package/dist/Link/index.js +1 -1
- package/dist/{Link-BqHCtiyt.js → Link-DweIpOtN.js} +29 -12
- package/dist/List/index.d.ts +1 -1
- package/dist/List/index.js +2 -2
- package/dist/{ListItem-8RWT8XAG.js → ListItem-BQXMu1Tb.js} +1 -1
- package/dist/Markdown/index.d.ts +5 -2
- package/dist/Markdown/index.js +5 -2
- package/dist/Markdown/parser/index.d.ts +4 -0
- package/dist/Markdown/parser/index.js +3 -0
- package/dist/Markdown/plugin-protocol/index.d.ts +35 -0
- package/dist/Markdown/plugin-protocol/index.js +107 -0
- package/dist/Markdown/plugin-renderer/index.d.ts +31 -0
- package/dist/Markdown/plugin-renderer/index.js +42 -0
- package/dist/{Markdown-CvtN7HnF.js → Markdown-DhVfOvXk.js} +195 -484
- package/dist/MediaTheme-DlLqYhDy.js +433 -0
- package/dist/MetadataList/index.js +1 -1
- package/dist/{MetadataList-B-OelQlt.js → MetadataList-CEYceIlN.js} +15 -7
- package/dist/MobileNav/index.js +1 -1
- package/dist/{MobileNavToggle-DxGz0xKA.js → MobileNavToggle-pdoJFZHx.js} +52 -17
- package/dist/MoreMenu/index.d.ts +1 -1
- package/dist/MoreMenu/index.js +1 -1
- package/dist/{MoreMenu-Dlb7MLlW.js → MoreMenu-CFNqSRev.js} +72 -59
- package/dist/MultiSelector/index.d.ts +1 -1
- package/dist/MultiSelector/index.js +1 -1
- package/dist/MultiSelector-DuVatmq5.js +1456 -0
- package/dist/{NavDisclosure-C_fugrQ3.js → NavDisclosure-Bq9DTZLO.js} +29 -7
- package/dist/{NavHeadingSurface-B3yJspSN.js → NavHeadingSurface-C4v_MtkX.js} +29 -26
- package/dist/NavItem/index.d.ts +1 -1
- package/dist/NavItem/index.js +2 -2
- package/dist/{NavItem-BBIGSvDj.js → NavItem-BPb3yfgz.js} +17 -4
- package/dist/NavMenu/index.d.ts +1 -1
- package/dist/NavMenu/index.js +3 -3
- package/dist/{NavMenu-ThXguZAz.js → NavMenu-BYIDzjix.js} +42 -15
- package/dist/{NavMenuItem-BvJNsDFC.js → NavMenuItem-D3FO90GR.js} +14 -12
- package/dist/NumberInput/index.d.ts +1 -1
- package/dist/NumberInput/index.js +1 -1
- package/dist/NumberInput-B0vzOg3N.js +727 -0
- package/dist/Outline/index.d.ts +2 -2
- package/dist/Outline/index.js +2 -2
- package/dist/{Outline-755h-lMP.js → Outline-CfGv2F1o.js} +91 -6
- package/dist/OverflowList/index.d.ts +2 -2
- package/dist/OverflowList/index.js +1 -1
- package/dist/{OverflowList-NmrSMbxb.js → OverflowList-BgRLZ3dh.js} +23 -6
- package/dist/Pagination/index.d.ts +1 -1
- package/dist/Pagination/index.js +1 -1
- package/dist/{Pagination-DqwNQFRp.js → Pagination-Bfe12018.js} +2 -2
- package/dist/PickerWheel-CSwUYfes.js +69 -0
- package/dist/Popover/index.d.ts +1 -1
- package/dist/Popover/index.js +1 -1
- package/dist/{Popover-DJf8POzL.js → Popover-78dFjTb9.js} +20 -15
- package/dist/PowerSearch/index.d.ts +1 -1
- package/dist/PowerSearch/index.js +1 -1
- package/dist/{PowerSearch-DvjiPqMZ.js → PowerSearch-BoAMdFaT.js} +774 -586
- package/dist/ProgressBar/index.d.ts +1 -1
- package/dist/ProgressBar/index.js +1 -1
- package/dist/{ProgressBar-CVLzdoBK.js → ProgressBar-VP4JS7vm.js} +10 -7
- package/dist/Radio/index.d.ts +1 -1
- package/dist/Radio/index.js +1 -1
- package/dist/{RadioGroup-Bfu6JSNV.js → RadioGroup-BIipql-L.js} +94 -26
- package/dist/RadioList/index.d.ts +1 -1
- package/dist/RadioList/index.js +1 -1
- package/dist/{RadioList-xY1cwLdZ.js → RadioList-GyhgBg4j.js} +57 -8
- package/dist/Resizable/index.d.ts +1 -1
- package/dist/Resizable/index.js +1 -1
- package/dist/{ResizeHandle-q4nD_586.js → ResizeHandle-TPlUCAHD.js} +103 -50
- package/dist/ScrollableArea/index.d.ts +1 -1
- package/dist/ScrollableArea/index.js +1 -1
- package/dist/{ScrollableArea-D4dCJv9I.js → ScrollableArea-0u6RWtGG.js} +1 -1
- package/dist/SegmentedControl/index.d.ts +1 -1
- package/dist/SegmentedControl/index.js +1 -1
- package/dist/{SegmentedControl-ChHmFrrC.js → SegmentedControl-D1wWGBZo.js} +11 -5
- package/dist/SelectableCard/index.d.ts +1 -1
- package/dist/SelectableCard/index.js +1 -1
- package/dist/{SelectableCard-Cku4dRzc.js → SelectableCard-BEqnhPaX.js} +16 -11
- package/dist/Selector/index.d.ts +1 -1
- package/dist/Selector/index.js +1 -1
- package/dist/Selector-CPISLzp7.js +1049 -0
- package/dist/SideNav/index.d.ts +1 -1
- package/dist/SideNav/index.js +1 -1
- package/dist/{SideNav-BF8mYDxl.js → SideNav-CN2QeAtY.js} +51 -37
- package/dist/Slider/index.d.ts +1 -1
- package/dist/Slider/index.js +1 -1
- package/dist/{Slider-DWobsPgm.js → Slider-pdC0jpHu.js} +172 -46
- package/dist/Spinner/index.js +1 -1
- package/dist/Spinner-DdVUadii.js +200 -0
- package/dist/Stack/index.d.ts +1 -1
- package/dist/Stack/index.js +2 -2
- package/dist/{Stack-CTsTFfar.js → Stack-Bb_h60t3.js} +1 -1
- package/dist/{Stack-kQlYbbL4.js → Stack-Bp-XN9J4.js} +12 -7
- package/dist/StatusDot/index.d.ts +1 -1
- package/dist/StatusDot/index.js +1 -1
- package/dist/{StatusDot-BPUhMOff.js → StatusDot-BS_ohXhd.js} +8 -4
- package/dist/Stepper/index.js +1 -1
- package/dist/{Stepper-CE8dHysu.js → Stepper-CyaSRSdu.js} +101 -79
- package/dist/Switch/index.d.ts +1 -1
- package/dist/Switch/index.js +1 -1
- package/dist/{Switch-DaVPRxvN.js → Switch-Z2Vfiiic.js} +38 -22
- package/dist/TabList/index.d.ts +2 -2
- package/dist/TabList/index.js +1 -1
- package/dist/{TabList-DIkK9sgK.js → TabList-DRqP0Hrv.js} +205 -63
- package/dist/Table/index.d.ts +3 -3
- package/dist/Table/index.js +1 -1
- package/dist/{Table-fecqnm7P.js → Table-BcrrylMX.js} +726 -452
- package/dist/Text/index.d.ts +1 -1
- package/dist/Text/index.js +1 -1
- package/dist/{Text-CV3LmscH.js → Text-CmTOgYXf.js} +1 -1
- package/dist/TextArea/index.d.ts +1 -1
- package/dist/TextArea/index.js +1 -1
- package/dist/{TextArea-Ab5Sw60T.js → TextArea-DA9CCG_J.js} +104 -50
- package/dist/TextInput/index.d.ts +1 -1
- package/dist/TextInput/index.js +1 -1
- package/dist/{TextInput-zFT1_qgI.js → TextInput-CI96einV.js} +71 -38
- package/dist/Theme/index.d.ts +3 -3
- package/dist/Theme/index.js +3 -2
- package/dist/Theme-BbDT8B_C.js +2125 -0
- package/dist/Thumbnail/index.js +1 -1
- package/dist/{Thumbnail-C3NnJUFG.js → Thumbnail-B2ZAY59J.js} +13 -10
- package/dist/{TimeField-CoHDGmsP.js → TimeField-CpAgja9D.js} +297 -40
- package/dist/TimeInput/index.d.ts +1 -1
- package/dist/TimeInput/index.js +1 -1
- package/dist/{TimeInput-D2k3Ux3p.js → TimeInput-Bw_lHS4M.js} +78 -9
- package/dist/Timer/index.d.ts +1 -1
- package/dist/Timer/index.js +1 -1
- package/dist/{Timer-avMQk5DN.js → Timer-CH7GsEVu.js} +1 -1
- package/dist/Timestamp/index.d.ts +1 -1
- package/dist/Timestamp/index.js +1 -1
- package/dist/{Timestamp-xpQKCk0d.js → Timestamp-BFNuoTZ0.js} +5 -5
- package/dist/Toast/index.d.ts +1 -1
- package/dist/Toast/index.js +1 -1
- package/dist/Toast-DwnPjx6j.js +685 -0
- package/dist/ToggleButton/index.d.ts +1 -1
- package/dist/ToggleButton/index.js +1 -1
- package/dist/{ToggleButton-B-C-Q7XP.js → ToggleButton-cLjh9W-x.js} +5 -4
- package/dist/Token/index.d.ts +1 -1
- package/dist/Token/index.js +1 -1
- package/dist/{Token-DsntTYhQ.js → Token-BfS4vi__.js} +32 -17
- package/dist/Tokenizer/index.d.ts +1 -1
- package/dist/Tokenizer/index.js +1 -1
- package/dist/{Tokenizer-B5C_qY7t.js → Tokenizer-Ci3E5bvP.js} +107 -23
- package/dist/Toolbar/index.d.ts +2 -2
- package/dist/Toolbar/index.js +1 -1
- package/dist/{Toolbar-BrgvvTCk.js → Toolbar-C0pMWL4S.js} +1 -1
- package/dist/Tooltip/index.d.ts +1 -1
- package/dist/Tooltip/index.js +1 -1
- package/dist/{Tooltip-C4Vaqd3G.js → Tooltip-sAM8i1eO.js} +23 -19
- package/dist/TopNav/index.d.ts +1 -1
- package/dist/TopNav/index.js +1 -1
- package/dist/{TopNav-Ciq0l1w7.js → TopNav-gW59zp1o.js} +16 -15
- package/dist/TreeList/index.d.ts +1 -1
- package/dist/TreeList/index.js +1 -1
- package/dist/{TreeList-BUz-KZJd.js → TreeList-DaoI7zaH.js} +124 -41
- package/dist/Typeahead/index.d.ts +1 -1
- package/dist/Typeahead/index.js +2 -2
- package/dist/{Typeahead-JP9RT87x.js → Typeahead-D4JjvjK4.js} +123 -26
- package/dist/{TypeaheadMenu-DBW6rHeO.js → TypeaheadMenu-BQlMrfqX.js} +141 -51
- package/dist/{announce-Cnio10Wk.js → announce-B210eJVf.js} +17 -2
- package/dist/characterReferences-BJ-jLhsR.js +65 -0
- package/dist/characters-rcDbGt71.d.ts +29 -0
- package/dist/characters-wTnzjkkR.js +58 -0
- package/dist/{colorMode-CBgdgDSn.js → colorMode-BxqfDP4P.js} +1 -4
- package/dist/composables/index.d.ts +5 -4
- package/dist/composables/index.js +23 -18
- package/dist/{composables-CbKx9C1Y.js → composables-Bc02zKAO.js} +167 -197
- package/dist/context-B6UElI5X.js +5 -0
- package/dist/{context-Cfjh8te1.js → context-Cfml4jaK.js} +5 -3
- package/dist/{context-iABt_ueM.js → context-DWfi56sq.js} +451 -122
- package/dist/context-IvbU9c3T.js +8 -0
- package/dist/context-pjBxaMSh.js +28 -0
- package/dist/fieldParts--SyRZVQG.js +44 -0
- package/dist/fieldParts-LXpQMKE8.d.ts +27 -0
- package/dist/{focus-CpficIgf.js → focus-l8jVTcqd.js} +1 -1
- package/dist/hoverIntent-DMHGb85c.js +115 -0
- package/dist/{index-Cde5JvtX.d.ts → index-B-nESNam.d.ts} +8 -7
- package/dist/{index-CsNi1I8j.d.ts → index-B08-Uxhv.d.ts} +4 -2
- package/dist/{index-Cn-sSds-.d.ts → index-B56j4eI2.d.ts} +24 -1
- package/dist/{index-BkjSF265.d.ts → index-BEZ4ezJk.d.ts} +3 -3
- package/dist/{index-DeQwYJbg.d.ts → index-BNaRK-s5.d.ts} +10 -1
- package/dist/{index-0QGtSf3r.d.ts → index-BO9TY87G.d.ts} +3 -2
- package/dist/{index-IBAInumL.d.ts → index-BQEJj72c.d.ts} +23 -10
- package/dist/{index-D97pQbua.d.ts → index-BV2D2x_u.d.ts} +1 -1
- package/dist/{index-Crp3NFLW.d.ts → index-BZKgbyN9.d.ts} +1 -1
- package/dist/index-BkUkm6Al.d.ts +11 -0
- package/dist/{index-ClNU2Th8.d.ts → index-Bn-v89Vt.d.ts} +10 -6
- package/dist/{index-Bu8NA2SD.d.ts → index-BnEhvmdR.d.ts} +16 -7
- package/dist/index-Bo-ofFyg.d.ts +166 -0
- package/dist/{index-i0tNFWfz.d.ts → index-BqhgeAT4.d.ts} +2 -0
- package/dist/{index-DWh2WC8W.d.ts → index-C4Cjz6OK.d.ts} +2 -2
- package/dist/{index-B7yhzGUT.d.ts → index-C7sam-SB.d.ts} +2 -2
- package/dist/{index-BrJzFA5X.d.ts → index-C90l2rH1.d.ts} +1 -1
- package/dist/{index-vP0EtrJJ.d.ts → index-C9gAlDt_.d.ts} +6 -3
- package/dist/{index-xrzJC4wm.d.ts → index-CJ6ajsUC.d.ts} +1 -1
- package/dist/{index-B9e52paP.d.ts → index-CK-Dbh0f.d.ts} +1 -1
- package/dist/index-CKUfpmFL.d.ts +375 -0
- package/dist/{index-DXpSFlPG.d.ts → index-CKgBTAzC.d.ts} +4 -4
- package/dist/{index-gW0HW02U.d.ts → index-COxy6LEW.d.ts} +1 -1
- package/dist/{index-B4OOtNP8.d.ts → index-CPtDjmcX.d.ts} +3 -3
- package/dist/{index-12QYAbiz.d.ts → index-CRrSHbok.d.ts} +3 -2
- package/dist/{index-DG52Bg0W.d.ts → index-CTf3SK0b.d.ts} +6 -0
- package/dist/{index-BVKivP59.d.ts → index-CTjkJP4x.d.ts} +32 -3
- package/dist/{index-COgrQZIL.d.ts → index-CdvmnNMH.d.ts} +1 -1
- package/dist/{index-GI9xIV9l.d.ts → index-CikMzeab.d.ts} +2 -2
- package/dist/{index-DUaLJO7l.d.ts → index-CpNlPLBF.d.ts} +172 -126
- package/dist/{index-yT1yiiww.d.ts → index-Cs1xsHKi.d.ts} +24 -12
- package/dist/{index-Cyb9Du5Z.d.ts → index-CtTGt6Dv.d.ts} +1 -1
- package/dist/{index-Byar3h1e.d.ts → index-D05JGsT3.d.ts} +6 -3
- package/dist/{index-B3Fomy15.d.ts → index-D0_HsuC3.d.ts} +3 -3
- package/dist/{index-BgT6mH3U.d.ts → index-D7ShT2c-.d.ts} +1 -1
- package/dist/{index-CkKPMIeX.d.ts → index-D7XRtUTY.d.ts} +9 -0
- package/dist/{index-TntQsADQ.d.ts → index-DEm3kRBO.d.ts} +4 -3
- package/dist/{index-C2nbK2AA.d.ts → index-DLAG3m9W.d.ts} +13 -3
- package/dist/{index-DVmgNb78.d.ts → index-DRJZ-v1E.d.ts} +4 -4
- package/dist/{index-CL1T2j4y.d.ts → index-DY8Wph-A.d.ts} +3 -3
- package/dist/{index-B1WJxt-n.d.ts → index-DfC05uKG.d.ts} +17 -7
- package/dist/{index-C5e-7Obr.d.ts → index-Dj1_1t3j.d.ts} +19 -6
- package/dist/{index-D41_xqjs.d.ts → index-Dr4b_oji.d.ts} +20 -13
- package/dist/{index-CqE4Bf3Q.d.ts → index-Ds201-d2.d.ts} +16 -2
- package/dist/{index-DIXAzTKL.d.ts → index-DxxudRgB.d.ts} +1 -1
- package/dist/{index-B42oE_F-.d.ts → index-IfsSCj8J.d.ts} +18 -5
- package/dist/{index-XuAAcYiP.d.ts → index-f3d9cVtj.d.ts} +1 -1
- package/dist/{index-T2FOcOuI.d.ts → index-jOwU3YoR.d.ts} +400 -90
- package/dist/{index-CICeEoZV.d.ts → index-pNtfr-RW.d.ts} +1 -1
- package/dist/{index-BhpAUzUr.d.ts → index-unAZVFGz.d.ts} +2 -2
- package/dist/index.d.ts +80 -74
- package/dist/index.js +149 -134
- package/dist/inlineSize-BNe8wggI.js +66 -0
- package/dist/inputPresentation-BOyHkCDr.js +62 -0
- package/dist/interactionModality-ACpTMhak.js +44 -0
- package/dist/isApplePlatform-B1ju6F5B.js +27 -0
- package/dist/isRenderable-BnKHIqfd.js +21 -0
- package/dist/layerDepth-CNDh-IHb.js +181 -0
- package/dist/link-DuuA2eCL.js +30 -0
- package/dist/{loadCatalog-BGHKG_9N.d.ts → loadCatalog-DlLFZreI.d.ts} +281 -7
- package/dist/loadCatalog-eopw74qb.js +424 -0
- package/dist/locale/index.d.ts +2 -2
- package/dist/locale/index.js +4 -3
- package/dist/locale-CabGJlGp.js +343 -0
- package/dist/modalOutlet-CUOcrhIu.js +56 -0
- package/dist/optionAction-Cg7xQLUA.d.ts +6 -0
- package/dist/{power-search-DrDfcoL1.d.ts → power-search-gHLIYXs5.d.ts} +2 -0
- package/dist/protocol-DHxY0NI8.js +113 -0
- package/dist/protocol-RSeMzAN1.d.ts +238 -0
- package/dist/publicParser-B0MRoikr.d.ts +141 -0
- package/dist/publicParser-uHC_T0Fo.js +895 -0
- package/dist/resizableChannel-3vivrEcT.js +20 -0
- package/dist/safeUrl-CsvfcZ9m.js +54 -0
- package/dist/scopedProvide-C-Df7c15.js +30 -0
- package/dist/scrollKeyboardDelegation-D7cumnOl.js +238 -0
- package/dist/scrollLock-C3aT4-0z.js +102 -0
- package/dist/{searchResultMessage-hXXNOFJP.js → searchResultMessage-mCpJBvra.js} +5 -14
- package/dist/{semantic-CKH9XVqa.d.ts → semantic-BF_AjLvk.d.ts} +6 -3
- package/dist/slug-C65CUsf9.js +32 -0
- package/dist/syntaxContext-DmIfNNtb.js +4 -0
- package/dist/triggerVariant-BsL8jMHs.js +16 -0
- package/dist/{types-0Q_SJv_F.d.ts → types-Bb7OGivY.d.ts} +6 -1
- package/dist/{types-CwyibrRB.d.ts → types-C5GQ2KCK.d.ts} +23 -3
- package/dist/{types-gKsEkk2g.d.ts → types-CsqwQkf1.d.ts} +143 -10
- package/dist/upstreamMap-xr3gvREu.js +731 -0
- package/dist/{useAnchoredListbox-DwztMNjP.js → useAnchoredListbox-DGxxKHZb.js} +2 -2
- package/dist/{useAsyncSource-xpQovjV_.d.ts → useAsyncSource-aGzrvRkI.d.ts} +3 -0
- package/dist/{useClickableContainer-DyNpnSEa.js → useClickableContainer-CdGp_Cev.js} +1 -1
- package/dist/{useClipboard-BDfbEsWd.js → useClipboard-Dk8cS810.js} +1 -1
- package/dist/useHoverLayerDismiss-kYJ_NqL4.js +27 -0
- package/dist/{useIndicator-i1NORM7W.js → useIndicator-MZmfBWid.js} +5 -23
- package/dist/{useInputContainer-CpgDe2-4.js → useInputContainer-CLcYrby4.js} +1 -1
- package/dist/{useInputStatusIcon-DBOwxV4x.js → useInputStatusIcon-DAE7PExr.js} +1 -1
- package/dist/useLayerMountTarget-BmZyeKWE.js +156 -0
- package/dist/{useListFocus-D0iOJl39.js → useListFocus-ChxLg0b4.js} +3 -2
- package/dist/{useMenuDrillIn-DzKGkTho.js → useMenuDrillIn-DhUnPvKs.js} +6 -5
- package/dist/useMenuHover-Djreu23i.js +170 -0
- package/dist/useMenuPress-8foxY8z4.js +764 -0
- package/dist/{useMergedRefs-CfHHlCsn.js → useMergedRefs-Cb6_w93m.js} +24 -4
- package/dist/{useNumberField-4-dIGVed.js → useNumberField-Dk1BE3-K.js} +3 -3
- package/dist/useOptionActionGrid-CkJcuvaU.js +97 -0
- package/dist/{usePositionedLayer-Cru9_00b.js → usePositionedLayer-B7cvG-_v.js} +43 -49
- package/dist/usePressFeedback-BJCpjEpv.js +319 -0
- package/dist/{useResizable-DDwPpPe6.d.ts → useResizable-1MHPNaRD.d.ts} +19 -1
- package/dist/{useResizable-B3ahKLoZ.js → useResizable-I3BCiLSL.js} +72 -40
- package/dist/useResolvedLabelHidden-B2rlWiaI.js +30 -0
- package/dist/{useRestoreFocus-Djw9RUIf.js → useRestoreFocus-XEKs5-gp.js} +49 -7
- package/dist/useScrollOverflow-DuMoGXmm.js +67 -0
- package/dist/useScrollableArea-BE8b3qm7.js +222 -0
- package/dist/{useTimeValue-6ufHM15W.js → useTimeValue-BJd0xBhG.js} +4 -22
- package/dist/useTranslator-BmWt2BBt.js +35 -0
- package/dist/{useTypeahead-PAK8lMYz.js → useTypeahead-BvtflkRk.js} +4 -5
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.js +5 -0
- package/dist/{utils-D33VQDnk.js → utils-ClVseK2w.js} +29 -2
- package/dist/utils-z3Q6BGIJ.js +819 -0
- package/locales/SOURCE.json +1 -1
- package/package.json +18 -2
- package/reset.css +364 -1
- package/styles/avatar-group.css +9 -1
- package/styles/badge.css +8 -5
- package/styles/banner.css +124 -26
- package/styles/blockquote.css +1 -0
- package/styles/bordered-control.css +1 -1
- package/styles/bottom-sheet.css +74 -6
- package/styles/breadcrumbs.css +16 -2
- package/styles/button-group.css +3 -1
- package/styles/button.css +53 -11
- package/styles/card.css +1 -1
- package/styles/chat.css +16 -6
- package/styles/checkbox-input.css +10 -0
- package/styles/clickable-card.css +10 -3
- package/styles/collapsible.css +12 -5
- package/styles/command-palette.css +29 -14
- package/styles/complex-selector.css +22 -5
- package/styles/context-menu.css +3 -3
- package/styles/date-input.css +111 -1
- package/styles/dialog-header.css +4 -1
- package/styles/dialog.css +7 -0
- package/styles/dropdown-menu.css +12 -3
- package/styles/field.css +5 -0
- package/styles/form-layout.css +1 -0
- package/styles/heading.css +18 -8
- package/styles/icon.css +4 -0
- package/styles/kbd.css +1 -1
- package/styles/layer.css +72 -0
- package/styles/list.css +9 -2
- package/styles/metadata-list.css +1 -0
- package/styles/mobile-nav.css +4 -1
- package/styles/multi-selector.css +48 -1
- package/styles/nav-item.css +9 -2
- package/styles/nav-menu.css +12 -2
- package/styles/number-input.css +9 -1
- package/styles/overflow-list.css +1 -1
- package/styles/popover.css +2 -1
- package/styles/power-search.css +5 -3
- package/styles/pressable.css +63 -22
- package/styles/progress-bar.css +15 -3
- package/styles/radio.css +16 -0
- package/styles/resize-handle.css +42 -0
- package/styles/segmented-control.css +12 -4
- package/styles/selector.css +53 -1
- package/styles/side-nav.css +19 -0
- package/styles/slider.css +4 -3
- package/styles/spinner.css +48 -42
- package/styles/stepper.css +58 -4
- package/styles/switch.css +26 -0
- package/styles/tab-list.css +132 -3
- package/styles/table.css +88 -10
- package/styles/text-area.css +1 -1
- package/styles/text-input.css +1 -1
- package/styles/text.css +6 -6
- package/styles/thumbnail.css +11 -3
- package/styles/time-input.css +8 -0
- package/styles/toast.css +37 -3
- package/styles/token.css +2 -2
- package/styles/tokenizer.css +1 -1
- package/styles/toolbar.css +4 -1
- package/styles/tree-list.css +1 -1
- package/styles/typeahead.css +34 -1
- package/styles.css +1 -0
- package/dist/Blockquote-DFqBv_oJ.js +0 -18
- package/dist/Breadcrumbs-DIm4figq.js +0 -141
- package/dist/ButtonGroup-ySQWanDP.js +0 -125
- package/dist/DateTimeInput-A7m2O3bg.js +0 -268
- package/dist/MultiSelector-BtAUfQ3t.js +0 -990
- package/dist/NumberInput-AZ9x3oja.js +0 -473
- package/dist/Selector-DJ2BhUTV.js +0 -677
- package/dist/Spinner-9cYUCnDy.js +0 -84
- package/dist/Theme-CtaUWo4g.js +0 -1246
- package/dist/Toast-BuqIZV5z.js +0 -322
- package/dist/context-4PuqD1Ic.js +0 -4
- package/dist/context-D5-MwxnN.js +0 -4
- package/dist/index-BH9PzQ1F.d.ts +0 -87
- package/dist/link-C4_WogdF.js +0 -18
- package/dist/loadCatalog-CXKqEB9s.js +0 -877
- package/dist/locale-DgkZEMTn.js +0 -105
- package/dist/platform-B_9W_aHW.js +0 -33
- package/dist/scrollLock-BzIvIimL.js +0 -42
- package/dist/useMenuPress-D-FRNrBW.js +0 -573
- package/dist/useScrollableArea-DDk_CluT.js +0 -172
- /package/dist/{index-lgvUFSCO.d.ts → index-CryFtTT6.d.ts} +0 -0
|
@@ -1,27 +1,32 @@
|
|
|
1
|
-
import { t as _sfc_main$5 } from "./Button-
|
|
2
|
-
import { t as
|
|
1
|
+
import { t as _sfc_main$5 } from "./Button-ONOoHdkg.js";
|
|
2
|
+
import { r as truncateCharacters, t as characterCount } from "./characters-wTnzjkkR.js";
|
|
3
|
+
import { t as useAnnounce } from "./announce-B210eJVf.js";
|
|
3
4
|
import { t as createStaticSource } from "./useAsyncSource-Gk0VtE7_.js";
|
|
4
|
-
import { n as useDismiss } from "./usePositionedLayer-
|
|
5
|
-
import {
|
|
5
|
+
import { n as useDismiss } from "./usePositionedLayer-B7cvG-_v.js";
|
|
6
|
+
import { o as useAstryxLocale, s as useAstryxMessages } from "./context-DWfi56sq.js";
|
|
7
|
+
import { i as useLayerGutter } from "./context-M-er0-Rk.js";
|
|
6
8
|
import { n as useOverflow } from "./useOverflow-VrwF5oek.js";
|
|
7
|
-
import { t as
|
|
9
|
+
import { t as useResolvedLabelHidden } from "./useResolvedLabelHidden-B2rlWiaI.js";
|
|
10
|
+
import { t as _sfc_main$6 } from "./Tooltip-sAM8i1eO.js";
|
|
8
11
|
import { t as useScrollbars } from "./useScrollbars-C2NJ6Qwq.js";
|
|
9
|
-
import { t as _sfc_main$7 } from "./Icon-
|
|
10
|
-
import { t as _sfc_main$8 } from "./Field
|
|
11
|
-
import { t as
|
|
12
|
-
import { t as _sfc_main$
|
|
13
|
-
import { t as _sfc_main$
|
|
14
|
-
import { t as _sfc_main$
|
|
15
|
-
import {
|
|
16
|
-
import { t as
|
|
17
|
-
import { t as _sfc_main$
|
|
18
|
-
import { t as _sfc_main$
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import { t as _sfc_main$
|
|
22
|
-
import { t as _sfc_main$
|
|
23
|
-
import { t as _sfc_main$
|
|
24
|
-
import {
|
|
12
|
+
import { t as _sfc_main$7 } from "./Icon-KDnUyY7f.js";
|
|
13
|
+
import { t as _sfc_main$8 } from "./Field--OEsLBfE.js";
|
|
14
|
+
import { t as useFieldPartStyling } from "./fieldParts--SyRZVQG.js";
|
|
15
|
+
import { t as _sfc_main$9 } from "./DateInput-BjLdmYor.js";
|
|
16
|
+
import { t as _sfc_main$10 } from "./DateRangeInput-Br3wVEfD.js";
|
|
17
|
+
import { t as _sfc_main$11 } from "./DateTimeInput-CAZBwoRe.js";
|
|
18
|
+
import { t as _sfc_main$12 } from "./Token-BfS4vi__.js";
|
|
19
|
+
import { n as useAnchoredListbox, t as scrollOptionIntoView } from "./useAnchoredListbox-DGxxKHZb.js";
|
|
20
|
+
import { t as _sfc_main$13 } from "./MultiSelector-DuVatmq5.js";
|
|
21
|
+
import { n as resolveNumberInputCommit, t as _sfc_main$14 } from "./NumberInput-B0vzOg3N.js";
|
|
22
|
+
import { t as _sfc_main$15 } from "./Selector-CPISLzp7.js";
|
|
23
|
+
import { i as useTypeaheadMenu } from "./TypeaheadMenu-BQlMrfqX.js";
|
|
24
|
+
import { t as _sfc_main$16 } from "./TextInput-CI96einV.js";
|
|
25
|
+
import { t as _sfc_main$17 } from "./TimeInput-Bw_lHS4M.js";
|
|
26
|
+
import { t as _sfc_main$18 } from "./Tokenizer-Ci3E5bvP.js";
|
|
27
|
+
import { t as _sfc_main$19 } from "./Typeahead-D4JjvjK4.js";
|
|
28
|
+
import { Fragment, Teleport, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createVNode, defineComponent, mergeProps, nextTick, normalizeClass, normalizeStyle, onMounted, openBlock, ref, renderList, renderSlot, resolveComponent, resolveDynamicComponent, toDisplayString, unref, useAttrs, useId, useSlots, useTemplateRef, vShow, watch, withCtx, withDirectives, withModifiers } from "vue";
|
|
29
|
+
import "../styles/layer.css";
|
|
25
30
|
import "../styles/visually-hidden-utility.css";
|
|
26
31
|
import "../styles/typeahead.css";
|
|
27
32
|
import "../styles/power-search.css";
|
|
@@ -119,9 +124,7 @@ function createPowerSearchLookup(config) {
|
|
|
119
124
|
//#endregion
|
|
120
125
|
//#region src/PowerSearch/format.ts
|
|
121
126
|
function truncate(value, maxLength) {
|
|
122
|
-
|
|
123
|
-
if (chars.length <= maxLength) return value;
|
|
124
|
-
return `${chars.slice(0, Math.max(0, maxLength)).join("")}…`;
|
|
127
|
+
return truncateCharacters(value, maxLength);
|
|
125
128
|
}
|
|
126
129
|
function enumLabel(value, values) {
|
|
127
130
|
return values.find((item) => item.value === value)?.label ?? value;
|
|
@@ -154,7 +157,7 @@ function joinOrCount(labels, maxLength, countLabel) {
|
|
|
154
157
|
if (labels.length === 0) return "";
|
|
155
158
|
if (labels.length === 1) return truncate(labels[0] ?? "", maxLength);
|
|
156
159
|
const joined = labels.join(", ");
|
|
157
|
-
if (
|
|
160
|
+
if (characterCount(joined) <= maxLength) return joined;
|
|
158
161
|
return countLabel(labels.length);
|
|
159
162
|
}
|
|
160
163
|
function formatFilterValue(operatorValue, filterValue, maxLength, messages, locale, timeZone) {
|
|
@@ -227,8 +230,11 @@ function resolveOperatorLabel(operator, messages) {
|
|
|
227
230
|
* 视口放不下 400 时,下限让给视口。只有被 720 压窄时,才改贴打开控件更近的外缘。
|
|
228
231
|
*/
|
|
229
232
|
function resolveEditorPlacement(input) {
|
|
230
|
-
const
|
|
231
|
-
const
|
|
233
|
+
const fallback = input.viewportInset ?? 16;
|
|
234
|
+
const inlineStart = input.inlineStart ?? fallback;
|
|
235
|
+
const inlineEnd = input.inlineEnd ?? fallback;
|
|
236
|
+
const blockInset = input.blockInset ?? fallback;
|
|
237
|
+
const available = Math.max(0, input.viewportWidth - inlineStart - inlineEnd);
|
|
232
238
|
const floor = Math.min(400, available);
|
|
233
239
|
const ceiling = Math.min(720, available);
|
|
234
240
|
let width = input.outer.width;
|
|
@@ -245,13 +251,13 @@ function resolveEditorPlacement(input) {
|
|
|
245
251
|
else edge = input.direction === "rtl" ? "right" : "left";
|
|
246
252
|
}
|
|
247
253
|
let left = edge === "left" ? input.outer.left : input.outer.right - width;
|
|
248
|
-
const maxLeft = input.viewportWidth -
|
|
249
|
-
if (left <
|
|
250
|
-
if (left > maxLeft) left = Math.max(
|
|
254
|
+
const maxLeft = input.viewportWidth - inlineEnd - width;
|
|
255
|
+
if (left < inlineStart) left = inlineStart;
|
|
256
|
+
if (left > maxLeft) left = Math.max(inlineStart, maxLeft);
|
|
251
257
|
const gap = 4;
|
|
252
258
|
const estimatedHeight = 280;
|
|
253
259
|
let top = input.anchorBottom + gap;
|
|
254
|
-
if (top + estimatedHeight > input.viewportHeight -
|
|
260
|
+
if (top + estimatedHeight > input.viewportHeight - blockInset && input.anchorTop - gap - estimatedHeight > blockInset) top = input.anchorTop - gap - estimatedHeight;
|
|
255
261
|
return {
|
|
256
262
|
width,
|
|
257
263
|
capped,
|
|
@@ -261,6 +267,241 @@ function resolveEditorPlacement(input) {
|
|
|
261
267
|
};
|
|
262
268
|
}
|
|
263
269
|
//#endregion
|
|
270
|
+
//#region src/PowerSearch/menuPresentation.ts
|
|
271
|
+
function powerSearchGroupLabel(entries, index) {
|
|
272
|
+
const group = entries[index]?.item.auxiliaryData?.group;
|
|
273
|
+
if (group == null || group === "") return void 0;
|
|
274
|
+
return group !== (index > 0 ? entries[index - 1]?.item.auxiliaryData?.group : void 0) ? group : void 0;
|
|
275
|
+
}
|
|
276
|
+
function powerSearchItemIcon(item, lookup) {
|
|
277
|
+
const data = item.auxiliaryData;
|
|
278
|
+
const type = (data?.operatorKey ? lookup.getOperator(data.fieldKey, data.operatorKey) : void 0)?.value.type;
|
|
279
|
+
if (type === "date_absolute" || type === "date_range" || type === "date_relative") return "calendar";
|
|
280
|
+
if (type === "time") return "clock";
|
|
281
|
+
if (type === "enum" || type === "enum_list") return "funnel";
|
|
282
|
+
return "search";
|
|
283
|
+
}
|
|
284
|
+
//#endregion
|
|
285
|
+
//#region src/PowerSearch/PowerSearchToken.vue
|
|
286
|
+
const _hoisted_1$4 = { class: "astryx-power-search-token-value" };
|
|
287
|
+
const _sfc_main$4 = /*@__PURE__*/ defineComponent({
|
|
288
|
+
name: "AstryxPowerSearchToken",
|
|
289
|
+
__name: "PowerSearchToken",
|
|
290
|
+
props: {
|
|
291
|
+
fieldLabel: {},
|
|
292
|
+
operator: {},
|
|
293
|
+
filter: {},
|
|
294
|
+
maxLength: {},
|
|
295
|
+
messages: {},
|
|
296
|
+
locale: {},
|
|
297
|
+
timeZone: {},
|
|
298
|
+
size: {},
|
|
299
|
+
disabled: { type: Boolean },
|
|
300
|
+
removable: { type: Boolean }
|
|
301
|
+
},
|
|
302
|
+
emits: ["activate", "remove"],
|
|
303
|
+
setup(__props, { emit: __emit }) {
|
|
304
|
+
const props = __props;
|
|
305
|
+
const emit = __emit;
|
|
306
|
+
const operatorLabel = computed(() => resolveOperatorLabel(props.operator, props.messages));
|
|
307
|
+
const tokenLabel = computed(() => `${props.fieldLabel}: ${operatorLabel.value}`);
|
|
308
|
+
const valueText = computed(() => {
|
|
309
|
+
const room = Math.max(props.maxLength - characterCount(props.fieldLabel) - characterCount(operatorLabel.value), 10);
|
|
310
|
+
return formatFilterValue(props.operator.value, props.filter.value, room, props.messages, props.locale, props.timeZone);
|
|
311
|
+
});
|
|
312
|
+
return (_ctx, _cache) => {
|
|
313
|
+
return openBlock(), createBlock(_sfc_main$12, {
|
|
314
|
+
label: tokenLabel.value,
|
|
315
|
+
size: __props.size,
|
|
316
|
+
disabled: __props.disabled,
|
|
317
|
+
removable: __props.removable,
|
|
318
|
+
onClick: _cache[0] || (_cache[0] = ($event) => emit("activate")),
|
|
319
|
+
onRemove: _cache[1] || (_cache[1] = ($event) => emit("remove"))
|
|
320
|
+
}, createSlots({ _: 2 }, [valueText.value ? {
|
|
321
|
+
name: "end",
|
|
322
|
+
fn: withCtx(() => [createElementVNode("span", _hoisted_1$4, toDisplayString(valueText.value), 1)]),
|
|
323
|
+
key: "0"
|
|
324
|
+
} : void 0]), 1032, [
|
|
325
|
+
"label",
|
|
326
|
+
"size",
|
|
327
|
+
"disabled",
|
|
328
|
+
"removable"
|
|
329
|
+
]);
|
|
330
|
+
};
|
|
331
|
+
}
|
|
332
|
+
});
|
|
333
|
+
//#endregion
|
|
334
|
+
//#region src/PowerSearch/source.ts
|
|
335
|
+
const MAX_BROWSE_ITEMS = 1e3;
|
|
336
|
+
function resolveValueMatches(operator, rawValue) {
|
|
337
|
+
const kind = operator.value.type;
|
|
338
|
+
if (kind === "string") return [{
|
|
339
|
+
displayValue: rawValue,
|
|
340
|
+
filterValue: {
|
|
341
|
+
type: "string",
|
|
342
|
+
value: rawValue
|
|
343
|
+
},
|
|
344
|
+
quoted: true
|
|
345
|
+
}];
|
|
346
|
+
if (kind === "string_list") return [{
|
|
347
|
+
displayValue: rawValue,
|
|
348
|
+
filterValue: {
|
|
349
|
+
type: "string_list",
|
|
350
|
+
value: [rawValue]
|
|
351
|
+
},
|
|
352
|
+
quoted: true
|
|
353
|
+
}];
|
|
354
|
+
if (kind === "enum" || kind === "enum_list") {
|
|
355
|
+
const lower = rawValue.toLowerCase();
|
|
356
|
+
return operator.value.values.filter((item) => item.label.toLowerCase().includes(lower)).map((item) => ({
|
|
357
|
+
displayValue: item.label,
|
|
358
|
+
filterValue: kind === "enum" ? {
|
|
359
|
+
type: "enum",
|
|
360
|
+
value: item.value
|
|
361
|
+
} : {
|
|
362
|
+
type: "enum_list",
|
|
363
|
+
value: [item.value]
|
|
364
|
+
},
|
|
365
|
+
quoted: false
|
|
366
|
+
}));
|
|
367
|
+
}
|
|
368
|
+
return [];
|
|
369
|
+
}
|
|
370
|
+
function browseItems(lookup) {
|
|
371
|
+
const grouped = /* @__PURE__ */ new Map();
|
|
372
|
+
const ungrouped = [];
|
|
373
|
+
for (const field of lookup.getVisibleFields()) {
|
|
374
|
+
const operator = lookup.getDefaultOperator(field.key);
|
|
375
|
+
const item = {
|
|
376
|
+
id: field.key,
|
|
377
|
+
label: field.label,
|
|
378
|
+
description: field.description,
|
|
379
|
+
auxiliaryData: {
|
|
380
|
+
fieldKey: field.key,
|
|
381
|
+
operatorKey: operator?.key,
|
|
382
|
+
group: field.group
|
|
383
|
+
}
|
|
384
|
+
};
|
|
385
|
+
if (field.group) {
|
|
386
|
+
const bucket = grouped.get(field.group) ?? [];
|
|
387
|
+
bucket.push(item);
|
|
388
|
+
grouped.set(field.group, bucket);
|
|
389
|
+
} else ungrouped.push(item);
|
|
390
|
+
}
|
|
391
|
+
const ordered = [...ungrouped];
|
|
392
|
+
for (const items of grouped.values()) ordered.push(...items);
|
|
393
|
+
return ordered.slice(0, MAX_BROWSE_ITEMS);
|
|
394
|
+
}
|
|
395
|
+
function searchPowerSearchFields(lookup, query, messages, maxTypedResults) {
|
|
396
|
+
const trimmed = query.trim();
|
|
397
|
+
if (trimmed === "") return browseItems(lookup);
|
|
398
|
+
const lower = trimmed.toLowerCase();
|
|
399
|
+
const results = [];
|
|
400
|
+
const seen = /* @__PURE__ */ new Set();
|
|
401
|
+
const labelOf = (operator) => resolveOperatorLabel(operator, messages);
|
|
402
|
+
for (const field of lookup.getVisibleFields()) {
|
|
403
|
+
if (field.typeaheadMinQueryLength != null && lower.length < field.typeaheadMinQueryLength) continue;
|
|
404
|
+
if ((field.label.toLowerCase().includes(lower) || field.typeaheadAliases?.some((alias) => alias.toLowerCase().includes(lower)) === true) && !seen.has(field.key)) {
|
|
405
|
+
seen.add(field.key);
|
|
406
|
+
const operator = lookup.getDefaultOperator(field.key);
|
|
407
|
+
results.push({
|
|
408
|
+
id: field.key,
|
|
409
|
+
label: field.label,
|
|
410
|
+
description: field.description,
|
|
411
|
+
auxiliaryData: {
|
|
412
|
+
fieldKey: field.key,
|
|
413
|
+
operatorKey: operator?.key,
|
|
414
|
+
group: field.group
|
|
415
|
+
}
|
|
416
|
+
});
|
|
417
|
+
}
|
|
418
|
+
for (const operator of field.operators) {
|
|
419
|
+
const combined = `${field.label} ${labelOf(operator)}`.toLowerCase();
|
|
420
|
+
const id = `${field.key}:${operator.key}`;
|
|
421
|
+
if (combined.includes(lower) && !seen.has(id)) {
|
|
422
|
+
seen.add(id);
|
|
423
|
+
results.push({
|
|
424
|
+
id,
|
|
425
|
+
label: `${field.label} ${labelOf(operator)}`,
|
|
426
|
+
description: field.description,
|
|
427
|
+
auxiliaryData: {
|
|
428
|
+
fieldKey: field.key,
|
|
429
|
+
operatorKey: operator.key,
|
|
430
|
+
group: field.group
|
|
431
|
+
}
|
|
432
|
+
});
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
for (const field of lookup.getVisibleFields()) {
|
|
437
|
+
if (field.isValueMatchAllowed === false) continue;
|
|
438
|
+
const fieldLabel = field.label.toLowerCase();
|
|
439
|
+
let exactOperator = false;
|
|
440
|
+
for (const operator of field.operators) {
|
|
441
|
+
const prefix = `${fieldLabel} ${labelOf(operator).toLowerCase()} `;
|
|
442
|
+
if (!lower.startsWith(prefix) || lower.length <= prefix.length) continue;
|
|
443
|
+
const matches = resolveValueMatches(operator, trimmed.slice(prefix.length));
|
|
444
|
+
if (matches.length > 0) exactOperator = true;
|
|
445
|
+
for (const match of matches) {
|
|
446
|
+
const id = `${field.key}:${operator.key}:value:${match.displayValue}`;
|
|
447
|
+
if (seen.has(id)) continue;
|
|
448
|
+
seen.add(id);
|
|
449
|
+
const shown = match.quoted ? `"${match.displayValue}"` : match.displayValue;
|
|
450
|
+
results.push({
|
|
451
|
+
id,
|
|
452
|
+
label: `${field.label} ${labelOf(operator)} ${shown}`,
|
|
453
|
+
auxiliaryData: {
|
|
454
|
+
fieldKey: field.key,
|
|
455
|
+
operatorKey: operator.key,
|
|
456
|
+
filterValue: match.filterValue
|
|
457
|
+
}
|
|
458
|
+
});
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
const fieldPrefix = `${fieldLabel} `;
|
|
462
|
+
if (!exactOperator && lower.startsWith(fieldPrefix) && lower.length > fieldPrefix.length) {
|
|
463
|
+
const remainder = lower.slice(fieldPrefix.length);
|
|
464
|
+
if (!field.operators.some((operator) => labelOf(operator).toLowerCase().startsWith(remainder))) {
|
|
465
|
+
const rawValue = trimmed.slice(fieldPrefix.length);
|
|
466
|
+
for (const operator of field.operators) for (const match of resolveValueMatches(operator, rawValue)) {
|
|
467
|
+
const id = `${field.key}:${operator.key}:value:${match.displayValue}`;
|
|
468
|
+
if (seen.has(id)) continue;
|
|
469
|
+
seen.add(id);
|
|
470
|
+
const shown = match.quoted ? `"${match.displayValue}"` : match.displayValue;
|
|
471
|
+
results.push({
|
|
472
|
+
id,
|
|
473
|
+
label: `${field.label} ${labelOf(operator)} ${shown}`,
|
|
474
|
+
auxiliaryData: {
|
|
475
|
+
fieldKey: field.key,
|
|
476
|
+
operatorKey: operator.key,
|
|
477
|
+
filterValue: match.filterValue
|
|
478
|
+
}
|
|
479
|
+
});
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
const contentKey = lookup.config.contentSearchFieldKey;
|
|
485
|
+
const exact = lookup.getVisibleFields().some((field) => field.label.toLowerCase() === lower || field.operators.some((operator) => `${field.label} ${labelOf(operator)}`.toLowerCase() === lower));
|
|
486
|
+
if (contentKey && !exact) {
|
|
487
|
+
const field = lookup.getField(contentKey);
|
|
488
|
+
const operator = lookup.getDefaultOperator(contentKey);
|
|
489
|
+
if (field && operator) results.unshift({
|
|
490
|
+
id: `__content_search__:${trimmed}`,
|
|
491
|
+
label: `"${trimmed}"`,
|
|
492
|
+
auxiliaryData: {
|
|
493
|
+
fieldKey: contentKey,
|
|
494
|
+
operatorKey: operator.key,
|
|
495
|
+
filterValue: {
|
|
496
|
+
type: "string",
|
|
497
|
+
value: trimmed
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
});
|
|
501
|
+
}
|
|
502
|
+
return results.slice(0, maxTypedResults);
|
|
503
|
+
}
|
|
504
|
+
//#endregion
|
|
264
505
|
//#region src/PowerSearch/range.ts
|
|
265
506
|
const SECONDS_BY_UNIT = {
|
|
266
507
|
second: 1,
|
|
@@ -354,7 +595,7 @@ function absoluteRange(start, end) {
|
|
|
354
595
|
}
|
|
355
596
|
//#endregion
|
|
356
597
|
//#region src/PowerSearch/PowerSearchValueField.vue
|
|
357
|
-
const _hoisted_1$
|
|
598
|
+
const _hoisted_1$3 = {
|
|
358
599
|
key: 7,
|
|
359
600
|
class: "astryx-power-search-value__stack"
|
|
360
601
|
};
|
|
@@ -364,7 +605,7 @@ const _hoisted_2$3 = {
|
|
|
364
605
|
};
|
|
365
606
|
const _hoisted_3$3 = ["aria-label"];
|
|
366
607
|
const _hoisted_4$2 = ["disabled", "onClick"];
|
|
367
|
-
const _sfc_main$
|
|
608
|
+
const _sfc_main$3 = /*@__PURE__*/ defineComponent({
|
|
368
609
|
name: "AstryxPowerSearchValueField",
|
|
369
610
|
__name: "PowerSearchValueField",
|
|
370
611
|
props: {
|
|
@@ -380,6 +621,27 @@ const _sfc_main$4 = /*@__PURE__*/ defineComponent({
|
|
|
380
621
|
const props = __props;
|
|
381
622
|
const emit = __emit;
|
|
382
623
|
const text = computed(() => props.messages.value);
|
|
624
|
+
const locale = useAstryxLocale();
|
|
625
|
+
const numberDecision = ref(null);
|
|
626
|
+
function rememberNumberDraft(event) {
|
|
627
|
+
const target = event.target;
|
|
628
|
+
const operator = props.operatorValue;
|
|
629
|
+
if (!(target instanceof HTMLInputElement) || target.getAttribute("role") !== "spinbutton") return;
|
|
630
|
+
if (operator.type !== "integer" && operator.type !== "float") return;
|
|
631
|
+
numberDecision.value = resolveNumberInputCommit(target.value, {
|
|
632
|
+
min: operator.minValue,
|
|
633
|
+
max: operator.maxValue,
|
|
634
|
+
isIntegerOnly: operator.type === "integer",
|
|
635
|
+
locale: locale.value,
|
|
636
|
+
hasClear: false
|
|
637
|
+
});
|
|
638
|
+
}
|
|
639
|
+
function onNumberKeydown(event) {
|
|
640
|
+
if (event.key !== "Enter" || event.isComposing) return;
|
|
641
|
+
const decision = numberDecision.value;
|
|
642
|
+
numberDecision.value = null;
|
|
643
|
+
if (decision != null && decision.type !== "commit") event.stopPropagation();
|
|
644
|
+
}
|
|
383
645
|
const stringValue = computed(() => props.filterValue?.type === "string" ? props.filterValue.value : "");
|
|
384
646
|
const numberValue = computed(() => props.filterValue?.type === "integer" || props.filterValue?.type === "float" ? props.filterValue.value : null);
|
|
385
647
|
const timeValue = computed(() => props.filterValue?.type === "time" ? props.filterValue.value : null);
|
|
@@ -593,8 +855,12 @@ const _sfc_main$4 = /*@__PURE__*/ defineComponent({
|
|
|
593
855
|
"disabled",
|
|
594
856
|
"creatable",
|
|
595
857
|
"max-menu-items"
|
|
596
|
-
])) : __props.operatorValue.type === "integer" || __props.operatorValue.type === "float" ? (openBlock(),
|
|
597
|
-
|
|
858
|
+
])) : __props.operatorValue.type === "integer" || __props.operatorValue.type === "float" ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [createCommentVNode(" eslint-disable-next-line vue-a11y/no-static-element-interactions -- 只听里面数字框冒上来的输入和回车,自己不是控件。 "), createElementVNode("div", {
|
|
859
|
+
class: "astryx-power-search-value",
|
|
860
|
+
onFocusin: _cache[3] || (_cache[3] = ($event) => numberDecision.value = null),
|
|
861
|
+
onInput: rememberNumberDraft,
|
|
862
|
+
onKeydown: onNumberKeydown
|
|
863
|
+
}, [createVNode(_sfc_main$14, {
|
|
598
864
|
label: text.value.value,
|
|
599
865
|
"is-label-hidden": "",
|
|
600
866
|
"model-value": numberValue.value,
|
|
@@ -617,7 +883,7 @@ const _sfc_main$4 = /*@__PURE__*/ defineComponent({
|
|
|
617
883
|
"max",
|
|
618
884
|
"step",
|
|
619
885
|
"units"
|
|
620
|
-
])) : __props.operatorValue.type === "time" ? (openBlock(), createBlock(_sfc_main$17, {
|
|
886
|
+
])], 32)], 2112)) : __props.operatorValue.type === "time" ? (openBlock(), createBlock(_sfc_main$17, {
|
|
621
887
|
key: 4,
|
|
622
888
|
label: text.value.time,
|
|
623
889
|
"is-label-hidden": "",
|
|
@@ -654,7 +920,7 @@ const _sfc_main$4 = /*@__PURE__*/ defineComponent({
|
|
|
654
920
|
"label",
|
|
655
921
|
"model-value",
|
|
656
922
|
"is-disabled"
|
|
657
|
-
])) : __props.operatorValue.type === "date_relative" ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
923
|
+
])) : __props.operatorValue.type === "date_relative" ? (openBlock(), createElementBlock("div", _hoisted_1$3, [relativeOptions.value.length > 0 ? (openBlock(), createBlock(_sfc_main$15, {
|
|
658
924
|
key: 0,
|
|
659
925
|
label: text.value.relativeDate,
|
|
660
926
|
"is-label-hidden": "",
|
|
@@ -662,7 +928,7 @@ const _sfc_main$4 = /*@__PURE__*/ defineComponent({
|
|
|
662
928
|
"model-value": relativeValue.value,
|
|
663
929
|
placeholder: text.value.selectPlaceholder,
|
|
664
930
|
disabled: __props.disabled,
|
|
665
|
-
"onUpdate:modelValue": _cache[
|
|
931
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = (value) => emit("change", {
|
|
666
932
|
type: "date_relative",
|
|
667
933
|
value: String(value ?? "")
|
|
668
934
|
}, true))
|
|
@@ -678,7 +944,7 @@ const _sfc_main$4 = /*@__PURE__*/ defineComponent({
|
|
|
678
944
|
"model-value": relativeValue.value,
|
|
679
945
|
placeholder: text.value.enterValuePlaceholder,
|
|
680
946
|
disabled: __props.disabled,
|
|
681
|
-
"onUpdate:modelValue": _cache[
|
|
947
|
+
"onUpdate:modelValue": _cache[5] || (_cache[5] = (value) => emit("change", {
|
|
682
948
|
type: "date_relative",
|
|
683
949
|
value: String(value ?? "")
|
|
684
950
|
}))
|
|
@@ -718,7 +984,7 @@ const _sfc_main$4 = /*@__PURE__*/ defineComponent({
|
|
|
718
984
|
"model-value": enumValue.value,
|
|
719
985
|
placeholder: text.value.selectPlaceholder,
|
|
720
986
|
disabled: __props.disabled,
|
|
721
|
-
"onUpdate:modelValue": _cache[
|
|
987
|
+
"onUpdate:modelValue": _cache[6] || (_cache[6] = (value) => emit("change", {
|
|
722
988
|
type: "enum",
|
|
723
989
|
value: String(value ?? "")
|
|
724
990
|
}, true))
|
|
@@ -736,7 +1002,7 @@ const _sfc_main$4 = /*@__PURE__*/ defineComponent({
|
|
|
736
1002
|
"model-value": enumList.value,
|
|
737
1003
|
placeholder: text.value.selectValuesPlaceholder,
|
|
738
1004
|
disabled: __props.disabled,
|
|
739
|
-
"onUpdate:modelValue": _cache[
|
|
1005
|
+
"onUpdate:modelValue": _cache[7] || (_cache[7] = (value) => emit("change", {
|
|
740
1006
|
type: "enum_list",
|
|
741
1007
|
value: value.map(String)
|
|
742
1008
|
}))
|
|
@@ -786,10 +1052,10 @@ const _sfc_main$4 = /*@__PURE__*/ defineComponent({
|
|
|
786
1052
|
});
|
|
787
1053
|
//#endregion
|
|
788
1054
|
//#region src/PowerSearch/PowerSearchNestedRows.vue
|
|
789
|
-
const _hoisted_1$
|
|
1055
|
+
const _hoisted_1$2 = { class: "astryx-power-search-nested" };
|
|
790
1056
|
const _hoisted_2$2 = { class: "astryx-power-search-editor-row" };
|
|
791
1057
|
const _hoisted_3$2 = ["aria-label", "onClick"];
|
|
792
|
-
const _sfc_main$
|
|
1058
|
+
const _sfc_main$2 = /*@__PURE__*/ defineComponent({
|
|
793
1059
|
name: "AstryxPowerSearchNestedRows",
|
|
794
1060
|
__name: "PowerSearchNestedRows",
|
|
795
1061
|
props: {
|
|
@@ -880,7 +1146,7 @@ const _sfc_main$3 = /*@__PURE__*/ defineComponent({
|
|
|
880
1146
|
}
|
|
881
1147
|
return (_ctx, _cache) => {
|
|
882
1148
|
const _component_PowerSearchNestedRows = resolveComponent("PowerSearchNestedRows", true);
|
|
883
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
1149
|
+
return openBlock(), createElementBlock("div", _hoisted_1$2, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.modelValue, (row, index) => {
|
|
884
1150
|
return openBlock(), createElementBlock("div", {
|
|
885
1151
|
key: `${row.field}-${index}`,
|
|
886
1152
|
class: "astryx-power-search-nested-row"
|
|
@@ -914,7 +1180,7 @@ const _sfc_main$3 = /*@__PURE__*/ defineComponent({
|
|
|
914
1180
|
"disabled",
|
|
915
1181
|
"onUpdate:modelValue"
|
|
916
1182
|
])) : createCommentVNode("v-if", true),
|
|
917
|
-
operatorOf(row) && operatorOf(row)?.value.type !== "empty" && operatorOf(row)?.value.type !== "nested" ? (openBlock(), createBlock(_sfc_main$
|
|
1183
|
+
operatorOf(row) && operatorOf(row)?.value.type !== "empty" && operatorOf(row)?.value.type !== "nested" ? (openBlock(), createBlock(_sfc_main$3, {
|
|
918
1184
|
key: `${row.field}:${row.operator ?? ""}`,
|
|
919
1185
|
"operator-value": operatorOf(row).value,
|
|
920
1186
|
"filter-value": row.value,
|
|
@@ -970,7 +1236,7 @@ const _sfc_main$3 = /*@__PURE__*/ defineComponent({
|
|
|
970
1236
|
});
|
|
971
1237
|
//#endregion
|
|
972
1238
|
//#region src/PowerSearch/PowerSearchEditor.vue
|
|
973
|
-
const _hoisted_1$
|
|
1239
|
+
const _hoisted_1$1 = ["aria-label"];
|
|
974
1240
|
const _hoisted_2$1 = { class: "astryx-power-search-editor-row" };
|
|
975
1241
|
const _hoisted_3$1 = {
|
|
976
1242
|
key: 0,
|
|
@@ -984,7 +1250,7 @@ const _hoisted_5$1 = {
|
|
|
984
1250
|
const _hoisted_6$1 = { key: 1 };
|
|
985
1251
|
const _hoisted_7$1 = { class: "astryx-power-search-editor-actions" };
|
|
986
1252
|
const focusable = "input:not([disabled]), button:not([disabled]), textarea:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
987
|
-
const _sfc_main$
|
|
1253
|
+
const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
988
1254
|
name: "AstryxPowerSearchEditor",
|
|
989
1255
|
__name: "PowerSearchEditor",
|
|
990
1256
|
props: {
|
|
@@ -1144,7 +1410,7 @@ const _sfc_main$2 = /*@__PURE__*/ defineComponent({
|
|
|
1144
1410
|
ref_key: "valueRoot",
|
|
1145
1411
|
ref: valueRoot,
|
|
1146
1412
|
class: "astryx-power-search-editor-value"
|
|
1147
|
-
}, [(openBlock(), createBlock(_sfc_main$
|
|
1413
|
+
}, [(openBlock(), createBlock(_sfc_main$3, {
|
|
1148
1414
|
key: `${fieldKey.value}:${operatorKey.value}`,
|
|
1149
1415
|
"operator-value": operatorValue.value,
|
|
1150
1416
|
"filter-value": draft.value,
|
|
@@ -1162,7 +1428,7 @@ const _sfc_main$2 = /*@__PURE__*/ defineComponent({
|
|
|
1162
1428
|
"max-menu-items"
|
|
1163
1429
|
]))], 512)) : createCommentVNode("v-if", true)
|
|
1164
1430
|
]),
|
|
1165
|
-
operatorValue.value?.type === "nested" ? (openBlock(), createElementBlock("div", _hoisted_3$1, [createElementVNode("div", _hoisted_4$1, toDisplayString(text.value.editor.group), 1), createVNode(_sfc_main$
|
|
1431
|
+
operatorValue.value?.type === "nested" ? (openBlock(), createElementBlock("div", _hoisted_3$1, [createElementVNode("div", _hoisted_4$1, toDisplayString(text.value.editor.group), 1), createVNode(_sfc_main$2, {
|
|
1166
1432
|
config: __props.config,
|
|
1167
1433
|
"model-value": children.value,
|
|
1168
1434
|
disabled: __props.readOnly,
|
|
@@ -1194,229 +1460,273 @@ const _sfc_main$2 = /*@__PURE__*/ defineComponent({
|
|
|
1194
1460
|
"is-disabled": completed.value == null,
|
|
1195
1461
|
onClick: save
|
|
1196
1462
|
}, null, 8, ["label", "is-disabled"])])])) : createCommentVNode("v-if", true)
|
|
1197
|
-
], 40, _hoisted_1$
|
|
1463
|
+
], 40, _hoisted_1$1)], 2112);
|
|
1198
1464
|
};
|
|
1199
1465
|
}
|
|
1200
1466
|
});
|
|
1201
1467
|
//#endregion
|
|
1202
|
-
//#region src/PowerSearch/
|
|
1203
|
-
|
|
1204
|
-
const
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
props
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
emits: ["activate", "remove"],
|
|
1220
|
-
setup(__props, { emit: __emit }) {
|
|
1221
|
-
const props = __props;
|
|
1222
|
-
const emit = __emit;
|
|
1223
|
-
const operatorLabel = computed(() => resolveOperatorLabel(props.operator, props.messages));
|
|
1224
|
-
const tokenLabel = computed(() => `${props.fieldLabel}: ${operatorLabel.value}`);
|
|
1225
|
-
const valueText = computed(() => {
|
|
1226
|
-
const room = Math.max(props.maxLength - props.fieldLabel.length - operatorLabel.value.length, 10);
|
|
1227
|
-
return formatFilterValue(props.operator.value, props.filter.value, room, props.messages, props.locale, props.timeZone);
|
|
1228
|
-
});
|
|
1229
|
-
return (_ctx, _cache) => {
|
|
1230
|
-
return openBlock(), createBlock(_sfc_main$12, {
|
|
1231
|
-
label: tokenLabel.value,
|
|
1232
|
-
size: __props.size,
|
|
1233
|
-
disabled: __props.disabled,
|
|
1234
|
-
removable: __props.removable,
|
|
1235
|
-
onClick: _cache[0] || (_cache[0] = ($event) => emit("activate")),
|
|
1236
|
-
onRemove: _cache[1] || (_cache[1] = ($event) => emit("remove"))
|
|
1237
|
-
}, createSlots({ _: 2 }, [valueText.value ? {
|
|
1238
|
-
name: "end",
|
|
1239
|
-
fn: withCtx(() => [createElementVNode("span", _hoisted_1$1, toDisplayString(valueText.value), 1)]),
|
|
1240
|
-
key: "0"
|
|
1241
|
-
} : void 0]), 1032, [
|
|
1242
|
-
"label",
|
|
1243
|
-
"size",
|
|
1244
|
-
"disabled",
|
|
1245
|
-
"removable"
|
|
1246
|
-
]);
|
|
1468
|
+
//#region src/PowerSearch/usePowerSearchActions.ts
|
|
1469
|
+
function usePowerSearchActions(options) {
|
|
1470
|
+
const { props, emit, menu, lookup, text, announce } = options;
|
|
1471
|
+
const gutter = useLayerGutter();
|
|
1472
|
+
const internal = ref([]);
|
|
1473
|
+
const filters = computed(() => props.filters ?? internal.value);
|
|
1474
|
+
const session = ref(null);
|
|
1475
|
+
const openingControl = ref(null);
|
|
1476
|
+
const editorOpen = computed(() => session.value != null);
|
|
1477
|
+
const tokenEls = /* @__PURE__ */ new Map();
|
|
1478
|
+
const editorStyle = computed(() => {
|
|
1479
|
+
const place = session.value?.placement;
|
|
1480
|
+
if (place == null) return void 0;
|
|
1481
|
+
return {
|
|
1482
|
+
top: `${place.top}px`,
|
|
1483
|
+
left: `${place.left}px`,
|
|
1484
|
+
width: `${place.width}px`
|
|
1247
1485
|
};
|
|
1486
|
+
});
|
|
1487
|
+
const editorComponent = computed(() => {
|
|
1488
|
+
const filter = session.value?.filter;
|
|
1489
|
+
if (filter?.operator == null) return _sfc_main$1;
|
|
1490
|
+
const type = lookup.value.getOperator(filter.field, filter.operator)?.value.type;
|
|
1491
|
+
return (type ? props.components?.[type]?.editor : void 0) ?? _sfc_main$1;
|
|
1492
|
+
});
|
|
1493
|
+
function commit(next, changeType, index) {
|
|
1494
|
+
internal.value = next;
|
|
1495
|
+
emit("update:filters", next);
|
|
1496
|
+
emit("change", next, changeType, index);
|
|
1248
1497
|
}
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1498
|
+
function operatorFor(filter) {
|
|
1499
|
+
return lookup.value.getOperator(filter.field, filter.operator);
|
|
1500
|
+
}
|
|
1501
|
+
function fieldFor(filter) {
|
|
1502
|
+
return lookup.value.getField(filter.field);
|
|
1503
|
+
}
|
|
1504
|
+
function emptyEditorOverridden(components) {
|
|
1505
|
+
return Boolean(components?.empty?.editor || options.hasCustomEditor());
|
|
1506
|
+
}
|
|
1507
|
+
function canEdit(filter) {
|
|
1508
|
+
if (props.disabled || props.readOnly || filter.isReadOnly) return false;
|
|
1509
|
+
const operator = operatorFor(filter);
|
|
1510
|
+
if (operator == null) return false;
|
|
1511
|
+
if (operator.value.type !== "empty") return true;
|
|
1512
|
+
return emptyEditorOverridden(props.components);
|
|
1513
|
+
}
|
|
1514
|
+
function canRemove(filter) {
|
|
1515
|
+
return !props.disabled && !props.readOnly && filter.isReadOnly !== true;
|
|
1516
|
+
}
|
|
1517
|
+
function tokenComponent(filter) {
|
|
1518
|
+
const type = operatorFor(filter)?.value.type;
|
|
1519
|
+
return type ? props.components?.[type]?.token : void 0;
|
|
1520
|
+
}
|
|
1521
|
+
function measure(control) {
|
|
1522
|
+
const outer = options.anchorRef.value;
|
|
1523
|
+
if (outer == null) return null;
|
|
1524
|
+
const target = control ?? outer;
|
|
1525
|
+
const outerRect = outer.getBoundingClientRect();
|
|
1526
|
+
const controlRect = target.getBoundingClientRect();
|
|
1527
|
+
const edges = gutter.value;
|
|
1528
|
+
return resolveEditorPlacement({
|
|
1529
|
+
outer: {
|
|
1530
|
+
left: outerRect.left,
|
|
1531
|
+
right: outerRect.right,
|
|
1532
|
+
width: outerRect.width
|
|
1281
1533
|
},
|
|
1282
|
-
|
|
1283
|
-
|
|
1534
|
+
control: {
|
|
1535
|
+
left: controlRect.left,
|
|
1536
|
+
right: controlRect.right,
|
|
1537
|
+
width: controlRect.width
|
|
1538
|
+
},
|
|
1539
|
+
viewportWidth: window.innerWidth,
|
|
1540
|
+
viewportHeight: window.innerHeight,
|
|
1541
|
+
inlineStart: edges.inlineStart,
|
|
1542
|
+
inlineEnd: edges.inlineEnd,
|
|
1543
|
+
blockInset: edges.blockStart,
|
|
1544
|
+
direction: getComputedStyle(outer).direction === "rtl" ? "rtl" : "ltr",
|
|
1545
|
+
anchorTop: controlRect.top,
|
|
1546
|
+
anchorBottom: controlRect.bottom
|
|
1547
|
+
});
|
|
1284
1548
|
}
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
fieldKey: field.key,
|
|
1298
|
-
operatorKey: operator?.key,
|
|
1299
|
-
group: field.group
|
|
1300
|
-
}
|
|
1549
|
+
function openEditor(mode, filter, index, control) {
|
|
1550
|
+
const placement = measure(control);
|
|
1551
|
+
if (placement == null) return;
|
|
1552
|
+
menu.close();
|
|
1553
|
+
openingControl.value = control;
|
|
1554
|
+
session.value = {
|
|
1555
|
+
mode,
|
|
1556
|
+
index,
|
|
1557
|
+
filter,
|
|
1558
|
+
placement,
|
|
1559
|
+
ready: false,
|
|
1560
|
+
control
|
|
1301
1561
|
};
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
const ordered = [...ungrouped];
|
|
1309
|
-
for (const items of grouped.values()) ordered.push(...items);
|
|
1310
|
-
return ordered.slice(0, MAX_BROWSE_ITEMS);
|
|
1311
|
-
}
|
|
1312
|
-
function searchPowerSearchFields(lookup, query, messages, maxTypedResults) {
|
|
1313
|
-
const trimmed = query.trim();
|
|
1314
|
-
if (trimmed === "") return browseItems(lookup);
|
|
1315
|
-
const lower = trimmed.toLowerCase();
|
|
1316
|
-
const results = [];
|
|
1317
|
-
const seen = /* @__PURE__ */ new Set();
|
|
1318
|
-
const labelOf = (operator) => resolveOperatorLabel(operator, messages);
|
|
1319
|
-
for (const field of lookup.getVisibleFields()) {
|
|
1320
|
-
if (field.typeaheadMinQueryLength != null && lower.length < field.typeaheadMinQueryLength) continue;
|
|
1321
|
-
if ((field.label.toLowerCase().includes(lower) || field.typeaheadAliases?.some((alias) => alias.toLowerCase().includes(lower)) === true) && !seen.has(field.key)) {
|
|
1322
|
-
seen.add(field.key);
|
|
1323
|
-
const operator = lookup.getDefaultOperator(field.key);
|
|
1324
|
-
results.push({
|
|
1325
|
-
id: field.key,
|
|
1326
|
-
label: field.label,
|
|
1327
|
-
description: field.description,
|
|
1328
|
-
auxiliaryData: {
|
|
1329
|
-
fieldKey: field.key,
|
|
1330
|
-
operatorKey: operator?.key,
|
|
1331
|
-
group: field.group
|
|
1332
|
-
}
|
|
1562
|
+
nextTick(() => {
|
|
1563
|
+
requestAnimationFrame(() => {
|
|
1564
|
+
if (session.value) session.value = {
|
|
1565
|
+
...session.value,
|
|
1566
|
+
ready: true
|
|
1567
|
+
};
|
|
1333
1568
|
});
|
|
1334
|
-
}
|
|
1335
|
-
for (const operator of field.operators) {
|
|
1336
|
-
const combined = `${field.label} ${labelOf(operator)}`.toLowerCase();
|
|
1337
|
-
const id = `${field.key}:${operator.key}`;
|
|
1338
|
-
if (combined.includes(lower) && !seen.has(id)) {
|
|
1339
|
-
seen.add(id);
|
|
1340
|
-
results.push({
|
|
1341
|
-
id,
|
|
1342
|
-
label: `${field.label} ${labelOf(operator)}`,
|
|
1343
|
-
description: field.description,
|
|
1344
|
-
auxiliaryData: {
|
|
1345
|
-
fieldKey: field.key,
|
|
1346
|
-
operatorKey: operator.key,
|
|
1347
|
-
group: field.group
|
|
1348
|
-
}
|
|
1349
|
-
});
|
|
1350
|
-
}
|
|
1351
|
-
}
|
|
1569
|
+
});
|
|
1352
1570
|
}
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
if (
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1571
|
+
function closeEditor(restore) {
|
|
1572
|
+
const control = session.value?.control;
|
|
1573
|
+
session.value = null;
|
|
1574
|
+
openingControl.value = null;
|
|
1575
|
+
if (!restore) return;
|
|
1576
|
+
nextTick(() => {
|
|
1577
|
+
if (control instanceof HTMLElement) control.focus();
|
|
1578
|
+
else options.inputRef.value?.focus();
|
|
1579
|
+
});
|
|
1580
|
+
}
|
|
1581
|
+
function focusInput() {
|
|
1582
|
+
nextTick(() => options.inputRef.value?.focus());
|
|
1583
|
+
}
|
|
1584
|
+
function pick(item) {
|
|
1585
|
+
const data = item.auxiliaryData;
|
|
1586
|
+
if (data == null) return;
|
|
1587
|
+
const field = lookup.value.getField(data.fieldKey);
|
|
1588
|
+
const operator = (data.operatorKey ? lookup.value.getOperator(data.fieldKey, data.operatorKey) : void 0) ?? lookup.value.getDefaultOperator(data.fieldKey);
|
|
1589
|
+
if (field == null || operator == null) return;
|
|
1590
|
+
menu.setQuery("");
|
|
1591
|
+
menu.close();
|
|
1592
|
+
if (data.filterValue != null || operator.value.type === "empty") {
|
|
1593
|
+
const value = data.filterValue ?? { type: "empty" };
|
|
1594
|
+
const next = [...filters.value, {
|
|
1595
|
+
field: field.key,
|
|
1596
|
+
operator: operator.key,
|
|
1597
|
+
value
|
|
1598
|
+
}];
|
|
1599
|
+
commit(next, "add", next.length - 1);
|
|
1600
|
+
announce(`${field.label}: ${operator.key}`);
|
|
1601
|
+
focusInput();
|
|
1602
|
+
return;
|
|
1603
|
+
}
|
|
1604
|
+
openEditor("create", {
|
|
1605
|
+
field: field.key,
|
|
1606
|
+
operator: operator.key
|
|
1607
|
+
}, filters.value.length, options.inputRef.value);
|
|
1608
|
+
}
|
|
1609
|
+
function onEditorSave(filter) {
|
|
1610
|
+
const current = session.value;
|
|
1611
|
+
if (current == null) return;
|
|
1612
|
+
if (filter == null) {
|
|
1613
|
+
if (current.mode === "edit") {
|
|
1614
|
+
const dropped = filters.value[current.index];
|
|
1615
|
+
commit(filters.value.filter((_, index) => index !== current.index), "remove", current.index);
|
|
1616
|
+
announce(text.value.removeFilter(dropped ? fieldFor(dropped)?.label ?? dropped.field : ""));
|
|
1376
1617
|
}
|
|
1618
|
+
closeEditor(false);
|
|
1619
|
+
focusInput();
|
|
1620
|
+
return;
|
|
1621
|
+
}
|
|
1622
|
+
if (current.mode === "edit") commit(filters.value.map((item, index) => index === current.index ? filter : item), "edit", current.index);
|
|
1623
|
+
else {
|
|
1624
|
+
const next = [...filters.value, filter];
|
|
1625
|
+
commit(next, "add", next.length - 1);
|
|
1626
|
+
}
|
|
1627
|
+
const field = lookup.value.getField(filter.field);
|
|
1628
|
+
announce(field?.label ?? filter.field);
|
|
1629
|
+
closeEditor(false);
|
|
1630
|
+
focusInput();
|
|
1631
|
+
}
|
|
1632
|
+
function removeAt(index) {
|
|
1633
|
+
const filter = filters.value[index];
|
|
1634
|
+
if (filter == null || !canRemove(filter)) return;
|
|
1635
|
+
commit(filters.value.filter((_, itemIndex) => itemIndex !== index), "remove", index);
|
|
1636
|
+
announce(text.value.removeFilter(fieldFor(filter)?.label ?? filter.field));
|
|
1637
|
+
focusInput();
|
|
1638
|
+
}
|
|
1639
|
+
function clearAll(event) {
|
|
1640
|
+
event?.stopPropagation();
|
|
1641
|
+
if (props.disabled || filters.value.length === 0) return;
|
|
1642
|
+
commit([], "remove", 0);
|
|
1643
|
+
announce(text.value.clear);
|
|
1644
|
+
menu.close();
|
|
1645
|
+
options.inputRef.value?.focus();
|
|
1646
|
+
}
|
|
1647
|
+
function activate(index) {
|
|
1648
|
+
const filter = filters.value[index];
|
|
1649
|
+
if (filter == null || props.disabled || props.readOnly || filter.isReadOnly) return;
|
|
1650
|
+
if (operatorFor(filter)?.value.type === "empty" && !emptyEditorOverridden(props.components)) {
|
|
1651
|
+
commit(filters.value.map((item, itemIndex) => itemIndex === index ? {
|
|
1652
|
+
field: item.field,
|
|
1653
|
+
operator: item.operator,
|
|
1654
|
+
value: { type: "empty" },
|
|
1655
|
+
isReadOnly: item.isReadOnly
|
|
1656
|
+
} : item), "edit", index);
|
|
1657
|
+
return;
|
|
1658
|
+
}
|
|
1659
|
+
if (!canEdit(filter)) return;
|
|
1660
|
+
openEditor("edit", filter, index, tokenEls.get(index) ?? null);
|
|
1661
|
+
}
|
|
1662
|
+
function setTokenEl(index, element) {
|
|
1663
|
+
if (element instanceof HTMLElement) tokenEls.set(index, element);
|
|
1664
|
+
else tokenEls.delete(index);
|
|
1665
|
+
}
|
|
1666
|
+
function focusToken(index) {
|
|
1667
|
+
nextTick(() => tokenEls.get(index)?.focus());
|
|
1668
|
+
}
|
|
1669
|
+
function onInput(event) {
|
|
1670
|
+
if (props.disabled || props.readOnly) return;
|
|
1671
|
+
menu.setQuery(event.target.value);
|
|
1672
|
+
}
|
|
1673
|
+
function onInputKeyDown(event) {
|
|
1674
|
+
if (session.value != null) return;
|
|
1675
|
+
const input = options.inputRef.value;
|
|
1676
|
+
if (event.key === "Backspace" && menu.query.value === "" && filters.value.length > 0 && canRemove(filters.value[filters.value.length - 1])) {
|
|
1677
|
+
event.preventDefault();
|
|
1678
|
+
removeAt(filters.value.length - 1);
|
|
1679
|
+
return;
|
|
1377
1680
|
}
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
const rawValue = trimmed.slice(fieldPrefix.length);
|
|
1383
|
-
for (const operator of field.operators) for (const match of resolveValueMatches(operator, rawValue)) {
|
|
1384
|
-
const id = `${field.key}:${operator.key}:value:${match.displayValue}`;
|
|
1385
|
-
if (seen.has(id)) continue;
|
|
1386
|
-
seen.add(id);
|
|
1387
|
-
const shown = match.quoted ? `"${match.displayValue}"` : match.displayValue;
|
|
1388
|
-
results.push({
|
|
1389
|
-
id,
|
|
1390
|
-
label: `${field.label} ${labelOf(operator)} ${shown}`,
|
|
1391
|
-
auxiliaryData: {
|
|
1392
|
-
fieldKey: field.key,
|
|
1393
|
-
operatorKey: operator.key,
|
|
1394
|
-
filterValue: match.filterValue
|
|
1395
|
-
}
|
|
1396
|
-
});
|
|
1397
|
-
}
|
|
1398
|
-
}
|
|
1681
|
+
if (event.key === "ArrowLeft" && input && input.selectionStart === 0 && input.selectionEnd === 0 && filters.value.length > 0) {
|
|
1682
|
+
event.preventDefault();
|
|
1683
|
+
focusToken(Math.min(options.visibleCount(), filters.value.length) - 1);
|
|
1684
|
+
return;
|
|
1399
1685
|
}
|
|
1686
|
+
if (event.key === "ArrowRight" && input && menu.query.value === "" && input.selectionStart === 0) return;
|
|
1687
|
+
menu.onKeyDown(event);
|
|
1400
1688
|
}
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
if (
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1689
|
+
function onTokenKeyDown(event, index) {
|
|
1690
|
+
const shown = options.visibleCount();
|
|
1691
|
+
if (event.key === "ArrowLeft" && index > 0) {
|
|
1692
|
+
event.preventDefault();
|
|
1693
|
+
focusToken(index - 1);
|
|
1694
|
+
} else if (event.key === "ArrowRight") {
|
|
1695
|
+
event.preventDefault();
|
|
1696
|
+
if (index < shown - 1) focusToken(index + 1);
|
|
1697
|
+
else options.inputRef.value?.focus();
|
|
1698
|
+
} else if (event.key === "Escape") options.inputRef.value?.focus();
|
|
1699
|
+
else if ((event.key === "Backspace" || event.key === "Delete") && canRemove(filters.value[index])) {
|
|
1700
|
+
event.preventDefault();
|
|
1701
|
+
removeAt(index);
|
|
1702
|
+
if (index > 0) focusToken(index - 1);
|
|
1703
|
+
} else if (event.key === "Enter") {
|
|
1704
|
+
event.preventDefault();
|
|
1705
|
+
activate(index);
|
|
1706
|
+
}
|
|
1418
1707
|
}
|
|
1419
|
-
return
|
|
1708
|
+
return {
|
|
1709
|
+
activate,
|
|
1710
|
+
canRemove,
|
|
1711
|
+
clearAll,
|
|
1712
|
+
closeEditor,
|
|
1713
|
+
editorComponent,
|
|
1714
|
+
editorOpen,
|
|
1715
|
+
editorStyle,
|
|
1716
|
+
fieldFor,
|
|
1717
|
+
filters,
|
|
1718
|
+
onEditorSave,
|
|
1719
|
+
onInput,
|
|
1720
|
+
onInputKeyDown,
|
|
1721
|
+
onTokenKeyDown,
|
|
1722
|
+
openingControl,
|
|
1723
|
+
operatorFor,
|
|
1724
|
+
pick,
|
|
1725
|
+
removeAt,
|
|
1726
|
+
session,
|
|
1727
|
+
setTokenEl,
|
|
1728
|
+
tokenComponent
|
|
1729
|
+
};
|
|
1420
1730
|
}
|
|
1421
1731
|
//#endregion
|
|
1422
1732
|
//#region src/PowerSearch/PowerSearch.vue
|
|
@@ -1435,12 +1745,14 @@ const _hoisted_4 = {
|
|
|
1435
1745
|
class: "astryx-power-search-more"
|
|
1436
1746
|
};
|
|
1437
1747
|
const _hoisted_5 = [
|
|
1748
|
+
"id",
|
|
1438
1749
|
"placeholder",
|
|
1439
1750
|
"value",
|
|
1440
1751
|
"disabled",
|
|
1441
1752
|
"readonly",
|
|
1442
1753
|
"aria-disabled",
|
|
1443
1754
|
"aria-expanded",
|
|
1755
|
+
"aria-controls",
|
|
1444
1756
|
"aria-activedescendant",
|
|
1445
1757
|
"aria-describedby"
|
|
1446
1758
|
];
|
|
@@ -1449,42 +1761,47 @@ const _hoisted_6 = {
|
|
|
1449
1761
|
class: "astryx-power-search-count"
|
|
1450
1762
|
};
|
|
1451
1763
|
const _hoisted_7 = ["aria-label"];
|
|
1452
|
-
const _hoisted_8 =
|
|
1764
|
+
const _hoisted_8 = ["id"];
|
|
1765
|
+
const _hoisted_9 = {
|
|
1453
1766
|
class: "astryx-visually-hidden",
|
|
1454
1767
|
"aria-live": "polite"
|
|
1455
1768
|
};
|
|
1456
|
-
const
|
|
1457
|
-
|
|
1769
|
+
const _hoisted_10 = [
|
|
1770
|
+
"id",
|
|
1771
|
+
"aria-label",
|
|
1772
|
+
"data-placement"
|
|
1773
|
+
];
|
|
1774
|
+
const _hoisted_11 = {
|
|
1458
1775
|
class: "astryx-typeahead-menu",
|
|
1459
1776
|
role: "presentation"
|
|
1460
1777
|
};
|
|
1461
|
-
const
|
|
1778
|
+
const _hoisted_12 = {
|
|
1462
1779
|
key: 0,
|
|
1463
1780
|
class: "astryx-typeahead-state"
|
|
1464
1781
|
};
|
|
1465
|
-
const
|
|
1782
|
+
const _hoisted_13 = {
|
|
1466
1783
|
key: 1,
|
|
1467
1784
|
class: "astryx-typeahead-options",
|
|
1468
1785
|
role: "presentation"
|
|
1469
1786
|
};
|
|
1470
|
-
const
|
|
1787
|
+
const _hoisted_14 = {
|
|
1471
1788
|
key: 0,
|
|
1472
1789
|
class: "astryx-power-search-menu-group"
|
|
1473
1790
|
};
|
|
1474
|
-
const
|
|
1791
|
+
const _hoisted_15 = [
|
|
1475
1792
|
"id",
|
|
1476
1793
|
"aria-selected",
|
|
1477
1794
|
"data-option-id",
|
|
1478
1795
|
"onMouseenter",
|
|
1479
1796
|
"onClick"
|
|
1480
1797
|
];
|
|
1481
|
-
const
|
|
1482
|
-
const
|
|
1483
|
-
const
|
|
1798
|
+
const _hoisted_16 = { class: "astryx-typeahead-option-copy" };
|
|
1799
|
+
const _hoisted_17 = { class: "astryx-typeahead-option-label" };
|
|
1800
|
+
const _hoisted_18 = {
|
|
1484
1801
|
key: 0,
|
|
1485
1802
|
class: "astryx-typeahead-option-description"
|
|
1486
1803
|
};
|
|
1487
|
-
const
|
|
1804
|
+
const _hoisted_19 = ["data-ready"];
|
|
1488
1805
|
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
1489
1806
|
name: "AstryxPowerSearch",
|
|
1490
1807
|
inheritAttrs: false,
|
|
@@ -1493,6 +1810,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
1493
1810
|
config: {},
|
|
1494
1811
|
filters: {},
|
|
1495
1812
|
label: {},
|
|
1813
|
+
isLabelHidden: { type: Boolean },
|
|
1496
1814
|
labelHidden: {
|
|
1497
1815
|
type: Boolean,
|
|
1498
1816
|
default: true
|
|
@@ -1531,7 +1849,35 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
1531
1849
|
overflow: { default: "none" },
|
|
1532
1850
|
resultCount: {},
|
|
1533
1851
|
size: { default: "md" },
|
|
1534
|
-
components: {}
|
|
1852
|
+
components: {},
|
|
1853
|
+
containerClass: { type: [
|
|
1854
|
+
Boolean,
|
|
1855
|
+
null,
|
|
1856
|
+
String,
|
|
1857
|
+
Object,
|
|
1858
|
+
Array
|
|
1859
|
+
] },
|
|
1860
|
+
containerStyle: { type: [
|
|
1861
|
+
Boolean,
|
|
1862
|
+
null,
|
|
1863
|
+
String,
|
|
1864
|
+
Object,
|
|
1865
|
+
Array
|
|
1866
|
+
] },
|
|
1867
|
+
controlClass: { type: [
|
|
1868
|
+
Boolean,
|
|
1869
|
+
null,
|
|
1870
|
+
String,
|
|
1871
|
+
Object,
|
|
1872
|
+
Array
|
|
1873
|
+
] },
|
|
1874
|
+
controlStyle: { type: [
|
|
1875
|
+
Boolean,
|
|
1876
|
+
null,
|
|
1877
|
+
String,
|
|
1878
|
+
Object,
|
|
1879
|
+
Array
|
|
1880
|
+
] }
|
|
1535
1881
|
},
|
|
1536
1882
|
emits: [
|
|
1537
1883
|
"update:filters",
|
|
@@ -1543,14 +1889,37 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
1543
1889
|
const props = __props;
|
|
1544
1890
|
const emit = __emit;
|
|
1545
1891
|
const slots = useSlots();
|
|
1892
|
+
const attrs = useAttrs();
|
|
1893
|
+
const parts = useFieldPartStyling({
|
|
1894
|
+
component: "PowerSearch",
|
|
1895
|
+
props,
|
|
1896
|
+
attrs,
|
|
1897
|
+
reservedAttrs: [
|
|
1898
|
+
"id",
|
|
1899
|
+
"type",
|
|
1900
|
+
"role",
|
|
1901
|
+
"value",
|
|
1902
|
+
"disabled",
|
|
1903
|
+
"readonly",
|
|
1904
|
+
"placeholder",
|
|
1905
|
+
"autocomplete",
|
|
1906
|
+
"aria-expanded",
|
|
1907
|
+
"aria-controls",
|
|
1908
|
+
"aria-autocomplete",
|
|
1909
|
+
"aria-activedescendant",
|
|
1910
|
+
"aria-describedby",
|
|
1911
|
+
"aria-disabled"
|
|
1912
|
+
]
|
|
1913
|
+
});
|
|
1914
|
+
const hideLabel = useResolvedLabelHidden(() => props.isLabelHidden, () => props.labelHidden, true);
|
|
1546
1915
|
const messages = useAstryxMessages();
|
|
1547
1916
|
const locale = useAstryxLocale();
|
|
1548
1917
|
const announce = useAnnounce();
|
|
1549
|
-
const
|
|
1550
|
-
const
|
|
1551
|
-
const
|
|
1552
|
-
const
|
|
1553
|
-
const
|
|
1918
|
+
const generatedId = `astryx-power-search-${useId()}`;
|
|
1919
|
+
const passedId = computed(() => typeof attrs.id === "string" && attrs.id !== "" ? attrs.id : void 0);
|
|
1920
|
+
const inputId = computed(() => passedId.value ?? generatedId);
|
|
1921
|
+
const listboxId = computed(() => `${inputId.value}-listbox`);
|
|
1922
|
+
const disabledId = computed(() => `${inputId.value}-disabled`);
|
|
1554
1923
|
const focused = ref(false);
|
|
1555
1924
|
const placeholderHeight = ref(0);
|
|
1556
1925
|
const queryMirror = ref("");
|
|
@@ -1559,12 +1928,9 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
1559
1928
|
useScrollbars(listboxRef);
|
|
1560
1929
|
const inputRef = useTemplateRef("inputRef");
|
|
1561
1930
|
const editorRef = useTemplateRef("editorRef");
|
|
1562
|
-
const tokenEls = /* @__PURE__ */ new Map();
|
|
1563
|
-
const session = ref(null);
|
|
1564
|
-
const openingControl = ref(null);
|
|
1565
|
-
const editorOpen = computed(() => session.value != null);
|
|
1566
1931
|
const sawCount = ref(false);
|
|
1567
1932
|
const liveText = ref("");
|
|
1933
|
+
const visibleCountOf = { current: () => 0 };
|
|
1568
1934
|
const text = computed(() => messages.value.powerSearch);
|
|
1569
1935
|
const label = computed(() => props.label ?? text.value.label);
|
|
1570
1936
|
const placeholder = computed(() => props.placeholder ?? text.value.placeholder);
|
|
@@ -1583,20 +1949,28 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
1583
1949
|
message: props.statusMessage
|
|
1584
1950
|
};
|
|
1585
1951
|
});
|
|
1586
|
-
const
|
|
1587
|
-
|
|
1588
|
-
|
|
1952
|
+
const externalDescribedBy = computed(() => typeof attrs["aria-describedby"] === "string" ? attrs["aria-describedby"] : void 0);
|
|
1953
|
+
const describedBy = computed(() => [
|
|
1954
|
+
externalDescribedBy.value,
|
|
1955
|
+
focusableDisabled.value ? disabledId.value : void 0,
|
|
1956
|
+
props.statusMessage ? `${inputId.value}-status` : void 0
|
|
1957
|
+
].filter(Boolean).join(" ") || void 0);
|
|
1589
1958
|
const source = computed(() => ({ search(query) {
|
|
1590
1959
|
const limit = query.trim() === "" ? 1e3 : props.maxSearchResults;
|
|
1591
1960
|
return searchPowerSearchFields(lookup.value, query, text.value, limit);
|
|
1592
1961
|
} }));
|
|
1962
|
+
const bridge = {
|
|
1963
|
+
pick: (_item) => {},
|
|
1964
|
+
sessionOpen: () => false,
|
|
1965
|
+
closeEditor: (_restore) => {}
|
|
1966
|
+
};
|
|
1593
1967
|
const menu = useTypeaheadMenu({
|
|
1594
1968
|
source: () => source.value,
|
|
1595
1969
|
debounceMs: 0,
|
|
1596
1970
|
showOnFocus: () => !props.readOnly,
|
|
1597
1971
|
maxItems: () => queryMirror.value.trim() === "" ? 1e3 : props.maxSearchResults,
|
|
1598
|
-
disabled: () => props.disabled || props.readOnly ||
|
|
1599
|
-
onSelect: (entry) => pick(entry.item),
|
|
1972
|
+
disabled: () => props.disabled || props.readOnly || bridge.sessionOpen(),
|
|
1973
|
+
onSelect: (entry) => bridge.pick(entry.item),
|
|
1600
1974
|
onQueryChange: (query) => {
|
|
1601
1975
|
queryMirror.value = query;
|
|
1602
1976
|
}
|
|
@@ -1607,48 +1981,40 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
1607
1981
|
isOpen: menu.combobox.isOpen,
|
|
1608
1982
|
onDismiss: () => menu.close()
|
|
1609
1983
|
});
|
|
1984
|
+
const { activate, canRemove, clearAll, closeEditor, editorComponent, editorOpen, editorStyle, fieldFor, filters, onEditorSave, onInput, onInputKeyDown, onTokenKeyDown, openingControl, operatorFor, pick, removeAt, session, setTokenEl, tokenComponent } = usePowerSearchActions({
|
|
1985
|
+
props,
|
|
1986
|
+
emit,
|
|
1987
|
+
hasCustomEditor: () => slots.editor != null,
|
|
1988
|
+
menu: {
|
|
1989
|
+
query: menu.query,
|
|
1990
|
+
close: () => menu.close(),
|
|
1991
|
+
setQuery: (value) => {
|
|
1992
|
+
menu.query.value = value;
|
|
1993
|
+
},
|
|
1994
|
+
onKeyDown: (event) => menu.onKeyDown(event)
|
|
1995
|
+
},
|
|
1996
|
+
anchorRef,
|
|
1997
|
+
inputRef,
|
|
1998
|
+
lookup,
|
|
1999
|
+
text,
|
|
2000
|
+
announce,
|
|
2001
|
+
visibleCount: () => visibleCountOf.current()
|
|
2002
|
+
});
|
|
2003
|
+
bridge.pick = pick;
|
|
2004
|
+
bridge.sessionOpen = () => session.value != null;
|
|
2005
|
+
bridge.closeEditor = closeEditor;
|
|
1610
2006
|
useDismiss({
|
|
1611
2007
|
container: editorRef,
|
|
1612
2008
|
trigger: openingControl,
|
|
1613
2009
|
isEnabled: editorOpen,
|
|
1614
|
-
|
|
2010
|
+
dismissOnEscape: "ignore",
|
|
1615
2011
|
onDismiss: () => closeEditor(true)
|
|
1616
2012
|
});
|
|
1617
2013
|
const tokenCount = computed(() => filters.value.length);
|
|
1618
2014
|
const overflowState = useOverflow(tokenCount, { gap: 4 });
|
|
1619
2015
|
const visibleCount = computed(() => collapsed.value ? overflowState.visibleCount.value : tokenCount.value);
|
|
2016
|
+
visibleCountOf.current = () => visibleCount.value;
|
|
1620
2017
|
const hiddenCount = computed(() => Math.max(0, tokenCount.value - visibleCount.value));
|
|
1621
|
-
const visibleFilters = computed(() => filters.value.slice(0, visibleCount.value));
|
|
1622
|
-
const displayCount = computed(() => {
|
|
1623
|
-
if (props.resultCount == null) return "";
|
|
1624
|
-
return typeof props.resultCount === "number" ? text.value.resultCount(props.resultCount) : props.resultCount;
|
|
1625
|
-
});
|
|
1626
|
-
const menuStyle = computed(() => {
|
|
1627
|
-
const base = anchored.style.value;
|
|
1628
|
-
if (props.menuWidth == null) return base;
|
|
1629
|
-
const width = `${props.menuWidth}px`;
|
|
1630
|
-
return {
|
|
1631
|
-
...base,
|
|
1632
|
-
width,
|
|
1633
|
-
minWidth: width,
|
|
1634
|
-
maxWidth: width
|
|
1635
|
-
};
|
|
1636
|
-
});
|
|
1637
|
-
const editorStyle = computed(() => {
|
|
1638
|
-
const place = session.value?.placement;
|
|
1639
|
-
if (place == null) return void 0;
|
|
1640
|
-
return {
|
|
1641
|
-
top: `${place.top}px`,
|
|
1642
|
-
left: `${place.left}px`,
|
|
1643
|
-
width: `${place.width}px`
|
|
1644
|
-
};
|
|
1645
|
-
});
|
|
1646
|
-
const editorComponent = computed(() => {
|
|
1647
|
-
const filter = session.value?.filter;
|
|
1648
|
-
if (filter?.operator == null) return _sfc_main$2;
|
|
1649
|
-
const type = lookup.value.getOperator(filter.field, filter.operator)?.value.type;
|
|
1650
|
-
return (type ? props.components?.[type]?.editor : void 0) ?? _sfc_main$2;
|
|
1651
|
-
});
|
|
1652
2018
|
watch(collapsed, () => {
|
|
1653
2019
|
nextTick(() => overflowState.remeasure());
|
|
1654
2020
|
});
|
|
@@ -1664,166 +2030,22 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
1664
2030
|
if (typeof value === "number") liveText.value = text.value.resultCount(value);
|
|
1665
2031
|
else if (typeof value === "string") liveText.value = value;
|
|
1666
2032
|
}, { immediate: true });
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
}
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
return
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
if (operator == null) return false;
|
|
1682
|
-
if (operator.value.type !== "empty") return true;
|
|
1683
|
-
return Boolean(props.components?.empty?.editor || slots.editor);
|
|
1684
|
-
}
|
|
1685
|
-
function canRemove(filter) {
|
|
1686
|
-
return !props.disabled && !props.readOnly && filter.isReadOnly !== true;
|
|
1687
|
-
}
|
|
1688
|
-
function tokenComponent(filter) {
|
|
1689
|
-
const type = operatorFor(filter)?.value.type;
|
|
1690
|
-
return type ? props.components?.[type]?.token : void 0;
|
|
1691
|
-
}
|
|
1692
|
-
function measure(control) {
|
|
1693
|
-
const outer = anchorRef.value;
|
|
1694
|
-
if (outer == null) return null;
|
|
1695
|
-
const target = control ?? outer;
|
|
1696
|
-
const outerRect = outer.getBoundingClientRect();
|
|
1697
|
-
const controlRect = target.getBoundingClientRect();
|
|
1698
|
-
return resolveEditorPlacement({
|
|
1699
|
-
outer: {
|
|
1700
|
-
left: outerRect.left,
|
|
1701
|
-
right: outerRect.right,
|
|
1702
|
-
width: outerRect.width
|
|
1703
|
-
},
|
|
1704
|
-
control: {
|
|
1705
|
-
left: controlRect.left,
|
|
1706
|
-
right: controlRect.right,
|
|
1707
|
-
width: controlRect.width
|
|
1708
|
-
},
|
|
1709
|
-
viewportWidth: window.innerWidth,
|
|
1710
|
-
viewportHeight: window.innerHeight,
|
|
1711
|
-
direction: getComputedStyle(outer).direction === "rtl" ? "rtl" : "ltr",
|
|
1712
|
-
anchorTop: controlRect.top,
|
|
1713
|
-
anchorBottom: controlRect.bottom
|
|
1714
|
-
});
|
|
1715
|
-
}
|
|
1716
|
-
function openEditor(mode, filter, index, control) {
|
|
1717
|
-
const placement = measure(control);
|
|
1718
|
-
if (placement == null) return;
|
|
1719
|
-
menu.close();
|
|
1720
|
-
openingControl.value = control;
|
|
1721
|
-
session.value = {
|
|
1722
|
-
mode,
|
|
1723
|
-
index,
|
|
1724
|
-
filter,
|
|
1725
|
-
placement,
|
|
1726
|
-
ready: false,
|
|
1727
|
-
control
|
|
2033
|
+
const visibleFilters = computed(() => filters.value.slice(0, visibleCount.value));
|
|
2034
|
+
const displayCount = computed(() => {
|
|
2035
|
+
if (props.resultCount == null) return "";
|
|
2036
|
+
return typeof props.resultCount === "number" ? text.value.resultCount(props.resultCount) : props.resultCount;
|
|
2037
|
+
});
|
|
2038
|
+
const menuStyle = computed(() => {
|
|
2039
|
+
const base = anchored.style.value;
|
|
2040
|
+
if (props.menuWidth == null) return base;
|
|
2041
|
+
const width = `min(${props.menuWidth}px, var(--astryx-layer-max-inline-size, calc(100vw - 32px)))`;
|
|
2042
|
+
return {
|
|
2043
|
+
...base,
|
|
2044
|
+
width,
|
|
2045
|
+
minWidth: width,
|
|
2046
|
+
maxWidth: width
|
|
1728
2047
|
};
|
|
1729
|
-
|
|
1730
|
-
requestAnimationFrame(() => {
|
|
1731
|
-
if (session.value) session.value = {
|
|
1732
|
-
...session.value,
|
|
1733
|
-
ready: true
|
|
1734
|
-
};
|
|
1735
|
-
});
|
|
1736
|
-
});
|
|
1737
|
-
}
|
|
1738
|
-
function closeEditor(restore) {
|
|
1739
|
-
const control = session.value?.control;
|
|
1740
|
-
session.value = null;
|
|
1741
|
-
openingControl.value = null;
|
|
1742
|
-
if (!restore) return;
|
|
1743
|
-
nextTick(() => {
|
|
1744
|
-
if (control instanceof HTMLElement) control.focus();
|
|
1745
|
-
else inputRef.value?.focus();
|
|
1746
|
-
});
|
|
1747
|
-
}
|
|
1748
|
-
function pick(item) {
|
|
1749
|
-
const data = item.auxiliaryData;
|
|
1750
|
-
if (data == null) return;
|
|
1751
|
-
const field = lookup.value.getField(data.fieldKey);
|
|
1752
|
-
const operator = (data.operatorKey ? lookup.value.getOperator(data.fieldKey, data.operatorKey) : void 0) ?? lookup.value.getDefaultOperator(data.fieldKey);
|
|
1753
|
-
if (field == null || operator == null) return;
|
|
1754
|
-
menu.query.value = "";
|
|
1755
|
-
menu.close();
|
|
1756
|
-
if (data.filterValue != null || operator.value.type === "empty") {
|
|
1757
|
-
const value = data.filterValue ?? { type: "empty" };
|
|
1758
|
-
const next = [...filters.value, {
|
|
1759
|
-
field: field.key,
|
|
1760
|
-
operator: operator.key,
|
|
1761
|
-
value
|
|
1762
|
-
}];
|
|
1763
|
-
commit(next, "add", next.length - 1);
|
|
1764
|
-
announce(`${field.label}: ${operator.key}`);
|
|
1765
|
-
nextTick(() => inputRef.value?.focus());
|
|
1766
|
-
return;
|
|
1767
|
-
}
|
|
1768
|
-
openEditor("create", {
|
|
1769
|
-
field: field.key,
|
|
1770
|
-
operator: operator.key
|
|
1771
|
-
}, filters.value.length, inputRef.value);
|
|
1772
|
-
}
|
|
1773
|
-
function onEditorSave(filter) {
|
|
1774
|
-
const current = session.value;
|
|
1775
|
-
if (current == null) return;
|
|
1776
|
-
if (filter == null) {
|
|
1777
|
-
if (current.mode === "edit") {
|
|
1778
|
-
const removed = filters.value[current.index];
|
|
1779
|
-
commit(filters.value.filter((_, index) => index !== current.index), "remove", current.index);
|
|
1780
|
-
announce(text.value.removeFilter(removed ? fieldFor(removed)?.label ?? removed.field : ""));
|
|
1781
|
-
}
|
|
1782
|
-
closeEditor(false);
|
|
1783
|
-
nextTick(() => inputRef.value?.focus());
|
|
1784
|
-
return;
|
|
1785
|
-
}
|
|
1786
|
-
if (current.mode === "edit") commit(filters.value.map((item, index) => index === current.index ? filter : item), "edit", current.index);
|
|
1787
|
-
else {
|
|
1788
|
-
const next = [...filters.value, filter];
|
|
1789
|
-
commit(next, "add", next.length - 1);
|
|
1790
|
-
}
|
|
1791
|
-
const field = lookup.value.getField(filter.field);
|
|
1792
|
-
announce(field?.label ?? filter.field);
|
|
1793
|
-
closeEditor(false);
|
|
1794
|
-
nextTick(() => inputRef.value?.focus());
|
|
1795
|
-
}
|
|
1796
|
-
function removeAt(index) {
|
|
1797
|
-
const filter = filters.value[index];
|
|
1798
|
-
if (filter == null || !canRemove(filter)) return;
|
|
1799
|
-
commit(filters.value.filter((_, itemIndex) => itemIndex !== index), "remove", index);
|
|
1800
|
-
announce(text.value.removeFilter(fieldFor(filter)?.label ?? filter.field));
|
|
1801
|
-
nextTick(() => inputRef.value?.focus());
|
|
1802
|
-
}
|
|
1803
|
-
function clearAll(event) {
|
|
1804
|
-
event?.stopPropagation();
|
|
1805
|
-
if (props.disabled || filters.value.length === 0) return;
|
|
1806
|
-
commit([], "remove", 0);
|
|
1807
|
-
announce(text.value.clear);
|
|
1808
|
-
menu.close();
|
|
1809
|
-
inputRef.value?.focus();
|
|
1810
|
-
}
|
|
1811
|
-
function activate(index) {
|
|
1812
|
-
const filter = filters.value[index];
|
|
1813
|
-
if (filter == null || !canEdit(filter)) return;
|
|
1814
|
-
openEditor("edit", filter, index, tokenEls.get(index) ?? null);
|
|
1815
|
-
}
|
|
1816
|
-
function setTokenEl(index, element) {
|
|
1817
|
-
if (element instanceof HTMLElement) tokenEls.set(index, element);
|
|
1818
|
-
else tokenEls.delete(index);
|
|
1819
|
-
}
|
|
1820
|
-
function focusToken(index) {
|
|
1821
|
-
nextTick(() => tokenEls.get(index)?.focus());
|
|
1822
|
-
}
|
|
1823
|
-
function onInput(event) {
|
|
1824
|
-
if (props.disabled || props.readOnly) return;
|
|
1825
|
-
menu.setQuery(event.target.value);
|
|
1826
|
-
}
|
|
2048
|
+
});
|
|
1827
2049
|
function onInputFocus(event) {
|
|
1828
2050
|
emit("focus", event);
|
|
1829
2051
|
if (!props.disabled && !props.readOnly && session.value == null) menu.open();
|
|
@@ -1838,40 +2060,6 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
1838
2060
|
focused.value = false;
|
|
1839
2061
|
if (session.value == null) menu.close();
|
|
1840
2062
|
}
|
|
1841
|
-
function onInputKeyDown(event) {
|
|
1842
|
-
if (session.value != null) return;
|
|
1843
|
-
const input = inputRef.value;
|
|
1844
|
-
if (event.key === "Backspace" && menu.query.value === "" && filters.value.length > 0 && canRemove(filters.value[filters.value.length - 1])) {
|
|
1845
|
-
event.preventDefault();
|
|
1846
|
-
removeAt(filters.value.length - 1);
|
|
1847
|
-
return;
|
|
1848
|
-
}
|
|
1849
|
-
if (event.key === "ArrowLeft" && input && input.selectionStart === 0 && input.selectionEnd === 0 && filters.value.length > 0) {
|
|
1850
|
-
event.preventDefault();
|
|
1851
|
-
focusToken(Math.min(visibleCount.value, filters.value.length) - 1);
|
|
1852
|
-
return;
|
|
1853
|
-
}
|
|
1854
|
-
if (event.key === "ArrowRight" && input && menu.query.value === "" && input.selectionStart === 0) return;
|
|
1855
|
-
menu.onKeyDown(event);
|
|
1856
|
-
}
|
|
1857
|
-
function onTokenKeyDown(event, index) {
|
|
1858
|
-
if (event.key === "ArrowLeft" && index > 0) {
|
|
1859
|
-
event.preventDefault();
|
|
1860
|
-
focusToken(index - 1);
|
|
1861
|
-
} else if (event.key === "ArrowRight") {
|
|
1862
|
-
event.preventDefault();
|
|
1863
|
-
if (index < visibleCount.value - 1) focusToken(index + 1);
|
|
1864
|
-
else inputRef.value?.focus();
|
|
1865
|
-
} else if (event.key === "Escape") inputRef.value?.focus();
|
|
1866
|
-
else if ((event.key === "Backspace" || event.key === "Delete") && canRemove(filters.value[index])) {
|
|
1867
|
-
event.preventDefault();
|
|
1868
|
-
removeAt(index);
|
|
1869
|
-
if (index > 0) focusToken(index - 1);
|
|
1870
|
-
} else if (event.key === "Enter") {
|
|
1871
|
-
event.preventDefault();
|
|
1872
|
-
activate(index);
|
|
1873
|
-
}
|
|
1874
|
-
}
|
|
1875
2063
|
function onFieldClick(event) {
|
|
1876
2064
|
if (props.disabled && !focusableDisabled.value) return;
|
|
1877
2065
|
const target = event.target;
|
|
@@ -1882,21 +2070,8 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
1882
2070
|
const entry = menu.entries.value[index];
|
|
1883
2071
|
if (entry && !entry.disabled) menu.combobox.activeIndex.value = index;
|
|
1884
2072
|
}
|
|
1885
|
-
function groupLabel(index) {
|
|
1886
|
-
const group = menu.entries.value[index]?.item.auxiliaryData?.group;
|
|
1887
|
-
if (group == null || group === "") return void 0;
|
|
1888
|
-
return group !== (index > 0 ? menu.entries.value[index - 1]?.item.auxiliaryData?.group : void 0) ? group : void 0;
|
|
1889
|
-
}
|
|
1890
|
-
function itemIcon(item) {
|
|
1891
|
-
const data = item.auxiliaryData;
|
|
1892
|
-
const type = (data?.operatorKey ? lookup.value.getOperator(data.fieldKey, data.operatorKey) : void 0)?.value.type;
|
|
1893
|
-
if (type === "date_absolute" || type === "date_range" || type === "date_relative") return "calendar";
|
|
1894
|
-
if (type === "time") return "clock";
|
|
1895
|
-
if (type === "enum" || type === "enum_list") return "funnel";
|
|
1896
|
-
return "search";
|
|
1897
|
-
}
|
|
1898
2073
|
function optionId(index) {
|
|
1899
|
-
return `${listboxId}-option-${index}`;
|
|
2074
|
+
return `${listboxId.value}-option-${index}`;
|
|
1900
2075
|
}
|
|
1901
2076
|
onMounted(() => {
|
|
1902
2077
|
if (props.autofocus) inputRef.value?.focus();
|
|
@@ -1907,10 +2082,15 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
1907
2082
|
});
|
|
1908
2083
|
return (_ctx, _cache) => {
|
|
1909
2084
|
return openBlock(), createElementBlock(Fragment, null, [createVNode(_sfc_main$8, {
|
|
1910
|
-
class: normalizeClass(["astryx-power-search", [
|
|
2085
|
+
class: normalizeClass(["astryx-power-search", [
|
|
2086
|
+
unref(parts).containerClass.value,
|
|
2087
|
+
`size-${__props.size}`,
|
|
2088
|
+
{ "is-floating": floating.value }
|
|
2089
|
+
]]),
|
|
2090
|
+
style: normalizeStyle(unref(parts).containerStyle.value),
|
|
1911
2091
|
label: label.value,
|
|
1912
|
-
"input-id": inputId,
|
|
1913
|
-
"is-label-hidden":
|
|
2092
|
+
"input-id": inputId.value,
|
|
2093
|
+
"is-label-hidden": unref(hideLabel),
|
|
1914
2094
|
"is-disabled": __props.disabled && !focusableDisabled.value,
|
|
1915
2095
|
status: fieldStatus.value,
|
|
1916
2096
|
"status-variant": __props.statusVariant
|
|
@@ -1928,11 +2108,16 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
1928
2108
|
default: withCtx(() => [createCommentVNode(" eslint-disable-next-line vue-a11y/click-events-have-key-events, vue-a11y/no-static-element-interactions -- 点空白处把焦点交给输入框。 "), createElementVNode("div", {
|
|
1929
2109
|
ref_key: "anchorRef",
|
|
1930
2110
|
ref: anchorRef,
|
|
1931
|
-
class: normalizeClass(["astryx-power-search-control", [
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
2111
|
+
class: normalizeClass(["astryx-power-search-control", [
|
|
2112
|
+
unref(parts).controlClass(),
|
|
2113
|
+
`status-${__props.status}`,
|
|
2114
|
+
{
|
|
2115
|
+
"is-open": unref(menu).combobox.isOpen.value,
|
|
2116
|
+
"is-disabled": __props.disabled,
|
|
2117
|
+
"is-floating": floating.value
|
|
2118
|
+
}
|
|
2119
|
+
]]),
|
|
2120
|
+
style: normalizeStyle(unref(parts).controlStyle()),
|
|
1936
2121
|
onClick: onFieldClick,
|
|
1937
2122
|
onFocusin: onFocusIn,
|
|
1938
2123
|
onFocusout: onFocusOut
|
|
@@ -1947,29 +2132,29 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
1947
2132
|
return openBlock(), createElementBlock("span", {
|
|
1948
2133
|
key: `${filter.field}-${filter.operator}-${index}`,
|
|
1949
2134
|
ref_for: true,
|
|
1950
|
-
ref: (element) => setTokenEl(index, element),
|
|
2135
|
+
ref: (element) => unref(setTokenEl)(index, element),
|
|
1951
2136
|
class: "astryx-power-search-token",
|
|
1952
2137
|
tabindex: "-1",
|
|
1953
|
-
onKeydown: ($event) => onTokenKeyDown($event, index)
|
|
2138
|
+
onKeydown: ($event) => unref(onTokenKeyDown)($event, index)
|
|
1954
2139
|
}, [renderSlot(_ctx.$slots, "token", {
|
|
1955
2140
|
config: __props.config,
|
|
1956
2141
|
filter,
|
|
1957
|
-
field: fieldFor(filter),
|
|
1958
|
-
operator: operatorFor(filter),
|
|
2142
|
+
field: unref(fieldFor)(filter),
|
|
2143
|
+
operator: unref(operatorFor)(filter),
|
|
1959
2144
|
maxLength: __props.maxTokenLength,
|
|
1960
2145
|
disabled: __props.disabled,
|
|
1961
|
-
onClick: () => activate(index),
|
|
1962
|
-
onRemove: () => removeAt(index)
|
|
1963
|
-
}, () => [tokenComponent(filter) ? (openBlock(), createBlock(resolveDynamicComponent(tokenComponent(filter)), {
|
|
2146
|
+
onClick: () => unref(activate)(index),
|
|
2147
|
+
onRemove: () => unref(removeAt)(index)
|
|
2148
|
+
}, () => [unref(tokenComponent)(filter) ? (openBlock(), createBlock(resolveDynamicComponent(unref(tokenComponent)(filter)), {
|
|
1964
2149
|
key: 0,
|
|
1965
2150
|
config: __props.config,
|
|
1966
2151
|
filter,
|
|
1967
|
-
field: fieldFor(filter),
|
|
1968
|
-
operator: operatorFor(filter),
|
|
2152
|
+
field: unref(fieldFor)(filter),
|
|
2153
|
+
operator: unref(operatorFor)(filter),
|
|
1969
2154
|
"max-length": __props.maxTokenLength,
|
|
1970
2155
|
disabled: __props.disabled,
|
|
1971
|
-
"on-click": () => activate(index),
|
|
1972
|
-
"on-remove": () => removeAt(index)
|
|
2156
|
+
"on-click": () => unref(activate)(index),
|
|
2157
|
+
"on-remove": () => unref(removeAt)(index)
|
|
1973
2158
|
}, null, 40, [
|
|
1974
2159
|
"config",
|
|
1975
2160
|
"filter",
|
|
@@ -1979,10 +2164,10 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
1979
2164
|
"disabled",
|
|
1980
2165
|
"on-click",
|
|
1981
2166
|
"on-remove"
|
|
1982
|
-
])) : fieldFor(filter) && operatorFor(filter) ? (openBlock(), createBlock(_sfc_main$
|
|
2167
|
+
])) : unref(fieldFor)(filter) && unref(operatorFor)(filter) ? (openBlock(), createBlock(_sfc_main$4, {
|
|
1983
2168
|
key: 1,
|
|
1984
|
-
"field-label": fieldFor(filter).label,
|
|
1985
|
-
operator: operatorFor(filter),
|
|
2169
|
+
"field-label": unref(fieldFor)(filter).label,
|
|
2170
|
+
operator: unref(operatorFor)(filter),
|
|
1986
2171
|
filter,
|
|
1987
2172
|
"max-length": __props.maxTokenLength,
|
|
1988
2173
|
messages: text.value,
|
|
@@ -1990,9 +2175,9 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
1990
2175
|
"time-zone": resolvedTimeZone.value,
|
|
1991
2176
|
size: __props.size,
|
|
1992
2177
|
disabled: __props.disabled,
|
|
1993
|
-
removable: canRemove(filter),
|
|
1994
|
-
onActivate: ($event) => activate(index),
|
|
1995
|
-
onRemove: ($event) => removeAt(index)
|
|
2178
|
+
removable: unref(canRemove)(filter),
|
|
2179
|
+
onActivate: ($event) => unref(activate)(index),
|
|
2180
|
+
onRemove: ($event) => unref(removeAt)(index)
|
|
1996
2181
|
}, null, 8, [
|
|
1997
2182
|
"field-label",
|
|
1998
2183
|
"operator",
|
|
@@ -2014,14 +2199,14 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
2014
2199
|
ref: unref(overflowState).measureRef,
|
|
2015
2200
|
class: "astryx-power-search-measure",
|
|
2016
2201
|
"aria-hidden": "true"
|
|
2017
|
-
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(filters
|
|
2202
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(filters), (filter, index) => {
|
|
2018
2203
|
return openBlock(), createElementBlock("span", {
|
|
2019
2204
|
key: `${filter.field}-${index}`,
|
|
2020
2205
|
class: "astryx-power-search-token"
|
|
2021
|
-
}, [fieldFor(filter) && operatorFor(filter) ? (openBlock(), createBlock(_sfc_main$
|
|
2206
|
+
}, [unref(fieldFor)(filter) && unref(operatorFor)(filter) ? (openBlock(), createBlock(_sfc_main$4, {
|
|
2022
2207
|
key: 0,
|
|
2023
|
-
"field-label": fieldFor(filter).label,
|
|
2024
|
-
operator: operatorFor(filter),
|
|
2208
|
+
"field-label": unref(fieldFor)(filter).label,
|
|
2209
|
+
operator: unref(operatorFor)(filter),
|
|
2025
2210
|
filter,
|
|
2026
2211
|
"max-length": __props.maxTokenLength,
|
|
2027
2212
|
messages: text.value,
|
|
@@ -2038,8 +2223,8 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
2038
2223
|
"size"
|
|
2039
2224
|
])) : createCommentVNode("v-if", true)]);
|
|
2040
2225
|
}), 128)), createElementVNode("span", _hoisted_4, toDisplayString(text.value.more(Math.max(hiddenCount.value, 1))), 1)], 512),
|
|
2041
|
-
createElementVNode("input", {
|
|
2042
|
-
id: inputId,
|
|
2226
|
+
createElementVNode("input", mergeProps(unref(parts).forwardedAttrs(), {
|
|
2227
|
+
id: inputId.value,
|
|
2043
2228
|
ref_key: "inputRef",
|
|
2044
2229
|
ref: inputRef,
|
|
2045
2230
|
class: "astryx-power-search-input",
|
|
@@ -2047,64 +2232,66 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
2047
2232
|
role: "combobox",
|
|
2048
2233
|
autocomplete: "off",
|
|
2049
2234
|
autocapitalize: "off",
|
|
2050
|
-
placeholder: filters.
|
|
2235
|
+
placeholder: unref(filters).length === 0 ? placeholder.value : void 0,
|
|
2051
2236
|
value: unref(menu).query.value,
|
|
2052
2237
|
disabled: __props.disabled && !focusableDisabled.value,
|
|
2053
2238
|
readonly: __props.readOnly || focusableDisabled.value || void 0,
|
|
2054
2239
|
"aria-disabled": __props.disabled ? "true" : void 0,
|
|
2055
2240
|
"aria-expanded": unref(menu).combobox.isOpen.value,
|
|
2056
|
-
"aria-controls": listboxId,
|
|
2241
|
+
"aria-controls": listboxId.value,
|
|
2057
2242
|
"aria-autocomplete": "list",
|
|
2058
2243
|
"aria-activedescendant": unref(menu).activeId.value ? optionId(unref(menu).combobox.activeIndex.value) : void 0,
|
|
2059
2244
|
"aria-describedby": describedBy.value,
|
|
2060
|
-
onInput,
|
|
2061
|
-
onKeydown: onInputKeyDown,
|
|
2245
|
+
onInput: _cache[0] || (_cache[0] = (...args) => unref(onInput) && unref(onInput)(...args)),
|
|
2246
|
+
onKeydown: _cache[1] || (_cache[1] = (...args) => unref(onInputKeyDown) && unref(onInputKeyDown)(...args)),
|
|
2062
2247
|
onFocus: onInputFocus,
|
|
2063
|
-
onBlur: _cache[
|
|
2064
|
-
}, null,
|
|
2248
|
+
onBlur: _cache[2] || (_cache[2] = ($event) => emit("blur", $event))
|
|
2249
|
+
}), null, 16, _hoisted_5),
|
|
2065
2250
|
slots.endContent ? renderSlot(_ctx.$slots, "endContent", {}, void 0, void 0, 1) : renderSlot(_ctx.$slots, "end", {}, void 0, void 0, 2),
|
|
2066
2251
|
displayCount.value ? (openBlock(), createElementBlock("span", _hoisted_6, toDisplayString(displayCount.value), 1)) : createCommentVNode("v-if", true),
|
|
2067
|
-
showsClear.value && filters.
|
|
2252
|
+
showsClear.value && unref(filters).length > 0 && !__props.disabled && !__props.readOnly ? (openBlock(), createElementBlock("button", {
|
|
2068
2253
|
key: 4,
|
|
2069
2254
|
type: "button",
|
|
2070
2255
|
class: "astryx-power-search-clear",
|
|
2071
2256
|
"aria-label": text.value.clear,
|
|
2072
|
-
onClick: clearAll
|
|
2257
|
+
onClick: _cache[3] || (_cache[3] = (...args) => unref(clearAll) && unref(clearAll)(...args))
|
|
2073
2258
|
}, [createVNode(_sfc_main$7, {
|
|
2074
2259
|
icon: "close",
|
|
2075
2260
|
size: "sm"
|
|
2076
2261
|
})], 8, _hoisted_7)) : createCommentVNode("v-if", true),
|
|
2077
2262
|
focusableDisabled.value ? (openBlock(), createElementBlock("span", {
|
|
2078
2263
|
key: 5,
|
|
2079
|
-
id: disabledId,
|
|
2264
|
+
id: disabledId.value,
|
|
2080
2265
|
class: "astryx-visually-hidden"
|
|
2081
|
-
}, toDisplayString(disabledMessage.value),
|
|
2082
|
-
],
|
|
2266
|
+
}, toDisplayString(disabledMessage.value), 9, _hoisted_8)) : createCommentVNode("v-if", true)
|
|
2267
|
+
], 38)]),
|
|
2083
2268
|
_: 3
|
|
2084
2269
|
}, 8, ["content", "is-enabled"]),
|
|
2085
|
-
createElementVNode("span",
|
|
2270
|
+
createElementVNode("span", _hoisted_9, toDisplayString(liveText.value), 1)
|
|
2086
2271
|
]),
|
|
2087
2272
|
_: 3
|
|
2088
2273
|
}, 8, [
|
|
2089
2274
|
"class",
|
|
2275
|
+
"style",
|
|
2090
2276
|
"label",
|
|
2277
|
+
"input-id",
|
|
2091
2278
|
"is-label-hidden",
|
|
2092
2279
|
"is-disabled",
|
|
2093
2280
|
"status",
|
|
2094
2281
|
"status-variant"
|
|
2095
2282
|
]), (openBlock(), createBlock(Teleport, { to: "body" }, [withDirectives(createElementVNode("div", {
|
|
2096
|
-
id: listboxId,
|
|
2283
|
+
id: listboxId.value,
|
|
2097
2284
|
ref_key: "listboxRef",
|
|
2098
2285
|
ref: listboxRef,
|
|
2099
|
-
class: "astryx-typeahead-listbox",
|
|
2286
|
+
class: "astryx-typeahead-listbox astryx-layer",
|
|
2100
2287
|
role: "listbox",
|
|
2101
2288
|
"aria-label": text.value.results,
|
|
2102
2289
|
"data-placement": unref(anchored).position.value.placement,
|
|
2103
2290
|
style: normalizeStyle(menuStyle.value),
|
|
2104
2291
|
tabindex: "-1"
|
|
2105
|
-
}, [createElementVNode("div",
|
|
2292
|
+
}, [createElementVNode("div", _hoisted_11, [unref(menu).entries.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_12, toDisplayString(text.value.empty), 1)) : (openBlock(), createElementBlock("div", _hoisted_13, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(menu).entries.value, (entry, index) => {
|
|
2106
2293
|
return openBlock(), createElementBlock(Fragment, { key: entry.id }, [
|
|
2107
|
-
|
|
2294
|
+
unref(powerSearchGroupLabel)(unref(menu).entries.value, index) ? (openBlock(), createElementBlock("div", _hoisted_14, toDisplayString(unref(powerSearchGroupLabel)(unref(menu).entries.value, index)), 1)) : createCommentVNode("v-if", true),
|
|
2108
2295
|
createCommentVNode(" eslint-disable-next-line vue-a11y/click-events-have-key-events, vue-a11y/mouse-events-have-key-events -- 选项不进 Tab 序。 "),
|
|
2109
2296
|
createElementVNode("div", {
|
|
2110
2297
|
id: optionId(index),
|
|
@@ -2116,41 +2303,41 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
2116
2303
|
"aria-selected": index === unref(menu).combobox.activeIndex.value ? "true" : "false",
|
|
2117
2304
|
"data-option-id": entry.id,
|
|
2118
2305
|
tabindex: "-1",
|
|
2119
|
-
onMousedown: _cache[
|
|
2306
|
+
onMousedown: _cache[4] || (_cache[4] = withModifiers(() => {}, ["prevent"])),
|
|
2120
2307
|
onMouseenter: ($event) => highlight(index),
|
|
2121
|
-
onClick: ($event) => pick(entry.item)
|
|
2308
|
+
onClick: ($event) => unref(pick)(entry.item)
|
|
2122
2309
|
}, [createVNode(_sfc_main$7, {
|
|
2123
|
-
icon:
|
|
2310
|
+
icon: unref(powerSearchItemIcon)(entry.item, lookup.value),
|
|
2124
2311
|
size: "sm"
|
|
2125
|
-
}, null, 8, ["icon"]), createElementVNode("span",
|
|
2312
|
+
}, null, 8, ["icon"]), createElementVNode("span", _hoisted_16, [createElementVNode("span", _hoisted_17, toDisplayString(entry.label), 1), entry.description ? (openBlock(), createElementBlock("span", _hoisted_18, toDisplayString(entry.description), 1)) : createCommentVNode("v-if", true)])], 42, _hoisted_15)
|
|
2126
2313
|
], 64);
|
|
2127
|
-
}), 128))]))])], 12,
|
|
2314
|
+
}), 128))]))])], 12, _hoisted_10), [[vShow, unref(menu).combobox.isOpen.value]]), unref(session) ? (openBlock(), createElementBlock("div", {
|
|
2128
2315
|
key: 0,
|
|
2129
2316
|
ref_key: "editorRef",
|
|
2130
2317
|
ref: editorRef,
|
|
2131
|
-
class: "astryx-power-search-editor",
|
|
2132
|
-
"data-ready": session.
|
|
2133
|
-
style: normalizeStyle(editorStyle
|
|
2318
|
+
class: "astryx-power-search-editor astryx-layer",
|
|
2319
|
+
"data-ready": unref(session).ready ? "true" : "false",
|
|
2320
|
+
style: normalizeStyle(unref(editorStyle))
|
|
2134
2321
|
}, [renderSlot(_ctx.$slots, "editor", {
|
|
2135
2322
|
config: __props.config,
|
|
2136
|
-
filter: session.
|
|
2137
|
-
mode: session.
|
|
2323
|
+
filter: unref(session).filter,
|
|
2324
|
+
mode: unref(session).mode,
|
|
2138
2325
|
saveLabel: resolvedSaveLabel.value,
|
|
2139
2326
|
readOnly: __props.readOnly,
|
|
2140
2327
|
timeZone: resolvedTimeZone.value,
|
|
2141
2328
|
maxMenuItems: __props.maxOperatorMenuItems,
|
|
2142
|
-
onSave: onEditorSave,
|
|
2143
|
-
onCancel: () => closeEditor(true)
|
|
2144
|
-
}, () => [(openBlock(), createBlock(resolveDynamicComponent(editorComponent
|
|
2329
|
+
onSave: unref(onEditorSave),
|
|
2330
|
+
onCancel: () => unref(closeEditor)(true)
|
|
2331
|
+
}, () => [(openBlock(), createBlock(resolveDynamicComponent(unref(editorComponent)), {
|
|
2145
2332
|
config: __props.config,
|
|
2146
|
-
filter: session.
|
|
2147
|
-
mode: session.
|
|
2333
|
+
filter: unref(session).filter,
|
|
2334
|
+
mode: unref(session).mode,
|
|
2148
2335
|
"save-label": resolvedSaveLabel.value,
|
|
2149
2336
|
"read-only": __props.readOnly,
|
|
2150
2337
|
"time-zone": resolvedTimeZone.value,
|
|
2151
2338
|
"max-menu-items": __props.maxOperatorMenuItems,
|
|
2152
|
-
"on-save": onEditorSave,
|
|
2153
|
-
"on-cancel": () => closeEditor(true)
|
|
2339
|
+
"on-save": unref(onEditorSave),
|
|
2340
|
+
"on-cancel": () => unref(closeEditor)(true)
|
|
2154
2341
|
}, null, 40, [
|
|
2155
2342
|
"config",
|
|
2156
2343
|
"filter",
|
|
@@ -2159,8 +2346,9 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
2159
2346
|
"read-only",
|
|
2160
2347
|
"time-zone",
|
|
2161
2348
|
"max-menu-items",
|
|
2349
|
+
"on-save",
|
|
2162
2350
|
"on-cancel"
|
|
2163
|
-
]))])], 12,
|
|
2351
|
+
]))])], 12, _hoisted_19)) : createCommentVNode("v-if", true)]))], 64);
|
|
2164
2352
|
};
|
|
2165
2353
|
}
|
|
2166
2354
|
});
|