@solidxai/core-ui 0.1.20-beta.1 → 0.1.21-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.
- package/dist/components/common/FileReaderExt.d.ts.map +1 -1
- package/dist/components/common/FileReaderExt.js +22 -11
- package/dist/components/common/FileReaderExt.js.map +1 -1
- package/dist/components/common/FileReaderExt.tsx +27 -14
- package/dist/components/common/SocialMediaLogin.d.ts.map +1 -1
- package/dist/components/common/SocialMediaLogin.js +1 -1
- package/dist/components/common/SocialMediaLogin.js.map +1 -1
- package/dist/components/common/SocialMediaLogin.tsx +50 -19
- package/dist/components/common/solid-export.css +75 -0
- package/dist/components/core/common/SolidGenericImport/SolidImport.module.css +71 -0
- package/dist/components/core/form/SolidFormView.d.ts.map +1 -1
- package/dist/components/core/form/SolidFormView.js +14 -0
- package/dist/components/core/form/SolidFormView.js.map +1 -1
- package/dist/components/core/form/SolidFormView.tsx +13 -0
- package/dist/components/core/form/fields/SolidMediaMultipleField.js +3 -3
- package/dist/components/core/form/fields/SolidMediaMultipleField.js.map +1 -1
- package/dist/components/core/form/fields/SolidMediaMultipleField.tsx +3 -3
- package/dist/components/core/form/fields/SolidMediaSingleField.js +2 -2
- package/dist/components/core/form/fields/SolidMediaSingleField.js.map +1 -1
- package/dist/components/core/form/fields/SolidMediaSingleField.tsx +2 -2
- package/dist/components/core/list/columns/SolidMediaMultipleColumn.js +2 -2
- package/dist/components/core/list/columns/SolidMediaMultipleColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidMediaMultipleColumn.tsx +4 -4
- package/dist/components/core/list/columns/SolidMediaSingleColumn.js +1 -1
- package/dist/components/core/list/columns/SolidMediaSingleColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidMediaSingleColumn.tsx +3 -3
- package/dist/components/core/solid-agent/SolidAgentChat.d.ts +3 -1
- package/dist/components/core/solid-agent/SolidAgentChat.d.ts.map +1 -1
- package/dist/components/core/solid-agent/SolidAgentChat.js +150 -22
- package/dist/components/core/solid-agent/SolidAgentChat.js.map +1 -1
- package/dist/components/core/solid-agent/SolidAgentChat.tsx +76 -15
- package/dist/components/core/solid-agent/SolidAgentEmbedded.d.ts +2 -0
- package/dist/components/core/solid-agent/SolidAgentEmbedded.d.ts.map +1 -1
- package/dist/components/core/solid-agent/SolidAgentEmbedded.js +4 -4
- package/dist/components/core/solid-agent/SolidAgentEmbedded.js.map +1 -1
- package/dist/components/core/solid-agent/SolidAgentEmbedded.tsx +7 -1
- package/dist/components/core/solid-agent/SolidAgentHost.d.ts.map +1 -1
- package/dist/components/core/solid-agent/SolidAgentHost.js +79 -1
- package/dist/components/core/solid-agent/SolidAgentHost.js.map +1 -1
- package/dist/components/core/solid-agent/SolidAgentHost.tsx +69 -2
- package/dist/components/core/solid-agent/agentEvents.d.ts.map +1 -1
- package/dist/components/core/solid-agent/agentEvents.js +1 -3
- package/dist/components/core/solid-agent/agentEvents.js.map +1 -1
- package/dist/components/core/solid-agent/agentEvents.ts +5 -3
- package/dist/components/core/solid-agent/client/agentPublicEvents.d.ts +88 -0
- package/dist/components/core/solid-agent/client/agentPublicEvents.d.ts.map +1 -0
- package/dist/components/core/solid-agent/client/agentPublicEvents.js +26 -0
- package/dist/components/core/solid-agent/client/agentPublicEvents.js.map +1 -0
- package/dist/components/core/solid-agent/client/agentPublicEvents.ts +66 -0
- package/dist/components/core/solid-agent/client/agentRuntime.d.ts +18 -3
- package/dist/components/core/solid-agent/client/agentRuntime.d.ts.map +1 -1
- package/dist/components/core/solid-agent/client/agentRuntime.js +173 -31
- package/dist/components/core/solid-agent/client/agentRuntime.js.map +1 -1
- package/dist/components/core/solid-agent/client/agentRuntime.ts +126 -16
- package/dist/components/core/solid-agent/client/agentSocket.d.ts +3 -0
- package/dist/components/core/solid-agent/client/agentSocket.d.ts.map +1 -1
- package/dist/components/core/solid-agent/client/agentSocket.js +19 -1
- package/dist/components/core/solid-agent/client/agentSocket.js.map +1 -1
- package/dist/components/core/solid-agent/client/agentSocket.ts +11 -1
- package/dist/components/core/solid-agent/client/beforeUserMessageSend.d.ts +9 -0
- package/dist/components/core/solid-agent/client/beforeUserMessageSend.d.ts.map +1 -0
- package/dist/components/core/solid-agent/client/beforeUserMessageSend.js +53 -0
- package/dist/components/core/solid-agent/client/beforeUserMessageSend.js.map +1 -0
- package/dist/components/core/solid-agent/client/beforeUserMessageSend.ts +26 -0
- package/dist/components/core/solid-agent/embed/AgentEmbeddingPanel.d.ts.map +1 -1
- package/dist/components/core/solid-agent/embed/AgentEmbeddingPanel.js +4 -3
- package/dist/components/core/solid-agent/embed/AgentEmbeddingPanel.js.map +1 -1
- package/dist/components/core/solid-agent/embed/AgentEmbeddingPanel.tsx +4 -2
- package/dist/components/core/solid-agent/embed/agentEmbedProtocol.d.ts +29 -0
- package/dist/components/core/solid-agent/embed/agentEmbedProtocol.d.ts.map +1 -1
- package/dist/components/core/solid-agent/embed/agentEmbedProtocol.js +45 -2
- package/dist/components/core/solid-agent/embed/agentEmbedProtocol.js.map +1 -1
- package/dist/components/core/solid-agent/embed/agentEmbedProtocol.ts +49 -2
- package/dist/components/core/solid-agent/embed/agentEmbedSamples.d.ts +1 -0
- package/dist/components/core/solid-agent/embed/agentEmbedSamples.d.ts.map +1 -1
- package/dist/components/core/solid-agent/embed/agentEmbedSamples.js +2 -1
- package/dist/components/core/solid-agent/embed/agentEmbedSamples.js.map +1 -1
- package/dist/components/core/solid-agent/embed/agentEmbedSamples.ts +15 -1
- package/dist/components/core/solid-agent/types.d.ts +13 -0
- package/dist/components/core/solid-agent/types.d.ts.map +1 -1
- package/dist/components/core/solid-agent/types.js.map +1 -1
- package/dist/components/core/solid-agent/types.ts +8 -0
- package/dist/components/core/solid-agent/useAgentChat.d.ts +1 -1
- package/dist/components/core/solid-agent/useAgentChat.d.ts.map +1 -1
- package/dist/components/core/solid-agent/useAgentChat.js +7 -4
- package/dist/components/core/solid-agent/useAgentChat.js.map +1 -1
- package/dist/components/core/solid-agent/useAgentChat.ts +9 -5
- package/dist/components/core/solid-agent/widgets/DefaultUserMessageChatWidget.d.ts.map +1 -1
- package/dist/components/core/solid-agent/widgets/DefaultUserMessageChatWidget.js +12 -4
- package/dist/components/core/solid-agent/widgets/DefaultUserMessageChatWidget.js.map +1 -1
- package/dist/components/core/solid-agent/widgets/DefaultUserMessageChatWidget.tsx +18 -0
- package/dist/components/core/solid-agent/widgets/SolidNavigationIntentChatWidget.d.ts +4 -0
- package/dist/components/core/solid-agent/widgets/SolidNavigationIntentChatWidget.d.ts.map +1 -0
- package/dist/components/core/solid-agent/widgets/SolidNavigationIntentChatWidget.js +30 -0
- package/dist/components/core/solid-agent/widgets/SolidNavigationIntentChatWidget.js.map +1 -0
- package/dist/components/core/solid-agent/widgets/SolidNavigationIntentChatWidget.tsx +41 -0
- package/dist/components/core/solid-agent/widgets/solidChatWidgets.module.css +39 -0
- package/dist/components/shad-cn-ui/SolidCodeEditor.d.ts +2 -1
- package/dist/components/shad-cn-ui/SolidCodeEditor.d.ts.map +1 -1
- package/dist/components/shad-cn-ui/SolidCodeEditor.js +3 -2
- package/dist/components/shad-cn-ui/SolidCodeEditor.js.map +1 -1
- package/dist/components/shad-cn-ui/SolidCodeEditor.tsx +3 -0
- package/dist/helpers/adminViewRefresh.d.ts +13 -0
- package/dist/helpers/adminViewRefresh.d.ts.map +1 -0
- package/dist/helpers/adminViewRefresh.js +14 -0
- package/dist/helpers/adminViewRefresh.js.map +1 -0
- package/dist/helpers/adminViewRefresh.ts +26 -0
- package/dist/helpers/eventBus.d.ts +1 -0
- package/dist/helpers/eventBus.d.ts.map +1 -1
- package/dist/helpers/eventBus.js +1 -0
- package/dist/helpers/eventBus.js.map +1 -1
- package/dist/helpers/eventBus.ts +1 -0
- package/dist/helpers/fileTypeIcon.d.ts.map +1 -1
- package/dist/helpers/fileTypeIcon.js +4 -1
- package/dist/helpers/fileTypeIcon.js.map +1 -1
- package/dist/helpers/fileTypeIcon.tsx +15 -0
- package/dist/helpers/registry.d.ts.map +1 -1
- package/dist/helpers/registry.js +2 -0
- package/dist/helpers/registry.js.map +1 -1
- package/dist/helpers/registry.ts +2 -0
- package/dist/helpers/routePaths.d.ts +13 -0
- package/dist/helpers/routePaths.d.ts.map +1 -1
- package/dist/helpers/routePaths.js +39 -0
- package/dist/helpers/routePaths.js.map +1 -1
- package/dist/helpers/routePaths.ts +48 -0
- package/dist/redux/features/agentSlice.d.ts +2 -1
- package/dist/redux/features/agentSlice.d.ts.map +1 -1
- package/dist/redux/features/agentSlice.js +2 -2
- package/dist/redux/features/agentSlice.js.map +1 -1
- package/dist/redux/features/agentSlice.ts +8 -3
- package/dist/resources/solid-custom.css +42 -0
- package/dist/resources/solid-tailwind-generated.css +1 -1
- package/dist/routes/pages/admin/core/AgentHubModuleField.css +15 -0
- package/dist/routes/pages/admin/core/AgentHubModuleField.d.ts +22 -0
- package/dist/routes/pages/admin/core/AgentHubModuleField.d.ts.map +1 -0
- package/dist/routes/pages/admin/core/AgentHubModuleField.js +42 -0
- package/dist/routes/pages/admin/core/AgentHubModuleField.js.map +1 -0
- package/dist/routes/pages/admin/core/AgentHubModuleField.tsx +54 -0
- package/dist/routes/pages/admin/core/AgentHubTagsField.d.ts +3 -1
- package/dist/routes/pages/admin/core/AgentHubTagsField.d.ts.map +1 -1
- package/dist/routes/pages/admin/core/AgentHubTagsField.js +3 -3
- package/dist/routes/pages/admin/core/AgentHubTagsField.js.map +1 -1
- package/dist/routes/pages/admin/core/AgentHubTagsField.tsx +7 -3
- package/dist/routes/pages/admin/core/AgentRegistryEditorPage.d.ts.map +1 -1
- package/dist/routes/pages/admin/core/AgentRegistryEditorPage.js +37 -29
- package/dist/routes/pages/admin/core/AgentRegistryEditorPage.js.map +1 -1
- package/dist/routes/pages/admin/core/AgentRegistryEditorPage.tsx +12 -6
- package/dist/routes/pages/admin/core/AgentSkillRegistryEditorPage.d.ts.map +1 -1
- package/dist/routes/pages/admin/core/AgentSkillRegistryEditorPage.js +22 -15
- package/dist/routes/pages/admin/core/AgentSkillRegistryEditorPage.js.map +1 -1
- package/dist/routes/pages/admin/core/AgentSkillRegistryEditorPage.tsx +17 -7
- package/dist/routes/pages/admin/core/AgentToolRegistryEditorPage.d.ts.map +1 -1
- package/dist/routes/pages/admin/core/AgentToolRegistryEditorPage.js +21 -15
- package/dist/routes/pages/admin/core/AgentToolRegistryEditorPage.js.map +1 -1
- package/dist/routes/pages/admin/core/AgentToolRegistryEditorPage.tsx +16 -9
- package/dist/routes/pages/admin/core/ArchivedChatterMessagesPage.d.ts.map +1 -1
- package/dist/routes/pages/admin/core/ArchivedChatterMessagesPage.js +149 -37
- package/dist/routes/pages/admin/core/ArchivedChatterMessagesPage.js.map +1 -1
- package/dist/routes/pages/admin/core/ArchivedChatterMessagesPage.tsx +283 -73
- package/dist/routes/pages/admin/core/CardPage.d.ts.map +1 -1
- package/dist/routes/pages/admin/core/CardPage.js +9 -1
- package/dist/routes/pages/admin/core/CardPage.js.map +1 -1
- package/dist/routes/pages/admin/core/CardPage.tsx +9 -1
- package/dist/routes/pages/admin/core/KanbanPage.d.ts.map +1 -1
- package/dist/routes/pages/admin/core/KanbanPage.js +9 -1
- package/dist/routes/pages/admin/core/KanbanPage.js.map +1 -1
- package/dist/routes/pages/admin/core/KanbanPage.tsx +9 -1
- package/dist/routes/pages/admin/core/ListPage.d.ts.map +1 -1
- package/dist/routes/pages/admin/core/ListPage.js +10 -1
- package/dist/routes/pages/admin/core/ListPage.js.map +1 -1
- package/dist/routes/pages/admin/core/ListPage.tsx +10 -1
- package/dist/routes/pages/admin/core/TreePage.d.ts.map +1 -1
- package/dist/routes/pages/admin/core/TreePage.js +9 -1
- package/dist/routes/pages/admin/core/TreePage.js.map +1 -1
- package/dist/routes/pages/admin/core/TreePage.tsx +9 -1
- package/dist/routes/pages/embed/AgentEmbedPage.d.ts.map +1 -1
- package/dist/routes/pages/embed/AgentEmbedPage.js +67 -4
- package/dist/routes/pages/embed/AgentEmbedPage.js.map +1 -1
- package/dist/routes/pages/embed/AgentEmbedPage.tsx +61 -4
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileReaderExt.d.ts","sourceRoot":"","sources":["../../../src/components/common/FileReaderExt.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FileReaderExt.d.ts","sourceRoot":"","sources":["../../../src/components/common/FileReaderExt.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,aAAa;iBAAoC,GAAG;6CA2BhE,CAAA"}
|
|
@@ -1,16 +1,27 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { Volume2 } from "lucide-react";
|
|
4
|
+
import { SolidFileTypeIcon } from '../../helpers/fileTypeIcon';
|
|
5
|
+
import { getMediaPreviewKind } from '../../helpers/mediaType';
|
|
3
6
|
export var FileReaderExt = function (_a) {
|
|
4
7
|
var fileDetails = _a.fileDetails;
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
var _b = useState(false), isPreviewBroken = _b[0], setIsPreviewBroken = _b[1];
|
|
9
|
+
var fileUrl = (fileDetails === null || fileDetails === void 0 ? void 0 : fileDetails.fileUrl) || (fileDetails === null || fileDetails === void 0 ? void 0 : fileDetails._full_url);
|
|
10
|
+
var fileName = (fileDetails === null || fileDetails === void 0 ? void 0 : fileDetails.name) || (fileDetails === null || fileDetails === void 0 ? void 0 : fileDetails.originalFileName) || "Uploaded file";
|
|
11
|
+
var previewKind = getMediaPreviewKind({
|
|
12
|
+
url: fileUrl,
|
|
13
|
+
fileName: fileName,
|
|
14
|
+
mimeType: (fileDetails === null || fileDetails === void 0 ? void 0 : fileDetails.type) || (fileDetails === null || fileDetails === void 0 ? void 0 : fileDetails.mimeType),
|
|
15
|
+
});
|
|
16
|
+
if (fileUrl && !isPreviewBroken && previewKind === "image") {
|
|
17
|
+
return _jsx("img", { src: fileUrl, alt: fileName, width: 40, height: 40, style: { width: 40, height: 40, flexShrink: 0, objectFit: "cover", borderRadius: 6 }, onError: function () { return setIsPreviewBroken(true); } });
|
|
18
|
+
}
|
|
19
|
+
if (fileUrl && !isPreviewBroken && previewKind === "video") {
|
|
20
|
+
return _jsx("video", { src: fileUrl, width: 40, height: 40, muted: true, preload: "metadata", "aria-label": fileName, style: { width: 40, height: 40, flexShrink: 0, objectFit: "cover", borderRadius: 6 }, onError: function () { return setIsPreviewBroken(true); } });
|
|
21
|
+
}
|
|
22
|
+
if (previewKind === "audio") {
|
|
23
|
+
return _jsx("div", { "aria-label": fileName, style: { width: 40, height: 40, flexShrink: 0, display: "flex", alignItems: "center", justifyContent: "center", borderRadius: 6, background: "color-mix(in srgb, var(--muted) 18%, var(--card) 82%)" }, children: _jsx(Volume2, { size: 18, style: { color: "var(--muted-foreground)" } }) });
|
|
24
|
+
}
|
|
25
|
+
return (_jsx("div", { style: { width: 40, height: 40, flexShrink: 0, display: "flex", alignItems: "center", justifyContent: "center" }, children: _jsx(SolidFileTypeIcon, { fileUrl: fileUrl || fileName, fileName: fileName, size: 40 }) }));
|
|
15
26
|
};
|
|
16
27
|
//# sourceMappingURL=FileReaderExt.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileReaderExt.js","sourceRoot":"","sources":["../../../src/components/common/FileReaderExt.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"FileReaderExt.js","sourceRoot":"","sources":["../../../src/components/common/FileReaderExt.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,C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EAAE,EAAE,KAAK,QAAC,OAAO,EAAC,UAAU,gBAAa,QAAQ,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC,EAAE,EAAE,OAAO,EAAE,cAAM,OAAA,kBAAkB,CAAC,IAAI,CAAC,EAAxB,CAAwB,GAAI,CAAC;KACvO;IAED,IAAI,WAAW,KAAK,OAAO,EAAE;QACzB,OAAO,4BAAiB,QAAQ,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,cAAc,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC,EAAE,UAAU,EAAE,uDAAuD,EAAE,YAAE,KAAC,OAAO,IAAC,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,yBAAyB,EAAE,GAAI,GAAM,CAAC;KACtT;IAED,OAAO,CACH,cAAK,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,cAAc,EAAE,QAAQ,EAAE,YACjH,KAAC,iBAAiB,IAAC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,GAAI,GAC/E,CACT,CAAA;AACL,CAAC,CAAA","sourcesContent":["import { useState } from \"react\";\nimport { Volume2 } from \"lucide-react\";\nimport { SolidFileTypeIcon } from '../../helpers/fileTypeIcon';\nimport { getMediaPreviewKind } from '../../helpers/mediaType';\n\nexport const FileReaderExt = ({ fileDetails }: { fileDetails: any }) => {\n const [isPreviewBroken, setIsPreviewBroken] = useState(false);\n const fileUrl = fileDetails?.fileUrl || fileDetails?._full_url;\n const fileName = fileDetails?.name || fileDetails?.originalFileName || \"Uploaded file\";\n const previewKind = getMediaPreviewKind({\n url: fileUrl,\n fileName,\n mimeType: fileDetails?.type || fileDetails?.mimeType,\n });\n\n if (fileUrl && !isPreviewBroken && previewKind === \"image\") {\n return <img src={fileUrl} alt={fileName} width={40} height={40} style={{ width: 40, height: 40, flexShrink: 0, objectFit: \"cover\", borderRadius: 6 }} onError={() => setIsPreviewBroken(true)} />;\n }\n\n if (fileUrl && !isPreviewBroken && previewKind === \"video\") {\n return <video src={fileUrl} width={40} height={40} muted preload=\"metadata\" aria-label={fileName} style={{ width: 40, height: 40, flexShrink: 0, objectFit: \"cover\", borderRadius: 6 }} onError={() => setIsPreviewBroken(true)} />;\n }\n\n if (previewKind === \"audio\") {\n return <div aria-label={fileName} style={{ width: 40, height: 40, flexShrink: 0, display: \"flex\", alignItems: \"center\", justifyContent: \"center\", borderRadius: 6, background: \"color-mix(in srgb, var(--muted) 18%, var(--card) 82%)\" }}><Volume2 size={18} style={{ color: \"var(--muted-foreground)\" }} /></div>;\n }\n\n return (\n <div style={{ width: 40, height: 40, flexShrink: 0, display: \"flex\", alignItems: \"center\", justifyContent: \"center\" }}>\n <SolidFileTypeIcon fileUrl={fileUrl || fileName} fileName={fileName} size={40} />\n </div>\n )\n}\n"]}
|
|
@@ -1,20 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
import { Volume2 } from "lucide-react";
|
|
3
|
+
import { SolidFileTypeIcon } from '../../helpers/fileTypeIcon';
|
|
4
|
+
import { getMediaPreviewKind } from '../../helpers/mediaType';
|
|
3
5
|
|
|
4
6
|
export const FileReaderExt = ({ fileDetails }: { fileDetails: any }) => {
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
const [isPreviewBroken, setIsPreviewBroken] = useState(false);
|
|
8
|
+
const fileUrl = fileDetails?.fileUrl || fileDetails?._full_url;
|
|
9
|
+
const fileName = fileDetails?.name || fileDetails?.originalFileName || "Uploaded file";
|
|
10
|
+
const previewKind = getMediaPreviewKind({
|
|
11
|
+
url: fileUrl,
|
|
12
|
+
fileName,
|
|
13
|
+
mimeType: fileDetails?.type || fileDetails?.mimeType,
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
if (fileUrl && !isPreviewBroken && previewKind === "image") {
|
|
17
|
+
return <img src={fileUrl} alt={fileName} width={40} height={40} style={{ width: 40, height: 40, flexShrink: 0, objectFit: "cover", borderRadius: 6 }} onError={() => setIsPreviewBroken(true)} />;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
if (fileUrl && !isPreviewBroken && previewKind === "video") {
|
|
21
|
+
return <video src={fileUrl} width={40} height={40} muted preload="metadata" aria-label={fileName} style={{ width: 40, height: 40, flexShrink: 0, objectFit: "cover", borderRadius: 6 }} onError={() => setIsPreviewBroken(true)} />;
|
|
13
22
|
}
|
|
23
|
+
|
|
24
|
+
if (previewKind === "audio") {
|
|
25
|
+
return <div aria-label={fileName} style={{ width: 40, height: 40, flexShrink: 0, display: "flex", alignItems: "center", justifyContent: "center", borderRadius: 6, background: "color-mix(in srgb, var(--muted) 18%, var(--card) 82%)" }}><Volume2 size={18} style={{ color: "var(--muted-foreground)" }} /></div>;
|
|
26
|
+
}
|
|
27
|
+
|
|
14
28
|
return (
|
|
15
|
-
<div>
|
|
16
|
-
<
|
|
17
|
-
{/* <img src={renderFile()} style={{height: 50, width:50}}/> */}
|
|
29
|
+
<div style={{ width: 40, height: 40, flexShrink: 0, display: "flex", alignItems: "center", justifyContent: "center" }}>
|
|
30
|
+
<SolidFileTypeIcon fileUrl={fileUrl || fileName} fileName={fileName} size={40} />
|
|
18
31
|
</div>
|
|
19
32
|
)
|
|
20
|
-
}
|
|
33
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SocialMediaLogin.d.ts","sourceRoot":"","sources":["../../../src/components/common/SocialMediaLogin.tsx"],"names":[],"mappings":"AAIA,KAAK,qBAAqB,GAAG;IAC3B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,+BAA+B,CAAC,EAAE,OAAO,CAAC;CAC3C,CAAC;AAEF,eAAO,MAAM,gBAAgB,yGAM1B,qBAAqB,
|
|
1
|
+
{"version":3,"file":"SocialMediaLogin.d.ts","sourceRoot":"","sources":["../../../src/components/common/SocialMediaLogin.tsx"],"names":[],"mappings":"AAIA,KAAK,qBAAqB,GAAG;IAC3B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,+BAA+B,CAAC,EAAE,OAAO,CAAC;CAC3C,CAAC;AAEF,eAAO,MAAM,gBAAgB,yGAM1B,qBAAqB,4CA8KvB,CAAC"}
|
|
@@ -9,6 +9,6 @@ export var SocialMediaLogin = function (_a) {
|
|
|
9
9
|
var getOAuthConnectUrl = function (provider) {
|
|
10
10
|
return "".concat(backendApiUrl, "/api/iam/").concat(provider, "/connect");
|
|
11
11
|
};
|
|
12
|
-
return (_jsx("div", { className: "mt-4", children: _jsxs("div", { className: "solid-auth-social-grid", children: [appleEnabled && (_jsx(SolidButton, { type: "button", variant: "outline", className: "solid-auth-social-btn", tabIndex: -1, onClick: function () { return router.push(getOAuthConnectUrl("apple")); }, "aria-label": "Login with Apple", title: "Login with Apple", children: _jsx("svg", { viewBox: "0 0 24 24", width: "18", height: "18", fill: "currentColor", "aria-hidden": "true", children: _jsx("path", { d: "M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701" }) }) })), googleEnabled && (_jsx(SolidButton, { type: "button", variant: "outline", className: "solid-auth-social-btn", tabIndex: -1, onClick: function () { return router.push(getOAuthConnectUrl("google")); }, "aria-label": "Login with Google", title: "Login with Google", children: _jsxs("svg", { viewBox: "0 0 24 24", width: "18", height: "18", fill: "none", "aria-hidden": "true", children: [_jsx("path", { d: "M21.8 12.23c0-.74-.07-1.45-.2-2.13H12v4.03h5.5a4.7 4.7 0 0 1-2.04 3.08v2.55h3.3c1.93-1.78 3.04-4.4 3.04-7.53z", fill: "#4285F4" }), _jsx("path", { d: "M12 22c2.75 0 5.05-.91 6.73-2.47l-3.3-2.55c-.92.62-2.1.99-3.43.99-2.64 0-4.88-1.78-5.68-4.18H2.9v2.63A10 10 0 0 0 12 22z", fill: "#34A853" }), _jsx("path", { d: "M6.32 13.79a6 6 0 0 1 0-3.58V7.58H2.9a10 10 0 0 0 0 8.84l3.42-2.63z", fill: "#FBBC05" }), _jsx("path", { d: "M12 6.02c1.49 0 2.82.51 3.87 1.5l2.9-2.9C17.04 2.98 14.74 2 12 2A10 10 0 0 0 2.9 7.58l3.42 2.63c.8-2.4 3.04-4.19 5.68-4.19z", fill: "#EA4335" })] }) })), facebookEnabled && (_jsx(SolidButton, { type: "button", variant: "outline", className: "solid-auth-social-btn", tabIndex: -1, onClick: function () { return router.push(getOAuthConnectUrl("facebook")); }, "aria-label": "Login with Meta", title: "Login with Meta", children: _jsx("svg", { viewBox: "0 0 24 24", width: "18", height: "18", fill: "none", "aria-hidden": "true", children: _jsx("path", { d: "M5.4 15.6c0-3.14 1.62-7.09 3.76-7.09 1.43 0 2.56 1.72 2.84 2.25.28-.53 1.41-2.25 2.84-2.25 2.14 0 3.76 3.95 3.76 7.09 0 1.79-.63 2.89-1.82 2.89-2.12 0-3.75-3.02-4.78-4.82-1.03 1.8-2.66 4.82-4.78 4.82-1.19 0-1.82-1.1-1.82-2.89z", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round" }) }) })), microsoftEnabled && (_jsx(SolidButton, { type: "button", variant: "outline", className: "solid-auth-social-btn", tabIndex: -1, onClick: function () { return router.push(getOAuthConnectUrl("microsoft")); }, "aria-label": "Login with Microsoft", title: "Login with Microsoft", children: _jsx("svg", { viewBox: "0 0 24 24", width: "18", height: "18", "aria-hidden": "true", children: _jsxs("g", { transform: "translate(2, 2)", children: [_jsx("rect", { width: "9", height: "9", x: "0", y: "0", fill: "#f25022" }), _jsx("rect", { width: "9", height: "9", x: "11", y: "0", fill: "#7fba00" }), _jsx("rect", { width: "9", height: "9", x: "0", y: "11", fill: "#00a4ef" }), _jsx("rect", { width: "9", height: "9", x: "11", y: "11", fill: "#ffb900" })] }) }) })), microsoftActiveDirectoryEnabled && (_jsx(SolidButton, { type: "button", variant: "outline", className: "solid-auth-social-btn", tabIndex: -1, onClick: function () { return router.push(getOAuthConnectUrl("microsoft-active-directory")); }, "aria-label": "Login with Microsoft Active Directory", title: "
|
|
12
|
+
return (_jsx("div", { className: "mt-4", children: _jsxs("div", { className: "solid-auth-social-grid", children: [appleEnabled && (_jsx(SolidButton, { type: "button", variant: "outline", className: "solid-auth-social-btn", tabIndex: -1, onClick: function () { return router.push(getOAuthConnectUrl("apple")); }, "aria-label": "Login with Apple", title: "Login with Apple", children: _jsx("svg", { viewBox: "0 0 24 24", width: "18", height: "18", fill: "currentColor", "aria-hidden": "true", children: _jsx("path", { d: "M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701" }) }) })), googleEnabled && (_jsx(SolidButton, { type: "button", variant: "outline", className: "solid-auth-social-btn", tabIndex: -1, onClick: function () { return router.push(getOAuthConnectUrl("google")); }, "aria-label": "Login with Google", title: "Login with Google", children: _jsxs("svg", { viewBox: "0 0 24 24", width: "18", height: "18", fill: "none", "aria-hidden": "true", children: [_jsx("path", { d: "M21.8 12.23c0-.74-.07-1.45-.2-2.13H12v4.03h5.5a4.7 4.7 0 0 1-2.04 3.08v2.55h3.3c1.93-1.78 3.04-4.4 3.04-7.53z", fill: "#4285F4" }), _jsx("path", { d: "M12 22c2.75 0 5.05-.91 6.73-2.47l-3.3-2.55c-.92.62-2.1.99-3.43.99-2.64 0-4.88-1.78-5.68-4.18H2.9v2.63A10 10 0 0 0 12 22z", fill: "#34A853" }), _jsx("path", { d: "M6.32 13.79a6 6 0 0 1 0-3.58V7.58H2.9a10 10 0 0 0 0 8.84l3.42-2.63z", fill: "#FBBC05" }), _jsx("path", { d: "M12 6.02c1.49 0 2.82.51 3.87 1.5l2.9-2.9C17.04 2.98 14.74 2 12 2A10 10 0 0 0 2.9 7.58l3.42 2.63c.8-2.4 3.04-4.19 5.68-4.19z", fill: "#EA4335" })] }) })), facebookEnabled && (_jsx(SolidButton, { type: "button", variant: "outline", className: "solid-auth-social-btn", tabIndex: -1, onClick: function () { return router.push(getOAuthConnectUrl("facebook")); }, "aria-label": "Login with Meta", title: "Login with Meta", children: _jsx("svg", { viewBox: "0 0 24 24", width: "18", height: "18", fill: "none", "aria-hidden": "true", children: _jsx("path", { d: "M5.4 15.6c0-3.14 1.62-7.09 3.76-7.09 1.43 0 2.56 1.72 2.84 2.25.28-.53 1.41-2.25 2.84-2.25 2.14 0 3.76 3.95 3.76 7.09 0 1.79-.63 2.89-1.82 2.89-2.12 0-3.75-3.02-4.78-4.82-1.03 1.8-2.66 4.82-4.78 4.82-1.19 0-1.82-1.1-1.82-2.89z", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round" }) }) })), microsoftEnabled && (_jsx(SolidButton, { type: "button", variant: "outline", className: "solid-auth-social-btn", tabIndex: -1, onClick: function () { return router.push(getOAuthConnectUrl("microsoft")); }, "aria-label": "Login with Microsoft", title: "Login with Microsoft", children: _jsx("svg", { viewBox: "0 0 24 24", width: "18", height: "18", "aria-hidden": "true", children: _jsxs("g", { transform: "translate(2, 2)", children: [_jsx("rect", { width: "9", height: "9", x: "0", y: "0", fill: "#f25022" }), _jsx("rect", { width: "9", height: "9", x: "11", y: "0", fill: "#7fba00" }), _jsx("rect", { width: "9", height: "9", x: "0", y: "11", fill: "#00a4ef" }), _jsx("rect", { width: "9", height: "9", x: "11", y: "11", fill: "#ffb900" })] }) }) })), microsoftActiveDirectoryEnabled && (_jsx(SolidButton, { type: "button", variant: "outline", className: "solid-auth-social-btn", tabIndex: -1, onClick: function () { return router.push(getOAuthConnectUrl("microsoft-active-directory")); }, "aria-label": "Login with Microsoft Active Directory", title: "Work / Active Directory (Microsoft Entra)", children: _jsxs("svg", { viewBox: "0 0 32 32", width: "20", height: "20", "aria-hidden": "true", children: [_jsxs("defs", { children: [_jsxs("linearGradient", { id: "entra-grad-back", x1: "0%", y1: "0%", x2: "100%", y2: "100%", children: [_jsx("stop", { offset: "0%", stopColor: "#0F4C81" }), _jsx("stop", { offset: "100%", stopColor: "#0B3663" })] }), _jsxs("linearGradient", { id: "entra-grad-mid", x1: "0%", y1: "0%", x2: "100%", y2: "100%", children: [_jsx("stop", { offset: "0%", stopColor: "#0078D4" }), _jsx("stop", { offset: "100%", stopColor: "#005A9E" })] }), _jsxs("linearGradient", { id: "entra-grad-front", x1: "0%", y1: "0%", x2: "100%", y2: "100%", children: [_jsx("stop", { offset: "0%", stopColor: "#50E6FF" }), _jsx("stop", { offset: "100%", stopColor: "#0094F0" })] })] }), _jsx("path", { d: "M17 6.5C17 4 19.5 2 22.5 3.5 25.5 5 27 7.5 27 11v11c0 3-2.5 5.5-5.5 5.5h-5.5L17 6.5z", fill: "url(#entra-grad-back)" }), _jsx("path", { d: "M10 6C10 3 13 1 16 2.5 19 4 20.5 6.5 20.5 10v12c0 3.5-2.5 6-6 6H9.5L10 6z", fill: "url(#entra-grad-mid)" }), _jsx("path", { d: "M4.5 10.5C4.5 7 7.5 4.5 10.5 5.5 13.5 6.5 14.5 9 14.5 12v9c0 3-2 5-5 5H4.5v-15.5z", fill: "url(#entra-grad-front)" })] }) }))] }) }));
|
|
13
13
|
};
|
|
14
14
|
//# sourceMappingURL=SocialMediaLogin.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SocialMediaLogin.js","sourceRoot":"","sources":["../../../src/components/common/SocialMediaLogin.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAU5C,MAAM,CAAC,IAAM,gBAAgB,GAAG,UAAC,EAMT;QALtB,qBAAqB,EAArB,aAAa,mBAAG,KAAK,KAAA,EACrB,uBAAuB,EAAvB,eAAe,mBAAG,KAAK,KAAA,EACvB,oBA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AAC,MAAM,EAAC,GAAG,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,GAAG,EAAC,IAAI,EAAC,SAAS,GAAG,EACzD,eAAM,KAAK,EAAC,GAAG,EAAC,MAAM,EAAC,GAAG,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,IAAI,EAAC,IAAI,EAAC,SAAS,GAAG,EACzD,eAAM,KAAK,EAAC,GAAG,EAAC,MAAM,EAAC,GAAG,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,IAAI,EAAC,IAAI,EAAC,SAAS,GAAG,IACxD,GACA,GACM,CACb,IACG,GACF,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { useRouter } from \"../../hooks/useRouter\";\nimport { env } from \"../../adapters/env\";\nimport { SolidButton } from \"../shad-cn-ui\";\n\ntype SocialMediaLoginProps = {\n googleEnabled?: boolean;\n facebookEnabled?: boolean;\n appleEnabled?: boolean;\n microsoftEnabled?: boolean;\n microsoftActiveDirectoryEnabled?: boolean;\n};\n\nexport const SocialMediaLogin = ({\n googleEnabled = false,\n facebookEnabled = false,\n appleEnabled = false,\n microsoftEnabled = false,\n microsoftActiveDirectoryEnabled = false,\n}: SocialMediaLoginProps) => {\n const router = useRouter();\n\n const backendApiUrl = (\n env(\"NEXT_PUBLIC_BACKEND_API_URL\") || env(\"API_URL\")\n ).replace(/\\/+$/, \"\");\n const getOAuthConnectUrl = (provider: string) =>\n `${backendApiUrl}/api/iam/${provider}/connect`;\n\n return (\n <div className=\"mt-4\">\n <div className=\"solid-auth-social-grid\">\n {appleEnabled && (\n <SolidButton\n type=\"button\"\n variant=\"outline\"\n className=\"solid-auth-social-btn\"\n tabIndex={-1}\n onClick={() => router.push(getOAuthConnectUrl(\"apple\"))}\n aria-label=\"Login with Apple\"\n title=\"Login with Apple\"\n >\n <svg\n viewBox=\"0 0 24 24\"\n width=\"18\"\n height=\"18\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path d=\"M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701\" />\n </svg>\n </SolidButton>\n )}\n\n {googleEnabled && (\n <SolidButton\n type=\"button\"\n variant=\"outline\"\n className=\"solid-auth-social-btn\"\n tabIndex={-1}\n onClick={() => router.push(getOAuthConnectUrl(\"google\"))}\n aria-label=\"Login with Google\"\n title=\"Login with Google\"\n >\n <svg\n viewBox=\"0 0 24 24\"\n width=\"18\"\n height=\"18\"\n fill=\"none\"\n aria-hidden=\"true\"\n >\n <path\n d=\"M21.8 12.23c0-.74-.07-1.45-.2-2.13H12v4.03h5.5a4.7 4.7 0 0 1-2.04 3.08v2.55h3.3c1.93-1.78 3.04-4.4 3.04-7.53z\"\n fill=\"#4285F4\"\n />\n <path\n d=\"M12 22c2.75 0 5.05-.91 6.73-2.47l-3.3-2.55c-.92.62-2.1.99-3.43.99-2.64 0-4.88-1.78-5.68-4.18H2.9v2.63A10 10 0 0 0 12 22z\"\n fill=\"#34A853\"\n />\n <path\n d=\"M6.32 13.79a6 6 0 0 1 0-3.58V7.58H2.9a10 10 0 0 0 0 8.84l3.42-2.63z\"\n fill=\"#FBBC05\"\n />\n <path\n d=\"M12 6.02c1.49 0 2.82.51 3.87 1.5l2.9-2.9C17.04 2.98 14.74 2 12 2A10 10 0 0 0 2.9 7.58l3.42 2.63c.8-2.4 3.04-4.19 5.68-4.19z\"\n fill=\"#EA4335\"\n />\n </svg>\n </SolidButton>\n )}\n\n {facebookEnabled && (\n <SolidButton\n type=\"button\"\n variant=\"outline\"\n className=\"solid-auth-social-btn\"\n tabIndex={-1}\n onClick={() => router.push(getOAuthConnectUrl(\"facebook\"))}\n aria-label=\"Login with Meta\"\n title=\"Login with Meta\"\n >\n <svg\n viewBox=\"0 0 24 24\"\n width=\"18\"\n height=\"18\"\n fill=\"none\"\n aria-hidden=\"true\"\n >\n <path\n d=\"M5.4 15.6c0-3.14 1.62-7.09 3.76-7.09 1.43 0 2.56 1.72 2.84 2.25.28-.53 1.41-2.25 2.84-2.25 2.14 0 3.76 3.95 3.76 7.09 0 1.79-.63 2.89-1.82 2.89-2.12 0-3.75-3.02-4.78-4.82-1.03 1.8-2.66 4.82-4.78 4.82-1.19 0-1.82-1.1-1.82-2.89z\"\n stroke=\"currentColor\"\n strokeWidth=\"1.8\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n </SolidButton>\n )}\n\n {microsoftEnabled && (\n <SolidButton\n type=\"button\"\n variant=\"outline\"\n className=\"solid-auth-social-btn\"\n tabIndex={-1}\n onClick={() => router.push(getOAuthConnectUrl(\"microsoft\"))}\n aria-label=\"Login with Microsoft\"\n title=\"Login with Microsoft\"\n >\n <svg viewBox=\"0 0 24 24\" width=\"18\" height=\"18\" aria-hidden=\"true\">\n <g transform=\"translate(2, 2)\">\n <rect width=\"9\" height=\"9\" x=\"0\" y=\"0\" fill=\"#f25022\" />\n <rect width=\"9\" height=\"9\" x=\"11\" y=\"0\" fill=\"#7fba00\" />\n <rect width=\"9\" height=\"9\" x=\"0\" y=\"11\" fill=\"#00a4ef\" />\n <rect width=\"9\" height=\"9\" x=\"11\" y=\"11\" fill=\"#ffb900\" />\n </g>\n </svg>\n </SolidButton>\n )}\n\n {microsoftActiveDirectoryEnabled && (\n <SolidButton\n type=\"button\"\n variant=\"outline\"\n className=\"solid-auth-social-btn\"\n tabIndex={-1}\n onClick={() => router.push(getOAuthConnectUrl(\"microsoft-active-directory\"))}\n aria-label=\"Login with Microsoft Active Directory\"\n title=\"Login with Microsoft Active Directory\"\n >\n <svg viewBox=\"0 0 24 24\" width=\"18\" height=\"18\" aria-hidden=\"true\">\n <g transform=\"translate(2, 2)\">\n <rect width=\"9\" height=\"9\" x=\"0\" y=\"0\" fill=\"#f25022\" />\n <rect width=\"9\" height=\"9\" x=\"11\" y=\"0\" fill=\"#7fba00\" />\n <rect width=\"9\" height=\"9\" x=\"0\" y=\"11\" fill=\"#00a4ef\" />\n <rect width=\"9\" height=\"9\" x=\"11\" y=\"11\" fill=\"#ffb900\" />\n </g>\n </svg>\n </SolidButton>\n )}\n </div>\n </div>\n );\n};\n"]}
|
|
1
|
+
{"version":3,"file":"SocialMediaLogin.js","sourceRoot":"","sources":["../../../src/components/common/SocialMediaLogin.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAU5C,MAAM,CAAC,IAAM,gBAAgB,GAAG,UAAC,EAMT;QALtB,qBAAqB,EAArB,aAAa,mBAAG,KAAK,KAAA,EACrB,uBAAuB,EAAvB,eAAe,mBAAG,KAAK,KAAA,EACvB,oBAAoB,EAApB,YAAY,mBAAG,KAAK,KAAA,EACpB,wBAAwB,EAAxB,gBAAgB,mBAAG,KAAK,KAAA,EACxB,uCAAuC,EAAvC,+BAA+B,mBAAG,KAAK,KAAA;IAEvC,IAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAE3B,IAAM,aAAa,GAAG,CACpB,GAAG,CAAC,6BAA6B,CAAC,IAAI,GAAG,CAAC,SAAS,CAAC,CACrD,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IACtB,IAAM,kBAAkB,GAAG,UAAC,QAAgB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BAAkB,EAAC,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,MAAM,EAAC,EAAE,EAAC,MAAM,aACvE,eAAM,MAAM,EAAC,IAAI,EAAC,SAAS,EAAC,SAAS,GAAG,EACxC,eAAM,MAAM,EAAC,MAAM,EAAC,SAAS,EAAC,SAAS,GAAG,IAC3B,IACZ,EAGP,eACE,CAAC,EAAC,sFAAsF,EACxF,IAAI,EAAC,uBAAuB,GAC5B,EAGF,eACE,CAAC,EAAC,2EAA2E,EAC7E,IAAI,EAAC,sBAAsB,GAC3B,EAGF,eACE,CAAC,EAAC,mFAAmF,EACrF,IAAI,EAAC,wBAAwB,GAC7B,IACE,GACM,CACf,IACW,GACF,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { useRouter } from \"../../hooks/useRouter\";\nimport { env } from \"../../adapters/env\";\nimport { SolidButton } from \"../shad-cn-ui\";\n\ntype SocialMediaLoginProps = {\n googleEnabled?: boolean;\n facebookEnabled?: boolean;\n appleEnabled?: boolean;\n microsoftEnabled?: boolean;\n microsoftActiveDirectoryEnabled?: boolean;\n};\n\nexport const SocialMediaLogin = ({\n googleEnabled = false,\n facebookEnabled = false,\n appleEnabled = false,\n microsoftEnabled = false,\n microsoftActiveDirectoryEnabled = false,\n}: SocialMediaLoginProps) => {\n const router = useRouter();\n\n const backendApiUrl = (\n env(\"NEXT_PUBLIC_BACKEND_API_URL\") || env(\"API_URL\")\n ).replace(/\\/+$/, \"\");\n const getOAuthConnectUrl = (provider: string) =>\n `${backendApiUrl}/api/iam/${provider}/connect`;\n\n return (\n <div className=\"mt-4\">\n <div className=\"solid-auth-social-grid\">\n {appleEnabled && (\n <SolidButton\n type=\"button\"\n variant=\"outline\"\n className=\"solid-auth-social-btn\"\n tabIndex={-1}\n onClick={() => router.push(getOAuthConnectUrl(\"apple\"))}\n aria-label=\"Login with Apple\"\n title=\"Login with Apple\"\n >\n <svg\n viewBox=\"0 0 24 24\"\n width=\"18\"\n height=\"18\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path d=\"M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701\" />\n </svg>\n </SolidButton>\n )}\n\n {googleEnabled && (\n <SolidButton\n type=\"button\"\n variant=\"outline\"\n className=\"solid-auth-social-btn\"\n tabIndex={-1}\n onClick={() => router.push(getOAuthConnectUrl(\"google\"))}\n aria-label=\"Login with Google\"\n title=\"Login with Google\"\n >\n <svg\n viewBox=\"0 0 24 24\"\n width=\"18\"\n height=\"18\"\n fill=\"none\"\n aria-hidden=\"true\"\n >\n <path\n d=\"M21.8 12.23c0-.74-.07-1.45-.2-2.13H12v4.03h5.5a4.7 4.7 0 0 1-2.04 3.08v2.55h3.3c1.93-1.78 3.04-4.4 3.04-7.53z\"\n fill=\"#4285F4\"\n />\n <path\n d=\"M12 22c2.75 0 5.05-.91 6.73-2.47l-3.3-2.55c-.92.62-2.1.99-3.43.99-2.64 0-4.88-1.78-5.68-4.18H2.9v2.63A10 10 0 0 0 12 22z\"\n fill=\"#34A853\"\n />\n <path\n d=\"M6.32 13.79a6 6 0 0 1 0-3.58V7.58H2.9a10 10 0 0 0 0 8.84l3.42-2.63z\"\n fill=\"#FBBC05\"\n />\n <path\n d=\"M12 6.02c1.49 0 2.82.51 3.87 1.5l2.9-2.9C17.04 2.98 14.74 2 12 2A10 10 0 0 0 2.9 7.58l3.42 2.63c.8-2.4 3.04-4.19 5.68-4.19z\"\n fill=\"#EA4335\"\n />\n </svg>\n </SolidButton>\n )}\n\n {facebookEnabled && (\n <SolidButton\n type=\"button\"\n variant=\"outline\"\n className=\"solid-auth-social-btn\"\n tabIndex={-1}\n onClick={() => router.push(getOAuthConnectUrl(\"facebook\"))}\n aria-label=\"Login with Meta\"\n title=\"Login with Meta\"\n >\n <svg\n viewBox=\"0 0 24 24\"\n width=\"18\"\n height=\"18\"\n fill=\"none\"\n aria-hidden=\"true\"\n >\n <path\n d=\"M5.4 15.6c0-3.14 1.62-7.09 3.76-7.09 1.43 0 2.56 1.72 2.84 2.25.28-.53 1.41-2.25 2.84-2.25 2.14 0 3.76 3.95 3.76 7.09 0 1.79-.63 2.89-1.82 2.89-2.12 0-3.75-3.02-4.78-4.82-1.03 1.8-2.66 4.82-4.78 4.82-1.19 0-1.82-1.1-1.82-2.89z\"\n stroke=\"currentColor\"\n strokeWidth=\"1.8\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n </SolidButton>\n )}\n\n {microsoftEnabled && (\n <SolidButton\n type=\"button\"\n variant=\"outline\"\n className=\"solid-auth-social-btn\"\n tabIndex={-1}\n onClick={() => router.push(getOAuthConnectUrl(\"microsoft\"))}\n aria-label=\"Login with Microsoft\"\n title=\"Login with Microsoft\"\n >\n <svg viewBox=\"0 0 24 24\" width=\"18\" height=\"18\" aria-hidden=\"true\">\n <g transform=\"translate(2, 2)\">\n <rect width=\"9\" height=\"9\" x=\"0\" y=\"0\" fill=\"#f25022\" />\n <rect width=\"9\" height=\"9\" x=\"11\" y=\"0\" fill=\"#7fba00\" />\n <rect width=\"9\" height=\"9\" x=\"0\" y=\"11\" fill=\"#00a4ef\" />\n <rect width=\"9\" height=\"9\" x=\"11\" y=\"11\" fill=\"#ffb900\" />\n </g>\n </svg>\n </SolidButton>\n )}\n\n {microsoftActiveDirectoryEnabled && (\n <SolidButton\n type=\"button\"\n variant=\"outline\"\n className=\"solid-auth-social-btn\"\n tabIndex={-1}\n onClick={() => router.push(getOAuthConnectUrl(\"microsoft-active-directory\"))}\n aria-label=\"Login with Microsoft Active Directory\"\n title=\"Work / Active Directory (Microsoft Entra)\"\n >\n <svg viewBox=\"0 0 32 32\" width=\"20\" height=\"20\" aria-hidden=\"true\">\n <defs>\n {/* Right back fold */}\n <linearGradient id=\"entra-grad-back\" x1=\"0%\" y1=\"0%\" x2=\"100%\" y2=\"100%\">\n <stop offset=\"0%\" stopColor=\"#0F4C81\" />\n <stop offset=\"100%\" stopColor=\"#0B3663\" />\n </linearGradient>\n\n {/* Center fold */}\n <linearGradient id=\"entra-grad-mid\" x1=\"0%\" y1=\"0%\" x2=\"100%\" y2=\"100%\">\n <stop offset=\"0%\" stopColor=\"#0078D4\" />\n <stop offset=\"100%\" stopColor=\"#005A9E\" />\n </linearGradient>\n\n {/* Left front fold */}\n <linearGradient id=\"entra-grad-front\" x1=\"0%\" y1=\"0%\" x2=\"100%\" y2=\"100%\">\n <stop offset=\"0%\" stopColor=\"#50E6FF\" />\n <stop offset=\"100%\" stopColor=\"#0094F0\" />\n </linearGradient>\n </defs>\n\n {/* Back Layer */}\n <path\n d=\"M17 6.5C17 4 19.5 2 22.5 3.5 25.5 5 27 7.5 27 11v11c0 3-2.5 5.5-5.5 5.5h-5.5L17 6.5z\"\n fill=\"url(#entra-grad-back)\"\n />\n\n {/* Middle Layer */}\n <path\n d=\"M10 6C10 3 13 1 16 2.5 19 4 20.5 6.5 20.5 10v12c0 3.5-2.5 6-6 6H9.5L10 6z\"\n fill=\"url(#entra-grad-mid)\"\n />\n\n {/* Front Layer */}\n <path\n d=\"M4.5 10.5C4.5 7 7.5 4.5 10.5 5.5 13.5 6.5 14.5 9 14.5 12v9c0 3-2 5-5 5H4.5v-15.5z\"\n fill=\"url(#entra-grad-front)\"\n />\n </svg>\n </SolidButton>\n)}\n </div>\n </div>\n );\n};\n"]}
|
|
@@ -137,25 +137,56 @@ export const SocialMediaLogin = ({
|
|
|
137
137
|
)}
|
|
138
138
|
|
|
139
139
|
{microsoftActiveDirectoryEnabled && (
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
140
|
+
<SolidButton
|
|
141
|
+
type="button"
|
|
142
|
+
variant="outline"
|
|
143
|
+
className="solid-auth-social-btn"
|
|
144
|
+
tabIndex={-1}
|
|
145
|
+
onClick={() => router.push(getOAuthConnectUrl("microsoft-active-directory"))}
|
|
146
|
+
aria-label="Login with Microsoft Active Directory"
|
|
147
|
+
title="Work / Active Directory (Microsoft Entra)"
|
|
148
|
+
>
|
|
149
|
+
<svg viewBox="0 0 32 32" width="20" height="20" aria-hidden="true">
|
|
150
|
+
<defs>
|
|
151
|
+
{/* Right back fold */}
|
|
152
|
+
<linearGradient id="entra-grad-back" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
153
|
+
<stop offset="0%" stopColor="#0F4C81" />
|
|
154
|
+
<stop offset="100%" stopColor="#0B3663" />
|
|
155
|
+
</linearGradient>
|
|
156
|
+
|
|
157
|
+
{/* Center fold */}
|
|
158
|
+
<linearGradient id="entra-grad-mid" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
159
|
+
<stop offset="0%" stopColor="#0078D4" />
|
|
160
|
+
<stop offset="100%" stopColor="#005A9E" />
|
|
161
|
+
</linearGradient>
|
|
162
|
+
|
|
163
|
+
{/* Left front fold */}
|
|
164
|
+
<linearGradient id="entra-grad-front" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
165
|
+
<stop offset="0%" stopColor="#50E6FF" />
|
|
166
|
+
<stop offset="100%" stopColor="#0094F0" />
|
|
167
|
+
</linearGradient>
|
|
168
|
+
</defs>
|
|
169
|
+
|
|
170
|
+
{/* Back Layer */}
|
|
171
|
+
<path
|
|
172
|
+
d="M17 6.5C17 4 19.5 2 22.5 3.5 25.5 5 27 7.5 27 11v11c0 3-2.5 5.5-5.5 5.5h-5.5L17 6.5z"
|
|
173
|
+
fill="url(#entra-grad-back)"
|
|
174
|
+
/>
|
|
175
|
+
|
|
176
|
+
{/* Middle Layer */}
|
|
177
|
+
<path
|
|
178
|
+
d="M10 6C10 3 13 1 16 2.5 19 4 20.5 6.5 20.5 10v12c0 3.5-2.5 6-6 6H9.5L10 6z"
|
|
179
|
+
fill="url(#entra-grad-mid)"
|
|
180
|
+
/>
|
|
181
|
+
|
|
182
|
+
{/* Front Layer */}
|
|
183
|
+
<path
|
|
184
|
+
d="M4.5 10.5C4.5 7 7.5 4.5 10.5 5.5 13.5 6.5 14.5 9 14.5 12v9c0 3-2 5-5 5H4.5v-15.5z"
|
|
185
|
+
fill="url(#entra-grad-front)"
|
|
186
|
+
/>
|
|
187
|
+
</svg>
|
|
188
|
+
</SolidButton>
|
|
189
|
+
)}
|
|
159
190
|
</div>
|
|
160
191
|
</div>
|
|
161
192
|
);
|
|
@@ -504,3 +504,78 @@
|
|
|
504
504
|
align-items: stretch;
|
|
505
505
|
}
|
|
506
506
|
}
|
|
507
|
+
|
|
508
|
+
@media (max-width: 480px) {
|
|
509
|
+
.solid-kanban-export-dialog,
|
|
510
|
+
.solid-list-export-dialog {
|
|
511
|
+
width: calc(100vw - 20px) !important;
|
|
512
|
+
max-width: calc(100vw - 20px) !important;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
.solid-kanban-export-dialog-body {
|
|
516
|
+
max-height: calc(100dvh - 170px);
|
|
517
|
+
overflow-x: hidden;
|
|
518
|
+
padding: 12px !important;
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
.solid-export-toolbar,
|
|
522
|
+
.solid-export-toolbar-main,
|
|
523
|
+
.solid-export-toolbar-side,
|
|
524
|
+
.solid-export-toolbar-actions,
|
|
525
|
+
.solid-export-summary {
|
|
526
|
+
width: 100%;
|
|
527
|
+
min-width: 0;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
.solid-export-field,
|
|
531
|
+
.solid-export-field--template,
|
|
532
|
+
.solid-export-toolbar-options,
|
|
533
|
+
.solid-export-summary-card,
|
|
534
|
+
.solid-export-summary-chip {
|
|
535
|
+
width: 100%;
|
|
536
|
+
min-width: 0;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
.solid-export-toolbar-actions {
|
|
540
|
+
display: grid;
|
|
541
|
+
grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
|
|
542
|
+
gap: 8px;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
.solid-export-toolbar-actions .solid-btn {
|
|
546
|
+
min-width: 0;
|
|
547
|
+
width: 100%;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
.solid-export-toolbar-actions .solid-btn:last-child {
|
|
551
|
+
grid-column: 1 / -1;
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
.solid-export-summary {
|
|
555
|
+
align-items: stretch;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
.solid-export-summary-chip {
|
|
559
|
+
justify-content: center;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
.solid-export-pane-header,
|
|
563
|
+
.solid-export-list-row {
|
|
564
|
+
gap: 8px;
|
|
565
|
+
padding-left: 10px;
|
|
566
|
+
padding-right: 10px;
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
.solid-export-list-row-title {
|
|
570
|
+
align-items: flex-start;
|
|
571
|
+
flex-wrap: wrap;
|
|
572
|
+
white-space: normal;
|
|
573
|
+
overflow-wrap: anywhere;
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
.solid-export-list-row-key {
|
|
577
|
+
overflow: visible;
|
|
578
|
+
text-overflow: clip;
|
|
579
|
+
overflow-wrap: anywhere;
|
|
580
|
+
}
|
|
581
|
+
}
|
|
@@ -797,3 +797,74 @@
|
|
|
797
797
|
padding-top: 0;
|
|
798
798
|
}
|
|
799
799
|
}
|
|
800
|
+
|
|
801
|
+
@media (max-width: 480px) {
|
|
802
|
+
[class~="solid-import-dialog"] {
|
|
803
|
+
width: calc(100vw - 20px) !important;
|
|
804
|
+
max-width: calc(100vw - 20px) !important;
|
|
805
|
+
height: calc(100dvh - 16px) !important;
|
|
806
|
+
max-height: calc(100dvh - 16px) !important;
|
|
807
|
+
overflow-x: hidden !important;
|
|
808
|
+
overflow-y: auto !important;
|
|
809
|
+
-webkit-overflow-scrolling: touch;
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
[class~="solid-import-dialog-body"] {
|
|
813
|
+
max-height: none;
|
|
814
|
+
overflow-x: hidden;
|
|
815
|
+
padding: 12px !important;
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
.solid-import-shell,
|
|
819
|
+
.solid-import-dropzone-shell,
|
|
820
|
+
.solid-import-dropzone-copy,
|
|
821
|
+
.solid-import-file-card {
|
|
822
|
+
width: 100%;
|
|
823
|
+
min-width: 0;
|
|
824
|
+
max-width: 100%;
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
.SolidImportContextWrapper {
|
|
828
|
+
min-height: 0;
|
|
829
|
+
overflow-x: hidden;
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
.solid-import-stepper {
|
|
833
|
+
gap: 8px;
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
.solid-import-stepper-item {
|
|
837
|
+
min-height: 44px;
|
|
838
|
+
padding: 8px;
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
.solid-import-dropzone-shell {
|
|
842
|
+
min-height: auto;
|
|
843
|
+
padding: 18px 12px;
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
.solid-import-dropzone-title {
|
|
847
|
+
font-size: 14px;
|
|
848
|
+
line-height: 1.3;
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
.solid-import-section-copy {
|
|
852
|
+
overflow-wrap: anywhere;
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
.solid-import-file-card {
|
|
856
|
+
padding: 10px;
|
|
857
|
+
gap: 8px;
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
.solid-import-file-card-main {
|
|
861
|
+
flex: 1 1 auto;
|
|
862
|
+
min-width: 0;
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
.solid-import-file-name,
|
|
866
|
+
.solid-import-file-caption {
|
|
867
|
+
overflow-wrap: anywhere;
|
|
868
|
+
white-space: normal;
|
|
869
|
+
}
|
|
870
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SolidFormView.d.ts","sourceRoot":"","sources":["../../../../src/components/core/form/SolidFormView.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SolidFormView.d.ts","sourceRoot":"","sources":["../../../../src/components/core/form/SolidFormView.tsx"],"names":[],"mappings":"AAiEA,MAAM,MAAM,kBAAkB,GAAG;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,gBAAgB,CAAC,EAAE,GAAG,CAAC;IACvB,mBAAmB,CAAC,EAAE,GAAG,CAAA;IACzB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,gCAAgC,CAAC,EAAE,OAAO,CAAC;IAC3C,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAChC,CAAC;AA6IF,eAAO,MAAM,uBAAuB,WAAY,GAAG,EAAE,KAAG,GAQvD,CAAA;AACD,eAAO,MAAM,sBAAsB,QAAS,MAAM,uBAAuB,OAAO,MAAM,EAAE,GAAG,CAAC,QAa3F,CAAC;AAkXF,QAAA,MAAM,aAAa,WAAY,kBAAkB,4CA8/ChD,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -96,6 +96,8 @@ import { useDispatch } from "react-redux";
|
|
|
96
96
|
import { SolidButton, SolidConfirmDialog } from "../../shad-cn-ui";
|
|
97
97
|
import { SolidDialog, SolidDialogBody, SolidDialogClose, SolidDialogHeader, SolidDialogSeparator, SolidDialogTitle } from "../../shad-cn-ui/SolidDialog";
|
|
98
98
|
import { SolidHeaderRequestStatus } from "../../common/SolidHeaderRequestStatus";
|
|
99
|
+
import { eventBus } from "../../../helpers/eventBus";
|
|
100
|
+
import { ADMIN_VIEW_REFRESH_REQUESTED, isMatchingAdminViewRefresh } from "../../../helpers/adminViewRefresh";
|
|
99
101
|
var LAYOUT_CLASSNAME_MAPPER = {
|
|
100
102
|
grid: "flex flex-wrap",
|
|
101
103
|
formgrid: "flex-wrap",
|
|
@@ -1047,6 +1049,18 @@ var SolidFormView = function (params) {
|
|
|
1047
1049
|
var _43 = useGetSolidEntityByIdQuery({ id: params.id, qs: formViewDataQs }, {
|
|
1048
1050
|
skip: params.id === 'new'
|
|
1049
1051
|
}), solidFormViewData = _43.data, solidFormViewDataIsLoading = _43.isLoading, refetchSolidFormViewData = _43.refetch;
|
|
1052
|
+
useEffect(function () { return eventBus.on(ADMIN_VIEW_REFRESH_REQUESTED, function (request) {
|
|
1053
|
+
if (params.id === 'new')
|
|
1054
|
+
return;
|
|
1055
|
+
if (isMatchingAdminViewRefresh(request, {
|
|
1056
|
+
moduleName: params.moduleName,
|
|
1057
|
+
modelName: params.modelName,
|
|
1058
|
+
viewName: "form",
|
|
1059
|
+
recordId: params.id,
|
|
1060
|
+
})) {
|
|
1061
|
+
void refetchSolidFormViewData();
|
|
1062
|
+
}
|
|
1063
|
+
}); }, [params.id, params.moduleName, params.modelName, refetchSolidFormViewData]);
|
|
1050
1064
|
useEffect(function () {
|
|
1051
1065
|
if (params.id !== 'new') {
|
|
1052
1066
|
refetchSolidFormViewData();
|