@epam/ai-dial-catalog 1.3.0-dev.187 → 1.3.0-dev.191

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.
Files changed (35) hide show
  1. package/components/AddOnCatalogModal/AddOnCatalogModal.d.ts +42 -0
  2. package/components/AddOnCatalogModal/AddOnCatalogModal.d.ts.map +1 -0
  3. package/components/AddOnListItem/AddOnListItem.d.ts +50 -0
  4. package/components/AddOnListItem/AddOnListItem.d.ts.map +1 -0
  5. package/components/CatalogPickerModal/CatalogPickerModal.d.ts +25 -5
  6. package/components/CatalogPickerModal/CatalogPickerModal.d.ts.map +1 -1
  7. package/components/ListView/ListView.d.ts +1 -1
  8. package/components/ListView/ListView.d.ts.map +1 -1
  9. package/components/ListView/columns.d.ts +3 -5
  10. package/components/ListView/columns.d.ts.map +1 -1
  11. package/entry-points/mapping.d.ts +1 -0
  12. package/entry-points/mapping.d.ts.map +1 -1
  13. package/index.css +2 -2
  14. package/index.d.ts +6 -1
  15. package/index.d.ts.map +1 -1
  16. package/index.js +1933 -1944
  17. package/{mapping-up05V8hl.js → mapping-CaLNwK9q.js} +25 -17
  18. package/mapping.js +1 -1
  19. package/models/grid-context.d.ts +1 -1
  20. package/models/grid-context.d.ts.map +1 -1
  21. package/models/list-props.d.ts +3 -24
  22. package/models/list-props.d.ts.map +1 -1
  23. package/package.json +4 -4
  24. package/utils/list-selection.d.ts +10 -10
  25. package/utils/list-selection.d.ts.map +1 -1
  26. package/utils/scroll-window.d.ts +0 -16
  27. package/utils/scroll-window.d.ts.map +1 -1
  28. package/utils/use-list-remove-focus.d.ts +4 -0
  29. package/utils/use-list-remove-focus.d.ts.map +1 -0
  30. package/components/ListView/Renders/SelectionCellRenderer.d.ts +0 -6
  31. package/components/ListView/Renders/SelectionCellRenderer.d.ts.map +0 -1
  32. package/components/ListView/Renders/SelectionHeader.d.ts +0 -4
  33. package/components/ListView/Renders/SelectionHeader.d.ts.map +0 -1
  34. package/components/ListView/selection-context.d.ts +0 -24
  35. package/components/ListView/selection-context.d.ts.map +0 -1
@@ -36,45 +36,53 @@ var t = /* @__PURE__ */ function(e) {
36
36
  }, g = (e, { search: t, topics: n, isMyOnly: r, sortKey: i }) => {
37
37
  let a = d(m(e, t), n);
38
38
  return l(r ? f(a) : a, i);
39
- }, _ = {
39
+ }, _ = (e, t, n) => {
40
+ let r = new Set(n), i = /* @__PURE__ */ new Set();
41
+ return e.forEach((e) => {
42
+ (!r.has(e) || t.has(e)) && i.add(e);
43
+ }), t.forEach((e) => i.add(e)), i;
44
+ }, v = (e, t, n) => {
45
+ let r = new Set(e), i = e.filter((e) => t.has(e) || !n.has(e)), a = [...t].filter((e) => !r.has(e));
46
+ return [...i, ...a];
47
+ }, y = {
40
48
  [e.Model]: "Models",
41
49
  [e.Agent]: "Agents",
42
50
  [e.Toolset]: "Toolsets",
43
51
  [e.Prompt]: "Prompts",
44
52
  [e.Skill]: "Skills"
45
- }, v = [
53
+ }, b = [
46
54
  e.Model,
47
55
  e.Agent,
48
56
  e.Toolset,
49
57
  e.Skill,
50
58
  e.Prompt
51
- ], y = (e, t) => {
59
+ ], x = (e, t) => {
52
60
  let n = {
53
- ..._,
61
+ ...y,
54
62
  ...t
55
63
  }, r = new Set(e.map((e) => e.type));
56
- return v.filter((e) => r.has(e)).map((e) => ({
64
+ return b.filter((e) => r.has(e)).map((e) => ({
57
65
  id: e,
58
66
  label: n[e] ?? e
59
67
  }));
60
- }, b = (e) => {
68
+ }, S = (e) => {
61
69
  let t = e.querySelector("[role=\"tab\"][aria-selected=\"true\"]");
62
70
  if (t == null) return;
63
71
  let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = getComputedStyle(e), a = parseFloat(i.paddingInlineStart) || 0, o = parseFloat(i.paddingInlineEnd) || 0;
64
72
  r.left < n.left + a ? e.scrollLeft -= n.left + a - r.left : r.right > n.right - o && (e.scrollLeft += r.right - (n.right - o));
65
- }, x = (e, t) => typeof e == "function" ? e(t) : e, S = /* @__PURE__ */ new Set([e.Prompt, e.Skill]), C = (e) => e?.resource?.endpointUrl != null || (e?.endpoints?.length ?? 0) > 0, w = (e, t = {}) => {
66
- let n = [], r = S.has(e.type), i = e.details;
67
- return r || n.push(c.About), (r || i?.promptContent != null) && n.push(c.Content), i?.overview != null && n.push(c.Overview), i?.pricing != null && n.push(c.Pricing), i?.limits != null && n.push(c.Limits), i?.tools != null && n.push(c.Tools), !t.isConnectHidden && C(i?.api) && n.push(c.Api), n;
68
- }, T = (e) => e === n.SignedIn, E = (e, t) => T(t === r.User ? e?.userStatus : e?.globalStatus), D = (e) => new Promise((t) => setTimeout(t, e)), O = (e) => {
69
- let t = T(e.userStatus), n = T(e.globalStatus);
73
+ }, C = (e, t) => typeof e == "function" ? e(t) : e, w = /* @__PURE__ */ new Set([e.Prompt, e.Skill]), T = (e) => e?.resource?.endpointUrl != null || (e?.endpoints?.length ?? 0) > 0, E = (e, t = {}) => {
74
+ let n = [], r = w.has(e.type), i = e.details;
75
+ return r || n.push(c.About), (r || i?.promptContent != null) && n.push(c.Content), i?.overview != null && n.push(c.Overview), i?.pricing != null && n.push(c.Pricing), i?.limits != null && n.push(c.Limits), i?.tools != null && n.push(c.Tools), !t.isConnectHidden && T(i?.api) && n.push(c.Api), n;
76
+ }, D = (e) => e === n.SignedIn, O = (e, t) => D(t === r.User ? e?.userStatus : e?.globalStatus), k = (e) => new Promise((t) => setTimeout(t, e)), A = (e) => {
77
+ let t = D(e.userStatus), n = D(e.globalStatus);
70
78
  return e.isManageableByAdmin ? i.ManageCredentials : e.isPublic && !t ? i.LoginWithMyCreds : !t && !n ? i.LogIn : i.LogOut;
71
- }, k = (e) => {
79
+ }, j = (e) => {
72
80
  if (e.authenticationType === t.None) return;
73
- let n = T(e.userStatus), r = T(e.globalStatus);
81
+ let n = D(e.userStatus), r = D(e.globalStatus);
74
82
  return !n && !r ? a.LoggedOut : void 0;
75
- }, A = (e) => e?.authenticationType == null || e.authenticationType === t.None ? !1 : T(e.globalStatus), j = (e) => e.isPublic || T(e.userStatus) ? r.User : r.Global, M = (e) => T(e.userStatus) ? r.User : r.Global, N = (e) => {
76
- if (e.isManageableByAdmin) return T(e.userStatus) ? o.PersonalCredentialsActive : T(e.globalStatus) ? o.OrgCredentialsActive : void 0;
77
- if (T(e.globalStatus) && e.isPublic && !T(e.userStatus)) return o.UsingOrgCredentials;
83
+ }, M = (e) => e?.authenticationType == null || e.authenticationType === t.None ? !1 : D(e.globalStatus), N = (e) => e.isPublic || D(e.userStatus) ? r.User : r.Global, P = (e) => D(e.userStatus) ? r.User : r.Global, F = (e) => {
84
+ if (e.isManageableByAdmin) return D(e.userStatus) ? o.PersonalCredentialsActive : D(e.globalStatus) ? o.OrgCredentialsActive : void 0;
85
+ if (D(e.globalStatus) && e.isPublic && !D(e.userStatus)) return o.UsingOrgCredentials;
78
86
  };
79
87
  //#endregion
80
- export { s as C, r as D, o as E, i as O, c as S, a as T, g as _, j as a, h as b, D as c, y as d, x as f, m as g, d as h, O as i, t as k, w as l, f as m, k as n, M as o, b as p, N as r, E as s, A as t, C as u, u as v, n as w, l as x, p as y };
88
+ export { i as A, l as C, a as D, n as E, o as O, h as S, s as T, d as _, N as a, u as b, k as c, x as d, C as f, f as g, _ as h, A as i, t as j, r as k, E as l, v as m, j as n, P as o, S as p, F as r, O as s, M as t, T as u, m as v, c as w, p as x, g as y };
package/mapping.js CHANGED
@@ -1 +1 @@
1
- export { S as CatalogDetailsTab, C as CatalogSortKey, w as CredentialStatus, T as CredentialsBadgeState, E as CredentialsBannerState, D as CredentialsLevel, O as CredentialsUiState, k as ToolsetAuthenticationType, d as buildCatalogTabs, g as filterCatalogItems, _ as filterCatalogItemsByQuery, l as getCatalogDetailsTabs, n as getCredentialsBadgeState, r as getCredentialsBannerState, i as getCredentialsUiState, a as getDirectCredentialsLevel, o as getSignedInLevel, y as getTopicOptions, x as sortCatalogItems } from "./mapping-up05V8hl.js";
1
+ export { w as CatalogDetailsTab, T as CatalogSortKey, E as CredentialStatus, D as CredentialsBadgeState, O as CredentialsBannerState, k as CredentialsLevel, A as CredentialsUiState, j as ToolsetAuthenticationType, m as applyCatalogSelection, d as buildCatalogTabs, v as filterCatalogItems, y as filterCatalogItemsByQuery, l as getCatalogDetailsTabs, n as getCredentialsBadgeState, r as getCredentialsBannerState, i as getCredentialsUiState, a as getDirectCredentialsLevel, o as getSignedInLevel, x as getTopicOptions, C as sortCatalogItems } from "./mapping-CaLNwK9q.js";
@@ -10,7 +10,7 @@ export interface GridContext {
10
10
  onToggleFavorite?: (id: string, isStarred: boolean) => void;
11
11
  /** Rule for whether the favorite star is shown on a row; `false` hides it. Defaults to visible when omitted. */
12
12
  isFavoriteVisible?: (item: CatalogItem) => boolean;
13
- /** ID of an item to visually mark as selected (border, tint, and checkmark). */
13
+ /** ID of the item whose name cell shows the selection checkmark. */
14
14
  selectedItemId?: string;
15
15
  /** Accessible label for the logged-out warning icon on the entity avatar, and the text shown in its hover tooltip. */
16
16
  credentialsBadgeLoggedOutLabel?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"grid-context.d.ts","sourceRoot":"","sources":["../../src/models/grid-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAElD,0DAA0D;AAC1D,MAAM,WAAW,WAAW;IAC1B,sEAAsE;IACtE,WAAW,EAAE,MAAM,CAAC;IACpB,iDAAiD;IACjD,UAAU,EAAE,kBAAkB,CAAC;IAC/B,uDAAuD;IACvD,gBAAgB,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5D,gHAAgH;IAChH,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,OAAO,CAAC;IACnD,gFAAgF;IAChF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,sHAAsH;IACtH,8BAA8B,CAAC,EAAE,MAAM,CAAC;IACxC,6EAA6E;IAC7E,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB"}
1
+ {"version":3,"file":"grid-context.d.ts","sourceRoot":"","sources":["../../src/models/grid-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAElD,0DAA0D;AAC1D,MAAM,WAAW,WAAW;IAC1B,sEAAsE;IACtE,WAAW,EAAE,MAAM,CAAC;IACpB,iDAAiD;IACjD,UAAU,EAAE,kBAAkB,CAAC;IAC/B,uDAAuD;IACvD,gBAAgB,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5D,gHAAgH;IAChH,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,OAAO,CAAC;IACnD,oEAAoE;IACpE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,sHAAsH;IACtH,8BAA8B,CAAC,EAAE,MAAM,CAAC;IACxC,6EAA6E;IAC7E,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB"}
@@ -13,26 +13,12 @@ export interface ListViewTypography {
13
13
  /** Typography class for the last (deepest) folder segment, the one the folder cell displays. Default: `'dial-small-semi-text'`. */
14
14
  folderLastSegmentClassName?: string;
15
15
  }
16
- /** Color overrides for `ListView` cells, applied via CSS custom properties. */
16
+ /** Color overrides for `ListView` cell content, applied via CSS custom properties; the table chrome is the ui-kit `Grid` theme. */
17
17
  export interface ListViewColors {
18
- /** Grid container background. Fallback: `--bg-layer-raised`. */
19
- background?: string;
20
- /** Grid container border color. Fallback: `--stroke-secondary`. */
21
- border?: string;
22
- /** Sticky header background. Fallback: `--bg-layer-raised`. */
23
- headerBackground?: string;
24
- /** Divider color between header and rows. Fallback: `--stroke-tertiary`. */
25
- rowDivider?: string;
26
18
  /** Color of the filled star icon in the favorite column. Fallback: `--text-warning-icon`. */
27
19
  starFilled?: string;
28
20
  /** Color of the folder icon in the folder column. Fallback: `--text-secondary`. */
29
21
  folderIcon?: string;
30
- /** Background color of even-indexed grid rows. Fallback: `--bg-layer-base`. */
31
- rowEvenBackground?: string;
32
- /** Border color of the selected row. Fallback: `--stroke-accent`. */
33
- selectedRowBorder?: string;
34
- /** Background color (tint) of the selected row. Fallback: `--bg-control-accent-alpha-active`. */
35
- selectedRowBackground?: string;
36
22
  /** Color of the checkmark icon in the selected row's name cell. Fallback: `--text-accent`. */
37
23
  selectedRowCheckIcon?: string;
38
24
  }
@@ -53,7 +39,7 @@ export interface ListViewProps {
53
39
  query?: string;
54
40
  /** ARIA label for the grid element. Default: 'Catalog'. */
55
41
  ariaLabel?: string;
56
- /** Grid empty-state title. */
42
+ /** Grid empty-state title. Default: `'No results'`. */
57
43
  emptyStateTitle?: string;
58
44
  /** Secondary line under the grid empty-state title. Omitted when not set. */
59
45
  emptyStateDescription?: string;
@@ -65,14 +51,7 @@ export interface ListViewProps {
65
51
  isFavoriteVisible?: (item: CatalogItem) => boolean;
66
52
  /** Called when a table row is clicked (excluding the star column), or when Enter or Space is pressed on it in single selection mode. */
67
53
  onItemClick?: (item: CatalogItem) => void;
68
- /**
69
- * When set, the ag-grid column header becomes `position: sticky` at this
70
- * pixel offset from the scroll container's top edge. Pass the height of any
71
- * sticky UI above the list (e.g. the catalog page heading) so the header
72
- * sits flush below it while the page scrolls.
73
- */
74
- stickyHeaderTop?: number;
75
- /** ID of an item to visually mark as selected (border, tint, and checkmark). Ignored in `CatalogSelectionMode.Multiple`. */
54
+ /** ID of an item to mark as selected (row selection state and checkmark). Ignored in `CatalogSelectionMode.Multiple`. */
76
55
  selectedItemId?: string;
77
56
  /** Row selection mode; `Multiple` adds a checkbox column with a select-all header. Default: `CatalogSelectionMode.Single`. */
78
57
  selectionMode?: CatalogSelectionMode;
@@ -1 +1 @@
1
- {"version":3,"file":"list-props.d.ts","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,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uDAAuD;IACvD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,6EAA6E;IAC7E,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,8DAA8D;IAC9D,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,qDAAqD;IACrD,gBAAgB,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5D,mJAAmJ;IACnJ,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,OAAO,CAAC;IACnD,wIAAwI;IACxI,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAAC;IAC1C,yHAAyH;IACzH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,8HAA8H;IAC9H,aAAa,CAAC,EAAE,oBAAoB,CAAC;IACrC,6GAA6G;IAC7G,eAAe,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACtC,iJAAiJ;IACjJ,iBAAiB,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC;IAC/C,6GAA6G;IAC7G,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,MAAM,CAAC;IACnD,8GAA8G;IAC9G,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,mKAAmK;IACnK,8BAA8B,CAAC,EAAE,MAAM,CAAC;IACxC,6FAA6F;IAC7F,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;;;OAOG;IACH,gBAAgB,CAAC,EAAE,wBAAwB,CAAC;CAC7C"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-catalog",
3
3
  "description": "Marketplace catalog component for browsing models, tools, and assistants with search, filter, and sort",
4
- "version": "1.3.0-dev.187",
4
+ "version": "1.3.0-dev.191",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "sideEffects": [
@@ -28,12 +28,12 @@
28
28
  "dependencies": {
29
29
  "@tabler/icons-react": "^3.44.0",
30
30
  "ag-grid-community": "^35.3.0",
31
- "@epam/ai-dial-publish-panel": "1.3.0-dev.187"
31
+ "@epam/ai-dial-publish-panel": "1.3.0-dev.191"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "react": "^19.2.8",
35
- "@epam/ai-dial-chat-shared": "1.3.0-dev.187",
36
- "@epam/ai-dial-ui-kit": "^0.16.0-dev.35"
35
+ "@epam/ai-dial-chat-shared": "1.3.0-dev.191",
36
+ "@epam/ai-dial-ui-kit": "^0.16.0-dev.45"
37
37
  },
38
38
  "repository": {
39
39
  "type": "git",
@@ -1,13 +1,13 @@
1
1
  /**
2
- * Returns a new selection with `id` toggled. A newly selected id is appended,
3
- * so the set's iteration order stays the order items were selected in.
2
+ * Merges the selection the ui-kit `Grid` reports into the host's selection.
3
+ *
4
+ * The grid only knows the rows it holds and reports them in row order, so a
5
+ * plain copy would lose two things the host relies on: the order items were
6
+ * selected in, and selected ids the host filtered out of the list. Previous ids
7
+ * are kept in their order when they are unlisted or still selected; ids the
8
+ * grid newly selected are appended after them, in the grid's order.
4
9
  */
5
- export declare const toggleSelectedId: (selectedIds: ReadonlySet<string>, id: string) => Set<string>;
6
- /**
7
- * Returns a new selection after a select-all over `listedIds`: when every
8
- * listed id is already selected they are all removed, otherwise the missing
9
- * ones are appended in list order. Selected ids that are not listed (e.g.
10
- * filtered out by the host) are kept either way.
11
- */
12
- export declare const toggleAllSelectedIds: (selectedIds: ReadonlySet<string>, listedIds: readonly string[]) => Set<string>;
10
+ export declare const mergeGridSelection: (previous: ReadonlySet<string>, gridIds: ReadonlySet<string>, listedIds: readonly string[]) => Set<string>;
11
+ /** Returns the ids a picker commits: attached ids still checked or not listed, in order, then newly checked ids. */
12
+ export declare const applyCatalogSelection: (attachedIds: readonly string[], checkedIds: ReadonlySet<string>, listedIds: ReadonlySet<string>) => string[];
13
13
  //# sourceMappingURL=list-selection.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"list-selection.d.ts","sourceRoot":"","sources":["../../src/utils/list-selection.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAC3B,aAAa,WAAW,CAAC,MAAM,CAAC,EAChC,IAAI,MAAM,KACT,GAAG,CAAC,MAAM,CAQZ,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,GAC/B,aAAa,WAAW,CAAC,MAAM,CAAC,EAChC,WAAW,SAAS,MAAM,EAAE,KAC3B,GAAG,CAAC,MAAM,CAaZ,CAAC"}
1
+ {"version":3,"file":"list-selection.d.ts","sourceRoot":"","sources":["../../src/utils/list-selection.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB,GAC7B,UAAU,WAAW,CAAC,MAAM,CAAC,EAC7B,SAAS,WAAW,CAAC,MAAM,CAAC,EAC5B,WAAW,SAAS,MAAM,EAAE,KAC3B,GAAG,CAAC,MAAM,CAUZ,CAAC;AAEF,oHAAoH;AACpH,eAAO,MAAM,qBAAqB,GAChC,aAAa,SAAS,MAAM,EAAE,EAC9B,YAAY,WAAW,CAAC,MAAM,CAAC,EAC/B,WAAW,WAAW,CAAC,MAAM,CAAC,KAC7B,MAAM,EAQR,CAAC"}
@@ -1,19 +1,3 @@
1
- import { RefObject } from 'react';
2
1
  /** Returns the nearest scrollable ancestor, falling back to `<html>`. */
3
2
  export declare const getScrollParent: (el: Element | null) => Element;
4
- /** Row range `useRowWindow` currently wants rendered. */
5
- export interface RowWindow {
6
- /** Attach to the element that spans all rows, spacers included. */
7
- containerRef: RefObject<HTMLDivElement | null>;
8
- /** Index of the first row to render (inclusive). */
9
- startRow: number;
10
- /** Index of one past the last row to render (exclusive). */
11
- endRow: number;
12
- }
13
- /**
14
- * Tracks which slice of a fixed-row-height list covers the viewport of its
15
- * nearest scrollable ancestor, for a list that scrolls with the page rather
16
- * than inside its own box.
17
- */
18
- export declare const useRowWindow: (rowCount: number, rowHeight: number, overscan?: number) => RowWindow;
19
3
  //# sourceMappingURL=scroll-window.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"scroll-window.d.ts","sourceRoot":"","sources":["../../src/utils/scroll-window.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAA+B,MAAM,OAAO,CAAC;AAEpE,yEAAyE;AACzE,eAAO,MAAM,eAAe,GAAI,IAAI,OAAO,GAAG,IAAI,KAAG,OAYpD,CAAC;AAeF,yDAAyD;AACzD,MAAM,WAAW,SAAS;IACxB,mEAAmE;IACnE,YAAY,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAC/C,oDAAoD;IACpD,QAAQ,EAAE,MAAM,CAAC;IACjB,4DAA4D;IAC5D,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;GAIG;AACH,eAAO,MAAM,YAAY,GACvB,UAAU,MAAM,EAChB,WAAW,MAAM,EACjB,iBAA2B,KAC1B,SAuEF,CAAC"}
1
+ {"version":3,"file":"scroll-window.d.ts","sourceRoot":"","sources":["../../src/utils/scroll-window.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,eAAO,MAAM,eAAe,GAAI,IAAI,OAAO,GAAG,IAAI,KAAG,OAYpD,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { RefObject } from 'react';
2
+ /** Returns a ref for a list's container that, once `count` drops and focus is lost, focuses the list's first button. */
3
+ export declare const useListRemoveFocus: <T extends HTMLElement = HTMLElement>(count: number) => RefObject<T | null>;
4
+ //# sourceMappingURL=use-list-remove-focus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-list-remove-focus.d.ts","sourceRoot":"","sources":["../../src/utils/use-list-remove-focus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAqB,MAAM,OAAO,CAAC;AAE1D,wHAAwH;AACxH,eAAO,MAAM,kBAAkB,GAAI,CAAC,SAAS,WAAW,GAAG,WAAW,EACpE,OAAO,MAAM,KACZ,SAAS,CAAC,CAAC,GAAG,IAAI,CAsBpB,CAAC"}
@@ -1,6 +0,0 @@
1
- import { ICellRendererParams } from 'ag-grid-community';
2
- import { FC } from 'react';
3
- import { CatalogItem } from '../../../models/catalog-item';
4
- /** ag-grid cell renderer for a row's checkbox in the multi-select column. */
5
- export declare const SelectionCellRenderer: FC<ICellRendererParams<CatalogItem>>;
6
- //# sourceMappingURL=SelectionCellRenderer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SelectionCellRenderer.d.ts","sourceRoot":"","sources":["../../../../src/components/ListView/Renders/SelectionCellRenderer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC3B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAGhE,6EAA6E;AAC7E,eAAO,MAAM,qBAAqB,EAAE,EAAE,CAAC,mBAAmB,CAAC,WAAW,CAAC,CAgBtE,CAAC"}
@@ -1,4 +0,0 @@
1
- import { FC } from 'react';
2
- /** ag-grid header component for the multi-select column: a select-all checkbox. */
3
- export declare const SelectionHeader: FC;
4
- //# sourceMappingURL=SelectionHeader.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SelectionHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/ListView/Renders/SelectionHeader.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAG3B,mFAAmF;AACnF,eAAO,MAAM,eAAe,EAAE,EAoB7B,CAAC"}
@@ -1,24 +0,0 @@
1
- import { CatalogItem } from '../../models/catalog-item';
2
- /** Multi-select state shared by the `ListView` selection column's header and cells. */
3
- export interface ListSelectionContextValue {
4
- /** Ids of the selected items, in selection order. */
5
- selectedIds: ReadonlySet<string>;
6
- /** Whether every listed item is selected. */
7
- isAllSelected: boolean;
8
- /** Whether some, but not all, listed items are selected. */
9
- isSomeSelected: boolean;
10
- /** Whether the list has any items to select. */
11
- hasItems: boolean;
12
- /** Toggles one item's selection. */
13
- toggle: (id: string) => void;
14
- /** Selects every listed item, or clears them all when they are all selected. */
15
- toggleAll: () => void;
16
- /** Accessible name of a row's checkbox. */
17
- getRowAriaLabel: (item: CatalogItem) => string;
18
- /** Accessible name of the select-all checkbox. */
19
- selectAllAriaLabel: string;
20
- }
21
- export declare const ListSelectionContext: import('react').Context<ListSelectionContextValue | null>;
22
- /** Reads the `ListView` multi-select state; only valid inside the selection column. */
23
- export declare const useListSelection: () => ListSelectionContextValue;
24
- //# sourceMappingURL=selection-context.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"selection-context.d.ts","sourceRoot":"","sources":["../../../src/components/ListView/selection-context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAE7D,uFAAuF;AACvF,MAAM,WAAW,yBAAyB;IACxC,qDAAqD;IACrD,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACjC,6CAA6C;IAC7C,aAAa,EAAE,OAAO,CAAC;IACvB,4DAA4D;IAC5D,cAAc,EAAE,OAAO,CAAC;IACxB,gDAAgD;IAChD,QAAQ,EAAE,OAAO,CAAC;IAClB,oCAAoC;IACpC,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,gFAAgF;IAChF,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,2CAA2C;IAC3C,eAAe,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,MAAM,CAAC;IAC/C,kDAAkD;IAClD,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAOD,eAAO,MAAM,oBAAoB,2DACsB,CAAC;AAExD,uFAAuF;AACvF,eAAO,MAAM,gBAAgB,QAAO,yBAQnC,CAAC"}