@solidxai/core-ui 0.1.21-beta.5 → 0.1.22-beta.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.
Files changed (106) hide show
  1. package/dist/components/core/card/SolidCardViewConfigure.js +1 -1
  2. package/dist/components/core/card/SolidCardViewConfigure.js.map +1 -1
  3. package/dist/components/core/card/SolidCardViewConfigure.tsx +1 -1
  4. package/dist/components/core/form/SolidFormView.d.ts.map +1 -1
  5. package/dist/components/core/form/SolidFormView.js +3 -2
  6. package/dist/components/core/form/SolidFormView.js.map +1 -1
  7. package/dist/components/core/form/SolidFormView.tsx +3 -1
  8. package/dist/components/core/form/fields/ISolidField.d.ts +1 -0
  9. package/dist/components/core/form/fields/ISolidField.d.ts.map +1 -1
  10. package/dist/components/core/form/fields/ISolidField.js.map +1 -1
  11. package/dist/components/core/form/fields/ISolidField.tsx +1 -0
  12. package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.d.ts.map +1 -1
  13. package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.js +1 -1
  14. package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.js.map +1 -1
  15. package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.tsx +1 -0
  16. package/dist/components/core/kanban/SolidKanbanView.d.ts.map +1 -1
  17. package/dist/components/core/kanban/SolidKanbanView.js +20 -17
  18. package/dist/components/core/kanban/SolidKanbanView.js.map +1 -1
  19. package/dist/components/core/kanban/SolidKanbanView.tsx +3 -2
  20. package/dist/components/core/kanban/SolidKanbanViewConfigure.js +1 -1
  21. package/dist/components/core/kanban/SolidKanbanViewConfigure.js.map +1 -1
  22. package/dist/components/core/kanban/SolidKanbanViewConfigure.tsx +1 -1
  23. package/dist/components/core/solid-agent/SolidAgent.module.css +11 -0
  24. package/dist/components/core/solid-agent/SolidAgentChat.d.ts.map +1 -1
  25. package/dist/components/core/solid-agent/SolidAgentChat.js +16 -6
  26. package/dist/components/core/solid-agent/SolidAgentChat.js.map +1 -1
  27. package/dist/components/core/solid-agent/SolidAgentChat.tsx +20 -4
  28. package/dist/components/core/solid-agent/SolidAgentMarkdown.d.ts +7 -3
  29. package/dist/components/core/solid-agent/SolidAgentMarkdown.d.ts.map +1 -1
  30. package/dist/components/core/solid-agent/SolidAgentMarkdown.js +17 -12
  31. package/dist/components/core/solid-agent/SolidAgentMarkdown.js.map +1 -1
  32. package/dist/components/core/solid-agent/SolidAgentMarkdown.tsx +18 -11
  33. package/dist/components/core/solid-agent/agentMarkdown.d.ts +20 -0
  34. package/dist/components/core/solid-agent/agentMarkdown.d.ts.map +1 -0
  35. package/dist/components/core/solid-agent/agentMarkdown.js +140 -0
  36. package/dist/components/core/solid-agent/agentMarkdown.js.map +1 -0
  37. package/dist/components/core/solid-agent/agentMarkdown.ts +140 -0
  38. package/dist/components/core/solid-agent/client/agentRuntime.d.ts.map +1 -1
  39. package/dist/components/core/solid-agent/client/agentRuntime.js +22 -14
  40. package/dist/components/core/solid-agent/client/agentRuntime.js.map +1 -1
  41. package/dist/components/core/solid-agent/client/agentRuntime.ts +8 -1
  42. package/dist/components/core/solid-agent/client/agentSocket.d.ts.map +1 -1
  43. package/dist/components/core/solid-agent/client/agentSocket.js +4 -4
  44. package/dist/components/core/solid-agent/client/agentSocket.js.map +1 -1
  45. package/dist/components/core/solid-agent/client/agentSocket.ts +5 -2
  46. package/dist/components/core/solid-agent/embed/AgentEmbeddingPanel.js +1 -1
  47. package/dist/components/core/solid-agent/embed/AgentEmbeddingPanel.js.map +1 -1
  48. package/dist/components/core/solid-agent/embed/AgentEmbeddingPanel.tsx +1 -1
  49. package/dist/components/core/solid-agent/embed/agentEmbedProtocol.d.ts.map +1 -1
  50. package/dist/components/core/solid-agent/embed/agentEmbedProtocol.js +2 -0
  51. package/dist/components/core/solid-agent/embed/agentEmbedProtocol.js.map +1 -1
  52. package/dist/components/core/solid-agent/embed/agentEmbedProtocol.ts +1 -0
  53. package/dist/components/core/solid-agent/embed/agentEmbedSamples.js +7 -7
  54. package/dist/components/core/solid-agent/embed/agentEmbedSamples.js.map +1 -1
  55. package/dist/components/core/solid-agent/embed/agentEmbedSamples.ts +24 -24
  56. package/dist/components/core/solid-agent/thread/inlineWidget.d.ts +1 -2
  57. package/dist/components/core/solid-agent/thread/inlineWidget.d.ts.map +1 -1
  58. package/dist/components/core/solid-agent/thread/inlineWidget.js +82 -42
  59. package/dist/components/core/solid-agent/thread/inlineWidget.js.map +1 -1
  60. package/dist/components/core/solid-agent/thread/inlineWidget.ts +69 -39
  61. package/dist/components/core/solid-agent/types.d.ts +4 -0
  62. package/dist/components/core/solid-agent/types.d.ts.map +1 -1
  63. package/dist/components/core/solid-agent/types.js.map +1 -1
  64. package/dist/components/core/solid-agent/types.ts +4 -0
  65. package/dist/components/core/solid-agent/widgets/SolidDiffListChatWidget.d.ts.map +1 -1
  66. package/dist/components/core/solid-agent/widgets/SolidDiffListChatWidget.js +12 -3
  67. package/dist/components/core/solid-agent/widgets/SolidDiffListChatWidget.js.map +1 -1
  68. package/dist/components/core/solid-agent/widgets/SolidDiffListChatWidget.tsx +13 -4
  69. package/dist/components/core/solid-agent/widgets/SolidStatusChatWidget.d.ts +3 -2
  70. package/dist/components/core/solid-agent/widgets/SolidStatusChatWidget.d.ts.map +1 -1
  71. package/dist/components/core/solid-agent/widgets/SolidStatusChatWidget.js +7 -3
  72. package/dist/components/core/solid-agent/widgets/SolidStatusChatWidget.js.map +1 -1
  73. package/dist/components/core/solid-agent/widgets/SolidStatusChatWidget.tsx +19 -3
  74. package/dist/components/core/solid-agent/widgets/solidChatWidgets.module.css +3 -0
  75. package/dist/components/shad-cn-ui/SolidDialog.js +1 -1
  76. package/dist/components/shad-cn-ui/SolidDialog.js.map +1 -1
  77. package/dist/components/shad-cn-ui/SolidDialog.tsx +1 -1
  78. package/dist/redux/api/solidEntityApi.d.ts +1 -0
  79. package/dist/redux/api/solidEntityApi.d.ts.map +1 -1
  80. package/dist/redux/api/solidEntityApi.js +14 -0
  81. package/dist/redux/api/solidEntityApi.js.map +1 -1
  82. package/dist/redux/api/solidEntityApi.tsx +8 -0
  83. package/dist/redux/api/solidMenuApi.d.ts +11 -11
  84. package/dist/redux/api/solidMenuApi.d.ts.map +1 -1
  85. package/dist/redux/api/solidMenuApi.js +2 -0
  86. package/dist/redux/api/solidMenuApi.js.map +1 -1
  87. package/dist/redux/api/solidMenuApi.ts +2 -0
  88. package/dist/redux/features/agentSlice.d.ts +3 -1
  89. package/dist/redux/features/agentSlice.d.ts.map +1 -1
  90. package/dist/redux/features/agentSlice.js +7 -4
  91. package/dist/redux/features/agentSlice.js.map +1 -1
  92. package/dist/redux/features/agentSlice.ts +9 -3
  93. package/dist/redux/store/defaultStoreConfig.d.ts +8 -8
  94. package/dist/resources/stylesheets/_main.scss +41 -16
  95. package/dist/routes/AppEventListener.d.ts.map +1 -1
  96. package/dist/routes/AppEventListener.js +16 -0
  97. package/dist/routes/AppEventListener.js.map +1 -1
  98. package/dist/routes/AppEventListener.tsx +16 -0
  99. package/dist/routes/pages/admin/core/AgentRegistryEditorPage.js +4 -4
  100. package/dist/routes/pages/admin/core/AgentRegistryEditorPage.js.map +1 -1
  101. package/dist/routes/pages/admin/core/AgentRegistryEditorPage.tsx +4 -4
  102. package/dist/routes/pages/admin/core/DatasourceIntrospectionPage.d.ts.map +1 -1
  103. package/dist/routes/pages/admin/core/DatasourceIntrospectionPage.js +3 -0
  104. package/dist/routes/pages/admin/core/DatasourceIntrospectionPage.js.map +1 -1
  105. package/dist/routes/pages/admin/core/DatasourceIntrospectionPage.tsx +3 -0
  106. package/package.json +1 -1
@@ -4,6 +4,15 @@ import { ChevronDown, ChevronRight } from "lucide-react";
4
4
  import styles from "../SolidAgent.module.css";
5
5
  import { SolidAgentCopyButton } from "../SolidAgentMarkdown";
6
6
  import { asArray, getChatWidgetData } from "./chatWidgetUtils";
7
+ /**
8
+ * Diff lines without truly empty ones. A unified diff never has an empty line — a blank context line
9
+ * is " " — so "" only appears when the sender double-spaced the text, which rendered as a blank row
10
+ * between every line.
11
+ */
12
+ function diffLines(diff) {
13
+ if (diff === void 0) { diff = ""; }
14
+ return diff.split("\n").filter(function (line) { return line !== ""; });
15
+ }
7
16
  function countChanges(diff) {
8
17
  if (diff === void 0) { diff = ""; }
9
18
  var additions = 0;
@@ -35,7 +44,7 @@ export var SolidDiffListChatWidget = function (_a) {
35
44
  var data = getChatWidgetData(eventData);
36
45
  var files = asArray(data.files);
37
46
  var _c = useState(new Set()), open = _c[0], setOpen = _c[1];
38
- var allDiffs = files.map(function (file) { var _a; return "--- ".concat(file.path, "\n").concat((_a = file.diff) !== null && _a !== void 0 ? _a : ""); }).join("\n\n");
47
+ var allDiffs = files.map(function (file) { return "--- ".concat(file.path, "\n").concat(diffLines(file.diff).join("\n")); }).join("\n\n");
39
48
  var toggle = function (index) {
40
49
  return setOpen(function (prev) {
41
50
  var next = new Set(prev);
@@ -44,12 +53,12 @@ export var SolidDiffListChatWidget = function (_a) {
44
53
  });
45
54
  };
46
55
  return (_jsxs("div", { className: styles.card, children: [_jsxs("div", { className: styles.cardHead, children: [_jsx("span", { style: { flex: 1 }, children: (_b = data.title) !== null && _b !== void 0 ? _b : "".concat(files.length, " file").concat(files.length === 1 ? "" : "s", " changed") }), _jsx(SolidAgentCopyButton, { text: allDiffs, label: "Copy all diffs" })] }), files.map(function (file, index) {
47
- var _a, _b, _c, _d;
56
+ var _a, _b;
48
57
  var counts = file.additions != null || file.deletions != null
49
58
  ? { additions: (_a = file.additions) !== null && _a !== void 0 ? _a : 0, deletions: (_b = file.deletions) !== null && _b !== void 0 ? _b : 0 }
50
59
  : countChanges(file.diff);
51
60
  var expanded = open.has(index);
52
- return (_jsxs("div", { children: [_jsxs("button", { type: "button", className: styles.fileRow, "aria-expanded": expanded, onClick: function () { return toggle(index); }, children: [expanded ? _jsx(ChevronDown, { size: 14 }) : _jsx(ChevronRight, { size: 14 }), _jsx("span", { className: styles.fileName, children: file.path }), _jsxs("span", { className: styles.diffAdd, children: ["+", counts.additions] }), _jsxs("span", { className: styles.diffDel, children: ["\u2212", counts.deletions] })] }), expanded && (_jsxs("div", { style: { position: "relative" }, children: [_jsx("div", { style: { position: "absolute", right: 6, top: 4 }, children: _jsx(SolidAgentCopyButton, { text: (_c = file.diff) !== null && _c !== void 0 ? _c : "", label: "Copy ".concat(file.path) }) }), _jsx("pre", { className: styles.diff, children: ((_d = file.diff) !== null && _d !== void 0 ? _d : "").split("\n").map(function (line, i) { return (_jsx("span", { className: "".concat(styles.diffLine, " ").concat(diffLineClass(line)), children: line || " " }, i)); }) })] }))] }, "".concat(file.path, "-").concat(index)));
61
+ return (_jsxs("div", { children: [_jsxs("button", { type: "button", className: styles.fileRow, "aria-expanded": expanded, onClick: function () { return toggle(index); }, children: [expanded ? _jsx(ChevronDown, { size: 14 }) : _jsx(ChevronRight, { size: 14 }), _jsx("span", { className: styles.fileName, children: file.path }), _jsxs("span", { className: styles.diffAdd, children: ["+", counts.additions] }), _jsxs("span", { className: styles.diffDel, children: ["\u2212", counts.deletions] })] }), expanded && (_jsxs("div", { style: { position: "relative" }, children: [_jsx("div", { style: { position: "absolute", right: 6, top: 4 }, children: _jsx(SolidAgentCopyButton, { text: diffLines(file.diff).join("\n"), label: "Copy ".concat(file.path) }) }), _jsx("pre", { className: styles.diff, children: diffLines(file.diff).map(function (line, i) { return (_jsx("span", { className: "".concat(styles.diffLine, " ").concat(diffLineClass(line)), children: line }, i)); }) })] }))] }, "".concat(file.path, "-").concat(index)));
53
62
  })] }));
54
63
  };
55
64
  Object.assign(SolidDiffListChatWidget, { getExtensionMetadata: function () { return ({
@@ -1 +1 @@
1
- {"version":3,"file":"SolidDiffListChatWidget.js","sourceRoot":"","sources":["../../../../../src/components/core/solid-agent/widgets/SolidDiffListChatWidget.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACzD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E,CAAC,IAAK,OAAA,CAC5C,eAAc,SAAS,EAAE,UAAG,MAAM,CAAC,QAAQ,cAAI,aAAa,CAAC,IAAI,CAAC,CAAE,YAAG,IAAI,IAAI,GAAG,IAAvE,CAAC,CAA8E,CAC7F,EAF+C,CAE/C,CAAC,GACA,IACJ,CACT,KAlBK,UAAG,IAAI,CAAC,IAAI,cAAI,KAAK,CAAE,CAmB3B,CACT,CAAC;YACN,CAAC,CAAC,IACA,CACT,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,CAAC,uBAAuB,EAAE,EAAE,oBAAoB,EAAE,cAAM,OAAA,CAAC;QAClE,WAAW,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,uCAAuC,EAAE,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE;KAClX,CAAC,EAFmE,CAEnE,EAAE,CAAC,CAAC","sourcesContent":["import { useState } from \"react\";\nimport { ChevronDown, ChevronRight } from \"lucide-react\";\nimport styles from \"../SolidAgent.module.css\";\nimport { SolidChatWidgetProps } from \"../../../../types/solid-core\";\nimport { SolidAgentCopyButton } from \"../SolidAgentMarkdown\";\nimport { asArray, getChatWidgetData } from \"./chatWidgetUtils\";\n\ntype DiffFile = { path: string; diff?: string; additions?: number; deletions?: number };\ntype DiffListData = { title?: string; files?: DiffFile[] };\n\nfunction countChanges(diff = \"\") {\n let additions = 0;\n let deletions = 0;\n diff.split(\"\\n\").forEach((line) => {\n if (line.startsWith(\"+\") && !line.startsWith(\"+++\")) additions++;\n else if (line.startsWith(\"-\") && !line.startsWith(\"---\")) deletions++;\n });\n return { additions, deletions };\n}\n\nfunction diffLineClass(line: string) {\n if (line.startsWith(\"@@\")) return styles.diffLineHunk;\n if (line.startsWith(\"+\")) return styles.diffLineAdd;\n if (line.startsWith(\"-\")) return styles.diffLineDel;\n return \"\";\n}\n\n/**\n * `event_data: { widget: \"diff-list\", title?, files: [{ path, diff, additions?, deletions? }] }`.\n * Codex-style file list, collapsed by default, with copy per file and for all files.\n */\nexport const SolidDiffListChatWidget = ({ eventData }: SolidChatWidgetProps) => {\n const data = getChatWidgetData<DiffListData>(eventData);\n const files = asArray<DiffFile>(data.files);\n const [open, setOpen] = useState<Set<number>>(new Set());\n const allDiffs = files.map((file) => `--- ${file.path}\\n${file.diff ?? \"\"}`).join(\"\\n\\n\");\n\n const toggle = (index: number) =>\n setOpen((prev) => {\n const next = new Set(prev);\n next.has(index) ? next.delete(index) : next.add(index);\n return next;\n });\n\n return (\n <div className={styles.card}>\n <div className={styles.cardHead}>\n <span style={{ flex: 1 }}>{data.title ?? `${files.length} file${files.length === 1 ? \"\" : \"s\"} changed`}</span>\n <SolidAgentCopyButton text={allDiffs} label=\"Copy all diffs\" />\n </div>\n {files.map((file, index) => {\n const counts = file.additions != null || file.deletions != null\n ? { additions: file.additions ?? 0, deletions: file.deletions ?? 0 }\n : countChanges(file.diff);\n const expanded = open.has(index);\n return (\n <div key={`${file.path}-${index}`}>\n <button type=\"button\" className={styles.fileRow} aria-expanded={expanded} onClick={() => toggle(index)}>\n {expanded ? <ChevronDown size={14} /> : <ChevronRight size={14} />}\n <span className={styles.fileName}>{file.path}</span>\n <span className={styles.diffAdd}>+{counts.additions}</span>\n <span className={styles.diffDel}>−{counts.deletions}</span>\n </button>\n {expanded && (\n <div style={{ position: \"relative\" }}>\n <div style={{ position: \"absolute\", right: 6, top: 4 }}>\n <SolidAgentCopyButton text={file.diff ?? \"\"} label={`Copy ${file.path}`} />\n </div>\n <pre className={styles.diff}>\n {(file.diff ?? \"\").split(\"\\n\").map((line, i) => (\n <span key={i} className={`${styles.diffLine} ${diffLineClass(line)}`}>{line || \" \"}</span>\n ))}\n </pre>\n </div>\n )}\n </div>\n );\n })}\n </div>\n );\n};\n\nObject.assign(SolidDiffListChatWidget, { getExtensionMetadata: () => ({\n agentWidget: { name: \"diff-list\", description: \"Show file diffs, collapsible by file.\", propsSchema: { type: \"object\", properties: { title: { type: \"string\" }, files: { type: \"array\", items: { type: \"object\", properties: { path: { type: \"string\" }, diff: { type: \"string\" }, additions: { type: \"number\" }, deletions: { type: \"number\" } }, required: [\"path\"] } } } } },\n}) });\n"]}
1
+ {"version":3,"file":"SolidDiffListChatWidget.js","sourceRoot":"","sources":["../../../../../src/components/core/solid-agent/widgets/SolidDiffListChatWidget.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,MAAM,MAAM,0BAA0B,CAAC;AAE9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAK/D;;;;GAIG;AACH,SAAS,SAAS,CAAC,IAAS;IAAT,qBAAA,EAAA,SAAS;IACxB,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,UAAC,IAAI,IAAK,OAAA,IAAI,KAAK,EAAE,EAAX,CAAW,CAAC,CAAC;AAC1D,CAAC;AAED,SAAS,YAAY,CAAC,IAAS;IAAT,qBAAA,EAAA,SAAS;IAC3B,IAAI,SAAS,GAAG,CAAC,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AAE,CAmB3B,CACT,CAAC;YACN,CAAC,CAAC,IACA,CACT,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,CAAC,uBAAuB,EAAE,EAAE,oBAAoB,EAAE,cAAM,OAAA,CAAC;QAClE,WAAW,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,uCAAuC,EAAE,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE;KAClX,CAAC,EAFmE,CAEnE,EAAE,CAAC,CAAC","sourcesContent":["import { useState } from \"react\";\nimport { ChevronDown, ChevronRight } from \"lucide-react\";\nimport styles from \"../SolidAgent.module.css\";\nimport { SolidChatWidgetProps } from \"../../../../types/solid-core\";\nimport { SolidAgentCopyButton } from \"../SolidAgentMarkdown\";\nimport { asArray, getChatWidgetData } from \"./chatWidgetUtils\";\n\ntype DiffFile = { path: string; diff?: string; additions?: number; deletions?: number };\ntype DiffListData = { title?: string; files?: DiffFile[] };\n\n/**\n * Diff lines without truly empty ones. A unified diff never has an empty line — a blank context line\n * is \" \" — so \"\" only appears when the sender double-spaced the text, which rendered as a blank row\n * between every line.\n */\nfunction diffLines(diff = \"\") {\n return diff.split(\"\\n\").filter((line) => line !== \"\");\n}\n\nfunction countChanges(diff = \"\") {\n let additions = 0;\n let deletions = 0;\n diff.split(\"\\n\").forEach((line) => {\n if (line.startsWith(\"+\") && !line.startsWith(\"+++\")) additions++;\n else if (line.startsWith(\"-\") && !line.startsWith(\"---\")) deletions++;\n });\n return { additions, deletions };\n}\n\nfunction diffLineClass(line: string) {\n if (line.startsWith(\"@@\")) return styles.diffLineHunk;\n if (line.startsWith(\"+\")) return styles.diffLineAdd;\n if (line.startsWith(\"-\")) return styles.diffLineDel;\n return \"\";\n}\n\n/**\n * `event_data: { widget: \"diff-list\", title?, files: [{ path, diff, additions?, deletions? }] }`.\n * Codex-style file list, collapsed by default, with copy per file and for all files.\n */\nexport const SolidDiffListChatWidget = ({ eventData }: SolidChatWidgetProps) => {\n const data = getChatWidgetData<DiffListData>(eventData);\n const files = asArray<DiffFile>(data.files);\n const [open, setOpen] = useState<Set<number>>(new Set());\n const allDiffs = files.map((file) => `--- ${file.path}\\n${diffLines(file.diff).join(\"\\n\")}`).join(\"\\n\\n\");\n\n const toggle = (index: number) =>\n setOpen((prev) => {\n const next = new Set(prev);\n next.has(index) ? next.delete(index) : next.add(index);\n return next;\n });\n\n return (\n <div className={styles.card}>\n <div className={styles.cardHead}>\n <span style={{ flex: 1 }}>{data.title ?? `${files.length} file${files.length === 1 ? \"\" : \"s\"} changed`}</span>\n <SolidAgentCopyButton text={allDiffs} label=\"Copy all diffs\" />\n </div>\n {files.map((file, index) => {\n const counts = file.additions != null || file.deletions != null\n ? { additions: file.additions ?? 0, deletions: file.deletions ?? 0 }\n : countChanges(file.diff);\n const expanded = open.has(index);\n return (\n <div key={`${file.path}-${index}`}>\n <button type=\"button\" className={styles.fileRow} aria-expanded={expanded} onClick={() => toggle(index)}>\n {expanded ? <ChevronDown size={14} /> : <ChevronRight size={14} />}\n <span className={styles.fileName}>{file.path}</span>\n <span className={styles.diffAdd}>+{counts.additions}</span>\n <span className={styles.diffDel}>−{counts.deletions}</span>\n </button>\n {expanded && (\n <div style={{ position: \"relative\" }}>\n <div style={{ position: \"absolute\", right: 6, top: 4 }}>\n <SolidAgentCopyButton text={diffLines(file.diff).join(\"\\n\")} label={`Copy ${file.path}`} />\n </div>\n <pre className={styles.diff}>\n {diffLines(file.diff).map((line, i) => (\n <span key={i} className={`${styles.diffLine} ${diffLineClass(line)}`}>{line}</span>\n ))}\n </pre>\n </div>\n )}\n </div>\n );\n })}\n </div>\n );\n};\n\nObject.assign(SolidDiffListChatWidget, { getExtensionMetadata: () => ({\n agentWidget: { name: \"diff-list\", description: \"Show file diffs, collapsible by file.\", propsSchema: { type: \"object\", properties: { title: { type: \"string\" }, files: { type: \"array\", items: { type: \"object\", properties: { path: { type: \"string\" }, diff: { type: \"string\" }, additions: { type: \"number\" }, deletions: { type: \"number\" } }, required: [\"path\"] } } } } },\n}) });\n"]}
@@ -8,6 +8,15 @@ import { asArray, getChatWidgetData } from "./chatWidgetUtils";
8
8
  type DiffFile = { path: string; diff?: string; additions?: number; deletions?: number };
9
9
  type DiffListData = { title?: string; files?: DiffFile[] };
10
10
 
11
+ /**
12
+ * Diff lines without truly empty ones. A unified diff never has an empty line — a blank context line
13
+ * is " " — so "" only appears when the sender double-spaced the text, which rendered as a blank row
14
+ * between every line.
15
+ */
16
+ function diffLines(diff = "") {
17
+ return diff.split("\n").filter((line) => line !== "");
18
+ }
19
+
11
20
  function countChanges(diff = "") {
12
21
  let additions = 0;
13
22
  let deletions = 0;
@@ -33,7 +42,7 @@ export const SolidDiffListChatWidget = ({ eventData }: SolidChatWidgetProps) =>
33
42
  const data = getChatWidgetData<DiffListData>(eventData);
34
43
  const files = asArray<DiffFile>(data.files);
35
44
  const [open, setOpen] = useState<Set<number>>(new Set());
36
- const allDiffs = files.map((file) => `--- ${file.path}\n${file.diff ?? ""}`).join("\n\n");
45
+ const allDiffs = files.map((file) => `--- ${file.path}\n${diffLines(file.diff).join("\n")}`).join("\n\n");
37
46
 
38
47
  const toggle = (index: number) =>
39
48
  setOpen((prev) => {
@@ -64,11 +73,11 @@ export const SolidDiffListChatWidget = ({ eventData }: SolidChatWidgetProps) =>
64
73
  {expanded && (
65
74
  <div style={{ position: "relative" }}>
66
75
  <div style={{ position: "absolute", right: 6, top: 4 }}>
67
- <SolidAgentCopyButton text={file.diff ?? ""} label={`Copy ${file.path}`} />
76
+ <SolidAgentCopyButton text={diffLines(file.diff).join("\n")} label={`Copy ${file.path}`} />
68
77
  </div>
69
78
  <pre className={styles.diff}>
70
- {(file.diff ?? "").split("\n").map((line, i) => (
71
- <span key={i} className={`${styles.diffLine} ${diffLineClass(line)}`}>{line || " "}</span>
79
+ {diffLines(file.diff).map((line, i) => (
80
+ <span key={i} className={`${styles.diffLine} ${diffLineClass(line)}`}>{line}</span>
72
81
  ))}
73
82
  </pre>
74
83
  </div>
@@ -1,7 +1,8 @@
1
1
  import { SolidChatWidgetProps } from "../../../../types/solid-core";
2
2
  /**
3
- * `event_data: { widget: "status", tone, title?, message?, action?: { label, prompt } }`.
4
- * The optional action posts `prompt` as a new user message.
3
+ * `event_data: { widget: "status", tone, title?, message?, action?: { label, prompt }, route? }`.
4
+ * The optional action posts `prompt` as a new user message; the optional route adds a View link
5
+ * (same as the scenario-added widget).
5
6
  */
6
7
  export declare const SolidStatusChatWidget: ({ eventData, sendPrompt }: SolidChatWidgetProps) => import("react/jsx-runtime").JSX.Element;
7
8
  //# sourceMappingURL=SolidStatusChatWidget.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SolidStatusChatWidget.d.ts","sourceRoot":"","sources":["../../../../../src/components/core/solid-agent/widgets/SolidStatusChatWidget.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAepE;;;GAGG;AACH,eAAO,MAAM,qBAAqB,8BAA+B,oBAAoB,4CAmBpF,CAAC"}
1
+ {"version":3,"file":"SolidStatusChatWidget.d.ts","sourceRoot":"","sources":["../../../../../src/components/core/solid-agent/widgets/SolidStatusChatWidget.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAsBpE;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,8BAA+B,oBAAoB,4CA0BpF,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { AlertTriangle, CheckCircle2, CircleX, Info } from "lucide-react";
3
+ import { useNavigate } from "react-router-dom";
3
4
  import styles from "../SolidAgent.module.css";
4
5
  import { getChatWidgetData } from "./chatWidgetUtils";
5
6
  var TONE_CLASS = {
@@ -10,17 +11,20 @@ var TONE_CLASS = {
10
11
  };
11
12
  var TONE_ICON = { success: CheckCircle2, warning: AlertTriangle, error: CircleX, info: Info };
12
13
  /**
13
- * `event_data: { widget: "status", tone, title?, message?, action?: { label, prompt } }`.
14
- * The optional action posts `prompt` as a new user message.
14
+ * `event_data: { widget: "status", tone, title?, message?, action?: { label, prompt }, route? }`.
15
+ * The optional action posts `prompt` as a new user message; the optional route adds a View link
16
+ * (same as the scenario-added widget).
15
17
  */
16
18
  export var SolidStatusChatWidget = function (_a) {
17
19
  var _b, _c, _d;
18
20
  var eventData = _a.eventData, sendPrompt = _a.sendPrompt;
21
+ var navigate = useNavigate();
19
22
  var data = getChatWidgetData(eventData);
20
23
  var rawTone = String((_d = (_c = (_b = data.tone) !== null && _b !== void 0 ? _b : data.status) !== null && _c !== void 0 ? _c : data.state) !== null && _d !== void 0 ? _d : "").toLowerCase();
21
24
  var tone = rawTone in TONE_CLASS ? rawTone : "info";
22
25
  var Icon = TONE_ICON[tone];
23
- return (_jsxs("div", { className: "".concat(styles.status, " ").concat(TONE_CLASS[tone]), role: tone === "error" ? "alert" : "status", children: [_jsx(Icon, { size: 16, style: { flex: "0 0 auto", marginTop: 2 } }), _jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [data.title && _jsx("strong", { children: data.title }), data.message && _jsx("span", { children: data.message }), data.action && (_jsx("button", { type: "button", className: styles.btn, style: { alignSelf: "flex-start" }, onClick: function () { return sendPrompt(data.action.prompt); }, children: data.action.label }))] })] }));
26
+ var route = typeof data.route === "string" && data.route.startsWith("/") ? data.route : undefined;
27
+ return (_jsxs("div", { className: "".concat(styles.status, " ").concat(TONE_CLASS[tone]), role: tone === "error" ? "alert" : "status", children: [_jsx(Icon, { size: 16, style: { flex: "0 0 auto", marginTop: 2 } }), _jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [data.title && _jsx("strong", { children: data.title }), data.message && _jsx("span", { children: data.message }), route && (_jsx("button", { type: "button", className: styles.saView, style: { alignSelf: "flex-start" }, onClick: function () { return navigate(route); }, children: "View" })), data.action && (_jsx("button", { type: "button", className: styles.btn, style: { alignSelf: "flex-start" }, onClick: function () { return sendPrompt(data.action.prompt); }, children: data.action.label }))] })] }));
24
28
  };
25
29
  Object.assign(SolidStatusChatWidget, { getExtensionMetadata: function () { return ({
26
30
  agentWidget: { name: "status", description: "Show the outcome of one operation with a status, title, and detail.", propsSchema: { type: "object", properties: { tone: { type: "string", enum: ["success", "warning", "error", "info"] }, title: { type: "string" }, message: { type: "string" }, action: { type: "object", properties: { label: { type: "string" }, prompt: { type: "string" } }, required: ["label", "prompt"] } } } },
@@ -1 +1 @@
1
- {"version":3,"file":"SolidStatusChatWidget.js","sourceRoot":"","sources":["../../../../../src/components/core/solid-agent/widgets/SolidStatusChatWidget.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAC1E,OAAO,MAAM,MAAM,0BAA0B,CAAC;AAE9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAKtD,IAAM,UAAU,GAAyB;IACrC,OAAO,EAAE,MAAM,CAAC,aAAa;IAC7B,OAAO,EAAE,MAAM,CAAC,aAAa;IAC7B,KAAK,EAAE,MAAM,CAAC,WAAW;IACzB,IAAI,EAAE,MAAM,CAAC,UAAU;CAC1B,CAAC;AAEF,IAAM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C,GAAG,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,YAAY,EAAE,EAAE,OAAO,EAAE,cAAM,OAAA,UAAU,CAAC,IAAI,CAAC,MAAO,CAAC,MAAM,CAAC,EAA/B,CAA+B,YAC1H,IAAI,CAAC,MAAM,CAAC,KAAK,GACb,CACZ,IACC,IACJ,CACT,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,CAAC,qBAAqB,EAAE,EAAE,oBAAoB,EAAE,cAAM,OAAA,CAAC;QAChE,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,qEAAqE,EAAE,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAE,EAAE,EAAE,EAAE;KAC1a,CAAC,EAFiE,CAEjE,EAAE,CAAC,CAAC","sourcesContent":["import { AlertTriangle, CheckCircle2, CircleX, Info } from \"lucide-react\";\nimport styles from \"../SolidAgent.module.css\";\nimport { SolidChatWidgetProps } from \"../../../../types/solid-core\";\nimport { getChatWidgetData } from \"./chatWidgetUtils\";\n\ntype Tone = \"success\" | \"warning\" | \"error\" | \"info\";\ntype StatusData = { tone?: Tone; title?: string; message?: string; action?: { label: string; prompt: string } };\n\nconst TONE_CLASS: Record<Tone, string> = {\n success: styles.statusSuccess,\n warning: styles.statusWarning,\n error: styles.statusError,\n info: styles.statusInfo,\n};\n\nconst TONE_ICON = { success: CheckCircle2, warning: AlertTriangle, error: CircleX, info: Info };\n\n/**\n * `event_data: { widget: \"status\", tone, title?, message?, action?: { label, prompt } }`.\n * The optional action posts `prompt` as a new user message.\n */\nexport const SolidStatusChatWidget = ({ eventData, sendPrompt }: SolidChatWidgetProps) => {\n const data = getChatWidgetData<StatusData & { status?: string; state?: string }>(eventData);\n const rawTone = String(data.tone ?? data.status ?? data.state ?? \"\").toLowerCase() as Tone;\n const tone: Tone = rawTone in TONE_CLASS ? rawTone : \"info\";\n const Icon = TONE_ICON[tone];\n return (\n <div className={`${styles.status} ${TONE_CLASS[tone]}`} role={tone === \"error\" ? \"alert\" : \"status\"}>\n <Icon size={16} style={{ flex: \"0 0 auto\", marginTop: 2 }} />\n <div style={{ display: \"flex\", flexDirection: \"column\", gap: 6 }}>\n {data.title && <strong>{data.title}</strong>}\n {data.message && <span>{data.message}</span>}\n {data.action && (\n <button type=\"button\" className={styles.btn} style={{ alignSelf: \"flex-start\" }} onClick={() => sendPrompt(data.action!.prompt)}>\n {data.action.label}\n </button>\n )}\n </div>\n </div>\n );\n};\n\nObject.assign(SolidStatusChatWidget, { getExtensionMetadata: () => ({\n agentWidget: { name: \"status\", description: \"Show the outcome of one operation with a status, title, and detail.\", propsSchema: { type: \"object\", properties: { tone: { type: \"string\", enum: [\"success\", \"warning\", \"error\", \"info\"] }, title: { type: \"string\" }, message: { type: \"string\" }, action: { type: \"object\", properties: { label: { type: \"string\" }, prompt: { type: \"string\" } }, required: [\"label\", \"prompt\"] } } } },\n}) });\n"]}
1
+ {"version":3,"file":"SolidStatusChatWidget.js","sourceRoot":"","sources":["../../../../../src/components/core/solid-agent/widgets/SolidStatusChatWidget.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;A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E,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAE,EAAE,EAAE,EAAE;KAC1a,CAAC,EAFiE,CAEjE,EAAE,CAAC,CAAC","sourcesContent":["import { AlertTriangle, CheckCircle2, CircleX, Info } from \"lucide-react\";\nimport { useNavigate } from \"react-router-dom\";\nimport styles from \"../SolidAgent.module.css\";\nimport { SolidChatWidgetProps } from \"../../../../types/solid-core\";\nimport { getChatWidgetData } from \"./chatWidgetUtils\";\n\ntype Tone = \"success\" | \"warning\" | \"error\" | \"info\";\ntype StatusData = {\n tone?: Tone;\n title?: string;\n message?: string;\n action?: { label: string; prompt: string };\n /** In-app route for a View link (starts with \"/\"), e.g. \"/admin/test-hub/application/11?tab=security\". */\n route?: string;\n};\n\nconst TONE_CLASS: Record<Tone, string> = {\n success: styles.statusSuccess,\n warning: styles.statusWarning,\n error: styles.statusError,\n info: styles.statusInfo,\n};\n\nconst TONE_ICON = { success: CheckCircle2, warning: AlertTriangle, error: CircleX, info: Info };\n\n/**\n * `event_data: { widget: \"status\", tone, title?, message?, action?: { label, prompt }, route? }`.\n * The optional action posts `prompt` as a new user message; the optional route adds a View link\n * (same as the scenario-added widget).\n */\nexport const SolidStatusChatWidget = ({ eventData, sendPrompt }: SolidChatWidgetProps) => {\n const navigate = useNavigate();\n const data = getChatWidgetData<StatusData & { status?: string; state?: string }>(eventData);\n const rawTone = String(data.tone ?? data.status ?? data.state ?? \"\").toLowerCase() as Tone;\n const tone: Tone = rawTone in TONE_CLASS ? rawTone : \"info\";\n const Icon = TONE_ICON[tone];\n const route = typeof data.route === \"string\" && data.route.startsWith(\"/\") ? data.route : undefined;\n return (\n <div className={`${styles.status} ${TONE_CLASS[tone]}`} role={tone === \"error\" ? \"alert\" : \"status\"}>\n <Icon size={16} style={{ flex: \"0 0 auto\", marginTop: 2 }} />\n <div style={{ display: \"flex\", flexDirection: \"column\", gap: 6 }}>\n {data.title && <strong>{data.title}</strong>}\n {data.message && <span>{data.message}</span>}\n {route && (\n <button type=\"button\" className={styles.saView} style={{ alignSelf: \"flex-start\" }} onClick={() => navigate(route)}>\n View\n </button>\n )}\n {data.action && (\n <button type=\"button\" className={styles.btn} style={{ alignSelf: \"flex-start\" }} onClick={() => sendPrompt(data.action!.prompt)}>\n {data.action.label}\n </button>\n )}\n </div>\n </div>\n );\n};\n\nObject.assign(SolidStatusChatWidget, { getExtensionMetadata: () => ({\n agentWidget: { name: \"status\", description: \"Show the outcome of one operation with a status, title, and detail.\", propsSchema: { type: \"object\", properties: { tone: { type: \"string\", enum: [\"success\", \"warning\", \"error\", \"info\"] }, title: { type: \"string\" }, message: { type: \"string\" }, action: { type: \"object\", properties: { label: { type: \"string\" }, prompt: { type: \"string\" } }, required: [\"label\", \"prompt\"] } } } },\n}) });\n"]}
@@ -1,10 +1,18 @@
1
1
  import { AlertTriangle, CheckCircle2, CircleX, Info } from "lucide-react";
2
+ import { useNavigate } from "react-router-dom";
2
3
  import styles from "../SolidAgent.module.css";
3
4
  import { SolidChatWidgetProps } from "../../../../types/solid-core";
4
5
  import { getChatWidgetData } from "./chatWidgetUtils";
5
6
 
6
7
  type Tone = "success" | "warning" | "error" | "info";
7
- type StatusData = { tone?: Tone; title?: string; message?: string; action?: { label: string; prompt: string } };
8
+ type StatusData = {
9
+ tone?: Tone;
10
+ title?: string;
11
+ message?: string;
12
+ action?: { label: string; prompt: string };
13
+ /** In-app route for a View link (starts with "/"), e.g. "/admin/test-hub/application/11?tab=security". */
14
+ route?: string;
15
+ };
8
16
 
9
17
  const TONE_CLASS: Record<Tone, string> = {
10
18
  success: styles.statusSuccess,
@@ -16,20 +24,28 @@ const TONE_CLASS: Record<Tone, string> = {
16
24
  const TONE_ICON = { success: CheckCircle2, warning: AlertTriangle, error: CircleX, info: Info };
17
25
 
18
26
  /**
19
- * `event_data: { widget: "status", tone, title?, message?, action?: { label, prompt } }`.
20
- * The optional action posts `prompt` as a new user message.
27
+ * `event_data: { widget: "status", tone, title?, message?, action?: { label, prompt }, route? }`.
28
+ * The optional action posts `prompt` as a new user message; the optional route adds a View link
29
+ * (same as the scenario-added widget).
21
30
  */
22
31
  export const SolidStatusChatWidget = ({ eventData, sendPrompt }: SolidChatWidgetProps) => {
32
+ const navigate = useNavigate();
23
33
  const data = getChatWidgetData<StatusData & { status?: string; state?: string }>(eventData);
24
34
  const rawTone = String(data.tone ?? data.status ?? data.state ?? "").toLowerCase() as Tone;
25
35
  const tone: Tone = rawTone in TONE_CLASS ? rawTone : "info";
26
36
  const Icon = TONE_ICON[tone];
37
+ const route = typeof data.route === "string" && data.route.startsWith("/") ? data.route : undefined;
27
38
  return (
28
39
  <div className={`${styles.status} ${TONE_CLASS[tone]}`} role={tone === "error" ? "alert" : "status"}>
29
40
  <Icon size={16} style={{ flex: "0 0 auto", marginTop: 2 }} />
30
41
  <div style={{ display: "flex", flexDirection: "column", gap: 6 }}>
31
42
  {data.title && <strong>{data.title}</strong>}
32
43
  {data.message && <span>{data.message}</span>}
44
+ {route && (
45
+ <button type="button" className={styles.saView} style={{ alignSelf: "flex-start" }} onClick={() => navigate(route)}>
46
+ View
47
+ </button>
48
+ )}
33
49
  {data.action && (
34
50
  <button type="button" className={styles.btn} style={{ alignSelf: "flex-start" }} onClick={() => sendPrompt(data.action!.prompt)}>
35
51
  {data.action.label}
@@ -372,6 +372,9 @@
372
372
  border-collapse: collapse;
373
373
  font-size: 13px;
374
374
  margin: 0;
375
+ /* The bubble's break-word lets cells shrink mid-word; break at spaces and let the wrapper scroll instead. */
376
+ word-break: normal;
377
+ overflow-wrap: normal;
375
378
  }
376
379
 
377
380
  .MarkdownRoot th,
@@ -8,7 +8,7 @@ function cx() {
8
8
  }
9
9
  return parts.filter(Boolean).join(" ");
10
10
  }
11
- var DATEPICKER_OUTSIDE_SAFE_SELECTOR = "#solid-datepicker-portal, .react-datepicker, .react-datepicker-popper, .react-datepicker__portal, [class*='react-datepicker'], [data-solid-dialog-outside-safe='true']";
11
+ var DATEPICKER_OUTSIDE_SAFE_SELECTOR = "#solid-datepicker-portal, .react-datepicker, .react-datepicker-popper, .react-datepicker__portal, [class*='react-datepicker'], .solid-autocomplete-panel, [data-solid-dialog-outside-safe='true']";
12
12
  function isDatePickerInteractionTarget(target) {
13
13
  var _a;
14
14
  if (!target)
@@ -1 +1 @@
1
- {"version":3,"file":"SolidDialog.js","sourceRoot":"","sources":["../../../src/components/shad-cn-ui/SolidDialog.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,MAAM,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,CAAC,EAAE,MAAM,cAAc,CAAC;AA6BjC,SAAS,EAAE;IAAC,eAA2C;SAA3C,UAA2C,EAA3C,qBAA2C,EAA3C,IAA2C;QAA3C,0BAA2C;;IACrD,OAAO,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACzC,CAAC;AAED,IAAM,gCAAgC,GACpC,wKAAwK,CAAC;AAE3K,SAAS,6BAA6B,CAAC,MAA0B;;IAC/D,IAAI,CAAC,MAAM;QAAE,OAAO,KAAK,CAAC;IAE1B,IAAI,MAAM,YAAY,OAAO,EAAE;QAC7B,OAAO,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,gCAAgC,CAAC,CAAC,CAAC;KAClE;IAED,IAAI,MAAM,YAAY,IAAI,EAAE;QAC1B,OA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C,YAAG,QAAQ,GAAO,CAAC;AACtF,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,EAAqC;QAAnC,SAAS,eAAA;IAC9C,OAAO,cAAK,SAAS,EAAE,EAAE,CAAC,8BAA8B,EAAE,SAAS,CAAC,GAAI,CAAC;AAC3E,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,EAUhC;QATC,SAAS,eAAA,EACT,QAAQ,cAAA,EACR,OAAO,aAAA,EACP,qBAAwC,EAA1B,SAAS,mBAAG,cAAc,KAAA;IAOxC,OAAO,CACL,KAAC,MAAM,CAAC,KAAK,IAAC,OAAO,kBACnB,iBACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,EAAE,CAAC,0BAA0B,EAAE,SAAS,CAAC,gBACxC,SAAS,EACrB,OAAO,EAAE,OAAO,YAEf,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,KAAC,CAAC,IAAC,IAAI,EAAE,EAAE,GAAI,GACrB,GACI,CAChB,CAAC;AACJ,CAAC","sourcesContent":["import * as React from \"react\";\nimport * as Dialog from \"@radix-ui/react-dialog\";\nimport { X } from \"lucide-react\";\n\ntype SolidDialogProps = {\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n children?: React.ReactNode;\n className?: string;\n ariaLabel?: string;\n contentClassName?: string;\n overlayClassName?: string;\n style?: React.CSSProperties;\n // Compatibility props\n visible?: boolean;\n onHide?: () => void;\n modal?: boolean;\n header?: React.ReactNode;\n footer?: React.ReactNode;\n showHeader?: boolean;\n headerClassName?: string;\n contentStyle?: React.CSSProperties;\n breakpoints?: Record<string, string>;\n dismissible?: boolean;\n};\n\ntype SolidDialogSectionProps = {\n children: React.ReactNode;\n className?: string;\n};\n\nfunction cx(...parts: Array<string | false | undefined>) {\n return parts.filter(Boolean).join(\" \");\n}\n\nconst DATEPICKER_OUTSIDE_SAFE_SELECTOR =\n \"#solid-datepicker-portal, .react-datepicker, .react-datepicker-popper, .react-datepicker__portal, [class*='react-datepicker'], [data-solid-dialog-outside-safe='true']\";\n\nfunction isDatePickerInteractionTarget(target: EventTarget | null): boolean {\n if (!target) return false;\n\n if (target instanceof Element) {\n return Boolean(target.closest(DATEPICKER_OUTSIDE_SAFE_SELECTOR));\n }\n\n if (target instanceof Node) {\n return Boolean(target.parentElement?.closest(DATEPICKER_OUTSIDE_SAFE_SELECTOR));\n }\n\n return false;\n}\n\nfunction shouldPreventOutsideDismiss(event: any): boolean {\n const original = event?.detail?.originalEvent ?? event;\n const target = original?.target as EventTarget | null;\n\n if (isDatePickerInteractionTarget(target)) {\n return true;\n }\n\n if (typeof original?.composedPath === \"function\") {\n const path = original.composedPath() as EventTarget[];\n return path.some((node) => isDatePickerInteractionTarget(node));\n }\n\n return false;\n}\n\nexport function SolidDialog({\n open,\n onOpenChange,\n children,\n className,\n ariaLabel,\n contentClassName,\n overlayClassName,\n style,\n visible,\n onHide,\n header,\n footer,\n showHeader = true,\n headerClassName,\n contentStyle,\n dismissible = true,\n}: SolidDialogProps) {\n const controlledOpen = open ?? visible ?? false;\n const handleOpenChange = (next: boolean) => {\n onOpenChange?.(next);\n if (!next) onHide?.();\n };\n\n return (\n <Dialog.Root open={controlledOpen} onOpenChange={handleOpenChange}>\n <Dialog.Portal>\n <Dialog.Overlay className={cx(\"solid-radix-dialog-overlay\", overlayClassName)} />\n <Dialog.Content\n className={cx(\"solid-radix-dialog-content\", className, contentClassName)}\n aria-label={ariaLabel}\n style={style ?? contentStyle}\n onEscapeKeyDown={(event: any) => {\n if (!dismissible) event.preventDefault();\n }}\n onPointerDownOutside={(event: any) => {\n if (!dismissible) {\n event.preventDefault();\n return;\n }\n if (shouldPreventOutsideDismiss(event)) {\n event.preventDefault();\n }\n }}\n onInteractOutside={(event: any) => {\n if (!dismissible) {\n event.preventDefault();\n return;\n }\n if (shouldPreventOutsideDismiss(event)) {\n event.preventDefault();\n }\n }}\n >\n {showHeader && (header || onHide) ? (\n <SolidDialogHeader className={headerClassName}>\n {header ? <SolidDialogTitle>{header}</SolidDialogTitle> : null}\n <SolidDialogClose aria-label=\"Close\" />\n </SolidDialogHeader>\n ) : null}\n {children}\n {footer ? <SolidDialogFooter>{footer}</SolidDialogFooter> : null}\n </Dialog.Content>\n </Dialog.Portal>\n </Dialog.Root>\n );\n}\n\nexport function SolidDialogHeader({ children, className }: SolidDialogSectionProps) {\n return <div className={cx(\"solid-radix-dialog-header\", className)}>{children}</div>;\n}\n\nexport function SolidDialogTitle({ children, className }: SolidDialogSectionProps) {\n return <Dialog.Title className={cx(\"solid-radix-dialog-title\", className)}>{children}</Dialog.Title>;\n}\n\nexport function SolidDialogDescription({ children, className }: SolidDialogSectionProps) {\n return (\n <Dialog.Description className={cx(\"solid-radix-dialog-description\", className)}>\n {children}\n </Dialog.Description>\n );\n}\n\nexport function SolidDialogBody({ children, className }: SolidDialogSectionProps) {\n return <div className={cx(\"solid-radix-dialog-body\", className)}>{children}</div>;\n}\n\nexport function SolidDialogFooter({ children, className }: SolidDialogSectionProps) {\n return <div className={cx(\"solid-radix-dialog-footer\", className)}>{children}</div>;\n}\n\nexport function SolidDialogSeparator({ className }: { className?: string }) {\n return <div className={cx(\"solid-radix-dialog-separator\", className)} />;\n}\n\nexport function SolidDialogClose({\n className,\n children,\n onClick,\n \"aria-label\": ariaLabel = \"Close dialog\",\n}: {\n className?: string;\n children?: React.ReactNode;\n onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n \"aria-label\"?: string;\n}) {\n return (\n <Dialog.Close asChild>\n <button\n type=\"button\"\n className={cx(\"solid-radix-dialog-close\", className)}\n aria-label={ariaLabel}\n onClick={onClick}\n >\n {children ?? <X size={16} />}\n </button>\n </Dialog.Close>\n );\n}\n"]}
1
+ {"version":3,"file":"SolidDialog.js","sourceRoot":"","sources":["../../../src/components/shad-cn-ui/SolidDialog.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,MAAM,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,CAAC,EAAE,MAAM,cAAc,CAAC;AA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SAAS,eAAA;IAC1D,OAAO,CACL,KAAC,MAAM,CAAC,WAAW,IAAC,SAAS,EAAE,EAAE,CAAC,gCAAgC,EAAE,SAAS,CAAC,YAC3E,QAAQ,GACU,CACtB,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,EAAgD;QAA9C,QAAQ,cAAA,EAAE,SAAS,eAAA;IACnD,OAAO,cAAK,SAAS,EAAE,EAAE,CAAC,yBAAyB,EAAE,SAAS,CAAC,YAAG,QAAQ,GAAO,CAAC;AACpF,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,EAAgD;QAA9C,QAAQ,cAAA,EAAE,SAAS,eAAA;IACrD,OAAO,cAAK,SAAS,EAAE,EAAE,CAAC,2BAA2B,EAAE,SAAS,CAAC,YAAG,QAAQ,GAAO,CAAC;AACtF,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,EAAqC;QAAnC,SAAS,eAAA;IAC9C,OAAO,cAAK,SAAS,EAAE,EAAE,CAAC,8BAA8B,EAAE,SAAS,CAAC,GAAI,CAAC;AAC3E,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,EAUhC;QATC,SAAS,eAAA,EACT,QAAQ,cAAA,EACR,OAAO,aAAA,EACP,qBAAwC,EAA1B,SAAS,mBAAG,cAAc,KAAA;IAOxC,OAAO,CACL,KAAC,MAAM,CAAC,KAAK,IAAC,OAAO,kBACnB,iBACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,EAAE,CAAC,0BAA0B,EAAE,SAAS,CAAC,gBACxC,SAAS,EACrB,OAAO,EAAE,OAAO,YAEf,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,KAAC,CAAC,IAAC,IAAI,EAAE,EAAE,GAAI,GACrB,GACI,CAChB,CAAC;AACJ,CAAC","sourcesContent":["import * as React from \"react\";\nimport * as Dialog from \"@radix-ui/react-dialog\";\nimport { X } from \"lucide-react\";\n\ntype SolidDialogProps = {\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n children?: React.ReactNode;\n className?: string;\n ariaLabel?: string;\n contentClassName?: string;\n overlayClassName?: string;\n style?: React.CSSProperties;\n // Compatibility props\n visible?: boolean;\n onHide?: () => void;\n modal?: boolean;\n header?: React.ReactNode;\n footer?: React.ReactNode;\n showHeader?: boolean;\n headerClassName?: string;\n contentStyle?: React.CSSProperties;\n breakpoints?: Record<string, string>;\n dismissible?: boolean;\n};\n\ntype SolidDialogSectionProps = {\n children: React.ReactNode;\n className?: string;\n};\n\nfunction cx(...parts: Array<string | false | undefined>) {\n return parts.filter(Boolean).join(\" \");\n}\n\nconst DATEPICKER_OUTSIDE_SAFE_SELECTOR =\n \"#solid-datepicker-portal, .react-datepicker, .react-datepicker-popper, .react-datepicker__portal, [class*='react-datepicker'], .solid-autocomplete-panel, [data-solid-dialog-outside-safe='true']\";\n\nfunction isDatePickerInteractionTarget(target: EventTarget | null): boolean {\n if (!target) return false;\n\n if (target instanceof Element) {\n return Boolean(target.closest(DATEPICKER_OUTSIDE_SAFE_SELECTOR));\n }\n\n if (target instanceof Node) {\n return Boolean(target.parentElement?.closest(DATEPICKER_OUTSIDE_SAFE_SELECTOR));\n }\n\n return false;\n}\n\nfunction shouldPreventOutsideDismiss(event: any): boolean {\n const original = event?.detail?.originalEvent ?? event;\n const target = original?.target as EventTarget | null;\n\n if (isDatePickerInteractionTarget(target)) {\n return true;\n }\n\n if (typeof original?.composedPath === \"function\") {\n const path = original.composedPath() as EventTarget[];\n return path.some((node) => isDatePickerInteractionTarget(node));\n }\n\n return false;\n}\n\nexport function SolidDialog({\n open,\n onOpenChange,\n children,\n className,\n ariaLabel,\n contentClassName,\n overlayClassName,\n style,\n visible,\n onHide,\n header,\n footer,\n showHeader = true,\n headerClassName,\n contentStyle,\n dismissible = true,\n}: SolidDialogProps) {\n const controlledOpen = open ?? visible ?? false;\n const handleOpenChange = (next: boolean) => {\n onOpenChange?.(next);\n if (!next) onHide?.();\n };\n\n return (\n <Dialog.Root open={controlledOpen} onOpenChange={handleOpenChange}>\n <Dialog.Portal>\n <Dialog.Overlay className={cx(\"solid-radix-dialog-overlay\", overlayClassName)} />\n <Dialog.Content\n className={cx(\"solid-radix-dialog-content\", className, contentClassName)}\n aria-label={ariaLabel}\n style={style ?? contentStyle}\n onEscapeKeyDown={(event: any) => {\n if (!dismissible) event.preventDefault();\n }}\n onPointerDownOutside={(event: any) => {\n if (!dismissible) {\n event.preventDefault();\n return;\n }\n if (shouldPreventOutsideDismiss(event)) {\n event.preventDefault();\n }\n }}\n onInteractOutside={(event: any) => {\n if (!dismissible) {\n event.preventDefault();\n return;\n }\n if (shouldPreventOutsideDismiss(event)) {\n event.preventDefault();\n }\n }}\n >\n {showHeader && (header || onHide) ? (\n <SolidDialogHeader className={headerClassName}>\n {header ? <SolidDialogTitle>{header}</SolidDialogTitle> : null}\n <SolidDialogClose aria-label=\"Close\" />\n </SolidDialogHeader>\n ) : null}\n {children}\n {footer ? <SolidDialogFooter>{footer}</SolidDialogFooter> : null}\n </Dialog.Content>\n </Dialog.Portal>\n </Dialog.Root>\n );\n}\n\nexport function SolidDialogHeader({ children, className }: SolidDialogSectionProps) {\n return <div className={cx(\"solid-radix-dialog-header\", className)}>{children}</div>;\n}\n\nexport function SolidDialogTitle({ children, className }: SolidDialogSectionProps) {\n return <Dialog.Title className={cx(\"solid-radix-dialog-title\", className)}>{children}</Dialog.Title>;\n}\n\nexport function SolidDialogDescription({ children, className }: SolidDialogSectionProps) {\n return (\n <Dialog.Description className={cx(\"solid-radix-dialog-description\", className)}>\n {children}\n </Dialog.Description>\n );\n}\n\nexport function SolidDialogBody({ children, className }: SolidDialogSectionProps) {\n return <div className={cx(\"solid-radix-dialog-body\", className)}>{children}</div>;\n}\n\nexport function SolidDialogFooter({ children, className }: SolidDialogSectionProps) {\n return <div className={cx(\"solid-radix-dialog-footer\", className)}>{children}</div>;\n}\n\nexport function SolidDialogSeparator({ className }: { className?: string }) {\n return <div className={cx(\"solid-radix-dialog-separator\", className)} />;\n}\n\nexport function SolidDialogClose({\n className,\n children,\n onClick,\n \"aria-label\": ariaLabel = \"Close dialog\",\n}: {\n className?: string;\n children?: React.ReactNode;\n onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n \"aria-label\"?: string;\n}) {\n return (\n <Dialog.Close asChild>\n <button\n type=\"button\"\n className={cx(\"solid-radix-dialog-close\", className)}\n aria-label={ariaLabel}\n onClick={onClick}\n >\n {children ?? <X size={16} />}\n </button>\n </Dialog.Close>\n );\n}\n"]}
@@ -34,7 +34,7 @@ function cx(...parts: Array<string | false | undefined>) {
34
34
  }
35
35
 
36
36
  const DATEPICKER_OUTSIDE_SAFE_SELECTOR =
37
- "#solid-datepicker-portal, .react-datepicker, .react-datepicker-popper, .react-datepicker__portal, [class*='react-datepicker'], [data-solid-dialog-outside-safe='true']";
37
+ "#solid-datepicker-portal, .react-datepicker, .react-datepicker-popper, .react-datepicker__portal, [class*='react-datepicker'], .solid-autocomplete-panel, [data-solid-dialog-outside-safe='true']";
38
38
 
39
39
  function isDatePickerInteractionTarget(target: EventTarget | null): boolean {
40
40
  if (!target) return false;
@@ -18,6 +18,7 @@ export declare const createSolidEntityApi: (entityName: string) => import("@redu
18
18
  recoverSolidEntityById: import("@reduxjs/toolkit/query/react").MutationDefinition<any, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, string, any, `genericSolid${string}Api`>;
19
19
  recoverSolidEntity: import("@reduxjs/toolkit/query/react").MutationDefinition<any, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, string, any, `genericSolid${string}Api`>;
20
20
  patchUpdateSolidEntity: import("@reduxjs/toolkit/query/react").MutationDefinition<any, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, string, any, `genericSolid${string}Api`>;
21
+ patchUpdateSolidEntityWithoutListInvalidation: import("@reduxjs/toolkit/query/react").MutationDefinition<any, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, string, any, `genericSolid${string}Api`>;
21
22
  publishSolidEntity: import("@reduxjs/toolkit/query/react").MutationDefinition<any, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, string, any, `genericSolid${string}Api`>;
22
23
  unpublishSolidEntity: import("@reduxjs/toolkit/query/react").MutationDefinition<any, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, string, any, `genericSolid${string}Api`>;
23
24
  }, `genericSolid${string}Api`, string, typeof import("@reduxjs/toolkit/query/react").coreModuleName | typeof import("@reduxjs/toolkit/query/react").reactHooksModuleName>;
@@ -1 +1 @@
1
- {"version":3,"file":"solidEntityApi.d.ts","sourceRoot":"","sources":["../../../src/redux/api/solidEntityApi.tsx"],"names":[],"mappings":"AAOA,eAAO,MAAM,oBAAoB,eAAgB,MAAM;;;;;;;;;;;;;;;;;;;;;;yKAWtD,CAAC"}
1
+ {"version":3,"file":"solidEntityApi.d.ts","sourceRoot":"","sources":["../../../src/redux/api/solidEntityApi.tsx"],"names":[],"mappings":"AAOA,eAAO,MAAM,oBAAoB,eAAgB,MAAM;;;;;;;;;;;;;;;;;;;;;;;yKAWtD,CAAC"}
@@ -165,6 +165,20 @@ var createSolidEntityApiInternal = function (entityName) {
165
165
  ];
166
166
  },
167
167
  }),
168
+ patchUpdateSolidEntityWithoutListInvalidation: builder.mutation({
169
+ query: function (_a) {
170
+ var id = _a.id, data = _a.data;
171
+ return ({
172
+ url: "/".concat(kebabEntityName, "/").concat(id),
173
+ method: 'PATCH',
174
+ body: data,
175
+ });
176
+ },
177
+ invalidatesTags: function (_result, _error, _a) {
178
+ var id = _a.id;
179
+ return [{ type: entityName, id: id }];
180
+ },
181
+ }),
168
182
  publishSolidEntity: builder.mutation({
169
183
  query: function (id) { return ({
170
184
  url: "/".concat(kebabEntityName, "/").concat(id, "/publish"),
@@ -1 +1 @@
1
- {"version":3,"file":"solidEntityApi.js","sourceRoot":"","sources":["../../../src/redux/api/solidEntityApi.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,8BAA8B,EAAE,MAAM,6BAA6B,CAAC;AAE7E,IAAM,mBAAmB,GAAG,IAAI,GAAG,EAA2D,CAAC;AAE/F,MAAM,CAAC,IAAM,oBAAoB,GAAG,UAAC,UAAkB;IACnD,IAAM,SAAS,GAAG,mBAAmB,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IACtD,IAAI,SAAS,EAAE;QACX,8BAA8B,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;QACtD,OAAO,SAAS,CAAC;KACpB;IAED,IAAM,GAAG,GAAG,4BAA4B,CAAC,UAAU,CAAC,CAAC;IACrD,mBAAmB,CAAC,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;IACzC,8BAA8B,CAAC,UAAU,EAA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SAEL,CAAC,EA7IsB,CA6ItB;KACL,CAAC,CAAC;AACP,CAAC,CAAC;AAEF,iBAAiB;AACjB,oCAAoC;AACpC,8CAA8C;AAC9C,oCAAoC;AACpC,gCAAgC;AAChC,kCAAkC;AAClC,oCAAoC;AACpC,sCAAsC;AACtC,mBAAmB;AACnB,mCAAmC;AACnC,sBAAsB","sourcesContent":["import { createApi } from '@reduxjs/toolkit/query/react';\nimport { baseQueryWithAuth } from './fetchBaseQuery';\nimport { kebabCase } from 'lodash';\nimport { ensureSolidEntityApiRegistered } from '../store/solidEntityApiPool';\n\nconst solidEntityApiCache = new Map<string, ReturnType<typeof createSolidEntityApiInternal>>();\n\nexport const createSolidEntityApi = (entityName: string) => {\n const cachedApi = solidEntityApiCache.get(entityName);\n if (cachedApi) {\n ensureSolidEntityApiRegistered(entityName, cachedApi);\n return cachedApi;\n }\n\n const api = createSolidEntityApiInternal(entityName);\n solidEntityApiCache.set(entityName, api);\n ensureSolidEntityApiRegistered(entityName, api);\n return api;\n};\n\nconst createSolidEntityApiInternal = (entityName: string) => {\n const kebabEntityName = kebabCase(entityName);\n\n return createApi({\n reducerPath: `genericSolid${entityName}Api`,\n baseQuery: baseQueryWithAuth,\n tagTypes: [entityName],\n endpoints: (builder) => ({\n getSolidEntities: builder.query({\n query: (qs) => {\n return `/${kebabEntityName}?&${qs}`\n },\n transformResponse: (response: any) => {\n if (response.error) {\n throw new Error(response.error);\n }\n return {\n records: response.data.records,\n meta: response.data.meta,\n groupMeta: response?.data?.groupMeta,\n groupRecords: response?.data?.groupRecords ? response.data.groupRecords : [],\n }\n },\n providesTags: (result) =>\n result?.records\n ? [\n ...result.records.map((record: { id: any; }) => ({\n type: entityName,\n id: record.id,\n })),\n { type: entityName, id: 'LIST' },\n ]\n : [{ type: entityName, id: 'LIST' }]\n }),\n getSolidKanbanEntities: builder.query({\n query: (qs) => {\n return `/${kebabEntityName}/group-kanban?&${qs}`\n },\n transformResponse: (response: any) => {\n if (response.error) {\n throw new Error(response.error);\n }\n return {\n records: response.data.records.groupedData,\n meta: response.data.meta\n }\n },\n providesTags: [{ type: entityName, id: 'KANBAN' }],\n }),\n getSolidEntityById: builder.query({\n query: ({ id, qs }) => {\n return `/${kebabEntityName}/${id}?${qs}`\n },\n // providesTags: () => [{ type: entityName }],\n providesTags: (_result, _error, { id }) => [{ type: entityName, id }],\n }),\n createSolidEntity: builder.mutation({\n query: (entity) => ({\n url: `/${kebabEntityName}`,\n method: 'POST',\n body: entity\n }),\n invalidatesTags: [{ type: entityName, id: 'LIST' }],\n }),\n upsertSolidEntity: builder.mutation({\n query: (entity) => ({\n url: `/${kebabEntityName}/upsert`,\n method: 'POST',\n body: entity\n }),\n invalidatesTags: [{ type: entityName, id: 'LIST' }],\n }),\n updateSolidEntity: builder.mutation({\n query: ({ id, data }) => ({\n url: `/${kebabEntityName}/${id}`,\n method: 'PUT',\n body: data,\n }),\n invalidatesTags: (_result, _error, { id }) => [\n { type: entityName, id },\n { type: entityName, id: 'LIST' },\n ],\n }),\n deleteMultipleSolidEntities: builder.mutation({\n query: (data) => ({\n url: `/${kebabEntityName}/bulk/`,\n method: 'DELETE',\n body: data\n }),\n invalidatesTags: [{ type: entityName, id: 'LIST' }]\n }),\n deleteSolidEntity: builder.mutation({\n query: (id) => ({\n url: `/${kebabEntityName}/${id}`,\n method: 'DELETE',\n }),\n invalidatesTags: (_result, _error, id) => [\n { type: entityName, id },\n { type: entityName, id: 'LIST' },\n ],\n }),\n recoverSolidEntityById: builder.mutation({\n query: (id) => `/${kebabEntityName}/recover/${id}`,\n invalidatesTags: (_result, _error, id) => [\n { type: entityName, id },\n { type: entityName, id: 'LIST' },\n ],\n }),\n recoverSolidEntity: builder.mutation({\n query: (data) => ({\n url: `/${kebabEntityName}/bulk-recover/`,\n method: 'POST',\n body: data\n }),\n invalidatesTags: [{ type: entityName, id: 'LIST' }],\n }),\n patchUpdateSolidEntity: builder.mutation({\n query: ({ id, data }) => ({\n url: `/${kebabEntityName}/${id}`,\n method: 'PATCH',\n body: data,\n }),\n invalidatesTags: (_result, _error, { id }) => [\n { type: entityName, id },\n { type: entityName, id: 'LIST' },\n ],\n }),\n publishSolidEntity: builder.mutation({\n query: (id) => ({\n url: `/${kebabEntityName}/${id}/publish`,\n method: 'POST'\n }),\n invalidatesTags: (_result, _error, id) => [\n { type: entityName, id },\n { type: entityName, id: 'LIST' }\n ]\n }),\n unpublishSolidEntity: builder.mutation({\n query: (id) => ({\n url: `/${kebabEntityName}/${id}/unpublish`,\n method: 'POST'\n }),\n invalidatesTags: (_result, _error, id) => [\n { type: entityName, id },\n { type: entityName, id: 'LIST' }\n ]\n }),\n\n }),\n });\n};\n\n// export const {\n// useCreateSolidEntityMutation,\n// useDeleteMultipleSolidEntitiesMutation,\n// useDeleteSolidEntityMutation,\n// useGetSolidEntitiesQuery,\n// useGetSolidEntityByIdQuery,\n// useLazyGetSolidEntitiesQuery,\n// useLazyGetSolidEntityByIdQuery,\n// usePrefetch,\n// useUpdateSolidEntityMutation\n// } = solidEntityApi;\n"]}
1
+ {"version":3,"file":"solidEntityApi.js","sourceRoot":"","sources":["../../../src/redux/api/solidEntityApi.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,8BAA8B,EAAE,MAAM,6BAA6B,CAAC;AAE7E,IAAM,mBAAmB,GAAG,IAAI,GAAG,EAA2D,CAAC;AAE/F,MAAM,CAAC,IAAM,oBAAoB,GAAG,UAAC,UAAkB;IACnD,IAAM,SAAS,GAAG,mBAAmB,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IACtD,IAAI,SAAS,EAAE;QACX,8BAA8B,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;QACtD,OAAO,SAAS,CAAC;KACpB;IAED,IA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AE,IAAK,OAAA;oBACtC,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,IAAA,EAAE;oBACxB,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,EAAE;iBACnC,EAHyC,CAGzC;aACJ,CAAC;YACF,oBAAoB,EAAE,OAAO,CAAC,QAAQ,CAAC;gBACnC,KAAK,EAAE,UAAC,EAAE,IAAK,OAAA,CAAC;oBACZ,GAAG,EAAE,WAAI,eAAe,cAAI,EAAE,eAAY;oBAC1C,MAAM,EAAE,MAAM;iBACjB,CAAC,EAHa,CAGb;gBACF,eAAe,EAAE,UAAC,OAAO,EAAE,MAAM,EAAE,EAAE,IAAK,OAAA;oBACtC,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,IAAA,EAAE;oBACxB,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,EAAE;iBACnC,EAHyC,CAGzC;aACJ,CAAC;SAEL,CAAC,EArJsB,CAqJtB;KACL,CAAC,CAAC;AACP,CAAC,CAAC;AAEF,iBAAiB;AACjB,oCAAoC;AACpC,8CAA8C;AAC9C,oCAAoC;AACpC,gCAAgC;AAChC,kCAAkC;AAClC,oCAAoC;AACpC,sCAAsC;AACtC,mBAAmB;AACnB,mCAAmC;AACnC,sBAAsB","sourcesContent":["import { createApi } from '@reduxjs/toolkit/query/react';\nimport { baseQueryWithAuth } from './fetchBaseQuery';\nimport { kebabCase } from 'lodash';\nimport { ensureSolidEntityApiRegistered } from '../store/solidEntityApiPool';\n\nconst solidEntityApiCache = new Map<string, ReturnType<typeof createSolidEntityApiInternal>>();\n\nexport const createSolidEntityApi = (entityName: string) => {\n const cachedApi = solidEntityApiCache.get(entityName);\n if (cachedApi) {\n ensureSolidEntityApiRegistered(entityName, cachedApi);\n return cachedApi;\n }\n\n const api = createSolidEntityApiInternal(entityName);\n solidEntityApiCache.set(entityName, api);\n ensureSolidEntityApiRegistered(entityName, api);\n return api;\n};\n\nconst createSolidEntityApiInternal = (entityName: string) => {\n const kebabEntityName = kebabCase(entityName);\n\n return createApi({\n reducerPath: `genericSolid${entityName}Api`,\n baseQuery: baseQueryWithAuth,\n tagTypes: [entityName],\n endpoints: (builder) => ({\n getSolidEntities: builder.query({\n query: (qs) => {\n return `/${kebabEntityName}?&${qs}`\n },\n transformResponse: (response: any) => {\n if (response.error) {\n throw new Error(response.error);\n }\n return {\n records: response.data.records,\n meta: response.data.meta,\n groupMeta: response?.data?.groupMeta,\n groupRecords: response?.data?.groupRecords ? response.data.groupRecords : [],\n }\n },\n providesTags: (result) =>\n result?.records\n ? [\n ...result.records.map((record: { id: any; }) => ({\n type: entityName,\n id: record.id,\n })),\n { type: entityName, id: 'LIST' },\n ]\n : [{ type: entityName, id: 'LIST' }]\n }),\n getSolidKanbanEntities: builder.query({\n query: (qs) => {\n return `/${kebabEntityName}/group-kanban?&${qs}`\n },\n transformResponse: (response: any) => {\n if (response.error) {\n throw new Error(response.error);\n }\n return {\n records: response.data.records.groupedData,\n meta: response.data.meta\n }\n },\n providesTags: [{ type: entityName, id: 'KANBAN' }],\n }),\n getSolidEntityById: builder.query({\n query: ({ id, qs }) => {\n return `/${kebabEntityName}/${id}?${qs}`\n },\n // providesTags: () => [{ type: entityName }],\n providesTags: (_result, _error, { id }) => [{ type: entityName, id }],\n }),\n createSolidEntity: builder.mutation({\n query: (entity) => ({\n url: `/${kebabEntityName}`,\n method: 'POST',\n body: entity\n }),\n invalidatesTags: [{ type: entityName, id: 'LIST' }],\n }),\n upsertSolidEntity: builder.mutation({\n query: (entity) => ({\n url: `/${kebabEntityName}/upsert`,\n method: 'POST',\n body: entity\n }),\n invalidatesTags: [{ type: entityName, id: 'LIST' }],\n }),\n updateSolidEntity: builder.mutation({\n query: ({ id, data }) => ({\n url: `/${kebabEntityName}/${id}`,\n method: 'PUT',\n body: data,\n }),\n invalidatesTags: (_result, _error, { id }) => [\n { type: entityName, id },\n { type: entityName, id: 'LIST' },\n ],\n }),\n deleteMultipleSolidEntities: builder.mutation({\n query: (data) => ({\n url: `/${kebabEntityName}/bulk/`,\n method: 'DELETE',\n body: data\n }),\n invalidatesTags: [{ type: entityName, id: 'LIST' }]\n }),\n deleteSolidEntity: builder.mutation({\n query: (id) => ({\n url: `/${kebabEntityName}/${id}`,\n method: 'DELETE',\n }),\n invalidatesTags: (_result, _error, id) => [\n { type: entityName, id },\n { type: entityName, id: 'LIST' },\n ],\n }),\n recoverSolidEntityById: builder.mutation({\n query: (id) => `/${kebabEntityName}/recover/${id}`,\n invalidatesTags: (_result, _error, id) => [\n { type: entityName, id },\n { type: entityName, id: 'LIST' },\n ],\n }),\n recoverSolidEntity: builder.mutation({\n query: (data) => ({\n url: `/${kebabEntityName}/bulk-recover/`,\n method: 'POST',\n body: data\n }),\n invalidatesTags: [{ type: entityName, id: 'LIST' }],\n }),\n patchUpdateSolidEntity: builder.mutation({\n query: ({ id, data }) => ({\n url: `/${kebabEntityName}/${id}`,\n method: 'PATCH',\n body: data,\n }),\n invalidatesTags: (_result, _error, { id }) => [\n { type: entityName, id },\n { type: entityName, id: 'LIST' },\n ],\n }),\n patchUpdateSolidEntityWithoutListInvalidation: builder.mutation({\n query: ({ id, data }) => ({\n url: `/${kebabEntityName}/${id}`,\n method: 'PATCH',\n body: data,\n }),\n invalidatesTags: (_result, _error, { id }) => [{ type: entityName, id }],\n }),\n publishSolidEntity: builder.mutation({\n query: (id) => ({\n url: `/${kebabEntityName}/${id}/publish`,\n method: 'POST'\n }),\n invalidatesTags: (_result, _error, id) => [\n { type: entityName, id },\n { type: entityName, id: 'LIST' }\n ]\n }),\n unpublishSolidEntity: builder.mutation({\n query: (id) => ({\n url: `/${kebabEntityName}/${id}/unpublish`,\n method: 'POST'\n }),\n invalidatesTags: (_result, _error, id) => [\n { type: entityName, id },\n { type: entityName, id: 'LIST' }\n ]\n }),\n\n }),\n });\n};\n\n// export const {\n// useCreateSolidEntityMutation,\n// useDeleteMultipleSolidEntitiesMutation,\n// useDeleteSolidEntityMutation,\n// useGetSolidEntitiesQuery,\n// useGetSolidEntityByIdQuery,\n// useLazyGetSolidEntitiesQuery,\n// useLazyGetSolidEntityByIdQuery,\n// usePrefetch,\n// useUpdateSolidEntityMutation\n// } = solidEntityApi;\n"]}
@@ -145,6 +145,14 @@ const createSolidEntityApiInternal = (entityName: string) => {
145
145
  { type: entityName, id: 'LIST' },
146
146
  ],
147
147
  }),
148
+ patchUpdateSolidEntityWithoutListInvalidation: builder.mutation({
149
+ query: ({ id, data }) => ({
150
+ url: `/${kebabEntityName}/${id}`,
151
+ method: 'PATCH',
152
+ body: data,
153
+ }),
154
+ invalidatesTags: (_result, _error, { id }) => [{ type: entityName, id }],
155
+ }),
148
156
  publishSolidEntity: builder.mutation({
149
157
  query: (id) => ({
150
158
  url: `/${kebabEntityName}/${id}/publish`,
@@ -1,20 +1,20 @@
1
1
  export declare const solidMenusApi: import("@reduxjs/toolkit/query/react").Api<import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, {
2
- getSolidMenus: import("@reduxjs/toolkit/query/react").QueryDefinition<any, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, never, {
2
+ getSolidMenus: import("@reduxjs/toolkit/query/react").QueryDefinition<any, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, "SolidMenu", {
3
3
  records: any;
4
4
  meta: any;
5
5
  }, "solidMenuApi">;
6
- getSolidMenuById: import("@reduxjs/toolkit/query/react").QueryDefinition<any, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, never, any, "solidMenuApi">;
7
- getSolidMenuBasedOnRole: import("@reduxjs/toolkit/query/react").QueryDefinition<any, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, never, any, "solidMenuApi">;
8
- createSolidMenu: import("@reduxjs/toolkit/query/react").MutationDefinition<any, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, never, any, "solidMenuApi">;
9
- updateSolidMenu: import("@reduxjs/toolkit/query/react").MutationDefinition<any, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, never, any, "solidMenuApi">;
10
- deleteMultipleSolidMenus: import("@reduxjs/toolkit/query/react").MutationDefinition<any, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, never, any, "solidMenuApi">;
11
- deleteSolidMenu: import("@reduxjs/toolkit/query/react").MutationDefinition<any, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, never, any, "solidMenuApi">;
12
- }, "solidMenuApi", never, typeof import("@reduxjs/toolkit/query/react").coreModuleName | typeof import("@reduxjs/toolkit/query/react").reactHooksModuleName>;
13
- export declare const useGetSolidMenusQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query/react").QueryDefinition<any, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, never, {
6
+ getSolidMenuById: import("@reduxjs/toolkit/query/react").QueryDefinition<any, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, "SolidMenu", any, "solidMenuApi">;
7
+ getSolidMenuBasedOnRole: import("@reduxjs/toolkit/query/react").QueryDefinition<any, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, "SolidMenu", any, "solidMenuApi">;
8
+ createSolidMenu: import("@reduxjs/toolkit/query/react").MutationDefinition<any, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, "SolidMenu", any, "solidMenuApi">;
9
+ updateSolidMenu: import("@reduxjs/toolkit/query/react").MutationDefinition<any, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, "SolidMenu", any, "solidMenuApi">;
10
+ deleteMultipleSolidMenus: import("@reduxjs/toolkit/query/react").MutationDefinition<any, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, "SolidMenu", any, "solidMenuApi">;
11
+ deleteSolidMenu: import("@reduxjs/toolkit/query/react").MutationDefinition<any, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, "SolidMenu", any, "solidMenuApi">;
12
+ }, "solidMenuApi", "SolidMenu", typeof import("@reduxjs/toolkit/query/react").coreModuleName | typeof import("@reduxjs/toolkit/query/react").reactHooksModuleName>;
13
+ export declare const useGetSolidMenusQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query/react").QueryDefinition<any, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, "SolidMenu", {
14
14
  records: any;
15
15
  meta: any;
16
- }, "solidMenuApi">>, useLazyGetSolidMenusQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseLazyQuery<import("@reduxjs/toolkit/query/react").QueryDefinition<any, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, never, {
16
+ }, "solidMenuApi">>, useLazyGetSolidMenusQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseLazyQuery<import("@reduxjs/toolkit/query/react").QueryDefinition<any, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, "SolidMenu", {
17
17
  records: any;
18
18
  meta: any;
19
- }, "solidMenuApi">>, useLazyGetSolidMenuByIdQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseLazyQuery<import("@reduxjs/toolkit/query/react").QueryDefinition<any, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, never, any, "solidMenuApi">>, useGetSolidMenuBasedOnRoleQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query/react").QueryDefinition<any, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, never, any, "solidMenuApi">>, useLazyGetSolidMenuBasedOnRoleQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseLazyQuery<import("@reduxjs/toolkit/query/react").QueryDefinition<any, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, never, any, "solidMenuApi">>, useGetSolidMenuByIdQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query/react").QueryDefinition<any, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, never, any, "solidMenuApi">>, useCreateSolidMenuMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query/react").MutationDefinition<any, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, never, any, "solidMenuApi">>, useUpdateSolidMenuMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query/react").MutationDefinition<any, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, never, any, "solidMenuApi">>, useDeleteSolidMenuMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query/react").MutationDefinition<any, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, never, any, "solidMenuApi">>, useDeleteMultipleSolidMenusMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query/react").MutationDefinition<any, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, never, any, "solidMenuApi">>;
19
+ }, "solidMenuApi">>, useLazyGetSolidMenuByIdQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseLazyQuery<import("@reduxjs/toolkit/query/react").QueryDefinition<any, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, "SolidMenu", any, "solidMenuApi">>, useGetSolidMenuBasedOnRoleQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query/react").QueryDefinition<any, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, "SolidMenu", any, "solidMenuApi">>, useLazyGetSolidMenuBasedOnRoleQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseLazyQuery<import("@reduxjs/toolkit/query/react").QueryDefinition<any, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, "SolidMenu", any, "solidMenuApi">>, useGetSolidMenuByIdQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query/react").QueryDefinition<any, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, "SolidMenu", any, "solidMenuApi">>, useCreateSolidMenuMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query/react").MutationDefinition<any, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, "SolidMenu", any, "solidMenuApi">>, useUpdateSolidMenuMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query/react").MutationDefinition<any, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, "SolidMenu", any, "solidMenuApi">>, useDeleteSolidMenuMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query/react").MutationDefinition<any, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, "SolidMenu", any, "solidMenuApi">>, useDeleteMultipleSolidMenusMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query/react").MutationDefinition<any, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, "SolidMenu", any, "solidMenuApi">>;
20
20
  //# sourceMappingURL=solidMenuApi.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"solidMenuApi.d.ts","sourceRoot":"","sources":["../../../src/redux/api/solidMenuApi.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,aAAa;;;;;;;;;;;4JAoDxB,CAAC;AAEH,eAAO,MACH,qBAAqB;;;qBACrB,yBAAyB;;;qBACzB,4BAA4B,mZAC5B,+BAA+B,+YAC/B,mCAAmC,mZACnC,wBAAwB,+YACxB,0BAA0B,qZAC1B,0BAA0B,qZAC1B,0BAA0B,qZAC1B,mCAAmC,mZACtB,CAAC"}
1
+ {"version":3,"file":"solidMenuApi.d.ts","sourceRoot":"","sources":["../../../src/redux/api/solidMenuApi.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,aAAa;;;;;;;;;;;kKAsDxB,CAAC;AAEH,eAAO,MACH,qBAAqB;;;qBACrB,yBAAyB;;;qBACzB,4BAA4B,yZAC5B,+BAA+B,qZAC/B,mCAAmC,yZACnC,wBAAwB,qZACxB,0BAA0B,2ZAC1B,0BAA0B,2ZAC1B,0BAA0B,2ZAC1B,mCAAmC,yZACtB,CAAC"}
@@ -4,6 +4,7 @@ var resourceName = 'menu-item-metadata';
4
4
  export var solidMenusApi = createApi({
5
5
  reducerPath: 'solidMenuApi',
6
6
  baseQuery: baseQueryWithAuth,
7
+ tagTypes: ['SolidMenu'],
7
8
  endpoints: function (builder) { return ({
8
9
  getSolidMenus: builder.query({
9
10
  query: function (qs) {
@@ -24,6 +25,7 @@ export var solidMenusApi = createApi({
24
25
  }),
25
26
  getSolidMenuBasedOnRole: builder.query({
26
27
  query: function () { return "/".concat(resourceName, "/me"); },
28
+ providesTags: ['SolidMenu'],
27
29
  }),
28
30
  createSolidMenu: builder.mutation({
29
31
  query: function (solidMenu) { return ({