waibu-db 2.17.1 → 2.17.2
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.
|
@@ -127,7 +127,7 @@ async function table () {
|
|
|
127
127
|
if (!prop) prop = find(schema.view.calcFields, { name: f })
|
|
128
128
|
if (!prop) continue
|
|
129
129
|
let dataValue = d._orig[f]
|
|
130
|
-
if (['datetime'].includes(prop.type) && dataValue) dataValue = escape(dataValue.toISOString())
|
|
130
|
+
if (['datetime'].includes(prop.type) && dataValue instanceof Date && !isNaN(dataValue)) dataValue = escape(dataValue.toISOString())
|
|
131
131
|
else if (['string', 'text'].includes(prop.type)) dataValue = escape(dataValue)
|
|
132
132
|
else if (['array', 'object'].includes(prop.type)) dataValue = escape(JSON.stringify(dataValue))
|
|
133
133
|
const refName = get(schema, `view.widget.${f}.attr.refName`)
|
|
@@ -181,11 +181,12 @@ 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 ns = model.plugin.ns
|
|
184
185
|
const schema = pick(model, ['name', 'properties', 'indexes', 'disabled', 'attachment', 'sortables', 'scanables', 'view', 'hidden'])
|
|
185
186
|
const base = options.base ?? path.basename(model.file, path.extname(model.file))
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
ext = defaultsDeep(options.schema ?? {},
|
|
187
|
+
const parserOpts = { args: options.args }
|
|
188
|
+
let ext = await readConfig(`${ns}:/extend/waibuDb/schema/${base}.*`, { ns, baseNs: 'waibuDb', parserOpts })
|
|
189
|
+
ext = defaultsDeep(options.schema ?? {}, ext)
|
|
189
190
|
await handler[view].call(this, schema, ext, options)
|
|
190
191
|
return { schema, ext, model }
|
|
191
192
|
}
|
package/package.json
CHANGED
package/wiki/CHANGES.md
CHANGED
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
# Changes
|
|
2
2
|
|
|
3
|
+
## 2026-04-23
|
|
4
|
+
|
|
5
|
+
- [2.17.2] Bug fix in ```getSchemaExt()```
|
|
6
|
+
- [2.17.2] Bug fix in ```WdbDataTable``` widget
|
|
7
|
+
|
|
3
8
|
## 2026-04-21
|
|
4
9
|
|
|
5
|
-
- [2.
|
|
10
|
+
- [2.17.1] Bug fix in ```WdbLookupSelect.build()```
|
|
6
11
|
|
|
7
12
|
## 2026-04-19
|
|
8
13
|
|
|
9
|
-
- [2.
|
|
10
|
-
- [2.
|
|
14
|
+
- [2.17.0] Rename ```WdbTable``` to ```WdbDataTable``` widget
|
|
15
|
+
- [2.17.0] ```getSchemaExt()``` now include export related model too
|
|
11
16
|
|
|
12
17
|
## 2026-04-18
|
|
13
18
|
|