@operato/grist-editor 1.0.0-alpha.23 → 1.0.0-beta.40
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/.storybook/main.js +2 -2
- package/.storybook/server.mjs +4 -4
- package/CHANGELOG.md +4 -116
- package/LICENSE +2 -2
- package/README.md +29 -9
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +15 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/ox-grist-editor-crontab.d.ts +8 -0
- package/dist/src/ox-grist-editor-crontab.js +50 -0
- package/dist/src/ox-grist-editor-crontab.js.map +1 -0
- package/dist/src/ox-grist-editor-duration.d.ts +8 -0
- package/dist/src/ox-grist-editor-duration.js +50 -0
- package/dist/src/ox-grist-editor-duration.js.map +1 -0
- package/dist/src/ox-grist-editor-parameters.d.ts +12 -0
- package/dist/src/{parameters/parameters-editor.js → ox-grist-editor-parameters.js} +17 -39
- package/dist/src/ox-grist-editor-parameters.js.map +1 -0
- package/dist/src/ox-grist-editor-partition-keys.d.ts +11 -0
- package/dist/src/ox-grist-editor-partition-keys.js +74 -0
- package/dist/src/ox-grist-editor-partition-keys.js.map +1 -0
- package/dist/src/ox-grist-editor-value-map.d.ts +11 -0
- package/dist/src/ox-grist-editor-value-map.js +74 -0
- package/dist/src/ox-grist-editor-value-map.js.map +1 -0
- package/dist/src/ox-grist-renderer-crontab.d.ts +2 -0
- package/dist/src/ox-grist-renderer-crontab.js +26 -0
- package/dist/src/ox-grist-renderer-crontab.js.map +1 -0
- package/dist/src/{parameters/parameters-editor-builder.d.ts → ox-parameters-builder.d.ts} +0 -0
- package/dist/src/{parameters/parameters-editor-builder.js → ox-parameters-builder.js} +12 -14
- package/dist/src/ox-parameters-builder.js.map +1 -0
- package/dist/src/ox-popup-crontab-input.d.ts +11 -0
- package/dist/src/ox-popup-crontab-input.js +75 -0
- package/dist/src/ox-popup-crontab-input.js.map +1 -0
- package/dist/src/ox-popup-duration-input.d.ts +11 -0
- package/dist/src/ox-popup-duration-input.js +75 -0
- package/dist/src/ox-popup-duration-input.js.map +1 -0
- package/dist/src/{parameters/parameters-editor-popup.d.ts → ox-popup-parameters-builder.d.ts} +1 -1
- package/dist/src/{parameters/parameters-editor-popup.js → ox-popup-parameters-builder.js} +20 -19
- package/dist/src/ox-popup-parameters-builder.js.map +1 -0
- package/dist/src/ox-popup-partition-keys-input.d.ts +12 -0
- package/dist/src/ox-popup-partition-keys-input.js +100 -0
- package/dist/src/ox-popup-partition-keys-input.js.map +1 -0
- package/dist/src/ox-popup-value-map-input.d.ts +12 -0
- package/dist/src/ox-popup-value-map-input.js +105 -0
- package/dist/src/ox-popup-value-map-input.js.map +1 -0
- package/dist/stories/ox-grist-editor-crontab.stories.d.ts +24 -0
- package/dist/stories/ox-grist-editor-crontab.stories.js +406 -0
- package/dist/stories/ox-grist-editor-crontab.stories.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +36 -24
- package/src/index.ts +18 -0
- package/src/ox-grist-editor-crontab.ts +62 -0
- package/src/ox-grist-editor-duration.ts +62 -0
- package/src/{parameters/parameters-editor.ts → ox-grist-editor-parameters.ts} +14 -27
- package/src/ox-grist-editor-partition-keys.ts +86 -0
- package/src/ox-grist-editor-value-map.ts +86 -0
- package/src/ox-grist-renderer-crontab.ts +31 -0
- package/src/{parameters/parameters-editor-builder.ts → ox-parameters-builder.ts} +6 -8
- package/src/ox-popup-crontab-input.ts +75 -0
- package/src/ox-popup-duration-input.ts +75 -0
- package/src/{parameters/parameters-editor-popup.ts → ox-popup-parameters-builder.ts} +10 -9
- package/src/ox-popup-partition-keys-input.ts +97 -0
- package/src/ox-popup-value-map-input.ts +102 -0
- package/stories/ox-grist-editor-crontab.stories.ts +429 -0
- package/themes/app-theme.css +142 -0
- package/themes/form-theme.css +75 -0
- package/themes/grist-theme.css +194 -0
- package/themes/oops-theme.css +26 -0
- package/themes/report-theme.css +47 -0
- package/translations/en.json +3 -0
- package/translations/ko.json +3 -0
- package/translations/ms.json +3 -0
- package/translations/zh.json +3 -0
- package/web-dev-server.config.mjs +9 -8
- package/web-test-runner.config.mjs +7 -19
- package/.editorconfig +0 -29
- package/demo/data-grist-test.html +0 -456
- package/demo/index.html +0 -33
- package/dist/src/code/code-editor.d.ts +0 -6
- package/dist/src/code/code-editor.js +0 -50
- package/dist/src/code/code-editor.js.map +0 -1
- package/dist/src/code/index.d.ts +0 -1
- package/dist/src/code/index.js +0 -5
- package/dist/src/code/index.js.map +0 -1
- package/dist/src/id/id-input.d.ts +0 -19
- package/dist/src/id/id-input.js +0 -119
- package/dist/src/id/id-input.js.map +0 -1
- package/dist/src/id/id-renderer.d.ts +0 -2
- package/dist/src/id/id-renderer.js +0 -9
- package/dist/src/id/id-renderer.js.map +0 -1
- package/dist/src/id/id-selector.d.ts +0 -23
- package/dist/src/id/id-selector.js +0 -197
- package/dist/src/id/id-selector.js.map +0 -1
- package/dist/src/id/index.d.ts +0 -1
- package/dist/src/id/index.js +0 -7
- package/dist/src/id/index.js.map +0 -1
- package/dist/src/object/index.d.ts +0 -1
- package/dist/src/object/index.js +0 -6
- package/dist/src/object/index.js.map +0 -1
- package/dist/src/object/object-editor.d.ts +0 -18
- package/dist/src/object/object-editor.js +0 -152
- package/dist/src/object/object-editor.js.map +0 -1
- package/dist/src/object/object-selector.d.ts +0 -38
- package/dist/src/object/object-selector.js +0 -338
- package/dist/src/object/object-selector.js.map +0 -1
- package/dist/src/parameters/index.d.ts +0 -1
- package/dist/src/parameters/index.js +0 -6
- package/dist/src/parameters/index.js.map +0 -1
- package/dist/src/parameters/parameters-editor-builder.js.map +0 -1
- package/dist/src/parameters/parameters-editor-popup.js.map +0 -1
- package/dist/src/parameters/parameters-editor.d.ts +0 -18
- package/dist/src/parameters/parameters-editor.js.map +0 -1
- package/src/code/code-editor.ts +0 -78
- package/src/code/index.ts +0 -6
- package/src/id/id-input.ts +0 -135
- package/src/id/id-renderer.ts +0 -12
- package/src/id/id-selector.ts +0 -189
- package/src/id/index.ts +0 -8
- package/src/object/index.ts +0 -8
- package/src/object/object-editor.ts +0 -162
- package/src/object/object-selector.ts +0 -346
- package/src/parameters/index.ts +0 -8
package/.storybook/main.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
stories: ['../dist/stories/**/*.stories.{js,md,mdx}']
|
|
3
|
-
}
|
|
2
|
+
stories: ['../dist/stories/**/*.stories.{js,md,mdx}']
|
|
3
|
+
}
|
package/.storybook/server.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { storybookPlugin } from '@web/dev-server-storybook'
|
|
2
|
-
import baseConfig from '../web-dev-server.config.mjs'
|
|
1
|
+
import { storybookPlugin } from '@web/dev-server-storybook'
|
|
2
|
+
import baseConfig from '../web-dev-server.config.mjs'
|
|
3
3
|
|
|
4
4
|
export default /** @type {import('@web/dev-server').DevServerConfig} */ ({
|
|
5
5
|
...baseConfig,
|
|
6
6
|
open: '/',
|
|
7
|
-
plugins: [storybookPlugin({ type: 'web-components' }), ...baseConfig.plugins]
|
|
8
|
-
})
|
|
7
|
+
plugins: [storybookPlugin({ type: 'web-components' }), ...baseConfig.plugins]
|
|
8
|
+
})
|
package/CHANGELOG.md
CHANGED
|
@@ -3,122 +3,10 @@
|
|
|
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-
|
|
6
|
+
## [1.0.0-beta.40](https://github.com/hatiolab/operato/compare/v1.0.0-beta.39...v1.0.0-beta.40) (2022-06-29)
|
|
7
7
|
|
|
8
|
-
**Note:** Version bump only for package @operato/grist-editor
|
|
9
8
|
|
|
9
|
+
### :bug: Bug Fix
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
## [1.0.0-alpha.22](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.21...v1.0.0-alpha.22) (2022-03-17)
|
|
15
|
-
|
|
16
|
-
**Note:** Version bump only for package @operato/grist-editor
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
## [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
|
-
|
|
24
|
-
**Note:** Version bump only for package @operato/grist-editor
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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)
|
|
31
|
-
|
|
32
|
-
**Note:** Version bump only for package @operato/grist-editor
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
## [1.0.0-alpha.19](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.18...v1.0.0-alpha.19) (2022-03-14)
|
|
39
|
-
|
|
40
|
-
**Note:** Version bump only for package @operato/grist-editor
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
## [1.0.0-alpha.18](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.17...v1.0.0-alpha.18) (2022-03-14)
|
|
47
|
-
|
|
48
|
-
**Note:** Version bump only for package @operato/grist-editor
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
## [1.0.0-alpha.17](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.16...v1.0.0-alpha.17) (2022-03-13)
|
|
55
|
-
|
|
56
|
-
**Note:** Version bump only for package @operato/grist-editor
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
## [1.0.0-alpha.16](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.15...v1.0.0-alpha.16) (2022-03-13)
|
|
63
|
-
|
|
64
|
-
**Note:** Version bump only for package @operato/grist-editor
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
## [1.0.0-alpha.15](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.14...v1.0.0-alpha.15) (2022-03-13)
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
### :rocket: New Features
|
|
74
|
-
|
|
75
|
-
* migrate input, property-editor from things-factory ([dbd5e73](https://github.com/hatiolab/operato/commit/dbd5e73eac328e72c4bb7abd113a819532bc894d))
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
## [1.0.0-alpha.14](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.13...v1.0.0-alpha.14) (2022-03-13)
|
|
80
|
-
|
|
81
|
-
**Note:** Version bump only for package @operato/grist-editor
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
## [1.0.0-alpha.13](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.12...v1.0.0-alpha.13) (2022-03-13)
|
|
88
|
-
|
|
89
|
-
**Note:** Version bump only for package @operato/grist-editor
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
## [1.0.0-alpha.12](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.11...v1.0.0-alpha.12) (2022-03-13)
|
|
96
|
-
|
|
97
|
-
**Note:** Version bump only for package @operato/grist-editor
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
## [1.0.0-alpha.11](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.10...v1.0.0-alpha.11) (2022-03-12)
|
|
104
|
-
|
|
105
|
-
**Note:** Version bump only for package @operato/grist-editor
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
## [1.0.0-alpha.10](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.9...v1.0.0-alpha.10) (2022-03-12)
|
|
112
|
-
|
|
113
|
-
**Note:** Version bump only for package @operato/grist-editor
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
## [1.0.0-alpha.9](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.8...v1.0.0-alpha.9) (2022-03-12)
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
### :rocket: New Features
|
|
123
|
-
|
|
124
|
-
* settled concept for input, property-editor, grist-editor, so on ([0c9e1d0](https://github.com/hatiolab/operato/commit/0c9e1d054c7aef5d965868242cf471667af7a3c3))
|
|
11
|
+
* [#43](https://github.com/hatiolab/operato/issues/43)-datasample ([14ab019](https://github.com/hatiolab/operato/commit/14ab0199311f340c784018b9fc78b70e57b09567))
|
|
12
|
+
* dependencies for grist-editor ([cf5aa34](https://github.com/hatiolab/operato/commit/cf5aa34de5c7c58d68e48e02e04d1e004ea0b239))
|
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c)
|
|
3
|
+
Copyright (c) Hatiolab Inc.
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
18
18
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
20
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,46 +1,66 @@
|
|
|
1
|
-
# \<
|
|
1
|
+
# \<grist-editor>
|
|
2
2
|
|
|
3
3
|
This webcomponent follows the [open-wc](https://github.com/open-wc/open-wc) recommendation.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm i
|
|
8
|
+
npm i grist-editor
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## Usage
|
|
12
12
|
|
|
13
13
|
```html
|
|
14
14
|
<script type="module">
|
|
15
|
-
import '
|
|
15
|
+
import 'grist-editor/grist-editor.js'
|
|
16
16
|
</script>
|
|
17
17
|
|
|
18
|
-
<
|
|
18
|
+
<grist-editor></grist-editor>
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
## Linting and
|
|
21
|
+
## Linting with ESLint, Prettier, and Types
|
|
22
22
|
|
|
23
|
-
To scan the project for linting
|
|
23
|
+
To scan the project for linting errors, run
|
|
24
24
|
|
|
25
25
|
```bash
|
|
26
26
|
npm run lint
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
You can lint with ESLint and Prettier individually as well
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm run lint:eslint
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npm run lint:prettier
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
To automatically fix many linting errors, run
|
|
30
40
|
|
|
31
41
|
```bash
|
|
32
42
|
npm run format
|
|
33
43
|
```
|
|
34
44
|
|
|
45
|
+
You can format using ESLint and Prettier individually as well
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
npm run format:eslint
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
npm run format:prettier
|
|
53
|
+
```
|
|
54
|
+
|
|
35
55
|
## Testing with Web Test Runner
|
|
36
56
|
|
|
37
|
-
To
|
|
57
|
+
To run the suite of Web Test Runner tests, run
|
|
38
58
|
|
|
39
59
|
```bash
|
|
40
60
|
npm run test
|
|
41
61
|
```
|
|
42
62
|
|
|
43
|
-
To run the tests in
|
|
63
|
+
To run the tests in watch mode (for <abbr title="test driven development">TDD</abbr>, for example), run
|
|
44
64
|
|
|
45
65
|
```bash
|
|
46
66
|
npm run test:watch
|
package/dist/src/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/src/index.js
CHANGED
|
@@ -1,2 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
import { OxGristRendererJson5, registerEditor, registerRenderer } from '@operato/data-grist';
|
|
2
|
+
import { OxGristEditorCrontab } from './ox-grist-editor-crontab.js';
|
|
3
|
+
import { OxGristEditorDuration } from './ox-grist-editor-duration.js';
|
|
4
|
+
import { OxGristEditorParameters } from './ox-grist-editor-parameters.js';
|
|
5
|
+
import { OxGristEditorPartitionKeys } from './ox-grist-editor-partition-keys.js';
|
|
6
|
+
import { OxGristEditorValueMap } from './ox-grist-editor-value-map.js';
|
|
7
|
+
/* register grist renderer/editor for id */
|
|
8
|
+
registerEditor('parameters', OxGristEditorParameters);
|
|
9
|
+
registerEditor('value-map', OxGristEditorValueMap);
|
|
10
|
+
registerEditor('partition-keys', OxGristEditorPartitionKeys);
|
|
11
|
+
registerEditor('crontab', OxGristEditorCrontab);
|
|
12
|
+
registerEditor('duration', OxGristEditorDuration);
|
|
13
|
+
registerRenderer('parameters', OxGristRendererJson5);
|
|
14
|
+
registerRenderer('value-map', OxGristRendererJson5);
|
|
15
|
+
registerRenderer('partition-keys', OxGristRendererJson5);
|
|
2
16
|
//# sourceMappingURL=index.js.map
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"","sourcesContent":[""]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAE5F,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAA;AACnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAA;AACrE,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAA;AACzE,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAA;AAChF,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAA;AAEtE,2CAA2C;AAC3C,cAAc,CAAC,YAAY,EAAE,uBAAuB,CAAC,CAAA;AACrD,cAAc,CAAC,WAAW,EAAE,qBAAqB,CAAC,CAAA;AAClD,cAAc,CAAC,gBAAgB,EAAE,0BAA0B,CAAC,CAAA;AAC5D,cAAc,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAA;AAC/C,cAAc,CAAC,UAAU,EAAE,qBAAqB,CAAC,CAAA;AAEjD,gBAAgB,CAAC,YAAY,EAAE,oBAAoB,CAAC,CAAA;AACpD,gBAAgB,CAAC,WAAW,EAAE,oBAAoB,CAAC,CAAA;AACnD,gBAAgB,CAAC,gBAAgB,EAAE,oBAAoB,CAAC,CAAA","sourcesContent":["import { OxGristRendererJson5, registerEditor, registerRenderer } from '@operato/data-grist'\n\nimport { OxGristEditorCrontab } from './ox-grist-editor-crontab.js'\nimport { OxGristEditorDuration } from './ox-grist-editor-duration.js'\nimport { OxGristEditorParameters } from './ox-grist-editor-parameters.js'\nimport { OxGristEditorPartitionKeys } from './ox-grist-editor-partition-keys.js'\nimport { OxGristEditorValueMap } from './ox-grist-editor-value-map.js'\n\n/* register grist renderer/editor for id */\nregisterEditor('parameters', OxGristEditorParameters)\nregisterEditor('value-map', OxGristEditorValueMap)\nregisterEditor('partition-keys', OxGristEditorPartitionKeys)\nregisterEditor('crontab', OxGristEditorCrontab)\nregisterEditor('duration', OxGristEditorDuration)\n\nregisterRenderer('parameters', OxGristRendererJson5)\nregisterRenderer('value-map', OxGristRendererJson5)\nregisterRenderer('partition-keys', OxGristRendererJson5)\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import './ox-popup-crontab-input.js';
|
|
2
|
+
import { OxGristEditor } from '@operato/data-grist';
|
|
3
|
+
export declare class OxGristEditorCrontab extends OxGristEditor {
|
|
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 { html } from 'lit';
|
|
4
|
+
import { customElement } from 'lit/decorators.js';
|
|
5
|
+
import { OxGristEditor } from '@operato/data-grist';
|
|
6
|
+
import { i18next } from '@operato/i18n';
|
|
7
|
+
import { openPopup } from '@operato/popup';
|
|
8
|
+
let OxGristEditorCrontab = class OxGristEditorCrontab extends OxGristEditor {
|
|
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/ox-grist-editor-crontab.ts"],"names":[],"mappings":";AAAA,OAAO,6BAA6B,CAAA;AAEpC,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,SAAS,EAAe,MAAM,gBAAgB,CAAA;AAGvD,IAAa,oBAAoB,GAAjC,MAAa,oBAAqB,SAAQ,aAAa;IAGrD,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 { html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\nimport { OxGristEditor } from '@operato/data-grist'\nimport { i18next } from '@operato/i18n'\nimport { openPopup, PopupHandle } from '@operato/popup'\n\n@customElement('ox-grist-editor-crontab')\nexport class OxGristEditorCrontab extends OxGristEditor {\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,8 @@
|
|
|
1
|
+
import './ox-popup-duration-input.js';
|
|
2
|
+
import { OxGristEditor } from '@operato/data-grist';
|
|
3
|
+
export declare class OxGristEditorDuration extends OxGristEditor {
|
|
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-duration-input.js';
|
|
3
|
+
import { html } from 'lit';
|
|
4
|
+
import { customElement } from 'lit/decorators.js';
|
|
5
|
+
import { OxGristEditor } from '@operato/data-grist';
|
|
6
|
+
import { i18next } from '@operato/i18n';
|
|
7
|
+
import { openPopup } from '@operato/popup';
|
|
8
|
+
let OxGristEditorDuration = class OxGristEditorDuration extends OxGristEditor {
|
|
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-duration-input .value=${this.value} .confirmCallback=${confirmCallback}></ox-popup-duration-input>
|
|
39
|
+
`, {
|
|
40
|
+
backdrop: true,
|
|
41
|
+
title: i18next.t('title.setting schedule'),
|
|
42
|
+
help: 'data-grist/grist-editor/duration'
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
OxGristEditorDuration = __decorate([
|
|
47
|
+
customElement('ox-grist-editor-duration')
|
|
48
|
+
], OxGristEditorDuration);
|
|
49
|
+
export { OxGristEditorDuration };
|
|
50
|
+
//# sourceMappingURL=ox-grist-editor-duration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ox-grist-editor-duration.js","sourceRoot":"","sources":["../../src/ox-grist-editor-duration.ts"],"names":[],"mappings":";AAAA,OAAO,8BAA8B,CAAA;AAErC,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,SAAS,EAAe,MAAM,gBAAgB,CAAA;AAGvD,IAAa,qBAAqB,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BAAqB","sourcesContent":["import './ox-popup-duration-input.js'\n\nimport { html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\nimport { OxGristEditor } from '@operato/data-grist'\nimport { i18next } from '@operato/i18n'\nimport { openPopup, PopupHandle } from '@operato/popup'\n\n@customElement('ox-grist-editor-duration')\nexport class OxGristEditorDuration extends OxGristEditor {\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-duration-input .value=${this.value} .confirmCallback=${confirmCallback}></ox-popup-duration-input>\n `,\n {\n backdrop: true,\n title: i18next.t('title.setting schedule'),\n help: 'data-grist/grist-editor/duration'\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 { OxGristEditor } from '@operato/data-grist';
|
|
7
|
+
export declare class OxGristEditorParameters extends OxGristEditor {
|
|
8
|
+
private popup?;
|
|
9
|
+
get editorTemplate(): import("lit-html").TemplateResult<1>;
|
|
10
|
+
firstUpdated(): Promise<void>;
|
|
11
|
+
openSelector(): Promise<void>;
|
|
12
|
+
}
|
|
@@ -2,15 +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 {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
5
|
+
import './ox-parameters-builder.js';
|
|
6
|
+
import './ox-popup-parameters-builder.js';
|
|
7
|
+
import { html } from 'lit';
|
|
8
|
+
import { customElement } from 'lit/decorators.js';
|
|
9
|
+
import { cloneDeep } from 'lodash-es';
|
|
10
|
+
import { OxGristEditor } from '@operato/data-grist';
|
|
11
11
|
import { i18next } from '@operato/i18n';
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
import { openPopup } from '@operato/popup';
|
|
13
|
+
let OxGristEditorParameters = class OxGristEditorParameters extends OxGristEditor {
|
|
14
|
+
get editorTemplate() {
|
|
14
15
|
const value = typeof this.value === 'object' ? JSON.stringify(this.value) : this.value;
|
|
15
16
|
return html ` ${value || ''} `;
|
|
16
17
|
}
|
|
@@ -45,7 +46,7 @@ let ParametersEditor = class ParametersEditor extends InputEditor {
|
|
|
45
46
|
}));
|
|
46
47
|
};
|
|
47
48
|
try {
|
|
48
|
-
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 || {});
|
|
49
50
|
}
|
|
50
51
|
catch (e) {
|
|
51
52
|
var value = {};
|
|
@@ -59,14 +60,14 @@ let ParametersEditor = class ParametersEditor extends InputEditor {
|
|
|
59
60
|
따라서, 가급적 이들 속성의 레퍼런스를 변화시키지 않는 것이 좋다.
|
|
60
61
|
*/
|
|
61
62
|
var template = html `
|
|
62
|
-
<ox-parameters-
|
|
63
|
+
<ox-popup-parameters-builder
|
|
63
64
|
.value=${value}
|
|
64
65
|
.props=${spec}
|
|
65
66
|
.host=${this.record}
|
|
66
67
|
.context=${context}
|
|
67
68
|
.confirmCallback=${confirmCallback}
|
|
68
69
|
>
|
|
69
|
-
</ox-parameters-
|
|
70
|
+
</ox-popup-parameters-builder>
|
|
70
71
|
`;
|
|
71
72
|
this.popup = openPopup(template, {
|
|
72
73
|
backdrop: true,
|
|
@@ -76,31 +77,8 @@ let ParametersEditor = class ParametersEditor extends InputEditor {
|
|
|
76
77
|
});
|
|
77
78
|
}
|
|
78
79
|
};
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
text-overflow: ellipsis;
|
|
85
|
-
}
|
|
86
|
-
`;
|
|
87
|
-
__decorate([
|
|
88
|
-
property({ type: Object })
|
|
89
|
-
], ParametersEditor.prototype, "value", void 0);
|
|
90
|
-
__decorate([
|
|
91
|
-
property({ type: Object })
|
|
92
|
-
], ParametersEditor.prototype, "column", void 0);
|
|
93
|
-
__decorate([
|
|
94
|
-
property({ type: Object })
|
|
95
|
-
], ParametersEditor.prototype, "record", void 0);
|
|
96
|
-
__decorate([
|
|
97
|
-
property({ type: Number })
|
|
98
|
-
], ParametersEditor.prototype, "row", void 0);
|
|
99
|
-
__decorate([
|
|
100
|
-
property({ type: Object })
|
|
101
|
-
], ParametersEditor.prototype, "field", void 0);
|
|
102
|
-
ParametersEditor = __decorate([
|
|
103
|
-
customElement('ox-parameters-editor')
|
|
104
|
-
], ParametersEditor);
|
|
105
|
-
export { ParametersEditor };
|
|
106
|
-
//# 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/ox-grist-editor-parameters.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,4BAA4B,CAAA;AACnC,OAAO,kCAAkC,CAAA;AAEzC,OAAO,EAAE,IAAI,EA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J,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 { html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\nimport { cloneDeep } from 'lodash-es'\n\nimport { OxGristEditor } from '@operato/data-grist'\nimport { i18next } from '@operato/i18n'\nimport { openPopup, PopupHandle } from '@operato/popup'\n\n@customElement('ox-grist-editor-parameters')\nexport class OxGristEditorParameters extends OxGristEditor {\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"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
import './ox-popup-partition-keys-input.js';
|
|
5
|
+
import { OxGristEditor } from '@operato/data-grist';
|
|
6
|
+
export declare class OxGristEditorPartitionKeys extends OxGristEditor {
|
|
7
|
+
private popup?;
|
|
8
|
+
get editorTemplate(): import("lit-html").TemplateResult<1>;
|
|
9
|
+
firstUpdated(): Promise<void>;
|
|
10
|
+
openSelector(): Promise<void>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
import { __decorate } from "tslib";
|
|
5
|
+
import './ox-popup-partition-keys-input.js';
|
|
6
|
+
import { html } from 'lit';
|
|
7
|
+
import { customElement } from 'lit/decorators.js';
|
|
8
|
+
import { cloneDeep } from 'lodash-es';
|
|
9
|
+
import { OxGristEditor } from '@operato/data-grist';
|
|
10
|
+
import { i18next } from '@operato/i18n';
|
|
11
|
+
import { openPopup } from '@operato/popup';
|
|
12
|
+
let OxGristEditorPartitionKeys = class OxGristEditorPartitionKeys extends OxGristEditor {
|
|
13
|
+
get editorTemplate() {
|
|
14
|
+
const value = typeof this.value === 'object' ? JSON.stringify(this.value) : this.value;
|
|
15
|
+
return html ` ${value || ''} `;
|
|
16
|
+
}
|
|
17
|
+
async firstUpdated() {
|
|
18
|
+
await this.updateComplete;
|
|
19
|
+
this.renderRoot.addEventListener('click', e => {
|
|
20
|
+
e.stopPropagation();
|
|
21
|
+
this.openSelector();
|
|
22
|
+
});
|
|
23
|
+
this.openSelector();
|
|
24
|
+
}
|
|
25
|
+
async openSelector() {
|
|
26
|
+
var _a;
|
|
27
|
+
if (this.popup) {
|
|
28
|
+
delete this.popup;
|
|
29
|
+
}
|
|
30
|
+
const { name, help, objectified = false } = ((_a = this.column.record) === null || _a === void 0 ? void 0 : _a.options) || {};
|
|
31
|
+
const confirmCallback = (newval) => {
|
|
32
|
+
this.dispatchEvent(new CustomEvent('field-change', {
|
|
33
|
+
bubbles: true,
|
|
34
|
+
composed: true,
|
|
35
|
+
detail: {
|
|
36
|
+
before: this.value,
|
|
37
|
+
after: !objectified ? JSON.stringify(newval) : newval,
|
|
38
|
+
record: this.record,
|
|
39
|
+
column: this.column,
|
|
40
|
+
row: this.row
|
|
41
|
+
}
|
|
42
|
+
}));
|
|
43
|
+
};
|
|
44
|
+
try {
|
|
45
|
+
var value = !objectified && typeof this.value === 'string' ? JSON.parse(this.value) : cloneDeep(this.value || {});
|
|
46
|
+
}
|
|
47
|
+
catch (e) {
|
|
48
|
+
var value = {};
|
|
49
|
+
}
|
|
50
|
+
/*
|
|
51
|
+
주의 : 이 팝업 템플릿은 layout 모듈에 의해서 render 되므로,
|
|
52
|
+
layout의 구성에 변화가 발생하면, 다시 render된다.
|
|
53
|
+
이 팝업이 떠 있는 상태에서, 또 다른 팝업이 뜨는 경우도 layout 구성의 변화를 야기한다. (overlay의 갯수의 증가)
|
|
54
|
+
이 경우 value, options, confirmCallback 등 클로져를 사용한 것들이 초기 바인딩된 값으로 다시 바인딩되게 되는데,
|
|
55
|
+
만약, 템플릿 내부에서 이들 속성의 레퍼런스가 변화했다면, 원래 상태로 되돌아가는 현상이 발생하게 된다.
|
|
56
|
+
따라서, 가급적 이들 속성의 레퍼런스를 변화시키지 않는 것이 좋다.
|
|
57
|
+
*/
|
|
58
|
+
var template = html `
|
|
59
|
+
<ox-popup-partition-keys-input .value=${value} .confirmCallback=${confirmCallback}>
|
|
60
|
+
</ox-popup-partition-keys-input>
|
|
61
|
+
`;
|
|
62
|
+
this.popup = openPopup(template, {
|
|
63
|
+
backdrop: true,
|
|
64
|
+
size: 'large',
|
|
65
|
+
title: `${(name === null || name === void 0 ? void 0 : name.toUpperCase()) || i18next.t('field.partition-keys')} `,
|
|
66
|
+
help
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
OxGristEditorPartitionKeys = __decorate([
|
|
71
|
+
customElement('ox-grist-editor-partition-keys')
|
|
72
|
+
], OxGristEditorPartitionKeys);
|
|
73
|
+
export { OxGristEditorPartitionKeys };
|
|
74
|
+
//# sourceMappingURL=ox-grist-editor-partition-keys.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ox-grist-editor-partition-keys.js","sourceRoot":"","sources":["../../src/ox-grist-editor-partition-keys.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,oCAAoC,CAAA;AAE3C,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAErC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,SAAS,EAAe,MAAM,gBAAgB,CAAA;AAGvD,IAAa,0BAA0B,GAAvC,MAAa,0BAA2B,SAAQ,aAAa;IAG3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CAAC,CACH,CAAA;QACH,CAAC,CAAA;QAED,IAAI;YACF,IAAI,KAAK,GACP,CAAC,WAAW,IAAI,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,CAAA;SACxG;QAAC,OAAO,CAAC,EAAE;YACV,IAAI,KAAK,GAAQ,EAAE,CAAA;SACpB;QAED;;;;;;;UAOE;QACF,IAAI,QAAQ,GAAG,IAAI,CAAA;8CACuB,KAAK,qBAAqB,eAAe;;KAElF,CAAA;QAED,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC,QAAQ,EAAE;YAC/B,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,GAAG,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,WAAW,EAAE,KAAI,OAAO,CAAC,CAAC,CAAC,sBAAsB,CAAC,GAAG;YACrE,IAAI;SACL,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAtEY,0BAA0B;IADtC,aAAa,CAAC,gCAAgC,CAAC;GACnC,0BAA0B,CAsEtC;SAtEY,0BAA0B","sourcesContent":["/**\n * @license Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport './ox-popup-partition-keys-input.js'\n\nimport { html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\nimport { cloneDeep } from 'lodash-es'\n\nimport { OxGristEditor } from '@operato/data-grist'\nimport { i18next } from '@operato/i18n'\nimport { openPopup, PopupHandle } from '@operato/popup'\n\n@customElement('ox-grist-editor-partition-keys')\nexport class OxGristEditorPartitionKeys extends OxGristEditor {\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 const { name, help, objectified = false } = this.column.record?.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-partition-keys-input .value=${value} .confirmCallback=${confirmCallback}>\n </ox-popup-partition-keys-input>\n `\n\n this.popup = openPopup(template, {\n backdrop: true,\n size: 'large',\n title: `${name?.toUpperCase() || i18next.t('field.partition-keys')} `,\n help\n })\n }\n}\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
import './ox-popup-value-map-input.js';
|
|
5
|
+
import { OxGristEditor } from '@operato/data-grist';
|
|
6
|
+
export declare class OxGristEditorValueMap extends OxGristEditor {
|
|
7
|
+
private popup?;
|
|
8
|
+
get editorTemplate(): import("lit-html").TemplateResult<1>;
|
|
9
|
+
firstUpdated(): Promise<void>;
|
|
10
|
+
openSelector(): Promise<void>;
|
|
11
|
+
}
|