@operato/data-grist 2.0.0-alpha.134 → 2.0.0-alpha.137
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/CHANGELOG.md +18 -0
- package/dist/src/data-grist.js +1 -1
- package/dist/src/data-grist.js.map +1 -1
- package/dist/src/filters/filters-form.js +4 -1
- package/dist/src/filters/filters-form.js.map +1 -1
- package/dist/stories/accumulator-format.stories.d.ts +4 -0
- package/dist/stories/accumulator-format.stories.js +4 -3
- package/dist/stories/accumulator-format.stories.js.map +1 -1
- package/dist/stories/grid-setting.stories.d.ts +4 -0
- package/dist/stories/grid-setting.stories.js +3 -2
- package/dist/stories/grid-setting.stories.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/data-grist.ts +1 -1
- package/src/filters/filters-form.ts +6 -1
- package/stories/accumulator-format.stories.ts +11 -3
- package/stories/grid-setting.stories.ts +4 -1
@@ -264,7 +264,12 @@ export class OxFiltersForm extends LitElement {
|
|
264
264
|
}
|
265
265
|
|
266
266
|
applyUpdatedConfiguration() {
|
267
|
+
if (!this.config) {
|
268
|
+
return
|
269
|
+
}
|
270
|
+
|
267
271
|
const filters = this.config.columns.filter(columnConfig => !!columnConfig.filter)
|
272
|
+
|
268
273
|
this.filterColumns = filters.filter((columnConfig: ColumnConfig) => {
|
269
274
|
const filter = columnConfig.filter as FilterConfigObject
|
270
275
|
return filter!.operator !== 'search'
|
@@ -274,7 +279,7 @@ export class OxFiltersForm extends LitElement {
|
|
274
279
|
return filter!.operator === 'search'
|
275
280
|
})
|
276
281
|
|
277
|
-
if (this.searchColumns.length > 0) {
|
282
|
+
if (this.searchColumns.length > 0 && !this.withoutSearch) {
|
278
283
|
this.filterColumns.unshift({ name: 'search', filter: { type: 'search' } } as any)
|
279
284
|
}
|
280
285
|
|
@@ -187,7 +187,8 @@ export default {
|
|
187
187
|
argTypes: {
|
188
188
|
config: { control: 'object' },
|
189
189
|
mode: { control: 'select', options: ['GRID', 'LIST', 'CARD'] },
|
190
|
-
urlParamsSensitive: { control: 'boolean' }
|
190
|
+
urlParamsSensitive: { control: 'boolean' },
|
191
|
+
withoutSearch: { control: 'boolean' }
|
191
192
|
}
|
192
193
|
}
|
193
194
|
|
@@ -201,10 +202,17 @@ interface ArgTypes {
|
|
201
202
|
config: object
|
202
203
|
mode: string
|
203
204
|
urlParamsSensitive: boolean
|
205
|
+
withoutSearch: boolean
|
204
206
|
fetchHandler: object
|
205
207
|
}
|
206
208
|
|
207
|
-
const Template: Story<ArgTypes> = ({
|
209
|
+
const Template: Story<ArgTypes> = ({
|
210
|
+
config,
|
211
|
+
mode = 'GRID',
|
212
|
+
urlParamsSensitive = false,
|
213
|
+
withoutSearch = false,
|
214
|
+
fetchHandler
|
215
|
+
}: ArgTypes) =>
|
208
216
|
html` <link
|
209
217
|
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
210
218
|
rel="stylesheet"
|
@@ -246,7 +254,7 @@ const Template: Story<ArgTypes> = ({ config, mode = 'GRID', urlParamsSensitive =
|
|
246
254
|
>
|
247
255
|
<div slot="headroom" class="header">
|
248
256
|
<div class="filters">
|
249
|
-
<ox-filters-form autofocus></ox-filters-form>
|
257
|
+
<ox-filters-form ?without-search=${withoutSearch} autofocus></ox-filters-form>
|
250
258
|
<ox-record-creator id="add" light-popup>
|
251
259
|
<button><md-icon>add</md-icon></button>
|
252
260
|
</ox-record-creator>
|
@@ -347,6 +347,7 @@ export default {
|
|
347
347
|
config: { control: 'object' },
|
348
348
|
mode: { control: 'select', options: ['GRID', 'LIST', 'CARD'] },
|
349
349
|
urlParamsSensitive: { control: 'boolean' },
|
350
|
+
withoutSearch: { control: 'boolean' },
|
350
351
|
debug: { control: 'boolean' }
|
351
352
|
}
|
352
353
|
}
|
@@ -361,6 +362,7 @@ interface ArgTypes {
|
|
361
362
|
config: object
|
362
363
|
mode: 'GRID' | 'LIST' | 'CARD'
|
363
364
|
urlParamsSensitive: boolean
|
365
|
+
withoutSearch: boolean
|
364
366
|
fetchHandler: FetchHandler
|
365
367
|
debug: boolean
|
366
368
|
}
|
@@ -380,6 +382,7 @@ const Template: Story<ArgTypes> = ({
|
|
380
382
|
config,
|
381
383
|
mode = 'GRID',
|
382
384
|
urlParamsSensitive = false,
|
385
|
+
withoutSearch = false,
|
383
386
|
debug = false,
|
384
387
|
fetchHandler
|
385
388
|
}: ArgTypes) =>
|
@@ -432,7 +435,7 @@ const Template: Story<ArgTypes> = ({
|
|
432
435
|
>
|
433
436
|
<div slot="headroom">
|
434
437
|
<div id="filters">
|
435
|
-
<ox-filters-form autofocus>
|
438
|
+
<ox-filters-form autofocus ?without-search=${withoutSearch}>
|
436
439
|
<ox-grist-filter-personalizer slot="setting"></ox-grist-filter-personalizer>
|
437
440
|
</ox-filters-form>
|
438
441
|
</div>
|