@solidxai/core-ui 0.1.22-beta.1 → 0.1.22-beta.3
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/dist/components/core/chatter/SolidChatterCustomMessage.d.ts.map +1 -1
- package/dist/components/core/chatter/SolidChatterCustomMessage.js +17 -5
- package/dist/components/core/chatter/SolidChatterCustomMessage.js.map +1 -1
- package/dist/components/core/chatter/SolidChatterCustomMessage.tsx +23 -6
- package/dist/components/core/kanban/SolidKanbanView.d.ts.map +1 -1
- package/dist/components/core/kanban/SolidKanbanView.js +27 -24
- package/dist/components/core/kanban/SolidKanbanView.js.map +1 -1
- package/dist/components/core/kanban/SolidKanbanView.tsx +14 -7
- package/dist/components/core/module/ModulePackageDialog.d.ts.map +1 -1
- package/dist/components/core/module/ModulePackageDialog.js +28 -22
- package/dist/components/core/module/ModulePackageDialog.js.map +1 -1
- package/dist/components/core/module/ModulePackageDialog.tsx +24 -2
- package/dist/resources/globals.css +10 -1
- package/dist/routes/pages/admin/core/AgentRegistryEditorPage.css +5 -0
- package/dist/routes/pages/admin/core/AgentRegistryEditorPage.d.ts.map +1 -1
- package/dist/routes/pages/admin/core/AgentRegistryEditorPage.js +67 -57
- package/dist/routes/pages/admin/core/AgentRegistryEditorPage.js.map +1 -1
- package/dist/routes/pages/admin/core/AgentRegistryEditorPage.tsx +14 -5
- package/dist/routes/pages/admin/core/AgentSkillRegistryEditorPage.css +29 -0
- package/dist/routes/pages/admin/core/AgentSkillRegistryEditorPage.d.ts.map +1 -1
- package/dist/routes/pages/admin/core/AgentSkillRegistryEditorPage.js +10 -8
- package/dist/routes/pages/admin/core/AgentSkillRegistryEditorPage.js.map +1 -1
- package/dist/routes/pages/admin/core/AgentSkillRegistryEditorPage.tsx +10 -5
- package/dist/routes/pages/admin/core/AgentToolRegistryEditorPage.d.ts.map +1 -1
- package/dist/routes/pages/admin/core/AgentToolRegistryEditorPage.js +38 -25
- package/dist/routes/pages/admin/core/AgentToolRegistryEditorPage.js.map +1 -1
- package/dist/routes/pages/admin/core/AgentToolRegistryEditorPage.tsx +8 -3
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SolidChatterCustomMessage.d.ts","sourceRoot":"","sources":["../../../../src/components/core/chatter/SolidChatterCustomMessage.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"SolidChatterCustomMessage.d.ts","sourceRoot":"","sources":["../../../../src/components/core/chatter/SolidChatterCustomMessage.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,UAAU,8BAA8B;IACpC,OAAO,EAAE,MAAM,CAAC;CACnB;AA8BD,eAAO,MAAM,yBAAyB,EAAE,KAAK,CAAC,EAAE,CAAC,8BAA8B,CAqB9E,CAAC"}
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import DOMPurify from 'dompurify';
|
|
2
3
|
import MarkdownViewer from '../../../components/common/MarkdownViewer';
|
|
3
4
|
import styles from './chatter.module.css';
|
|
5
|
+
// react-markdown (no rehype-raw wired in) strips/escapes embedded raw HTML rather than
|
|
6
|
+
// rendering it, so a body that's actual HTML (e.g. an imported Odoo audit-log <table>) must be
|
|
7
|
+
// rendered separately from Markdown, via the same sanitize-then-dangerouslySetInnerHTML pattern
|
|
8
|
+
// SolidRichTextField already uses for rich-text bodies - not routed through MarkdownViewer.
|
|
9
|
+
var isHtml = function (text) {
|
|
10
|
+
if (!text || typeof text !== 'string')
|
|
11
|
+
return false;
|
|
12
|
+
return /<\/?[a-z][\s\S]*?>/i.test(text);
|
|
13
|
+
};
|
|
4
14
|
var isMarkupLanguage = function (text) {
|
|
5
15
|
if (!text || typeof text !== 'string')
|
|
6
16
|
return false;
|
|
@@ -16,14 +26,16 @@ var isMarkupLanguage = function (text) {
|
|
|
16
26
|
/^\s*\|.*\|/m,
|
|
17
27
|
/^\s*>\s+/m,
|
|
18
28
|
];
|
|
19
|
-
|
|
20
|
-
var htmlPattern = /<\/?[a-z][\s\S]*?>/i;
|
|
21
|
-
return markdownPatterns.some(function (pattern) { return pattern.test(text); }) || htmlPattern.test(text);
|
|
29
|
+
return markdownPatterns.some(function (pattern) { return pattern.test(text); });
|
|
22
30
|
};
|
|
23
31
|
export var SolidChatterCustomMessage = function (_a) {
|
|
24
32
|
var message = _a.message;
|
|
25
|
-
|
|
26
|
-
|
|
33
|
+
if (isHtml(message)) {
|
|
34
|
+
return (_jsx("div", { className: "custom-message-wrapper",
|
|
35
|
+
// Imported email bodies carry fixed-width tables; scroll inside the bubble instead of widening the panel.
|
|
36
|
+
style: { maxWidth: '100%', overflowX: 'auto' }, dangerouslySetInnerHTML: { __html: DOMPurify.sanitize(message) } }));
|
|
37
|
+
}
|
|
38
|
+
if (isMarkupLanguage(message)) {
|
|
27
39
|
return (_jsx("div", { className: "custom-message-wrapper", children: _jsx(MarkdownViewer, { data: message }) }));
|
|
28
40
|
}
|
|
29
41
|
return _jsx("p", { className: styles.solidMessageText, children: message });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SolidChatterCustomMessage.js","sourceRoot":"","sources":["../../../../src/components/core/chatter/SolidChatterCustomMessage.tsx"],"names":[],"mappings":";AAEA,OAAO,cAAc,MAAM,2CAA2C,CAAA;AACtE,OAAO,MAAM,MAAM,sBAAsB,CAAA;AAMzC,IAAM,gBAAgB,GAAG,UAAC,IAAY;IAClC,IAAI,CAAC,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAEpD,IAAM,gBAAgB,GAAG;QACrB,aAAa;QACb,aAAa;QACb,SAAS;QACT,OAAO;QACP,gBAAgB;QAChB,eAAe;QACf,eAAe;QACf,gBAAgB;QAChB,aAAa;QACb,WAAW;KACd,CAAC;IAEF,
|
|
1
|
+
{"version":3,"file":"SolidChatterCustomM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O,CAAC,EAAE;QAC3B,OAAO,CACH,cAAK,SAAS,EAAC,wBAAwB,YACnC,KAAC,cAAc,IAAC,IAAI,EAAE,OAAO,GAAI,GAC/B,CACT,CAAC;KACL;IAED,OAAO,YAAG,SAAS,EAAE,MAAM,CAAC,gBAAgB,YAAG,OAAO,GAAK,CAAC;AAChE,CAAC,CAAC","sourcesContent":["\nimport React from 'react'\nimport DOMPurify from 'dompurify'\nimport MarkdownViewer from '../../../components/common/MarkdownViewer'\nimport styles from './chatter.module.css'\n\ninterface SolidChatterCustomMessageProps {\n message: string;\n}\n\n// react-markdown (no rehype-raw wired in) strips/escapes embedded raw HTML rather than\n// rendering it, so a body that's actual HTML (e.g. an imported Odoo audit-log <table>) must be\n// rendered separately from Markdown, via the same sanitize-then-dangerouslySetInnerHTML pattern\n// SolidRichTextField already uses for rich-text bodies - not routed through MarkdownViewer.\nconst isHtml = (text: string): boolean => {\n if (!text || typeof text !== 'string') return false;\n return /<\\/?[a-z][\\s\\S]*?>/i.test(text);\n};\n\nconst isMarkupLanguage = (text: string): boolean => {\n if (!text || typeof text !== 'string') return false;\n\n const markdownPatterns = [\n /^#{1,6}\\s+/m,\n /\\*\\*.*?\\*\\*/,\n /\\*.*?\\*/,\n /`.*?`/,\n /```[\\s\\S]*?```/,\n /^\\s*[-*+]\\s+/m,\n /^\\s*\\d+\\.\\s+/m,\n /\\[.*?\\]\\(.*?\\)/,\n /^\\s*\\|.*\\|/m,\n /^\\s*>\\s+/m,\n ];\n\n return markdownPatterns.some(pattern => pattern.test(text));\n};\n\nexport const SolidChatterCustomMessage: React.FC<SolidChatterCustomMessageProps> = ({ message }) => {\n if (isHtml(message)) {\n return (\n <div\n className=\"custom-message-wrapper\"\n // Imported email bodies carry fixed-width tables; scroll inside the bubble instead of widening the panel.\n style={{ maxWidth: '100%', overflowX: 'auto' }}\n dangerouslySetInnerHTML={{ __html: DOMPurify.sanitize(message) }}\n />\n );\n }\n\n if (isMarkupLanguage(message)) {\n return (\n <div className=\"custom-message-wrapper\">\n <MarkdownViewer data={message} />\n </div>\n );\n }\n\n return <p className={styles.solidMessageText}>{message}</p>;\n};\n"]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import React from 'react'
|
|
3
|
+
import DOMPurify from 'dompurify'
|
|
3
4
|
import MarkdownViewer from '../../../components/common/MarkdownViewer'
|
|
4
5
|
import styles from './chatter.module.css'
|
|
5
6
|
|
|
@@ -7,6 +8,15 @@ interface SolidChatterCustomMessageProps {
|
|
|
7
8
|
message: string;
|
|
8
9
|
}
|
|
9
10
|
|
|
11
|
+
// react-markdown (no rehype-raw wired in) strips/escapes embedded raw HTML rather than
|
|
12
|
+
// rendering it, so a body that's actual HTML (e.g. an imported Odoo audit-log <table>) must be
|
|
13
|
+
// rendered separately from Markdown, via the same sanitize-then-dangerouslySetInnerHTML pattern
|
|
14
|
+
// SolidRichTextField already uses for rich-text bodies - not routed through MarkdownViewer.
|
|
15
|
+
const isHtml = (text: string): boolean => {
|
|
16
|
+
if (!text || typeof text !== 'string') return false;
|
|
17
|
+
return /<\/?[a-z][\s\S]*?>/i.test(text);
|
|
18
|
+
};
|
|
19
|
+
|
|
10
20
|
const isMarkupLanguage = (text: string): boolean => {
|
|
11
21
|
if (!text || typeof text !== 'string') return false;
|
|
12
22
|
|
|
@@ -23,15 +33,22 @@ const isMarkupLanguage = (text: string): boolean => {
|
|
|
23
33
|
/^\s*>\s+/m,
|
|
24
34
|
];
|
|
25
35
|
|
|
26
|
-
|
|
27
|
-
const htmlPattern = /<\/?[a-z][\s\S]*?>/i;
|
|
28
|
-
|
|
29
|
-
return markdownPatterns.some(pattern => pattern.test(text)) || htmlPattern.test(text);
|
|
36
|
+
return markdownPatterns.some(pattern => pattern.test(text));
|
|
30
37
|
};
|
|
31
38
|
|
|
32
39
|
export const SolidChatterCustomMessage: React.FC<SolidChatterCustomMessageProps> = ({ message }) => {
|
|
33
|
-
|
|
34
|
-
|
|
40
|
+
if (isHtml(message)) {
|
|
41
|
+
return (
|
|
42
|
+
<div
|
|
43
|
+
className="custom-message-wrapper"
|
|
44
|
+
// Imported email bodies carry fixed-width tables; scroll inside the bubble instead of widening the panel.
|
|
45
|
+
style={{ maxWidth: '100%', overflowX: 'auto' }}
|
|
46
|
+
dangerouslySetInnerHTML={{ __html: DOMPurify.sanitize(message) }}
|
|
47
|
+
/>
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (isMarkupLanguage(message)) {
|
|
35
52
|
return (
|
|
36
53
|
<div className="custom-message-wrapper">
|
|
37
54
|
<MarkdownViewer data={message} />
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SolidKanbanView.d.ts","sourceRoot":"","sources":["../../../../src/components/core/kanban/SolidKanbanView.tsx"],"names":[],"mappings":";AAmDA,KAAK,qBAAqB,GAAG;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,GAAG,CAAC;CACpB,CAAC;AAEF,KAAK,sBAAsB,GAAG;IAC5B,uBAAuB,CAAC,EAAE,GAAG,CAAC;IAC9B,gBAAgB,CAAC,EAAE,GAAG,CAAC;IACvB,sBAAsB,CAAC,EAAE,GAAG,CAAC;IAC7B,kBAAkB,CAAC,EAAE,GAAG,EAAE,CAAC;IAC3B,2BAA2B,CAAC,EAAE,GAAG,CAAC;IAClC,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,WAAW,EAAE,CAAC,MAAM,EAAE,sBAAsB,KAAK,IAAI,CAAC;IACtD,eAAe,EAAE,MAAM,GAAG,EAAE,CAAC;IAC7B,gBAAgB,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,CAAC,EAA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AS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,OAAO,CAAC;IAC7E,eAAe,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1C,QAAQ,EAAE,MAAM;QACd,gBAAgB,EAAE,MAAM,CAAC;QACzB,YAAY,EAAE,OAAO,CAAC;QACtB,OAAO,EAAE,GAAG,CAAC;QACb,gBAAgB,EAAE,GAAG,CAAC;QACtB,UAAU,EAAE,GAAG,EAAE,CAAC;QAClB,eAAe,EAAE,GAAG,EAAE,CAAC;QACvB,OAAO,EAAE,OAAO,CAAC;KAClB,CAAC;CACH,CAAC;AAsEF,eAAO,MAAM,eAAe,yHAkwC1B,CAAC"}
|
|
@@ -375,10 +375,11 @@ export var SolidKanbanView = forwardRef(function (params, ref) {
|
|
|
375
375
|
// Get the kanban view data.
|
|
376
376
|
// const [triggerGetSolidEntitiesForKanban, { data: solidEntityKanbanViewData, isLoading, error }] = useLazyGetSolidKanbanEntitiesQuery();
|
|
377
377
|
var triggerGetSolidEntities = useLazyGetSolidEntitiesQuery()[0];
|
|
378
|
-
var _40 =
|
|
378
|
+
var _40 = useLazyGetSolidEntitiesQuery(), triggerLoadKanbanBoard = _40[0], _41 = _40[1], solidEntityKanbanViewData = _41.data, isKanbanFetching = _41.isFetching;
|
|
379
|
+
var _42 = useRecoverSolidEntityByIdMutation(), triggerRecoverSolidEntityById = _42[0], isRecoveringRecord = _42[1].isLoading;
|
|
379
380
|
// Delete mutation
|
|
380
|
-
var
|
|
381
|
-
var
|
|
381
|
+
var _43 = useDeleteMultipleSolidEntitiesMutation(), deleteManySolidEntities = _43[0], _44 = _43[1], isDeleteSolidEntitiesLoading = _44.isLoading, isDeleteSolidEntitiesSucess = _44.isSuccess;
|
|
382
|
+
var _45 = usePatchUpdateSolidEntityWithoutListInvalidationMutation(), patchKanbanView = _45[0], isPatchKanbanViewLoading = _45[1].isLoading;
|
|
382
383
|
var applyArchivedQueryState = function (queryData) {
|
|
383
384
|
if (showArchived) {
|
|
384
385
|
queryData.showSoftDeleted = "inclusive";
|
|
@@ -601,17 +602,17 @@ export var SolidKanbanView = forwardRef(function (params, ref) {
|
|
|
601
602
|
var loadKanbanBoard = function (nextFilters) {
|
|
602
603
|
if (nextFilters === void 0) { nextFilters = filters; }
|
|
603
604
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
604
|
-
var swimlanesCount, resolvedSwimlanesCount, queryData,
|
|
605
|
-
var _a, _b, _c, _d, _e
|
|
606
|
-
return __generator(this, function (
|
|
607
|
-
switch (
|
|
605
|
+
var swimlanesCount, resolvedSwimlanesCount, queryData, error_2;
|
|
606
|
+
var _a, _b, _c, _d, _e;
|
|
607
|
+
return __generator(this, function (_f) {
|
|
608
|
+
switch (_f.label) {
|
|
608
609
|
case 0:
|
|
609
610
|
if (!solidKanbanViewMetaData || !groupByFieldName || !queryDataLoaded)
|
|
610
611
|
return [2 /*return*/];
|
|
611
612
|
setLoading(true);
|
|
612
|
-
|
|
613
|
+
_f.label = 1;
|
|
613
614
|
case 1:
|
|
614
|
-
|
|
615
|
+
_f.trys.push([1, 3, 4, 5]);
|
|
615
616
|
swimlanesCount = ((_d = (_c = (_b = (_a = solidKanbanViewMetaData === null || solidKanbanViewMetaData === void 0 ? void 0 : solidKanbanViewMetaData.data) === null || _a === void 0 ? void 0 : _a.solidView) === null || _b === void 0 ? void 0 : _b.layout) === null || _c === void 0 ? void 0 : _c.attrs) === null || _d === void 0 ? void 0 : _d.swimlanesCount) || 5;
|
|
616
617
|
resolvedSwimlanesCount = swimlaneDefinitions.length > 0 ? swimlaneDefinitions.length : swimlanesCount;
|
|
617
618
|
queryData = applyArchivedQueryState({
|
|
@@ -630,21 +631,18 @@ export var SolidKanbanView = forwardRef(function (params, ref) {
|
|
|
630
631
|
populateMedia: toPopulateMedia,
|
|
631
632
|
},
|
|
632
633
|
});
|
|
633
|
-
return [4 /*yield*/,
|
|
634
|
+
return [4 /*yield*/, triggerLoadKanbanBoard(qs.stringify(queryData, {
|
|
634
635
|
encodeValuesOnly: true
|
|
635
636
|
})).unwrap()];
|
|
636
637
|
case 2:
|
|
637
|
-
|
|
638
|
-
setServerSwimLaneCount(((_e = response === null || response === void 0 ? void 0 : response.meta) === null || _e === void 0 ? void 0 : _e.totalRecords) || 0);
|
|
639
|
-
setRawKanbanGroupRecords((response === null || response === void 0 ? void 0 : response.groupRecords) || []);
|
|
640
|
-
setSelectedRecords([]);
|
|
638
|
+
_f.sent();
|
|
641
639
|
return [3 /*break*/, 5];
|
|
642
640
|
case 3:
|
|
643
|
-
error_2 =
|
|
641
|
+
error_2 = _f.sent();
|
|
644
642
|
dispatch(showToast({
|
|
645
643
|
severity: "error",
|
|
646
644
|
summary: "Failed to load board",
|
|
647
|
-
detail: ((
|
|
645
|
+
detail: ((_e = error_2 === null || error_2 === void 0 ? void 0 : error_2.data) === null || _e === void 0 ? void 0 : _e.message) || (error_2 === null || error_2 === void 0 ? void 0 : error_2.message) || "Unable to load kanban data.",
|
|
648
646
|
life: 4000,
|
|
649
647
|
}));
|
|
650
648
|
setServerSwimLaneCount(0);
|
|
@@ -658,6 +656,14 @@ export var SolidKanbanView = forwardRef(function (params, ref) {
|
|
|
658
656
|
});
|
|
659
657
|
});
|
|
660
658
|
};
|
|
659
|
+
useEffect(function () {
|
|
660
|
+
var _a;
|
|
661
|
+
if (!solidEntityKanbanViewData)
|
|
662
|
+
return;
|
|
663
|
+
setServerSwimLaneCount(((_a = solidEntityKanbanViewData === null || solidEntityKanbanViewData === void 0 ? void 0 : solidEntityKanbanViewData.meta) === null || _a === void 0 ? void 0 : _a.totalRecords) || 0);
|
|
664
|
+
setRawKanbanGroupRecords((solidEntityKanbanViewData === null || solidEntityKanbanViewData === void 0 ? void 0 : solidEntityKanbanViewData.groupRecords) || []);
|
|
665
|
+
setSelectedRecords([]);
|
|
666
|
+
}, [solidEntityKanbanViewData]);
|
|
661
667
|
useEffect(function () {
|
|
662
668
|
if (!queryDataLoaded || !solidKanbanViewMetaData || !groupByFieldName)
|
|
663
669
|
return;
|
|
@@ -760,7 +766,7 @@ export var SolidKanbanView = forwardRef(function (params, ref) {
|
|
|
760
766
|
return [2 /*return*/];
|
|
761
767
|
_c.label = 1;
|
|
762
768
|
case 1:
|
|
763
|
-
_c.trys.push([1,
|
|
769
|
+
_c.trys.push([1, 3, , 4]);
|
|
764
770
|
return [4 /*yield*/, triggerRecoverSolidEntityById(record.id).unwrap()];
|
|
765
771
|
case 2:
|
|
766
772
|
response = _c.sent();
|
|
@@ -770,11 +776,8 @@ export var SolidKanbanView = forwardRef(function (params, ref) {
|
|
|
770
776
|
detail: ((_a = response === null || response === void 0 ? void 0 : response.data) === null || _a === void 0 ? void 0 : _a.message) || "Record recovered successfully.",
|
|
771
777
|
life: 3000,
|
|
772
778
|
}));
|
|
773
|
-
return [
|
|
779
|
+
return [3 /*break*/, 4];
|
|
774
780
|
case 3:
|
|
775
|
-
_c.sent();
|
|
776
|
-
return [3 /*break*/, 5];
|
|
777
|
-
case 4:
|
|
778
781
|
error_4 = _c.sent();
|
|
779
782
|
dispatch(showToast({
|
|
780
783
|
severity: "error",
|
|
@@ -782,8 +785,8 @@ export var SolidKanbanView = forwardRef(function (params, ref) {
|
|
|
782
785
|
detail: ((_b = error_4 === null || error_4 === void 0 ? void 0 : error_4.data) === null || _b === void 0 ? void 0 : _b.message) || (error_4 === null || error_4 === void 0 ? void 0 : error_4.message) || "Unable to recover the selected record.",
|
|
783
786
|
life: 4000,
|
|
784
787
|
}));
|
|
785
|
-
return [3 /*break*/,
|
|
786
|
-
case
|
|
788
|
+
return [3 /*break*/, 4];
|
|
789
|
+
case 4: return [2 /*return*/];
|
|
787
790
|
}
|
|
788
791
|
});
|
|
789
792
|
}); };
|
|
@@ -1134,7 +1137,7 @@ export var SolidKanbanView = forwardRef(function (params, ref) {
|
|
|
1134
1137
|
}, [solidKanbanViewMetaData]);
|
|
1135
1138
|
var kanbanViewTitle = (_q = (_p = solidKanbanViewMetaData === null || solidKanbanViewMetaData === void 0 ? void 0 : solidKanbanViewMetaData.data) === null || _p === void 0 ? void 0 : _p.solidView) === null || _q === void 0 ? void 0 : _q.displayName;
|
|
1136
1139
|
var entityDisplayName = ((_t = (_s = (_r = solidKanbanViewMetaData === null || solidKanbanViewMetaData === void 0 ? void 0 : solidKanbanViewMetaData.data) === null || _r === void 0 ? void 0 : _r.solidView) === null || _s === void 0 ? void 0 : _s.model) === null || _t === void 0 ? void 0 : _t.displayName) || params.modelName;
|
|
1137
|
-
var headerRequestStatusLabel = isDeleteSolidEntitiesLoading ? "Deleting..." : isPatchKanbanViewLoading ? "Updating..." : isRecoveringRecord ? "Recovering..." : loading || !queryDataLoaded ? "Loading..." : null;
|
|
1140
|
+
var headerRequestStatusLabel = isDeleteSolidEntitiesLoading ? "Deleting..." : isPatchKanbanViewLoading ? "Updating..." : isRecoveringRecord ? "Recovering..." : loading || isKanbanFetching || !queryDataLoaded ? "Loading..." : null;
|
|
1138
1141
|
var handleRefreshView = function () {
|
|
1139
1142
|
var _a, _b;
|
|
1140
1143
|
if (hasAnyActiveFilters) {
|