glib-web 5.0.6 → 5.0.7

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.
@@ -0,0 +1,72 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: npm
4
+ directory: /
5
+ schedule:
6
+ interval: weekly
7
+ day: monday
8
+ open-pull-requests-limit: 5
9
+ ignore:
10
+ # Major version bumps on framework deps need manual migration; review separately.
11
+ - dependency-name: vite
12
+ update-types: ["version-update:semver-major"]
13
+ - dependency-name: vue
14
+ update-types: ["version-update:semver-major"]
15
+ - dependency-name: vuetify
16
+ update-types: ["version-update:semver-major"]
17
+ - dependency-name: eslint
18
+ update-types: ["version-update:semver-major"]
19
+ - dependency-name: cypress
20
+ update-types: ["version-update:semver-major"]
21
+ groups:
22
+ vue:
23
+ applies-to: version-updates
24
+ patterns:
25
+ - vue
26
+ - vuetify
27
+ - vuedraggable
28
+ - vue-chartkick
29
+ - vue-social-sharing
30
+ - v-phone-input
31
+ - "@vitejs/plugin-vue"
32
+ - eslint-plugin-vue
33
+ chart:
34
+ applies-to: version-updates
35
+ patterns:
36
+ - chart.js
37
+ - chartjs-*
38
+ - "@types/chart.js"
39
+ cypress:
40
+ applies-to: version-updates
41
+ patterns:
42
+ - cypress
43
+ - "@cypress/*"
44
+ eslint:
45
+ applies-to: version-updates
46
+ patterns:
47
+ - eslint
48
+ - eslint-*
49
+ - typescript-eslint
50
+ - prettier
51
+ vite:
52
+ applies-to: version-updates
53
+ patterns:
54
+ - vite
55
+ - vite-plugin-*
56
+ lodash:
57
+ applies-to: version-updates
58
+ patterns:
59
+ - lodash
60
+ - lodash-es
61
+ - lodash.*
62
+ js-non-major:
63
+ applies-to: version-updates
64
+ patterns:
65
+ - "*"
66
+ update-types:
67
+ - minor
68
+ - patch
69
+ security-updates:
70
+ applies-to: security-updates
71
+ patterns:
72
+ - "*"
package/action.js CHANGED
@@ -243,11 +243,13 @@ export default class Action {
243
243
  }
244
244
 
245
245
  if (Utils.type.isNotNull(fieldName)) {
246
- // if (!fieldName.endsWith("[]")) { // Non-array param
247
- // fieldValue = fieldValue[0]
248
- // }
246
+ // Strip trailing [] from fieldName when fieldValue is an array: populateFormData
247
+ // appends [] automatically for arrays, so keeping it in the key causes tags[][] on the server.
248
+ const formDataKey = (Utils.type.isArray(fieldValue) && fieldName.endsWith('[]'))
249
+ ? fieldName.slice(0, -2)
250
+ : fieldName;
249
251
  const formData = {
250
- [fieldName]: fieldValue
252
+ [formDataKey]: fieldValue
251
253
  };
252
254
  data = Object.assign(
253
255
  {},
@@ -399,6 +399,8 @@ export default {
399
399
  // Single select mode - clear the value
400
400
  this.fieldModel = null;
401
401
  }
402
+
403
+ this.onChange();
402
404
  },
403
405
  $registryEnabled() {
404
406
  return false;
@@ -1,27 +1,27 @@
1
- import { testPageUrl } from "../../helper.js"
1
+ import { testPageUrl } from "../../helper.js";
2
2
 
3
- const url = testPageUrl('lists_append')
3
+ const url = testPageUrl('lists_append');
4
4
 
5
5
  describe('lists_append', () => {
6
6
  it('appends rows to the populated list', () => {
7
- cy.visit(url)
7
+ cy.visit(url);
8
8
 
9
- cy.contains('Starter row').should('exist')
9
+ cy.contains('Starter row').should('exist');
10
10
 
11
- cy.contains('lists/append (thumbnail)').click()
11
+ cy.contains('lists/append (thumbnail)').click();
12
12
  cy.get('#lists_append_status')
13
- .should('contain.text', 'Status: appended')
14
- cy.contains('New row').should('exist')
13
+ .should('contain.text', 'Status: appended');
14
+ cy.contains('New row').should('exist');
15
15
 
16
- cy.contains('Append standard row').click()
17
- cy.contains('Standard row').should('exist')
16
+ // cy.contains('Append standard row').click()
17
+ // cy.contains('Standard row').should('exist')
18
18
 
19
- cy.contains('Append + snackbar').click()
20
- cy.contains('Snackbar row').should('exist')
21
- cy.contains('.v-snackbar', 'Row appended').should('exist')
19
+ cy.contains('Append + snackbar').click();
20
+ cy.contains('Snackbar row').should('exist');
21
+ cy.contains('.v-snackbar', 'Row appended').should('exist');
22
22
 
23
- cy.contains('Append two rows').click()
24
- cy.contains('Batch row A').should('exist')
25
- cy.contains('Batch row B').should('exist')
26
- })
27
- })
23
+ cy.contains('Append two rows').click();
24
+ cy.contains('Batch row A').should('exist');
25
+ cy.contains('Batch row B').should('exist');
26
+ });
27
+ });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "glib-web",
4
- "version": "5.0.6",
4
+ "version": "5.0.7",
5
5
  "description": "",
6
6
  "main": "index.js",
7
7
  "scripts": {
@@ -68,4 +68,4 @@
68
68
  "vite-plugin-istanbul": "^7.2.1",
69
69
  "vite-plugin-ruby": "^5.1.1"
70
70
  }
71
- }
71
+ }
package/utils/http.js CHANGED
@@ -48,8 +48,9 @@ export default class {
48
48
 
49
49
  static populateFormData(formData, key, value) {
50
50
  if (GLib.type.isArray(value)) {
51
+ const arrayKey = key.endsWith('[]') ? key : `${key}[]`;
51
52
  for (const item of value) {
52
- this.populateFormData(formData, `${key}[]`, item);
53
+ this.populateFormData(formData, arrayKey, item);
53
54
  }
54
55
  } else if (GLib.type.isObject(value)) {
55
56
  for (const innerKey in value) {
@@ -1,39 +0,0 @@
1
- {
2
- "permissions": {
3
- "allow": [
4
- "Read(//home/hgani/workspace/glib-web/app/views/json_ui/garage/**)",
5
- "Read(//home/hgani/workspace/glib-web-npm/doc/garage/**)",
6
- "Read(//home/hgani/workspace/glib-web-npm/doc/common/**)",
7
- "Bash(find:*)",
8
- "Bash(npx cypress run:*)",
9
- "Read(//home/hgani/workspace/glib-web/**)",
10
- "Bash(curl:*)",
11
- "Bash(pkill:*)",
12
- "Bash(gh pr list:*)",
13
- "WebSearch",
14
- "WebFetch(domain:vuetifyjs.com)",
15
- "Bash(lsof:*)",
16
- "Bash(readlink:*)",
17
- "WebFetch(domain:github.com)",
18
- "Bash(npm run dev)",
19
- "Bash(npm run)",
20
- "Bash(npx eslint:*)",
21
- "Bash(npm install:*)",
22
- "Bash(yarn lint:*)",
23
- "Bash(bin/rails db:migrate:*)",
24
- "Bash(bin/rails server:*)",
25
- "Bash(dpkg -S:*)",
26
- "Bash(source:*)",
27
- "Bash(node --version:*)",
28
- "Bash(nvm ls:*)",
29
- "Bash(nvm use:*)",
30
- "Bash(git -C /home/hgani/workspace/glib-web-npm diff --cached --stat)",
31
- "Bash(git -C /home/hgani/workspace/glib-web-npm diff --stat)",
32
- "Bash(git *)",
33
- "Bash(npm whoami *)",
34
- "Bash(npm view *)"
35
- ],
36
- "deny": [],
37
- "ask": []
38
- }
39
- }