waibu-mdb 1.1.0 → 2.1.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.
@@ -0,0 +1,13 @@
1
+ github: ardhi
2
+ patreon: bajoframework
3
+ #open_collective: # Replace with a single Open Collective username
4
+ #ko_fi: # Replace with a single Ko-fi username
5
+ #tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
6
+ #community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
7
+ #liberapay: # Replace with a single Liberapay username
8
+ #issuehunt: # Replace with a single IssueHunt username
9
+ #lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
10
+ #polar: # Replace with a single Polar username
11
+ #buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
12
+ #thanks_dev: # Replace with a single thanks.dev username
13
+ custom: ["https://www.paypal.com/ncp/payment/EWLERL7SCUU64"]
@@ -0,0 +1,24 @@
1
+ name: 'Repo Lockdown'
2
+
3
+ on:
4
+ #issues:
5
+ #types: opened
6
+ pull_request_target:
7
+ types: opened
8
+ #schedule:
9
+ #- cron: '* */6 * * *'
10
+
11
+ permissions:
12
+ #issues: write
13
+ pull-requests: write
14
+
15
+ jobs:
16
+ action:
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - uses: dessant/repo-lockdown@v4
20
+ with:
21
+ pr-comment: >
22
+ This repository does not accept pull requests,
23
+ see the README.md for details.
24
+ skip-closed-pr-comment: true
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Ardhi Lukianto
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,23 +1,49 @@
1
- # waibu-mdb
2
-
3
- Plugin name: **waibuMdb**, alias: **wmdb**
4
-
5
- ![GitHub package.json version](https://img.shields.io/github/package-json/v/ardhi/waibu-mdb) ![NPM Version](https://img.shields.io/npm/v/waibu-mdb)
6
-
7
- > <br />**Attention**: I do NOT accept any pull request at the moment, thanks!<br /><br />
8
-
9
- MDB support for [Waibu MPA](https://github.com/ardhi/waibu-mpa)
10
-
11
- ## Installation
12
-
13
- Goto your ```<bajo-base-dir>``` and type:
14
-
15
- ```bash
16
- $ npm install waibu-mdb
17
- ```
18
-
19
- Now open your ```<bajo-data-dir>/config/.plugins``` and put ```waibu-mdb``` in it.
20
-
21
- ## License
22
-
23
- [MIT](LICENSE)
1
+ # waibu-mdb
2
+
3
+ ![GitHub package.json version](https://img.shields.io/github/package-json/v/ardhi/waibu-mdb) ![NPM Version](https://img.shields.io/npm/v/waibu-mdb)
4
+
5
+ > <br />**Attention**: I do NOT accept any pull request at the moment, thanks! ([Why?](wiki/CONTRIBUTING.md))<br /><br />
6
+
7
+ MDB theme for [Waibu Web Framework](https://github.com/ardhi/waibu)
8
+
9
+ ## Installation
10
+
11
+ First, go to your ```{app-dir}``` and run the following command in your terminal:
12
+
13
+ ```bash
14
+ $ npm install waibu-mdb waibu-mpa waibu-bootstrap waibu
15
+ ```
16
+
17
+ Next, open the file located at ```{data-dir}/config/.plugins``` and add ```waibu-mdb``` , ```waibu-mpa```, ```waibu-bootstrap``` and ```waibu```
18
+
19
+ ## Documentations
20
+
21
+ - [Config Object](wiki/CONFIG.md)
22
+ - [API](https://ardhi.github.io/waibu-mdb)
23
+ - [Contributing](wiki/CONTRIBUTING.md)
24
+
25
+ ## Hire Me
26
+
27
+ If you have a Bajo Framework-based project and need a professional service or assistance, please <a href="https://github.com/ardhi#professional-service">click here</a>. I'd be happy to work on it at a competitive price and with fast turnaround!
28
+
29
+ ## Support Me
30
+
31
+ Please support me using the channels below. Your donation will motivate me to work faster and more diligently on future development.
32
+
33
+ <a href="https://github.com/sponsors/ardhi">
34
+ <img src="https://img.shields.io/badge/Github-slategrey?style=flat&logo=github" height="50">
35
+ </a>
36
+ <a href="https://www.patreon.com/bajoframework">
37
+ <img src="https://img.shields.io/badge/Patreon-f2c3b2?style=flat&logo=patreon" height="50">
38
+ </a>
39
+ <a href="https://www.paypal.com/ncp/payment/EWLERL7SCUU64">
40
+ <img src="https://img.shields.io/badge/Paypal-mdbe?style=flat&logo=paypal" height="50">
41
+ </a>
42
+
43
+ <p>
44
+ <div><img alt="bc1qwtv78cwp9ef8hnqaw84fxg5856l0pggqe32g6f" src="docs/static/bitcoin.jpeg" width="150" height="150" /><br>Bitcoin</div>
45
+ </p>
46
+
47
+ ## License
48
+
49
+ [MIT](LICENSE)
@@ -0,0 +1,9 @@
1
+ async function waibuMpaAfterBuildLocals ({ menu, _meta }) {
2
+ const { findIndex } = this.app.lib._
3
+ if (menu && menu.pages && !['/component/render'].includes(_meta.url)) {
4
+ const idx = findIndex(menu.pages, { title: 'account' })
5
+ if (idx > -1) menu.pages.splice(idx, 1)
6
+ }
7
+ }
8
+
9
+ export default waibuMpaAfterBuildLocals
@@ -0,0 +1,3 @@
1
+ {
2
+ "questionInquiry": "Questions/Inquiry"
3
+ }
@@ -0,0 +1,19 @@
1
+ async function afterBuildTag (tag, params) {
2
+ const framework = this.app.waibuMpa.themes.find(t => t.name === 'bootstrap')
3
+ await framework.method.afterBuildTag.call(this, tag, params)
4
+ if (params.tag === 'btn') {
5
+ params.attr.dataMdbRippleInit = true
6
+ params.attr.dataMdbButtonInit = true
7
+ }
8
+ if (params.attr.tooltip) params.attr.dataMdbTooltipInit = true
9
+ params.html = params.html
10
+ .replaceAll('data-bs-toggle="modal"', 'data-mdb-toggle="modal" data-mdb-modal-init')
11
+ .replaceAll('data-bs-toggle="offcanvas"', 'data-mdb-toggle="offcanvas" data-mdb-offcanvas-init')
12
+ .replaceAll('data-bs-toggle="collapse"', 'data-mdb-toggle="collapse" data-mdb-collapse-init')
13
+ .replaceAll('data-bs-toggle="tooltip"', 'data-mdb-toggle="tooltip" data-mdb-tooltip-init')
14
+ .replaceAll('data-bs-toggle="dropdown"', 'data-mdb-toggle="dropdown" data-mdb-dropdown-init data-mdb-ripple-init')
15
+ .replaceAll('data-bs-', 'data-mdb-')
16
+ return params
17
+ }
18
+
19
+ export default afterBuildTag
@@ -0,0 +1,20 @@
1
+ async function theme (ctx) {
2
+ return {
3
+ name: 'mdb',
4
+ css: [
5
+ 'waibuMdb.virtual:/mdb/css/mdb.min.css',
6
+ 'waibuMdb.virtual:/roboto/300.css',
7
+ 'waibuMdb.virtual:/roboto/400.css',
8
+ 'waibuMdb.virtual:/roboto/500.css',
9
+ 'waibuMdb.virtual:/roboto/700.css',
10
+ '$waibuMdb.asset:/css/mdb.css'
11
+ ],
12
+ scripts: ['waibuMdb.virtual:/mdb/js/mdb.umd.min.js'],
13
+ cssExcludes: ['waibuBootstrap.virtual:/bootstrap/css/bootstrap.min.css'],
14
+ scriptsExcludes: ['waibuBootstrap.virtual:/bootstrap/js/bootstrap.bundle.min.js'],
15
+ links: [],
16
+ framework: 'bootstrap'
17
+ }
18
+ }
19
+
20
+ export default theme
@@ -0,0 +1,3 @@
1
+ .wmaps {
2
+ background-image: url(../images/universe.jpg);
3
+ }
@@ -0,0 +1,7 @@
1
+ [{
2
+ "prefix": "mdb",
3
+ "root": "mdb-ui-kit:"
4
+ }, {
5
+ "prefix": "roboto",
6
+ "root": "@fontsource/roboto:"
7
+ }]
package/index.js ADDED
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Plugin factory
3
+ *
4
+ * @param {string} pkgName - NPM package name
5
+ * @returns {class}
6
+ */
7
+ async function factory (pkgName) {
8
+ const me = this
9
+
10
+ /**
11
+ * WaibuBlu class
12
+ *
13
+ * @class
14
+ */
15
+ class WaibuMdb extends this.app.baseClass.Base {
16
+ constructor () {
17
+ super(pkgName, me.app)
18
+ this.config = {
19
+ waibu: {
20
+ prefix: 'mdb'
21
+ }
22
+ }
23
+ }
24
+ }
25
+
26
+ return WaibuMdb
27
+ }
28
+
29
+ export default factory
package/package.json CHANGED
@@ -1,12 +1,20 @@
1
1
  {
2
2
  "name": "waibu-mdb",
3
- "version": "1.1.0",
3
+ "version": "2.1.2",
4
4
  "description": "MDB suport for Waibu MPA",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1"
8
8
  },
9
9
  "type": "module",
10
+ "bajo": {
11
+ "type": "plugin",
12
+ "alias": "wmdb",
13
+ "dependencies": [
14
+ "waibu-mpa",
15
+ "waibu-bootstrap"
16
+ ]
17
+ },
10
18
  "repository": {
11
19
  "type": "git",
12
20
  "url": "git+https://github.com/ardhi/waibu-mdb.git"
@@ -28,6 +36,7 @@
28
36
  },
29
37
  "homepage": "https://github.com/ardhi/waibu-mdb#readme",
30
38
  "dependencies": {
31
- "mdb-ui-kit": "^8.0.0"
39
+ "@fontsource/roboto": "^5.2.9",
40
+ "mdb-ui-kit": "^9.3.0"
32
41
  }
33
42
  }
@@ -0,0 +1,6 @@
1
+ # Changes
2
+
3
+ ## 2026-01-16
4
+
5
+ - [2.1.2] Use bundled Roboto fonts
6
+ - [2.1.2] Numerous bug fixes
package/plugin/.alias DELETED
@@ -1 +0,0 @@
1
- wmdb
@@ -1,3 +0,0 @@
1
- {
2
- "dependencies": ["waibu-mpa"]
3
- }