@operato/app 1.0.0-alpha.23 → 1.0.0-alpha.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -100
- package/dist/src/{grist → grist-editor}/index.d.ts +0 -0
- package/dist/src/grist-editor/index.js +21 -0
- package/dist/src/grist-editor/index.js.map +1 -0
- package/dist/src/grist-editor/ox-grist-editor-crontab.d.ts +8 -0
- package/dist/src/grist-editor/ox-grist-editor-crontab.js +50 -0
- package/dist/src/grist-editor/ox-grist-editor-crontab.js.map +1 -0
- package/dist/src/grist-editor/ox-grist-editor-json.d.ts +7 -0
- package/dist/src/grist-editor/ox-grist-editor-json.js +54 -0
- package/dist/src/grist-editor/ox-grist-editor-json.js.map +1 -0
- package/dist/src/grist-editor/ox-grist-editor-parameters.d.ts +12 -0
- package/dist/src/{grist/parameters-editor.js → grist-editor/ox-grist-editor-parameters.js} +16 -37
- package/dist/src/grist-editor/ox-grist-editor-parameters.js.map +1 -0
- package/dist/src/{grist/code-editor.d.ts → grist-editor/ox-grist-editor-resource-code.d.ts} +1 -1
- package/dist/src/{grist/code-editor.js → grist-editor/ox-grist-editor-resource-code.js} +6 -6
- package/dist/src/grist-editor/ox-grist-editor-resource-code.js.map +1 -0
- package/dist/src/grist-editor/ox-grist-editor-resource-id.d.ts +10 -0
- package/dist/src/{grist/id-input.js → grist-editor/ox-grist-editor-resource-id.js} +17 -66
- package/dist/src/grist-editor/ox-grist-editor-resource-id.js.map +1 -0
- package/dist/src/grist-editor/ox-grist-editor-resource-object.d.ts +11 -0
- package/dist/src/{grist/object-editor.js → grist-editor/ox-grist-editor-resource-object.js} +11 -62
- package/dist/src/grist-editor/ox-grist-editor-resource-object.js.map +1 -0
- package/dist/src/grist-editor/ox-grist-editor-value-map.d.ts +11 -0
- package/dist/src/grist-editor/ox-grist-editor-value-map.js +74 -0
- package/dist/src/grist-editor/ox-grist-editor-value-map.js.map +1 -0
- package/dist/src/grist-editor/ox-grist-renderer-resource-id.d.ts +2 -0
- package/dist/src/{grist/id-renderer.js → grist-editor/ox-grist-renderer-resource-id.js} +2 -2
- package/dist/src/grist-editor/ox-grist-renderer-resource-id.js.map +1 -0
- package/dist/src/{grist/parameters-editor-builder.d.ts → grist-editor/ox-parameters-builder.d.ts} +0 -0
- package/dist/src/{grist/parameters-editor-builder.js → grist-editor/ox-parameters-builder.js} +10 -10
- package/dist/src/grist-editor/ox-parameters-builder.js.map +1 -0
- package/dist/src/grist-editor/ox-popup-code-input.d.ts +12 -0
- package/dist/src/grist-editor/ox-popup-code-input.js +81 -0
- package/dist/src/grist-editor/ox-popup-code-input.js.map +1 -0
- package/dist/src/grist-editor/ox-popup-crontab-input.d.ts +11 -0
- package/dist/src/grist-editor/ox-popup-crontab-input.js +74 -0
- package/dist/src/grist-editor/ox-popup-crontab-input.js.map +1 -0
- package/dist/src/{grist/parameters-editor-popup.d.ts → grist-editor/ox-popup-parameters-builder.d.ts} +1 -1
- package/dist/src/{grist/parameters-editor-popup.js → grist-editor/ox-popup-parameters-builder.js} +15 -15
- package/dist/src/grist-editor/ox-popup-parameters-builder.js.map +1 -0
- package/dist/src/grist-editor/ox-popup-value-map-input.d.ts +12 -0
- package/dist/src/grist-editor/ox-popup-value-map-input.js +104 -0
- package/dist/src/grist-editor/ox-popup-value-map-input.js.map +1 -0
- package/dist/src/{grist/id-selector.d.ts → grist-editor/ox-selector-resource-id.d.ts} +1 -1
- package/dist/src/{grist/id-selector.js → grist-editor/ox-selector-resource-id.js} +15 -15
- package/dist/src/grist-editor/ox-selector-resource-id.js.map +1 -0
- package/dist/src/{grist/object-selector.d.ts → grist-editor/ox-selector-resource-object.d.ts} +1 -1
- package/dist/src/{grist/object-selector.js → grist-editor/ox-selector-resource-object.js} +20 -20
- package/dist/src/grist-editor/ox-selector-resource-object.js.map +1 -0
- package/dist/src/index.d.ts +3 -1
- package/dist/src/index.js +3 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/input/index.d.ts +3 -0
- package/dist/src/input/index.js +4 -0
- package/dist/src/input/index.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +28 -23
- package/src/grist-editor/index.ts +23 -0
- package/src/grist-editor/ox-grist-editor-crontab.ts +62 -0
- package/src/grist-editor/ox-grist-editor-json.ts +62 -0
- package/src/{grist/parameters-editor.ts → grist-editor/ox-grist-editor-parameters.ts} +13 -26
- package/src/{grist/code-editor.ts → grist-editor/ox-grist-editor-resource-code.ts} +2 -2
- package/src/grist-editor/ox-grist-editor-resource-id.ts +83 -0
- package/src/{grist/object-editor.ts → grist-editor/ox-grist-editor-resource-object.ts} +7 -46
- package/src/grist-editor/ox-grist-editor-value-map.ts +86 -0
- package/src/{grist/id-renderer.ts → grist-editor/ox-grist-renderer-resource-id.ts} +1 -1
- package/src/{grist/parameters-editor-builder.ts → grist-editor/ox-parameters-builder.ts} +4 -4
- package/src/grist-editor/ox-popup-code-input.ts +75 -0
- package/src/grist-editor/ox-popup-crontab-input.ts +74 -0
- package/src/{grist/parameters-editor-popup.ts → grist-editor/ox-popup-parameters-builder.ts} +5 -5
- package/src/grist-editor/ox-popup-value-map-input.ts +101 -0
- package/src/{grist/id-selector.ts → grist-editor/ox-selector-resource-id.ts} +2 -2
- package/src/{grist/object-selector.ts → grist-editor/ox-selector-resource-object.ts} +2 -2
- package/src/index.ts +3 -1
- package/src/input/index.ts +3 -0
- package/yarn-error.log +1 -1
- package/dist/src/grist/code-editor.js.map +0 -1
- package/dist/src/grist/id-input.d.ts +0 -19
- package/dist/src/grist/id-input.js.map +0 -1
- package/dist/src/grist/id-renderer.d.ts +0 -2
- package/dist/src/grist/id-renderer.js.map +0 -1
- package/dist/src/grist/id-selector.js.map +0 -1
- package/dist/src/grist/index.js +0 -11
- package/dist/src/grist/index.js.map +0 -1
- package/dist/src/grist/object-editor.d.ts +0 -18
- package/dist/src/grist/object-editor.js.map +0 -1
- package/dist/src/grist/object-selector.js.map +0 -1
- package/dist/src/grist/parameters-editor-builder.js.map +0 -1
- package/dist/src/grist/parameters-editor-popup.js.map +0 -1
- package/dist/src/grist/parameters-editor.d.ts +0 -19
- package/dist/src/grist/parameters-editor.js.map +0 -1
- package/src/grist/id-input.ts +0 -135
- package/src/grist/index.ts +0 -13
package/CHANGELOG.md
CHANGED
|
@@ -3,223 +3,145 @@
|
|
|
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.
|
|
6
|
+
## [1.0.0-alpha.24](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.23...v1.0.0-alpha.24) (2022-03-17)
|
|
7
7
|
|
|
8
|
-
**Note:** Version bump only for package @operato/app
|
|
9
8
|
|
|
9
|
+
### :bug: Bug Fix
|
|
10
10
|
|
|
11
|
+
* refactoring grist-editor, property-editor and input ([bdc3197](https://github.com/hatiolab/operato/commit/bdc31977d148c80a3ac0bea4b33160bac277df1e))
|
|
12
|
+
* refactoring grist-editor, property-editor and input ([ea7431a](https://github.com/hatiolab/operato/commit/ea7431a5e2dfd96ef392c1905e9622df7c2ef88c))
|
|
11
13
|
|
|
12
14
|
|
|
13
15
|
|
|
14
|
-
## [1.0.0-alpha.
|
|
16
|
+
## [1.0.0-alpha.23](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.22...v1.0.0-alpha.23) (2022-03-17)
|
|
15
17
|
|
|
16
18
|
**Note:** Version bump only for package @operato/app
|
|
17
19
|
|
|
20
|
+
## [1.0.0-alpha.22](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.21...v1.0.0-alpha.22) (2022-03-17)
|
|
18
21
|
|
|
19
|
-
|
|
20
|
-
|
|
22
|
+
**Note:** Version bump only for package @operato/app
|
|
21
23
|
|
|
22
24
|
## [1.0.0-alpha.21](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.20...v1.0.0-alpha.21) (2022-03-16)
|
|
23
25
|
|
|
24
|
-
|
|
25
26
|
### :rocket: New Features
|
|
26
27
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
- @operato/ccp module added ([f08ba5a](https://github.com/hatiolab/operato/commit/f08ba5a464c04b7fb132c6f18de975997087846a))
|
|
30
29
|
|
|
31
30
|
## [1.0.0-alpha.20](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.19...v1.0.0-alpha.20) (2022-03-15)
|
|
32
31
|
|
|
33
32
|
**Note:** Version bump only for package @operato/app
|
|
34
33
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
34
|
## [1.0.0-alpha.19](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.18...v1.0.0-alpha.19) (2022-03-14)
|
|
40
35
|
|
|
41
|
-
|
|
42
36
|
### :bug: Bug Fix
|
|
43
37
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
38
|
+
- image-selector in ox-input-background-pattern ([b88c6e1](https://github.com/hatiolab/operato/commit/b88c6e141d5d636bff4b29fbae3c790d80b641bc))
|
|
47
39
|
|
|
48
40
|
## [1.0.0-alpha.18](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.17...v1.0.0-alpha.18) (2022-03-14)
|
|
49
41
|
|
|
50
|
-
|
|
51
42
|
### :bug: Bug Fix
|
|
52
43
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
44
|
+
- missing font module import ([a5348cf](https://github.com/hatiolab/operato/commit/a5348cf0d567927f18bf31bba09994f3fbf742f6))
|
|
56
45
|
|
|
57
46
|
## [1.0.0-alpha.17](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.16...v1.0.0-alpha.17) (2022-03-13)
|
|
58
47
|
|
|
59
|
-
|
|
60
48
|
### :bug: Bug Fix
|
|
61
49
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
50
|
+
- some missings in font module ([6c1ba6d](https://github.com/hatiolab/operato/commit/6c1ba6d89b8ff75b03c6b4ce813f5d3d09c7437b))
|
|
65
51
|
|
|
66
52
|
## [1.0.0-alpha.16](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.15...v1.0.0-alpha.16) (2022-03-13)
|
|
67
53
|
|
|
68
|
-
|
|
69
54
|
### :bug: Bug Fix
|
|
70
55
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
56
|
+
- downgrad graphql related libraries ([d26b80f](https://github.com/hatiolab/operato/commit/d26b80fc31b10bfd3bf31b6473151af52f857c66))
|
|
74
57
|
|
|
75
58
|
## [1.0.0-alpha.15](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.14...v1.0.0-alpha.15) (2022-03-13)
|
|
76
59
|
|
|
77
|
-
|
|
78
60
|
### :rocket: New Features
|
|
79
61
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
62
|
+
- migrate input, property-editor from things-factory ([dbd5e73](https://github.com/hatiolab/operato/commit/dbd5e73eac328e72c4bb7abd113a819532bc894d))
|
|
83
63
|
|
|
84
64
|
## [1.0.0-alpha.14](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.13...v1.0.0-alpha.14) (2022-03-13)
|
|
85
65
|
|
|
86
66
|
**Note:** Version bump only for package @operato/app
|
|
87
67
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
68
|
## [1.0.0-alpha.13](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.12...v1.0.0-alpha.13) (2022-03-13)
|
|
93
69
|
|
|
94
70
|
**Note:** Version bump only for package @operato/app
|
|
95
71
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
72
|
## [1.0.0-alpha.12](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.11...v1.0.0-alpha.12) (2022-03-13)
|
|
101
73
|
|
|
102
|
-
|
|
103
74
|
### :rocket: New Features
|
|
104
75
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
76
|
+
- migrate input, property-editor from things-factory ([4800d85](https://github.com/hatiolab/operato/commit/4800d859473bf623325233a7f2af851e5d093dcb))
|
|
108
77
|
|
|
109
78
|
## [1.0.0-alpha.11](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.10...v1.0.0-alpha.11) (2022-03-12)
|
|
110
79
|
|
|
111
|
-
|
|
112
80
|
### :bug: Bug Fix
|
|
113
81
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
82
|
+
- ox-grist-editor-resource-code for grist ([cb80692](https://github.com/hatiolab/operato/commit/cb80692039e41d7b94b98ac1845822563e179e24))
|
|
83
|
+
- ox-property-editor-attachment-selector ([a1a2d20](https://github.com/hatiolab/operato/commit/a1a2d20640746c891248fdb729097614676c9cff))
|
|
118
84
|
|
|
119
85
|
## [1.0.0-alpha.10](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.9...v1.0.0-alpha.10) (2022-03-12)
|
|
120
86
|
|
|
121
87
|
**Note:** Version bump only for package @operato/app
|
|
122
88
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
89
|
## [1.0.0-alpha.9](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.8...v1.0.0-alpha.9) (2022-03-12)
|
|
128
90
|
|
|
129
|
-
|
|
130
91
|
### :rocket: New Features
|
|
131
92
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
93
|
+
- settled concept for input, property-editor, grist-editor, so on ([0c9e1d0](https://github.com/hatiolab/operato/commit/0c9e1d054c7aef5d965868242cf471667af7a3c3))
|
|
135
94
|
|
|
136
95
|
## [1.0.0-alpha.8](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.7...v1.0.0-alpha.8) (2022-03-11)
|
|
137
96
|
|
|
138
97
|
**Note:** Version bump only for package @operato/app
|
|
139
98
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
99
|
## [1.0.0-alpha.7](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.6...v1.0.0-alpha.7) (2022-03-11)
|
|
145
100
|
|
|
146
101
|
**Note:** Version bump only for package @operato/app
|
|
147
102
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
103
|
## [1.0.0-alpha.6](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.5...v1.0.0-alpha.6) (2022-03-11)
|
|
153
104
|
|
|
154
105
|
**Note:** Version bump only for package @operato/app
|
|
155
106
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
107
|
## [1.0.0-alpha.5](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.4...v1.0.0-alpha.5) (2022-03-11)
|
|
161
108
|
|
|
162
|
-
|
|
163
109
|
### :rocket: New Features
|
|
164
110
|
|
|
165
|
-
|
|
166
|
-
|
|
111
|
+
- start migration grist editors from things-factory ([8b31c7f](https://github.com/hatiolab/operato/commit/8b31c7f00ae9b32e68f6860c559a768c3d456704))
|
|
167
112
|
|
|
168
113
|
### :bug: Bug Fix
|
|
169
114
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
115
|
+
- migrate parameter-editor from things-factory ([019a30d](https://github.com/hatiolab/operato/commit/019a30df6fd4c8a273d4194d13f5784ed6f8d956))
|
|
173
116
|
|
|
174
117
|
## [1.0.0-alpha.4](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.3...v1.0.0-alpha.4) (2022-03-11)
|
|
175
118
|
|
|
176
119
|
**Note:** Version bump only for package @operato/app
|
|
177
120
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
121
|
## [1.0.0-alpha.3](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.2...v1.0.0-alpha.3) (2022-03-10)
|
|
183
122
|
|
|
184
123
|
**Note:** Version bump only for package @operato/app
|
|
185
124
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
125
|
## [1.0.0-alpha.2](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.1...v1.0.0-alpha.2) (2022-03-10)
|
|
191
126
|
|
|
192
127
|
**Note:** Version bump only for package @operato/app
|
|
193
128
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
129
|
## [1.0.0-alpha.1](https://github.com/hatiolab/operato/compare/v0.4.3...v1.0.0-alpha.1) (2022-03-09)
|
|
199
130
|
|
|
200
|
-
|
|
201
131
|
### :rocket: New Features
|
|
202
132
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
133
|
+
- 1.0-alpha ([42f87cf](https://github.com/hatiolab/operato/commit/42f87cf6a3cef0381db91ecb1179e63c64c01370))
|
|
206
134
|
|
|
207
135
|
### [0.4.3](https://github.com/hatiolab/operato/compare/v0.4.2...v0.4.3) (2022-03-06)
|
|
208
136
|
|
|
209
137
|
**Note:** Version bump only for package @operato/app
|
|
210
138
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
139
|
### [0.4.2](https://github.com/hatiolab/operato/compare/v0.4.1...v0.4.2) (2022-03-06)
|
|
216
140
|
|
|
217
|
-
|
|
218
141
|
### :rocket: New Features
|
|
219
142
|
|
|
220
|
-
|
|
221
|
-
|
|
143
|
+
- add @operato/app module to support productivity for web application ([217d1f2](https://github.com/hatiolab/operato/commit/217d1f2d99ff75dcd8da1293814653f4758c04b8))
|
|
222
144
|
|
|
223
145
|
### :mega: Other
|
|
224
146
|
|
|
225
|
-
|
|
147
|
+
- delete unused ([0c23746](https://github.com/hatiolab/operato/commit/0c237461b67a8b9cc69304ea963cb230e7c143e4))
|
|
File without changes
|
|
@@ -0,0 +1,21 @@
|
|
|
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 { OxGristEditorResourceCode } from './ox-grist-editor-resource-code.js';
|
|
6
|
+
import { OxGristEditorResourceId } from './ox-grist-editor-resource-id.js';
|
|
7
|
+
import { OxGristEditorResourceObject } from './ox-grist-editor-resource-object.js';
|
|
8
|
+
import { OxGristEditorValueMap } from './ox-grist-editor-value-map.js';
|
|
9
|
+
import { OxGristRendererResourceId } from './ox-grist-renderer-resource-id.js';
|
|
10
|
+
/* register grist renderer/editor for id */
|
|
11
|
+
registerEditor('resource-id', OxGristEditorResourceId);
|
|
12
|
+
registerEditor('resource-object', OxGristEditorResourceObject);
|
|
13
|
+
registerEditor('resource-code', OxGristEditorResourceCode);
|
|
14
|
+
registerEditor('parameters', OxGristEditorParameters);
|
|
15
|
+
registerEditor('value-map', OxGristEditorValueMap);
|
|
16
|
+
registerEditor('crontab', OxGristEditorCrontab);
|
|
17
|
+
registerEditor('json', OxGristEditorJson);
|
|
18
|
+
registerRenderer('resource-id', OxGristRendererResourceId);
|
|
19
|
+
registerRenderer('parameters', Json5Renderer);
|
|
20
|
+
registerRenderer('value-map', Json5Renderer);
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/grist-editor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAErF,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAA;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAA;AACzE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAA;AAC9E,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAA;AAC1E,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAA;AAClF,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAA;AACtE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAA;AAE9E,2CAA2C;AAC3C,cAAc,CAAC,aAAa,EAAE,uBAAuB,CAAC,CAAA;AACtD,cAAc,CAAC,iBAAiB,EAAE,2BAA2B,CAAC,CAAA;AAC9D,cAAc,CAAC,eAAe,EAAE,yBAAyB,CAAC,CAAA;AAC1D,cAAc,CAAC,YAAY,EAAE,uBAAuB,CAAC,CAAA;AACrD,cAAc,CAAC,WAAW,EAAE,qBAAqB,CAAC,CAAA;AAClD,cAAc,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAA;AAC/C,cAAc,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAA;AAEzC,gBAAgB,CAAC,aAAa,EAAE,yBAAyB,CAAC,CAAA;AAC1D,gBAAgB,CAAC,YAAY,EAAE,aAAa,CAAC,CAAA;AAC7C,gBAAgB,CAAC,WAAW,EAAE,aAAa,CAAC,CAAA","sourcesContent":["import { Json5Renderer, registerEditor, registerRenderer } from '@operato/data-grist'\n\nimport { OxGristEditorCrontab } from './ox-grist-editor-crontab.js'\nimport { OxGristEditorJson } from './ox-grist-editor-json.js'\nimport { OxGristEditorParameters } from './ox-grist-editor-parameters.js'\nimport { OxGristEditorResourceCode } from './ox-grist-editor-resource-code.js'\nimport { OxGristEditorResourceId } from './ox-grist-editor-resource-id.js'\nimport { OxGristEditorResourceObject } from './ox-grist-editor-resource-object.js'\nimport { OxGristEditorValueMap } from './ox-grist-editor-value-map.js'\nimport { OxGristRendererResourceId } from './ox-grist-renderer-resource-id.js'\n\n/* register grist renderer/editor for id */\nregisterEditor('resource-id', OxGristEditorResourceId)\nregisterEditor('resource-object', OxGristEditorResourceObject)\nregisterEditor('resource-code', OxGristEditorResourceCode)\nregisterEditor('parameters', OxGristEditorParameters)\nregisterEditor('value-map', OxGristEditorValueMap)\nregisterEditor('crontab', OxGristEditorCrontab)\nregisterEditor('json', OxGristEditorJson)\n\nregisterRenderer('resource-id', OxGristRendererResourceId)\nregisterRenderer('parameters', Json5Renderer)\nregisterRenderer('value-map', Json5Renderer)\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import './ox-popup-crontab-input.js';
|
|
2
|
+
import { InputEditor } from '@operato/data-grist';
|
|
3
|
+
export declare class OxGristEditorCrontab extends InputEditor {
|
|
4
|
+
private popup?;
|
|
5
|
+
get editorTemplate(): import("lit-html").TemplateResult<1>;
|
|
6
|
+
firstUpdated(): Promise<void>;
|
|
7
|
+
showEditorPopup(): void;
|
|
8
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import './ox-popup-crontab-input.js';
|
|
3
|
+
import { openPopup } from '@operato/layout';
|
|
4
|
+
import { InputEditor } from '@operato/data-grist';
|
|
5
|
+
import { customElement } from 'lit/decorators.js';
|
|
6
|
+
import { html } from 'lit';
|
|
7
|
+
import { i18next } from '@operato/i18n';
|
|
8
|
+
let OxGristEditorCrontab = class OxGristEditorCrontab extends InputEditor {
|
|
9
|
+
get editorTemplate() {
|
|
10
|
+
return html ` <input type="text" .value=${this.value || ''} /> `;
|
|
11
|
+
}
|
|
12
|
+
async firstUpdated() {
|
|
13
|
+
await this.updateComplete;
|
|
14
|
+
this.renderRoot.addEventListener('click', e => {
|
|
15
|
+
e.stopPropagation();
|
|
16
|
+
this.showEditorPopup();
|
|
17
|
+
});
|
|
18
|
+
this.showEditorPopup();
|
|
19
|
+
}
|
|
20
|
+
showEditorPopup() {
|
|
21
|
+
if (this.popup) {
|
|
22
|
+
delete this.popup;
|
|
23
|
+
}
|
|
24
|
+
const confirmCallback = (newval) => {
|
|
25
|
+
this.dispatchEvent(new CustomEvent('field-change', {
|
|
26
|
+
bubbles: true,
|
|
27
|
+
composed: true,
|
|
28
|
+
detail: {
|
|
29
|
+
before: this.value,
|
|
30
|
+
after: newval,
|
|
31
|
+
record: this.record,
|
|
32
|
+
column: this.column,
|
|
33
|
+
row: this.row
|
|
34
|
+
}
|
|
35
|
+
}));
|
|
36
|
+
};
|
|
37
|
+
this.popup = openPopup(html `
|
|
38
|
+
<ox-popup-crontab-input .value=${this.value} .confirmCallback=${confirmCallback}></ox-popup-crontab-input>
|
|
39
|
+
`, {
|
|
40
|
+
backdrop: true,
|
|
41
|
+
title: i18next.t('title.setting schedule'),
|
|
42
|
+
help: 'data-grist/grist-editor/crontab'
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
OxGristEditorCrontab = __decorate([
|
|
47
|
+
customElement('ox-grist-editor-crontab')
|
|
48
|
+
], OxGristEditorCrontab);
|
|
49
|
+
export { OxGristEditorCrontab };
|
|
50
|
+
//# sourceMappingURL=ox-grist-editor-crontab.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ox-grist-editor-crontab.js","sourceRoot":"","sources":["../../../src/grist-editor/ox-grist-editor-crontab.ts"],"names":[],"mappings":";AAAA,OAAO,6BAA6B,CAAA;AAEpC,OAAO,EAAe,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAExD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAGvC,IAAa,oBAAoB,GAAjC,MAAa,oBAAqB,SAAQ,WAAW;IAGnD,IAAI,cAAc;QAChB,OAAO,IAAI,CAAA,8BAA8B,IAAI,CAAC,KAAK,IAAI,EAAE,MAAM,CAAA;IACjE,CAAC;IAED,KAAK,CAAC,YAAY;QAChB,MAAM,IAAI,CAAC,cAAc,CAAA;QAEzB,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE;YAC5C,CAAC,CAAC,eAAe,EAAE,CAAA;YAEnB,IAAI,CAAC,eAAe,EAAE,CAAA;QACxB,CAAC,CAAC,CAAA;QAEF,IAAI,CAAC,eAAe,EAAE,CAAA;IACxB,CAAC;IAED,eAAe;QACb,IAAI,IAAI,CAAC,KAAK,EAAE;YACd,OAAO,IAAI,CAAC,KAAK,CAAA;SAClB;QAED,MAAM,eAAe,GAAG,CAAC,MAAW,EAAE,EAAE;YACtC,IAAI,CAAC,aAAa,CAChB,IAAI,WAAW,CAAC,cAAc,EAAE;gBAC9B,OAAO,EAAE,IAAI;gBACb,QAAQ,EAAE,IAAI;gBACd,MAAM,EAAE;oBACN,MAAM,EAAE,IAAI,CAAC,KAAK;oBAClB,KAAK,EAAE,MAAM;oBACb,MAAM,EAAE,IAAI,CAAC,MAAM;oBACnB,MAAM,EAAE,IAAI,CAAC,MAAM;oBACnB,GAAG,EAAE,IAAI,CAAC,GAAG;iBACd;aACF,CAAC,CACH,CAAA;QACH,CAAC,CAAA;QAED,IAAI,CAAC,KAAK,GAAG,SAAS,CACpB,IAAI,CAAA;yCAC+B,IAAI,CAAC,KAAK,qBAAqB,eAAe;OAChF,EACD;YACE,QAAQ,EAAE,IAAI;YACd,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,wBAAwB,CAAC;YAC1C,IAAI,EAAE,iCAAiC;SACxC,CACF,CAAA;IACH,CAAC;CACF,CAAA;AAnDY,oBAAoB;IADhC,aAAa,CAAC,yBAAyB,CAAC;GAC5B,oBAAoB,CAmDhC;SAnDY,oBAAoB","sourcesContent":["import './ox-popup-crontab-input.js'\n\nimport { PopupHandle, openPopup } from '@operato/layout'\n\nimport { InputEditor } from '@operato/data-grist'\nimport { customElement } from 'lit/decorators.js'\nimport { html } from 'lit'\nimport { i18next } from '@operato/i18n'\n\n@customElement('ox-grist-editor-crontab')\nexport class OxGristEditorCrontab extends InputEditor {\n private popup?: PopupHandle\n\n get editorTemplate() {\n return html` <input type=\"text\" .value=${this.value || ''} /> `\n }\n\n async firstUpdated() {\n await this.updateComplete\n\n this.renderRoot.addEventListener('click', e => {\n e.stopPropagation()\n\n this.showEditorPopup()\n })\n\n this.showEditorPopup()\n }\n\n showEditorPopup() {\n if (this.popup) {\n delete this.popup\n }\n\n const confirmCallback = (newval: any) => {\n this.dispatchEvent(\n new CustomEvent('field-change', {\n bubbles: true,\n composed: true,\n detail: {\n before: this.value,\n after: newval,\n record: this.record,\n column: this.column,\n row: this.row\n }\n })\n )\n }\n\n this.popup = openPopup(\n html`\n <ox-popup-crontab-input .value=${this.value} .confirmCallback=${confirmCallback}></ox-popup-crontab-input>\n `,\n {\n backdrop: true,\n title: i18next.t('title.setting schedule'),\n help: 'data-grist/grist-editor/crontab'\n }\n )\n }\n}\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import './ox-popup-code-input.js';
|
|
2
|
+
import { InputEditor } from '@operato/data-grist';
|
|
3
|
+
export declare class OxGristEditorJson extends InputEditor {
|
|
4
|
+
get editorTemplate(): import("lit-html").TemplateResult<1>;
|
|
5
|
+
firstUpdated(): Promise<void>;
|
|
6
|
+
showEditorPopup(): void;
|
|
7
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import './ox-popup-code-input.js';
|
|
3
|
+
import { InputEditor } from '@operato/data-grist';
|
|
4
|
+
import { customElement } from 'lit/decorators.js';
|
|
5
|
+
import { html } from 'lit';
|
|
6
|
+
import { i18next } from '@operato/i18n';
|
|
7
|
+
import { openPopup } from '@operato/layout';
|
|
8
|
+
let OxGristEditorJson = class OxGristEditorJson extends InputEditor {
|
|
9
|
+
get editorTemplate() {
|
|
10
|
+
return html ` <input type="text" .value=${this.value || ''} /> `;
|
|
11
|
+
}
|
|
12
|
+
async firstUpdated() {
|
|
13
|
+
await this.updateComplete;
|
|
14
|
+
this.renderRoot.addEventListener('click', e => {
|
|
15
|
+
e.stopPropagation();
|
|
16
|
+
this.showEditorPopup();
|
|
17
|
+
});
|
|
18
|
+
this.showEditorPopup();
|
|
19
|
+
}
|
|
20
|
+
showEditorPopup() {
|
|
21
|
+
var change = (value) => {
|
|
22
|
+
this.dispatchEvent(new CustomEvent('change', {
|
|
23
|
+
bubbles: true,
|
|
24
|
+
composed: true,
|
|
25
|
+
detail: {
|
|
26
|
+
before: this.value,
|
|
27
|
+
after: value,
|
|
28
|
+
column: this.column,
|
|
29
|
+
record: this.record,
|
|
30
|
+
row: this.row
|
|
31
|
+
}
|
|
32
|
+
}));
|
|
33
|
+
};
|
|
34
|
+
var popup = openPopup(html `
|
|
35
|
+
<ox-popup-code-input
|
|
36
|
+
.value=${this.value}
|
|
37
|
+
mode="javascript"
|
|
38
|
+
@change=${(e) => {
|
|
39
|
+
change(e.detail.value);
|
|
40
|
+
popup.close();
|
|
41
|
+
}}
|
|
42
|
+
></ox-popup-code-input>
|
|
43
|
+
`, {
|
|
44
|
+
backdrop: true,
|
|
45
|
+
title: i18next.t('title.setting schedule'),
|
|
46
|
+
help: 'data-grist/grist-editor/code'
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
OxGristEditorJson = __decorate([
|
|
51
|
+
customElement('ox-grist-editor-json')
|
|
52
|
+
], OxGristEditorJson);
|
|
53
|
+
export { OxGristEditorJson };
|
|
54
|
+
//# sourceMappingURL=ox-grist-editor-json.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ox-grist-editor-json.js","sourceRoot":"","sources":["../../../src/grist-editor/ox-grist-editor-json.ts"],"names":[],"mappings":";AAAA,OAAO,0BAA0B,CAAA;AAEjC,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,SAAS,EAAE,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F,CAAA;AApDY,iBAAiB;IAD7B,aAAa,CAAC,sBAAsB,CAAC;GACzB,iBAAiB,CAoD7B;SApDY,iBAAiB","sourcesContent":["import './ox-popup-code-input.js'\n\nimport { InputEditor } from '@operato/data-grist'\nimport { customElement } from 'lit/decorators.js'\nimport { html } from 'lit'\nimport { i18next } from '@operato/i18n'\nimport { openPopup } from '@operato/layout'\n\n@customElement('ox-grist-editor-json')\nexport class OxGristEditorJson extends InputEditor {\n get editorTemplate() {\n return html` <input type=\"text\" .value=${this.value || ''} /> `\n }\n\n async firstUpdated() {\n await this.updateComplete\n\n this.renderRoot.addEventListener('click', e => {\n e.stopPropagation()\n\n this.showEditorPopup()\n })\n\n this.showEditorPopup()\n }\n\n showEditorPopup() {\n var change = (value: string) => {\n this.dispatchEvent(\n new CustomEvent('change', {\n bubbles: true,\n composed: true,\n detail: {\n before: this.value,\n after: value,\n column: this.column,\n record: this.record,\n row: this.row\n }\n })\n )\n }\n\n var popup = openPopup(\n html`\n <ox-popup-code-input\n .value=${this.value}\n mode=\"javascript\"\n @change=${(e: CustomEvent) => {\n change(e.detail.value)\n popup.close()\n }}\n ></ox-popup-code-input>\n `,\n {\n backdrop: true,\n title: i18next.t('title.setting schedule'),\n help: 'data-grist/grist-editor/code'\n }\n )\n }\n}\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
import './ox-parameters-builder.js';
|
|
5
|
+
import './ox-popup-parameters-builder.js';
|
|
6
|
+
import { InputEditor } from '@operato/data-grist';
|
|
7
|
+
export declare class OxGristEditorParameters extends InputEditor {
|
|
8
|
+
private popup?;
|
|
9
|
+
get editorTemplate(): import("lit-html").TemplateResult<1>;
|
|
10
|
+
firstUpdated(): Promise<void>;
|
|
11
|
+
openSelector(): Promise<void>;
|
|
12
|
+
}
|
|
@@ -2,14 +2,16 @@
|
|
|
2
2
|
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
3
|
*/
|
|
4
4
|
import { __decorate } from "tslib";
|
|
5
|
-
import './parameters-
|
|
6
|
-
import './parameters-
|
|
7
|
-
import {
|
|
5
|
+
import './ox-parameters-builder.js';
|
|
6
|
+
import './ox-popup-parameters-builder.js';
|
|
7
|
+
import { InputEditor } from '@operato/data-grist';
|
|
8
8
|
import { openPopup } from '@operato/layout';
|
|
9
|
-
import {
|
|
9
|
+
import { html } from 'lit';
|
|
10
|
+
import { cloneDeep } from 'lodash-es';
|
|
11
|
+
import { customElement } from 'lit/decorators.js';
|
|
10
12
|
import { i18next } from '@operato/i18n';
|
|
11
|
-
let
|
|
12
|
-
|
|
13
|
+
let OxGristEditorParameters = class OxGristEditorParameters extends InputEditor {
|
|
14
|
+
get editorTemplate() {
|
|
13
15
|
const value = typeof this.value === 'object' ? JSON.stringify(this.value) : this.value;
|
|
14
16
|
return html ` ${value || ''} `;
|
|
15
17
|
}
|
|
@@ -44,7 +46,7 @@ let ParametersEditor = class ParametersEditor extends LitElement {
|
|
|
44
46
|
}));
|
|
45
47
|
};
|
|
46
48
|
try {
|
|
47
|
-
var value = !objectified && typeof this.value === 'string' ? JSON.parse(this.value) : this.value;
|
|
49
|
+
var value = !objectified && typeof this.value === 'string' ? JSON.parse(this.value) : cloneDeep(this.value || {});
|
|
48
50
|
}
|
|
49
51
|
catch (e) {
|
|
50
52
|
var value = {};
|
|
@@ -58,14 +60,14 @@ let ParametersEditor = class ParametersEditor extends LitElement {
|
|
|
58
60
|
따라서, 가급적 이들 속성의 레퍼런스를 변화시키지 않는 것이 좋다.
|
|
59
61
|
*/
|
|
60
62
|
var template = html `
|
|
61
|
-
<ox-parameters-
|
|
63
|
+
<ox-popup-parameters-builder
|
|
62
64
|
.value=${value}
|
|
63
65
|
.props=${spec}
|
|
64
66
|
.host=${this.record}
|
|
65
67
|
.context=${context}
|
|
66
68
|
.confirmCallback=${confirmCallback}
|
|
67
69
|
>
|
|
68
|
-
</ox-parameters-
|
|
70
|
+
</ox-popup-parameters-builder>
|
|
69
71
|
`;
|
|
70
72
|
this.popup = openPopup(template, {
|
|
71
73
|
backdrop: true,
|
|
@@ -75,31 +77,8 @@ let ParametersEditor = class ParametersEditor extends LitElement {
|
|
|
75
77
|
});
|
|
76
78
|
}
|
|
77
79
|
};
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
text-overflow: ellipsis;
|
|
84
|
-
}
|
|
85
|
-
`;
|
|
86
|
-
__decorate([
|
|
87
|
-
property({ type: Object })
|
|
88
|
-
], ParametersEditor.prototype, "value", void 0);
|
|
89
|
-
__decorate([
|
|
90
|
-
property({ type: Object })
|
|
91
|
-
], ParametersEditor.prototype, "column", void 0);
|
|
92
|
-
__decorate([
|
|
93
|
-
property({ type: Object })
|
|
94
|
-
], ParametersEditor.prototype, "record", void 0);
|
|
95
|
-
__decorate([
|
|
96
|
-
property({ type: Number })
|
|
97
|
-
], ParametersEditor.prototype, "row", void 0);
|
|
98
|
-
__decorate([
|
|
99
|
-
property({ type: Object })
|
|
100
|
-
], ParametersEditor.prototype, "field", void 0);
|
|
101
|
-
ParametersEditor = __decorate([
|
|
102
|
-
customElement('ox-parameters-editor')
|
|
103
|
-
], ParametersEditor);
|
|
104
|
-
export { ParametersEditor };
|
|
105
|
-
//# sourceMappingURL=parameters-editor.js.map
|
|
80
|
+
OxGristEditorParameters = __decorate([
|
|
81
|
+
customElement('ox-grist-editor-parameters')
|
|
82
|
+
], OxGristEditorParameters);
|
|
83
|
+
export { OxGristEditorParameters };
|
|
84
|
+
//# sourceMappingURL=ox-grist-editor-parameters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ox-grist-editor-parameters.js","sourceRoot":"","sources":["../../../src/grist-editor/ox-grist-editor-parameters.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,4BAA4B,CAAA;AACnC,OAAO,kCAAkC,CAAA;AAEzC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IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,WAAW,EAAE,KAAI,EAAE,IAAI,OAAO,CAAC,CAAC,CAAC,cAAc,CAAC,EAAE;YAClE,IAAI;SACL,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAlFY,uBAAuB;IADnC,aAAa,CAAC,4BAA4B,CAAC;GAC/B,uBAAuB,CAkFnC;SAlFY,uBAAuB","sourcesContent":["/**\n * @license Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport './ox-parameters-builder.js'\nimport './ox-popup-parameters-builder.js'\n\nimport { ColumnConfig, GristRecord, InputEditor } from '@operato/data-grist'\nimport { PopupHandle, openPopup } from '@operato/layout'\nimport { css, html } from 'lit'\n\nimport { cloneDeep } from 'lodash-es'\nimport { customElement } from 'lit/decorators.js'\nimport { i18next } from '@operato/i18n'\n\n@customElement('ox-grist-editor-parameters')\nexport class OxGristEditorParameters extends InputEditor {\n private popup?: PopupHandle\n\n get editorTemplate() {\n const value = typeof this.value === 'object' ? JSON.stringify(this.value) : this.value\n return html` ${value || ''} `\n }\n\n async firstUpdated() {\n await this.updateComplete\n\n this.renderRoot.addEventListener('click', e => {\n e.stopPropagation()\n\n this.openSelector()\n })\n\n this.openSelector()\n }\n\n async openSelector() {\n if (this.popup) {\n delete this.popup\n }\n\n var { options } = this.column.record\n\n if (typeof options === 'function') {\n options = await options.call(this, this.value, this.column, this.record, this.row, this.field)\n }\n\n const { name, help, spec, context, objectified = false } = options\n\n const confirmCallback = (newval: any) => {\n this.dispatchEvent(\n new CustomEvent('field-change', {\n bubbles: true,\n composed: true,\n detail: {\n before: this.value,\n after: !objectified ? JSON.stringify(newval) : newval,\n record: this.record,\n column: this.column,\n row: this.row\n }\n })\n )\n }\n\n try {\n var value: any =\n !objectified && typeof this.value === 'string' ? JSON.parse(this.value) : cloneDeep(this.value || {})\n } catch (e) {\n var value: any = {}\n }\n\n /* \n 주의 : 이 팝업 템플릿은 layout 모듈에 의해서 render 되므로, \n layout의 구성에 변화가 발생하면, 다시 render된다.\n 이 팝업이 떠 있는 상태에서, 또 다른 팝업이 뜨는 경우도 layout 구성의 변화를 야기한다. (overlay의 갯수의 증가)\n 이 경우 value, options, confirmCallback 등 클로져를 사용한 것들이 초기 바인딩된 값으로 다시 바인딩되게 되는데,\n 만약, 템플릿 내부에서 이들 속성의 레퍼런스가 변화했다면, 원래 상태로 되돌아가는 현상이 발생하게 된다.\n 따라서, 가급적 이들 속성의 레퍼런스를 변화시키지 않는 것이 좋다.\n */\n var template = html`\n <ox-popup-parameters-builder\n .value=${value}\n .props=${spec}\n .host=${this.record}\n .context=${context}\n .confirmCallback=${confirmCallback}\n >\n </ox-popup-parameters-builder>\n `\n\n this.popup = openPopup(template, {\n backdrop: true,\n size: 'large',\n title: `${name?.toUpperCase() || ''} ${i18next.t('field.params')}`,\n help\n })\n }\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '@material/mwc-icon';
|
|
2
2
|
import { InputEditor } from '@operato/data-grist';
|
|
3
|
-
export declare class
|
|
3
|
+
export declare class OxGristEditorResourceCode extends InputEditor {
|
|
4
4
|
firstUpdated(): Promise<void>;
|
|
5
5
|
get editorTemplate(): import("lit-html").TemplateResult<1>;
|
|
6
6
|
}
|
|
@@ -16,7 +16,7 @@ const FETCH_COMMON_CODE_GQL = (codeName) => gql `
|
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
`;
|
|
19
|
-
let
|
|
19
|
+
let OxGristEditorResourceCode = class OxGristEditorResourceCode extends InputEditor {
|
|
20
20
|
async firstUpdated() {
|
|
21
21
|
super.firstUpdated();
|
|
22
22
|
var { codeName, codes } = this.column.record || {};
|
|
@@ -48,8 +48,8 @@ let CodeEditor = class CodeEditor extends InputEditor {
|
|
|
48
48
|
`;
|
|
49
49
|
}
|
|
50
50
|
};
|
|
51
|
-
|
|
52
|
-
customElement('
|
|
53
|
-
],
|
|
54
|
-
export {
|
|
55
|
-
//# sourceMappingURL=
|
|
51
|
+
OxGristEditorResourceCode = __decorate([
|
|
52
|
+
customElement('ox-grist-editor-resource-code')
|
|
53
|
+
], OxGristEditorResourceCode);
|
|
54
|
+
export { OxGristEditorResourceCode };
|
|
55
|
+
//# sourceMappingURL=ox-grist-editor-resource-code.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ox-grist-editor-resource-code.js","sourceRoot":"","sources":["../../../src/grist-editor/ox-grist-editor-resource-code.ts"],"names":[],"mappings":";AAAA,OAAO,oBAAoB,CAAA;AAE3B,OAAO,EAAE,WAAW,EAAgB,MAAM,qBAAqB,CAAA;AAC/D,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAErD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAc1B,MAAM,qBAAqB,GAAG,CAAC,QAAgB,EAAE,EAAE,CAAC,GAAG,CAAA;;sBAEjC,QAAQ;;;;;;;;CAQ7B,CAAA;AAGD,IAAa,yBAAyB,GAAtC,MAAa,yBAA0B,SAAQ,WAAW;IACxD,KAAK,CAAC,YAAY;QAChB,KAAK,CAAC,YAAY,EAAE,CAAA;QAEpB,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,EAAE,CAAA;QAElD,IAAI,CAAC,KAAK,IAAI,QAAQ,EAAE;YACtB,2DAA2D;YAC3D,IAAI,QAAQ,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC;gBAChC,KAAK,EAAE,qBAAqB,CAAC,QAAQ,CAAC;gBACtC,OAAO,EAAE,UAAU,EAAE;aACtB,CAAC,CAAA;YAEF,IAAI,UAAU,GAAG,QAAQ,IAAI,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAA;YAEtE,IAAI,UAAU,EAAE;gBACd,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC,MAAM,CAC/D,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAmB,EAAE,CAAmB;oBACxE,OAAO,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,CAAA;gBACxB,CAAC,CAAC,CACH,CAAA;gBAED,IAAI,CAAC,aAAa,EAAE,CAAA;aACrB;SACF;IACH,CAAC;IAED,IAAI,cAAc;QAChB,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,EAAE,CAAA;QAExC,OAAO,IAAI,CAAA;;UAEL,CAAC,KAAK,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CACnB,CAAC,IAAgB,EAAE,EAAE,CAAC,IAAI,CAAA;gCACJ,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,UAAU,IAAI,CAAC,IAAI;gBAC1D,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE;;WAEjE,CACF;;KAEJ,CAAA;IACH,CAAC;CACF,CAAA;AA1CY,yBAAyB;IADrC,aAAa,CAAC,+BAA+B,CAAC;GAClC,yBAAyB,CA0CrC;SA1CY,yBAAyB","sourcesContent":["import '@material/mwc-icon'\n\nimport { InputEditor, RecordConfig } from '@operato/data-grist'\nimport { client, gqlContext } from '@operato/graphql'\n\nimport { customElement } from 'lit/decorators.js'\nimport gql from 'graphql-tag'\nimport { html } from 'lit'\n\ntype CommonCodeDetail = {\n name: string\n description: string\n rank: number\n}\n\ntype CommonCode = {\n name: string\n description: string\n details: CommonCodeDetail[]\n}\n\nconst FETCH_COMMON_CODE_GQL = (codeName: string) => gql`\n{\n commonCode(name: \"${codeName}\") {\n details {\n name\n description\n rank\n }\n }\n}\n`\n\n@customElement('ox-grist-editor-resource-code')\nexport class OxGristEditorResourceCode extends InputEditor {\n async firstUpdated() {\n super.firstUpdated()\n\n var { codeName, codes } = this.column.record || {}\n\n if (!codes && codeName) {\n /* codeName으로 fetch 해와서, this.column.record.codes에 보관한다. */\n var response = await client.query({\n query: FETCH_COMMON_CODE_GQL(codeName),\n context: gqlContext()\n })\n\n var commonCode = response && response.data && response.data.commonCode\n\n if (commonCode) {\n this.column.record.codes = [{ name: '', description: '' }].concat(\n commonCode.details.sort(function (a: CommonCodeDetail, b: CommonCodeDetail) {\n return a.rank - b.rank\n })\n )\n\n this.requestUpdate()\n }\n }\n }\n\n get editorTemplate() {\n var { codes } = this.column.record || {}\n\n return html`\n <select>\n ${(codes || ['']).map(\n (code: CommonCode) => html`\n <option ?selected=${code.name == this.value} value=${code.name}>\n ${code.name}${code.description ? ` - ${code.description}` : ''}\n </option>\n `\n )}\n </select>\n `\n }\n}\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import '@material/mwc-icon';
|
|
2
|
+
import './ox-selector-resource-id.js';
|
|
3
|
+
import { InputEditor } from '@operato/data-grist';
|
|
4
|
+
import { TemplateResult } from 'lit';
|
|
5
|
+
export declare class OxGristEditorResourceId extends InputEditor {
|
|
6
|
+
private popup?;
|
|
7
|
+
render(): TemplateResult<1>;
|
|
8
|
+
firstUpdated(): Promise<void>;
|
|
9
|
+
openSelector(): void;
|
|
10
|
+
}
|