@epam/ai-dial-share 1.1.0-dev.252

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,11 @@
1
+ import { ShareLinkAccess } from '../types/share';
2
+ /** Share-link data for a catalog entity, as returned by the share-link seam. */
3
+ export interface ShareLinkData {
4
+ /** Shareable URL for the entity. */
5
+ url: string;
6
+ /** Number of days the link stays active before expiring. */
7
+ expiresInDays: number;
8
+ /** Access levels granted to anyone with the link. */
9
+ access: ShareLinkAccess[];
10
+ }
11
+ //# sourceMappingURL=share-link-data.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"share-link-data.d.ts","sourceRoot":"","sources":["../../src/models/share-link-data.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,gFAAgF;AAChF,MAAM,WAAW,aAAa;IAC5B,oCAAoC;IACpC,GAAG,EAAE,MAAM,CAAC;IACZ,4DAA4D;IAC5D,aAAa,EAAE,MAAM,CAAC;IACtB,qDAAqD;IACrD,MAAM,EAAE,eAAe,EAAE,CAAC;CAC3B"}
@@ -0,0 +1,131 @@
1
+ import { ShareLinkAccess } from '../types/share';
2
+ /** All user-visible strings in {@link SharePopoverProps}, with English defaults. */
3
+ export interface SharePopoverLabels {
4
+ /** Popover heading and dialog `aria-label`. Defaults to `"Share"`. */
5
+ title?: string;
6
+ /** QR-tab button label. Defaults to `"QR"`. */
7
+ qrButtonLabel?: string;
8
+ /** Link-tab (back) button label and label above the URL input field. Defaults to `"Link"`. */
9
+ linkLabel?: string;
10
+ /** Primary row text. Defaults to `"Anyone with the link"`. */
11
+ anyoneWithLinkTitle?: string;
12
+ /** Secondary row text. Defaults to `"in your organization"`. */
13
+ anyoneWithLinkSubtitle?: string;
14
+ /** `aria-label` for the access-level control. Defaults to `"Link access level"`. */
15
+ accessAriaLabel?: string;
16
+ /** Access-dropdown option for view access. Defaults to `"Can view"`. */
17
+ accessViewLabel?: string;
18
+ /** Access-dropdown option for edit access. Defaults to `"Can edit"`. */
19
+ accessEditLabel?: string;
20
+ /** Visibility note shown when access is View. */
21
+ visibilityNote?: string;
22
+ /** Visibility note shown when access is Edit. */
23
+ visibilityNoteEdit?: string;
24
+ /** Extra warning shown below the visibility note when the shared item has nested content (e.g. prompts, files) that is not shared automatically. Omitted when not supplied. */
25
+ nestedItemsNote?: string;
26
+ /** Copy button default label. Defaults to `"Copy"`. */
27
+ copyButtonLabel?: string;
28
+ /** Copy button label after copying. Defaults to `"Copied"`. */
29
+ copiedButtonLabel?: string;
30
+ /** `aria-label` for the share-link URL input. Defaults to `"Share link"`. */
31
+ linkAriaLabel?: string;
32
+ /** Pre-formatted expiry note (e.g. "This link is active for 3 days."). */
33
+ expiryNote?: string;
34
+ /** `aria-label` on the QR placeholder image. Defaults to `"QR code for the share link"`. */
35
+ qrCodeAriaLabel?: string;
36
+ /** `aria-label` for the loading skeleton. Defaults to `"Creating share link…"`. */
37
+ loadingLabel?: string;
38
+ /** Error message shown when share-link creation fails. */
39
+ errorTitle?: string;
40
+ }
41
+ /** CSS custom-property overrides for `SharePopover` and its descendants (`AccessControl`, `LinkView`). */
42
+ export interface SharePopoverColors {
43
+ /** Access-trigger button background color. */
44
+ accessTriggerBackground?: string;
45
+ /** Access-trigger button border color. */
46
+ accessTriggerBorder?: string;
47
+ /** Access-trigger button border color on hover. */
48
+ accessTriggerBorderHover?: string;
49
+ /** Access-trigger button border color on focus/open. */
50
+ accessTriggerBorderFocus?: string;
51
+ /** Access-trigger button label text color. */
52
+ accessTriggerText?: string;
53
+ /** Popover header title text color. */
54
+ titleText?: string;
55
+ /** "Anyone with the link" row icon badge background color. */
56
+ linkIconBackground?: string;
57
+ /** "Anyone with the link" row icon badge icon color. */
58
+ linkIconText?: string;
59
+ /** "Anyone with the link" row primary text color. */
60
+ anyoneTitle?: string;
61
+ /** "Anyone with the link" row secondary text color. */
62
+ anyoneSubtitle?: string;
63
+ /** Access-trigger chevron icon color. */
64
+ accessChevron?: string;
65
+ /** Access menu item background color on hover. */
66
+ menuItemHover?: string;
67
+ /** Access menu item focus-visible ring color. */
68
+ menuItemFocusShadow?: string;
69
+ /** Access menu item background color when checked. */
70
+ menuItemCheckedBackground?: string;
71
+ /** Access menu item label text color. */
72
+ menuItemLabel?: string;
73
+ /** Access menu item checkmark icon color. */
74
+ menuItemCheck?: string;
75
+ /** Section heading text color (e.g. above the link input). */
76
+ sectionLabel?: string;
77
+ /** Error message text color. */
78
+ errorText?: string;
79
+ /** Visibility/expiry note text color. */
80
+ noteText?: string;
81
+ /** Divider line color below the header. */
82
+ divider?: string;
83
+ /** Loading-skeleton bar/shape color. */
84
+ skeletonColor?: string;
85
+ }
86
+ /** Typography overrides for `SharePopover`. */
87
+ export interface SharePopoverTypography {
88
+ /** CSS class applied to the error message. Defaults to `'dial-tiny-text'`. */
89
+ errorClassName?: string;
90
+ /** CSS class applied to the visibility and expiry notes. Defaults to `'dial-tiny-text'`. */
91
+ noteClassName?: string;
92
+ /** CSS class applied to the nested-items warning note. Defaults to `'dial-tiny-semi-text'`. */
93
+ nestedItemsNoteClassName?: string;
94
+ /** CSS class applied to the "Anyone with the link" primary text. Defaults to `'dial-small-semi-text'`. */
95
+ anyoneTitleClassName?: string;
96
+ /** CSS class applied to the "Anyone with the link" secondary text. Defaults to `'dial-tiny-text'`. */
97
+ anyoneSubtitleClassName?: string;
98
+ /** CSS class applied to the access-trigger label. Defaults to `'dial-small-semi-text'`. */
99
+ accessTriggerLabelClassName?: string;
100
+ }
101
+ /** Combined color and typography overrides for `SharePopover`. */
102
+ export interface SharePopoverStyles {
103
+ /** Color overrides applied as CSS custom properties, cascaded to `AccessControl` and `LinkView`. */
104
+ colors?: SharePopoverColors;
105
+ /** Typography (font utility class) overrides for the error message and notes. */
106
+ typography?: SharePopoverTypography;
107
+ }
108
+ /** Props for `SharePopover`. */
109
+ export interface SharePopoverProps {
110
+ /** Resolved share URL; `undefined` while loading. */
111
+ url: string | undefined;
112
+ /** Whether the share link is still being fetched. */
113
+ isLoading: boolean;
114
+ /** Set when the share link could not be created. */
115
+ error: Error | null;
116
+ /** Current access levels granted to link holders. */
117
+ access: ShareLinkAccess[];
118
+ /** True for editable entity types (Agent, Application, Skill, Toolset); false for Model. */
119
+ canEditAccess: boolean;
120
+ /** Called when the user selects a different access level. */
121
+ onAccessChange: (access: ShareLinkAccess[]) => void;
122
+ /** Called when the popover should close. */
123
+ onClose: () => void;
124
+ /** Overrides for user-visible strings. All fields have English defaults. */
125
+ labels?: SharePopoverLabels;
126
+ /** CSS class applied to the popover container. */
127
+ className?: string;
128
+ /** Color and typography overrides applied as CSS custom properties / utility classes. */
129
+ styles?: SharePopoverStyles;
130
+ }
131
+ //# sourceMappingURL=share-popover-props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"share-popover-props.d.ts","sourceRoot":"","sources":["../../src/models/share-popover-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,oFAAoF;AACpF,MAAM,WAAW,kBAAkB;IACjC,sEAAsE;IACtE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+CAA+C;IAC/C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,8FAA8F;IAC9F,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8DAA8D;IAC9D,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,gEAAgE;IAChE,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,oFAAoF;IACpF,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,wEAAwE;IACxE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,wEAAwE;IACxE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iDAAiD;IACjD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iDAAiD;IACjD,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,+KAA+K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5C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,4EAA4E;IAC5E,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yFAAyF;IACzF,MAAM,CAAC,EAAE,kBAAkB,CAAC;CAC7B"}
package/package.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "@epam/ai-dial-share",
3
+ "description": "Share popover UI component and share-link types for AI DIAL catalog deployments",
4
+ "version": "1.1.0-dev.252",
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
+ ".": {
13
+ "types": "./index.d.ts",
14
+ "import": "./index.js",
15
+ "default": "./index.js"
16
+ }
17
+ },
18
+ "peerDependencies": {
19
+ "@epam/ai-dial-chat-shared": "1.1.0-dev.252",
20
+ "@tabler/icons-react": "^3.0.0",
21
+ "react": "^19.0.0",
22
+ "react-qr-code": "^2.2.0",
23
+ "@epam/ai-dial-ui-kit": "*"
24
+ },
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "git+https://github.com/epam/ai-dial-chat.git",
28
+ "directory": "libs/share"
29
+ }
30
+ }
@@ -0,0 +1 @@
1
+ //# 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":""}
@@ -0,0 +1,11 @@
1
+ /** Access level granted to holders of a share link. */
2
+ export declare enum ShareLinkAccess {
3
+ View = "view",
4
+ Edit = "edit"
5
+ }
6
+ /** Which body the Share popover currently renders. */
7
+ export declare enum SharePopoverView {
8
+ Link = "link",
9
+ Qr = "qr"
10
+ }
11
+ //# sourceMappingURL=share.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"share.d.ts","sourceRoot":"","sources":["../../src/types/share.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,oBAAY,eAAe;IACzB,IAAI,SAAS;IACb,IAAI,SAAS;CACd;AAED,sDAAsD;AACtD,oBAAY,gBAAgB;IAC1B,IAAI,SAAS;IACb,EAAE,OAAO;CACV"}
@@ -0,0 +1,8 @@
1
+ /** Returns the tab-navigable controls inside `container`, in DOM order. */
2
+ export declare const getInteractiveElements: (container: HTMLElement | null) => HTMLElement[];
3
+ /**
4
+ * Moves focus to the first tab-navigable control inside `container`, falling
5
+ * back to `container` itself when it holds none.
6
+ */
7
+ export declare const focusFirstInteractiveElement: (container: HTMLElement | null) => void;
8
+ //# sourceMappingURL=focus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"focus.d.ts","sourceRoot":"","sources":["../../src/utils/focus.ts"],"names":[],"mappings":"AAIA,2EAA2E;AAC3E,eAAO,MAAM,sBAAsB,GACjC,WAAW,WAAW,GAAG,IAAI,KAC5B,WAAW,EAIX,CAAC;AAEJ;;;GAGG;AACH,eAAO,MAAM,4BAA4B,GACvC,WAAW,WAAW,GAAG,IAAI,KAC5B,IAGF,CAAC"}