sumba 2.20.0 → 2.21.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.
@@ -8,11 +8,6 @@ async function teamUser () {
8
8
  calcFields: [
9
9
  { name: 'team', type: 'string' }
10
10
  ],
11
- formatValue: {
12
- team: (val, rec) => {
13
- return rec._ref.team.name
14
- }
15
- },
16
11
  widget: {
17
12
  teamId: {
18
13
  component: 'form-select-ext',
@@ -5,14 +5,6 @@ async function teamUser ({ req } = {}) {
5
5
  { name: 'meta', fields: ['id', 'userId', 'createdAt', 'updatedAt'] },
6
6
  { name: 'general', fields: ['ns', 'key', 'value'] }
7
7
  ],
8
- calcFields: [
9
- { name: 'user', type: 'string' }
10
- ],
11
- formatValue: {
12
- user: (val, rec) => {
13
- return rec._ref.user.name
14
- }
15
- },
16
8
  widget: {
17
9
  userId: {
18
10
  component: 'form-select-ext',
@@ -7,12 +7,6 @@ async function user ({ req } = {}) {
7
7
  { name: 'address', fields: ['address1:12', 'address2:12', 'city:6-md 8-sm', 'zipCode:2-md 4-sm', 'provinceState:4-md', 'country:6-md', 'phone:6-md', 'website:12'] },
8
8
  { name: 'socialMedia', fields: ['socX:3-md 6-sm', 'socInstagram:3-md 6-sm', 'socFacebook:3-md 6-sm', 'socLinkedIn:3-md 6-sm'] }
9
9
  ],
10
- formatValue: {
11
- token: async function (val, rec) {
12
- const { hash } = this.app.bajoExtra
13
- return await hash(rec.salt)
14
- }
15
- },
16
10
  widget: {
17
11
  token: {
18
12
  component: 'form-plaintext'
@@ -13,8 +13,7 @@ const manageSite = {
13
13
  req.params.base = ''
14
14
  const options = {
15
15
  modelOpts: {
16
- formatValue: true,
17
- retainOriginalValue: true,
16
+ fmt: true,
18
17
  noCache: true
19
18
  },
20
19
  schema: {
@@ -10,7 +10,7 @@ const profile = {
10
10
  const { omit, pick } = this.app.lib._
11
11
  const { hash } = this.app.bajoExtra
12
12
 
13
- const options = { forceNoHidden: ['token'], noHook: true, noCache: true, formatValue: true, retainOriginalValue: true }
13
+ const options = { forceNoHidden: ['token'], noHook: true, noCache: true, fmt: true }
14
14
  const mdl = this.app.dobo.getModel(model)
15
15
 
16
16
  const { schema } = await getSchemaExt(model, 'edit', { ...options, args: [{ req, model: mdl }] })
@@ -3,7 +3,7 @@ const profile = {
3
3
  handler: async function (req, reply) {
4
4
  const { hash } = this.app.bajoExtra
5
5
  const { getRecord } = this.app.waibuDb
6
- const options = { forceNoHidden: ['token'], noHook: true, noCache: true, attachment: true, mimeType: true, formatValue: true, retainOriginalValue: true }
6
+ const options = { forceNoHidden: ['token'], noHook: true, noCache: true, attachment: true, mimeType: true, fmt: true }
7
7
  const resp = await getRecord({ model: 'SumbaUser', req, id: req.user.id, options })
8
8
  const form = resp.data
9
9
  form.token = await hash(form.salt)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sumba",
3
- "version": "2.20.0",
3
+ "version": "2.21.0",
4
4
  "description": "Biz Suite for Bajo Framework",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/wiki/CHANGES.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changes
2
2
 
3
+ ## 2026-04-25
4
+
5
+ - [2.21.0] Change options to format value using the new key set by dobo
6
+ - [2.21.0] Remove ```options.retainOriginalValue``` since it is not needed anymore
7
+ - [2.21.0] Remove ```property.formatValue``` from all properties
8
+ - [2.21.0] Remove ```schema.formatValue``` from all schemas
9
+ - [2.21.0] Remove ```schema.calcFields``` from all schemas
10
+
3
11
  ## 2026-04-23
4
12
 
5
13
  - [2.20.0] Add ```parseRouteGuard()```