@expcat/tigercat-vue 2.0.19 → 2.1.1
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/README.md +20 -10
- package/dist/chunk-26QCTL2E.mjs +180 -0
- package/dist/{chunk-7W3NALIL.mjs → chunk-3FPS7XVB.mjs} +26 -27
- package/dist/{chunk-2OI6GWOT.mjs → chunk-3KAHJF7D.mjs} +12 -11
- package/dist/chunk-3OCHBGPF.mjs +835 -0
- package/dist/chunk-3ONCXHE5.mjs +184 -0
- package/dist/{chunk-4HUYX5WW.mjs → chunk-4PQZMDBK.mjs} +29 -8
- package/dist/{chunk-DI6RRAGQ.mjs → chunk-562Z32GR.mjs} +3 -3
- package/dist/{chunk-OQVGB7X6.mjs → chunk-626VUZ2Q.mjs} +1 -1
- package/dist/{chunk-WUQMFKQ6.mjs → chunk-67VS6QHJ.mjs} +29 -15
- package/dist/chunk-6GR3XC5V.mjs +281 -0
- package/dist/chunk-6GR5U4UB.mjs +225 -0
- package/dist/{chunk-KFJIZED5.mjs → chunk-6JAAXPBW.mjs} +7 -6
- package/dist/{chunk-XGXZF27U.mjs → chunk-6NYC7EY2.mjs} +32 -18
- package/dist/{chunk-6BDDX2R4.mjs → chunk-73Z7N7VG.mjs} +1 -4
- package/dist/chunk-7C7SG3SS.mjs +269 -0
- package/dist/{chunk-NNC75I7F.mjs → chunk-7TJE7OYH.mjs} +7 -6
- package/dist/{chunk-AU6IC6K7.mjs → chunk-ABNS4B5V.mjs} +35 -15
- package/dist/chunk-AECXFT7D.mjs +121 -0
- package/dist/chunk-AOLRZG4E.mjs +347 -0
- package/dist/chunk-AY7CGLMO.mjs +368 -0
- package/dist/chunk-BBNCP55O.mjs +156 -0
- package/dist/{chunk-EGIMTTZA.mjs → chunk-BOHE5URZ.mjs} +18 -3
- package/dist/{chunk-5RIHHZF6.mjs → chunk-BQK7LH2L.mjs} +4 -1
- package/dist/{chunk-E6EZHSGY.mjs → chunk-BSOLH6R5.mjs} +0 -1
- package/dist/{chunk-RSM6FOWX.mjs → chunk-CCC3S6LK.mjs} +6 -3
- package/dist/{chunk-U75YXWSA.mjs → chunk-CLTRADS7.mjs} +17 -5
- package/dist/{chunk-BEIPGX74.mjs → chunk-DRLQCY7R.mjs} +162 -7
- package/dist/{chunk-KBJANUZZ.mjs → chunk-E523VGZP.mjs} +1 -1
- package/dist/{chunk-D3U2NJ32.mjs → chunk-FEQ7PZXI.mjs} +8 -2
- package/dist/{chunk-PE5OA4YG.mjs → chunk-FHUGOSEY.mjs} +8 -2
- package/dist/{chunk-OAPIT53X.mjs → chunk-FIEECAJV.mjs} +7 -10
- package/dist/{chunk-7SFB77JR.mjs → chunk-GBPMQJJJ.mjs} +8 -1
- package/dist/{chunk-KOG3HKOF.mjs → chunk-GQOPDD44.mjs} +2 -5
- package/dist/{chunk-5RXYJWNA.mjs → chunk-H4DEIGEG.mjs} +77 -25
- package/dist/{chunk-ZGA66PSG.mjs → chunk-IK2WHKDA.mjs} +32 -18
- package/dist/{chunk-HGXD57QM.mjs → chunk-JBS3AESR.mjs} +65 -23
- package/dist/{chunk-PYRKFQ6J.mjs → chunk-JIU5UEOU.mjs} +70 -26
- package/dist/{chunk-JALHMWKW.mjs → chunk-K5MHUMKR.mjs} +2 -2
- package/dist/{chunk-5E4LINDO.mjs → chunk-LH2V2JMZ.mjs} +26 -10
- package/dist/{chunk-PQBKN2NH.mjs → chunk-LRFKHJDU.mjs} +14 -5
- package/dist/{chunk-OTHJIFDV.mjs → chunk-M4FWWEMX.mjs} +18 -9
- package/dist/{chunk-NGAA73CV.mjs → chunk-N2XV37BL.mjs} +40 -44
- package/dist/{chunk-2LIIMWBR.mjs → chunk-OYU47A57.mjs} +1 -2
- package/dist/{chunk-KU2Q5V3L.mjs → chunk-P62TYR3M.mjs} +18 -2
- package/dist/chunk-P6FMU4AT.mjs +54 -0
- package/dist/{chunk-P5FDKBXG.mjs → chunk-P7X46BAW.mjs} +70 -3
- package/dist/chunk-PFIV5MXD.mjs +48 -0
- package/dist/{chunk-KROVW4AW.mjs → chunk-PJQTRDIG.mjs} +13 -3
- package/dist/{chunk-26OI3TEA.mjs → chunk-PMQSXEMT.mjs} +42 -6
- package/dist/{chunk-XLNK3Z2P.mjs → chunk-POWDTOMF.mjs} +88 -79
- package/dist/{chunk-AXDBME5A.mjs → chunk-PSGVG4TN.mjs} +38 -21
- package/dist/chunk-PWWWACHC.mjs +302 -0
- package/dist/{chunk-UUWTKCMY.mjs → chunk-QWLD5FMJ.mjs} +1 -1
- package/dist/{chunk-ALIUAGJO.mjs → chunk-QZLOF36M.mjs} +7 -13
- package/dist/{chunk-WLYQHKLZ.mjs → chunk-QZRSFGZZ.mjs} +50 -11
- package/dist/{chunk-MAKOSWR6.mjs → chunk-RHQWQJ4I.mjs} +7 -6
- package/dist/{chunk-GS4SV2HK.mjs → chunk-RRLE7QRH.mjs} +43 -22
- package/dist/{chunk-RID7A5V7.mjs → chunk-RRNQL6MJ.mjs} +23 -6
- package/dist/{chunk-VJ6YM2EW.mjs → chunk-S4BKVFQ7.mjs} +1 -1
- package/dist/{chunk-LPZBXTJ6.mjs → chunk-SAC4PAG3.mjs} +4 -4
- package/dist/{chunk-W5RZPTFD.mjs → chunk-SNNT64HK.mjs} +13 -2
- package/dist/{chunk-N3C6YI7I.mjs → chunk-SWMYIORV.mjs} +22 -7
- package/dist/{chunk-2XCXK3NQ.mjs → chunk-SX3NAN4M.mjs} +1 -1
- package/dist/chunk-TBOXTAIA.mjs +94 -0
- package/dist/{chunk-JL3CN4UK.mjs → chunk-TDBMAKTJ.mjs} +10 -3
- package/dist/{chunk-EDBMWZKH.mjs → chunk-TPESRDUG.mjs} +5 -1
- package/dist/chunk-UEGNXN5B.mjs +28 -0
- package/dist/{chunk-NEEGXKJW.mjs → chunk-UGHLEKEZ.mjs} +22 -3
- package/dist/{chunk-HKYRRQS7.mjs → chunk-UNQO7EVG.mjs} +1 -1
- package/dist/chunk-UR5F74ZB.mjs +601 -0
- package/dist/{chunk-VCCK4CDT.mjs → chunk-URPXBKK4.mjs} +23 -5
- package/dist/chunk-UUWPSRNV.mjs +337 -0
- package/dist/chunk-UXJRH72H.mjs +834 -0
- package/dist/chunk-VFS5XAZ3.mjs +602 -0
- package/dist/{chunk-7KCOF5US.mjs → chunk-VY6FVIOZ.mjs} +10 -8
- package/dist/{chunk-KICZSLOX.mjs → chunk-W2ICYZVU.mjs} +1 -1
- package/dist/{chunk-FIVVKBBF.mjs → chunk-W3QOMJKQ.mjs} +8 -6
- package/dist/{chunk-DCMRB3HR.mjs → chunk-WV25G4M3.mjs} +4 -3
- package/dist/{chunk-3KITFMBJ.mjs → chunk-X5LJT76O.mjs} +52 -35
- package/dist/{chunk-BNYA5IUB.mjs → chunk-YNXP34KO.mjs} +39 -38
- package/dist/{chunk-2T2NEZRZ.mjs → chunk-YVDTXHQ6.mjs} +1 -1
- package/dist/{chunk-AUMTHL6N.mjs → chunk-ZOP7PEKY.mjs} +2 -1
- package/dist/components/ActivityFeed.d.mts +29 -11
- package/dist/components/ActivityFeed.mjs +3 -3
- package/dist/components/Affix.d.mts +4 -4
- package/dist/components/Affix.mjs +1 -1
- package/dist/components/Alert.d.mts +4 -4
- package/dist/components/Anchor.d.mts +2 -2
- package/dist/components/Anchor.mjs +1 -1
- package/dist/components/AreaChart.d.mts +3 -3
- package/dist/components/AreaChart.mjs +5 -4
- package/dist/components/AspectRatio.d.mts +44 -0
- package/dist/components/AspectRatio.mjs +8 -0
- package/dist/components/AutoComplete.d.mts +3 -3
- package/dist/components/AutoComplete.mjs +1 -1
- package/dist/components/Avatar.d.mts +2 -2
- package/dist/components/AvatarGroup.d.mts +2 -2
- package/dist/components/BackTop.d.mts +2 -2
- package/dist/components/Badge.d.mts +5 -5
- package/dist/components/BarChart.d.mts +2 -2
- package/dist/components/BarChart.mjs +5 -4
- package/dist/components/Breadcrumb.d.mts +2 -2
- package/dist/components/Button.d.mts +5 -5
- package/dist/components/ButtonGroup.d.mts +1 -1
- package/dist/components/Calendar.d.mts +2 -2
- package/dist/components/Calendar.mjs +1 -1
- package/dist/components/Card.d.mts +3 -3
- package/dist/components/Carousel.d.mts +3 -3
- package/dist/components/Cascader.d.mts +37 -3
- package/dist/components/Cascader.mjs +1 -1
- package/dist/components/ChartCanvas.d.mts +8 -4
- package/dist/components/ChartCanvas.mjs +1 -1
- package/dist/components/ChartGrid.d.mts +1 -1
- package/dist/components/ChartLegend.d.mts +2 -2
- package/dist/components/ChartTooltip.d.mts +1 -1
- package/dist/components/ChatWindow.d.mts +29 -11
- package/dist/components/ChatWindow.mjs +4 -4
- package/dist/components/Checkbox.d.mts +1 -1
- package/dist/components/Code.d.mts +33 -6
- package/dist/components/Code.mjs +3 -1
- package/dist/components/CodeEditor.d.mts +1 -1
- package/dist/components/CodeEditor.mjs +1 -1
- package/dist/components/Collapse.d.mts +1 -1
- package/dist/components/CollapsePanel.mjs +1 -1
- package/dist/components/ColorPicker.mjs +1 -1
- package/dist/components/ColorSwatch.d.mts +8 -2
- package/dist/components/ColorSwatch.mjs +1 -1
- package/dist/components/CommentThread.d.mts +63 -27
- package/dist/components/CommentThread.mjs +2 -2
- package/dist/components/Container.d.mts +1 -1
- package/dist/components/ContextMenu.d.mts +234 -0
- package/dist/components/ContextMenu.mjs +17 -0
- package/dist/components/Countdown.d.mts +1 -1
- package/dist/components/CronEditor.d.mts +3 -3
- package/dist/components/CropUpload.d.mts +1 -1
- package/dist/components/DataExport.d.mts +1 -1
- package/dist/components/DataExport.mjs +2 -2
- package/dist/components/DataTableWithToolbar.d.mts +11 -11
- package/dist/components/DataTableWithToolbar.mjs +8 -8
- package/dist/components/DatePicker.d.mts +5 -5
- package/dist/components/Descriptions.d.mts +3 -3
- package/dist/components/DonutChart.d.mts +3 -3
- package/dist/components/DonutChart.mjs +5 -5
- package/dist/components/Drawer.d.mts +6 -6
- package/dist/components/Dropdown.d.mts +21 -2
- package/dist/components/Dropdown.mjs +1 -1
- package/dist/components/Empty.d.mts +1 -1
- package/dist/components/FileManager.d.mts +10 -4
- package/dist/components/FileManager.mjs +1 -1
- package/dist/components/FloatButton.d.mts +37 -7
- package/dist/components/FloatButton.mjs +1 -1
- package/dist/components/Form.d.mts +2 -2
- package/dist/components/FormWizard.d.mts +4 -4
- package/dist/components/FormWizard.mjs +1 -1
- package/dist/components/FunnelChart.d.mts +4 -4
- package/dist/components/FunnelChart.mjs +4 -4
- package/dist/components/Gantt.d.mts +6 -4
- package/dist/components/Gantt.mjs +2 -2
- package/dist/components/GaugeChart.d.mts +4 -4
- package/dist/components/GaugeChart.mjs +2 -2
- package/dist/components/Header.d.mts +1 -1
- package/dist/components/HeatmapChart.d.mts +3 -3
- package/dist/components/HeatmapChart.mjs +3 -3
- package/dist/components/Highlight.d.mts +146 -0
- package/dist/components/Highlight.mjs +8 -0
- package/dist/components/Icon.d.mts +2 -2
- package/dist/components/Image.d.mts +2 -2
- package/dist/components/Image.mjs +3 -3
- package/dist/components/ImageAnnotation.d.mts +4 -4
- package/dist/components/ImageCompare.d.mts +284 -0
- package/dist/components/ImageCompare.mjs +8 -0
- package/dist/components/ImageCropper.d.mts +1 -1
- package/dist/components/ImageGroup.mjs +2 -2
- package/dist/components/ImagePreview.d.mts +1 -1
- package/dist/components/ImagePreview.mjs +1 -1
- package/dist/components/ImageViewer.d.mts +1 -1
- package/dist/components/InfiniteScroll.d.mts +4 -4
- package/dist/components/Input.d.mts +7 -7
- package/dist/components/Input.mjs +1 -1
- package/dist/components/InputGroup.d.mts +2 -2
- package/dist/components/InputNumber.d.mts +3 -3
- package/dist/components/InputNumber.mjs +1 -1
- package/dist/components/InputOTP.d.mts +261 -0
- package/dist/components/InputOTP.mjs +11 -0
- package/dist/components/Kanban.d.mts +1 -1
- package/dist/components/Kanban.mjs +2 -2
- package/dist/components/Kbd.d.mts +118 -0
- package/dist/components/Kbd.mjs +8 -0
- package/dist/components/LineChart.d.mts +2 -2
- package/dist/components/LineChart.mjs +5 -4
- package/dist/components/Link.d.mts +1 -1
- package/dist/components/List.d.mts +7 -7
- package/dist/components/List.mjs +2 -2
- package/dist/components/Loading.d.mts +7 -7
- package/dist/components/Loading.mjs +1 -1
- package/dist/components/LoadingBar.d.mts +8 -0
- package/dist/components/LoadingBar.mjs +114 -0
- package/dist/components/LoadingBarContainer.d.mts +78 -0
- package/dist/components/LoadingBarContainer.mjs +8 -0
- package/dist/components/LoadingBarRoot.d.mts +6 -0
- package/dist/components/LoadingBarRoot.mjs +6 -0
- package/dist/components/MarkdownEditor.d.mts +4 -4
- package/dist/components/Marquee.d.mts +158 -0
- package/dist/components/Marquee.mjs +8 -0
- package/dist/components/MaskInput.d.mts +207 -0
- package/dist/components/MaskInput.mjs +11 -0
- package/dist/components/Masonry.d.mts +66 -0
- package/dist/components/Masonry.mjs +8 -0
- package/dist/components/Mentions.d.mts +1 -1
- package/dist/components/Menu.d.mts +4 -4
- package/dist/components/Modal.d.mts +7 -7
- package/dist/components/NavigationMenu.d.mts +411 -0
- package/dist/components/NavigationMenu.mjs +25 -0
- package/dist/components/NotificationCenter.d.mts +48 -30
- package/dist/components/NotificationCenter.mjs +4 -4
- package/dist/components/NumberKeyboard.d.mts +4 -4
- package/dist/components/OrgChart.d.mts +4 -4
- package/dist/components/OrgChart.mjs +2 -2
- package/dist/components/PageHeader.d.mts +140 -0
- package/dist/components/PageHeader.mjs +11 -0
- package/dist/components/Pagination.d.mts +5 -5
- package/dist/components/Pagination.mjs +1 -1
- package/dist/components/PieChart.d.mts +3 -3
- package/dist/components/PieChart.mjs +4 -4
- package/dist/components/Popconfirm.d.mts +4 -4
- package/dist/components/Popconfirm.mjs +2 -2
- package/dist/components/Popover.d.mts +5 -5
- package/dist/components/Popover.mjs +2 -2
- package/dist/components/Progress.d.mts +7 -7
- package/dist/components/QRCode.d.mts +4 -13
- package/dist/components/QRCode.mjs +1 -1
- package/dist/components/RadarChart.d.mts +3 -3
- package/dist/components/RadarChart.mjs +4 -4
- package/dist/components/Radio.d.mts +1 -1
- package/dist/components/Radio.mjs +1 -1
- package/dist/components/Rate.d.mts +1 -1
- package/dist/components/Rate.mjs +1 -1
- package/dist/components/Result.d.mts +1 -1
- package/dist/components/RichTextEditor.d.mts +4 -4
- package/dist/components/Row.d.mts +1 -1
- package/dist/components/ScatterChart.d.mts +3 -3
- package/dist/components/ScatterChart.mjs +5 -4
- package/dist/components/ScrollArea.d.mts +136 -0
- package/dist/components/ScrollArea.mjs +8 -0
- package/dist/components/ScrollSpy.d.mts +2 -2
- package/dist/components/ScrollSpy.mjs +1 -1
- package/dist/components/Segmented.d.mts +2 -2
- package/dist/components/Select.d.mts +3 -3
- package/dist/components/Signature.d.mts +6 -6
- package/dist/components/Signature.mjs +1 -1
- package/dist/components/Skeleton.d.mts +2 -2
- package/dist/components/Slider.d.mts +19 -1
- package/dist/components/Slider.mjs +1 -1
- package/dist/components/Space.d.mts +2 -2
- package/dist/components/SplitButton.d.mts +286 -0
- package/dist/components/SplitButton.mjs +12 -0
- package/dist/components/Splitter.d.mts +4 -4
- package/dist/components/Splitter.mjs +1 -1
- package/dist/components/Spotlight.d.mts +6 -6
- package/dist/components/Statistic.d.mts +1 -1
- package/dist/components/Stepper.d.mts +7 -1
- package/dist/components/Stepper.mjs +1 -1
- package/dist/components/Steps.d.mts +1 -1
- package/dist/components/SunburstChart.d.mts +2 -2
- package/dist/components/SunburstChart.mjs +4 -4
- package/dist/components/Switch.d.mts +22 -6
- package/dist/components/Switch.mjs +1 -1
- package/dist/components/Table.d.mts +9 -9
- package/dist/components/Table.mjs +3 -3
- package/dist/components/Tabs.d.mts +5 -5
- package/dist/components/Tag.d.mts +3 -3
- package/dist/components/TagsInput.d.mts +214 -0
- package/dist/components/TagsInput.mjs +12 -0
- package/dist/components/TaskBoard.d.mts +2 -2
- package/dist/components/TaskBoard.mjs +1 -1
- package/dist/components/Text.d.mts +3 -3
- package/dist/components/Textarea.d.mts +4 -4
- package/dist/components/Textarea.mjs +1 -1
- package/dist/components/TimePicker.d.mts +6 -6
- package/dist/components/Timeline.d.mts +2 -2
- package/dist/components/Tooltip.d.mts +2 -2
- package/dist/components/Tooltip.mjs +2 -2
- package/dist/components/Tour.d.mts +4 -4
- package/dist/components/Tour.mjs +1 -1
- package/dist/components/Transfer.d.mts +5 -4
- package/dist/components/Transfer.mjs +1 -1
- package/dist/components/Tree.d.mts +6 -6
- package/dist/components/TreeMapChart.d.mts +3 -3
- package/dist/components/TreeMapChart.mjs +4 -4
- package/dist/components/TreeSelect.d.mts +54 -3
- package/dist/components/TreeSelect.mjs +2 -1
- package/dist/components/Upload.d.mts +4 -4
- package/dist/components/Upload.mjs +1 -1
- package/dist/components/VirtualTable.d.mts +5 -5
- package/dist/components/Watermark.d.mts +6 -6
- package/dist/composables/useChartInteraction.d.mts +5 -0
- package/dist/composables/useChartInteraction.mjs +1 -1
- package/dist/index.d.mts +17 -1
- package/dist/index.mjs +406 -0
- package/package.json +117 -2
- package/dist/chunk-OTGGPXDT.mjs +0 -433
- package/dist/chunk-WC5MKASU.mjs +0 -393
|
@@ -0,0 +1,368 @@
|
|
|
1
|
+
// src/components/ImageCompare.ts
|
|
2
|
+
import { defineComponent, h, onBeforeUnmount, ref, watch } from "vue";
|
|
3
|
+
import {
|
|
4
|
+
composeComponentClasses,
|
|
5
|
+
getImageCompareAfterClasses,
|
|
6
|
+
getImageCompareBeforeClasses,
|
|
7
|
+
getImageCompareClipStyle,
|
|
8
|
+
getImageCompareHandleClasses,
|
|
9
|
+
getImageCompareHandleStyle,
|
|
10
|
+
getImageCompareImgClasses,
|
|
11
|
+
getImageCompareKeyboardPosition,
|
|
12
|
+
getImageCompareKnobClasses,
|
|
13
|
+
getImageCompareLineClasses,
|
|
14
|
+
getImageComparePositionFromPointer,
|
|
15
|
+
getImageCompareRootClasses,
|
|
16
|
+
getImageCompareRootStyle,
|
|
17
|
+
getImageComparePointerClientPoint,
|
|
18
|
+
isImageCompareInteractiveTarget,
|
|
19
|
+
isImageCompareVertical,
|
|
20
|
+
mergeStyleValues,
|
|
21
|
+
resolveImageCompareAriaLabel,
|
|
22
|
+
resolveImageCompareFit,
|
|
23
|
+
resolveImageCompareOrientation,
|
|
24
|
+
resolveImageComparePosition,
|
|
25
|
+
resolveImageCompareStep
|
|
26
|
+
} from "@expcat/tigercat-core";
|
|
27
|
+
function callAttrHandler(handler, event) {
|
|
28
|
+
if (typeof handler === "function") {
|
|
29
|
+
const listener = handler;
|
|
30
|
+
listener(event);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
var ImageCompare = defineComponent({
|
|
34
|
+
name: "TigerImageCompare",
|
|
35
|
+
inheritAttrs: false,
|
|
36
|
+
props: {
|
|
37
|
+
/**
|
|
38
|
+
* Before (starting) image URL. The `before` slot takes precedence when provided.
|
|
39
|
+
*/
|
|
40
|
+
beforeSrc: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: void 0
|
|
43
|
+
},
|
|
44
|
+
/**
|
|
45
|
+
* After (ending) image URL. The `after` slot takes precedence when provided.
|
|
46
|
+
*/
|
|
47
|
+
afterSrc: {
|
|
48
|
+
type: String,
|
|
49
|
+
default: void 0
|
|
50
|
+
},
|
|
51
|
+
/**
|
|
52
|
+
* Alternative text for the before image
|
|
53
|
+
* @default ''
|
|
54
|
+
*/
|
|
55
|
+
beforeAlt: {
|
|
56
|
+
type: String,
|
|
57
|
+
default: ""
|
|
58
|
+
},
|
|
59
|
+
/**
|
|
60
|
+
* Alternative text for the after image
|
|
61
|
+
* @default ''
|
|
62
|
+
*/
|
|
63
|
+
afterAlt: {
|
|
64
|
+
type: String,
|
|
65
|
+
default: ""
|
|
66
|
+
},
|
|
67
|
+
/**
|
|
68
|
+
* Object-fit applied to the before/after `<img>` elements
|
|
69
|
+
* @default 'cover'
|
|
70
|
+
*/
|
|
71
|
+
fit: {
|
|
72
|
+
type: String,
|
|
73
|
+
default: "cover"
|
|
74
|
+
},
|
|
75
|
+
/**
|
|
76
|
+
* Handle position as a percentage of the before image that is visible
|
|
77
|
+
* (controlled mode)
|
|
78
|
+
*/
|
|
79
|
+
position: {
|
|
80
|
+
type: Number,
|
|
81
|
+
default: void 0
|
|
82
|
+
},
|
|
83
|
+
/**
|
|
84
|
+
* Initial handle position (uncontrolled mode)
|
|
85
|
+
* @default 50
|
|
86
|
+
*/
|
|
87
|
+
defaultPosition: {
|
|
88
|
+
type: Number,
|
|
89
|
+
default: void 0
|
|
90
|
+
},
|
|
91
|
+
/**
|
|
92
|
+
* Comparison axis
|
|
93
|
+
* @default 'horizontal'
|
|
94
|
+
*/
|
|
95
|
+
orientation: {
|
|
96
|
+
type: String,
|
|
97
|
+
default: "horizontal"
|
|
98
|
+
},
|
|
99
|
+
/**
|
|
100
|
+
* Keyboard and pointer snap increment, in percentage points
|
|
101
|
+
* @default 1
|
|
102
|
+
*/
|
|
103
|
+
step: {
|
|
104
|
+
type: Number,
|
|
105
|
+
default: void 0
|
|
106
|
+
},
|
|
107
|
+
/**
|
|
108
|
+
* Whether pointer and keyboard adjustment are disabled
|
|
109
|
+
* @default false
|
|
110
|
+
*/
|
|
111
|
+
disabled: {
|
|
112
|
+
type: Boolean,
|
|
113
|
+
default: false
|
|
114
|
+
},
|
|
115
|
+
/**
|
|
116
|
+
* Root width (CSS value). A number is treated as pixels.
|
|
117
|
+
*/
|
|
118
|
+
width: {
|
|
119
|
+
type: [Number, String],
|
|
120
|
+
default: void 0
|
|
121
|
+
},
|
|
122
|
+
/**
|
|
123
|
+
* Root height (CSS value). A number is treated as pixels.
|
|
124
|
+
*/
|
|
125
|
+
height: {
|
|
126
|
+
type: [Number, String],
|
|
127
|
+
default: void 0
|
|
128
|
+
},
|
|
129
|
+
/**
|
|
130
|
+
* Accessible name for the comparison handle
|
|
131
|
+
* @default 'Image comparison'
|
|
132
|
+
*/
|
|
133
|
+
ariaLabel: {
|
|
134
|
+
type: String,
|
|
135
|
+
default: void 0
|
|
136
|
+
},
|
|
137
|
+
/**
|
|
138
|
+
* Additional CSS classes
|
|
139
|
+
*/
|
|
140
|
+
className: {
|
|
141
|
+
type: String,
|
|
142
|
+
default: void 0
|
|
143
|
+
},
|
|
144
|
+
/**
|
|
145
|
+
* Inline styles
|
|
146
|
+
*/
|
|
147
|
+
style: {
|
|
148
|
+
type: Object,
|
|
149
|
+
default: void 0
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
emits: {
|
|
153
|
+
/**
|
|
154
|
+
* Emitted when the handle position changes (for v-model:position)
|
|
155
|
+
*/
|
|
156
|
+
"update:position": (value) => typeof value === "number",
|
|
157
|
+
/**
|
|
158
|
+
* Emitted when the handle position changes
|
|
159
|
+
*/
|
|
160
|
+
change: (value) => typeof value === "number"
|
|
161
|
+
},
|
|
162
|
+
setup(props, { slots, emit, attrs }) {
|
|
163
|
+
const rootRef = ref(null);
|
|
164
|
+
const handleRef = ref(null);
|
|
165
|
+
const dragging = ref(false);
|
|
166
|
+
const internalPosition = ref(
|
|
167
|
+
resolveImageComparePosition(props.position ?? props.defaultPosition, props.step)
|
|
168
|
+
);
|
|
169
|
+
watch(
|
|
170
|
+
() => props.position,
|
|
171
|
+
(value) => {
|
|
172
|
+
if (value !== void 0) {
|
|
173
|
+
internalPosition.value = resolveImageComparePosition(value, props.step);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
);
|
|
177
|
+
const currentPosition = () => resolveImageComparePosition(
|
|
178
|
+
props.position !== void 0 ? props.position : internalPosition.value,
|
|
179
|
+
props.step
|
|
180
|
+
);
|
|
181
|
+
const commit = (next) => {
|
|
182
|
+
const resolved = resolveImageComparePosition(next, props.step);
|
|
183
|
+
if (props.position === void 0) {
|
|
184
|
+
internalPosition.value = resolved;
|
|
185
|
+
}
|
|
186
|
+
emit("update:position", resolved);
|
|
187
|
+
emit("change", resolved);
|
|
188
|
+
};
|
|
189
|
+
const positionFromEvent = (event) => {
|
|
190
|
+
const root = rootRef.value;
|
|
191
|
+
const point = getImageComparePointerClientPoint(event);
|
|
192
|
+
if (!root || !point) return null;
|
|
193
|
+
return getImageComparePositionFromPointer({
|
|
194
|
+
clientX: point.clientX,
|
|
195
|
+
clientY: point.clientY,
|
|
196
|
+
rect: root.getBoundingClientRect(),
|
|
197
|
+
orientation: props.orientation,
|
|
198
|
+
step: props.step
|
|
199
|
+
});
|
|
200
|
+
};
|
|
201
|
+
const handleMove = (event) => {
|
|
202
|
+
if (props.disabled || !dragging.value) return;
|
|
203
|
+
const next = positionFromEvent(event);
|
|
204
|
+
if (next === null) return;
|
|
205
|
+
commit(next);
|
|
206
|
+
};
|
|
207
|
+
const handleEnd = () => {
|
|
208
|
+
dragging.value = false;
|
|
209
|
+
document.removeEventListener("mousemove", handleMove);
|
|
210
|
+
document.removeEventListener("mouseup", handleEnd);
|
|
211
|
+
document.removeEventListener("touchmove", handleMove);
|
|
212
|
+
document.removeEventListener("touchend", handleEnd);
|
|
213
|
+
};
|
|
214
|
+
const startDrag = (event) => {
|
|
215
|
+
if (props.disabled) return;
|
|
216
|
+
if ("button" in event && event.button !== 0) return;
|
|
217
|
+
if (isImageCompareInteractiveTarget(event.target, handleRef.value)) return;
|
|
218
|
+
event.preventDefault();
|
|
219
|
+
const alreadyDragging = dragging.value;
|
|
220
|
+
dragging.value = true;
|
|
221
|
+
const next = positionFromEvent(event);
|
|
222
|
+
if (next !== null) commit(next);
|
|
223
|
+
handleRef.value?.focus();
|
|
224
|
+
if (alreadyDragging) return;
|
|
225
|
+
document.addEventListener("mousemove", handleMove);
|
|
226
|
+
document.addEventListener("mouseup", handleEnd);
|
|
227
|
+
document.addEventListener("touchmove", handleMove);
|
|
228
|
+
document.addEventListener("touchend", handleEnd);
|
|
229
|
+
};
|
|
230
|
+
onBeforeUnmount(handleEnd);
|
|
231
|
+
const renderPaneContent = (slot, src, alt) => {
|
|
232
|
+
if (slot) return slot();
|
|
233
|
+
if (!src) return null;
|
|
234
|
+
return h("img", {
|
|
235
|
+
src,
|
|
236
|
+
alt,
|
|
237
|
+
class: getImageCompareImgClasses(resolveImageCompareFit(props.fit)),
|
|
238
|
+
draggable: false
|
|
239
|
+
});
|
|
240
|
+
};
|
|
241
|
+
return () => {
|
|
242
|
+
const attrsRecord = attrs;
|
|
243
|
+
const orientation = resolveImageCompareOrientation(props.orientation);
|
|
244
|
+
const step = resolveImageCompareStep(props.step);
|
|
245
|
+
const position = currentPosition();
|
|
246
|
+
const vertical = isImageCompareVertical(orientation);
|
|
247
|
+
const attrAriaLabel = typeof attrsRecord["aria-label"] === "string" ? attrsRecord["aria-label"] : void 0;
|
|
248
|
+
const ariaLabel = resolveImageCompareAriaLabel(attrAriaLabel ?? props.ariaLabel);
|
|
249
|
+
const {
|
|
250
|
+
class: _class,
|
|
251
|
+
style: _style,
|
|
252
|
+
"aria-label": _ariaLabel,
|
|
253
|
+
"aria-labelledby": ariaLabelledby,
|
|
254
|
+
"aria-describedby": ariaDescribedby,
|
|
255
|
+
onMousedown,
|
|
256
|
+
onMouseDown,
|
|
257
|
+
onTouchstart,
|
|
258
|
+
onTouchStart,
|
|
259
|
+
...restAttrs
|
|
260
|
+
} = attrsRecord;
|
|
261
|
+
return h(
|
|
262
|
+
"div",
|
|
263
|
+
{
|
|
264
|
+
...restAttrs,
|
|
265
|
+
ref: rootRef,
|
|
266
|
+
class: composeComponentClasses(
|
|
267
|
+
getImageCompareRootClasses({
|
|
268
|
+
orientation,
|
|
269
|
+
disabled: props.disabled,
|
|
270
|
+
className: props.className
|
|
271
|
+
}),
|
|
272
|
+
attrsRecord.class
|
|
273
|
+
),
|
|
274
|
+
style: mergeStyleValues(
|
|
275
|
+
getImageCompareRootStyle({
|
|
276
|
+
position,
|
|
277
|
+
step,
|
|
278
|
+
width: props.width,
|
|
279
|
+
height: props.height
|
|
280
|
+
}),
|
|
281
|
+
attrsRecord.style,
|
|
282
|
+
props.style
|
|
283
|
+
),
|
|
284
|
+
"data-image-compare": "",
|
|
285
|
+
"data-image-compare-orientation": orientation,
|
|
286
|
+
"data-image-compare-position": String(position),
|
|
287
|
+
"data-image-compare-disabled": props.disabled ? "true" : "false",
|
|
288
|
+
"data-image-compare-dragging": dragging.value ? "true" : "false",
|
|
289
|
+
onMousedown: (event) => {
|
|
290
|
+
startDrag(event);
|
|
291
|
+
callAttrHandler(onMousedown ?? onMouseDown, event);
|
|
292
|
+
},
|
|
293
|
+
onTouchstart: (event) => {
|
|
294
|
+
startDrag(event);
|
|
295
|
+
callAttrHandler(onTouchstart ?? onTouchStart, event);
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
[
|
|
299
|
+
h(
|
|
300
|
+
"div",
|
|
301
|
+
{
|
|
302
|
+
class: getImageCompareAfterClasses(),
|
|
303
|
+
"data-image-compare-after": ""
|
|
304
|
+
},
|
|
305
|
+
[renderPaneContent(slots.after, props.afterSrc, props.afterAlt)]
|
|
306
|
+
),
|
|
307
|
+
h(
|
|
308
|
+
"div",
|
|
309
|
+
{
|
|
310
|
+
class: getImageCompareBeforeClasses(),
|
|
311
|
+
style: getImageCompareClipStyle(position, orientation, step),
|
|
312
|
+
"data-image-compare-before": ""
|
|
313
|
+
},
|
|
314
|
+
[renderPaneContent(slots.before, props.beforeSrc, props.beforeAlt)]
|
|
315
|
+
),
|
|
316
|
+
h(
|
|
317
|
+
"div",
|
|
318
|
+
{
|
|
319
|
+
ref: handleRef,
|
|
320
|
+
class: getImageCompareHandleClasses({
|
|
321
|
+
orientation,
|
|
322
|
+
disabled: props.disabled
|
|
323
|
+
}),
|
|
324
|
+
style: getImageCompareHandleStyle(position, orientation, step),
|
|
325
|
+
"data-image-compare-handle": "",
|
|
326
|
+
role: "slider",
|
|
327
|
+
tabindex: props.disabled ? -1 : 0,
|
|
328
|
+
"aria-label": ariaLabel,
|
|
329
|
+
"aria-labelledby": ariaLabelledby,
|
|
330
|
+
"aria-describedby": ariaDescribedby,
|
|
331
|
+
"aria-valuemin": 0,
|
|
332
|
+
"aria-valuemax": 100,
|
|
333
|
+
"aria-valuenow": position,
|
|
334
|
+
"aria-valuetext": `${position}%`,
|
|
335
|
+
"aria-orientation": vertical ? "vertical" : "horizontal",
|
|
336
|
+
"aria-disabled": props.disabled,
|
|
337
|
+
onKeydown: (event) => {
|
|
338
|
+
if (props.disabled) return;
|
|
339
|
+
const next = getImageCompareKeyboardPosition(event.key, position, step);
|
|
340
|
+
if (next === null) return;
|
|
341
|
+
event.preventDefault();
|
|
342
|
+
commit(next);
|
|
343
|
+
}
|
|
344
|
+
},
|
|
345
|
+
[
|
|
346
|
+
h("div", {
|
|
347
|
+
class: getImageCompareLineClasses(orientation),
|
|
348
|
+
"data-image-compare-line": "",
|
|
349
|
+
"aria-hidden": "true"
|
|
350
|
+
}),
|
|
351
|
+
h("div", {
|
|
352
|
+
class: getImageCompareKnobClasses(),
|
|
353
|
+
"data-image-compare-knob": "",
|
|
354
|
+
"aria-hidden": "true"
|
|
355
|
+
})
|
|
356
|
+
]
|
|
357
|
+
)
|
|
358
|
+
]
|
|
359
|
+
);
|
|
360
|
+
};
|
|
361
|
+
}
|
|
362
|
+
});
|
|
363
|
+
var ImageCompare_default = ImageCompare;
|
|
364
|
+
|
|
365
|
+
export {
|
|
366
|
+
ImageCompare,
|
|
367
|
+
ImageCompare_default
|
|
368
|
+
};
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
// src/components/Highlight.ts
|
|
2
|
+
import { Comment, defineComponent, h } from "vue";
|
|
3
|
+
import {
|
|
4
|
+
composeComponentClasses,
|
|
5
|
+
getHighlightMarkClasses,
|
|
6
|
+
getHighlightRootClasses,
|
|
7
|
+
getHighlightSegments,
|
|
8
|
+
mergeStyleValues,
|
|
9
|
+
resolveHighlightText
|
|
10
|
+
} from "@expcat/tigercat-core";
|
|
11
|
+
function flattenVueText(input) {
|
|
12
|
+
if (input == null || typeof input === "boolean") return "";
|
|
13
|
+
if (typeof input === "string" || typeof input === "number") return String(input);
|
|
14
|
+
if (typeof input === "function") {
|
|
15
|
+
return flattenVueText(input());
|
|
16
|
+
}
|
|
17
|
+
if (Array.isArray(input)) {
|
|
18
|
+
let out = "";
|
|
19
|
+
for (const item of input) out += flattenVueText(item);
|
|
20
|
+
return out;
|
|
21
|
+
}
|
|
22
|
+
if (typeof input !== "object") return "";
|
|
23
|
+
const node = input;
|
|
24
|
+
if (node.type === Comment) return "";
|
|
25
|
+
if (typeof node.children === "string" || typeof node.children === "number") {
|
|
26
|
+
return String(node.children);
|
|
27
|
+
}
|
|
28
|
+
if (typeof node.children === "function") {
|
|
29
|
+
return flattenVueText(node.children());
|
|
30
|
+
}
|
|
31
|
+
if (Array.isArray(node.children)) {
|
|
32
|
+
return flattenVueText(node.children);
|
|
33
|
+
}
|
|
34
|
+
if (node.children && typeof node.children === "object") {
|
|
35
|
+
const slots = node.children;
|
|
36
|
+
if (typeof slots.default === "function") {
|
|
37
|
+
return flattenVueText(slots.default());
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return "";
|
|
41
|
+
}
|
|
42
|
+
var Highlight = defineComponent({
|
|
43
|
+
name: "TigerHighlight",
|
|
44
|
+
inheritAttrs: false,
|
|
45
|
+
props: {
|
|
46
|
+
/**
|
|
47
|
+
* Source text to search. When omitted, the default slot is flattened to a string.
|
|
48
|
+
*/
|
|
49
|
+
text: {
|
|
50
|
+
type: String,
|
|
51
|
+
default: void 0
|
|
52
|
+
},
|
|
53
|
+
/**
|
|
54
|
+
* Keyword string(s) and/or regular expression(s) to highlight.
|
|
55
|
+
*/
|
|
56
|
+
keywords: {
|
|
57
|
+
type: [String, Array, RegExp],
|
|
58
|
+
default: void 0
|
|
59
|
+
},
|
|
60
|
+
/**
|
|
61
|
+
* Match case for string keywords. Regular expressions keep their own `i` flag.
|
|
62
|
+
* @default false
|
|
63
|
+
*/
|
|
64
|
+
caseSensitive: {
|
|
65
|
+
type: Boolean,
|
|
66
|
+
default: false
|
|
67
|
+
},
|
|
68
|
+
/**
|
|
69
|
+
* Highlight every occurrence. When false, only the first match of each keyword.
|
|
70
|
+
* @default true
|
|
71
|
+
*/
|
|
72
|
+
global: {
|
|
73
|
+
type: Boolean,
|
|
74
|
+
default: true
|
|
75
|
+
},
|
|
76
|
+
/**
|
|
77
|
+
* Additional CSS classes on highlighted `mark` elements
|
|
78
|
+
*/
|
|
79
|
+
highlightClassName: {
|
|
80
|
+
type: String,
|
|
81
|
+
default: void 0
|
|
82
|
+
},
|
|
83
|
+
/**
|
|
84
|
+
* Inline styles on highlighted `mark` elements
|
|
85
|
+
*/
|
|
86
|
+
highlightStyle: {
|
|
87
|
+
type: Object,
|
|
88
|
+
default: void 0
|
|
89
|
+
},
|
|
90
|
+
/**
|
|
91
|
+
* Additional CSS classes
|
|
92
|
+
*/
|
|
93
|
+
className: {
|
|
94
|
+
type: String,
|
|
95
|
+
default: void 0
|
|
96
|
+
},
|
|
97
|
+
/**
|
|
98
|
+
* Inline styles
|
|
99
|
+
*/
|
|
100
|
+
style: {
|
|
101
|
+
type: Object,
|
|
102
|
+
default: void 0
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
setup(props, { slots, attrs }) {
|
|
106
|
+
return () => {
|
|
107
|
+
const attrsRecord = attrs;
|
|
108
|
+
const source = resolveHighlightText(props.text, flattenVueText(slots.default?.()));
|
|
109
|
+
const segments = getHighlightSegments(source, props.keywords, {
|
|
110
|
+
caseSensitive: props.caseSensitive,
|
|
111
|
+
global: props.global
|
|
112
|
+
});
|
|
113
|
+
const markClasses = getHighlightMarkClasses(props.highlightClassName);
|
|
114
|
+
const markStyle = mergeStyleValues(props.highlightStyle);
|
|
115
|
+
const children = [];
|
|
116
|
+
for (const segment of segments) {
|
|
117
|
+
if (segment.highlighted) {
|
|
118
|
+
children.push(
|
|
119
|
+
h(
|
|
120
|
+
"mark",
|
|
121
|
+
{
|
|
122
|
+
class: markClasses,
|
|
123
|
+
style: markStyle,
|
|
124
|
+
"data-highlight-mark": ""
|
|
125
|
+
},
|
|
126
|
+
segment.text
|
|
127
|
+
)
|
|
128
|
+
);
|
|
129
|
+
} else {
|
|
130
|
+
children.push(segment.text);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
return h(
|
|
134
|
+
"span",
|
|
135
|
+
{
|
|
136
|
+
...attrs,
|
|
137
|
+
class: composeComponentClasses(
|
|
138
|
+
getHighlightRootClasses(props.className),
|
|
139
|
+
attrsRecord.class
|
|
140
|
+
),
|
|
141
|
+
style: mergeStyleValues(attrsRecord.style, props.style),
|
|
142
|
+
"data-highlight": "",
|
|
143
|
+
"data-highlight-case-sensitive": props.caseSensitive ? "true" : "false",
|
|
144
|
+
"data-highlight-global": props.global ? "true" : "false"
|
|
145
|
+
},
|
|
146
|
+
children
|
|
147
|
+
);
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
var Highlight_default = Highlight;
|
|
152
|
+
|
|
153
|
+
export {
|
|
154
|
+
Highlight,
|
|
155
|
+
Highlight_default
|
|
156
|
+
};
|
|
@@ -30,11 +30,14 @@ import {
|
|
|
30
30
|
kanbanSwimlaneCollapsedClasses,
|
|
31
31
|
kanbanAddColumnClasses,
|
|
32
32
|
filterColumns,
|
|
33
|
+
filterCards,
|
|
33
34
|
groupBySwimlane,
|
|
34
35
|
getColumnCardCount,
|
|
35
36
|
moveCard,
|
|
37
|
+
mapVisibleCardIndexToSource,
|
|
36
38
|
reorderColumns,
|
|
37
39
|
isWipExceeded,
|
|
40
|
+
appendDefaultTaskBoardCard,
|
|
38
41
|
createTaskBoardDragController,
|
|
39
42
|
createDefaultDragSnapshot
|
|
40
43
|
} from "@expcat/tigercat-core";
|
|
@@ -139,10 +142,22 @@ var TaskBoard = defineComponent({
|
|
|
139
142
|
innerColumns.value = next;
|
|
140
143
|
emit("update:columns", next);
|
|
141
144
|
};
|
|
145
|
+
const addCardToColumn = (columnId) => {
|
|
146
|
+
emit("card-add", columnId);
|
|
147
|
+
if (props.onCardAdd == null) {
|
|
148
|
+
updateColumns(appendDefaultTaskBoardCard(currentColumns.value, columnId));
|
|
149
|
+
}
|
|
150
|
+
};
|
|
142
151
|
const dragSnap = ref(createDefaultDragSnapshot());
|
|
143
152
|
const boardRef = ref(null);
|
|
144
153
|
const applyCardMove = async (cardId, fromColumnId, toColumnId, toIdx) => {
|
|
145
|
-
const
|
|
154
|
+
const sourceCol = currentColumns.value.find((c) => c.id === toColumnId);
|
|
155
|
+
const mappedIdx = sourceCol == null ? toIdx : mapVisibleCardIndexToSource(
|
|
156
|
+
sourceCol.cards,
|
|
157
|
+
filterCards(sourceCol.cards, props.filterText || ""),
|
|
158
|
+
toIdx
|
|
159
|
+
);
|
|
160
|
+
const result = moveCard(currentColumns.value, cardId, fromColumnId, toColumnId, mappedIdx, {
|
|
146
161
|
enforceWipLimit: props.enforceWipLimit
|
|
147
162
|
});
|
|
148
163
|
if (!result) return;
|
|
@@ -395,12 +410,12 @@ var TaskBoard = defineComponent({
|
|
|
395
410
|
role: "button",
|
|
396
411
|
tabindex: 0,
|
|
397
412
|
onClick: () => {
|
|
398
|
-
|
|
413
|
+
addCardToColumn(column.id);
|
|
399
414
|
},
|
|
400
415
|
onKeydown: (e) => {
|
|
401
416
|
if (e.key === "Enter" || e.key === " ") {
|
|
402
417
|
e.preventDefault();
|
|
403
|
-
|
|
418
|
+
addCardToColumn(column.id);
|
|
404
419
|
}
|
|
405
420
|
}
|
|
406
421
|
},
|
|
@@ -271,6 +271,7 @@ var InputNumber = defineComponent({
|
|
|
271
271
|
});
|
|
272
272
|
onBeforeUnmount(() => repeatController.stop());
|
|
273
273
|
return () => {
|
|
274
|
+
const { class: _attrClass, style: attrStyle, ...restAttrs } = attrs;
|
|
274
275
|
const children = [];
|
|
275
276
|
if (props.controls && props.controlsPosition === "both") {
|
|
276
277
|
children.push(
|
|
@@ -307,6 +308,7 @@ var InputNumber = defineComponent({
|
|
|
307
308
|
}
|
|
308
309
|
children.push(
|
|
309
310
|
h("input", {
|
|
311
|
+
...restAttrs,
|
|
310
312
|
ref: inputRef,
|
|
311
313
|
type: "text",
|
|
312
314
|
inputmode: "decimal",
|
|
@@ -423,7 +425,8 @@ var InputNumber = defineComponent({
|
|
|
423
425
|
return h(
|
|
424
426
|
"div",
|
|
425
427
|
{
|
|
426
|
-
class: wrapperClasses.value
|
|
428
|
+
class: wrapperClasses.value,
|
|
429
|
+
style: attrStyle
|
|
427
430
|
},
|
|
428
431
|
children
|
|
429
432
|
);
|
|
@@ -26,7 +26,6 @@ var QRCode = defineComponent({
|
|
|
26
26
|
size: { type: Number, default: 128 },
|
|
27
27
|
color: { type: String, default: "#000000" },
|
|
28
28
|
bgColor: { type: String, default: "#ffffff" },
|
|
29
|
-
level: { type: String, default: "M" },
|
|
30
29
|
status: { type: String, default: "active" },
|
|
31
30
|
className: { type: String, default: void 0 },
|
|
32
31
|
locale: { type: Object, default: void 0 }
|
|
@@ -227,12 +227,15 @@ var FormWizard = defineComponent({
|
|
|
227
227
|
setCurrent(target);
|
|
228
228
|
};
|
|
229
229
|
const handleStepChange = async (nextIndex) => {
|
|
230
|
-
if (nextIndex === currentIndex.value
|
|
231
|
-
|
|
230
|
+
if (nextIndex === currentIndex.value) return;
|
|
231
|
+
const direction = nextIndex > currentIndex.value ? 1 : -1;
|
|
232
|
+
if (direction === 1) {
|
|
232
233
|
const ok = await runBeforeNext();
|
|
233
234
|
if (!ok) return;
|
|
234
235
|
}
|
|
235
|
-
|
|
236
|
+
const target = findNextUnskipped(nextIndex, direction);
|
|
237
|
+
if (target === currentIndex.value) return;
|
|
238
|
+
setCurrent(target);
|
|
236
239
|
};
|
|
237
240
|
const renderContent = () => {
|
|
238
241
|
if (!currentStep.value) {
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TaskBoard
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BOHE5URZ.mjs";
|
|
4
4
|
|
|
5
5
|
// src/components/Kanban.ts
|
|
6
|
-
import { defineComponent, h } from "vue";
|
|
6
|
+
import { defineComponent, h, ref } from "vue";
|
|
7
|
+
import {
|
|
8
|
+
appendDefaultTaskBoardCard
|
|
9
|
+
} from "@expcat/tigercat-core";
|
|
7
10
|
var Kanban = defineComponent({
|
|
8
11
|
name: "TigerKanban",
|
|
9
12
|
inheritAttrs: false,
|
|
@@ -59,7 +62,14 @@ var Kanban = defineComponent({
|
|
|
59
62
|
},
|
|
60
63
|
emits: ["card-move", "column-move", "update:columns", "card-add", "column-add"],
|
|
61
64
|
setup(props, { emit, attrs, slots }) {
|
|
65
|
+
const pendingColumns = ref(void 0);
|
|
62
66
|
const handleCardAdd = (colId) => {
|
|
67
|
+
if (props.onCardAdd == null) {
|
|
68
|
+
const source = props.columns ?? pendingColumns.value ?? props.defaultColumns;
|
|
69
|
+
const next = appendDefaultTaskBoardCard(source, colId);
|
|
70
|
+
pendingColumns.value = next;
|
|
71
|
+
emit("update:columns", next);
|
|
72
|
+
}
|
|
63
73
|
props.onCardAdd?.(colId);
|
|
64
74
|
emit("card-add", colId);
|
|
65
75
|
};
|
|
@@ -67,14 +77,13 @@ var Kanban = defineComponent({
|
|
|
67
77
|
TaskBoard,
|
|
68
78
|
{
|
|
69
79
|
...attrs,
|
|
70
|
-
columns: props.columns,
|
|
80
|
+
columns: props.columns !== void 0 ? props.columns : pendingColumns.value,
|
|
71
81
|
defaultColumns: props.defaultColumns,
|
|
72
82
|
draggable: props.draggable,
|
|
73
83
|
columnDraggable: props.columnDraggable,
|
|
74
84
|
enforceWipLimit: props.enforceWipLimit,
|
|
75
85
|
beforeCardMove: props.beforeCardMove,
|
|
76
86
|
beforeColumnMove: props.beforeColumnMove,
|
|
77
|
-
// Only set onCardAdd when needed — its presence affects button visibility
|
|
78
87
|
onCardAdd: props.allowAddCard || props.onCardAdd ? handleCardAdd : void 0,
|
|
79
88
|
filterText: props.filterText,
|
|
80
89
|
hiddenColumns: props.hiddenColumns,
|
|
@@ -88,7 +97,10 @@ var Kanban = defineComponent({
|
|
|
88
97
|
style: props.style,
|
|
89
98
|
"onCard-move": (e) => emit("card-move", e),
|
|
90
99
|
"onColumn-move": (e) => emit("column-move", e),
|
|
91
|
-
"onUpdate:columns": (cols) =>
|
|
100
|
+
"onUpdate:columns": (cols) => {
|
|
101
|
+
pendingColumns.value = cols;
|
|
102
|
+
emit("update:columns", cols);
|
|
103
|
+
},
|
|
92
104
|
"onColumn-add": () => emit("column-add")
|
|
93
105
|
},
|
|
94
106
|
slots
|