@seanyeh77/ui 0.50.1 → 0.52.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/bundle.js +16 -16
- package/dist/components/DataTable/DataTable.js +8 -2
- package/dist/components/DataTable/DataTable.js.map +1 -1
- package/dist/components/FloorPlan/FloorPlan.d.ts +20 -0
- package/dist/components/FloorPlan/FloorPlan.js +79 -35
- package/dist/components/FloorPlan/FloorPlan.js.map +1 -1
- package/dist/components/ZoneMap/ZoneMap.d.ts +3 -0
- package/dist/components/ZoneMap/ZoneMap.js.map +1 -1
- package/dist/format-entry.d.ts +2 -2
- package/dist/format-entry.js +2 -2
- package/dist/format.d.ts +3 -1
- package/dist/format.js +16 -13
- package/dist/format.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -2
- package/dist/internal/tableTools.js.map +1 -1
- package/dist/internal/zone.js +13 -5
- package/dist/internal/zone.js.map +1 -1
- package/docs/FloorPlan.md +66 -7
- package/docs/Format.md +2 -1
- package/docs/ZoneMap.md +1 -0
- package/docs/agents.md +5 -5
- package/docs/guidelines.md +1 -1
- package/package.json +2 -2
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Button } from "../Button/Button.js";
|
|
3
3
|
import { SearchField } from "../SearchField/SearchField.js";
|
|
4
4
|
import { Tabs } from "../Tabs/Tabs.js";
|
|
5
|
-
import { format } from "../../format.js";
|
|
5
|
+
import { format, plainMinus } from "../../format.js";
|
|
6
6
|
import { tr, unitFor } from "../../i18n.js";
|
|
7
7
|
import { Icon } from "../../icons/Icon.js";
|
|
8
8
|
import { TOUCH_ONLY, copyText, cssZoom, cx, idPart, monoNums, reduced, resizeObserver, seenOnly, useMedia, useNarrow } from "../../internal/util.js";
|
|
@@ -1019,7 +1019,7 @@ function DataTable(p) {
|
|
|
1019
1019
|
const [copied, setCopied] = React.useState(false);
|
|
1020
1020
|
const copiedTimer = React.useRef(void 0);
|
|
1021
1021
|
React.useEffect(() => () => clearTimeout(copiedTimer.current), []);
|
|
1022
|
-
const doCopy = () => copyText(copyMarkdown()).then(() => {
|
|
1022
|
+
const doCopy = () => copyText(plainMinus(copyMarkdown())).then(() => {
|
|
1023
1023
|
setCopied(true);
|
|
1024
1024
|
announce(tr("已複製"));
|
|
1025
1025
|
clearTimeout(copiedTimer.current);
|
|
@@ -1499,6 +1499,12 @@ function DataTable(p) {
|
|
|
1499
1499
|
ref: rootRef,
|
|
1500
1500
|
className: cx("ui-dt", search === false && "is-nosearch", selIds.length && "has-sel", hasAct && "has-acts", p.className),
|
|
1501
1501
|
style: hasAct ? { "--dt-acts-w": (p.actionsWidth ?? actsW ?? 72) + "px" } : void 0,
|
|
1502
|
+
onCopy: (e) => {
|
|
1503
|
+
const text = typeof window !== "undefined" ? window.getSelection()?.toString() ?? "" : "";
|
|
1504
|
+
if (!text.includes("−") || !e.clipboardData) return;
|
|
1505
|
+
e.preventDefault();
|
|
1506
|
+
e.clipboardData.setData("text/plain", plainMinus(text));
|
|
1507
|
+
},
|
|
1502
1508
|
children: [
|
|
1503
1509
|
p.caption && search !== false ? /* @__PURE__ */ jsx("div", {
|
|
1504
1510
|
className: "ui-dt-caption",
|