waibu-db 2.16.3 → 2.17.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.
- package/extend/bajoTemplate/partial/crud/list-handler.html +1 -1
- package/extend/waibuBootstrap/theme/component/widget/{table.js → data-table.js} +1 -1
- package/extend/waibuBootstrap/theme/component/widget/query.js +1 -2
- package/lib/method/get-schema-ext.js +2 -2
- package/package.json +1 -1
- package/wiki/CHANGES.md +8 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!-- include waibuDb.partial:/crud/_list-btns.html -->
|
|
2
|
-
<c:wdb-table id="main-table" border body-divider strip responsive margin="top-3"/>
|
|
2
|
+
<c:wdb-data-table id="main-table" border body-divider strip responsive margin="top-3"/>
|
|
3
3
|
<!-- include waibuDb.partial:/crud/_list-footer.html -->
|
|
4
4
|
<!-- include waibuDb.partial:/crud/_addons.html -->
|
|
5
5
|
<!-- include waibuDb.partial:/crud/_list-warnings.html -->
|
|
@@ -3,7 +3,7 @@ import wdbBase from '../wdb-base.js'
|
|
|
3
3
|
async function table () {
|
|
4
4
|
const WdbBase = await wdbBase.call(this)
|
|
5
5
|
|
|
6
|
-
return class
|
|
6
|
+
return class WdbDataTable extends WdbBase {
|
|
7
7
|
isRightAligned = (field, schema) => {
|
|
8
8
|
const { get, find } = this.app.lib._
|
|
9
9
|
const prop = find(schema.properties, { name: field })
|
|
@@ -61,7 +61,7 @@ async function query () {
|
|
|
61
61
|
}
|
|
62
62
|
this.params.noTag = true
|
|
63
63
|
const container = this.params.attr.modal ? 'modal' : 'drawer'
|
|
64
|
-
const scanables = (this.
|
|
64
|
+
const scanables = (this.schema.scanables ?? []).map(item => req.t(`field.${item}`))
|
|
65
65
|
let placeholder = this.params.attr.placeholder
|
|
66
66
|
if (!placeholder) placeholder = scanables.length > 0 ? req.t('queryHint%s', join(scanables, { separator: ', ', lastSeparator: 'or' })) : req.t('query')
|
|
67
67
|
this.params.html = await this.component.buildSentence(`
|
|
@@ -111,7 +111,6 @@ async function query () {
|
|
|
111
111
|
val = opv.slice(v.length).replaceAll('[', '').replaceAll('{', '').replaceAll(']', '').replaceAll('}', '').replaceAll('\\'', '')
|
|
112
112
|
}
|
|
113
113
|
})
|
|
114
|
-
console.log(op, val)
|
|
115
114
|
if (_.isEmpty(op)) continue
|
|
116
115
|
this[f + 'Op'] = op
|
|
117
116
|
if (op === 'between') {
|
|
@@ -181,13 +181,13 @@ async function getSchemaExt (modelName, view, options = {}) {
|
|
|
181
181
|
const { pick, isString } = this.app.lib._
|
|
182
182
|
|
|
183
183
|
const model = isString(modelName) ? this.app.dobo.getModel(modelName) : modelName
|
|
184
|
-
const schema = pick(model, ['name', 'properties', 'indexes', 'disabled', 'attachment', 'sortables', 'view', 'hidden'])
|
|
184
|
+
const schema = pick(model, ['name', 'properties', 'indexes', 'disabled', 'attachment', 'sortables', 'scanables', 'view', 'hidden'])
|
|
185
185
|
const base = options.base ?? path.basename(model.file, path.extname(model.file))
|
|
186
186
|
let ext = await readConfig(`${model.plugin.ns}:/extend/waibuDb/schema/${base}.*`, { ignoreError: true, options })
|
|
187
187
|
const over = await readConfig(`main:/extend/waibuDb/extend/${model.plugin.ns}/schema/${base}.*`, { ignoreError: true, options })
|
|
188
188
|
ext = defaultsDeep(options.schema ?? {}, over, ext)
|
|
189
189
|
await handler[view].call(this, schema, ext, options)
|
|
190
|
-
return { schema, ext }
|
|
190
|
+
return { schema, ext, model }
|
|
191
191
|
}
|
|
192
192
|
|
|
193
193
|
export default getSchemaExt
|
package/package.json
CHANGED
package/wiki/CHANGES.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changes
|
|
2
2
|
|
|
3
|
+
## 2026-04-19
|
|
4
|
+
|
|
5
|
+
- [2.12.0] Rename ```WdbTable``` to ```WdbDataTable``` widget
|
|
6
|
+
- [2.12.0] ```getSchemaExt()``` now include export related model too
|
|
7
|
+
|
|
3
8
|
## 2026-04-18
|
|
4
9
|
|
|
5
10
|
- [2.16.3] Bug fix in ```WdbForm``` widget
|
|
@@ -60,7 +65,7 @@
|
|
|
60
65
|
- [2.12.5] Bug fix in ```wdb-pagination``` widget
|
|
61
66
|
- [2.12.5] Bug fix in ```wdb-query``` widget
|
|
62
67
|
- [2.12.5] Bug fix in ```wdb-recs-info``` widget
|
|
63
|
-
- [2.12.5] Bug fix in ```wdb-table``` widget
|
|
68
|
+
- [2.12.5] Bug fix in ```wdb-data-table``` widget
|
|
64
69
|
- [2.12.5] Bug fix in remove attachment
|
|
65
70
|
|
|
66
71
|
## 2026-03-30
|
|
@@ -71,7 +76,7 @@
|
|
|
71
76
|
## 2026-03-27
|
|
72
77
|
|
|
73
78
|
- [2.12.1] Bug fix in all ```view.format``` & ```view.formatValue```
|
|
74
|
-
- [2.12.2] Bug fix in ```wdb-form``` & ```wdb-table``` widgets, now correctly use value from format if provided
|
|
79
|
+
- [2.12.2] Bug fix in ```wdb-form``` & ```wdb-data-table``` widgets, now correctly use value from format if provided
|
|
75
80
|
|
|
76
81
|
## 2026-03-26
|
|
77
82
|
|
|
@@ -96,7 +101,7 @@
|
|
|
96
101
|
|
|
97
102
|
- [2.9.0] Add ability to overwrite ```base``` through ```options```
|
|
98
103
|
- [2.9.0] Bug fix in ```wdb-btn-columns``` widget
|
|
99
|
-
- [2.9.0] Bug fix in ```wdb-table``` widget
|
|
104
|
+
- [2.9.0] Bug fix in ```wdb-data-table``` widget
|
|
100
105
|
|
|
101
106
|
## 2026-03-08
|
|
102
107
|
|