@operato/form 1.0.0-beta.3 → 1.0.0-beta.30

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.
Files changed (62) hide show
  1. package/CHANGELOG.md +369 -0
  2. package/demo/index.html +68 -2
  3. package/dist/src/filters/filter-checkbox.d.ts +3 -0
  4. package/dist/src/filters/filter-checkbox.js +26 -0
  5. package/dist/src/filters/filter-checkbox.js.map +1 -0
  6. package/dist/src/filters/filter-input-barcode.d.ts +3 -0
  7. package/dist/src/filters/filter-input-barcode.js +24 -0
  8. package/dist/src/filters/filter-input-barcode.js.map +1 -0
  9. package/dist/src/filters/filter-input.d.ts +2 -0
  10. package/dist/src/filters/filter-input.js +24 -0
  11. package/dist/src/filters/filter-input.js.map +1 -0
  12. package/dist/src/filters/filter-range-date.d.ts +2 -0
  13. package/dist/src/filters/filter-range-date.js +54 -0
  14. package/dist/src/filters/filter-range-date.js.map +1 -0
  15. package/dist/src/filters/filter-range-number.d.ts +2 -0
  16. package/dist/src/filters/filter-range-number.js +53 -0
  17. package/dist/src/filters/filter-range-number.js.map +1 -0
  18. package/dist/src/filters/filter-select.d.ts +3 -0
  19. package/dist/src/filters/filter-select.js +33 -0
  20. package/dist/src/filters/filter-select.js.map +1 -0
  21. package/dist/src/filters/filter-styles.d.ts +1 -0
  22. package/dist/src/filters/filter-styles.js +88 -0
  23. package/dist/src/filters/filter-styles.js.map +1 -0
  24. package/dist/src/filters/index.d.ts +8 -0
  25. package/dist/src/filters/index.js +9 -0
  26. package/dist/src/filters/index.js.map +1 -0
  27. package/dist/src/filters/ox-filters-form-base.d.ts +25 -0
  28. package/dist/src/filters/ox-filters-form-base.js +238 -0
  29. package/dist/src/filters/ox-filters-form-base.js.map +1 -0
  30. package/dist/src/filters/registry.d.ts +7 -0
  31. package/dist/src/filters/registry.js +46 -0
  32. package/dist/src/filters/registry.js.map +1 -0
  33. package/dist/src/filters/types.d.ts +17 -0
  34. package/dist/src/filters/types.js +2 -0
  35. package/dist/src/filters/types.js.map +1 -0
  36. package/dist/src/index.d.ts +1 -0
  37. package/dist/src/index.js +1 -0
  38. package/dist/src/index.js.map +1 -1
  39. package/dist/stories/ox-filter-form-barcode.stories.d.ts +29 -0
  40. package/dist/stories/ox-filter-form-barcode.stories.js +82 -0
  41. package/dist/stories/ox-filter-form-barcode.stories.js.map +1 -0
  42. package/dist/stories/ox-filter-form-base.stories.d.ts +29 -0
  43. package/dist/stories/ox-filter-form-base.stories.js +82 -0
  44. package/dist/stories/ox-filter-form-base.stories.js.map +1 -0
  45. package/dist/tsconfig.tsbuildinfo +1 -1
  46. package/package.json +8 -6
  47. package/src/filters/filter-checkbox.ts +31 -0
  48. package/src/filters/filter-input-barcode.ts +30 -0
  49. package/src/filters/filter-input.ts +29 -0
  50. package/src/filters/filter-range-date.ts +64 -0
  51. package/src/filters/filter-range-number.ts +62 -0
  52. package/src/filters/filter-select.ts +47 -0
  53. package/src/filters/filter-styles.ts +88 -0
  54. package/src/filters/index.ts +10 -0
  55. package/src/filters/ox-filters-form-base.ts +261 -0
  56. package/src/filters/registry.ts +54 -0
  57. package/src/filters/types.ts +47 -0
  58. package/src/index.ts +1 -0
  59. package/stories/ox-filter-form-barcode.stories.ts +97 -0
  60. package/stories/ox-filter-form-base.stories.ts +97 -0
  61. package/themes/app-theme.css +142 -0
  62. /package/{src/themes → themes}/form-theme.css +0 -0
package/CHANGELOG.md CHANGED
@@ -3,6 +3,375 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.0.0-beta.30](https://github.com/hatiolab/operato/compare/v1.0.0-beta.29...v1.0.0-beta.30) (2022-06-13)
7
+
8
+ **Note:** Version bump only for package @operato/form
9
+
10
+
11
+
12
+
13
+
14
+ ## [1.0.0-beta.29](https://github.com/hatiolab/operato/compare/v1.0.0-beta.28...v1.0.0-beta.29) (2022-06-10)
15
+
16
+
17
+ ### :rocket: New Features
18
+
19
+ * support 'barcode' type for filters-form in data-grist ([79f8e84](https://github.com/hatiolab/operato/commit/79f8e84151537ee9b27351a75de2c6bdf8049c91))
20
+ * support 'barcode' type for filters-form-base in form module ([799f374](https://github.com/hatiolab/operato/commit/799f37403e477a1050a9077bfe0311c8852f109c))
21
+
22
+
23
+
24
+ ## [1.0.0-beta.28](https://github.com/hatiolab/operato/compare/v1.0.0-beta.27...v1.0.0-beta.28) (2022-06-10)
25
+
26
+ **Note:** Version bump only for package @operato/form
27
+
28
+
29
+
30
+
31
+
32
+ ## [1.0.0-beta.27](https://github.com/hatiolab/operato/compare/v1.0.0-beta.26...v1.0.0-beta.27) (2022-06-09)
33
+
34
+ **Note:** Version bump only for package @operato/form
35
+
36
+
37
+
38
+
39
+
40
+ ## [1.0.0-beta.26](https://github.com/hatiolab/operato/compare/v1.0.0-beta.25...v1.0.0-beta.26) (2022-06-04)
41
+
42
+
43
+ ### :bug: Bug Fix
44
+
45
+ * form, input style ([b94efe5](https://github.com/hatiolab/operato/commit/b94efe5bb844f2a410918d4a464c2a1e6530d4cd))
46
+
47
+
48
+
49
+ ## [1.0.0-beta.25](https://github.com/hatiolab/operato/compare/v1.0.0-beta.24...v1.0.0-beta.25) (2022-06-02)
50
+
51
+ **Note:** Version bump only for package @operato/form
52
+
53
+
54
+
55
+
56
+
57
+ ## [1.0.0-beta.24](https://github.com/hatiolab/operato/compare/v1.0.0-beta.23...v1.0.0-beta.24) (2022-06-02)
58
+
59
+ **Note:** Version bump only for package @operato/form
60
+
61
+
62
+
63
+
64
+
65
+ ## [1.0.0-beta.23](https://github.com/hatiolab/operato/compare/v1.0.0-beta.22...v1.0.0-beta.23) (2022-06-02)
66
+
67
+
68
+ ### :bug: Bug Fix
69
+
70
+ * grid margin style ([2c19634](https://github.com/hatiolab/operato/commit/2c19634d97f4ad06e95c776b22b03a212af40b9a))
71
+
72
+
73
+
74
+ ## [1.0.0-beta.22](https://github.com/hatiolab/operato/compare/v1.0.0-beta.21...v1.0.0-beta.22) (2022-05-31)
75
+
76
+ **Note:** Version bump only for package @operato/form
77
+
78
+
79
+
80
+
81
+
82
+ ## [1.0.0-beta.21](https://github.com/hatiolab/operato/compare/v1.0.0-beta.20...v1.0.0-beta.21) (2022-05-31)
83
+
84
+ **Note:** Version bump only for package @operato/form
85
+
86
+
87
+
88
+
89
+
90
+ ## [1.0.0-beta.20](https://github.com/hatiolab/operato/compare/v1.0.0-beta.19...v1.0.0-beta.20) (2022-05-30)
91
+
92
+ **Note:** Version bump only for package @operato/form
93
+
94
+
95
+
96
+
97
+
98
+ ## [1.0.0-beta.19](https://github.com/hatiolab/operato/compare/v1.0.0-beta.18...v1.0.0-beta.19) (2022-05-29)
99
+
100
+ **Note:** Version bump only for package @operato/form
101
+
102
+
103
+
104
+
105
+
106
+ ## [1.0.0-beta.18](https://github.com/hatiolab/operato/compare/v1.0.0-beta.17...v1.0.0-beta.18) (2022-05-27)
107
+
108
+ **Note:** Version bump only for package @operato/form
109
+
110
+
111
+
112
+
113
+
114
+ ## [1.0.0-beta.17](https://github.com/hatiolab/operato/compare/v1.0.0-beta.16...v1.0.0-beta.17) (2022-05-25)
115
+
116
+ **Note:** Version bump only for package @operato/form
117
+
118
+
119
+
120
+
121
+
122
+ ## [1.0.0-beta.16](https://github.com/hatiolab/operato/compare/v1.0.0-beta.15...v1.0.0-beta.16) (2022-05-23)
123
+
124
+ **Note:** Version bump only for package @operato/form
125
+
126
+
127
+
128
+
129
+
130
+ ## [1.0.0-beta.15](https://github.com/hatiolab/operato/compare/v1.0.0-beta.14...v1.0.0-beta.15) (2022-05-20)
131
+
132
+ **Note:** Version bump only for package @operato/form
133
+
134
+
135
+
136
+
137
+
138
+ ## [1.0.0-beta.14](https://github.com/hatiolab/operato/compare/v1.0.0-beta.13...v1.0.0-beta.14) (2022-05-19)
139
+
140
+ **Note:** Version bump only for package @operato/form
141
+
142
+
143
+
144
+
145
+
146
+ ## [1.0.0-beta.13](https://github.com/hatiolab/operato/compare/v1.0.0-beta.12...v1.0.0-beta.13) (2022-05-19)
147
+
148
+
149
+ ### :bug: Bug Fix
150
+
151
+ * incorrect package.json scripts for storybooks ([8c8c405](https://github.com/hatiolab/operato/commit/8c8c405443247108b9c411b8161c008d9b6a2261))
152
+ * record-view ([ffcb397](https://github.com/hatiolab/operato/commit/ffcb397748efb64ce4e515f733b50f088ea1a093))
153
+ * storybook for data-grist ([ae0ad52](https://github.com/hatiolab/operato/commit/ae0ad52d642454c70a4e27f262b8811f7e53f420))
154
+
155
+
156
+
157
+ ## [1.0.0-beta.12](https://github.com/hatiolab/operato/compare/v1.0.0-beta.11...v1.0.0-beta.12) (2022-05-13)
158
+
159
+
160
+ ### :rocket: New Features
161
+
162
+ * storybook started ([90c08c9](https://github.com/hatiolab/operato/commit/90c08c9a15e5fe554baaa1becca07793e8434799))
163
+
164
+
165
+
166
+ ## [1.0.0-beta.11](https://github.com/hatiolab/operato/compare/v1.0.0-beta.10...v1.0.0-beta.11) (2022-05-01)
167
+
168
+
169
+ ### :rocket: New Features
170
+
171
+ * separated filter-form from data-grist ([513a498](https://github.com/hatiolab/operato/commit/513a49830be87053568d69fb68f1544586c3345b))
172
+ * separated filter-form from data-grist ([21e27f7](https://github.com/hatiolab/operato/commit/21e27f74d3e66d782da4aa75801c39a037627f62))
173
+
174
+
175
+ ### :bug: Bug Fix
176
+
177
+ * export filters-form functions ([bb84681](https://github.com/hatiolab/operato/commit/bb84681e0c61af344a3756332be722ffafbcfb0b))
178
+ * filters-form style ([e32b875](https://github.com/hatiolab/operato/commit/e32b8759dddad7be2b7f9dae0fd257064eb31043))
179
+
180
+
181
+
182
+ ## [1.0.0-beta.10](https://github.com/hatiolab/operato/compare/v1.0.0-beta.9...v1.0.0-beta.10) (2022-04-28)
183
+
184
+ **Note:** Version bump only for package @operato/form
185
+
186
+
187
+
188
+
189
+
190
+ ## [1.0.0-beta.9](https://github.com/hatiolab/operato/compare/v1.0.0-beta.8...v1.0.0-beta.9) (2022-04-28)
191
+
192
+ **Note:** Version bump only for package @operato/form
193
+
194
+
195
+
196
+
197
+
198
+ ## [1.0.0-beta.8](https://github.com/hatiolab/operato/compare/v1.0.0-beta.7...v1.0.0-beta.8) (2022-04-27)
199
+
200
+ **Note:** Version bump only for package @operato/form
201
+
202
+
203
+
204
+
205
+
206
+ ## [1.0.0-beta.7](https://github.com/hatiolab/operato/compare/v1.0.0-beta.6...v1.0.0-beta.7) (2022-04-24)
207
+
208
+ **Note:** Version bump only for package @operato/form
209
+
210
+
211
+
212
+
213
+
214
+ ## [1.0.0-beta.6](https://github.com/hatiolab/operato/compare/v0.4.5...v1.0.0-beta.6) (2022-04-22)
215
+
216
+ ## [1.0.0-beta.5](https://github.com/hatiolab/operato/compare/v1.0.0-beta.4...v1.0.0-beta.5) (2022-04-18)
217
+
218
+ ## [1.0.0-beta.4](https://github.com/hatiolab/operato/compare/v1.0.0-beta.3...v1.0.0-beta.4) (2022-04-14)
219
+
220
+ ## [1.0.0-beta.3](https://github.com/hatiolab/operato/compare/v1.0.0-beta.2...v1.0.0-beta.3) (2022-04-12)
221
+
222
+ ## [1.0.0-beta.2](https://github.com/hatiolab/operato/compare/v1.0.0-beta.1...v1.0.0-beta.2) (2022-04-12)
223
+
224
+ ## [1.0.0-beta.1](https://github.com/hatiolab/operato/compare/v1.0.0-beta.0...v1.0.0-beta.1) (2022-04-11)
225
+
226
+ ## [1.0.0-beta.0](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.53...v1.0.0-beta.0) (2022-04-10)
227
+
228
+ ## [1.0.0-alpha.53](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.52...v1.0.0-alpha.53) (2022-04-08)
229
+
230
+ ## [1.0.0-alpha.52](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.51...v1.0.0-alpha.52) (2022-04-08)
231
+
232
+ ## [1.0.0-alpha.51](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.50...v1.0.0-alpha.51) (2022-04-05)
233
+
234
+ ## [1.0.0-alpha.50](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.49...v1.0.0-alpha.50) (2022-04-04)
235
+
236
+ ## [1.0.0-alpha.49](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.48...v1.0.0-alpha.49) (2022-04-04)
237
+
238
+
239
+ ### :bug: Bug Fix
240
+
241
+ * lit@2.2.1 ([6707752](https://github.com/hatiolab/operato/commit/6707752907d24f7ecbe248cba18a4b18cfda282f))
242
+
243
+ ## [1.0.0-alpha.48](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.47...v1.0.0-alpha.48) (2022-04-03)
244
+
245
+
246
+ ### :rocket: New Features
247
+
248
+ * support copy and paste in data-grid ([9dd686f](https://github.com/hatiolab/operato/commit/9dd686f6817500863a1c36140ef01b39fcafef9f))
249
+
250
+ ## [1.0.0-alpha.47](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.46...v1.0.0-alpha.47) (2022-04-02)
251
+
252
+ ## [1.0.0-alpha.46](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.45...v1.0.0-alpha.46) (2022-04-02)
253
+
254
+ ## [1.0.0-alpha.45](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.44...v1.0.0-alpha.45) (2022-03-31)
255
+
256
+ ## [1.0.0-alpha.44](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.43...v1.0.0-alpha.44) (2022-03-31)
257
+
258
+ ## [1.0.0-alpha.43](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.42...v1.0.0-alpha.43) (2022-03-30)
259
+
260
+ ## [1.0.0-alpha.42](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.41...v1.0.0-alpha.42) (2022-03-29)
261
+
262
+ ## [1.0.0-alpha.41](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.40...v1.0.0-alpha.41) (2022-03-27)
263
+
264
+ ## [1.0.0-alpha.40](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.39...v1.0.0-alpha.40) (2022-03-26)
265
+
266
+ ## [1.0.0-alpha.39](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.38...v1.0.0-alpha.39) (2022-03-25)
267
+
268
+ ## [1.0.0-alpha.38](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.37...v1.0.0-alpha.38) (2022-03-25)
269
+
270
+ ## [1.0.0-alpha.37](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.36...v1.0.0-alpha.37) (2022-03-25)
271
+
272
+ ## [1.0.0-alpha.36](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.35...v1.0.0-alpha.36) (2022-03-21)
273
+
274
+ ## [1.0.0-alpha.35](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.34...v1.0.0-alpha.35) (2022-03-21)
275
+
276
+ ## [1.0.0-alpha.34](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.33...v1.0.0-alpha.34) (2022-03-20)
277
+
278
+ ## [1.0.0-alpha.33](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.32...v1.0.0-alpha.33) (2022-03-19)
279
+
280
+ ## [1.0.0-alpha.32](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.31...v1.0.0-alpha.32) (2022-03-19)
281
+
282
+ ## [1.0.0-alpha.31](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.30...v1.0.0-alpha.31) (2022-03-19)
283
+
284
+ ## [1.0.0-alpha.30](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.29...v1.0.0-alpha.30) (2022-03-18)
285
+
286
+
287
+ ### :bug: Bug Fix
288
+
289
+ * ox-search-form ([00b6dbd](https://github.com/hatiolab/operato/commit/00b6dbd7238ea3bf4738646d55fa990b216ae158))
290
+
291
+ ## [1.0.0-alpha.29](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.28...v1.0.0-alpha.29) (2022-03-17)
292
+
293
+ ## [1.0.0-alpha.28](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.26...v1.0.0-alpha.28) (2022-03-17)
294
+
295
+ ## [1.0.0-alpha.26](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.25...v1.0.0-alpha.26) (2022-03-17)
296
+
297
+ ## [1.0.0-alpha.25](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.24...v1.0.0-alpha.25) (2022-03-17)
298
+
299
+
300
+ ### :bug: Bug Fix
301
+
302
+ * typo ([907aceb](https://github.com/hatiolab/operato/commit/907acebaf882613991bce064efea435c2d148543))
303
+
304
+ ## [1.0.0-alpha.24](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.23...v1.0.0-alpha.24) (2022-03-17)
305
+
306
+ ## [1.0.0-alpha.23](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.22...v1.0.0-alpha.23) (2022-03-17)
307
+
308
+ ## [1.0.0-alpha.22](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.21...v1.0.0-alpha.22) (2022-03-17)
309
+
310
+ ## [1.0.0-alpha.21](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.20...v1.0.0-alpha.21) (2022-03-16)
311
+
312
+ ## [1.0.0-alpha.20](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.19...v1.0.0-alpha.20) (2022-03-15)
313
+
314
+ ## [1.0.0-alpha.19](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.18...v1.0.0-alpha.19) (2022-03-14)
315
+
316
+ ## [1.0.0-alpha.18](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.17...v1.0.0-alpha.18) (2022-03-14)
317
+
318
+ ## [1.0.0-alpha.17](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.16...v1.0.0-alpha.17) (2022-03-13)
319
+
320
+ ## [1.0.0-alpha.16](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.15...v1.0.0-alpha.16) (2022-03-13)
321
+
322
+ ## [1.0.0-alpha.15](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.14...v1.0.0-alpha.15) (2022-03-13)
323
+
324
+ ## [1.0.0-alpha.14](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.13...v1.0.0-alpha.14) (2022-03-13)
325
+
326
+ ## [1.0.0-alpha.13](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.12...v1.0.0-alpha.13) (2022-03-13)
327
+
328
+ ## [1.0.0-alpha.12](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.11...v1.0.0-alpha.12) (2022-03-13)
329
+
330
+ ## [1.0.0-alpha.11](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.10...v1.0.0-alpha.11) (2022-03-12)
331
+
332
+ ## [1.0.0-alpha.10](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.9...v1.0.0-alpha.10) (2022-03-12)
333
+
334
+ ## [1.0.0-alpha.9](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.8...v1.0.0-alpha.9) (2022-03-12)
335
+
336
+ ## [1.0.0-alpha.8](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.7...v1.0.0-alpha.8) (2022-03-11)
337
+
338
+ ## [1.0.0-alpha.7](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.6...v1.0.0-alpha.7) (2022-03-11)
339
+
340
+ ## [1.0.0-alpha.6](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.5...v1.0.0-alpha.6) (2022-03-11)
341
+
342
+ ## [1.0.0-alpha.5](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.4...v1.0.0-alpha.5) (2022-03-11)
343
+
344
+ ## [1.0.0-alpha.4](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.3...v1.0.0-alpha.4) (2022-03-11)
345
+
346
+ ## [1.0.0-alpha.3](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.2...v1.0.0-alpha.3) (2022-03-10)
347
+
348
+ ## [1.0.0-alpha.2](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.1...v1.0.0-alpha.2) (2022-03-10)
349
+
350
+ ## [1.0.0-alpha.1](https://github.com/hatiolab/operato/compare/v0.4.3...v1.0.0-alpha.1) (2022-03-09)
351
+
352
+
353
+ ### :rocket: New Features
354
+
355
+ * 1.0-alpha ([42f87cf](https://github.com/hatiolab/operato/commit/42f87cf6a3cef0381db91ecb1179e63c64c01370))
356
+
357
+
358
+
359
+ ## [1.0.0-beta.5](https://github.com/hatiolab/operato/compare/v1.0.0-beta.4...v1.0.0-beta.5) (2022-04-18)
360
+
361
+ **Note:** Version bump only for package @operato/form
362
+
363
+
364
+
365
+
366
+
367
+ ## [1.0.0-beta.4](https://github.com/hatiolab/operato/compare/v1.0.0-beta.3...v1.0.0-beta.4) (2022-04-14)
368
+
369
+ **Note:** Version bump only for package @operato/form
370
+
371
+
372
+
373
+
374
+
6
375
  ## [1.0.0-beta.3](https://github.com/hatiolab/operato/compare/v1.0.0-beta.2...v1.0.0-beta.3) (2022-04-12)
7
376
 
8
377
  **Note:** Version bump only for package @operato/form
package/demo/index.html CHANGED
@@ -2,6 +2,8 @@
2
2
  <html lang="en-GB">
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
6
+
5
7
  <style>
6
8
  body {
7
9
  background: #fafafa;
@@ -17,6 +19,9 @@
17
19
  </style>
18
20
  <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" rel="stylesheet" />
19
21
  <link href="https://fonts.googleapis.com/css?family=Material+Icons&display=block" rel="stylesheet" />
22
+
23
+ <link href="/themes/app-theme.css" rel="stylesheet" />
24
+ <link href="/themes/form-theme.css" rel="stylesheet" />
20
25
  </head>
21
26
  <body>
22
27
  <div id="demo"></div>
@@ -24,10 +29,71 @@
24
29
  <script type="module">
25
30
  import { html, render } from 'lit'
26
31
  import '@material/mwc-icon'
32
+ import '../dist/src/filters/ox-filters-form-base.js'
33
+
34
+ const form = document.querySelector('#demo')
27
35
 
28
- const parent = document.querySelector('#demo')
36
+ const filters = [
37
+ {
38
+ name: 'test',
39
+ type: 'string',
40
+ label: 'name',
41
+ operator: 'eq'
42
+ },
43
+ {
44
+ name: 'active',
45
+ type: 'boolean',
46
+ label: 'active',
47
+ operator: 'eq'
48
+ },
49
+ {
50
+ name: 'sss',
51
+ type: 'select',
52
+ label: 'sss',
53
+ operator: 'eq',
54
+ options: () => {
55
+ return [
56
+ {
57
+ display: '',
58
+ value: ''
59
+ },
60
+ {
61
+ display: 'ABC',
62
+ value: 'ABC'
63
+ },
64
+ {
65
+ display: 'DEF',
66
+ value: 'DEF'
67
+ }
68
+ ]
69
+ }
70
+ },
71
+ {
72
+ name: 'range',
73
+ type: 'number',
74
+ label: 'range',
75
+ operator: 'between'
76
+ },
77
+ {
78
+ name: 'date-range',
79
+ type: 'datetime',
80
+ label: 'date',
81
+ operator: 'between'
82
+ }
83
+ ]
29
84
 
30
- render(html``, parent)
85
+ render(
86
+ html`
87
+ <ox-filters-form-base
88
+ .filters=${filters}
89
+ @filters-change=${e => {
90
+ console.log('filters changed', e.detail)
91
+ }}
92
+ url-params-sensitive
93
+ ></ox-filters-form-base>
94
+ `,
95
+ form
96
+ )
31
97
  </script>
32
98
  </body>
33
99
  </html>
@@ -0,0 +1,3 @@
1
+ import '@operato/input/ox-checkbox.js';
2
+ import { FilterSelectRenderer } from './types.js';
3
+ export declare const FilterCheckbox: FilterSelectRenderer;
@@ -0,0 +1,26 @@
1
+ import '@operato/input/ox-checkbox.js';
2
+ import { html } from 'lit-html';
3
+ export const FilterCheckbox = (filter, value, owner) => {
4
+ const { name } = filter;
5
+ return html `
6
+ <ox-checkbox
7
+ name=${name}
8
+ ?checked=${value}
9
+ indeterminatable
10
+ ?indeterminate=${value === undefined}
11
+ @change=${(e) => {
12
+ ;
13
+ e.target.dispatchEvent(new CustomEvent('filter-change', {
14
+ bubbles: true,
15
+ composed: true,
16
+ detail: {
17
+ name: name,
18
+ operator: filter.operator,
19
+ value: e.target.checked
20
+ }
21
+ }));
22
+ }}
23
+ />
24
+ `;
25
+ };
26
+ //# sourceMappingURL=filter-checkbox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filter-checkbox.js","sourceRoot":"","sources":["../../../src/filters/filter-checkbox.ts"],"names":[],"mappings":"AAAA,OAAO,+BAA+B,CAAA;AAEtC,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAI/B,MAAM,CAAC,MAAM,cAAc,GAAyB,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;IAC3E,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,CAAA;IAEvB,OAAO,IAAI,CAAA;;aAEA,IAAI;iBACA,KAAK;;uBAEC,KAAK,KAAK,SAAS;gBAC1B,CAAC,CAAc,EAAE,EAAE;QAC3B,CAAC;QAAC,CAAC,CAAC,MAAsB,CAAC,aAAa,CACtC,IAAI,WAAW,CAAC,eAAe,EAAE;YAC/B,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;YACd,MAAM,EAAE;gBACN,IAAI,EAAE,IAAI;gBACV,QAAQ,EAAE,MAAM,CAAC,QAAQ;gBACzB,KAAK,EAAG,CAAC,CAAC,MAAqD,CAAC,OAAO;aACxE;SACF,CAAC,CACH,CAAA;IACH,CAAC;;GAEJ,CAAA;AACH,CAAC,CAAA","sourcesContent":["import '@operato/input/ox-checkbox.js'\n\nimport { html } from 'lit-html'\n\nimport { FilterSelectRenderer } from './types.js'\n\nexport const FilterCheckbox: FilterSelectRenderer = (filter, value, owner) => {\n const { name } = filter\n\n return html`\n <ox-checkbox\n name=${name}\n ?checked=${value}\n indeterminatable\n ?indeterminate=${value === undefined}\n @change=${(e: CustomEvent) => {\n ;(e.target as HTMLElement).dispatchEvent(\n new CustomEvent('filter-change', {\n bubbles: true,\n composed: true,\n detail: {\n name: name,\n operator: filter.operator,\n value: (e.target as Element & { checked: boolean | undefined }).checked\n }\n })\n )\n }}\n />\n `\n}\n"]}
@@ -0,0 +1,3 @@
1
+ import '@operato/input/ox-input-barcode.js';
2
+ import { FilterSelectRenderer } from './types.js';
3
+ export declare const FilterInputBarcode: FilterSelectRenderer;
@@ -0,0 +1,24 @@
1
+ import '@operato/input/ox-input-barcode.js';
2
+ import { html } from 'lit-html';
3
+ export const FilterInputBarcode = (filter, value, owner) => {
4
+ const { name, type } = filter;
5
+ return html `
6
+ <ox-input-barcode
7
+ name=${name}
8
+ .value=${value === undefined ? '' : value}
9
+ @change=${(e) => {
10
+ const input = e.target;
11
+ input.dispatchEvent(new CustomEvent('filter-change', {
12
+ bubbles: true,
13
+ composed: true,
14
+ detail: {
15
+ name,
16
+ operator: filter.operator,
17
+ value: input.value
18
+ }
19
+ }));
20
+ }}
21
+ />
22
+ `;
23
+ };
24
+ //# sourceMappingURL=filter-input-barcode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filter-input-barcode.js","sourceRoot":"","sources":["../../../src/filters/filter-input-barcode.ts"],"names":[],"mappings":"AAAA,OAAO,oCAAoC,CAAA;AAE3C,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAI/B,MAAM,CAAC,MAAM,kBAAkB,GAAyB,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;IAC/E,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,MAAM,CAAA;IAE7B,OAAO,IAAI,CAAA;;aAEA,IAAI;eACF,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK;gBAC/B,CAAC,CAAc,EAAE,EAAE;QAC3B,MAAM,KAAK,GAAG,CAAC,CAAC,MAA0B,CAAA;QAC1C,KAAK,CAAC,aAAa,CACjB,IAAI,WAAW,CAAC,eAAe,EAAE;YAC/B,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;YACd,MAAM,EAAE;gBACN,IAAI;gBACJ,QAAQ,EAAE,MAAM,CAAC,QAAQ;gBACzB,KAAK,EAAE,KAAK,CAAC,KAAK;aACnB;SACF,CAAC,CACH,CAAA;IACH,CAAC;;GAEJ,CAAA;AACH,CAAC,CAAA","sourcesContent":["import '@operato/input/ox-input-barcode.js'\n\nimport { html } from 'lit-html'\n\nimport { FilterSelectRenderer } from './types.js'\n\nexport const FilterInputBarcode: FilterSelectRenderer = (filter, value, owner) => {\n const { name, type } = filter\n\n return html`\n <ox-input-barcode\n name=${name}\n .value=${value === undefined ? '' : value}\n @change=${(e: CustomEvent) => {\n const input = e.target as HTMLInputElement\n input.dispatchEvent(\n new CustomEvent('filter-change', {\n bubbles: true,\n composed: true,\n detail: {\n name,\n operator: filter.operator,\n value: input.value\n }\n })\n )\n }}\n />\n `\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import { FilterSelectRenderer } from './types.js';
2
+ export declare const FilterInput: FilterSelectRenderer;
@@ -0,0 +1,24 @@
1
+ import { html } from 'lit-html';
2
+ export const FilterInput = (filter, value, owner) => {
3
+ const { name, type } = filter;
4
+ return html `
5
+ <input
6
+ type=${type}
7
+ name=${name}
8
+ .value=${value === undefined ? '' : value}
9
+ @change=${(e) => {
10
+ const input = e.target;
11
+ input.dispatchEvent(new CustomEvent('filter-change', {
12
+ bubbles: true,
13
+ composed: true,
14
+ detail: {
15
+ name: name,
16
+ operator: filter.operator,
17
+ value: input.value
18
+ }
19
+ }));
20
+ }}
21
+ />
22
+ `;
23
+ };
24
+ //# sourceMappingURL=filter-input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filter-input.js","sourceRoot":"","sources":["../../../src/filters/filter-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAI/B,MAAM,CAAC,MAAM,WAAW,GAAyB,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;IACxE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,MAAM,CAAA;IAE7B,OAAO,IAAI,CAAA;;aAEA,IAAI;aACJ,IAAI;eACF,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK;gBAC/B,CAAC,CAAc,EAAE,EAAE;QAC3B,MAAM,KAAK,GAAG,CAAC,CAAC,MAA0B,CAAA;QAC1C,KAAK,CAAC,aAAa,CACjB,IAAI,WAAW,CAAC,eAAe,EAAE;YAC/B,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;YACd,MAAM,EAAE;gBACN,IAAI,EAAE,IAAI;gBACV,QAAQ,EAAE,MAAM,CAAC,QAAQ;gBACzB,KAAK,EAAE,KAAK,CAAC,KAAK;aACnB;SACF,CAAC,CACH,CAAA;IACH,CAAC;;GAEJ,CAAA;AACH,CAAC,CAAA","sourcesContent":["import { html } from 'lit-html'\n\nimport { FilterSelectRenderer } from './types.js'\n\nexport const FilterInput: FilterSelectRenderer = (filter, value, owner) => {\n const { name, type } = filter\n\n return html`\n <input\n type=${type}\n name=${name}\n .value=${value === undefined ? '' : value}\n @change=${(e: CustomEvent) => {\n const input = e.target as HTMLInputElement\n input.dispatchEvent(\n new CustomEvent('filter-change', {\n bubbles: true,\n composed: true,\n detail: {\n name: name,\n operator: filter.operator,\n value: input.value\n }\n })\n )\n }}\n />\n `\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import { FilterSelectRenderer } from './types.js';
2
+ export declare const FilterRangeDate: FilterSelectRenderer;
@@ -0,0 +1,54 @@
1
+ import { html } from 'lit-html';
2
+ export const FilterRangeDate = (filter, value, owner) => {
3
+ var { name, type, operator } = filter;
4
+ const [from, to] = value instanceof Array ? value : [];
5
+ if (type === 'datetime') {
6
+ type = 'datetime-local';
7
+ }
8
+ return html `
9
+ <input
10
+ name=${name}
11
+ type=${type}
12
+ .value=${from}
13
+ from
14
+ @keyup=${(e) => {
15
+ if (e.key !== 'Enter') {
16
+ return;
17
+ }
18
+ ;
19
+ e.target.dispatchEvent(new CustomEvent('filter-change', {
20
+ bubbles: true,
21
+ composed: true,
22
+ detail: {
23
+ name,
24
+ operator,
25
+ value: Array.from(e.target.parentElement.querySelectorAll('input[from], input[to]')).map(input => input.value)
26
+ }
27
+ }));
28
+ }}
29
+ />
30
+ ~
31
+ <input
32
+ name=${name}
33
+ type=${type}
34
+ .value=${to}
35
+ to
36
+ @keyup=${(e) => {
37
+ if (e.key !== 'Enter') {
38
+ return;
39
+ }
40
+ ;
41
+ e.target.dispatchEvent(new CustomEvent('filter-change', {
42
+ bubbles: true,
43
+ composed: true,
44
+ detail: {
45
+ name,
46
+ operator,
47
+ value: Array.from(e.target.parentElement.querySelectorAll('input[from], input[to]')).map(input => input.value)
48
+ }
49
+ }));
50
+ }}
51
+ />
52
+ `;
53
+ };
54
+ //# sourceMappingURL=filter-range-date.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filter-range-date.js","sourceRoot":"","sources":["../../../src/filters/filter-range-date.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAI/B,MAAM,CAAC,MAAM,eAAe,GAAyB,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;IAC5E,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAA;IACrC,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAA;IAEtD,IAAI,IAAI,KAAK,UAAU,EAAE;QACvB,IAAI,GAAG,gBAAgB,CAAA;KACxB;IAED,OAAO,IAAI,CAAA;;aAEA,IAAI;aACJ,IAAI;eACF,IAAI;;eAEJ,CAAC,CAAgB,EAAE,EAAE;QAC5B,IAAI,CAAC,CAAC,GAAG,KAAK,OAAO,EAAE;YACrB,OAAM;SACP;QACD,CAAC;QAAC,CAAC,CAAC,MAAsB,CAAC,aAAa,CACtC,IAAI,WAAW,CAAC,eAAe,EAAE;YAC/B,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;YACd,MAAM,EAAE;gBACN,IAAI;gBACJ,QAAQ;gBACR,KAAK,EAAE,KAAK,CAAC,IAAI,CACd,CAAC,CAAC,MAAsB,CAAC,aAAc,CAAC,gBAAgB,CAAC,wBAAwB,CAAC,CACpF,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAE,KAA0B,CAAC,KAAK,CAAC;aAClD;SACF,CAAC,CACH,CAAA;IACH,CAAC;;;;aAIM,IAAI;aACJ,IAAI;eACF,EAAE;;eAEF,CAAC,CAAgB,EAAE,EAAE;QAC5B,IAAI,CAAC,CAAC,GAAG,KAAK,OAAO,EAAE;YACrB,OAAM;SACP;QACD,CAAC;QAAC,CAAC,CAAC,MAAsB,CAAC,aAAa,CACtC,IAAI,WAAW,CAAC,eAAe,EAAE;YAC/B,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;YACd,MAAM,EAAE;gBACN,IAAI;gBACJ,QAAQ;gBACR,KAAK,EAAE,KAAK,CAAC,IAAI,CACd,CAAC,CAAC,MAAsB,CAAC,aAAc,CAAC,gBAAgB,CAAC,wBAAwB,CAAC,CACpF,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAE,KAA0B,CAAC,KAAK,CAAC;aAClD;SACF,CAAC,CACH,CAAA;IACH,CAAC;;GAEJ,CAAA;AACH,CAAC,CAAA","sourcesContent":["import { html } from 'lit-html'\n\nimport { FilterSelectRenderer } from './types.js'\n\nexport const FilterRangeDate: FilterSelectRenderer = (filter, value, owner) => {\n var { name, type, operator } = filter\n const [from, to] = value instanceof Array ? value : []\n\n if (type === 'datetime') {\n type = 'datetime-local'\n }\n\n return html`\n <input\n name=${name}\n type=${type}\n .value=${from}\n from\n @keyup=${(e: KeyboardEvent) => {\n if (e.key !== 'Enter') {\n return\n }\n ;(e.target as HTMLElement).dispatchEvent(\n new CustomEvent('filter-change', {\n bubbles: true,\n composed: true,\n detail: {\n name,\n operator,\n value: Array.from(\n (e.target as HTMLElement).parentElement!.querySelectorAll('input[from], input[to]')\n ).map(input => (input as HTMLInputElement).value)\n }\n })\n )\n }}\n />\n ~\n <input\n name=${name}\n type=${type}\n .value=${to}\n to\n @keyup=${(e: KeyboardEvent) => {\n if (e.key !== 'Enter') {\n return\n }\n ;(e.target as HTMLElement).dispatchEvent(\n new CustomEvent('filter-change', {\n bubbles: true,\n composed: true,\n detail: {\n name,\n operator,\n value: Array.from(\n (e.target as HTMLElement).parentElement!.querySelectorAll('input[from], input[to]')\n ).map(input => (input as HTMLInputElement).value)\n }\n })\n )\n }}\n />\n `\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import { FilterSelectRenderer } from './types.js';
2
+ export declare const FilterRangeNumber: FilterSelectRenderer;