@galadrim/galadmin 0.1.54 → 0.1.55
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/api.js +4 -3
- package/dist/api.js.map +1 -1
- package/dist/index.js +13 -1
- package/dist/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/config.d.ts +8 -1
- package/dist/utils/dbManager.d.ts +1 -0
- package/dist/utils/dbManager.js +61 -12
- package/dist/utils/dbManager.js.map +1 -1
- package/package.json +3 -1
- package/src/api.ts +3 -3
- package/src/front/ckeditor5-build/node_modules/semver/bin/semver.js +0 -0
- package/src/front/node_modules/.cache/.eslintcache +1 -1
- package/src/index.ts +13 -1
- package/src/types/config.ts +10 -2
- package/src/utils/dbManager.ts +64 -12
- package/src/front/ckeditor5-build/node_modules/.bin/semver +0 -12
- package/src/front/ckeditor5-build/node_modules/.bin/semver.cmd +0 -17
- package/src/front/ckeditor5-build/node_modules/.bin/semver.ps1 +0 -28
- package/src/front/node_modules/.cache/babel-loader/8a43a311e9031dfe234b8d67ae726a8fcec55a23838c5996ddb72a93ca071631.json +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"ast":null,"code":"import{useContext}from\"react\";import{Link,useHistory,useLocation}from\"react-router-dom\";import{ConfigContext}from'../contexts/ConfigContext';import{jsx as _jsx}from\"react/jsx-runtime\";import{Fragment as _Fragment}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var SidebarItemIconAndLabel=function SidebarItemIconAndLabel(_ref){var view=_ref.view;return/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"div\",{class:\"sidebarIcon\",children:/*#__PURE__*/_jsx(\"i\",{class:\"fas fa-\".concat(view.icon||\"square\")})}),/*#__PURE__*/_jsx(\"div\",{class:\"sidebarLabel\",children:view.label})]});};export default(function(){var location=useLocation();var config=useContext(ConfigContext);var history=useHistory();return/*#__PURE__*/_jsxs(\"div\",{class:\"sidebar\",children:[config.logo?/*#__PURE__*/_jsx(\"img\",{src:config.logo,class:\"logo\"}):null,/*#__PURE__*/_jsx(\"div\",{class:\"sidebarTitle\",children:config.name}),/*#__PURE__*/_jsx(\"div\",{class:\"sidebarSubtitle\",children:\"Back-office\"}),config.views.filter(function(view){return!view.hidden;}).map(function(view,i){if(view.type===\"link\"){return/*#__PURE__*/_jsx(\"a\",{href:view.src,children:/*#__PURE__*/_jsx(\"div\",{class:\"sidebarItem\",children:/*#__PURE__*/_jsx(\"div\",{children:/*#__PURE__*/_jsx(SidebarItemIconAndLabel,{view:view})})})},i);}else if(view.type===\"iframe\"){var isActive=location.pathname===\"/iframe/\".concat(i);return/*#__PURE__*/_jsx(Link,{to:\"/iframe/\".concat(i),children:/*#__PURE__*/_jsx(\"div\",{class:\"sidebarItem \".concat(isActive?\"active\":\"\"),children:/*#__PURE__*/_jsx(\"div\",{children:/*#__PURE__*/_jsx(SidebarItemIconAndLabel,{view:view})})})},i);}else if(view.type===\"custom\"){var _isActive=location.pathname===\"/customView/\".concat(i);return/*#__PURE__*/_jsx(Link,{to:\"/customView/\".concat(i),children:/*#__PURE__*/_jsx(\"div\",{class:\"sidebarItem \".concat(_isActive?\"active\":\"\"),children:/*#__PURE__*/_jsx(\"div\",{children:/*#__PURE__*/_jsx(SidebarItemIconAndLabel,{view:view})})})},i);}else if(view.type===\"table\"){// TODO: bug quand la vue 10 est sélectionnée, la 1 aussi\nvar _isActive2=location.pathname.startsWith(\"/records/\".concat(i))||location.pathname===\"/createRecord/\".concat(i)||location.pathname.startsWith(\"/record/\".concat(i))||location.pathname.startsWith(\"/editRecord/\".concat(i));return/*#__PURE__*/_jsx(\"div\",{onClick:function onClick(){return history.push(\"/records/\".concat(i));},children:/*#__PURE__*/_jsxs(\"div\",{class:\"sidebarItem \".concat(_isActive2?\"active\":\"\"),children:[/*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsx(\"div\",{class:\"notificationWrapper\"}),/*#__PURE__*/_jsx(SidebarItemIconAndLabel,{view:view})]}),view.subviews?/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"div\",{class:\"subviewsSeparator\"}),view.subviews.map(function(subview,j){var isActive=location.pathname==\"/records/\".concat(i,\"/\").concat(j);return/*#__PURE__*/_jsx(\"div\",{onClick:function onClick(e){history.push(\"/records/\".concat(i,\"/\").concat(j));e.stopPropagation();},children:/*#__PURE__*/_jsxs(\"div\",{\"data-subview-index\":j,class:isActive?\"active\":\"\",children:[/*#__PURE__*/_jsx(\"div\",{class:\"notificationWrapperForSubview\"}),subview.label]})});})]}):null]})},i);}}),!config.hideBranding?/*#__PURE__*/_jsxs(\"div\",{class:\"sidebarBranding\",children:[\"Made with \",/*#__PURE__*/_jsx(\"i\",{class:\"fas fa-heart\"}),\" by Galadrim\"]}):null]});});","map":{"version":3,"names":["useContext","Link","useHistory","useLocation","ConfigContext","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","SidebarItemIconAndLabel","_ref","view","children","class","concat","icon","label","location","config","history","logo","src","name","views","filter","hidden","map","i","type","href","isActive","pathname","to","startsWith","onClick","push","subviews","subview","j","e","stopPropagation","hideBranding"],"sources":["/home/runner/work/galadmin/galadmin/src/front/src/components/Sidebar.js"],"sourcesContent":["\nimport { useContext } from \"react\";\nimport {\n Link,\n useHistory,\n useLocation\n} from \"react-router-dom\";\nimport { ConfigContext } from '../contexts/ConfigContext'\n\nconst SidebarItemIconAndLabel = ({ view }) => (\n <>\n <div class=\"sidebarIcon\">\n <i class={`fas fa-${view.icon || \"square\"}`}></i>\n </div>\n <div class=\"sidebarLabel\">{view.label}</div>\n </>\n)\n\nexport default () => {\n const location = useLocation();\n const config = useContext(ConfigContext)\n const history = useHistory();\n\n return (\n <div class=\"sidebar\">\n {config.logo ? <img src={config.logo} class=\"logo\" /> : null}\n <div class=\"sidebarTitle\">{config.name}</div>\n <div class=\"sidebarSubtitle\">Back-office</div>\n {config.views.filter(view => !view.hidden).map((view, i) => {\n if (view.type === \"link\") {\n return (\n <a href={view.src} key={i}>\n <div class=\"sidebarItem\">\n <div>\n <SidebarItemIconAndLabel view={view} />\n </div>\n </div>\n </a>\n )\n } else if (view.type === \"iframe\") {\n const isActive = location.pathname === `/iframe/${i}`\n return (\n <Link to={`/iframe/${i}`} key={i}>\n <div class={`sidebarItem ${isActive ? \"active\" : \"\"}`}>\n <div>\n <SidebarItemIconAndLabel view={view} />\n </div>\n </div>\n </Link>\n )\n } else if (view.type === \"custom\") {\n const isActive = location.pathname === `/customView/${i}`\n return (\n <Link to={`/customView/${i}`} key={i}>\n <div class={`sidebarItem ${isActive ? \"active\" : \"\"}`}>\n <div>\n <SidebarItemIconAndLabel view={view} />\n </div>\n </div>\n </Link>\n )\n } else if (view.type === \"table\") {\n // TODO: bug quand la vue 10 est sélectionnée, la 1 aussi\n const isActive =\n location.pathname.startsWith(`/records/${i}`) ||\n location.pathname === `/createRecord/${i}` ||\n location.pathname.startsWith(`/record/${i}`) ||\n location.pathname.startsWith(`/editRecord/${i}`)\n return (\n <div onClick={() => history.push(`/records/${i}`)} key={i}>\n <div class={`sidebarItem ${isActive ? \"active\" : \"\"}`}>\n <div>\n <div class=\"notificationWrapper\"></div>\n <SidebarItemIconAndLabel view={view} />\n </div>\n {view.subviews ? (\n <>\n <div class=\"subviewsSeparator\"></div>\n {view.subviews.map((subview, j) => {\n const isActive = location.pathname == `/records/${i}/${j}`\n return (\n <div onClick={(e) => {\n history.push(`/records/${i}/${j}`);\n e.stopPropagation();\n }}>\n <div data-subview-index={j} class={isActive ? \"active\" : \"\"}>\n <div class=\"notificationWrapperForSubview\"></div>\n {subview.label}\n </div>\n </div>\n )\n })}\n </>\n ) : null}\n </div>\n </div>\n )\n }\n })}\n {!config.hideBranding ? (\n <div class=\"sidebarBranding\">Made with <i class=\"fas fa-heart\"></i> by Galadrim</div>\n ) : null}\n </div>\n )\n}"],"mappings":"AACA,OAASA,UAAU,KAAQ,OAAO,CACl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