@saltcorn/sbadmin2 0.7.1-beta.3 → 0.7.2-beta.2

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/index.js CHANGED
@@ -152,12 +152,13 @@ const sideBarItem = (currentUrl) => (item) => {
152
152
  * @param {string} currentUrl
153
153
  * @returns {function}
154
154
  */
155
- const sideBarSection = (currentUrl) => (section) => [
156
- section.section &&
157
- hr({ class: "sidebar-divider" }) +
158
- div({ class: "sidebar-heading" }, section.section),
159
- section.items.map(sideBarItem(currentUrl)).join(""),
160
- ];
155
+ const sideBarSection = (currentUrl) => (section) =>
156
+ [
157
+ section.section &&
158
+ hr({ class: "sidebar-divider" }) +
159
+ div({ class: "sidebar-heading" }, section.section),
160
+ section.items.map(sideBarItem(currentUrl)).join(""),
161
+ ];
161
162
 
162
163
  /**
163
164
  * @param {object} brand
@@ -327,11 +328,11 @@ const wrapIt = (headers, title, bodyAttr, rest) =>
327
328
  <meta charset="utf-8">
328
329
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
329
330
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
330
- <link rel="stylesheet" href="/plugins/pubdeps/sbadmin2/startbootstrap-sb-admin-2-bs5/4.1.5-beta.0/vendor/fontawesome-free/css/all.min.css">
331
+ <link rel="stylesheet" href="/plugins/pubdeps/sbadmin2/startbootstrap-sb-admin-2-bs5/4.1.5-beta.5/vendor/fontawesome-free/css/all.min.css">
331
332
  <link href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i" rel="stylesheet">
332
333
 
333
334
  <!-- Custom styles for this template-->
334
- <link rel="stylesheet" href="/plugins/pubdeps/sbadmin2/startbootstrap-sb-admin-2-bs5/4.1.5-beta.0/css/sb-admin-2.css">
335
+ <link rel="stylesheet" href="/plugins/pubdeps/sbadmin2/startbootstrap-sb-admin-2-bs5/4.1.5-beta.5/css/sb-admin-2.css">
335
336
  ${headersInHead(headers)}
336
337
  <title>${text(title)}</title>
337
338
  </head>
@@ -340,9 +341,9 @@ const wrapIt = (headers, title, bodyAttr, rest) =>
340
341
  <script src="/static_assets/${
341
342
  db.connectObj.version_tag
342
343
  }/jquery-3.6.0.min.js"></script>
343
- <script src="/plugins/pubdeps/sbadmin2/startbootstrap-sb-admin-2-bs5/4.1.5-beta.0/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
344
- <script src="/plugins/pubdeps/sbadmin2/startbootstrap-sb-admin-2-bs5/4.1.5-beta.0/vendor/jquery-easing/jquery.easing.min.js"></script>
345
- <script src="/plugins/pubdeps/sbadmin2/startbootstrap-sb-admin-2-bs5/4.1.5-beta.0/js/sb-admin-2.min.js"></script>
344
+ <script src="/plugins/pubdeps/sbadmin2/startbootstrap-sb-admin-2-bs5/4.1.5-beta.5/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
345
+ <script src="/plugins/pubdeps/sbadmin2/startbootstrap-sb-admin-2-bs5/4.1.5-beta.5/vendor/jquery-easing/jquery.easing.min.js"></script>
346
+ <script src="/plugins/pubdeps/sbadmin2/startbootstrap-sb-admin-2-bs5/4.1.5-beta.5/js/sb-admin-2.min.js"></script>
346
347
  ${headersInBody(headers)}
347
348
  </body>
348
349
  </html>`;
@@ -388,7 +389,7 @@ const authWrap = ({
388
389
  </div>
389
390
  ${renderForm(formModify(form), csrfToken)}
390
391
  ${renderAuthLinks(authLinks)}
391
- ${afterForm}
392
+ ${afterForm ? afterForm : ""}
392
393
  </div>
393
394
  </div>
394
395
  </div>
@@ -427,7 +428,7 @@ const wrap = ({
427
428
  title,
428
429
  `id="page-top" class="${bodyClass || ""}"`,
429
430
  `<div id="wrapper">
430
- ${sidebar(brand, menu, currentUrl)}
431
+ ${db.is_node ? sidebar(brand, menu, currentUrl) : ""}
431
432
 
432
433
  <div id="content-wrapper" class="d-flex flex-column">
433
434
  <div id="content">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saltcorn/sbadmin2",
3
- "version": "0.7.1-beta.3",
3
+ "version": "0.7.2-beta.2",
4
4
  "description": "SB Admin 2 layout plugin",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -9,14 +9,14 @@
9
9
  "clean": "echo \"Error: no TypeScript support yet\""
10
10
  },
11
11
  "dependencies": {
12
- "@saltcorn/data": "0.7.1-beta.3",
13
- "@saltcorn/markup": "0.7.1-beta.3",
14
- "startbootstrap-sb-admin-2-bs5": "^4.1.5-beta.3"
12
+ "@saltcorn/data": "0.7.2-beta.2",
13
+ "@saltcorn/markup": "0.7.2-beta.2",
14
+ "startbootstrap-sb-admin-2-bs5": "^4.1.5-beta.5"
15
15
  },
16
16
  "author": "Tom Nielsen",
17
17
  "license": "MIT",
18
18
  "devDependencies": {
19
- "jest": "^25.1.0"
19
+ "jest": "26.6.3"
20
20
  },
21
21
  "repository": "github:saltcorn/saltcorn",
22
22
  "jest": {
@@ -0,0 +1,31 @@
1
+ const { join } = require("path");
2
+
3
+ module.exports = {
4
+ optimization: {
5
+ minimize: false, // debug
6
+ splitChunks: {
7
+ chunks: "all",
8
+ name: "common_chunks",
9
+ },
10
+ },
11
+ entry: {
12
+ sbadmin2: {
13
+ import: join(__dirname, "./index.js"),
14
+ dependOn: ["data", "markup"],
15
+ },
16
+ },
17
+ output: {
18
+ path: __dirname,
19
+ filename: "bundle/[name].bundle.js",
20
+ libraryTarget: "umd",
21
+ library: ["saltcorn", "[name]"],
22
+ },
23
+ module: {
24
+ rules: [
25
+ {
26
+ test: /\.js$/,
27
+ exclude: /node_modules/,
28
+ },
29
+ ],
30
+ },
31
+ };