@saltcorn/mobile-builder 1.6.0-rc.2 → 1.6.0-rc.4
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/package.json +8 -8
- package/dist/tests/bundle/any-bootstrap-theme.bundle.js +0 -71
- package/dist/tests/bundle/base_plugin.bundle.js +0 -160
- package/dist/tests/bundle/common_chunks.bundle.js +0 -16869
- package/dist/tests/bundle/data.bundle.js +0 -2308
- package/dist/tests/bundle/markup.bundle.js +0 -547
- package/dist/tests/bundle/sbadmin2.bundle.js +0 -50
- package/dist/tests/bundle/tabulator.bundle.js +0 -113
- package/dist/tests/versioncode.test.d.ts +0 -2
- package/dist/tests/versioncode.test.d.ts.map +0 -1
- package/dist/tests/versioncode.test.js +0 -24
- package/dist/tests/versioncode.test.js.map +0 -1
- package/dist/tests/webpack.test.d.ts +0 -2
- package/dist/tests/webpack.test.d.ts.map +0 -1
- package/dist/tests/webpack.test.js +0 -73
- package/dist/tests/webpack.test.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
3
|
-
* This devtool is neither made for production nor for readable output files.
|
|
4
|
-
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
|
5
|
-
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|
6
|
-
* or disable the default devtool with "devtool: false".
|
|
7
|
-
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
8
|
-
*/
|
|
9
|
-
(function webpackUniversalModuleDefinition(root, factory) {
|
|
10
|
-
if(typeof exports === 'object' && typeof module === 'object')
|
|
11
|
-
module.exports = factory();
|
|
12
|
-
else if(typeof define === 'function' && define.amd)
|
|
13
|
-
define([], factory);
|
|
14
|
-
else if(typeof exports === 'object')
|
|
15
|
-
exports["saltcorn"] = factory();
|
|
16
|
-
else
|
|
17
|
-
root["saltcorn"] = root["saltcorn"] || {}, root["saltcorn"]["sbadmin2"] = factory();
|
|
18
|
-
})(self, () => {
|
|
19
|
-
return (self["webpackChunksaltcorn"] = self["webpackChunksaltcorn"] || []).push([["sbadmin2"],{
|
|
20
|
-
|
|
21
|
-
/***/ "../saltcorn-sbadmin2/index.js"
|
|
22
|
-
/*!*************************************!*\
|
|
23
|
-
!*** ../saltcorn-sbadmin2/index.js ***!
|
|
24
|
-
\*************************************/
|
|
25
|
-
(module, __unused_webpack_exports, __webpack_require__) {
|
|
26
|
-
|
|
27
|
-
eval("{/**\n * @category saltcorn-sbadmin2\n * @module saltcorn-sbadmin2/index\n */\n\nconst {\n ul,\n li,\n a,\n span,\n hr,\n div,\n text,\n i,\n h6,\n h1,\n p,\n header,\n img,\n footer,\n button,\n form,\n input,\n} = __webpack_require__(/*! @saltcorn/markup/tags */ \"../saltcorn-markup/dist/tags.js\");\nconst renderLayout = __webpack_require__(/*! @saltcorn/markup/layout */ \"../saltcorn-markup/dist/layout.js\");\nconst { renderForm, link } = __webpack_require__(/*! @saltcorn/markup */ \"../saltcorn-markup/dist/index.js\");\nconst {\n toast,\n headersInHead,\n headersInBody,\n show_icon,\n activeChecker,\n} = __webpack_require__(/*! @saltcorn/markup/layout_utils */ \"../saltcorn-markup/dist/layout_utils.js\");\nconst db = __webpack_require__(/*! @saltcorn/data/db */ \"../saltcorn-data/dist/db/index.js\");\nconst { isNode } = __webpack_require__(/*! @saltcorn/data/utils */ \"../saltcorn-data/dist/utils.js\");\n\nconst verstring = \"@\" + (__webpack_require__(/*! ./package.json */ \"../saltcorn-sbadmin2/package.json\").version);\n\n/**\n * @param {string} currentUrl\n * @returns {function}\n */\nconst subItem = (currentUrl, isRTL) => (item) =>\n item.subitems\n ? div(\n { class: `dropdown-item btn-group ${isRTL ? \"dropstart\" : \"dropend\"}` },\n a(\n {\n type: \"button\",\n class: \"dropdown-item dropdown-toggle p-0\",\n \"data-bs-toggle\": \"dropdown\",\n \"aria-expanded\": \"false\",\n },\n item.label\n ),\n ul(\n { class: \"dropdown-menu\" },\n item.subitems.map((si1) => li(subItem(currentUrl, isRTL)(si1)))\n )\n )\n : item.link\n ? a(\n {\n class: [\n \"collapse-item\",\n active(currentUrl, item) && \"active\",\n item.class,\n ],\n href: text(item.link),\n target: item.target_blank ? \"_blank\" : undefined,\n ...(item.tooltip\n ? {\n \"data-bs-toggle\": \"tooltip\",\n \"data-bs-placement\": isRTL ? \"left\" : \"right\",\n title: item.tooltip,\n }\n : {}),\n },\n show_icon(item.icon, \"mr-05\"),\n item.label\n )\n : item.type === \"Separator\"\n ? hr({ class: \"sidebar-divider my-0\" })\n : h6({ class: \"collapse-header\" }, item.label);\n\n/**\n * @param {object} item\n * @returns {string}\n */\nconst labelToId = (item) => text(item.label.replace(\" \", \"\"));\n\n/**\n * @param {object} x\n * @param {object} s\n * @returns {object}\n */\nconst logit = (x, s) => {\n if (s) console.log(s, x);\n else console.log(x);\n return x;\n};\n\n/**\n * @param {string} currentUrl\n * @param {object} item\n * @returns {boolean}\n */\nconst active = (currentUrl, item) =>\n (item.link && activeChecker(item.link, currentUrl)) ||\n (item.altlinks && item.altlinks.some((l) => activeChecker(l, currentUrl))) ||\n (item.subitems &&\n item.subitems.some(\n (si) =>\n (si.link && activeChecker(si.link, currentUrl)) ||\n (si.altlinks && si.altlinks.some((l) => activeChecker(l, currentUrl)))\n ));\n\n/**\n * @param {string} currentUrl\n * @returns {function}\n */\nconst sideBarItem = (currentUrl, isRTL) => (item) => {\n const is_active = active(currentUrl, item);\n if (item.type === \"Separator\") return hr({ class: \"sidebar-divider my-0\" });\n return li(\n { class: [\"nav-item\", is_active && \"active\"] },\n item.subitems\n ? [\n a(\n {\n class: [\n \"nav-link\",\n !is_active && \"collapsed\",\n item.isUser && \"user-nav-section-with-span\",\n ],\n href: \"#\",\n \"data-bs-toggle\": \"collapse\",\n \"data-bs-target\": `#collapse${labelToId(item)}`,\n \"aria-expanded\": \"true\",\n \"aria-controls\": `collapse${labelToId(item)}`,\n ...(item.tooltip\n ? {\n \"data-bs-placement\": isRTL ? \"left\" : \"right\",\n title: item.tooltip,\n }\n : {}),\n },\n show_icon(item.icon),\n span(text(item.label))\n ),\n div(\n {\n id: `collapse${labelToId(item)}`,\n class: [\"collapse\", is_active && \"show\"],\n \"data-parent\": \"#accordionSidebar\",\n },\n div(\n { class: \"bg-white py-2 collapse-inner rounded\" },\n item.subitems.map(subItem(currentUrl, isRTL))\n )\n ),\n ]\n : item.link\n ? a(\n {\n class: \"nav-link\",\n href: text(item.link),\n target: item.target_blank ? \"_blank\" : undefined,\n ...(item.tooltip\n ? {\n \"data-bs-toggle\": \"tooltip\",\n \"data-bs-placement\": isRTL ? \"left\" : \"right\",\n title: item.tooltip,\n }\n : {}),\n },\n show_icon(item.icon),\n span(text(item.label))\n )\n : item.type === \"Search\"\n ? form(\n {\n action: \"/search\",\n class: \"menusearch ms-2 me-3\",\n method: \"get\",\n },\n div(\n { class: \"input-group search-bar\" },\n\n input({\n type: \"search\",\n class: \"form-control search-bar pl-2p5\",\n placeholder: item.label,\n id: \"inputq\",\n name: \"q\",\n \"aria-label\": \"Search\",\n \"aria-describedby\": \"button-search-submit\",\n }),\n\n button(\n {\n class: \"btn btn-outline-secondary search-bar\",\n type: \"submit\",\n },\n i({ class: \"fas fa-search\" })\n )\n )\n )\n : span({ class: \"nav-link\" }, text(item.label))\n );\n};\n\n/**\n * @param {string} currentUrl\n * @returns {function}\n */\nconst sideBarSection = (currentUrl, isRTL) => (section) => [\n section.section &&\n hr({ class: \"sidebar-divider\" }) +\n div({ class: \"sidebar-heading\" }, section.section),\n section.items.map(sideBarItem(currentUrl, isRTL)).join(\"\"),\n];\n\n/**\n * @param {object} brand\n * @param {string[]} sections\n * @param {string} currentUrl\n * @returns {ul}\n */\nconst sidebar = (brand, sections, currentUrl, isRTL) =>\n ul(\n {\n class: \"navbar-nav sidebar sidebar-dark accordion d-print-none\",\n id: \"accordionSidebar\",\n },\n a(\n {\n class: \"sidebar-brand d-flex align-items-center justify-content-center\",\n href: \"/\",\n },\n brand.logo &&\n div(\n { class: \"sidebar-brand-icon\" },\n img({ src: brand.logo, width: \"35\", height: \"35\", alt: \"Logo\" })\n ),\n div({ class: \"sidebar-brand-text mx-3\" }, brand.name)\n ),\n sections.map(sideBarSection(currentUrl, isRTL)),\n hr({ class: \"sidebar-divider d-none d-md-block\" }),\n div(\n { class: \"text-center d-none d-md-inline\" },\n button({\n class: \"rounded-circle border-0\",\n \"data-sidebar-toggler\": true,\n id: \"sidebarToggle\",\n \"aria-label\": \"Collapse sidebar menu\",\n })\n )\n );\n\n/**\n * @namespace\n * @category saltcorn-sbadmin2\n */\nconst blockDispatch = {\n /**\n *\n * @param {object} opts\n * @param {string} opts.title\n * @param {string} opts.blurb\n * @returns {div}\n */\n pageHeader: ({ title, blurb }) =>\n div(\n h1({ class: \"h3 mb-0 mt-2 text-gray-800\" }, title),\n blurb && p({ class: \"mb-0 text-gray-800\" }, blurb)\n ),\n /**\n * @param {object} opts\n * @param {string} opts.contents\n * @returns {div}\n */\n footer: ({ contents }) =>\n div(\n { class: \"container\" },\n footer(\n { id: \"footer\" },\n div({ class: \"row\" }, div({ class: \"col-sm-12\" }, contents))\n )\n ),\n /**\n * @param {object} opts\n * @param {string} opts.caption\n * @param {string} opts.blurb\n * @returns {header}\n */\n hero: ({ caption, blurb }) =>\n header(\n { class: \"masthead\" },\n div(\n { class: \"container h-100\" },\n div(\n {\n class:\n \"row h-100 align-items-center justify-content-center text-center\",\n },\n div(\n { class: \"col-lg-10 align-self-end\" },\n h1({ class: \"text-uppercase fw-bold\" }, caption),\n hr({ class: \"divider my-4\" })\n ),\n div(\n { class: \"col-lg-8 align-self-baseline\" },\n p({ class: \"fw-light mb-5\" }, blurb)\n /*a(\n {\n class: \"btn btn-primary btn-xl\",\n href: \"#about\"\n },\n \"Find Out More\"\n )*/\n )\n )\n )\n ),\n};\n\n/**\n * Render body\n * @param {string} title\n * @param {string|object} body\n * @param {*} role\n * @returns {string}\n */\nconst renderBody = (title, body, role, req) =>\n renderLayout({\n blockDispatch,\n role,\n req,\n layout: body,\n });\n\n/**\n * @param {object} authLinks\n * @returns {hr|a}\n */\nconst renderAuthLinks = (authLinks, req) => {\n const __ = req?.__ || ((s) => s);\n let links = [];\n if (authLinks.login)\n links.push(link(authLinks.login, __(\"Already have an account? Login!\")));\n if (authLinks.forgot)\n links.push(link(authLinks.forgot, __(\"Forgot password?\")));\n if (authLinks.signup)\n links.push(link(authLinks.signup, __(\"Create an account!\")));\n if (authLinks.publicUser)\n links.push(link(authLinks.publicUser, __(\"Continue as public user\")));\n const meth_links = (authLinks.methods || [])\n .map(({ url, icon, label }) =>\n a(\n { href: url, class: \"btn btn-secondary btn-user btn-block\" },\n icon || \"\",\n ` ${__(\"Login with %s\", label)}`\n )\n )\n .join(\"\");\n if (links.length === 0) return hr() + meth_links;\n else\n return (\n hr() +\n (meth_links ? meth_links + hr() : \"\") +\n links.map((l) => div({ class: \"text-center\" }, l)).join(\"\")\n );\n};\n\n/**\n * @param {Form} form\n * @returns {Form}\n */\nconst formModify = (form) => {\n form.formStyle = \"vert\";\n form.submitButtonClass = \"btn-primary btn-user btn-block\";\n return form;\n};\n\n/**\n * omit '/' in a mobile deployment (needed for ios)\n */\nconst safeSlash = () => (isNode() ? \"/\" : \"\");\n\nconst linkPrefix = () => (isNode() ? \"/plugins\" : \"sc_plugins\");\n\n/**\n * @param {*} headers\n * @param {string} title\n * @param {string} bodyAttr\n * @param {string} rest\n * @returns {string}\n */\nconst wrapIt = (headers, title, bodyAttr, rest, req) =>\n `<!doctype html>\n <html lang=\"${req?.getLocale()}\" ${req?.isRTL ? 'dir=\"rtl\"' : \"\"}>\n <head>\n <!-- Required meta tags -->\n <meta charset=\"utf-8\">\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\"> \n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1, shrink-to-fit=no\">\n <link rel=\"stylesheet\" href=\"${linkPrefix()}/public/sbadmin2${verstring}/fontawesome-free/css/all.min.css\">\n <link href=\"${linkPrefix()}/public/sbadmin2${verstring}/nunito/css/nunito/nunito-fontface.css\" rel=\"stylesheet\">\n\n <!-- Custom styles for this template-->\n <link rel=\"stylesheet\" href=\"${linkPrefix()}/public/sbadmin2${verstring}/sb-admin-2.min.css\">\n ${req?.isRTL ? `<link rel=\"stylesheet\" href=\"${linkPrefix()}/public/sbadmin2${verstring}/bootstrap.rtl.min.css\">` : \"\"}\n ${headersInHead(headers)}\n <title>${text(title)}</title>\n </head>\n <body ${bodyAttr}>\n ${rest}\n <script src=\"${safeSlash()}static_assets/${\n db.connectObj.version_tag\n }/jquery-3.6.0.min.js\"></script>\n <script src=\"${linkPrefix()}/public/sbadmin2${verstring}/bootstrap.bundle.min.js\"></script>\n <script src=\"${linkPrefix()}/public/sbadmin2${verstring}/jquery.easing.min.js\"></script>\n <script src=\"${linkPrefix()}/public/sbadmin2${verstring}/sb-admin-2.min.js\"></script>\n ${headersInBody(headers)}\n </body>\n </html>`;\n\n/**\n * @param {object} opts\n * @param {string} opts.title\n * @param {object[]} opts.alerts\n * @param {object} opts.form\n * @param {string} opts.afterForm\n * @param {*} opts.headers\n * @param {string} opts.csrfToken\n * @param {object} opts.authLinks\n * @returns {string}\n */\nconst authWrap = ({\n title,\n alerts,\n form,\n afterForm,\n headers,\n csrfToken,\n authLinks,\n bodyClass,\n req,\n}) =>\n wrapIt(\n headers,\n title,\n `class=\"bg-gradient-primary ${bodyClass || \"\"}\"`,\n `<div class=\"container\">\n <div class=\"row justify-content-center\">\n <div class=\"col-xl-10 col-lg-12 col-md-9\">\n <div class=\"card o-hidden border-0 shadow-lg my-5\">\n <div class=\"card-body p-2\">\n <div class=\"row\">\n <div class=\"col\">\n <div class=\"p-5\">\n <div id=\"alerts-area\">${/* deprecated */ \"\"}</div>\n <div class=\"text-center\">\n <h1 class=\"h4 text-gray-900 mb-4\">${title}</h1>\n </div>\n ${renderForm(formModify(form), csrfToken)}\n ${renderAuthLinks(authLinks, req)}\n ${afterForm ? afterForm : \"\"}\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div \n id=\"toasts-area\"\n class=\"toast-container position-fixed p-2 top-0 ${\n isNode() ? \"end-0\" : \"start-50\"\n }\n style: \"z-index: 9999;\"\n aria-live=\"polite\" \n aria-atomic=\"true\"\n >\n ${alerts.map((a) => toast(a.type, a.msg)).join(\"\")}\n </div>\n </div>`,\n req\n );\n\n/**\n * @param {object} opts\n * @param {string} opts.title\n * @param {menu} opts.menu\n * @param {object} opts.brand\n * @param {object[]} opts.alerts\n * @param {string} opts.currentUrl\n * @param {string|object} opts.body\n * @param {*} opts.headers\n * @param {*} opts.role\n * @returns {string}\n */\nconst wrap = ({\n title,\n menu,\n brand,\n alerts,\n currentUrl,\n body,\n headers,\n role,\n bodyClass,\n req,\n}) =>\n wrapIt(\n headers,\n title,\n `id=\"page-top\" class=\"${bodyClass || \"\"}\"`,\n `<div id=\"wrapper\">\n ${menu && menu.length > 0 ? sidebar(brand, menu, currentUrl, req?.isRTL) : \"\"}\n\n <div id=\"content-wrapper\" class=\"d-flex flex-column\" style=\"min-width:0;overflow-x:hidden;\">\n <div id=\"content\">\n <div id=\"page-inner-content\" class=\"container-fluid px-2 sbadmin2-theme\">\n <div id=\"alerts-area\">${/* deprecated */ \"\"}</div>\n <div>\n ${renderBody(title, body, role, req)}\n <div>\n </div>\n </div>\n </div>\n <div \n id=\"toasts-area\"\n class=\"toast-container position-fixed ${\n isNode() ? \"top-0 end-0 p-2\" : \"bottom-0 start-50 p-0\"\n } end-0 p-2\"\n style: \"z-index: 9999; ${!isNode() ? \"margin-bottom: 1.0rem\" : \"\"}\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n >\n ${alerts.map((a) => toast(a.type, a.msg)).join(\"\")}\n </div>\n </div>`,\n req\n );\n\n/**\n * @param {object} opts\n * @param {string} opts.title\n * @param {string} opts.body\n * @param {object[]} opts.alerts\n * @param {*} opts.role\n * @returns {string}\n */\nconst exportRenderBody = ({ title, body, alerts, role, req }) =>\n `<div id=\"alerts-area\">${/* deprecated */ \"\"}</div>\n <div >\n ${renderBody(title, body, role, req)}\n <div>\n <div \n id=\"toasts-area\"\n class=\"toast-container position-fixed ${\n isNode() ? \"top-0 end-0 p-2\" : \"bottom-0 start-50 p-0\"\n }\"\n style: \"z-index: 9999; ${!isNode() ? \"margin-bottom: 1.0rem\" : \"\"}\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n >\n ${alerts.map((a) => toast(a.type, a.msg)).join(\"\")}\n </div>`;\n\nmodule.exports = {\n /** @type {number} */\n sc_plugin_api_version: 1,\n plugin_name: \"sbadmin2\",\n /** @type {object} */\n layout: {\n wrap,\n authWrap,\n renderBody: exportRenderBody,\n },\n};\n\n\n//# sourceURL=webpack://saltcorn/../saltcorn-sbadmin2/index.js?\n}");
|
|
28
|
-
|
|
29
|
-
/***/ },
|
|
30
|
-
|
|
31
|
-
/***/ "../saltcorn-sbadmin2/package.json"
|
|
32
|
-
/*!*****************************************!*\
|
|
33
|
-
!*** ../saltcorn-sbadmin2/package.json ***!
|
|
34
|
-
\*****************************************/
|
|
35
|
-
(module) {
|
|
36
|
-
|
|
37
|
-
"use strict";
|
|
38
|
-
eval("{module.exports = /*#__PURE__*/JSON.parse('{\"name\":\"@saltcorn/sbadmin2\",\"version\":\"1.6.0-rc.1\",\"description\":\"SB Admin 2 layout plugin\",\"main\":\"index.js\",\"scripts\":{\"test\":\"echo No tests\",\"tsc\":\"echo \\\\\"Error: no TypeScript support yet\\\\\"\",\"clean\":\"echo \\\\\"Error: no TypeScript support yet\\\\\"\"},\"dependencies\":{\"@saltcorn/data\":\"1.6.0-rc.1\",\"@saltcorn/markup\":\"1.6.0-rc.1\"},\"author\":\"Tom Nielsen\",\"license\":\"MIT\",\"repository\":\"github:saltcorn/saltcorn\",\"publishConfig\":{\"access\":\"public\"}}');\n\n//# sourceURL=webpack://saltcorn/../saltcorn-sbadmin2/package.json?\n}");
|
|
39
|
-
|
|
40
|
-
/***/ }
|
|
41
|
-
|
|
42
|
-
},
|
|
43
|
-
/******/ __webpack_require__ => { // webpackRuntimeModules
|
|
44
|
-
/******/ var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
|
|
45
|
-
/******/ __webpack_require__.O(0, ["common_chunks","data"], () => (__webpack_exec__("../saltcorn-sbadmin2/index.js")));
|
|
46
|
-
/******/ var __webpack_exports__ = __webpack_require__.O();
|
|
47
|
-
/******/ return __webpack_exports__;
|
|
48
|
-
/******/ }
|
|
49
|
-
]);
|
|
50
|
-
});
|