waibu-db 1.0.19 → 1.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.
Files changed (31) hide show
  1. package/package.json +1 -1
  2. package/waibuBootstrap/theme/component/factory/btn-add.js +1 -1
  3. package/waibuBootstrap/theme/component/factory/btn-back.js +1 -1
  4. package/waibuBootstrap/theme/component/factory/btn-clone.js +1 -1
  5. package/waibuBootstrap/theme/component/factory/btn-columns.js +1 -1
  6. package/waibuBootstrap/theme/component/factory/btn-delete.js +1 -1
  7. package/waibuBootstrap/theme/component/factory/btn-details.js +1 -1
  8. package/waibuBootstrap/theme/component/factory/btn-edit.js +1 -1
  9. package/waibuBootstrap/theme/component/factory/btn-export.js +1 -1
  10. package/waibuBootstrap/theme/component/factory/echarts.js +1 -1
  11. package/waibuBootstrap/theme/component/factory/pagination.js +1 -1
  12. package/waibuBootstrap/theme/component/factory/query.js +1 -1
  13. package/waibuBootstrap/theme/component/factory/recs-info.js +1 -1
  14. package/waibuBootstrap/theme/component/factory/table.js +4 -4
  15. /package/{bajo → plugin}/.alias +0 -0
  16. /package/{bajo → plugin}/.dependencies +0 -0
  17. /package/{bajo → plugin}/config.json +0 -0
  18. /package/{bajo → plugin}/method/admin-menu.js +0 -0
  19. /package/{bajo → plugin}/method/get-lookup-data.js +0 -0
  20. /package/{bajo → plugin}/method/get-params.js +0 -0
  21. /package/{bajo → plugin}/method/get-schema-ext.js +0 -0
  22. /package/{bajo → plugin}/method/method-map.js +0 -0
  23. /package/{bajo → plugin}/method/record/count.js +0 -0
  24. /package/{bajo → plugin}/method/record/create.js +0 -0
  25. /package/{bajo → plugin}/method/record/find-one.js +0 -0
  26. /package/{bajo → plugin}/method/record/find.js +0 -0
  27. /package/{bajo → plugin}/method/record/get.js +0 -0
  28. /package/{bajo → plugin}/method/record/remove.js +0 -0
  29. /package/{bajo → plugin}/method/record/update.js +0 -0
  30. /package/{bajo → plugin}/method/stat/aggregate.js +0 -0
  31. /package/{bajo → plugin}/method/stat/histogram.js +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waibu-db",
3
- "version": "1.0.19",
3
+ "version": "1.1.1",
4
4
  "description": "DB Helper",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -4,7 +4,7 @@ async function btnAdd () {
4
4
  const WdbBase = await wdbBase.call(this)
5
5
 
6
6
  return class WdbBtnAdd extends WdbBase {
7
- async build () {
7
+ build = async () => {
8
8
  const { isEmpty, get } = this.plugin.app.bajo.lib._
9
9
  const { req } = this.component
10
10
  this.params.noTag = true
@@ -4,7 +4,7 @@ async function btnBack () {
4
4
  const WdbBase = await wdbBase.call(this)
5
5
 
6
6
  return class WdbBtnBack extends WdbBase {
7
- async build () {
7
+ build = async () => {
8
8
  const { isEmpty } = this.plugin.app.bajo.lib._
9
9
  const { attrToArray } = this.plugin.app.waibuMpa
10
10
  const { req } = this.component
@@ -4,7 +4,7 @@ async function btnClone () {
4
4
  const WdbBase = await wdbBase.call(this)
5
5
 
6
6
  return class WdbBtnClone extends WdbBase {
7
- async build () {
7
+ build = async () => {
8
8
  const { req } = this.component
9
9
  const { isEmpty, get } = this.plugin.app.bajo.lib._
10
10
  this.params.noTag = true
@@ -4,7 +4,7 @@ async function btnColumns () {
4
4
  const WdbBase = await wdbBase.call(this)
5
5
 
6
6
  return class WdbBtnColumns extends WdbBase {
7
- async build () {
7
+ build = async () => {
8
8
  const { get, isEmpty, without } = this.plugin.app.bajo.lib._
9
9
  const { jsonStringify } = this.plugin.app.waibuMpa
10
10
  const { req } = this.component
@@ -4,7 +4,7 @@ async function btnDelete () {
4
4
  const WdbBase = await wdbBase.call(this)
5
5
 
6
6
  return class WdbBtnDelete extends WdbBase {
7
- async build () {
7
+ build = async () => {
8
8
  const { req } = this.component
9
9
  const { generateId } = this.plugin.app.bajo
10
10
  const { isEmpty, get } = this.plugin.app.bajo.lib._
@@ -4,7 +4,7 @@ async function btnDetails () {
4
4
  const WdbBase = await wdbBase.call(this)
5
5
 
6
6
  return class WdbBtnDetails extends WdbBase {
7
- async build () {
7
+ build = async () => {
8
8
  const { req } = this.component
9
9
  const { generateId } = this.plugin.app.bajo
10
10
  const { isEmpty, get } = this.plugin.app.bajo.lib._
@@ -4,7 +4,7 @@ async function btnEdit () {
4
4
  const WdbBase = await wdbBase.call(this)
5
5
 
6
6
  return class WdbBtnEdit extends WdbBase {
7
- async build () {
7
+ build = async () => {
8
8
  const { req } = this.component
9
9
  const { generateId } = this.plugin.app.bajo
10
10
  const { isEmpty, get } = this.plugin.app.bajo.lib._
@@ -4,7 +4,7 @@ async function btnExport () {
4
4
  const WdbBase = await wdbBase.call(this)
5
5
 
6
6
  return class WdbBtnExport extends WdbBase {
7
- async build () {
7
+ build = async () => {
8
8
  const { isEmpty, get } = this.plugin.app.bajo.lib._
9
9
  const { req } = this.component
10
10
  this.params.noTag = true
@@ -20,7 +20,7 @@ async function echarts () {
20
20
  }
21
21
  }
22
22
 
23
- async build () {
23
+ build = async () => {
24
24
  const { defaultsDeep, generateId } = this.plugin.app.bajo
25
25
  const { base64JsonDecode, jsonStringify } = this.plugin.app.waibuMpa
26
26
  const { cloneDeep } = this.plugin.app.bajo.lib._
@@ -15,7 +15,7 @@ async function pagination () {
15
15
  const WdbBase = await wdbBase.call(this)
16
16
 
17
17
  return class WdbPagination extends WdbBase {
18
- async build () {
18
+ build = async () => {
19
19
  const { req } = this.component
20
20
  const { attrToObject, paginationLayout, groupAttrs } = this.plugin.app.waibuMpa
21
21
  const { get, isNumber } = this.plugin.app.bajo.lib._
@@ -4,7 +4,7 @@ async function query () {
4
4
  const WdbBase = await wdbBase.call(this)
5
5
 
6
6
  return class WdbQuery extends WdbBase {
7
- async build () {
7
+ build = async () => {
8
8
  const { generateId } = this.plugin.app.bajo
9
9
  const { jsonStringify } = this.plugin.app.waibuMpa
10
10
  const { find, get, without, isEmpty, filter, upperFirst } = this.plugin.app.bajo.lib._
@@ -5,7 +5,7 @@ async function recsInfo () {
5
5
  const WdbBase = await wdbBase.call(this)
6
6
 
7
7
  return class WdbRecsInfo extends WdbBase {
8
- async build () {
8
+ build = async () => {
9
9
  const { req } = this.component
10
10
  const { attrToObject, groupAttrs, attrToArray } = this.plugin.app.waibuMpa
11
11
  const { get, isEmpty, omit, merge } = this.plugin.app.bajo.lib._
@@ -4,7 +4,7 @@ async function table () {
4
4
  const WdbBase = await wdbBase.call(this)
5
5
 
6
6
  return class WdbTable extends WdbBase {
7
- isRightAligned (field, schema) {
7
+ isRightAligned = (field, schema) => {
8
8
  const { get, find } = this.plugin.app.bajo.lib._
9
9
  const prop = find(schema.properties, { name: field })
10
10
  if (!prop) return false
@@ -13,12 +13,12 @@ async function table () {
13
13
  return value
14
14
  }
15
15
 
16
- isNoWrap (field, schema) {
16
+ isNoWrap = (field, schema) => {
17
17
  const { get } = this.plugin.app.bajo.lib._
18
18
  return get(schema, 'view.noWrap', []).includes(field)
19
19
  }
20
20
 
21
- async build () {
21
+ build = async () => {
22
22
  const { req } = this.component
23
23
  const { callHandler } = this.plugin.app.bajo
24
24
  const { escape } = this.plugin.app.waibu
@@ -140,7 +140,7 @@ async function table () {
140
140
  const formatter = get(schema, `view.formatter.${f}`)
141
141
  if (formatter) {
142
142
  if (isFunction(formatter)) value = await formatter(dataValue, d)
143
- else value = await callHandler(formatter, req, dataValue, d)
143
+ else value = await callHandler(this.plugin.app[schema.ns], formatter, req, dataValue, d)
144
144
  value = await this.component.buildSentence(value)
145
145
  }
146
146
  const line = await this.component.buildTag({ tag: 'td', attr, html: value })
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes