@epam/ai-dial-attachment-input 1.1.0-dev.56 → 1.1.0-dev.58

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/index.js CHANGED
@@ -7,6 +7,7 @@ import { Fragment as G, jsx as K, jsxs as q } from "react/jsx-runtime";
7
7
  var ue = 5, de = 4, fe = "flex size-[84px] items-center justify-center rounded-xl border", J = /* @__PURE__ */ function(e) {
8
8
  return e.None = "none", e.AllVisible = "all-visible", e.Collapsed = "collapsed", e;
9
9
  }({}), pe = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, me = (e) => {
10
+ if (e == null) return "";
10
11
  let t = e.lastIndexOf(".");
11
12
  return t > 0 ? e.slice(0, t) : e;
12
13
  }, he = {
@@ -503,7 +504,7 @@ var ue = 5, de = 4, fe = "flex size-[84px] items-center justify-center rounded-x
503
504
  "aria-label": L,
504
505
  className: a("gap-3", F ? "grid grid-cols-[repeat(5,83px)] overflow-x-auto" : "flex flex-wrap"),
505
506
  children: [
506
- R.map((e) => /* @__PURE__ */ K("div", {
507
+ R.map((e, t) => /* @__PURE__ */ K("div", {
507
508
  role: "listitem",
508
509
  children: /* @__PURE__ */ K(Me, {
509
510
  attachment: e,
@@ -519,7 +520,7 @@ var ue = 5, de = 4, fe = "flex size-[84px] items-center justify-center rounded-x
519
520
  openInNewTabLabel: b
520
521
  }
521
522
  })
522
- }, e.id)),
523
+ }, `${e.id}-${t}`)),
523
524
  j.layout === J.Collapsed && /* @__PURE__ */ K("div", {
524
525
  role: "listitem",
525
526
  children: /* @__PURE__ */ K(Fe, {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-attachment-input",
3
3
  "description": "File attachment input components with upload validation, drag-and-drop, and progress tracking",
4
- "version": "1.1.0-dev.56",
4
+ "version": "1.1.0-dev.58",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -17,7 +17,7 @@
17
17
  }
18
18
  },
19
19
  "peerDependencies": {
20
- "@epam/ai-dial-chat-shared": "1.1.0-dev.56",
20
+ "@epam/ai-dial-chat-shared": "1.1.0-dev.58",
21
21
  "@tabler/icons-react": "^3.44.0",
22
22
  "react": "^19.0.0",
23
23
  "@epam/ai-dial-ui-kit": "^0.13.0-dev.17"
@@ -4,7 +4,7 @@ import { AttachmentCardState, AttachmentTypeLabels } from '../models/attachment-
4
4
  import { AttachmentTilesPlan } from '../models/attachment-group';
5
5
  /** Generates a unique identifier for an attachment. */
6
6
  export declare const generateAttachmentId: () => string;
7
- /** Returns the name without its trailing file extension. */
7
+ /** Returns the name without its trailing file extension. Returns an empty string when `name` is nullish. */
8
8
  export declare const getNameWithoutExtension: (name: string) => string;
9
9
  /** Converts an array of MIME type strings (including wildcards) into a comma-separated human-readable label string. */
10
10
  export declare const mimeTypesToExtensionLabels: (types: string[], wildcardLabels?: Record<string, string>) => string;
@@ -1 +1 @@
1
- {"version":3,"file":"attachment.d.ts","sourceRoot":"","sources":["../../src/utils/attachment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAMnE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAoChD,OAAO,KAAK,EACV,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,4BAA4B,CAAC;AAEpC,uDAAuD;AACvD,eAAO,MAAM,oBAAoB,QAAO,MACgB,CAAC;AAEzD,4DAA4D;AAC5D,eAAO,MAAM,uBAAuB,GAAI,MAAM,MAAM,KAAG,MAGtD,CAAC;AASF,uHAAuH;AACvH,eAAO,MAAM,0BAA0B,GACrC,OAAO,MAAM,EAAE,EACf,iBAAgB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAwB,KAC5D,MAUF,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM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