impact-nova 3.0.0-alpha.3 → 3.0.0-alpha.5
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/_virtual/index.js +4 -4
- package/dist/_virtual/index2.js +4 -4
- package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +2 -3
- package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +2 -3
- package/dist/components/data/expandable-list-item/sku-picker-chrome.d.ts +2 -1
- package/dist/components/data/expandable-list-item/sku-picker-chrome.js +42 -34
- package/dist/components/data/expandable-list-item/useServerSkuInfinitePages.d.ts +2 -1
- package/dist/components/data/expandable-list-item/virtualized-responsive-grid.catalog.d.ts +4 -3
- package/dist/components/feedback/tooltip/button-icon-tooltip.d.ts +4 -1
- package/dist/components/feedback/tooltip/button-icon-tooltip.js +14 -12
- package/dist/components/feedback/tooltip/tab-tooltip-render.js +2 -3
- package/dist/components/feedback/tooltip/use-overflow-tooltip.js +44 -36
- package/dist/components/flows/command-palette/shortcut-settings.js +10 -10
- package/dist/components/flows/filter-panel/filter-panel.js +4 -4
- package/dist/components/flows/iris-chat/iris-chat-menu.js +100 -73
- package/dist/components/forms/choice-card/choice-card.variants.js +3 -3
- package/dist/components/forms/select/components/SelectMenuPanel.js +15 -15
- package/dist/components/forms/select/components/SelectTriggerValue.js +2 -3
- package/dist/components/forms/select/components/Submenu.js +2 -3
- package/dist/components/layout/horizontal-scroller/horizontal-scroller-mask.d.ts +3 -0
- package/dist/components/layout/horizontal-scroller/horizontal-scroller-mask.js +12 -0
- package/dist/components/layout/horizontal-scroller/horizontal-scroller.js +181 -125
- package/dist/components/layout/horizontal-scroller/horizontal-scroller.types.d.ts +2 -0
- package/dist/components/layout/horizontal-scroller/scroll-overflow-affordance.d.ts +3 -1
- package/dist/components/layout/horizontal-scroller/scroll-overflow-affordance.js +77 -67
- package/dist/components/primitives/iris/iris-insight-truncated-text.d.ts +3 -0
- package/dist/components/primitives/iris/iris-insight-truncated-text.js +33 -0
- package/dist/components/primitives/iris/iris.d.ts +3 -1
- package/dist/components/primitives/iris/iris.js +76 -84
- package/dist/components/primitives/iris/iris.types.d.ts +9 -0
- package/dist/form-react/Fields/VirtualizedListField.js +76 -66
- package/dist/impact-nova-components.css +3 -4
- package/dist/impact-nova.css +1 -1
- package/dist/lib/alphabetical-sort.d.ts +3 -0
- package/dist/lib/alphabetical-sort.js +13 -0
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +1 -1
- package/dist/node_modules/unified/lib/index.js +1 -1
- package/package.json +2 -2
package/dist/_virtual/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { getDefaultExportFromCjs as
|
|
2
|
-
import { __require as
|
|
3
|
-
var t =
|
|
4
|
-
const a = /* @__PURE__ */
|
|
1
|
+
import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
|
|
2
|
+
import { __require as o } from "../node_modules/style-to-js/cjs/index.js";
|
|
3
|
+
var t = o();
|
|
4
|
+
const a = /* @__PURE__ */ r(t);
|
|
5
5
|
export {
|
|
6
6
|
a as default
|
|
7
7
|
};
|
package/dist/_virtual/index2.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { getDefaultExportFromCjs as
|
|
2
|
-
import { __require as
|
|
3
|
-
var t =
|
|
4
|
-
const a = /* @__PURE__ */
|
|
1
|
+
import { getDefaultExportFromCjs as e } from "./_commonjsHelpers.js";
|
|
2
|
+
import { __require as r } from "../node_modules/extend/index.js";
|
|
3
|
+
var t = r();
|
|
4
|
+
const a = /* @__PURE__ */ e(t);
|
|
5
5
|
export {
|
|
6
6
|
a as default
|
|
7
7
|
};
|
|
@@ -3,8 +3,7 @@ import { Badge as s } from "../../data-display/badge/badge.js";
|
|
|
3
3
|
import { FilterPopoverContent as u } from "../../flows/filter-strip/filter-tag-list.js";
|
|
4
4
|
import { Popover as b, PopoverTrigger as f } from "../../feedback/popover/popover.js";
|
|
5
5
|
import { Tooltip as g, TooltipTrigger as v, TooltipContent as x } from "../../feedback/tooltip/tooltip.js";
|
|
6
|
-
|
|
7
|
-
function I({
|
|
6
|
+
function w({
|
|
8
7
|
tags: o,
|
|
9
8
|
title: l = "Attributes",
|
|
10
9
|
maxVisibleTags: n = 4,
|
|
@@ -71,5 +70,5 @@ function I({
|
|
|
71
70
|
);
|
|
72
71
|
}
|
|
73
72
|
export {
|
|
74
|
-
|
|
73
|
+
w as ExpandableListItemAttributes
|
|
75
74
|
};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
2
2
|
import { ScrollOverflowAffordance as o } from "../../layout/horizontal-scroller/scroll-overflow-affordance.js";
|
|
3
|
-
import "react";
|
|
4
3
|
import { OverflowTooltip as r } from "../../feedback/tooltip/overflow-tooltip.js";
|
|
5
4
|
const m = 128;
|
|
6
|
-
function
|
|
5
|
+
function x({
|
|
7
6
|
columns: i,
|
|
8
7
|
sectionId: l = "metrics"
|
|
9
8
|
}) {
|
|
@@ -51,5 +50,5 @@ function f({
|
|
|
51
50
|
);
|
|
52
51
|
}
|
|
53
52
|
export {
|
|
54
|
-
|
|
53
|
+
x as ExpandableListItemMetrics
|
|
55
54
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { AlphabeticalSortDirection } from '../../../lib/alphabetical-sort';
|
|
2
3
|
export type SkuPickerView = "card" | "list";
|
|
3
4
|
export type SkuPickerGridProps = {
|
|
4
5
|
/** Fold the toolbar and choices behind the title row. */
|
|
@@ -12,7 +13,7 @@ export type SkuPickerGridProps = {
|
|
|
12
13
|
export declare function SkuPickerChrome(props: {
|
|
13
14
|
view: SkuPickerView;
|
|
14
15
|
search: string;
|
|
15
|
-
|
|
16
|
+
sortDirection: AlphabeticalSortDirection;
|
|
16
17
|
selectedCount: number;
|
|
17
18
|
/** True when every choice Select All would touch is already selected. */
|
|
18
19
|
allSelected?: boolean;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { jsx as t, jsxs as l } from "react/jsx-runtime";
|
|
2
|
-
import { Search as s, CardView as m, ListFilter as u,
|
|
2
|
+
import { Search as s, CardView as m, ListFilter as u, SortZa as h, SortAz as b, Back as v } from "impact-nova-icons";
|
|
3
3
|
import "react";
|
|
4
4
|
import { Badge as f } from "../../data-display/badge/badge.js";
|
|
5
|
-
import { ButtonIconTooltip as
|
|
6
|
-
import { Input as
|
|
7
|
-
import { Accordion as
|
|
5
|
+
import { ButtonIconTooltip as c } from "../../feedback/tooltip/button-icon-tooltip.js";
|
|
6
|
+
import { Input as x } from "../../forms/input/input.js";
|
|
7
|
+
import { Accordion as g, AccordionItem as w, AccordionTrigger as S, AccordionContent as C } from "../../primitives/accordion/accordion.js";
|
|
8
8
|
import { Button as i } from "../../primitives/button/button.js";
|
|
9
9
|
import { cn as N } from "../../../lib/utils.js";
|
|
10
|
-
const
|
|
11
|
-
function
|
|
10
|
+
const o = "picker";
|
|
11
|
+
function y(e) {
|
|
12
12
|
return N(
|
|
13
13
|
e && "border-brand bg-accent text-brand hover:bg-accent hover:text-brand"
|
|
14
14
|
);
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function k(e) {
|
|
17
17
|
if (e.selectedCount === 0)
|
|
18
18
|
return /* @__PURE__ */ t("p", { className: "text-xs font-medium text-content-muted", children: e.emptyLabel });
|
|
19
19
|
const a = Math.max(0, e.selectedCount - e.previewCodes.length);
|
|
@@ -25,30 +25,30 @@ function y(e) {
|
|
|
25
25
|
] }) : null
|
|
26
26
|
] });
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function U(e) {
|
|
29
29
|
const a = e.title ?? "SKU", n = /* @__PURE__ */ t(
|
|
30
|
-
|
|
30
|
+
k,
|
|
31
31
|
{
|
|
32
32
|
selectedCount: e.selectedCount,
|
|
33
33
|
previewCodes: e.previewCodes,
|
|
34
34
|
emptyLabel: e.emptyLabel ?? "No SKUs selected"
|
|
35
35
|
}
|
|
36
|
-
),
|
|
36
|
+
), r = /* @__PURE__ */ l("div", { className: "flex items-center justify-between gap-3", children: [
|
|
37
37
|
/* @__PURE__ */ l("div", { className: "flex items-center gap-3", children: [
|
|
38
38
|
/* @__PURE__ */ t(
|
|
39
|
-
|
|
39
|
+
x,
|
|
40
40
|
{
|
|
41
41
|
size: "default",
|
|
42
42
|
className: "w-[200px]",
|
|
43
43
|
placeholder: "Search",
|
|
44
44
|
value: e.search,
|
|
45
|
-
onChange: (
|
|
45
|
+
onChange: (d) => e.onSearchChange(d.target.value),
|
|
46
46
|
prefix: /* @__PURE__ */ t(s, { className: "size-4 text-content-placeholder", "aria-hidden": !0 }),
|
|
47
47
|
"aria-label": e.searchLabel ?? "Search SKUs"
|
|
48
48
|
}
|
|
49
49
|
),
|
|
50
50
|
/* @__PURE__ */ t(
|
|
51
|
-
|
|
51
|
+
c,
|
|
52
52
|
{
|
|
53
53
|
label: e.view === "card" ? "Switch to list view" : "Switch to card view",
|
|
54
54
|
children: /* @__PURE__ */ t(
|
|
@@ -65,26 +65,33 @@ function V(e) {
|
|
|
65
65
|
)
|
|
66
66
|
}
|
|
67
67
|
),
|
|
68
|
-
/* @__PURE__ */ t(
|
|
69
|
-
|
|
68
|
+
/* @__PURE__ */ t(
|
|
69
|
+
c,
|
|
70
70
|
{
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
71
|
+
label: e.sortDirection === "desc" ? "Sort Z to A" : "Sort A to Z",
|
|
72
|
+
children: /* @__PURE__ */ t(
|
|
73
|
+
i,
|
|
74
|
+
{
|
|
75
|
+
type: "button",
|
|
76
|
+
size: "icon",
|
|
77
|
+
variant: "tertiary",
|
|
78
|
+
"aria-label": e.sortDirection === "desc" ? "Sort Z to A" : "Sort A to Z",
|
|
79
|
+
"aria-pressed": e.sortDirection !== "none",
|
|
80
|
+
className: y(e.sortDirection !== "none"),
|
|
81
|
+
onClick: e.onToggleSort,
|
|
82
|
+
children: e.sortDirection === "desc" ? /* @__PURE__ */ t(h, {}) : /* @__PURE__ */ t(b, {})
|
|
83
|
+
}
|
|
84
|
+
)
|
|
79
85
|
}
|
|
80
|
-
)
|
|
86
|
+
)
|
|
81
87
|
] }),
|
|
82
88
|
/* @__PURE__ */ l("div", { className: "flex items-center gap-3", children: [
|
|
83
89
|
/* @__PURE__ */ t(
|
|
84
90
|
i,
|
|
85
91
|
{
|
|
86
92
|
type: "button",
|
|
87
|
-
variant: "
|
|
93
|
+
variant: "ghost",
|
|
94
|
+
className: "text-brand hover:text-brand",
|
|
88
95
|
onClick: e.onSelectAll,
|
|
89
96
|
disabled: e.allSelected === !0,
|
|
90
97
|
children: "Select All"
|
|
@@ -94,7 +101,8 @@ function V(e) {
|
|
|
94
101
|
i,
|
|
95
102
|
{
|
|
96
103
|
type: "button",
|
|
97
|
-
variant: "
|
|
104
|
+
variant: "ghost",
|
|
105
|
+
className: "text-brand hover:text-brand",
|
|
98
106
|
onClick: e.onClear,
|
|
99
107
|
disabled: e.selectedCount === 0,
|
|
100
108
|
children: "Clear"
|
|
@@ -103,19 +111,19 @@ function V(e) {
|
|
|
103
111
|
] })
|
|
104
112
|
] });
|
|
105
113
|
return e.collapsible ? /* @__PURE__ */ t(
|
|
106
|
-
|
|
114
|
+
g,
|
|
107
115
|
{
|
|
108
116
|
type: "single",
|
|
109
117
|
collapsible: !0,
|
|
110
|
-
defaultValue: e.defaultCollapsed ? void 0 :
|
|
118
|
+
defaultValue: e.defaultCollapsed ? void 0 : o,
|
|
111
119
|
className: "w-full",
|
|
112
|
-
children: /* @__PURE__ */ l(
|
|
113
|
-
/* @__PURE__ */ t(
|
|
120
|
+
children: /* @__PURE__ */ l(w, { value: o, className: "border border-stroke-subtle", children: [
|
|
121
|
+
/* @__PURE__ */ t(S, { headingLevel: 3, rightActions: n, children: /* @__PURE__ */ l("span", { className: "truncate text-sm font-semibold leading-6 text-content-title", children: [
|
|
114
122
|
a,
|
|
115
123
|
e.required ? /* @__PURE__ */ t("span", { className: "text-destructive", children: " *" }) : null
|
|
116
124
|
] }) }),
|
|
117
125
|
/* @__PURE__ */ l(C, { className: "flex flex-col gap-3", children: [
|
|
118
|
-
|
|
126
|
+
r,
|
|
119
127
|
e.children,
|
|
120
128
|
e.footer
|
|
121
129
|
] })
|
|
@@ -124,7 +132,7 @@ function V(e) {
|
|
|
124
132
|
) : /* @__PURE__ */ l("div", { className: "flex w-full flex-col gap-3 overflow-hidden rounded-lg border border-stroke-subtle bg-canvas-elevated px-4 py-2", children: [
|
|
125
133
|
/* @__PURE__ */ l("div", { className: "flex items-center justify-between gap-3", children: [
|
|
126
134
|
/* @__PURE__ */ l("div", { className: "flex items-center gap-3", children: [
|
|
127
|
-
e.showBack === !1 ? null : /* @__PURE__ */ t(i, { type: "button", size: "icon", variant: "ghost", "aria-label": "Back", children: /* @__PURE__ */ t(
|
|
135
|
+
e.showBack === !1 ? null : /* @__PURE__ */ t(i, { type: "button", size: "icon", variant: "ghost", "aria-label": "Back", children: /* @__PURE__ */ t(v, {}) }),
|
|
128
136
|
/* @__PURE__ */ l("p", { className: "text-sm font-semibold leading-6 text-content-title", children: [
|
|
129
137
|
a,
|
|
130
138
|
e.required ? /* @__PURE__ */ t("span", { className: "text-destructive", children: " *" }) : null
|
|
@@ -132,11 +140,11 @@ function V(e) {
|
|
|
132
140
|
] }),
|
|
133
141
|
n
|
|
134
142
|
] }),
|
|
135
|
-
|
|
143
|
+
r,
|
|
136
144
|
e.children,
|
|
137
145
|
e.footer
|
|
138
146
|
] });
|
|
139
147
|
}
|
|
140
148
|
export {
|
|
141
|
-
|
|
149
|
+
U as SkuPickerChrome
|
|
142
150
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { AlphabeticalSortDirection } from '../../../lib/alphabetical-sort';
|
|
2
|
+
export declare function useServerSkuInfinitePages(search: string, sortDirection: AlphabeticalSortDirection): {
|
|
2
3
|
debouncedSearch: string;
|
|
3
4
|
query: import('@tanstack/react-query').UseInfiniteQueryResult<import('@tanstack/query-core').InfiniteData<import('./virtualized-responsive-grid.catalog').SkuServerPage, unknown>, Error>;
|
|
4
5
|
loadedCatalogIndices: number[];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ImageComponent } from 'impact-nova-icons';
|
|
2
|
+
import { AlphabeticalSortDirection } from '../../../lib/alphabetical-sort';
|
|
2
3
|
export declare const SKU_CATALOG_TOTAL = 50000;
|
|
3
4
|
export declare const ITEM_CATALOG_TOTAL = 50000;
|
|
4
5
|
export declare const SERVER_PAGE_SIZE = 200;
|
|
@@ -57,11 +58,11 @@ export type SkuServerPage = {
|
|
|
57
58
|
nextStartIndex?: number;
|
|
58
59
|
};
|
|
59
60
|
/** Reuse the filtered catalog for later pages of the same search. Does not mutate cached arrays. */
|
|
60
|
-
export declare function getCachedSkuMatchingIndices(searchQuery: string,
|
|
61
|
+
export declare function getCachedSkuMatchingIndices(searchQuery: string, sortDirection: AlphabeticalSortDirection): number[] | null;
|
|
61
62
|
export declare function fetchSkuServerPage(options: {
|
|
62
63
|
startIndex: number;
|
|
63
64
|
searchQuery: string;
|
|
64
|
-
|
|
65
|
+
sortDirection: AlphabeticalSortDirection;
|
|
65
66
|
pageSize?: number;
|
|
66
67
|
}): Promise<SkuServerPage>;
|
|
67
68
|
export declare function getItemCatalogRecord(catalogIndex: number): ItemCatalogRecord;
|
|
@@ -75,7 +76,7 @@ export declare function collectStripCatalogIndices(options: {
|
|
|
75
76
|
export declare function filterAndSortCatalogIndices(options: {
|
|
76
77
|
totalCount: number;
|
|
77
78
|
searchQuery: string;
|
|
78
|
-
|
|
79
|
+
sortDirection: AlphabeticalSortDirection;
|
|
79
80
|
getSearchText: (catalogIndex: number) => string;
|
|
80
81
|
getSortKey: (catalogIndex: number) => string;
|
|
81
82
|
}): number[] | null;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { KeyBinding } from '../../primitives/kbd';
|
|
2
|
+
import { TooltipContentProps } from './tooltip.types';
|
|
2
3
|
import * as React from "react";
|
|
3
4
|
export interface ButtonIconTooltipProps {
|
|
4
5
|
children: React.ReactElement;
|
|
5
6
|
label?: string;
|
|
6
7
|
side?: "top" | "bottom" | "left" | "right";
|
|
8
|
+
align?: TooltipContentProps["align"];
|
|
9
|
+
variant?: TooltipContentProps["variant"];
|
|
7
10
|
keybinding?: KeyBinding;
|
|
8
11
|
disabled?: boolean;
|
|
9
12
|
}
|
|
@@ -11,4 +14,4 @@ export interface ButtonIconTooltipProps {
|
|
|
11
14
|
* Wraps icon buttons with tooltip + optional Kbd badge.
|
|
12
15
|
* Use at app/feature layer — keeps Button free of feedback imports.
|
|
13
16
|
*/
|
|
14
|
-
export declare function ButtonIconTooltip({ children, label, side, keybinding, disabled, }: ButtonIconTooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare function ButtonIconTooltip({ children, label, side, align, variant, keybinding, disabled, }: ButtonIconTooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,23 +1,25 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as i, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { Kbd as
|
|
4
|
-
import { Tooltip as
|
|
5
|
-
function
|
|
3
|
+
import { Kbd as c } from "../../primitives/kbd/kbd.js";
|
|
4
|
+
import { Tooltip as l, TooltipTrigger as a, TooltipContent as f } from "./tooltip.js";
|
|
5
|
+
function h({
|
|
6
6
|
children: o,
|
|
7
7
|
label: r,
|
|
8
|
-
side:
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
side: n = "top",
|
|
9
|
+
align: p = "center",
|
|
10
|
+
variant: s = "tertiary",
|
|
11
|
+
keybinding: e,
|
|
12
|
+
disabled: m
|
|
11
13
|
}) {
|
|
12
|
-
return r ? /* @__PURE__ */
|
|
13
|
-
/* @__PURE__ */ t(a, { asChild: !0, children:
|
|
14
|
-
/* @__PURE__ */ t(
|
|
14
|
+
return r ? /* @__PURE__ */ i(l, { children: [
|
|
15
|
+
/* @__PURE__ */ t(a, { asChild: !0, children: m ? /* @__PURE__ */ t("span", { tabIndex: -1, className: "inline-block outline-none", children: o }) : o }),
|
|
16
|
+
/* @__PURE__ */ t(f, { variant: s, side: n, align: p, children: e ? /* @__PURE__ */ i("span", { className: "flex items-center gap-2", children: [
|
|
15
17
|
r,
|
|
16
18
|
" ",
|
|
17
|
-
/* @__PURE__ */ t(
|
|
19
|
+
/* @__PURE__ */ t(c, { keybinding: e, size: "sm" })
|
|
18
20
|
] }) : r })
|
|
19
21
|
] }) : o;
|
|
20
22
|
}
|
|
21
23
|
export {
|
|
22
|
-
|
|
24
|
+
h as ButtonIconTooltip
|
|
23
25
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { Tooltip as l, TooltipTrigger as n, TooltipContent as o } from "./tooltip.js";
|
|
3
|
-
|
|
4
|
-
const p = (i, r, a) => /* @__PURE__ */ t(l, { children: [
|
|
3
|
+
const d = (i, r, a) => /* @__PURE__ */ t(l, { children: [
|
|
5
4
|
/* @__PURE__ */ e(n, { asChild: !0, children: /* @__PURE__ */ e("span", { className: "inline-flex items-center justify-center h-full w-full", children: i }) }),
|
|
6
5
|
/* @__PURE__ */ e(o, { variant: "tertiary", className: a, children: r })
|
|
7
6
|
] }), h = (i, r) => /* @__PURE__ */ t(l, { children: [
|
|
@@ -10,5 +9,5 @@ const p = (i, r, a) => /* @__PURE__ */ t(l, { children: [
|
|
|
10
9
|
] });
|
|
11
10
|
export {
|
|
12
11
|
h as defaultAccordionTooltipRender,
|
|
13
|
-
|
|
12
|
+
d as defaultTabTooltipRender
|
|
14
13
|
};
|
|
@@ -4,106 +4,114 @@ const H = 500;
|
|
|
4
4
|
function N(o, s) {
|
|
5
5
|
return o !== void 0 ? o : typeof s == "string" ? s : null;
|
|
6
6
|
}
|
|
7
|
-
function
|
|
7
|
+
function z(o, {
|
|
8
8
|
content: s,
|
|
9
|
-
overflowMode:
|
|
9
|
+
overflowMode: g = "ellipsis",
|
|
10
10
|
alwaysShow: i = !1,
|
|
11
|
-
disabled:
|
|
12
|
-
focusable:
|
|
11
|
+
disabled: a = !1,
|
|
12
|
+
focusable: E = !1,
|
|
13
13
|
contentDependency: h
|
|
14
14
|
} = {}) {
|
|
15
|
-
const
|
|
15
|
+
const m = t.useRef(null), T = t.useRef(!1), u = t.useRef(
|
|
16
16
|
null
|
|
17
|
-
),
|
|
17
|
+
), O = t.useRef(null), [D, r] = t.useState(!1), [I, n] = t.useState(!1), v = t.useRef(!1), P = t.useRef(!1), p = N(s, o), C = typeof p == "string" ? p.trim().length > 0 : p != null, l = () => {
|
|
18
18
|
u.current && (clearTimeout(u.current), u.current = null);
|
|
19
19
|
}, c = () => {
|
|
20
|
-
const e =
|
|
21
|
-
e && (document.removeEventListener("scroll", e, !0),
|
|
20
|
+
const e = O.current;
|
|
21
|
+
e && (document.removeEventListener("scroll", e, !0), O.current = null);
|
|
22
22
|
}, A = () => {
|
|
23
23
|
l(), n(!1), r(!1);
|
|
24
24
|
}, _ = () => {
|
|
25
25
|
c();
|
|
26
26
|
const e = () => {
|
|
27
|
-
|
|
27
|
+
T.current = !1, A(), c();
|
|
28
28
|
};
|
|
29
|
-
|
|
29
|
+
O.current = e, document.addEventListener("scroll", e, {
|
|
30
30
|
capture: !0,
|
|
31
31
|
passive: !0
|
|
32
32
|
});
|
|
33
33
|
};
|
|
34
34
|
t.useEffect(() => {
|
|
35
35
|
r(!1), n(!1), l(), c();
|
|
36
|
-
}, [h, s, o, i,
|
|
36
|
+
}, [h, s, o, i, a, g]), t.useEffect(
|
|
37
37
|
() => () => {
|
|
38
38
|
l(), c();
|
|
39
39
|
},
|
|
40
40
|
[]
|
|
41
41
|
);
|
|
42
42
|
const k = t.useCallback((e) => {
|
|
43
|
-
|
|
44
|
-
}, []),
|
|
45
|
-
if (!(
|
|
46
|
-
if (
|
|
43
|
+
m.current = e;
|
|
44
|
+
}, []), R = (e) => i || L(e, g), d = (e, f) => {
|
|
45
|
+
if (!(a || !C)) {
|
|
46
|
+
if (R(e)) {
|
|
47
47
|
r(!0), n(!0);
|
|
48
48
|
return;
|
|
49
49
|
}
|
|
50
50
|
r(!1), n(!1);
|
|
51
51
|
}
|
|
52
52
|
}, F = (e) => {
|
|
53
|
-
l()
|
|
54
|
-
|
|
53
|
+
l();
|
|
54
|
+
const f = R(e);
|
|
55
|
+
u.current = setTimeout(() => {
|
|
56
|
+
if (u.current = null, !!T.current) {
|
|
57
|
+
if (f) {
|
|
58
|
+
r(!0), n(!0);
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
d(e);
|
|
62
|
+
}
|
|
55
63
|
}, H);
|
|
56
64
|
};
|
|
57
65
|
return {
|
|
58
66
|
setTriggerRef: k,
|
|
59
67
|
onTriggerPointerEnter: (e) => {
|
|
60
|
-
if (!(
|
|
61
|
-
if (
|
|
62
|
-
|
|
68
|
+
if (!(a || !C)) {
|
|
69
|
+
if (T.current = !0, _(), i) {
|
|
70
|
+
d(e.currentTarget);
|
|
63
71
|
return;
|
|
64
72
|
}
|
|
65
73
|
F(e.currentTarget);
|
|
66
74
|
}
|
|
67
75
|
},
|
|
68
76
|
onTriggerPointerLeave: () => {
|
|
69
|
-
|
|
77
|
+
T.current = !1, l();
|
|
70
78
|
},
|
|
71
|
-
onTriggerFocus:
|
|
72
|
-
|
|
79
|
+
onTriggerFocus: E ? (e) => {
|
|
80
|
+
d(e.currentTarget);
|
|
73
81
|
} : void 0,
|
|
74
82
|
onContentPointerEnter: () => {
|
|
75
|
-
|
|
83
|
+
v.current = !0, n(!0);
|
|
76
84
|
},
|
|
77
85
|
onContentPointerDown: () => {
|
|
78
|
-
|
|
86
|
+
P.current = !0, n(!0);
|
|
79
87
|
},
|
|
80
88
|
onContentPointerLeave: () => {
|
|
81
|
-
|
|
89
|
+
v.current = !1;
|
|
82
90
|
},
|
|
83
91
|
onContentPointerUp: () => {
|
|
84
|
-
|
|
92
|
+
P.current = !1;
|
|
85
93
|
},
|
|
86
|
-
triggerTabIndex:
|
|
94
|
+
triggerTabIndex: E ? 0 : void 0,
|
|
87
95
|
isTooltipArmed: D,
|
|
88
96
|
isTooltipOpen: I,
|
|
89
|
-
tooltipContent:
|
|
97
|
+
tooltipContent: p,
|
|
90
98
|
recheckOverflow: () => {
|
|
91
|
-
const e =
|
|
92
|
-
return !e ||
|
|
99
|
+
const e = m.current;
|
|
100
|
+
return !e || a || !C ? !1 : R(e) ? (r(!0), !0) : (r(!1), n(!1), !1);
|
|
93
101
|
},
|
|
94
102
|
handleTooltipOpenChange: (e) => {
|
|
95
|
-
if (!e && (
|
|
103
|
+
if (!e && (v.current || P.current) || e && !D && !i || (n(e), e))
|
|
96
104
|
return;
|
|
97
105
|
c();
|
|
98
|
-
const
|
|
99
|
-
if (!
|
|
106
|
+
const f = m.current;
|
|
107
|
+
if (!f) {
|
|
100
108
|
r(!1);
|
|
101
109
|
return;
|
|
102
110
|
}
|
|
103
|
-
!i && !L(
|
|
111
|
+
!i && !L(f, g) && r(!1);
|
|
104
112
|
}
|
|
105
113
|
};
|
|
106
114
|
}
|
|
107
115
|
export {
|
|
108
|
-
|
|
116
|
+
z as useOverflowTooltip
|
|
109
117
|
};
|
|
@@ -2,17 +2,17 @@ import { jsx as r, jsxs as h, Fragment as z } from "react/jsx-runtime";
|
|
|
2
2
|
import * as o from "react";
|
|
3
3
|
import { Person as G, Monitor as U, PriorityAlert as q, Locked as O, Reset as B } from "impact-nova-icons";
|
|
4
4
|
import { cn as p } from "../../../lib/utils.js";
|
|
5
|
-
import { Kbd as $ } from "../../primitives/kbd/kbd.js";
|
|
6
|
-
import { keybindingToString as H } from "../../primitives/kbd/keybinding-display.js";
|
|
7
5
|
import { OverflowTooltip as A } from "../../feedback/tooltip/overflow-tooltip.js";
|
|
8
|
-
import { ModuleRegistry as
|
|
9
|
-
import { AllEnterpriseModule as
|
|
10
|
-
import { DataTable as
|
|
6
|
+
import { ModuleRegistry as $, AllCommunityModule as H } from "ag-grid-community";
|
|
7
|
+
import { AllEnterpriseModule as V } from "ag-grid-enterprise";
|
|
8
|
+
import { DataTable as J, DataTableContent as Q } from "../../data/data-table/data-table.js";
|
|
11
9
|
import { AG_CELL_NO_PADDING as F } from "../../data/ag-grid-react/cell-renderers/index.js";
|
|
10
|
+
import { Kbd as X } from "../../primitives/kbd/kbd.js";
|
|
11
|
+
import { keybindingToString as Y } from "../../primitives/kbd/keybinding-display.js";
|
|
12
12
|
import { useCommandPalette as Z } from "./use-command-palette.js";
|
|
13
13
|
import { COMMAND_SOURCE_LABELS as m, keybindingFromEvent as W, isReservedShortcut as ee } from "./utils.js";
|
|
14
14
|
import { BadgeCellRenderer as te } from "../../data/ag-grid-react/cell-renderers/badge-cell-renderer.js";
|
|
15
|
-
|
|
15
|
+
$.registerModules([H, V]);
|
|
16
16
|
function re(a) {
|
|
17
17
|
const t = a.data;
|
|
18
18
|
return t ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2 min-w-0 h-full", children: [
|
|
@@ -69,7 +69,7 @@ function ne(a) {
|
|
|
69
69
|
"flex items-center justify-end h-full w-full text-end",
|
|
70
70
|
t.customisable ? "cursor-pointer" : "cursor-default opacity-70"
|
|
71
71
|
),
|
|
72
|
-
children: /* @__PURE__ */ r(
|
|
72
|
+
children: /* @__PURE__ */ r(X, { keybinding: t.keybinding, size: "sm" })
|
|
73
73
|
}
|
|
74
74
|
) : t.customisable ? /* @__PURE__ */ r(
|
|
75
75
|
"button",
|
|
@@ -133,7 +133,7 @@ function le({
|
|
|
133
133
|
description: e.description || "",
|
|
134
134
|
category: e.category || "General",
|
|
135
135
|
keybinding: i,
|
|
136
|
-
keybindingDisplay: i ?
|
|
136
|
+
keybindingDisplay: i ? Y(i) : "",
|
|
137
137
|
scope: e.scope,
|
|
138
138
|
source: D,
|
|
139
139
|
sourceColor: T ? "primary" : "neutral",
|
|
@@ -278,10 +278,10 @@ function le({
|
|
|
278
278
|
u?.type === "conflict" ? /* @__PURE__ */ r(q, { className: "h-3.5 w-3.5 shrink-0" }) : u?.type === "reserved" ? /* @__PURE__ */ r(O, { className: "h-3.5 w-3.5 shrink-0" }) : c ? /* @__PURE__ */ r("span", { className: "shrink-0 text-base", children: "⌨️" }) : null,
|
|
279
279
|
/* @__PURE__ */ r("span", { children: u ? u.text : L })
|
|
280
280
|
] }) : null;
|
|
281
|
-
return /* @__PURE__ */ h(
|
|
281
|
+
return /* @__PURE__ */ h(J, { className: p("flex flex-col w-full h-full border-t-0", a), children: [
|
|
282
282
|
s ? s(E) : E,
|
|
283
283
|
/* @__PURE__ */ r(
|
|
284
|
-
|
|
284
|
+
Q,
|
|
285
285
|
{
|
|
286
286
|
rowData: y,
|
|
287
287
|
columnDefs: I,
|
|
@@ -6,8 +6,8 @@ import { cn as o } from "../../../lib/utils.js";
|
|
|
6
6
|
import { MultiColorFilter as F, Cross as P, InfoBadge as u } from "impact-nova-icons";
|
|
7
7
|
import { Button as D } from "../../primitives/button/button.js";
|
|
8
8
|
import { Tooltip as c, TooltipTrigger as f, TooltipContent as h } from "../../feedback/tooltip/tooltip.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
9
|
+
import { OverflowTooltip as S } from "../../feedback/tooltip/overflow-tooltip.js";
|
|
10
|
+
import { Kbd as j } from "../../primitives/kbd/kbd.js";
|
|
11
11
|
import { useImpactNovaI18n as v } from "../../../i18n/use-impact-nova-i18n.js";
|
|
12
12
|
import { useOverlayHostDismissNestedLayersOnNavigation as I } from "../../../lib/overlay/overlay-portal-context.js";
|
|
13
13
|
import { preventDismissOnTooltipOutside as x } from "../../../lib/overlay/prevent-dismiss-on-tooltip-outside.js";
|
|
@@ -145,14 +145,14 @@ const O = ({
|
|
|
145
145
|
),
|
|
146
146
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-1 min-w-0", children: [
|
|
147
147
|
/* @__PURE__ */ e(
|
|
148
|
-
|
|
148
|
+
S,
|
|
149
149
|
{
|
|
150
150
|
triggerClassName: "truncate font-['Manrope'] block min-w-0",
|
|
151
151
|
content: t.tooltipKeybinding ? /* @__PURE__ */ a("span", { className: "flex items-center gap-2", children: [
|
|
152
152
|
t.label,
|
|
153
153
|
" ",
|
|
154
154
|
/* @__PURE__ */ e(
|
|
155
|
-
|
|
155
|
+
j,
|
|
156
156
|
{
|
|
157
157
|
keybinding: t.tooltipKeybinding,
|
|
158
158
|
size: "sm"
|