waibu-bootstrap 2.1.2 → 2.1.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.
@@ -88,7 +88,12 @@ async function navDropdownSetting () {
88
88
  id="${id}"
89
89
  x-data="{
90
90
  async signout () {
91
- await wbs.confirmation(\`${this.component.req.t('signoutWarning')}\`, { ok: '${id}:post', close: 'y' })
91
+ await wbs.confirmation(\`${this.component.req.t('signoutWarning')}\`, {
92
+ ok: '${id}:post',
93
+ close: 'y',
94
+ theme: '${this.component.theme.name}',
95
+ iconset: '${this.component.iconset.name}'
96
+ })
92
97
  },
93
98
  post () {
94
99
  wmpa.postForm({}, '${routePath('sumba:/signout')}')
@@ -8,7 +8,12 @@ async function navItemSignout () {
8
8
  this.params.attr.href = '#'
9
9
  this.params.attr['x-data'] = `{
10
10
  async signout () {
11
- await wbs.confirmation(\`${this.component.req.t('signoutWarning')}\`, { ok: '${this.params.attr.id}:post', close: 'y' })
11
+ await wbs.confirmation(\`${this.component.req.t('signoutWarning')}\`, {
12
+ ok: '${this.params.attr.id}:post',
13
+ close: 'y',
14
+ theme: '${this.component.theme.name}',
15
+ iconset: '${this.component.iconset.name}'
16
+ })
12
17
  },
13
18
  post () {
14
19
  wmpa.postForm({}, '${routePath('sumba:/signout')}')
@@ -8,6 +8,7 @@ function formatSentence (item, params) {
8
8
  if (this.params.attr.expanded) attr.rounded = 'width:0'
9
9
  merge(attr, omit(item, ['component', 'icon', 'ohref', 'html']))
10
10
  if (this.params.attr.text && !attr.active) attr.text = this.params.attr.text
11
+ if (!attr.active) attr.background = 'color:transparent'
11
12
  const result = [`<c:${cmp}`]
12
13
  for (const k in attr) {
13
14
  result.push(attr[k] === true ? k : `${k}="${attr[k]}"`)
@@ -104,13 +104,13 @@ class Wbs {
104
104
  return await this.alert(msg, opts.title ?? 'Prompt', opts)
105
105
  }
106
106
 
107
- async appLauncher (params, menu) {
107
+ async appLauncher (params, menu, qs = {}) {
108
108
  document.body.click()
109
109
  const id = wmpa.randomId()
110
110
  const toolbar = params ? `toolbar="${params}"` : ''
111
111
  const menuId = menu ? `menu="${menu}"` : ''
112
112
  const body = [`<c:app-launcher id="${id}" ${toolbar} ${menuId} />`]
113
- await wmpa.addComponent(body.join('\n'), 'body')
113
+ await wmpa.addComponent(body.join('\n'), 'body', undefined, undefined, qs)
114
114
  const item = new this.engine.Offcanvas(`#${id}`)
115
115
  const itemEl = document.getElementById(id)
116
116
  if (window.mdb) this.engine.Collapse.getOrCreateInstance(itemEl)
@@ -156,7 +156,7 @@ class Wbs {
156
156
  body.push('<c:div flex="justify-content:end" margin="top-3">')
157
157
  body.push(...buttons)
158
158
  body.push('</c:div></c:modal>')
159
- await wmpa.addComponent(body.join('\n'), 'body')
159
+ await wmpa.addComponent(body.join('\n'), 'body', undefined, undefined, _.pick(opts, ['theme', 'iconset']))
160
160
  const modal = new this.engine.Modal(`#${id}`)
161
161
  const modalEl = document.getElementById(id)
162
162
  modalEl.addEventListener('hidden.bs.modal', evt => {
@@ -196,10 +196,11 @@ class Wbs {
196
196
  else console.error(`Function not found '${name}'`)
197
197
  }
198
198
 
199
- async openModal (id, body, type = 'modal') {
199
+ async openModal (id, body, opts = {}) {
200
+ let { type = 'modal' } = opts
200
201
  if (_.isArray(body)) body = body.join('\n')
201
202
  if (!['modal', 'offcanvas'].includes(type)) type = 'modal'
202
- await wmpa.addComponent(body)
203
+ await wmpa.addComponent(body, undefined, undefined, undefined, _.pick(opts, ['theme', 'iconset']))
203
204
  const item = new this.engine[_.upperFirst(type)](`#${id}`)
204
205
  const itemEl = document.getElementById(id)
205
206
  itemEl.addEventListener(`hidden.bs.${type}`, evt => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waibu-bootstrap",
3
- "version": "2.1.2",
3
+ "version": "2.1.4",
4
4
  "description": "Bootstrap suport for Waibu Framework",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/wiki/CHANGES.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changes
2
2
 
3
+ ## 2026-01-17
4
+
5
+ - [2.1.3] Sidebar buttons in inactive state should be transparent
6
+ - [2.1.4] Add capability to set custom theme & iconset through headers
7
+
3
8
  ## 2026-01-13
4
9
 
5
10
  - [2.1.1] Bug fix on waibuMpa's widgeting system