waibu-maps 2.3.0 → 2.4.0

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.
@@ -10,6 +10,7 @@
10
10
  "searchIn": "Search in",
11
11
  "clearHistory": "Clear History",
12
12
  "enterPhrase": "You need to enter a search phrase first",
13
+ "loading": "Loading...",
13
14
  "mapCtrl": {
14
15
  "csrc": "Search",
15
16
  "navigation-control": "Navigation",
@@ -12,6 +12,7 @@
12
12
  "searchIn": "Cari di",
13
13
  "clearHistory": "Hapus Jejak",
14
14
  "enterPhrase": "Anda harus memasukkan frase pencarian terlebih dahulu",
15
+ "loading": "Memuat...",
15
16
  "mapCtrl": {
16
17
  "csrc": "Cari",
17
18
  "navigation-control": "Navigasi",
@@ -2,7 +2,7 @@
2
2
  "connection": "memory",
3
3
  "properties": [
4
4
  "id,,255,primary,true",
5
- "name,,255,true"
5
+ "url,,255,true"
6
6
  ],
7
7
  "options": {
8
8
  "attachment": false,
@@ -14,7 +14,7 @@ async function controlGroup () {
14
14
  const { generateId } = this.app.lib.aneka
15
15
  const { jsonStringify, minify } = this.app.waibuMpa
16
16
  const { isString, trim } = this.app.lib._
17
- const { $ } = this.component
17
+ const { $, req } = this.component
18
18
  const tpl = await this.component.buildSentence(this.loadTemplate('waibuMaps.partial:/menu.html', { escape: true }), {}, { minify: true })
19
19
  const id = isString(this.params.attr.id) ? this.params.attr.id : generateId('alpha')
20
20
  const opts = {}
@@ -51,12 +51,12 @@ async function controlGroup () {
51
51
  async ${prefix}Trigger (evt) {
52
52
  const el = evt.target.closest('button')
53
53
  if (!el) return
54
- const menu = el.querySelector('.dropdown-menu')
54
+ const menu = el.querySelector('.dropdown-menu .loading')
55
55
  if (!menu) return
56
56
  if (menu.children.length > 0) return
57
57
  const setting = el.getAttribute('setting') ? ('setting="' + el.getAttribute('setting') + '"') : ''
58
- const options = { selector: menu, checkChild: true, theme: '${this.component.theme.name}', iconset: '${this.component.iconset.name}' }
59
- await wmpa.addComponent('<c:' + el.getAttribute('component') + ' ' + setting + ' />', options)
58
+ const options = { selector: menu, checkChild: true }
59
+ await wmpa.replaceWithComponent('<c:' + el.getAttribute('component') + ' ' + setting + ' />', options)
60
60
  }
61
61
  `, `
62
62
  async ${prefix}Builder (params) {
@@ -69,7 +69,7 @@ async function controlGroup () {
69
69
  html: param.html
70
70
  }
71
71
  if (param.wrapper.includes('component=')) {
72
- args.html = ''
72
+ args.html = '<div class="loading mx-2">${req.t('loading')}</div>'
73
73
  args.click = '${prefix}Trigger'
74
74
  }
75
75
  const wfn = _.template(param.wrapper)
@@ -27,7 +27,7 @@ async function controlImage () {
27
27
  const body = ['<c:${url ? `a url="${url}"` : 'div'}><c:img ${stringifyAttribs(img)} ']
28
28
  body.push('${animate}')
29
29
  body.push('/></c:${url ? 'a' : 'div'}>')
30
- return await wmpa.createComponent(body, { theme: '${this.component.theme.name}', iconset: '${this.component.iconset.name}' })
30
+ return await wmpa.createComponent(body)
31
31
  }
32
32
  `)
33
33
 
@@ -29,7 +29,7 @@ async function controlLogo () {
29
29
  }
30
30
  this.addBlock('reactive', `
31
31
  async ${prefix}Builder () {
32
- const body = ['<c:a href="#" @click="wbs.appLauncher(\\'darkmode language\\', \\'${this.params.attr.menu}\\', { theme: \\'${this.component.theme.name}\\', iconset: \\'${this.component.iconset.name}\\' })">']
32
+ const body = ['<c:a href="#" @click="wbs.appLauncher(\\'darkmode language\\', \\'${this.params.attr.menu}\\')">']
33
33
  body.push('<c:img ${stringifyAttribs(img)} ${animate} />')
34
34
  body.push('</c:a>')
35
35
  return await wmpa.createComponent(body)
@@ -56,8 +56,7 @@ async function controlMousePos () {
56
56
  `, `
57
57
  async ${prefix}Builder () {
58
58
  const body = '<c:div id="${id}" margin="x-2 top-1" text="align:center nowrap"/>'
59
- const options = { theme: '${this.component.theme.name}', iconset: '${this.component.iconset.name}' }
60
- return await wmpa.createComponent(body, options)
59
+ return await wmpa.createComponent(body)
61
60
  }
62
61
  `])
63
62
  this.addBlock('run', `
@@ -54,7 +54,7 @@ async function controlSearch () {
54
54
  '<c:icon name="search" />',
55
55
  '</c:button>'
56
56
  ]
57
- return [await wmpa.createComponent(body, { theme: '${this.component.theme.name}', iconset: '${this.component.iconset.name}' })]
57
+ return [await wmpa.createComponent(body)]
58
58
  }
59
59
  `, `
60
60
  async ${prefix}Populate () {
@@ -62,7 +62,7 @@ async function controlSearch () {
62
62
  feeds.unshift({ code: 'latLng', name: 'gotoLatLng', feed: { id: 'latLng', cmpLabel: 'latLng' } })
63
63
  this.$store.mapSearch.feeds = feeds
64
64
  const body = feeds.map(feed => '<c:dropdown-item :class="$store.mapSearch.feed === $el.getAttribute(\\'data-code-feedid\\') ? \\'active\\' : \\'\\'" data-code-feedid="' + feed.code + ':' + feed.feed.id + '" t:content="' + feed.feed.cmpLabel + '" @click="$store.mapSearch.feed = \\'' + feed.code + ':' + feed.feed.id + '\\'"/>')
65
- const options = { selector: '#${id} .input-group .dropdown-menu', wrapper: 'div', checkChild: true, theme: '${this.component.theme.name}', iconset: '${this.component.iconset.name}' }
65
+ const options = { selector: '#${id} .input-group .dropdown-menu', wrapper: 'div', checkChild: true }
66
66
  await wmpa.addComponent(body, options)
67
67
  if (!this.$store.mapSearch.feed) this.$store.mapSearch.feed = feeds[0].code + ':' + feeds[0].feed.id
68
68
  const html = this.$store.mapSearch.recent ?? ''
@@ -54,7 +54,7 @@ async function controlZbp () {
54
54
  ' }',
55
55
  '}" />'
56
56
  ]
57
- return await wmpa.createComponent(body, { theme: '${this.component.theme.name}', iconset: '${this.component.iconset.name}' })
57
+ return await wmpa.createComponent(body)
58
58
  }
59
59
  `])
60
60
 
@@ -3,6 +3,7 @@ import { glyphUrl } from './default-style.js'
3
3
  const wmaps = {
4
4
  url: '/wmaps.js',
5
5
  method: 'GET',
6
+ noCacheReq: true,
6
7
  handler: async function (req, reply) {
7
8
  const { get } = this.app.lib._
8
9
  const { routePath } = this.app.waibu
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waibu-maps",
3
- "version": "2.3.0",
3
+ "version": "2.4.0",
4
4
  "description": "Maps for Waibu MPA",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/wiki/CHANGES.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changes
2
2
 
3
+ ## 2026-05-25
4
+
5
+ - [2.4.0] Auto detect theme & iconset
6
+ - [2.4.0] Bug fix in ```control-group``` widget
7
+ - [2.4.0] Add ```noCacheReq``` to ```wmaps.js``` route
8
+
9
+ ## 2026-05-22
10
+
11
+ - [2.3.1] Bug fix in icon model schema
12
+
3
13
  ## 2026-05-11
4
14
 
5
15
  - [2.3.0] Updates to match ```dobo@2.23.0``` specs
@@ -1,45 +0,0 @@
1
- {
2
- "plugins": ["plugins/markdown"],
3
- "opts": {
4
- "encoding": "utf8",
5
- "recurse": true,
6
- "verbose": true,
7
- "destination": "./docs",
8
- "template": "node_modules/clean-jsdoc-theme",
9
- "readme": "./docs/static/home.md",
10
- "theme_opts": {
11
- "sections": ["Classes", "Events", "Modules", "Global"],
12
- "default_theme": "light",
13
- "display-module-header": true,
14
- "title": "Waibu Admin",
15
- "homepageTitle": "Waibu Admin",
16
- "menu": [{
17
- "title": "NPM",
18
- "link": "https://www.npmjs.com/package/waibu-"
19
- }, {
20
- "title": "Github",
21
- "link": "https://github.com/ardhi/waibu-"
22
- }, {
23
- "title": "Waibu",
24
- "link": "https://waibu.bajo.app/"
25
- }, {
26
- "title": "Bajo",
27
- "link": "https://bajo.app/"
28
- }]
29
- }
30
- },
31
- "source": {
32
- "include": ["."],
33
- "includePattern": ".+\\.js(doc|x)?$",
34
- "exclude": ["node_modules", "docs", "test"]
35
- },
36
- "markdown": {
37
- "hardwrap": false,
38
- "idInHeadings": true
39
- },
40
- "sourceType": "module",
41
- "templates": {
42
- "cleverLinks": false,
43
- "monospaceLinks": false
44
- }
45
- }