@operato/data-grist 10.29.43 → 10.29.44

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@operato/data-grist",
3
- "version": "10.29.43",
3
+ "version": "10.29.44",
4
4
  "description": "User interface for grid (desktop) and list (mobile)",
5
5
  "author": "heartyoh",
6
6
  "type": "module",
@@ -78,14 +78,14 @@
78
78
  "@material/web": "^2.0.0",
79
79
  "@operato/headroom": "^10.29.1",
80
80
  "@operato/i18n": "^10.29.27",
81
- "@operato/input": "^10.29.43",
82
- "@operato/list-state": "^10.29.43",
83
- "@operato/p13n": "^10.29.43",
84
- "@operato/popup": "^10.29.43",
81
+ "@operato/input": "^10.29.44",
82
+ "@operato/list-state": "^10.29.44",
83
+ "@operato/p13n": "^10.29.44",
84
+ "@operato/popup": "^10.29.44",
85
85
  "@operato/pull-to-refresh": "^10.29.23",
86
86
  "@operato/styles": "^10.29.30",
87
87
  "@operato/time-calculator": "^10.29.1",
88
- "@operato/utils": "^10.29.43",
88
+ "@operato/utils": "^10.29.44",
89
89
  "i18next": "^24.2.1",
90
90
  "json5": "^2.2.0",
91
91
  "lit": "^3.1.2",
@@ -124,5 +124,5 @@
124
124
  "prettier --write"
125
125
  ]
126
126
  },
127
- "gitHead": "ccc06fed313fcc20a076a1cf7bc586fdacaba594"
127
+ "gitHead": "112d3ac6ada895fc45c2010c2555d5fd88a0f8a5"
128
128
  }
@@ -69,6 +69,7 @@ describe('typing in a filter field', () => {
69
69
  detail: { filters: [{ name: 'code', operator: 'eq', value: 'kept' }], from: 'config' }
70
70
  })
71
71
  )
72
+ grist.dispatchEvent(new CustomEvent('query-refused', { bubbles: true, composed: true }))
72
73
  await settle()
73
74
  await form.updateComplete
74
75
  expect(input().value).to.equal('kept')
@@ -59,29 +59,36 @@ describe('asking again for the same conditions', () => {
59
59
  await new Promise(resolve => setTimeout(resolve, 20))
60
60
  })
61
61
 
62
- const askAgain = () =>
62
+ const ask = (from?: string) =>
63
63
  grist.dispatchEvent(
64
64
  new CustomEvent('fetch-params-change', {
65
65
  bubbles: true,
66
66
  composed: true,
67
- detail: { filters, from: 'filters-form' }
67
+ detail: { filters, ...(from ? { from } : {}) }
68
68
  })
69
69
  )
70
70
 
71
- it('reads the list again', async () => {
71
+ it('a search asked again reads the list again', async () => {
72
72
  const before = reads
73
73
  const entry = addressController().entry.key
74
- askAgain()
74
+ ask()
75
75
  await until(() => reads > before)
76
76
  expect(addressController().entry.key).to.equal(entry)
77
77
  })
78
78
 
79
+ it('a field that reports a change without changing reads nothing', async () => {
80
+ const before = reads
81
+ ask('filters-form')
82
+ await new Promise(resolve => setTimeout(resolve, 50))
83
+ expect(reads).to.equal(before)
84
+ })
85
+
79
86
  it('does not throw away unsaved edits', async () => {
80
87
  grist.dirtyData.records[0].__dirty__ = 'M'
81
88
  grist.dirtyData.records[0].month = 11
82
89
  grist.refresh()
83
90
  const before = reads
84
- askAgain()
91
+ ask()
85
92
  await new Promise(resolve => setTimeout(resolve, 50))
86
93
  expect(reads).to.equal(before)
87
94
  expect(grist.dirtyRecords.length).to.equal(1)