waibu-mdb 1.1.0 → 2.1.1
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/.github/FUNDING.yml +13 -0
- package/.github/workflows/repo-lockdown.yml +24 -0
- package/LICENSE +21 -0
- package/README.md +49 -23
- package/extend/bajo/hook/waibu-mpa@after-build-locals.js +9 -0
- package/extend/bajo/intl/en-US.json +3 -0
- package/extend/waibuMpa/theme/component/method/after-build-tag.js +30 -0
- package/extend/waibuMpa/theme.js +19 -0
- package/extend/waibuStatic/asset/css/mdb.css +3 -0
- package/extend/waibuStatic/asset/images/universe.jpg +0 -0
- package/extend/waibuStatic/virtual.json +4 -0
- package/index.js +29 -0
- package/package.json +10 -2
- package/plugin/.alias +0 -1
- package/plugin/config.json +0 -3
|
@@ -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
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
[
|
|
1
|
+
# waibu-mdb
|
|
2
|
+
|
|
3
|
+
 
|
|
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,30 @@
|
|
|
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
|
+
}
|
|
7
|
+
if (params.attr.dataBsToggle === 'dropdown') {
|
|
8
|
+
params.attr.dataMdbDropdownInit = true
|
|
9
|
+
// params.attr.dataMdbRippleInit = true
|
|
10
|
+
delete params.attr.dataBsToggle
|
|
11
|
+
}
|
|
12
|
+
if (params.attr.dataBsToggle === 'tooltip') {
|
|
13
|
+
params.attr.dataMdbTooltipInit = true
|
|
14
|
+
}
|
|
15
|
+
if (params.attr.dataBsToggle === 'collapse') {
|
|
16
|
+
params.attr.dataMdbCollapseInit = true
|
|
17
|
+
params.attr.dataMdbTarget = params.attr.dataBsTarget
|
|
18
|
+
delete params.attr.dataBsToggle
|
|
19
|
+
delete params.attr.dataBsTarget
|
|
20
|
+
}
|
|
21
|
+
if (params.attr.dataBsDismiss) {
|
|
22
|
+
params.attr.dataMdbDismiss = params.attr.dataBsDismiss
|
|
23
|
+
delete params.attr.dataBsDismiss
|
|
24
|
+
}
|
|
25
|
+
if (params.attr.tooltip) params.attr.dataMdbTooltipInit = true
|
|
26
|
+
params.html = params.html.replaceAll('data-bs-', 'data-mdb-')
|
|
27
|
+
return params
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export default afterBuildTag
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
async function theme (ctx) {
|
|
2
|
+
return {
|
|
3
|
+
name: 'mdb',
|
|
4
|
+
css: [
|
|
5
|
+
'waibuMdb.virtual:/mdb/css/mdb.min.css',
|
|
6
|
+
'$waibuMdb.asset:/css/mdb.css'
|
|
7
|
+
],
|
|
8
|
+
scripts: ['waibuMdb.virtual:/mdb/js/mdb.umd.min.js'],
|
|
9
|
+
cssExcludes: ['waibuBootstrap.virtual:/bootstrap/css/bootstrap.min.css'],
|
|
10
|
+
scriptsExcludes: ['waibuBootstrap.virtual:/bootstrap/js/bootstrap.bundle.min.js'],
|
|
11
|
+
links: [
|
|
12
|
+
'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css',
|
|
13
|
+
'https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap'
|
|
14
|
+
],
|
|
15
|
+
framework: 'bootstrap'
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export default theme
|
|
Binary file
|
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
|
|
3
|
+
"version": "2.1.1",
|
|
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,6 @@
|
|
|
28
36
|
},
|
|
29
37
|
"homepage": "https://github.com/ardhi/waibu-mdb#readme",
|
|
30
38
|
"dependencies": {
|
|
31
|
-
"mdb-ui-kit": "^
|
|
39
|
+
"mdb-ui-kit": "^9.3.0"
|
|
32
40
|
}
|
|
33
41
|
}
|
package/plugin/.alias
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
wmdb
|
package/plugin/config.json
DELETED