@solidxai/core-ui 0.1.4 → 0.1.5-beta.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"SolidAdmin.d.ts","sourceRoot":"","sources":["../../../src/components/common/SolidAdmin.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,UAAU,+CAwMtB,CAAC"}
1
+ {"version":3,"file":"SolidAdmin.d.ts","sourceRoot":"","sources":["../../../src/components/common/SolidAdmin.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,UAAU,+CAgMtB,CAAC"}
@@ -1,10 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { Message } from "primereact/message";
3
2
  import { env } from "../../adapters/env";
4
3
  import SolidLogo from '../../resources/images/SolidXLogo.svg';
5
4
  export var SolidAdmin = function () {
6
5
  var redirectUrl = env("NEXT_PUBLIC_LOGIN_REDIRECT_URL");
7
6
  var hasRedirect = Boolean(redirectUrl);
8
- return (_jsxs(_Fragment, { children: [_jsx("style", { children: "\n @import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;1,400&family=DM+Sans:wght@300;400;500&display=swap');\n\n .solid-welcome {\n min-height: 100vh;\n background: #FFF;\n display: flex;\n align-items: center;\n justify-content: center;\n font-family: 'DM Sans', sans-serif;\n padding: 2rem;\n }\n\n .welcome-card {\n text-align: center;\n max-width: 560px;\n width: 100%;\n }\n\n\n .logo-wrap {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 56px;\n height: 56px;\n background: #1A1A1A;\n border-radius: 14px;\n margin-bottom: 2rem;\n }\n\n .logo-letter {\n font-family: 'Lora', serif;\n font-weight: 500;\n font-size: 1.5rem;\n color: #FAFAF8;\n letter-spacing: -0.02em;\n }\n\n .welcome-eyebrow {\n font-size: 0.72rem;\n font-weight: 500;\n letter-spacing: 0.12em;\n text-transform: uppercase;\n color: #A0A096;\n margin-bottom: 0.85rem;\n }\n\n .welcome-title {\n font-family: 'Lora', serif;\n font-size: 2.4rem;\n font-weight: 400;\n color: #1A1A1A;\n line-height: 1.2;\n margin-bottom: 1.25rem;\n letter-spacing: -0.02em;\n }\n\n .welcome-title em {\n font-style: italic;\n color: #555550;\n }\n\n .divider {\n width: 36px;\n height: 1.5px;\n background: #D4D4CC;\n margin: 0 auto 1.25rem;\n }\n\n .welcome-desc {\n font-size: 0.975rem;\n font-weight: 300;\n color: #6E6E66;\n line-height: 1.75;\n margin-bottom: 2.25rem;\n }\n\n .features-row {\n display: flex;\n justify-content: center;\n gap: 1rem;\n flex-wrap: wrap;\n }\n\n .feature-pill {\n font-size: 0.78rem;\n font-weight: 400;\n color: #7A7A72;\n background: #F0F0EC;\n border: 1px solid #E4E4DF;\n border-radius: 100px;\n padding: 0.35rem 0.9rem;\n letter-spacing: 0.01em;\n transition: background 0.2s, color 0.2s;\n cursor: default;\n }\n\n .feature-pill:hover {\n background: #E8E8E3;\n color: #3A3A35;\n }\n\n .hint {\n margin-top: 2.5rem;\n font-size: 0.78rem;\n color: #B0B0A8;\n font-weight: 300;\n }\n\n .hint span {\n display: inline-block;\n background: #EDEDE9;\n border: 1px solid #E0E0DB;\n border-radius: 5px;\n padding: 0.1rem 0.45rem;\n font-size: 0.72rem;\n color: #8A8A82;\n font-family: monospace;\n vertical-align: middle;\n }\n " }), _jsxs("div", { className: "solid-welcome", children: [!hasRedirect && (_jsx("div", { className: "mb-3", children: _jsx(Message, { severity: "warn", text: "Default redirect URL is not configured. Please ask your system administrator to set VITE_LOGIN_REDIRECT_URL." }) })), hasRedirect && (_jsxs("div", { className: "welcome-card", children: [_jsx("img", { alt: "solid logo", src: SolidLogo, className: "mb-5 w-6rem flex-shrink-0" }), _jsx("p", { className: "welcome-eyebrow", children: "Admin Console" }), _jsxs("h1", { className: "welcome-title", children: ["Welcome to ", _jsx("em", { children: "SolidX" })] }), _jsx("div", { className: "divider" }), _jsx("p", { className: "welcome-desc", children: "Manage your modules, models, views, and permissions from one place. Use the navigation on the left to explore and configure your application." }), _jsx("div", { className: "features-row", children: ["Modules", "Models", "Views", "Permissions", "Settings"].map(function (label) { return (_jsx("span", { className: "feature-pill", children: label }, label)); }) }), _jsxs("p", { className: "hint", children: ["Get started by selecting a section from the ", _jsx("span", { children: "left nav" })] })] }))] })] }));
7
+ return (_jsxs(_Fragment, { children: [_jsx("style", { children: "\n @import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;1,400&family=DM+Sans:wght@300;400;500&display=swap');\n\n .solid-welcome {\n min-height: 100vh;\n background: #FFF;\n display: flex;\n align-items: center;\n justify-content: center;\n font-family: 'DM Sans', sans-serif;\n padding: 2rem;\n }\n\n .welcome-card {\n text-align: center;\n max-width: 560px;\n width: 100%;\n }\n\n\n .logo-wrap {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 56px;\n height: 56px;\n background: #1A1A1A;\n border-radius: 14px;\n margin-bottom: 2rem;\n }\n\n .logo-letter {\n font-family: 'Lora', serif;\n font-weight: 500;\n font-size: 1.5rem;\n color: #FAFAF8;\n letter-spacing: -0.02em;\n }\n\n .welcome-eyebrow {\n font-size: 0.72rem;\n font-weight: 500;\n letter-spacing: 0.12em;\n text-transform: uppercase;\n color: #A0A096;\n margin-bottom: 0.85rem;\n }\n\n .welcome-title {\n font-family: 'Lora', serif;\n font-size: 2.4rem;\n font-weight: 400;\n color: #1A1A1A;\n line-height: 1.2;\n margin-bottom: 1.25rem;\n letter-spacing: -0.02em;\n }\n\n .welcome-title em {\n font-style: italic;\n color: #555550;\n }\n\n .divider {\n width: 36px;\n height: 1.5px;\n background: #D4D4CC;\n margin: 0 auto 1.25rem;\n }\n\n .welcome-desc {\n font-size: 0.975rem;\n font-weight: 300;\n color: #6E6E66;\n line-height: 1.75;\n margin-bottom: 2.25rem;\n }\n\n .features-row {\n display: flex;\n justify-content: center;\n gap: 1rem;\n flex-wrap: wrap;\n }\n\n .feature-pill {\n font-size: 0.78rem;\n font-weight: 400;\n color: #7A7A72;\n background: #F0F0EC;\n border: 1px solid #E4E4DF;\n border-radius: 100px;\n padding: 0.35rem 0.9rem;\n letter-spacing: 0.01em;\n transition: background 0.2s, color 0.2s;\n cursor: default;\n }\n\n .feature-pill:hover {\n background: #E8E8E3;\n color: #3A3A35;\n }\n\n .hint {\n margin-top: 2.5rem;\n font-size: 0.78rem;\n color: #B0B0A8;\n font-weight: 300;\n }\n\n .hint span {\n display: inline-block;\n background: #EDEDE9;\n border: 1px solid #E0E0DB;\n border-radius: 5px;\n padding: 0.1rem 0.45rem;\n font-size: 0.72rem;\n color: #8A8A82;\n font-family: monospace;\n vertical-align: middle;\n }\n " }), _jsx("div", { className: "solid-welcome", children: _jsxs("div", { className: "welcome-card", children: [_jsx("img", { alt: "solid logo", src: SolidLogo, className: "mb-5 w-6rem flex-shrink-0" }), _jsx("p", { className: "welcome-eyebrow", children: "Admin Console" }), _jsxs("h1", { className: "welcome-title", children: ["Welcome to ", _jsx("em", { children: "SolidX" })] }), _jsx("div", { className: "divider" }), _jsx("p", { className: "welcome-desc", children: "Manage your modules, models, views, and permissions from one place. Use the navigation on the left to explore and configure your application." }), _jsx("div", { className: "features-row", children: ["Modules", "Models", "Views", "Permissions", "Settings"].map(function (label) { return (_jsx("span", { className: "feature-pill", children: label }, label)); }) }), _jsxs("p", { className: "hint", children: ["Get started by selecting a section from the ", _jsx("span", { children: "left nav" })] })] }) })] }));
9
8
  };
10
9
  //# sourceMappingURL=SolidAdmin.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SolidAdmin.js","sourceRoot":"","sources":["../../../src/components/common/SolidAdmin.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AACzC,OAAO,SAAS,MAAM,uCAAuC,CAAA;AAE7D,MAAM,CAAC,IAAM,UAAU,GAAG;IACxB,IAAM,WAAW,GAAG,GAAG,CAAC,gCAAgC,CAAC,CAAC;IAC1D,IAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAEzC,OAAO,CACL,8BACE,0BAAQ,qgGAyHP,GAAS,EA0BV,eAAK,SAAS,EAAC,eAAe,aAC3B,CAAC,WAAW,IAAI,CACf,cAAK,SAAS,EAAC,MAAM,YACnB,KAAC,OAAO,IACN,QAAQ,EAAC,MAAM,EACf,IAAI,EAAC,8GAA8G,GACnH,GACE,CACP,EACA,WAAW,IAAI,CACd,eAAK,SAAS,EAAC,cAAc,aAE3B,cACE,GAAG,EAAC,YAAY,EAChB,GAAG,EAAE,SAAS,EACd,SAAS,EAAC,2BAA2B,GACrC,EAEF,YAAG,SAAS,EAAC,iBAAiB,8BAAkB,EAEhD,cAAI,SAAS,EAAC,eAAe,4BAChB,kCAAe,IACvB,EAEL,cAAK,SAAS,EAAC,SAAS,GAAG,EAE3B,YAAG,SAAS,EAAC,cAAc,8JAIvB,EAEJ,cAAK,SAAS,EAAC,cAAc,YAC1B,CAAC,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,EAAE,UAAU,CAAC,CAAC,GAAG,CAAC,UAAC,KAAK,IAAK,OAAA,CACxE,eAAkB,SAAS,EAAC,cAAc,YAAE,KAAK,IAAtC,KAAK,CAAyC,CAC1D,EAFyE,CAEzE,CAAC,GACE,EAEN,aAAG,SAAS,EAAC,MAAM,6DAC2B,sCAAqB,IAC/D,IAEA,CACP,IACG,IACL,CACJ,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Message } from \"primereact/message\";\nimport { env } from \"../../adapters/env\";\nimport SolidLogo from '../../resources/images/SolidXLogo.svg'\n\nexport const SolidAdmin = () => {\n const redirectUrl = env(\"NEXT_PUBLIC_LOGIN_REDIRECT_URL\");\n const hasRedirect = Boolean(redirectUrl);\n\n return (\n <>\n <style>{`\n @import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;1,400&family=DM+Sans:wght@300;400;500&display=swap');\n\n .solid-welcome {\n min-height: 100vh;\n background: #FFF;\n display: flex;\n align-items: center;\n justify-content: center;\n font-family: 'DM Sans', sans-serif;\n padding: 2rem;\n }\n\n .welcome-card {\n text-align: center;\n max-width: 560px;\n width: 100%;\n }\n\n\n .logo-wrap {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 56px;\n height: 56px;\n background: #1A1A1A;\n border-radius: 14px;\n margin-bottom: 2rem;\n }\n\n .logo-letter {\n font-family: 'Lora', serif;\n font-weight: 500;\n font-size: 1.5rem;\n color: #FAFAF8;\n letter-spacing: -0.02em;\n }\n\n .welcome-eyebrow {\n font-size: 0.72rem;\n font-weight: 500;\n letter-spacing: 0.12em;\n text-transform: uppercase;\n color: #A0A096;\n margin-bottom: 0.85rem;\n }\n\n .welcome-title {\n font-family: 'Lora', serif;\n font-size: 2.4rem;\n font-weight: 400;\n color: #1A1A1A;\n line-height: 1.2;\n margin-bottom: 1.25rem;\n letter-spacing: -0.02em;\n }\n\n .welcome-title em {\n font-style: italic;\n color: #555550;\n }\n\n .divider {\n width: 36px;\n height: 1.5px;\n background: #D4D4CC;\n margin: 0 auto 1.25rem;\n }\n\n .welcome-desc {\n font-size: 0.975rem;\n font-weight: 300;\n color: #6E6E66;\n line-height: 1.75;\n margin-bottom: 2.25rem;\n }\n\n .features-row {\n display: flex;\n justify-content: center;\n gap: 1rem;\n flex-wrap: wrap;\n }\n\n .feature-pill {\n font-size: 0.78rem;\n font-weight: 400;\n color: #7A7A72;\n background: #F0F0EC;\n border: 1px solid #E4E4DF;\n border-radius: 100px;\n padding: 0.35rem 0.9rem;\n letter-spacing: 0.01em;\n transition: background 0.2s, color 0.2s;\n cursor: default;\n }\n\n .feature-pill:hover {\n background: #E8E8E3;\n color: #3A3A35;\n }\n\n .hint {\n margin-top: 2.5rem;\n font-size: 0.78rem;\n color: #B0B0A8;\n font-weight: 300;\n }\n\n .hint span {\n display: inline-block;\n background: #EDEDE9;\n border: 1px solid #E0E0DB;\n border-radius: 5px;\n padding: 0.1rem 0.45rem;\n font-size: 0.72rem;\n color: #8A8A82;\n font-family: monospace;\n vertical-align: middle;\n }\n `}</style>\n\n {/* <div className=\"flex flex-column align-items-center justify-content-center min-h-screen bg-white\">\n {!hasRedirect && (\n <div className=\"mb-3\">\n <Message\n severity=\"warn\"\n text=\"Default redirect URL is not configured. Please ask your system administrator to set VITE_LOGIN_REDIRECT_URL.\"\n />\n </div>\n )}\n {hasRedirect && (\n <>\n <img\n alt=\"solid logo\"\n src={SolidLogo}\n className=\"mb-5 w-6rem flex-shrink-0\"\n />\n <h1 className=\"mt-0 mb-3\">Welcome to SolidX</h1>\n <p className=\"text-600 line-height-3 mt-0 mb-5 text-xl w-5 text-center\">\n SolidX is the admin console for managing modules, models, views, and permissions. Use the\n left navigation to explore modules, configure settings, and build your app.\n </p>\n </>\n )}\n </div> */}\n <div className=\"solid-welcome\">\n {!hasRedirect && (\n <div className=\"mb-3\">\n <Message\n severity=\"warn\"\n text=\"Default redirect URL is not configured. Please ask your system administrator to set VITE_LOGIN_REDIRECT_URL.\"\n />\n </div>\n )}\n {hasRedirect && (\n <div className=\"welcome-card\">\n\n <img\n alt=\"solid logo\"\n src={SolidLogo}\n className=\"mb-5 w-6rem flex-shrink-0\"\n />\n\n <p className=\"welcome-eyebrow\">Admin Console</p>\n\n <h1 className=\"welcome-title\">\n Welcome to <em>SolidX</em>\n </h1>\n\n <div className=\"divider\" />\n\n <p className=\"welcome-desc\">\n Manage your modules, models, views, and permissions\n from one place. Use the navigation on the left to\n explore and configure your application.\n </p>\n\n <div className=\"features-row\">\n {[\"Modules\", \"Models\", \"Views\", \"Permissions\", \"Settings\"].map((label) => (\n <span key={label} className=\"feature-pill\">{label}</span>\n ))}\n </div>\n\n <p className=\"hint\">\n Get started by selecting a section from the <span>left nav</span>\n </p>\n\n </div>\n )}\n </div>\n </>\n );\n};\n"]}
1
+ {"version":3,"file":"SolidAdmin.js","sourceRoot":"","sources":["../../../src/components/common/SolidAdmin.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AACzC,OAAO,SAAS,MAAM,uCAAuC,CAAA;AAE7D,MAAM,CAAC,IAAM,UAAU,GAAG;IACxB,IAAM,WAAW,GAAG,GAAG,CAAC,gCAAgC,CAAC,CAAC;IAC1D,IAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAEzC,OAAO,CACL,8BACE,0BAAQ,qgGAyHP,GAAS,EA0BV,cAAK,SAAS,EAAC,eAAe,YAE5B,eAAK,SAAS,EAAC,cAAc,aAE3B,cACE,GAAG,EAAC,YAAY,EAChB,GAAG,EAAE,SAAS,EACd,SAAS,EAAC,2BAA2B,GACrC,EAEF,YAAG,SAAS,EAAC,iBAAiB,8BAAkB,EAEhD,cAAI,SAAS,EAAC,eAAe,4BAChB,kCAAe,IACvB,EAEL,cAAK,SAAS,EAAC,SAAS,GAAG,EAE3B,YAAG,SAAS,EAAC,cAAc,8JAIvB,EAEJ,cAAK,SAAS,EAAC,cAAc,YAC1B,CAAC,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,EAAE,UAAU,CAAC,CAAC,GAAG,CAAC,UAAC,KAAK,IAAK,OAAA,CACxE,eAAkB,SAAS,EAAC,cAAc,YAAE,KAAK,IAAtC,KAAK,CAAyC,CAC1D,EAFyE,CAEzE,CAAC,GACE,EAEN,aAAG,SAAS,EAAC,MAAM,6DAC2B,sCAAqB,IAC/D,IAEA,GAEF,IACL,CACJ,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Message } from \"primereact/message\";\nimport { env } from \"../../adapters/env\";\nimport SolidLogo from '../../resources/images/SolidXLogo.svg'\n\nexport const SolidAdmin = () => {\n const redirectUrl = env(\"NEXT_PUBLIC_LOGIN_REDIRECT_URL\");\n const hasRedirect = Boolean(redirectUrl);\n\n return (\n <>\n <style>{`\n @import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;1,400&family=DM+Sans:wght@300;400;500&display=swap');\n\n .solid-welcome {\n min-height: 100vh;\n background: #FFF;\n display: flex;\n align-items: center;\n justify-content: center;\n font-family: 'DM Sans', sans-serif;\n padding: 2rem;\n }\n\n .welcome-card {\n text-align: center;\n max-width: 560px;\n width: 100%;\n }\n\n\n .logo-wrap {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 56px;\n height: 56px;\n background: #1A1A1A;\n border-radius: 14px;\n margin-bottom: 2rem;\n }\n\n .logo-letter {\n font-family: 'Lora', serif;\n font-weight: 500;\n font-size: 1.5rem;\n color: #FAFAF8;\n letter-spacing: -0.02em;\n }\n\n .welcome-eyebrow {\n font-size: 0.72rem;\n font-weight: 500;\n letter-spacing: 0.12em;\n text-transform: uppercase;\n color: #A0A096;\n margin-bottom: 0.85rem;\n }\n\n .welcome-title {\n font-family: 'Lora', serif;\n font-size: 2.4rem;\n font-weight: 400;\n color: #1A1A1A;\n line-height: 1.2;\n margin-bottom: 1.25rem;\n letter-spacing: -0.02em;\n }\n\n .welcome-title em {\n font-style: italic;\n color: #555550;\n }\n\n .divider {\n width: 36px;\n height: 1.5px;\n background: #D4D4CC;\n margin: 0 auto 1.25rem;\n }\n\n .welcome-desc {\n font-size: 0.975rem;\n font-weight: 300;\n color: #6E6E66;\n line-height: 1.75;\n margin-bottom: 2.25rem;\n }\n\n .features-row {\n display: flex;\n justify-content: center;\n gap: 1rem;\n flex-wrap: wrap;\n }\n\n .feature-pill {\n font-size: 0.78rem;\n font-weight: 400;\n color: #7A7A72;\n background: #F0F0EC;\n border: 1px solid #E4E4DF;\n border-radius: 100px;\n padding: 0.35rem 0.9rem;\n letter-spacing: 0.01em;\n transition: background 0.2s, color 0.2s;\n cursor: default;\n }\n\n .feature-pill:hover {\n background: #E8E8E3;\n color: #3A3A35;\n }\n\n .hint {\n margin-top: 2.5rem;\n font-size: 0.78rem;\n color: #B0B0A8;\n font-weight: 300;\n }\n\n .hint span {\n display: inline-block;\n background: #EDEDE9;\n border: 1px solid #E0E0DB;\n border-radius: 5px;\n padding: 0.1rem 0.45rem;\n font-size: 0.72rem;\n color: #8A8A82;\n font-family: monospace;\n vertical-align: middle;\n }\n `}</style>\n\n {/* <div className=\"flex flex-column align-items-center justify-content-center min-h-screen bg-white\">\n {!hasRedirect && (\n <div className=\"mb-3\">\n <Message\n severity=\"warn\"\n text=\"Default redirect URL is not configured. Please ask your system administrator to set VITE_LOGIN_REDIRECT_URL.\"\n />\n </div>\n )}\n {hasRedirect && (\n <>\n <img\n alt=\"solid logo\"\n src={SolidLogo}\n className=\"mb-5 w-6rem flex-shrink-0\"\n />\n <h1 className=\"mt-0 mb-3\">Welcome to SolidX</h1>\n <p className=\"text-600 line-height-3 mt-0 mb-5 text-xl w-5 text-center\">\n SolidX is the admin console for managing modules, models, views, and permissions. Use the\n left navigation to explore modules, configure settings, and build your app.\n </p>\n </>\n )}\n </div> */}\n <div className=\"solid-welcome\">\n\n <div className=\"welcome-card\">\n\n <img\n alt=\"solid logo\"\n src={SolidLogo}\n className=\"mb-5 w-6rem flex-shrink-0\"\n />\n\n <p className=\"welcome-eyebrow\">Admin Console</p>\n\n <h1 className=\"welcome-title\">\n Welcome to <em>SolidX</em>\n </h1>\n\n <div className=\"divider\" />\n\n <p className=\"welcome-desc\">\n Manage your modules, models, views, and permissions\n from one place. Use the navigation on the left to\n explore and configure your application.\n </p>\n\n <div className=\"features-row\">\n {[\"Modules\", \"Models\", \"Views\", \"Permissions\", \"Settings\"].map((label) => (\n <span key={label} className=\"feature-pill\">{label}</span>\n ))}\n </div>\n\n <p className=\"hint\">\n Get started by selecting a section from the <span>left nav</span>\n </p>\n\n </div>\n\n </div>\n </>\n );\n};\n"]}
@@ -156,49 +156,41 @@ export const SolidAdmin = () => {
156
156
  )}
157
157
  </div> */}
158
158
  <div className="solid-welcome">
159
- {!hasRedirect && (
160
- <div className="mb-3">
161
- <Message
162
- severity="warn"
163
- text="Default redirect URL is not configured. Please ask your system administrator to set VITE_LOGIN_REDIRECT_URL."
164
- />
165
- </div>
166
- )}
167
- {hasRedirect && (
168
- <div className="welcome-card">
169
159
 
170
- <img
171
- alt="solid logo"
172
- src={SolidLogo}
173
- className="mb-5 w-6rem flex-shrink-0"
174
- />
160
+ <div className="welcome-card">
175
161
 
176
- <p className="welcome-eyebrow">Admin Console</p>
162
+ <img
163
+ alt="solid logo"
164
+ src={SolidLogo}
165
+ className="mb-5 w-6rem flex-shrink-0"
166
+ />
177
167
 
178
- <h1 className="welcome-title">
179
- Welcome to <em>SolidX</em>
180
- </h1>
168
+ <p className="welcome-eyebrow">Admin Console</p>
181
169
 
182
- <div className="divider" />
183
-
184
- <p className="welcome-desc">
185
- Manage your modules, models, views, and permissions
186
- from one place. Use the navigation on the left to
187
- explore and configure your application.
188
- </p>
170
+ <h1 className="welcome-title">
171
+ Welcome to <em>SolidX</em>
172
+ </h1>
189
173
 
190
- <div className="features-row">
191
- {["Modules", "Models", "Views", "Permissions", "Settings"].map((label) => (
192
- <span key={label} className="feature-pill">{label}</span>
193
- ))}
194
- </div>
174
+ <div className="divider" />
195
175
 
196
- <p className="hint">
197
- Get started by selecting a section from the <span>left nav</span>
198
- </p>
176
+ <p className="welcome-desc">
177
+ Manage your modules, models, views, and permissions
178
+ from one place. Use the navigation on the left to
179
+ explore and configure your application.
180
+ </p>
199
181
 
182
+ <div className="features-row">
183
+ {["Modules", "Models", "Views", "Permissions", "Settings"].map((label) => (
184
+ <span key={label} className="feature-pill">{label}</span>
185
+ ))}
200
186
  </div>
201
- )}
187
+
188
+ <p className="hint">
189
+ Get started by selecting a section from the <span>left nav</span>
190
+ </p>
191
+
192
+ </div>
193
+
202
194
  </div>
203
195
  </>
204
196
  );
@@ -1 +1 @@
1
- {"version":3,"file":"SolidChatter.d.ts","sourceRoot":"","sources":["../../../../src/components/core/chatter/SolidChatter.tsx"],"names":[],"mappings":"AAgBA,eAAO,MAAM,YAAY;uBAAwH,GAAG;QAAM,GAAG;2BAAyB,OAAO;sCAAoC,OAAO,KAAK,IAAI;;6CAuOhP,CAAA"}
1
+ {"version":3,"file":"SolidChatter.d.ts","sourceRoot":"","sources":["../../../../src/components/core/chatter/SolidChatter.tsx"],"names":[],"mappings":"AAgBA,eAAO,MAAM,YAAY;uBAAwH,GAAG;QAAM,GAAG;2BAAyB,OAAO;sCAAoC,OAAO,KAAK,IAAI;;6CAmOhP,CAAA"}
@@ -85,11 +85,7 @@ export var SolidChatter = function (_a) {
85
85
  return 'Yesterday';
86
86
  }
87
87
  else {
88
- return date.toLocaleDateString('en-US', {
89
- year: 'numeric',
90
- month: 'long',
91
- day: 'numeric'
92
- });
88
+ return dateString;
93
89
  }
94
90
  };
95
91
  var fetchData = function () { return __awaiter(void 0, void 0, void 0, function () {
@@ -1 +1 @@
1
- {"version":3,"file":"SolidChatter.js","sourceRoot":"","sources":["../../../../src/components/core/chatter/SolidChatter.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAc,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAA;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,EAAE,6BAA6B,EAAE,MAAM,2CAA2C,CAAA;AACzF,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAA;AAQnE,MAAM,CAAC,IAAM,YAAY,GAAG,UAAC,EAAgP;QAA9O,iBAAiB,uBAAA,EAAE,EAAE,QAAA,EAAE,qBAAqB,2BAAA,EAAE,wBAAwB,8BAAA,EAAE,sBAAiB,EAAjB,cAAc,mBAAC,EAAE,KAAA;IAC9G,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EAET,YAAY,GAAG,QAAQ,CAAC,MAAM,IAAI,CAC/B,cAAK,SAAS,EAAC,uCAAuC,YAClD,eACI,OAAO,EAAE,cAAc,EACvB,SAAS,EAAC,mDAAmD,EAC7D,KAAK,EAAE;oCACH,UAAU,EAAE,MAAM;oCAClB,YAAY,EAAE,KAAK;oCACnB,UAAU,EAAE,eAAe;oCAC3B,OAAO,EAAE,cAAc;iCAC1B,EACD,YAAY,EAAE,UAAC,CAAC;oCACZ,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,eAAe,GAAG,yBAAyB,CAAC;oCAClE,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,SAAS,GAAG,kBAAkB,CAAC;gCACzD,CAAC,EACD,YAAY,EAAE,UAAC,CAAC;oCACZ,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,eAAe,GAAG,aAAa,CAAC;oCACtD,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,SAAS,GAAG,eAAe,CAAC;gCACtD,CAAC,6BAGE,GACL,CACT,IACF,CACN,GACC,IACJ,CACT,CAAA;AACL,CAAC,CAAA","sourcesContent":["\nimport React, { useState, useEffect } from 'react'\nimport { SolidChatterHeader } from './SolidChatterHeader'\nimport { SolidChatterDateDivider } from './SolidChatterDateDivider'\nimport { SolidChatterMessageBox } from './SolidChatterMessageBox'\nimport { useLazyGetchatterMessageQuery } from '../../../redux/api/solidChatterMessageApi'\nimport qs from \"qs\";\nimport { ERROR_MESSAGES } from '../../../constants/error-messages'\nimport { permissionExpression } from '../../../helpers/permissions'\n\ninterface FilterState {\n name: string;\n startDate: Date | null;\n endDate: Date | null;\n}\n\nexport const SolidChatter = ({ modelSingularName, id, refreshChatterMessage, setRefreshChatterMessage, actionsAllowed=[] }: { modelSingularName: any, id: any, refreshChatterMessage: boolean, setRefreshChatterMessage: (value: boolean) => void , actionsAllowed?:string[]}) => { \n const [activeTab, setActiveTab] = useState<'email-message' | 'log' | null>('email-message');\n const [visibleBox, setVisibleBox] = useState<'email-message' | 'log' | null>(null);\n const [messages, setMessages] = useState<any[]>([]);\n const [limit, setLimit] = useState<number>(25);\n const [totalRecords, setTotalRecords] = useState<number>(0);\n const [filters, setFilters] = useState<FilterState>({\n name: '',\n startDate: null,\n endDate: null\n });\n\n const [getchatterMessage, { isLoading: isChatterLoading }] = useLazyGetchatterMessageQuery();\n\n useEffect(() => {\n if (refreshChatterMessage) {\n if (id !== 'new') {\n fetchData();\n setRefreshChatterMessage(false);\n }\n }\n }, [refreshChatterMessage]);\n\n useEffect(() => {\n if (id !== 'new') {\n fetchData();\n }\n }, [filters, limit]);\n\n const handleTabClick = (tab: 'email-message' | 'log') => {\n setActiveTab(tab);\n setVisibleBox(prev => (prev === tab ? null : tab));\n }\n\n const formatDate = (dateString: string) => {\n const date = new Date(dateString);\n const today = new Date();\n const yesterday = new Date(today);\n yesterday.setDate(yesterday.getDate() - 1);\n\n if (date.toDateString() === today.toDateString()) {\n return 'Today';\n } else if (date.toDateString() === yesterday.toDateString()) {\n return 'Yesterday';\n } else {\n return date.toLocaleDateString('en-US', {\n year: 'numeric',\n month: 'long',\n day: 'numeric'\n });\n }\n };\n\n const fetchData = async () => {\n try {\n const queryData: any = {\n populate: ['user', 'chatterMessageDetails'],\n limit: limit\n };\n\n if (filters.name) {\n queryData.filters = queryData.filters || {};\n queryData.filters['user'] = { fullName: { $containsi: filters.name }};\n }\n if (filters.startDate && filters.endDate) {\n queryData.filters = queryData.filters || {};\n queryData.filters.createdAt = {\n $between: [filters.startDate.toISOString(), filters.endDate.toISOString()]\n };\n } else if (filters.startDate) {\n queryData.filters = queryData.filters || {};\n queryData.filters.createdAt = { $gte: filters.startDate.toISOString() };\n } else if (filters.endDate) {\n queryData.filters = queryData.filters || {};\n queryData.filters.createdAt = { $lte: filters.endDate.toISOString() };\n }\n\n const queryString = qs.stringify(queryData, {\n encodeValuesOnly: true,\n });\n const response = await getchatterMessage({\n entityId: id,\n entityName: modelSingularName,\n qs: queryString\n }).unwrap();\n const processedMessages = response.data.records.map((msg: any) => {\n if (msg.messageType === 'custom') {\n // Custom message\n return {\n id: msg.id,\n user: msg.user?.fullName || \"System\",\n messageType: \"custom\",\n message: msg.messageBody,\n time: new Date(msg.createdAt).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' }),\n createdAt: msg.createdAt,\n date: formatDate(msg.createdAt),\n media: msg._media,\n messageSubType: msg.messageSubType,\n modelDisplayName: msg.modelDisplayName,\n modelUserKey: msg.modelUserKey\n };\n } else {\n // Audit message\n const auditRecord = msg.chatterMessageDetails?.map((detail: any) => ({\n field: detail.fieldName,\n fieldDisplayName: detail.fieldDisplayName,\n previous: detail.oldValueDisplay || detail.oldValue || 'None',\n current: detail.newValueDisplay || detail.newValue\n })) || [];\n\n return {\n id: msg.id,\n user: msg.user?.fullName || \"System\",\n messageType: \"audit\",\n time: new Date(msg.createdAt).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' }),\n auditRecord: auditRecord,\n createdAt: msg.createdAt,\n date: formatDate(msg.createdAt),\n messageSubType: msg.messageSubType,\n modelDisplayName: msg.modelDisplayName,\n modelUserKey: msg.modelUserKey,\n message: msg.messageBody,\n };\n }\n });\n setMessages(processedMessages);\n setTotalRecords(response?.data?.meta?.totalRecords || 0);\n } catch (error) {\n console.error(ERROR_MESSAGES.FETCHING_MESSAGE, error);\n }\n }\n\n const handleFilterChange = (newFilters: FilterState) => {\n setFilters({\n name: newFilters.name,\n startDate: newFilters.startDate,\n endDate: newFilters.endDate\n });\n setLimit(25);\n };\n\n const handleLoadMore = () => {\n setLimit(prevLimit => prevLimit + 25);\n };\n\n return (\n <div className='h-full'>\n <SolidChatterHeader\n id={id}\n refetch={fetchData}\n modelSingularName={modelSingularName}\n activeTab={activeTab}\n handleTabClick={handleTabClick}\n visibleBox={visibleBox}\n onFilterChange={handleFilterChange}\n />\n <div className='p-3' style={{\n overflowY: 'scroll',\n height:\n visibleBox === 'email-message'\n ? 'calc(100vh - 196px)'\n : visibleBox === 'log'\n ? 'calc(100vh - 172px)'\n : 'calc(100vh - 65px)',\n }}>\n {isChatterLoading ? (\n <div className='flex align-items-center justify-content-center h-full font-medium'>\n Loading...\n </div>\n ) : messages.length === 0 ? (\n <div className='flex align-items-center justify-content-center h-full font-medium'>\n No Data Available\n </div>\n ) : (\n <>\n {actionsAllowed.includes(`${permissionExpression('chatterMessage', 'findMany')}`) ?\n (messages.map((message, index) => {\n const showDateDivider = index === 0 || message.date !== messages[index - 1].date;\n return (\n <div key={message.id}>\n {showDateDivider && <SolidChatterDateDivider date={message.date} />}\n <SolidChatterMessageBox\n user={message.user}\n messageType={message.messageType}\n message={message.message}\n time={message.time}\n auditRecord={message.auditRecord}\n media={message.media}\n messageSubType={message.messageSubType}\n modelDisplayName={message.modelDisplayName}\n modelUserKey={message.modelUserKey}\n />\n </div>\n );\n }))\n : <div className=\"p-3\">\n <div className='p-3 border-round text-red-500 bg-red-50 flex align-items-center gap-3'>\n <i className=\"pi pi-exclamation-triangle\" />\n You do not have permission to view these messages.\n </div>\n </div>\n }\n {totalRecords > messages.length && (\n <div className='flex justify-content-center mt-3 mb-3'>\n <span\n onClick={handleLoadMore}\n className='cursor-pointer text-primary font-medium px-4 py-2'\n style={{\n userSelect: 'none',\n borderRadius: '6px',\n transition: 'all 0.2s ease',\n display: 'inline-block'\n }}\n onMouseEnter={(e) => {\n e.currentTarget.style.backgroundColor = 'rgba(59, 130, 246, 0.1)';\n e.currentTarget.style.transform = 'translateY(-1px)';\n }}\n onMouseLeave={(e) => {\n e.currentTarget.style.backgroundColor = 'transparent';\n e.currentTarget.style.transform = 'translateY(0)';\n }}\n >\n Load More...\n </span>\n </div>\n )}\n </>\n )}\n </div>\n </div>\n )\n}"]}
1
+ {"version":3,"file":"SolidChatter.js","sourceRoot":"","sources":["../../../../src/components/core/chatter/SolidChatter.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAc,EAAE,QAAQ,EAAE,SAAS,EAAE,MA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,OAAO,CAAC,OAAO,EACxB,IAAI,EAAE,OAAO,CAAC,IAAI,EAClB,WAAW,EAAE,OAAO,CAAC,WAAW,EAChC,KAAK,EAAE,OAAO,CAAC,KAAK,EACpB,cAAc,EAAE,OAAO,CAAC,cAAc,EACtC,gBAAgB,EAAE,OAAO,CAAC,gBAAgB,EAC1C,YAAY,EAAE,OAAO,CAAC,YAAY,GACpC,KAZI,OAAO,CAAC,EAAE,CAad,CACT,CAAC;4BACN,CAAC,CAAC,CAAC;4BACH,CAAC,CAAC,cAAK,SAAS,EAAC,KAAK,YAClB,eAAK,SAAS,EAAC,uEAAuE,aAClF,YAAG,SAAS,EAAC,4BAA4B,GAAG,0DAE1C,GACJ,EAET,YAAY,GAAG,QAAQ,CAAC,MAAM,IAAI,CAC/B,cAAK,SAAS,EAAC,uCAAuC,YAClD,eACI,OAAO,EAAE,cAAc,EACvB,SAAS,EAAC,mDAAmD,EAC7D,KAAK,EAAE;oCACH,UAAU,EAAE,MAAM;oCAClB,YAAY,EAAE,KAAK;oCACnB,UAAU,EAAE,eAAe;oCAC3B,OAAO,EAAE,cAAc;iCAC1B,EACD,YAAY,EAAE,UAAC,CAAC;oCACZ,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,eAAe,GAAG,yBAAyB,CAAC;oCAClE,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,SAAS,GAAG,kBAAkB,CAAC;gCACzD,CAAC,EACD,YAAY,EAAE,UAAC,CAAC;oCACZ,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,eAAe,GAAG,aAAa,CAAC;oCACtD,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,SAAS,GAAG,eAAe,CAAC;gCACtD,CAAC,6BAGE,GACL,CACT,IACF,CACN,GACC,IACJ,CACT,CAAA;AACL,CAAC,CAAA","sourcesContent":["\nimport React, { useState, useEffect } from 'react'\nimport { SolidChatterHeader } from './SolidChatterHeader'\nimport { SolidChatterDateDivider } from './SolidChatterDateDivider'\nimport { SolidChatterMessageBox } from './SolidChatterMessageBox'\nimport { useLazyGetchatterMessageQuery } from '../../../redux/api/solidChatterMessageApi'\nimport qs from \"qs\";\nimport { ERROR_MESSAGES } from '../../../constants/error-messages'\nimport { permissionExpression } from '../../../helpers/permissions'\n\ninterface FilterState {\n name: string;\n startDate: Date | null;\n endDate: Date | null;\n}\n\nexport const SolidChatter = ({ modelSingularName, id, refreshChatterMessage, setRefreshChatterMessage, actionsAllowed=[] }: { modelSingularName: any, id: any, refreshChatterMessage: boolean, setRefreshChatterMessage: (value: boolean) => void , actionsAllowed?:string[]}) => { \n const [activeTab, setActiveTab] = useState<'email-message' | 'log' | null>('email-message');\n const [visibleBox, setVisibleBox] = useState<'email-message' | 'log' | null>(null);\n const [messages, setMessages] = useState<any[]>([]);\n const [limit, setLimit] = useState<number>(25);\n const [totalRecords, setTotalRecords] = useState<number>(0);\n const [filters, setFilters] = useState<FilterState>({\n name: '',\n startDate: null,\n endDate: null\n });\n\n const [getchatterMessage, { isLoading: isChatterLoading }] = useLazyGetchatterMessageQuery();\n\n useEffect(() => {\n if (refreshChatterMessage) {\n if (id !== 'new') {\n fetchData();\n setRefreshChatterMessage(false);\n }\n }\n }, [refreshChatterMessage]);\n\n useEffect(() => {\n if (id !== 'new') {\n fetchData();\n }\n }, [filters, limit]);\n\n const handleTabClick = (tab: 'email-message' | 'log') => {\n setActiveTab(tab);\n setVisibleBox(prev => (prev === tab ? null : tab));\n }\n\n const formatDate = (dateString: string) => {\n const date = new Date(dateString);\n const today = new Date();\n const yesterday = new Date(today);\n yesterday.setDate(yesterday.getDate() - 1);\n\n if (date.toDateString() === today.toDateString()) {\n return 'Today';\n } else if (date.toDateString() === yesterday.toDateString()) {\n return 'Yesterday';\n } else {\n return dateString;\n }\n };\n\n const fetchData = async () => {\n try {\n const queryData: any = {\n populate: ['user', 'chatterMessageDetails'],\n limit: limit\n };\n\n if (filters.name) {\n queryData.filters = queryData.filters || {};\n queryData.filters['user'] = { fullName: { $containsi: filters.name }};\n }\n if (filters.startDate && filters.endDate) {\n queryData.filters = queryData.filters || {};\n queryData.filters.createdAt = {\n $between: [filters.startDate.toISOString(), filters.endDate.toISOString()]\n };\n } else if (filters.startDate) {\n queryData.filters = queryData.filters || {};\n queryData.filters.createdAt = { $gte: filters.startDate.toISOString() };\n } else if (filters.endDate) {\n queryData.filters = queryData.filters || {};\n queryData.filters.createdAt = { $lte: filters.endDate.toISOString() };\n }\n\n const queryString = qs.stringify(queryData, {\n encodeValuesOnly: true,\n });\n const response = await getchatterMessage({\n entityId: id,\n entityName: modelSingularName,\n qs: queryString\n }).unwrap();\n const processedMessages = response.data.records.map((msg: any) => {\n if (msg.messageType === 'custom') {\n // Custom message\n return {\n id: msg.id,\n user: msg.user?.fullName || \"System\",\n messageType: \"custom\",\n message: msg.messageBody,\n time: new Date(msg.createdAt).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' }),\n createdAt: msg.createdAt,\n date: formatDate(msg.createdAt),\n media: msg._media,\n messageSubType: msg.messageSubType,\n modelDisplayName: msg.modelDisplayName,\n modelUserKey: msg.modelUserKey\n };\n } else {\n // Audit message\n const auditRecord = msg.chatterMessageDetails?.map((detail: any) => ({\n field: detail.fieldName,\n fieldDisplayName: detail.fieldDisplayName,\n previous: detail.oldValueDisplay || detail.oldValue || 'None',\n current: detail.newValueDisplay || detail.newValue\n })) || [];\n\n return {\n id: msg.id,\n user: msg.user?.fullName || \"System\",\n messageType: \"audit\",\n time: new Date(msg.createdAt).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' }),\n auditRecord: auditRecord,\n createdAt: msg.createdAt,\n date: formatDate(msg.createdAt),\n messageSubType: msg.messageSubType,\n modelDisplayName: msg.modelDisplayName,\n modelUserKey: msg.modelUserKey,\n message: msg.messageBody,\n };\n }\n });\n setMessages(processedMessages);\n setTotalRecords(response?.data?.meta?.totalRecords || 0);\n } catch (error) {\n console.error(ERROR_MESSAGES.FETCHING_MESSAGE, error);\n }\n }\n\n const handleFilterChange = (newFilters: FilterState) => {\n setFilters({\n name: newFilters.name,\n startDate: newFilters.startDate,\n endDate: newFilters.endDate\n });\n setLimit(25);\n };\n\n const handleLoadMore = () => {\n setLimit(prevLimit => prevLimit + 25);\n };\n\n return (\n <div className='h-full'>\n <SolidChatterHeader\n id={id}\n refetch={fetchData}\n modelSingularName={modelSingularName}\n activeTab={activeTab}\n handleTabClick={handleTabClick}\n visibleBox={visibleBox}\n onFilterChange={handleFilterChange}\n />\n <div className='p-3' style={{\n overflowY: 'scroll',\n height:\n visibleBox === 'email-message'\n ? 'calc(100vh - 196px)'\n : visibleBox === 'log'\n ? 'calc(100vh - 172px)'\n : 'calc(100vh - 65px)',\n }}>\n {isChatterLoading ? (\n <div className='flex align-items-center justify-content-center h-full font-medium'>\n Loading...\n </div>\n ) : messages.length === 0 ? (\n <div className='flex align-items-center justify-content-center h-full font-medium'>\n No Data Available\n </div>\n ) : (\n <>\n {actionsAllowed.includes(`${permissionExpression('chatterMessage', 'findMany')}`) ?\n (messages.map((message, index) => {\n const showDateDivider = index === 0 || message.date !== messages[index - 1].date;\n return (\n <div key={message.id}>\n {showDateDivider && <SolidChatterDateDivider date={message.date} />}\n <SolidChatterMessageBox\n user={message.user}\n messageType={message.messageType}\n message={message.message}\n time={message.time}\n auditRecord={message.auditRecord}\n media={message.media}\n messageSubType={message.messageSubType}\n modelDisplayName={message.modelDisplayName}\n modelUserKey={message.modelUserKey}\n />\n </div>\n );\n }))\n : <div className=\"p-3\">\n <div className='p-3 border-round text-red-500 bg-red-50 flex align-items-center gap-3'>\n <i className=\"pi pi-exclamation-triangle\" />\n You do not have permission to view these messages.\n </div>\n </div>\n }\n {totalRecords > messages.length && (\n <div className='flex justify-content-center mt-3 mb-3'>\n <span\n onClick={handleLoadMore}\n className='cursor-pointer text-primary font-medium px-4 py-2'\n style={{\n userSelect: 'none',\n borderRadius: '6px',\n transition: 'all 0.2s ease',\n display: 'inline-block'\n }}\n onMouseEnter={(e) => {\n e.currentTarget.style.backgroundColor = 'rgba(59, 130, 246, 0.1)';\n e.currentTarget.style.transform = 'translateY(-1px)';\n }}\n onMouseLeave={(e) => {\n e.currentTarget.style.backgroundColor = 'transparent';\n e.currentTarget.style.transform = 'translateY(0)';\n }}\n >\n Load More...\n </span>\n </div>\n )}\n </>\n )}\n </div>\n </div>\n )\n}"]}
@@ -59,11 +59,7 @@ export const SolidChatter = ({ modelSingularName, id, refreshChatterMessage, set
59
59
  } else if (date.toDateString() === yesterday.toDateString()) {
60
60
  return 'Yesterday';
61
61
  } else {
62
- return date.toLocaleDateString('en-US', {
63
- year: 'numeric',
64
- month: 'long',
65
- day: 'numeric'
66
- });
62
+ return dateString;
67
63
  }
68
64
  };
69
65
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solidxai/core-ui",
3
- "version": "0.1.4",
3
+ "version": "0.1.5-beta.1",
4
4
  "scripts": {
5
5
  "prebuild": "npm run copy-resources && npm run copy-styles",
6
6
  "build": "tsc -p tsconfig.json && tsc-alias -p tsconfig.json",