448 lines
19 KiB
JavaScript
448 lines
19 KiB
JavaScript
|
"use strict";
|
||
|
(() => {
|
||
|
var exports = {};
|
||
|
exports.id = 3172;
|
||
|
exports.ids = [3172];
|
||
|
exports.modules = {
|
||
|
|
||
|
/***/ 1732:
|
||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
|
||
|
// ESM COMPAT FLAG
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
|
||
|
// EXPORTS
|
||
|
__webpack_require__.d(__webpack_exports__, {
|
||
|
"default": () => (/* binding */ Homepage),
|
||
|
"getServerSideProps": () => (/* binding */ getServerSideProps)
|
||
|
});
|
||
|
|
||
|
// EXTERNAL MODULE: external "react/jsx-runtime"
|
||
|
var jsx_runtime_ = __webpack_require__(997);
|
||
|
// EXTERNAL MODULE: external "react"
|
||
|
var external_react_ = __webpack_require__(6689);
|
||
|
var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
|
||
|
// EXTERNAL MODULE: ./layouts/GeneralLayout.jsx + 1 modules
|
||
|
var GeneralLayout = __webpack_require__(6217);
|
||
|
// EXTERNAL MODULE: ./components/general/PageHeadTags.jsx
|
||
|
var PageHeadTags = __webpack_require__(4097);
|
||
|
// EXTERNAL MODULE: ./functions/frontend/clientAuthUser.js
|
||
|
var clientAuthUser = __webpack_require__(9922);
|
||
|
// EXTERNAL MODULE: ./components/pages/docs/DocsAside.jsx
|
||
|
var DocsAside = __webpack_require__(6000);
|
||
|
;// CONCATENATED MODULE: ./components/pages/docs/DocsHomeHero.jsx
|
||
|
// @ts-check
|
||
|
/**
|
||
|
* ==============================================================================
|
||
|
* Imports
|
||
|
* ==============================================================================
|
||
|
*/
|
||
|
|
||
|
////////////////////////////////////////
|
||
|
/** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /**
|
||
|
* ==============================================================================
|
||
|
* Main Component { Functional }
|
||
|
* ==============================================================================
|
||
|
* @param {Object} props - Server props
|
||
|
*/ function DocsHomeHero(props) {
|
||
|
/**
|
||
|
* Get Contexts
|
||
|
*
|
||
|
* @abstract { React.useContext }
|
||
|
*/ ////////////////////////////////////////
|
||
|
////////////////////////////////////////
|
||
|
////////////////////////////////////////
|
||
|
/**
|
||
|
* Javascript Variables
|
||
|
*
|
||
|
* @abstract Non hook variables and functions
|
||
|
*/ ////////////////////////////////////////
|
||
|
////////////////////////////////////////
|
||
|
////////////////////////////////////////
|
||
|
/**
|
||
|
* React Hooks
|
||
|
*
|
||
|
* @abstract { useState, useEffect, useRef, etc ... }
|
||
|
*/ ////////////////////////////////////////
|
||
|
////////////////////////////////////////
|
||
|
////////////////////////////////////////
|
||
|
/**
|
||
|
* Function Return
|
||
|
*
|
||
|
* @abstract Main Function Return
|
||
|
*/ return /*#__PURE__*/ (0,jsx_runtime_.jsxs)("section", {
|
||
|
className: "py-14",
|
||
|
children: [
|
||
|
/*#__PURE__*/ jsx_runtime_.jsx("div", {
|
||
|
className: "w-full gap-10 justify-between flex-col lg:flex-row relative z-10",
|
||
|
children: /*#__PURE__*/ (0,jsx_runtime_.jsxs)("div", {
|
||
|
className: "flex-col items-center lg:items-start max-w-lg text-center lg:text-left",
|
||
|
style: {
|
||
|
minWidth: "45%"
|
||
|
},
|
||
|
children: [
|
||
|
/*#__PURE__*/ jsx_runtime_.jsx("h1", {
|
||
|
className: "text-2xl m-0 leading-tight",
|
||
|
children: "Documentation"
|
||
|
}),
|
||
|
/*#__PURE__*/ jsx_runtime_.jsx("span", {
|
||
|
className: "font-normal",
|
||
|
children: "Learn the ins and outs of datasquirel."
|
||
|
})
|
||
|
]
|
||
|
})
|
||
|
}),
|
||
|
/*#__PURE__*/ jsx_runtime_.jsx("img", {
|
||
|
src: "/images/grid.webp",
|
||
|
alt: "Dotted image background",
|
||
|
className: "absolute top-0 left-0 w-full h-full object-cover opacity-5 z-0"
|
||
|
})
|
||
|
]
|
||
|
});
|
||
|
////////////////////////////////////////
|
||
|
////////////////////////////////////////
|
||
|
////////////////////////////////////////
|
||
|
} /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */
|
||
|
|
||
|
// EXTERNAL MODULE: external "lucide-react"
|
||
|
var external_lucide_react_ = __webpack_require__(2423);
|
||
|
;// CONCATENATED MODULE: ./components/cards/LinkCard.jsx
|
||
|
// @ts-check
|
||
|
/**
|
||
|
* ==============================================================================
|
||
|
* Imports
|
||
|
* ==============================================================================
|
||
|
*/
|
||
|
|
||
|
|
||
|
/** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /**
|
||
|
* ==============================================================================
|
||
|
* Main Component { Functional }
|
||
|
* ==============================================================================
|
||
|
* @param {Object} props - Server props
|
||
|
* @param {string} props.title
|
||
|
* @param {string} props.description
|
||
|
* @param {string} props.url
|
||
|
*/ function LinkCard({ title , description , url }) {
|
||
|
/**
|
||
|
* Get Contexts
|
||
|
*
|
||
|
* @abstract { React.useContext }
|
||
|
*/ ////////////////////////////////////////
|
||
|
////////////////////////////////////////
|
||
|
////////////////////////////////////////
|
||
|
/**
|
||
|
* Javascript Variables
|
||
|
*
|
||
|
* @abstract Non hook variables and functions
|
||
|
*/ ////////////////////////////////////////
|
||
|
////////////////////////////////////////
|
||
|
////////////////////////////////////////
|
||
|
/**
|
||
|
* React Hooks
|
||
|
*
|
||
|
* @abstract { useState, useEffect, useRef, etc ... }
|
||
|
*/ ////////////////////////////////////////
|
||
|
////////////////////////////////////////
|
||
|
////////////////////////////////////////
|
||
|
/**
|
||
|
* Function Return
|
||
|
*
|
||
|
* @abstract Main Function Return
|
||
|
*/ return /*#__PURE__*/ (0,jsx_runtime_.jsxs)("a", {
|
||
|
href: url,
|
||
|
className: "card",
|
||
|
children: [
|
||
|
/*#__PURE__*/ (0,jsx_runtime_.jsxs)("div", {
|
||
|
className: "flex-col items-start",
|
||
|
children: [
|
||
|
/*#__PURE__*/ jsx_runtime_.jsx("span", {
|
||
|
className: "text-2xl font-semibold",
|
||
|
children: title
|
||
|
}),
|
||
|
/*#__PURE__*/ jsx_runtime_.jsx("span", {
|
||
|
className: "max-w-md text-slate-600",
|
||
|
children: description
|
||
|
})
|
||
|
]
|
||
|
}),
|
||
|
/*#__PURE__*/ jsx_runtime_.jsx(external_lucide_react_.ChevronDown, {
|
||
|
size: 20
|
||
|
})
|
||
|
]
|
||
|
});
|
||
|
////////////////////////////////////////
|
||
|
////////////////////////////////////////
|
||
|
////////////////////////////////////////
|
||
|
} /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */
|
||
|
|
||
|
;// CONCATENATED MODULE: ./components/pages/docs/DocsHomeLinks.jsx
|
||
|
// @ts-check
|
||
|
/**
|
||
|
* ==============================================================================
|
||
|
* Imports
|
||
|
* ==============================================================================
|
||
|
*/
|
||
|
|
||
|
|
||
|
////////////////////////////////////////
|
||
|
/** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /**
|
||
|
* ==============================================================================
|
||
|
* Main Component { Functional }
|
||
|
* ==============================================================================
|
||
|
* @param {Object} props - Server props
|
||
|
*/ function DocsHomeLinks(props) {
|
||
|
/**
|
||
|
* Get Contexts
|
||
|
*
|
||
|
* @abstract { React.useContext }
|
||
|
*/ ////////////////////////////////////////
|
||
|
////////////////////////////////////////
|
||
|
////////////////////////////////////////
|
||
|
/**
|
||
|
* Javascript Variables
|
||
|
*
|
||
|
* @abstract Non hook variables and functions
|
||
|
*/ ////////////////////////////////////////
|
||
|
////////////////////////////////////////
|
||
|
////////////////////////////////////////
|
||
|
/**
|
||
|
* React Hooks
|
||
|
*
|
||
|
* @abstract { useState, useEffect, useRef, etc ... }
|
||
|
*/ ////////////////////////////////////////
|
||
|
////////////////////////////////////////
|
||
|
////////////////////////////////////////
|
||
|
/**
|
||
|
* Function Return
|
||
|
*
|
||
|
* @abstract Main Function Return
|
||
|
*/ return /*#__PURE__*/ jsx_runtime_.jsx("section", {
|
||
|
className: "py-14",
|
||
|
children: /*#__PURE__*/ (0,jsx_runtime_.jsxs)("div", {
|
||
|
className: "grid grid-cols-1 sl:grid-cols-2 gap-4 w-full items-stretch",
|
||
|
children: [
|
||
|
/*#__PURE__*/ jsx_runtime_.jsx(LinkCard, {
|
||
|
title: "Quick Start Guide",
|
||
|
description: "Get Started.",
|
||
|
url: "/docs/quick-start"
|
||
|
}),
|
||
|
/*#__PURE__*/ jsx_runtime_.jsx(LinkCard, {
|
||
|
title: "GUI Reference",
|
||
|
description: "Learn how to complete basic data tasks from your dashboard",
|
||
|
url: "/docs/gui-reference"
|
||
|
}),
|
||
|
/*#__PURE__*/ jsx_runtime_.jsx(LinkCard, {
|
||
|
title: "API Reference",
|
||
|
description: "Interact with your database from a backend server using REST API",
|
||
|
url: "/docs/api-reference"
|
||
|
})
|
||
|
]
|
||
|
})
|
||
|
});
|
||
|
////////////////////////////////////////
|
||
|
////////////////////////////////////////
|
||
|
////////////////////////////////////////
|
||
|
} /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */
|
||
|
|
||
|
;// CONCATENATED MODULE: ./pages/docs/index.jsx
|
||
|
// @ts-check
|
||
|
/**
|
||
|
* ==============================================================================
|
||
|
* Imports
|
||
|
* ==============================================================================
|
||
|
*/
|
||
|
|
||
|
////////////////////////////////////////
|
||
|
////////////////////////////////////////
|
||
|
////////////////////////////////////////
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
// import DB_HANDLER from "@/package-shared/utils/backend/global-db/DB_HANDLER";
|
||
|
/** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /**
|
||
|
* ==============================================================================
|
||
|
* Main Component { Functional }
|
||
|
* ==============================================================================
|
||
|
* @param {Object} props - Server props
|
||
|
* @param {any[]} props.pages
|
||
|
* @param {any} props.targetPage
|
||
|
*/ function Homepage({ pages , targetPage }) {
|
||
|
/**
|
||
|
* Get Contexts
|
||
|
*
|
||
|
* @abstract { React.useContext }
|
||
|
*/ ////////////////////////////////////////
|
||
|
////////////////////////////////////////
|
||
|
////////////////////////////////////////
|
||
|
/**
|
||
|
* Javascript Variables
|
||
|
*
|
||
|
* @abstract Non hook variables and functions
|
||
|
*/ const pageTitle = `${targetPage.title} | Datasquirel docs`;
|
||
|
const pageDescription = targetPage.description;
|
||
|
let head = /*#__PURE__*/ (0,jsx_runtime_.jsxs)(jsx_runtime_.Fragment, {
|
||
|
children: [
|
||
|
/*#__PURE__*/ jsx_runtime_.jsx("title", {
|
||
|
children: pageTitle
|
||
|
}),
|
||
|
/*#__PURE__*/ jsx_runtime_.jsx("meta", {
|
||
|
name: "description",
|
||
|
content: pageDescription
|
||
|
}),
|
||
|
/*#__PURE__*/ jsx_runtime_.jsx(PageHeadTags/* default */.Z, {
|
||
|
pageTitle: pageTitle,
|
||
|
pageDescription: pageDescription,
|
||
|
pagePathname: "/"
|
||
|
})
|
||
|
]
|
||
|
});
|
||
|
////////////////////////////////////////
|
||
|
////////////////////////////////////////
|
||
|
////////////////////////////////////////
|
||
|
/**
|
||
|
* React Hooks
|
||
|
*
|
||
|
* @abstract { useState, useEffect, useRef, etc ... }
|
||
|
*/ const [user, setUser] = external_react_default().useState(null);
|
||
|
external_react_default().useEffect(()=>{
|
||
|
(0,clientAuthUser/* default */.Z)({
|
||
|
setUser
|
||
|
});
|
||
|
}, []);
|
||
|
////////////////////////////////////////
|
||
|
////////////////////////////////////////
|
||
|
////////////////////////////////////////
|
||
|
/**
|
||
|
* Function Return
|
||
|
*
|
||
|
* @abstract Main Function Return
|
||
|
*/ return /*#__PURE__*/ jsx_runtime_.jsx(GeneralLayout/* default */.Z, {
|
||
|
head: head,
|
||
|
user: user,
|
||
|
children: /*#__PURE__*/ (0,jsx_runtime_.jsxs)("div", {
|
||
|
className: "items-stretch w-full gap-0 flex-col-reverse lg:flex-row",
|
||
|
children: [
|
||
|
/*#__PURE__*/ jsx_runtime_.jsx(DocsAside/* default */.Z, {
|
||
|
pages: pages
|
||
|
}),
|
||
|
/*#__PURE__*/ (0,jsx_runtime_.jsxs)("main", {
|
||
|
children: [
|
||
|
/*#__PURE__*/ jsx_runtime_.jsx(DocsHomeHero, {}),
|
||
|
/*#__PURE__*/ jsx_runtime_.jsx(DocsHomeLinks, {})
|
||
|
]
|
||
|
})
|
||
|
]
|
||
|
})
|
||
|
});
|
||
|
////////////////////////////////////////
|
||
|
////////////////////////////////////////
|
||
|
////////////////////////////////////////
|
||
|
}
|
||
|
/** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /**
|
||
|
* ==============================================================================
|
||
|
* Server Side Props or Static Props
|
||
|
* ==============================================================================
|
||
|
* @type {import("next").GetServerSideProps}
|
||
|
*/ async function getServerSideProps({ query }) {
|
||
|
/**
|
||
|
* Redirect to default page
|
||
|
*/ /** @type {any[]} */ // const defaultPage = await DB_HANDLER(
|
||
|
// `SELECT slug FROM docs_pages WHERE level='1' AND page_order = '1'`
|
||
|
// );
|
||
|
// if (!defaultPage || !defaultPage[0]) {
|
||
|
// return {
|
||
|
// redirect: {
|
||
|
// destination: `/`,
|
||
|
// permanent: false,
|
||
|
// },
|
||
|
// };
|
||
|
// }
|
||
|
return {
|
||
|
redirect: {
|
||
|
destination: `/docs/getting-started`,
|
||
|
permanent: false
|
||
|
}
|
||
|
};
|
||
|
/**
|
||
|
* Data fetching
|
||
|
*/ // const pages = await dbHandler(`SELECT id, title, slug, level, parent_id FROM docs_pages ORDER BY page_order ASC`);
|
||
|
// const targetPage = await dbHandler(`SELECT title, slug, description, content FROM docs_pages WHERE level='1' AND page_order = '1'`);
|
||
|
////////////////////////////////////////
|
||
|
////////////////////////////////////////
|
||
|
////////////////////////////////////////
|
||
|
/**
|
||
|
* Server props return
|
||
|
*
|
||
|
* @description Return data fetched on the server side
|
||
|
*/ // return {
|
||
|
// props: {
|
||
|
// user: null,
|
||
|
// pages,
|
||
|
// targetPage: targetPage[0] ? targetPage[0] : {},
|
||
|
// },
|
||
|
// };
|
||
|
////////////////////////////////////////
|
||
|
////////////////////////////////////////
|
||
|
////////////////////////////////////////
|
||
|
}
|
||
|
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ 386:
|
||
|
/***/ ((module) => {
|
||
|
|
||
|
module.exports = require("@mui/icons-material/CottageTwoTone");
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ 5557:
|
||
|
/***/ ((module) => {
|
||
|
|
||
|
module.exports = require("@mui/icons-material/MenuBookTwoTone");
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ 2423:
|
||
|
/***/ ((module) => {
|
||
|
|
||
|
module.exports = require("lucide-react");
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ 968:
|
||
|
/***/ ((module) => {
|
||
|
|
||
|
module.exports = require("next/head");
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ 6689:
|
||
|
/***/ ((module) => {
|
||
|
|
||
|
module.exports = require("react");
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ 997:
|
||
|
/***/ ((module) => {
|
||
|
|
||
|
module.exports = require("react/jsx-runtime");
|
||
|
|
||
|
/***/ })
|
||
|
|
||
|
};
|
||
|
;
|
||
|
|
||
|
// load runtime
|
||
|
var __webpack_require__ = require("../webpack-runtime.js");
|
||
|
__webpack_require__.C(exports);
|
||
|
var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
|
||
|
var __webpack_exports__ = __webpack_require__.X(0, [4017,8313,5264,6729,5449,913,9360,6217,4097,9922,6000], () => (__webpack_exec__(1732)));
|
||
|
module.exports = __webpack_exports__;
|
||
|
|
||
|
})();
|