@epam/ai-dial-projects 0.0.0-stage → 1.3.0-dev.213

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.
@@ -0,0 +1,22 @@
1
+ import { FC } from 'react';
2
+ import { ProjectItem } from '../../models/project-item';
3
+ /** Props for the {@link ProjectCard} component. */
4
+ export interface ProjectCardProps {
5
+ /** Project rendered by the card. */
6
+ project: ProjectItem;
7
+ /** Trimmed search query whose match is highlighted in the name. */
8
+ searchQuery: string;
9
+ /** Text of the source badge. */
10
+ sourceLabel: string;
11
+ /** Formats the last-updated time as display text. */
12
+ formatUpdatedAt: (timestamp: number) => string;
13
+ /** CSS class applied to the project name. */
14
+ titleClassName: string;
15
+ /** CSS class applied to the source badge. */
16
+ badgeClassName: string;
17
+ /** CSS class applied to the last-updated date. */
18
+ metaClassName: string;
19
+ }
20
+ /** Non-interactive list item showing a project's name, source and last-updated date. */
21
+ export declare const ProjectCard: FC<ProjectCardProps>;
22
+ //# sourceMappingURL=ProjectCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProjectCard.d.ts","sourceRoot":"","sources":["../../../src/components/ProjectCard/ProjectCard.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAG7D,mDAAmD;AACnD,MAAM,WAAW,gBAAgB;IAC/B,oCAAoC;IACpC,OAAO,EAAE,WAAW,CAAC;IACrB,mEAAmE;IACnE,WAAW,EAAE,MAAM,CAAC;IACpB,gCAAgC;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,qDAAqD;IACrD,eAAe,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,CAAC;IAC/C,6CAA6C;IAC7C,cAAc,EAAE,MAAM,CAAC;IACvB,6CAA6C;IAC7C,cAAc,EAAE,MAAM,CAAC;IACvB,kDAAkD;IAClD,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,wFAAwF;AACxF,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CA6C5C,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+ import { ProjectsProps } from '../../models/projects-props';
3
+ /** Projects page shell: header, search + sort toolbar, and a loading, error, empty, no-results or card-grid state. */
4
+ export declare const Projects: FC<ProjectsProps>;
5
+ //# sourceMappingURL=Projects.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Projects.d.ts","sourceRoot":"","sources":["../../../src/components/Projects/Projects.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAE,EAAE,EAAW,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAMjE,sHAAsH;AACtH,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CAkMtC,CAAC"}
package/index.css ADDED
@@ -0,0 +1,3 @@
1
+ ._card_1w3yq_1{background:var(--pr-card-bg,var(--bg-layer-raised,#fcfcfc));border-color:var(--pr-card-border,var(--stroke-tertiary,#e0e6f0))}._title_1w3yq_6{color:var(--pr-card-title-text,var(--text-primary,#161b2d))}._badge_1w3yq_10{background:var(--pr-badge-bg,var(--bg-layer-sunken,#eef1f7));color:var(--pr-badge-text,var(--text-primary,#161b2d))}._meta_1w3yq_15{color:var(--pr-meta-text,var(--text-secondary,#57647a))}._container_4rer8_1{background:var(--pr-bg,var(--bg-layer-base,#f5f7fa))}._subtitle_4rer8_5{color:var(--pr-subtitle-text,var(--text-secondary,#57647a))}._sortButton_4rer8_9{color:var(--pr-sort-text,var(--text-accent,#1d4ed8))}
2
+ /*$vite$:1*//*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
3
+ @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid}}}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.relative{position:relative}.m-0{margin:0}.mt-1{margin-top:.25rem}.flex{display:flex}.grid{display:grid}.h-full{height:100%}.w-fit{width:fit-content}.w-full{width:100%}.min-w-0{min-width:0}.flex-1{flex:1}.shrink-0{flex-shrink:0}.list-none{list-style-type:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-center{justify-content:center}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:4px}.rounded-lg{border-radius:.5rem}.border{border-style:var(--tw-border-style);border-width:1px}.p-0{padding:0}.p-4{padding:1rem}.px-2{padding-inline:.5rem}.px-4{padding-inline:1rem}.py-0\.5{padding-block:.125rem}.py-4{padding-block:1rem}.break-words{overflow-wrap:break-word}@media (min-width:1280px){.desktop\:grid-cols-\[repeat\(auto-fill\,minmax\(280px\,1fr\)\)\]{grid-template-columns:repeat(auto-fill,minmax(280px,1fr))}.desktop\:flex-row{flex-direction:row}.desktop\:items-center{align-items:center}.desktop\:gap-6{gap:1.5rem}.desktop\:px-8{padding-inline:2rem}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}
package/index.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ export { Projects } from './components/Projects/Projects';
2
+ export type { ProjectItem } from './models/project-item';
3
+ export type { ProjectsColors, ProjectsLabels, ProjectsProps, ProjectsStyles, ProjectsTypography, } from './models/projects-props';
4
+ export { ProjectSource } from './types/project-source';
5
+ export { ProjectsSortKey } from './types/projects-sort-key';
6
+ //# sourceMappingURL=index.d.ts.map
package/index.d.ts.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,YAAY,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,YAAY,EACV,cAAc,EACd,cAAc,EACd,aAAa,EACb,cAAc,EACd,kBAAkB,GACnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC"}
package/index.js ADDED
@@ -0,0 +1,172 @@
1
+ import { PanelEmptyState as e, buildCssVars as t, mergeClasses as n } from "@epam/ai-dial-chat-shared";
2
+ import { ButtonAppearance as r, ButtonDropdown as i, ButtonVariant as a, DIAL_ICON_SIZE as o, DIAL_KIT_ICON_STROKE as s, ElementSize as c, GhostButton as l, Highlight as u, MenuItemMark as d, Search as f, Spinner as p } from "@epam/ai-dial-ui-kit";
3
+ import { IconArrowsSort as m } from "@tabler/icons-react";
4
+ import { useMemo as h } from "react";
5
+ import { jsx as g, jsxs as _ } from "react/jsx-runtime";
6
+ //#region src/types/projects-sort-key.ts
7
+ var v = /* @__PURE__ */ function(e) {
8
+ return e.Newest = "newest", e.Oldest = "oldest", e.NameAsc = "name-asc", e;
9
+ }({}), y = (e, t) => {
10
+ let n = t.trim().toLocaleLowerCase();
11
+ return n ? e.filter((e) => e.name.toLocaleLowerCase().includes(n)) : e;
12
+ }, b = (e, t, n) => {
13
+ let r = new Intl.Collator(n, {
14
+ sensitivity: "base",
15
+ numeric: !0
16
+ }), i = (e, t) => r.compare(e.name, t.name);
17
+ if (t === v.NameAsc) return [...e].sort(i);
18
+ let a = t === v.Oldest ? 1 : -1;
19
+ return [...e].sort((e, t) => e.updatedAt == null && t.updatedAt == null ? i(e, t) : e.updatedAt == null ? 1 : t.updatedAt == null ? -1 : (e.updatedAt - t.updatedAt) * a || i(e, t));
20
+ }, x = {
21
+ card: "_card_1w3yq_1",
22
+ title: "_title_1w3yq_6",
23
+ badge: "_badge_1w3yq_10",
24
+ meta: "_meta_1w3yq_15"
25
+ }, S = ({ project: e, searchQuery: t, sourceLabel: r, formatUpdatedAt: i, titleClassName: a, badgeClassName: o, metaClassName: s }) => /* @__PURE__ */ _("li", {
26
+ className: n("flex min-w-0 flex-col gap-2 rounded-lg border p-4", x.card),
27
+ children: [/* @__PURE__ */ g(u, {
28
+ text: e.name,
29
+ query: t,
30
+ maxLines: 2,
31
+ className: n("min-w-0 break-words", a, x.title)
32
+ }), /* @__PURE__ */ _("div", {
33
+ className: "flex min-w-0 flex-wrap items-center gap-2",
34
+ children: [/* @__PURE__ */ g("span", {
35
+ className: n("w-fit shrink-0 rounded px-2 py-0.5", o, x.badge),
36
+ children: r
37
+ }), e.updatedAt != null && /* @__PURE__ */ g("time", {
38
+ dateTime: new Date(e.updatedAt).toISOString(),
39
+ className: n("min-w-0", s, x.meta),
40
+ children: i(e.updatedAt)
41
+ })]
42
+ })]
43
+ }), C = {
44
+ container: "_container_4rer8_1",
45
+ subtitle: "_subtitle_4rer8_5",
46
+ sortButton: "_sortButton_4rer8_9"
47
+ }, w = ({ projects: u, isLoading: v = !1, hasError: x = !1, incompleteSources: w = [], onRetry: T, searchQuery: E, onSearchQueryChange: D, sortKey: O, onSortKeyChange: k, formatUpdatedAt: A, labels: j, locale: M, styles: N }) => {
48
+ let { colors: P, typography: F } = N ?? {}, I = F?.titleClassName ?? "dial-h1-text", L = F?.subtitleClassName ?? "dial-body-text", R = F?.cardTitleClassName ?? "dial-body-semi-text", z = F?.badgeClassName ?? "dial-tiny-semi-text", B = F?.metaClassName ?? "dial-small-text", V = t({
49
+ "--pr-bg": P?.background,
50
+ "--pr-subtitle-text": P?.subtitleText,
51
+ "--pr-sort-text": P?.sortButtonText,
52
+ "--pr-card-bg": P?.cardBackground,
53
+ "--pr-card-border": P?.cardBorder,
54
+ "--pr-card-title-text": P?.cardTitleText,
55
+ "--pr-badge-bg": P?.badgeBackground,
56
+ "--pr-badge-text": P?.badgeText,
57
+ "--pr-meta-text": P?.metaText
58
+ }), H = E.trim(), U = w.length > 0, W = U && u.length === 0, G = h(() => b(y(u, E), O, M), [
59
+ u,
60
+ E,
61
+ O,
62
+ M
63
+ ]), K = j.sortOptions.find((e) => e.value === O)?.label ?? j.sortLabel, q = h(() => j.sortOptions.map((e) => ({
64
+ key: e.value,
65
+ label: e.label,
66
+ mark: d.Check,
67
+ checked: e.value === O,
68
+ onClick: () => k(e.value)
69
+ })), [
70
+ j.sortOptions,
71
+ O,
72
+ k
73
+ ]), J = (e) => {
74
+ D(e ?? "");
75
+ }, Y = () => {
76
+ if (!v) return x ? j.errorLabel : U ? j.incompleteLabel : u.length === 0 ? j.emptyStateLabel : G.length === 0 ? j.noResultsLabel : j.resultCountLabel(G.length);
77
+ }, X = () => v ? /* @__PURE__ */ g(p, {}) : x || W ? /* @__PURE__ */ _("div", {
78
+ className: "flex flex-col items-center gap-3",
79
+ children: [/* @__PURE__ */ g("p", {
80
+ className: n(L, C.subtitle),
81
+ children: x ? j.errorLabel : j.incompleteLabel
82
+ }), /* @__PURE__ */ g(l, {
83
+ label: j.retryLabel,
84
+ onClick: T
85
+ })]
86
+ }) : u.length === 0 ? /* @__PURE__ */ g(e, {
87
+ label: j.emptyStateLabel,
88
+ description: j.emptyStateDescription
89
+ }) : G.length === 0 ? /* @__PURE__ */ g(e, { label: j.noResultsLabel }) : /* @__PURE__ */ g("ul", {
90
+ className: "m-0 grid w-full min-w-0 list-none grid-cols-1 gap-4 p-0 desktop:grid-cols-[repeat(auto-fill,minmax(280px,1fr))]",
91
+ children: G.map((e) => /* @__PURE__ */ g(S, {
92
+ project: e,
93
+ searchQuery: H,
94
+ sourceLabel: j.sourceLabels[e.source],
95
+ formatUpdatedAt: A,
96
+ titleClassName: R,
97
+ badgeClassName: z,
98
+ metaClassName: B
99
+ }, e.id))
100
+ }), Z = v || x || G.length === 0;
101
+ return /* @__PURE__ */ _("div", {
102
+ style: V,
103
+ className: n("flex h-full w-full min-w-0 flex-col gap-4 overflow-y-auto px-4 py-4 desktop:gap-6 desktop:px-8", C.container),
104
+ children: [
105
+ /* @__PURE__ */ _("div", {
106
+ className: "min-w-0",
107
+ children: [/* @__PURE__ */ g("h1", {
108
+ className: n("break-words", I),
109
+ children: j.title
110
+ }), /* @__PURE__ */ g("p", {
111
+ className: n("mt-1", L, C.subtitle),
112
+ children: j.subtitle
113
+ })]
114
+ }),
115
+ /* @__PURE__ */ _("div", {
116
+ className: "flex flex-col gap-3 desktop:flex-row desktop:items-center",
117
+ children: [/* @__PURE__ */ g("div", {
118
+ role: "search",
119
+ className: "min-w-0 flex-1",
120
+ children: /* @__PURE__ */ g(f, {
121
+ value: E,
122
+ onChange: J,
123
+ placeholder: j.searchPlaceholder,
124
+ clearLabel: j.clearSearchLabel,
125
+ "aria-label": j.searchAriaLabel,
126
+ size: c.Large
127
+ })
128
+ }), j.sortOptions.length > 0 && /* @__PURE__ */ g("div", {
129
+ role: "group",
130
+ "aria-label": j.sortLabel,
131
+ className: "shrink-0",
132
+ children: /* @__PURE__ */ g(i, {
133
+ items: q,
134
+ label: K,
135
+ variant: a.Primary,
136
+ appearance: r.Ghost,
137
+ iconBefore: /* @__PURE__ */ g(m, {
138
+ size: o.SM,
139
+ "aria-hidden": !0,
140
+ stroke: s
141
+ }),
142
+ className: C.sortButton
143
+ })
144
+ })]
145
+ }),
146
+ /* @__PURE__ */ g("span", {
147
+ role: "status",
148
+ "aria-live": "polite",
149
+ className: "sr-only",
150
+ children: Y()
151
+ }),
152
+ U && !v && !x && !W && /* @__PURE__ */ _("div", {
153
+ className: "flex flex-wrap items-center gap-3",
154
+ children: [/* @__PURE__ */ g("p", {
155
+ className: n(L, C.subtitle),
156
+ children: j.incompleteLabel
157
+ }), /* @__PURE__ */ g(l, {
158
+ label: j.retryLabel,
159
+ onClick: T
160
+ })]
161
+ }),
162
+ /* @__PURE__ */ g("div", {
163
+ className: n("flex w-full min-w-0 flex-1 flex-col", Z && "items-center justify-center"),
164
+ children: X()
165
+ })
166
+ ]
167
+ });
168
+ }, T = /* @__PURE__ */ function(e) {
169
+ return e.Personal = "personal", e.Shared = "shared", e.Organization = "organization", e;
170
+ }({});
171
+ //#endregion
172
+ export { T as ProjectSource, w as Projects, v as ProjectsSortKey };
@@ -0,0 +1,13 @@
1
+ import { ProjectSource } from '../types/project-source';
2
+ /** One project rendered as a card by {@link Projects}. */
3
+ export interface ProjectItem {
4
+ /** Stable unique id, used as the list key. */
5
+ id: string;
6
+ /** Display name, matched by search and highlighted. */
7
+ name: string;
8
+ /** Where the project comes from; selects the source badge label. */
9
+ source: ProjectSource;
10
+ /** Last-updated time in epoch milliseconds; the card omits its date line when unset. */
11
+ updatedAt?: number;
12
+ }
13
+ //# sourceMappingURL=project-item.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project-item.d.ts","sourceRoot":"","sources":["../../src/models/project-item.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE7D,0DAA0D;AAC1D,MAAM,WAAW,WAAW;IAC1B,8CAA8C;IAC9C,EAAE,EAAE,MAAM,CAAC;IACX,uDAAuD;IACvD,IAAI,EAAE,MAAM,CAAC;IACb,oEAAoE;IACpE,MAAM,EAAE,aAAa,CAAC;IACtB,wFAAwF;IACxF,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
@@ -0,0 +1,111 @@
1
+ import { SelectOption } from '@epam/ai-dial-ui-kit';
2
+ import { ProjectSource } from '../types/project-source';
3
+ import { ProjectsSortKey } from '../types/projects-sort-key';
4
+ import { ProjectItem } from './project-item';
5
+ /** Localized labels used by the {@link Projects} component. */
6
+ export interface ProjectsLabels {
7
+ /** Page title, e.g. "Projects". */
8
+ title: string;
9
+ /** One-line description shown beneath the title. */
10
+ subtitle: string;
11
+ /** Placeholder text for the toolbar search input. */
12
+ searchPlaceholder: string;
13
+ /** Accessible label for the toolbar search input. */
14
+ searchAriaLabel: string;
15
+ /** Accessible label for the search input's clear action. */
16
+ clearSearchLabel: string;
17
+ /** Accessible name of the group wrapping the sort control, e.g. "Sort". */
18
+ sortLabel: string;
19
+ /** Options the sort menu lists; each `value` is a `ProjectsSortKey`. */
20
+ sortOptions: SelectOption[];
21
+ /** Message shown when there are no projects at all. */
22
+ emptyStateLabel: string;
23
+ /** Secondary line under `emptyStateLabel`. Omitted when not set. */
24
+ emptyStateDescription?: string;
25
+ /** Message shown when the search query matches no project. */
26
+ noResultsLabel: string;
27
+ /** Message shown alongside the retry action when loading failed. */
28
+ errorLabel: string;
29
+ /** Message shown with a retry action when some sources could not be listed in full. */
30
+ incompleteLabel: string;
31
+ /** Label of the retry action shown when loading failed. */
32
+ retryLabel: string;
33
+ /** Text of the source badge for each project source. */
34
+ sourceLabels: Record<ProjectSource, string>;
35
+ /** Announced through the status region when projects are listed, e.g. "3 projects". */
36
+ resultCountLabel: (count: number) => string;
37
+ }
38
+ /**
39
+ * Color overrides for the {@link Projects} component, applied as CSS custom
40
+ * properties with app theme fallbacks.
41
+ */
42
+ export interface ProjectsColors {
43
+ /** Page background. Fallback: `--bg-layer-base`. */
44
+ background?: string;
45
+ /** Subtitle and status-message text color. Fallback: `--text-secondary`. */
46
+ subtitleText?: string;
47
+ /** Sort control label/icon color. Fallback: `--text-accent`. */
48
+ sortButtonText?: string;
49
+ /** Card background. Fallback: `--bg-layer-raised`. */
50
+ cardBackground?: string;
51
+ /** Card border color. Fallback: `--stroke-tertiary`. */
52
+ cardBorder?: string;
53
+ /** Project name color on a card. Fallback: `--text-primary`. */
54
+ cardTitleText?: string;
55
+ /** Source badge background. Fallback: `--bg-layer-sunken`. */
56
+ badgeBackground?: string;
57
+ /** Source badge text color. Fallback: `--text-primary`. */
58
+ badgeText?: string;
59
+ /** Last-updated date text color on a card. Fallback: `--text-secondary`. */
60
+ metaText?: string;
61
+ }
62
+ /** Typography overrides for the {@link Projects} component. */
63
+ export interface ProjectsTypography {
64
+ /** CSS class applied to the page title. Defaults to `'dial-h1-text'`. */
65
+ titleClassName?: string;
66
+ /** CSS class applied to the subtitle and status messages. Defaults to `'dial-body-text'`. */
67
+ subtitleClassName?: string;
68
+ /** CSS class applied to each card's project name. Defaults to `'dial-body-semi-text'`. */
69
+ cardTitleClassName?: string;
70
+ /** CSS class applied to each card's source badge. Defaults to `'dial-tiny-semi-text'`. */
71
+ badgeClassName?: string;
72
+ /** CSS class applied to each card's last-updated date. Defaults to `'dial-small-text'`. */
73
+ metaClassName?: string;
74
+ }
75
+ /** Style overrides for the {@link Projects} component. */
76
+ export interface ProjectsStyles {
77
+ /** Color overrides applied as CSS custom properties. */
78
+ colors?: ProjectsColors;
79
+ /** Typography class overrides. */
80
+ typography?: ProjectsTypography;
81
+ }
82
+ /** Props for the {@link Projects} component. */
83
+ export interface ProjectsProps {
84
+ /** Every project available to the user; the component filters and sorts them. */
85
+ projects: ProjectItem[];
86
+ /** Shows the loading state instead of the list. Defaults to `false`. */
87
+ isLoading?: boolean;
88
+ /** Shows the error state with a retry action. Defaults to `false`. */
89
+ hasError?: boolean;
90
+ /** Sources that could not be listed in full; when non-empty, a notice with a retry action is shown. Defaults to `[]`. */
91
+ incompleteSources?: ProjectSource[];
92
+ /** Called when the user activates the retry action. */
93
+ onRetry: () => void;
94
+ /** Current search query (controlled). */
95
+ searchQuery: string;
96
+ /** Called with the new query when the user types or clears the search. */
97
+ onSearchQueryChange: (query: string) => void;
98
+ /** Applied sort order (controlled). */
99
+ sortKey: ProjectsSortKey;
100
+ /** Called when the user picks another sort order. */
101
+ onSortKeyChange: (sortKey: ProjectsSortKey) => void;
102
+ /** Formats a card's last-updated time (epoch milliseconds) as display text. */
103
+ formatUpdatedAt: (timestamp: number) => string;
104
+ /** Localized labels. */
105
+ labels: ProjectsLabels;
106
+ /** BCP 47 locale used to collate names for the Name A–Z order. Defaults to the runtime locale. */
107
+ locale?: string;
108
+ /** Color and typography overrides. */
109
+ styles?: ProjectsStyles;
110
+ }
111
+ //# sourceMappingURL=projects-props.d.ts.map
@@ -0,0 +1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AAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,uCAAuC;IACvC,OAAO,EAAE,eAAe,CAAC;IACzB,qDAAqD;IACrD,eAAe,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,IAAI,CAAC;IACpD,+EAA+E;IAC/E,eAAe,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,CAAC;IAC/C,wBAAwB;IACxB,MAAM,EAAE,cAAc,CAAC;IACvB,kGAAkG;IAClG,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sCAAsC;IACtC,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB"}
package/package.json CHANGED
@@ -1,6 +1,32 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-projects",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "description": "Presentational Projects page shell — searchable, sortable grid of the projects available to a user",
4
+ "version": "1.3.0-dev.213",
5
+ "license": "Apache-2.0",
6
+ "type": "module",
7
+ "main": "./index.js",
8
+ "module": "./index.js",
9
+ "types": "./index.d.ts",
10
+ "exports": {
11
+ "./package.json": "./package.json",
12
+ "./styles.css": "./index.css",
13
+ ".": {
14
+ "types": "./index.d.ts",
15
+ "import": "./index.js",
16
+ "default": "./index.js"
17
+ }
18
+ },
19
+ "dependencies": {
20
+ "@tabler/icons-react": "^3.44.0"
21
+ },
22
+ "peerDependencies": {
23
+ "@epam/ai-dial-chat-shared": "1.3.0-dev.213",
24
+ "@epam/ai-dial-ui-kit": "^0.16.0-dev.45",
25
+ "react": "^19.2.8"
26
+ },
27
+ "repository": {
28
+ "type": "git",
29
+ "url": "git+https://github.com/epam/ai-dial-chat.git",
30
+ "directory": "libs/projects"
31
+ }
32
+ }
@@ -0,0 +1,11 @@
1
+ declare class NoopIntersectionObserver implements IntersectionObserver {
2
+ readonly root: Element | Document | null;
3
+ readonly rootMargin: string;
4
+ readonly thresholds: readonly number[];
5
+ readonly scrollMargin: string;
6
+ observe(): void;
7
+ unobserve(): void;
8
+ disconnect(): void;
9
+ takeRecords(): IntersectionObserverEntry[];
10
+ }
11
+ //# sourceMappingURL=test-setup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-setup.d.ts","sourceRoot":"","sources":["../src/test-setup.ts"],"names":[],"mappings":"AAKA,cAAM,wBAAyB,YAAW,oBAAoB;IAC5D,QAAQ,CAAC,IAAI,EAAE,OAAO,GAAG,QAAQ,GAAG,IAAI,CAAQ;IAChD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAM;IACjC,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAM;IAC5C,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAM;IAEnC,OAAO,IAAI,IAAI;IACf,SAAS,IAAI,IAAI;IACjB,UAAU,IAAI,IAAI;IAElB,WAAW,IAAI,yBAAyB,EAAE;CAG3C"}
@@ -0,0 +1,10 @@
1
+ /** Where a project comes from, relative to the viewing user. */
2
+ export declare enum ProjectSource {
3
+ /** The project lives in the user's own storage. */
4
+ Personal = "personal",
5
+ /** Another user shared the project with this user. */
6
+ Shared = "shared",
7
+ /** The project is published to the whole organization. */
8
+ Organization = "organization"
9
+ }
10
+ //# sourceMappingURL=project-source.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project-source.d.ts","sourceRoot":"","sources":["../../src/types/project-source.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,oBAAY,aAAa;IACvB,mDAAmD;IACnD,QAAQ,aAAa;IACrB,sDAAsD;IACtD,MAAM,WAAW;IACjB,0DAA0D;IAC1D,YAAY,iBAAiB;CAC9B"}
@@ -0,0 +1,10 @@
1
+ /** Order in which {@link Projects} lists the visible projects. */
2
+ export declare enum ProjectsSortKey {
3
+ /** Most recently updated first; undated projects last. */
4
+ Newest = "newest",
5
+ /** Least recently updated first; undated projects last. */
6
+ Oldest = "oldest",
7
+ /** Alphabetical by name, locale-aware. */
8
+ NameAsc = "name-asc"
9
+ }
10
+ //# sourceMappingURL=projects-sort-key.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"projects-sort-key.d.ts","sourceRoot":"","sources":["../../src/types/projects-sort-key.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,oBAAY,eAAe;IACzB,0DAA0D;IAC1D,MAAM,WAAW;IACjB,2DAA2D;IAC3D,MAAM,WAAW;IACjB,0CAA0C;IAC1C,OAAO,aAAa;CACrB"}
@@ -0,0 +1,7 @@
1
+ import { ProjectItem } from '../models/project-item';
2
+ import { ProjectsSortKey } from '../types/projects-sort-key';
3
+ /** Returns the projects whose name contains the trimmed query, case-insensitively; all of them for a blank query. */
4
+ export declare const filterProjects: (projects: ProjectItem[], query: string) => ProjectItem[];
5
+ /** Returns a sorted copy of the projects in the given order, with undated projects last in both date orders. */
6
+ export declare const sortProjects: (projects: ProjectItem[], sortKey: ProjectsSortKey, locale?: string) => ProjectItem[];
7
+ //# sourceMappingURL=projects.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../../src/utils/projects.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7D,qHAAqH;AACrH,eAAO,MAAM,cAAc,GACzB,UAAU,WAAW,EAAE,EACvB,OAAO,MAAM,KACZ,WAAW,EAOb,CAAC;AAEF,gHAAgH;AAChH,eAAO,MAAM,YAAY,GACvB,UAAU,WAAW,EAAE,EACvB,SAAS,eAAe,EACxB,SAAS,MAAM,KACd,WAAW,EAmBb,CAAC"}
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.