@operato/data-grist 1.0.0-beta.2 → 1.0.0-beta.22

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 (137) hide show
  1. package/.storybook/main.js +3 -0
  2. package/.storybook/server.mjs +8 -0
  3. package/CHANGELOG.md +443 -0
  4. package/demo/data-grist-test.html +1 -1
  5. package/demo/index.html +31 -4
  6. package/demo/report-test.html +1 -1
  7. package/dist/src/configure/zero-config.d.ts +2 -0
  8. package/dist/src/configure/zero-config.js +3 -1
  9. package/dist/src/configure/zero-config.js.map +1 -1
  10. package/dist/src/data-card/data-card-field.d.ts +1 -1
  11. package/dist/src/data-card/data-card-field.js +3 -2
  12. package/dist/src/data-card/data-card-field.js.map +1 -1
  13. package/dist/src/data-card/data-card.js +1 -0
  14. package/dist/src/data-card/data-card.js.map +1 -1
  15. package/dist/src/data-grid/data-grid-body.d.ts +4 -2
  16. package/dist/src/data-grid/data-grid-body.js +74 -40
  17. package/dist/src/data-grid/data-grid-body.js.map +1 -1
  18. package/dist/src/data-grid/data-grid-footer.d.ts +1 -1
  19. package/dist/src/data-grid/data-grid-footer.js +6 -7
  20. package/dist/src/data-grid/data-grid-footer.js.map +1 -1
  21. package/dist/src/data-grid/data-grid-header.js +7 -13
  22. package/dist/src/data-grid/data-grid-header.js.map +1 -1
  23. package/dist/src/data-grid/event-handlers/data-grid-body-click-handler.js +9 -11
  24. package/dist/src/data-grid/event-handlers/data-grid-body-click-handler.js.map +1 -1
  25. package/dist/src/data-grist.d.ts +4 -4
  26. package/dist/src/data-grist.js +89 -110
  27. package/dist/src/data-grist.js.map +1 -1
  28. package/dist/src/data-list/record-partial.js +1 -1
  29. package/dist/src/data-list/record-partial.js.map +1 -1
  30. package/dist/src/data-provider.d.ts +4 -6
  31. package/dist/src/data-provider.js +11 -22
  32. package/dist/src/data-provider.js.map +1 -1
  33. package/dist/src/data-report/data-report-header.js +4 -4
  34. package/dist/src/data-report/data-report-header.js.map +1 -1
  35. package/dist/src/editors/ox-grist-editor-file.d.ts +5 -0
  36. package/dist/src/editors/ox-grist-editor-file.js +18 -0
  37. package/dist/src/editors/ox-grist-editor-file.js.map +1 -0
  38. package/dist/src/editors/registry.js +3 -1
  39. package/dist/src/editors/registry.js.map +1 -1
  40. package/dist/src/filters/filter-input copy.d.ts +2 -0
  41. package/dist/src/filters/filter-input copy.js +25 -0
  42. package/dist/src/filters/filter-input copy.js.map +1 -0
  43. package/dist/src/filters/filter-input.js +4 -4
  44. package/dist/src/filters/filter-input.js.map +1 -1
  45. package/dist/src/filters/filter-mwc-checkbox.d.ts +4 -0
  46. package/dist/src/filters/filter-mwc-checkbox.js +30 -0
  47. package/dist/src/filters/filter-mwc-checkbox.js.map +1 -0
  48. package/dist/src/filters/filter-mwc-textfield.d.ts +3 -0
  49. package/dist/src/filters/filter-mwc-textfield.js +27 -0
  50. package/dist/src/filters/filter-mwc-textfield.js.map +1 -0
  51. package/dist/src/filters/filter-styles.js +62 -15
  52. package/dist/src/filters/filter-styles.js.map +1 -1
  53. package/dist/src/filters/filters-form.js +28 -10
  54. package/dist/src/filters/filters-form.js.map +1 -1
  55. package/dist/src/filters/grist-filter-registry.d.ts +12 -0
  56. package/dist/src/filters/grist-filter-registry.js +47 -0
  57. package/dist/src/filters/grist-filter-registry.js.map +1 -0
  58. package/dist/src/filters/ox-grist-filter-editor-checkbox.d.ts +5 -0
  59. package/dist/src/filters/ox-grist-filter-editor-checkbox.js +27 -0
  60. package/dist/src/filters/ox-grist-filter-editor-checkbox.js.map +1 -0
  61. package/dist/src/filters/ox-grist-filter-editor-input.d.ts +4 -0
  62. package/dist/src/filters/ox-grist-filter-editor-input.js +54 -0
  63. package/dist/src/filters/ox-grist-filter-editor-input.js.map +1 -0
  64. package/dist/src/filters/ox-grist-filter-editor-select.d.ts +4 -0
  65. package/dist/src/filters/ox-grist-filter-editor-select.js +46 -0
  66. package/dist/src/filters/ox-grist-filter-editor-select.js.map +1 -0
  67. package/dist/src/filters/ox-grist-filter-editor.d.ts +16 -0
  68. package/dist/src/filters/ox-grist-filter-editor.js +122 -0
  69. package/dist/src/filters/ox-grist-filter-editor.js.map +1 -0
  70. package/dist/src/gutters/gutter-dirty.d.ts +4 -1
  71. package/dist/src/gutters/gutter-dirty.js +16 -2
  72. package/dist/src/gutters/gutter-dirty.js.map +1 -1
  73. package/dist/src/gutters/gutter-sequence.js +14 -0
  74. package/dist/src/gutters/gutter-sequence.js.map +1 -1
  75. package/dist/src/record-view/event-handlers/record-view-body-click-handler.js +2 -4
  76. package/dist/src/record-view/event-handlers/record-view-body-click-handler.js.map +1 -1
  77. package/dist/src/record-view/event-handlers/record-view-body-keydown-handler.js +2 -2
  78. package/dist/src/record-view/event-handlers/record-view-body-keydown-handler.js.map +1 -1
  79. package/dist/src/record-view/record-creator.js +0 -2
  80. package/dist/src/record-view/record-creator.js.map +1 -1
  81. package/dist/src/record-view/record-view-body.d.ts +0 -1
  82. package/dist/src/record-view/record-view-body.js +0 -5
  83. package/dist/src/record-view/record-view-body.js.map +1 -1
  84. package/dist/src/record-view/record-view.d.ts +0 -1
  85. package/dist/src/record-view/record-view.js +1 -10
  86. package/dist/src/record-view/record-view.js.map +1 -1
  87. package/dist/src/renderers/index.d.ts +1 -0
  88. package/dist/src/renderers/index.js +1 -0
  89. package/dist/src/renderers/index.js.map +1 -1
  90. package/dist/src/renderers/ox-grist-renderer-file.d.ts +2 -0
  91. package/dist/src/renderers/ox-grist-renderer-file.js +15 -0
  92. package/dist/src/renderers/ox-grist-renderer-file.js.map +1 -0
  93. package/dist/src/renderers/ox-grist-renderer-text.js +6 -2
  94. package/dist/src/renderers/ox-grist-renderer-text.js.map +1 -1
  95. package/dist/src/renderers/registry.js +2 -0
  96. package/dist/src/renderers/registry.js.map +1 -1
  97. package/dist/src/sorters/sorters-control.d.ts +1 -1
  98. package/dist/src/sorters/sorters-control.js +4 -5
  99. package/dist/src/sorters/sorters-control.js.map +1 -1
  100. package/dist/src/types.d.ts +4 -4
  101. package/dist/src/types.js.map +1 -1
  102. package/dist/stories/index.stories.d.ts +14 -11
  103. package/dist/stories/index.stories.js +436 -23
  104. package/dist/stories/index.stories.js.map +1 -1
  105. package/dist/tsconfig.tsbuildinfo +1 -1
  106. package/package.json +9 -9
  107. package/src/configure/zero-config.ts +4 -1
  108. package/src/data-card/data-card-field.ts +5 -3
  109. package/src/data-card/data-card.ts +1 -0
  110. package/src/data-grid/data-grid-body.ts +96 -49
  111. package/src/data-grid/data-grid-footer.ts +7 -8
  112. package/src/data-grid/data-grid-header.ts +7 -15
  113. package/src/data-grid/event-handlers/data-grid-body-click-handler.ts +11 -13
  114. package/src/data-grist.ts +115 -141
  115. package/src/data-list/record-partial.ts +1 -1
  116. package/src/data-provider.ts +12 -28
  117. package/src/data-report/data-report-header.ts +5 -5
  118. package/src/editors/ox-grist-editor-file.ts +16 -0
  119. package/src/editors/registry.ts +4 -3
  120. package/src/filters/filter-input.ts +4 -3
  121. package/src/filters/filter-styles.ts +62 -15
  122. package/src/filters/filters-form.ts +33 -10
  123. package/src/gutters/gutter-dirty.ts +20 -3
  124. package/src/gutters/gutter-sequence.ts +17 -2
  125. package/src/record-view/event-handlers/record-view-body-click-handler.ts +2 -4
  126. package/src/record-view/event-handlers/record-view-body-keydown-handler.ts +2 -2
  127. package/src/record-view/record-creator.ts +0 -2
  128. package/src/record-view/record-view-body.ts +0 -2
  129. package/src/record-view/record-view.ts +1 -7
  130. package/src/renderers/index.ts +1 -0
  131. package/src/renderers/ox-grist-renderer-file.ts +17 -0
  132. package/src/renderers/ox-grist-renderer-text.ts +8 -2
  133. package/src/renderers/registry.ts +6 -5
  134. package/src/sorters/sorters-control.ts +5 -7
  135. package/src/types.ts +4 -5
  136. package/stories/index.stories.ts +462 -29
  137. package/themes/form-theme.css +75 -0
@@ -0,0 +1,3 @@
1
+ module.exports = {
2
+ stories: ['../dist/stories/**/*.stories.{js,md,mdx}'],
3
+ };
@@ -0,0 +1,8 @@
1
+ import { storybookPlugin } from '@web/dev-server-storybook';
2
+ import baseConfig from '../web-dev-server.config.mjs';
3
+
4
+ export default /** @type {import('@web/dev-server').DevServerConfig} */ ({
5
+ ...baseConfig,
6
+ open: '/',
7
+ plugins: [storybookPlugin({ type: 'web-components' }), ...baseConfig.plugins],
8
+ });
package/CHANGELOG.md CHANGED
@@ -3,6 +3,449 @@
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.22](https://github.com/hatiolab/operato/compare/v1.0.0-beta.21...v1.0.0-beta.22) (2022-05-31)
7
+
8
+
9
+ ### :bug: Bug Fix
10
+
11
+ * grid click handler, crontab clear button, ox-input-key-values ([16079b9](https://github.com/hatiolab/operato/commit/16079b94fef2860627aded1888960f3e7e1bf418))
12
+
13
+
14
+
15
+ ## [1.0.0-beta.21](https://github.com/hatiolab/operato/compare/v1.0.0-beta.20...v1.0.0-beta.21) (2022-05-31)
16
+
17
+ **Note:** Version bump only for package @operato/data-grist
18
+
19
+
20
+
21
+
22
+
23
+ ## [1.0.0-beta.20](https://github.com/hatiolab/operato/compare/v1.0.0-beta.19...v1.0.0-beta.20) (2022-05-30)
24
+
25
+ **Note:** Version bump only for package @operato/data-grist
26
+
27
+
28
+
29
+
30
+
31
+ ## [1.0.0-beta.19](https://github.com/hatiolab/operato/compare/v1.0.0-beta.18...v1.0.0-beta.19) (2022-05-29)
32
+
33
+ **Note:** Version bump only for package @operato/data-grist
34
+
35
+
36
+
37
+
38
+
39
+ ## [1.0.0-beta.18](https://github.com/hatiolab/operato/compare/v1.0.0-beta.17...v1.0.0-beta.18) (2022-05-27)
40
+
41
+
42
+ ### :bug: Bug Fix
43
+
44
+ * data-grist url-params-sensitive ([d1dfb76](https://github.com/hatiolab/operato/commit/d1dfb7659d33d9e5d038d64c61f4324db4e5c033))
45
+ * data-list checkbox zoom style ([1f4cadd](https://github.com/hatiolab/operato/commit/1f4cadd1e4b7ce910c7854ede93ce13237c063c2))
46
+ * data-provider attach ([5a14892](https://github.com/hatiolab/operato/commit/5a148922f94371faaf5cc80467d097ceedee8035))
47
+ * pagination limit for data-grist ([a1dad87](https://github.com/hatiolab/operato/commit/a1dad87289f26d2f69b6831bcb601e5e9938aef1))
48
+
49
+
50
+
51
+ ## [1.0.0-beta.17](https://github.com/hatiolab/operato/compare/v1.0.0-beta.16...v1.0.0-beta.17) (2022-05-25)
52
+
53
+
54
+ ### :bug: Bug Fix
55
+
56
+ * data-grist copy/paste a row ([35fcaef](https://github.com/hatiolab/operato/commit/35fcaefc82aaa6567efd029dd72622909a4b71cf))
57
+
58
+
59
+
60
+ ## [1.0.0-beta.16](https://github.com/hatiolab/operato/compare/v1.0.0-beta.15...v1.0.0-beta.16) (2022-05-23)
61
+
62
+
63
+ ### :bug: Bug Fix
64
+
65
+ * card layout flex ([dabe5c0](https://github.com/hatiolab/operato/commit/dabe5c01b6525b40587c7318938a73ddc4f8d2a4))
66
+ * data-card layout ([dd87d94](https://github.com/hatiolab/operato/commit/dd87d94aef90b7ee607961a4b76b5b47b6192bed))
67
+
68
+
69
+
70
+ ## [1.0.0-beta.15](https://github.com/hatiolab/operato/compare/v1.0.0-beta.14...v1.0.0-beta.15) (2022-05-20)
71
+
72
+
73
+ ### :bug: Bug Fix
74
+
75
+ * data-grist copy & paste ([bec2cbc](https://github.com/hatiolab/operato/commit/bec2cbcc1bee615abd97e16eb33563c08bfd6b57))
76
+ * data-grist filters and sorters change handling ([5407c5f](https://github.com/hatiolab/operato/commit/5407c5fea02316b1a0525f3ee4721bde7227bbb6))
77
+ * data-grist filters sorters behavior ([6d50455](https://github.com/hatiolab/operato/commit/6d5045586d35e0becbde1f7a13c9a171400447c1))
78
+ * story for data-grist ([623dab4](https://github.com/hatiolab/operato/commit/623dab450683ffafdbdafd8bc4190d4969eef675))
79
+
80
+
81
+
82
+ ## [1.0.0-beta.14](https://github.com/hatiolab/operato/compare/v1.0.0-beta.13...v1.0.0-beta.14) (2022-05-19)
83
+
84
+ **Note:** Version bump only for package @operato/data-grist
85
+
86
+
87
+
88
+
89
+
90
+ ## [1.0.0-beta.13](https://github.com/hatiolab/operato/compare/v1.0.0-beta.12...v1.0.0-beta.13) (2022-05-19)
91
+
92
+
93
+ ### :rocket: New Features
94
+
95
+ * add ox-input-unit ([06f5f56](https://github.com/hatiolab/operato/commit/06f5f56fa0dd56fed973b399ac4dc42a383c8ad4))
96
+
97
+
98
+ ### :bug: Bug Fix
99
+
100
+ * grist copy-paste ([e60b29d](https://github.com/hatiolab/operato/commit/e60b29db5007c10b5df5ea31ffc95ce39d34f49c))
101
+ * record-view ([ffcb397](https://github.com/hatiolab/operato/commit/ffcb397748efb64ce4e515f733b50f088ea1a093))
102
+ * storybook for data-grist ([ae0ad52](https://github.com/hatiolab/operato/commit/ae0ad52d642454c70a4e27f262b8811f7e53f420))
103
+
104
+
105
+
106
+ ## [1.0.0-beta.12](https://github.com/hatiolab/operato/compare/v1.0.0-beta.11...v1.0.0-beta.12) (2022-05-13)
107
+
108
+
109
+ ### :rocket: New Features
110
+
111
+ * storybook started ([90c08c9](https://github.com/hatiolab/operato/commit/90c08c9a15e5fe554baaa1becca07793e8434799))
112
+
113
+
114
+
115
+ ## [1.0.0-beta.11](https://github.com/hatiolab/operato/compare/v1.0.0-beta.10...v1.0.0-beta.11) (2022-05-01)
116
+
117
+
118
+ ### :rocket: New Features
119
+
120
+ * separated filter-form from data-grist ([21e27f7](https://github.com/hatiolab/operato/commit/21e27f74d3e66d782da4aa75801c39a037627f62))
121
+
122
+
123
+ ### :bug: Bug Fix
124
+
125
+ * data card equal width style ([ad5f453](https://github.com/hatiolab/operato/commit/ad5f45349634005501ee21e1ae0e7b0fd3f97126))
126
+ * filters-form style ([e32b875](https://github.com/hatiolab/operato/commit/e32b8759dddad7be2b7f9dae0fd257064eb31043))
127
+
128
+
129
+
130
+ ## [1.0.0-beta.10](https://github.com/hatiolab/operato/compare/v1.0.0-beta.9...v1.0.0-beta.10) (2022-04-28)
131
+
132
+
133
+ ### :rocket: New Features
134
+
135
+ * add format option for text-renderer ([c58375b](https://github.com/hatiolab/operato/commit/c58375b05fb69db03a9081c41ea4ff11437834b1))
136
+
137
+
138
+
139
+ ## [1.0.0-beta.9](https://github.com/hatiolab/operato/compare/v1.0.0-beta.8...v1.0.0-beta.9) (2022-04-28)
140
+
141
+
142
+ ### :bug: Bug Fix
143
+
144
+ * filter form style ([8cd098e](https://github.com/hatiolab/operato/commit/8cd098e0816f2c715ced3a4ff031caa5af3831ef))
145
+ * filter-style ([8d4ccfa](https://github.com/hatiolab/operato/commit/8d4ccfad7e1710b4f0ca9b617872ea5901880238))
146
+ * search value for filters-form ([a3a0ed5](https://github.com/hatiolab/operato/commit/a3a0ed59a924a1b13f304705a27137af98638bd0))
147
+
148
+
149
+
150
+ ## [1.0.0-beta.8](https://github.com/hatiolab/operato/compare/v1.0.0-beta.7...v1.0.0-beta.8) (2022-04-27)
151
+
152
+
153
+ ### :bug: Bug Fix
154
+
155
+ * filters-form style ([b02c530](https://github.com/hatiolab/operato/commit/b02c530fc7e106c42f0f87d1b62f3707063e03ca))
156
+
157
+
158
+
159
+ ## [1.0.0-beta.7](https://github.com/hatiolab/operato/compare/v1.0.0-beta.6...v1.0.0-beta.7) (2022-04-24)
160
+
161
+ **Note:** Version bump only for package @operato/data-grist
162
+
163
+
164
+
165
+
166
+
167
+ ## [1.0.0-beta.6](https://github.com/hatiolab/operato/compare/v0.4.5...v1.0.0-beta.6) (2022-04-22)
168
+
169
+
170
+ ### :rocket: New Features
171
+
172
+ * ox-grist-editor-file ([2b64b2f](https://github.com/hatiolab/operato/commit/2b64b2fe3637d6e4ef2b02c5fd9a9986ae49e57f))
173
+
174
+ ## [1.0.0-beta.5](https://github.com/hatiolab/operato/compare/v1.0.0-beta.4...v1.0.0-beta.5) (2022-04-18)
175
+
176
+ ## [1.0.0-beta.4](https://github.com/hatiolab/operato/compare/v1.0.0-beta.3...v1.0.0-beta.4) (2022-04-14)
177
+
178
+
179
+ ### :rocket: New Features
180
+
181
+ * filter-input for like filters ([2680977](https://github.com/hatiolab/operato/commit/26809779b05f5a203c6b58668674dd68dca529d7))
182
+ * resource-object filter ([c70a727](https://github.com/hatiolab/operato/commit/c70a7270d9b28e51d78d3831bd2f563160d010ef))
183
+ * search for relation fields ([7dc99fd](https://github.com/hatiolab/operato/commit/7dc99fd6df1a96faab4f44ea65c3837934fabc5b))
184
+
185
+ ## [1.0.0-beta.3](https://github.com/hatiolab/operato/compare/v1.0.0-beta.2...v1.0.0-beta.3) (2022-04-12)
186
+
187
+ ## [1.0.0-beta.2](https://github.com/hatiolab/operato/compare/v1.0.0-beta.1...v1.0.0-beta.2) (2022-04-12)
188
+
189
+
190
+ ### :bug: Bug Fix
191
+
192
+ * firters-form input labeling ([896c42c](https://github.com/hatiolab/operato/commit/896c42c776705edc38807ad33aa42650ccd06db2))
193
+
194
+ ## [1.0.0-beta.1](https://github.com/hatiolab/operato/compare/v1.0.0-beta.0...v1.0.0-beta.1) (2022-04-11)
195
+
196
+ ## [1.0.0-beta.0](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.53...v1.0.0-beta.0) (2022-04-10)
197
+
198
+
199
+ ### :bug: Bug Fix
200
+
201
+ * default operator for data-grist filter configuration ([8ff0d35](https://github.com/hatiolab/operato/commit/8ff0d35bc5e9cab748ef3a014e710ab4fe62d8e9))
202
+
203
+
204
+ ### :rocket: New Features
205
+
206
+ * support undo/redo for data-grist ([b7e6c1f](https://github.com/hatiolab/operato/commit/b7e6c1fb47910a3fc3acb0352472ad19cf4e13d2))
207
+
208
+ ## [1.0.0-alpha.53](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.52...v1.0.0-alpha.53) (2022-04-08)
209
+
210
+ ## [1.0.0-alpha.52](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.51...v1.0.0-alpha.52) (2022-04-08)
211
+
212
+
213
+ ### :bug: Bug Fix
214
+
215
+ * change-sorters event handler for data-grist ([5e7c582](https://github.com/hatiolab/operato/commit/5e7c582cc46db791aaa6f16a1203c6731617a4da))
216
+ * made filter configuration type overidable ([d4ebf8f](https://github.com/hatiolab/operato/commit/d4ebf8f90af99372b8dcebc203842163fa850c09))
217
+ * update data-provider ([dadfc1c](https://github.com/hatiolab/operato/commit/dadfc1ca3708b54e5414e28bb721324052830de9))
218
+
219
+ ## [1.0.0-alpha.51](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.50...v1.0.0-alpha.51) (2022-04-05)
220
+
221
+ ## [1.0.0-alpha.50](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.49...v1.0.0-alpha.50) (2022-04-04)
222
+
223
+ ## [1.0.0-alpha.49](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.48...v1.0.0-alpha.49) (2022-04-04)
224
+
225
+
226
+ ### :bug: Bug Fix
227
+
228
+ * lit@2.2.1 ([6707752](https://github.com/hatiolab/operato/commit/6707752907d24f7ecbe248cba18a4b18cfda282f))
229
+
230
+ ## [1.0.0-alpha.48](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.47...v1.0.0-alpha.48) (2022-04-03)
231
+
232
+
233
+ ### :bug: Bug Fix
234
+
235
+ * event handling for clicking magnify icon in filters-form - fetch data forcely ([cc17a05](https://github.com/hatiolab/operato/commit/cc17a056807a6e5018ee89d1f6be91e463671bac))
236
+
237
+
238
+ ### :rocket: New Features
239
+
240
+ * support copy and paste in data-grid ([9dd686f](https://github.com/hatiolab/operato/commit/9dd686f6817500863a1c36140ef01b39fcafef9f))
241
+ * support data-grist block selection ([b9238ae](https://github.com/hatiolab/operato/commit/b9238ae7848b9824466b2ce843d56d3eac789104))
242
+ * support data-grist block selection ([537577a](https://github.com/hatiolab/operato/commit/537577a160abc0aa0d9df4374eca0ddcadf0bd7f))
243
+
244
+ ## [1.0.0-alpha.47](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.46...v1.0.0-alpha.47) (2022-04-02)
245
+
246
+ ## [1.0.0-alpha.46](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.45...v1.0.0-alpha.46) (2022-04-02)
247
+
248
+ ## [1.0.0-alpha.45](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.44...v1.0.0-alpha.45) (2022-03-31)
249
+
250
+ ## [1.0.0-alpha.44](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.43...v1.0.0-alpha.44) (2022-03-31)
251
+
252
+
253
+ ### :rocket: New Features
254
+
255
+ * select member method for ox-grist ([e18bca1](https://github.com/hatiolab/operato/commit/e18bca1756fc78acdff7c820d4b350f05cb7114f))
256
+
257
+ ## [1.0.0-alpha.43](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.42...v1.0.0-alpha.43) (2022-03-30)
258
+
259
+
260
+ ### :rocket: New Features
261
+
262
+ * url-params-sensitive property for data-grist ([25de73e](https://github.com/hatiolab/operato/commit/25de73e0b4498fb301d0d94e420c7acbbd70856f))
263
+
264
+
265
+ ### :bug: Bug Fix
266
+
267
+ * filters-change event handling in data-grist ([8e03e4c](https://github.com/hatiolab/operato/commit/8e03e4cbcb837102d4df8a803b2b20a30b67271e))
268
+ * ox-grist-renderer-color ([2554cfa](https://github.com/hatiolab/operato/commit/2554cfad505e22798448426177c2da4ff9e7dba6))
269
+
270
+ ## [1.0.0-alpha.42](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.41...v1.0.0-alpha.42) (2022-03-29)
271
+
272
+
273
+ ### :bug: Bug Fix
274
+
275
+ * data-grist sorters, filters ([960830a](https://github.com/hatiolab/operato/commit/960830ab877ada67cf8701fce7aa1740ec83bcc2))
276
+ * filter-select in data-grid-header ([61e2aa0](https://github.com/hatiolab/operato/commit/61e2aa060e41f61bef9ebc7d5890f84632ee73bf))
277
+
278
+
279
+ ### :rocket: New Features
280
+
281
+ * add filters and sorters property in grist ([099757f](https://github.com/hatiolab/operato/commit/099757fd211411795120ed4c2fa9e23e8e2d398a))
282
+ * url-params-sensitive property for data-grist ([8bae25f](https://github.com/hatiolab/operato/commit/8bae25f210c0185f0b307dbda4797b568231618a))
283
+ * url-params-sensitive property for data-grist ([32523c0](https://github.com/hatiolab/operato/commit/32523c0ec4e69c603317c6a05eba0c0338663886))
284
+
285
+ ## [1.0.0-alpha.41](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.40...v1.0.0-alpha.41) (2022-03-27)
286
+
287
+
288
+ ### :rocket: New Features
289
+
290
+ * grid-header filter integrated with filters-form ([ebecb71](https://github.com/hatiolab/operato/commit/ebecb71133d38bb8358909660319de6cb5b45d7d))
291
+
292
+ ## [1.0.0-alpha.40](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.39...v1.0.0-alpha.40) (2022-03-26)
293
+
294
+
295
+ ### :bug: Bug Fix
296
+
297
+ * filter-select support object type select options ([ab5a877](https://github.com/hatiolab/operato/commit/ab5a877157979bc96b252b6b527b4666c22e0b09))
298
+
299
+ ## [1.0.0-alpha.39](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.38...v1.0.0-alpha.39) (2022-03-25)
300
+
301
+ ## [1.0.0-alpha.38](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.37...v1.0.0-alpha.38) (2022-03-25)
302
+
303
+ ## [1.0.0-alpha.37](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.36...v1.0.0-alpha.37) (2022-03-25)
304
+
305
+ ## [1.0.0-alpha.36](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.35...v1.0.0-alpha.36) (2022-03-21)
306
+
307
+
308
+ ### :bug: Bug Fix
309
+
310
+ * datetime grist-renderer ([d551750](https://github.com/hatiolab/operato/commit/d55175091f9b928c56b02a087922c2fe8dcad9a9))
311
+
312
+ ## [1.0.0-alpha.35](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.34...v1.0.0-alpha.35) (2022-03-21)
313
+
314
+
315
+ ### :bug: Bug Fix
316
+
317
+ * prevent text overflow of grist-renderers ([73e7538](https://github.com/hatiolab/operato/commit/73e7538f9a0c8941689fefd3d4212529a75c413d))
318
+
319
+ ## [1.0.0-alpha.34](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.33...v1.0.0-alpha.34) (2022-03-20)
320
+
321
+
322
+ ### :bug: Bug Fix
323
+
324
+ * data-grist field styles for tooltip ([5f90650](https://github.com/hatiolab/operato/commit/5f90650ef36023834af3d3bf027cd300cc6bffc1))
325
+
326
+ ## [1.0.0-alpha.33](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.32...v1.0.0-alpha.33) (2022-03-19)
327
+
328
+
329
+ ### :bug: Bug Fix
330
+
331
+ * ox-grist json5 renderer ([1ff95e2](https://github.com/hatiolab/operato/commit/1ff95e21ac1b467620327a2a3f7aacd105b83414))
332
+
333
+ ## [1.0.0-alpha.32](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.31...v1.0.0-alpha.32) (2022-03-19)
334
+
335
+
336
+ ### :bug: Bug Fix
337
+
338
+ * typo ([2f2e3fc](https://github.com/hatiolab/operato/commit/2f2e3fcce771dcbfe2f1d09cbd25638094a6dc99))
339
+
340
+ ## [1.0.0-alpha.31](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.30...v1.0.0-alpha.31) (2022-03-19)
341
+
342
+
343
+ ### :bug: Bug Fix
344
+
345
+ * ox-grist-renderer support class type renderer (refer ox-grist-renderer-progress) ([ad7c8e1](https://github.com/hatiolab/operato/commit/ad7c8e1b453d19af9daa13ae4eb7c2059d85dfbb))
346
+
347
+ ## [1.0.0-alpha.30](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.29...v1.0.0-alpha.30) (2022-03-18)
348
+
349
+ ## [1.0.0-alpha.29](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.28...v1.0.0-alpha.29) (2022-03-17)
350
+
351
+ ## [1.0.0-alpha.28](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.26...v1.0.0-alpha.28) (2022-03-17)
352
+
353
+ ## [1.0.0-alpha.26](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.25...v1.0.0-alpha.26) (2022-03-17)
354
+
355
+ ## [1.0.0-alpha.25](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.24...v1.0.0-alpha.25) (2022-03-17)
356
+
357
+ ## [1.0.0-alpha.24](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.23...v1.0.0-alpha.24) (2022-03-17)
358
+
359
+
360
+ ### :bug: Bug Fix
361
+
362
+ * refactoring grist-editor, property-editor and input ([ea7431a](https://github.com/hatiolab/operato/commit/ea7431a5e2dfd96ef392c1905e9622df7c2ef88c))
363
+
364
+ ## [1.0.0-alpha.23](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.22...v1.0.0-alpha.23) (2022-03-17)
365
+
366
+ ## [1.0.0-alpha.22](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.21...v1.0.0-alpha.22) (2022-03-17)
367
+
368
+ ## [1.0.0-alpha.21](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.20...v1.0.0-alpha.21) (2022-03-16)
369
+
370
+ ## [1.0.0-alpha.20](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.19...v1.0.0-alpha.20) (2022-03-15)
371
+
372
+ ## [1.0.0-alpha.19](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.18...v1.0.0-alpha.19) (2022-03-14)
373
+
374
+ ## [1.0.0-alpha.18](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.17...v1.0.0-alpha.18) (2022-03-14)
375
+
376
+
377
+ ### :bug: Bug Fix
378
+
379
+ * data-grist click eventhandler and thumbnail layout ([c232bbf](https://github.com/hatiolab/operato/commit/c232bbf3d6ca90b48cc4ddb0a5ddb839acb14cdb))
380
+
381
+ ## [1.0.0-alpha.17](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.16...v1.0.0-alpha.17) (2022-03-13)
382
+
383
+ ## [1.0.0-alpha.16](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.15...v1.0.0-alpha.16) (2022-03-13)
384
+
385
+ ## [1.0.0-alpha.15](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.14...v1.0.0-alpha.15) (2022-03-13)
386
+
387
+ ## [1.0.0-alpha.14](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.13...v1.0.0-alpha.14) (2022-03-13)
388
+
389
+ ## [1.0.0-alpha.13](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.12...v1.0.0-alpha.13) (2022-03-13)
390
+
391
+ ## [1.0.0-alpha.12](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.11...v1.0.0-alpha.12) (2022-03-13)
392
+
393
+ ## [1.0.0-alpha.11](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.10...v1.0.0-alpha.11) (2022-03-12)
394
+
395
+ ## [1.0.0-alpha.10](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.9...v1.0.0-alpha.10) (2022-03-12)
396
+
397
+ ## [1.0.0-alpha.9](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.8...v1.0.0-alpha.9) (2022-03-12)
398
+
399
+ ## [1.0.0-alpha.8](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.7...v1.0.0-alpha.8) (2022-03-11)
400
+
401
+ ## [1.0.0-alpha.7](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.6...v1.0.0-alpha.7) (2022-03-11)
402
+
403
+ ## [1.0.0-alpha.6](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.5...v1.0.0-alpha.6) (2022-03-11)
404
+
405
+ ## [1.0.0-alpha.5](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.4...v1.0.0-alpha.5) (2022-03-11)
406
+
407
+ ## [1.0.0-alpha.4](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.3...v1.0.0-alpha.4) (2022-03-11)
408
+
409
+ ## [1.0.0-alpha.3](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.2...v1.0.0-alpha.3) (2022-03-10)
410
+
411
+ ## [1.0.0-alpha.2](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.1...v1.0.0-alpha.2) (2022-03-10)
412
+
413
+ ## [1.0.0-alpha.1](https://github.com/hatiolab/operato/compare/v0.4.3...v1.0.0-alpha.1) (2022-03-09)
414
+
415
+
416
+ ### :rocket: New Features
417
+
418
+ * 1.0-alpha ([42f87cf](https://github.com/hatiolab/operato/commit/42f87cf6a3cef0381db91ecb1179e63c64c01370))
419
+
420
+
421
+
422
+ ## [1.0.0-beta.5](https://github.com/hatiolab/operato/compare/v1.0.0-beta.4...v1.0.0-beta.5) (2022-04-18)
423
+
424
+ **Note:** Version bump only for package @operato/data-grist
425
+
426
+
427
+
428
+
429
+
430
+ ## [1.0.0-beta.4](https://github.com/hatiolab/operato/compare/v1.0.0-beta.3...v1.0.0-beta.4) (2022-04-14)
431
+
432
+
433
+ ### :rocket: New Features
434
+
435
+ * filter-input for like filters ([2680977](https://github.com/hatiolab/operato/commit/26809779b05f5a203c6b58668674dd68dca529d7))
436
+ * resource-object filter ([c70a727](https://github.com/hatiolab/operato/commit/c70a7270d9b28e51d78d3831bd2f563160d010ef))
437
+ * search for relation fields ([7dc99fd](https://github.com/hatiolab/operato/commit/7dc99fd6df1a96faab4f44ea65c3837934fabc5b))
438
+
439
+
440
+
441
+ ## [1.0.0-beta.3](https://github.com/hatiolab/operato/compare/v1.0.0-beta.2...v1.0.0-beta.3) (2022-04-12)
442
+
443
+ **Note:** Version bump only for package @operato/data-grist
444
+
445
+
446
+
447
+
448
+
6
449
  ## [1.0.0-beta.2](https://github.com/hatiolab/operato/compare/v1.0.0-beta.1...v1.0.0-beta.2) (2022-04-12)
7
450
 
8
451
 
@@ -2,7 +2,7 @@
2
2
  <html lang="en-GB">
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
- <meta name="viewport" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
6
6
  <style>
7
7
  body {
8
8
  /* box-sizing: border-box; */
package/demo/index.html CHANGED
@@ -2,7 +2,8 @@
2
2
  <html lang="en-GB">
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
- <meta name="viewport" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
6
+
6
7
  <style>
7
8
  body {
8
9
  /* box-sizing: border-box; */
@@ -56,7 +57,8 @@
56
57
  import '@material/mwc-icon'
57
58
  import { CommonGristStyles } from '@operato/styles'
58
59
 
59
- const fetchHandler = async ({ page, limit, sorters = [] }) => {
60
+ const fetchHandler = async ({ page, limit, sorters = [], filters }) => {
61
+ console.log('sorters, filters', sorters, filters)
60
62
  var total = 120993
61
63
  var start = (page - 1) * limit
62
64
 
@@ -95,6 +97,8 @@
95
97
  : idx % 4 === 2
96
98
  ? `http://www.hatiolab.com/assets/img/thingsboard-30.png`
97
99
  : `http://www.hatiolab.com/wrong-url.png` /* wrong source */,
100
+ file: 'abce.txt',
101
+ number: 100200300,
98
102
  role: ['admin', 'worker', 'tester'][idx % 3],
99
103
  color: idx % 2 ? `#87f018` : `#180f87`,
100
104
  rate: Math.round(Math.random() * 100),
@@ -203,6 +207,15 @@
203
207
  }
204
208
  }
205
209
  },
210
+ {
211
+ type: 'number',
212
+ name: 'number',
213
+ header: 'number',
214
+ record: {
215
+ format: '#,##0.0%'
216
+ },
217
+ width: 120
218
+ },
206
219
  {
207
220
  type: 'email',
208
221
  name: 'email',
@@ -311,6 +324,20 @@
311
324
  },
312
325
  width: 200
313
326
  },
327
+ {
328
+ type: 'file',
329
+ name: 'file',
330
+ header: 'file',
331
+ record: {
332
+ editable: true
333
+ },
334
+ handlers: {
335
+ click: () => {
336
+ console.log('thumbnail clicked...')
337
+ }
338
+ },
339
+ width: 200
340
+ },
314
341
  {
315
342
  type: 'datetime',
316
343
  name: 'updatedAt',
@@ -359,7 +386,7 @@
359
386
  }
360
387
  ],
361
388
  pagination: {
362
- pages: [20, 30, 50, 100, 200]
389
+ pages: [30, 50, 100, 200]
363
390
  }
364
391
  }
365
392
 
@@ -412,7 +439,7 @@
412
439
  .fetchHandler=${fetchHandler}
413
440
  @filters-change=${e => console.log('changed', e.detail)}
414
441
  >
415
- <div id="filters" slot="headroom">
442
+ <div slot="headroom">
416
443
  <ox-filters-form></ox-filters-form>
417
444
  </div>
418
445
 
@@ -2,7 +2,7 @@
2
2
  <html lang="en-GB">
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
- <meta name="viewport" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
6
6
  <style>
7
7
  body {
8
8
  /* box-sizing: border-box; */
@@ -13,8 +13,10 @@ export declare const ZERO_CONFIG: GristConfig;
13
13
  export declare const ZERO_RECORD: GristRecord;
14
14
  export declare const ZERO_RECORDS: GristRecord[];
15
15
  export declare const ZERO_DATA: GristData;
16
+ export declare const ZERO_PAGES: number[];
16
17
  export declare const ZERO_PAGINATION: {
17
18
  page: number;
18
19
  limit: number;
19
20
  total: number;
21
+ pages: number[];
20
22
  };
@@ -44,9 +44,11 @@ export const ZERO_RECORDS = [];
44
44
  export const ZERO_DATA = {
45
45
  records: ZERO_RECORDS
46
46
  };
47
+ export const ZERO_PAGES = [20, 30, 50, 100];
47
48
  export const ZERO_PAGINATION = {
48
49
  page: 1,
49
50
  limit: 20,
50
- total: 0
51
+ total: 0,
52
+ pages: ZERO_PAGES
51
53
  };
52
54
  //# sourceMappingURL=zero-config.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"zero-config.js","sourceRoot":"","sources":["../../../src/configure/zero-config.ts"],"names":[],"mappings":"AAcA,MAAM,CAAC,MAAM,eAAe,GAAoB,CAAC,MAAM,EAAE,QAAQ,EAAE,EAAE,GAAE,CAAC,CAAA;AACxE,MAAM,CAAC,MAAM,mBAAmB,GAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,GAAE,CAAC,CAAA;AAEhG,MAAM,CAAC,MAAM,oBAAoB,GAAyB;IACxD,KAAK,EAAE,SAAS;IAChB,QAAQ,EAAE,SAAS;CACpB,CAAA;AACD,MAAM,CAAC,MAAM,YAAY,GAAmB,EAAE,CAAA;AAC9C,MAAM,CAAC,MAAM,WAAW,GAAkB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,\n GristEventHandlerSet,\n GristRecord,\n GroupConfig,\n LabelConfig,\n ListConfig,\n RowsConfig\n} from '../types'\n\nexport const ZERO_CLASSIFIER: GristClassifier = (record, rowIndex) => {}\nexport const ZERO_FIELD_RENDERER: FieldRenderer = (value, column, record, rowIndex, owner) => {}\n\nexport const ZERO_EVENTHANDLERSET: GristEventHandlerSet = {\n click: undefined,\n dblclick: undefined\n}\nexport const ZERO_COLUMNS: ColumnConfig[] = []\nexport const ZERO_GROUPS: GroupConfig[] = []\nexport const ZERO_TOTALS: [] = []\nexport const ZERO_LABEL: LabelConfig = false\n\nexport const ZERO_COLUMN: ColumnConfig = {\n type: '',\n name: '',\n header: {\n renderer: column => {}\n },\n record: {\n renderer: ZERO_FIELD_RENDERER,\n classifier: ZERO_CLASSIFIER,\n options: {}\n },\n handlers: ZERO_EVENTHANDLERSET,\n label: ZERO_LABEL\n}\n\nexport const ZERO_ROWS: RowsConfig = {\n appendable: false,\n insertable: false,\n groups: ZERO_GROUPS,\n totals: ZERO_TOTALS,\n classifier: ZERO_CLASSIFIER,\n handlers: ZERO_EVENTHANDLERSET\n}\n\nexport const ZERO_LIST: ListConfig = {\n fields: ['name', 'description', 'updatedAt'],\n details: []\n}\n\nexport const ZERO_CONFIG: GristConfig = {\n columns: ZERO_COLUMNS,\n rows: ZERO_ROWS,\n list: ZERO_LIST\n}\n\nexport const ZERO_RECORD: GristRecord = {}\nexport const ZERO_RECORDS: GristRecord[] = []\n\nexport const ZERO_DATA: GristData = {\n records: ZERO_RECORDS\n}\n\nexport const ZERO_PAGINATION = {\n page: 1,\n limit: 20,\n total: 0\n}\n"]}
1
+ {"version":3,"file":"zero-config.js","sourceRoot":"","sources":["../../../src/configure/zero-config.ts"],"names":[],"mappings":"AAcA,MAAM,CAAC,MAAM,eAAe,GAAoB,CAAC,MAAM,EAAE,QAAQ,EAAE,EAAE,GAAE,CAAC,CAAA;AACxE,MAAM,CAAC,MAAM,mBAAmB,GAAkB,CAAC,KAAK,EAA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AAE,CAAA;AAE7C,MAAM,CAAC,MAAM,SAAS,GAAc;IAClC,OAAO,EAAE,YAAY;CACtB,CAAA;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,CAAA;AAE3C,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,IAAI,EAAE,CAAC;IACP,KAAK,EAAE,EAAE;IACT,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,UAAU;CAClB,CAAA","sourcesContent":["import {\n ColumnConfig,\n FieldRenderer,\n GristClassifier,\n GristConfig,\n GristData,\n GristEventHandlerSet,\n GristRecord,\n GroupConfig,\n LabelConfig,\n ListConfig,\n RowsConfig\n} from '../types'\n\nexport const ZERO_CLASSIFIER: GristClassifier = (record, rowIndex) => {}\nexport const ZERO_FIELD_RENDERER: FieldRenderer = (value, column, record, rowIndex, owner) => {}\n\nexport const ZERO_EVENTHANDLERSET: GristEventHandlerSet = {\n click: undefined,\n dblclick: undefined\n}\nexport const ZERO_COLUMNS: ColumnConfig[] = []\nexport const ZERO_GROUPS: GroupConfig[] = []\nexport const ZERO_TOTALS: [] = []\nexport const ZERO_LABEL: LabelConfig = false\n\nexport const ZERO_COLUMN: ColumnConfig = {\n type: '',\n name: '',\n header: {\n renderer: column => {}\n },\n record: {\n renderer: ZERO_FIELD_RENDERER,\n classifier: ZERO_CLASSIFIER,\n options: {}\n },\n handlers: ZERO_EVENTHANDLERSET,\n label: ZERO_LABEL\n}\n\nexport const ZERO_ROWS: RowsConfig = {\n appendable: false,\n insertable: false,\n groups: ZERO_GROUPS,\n totals: ZERO_TOTALS,\n classifier: ZERO_CLASSIFIER,\n handlers: ZERO_EVENTHANDLERSET\n}\n\nexport const ZERO_LIST: ListConfig = {\n fields: ['name', 'description', 'updatedAt'],\n details: []\n}\n\nexport const ZERO_CONFIG: GristConfig = {\n columns: ZERO_COLUMNS,\n rows: ZERO_ROWS,\n list: ZERO_LIST\n}\n\nexport const ZERO_RECORD: GristRecord = {}\nexport const ZERO_RECORDS: GristRecord[] = []\n\nexport const ZERO_DATA: GristData = {\n records: ZERO_RECORDS\n}\n\nexport const ZERO_PAGES = [20, 30, 50, 100]\n\nexport const ZERO_PAGINATION = {\n page: 1,\n limit: 20,\n total: 0,\n pages: ZERO_PAGES\n}\n"]}
@@ -1,5 +1,5 @@
1
- import { ColumnConfig, GristRecord } from '../types';
2
1
  import { LitElement, TemplateResult } from 'lit';
2
+ import { ColumnConfig, GristRecord } from '../types';
3
3
  export declare class DataCardField extends LitElement {
4
4
  static styles: import("lit").CSSResult[];
5
5
  align?: string;
@@ -1,8 +1,8 @@
1
1
  import { __decorate } from "tslib";
2
- import { LitElement, css, html } from 'lit';
3
- import { ZERO_COLUMN, ZERO_RECORD } from '../configure/zero-config';
2
+ import { css, html, LitElement } from 'lit';
4
3
  import { customElement, property } from 'lit/decorators.js';
5
4
  import { TooltipStyles } from '@operato/styles';
5
+ import { ZERO_COLUMN, ZERO_RECORD } from '../configure/zero-config';
6
6
  let DataCardField = class DataCardField extends LitElement {
7
7
  constructor() {
8
8
  super(...arguments);
@@ -76,6 +76,7 @@ DataCardField.styles = [
76
76
  text-transform: capitalize;
77
77
  }
78
78
 
79
+ :host([name]) > span,
79
80
  label + a {
80
81
  display: block;
81
82
  min-width: 100%;
@@ -1 +1 @@
1
- {"version":3,"file":"data-card-field.js","sourceRoot":"","sources":["../../../src/data-card/data-card-field.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAkB,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC3D,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AACnE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAG/C,IAAa,aAAa,GAA1B,MAAa,aAAc,SAAQ,UAAU;IAA7C;;QA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C,eAAe,CAAC;GAClB,aAAa,CA8FzB;SA9FY,aAAa","sourcesContent":["import { ColumnConfig, GristRecord } from '../types'\nimport { LitElement, TemplateResult, css, html } from 'lit'\nimport { ZERO_COLUMN, ZERO_RECORD } from '../configure/zero-config'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { TooltipStyles } from '@operato/styles'\n\n@customElement('ox-card-field')\nexport class DataCardField extends LitElement {\n static styles = [\n TooltipStyles,\n css`\n :host {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n position: relative;\n\n white-space: nowrap;\n\n font: inherit;\n }\n\n :host([thumbnail]) > * {\n object-fit: contain;\n max-width: 100%;\n max-height: 100%;\n }\n\n * {\n flex: 1;\n margin: 0;\n\n width: 100px;\n overflow: hidden;\n\n text-overflow: ellipsis;\n text-align: left;\n }\n\n *[center] {\n flex: none;\n margin: 0 auto;\n }\n\n :host([name]) {\n display: block;\n }\n\n :host([name]) label {\n display: block;\n font: var(--data-card-item-name-label-font);\n color: var(--data-card-item-name-label-color);\n }\n\n label {\n flex: none;\n width: 33%;\n padding-bottom: 2px;\n font: var(--data-card-item-etc-label-font);\n text-transform: capitalize;\n }\n\n label + a {\n display: block;\n min-width: 100%;\n }\n\n input[type='checkbox'],\n input[type='radio'] {\n zoom: var(--grist-input-zoom);\n }\n\n @media only screen and (max-width: 460px) {\n *[center] {\n margin: initial;\n }\n }\n `\n ]\n\n @property({ attribute: true }) align?: string\n @property({ type: Object }) record: GristRecord = ZERO_RECORD\n @property({ type: Object }) column: ColumnConfig = ZERO_COLUMN\n @property({ type: Number }) rowIndex: number = -1\n @property({ type: Object }) value?: object\n\n render(): TemplateResult {\n var { value, column, record, rowIndex } = this\n\n var {\n label,\n record: { renderer: recordRenderer }\n } = column\n\n if (typeof label == 'object') {\n let { renderer: labelRenderer } = label\n return html`<label>${labelRenderer()}</label>${recordRenderer(value, column, record, rowIndex, this)}`\n } else {\n return html`${recordRenderer(value, column, record, rowIndex, this)}`\n }\n }\n}\n"]}
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CACF,CAAA;AAE8B;IAA9B,QAAQ,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;4CAAe;AACjB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CAAkC;AACjC;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CAAmC;AAClC;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+CAAsB;AACrB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CAAe;AA9E/B,aAAa;IADzB,aAAa,CAAC,eAAe,CAAC;GAClB,aAAa,CA+FzB;SA/FY,aAAa","sourcesContent":["import { css, html, LitElement, TemplateResult } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { TooltipStyles } from '@operato/styles'\n\nimport { ZERO_COLUMN, ZERO_RECORD } from '../configure/zero-config'\nimport { ColumnConfig, GristRecord } from '../types'\n\n@customElement('ox-card-field')\nexport class DataCardField extends LitElement {\n static styles = [\n TooltipStyles,\n css`\n :host {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n position: relative;\n\n white-space: nowrap;\n\n font: inherit;\n }\n\n :host([thumbnail]) > * {\n object-fit: contain;\n max-width: 100%;\n max-height: 100%;\n }\n\n * {\n flex: 1;\n margin: 0;\n\n width: 100px;\n overflow: hidden;\n\n text-overflow: ellipsis;\n text-align: left;\n }\n\n *[center] {\n flex: none;\n margin: 0 auto;\n }\n\n :host([name]) {\n display: block;\n }\n\n :host([name]) label {\n display: block;\n font: var(--data-card-item-name-label-font);\n color: var(--data-card-item-name-label-color);\n }\n\n label {\n flex: none;\n width: 33%;\n padding-bottom: 2px;\n font: var(--data-card-item-etc-label-font);\n text-transform: capitalize;\n }\n\n :host([name]) > span,\n label + a {\n display: block;\n min-width: 100%;\n }\n\n input[type='checkbox'],\n input[type='radio'] {\n zoom: var(--grist-input-zoom);\n }\n\n @media only screen and (max-width: 460px) {\n *[center] {\n margin: initial;\n }\n }\n `\n ]\n\n @property({ attribute: true }) align?: string\n @property({ type: Object }) record: GristRecord = ZERO_RECORD\n @property({ type: Object }) column: ColumnConfig = ZERO_COLUMN\n @property({ type: Number }) rowIndex: number = -1\n @property({ type: Object }) value?: object\n\n render(): TemplateResult {\n var { value, column, record, rowIndex } = this\n\n var {\n label,\n record: { renderer: recordRenderer }\n } = column\n\n if (typeof label == 'object') {\n let { renderer: labelRenderer } = label\n return html`<label>${labelRenderer()}</label>${recordRenderer(value, column, record, rowIndex, this)}`\n } else {\n return html`${recordRenderer(value, column, record, rowIndex, this)}`\n }\n }\n}\n"]}