waibu-maps 2.7.4 → 2.7.6
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/extend/bajo/intl/en-US.json +2 -2
- package/extend/bajo/intl/id.json +2 -2
- package/extend/bajoTemplate/partial/menu.html +2 -2
- package/extend/waibuBootstrap/theme/component/widget/control-group.js +1 -2
- package/extend/waibuBootstrap/theme/component/widget/control-newsticker.js +11 -11
- package/extend/waibuBootstrap/theme/component/widget/control-search.js +3 -1
- package/extend/waibuBootstrap/theme/component/wmaps-base.js +1 -1
- package/package.json +1 -1
- package/wiki/CHANGES.md +10 -0
package/extend/bajo/intl/id.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
<c:div dim="height:100" flex="align-items:center justify-content:center" data-bs-toggle="dropdown" data-bs-auto-close="outside">
|
|
1
|
+
<c:div @click="{%= click %}" dim="height:100" flex="align-items:center justify-content:center" data-bs-toggle="dropdown" data-bs-auto-close="outside">
|
|
2
2
|
{% if (image !== '') { %}
|
|
3
3
|
<c:img src="{%= image %}" />
|
|
4
4
|
{% } else { %}
|
|
5
|
-
<c:icon oname="{%= icon %}"
|
|
5
|
+
<c:icon oname="{%= icon %}" />
|
|
6
6
|
{% } %}
|
|
7
7
|
</c:div>
|
|
8
8
|
<c:div class="dropdown-menu">
|
|
@@ -52,8 +52,7 @@ async function controlGroup () {
|
|
|
52
52
|
const el = evt.target.closest('button')
|
|
53
53
|
if (!el) return
|
|
54
54
|
const menu = el.querySelector('.dropdown-menu .loading')
|
|
55
|
-
if (!menu) return
|
|
56
|
-
if (menu.children.length > 0) return
|
|
55
|
+
if (!menu || menu.children.length > 0) return
|
|
57
56
|
const setting = el.getAttribute('setting') ? ('setting="' + el.getAttribute('setting') + '"') : ''
|
|
58
57
|
const options = { selector: menu, checkChild: true }
|
|
59
58
|
await wmpa.replaceWithComponent('<c:' + el.getAttribute('component') + ' ' + setting + ' />', options)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import control from './control.js'
|
|
2
|
-
const prefix = '
|
|
2
|
+
const prefix = 'news'
|
|
3
3
|
|
|
4
4
|
async function controlNewsticker () {
|
|
5
5
|
const WmapsControl = await control.call(this)
|
|
@@ -49,9 +49,9 @@ async function controlNewsticker () {
|
|
|
49
49
|
const att = item._attachments[0]
|
|
50
50
|
let rsc = ''
|
|
51
51
|
if (att) {
|
|
52
|
-
if (att.mimeType.startsWith('video')) {
|
|
52
|
+
if (att.mimeType.startsWith('video') && !att.url.endsWith('.olv')) {
|
|
53
53
|
rsc = '<iframe style="height:250px; width:100%" frameborder="0" allowfullscreen scrolling="no" allow="camera; microphone; fullscreen" src="' + att.url + '"></iframe>'
|
|
54
|
-
} else {
|
|
54
|
+
} else if (att.mimeType.startsWith('image')) {
|
|
55
55
|
rsc = '<img style="height:250px" class="img-fluid" src="' + att.url + '">'
|
|
56
56
|
}
|
|
57
57
|
}
|
|
@@ -66,13 +66,13 @@ async function controlNewsticker () {
|
|
|
66
66
|
if (!el) return
|
|
67
67
|
}
|
|
68
68
|
`, `
|
|
69
|
-
|
|
69
|
+
${prefix}Dt () {
|
|
70
70
|
const el = document.querySelector('.maplibregl-ctrl-newsticker .datetime h5')
|
|
71
71
|
el.textContent = dayjs().tz('Asia/Jakarta').format('HH:mm [WIB]')
|
|
72
72
|
}
|
|
73
73
|
`, `
|
|
74
|
-
async
|
|
75
|
-
if (window
|
|
74
|
+
async ${prefix}GetPosts () {
|
|
75
|
+
// if (window.${prefix}) window.${prefix}.destroy()
|
|
76
76
|
const el = document.querySelector('.maplibregl-ctrl-newsticker .content')
|
|
77
77
|
el.innerHTML = ''
|
|
78
78
|
this.posts = await wmpa.fetchApi('/cms/post', { headers: { 'X-Attachments': 'true' } }, { limit: 10 })
|
|
@@ -90,7 +90,7 @@ async function controlNewsticker () {
|
|
|
90
90
|
li.appendChild(a)
|
|
91
91
|
el.appendChild(li)
|
|
92
92
|
})
|
|
93
|
-
window
|
|
93
|
+
window.${prefix} = new window.AcmeTicker(el, {
|
|
94
94
|
type: 'vertical',
|
|
95
95
|
direction: 'down',
|
|
96
96
|
speed: 600,
|
|
@@ -100,10 +100,10 @@ async function controlNewsticker () {
|
|
|
100
100
|
`])
|
|
101
101
|
|
|
102
102
|
this.addBlock('run', `
|
|
103
|
-
this
|
|
104
|
-
setInterval(this
|
|
105
|
-
await this
|
|
106
|
-
setInterval(this
|
|
103
|
+
this.${prefix}Dt()
|
|
104
|
+
setInterval(this.${prefix}Dt, 1000)
|
|
105
|
+
await this.${prefix}GetPosts()
|
|
106
|
+
setInterval(this.${prefix}GetPosts, 3 * 60 * 1000)
|
|
107
107
|
`)
|
|
108
108
|
|
|
109
109
|
const ui = await minify(await this.component.buildSentence(`
|
|
@@ -58,11 +58,13 @@ async function controlSearch () {
|
|
|
58
58
|
}
|
|
59
59
|
`, `
|
|
60
60
|
async ${prefix}Populate () {
|
|
61
|
+
const selector = '#${id} .input-group .dropdown-menu'
|
|
62
|
+
if (document.querySelector(selector).children.length > 0) return
|
|
61
63
|
const feeds = await ${this.params.attr.feed}() ?? []
|
|
62
64
|
feeds.unshift({ code: 'latLng', name: 'gotoLatLng', feed: { id: 'latLng', cmpLabel: 'latLng' } })
|
|
63
65
|
this.$store.mapSearch.feeds = feeds
|
|
64
66
|
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
|
|
67
|
+
const options = { selector, wrapper: 'div', checkChild: true }
|
|
66
68
|
await wmpa.addComponent(body, options)
|
|
67
69
|
if (!this.$store.mapSearch.feed) this.$store.mapSearch.feed = feeds[0].code + ':' + feeds[0].feed.id
|
|
68
70
|
const html = this.$store.mapSearch.recent ?? ''
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
async function wmapsBase () {
|
|
2
2
|
const controls = ['csrc', 'navigation-control', 'crlr', 'scale-control', 'attribution-control',
|
|
3
3
|
'centerpos', 'fullscreen-control', 'geolocate-control', 'czbp', 'cmp']
|
|
4
|
-
if (this.app.sumbaCms) controls.push('
|
|
4
|
+
if (this.app.sumbaCms) controls.push('news')
|
|
5
5
|
|
|
6
6
|
return class WmapsBase extends this.app.baseClass.MpaWidget {
|
|
7
7
|
static scripts = [...super.scripts,
|
package/package.json
CHANGED
package/wiki/CHANGES.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changes
|
|
2
2
|
|
|
3
|
+
## 2026-11-22
|
|
4
|
+
|
|
5
|
+
- [2.7.6] Bug fix in `control-newsticker.js` widget
|
|
6
|
+
- [2.7.6] Bug fix in `wmaps-base.js` widget
|
|
7
|
+
|
|
8
|
+
## 2026-11-12
|
|
9
|
+
|
|
10
|
+
- [2.7.5] Bug fix in `control-search.js` widget
|
|
11
|
+
- [2.7.5] Bug fix in `control-group.js` widget
|
|
12
|
+
|
|
3
13
|
## 2026-10-27
|
|
4
14
|
|
|
5
15
|
- [2.7.4] Bug fix in `getPosts()`
|