@operato/app 1.0.0-alpha.3 → 1.0.0-alpha.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 (123) hide show
  1. package/@types/global/index.d.ts +2 -0
  2. package/CHANGELOG.md +159 -8
  3. package/demo/data-grist-test.html +456 -0
  4. package/dist/src/{grist → grist-editor}/index.d.ts +0 -0
  5. package/dist/src/grist-editor/index.js +24 -0
  6. package/dist/src/grist-editor/index.js.map +1 -0
  7. package/dist/src/grist-editor/ox-grist-editor-code.d.ts +7 -0
  8. package/dist/src/grist-editor/ox-grist-editor-code.js +56 -0
  9. package/dist/src/grist-editor/ox-grist-editor-code.js.map +1 -0
  10. package/dist/src/grist-editor/ox-grist-editor-crontab.d.ts +8 -0
  11. package/dist/src/grist-editor/ox-grist-editor-crontab.js +50 -0
  12. package/dist/src/grist-editor/ox-grist-editor-crontab.js.map +1 -0
  13. package/dist/src/grist-editor/ox-grist-editor-json.d.ts +7 -0
  14. package/dist/src/grist-editor/ox-grist-editor-json.js +54 -0
  15. package/dist/src/grist-editor/ox-grist-editor-json.js.map +1 -0
  16. package/dist/src/grist-editor/ox-grist-editor-parameters.d.ts +12 -0
  17. package/dist/src/grist-editor/ox-grist-editor-parameters.js +84 -0
  18. package/dist/src/grist-editor/ox-grist-editor-parameters.js.map +1 -0
  19. package/dist/src/grist-editor/ox-grist-editor-partition-keys.d.ts +11 -0
  20. package/dist/src/grist-editor/ox-grist-editor-partition-keys.js +74 -0
  21. package/dist/src/grist-editor/ox-grist-editor-partition-keys.js.map +1 -0
  22. package/dist/src/{grist/code-editor.d.ts → grist-editor/ox-grist-editor-resource-code.d.ts} +1 -1
  23. package/dist/src/{grist/code-editor.js → grist-editor/ox-grist-editor-resource-code.js} +9 -4
  24. package/dist/src/grist-editor/ox-grist-editor-resource-code.js.map +1 -0
  25. package/dist/src/grist-editor/ox-grist-editor-resource-id.d.ts +10 -0
  26. package/dist/src/{grist/id-input.js → grist-editor/ox-grist-editor-resource-id.js} +17 -66
  27. package/dist/src/grist-editor/ox-grist-editor-resource-id.js.map +1 -0
  28. package/dist/src/grist-editor/ox-grist-editor-resource-object.d.ts +11 -0
  29. package/dist/src/{grist/object-editor.js → grist-editor/ox-grist-editor-resource-object.js} +14 -64
  30. package/dist/src/grist-editor/ox-grist-editor-resource-object.js.map +1 -0
  31. package/dist/src/grist-editor/ox-grist-editor-value-map.d.ts +11 -0
  32. package/dist/src/grist-editor/ox-grist-editor-value-map.js +74 -0
  33. package/dist/src/grist-editor/ox-grist-editor-value-map.js.map +1 -0
  34. package/dist/src/grist-editor/ox-grist-renderer-resource-id.d.ts +2 -0
  35. package/dist/src/{grist/id-renderer.js → grist-editor/ox-grist-renderer-resource-id.js} +2 -2
  36. package/dist/src/grist-editor/ox-grist-renderer-resource-id.js.map +1 -0
  37. package/dist/src/grist-editor/ox-parameters-builder.d.ts +4 -0
  38. package/dist/src/grist-editor/ox-parameters-builder.js +118 -0
  39. package/dist/src/grist-editor/ox-parameters-builder.js.map +1 -0
  40. package/dist/src/grist-editor/ox-popup-code-input.d.ts +12 -0
  41. package/dist/src/grist-editor/ox-popup-code-input.js +71 -0
  42. package/dist/src/grist-editor/ox-popup-code-input.js.map +1 -0
  43. package/dist/src/grist-editor/ox-popup-crontab-input.d.ts +11 -0
  44. package/dist/src/grist-editor/ox-popup-crontab-input.js +74 -0
  45. package/dist/src/grist-editor/ox-popup-crontab-input.js.map +1 -0
  46. package/dist/src/grist-editor/ox-popup-parameters-builder.d.ts +13 -0
  47. package/dist/src/grist-editor/ox-popup-parameters-builder.js +111 -0
  48. package/dist/src/grist-editor/ox-popup-parameters-builder.js.map +1 -0
  49. package/dist/src/grist-editor/ox-popup-partition-keys-input.d.ts +12 -0
  50. package/dist/src/grist-editor/ox-popup-partition-keys-input.js +98 -0
  51. package/dist/src/grist-editor/ox-popup-partition-keys-input.js.map +1 -0
  52. package/dist/src/grist-editor/ox-popup-value-map-input.d.ts +12 -0
  53. package/dist/src/grist-editor/ox-popup-value-map-input.js +104 -0
  54. package/dist/src/grist-editor/ox-popup-value-map-input.js.map +1 -0
  55. package/dist/src/{grist/id-selector.d.ts → grist-editor/ox-selector-resource-id.d.ts} +1 -1
  56. package/dist/src/{grist/id-selector.js → grist-editor/ox-selector-resource-id.js} +15 -15
  57. package/dist/src/grist-editor/ox-selector-resource-id.js.map +1 -0
  58. package/dist/src/{grist/object-selector.d.ts → grist-editor/ox-selector-resource-object.d.ts} +1 -1
  59. package/dist/src/{grist/object-selector.js → grist-editor/ox-selector-resource-object.js} +21 -21
  60. package/dist/src/grist-editor/ox-selector-resource-object.js.map +1 -0
  61. package/dist/src/index.d.ts +3 -1
  62. package/dist/src/index.js +3 -1
  63. package/dist/src/index.js.map +1 -1
  64. package/dist/src/input/index.d.ts +3 -0
  65. package/dist/src/input/index.js +4 -0
  66. package/dist/src/input/index.js.map +1 -0
  67. package/dist/src/input/ox-input-background-pattern.d.ts +31 -0
  68. package/dist/src/input/ox-input-background-pattern.js +150 -0
  69. package/dist/src/input/ox-input-background-pattern.js.map +1 -0
  70. package/dist/src/input/ox-input-fill-style.d.ts +41 -0
  71. package/dist/src/input/ox-input-fill-style.js +325 -0
  72. package/dist/src/input/ox-input-fill-style.js.map +1 -0
  73. package/dist/src/input/ox-input-graphql.d.ts +36 -0
  74. package/dist/src/input/ox-input-graphql.js +161 -0
  75. package/dist/src/input/ox-input-graphql.js.map +1 -0
  76. package/dist/src/property-editor/index.d.ts +24 -0
  77. package/dist/src/property-editor/index.js +58 -0
  78. package/dist/src/property-editor/index.js.map +1 -0
  79. package/dist/src/property-editor/ox-property-editor-graphql.d.ts +5 -0
  80. package/dist/src/property-editor/ox-property-editor-graphql.js +15 -0
  81. package/dist/src/property-editor/ox-property-editor-graphql.js.map +1 -0
  82. package/dist/tsconfig.tsbuildinfo +1 -1
  83. package/package.json +41 -16
  84. package/src/grist-editor/index.ts +26 -0
  85. package/src/grist-editor/ox-grist-editor-code.ts +64 -0
  86. package/src/grist-editor/ox-grist-editor-crontab.ts +62 -0
  87. package/src/grist-editor/ox-grist-editor-json.ts +62 -0
  88. package/src/grist-editor/ox-grist-editor-parameters.ts +99 -0
  89. package/src/grist-editor/ox-grist-editor-partition-keys.ts +86 -0
  90. package/src/{grist/code-editor.ts → grist-editor/ox-grist-editor-resource-code.ts} +3 -4
  91. package/src/grist-editor/ox-grist-editor-resource-id.ts +83 -0
  92. package/src/{grist/object-editor.ts → grist-editor/ox-grist-editor-resource-object.ts} +11 -48
  93. package/src/grist-editor/ox-grist-editor-value-map.ts +86 -0
  94. package/src/{grist/id-renderer.ts → grist-editor/ox-grist-renderer-resource-id.ts} +1 -1
  95. package/src/grist-editor/ox-parameters-builder.ts +128 -0
  96. package/src/grist-editor/ox-popup-code-input.ts +65 -0
  97. package/src/grist-editor/ox-popup-crontab-input.ts +74 -0
  98. package/src/grist-editor/ox-popup-parameters-builder.ts +106 -0
  99. package/src/grist-editor/ox-popup-partition-keys-input.ts +95 -0
  100. package/src/grist-editor/ox-popup-value-map-input.ts +101 -0
  101. package/src/{grist/id-selector.ts → grist-editor/ox-selector-resource-id.ts} +2 -2
  102. package/src/{grist/object-selector.ts → grist-editor/ox-selector-resource-object.ts} +3 -3
  103. package/src/index.ts +3 -1
  104. package/src/input/index.ts +3 -0
  105. package/src/input/ox-input-background-pattern.ts +166 -0
  106. package/src/input/ox-input-fill-style.ts +359 -0
  107. package/src/input/ox-input-graphql.ts +169 -0
  108. package/src/property-editor/index.ts +59 -0
  109. package/src/property-editor/ox-property-editor-graphql.ts +12 -0
  110. package/yarn-error.log +17112 -0
  111. package/dist/src/grist/code-editor.js.map +0 -1
  112. package/dist/src/grist/id-input.d.ts +0 -19
  113. package/dist/src/grist/id-input.js.map +0 -1
  114. package/dist/src/grist/id-renderer.d.ts +0 -2
  115. package/dist/src/grist/id-renderer.js.map +0 -1
  116. package/dist/src/grist/id-selector.js.map +0 -1
  117. package/dist/src/grist/index.js +0 -9
  118. package/dist/src/grist/index.js.map +0 -1
  119. package/dist/src/grist/object-editor.d.ts +0 -18
  120. package/dist/src/grist/object-editor.js.map +0 -1
  121. package/dist/src/grist/object-selector.js.map +0 -1
  122. package/src/grist/id-input.ts +0 -135
  123. package/src/grist/index.ts +0 -11
@@ -0,0 +1,2 @@
1
+ declare module '*.png'
2
+ declare module '*.css'
package/CHANGELOG.md CHANGED
@@ -3,7 +3,7 @@
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-alpha.3](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.2...v1.0.0-alpha.3) (2022-03-10)
6
+ ## [1.0.0-alpha.30](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.29...v1.0.0-alpha.30) (2022-03-18)
7
7
 
8
8
  **Note:** Version bump only for package @operato/app
9
9
 
@@ -11,7 +11,35 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
11
11
 
12
12
 
13
13
 
14
- ## [1.0.0-alpha.2](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.1...v1.0.0-alpha.2) (2022-03-10)
14
+ ## [1.0.0-alpha.29](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.28...v1.0.0-alpha.29) (2022-03-17)
15
+
16
+
17
+ ### :bug: Bug Fix
18
+
19
+ * datalist in ox-input-partition-keys ([a25e3a6](https://github.com/hatiolab/operato/commit/a25e3a66cf5f7a25bca057be90ef336b29e915a7))
20
+ * typo ([1f8f2da](https://github.com/hatiolab/operato/commit/1f8f2da3b4780df9f747065a457f6cafb5d9e9cf))
21
+
22
+
23
+
24
+ ## [1.0.0-alpha.28](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.26...v1.0.0-alpha.28) (2022-03-17)
25
+
26
+
27
+ ### :rocket: New Features
28
+
29
+ * add ox-grist-editor for partition-keys ([7672a27](https://github.com/hatiolab/operato/commit/7672a2729f78475602733a83779f6a7a96e128fd))
30
+
31
+
32
+
33
+ ## [1.0.0-alpha.27](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.26...v1.0.0-alpha.27) (2022-03-17)
34
+
35
+
36
+ ### :rocket: New Features
37
+
38
+ * add ox-grist-editor for partition-keys ([7672a27](https://github.com/hatiolab/operato/commit/7672a2729f78475602733a83779f6a7a96e128fd))
39
+
40
+
41
+
42
+ ## [1.0.0-alpha.26](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.25...v1.0.0-alpha.26) (2022-03-17)
15
43
 
16
44
  **Note:** Version bump only for package @operato/app
17
45
 
@@ -19,31 +47,154 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
19
47
 
20
48
 
21
49
 
22
- ## [1.0.0-alpha.1](https://github.com/hatiolab/operato/compare/v0.4.3...v1.0.0-alpha.1) (2022-03-09)
50
+ ## [1.0.0-alpha.25](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.24...v1.0.0-alpha.25) (2022-03-17)
51
+
52
+
53
+ ### :bug: Bug Fix
54
+
55
+ * typo ([907aceb](https://github.com/hatiolab/operato/commit/907acebaf882613991bce064efea435c2d148543))
56
+
23
57
 
24
58
 
59
+ ## [1.0.0-alpha.24](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.23...v1.0.0-alpha.24) (2022-03-17)
60
+
61
+
62
+ ### :bug: Bug Fix
63
+
64
+ * refactoring grist-editor, property-editor and input ([bdc3197](https://github.com/hatiolab/operato/commit/bdc31977d148c80a3ac0bea4b33160bac277df1e))
65
+ * refactoring grist-editor, property-editor and input ([ea7431a](https://github.com/hatiolab/operato/commit/ea7431a5e2dfd96ef392c1905e9622df7c2ef88c))
66
+
67
+
68
+
69
+ ## [1.0.0-alpha.23](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.22...v1.0.0-alpha.23) (2022-03-17)
70
+
71
+ **Note:** Version bump only for package @operato/app
72
+
73
+ ## [1.0.0-alpha.22](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.21...v1.0.0-alpha.22) (2022-03-17)
74
+
75
+ **Note:** Version bump only for package @operato/app
76
+
77
+ ## [1.0.0-alpha.21](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.20...v1.0.0-alpha.21) (2022-03-16)
78
+
25
79
  ### :rocket: New Features
26
80
 
27
- * 1.0-alpha ([42f87cf](https://github.com/hatiolab/operato/commit/42f87cf6a3cef0381db91ecb1179e63c64c01370))
81
+ - @operato/ccp module added ([f08ba5a](https://github.com/hatiolab/operato/commit/f08ba5a464c04b7fb132c6f18de975997087846a))
28
82
 
83
+ ## [1.0.0-alpha.20](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.19...v1.0.0-alpha.20) (2022-03-15)
29
84
 
85
+ **Note:** Version bump only for package @operato/app
30
86
 
31
- ### [0.4.3](https://github.com/hatiolab/operato/compare/v0.4.2...v0.4.3) (2022-03-06)
87
+ ## [1.0.0-alpha.19](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.18...v1.0.0-alpha.19) (2022-03-14)
88
+
89
+ ### :bug: Bug Fix
90
+
91
+ - image-selector in ox-input-background-pattern ([b88c6e1](https://github.com/hatiolab/operato/commit/b88c6e141d5d636bff4b29fbae3c790d80b641bc))
92
+
93
+ ## [1.0.0-alpha.18](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.17...v1.0.0-alpha.18) (2022-03-14)
94
+
95
+ ### :bug: Bug Fix
96
+
97
+ - missing font module import ([a5348cf](https://github.com/hatiolab/operato/commit/a5348cf0d567927f18bf31bba09994f3fbf742f6))
98
+
99
+ ## [1.0.0-alpha.17](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.16...v1.0.0-alpha.17) (2022-03-13)
100
+
101
+ ### :bug: Bug Fix
102
+
103
+ - some missings in font module ([6c1ba6d](https://github.com/hatiolab/operato/commit/6c1ba6d89b8ff75b03c6b4ce813f5d3d09c7437b))
104
+
105
+ ## [1.0.0-alpha.16](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.15...v1.0.0-alpha.16) (2022-03-13)
106
+
107
+ ### :bug: Bug Fix
108
+
109
+ - downgrad graphql related libraries ([d26b80f](https://github.com/hatiolab/operato/commit/d26b80fc31b10bfd3bf31b6473151af52f857c66))
110
+
111
+ ## [1.0.0-alpha.15](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.14...v1.0.0-alpha.15) (2022-03-13)
112
+
113
+ ### :rocket: New Features
114
+
115
+ - migrate input, property-editor from things-factory ([dbd5e73](https://github.com/hatiolab/operato/commit/dbd5e73eac328e72c4bb7abd113a819532bc894d))
116
+
117
+ ## [1.0.0-alpha.14](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.13...v1.0.0-alpha.14) (2022-03-13)
118
+
119
+ **Note:** Version bump only for package @operato/app
120
+
121
+ ## [1.0.0-alpha.13](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.12...v1.0.0-alpha.13) (2022-03-13)
32
122
 
33
123
  **Note:** Version bump only for package @operato/app
34
124
 
125
+ ## [1.0.0-alpha.12](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.11...v1.0.0-alpha.12) (2022-03-13)
126
+
127
+ ### :rocket: New Features
35
128
 
129
+ - migrate input, property-editor from things-factory ([4800d85](https://github.com/hatiolab/operato/commit/4800d859473bf623325233a7f2af851e5d093dcb))
36
130
 
131
+ ## [1.0.0-alpha.11](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.10...v1.0.0-alpha.11) (2022-03-12)
37
132
 
133
+ ### :bug: Bug Fix
38
134
 
39
- ### [0.4.2](https://github.com/hatiolab/operato/compare/v0.4.1...v0.4.2) (2022-03-06)
135
+ - ox-grist-editor-resource-code for grist ([cb80692](https://github.com/hatiolab/operato/commit/cb80692039e41d7b94b98ac1845822563e179e24))
136
+ - ox-property-editor-attachment-selector ([a1a2d20](https://github.com/hatiolab/operato/commit/a1a2d20640746c891248fdb729097614676c9cff))
137
+
138
+ ## [1.0.0-alpha.10](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.9...v1.0.0-alpha.10) (2022-03-12)
139
+
140
+ **Note:** Version bump only for package @operato/app
141
+
142
+ ## [1.0.0-alpha.9](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.8...v1.0.0-alpha.9) (2022-03-12)
143
+
144
+ ### :rocket: New Features
145
+
146
+ - settled concept for input, property-editor, grist-editor, so on ([0c9e1d0](https://github.com/hatiolab/operato/commit/0c9e1d054c7aef5d965868242cf471667af7a3c3))
147
+
148
+ ## [1.0.0-alpha.8](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.7...v1.0.0-alpha.8) (2022-03-11)
149
+
150
+ **Note:** Version bump only for package @operato/app
151
+
152
+ ## [1.0.0-alpha.7](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.6...v1.0.0-alpha.7) (2022-03-11)
153
+
154
+ **Note:** Version bump only for package @operato/app
155
+
156
+ ## [1.0.0-alpha.6](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.5...v1.0.0-alpha.6) (2022-03-11)
157
+
158
+ **Note:** Version bump only for package @operato/app
40
159
 
160
+ ## [1.0.0-alpha.5](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.4...v1.0.0-alpha.5) (2022-03-11)
41
161
 
42
162
  ### :rocket: New Features
43
163
 
44
- * add @operato/app module to support productivity for web application ([217d1f2](https://github.com/hatiolab/operato/commit/217d1f2d99ff75dcd8da1293814653f4758c04b8))
164
+ - start migration grist editors from things-factory ([8b31c7f](https://github.com/hatiolab/operato/commit/8b31c7f00ae9b32e68f6860c559a768c3d456704))
165
+
166
+ ### :bug: Bug Fix
167
+
168
+ - migrate parameter-editor from things-factory ([019a30d](https://github.com/hatiolab/operato/commit/019a30df6fd4c8a273d4194d13f5784ed6f8d956))
169
+
170
+ ## [1.0.0-alpha.4](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.3...v1.0.0-alpha.4) (2022-03-11)
171
+
172
+ **Note:** Version bump only for package @operato/app
173
+
174
+ ## [1.0.0-alpha.3](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.2...v1.0.0-alpha.3) (2022-03-10)
175
+
176
+ **Note:** Version bump only for package @operato/app
177
+
178
+ ## [1.0.0-alpha.2](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.1...v1.0.0-alpha.2) (2022-03-10)
179
+
180
+ **Note:** Version bump only for package @operato/app
181
+
182
+ ## [1.0.0-alpha.1](https://github.com/hatiolab/operato/compare/v0.4.3...v1.0.0-alpha.1) (2022-03-09)
183
+
184
+ ### :rocket: New Features
185
+
186
+ - 1.0-alpha ([42f87cf](https://github.com/hatiolab/operato/commit/42f87cf6a3cef0381db91ecb1179e63c64c01370))
187
+
188
+ ### [0.4.3](https://github.com/hatiolab/operato/compare/v0.4.2...v0.4.3) (2022-03-06)
189
+
190
+ **Note:** Version bump only for package @operato/app
191
+
192
+ ### [0.4.2](https://github.com/hatiolab/operato/compare/v0.4.1...v0.4.2) (2022-03-06)
193
+
194
+ ### :rocket: New Features
45
195
 
196
+ - add @operato/app module to support productivity for web application ([217d1f2](https://github.com/hatiolab/operato/commit/217d1f2d99ff75dcd8da1293814653f4758c04b8))
46
197
 
47
198
  ### :mega: Other
48
199
 
49
- * delete unused ([0c23746](https://github.com/hatiolab/operato/commit/0c237461b67a8b9cc69304ea963cb230e7c143e4))
200
+ - delete unused ([0c23746](https://github.com/hatiolab/operato/commit/0c237461b67a8b9cc69304ea963cb230e7c143e4))
@@ -0,0 +1,456 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en-GB">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" />
6
+ <style>
7
+ body {
8
+ /* box-sizing: border-box; */
9
+ margin: 0;
10
+ padding: 0;
11
+ overflow: hidden;
12
+
13
+ /* This is a font-stack that tries to use the system-default sans-serifs first */
14
+ font-family: Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
15
+ line-height: 1.5;
16
+ -webkit-font-smoothing: antialiased;
17
+ }
18
+
19
+ #app {
20
+ width: 100vw;
21
+ height: 100vh;
22
+
23
+ display: flex;
24
+ flex-direction: column;
25
+ }
26
+
27
+ #demo {
28
+ flex: 1;
29
+
30
+ display: flex;
31
+ flex-direction: column;
32
+ overflow: hidden;
33
+ }
34
+
35
+ grist-demo {
36
+ flex: 1;
37
+ overflow: auto;
38
+ }
39
+ </style>
40
+ <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" rel="stylesheet" />
41
+ <link href="https://fonts.googleapis.com/css?family=Material+Icons&display=block" rel="stylesheet" />
42
+
43
+ <link href="/themes/app-theme.css" rel="stylesheet" />
44
+ <link href="/themes/oops-theme.css" rel="stylesheet" />
45
+ <link href="/themes/grist-theme.css" rel="stylesheet" />
46
+ </head>
47
+
48
+ <body>
49
+ <script type="module">
50
+ import { LitElement, html, css, render } from 'lit'
51
+ import '../dist/index.js'
52
+ import '../dist/src/filters/filters-form.js'
53
+ import '../dist/src/sorters/sorters-control.js'
54
+ import '../dist/src/record-view/record-creator.js'
55
+ import '@operato/popup/ox-popup-list.js'
56
+ import '@material/mwc-icon'
57
+ import { CommonGristStyles } from '@operato/styles'
58
+
59
+ const fetchHandler = async ({ page, limit, sorters = [] }) => {
60
+ var total = 120993
61
+ var start = (page - 1) * limit
62
+
63
+ await new Promise(resolve => setTimeout(resolve, 500))
64
+
65
+ return {
66
+ total,
67
+ records: Array(limit * page > total ? total % limit : limit)
68
+ .fill()
69
+ .map((item, idx) => {
70
+ return {
71
+ id: idx,
72
+ name: idx % 2 ? `shnam-${start + idx + 1}` : `heartyoh-${start + idx + 1}`,
73
+ description:
74
+ idx % 2 ? `hatiolabmanager${start + idx + 1}1234567890` : `hatiosea manager-${start + idx + 1}`,
75
+ email: idx % 2 ? `shnam-${start + idx + 1}@gmail.com` : `heartyoh-${start + idx + 1}@gmail.com`,
76
+ active: Math.round(Math.random() * 2) % 2 ? true : false,
77
+ barcode: idx % 2 ? `1234567890${start + idx + 1}` : `0987654321${start + idx + 1}`,
78
+ company:
79
+ idx % 2
80
+ ? {
81
+ id: '2',
82
+ name: 'HatioLAB',
83
+ description: `경기도 성남시-${start + idx + 1}`
84
+ }
85
+ : {
86
+ id: '3',
87
+ name: 'HatioSEA',
88
+ description: `말레이시아 세티아알람-${start + idx + 1}`
89
+ },
90
+ thumbnail:
91
+ idx % 4 === 0
92
+ ? '' /* no source */
93
+ : idx % 4 === 1
94
+ ? `http://www.hatiolab.com/assets/img/operato-biz3.png`
95
+ : idx % 4 === 2
96
+ ? `http://www.hatiolab.com/assets/img/thingsboard-30.png`
97
+ : `http://www.hatiolab.com/wrong-url.png` /* wrong source */,
98
+ role: ['admin', 'worker', 'tester'][idx % 3],
99
+ color: idx % 2 ? `#87f018` : `#180f87`,
100
+ rate: Math.round(Math.random() * 100),
101
+ dynamicType: ['text', 'email', 'checkbox', 'color', 'progress', 'barcode'][idx % 5],
102
+ dynamicValue: ['abcdefghijkl', 'heartyoh@hatiolab.com', 'true', 'orange', '50', '1234567890'][idx % 5],
103
+ homepage:
104
+ idx % 2
105
+ ? `http://hatiolab.com/${start + idx + 1}`
106
+ : `http://deadpool.hatiolab.com/${start + idx + 1}`,
107
+ json5: {
108
+ abc: 'abc',
109
+ value: 123
110
+ },
111
+ createdAt: Date.now(),
112
+ updatedAt: Date.now()
113
+ }
114
+ })
115
+ }
116
+ }
117
+
118
+ const config = {
119
+ list: {
120
+ thumbnail: 'thumbnail',
121
+ fields: ['name', 'description'],
122
+ details: ['role', 'email']
123
+ },
124
+ columns: [
125
+ {
126
+ type: 'gutter',
127
+ gutterName: 'dirty'
128
+ },
129
+ {
130
+ type: 'gutter',
131
+ gutterName: 'sequence'
132
+ },
133
+ {
134
+ type: 'gutter',
135
+ gutterName: 'row-selector',
136
+ multiple: true
137
+ },
138
+ {
139
+ type: 'gutter',
140
+ gutterName: 'button',
141
+ icon: 'edit',
142
+ handlers: {
143
+ click: function () {
144
+ console.log('clicked')
145
+ }
146
+ }
147
+ },
148
+ {
149
+ type: 'gutter',
150
+ gutterName: 'button',
151
+ icon: 'add',
152
+ handlers: {
153
+ click: 'record-copy'
154
+ }
155
+ },
156
+ {
157
+ type: 'gutter',
158
+ gutterName: 'button',
159
+ icon: 'arrow_downward',
160
+ handlers: {
161
+ click: 'move-down'
162
+ }
163
+ },
164
+ {
165
+ type: 'string',
166
+ name: 'id',
167
+ hidden: true
168
+ },
169
+ {
170
+ type: 'link',
171
+ name: 'name',
172
+ label: true,
173
+ header: 'name',
174
+ record: {
175
+ editable: true,
176
+ options: {
177
+ // href: 'http://hatiolab.com',
178
+ href: function (column, record, rowIndex) {
179
+ return record['homepage']
180
+ },
181
+ target: '_blank'
182
+ }
183
+ },
184
+ filter: 'search',
185
+ sortable: true,
186
+ width: 120
187
+ },
188
+ {
189
+ type: 'string',
190
+ name: 'description',
191
+ header: 'description',
192
+ filter: 'search',
193
+ record: {
194
+ editable: true,
195
+ align: 'left'
196
+ },
197
+ width: 200,
198
+ handlers: {
199
+ click: (columns, data, column, record, rowIndex, target) => {
200
+ alert(`${column.name} ${record[column.name]}, row : ${rowIndex}`)
201
+ }
202
+ }
203
+ },
204
+ {
205
+ type: 'email',
206
+ name: 'email',
207
+ label: true,
208
+ header: 'email',
209
+ record: {
210
+ editable: true
211
+ },
212
+ filter: 'search',
213
+ sortable: true,
214
+ width: 130,
215
+ validation: function (after, before, record, column) {
216
+ if (after.indexOf('@') == -1) {
217
+ document.dispatchEvent(
218
+ new CustomEvent('notify', {
219
+ detail: {
220
+ type: 'error',
221
+ message: `invalid value - ${after}`
222
+ }
223
+ })
224
+ )
225
+ return false
226
+ }
227
+ return true
228
+ }
229
+ },
230
+ {
231
+ type: 'boolean',
232
+ name: 'active',
233
+ header: 'active',
234
+ record: {
235
+ editable: true
236
+ },
237
+ filter: true,
238
+ handlers: {
239
+ dblclick: () => {
240
+ const grist = document.querySelector('ox-grist')
241
+ console.log(grist.dirtyRecords)
242
+ }
243
+ },
244
+ sortable: true,
245
+ width: 60
246
+ },
247
+ {
248
+ type: 'select',
249
+ name: 'role',
250
+ label: true,
251
+ header: 'role',
252
+ record: {
253
+ options: ['', 'admin', 'worker', 'tester'],
254
+ editable: true
255
+ },
256
+ filter: true,
257
+ sortable: true,
258
+ width: 120
259
+ },
260
+ {
261
+ type: 'color',
262
+ name: 'color',
263
+ header: 'color',
264
+ record: {
265
+ editable: true
266
+ },
267
+ sortable: true,
268
+ width: 50
269
+ },
270
+ {
271
+ type: 'float',
272
+ name: 'rate',
273
+ header: 'rate',
274
+ record: {
275
+ align: 'right',
276
+ editable: true
277
+ },
278
+ filter: 'between',
279
+ sortable: true,
280
+ width: 50
281
+ },
282
+ {
283
+ type: 'json5',
284
+ name: 'json5',
285
+ header: 'JSON5',
286
+ width: 200
287
+ },
288
+ {
289
+ type: 'image',
290
+ name: 'thumbnail',
291
+ header: 'thumbnail',
292
+ record: {
293
+ editable: true
294
+ }
295
+ },
296
+ {
297
+ type: 'datetime',
298
+ name: 'updatedAt',
299
+ header: 'updated at',
300
+ record: {
301
+ editable: true
302
+ },
303
+ filter: 'between',
304
+ sortable: true,
305
+ width: 180
306
+ },
307
+ {
308
+ type: 'datetime',
309
+ name: 'createdAt',
310
+ header: 'created at',
311
+ record: {
312
+ editable: false
313
+ },
314
+ sortable: true,
315
+ width: 180
316
+ }
317
+ ],
318
+ rows: {
319
+ selectable: {
320
+ multiple: true
321
+ },
322
+ handlers: {
323
+ click: 'select-row-toggle'
324
+ },
325
+ classifier: function (record, rowIndex) {
326
+ const rate = record['rate']
327
+ const emphasized =
328
+ rate < 10 ? ['black', 'white'] : rate < 25 ? ['yellow', 'blue'] : rate < 40 ? ['cyan', 'red'] : undefined
329
+ return {
330
+ emphasized
331
+ }
332
+ }
333
+ },
334
+ sorters: [
335
+ {
336
+ name: 'name',
337
+ desc: true
338
+ },
339
+ {
340
+ name: 'email'
341
+ }
342
+ ],
343
+ pagination: {
344
+ pages: [20, 30, 50, 100, 200]
345
+ }
346
+ }
347
+
348
+ class GristDemo extends LitElement {
349
+ static styles = [
350
+ CommonGristStyles,
351
+ css`
352
+ :host {
353
+ display: flex;
354
+ flex-direction: column;
355
+ }
356
+
357
+ #tailer {
358
+ display: flex;
359
+ flex-direction: row;
360
+ margin: 0 var(--margin-default);
361
+ }
362
+
363
+ #tailer a {
364
+ padding: 0 var(--padding-default) 0 var(--padding-default);
365
+ margin: 0 var(--margin-narrow);
366
+ border-right: 1px solid rgba(0, 0, 0, 0.1);
367
+ font-size: var(--fontsize-default);
368
+ color: var(--primary-color);
369
+ }
370
+ `
371
+ ]
372
+
373
+ static get properties() {
374
+ return {
375
+ mode: String
376
+ }
377
+ }
378
+
379
+ get grist() {
380
+ return this.renderRoot.querySelector('ox-grist')
381
+ }
382
+
383
+ render() {
384
+ const mode = this.mode || 'CARD'
385
+
386
+ return html`
387
+ <ox-grist .config=${config} .mode=${mode} auto-fetch .fetchHandler=${fetchHandler}>
388
+ <div id="filters" slot="headroom">
389
+ <ox-filters-form @filters-change=${e => console.log('changed', e.detail)}></ox-filters-form>
390
+ </div>
391
+
392
+ <div slot="headroom" id="headroom">
393
+ <div id="tailer">
394
+ <a href="./report-test.html">Report Test</a>
395
+ <a
396
+ href="#"
397
+ @click=${() => {
398
+ this.renderRoot.querySelector('ox-grist').reset()
399
+ }}
400
+ >Reset</a
401
+ >
402
+ <a
403
+ href="#"
404
+ @click=${() => {
405
+ this.renderRoot.querySelector('ox-grist').fetch(true)
406
+ }}
407
+ >Fetch</a
408
+ >
409
+ </div>
410
+
411
+ <div id="sorters">
412
+ Sort
413
+ <mwc-icon
414
+ @click=${e => {
415
+ const target = e.currentTarget
416
+ this.renderRoot.querySelector('#sorter-control').open({
417
+ right: 0,
418
+ top: target.offsetTop + target.offsetHeight
419
+ })
420
+ }}
421
+ >expand_more</mwc-icon
422
+ >
423
+ <ox-popup id="sorter-control">
424
+ <ox-sorters-control> </ox-sorters-control>
425
+ </ox-popup>
426
+ </div>
427
+
428
+ <div id="modes">
429
+ <mwc-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>view_list</mwc-icon>
430
+ <mwc-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>menu</mwc-icon>
431
+ <mwc-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</mwc-icon>
432
+ </div>
433
+
434
+ <ox-record-creator id="add" light-popup>
435
+ <button><mwc-icon>add</mwc-icon></button>
436
+ </ox-record-creator>
437
+
438
+ <button @click=${e => this.grist.cloneSelectedRecords()}><mwc-icon>add</mwc-icon></button>
439
+ </div>
440
+ </ox-grist>
441
+ `
442
+ }
443
+ }
444
+
445
+ customElements.define('grist-demo', GristDemo)
446
+
447
+ setTimeout(() => {
448
+ render(html` <grist-demo mode="LIST"></grist-demo> `, document.querySelector('#demo'))
449
+ })
450
+ </script>
451
+
452
+ <div id="app">
453
+ <div id="demo"></div>
454
+ </div>
455
+ </body>
456
+ </html>
File without changes
@@ -0,0 +1,24 @@
1
+ import { Json5Renderer, registerEditor, registerRenderer } from '@operato/data-grist';
2
+ import { OxGristEditorCrontab } from './ox-grist-editor-crontab.js';
3
+ import { OxGristEditorJson } from './ox-grist-editor-json.js';
4
+ import { OxGristEditorParameters } from './ox-grist-editor-parameters.js';
5
+ import { OxGristEditorPartitionKeys } from './ox-grist-editor-partition-keys.js';
6
+ import { OxGristEditorResourceCode } from './ox-grist-editor-resource-code.js';
7
+ import { OxGristEditorResourceId } from './ox-grist-editor-resource-id.js';
8
+ import { OxGristEditorResourceObject } from './ox-grist-editor-resource-object.js';
9
+ import { OxGristEditorValueMap } from './ox-grist-editor-value-map.js';
10
+ import { OxGristRendererResourceId } from './ox-grist-renderer-resource-id.js';
11
+ /* register grist renderer/editor for id */
12
+ registerEditor('resource-id', OxGristEditorResourceId);
13
+ registerEditor('resource-object', OxGristEditorResourceObject);
14
+ registerEditor('resource-code', OxGristEditorResourceCode);
15
+ registerEditor('parameters', OxGristEditorParameters);
16
+ registerEditor('value-map', OxGristEditorValueMap);
17
+ registerEditor('partition-keys', OxGristEditorPartitionKeys);
18
+ registerEditor('crontab', OxGristEditorCrontab);
19
+ registerEditor('json', OxGristEditorJson);
20
+ registerRenderer('resource-id', OxGristRendererResourceId);
21
+ registerRenderer('parameters', Json5Renderer);
22
+ registerRenderer('value-map', Json5Renderer);
23
+ registerRenderer('partition-keys', Json5Renderer);
24
+ //# sourceMappingURL=index.js.map