@empathyco/x-components 10.10.0 → 10.11.0

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/CHANGELOG.md CHANGED
@@ -3,6 +3,22 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [10.11.0](https://github.com/empathyco/x/compare/@empathyco/x-components@10.3.0...@empathyco/x-components@10.11.0) (2026-11-23)
7
+
8
+ ### Features
9
+
10
+ * **base-modal:** add scrollLock prop to control page scroll behavior (#2200)
11
+ * **search:** add priceFacetId to SearchConfig and update request accordingly (#2194)
12
+ * **skills:** ship validated agent skills in every package (#2203)
13
+ * **x-components:** add responsive image props and loading events to BaseResultImage (#2195)
14
+
15
+ ### Bug Fixes
16
+
17
+ * **ai:** set AI suggestions status to error when requests fail (ENG-2552) (#2204)
18
+ * change CSS selector for only child teleport (#2197)
19
+ * remove parent selector when BaseTeleport is unmounted (#2198)
20
+
21
+
6
22
  ## [10.10.0](https://github.com/empathyco/x/compare/@empathyco/x-components@10.3.0...@empathyco/x-components@10.10.0) (2026-11-23)
7
23
 
8
24
  ### Features
@@ -1,6 +1,7 @@
1
1
  import '../../../../plugins/x-bus.js';
2
2
  import '@empathyco/x-utils';
3
3
  import { XPlugin } from '../../../../plugins/x-plugin.js';
4
+ import { isAbortError } from '../utils.js';
4
5
 
5
6
  /**
6
7
  * Default implementation for the `AiActions.fetchAndSaveAiSuggestionsSearch`.
@@ -23,12 +24,15 @@ const fetchAndSaveAiSuggestionsSearch = async ({ commit, getters }) => {
23
24
  commit('setSuggestionsSearch', response.suggestions);
24
25
  commit('setSuggestionsSearchTagging', response.suggestionsTagging);
25
26
  }
27
+ commit('setSuggestionsSearchStatus', 'success');
26
28
  })
27
29
  .catch(error => {
30
+ // A newer request with the same id aborted this one, so it is in charge of the status.
31
+ if (isAbortError(error)) {
32
+ return;
33
+ }
34
+ commit('setSuggestionsSearchStatus', 'error');
28
35
  console.error(error);
29
- })
30
- .finally(() => {
31
- commit('setSuggestionsSearchStatus', 'success');
32
36
  });
33
37
  };
34
38
 
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-and-save-ai-suggestions-search.action.js","sources":["../../../../../../src/x-modules/ai/store/actions/fetch-and-save-ai-suggestions-search.action.ts"],"sourcesContent":["import type { AiXStoreModule } from '../types'\nimport { XPlugin } from '../../../../plugins'\n\n/**\n * Default implementation for the `AiActions.fetchAndSaveAiSuggestionsSearch`.\n *\n * @param _ - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the commits and\n * getters provided by Vuex.\n * @returns The AI search response.\n * @public\n */\nexport const fetchAndSaveAiSuggestionsSearch: AiXStoreModule['actions']['fetchAndSaveAiSuggestionsSearch'] =\n async ({ commit, getters }) => {\n const request = getters.suggestionsSearchRequest\n if (!request) {\n return\n }\n commit('setSuggestionsSearchStatus', 'loading')\n\n return XPlugin.adapter\n .aiSuggestionsSearch(request)\n .then(response => {\n if (response) {\n commit('setSuggestionsSearch', response.suggestions)\n commit('setSuggestionsSearchTagging', response.suggestionsTagging)\n }\n })\n .catch(error => {\n console.error(error)\n })\n .finally(() => {\n commit('setSuggestionsSearchStatus', 'success')\n })\n }\n"],"names":[],"mappings":";;;;AAGA;;;;;;;AAOG;AACI,MAAM,+BAA+B,GAC1C,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,KAAI;AAC5B,IAAA,MAAM,OAAO,GAAG,OAAO,CAAC,wBAAwB;IAChD,IAAI,CAAC,OAAO,EAAE;QACZ;IACF;AACA,IAAA,MAAM,CAAC,4BAA4B,EAAE,SAAS,CAAC;IAE/C,OAAO,OAAO,CAAC;SACZ,mBAAmB,CAAC,OAAO;SAC3B,IAAI,CAAC,QAAQ,IAAG;QACf,IAAI,QAAQ,EAAE;AACZ,YAAA,MAAM,CAAC,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAAC;AACpD,YAAA,MAAM,CAAC,6BAA6B,EAAE,QAAQ,CAAC,kBAAkB,CAAC;QACpE;AACF,IAAA,CAAC;SACA,KAAK,CAAC,KAAK,IAAG;AACb,QAAA,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC;AACtB,IAAA,CAAC;SACA,OAAO,CAAC,MAAK;AACZ,QAAA,MAAM,CAAC,4BAA4B,EAAE,SAAS,CAAC;AACjD,IAAA,CAAC,CAAC;AACN;;;;"}
1
+ {"version":3,"file":"fetch-and-save-ai-suggestions-search.action.js","sources":["../../../../../../src/x-modules/ai/store/actions/fetch-and-save-ai-suggestions-search.action.ts"],"sourcesContent":["import type { AiXStoreModule } from '../types'\nimport { XPlugin } from '../../../../plugins'\nimport { isAbortError } from '../utils'\n\n/**\n * Default implementation for the `AiActions.fetchAndSaveAiSuggestionsSearch`.\n *\n * @param _ - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the commits and\n * getters provided by Vuex.\n * @returns The AI search response.\n * @public\n */\nexport const fetchAndSaveAiSuggestionsSearch: AiXStoreModule['actions']['fetchAndSaveAiSuggestionsSearch'] =\n async ({ commit, getters }) => {\n const request = getters.suggestionsSearchRequest\n if (!request) {\n return\n }\n commit('setSuggestionsSearchStatus', 'loading')\n\n return XPlugin.adapter\n .aiSuggestionsSearch(request)\n .then(response => {\n if (response) {\n commit('setSuggestionsSearch', response.suggestions)\n commit('setSuggestionsSearchTagging', response.suggestionsTagging)\n }\n commit('setSuggestionsSearchStatus', 'success')\n })\n .catch(error => {\n // A newer request with the same id aborted this one, so it is in charge of the status.\n if (isAbortError(error)) {\n return\n }\n commit('setSuggestionsSearchStatus', 'error')\n console.error(error)\n })\n }\n"],"names":[],"mappings":";;;;;AAIA;;;;;;;AAOG;AACI,MAAM,+BAA+B,GAC1C,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,KAAI;AAC5B,IAAA,MAAM,OAAO,GAAG,OAAO,CAAC,wBAAwB;IAChD,IAAI,CAAC,OAAO,EAAE;QACZ;IACF;AACA,IAAA,MAAM,CAAC,4BAA4B,EAAE,SAAS,CAAC;IAE/C,OAAO,OAAO,CAAC;SACZ,mBAAmB,CAAC,OAAO;SAC3B,IAAI,CAAC,QAAQ,IAAG;QACf,IAAI,QAAQ,EAAE;AACZ,YAAA,MAAM,CAAC,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAAC;AACpD,YAAA,MAAM,CAAC,6BAA6B,EAAE,QAAQ,CAAC,kBAAkB,CAAC;QACpE;AACA,QAAA,MAAM,CAAC,4BAA4B,EAAE,SAAS,CAAC;AACjD,IAAA,CAAC;SACA,KAAK,CAAC,KAAK,IAAG;;AAEb,QAAA,IAAI,YAAY,CAAC,KAAK,CAAC,EAAE;YACvB;QACF;AACA,QAAA,MAAM,CAAC,4BAA4B,EAAE,OAAO,CAAC;AAC7C,QAAA,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC;AACtB,IAAA,CAAC,CAAC;AACN;;;;"}
@@ -2,6 +2,7 @@ import { getTaggingInfoFromUrl } from '@empathyco/x-adapter-platform';
2
2
  import '../../../../plugins/x-bus.js';
3
3
  import '@empathyco/x-utils';
4
4
  import { XPlugin } from '../../../../plugins/x-plugin.js';
5
+ import { isAbortError } from '../utils.js';
5
6
 
6
7
  /**
7
8
  * Default implementation for the {@link AiActions.fetchAndSaveAiSuggestions}.
@@ -17,16 +18,32 @@ const fetchAndSaveAiSuggestions = async ({ commit }, request) => {
17
18
  return;
18
19
  }
19
20
  commit('setSuggestionsStatus', 'loading');
20
- return XPlugin.adapter.aiSuggestions(request).then(({ body, status }) => {
21
- if (status !== 200) {
22
- return;
23
- }
24
- if (body) {
25
- const reader = body.getReader();
26
- readAnswer(reader, commit);
21
+ return XPlugin.adapter
22
+ .aiSuggestions(request)
23
+ .then(({ body, status }) => {
24
+ if (status !== 200 || !body) {
25
+ throw new Error(`AI suggestions request failed with status ${status}`);
27
26
  }
27
+ readAnswer(body.getReader(), commit);
28
+ })
29
+ .catch(error => {
30
+ handleError(error, commit);
28
31
  });
29
32
  };
33
+ /**
34
+ * Sets the suggestions status to `error` and logs the error, unless the request was aborted by a
35
+ * newer one.
36
+ *
37
+ * @param error - The error thrown by the request or while reading the response.
38
+ * @param commit - The commit function of the actions context.
39
+ */
40
+ function handleError(error, commit) {
41
+ if (isAbortError(error)) {
42
+ return;
43
+ }
44
+ commit('setSuggestionsStatus', 'error');
45
+ console.error(error);
46
+ }
30
47
  function mapTaggingData(taggingData) {
31
48
  const { toolingDisplay, toolingDisplayClick, searchQueries } = taggingData.tagging[0];
32
49
  // TODO: Using the getTaggingInfoFromUrl util here is a temporary solution.
@@ -72,12 +89,8 @@ function readAnswer(reader, commit) {
72
89
  }
73
90
  readAnswer(reader, commit);
74
91
  })
75
- .catch((error) => {
76
- commit('setSuggestionsStatus', 'error');
77
- // AbortError code === 20
78
- if (error.code !== 20) {
79
- console.error(error);
80
- }
92
+ .catch(error => {
93
+ handleError(error, commit);
81
94
  });
82
95
  }
83
96
 
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-and-save-ai-suggestions.action.js","sources":["../../../../../../src/x-modules/ai/store/actions/fetch-and-save-ai-suggestions.action.ts"],"sourcesContent":["import type { AiSuggestionQuery, AiSuggestionTagging } from '@empathyco/x-types'\nimport type { AiActionContext, AiXStoreModule } from '../types'\nimport { getTaggingInfoFromUrl } from '@empathyco/x-adapter-platform'\nimport { XPlugin } from '../../../../plugins'\n\ninterface TaggingData {\n tagging: {\n toolingDisplay: string\n toolingDisplayClick: string\n searchQueries: Record<\n string,\n {\n toolingDisplay: string\n toolingDisplayClick: string\n toolingDisplayAdd2Cart: string\n }\n >\n }[]\n}\n\ntype AnswerData = { queries: AiSuggestionQuery[] } | TaggingData\n\n/**\n * Default implementation for the {@link AiActions.fetchAndSaveAiSuggestions}.\n *\n * @param _ - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the actions,\n * provided by Vuex.\n * @param request - The AI request to make.\n * @returns The AI response.\n * @public\n */\nexport const fetchAndSaveAiSuggestions: AiXStoreModule['actions']['fetchAndSaveAiSuggestions'] =\n async ({ commit }, request) => {\n if (!request) {\n return\n }\n commit('setSuggestionsStatus', 'loading')\n\n return XPlugin.adapter.aiSuggestions(request).then(({ body, status }) => {\n if (status !== 200) {\n return\n }\n if (body) {\n const reader = body.getReader()\n readAnswer(reader, commit)\n }\n })\n }\n\nfunction mapTaggingData(taggingData: TaggingData): AiSuggestionTagging {\n const { toolingDisplay, toolingDisplayClick, searchQueries } = taggingData.tagging[0]\n // TODO: Using the getTaggingInfoFromUrl util here is a temporary solution.\n // It creates a dependency with the x-adapter-platform project that should be avoided.\n return {\n toolingDisplay: getTaggingInfoFromUrl(toolingDisplay),\n toolingDisplayClick: getTaggingInfoFromUrl(toolingDisplayClick),\n searchQueries: Object.fromEntries(\n Object.entries(searchQueries).map(\n ([query, { toolingDisplay, toolingDisplayClick, toolingDisplayAdd2Cart }]) => [\n query,\n {\n toolingDisplay: getTaggingInfoFromUrl(toolingDisplay),\n toolingDisplayClick: getTaggingInfoFromUrl(toolingDisplayClick),\n toolingDisplayAdd2Cart: getTaggingInfoFromUrl(toolingDisplayAdd2Cart),\n },\n ],\n ),\n ),\n }\n}\n\nfunction readAnswer(\n reader: ReadableStreamDefaultReader<Uint8Array>,\n commit: AiActionContext['commit'],\n): void {\n reader\n .read()\n .then(({ value, done }) => {\n if (done) {\n commit('setSuggestionsStatus', 'success')\n return\n }\n\n const result = new TextDecoder().decode(value, { stream: true })\n const parts = result.split('\\n\\n')\n for (const part of parts) {\n const lines = part.split('\\n')\n\n for (const line of lines) {\n // line.length check to avoid event lines or empty lines\n if (line.length <= 5 || line.startsWith('event:')) continue\n\n const raw = line.startsWith('data:') ? line.slice(5).trim() : line.trim()\n const data = JSON.parse(raw) as AnswerData\n\n if ('queries' in data) {\n commit('setQueries', data.queries)\n }\n if ('tagging' in data) {\n commit('setTagging', mapTaggingData(data))\n }\n }\n }\n readAnswer(reader, commit)\n })\n .catch((error: { code: number }) => {\n commit('setSuggestionsStatus', 'error')\n // AbortError code === 20\n if (error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ACjC,QAAA,MAAM,CAAC,sBAAsB,EAAE,OAAO,CAAC;;AAEvC,QAAA,IAAI,KAAK,CAAC,IAAI,KAAK,EAAE,EAAE;AACrB,YAAA,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC;QACtB;AACF,IAAA,CAAC,CAAC;AACN;;;;"}
1
+ {"version":3,"file":"fetch-and-save-ai-suggestions.action.js","sources":["../../../../../../src/x-modules/ai/store/actions/fetch-and-save-ai-suggestions.action.ts"],"sourcesContent":["import type { AiSuggestionQuery, AiSuggestionTagging } from '@empathyco/x-types'\nimport type { AiActionContext, AiXStoreModule } from '../types'\nimport { getTaggingInfoFromUrl } from '@empathyco/x-adapter-platform'\nimport { XPlugin } from '../../../../plugins'\nimport { isAbortError } from '../utils'\n\ninterface TaggingData {\n tagging: {\n toolingDisplay: string\n toolingDisplayClick: string\n searchQueries: Record<\n string,\n {\n toolingDisplay: string\n toolingDisplayClick: string\n toolingDisplayAdd2Cart: string\n }\n >\n }[]\n}\n\ntype AnswerData = { queries: AiSuggestionQuery[] } | TaggingData\n\n/**\n * Default implementation for the {@link AiActions.fetchAndSaveAiSuggestions}.\n *\n * @param _ - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the actions,\n * provided by Vuex.\n * @param request - The AI request to make.\n * @returns The AI response.\n * @public\n */\nexport const fetchAndSaveAiSuggestions: AiXStoreModule['actions']['fetchAndSaveAiSuggestions'] =\n async ({ commit }, request) => {\n if (!request) {\n return\n }\n commit('setSuggestionsStatus', 'loading')\n\n return XPlugin.adapter\n .aiSuggestions(request)\n .then(({ body, status }) => {\n if (status !== 200 || !body) {\n throw new Error(`AI suggestions request failed with status ${status}`)\n }\n readAnswer(body.getReader(), commit)\n })\n .catch(error => {\n handleError(error, commit)\n })\n }\n\n/**\n * Sets the suggestions status to `error` and logs the error, unless the request was aborted by a\n * newer one.\n *\n * @param error - The error thrown by the request or while reading the response.\n * @param commit - The commit function of the actions context.\n */\nfunction handleError(error: unknown, commit: AiActionContext['commit']) {\n if (isAbortError(error)) {\n return\n }\n commit('setSuggestionsStatus', 'error')\n console.error(error)\n}\n\nfunction mapTaggingData(taggingData: TaggingData): AiSuggestionTagging {\n const { toolingDisplay, toolingDisplayClick, searchQueries } = taggingData.tagging[0]\n // TODO: Using the getTaggingInfoFromUrl util here is a temporary solution.\n // It creates a dependency with the x-adapter-platform project that should be avoided.\n return {\n toolingDisplay: getTaggingInfoFromUrl(toolingDisplay),\n toolingDisplayClick: getTaggingInfoFromUrl(toolingDisplayClick),\n searchQueries: Object.fromEntries(\n Object.entries(searchQueries).map(\n ([query, { toolingDisplay, toolingDisplayClick, toolingDisplayAdd2Cart }]) => [\n query,\n {\n toolingDisplay: getTaggingInfoFromUrl(toolingDisplay),\n toolingDisplayClick: getTaggingInfoFromUrl(toolingDisplayClick),\n toolingDisplayAdd2Cart: getTaggingInfoFromUrl(toolingDisplayAdd2Cart),\n },\n ],\n ),\n ),\n }\n}\n\nfunction readAnswer(\n reader: ReadableStreamDefaultReader<Uint8Array>,\n commit: AiActionContext['commit'],\n): void {\n reader\n .read()\n .then(({ value, done }) => {\n if (done) {\n commit('setSuggestionsStatus', 'success')\n return\n }\n\n const result = new TextDecoder().decode(value, { stream: true })\n const parts = result.split('\\n\\n')\n for (const part of parts) {\n const lines = part.split('\\n')\n\n for (const line of lines) {\n // line.length check to avoid event lines or empty lines\n if (line.length <= 5 || line.startsWith('event:')) continue\n\n const raw = line.startsWith('data:') ? line.slice(5).trim() : line.trim()\n const data = JSON.parse(raw) as AnswerData\n\n if ('queries' in data) {\n commit('setQueries', data.queries)\n }\n if ('tagging' in data) {\n commit('setTagging', mapTaggingData(data))\n }\n }\n }\n readAnswer(reader, commit)\n })\n .catch(error => {\n handleError(error, commit)\n })\n}\n"],"names":[],"mappings":";;;;;;AAuBA;;;;;;;;AAQG;AACI,MAAM,yBAAyB,GACpC,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,KAAI;IAC5B,IAAI,CAAC,OAAO,EAAE;QACZ;I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,CAAC;gBAC5C;YACF;QACF;AACA,QAAA,UAAU,CAAC,MAAM,EAAE,MAAM,CAAC;AAC5B,IAAA,CAAC;SACA,KAAK,CAAC,KAAK,IAAG;AACb,QAAA,WAAW,CAAC,KAAK,EAAE,MAAM,CAAC;AAC5B,IAAA,CAAC,CAAC;AACN;;;;"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Checks if the error was thrown because the request was aborted. This happens when a newer
3
+ * request with the same id is made, so that newer request is in charge of the status.
4
+ *
5
+ * @param error - The error to check.
6
+ * @returns True if the error is an `AbortError`.
7
+ * @internal
8
+ */
9
+ function isAbortError(error) {
10
+ if (typeof error !== 'object' || error === null) {
11
+ return false;
12
+ }
13
+ const { name, code } = error;
14
+ // AbortError code === 20
15
+ return name === 'AbortError' || code === 20;
16
+ }
17
+
18
+ export { isAbortError };
19
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sources":["../../../../../src/x-modules/ai/store/utils.ts"],"sourcesContent":["/**\n * Checks if the error was thrown because the request was aborted. This happens when a newer\n * request with the same id is made, so that newer request is in charge of the status.\n *\n * @param error - The error to check.\n * @returns True if the error is an `AbortError`.\n * @internal\n */\nexport function isAbortError(error: unknown): boolean {\n if (typeof error !== 'object' || error === null) {\n return false\n }\n const { name, code } = error as { name?: string; code?: number }\n // AbortError code === 20\n return name === 'AbortError' || code === 20\n}\n"],"names":[],"mappings":"AAAA;;;;;;;AAOG;AACG,SAAU,YAAY,CAAC,KAAc,EAAA;IACzC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE;AAC/C,QAAA,OAAO,KAAK;IACd;AACA,IAAA,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,KAAyC;;AAEhE,IAAA,OAAO,IAAI,KAAK,YAAY,IAAI,IAAI,KAAK,EAAE;AAC7C;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@empathyco/x-components",
3
- "version": "10.10.0",
3
+ "version": "10.11.0",
4
4
  "description": "Empathy X Components",
5
5
  "author": "Empathy Systems Corporation S.L.",
6
6
  "license": "Apache-2.0",
@@ -67,10 +67,10 @@
67
67
  "vuex": "4.0.2"
68
68
  },
69
69
  "dependencies": {
70
- "@empathyco/x-adapter": "8.3.0",
71
- "@empathyco/x-adapter-platform": "2.1.0",
72
- "@empathyco/x-types": "11.1.0",
73
- "@empathyco/x-utils": "1.2.0",
70
+ "@empathyco/x-adapter": "8.4.0",
71
+ "@empathyco/x-adapter-platform": "2.2.0",
72
+ "@empathyco/x-types": "11.2.0",
73
+ "@empathyco/x-utils": "1.3.0",
74
74
  "@vue/devtools-api": "~6.6.4",
75
75
  "@vueuse/core": "~12.8.2",
76
76
  "js-md5": "~0.9.2",
@@ -82,7 +82,7 @@
82
82
  },
83
83
  "devDependencies": {
84
84
  "@babel/preset-env": "8.0.7",
85
- "@empathyco/x-design-system": "1.3.0",
85
+ "@empathyco/x-design-system": "1.4.0",
86
86
  "@microsoft/api-documenter": "7.30.20",
87
87
  "@microsoft/api-extractor": "7.60.1",
88
88
  "@tailwindcss/vite": "4.3.5",
@@ -117,5 +117,5 @@
117
117
  "access": "public",
118
118
  "directory": "dist"
119
119
  },
120
- "gitHead": "193fbc1c4fef9c7dcaa6060cd2331b66e1a551d2"
120
+ "gitHead": "ca952751b59d92301723b572942e6b86f1d7fc9b"
121
121
  }
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-and-save-ai-suggestions-search.action.d.ts","sourceRoot":"","sources":["../../../../../../../src/x-modules/ai/store/actions/fetch-and-save-ai-suggestions-search.action.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAG9C;;;;;;;GAOG;AACH,eAAO,MAAM,+BAA+B,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC,iCAAiC,CAsBtG,CAAA"}
1
+ {"version":3,"file":"fetch-and-save-ai-suggestions-search.action.d.ts","sourceRoot":"","sources":["../../../../../../../src/x-modules/ai/store/actions/fetch-and-save-ai-suggestions-search.action.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAI9C;;;;;;;GAOG;AACH,eAAO,MAAM,+BAA+B,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC,iCAAiC,CAyBtG,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-and-save-ai-suggestions.action.d.ts","sourceRoot":"","sources":["../../../../../../../src/x-modules/ai/store/actions/fetch-and-save-ai-suggestions.action.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAmB,cAAc,EAAE,MAAM,UAAU,CAAA;AAqB/D;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC,2BAA2B,CAgB1F,CAAA"}
1
+ {"version":3,"file":"fetch-and-save-ai-suggestions.action.d.ts","sourceRoot":"","sources":["../../../../../../../src/x-modules/ai/store/actions/fetch-and-save-ai-suggestions.action.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAmB,cAAc,EAAE,MAAM,UAAU,CAAA;AAsB/D;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC,2BAA2B,CAkB1F,CAAA"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Checks if the error was thrown because the request was aborted. This happens when a newer
3
+ * request with the same id is made, so that newer request is in charge of the status.
4
+ *
5
+ * @param error - The error to check.
6
+ * @returns True if the error is an `AbortError`.
7
+ * @internal
8
+ */
9
+ export declare function isAbortError(error: unknown): boolean;
10
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../src/x-modules/ai/store/utils.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAOpD"}