sumba 2.3.1 → 2.4.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.
@@ -110,9 +110,11 @@
110
110
  "manageDownload": "Manage Download",
111
111
  "userSession": "User Session",
112
112
  "XHandler": "Twitter/X Account",
113
- "unverified": "Unverified",
114
- "active": "Active",
115
- "inactive": "Inactive",
113
+ "statusUnverified": "Unverified",
114
+ "statusActive": "Active",
115
+ "statusInactive": "Inactive",
116
+ "siteSetting": "Site Settings",
117
+ "validCountryCodeRequired": "Value must be one of valid country codes",
116
118
  "field": {
117
119
  "currentPassword": "Current Password",
118
120
  "newPassword": "New Password",
@@ -133,7 +135,9 @@
133
135
  "socLinkedIn": "LinkedIn",
134
136
  "size": "Size",
135
137
  "user": "User",
136
- "team": "Team"
138
+ "team": "Team",
139
+ "ns": "Module's Namespace",
140
+ "value": "Value"
137
141
  },
138
142
  "validation": {
139
143
  "password": {
@@ -111,9 +111,11 @@
111
111
  "manageDownload": "Kelola Unduhan",
112
112
  "userSession": "Sesi Pengguna",
113
113
  "XHandler": "Akun Twitter/X",
114
- "unverified": "Belum Terverifikasi",
115
- "active": "Aktif",
116
- "inactive": "Non Aktif",
114
+ "statusUnverified": "Belum Terverifikasi",
115
+ "statusActive": "Aktif",
116
+ "statusInactive": "Non Aktif",
117
+ "siteSetting": "Setelan Situs",
118
+ "validCountryCodeRequired": "Nilai harus salah satu dari kode negara yang berlaku",
117
119
  "field": {
118
120
  "currentPassword": "Kata Sandi Saat Ini",
119
121
  "newPassword": "Kata Sandi Baru",
@@ -134,7 +136,9 @@
134
136
  "socLinkedIn": "LinkedIn",
135
137
  "size": "Besaran",
136
138
  "user": "Pengguna",
137
- "team": "Tim"
139
+ "team": "Tim",
140
+ "ns": "Ruang Nama Modul",
141
+ "value": "Value"
138
142
  },
139
143
  "validation": {
140
144
  "password": {
@@ -1,16 +1,14 @@
1
1
  async function country (opts = {}) {
2
- const { readConfig } = this.app.bajo
3
2
  opts.fieldName = opts.fieldName ?? 'country'
4
- const countries = await readConfig('bajoCommonDb:/extend/dobo/fixture/country.json', { ignoreError: true, defValue: [] })
5
- const values = countries.map(item => ({ value: item.id, text: item.name.replaceAll('\'', '') }))
6
3
  return {
7
4
  properties: [{
8
5
  name: opts.fieldName,
9
6
  type: 'string',
10
7
  maxLength: 2,
11
8
  index: opts.index ?? true,
12
- values,
13
- rules: ['uppercase', { rule: 'length', params: 2 }]
9
+ values: 'sumba:getCountriesValues',
10
+ rules: ['uppercase', { rule: 'length', params: 2 }],
11
+ rulesMsg: { 'any.only': 'validCountryCodeRequired' }
14
12
  }],
15
13
  rules: [{ rule: 'trim', fields: [opts.fieldName] }]
16
14
  }
@@ -8,7 +8,7 @@
8
8
  ],
9
9
  "widget": {
10
10
  "country": {
11
- "component": "form-select-country"
11
+ "component": "form-select-ext"
12
12
  }
13
13
  }
14
14
  },
package/index.js CHANGED
@@ -534,6 +534,13 @@ async function factory (pkgName) {
534
534
  const resp = await this.app.dobo.getModel('SumbaUser').getRecord(id, options)
535
535
  return await hash(resp.salt)
536
536
  }
537
+
538
+ getCountriesValues = async () => {
539
+ const { getModel } = this.app.dobo
540
+ const model = getModel('CdbCountry')
541
+ const items = await model.findAllRecord()
542
+ return items.map(item => ({ value: item.id, text: item.name }))
543
+ }
537
544
  }
538
545
 
539
546
  return Sumba
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sumba",
3
- "version": "2.3.1",
3
+ "version": "2.4.0",
4
4
  "description": "Biz Suite for Bajo Framework",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -11,7 +11,7 @@
11
11
  "bajo": {
12
12
  "type": "plugin",
13
13
  "alias": "sumba",
14
- "dependencies": ["bajo-extra", "bajo-common-db"]
14
+ "dependencies": ["bajo-extra", "bajo-common-db", "dobo"]
15
15
  },
16
16
  "repository": {
17
17
  "type": "git",
package/wiki/CHANGES.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changes
2
2
 
3
+ ## 2026-02-20
4
+
5
+ - [2.4.0] Add ```getCountriesValues()```
6
+ - [2.4.0] Update ```sumba:country``` feature to use ```prop.values``` as a handler
7
+ - [2.4.0] No longer use the removed ```FormSelectCountry```, instead use ```FormSelectExt```
8
+
3
9
  ## 2026-02-17
4
10
 
5
11
  - [2.3.0] Add admin menu links to ```siteSetting```