waibu-maps 1.2.4 → 1.2.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.
@@ -1,16 +1,16 @@
1
1
  import path from 'path'
2
2
 
3
3
  async function icon () {
4
- const { map, camelCase } = this.lib._
4
+ const { map } = this.lib._
5
5
  if (!this.app.waibuStatic) return []
6
6
  const icons = await this.app.waibuStatic.listResources(`${this.name}.asset:/icon`)
7
7
  return map(icons, icon => {
8
8
  const base = path.basename(icon.href)
9
9
  const dir = path.dirname(icon.href)
10
- const name = camelCase(`${path.basename(dir)} ${base}`)
10
+ const id = `icon:/${path.basename(dir)}/${base}`
11
11
  return {
12
- id: icon.href,
13
- name
12
+ id,
13
+ url: icon.href
14
14
  }
15
15
  })
16
16
  }
@@ -0,0 +1,7 @@
1
+ {
2
+ "connection": "memory",
3
+ "properties": [
4
+ "id::255:primary:true",
5
+ "name::255:true"
6
+ ]
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waibu-maps",
3
- "version": "1.2.4",
3
+ "version": "1.2.6",
4
4
  "description": "Maps for Waibu MPA",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -62,7 +62,7 @@ async function controlSearch () {
62
62
  feeds.unshift({ code: 'latLng', name: 'gotoLatLng', feed: { id: 'latLng', label: '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.label + '" @click="$store.mapSearch.feed = \\'' + feed.code + ':' + feed.feed.id + '\\'"/>')
65
- await wmpa.addComponent(body, '#${id} .input-group .dropdown-menu', 'div')
65
+ await wmpa.addComponent(body, '#${id} .input-group .dropdown-menu', 'div', true)
66
66
  if (!this.$store.mapSearch.feed) this.$store.mapSearch.feed = feeds[0].code + ':' + feeds[0].feed.id
67
67
  const html = this.$store.mapSearch.recent ?? ''
68
68
  wmpa.replaceWithComponentHtml(html, '#${id} .result div', 'div')
@@ -0,0 +1,3 @@
1
+ {
2
+ "model": "WmapsIcon"
3
+ }