@operato/app 1.0.0-alpha.9 → 1.0.0-beta.0
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/@types/global/index.d.ts +2 -0
- package/CHANGELOG.md +318 -17
- package/demo/data-grist-test.html +15 -10
- package/demo/index.html +1 -10
- package/dist/src/{grist → grist-editor}/index.d.ts +0 -0
- package/dist/src/grist-editor/index.js +28 -0
- package/dist/src/grist-editor/index.js.map +1 -0
- package/dist/src/grist-editor/ox-grist-editor-code.d.ts +7 -0
- package/dist/src/grist-editor/ox-grist-editor-code.js +56 -0
- package/dist/src/grist-editor/ox-grist-editor-code.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-editor/ox-grist-editor-partition-keys.d.ts +11 -0
- package/dist/src/grist-editor/ox-grist-editor-partition-keys.js +74 -0
- package/dist/src/grist-editor/ox-grist-editor-partition-keys.js.map +1 -0
- package/dist/src/{grist/code-editor.d.ts → grist-editor/ox-grist-editor-resource-code.d.ts} +2 -2
- package/dist/src/{grist/code-editor.js → grist-editor/ox-grist-editor-resource-code.js} +10 -5
- 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} +18 -67
- 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} +14 -64
- 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-crontab.d.ts +2 -0
- package/dist/src/grist-editor/ox-grist-renderer-crontab.js +26 -0
- package/dist/src/grist-editor/ox-grist-renderer-crontab.js.map +1 -0
- package/dist/src/grist-editor/ox-grist-renderer-resource-id.d.ts +2 -0
- package/dist/src/grist-editor/ox-grist-renderer-resource-id.js +9 -0
- package/dist/src/grist-editor/ox-grist-renderer-resource-id.js.map +1 -0
- package/dist/src/grist-editor/ox-grist-renderer-resource-object.d.ts +2 -0
- package/dist/src/grist-editor/ox-grist-renderer-resource-object.js +22 -0
- package/dist/src/grist-editor/ox-grist-renderer-resource-object.js.map +1 -0
- package/dist/src/{grist/parameters-editor-builder.d.ts → grist-editor/ox-parameters-builder.d.ts} +1 -1
- package/dist/src/{grist/parameters-editor-builder.js → grist-editor/ox-parameters-builder.js} +10 -11
- 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 +71 -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-partition-keys-input.d.ts +12 -0
- package/dist/src/grist-editor/ox-popup-partition-keys-input.js +98 -0
- package/dist/src/grist-editor/ox-popup-partition-keys-input.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} +22 -22
- 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/src/input/ox-input-background-pattern.d.ts +1 -1
- package/dist/src/input/ox-input-background-pattern.js +6 -3
- package/dist/src/input/ox-input-background-pattern.js.map +1 -1
- package/dist/src/input/ox-input-fill-style.d.ts +2 -3
- package/dist/src/input/ox-input-fill-style.js +2 -2
- package/dist/src/input/ox-input-fill-style.js.map +1 -1
- package/dist/src/input/ox-input-graphql.d.ts +36 -0
- package/dist/src/input/ox-input-graphql.js +161 -0
- package/dist/src/input/ox-input-graphql.js.map +1 -0
- package/dist/src/property-editor/index.d.ts +24 -0
- package/dist/src/property-editor/index.js +58 -0
- package/dist/src/property-editor/index.js.map +1 -0
- package/dist/src/property-editor/ox-property-editor-graphql.d.ts +5 -0
- package/dist/src/property-editor/ox-property-editor-graphql.js +15 -0
- package/dist/src/property-editor/ox-property-editor-graphql.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +44 -22
- package/src/grist-editor/index.ts +30 -0
- package/src/grist-editor/ox-grist-editor-code.ts +64 -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-editor/ox-grist-editor-partition-keys.ts +86 -0
- package/src/{grist/code-editor.ts → grist-editor/ox-grist-editor-resource-code.ts} +4 -5
- 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} +11 -48
- package/src/grist-editor/ox-grist-editor-value-map.ts +86 -0
- package/src/grist-editor/ox-grist-renderer-crontab.ts +30 -0
- package/src/{grist/id-renderer.ts → grist-editor/ox-grist-renderer-resource-id.ts} +4 -3
- package/src/grist-editor/ox-grist-renderer-resource-object.ts +26 -0
- package/src/{grist/parameters-editor-builder.ts → grist-editor/ox-parameters-builder.ts} +4 -6
- package/src/grist-editor/ox-popup-code-input.ts +65 -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-partition-keys-input.ts +95 -0
- 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} +4 -4
- package/src/index.ts +3 -1
- package/src/input/index.ts +3 -0
- package/src/input/ox-input-background-pattern.ts +6 -3
- package/src/input/ox-input-fill-style.ts +3 -4
- package/src/input/ox-input-graphql.ts +169 -0
- package/src/property-editor/index.ts +59 -0
- package/src/property-editor/ox-property-editor-graphql.ts +12 -0
- package/themes/app-theme.css +142 -0
- package/themes/grist-theme.css +194 -0
- package/themes/oops-theme.css +26 -0
- package/themes/report-theme.css +47 -0
- 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 +0 -9
- 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/dist/src/input/ox-input-color-gradient.d.ts +0 -25
- package/dist/src/input/ox-input-color-gradient.js +0 -318
- package/dist/src/input/ox-input-color-gradient.js.map +0 -1
- package/src/grist/id-input.ts +0 -135
- package/src/grist/index.ts +0 -13
- package/src/input/ox-input-color-gradient.ts +0 -341
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import 'codemirror/addon/display/fullscreen'
|
|
6
|
+
import 'codemirror/addon/display/autorefresh'
|
|
7
|
+
import 'codemirror/addon/hint/show-hint'
|
|
8
|
+
import 'codemirror/addon/lint/lint'
|
|
9
|
+
import 'codemirror-graphql/hint'
|
|
10
|
+
import 'codemirror-graphql/lint'
|
|
11
|
+
import 'codemirror-graphql/mode'
|
|
12
|
+
|
|
13
|
+
import { GRAPHQL_URI, client } from '@operato/graphql'
|
|
14
|
+
import { LitElement, PropertyValues, css, html, unsafeCSS } from 'lit'
|
|
15
|
+
import { customElement, property, query } from 'lit/decorators.js'
|
|
16
|
+
import { introspectSchema, wrapSchema } from '@graphql-tools/wrap'
|
|
17
|
+
|
|
18
|
+
import CodeMirror from 'codemirror'
|
|
19
|
+
import CodeMirrorStyle from '!!text-loader!codemirror/lib/codemirror.css'
|
|
20
|
+
import FullScreenStyle from '!!text-loader!codemirror/addon/display/fullscreen.css'
|
|
21
|
+
import LintStyle from '!!text-loader!codemirror/addon/lint/lint.css'
|
|
22
|
+
import NightThemeStyle from '!!text-loader!codemirror/theme/night.css'
|
|
23
|
+
import ShowHintStyle from '!!text-loader!codemirror/addon/hint/show-hint.css'
|
|
24
|
+
import { fetch } from 'cross-fetch'
|
|
25
|
+
import { print } from 'graphql'
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
WEB Component for code-mirror graphql editor.
|
|
29
|
+
|
|
30
|
+
Example:
|
|
31
|
+
|
|
32
|
+
<ox-input-graphql value=${text} link=${link}>
|
|
33
|
+
</ox-input-graphql>
|
|
34
|
+
*/
|
|
35
|
+
@customElement('ox-input-graphql')
|
|
36
|
+
export default class OxInputGraphql extends LitElement {
|
|
37
|
+
static styles = [
|
|
38
|
+
css`
|
|
39
|
+
${unsafeCSS(CodeMirrorStyle)}
|
|
40
|
+
${unsafeCSS(FullScreenStyle)}
|
|
41
|
+
${unsafeCSS(NightThemeStyle)}
|
|
42
|
+
${unsafeCSS(LintStyle)}
|
|
43
|
+
${unsafeCSS(ShowHintStyle)}
|
|
44
|
+
`,
|
|
45
|
+
css`
|
|
46
|
+
:host {
|
|
47
|
+
display: block;
|
|
48
|
+
position: relative;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
textarea {
|
|
52
|
+
display: block;
|
|
53
|
+
height: 100%;
|
|
54
|
+
width: 100%;
|
|
55
|
+
resize: none;
|
|
56
|
+
font-size: 16px;
|
|
57
|
+
line-height: 20px;
|
|
58
|
+
border: 0px;
|
|
59
|
+
padding: 0px;
|
|
60
|
+
}
|
|
61
|
+
`
|
|
62
|
+
]
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* `value`는 에디터에서 작성중인 contents이다.
|
|
66
|
+
*/
|
|
67
|
+
@property({ type: String }) value?: string
|
|
68
|
+
@property({ type: String }) link?: string
|
|
69
|
+
|
|
70
|
+
@query('textarea') textarea!: HTMLTextAreaElement
|
|
71
|
+
|
|
72
|
+
private _self_changing: boolean = false
|
|
73
|
+
private _changed: boolean = false
|
|
74
|
+
private _editor?: CodeMirror.EditorFromTextArea
|
|
75
|
+
|
|
76
|
+
async updated(changes: PropertyValues<this>) {
|
|
77
|
+
if ((!this._editor || changes.has('value') || changes.has('link')) && !this._self_changing) {
|
|
78
|
+
if (changes.has('link')) {
|
|
79
|
+
this._editor = undefined
|
|
80
|
+
}
|
|
81
|
+
;(await this.getEditor())!.setValue(this.value === undefined ? '' : String(this.value))
|
|
82
|
+
// ;(await this.getEditor()).refresh()
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
render() {
|
|
87
|
+
return html` <textarea></textarea> `
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
async getSchema() {
|
|
91
|
+
const executor = async ({ document, variables }: any) => {
|
|
92
|
+
const query = print(document)
|
|
93
|
+
const uri = this.link || GRAPHQL_URI
|
|
94
|
+
|
|
95
|
+
const fetchResult = await fetch(uri, {
|
|
96
|
+
method: 'POST',
|
|
97
|
+
headers: {
|
|
98
|
+
'Content-Type': 'application/json'
|
|
99
|
+
},
|
|
100
|
+
body: JSON.stringify({ query, variables })
|
|
101
|
+
})
|
|
102
|
+
return fetchResult.json()
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
return await wrapSchema({
|
|
106
|
+
schema: await introspectSchema(executor),
|
|
107
|
+
executor
|
|
108
|
+
})
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
async getEditor() {
|
|
112
|
+
if (!this._editor) {
|
|
113
|
+
try {
|
|
114
|
+
var schema = await this.getSchema()
|
|
115
|
+
} catch (err) {
|
|
116
|
+
console.error(err)
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
if (this.textarea) {
|
|
120
|
+
this._editor = CodeMirror.fromTextArea(this.textarea, {
|
|
121
|
+
value: this.value,
|
|
122
|
+
mode: 'graphql',
|
|
123
|
+
lint: {
|
|
124
|
+
//@ts-ignore
|
|
125
|
+
schema
|
|
126
|
+
},
|
|
127
|
+
hintOptions: {
|
|
128
|
+
//@ts-ignore
|
|
129
|
+
schema
|
|
130
|
+
},
|
|
131
|
+
tabSize: 2,
|
|
132
|
+
lineNumbers: false,
|
|
133
|
+
showCursorWhenSelecting: true,
|
|
134
|
+
theme: 'night',
|
|
135
|
+
extraKeys: {
|
|
136
|
+
F11: function (cm) {
|
|
137
|
+
cm.setOption('fullScreen', !cm.getOption('fullScreen'))
|
|
138
|
+
},
|
|
139
|
+
Esc: function (cm) {
|
|
140
|
+
cm.setOption('fullScreen', !cm.getOption('fullScreen'))
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
autoRefresh: {
|
|
144
|
+
delay: 500
|
|
145
|
+
}
|
|
146
|
+
})
|
|
147
|
+
|
|
148
|
+
this._editor.on('blur', (editor: CodeMirror.Editor, e: FocusEvent) => {
|
|
149
|
+
if (!this._changed) return
|
|
150
|
+
|
|
151
|
+
this.value = editor.getValue()
|
|
152
|
+
this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }))
|
|
153
|
+
})
|
|
154
|
+
|
|
155
|
+
this._editor.on('change', async (editor: CodeMirror.Editor, changeObj: CodeMirror.EditorChange) => {
|
|
156
|
+
this._self_changing = true
|
|
157
|
+
|
|
158
|
+
this._changed = true
|
|
159
|
+
|
|
160
|
+
await this.requestUpdate()
|
|
161
|
+
|
|
162
|
+
this._self_changing = false
|
|
163
|
+
})
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
return this._editor
|
|
168
|
+
}
|
|
169
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import '@operato/property-editor/ox-property-editor-legend.js'
|
|
2
|
+
import '@operato/property-editor/ox-property-editor-number.js'
|
|
3
|
+
import '@operato/property-editor/ox-property-editor-password.js'
|
|
4
|
+
import '@operato/property-editor/ox-property-editor-angle.js'
|
|
5
|
+
import '@operato/property-editor/ox-property-editor-string.js'
|
|
6
|
+
import '@operato/property-editor/ox-property-editor-data.js'
|
|
7
|
+
import '@operato/property-editor/ox-property-editor-date.js'
|
|
8
|
+
import '@operato/property-editor/ox-property-editor-checkbox.js'
|
|
9
|
+
import '@operato/property-editor/ox-property-editor-options.js'
|
|
10
|
+
import '@operato/property-editor/ox-property-editor-select.js'
|
|
11
|
+
import '@operato/property-editor/ox-property-editor-scene-component-id.js'
|
|
12
|
+
import '@operato/property-editor/ox-property-editor-color.js'
|
|
13
|
+
import '@operato/property-editor/ox-property-editor-multiple-colors.js'
|
|
14
|
+
import '@operato/property-editor/ox-property-editor-solid-colorstops.js'
|
|
15
|
+
import '@operato/property-editor/ox-property-editor-gradient-colorstops.js'
|
|
16
|
+
import '@operato/property-editor/ox-property-editor-gradient-colorstops.js'
|
|
17
|
+
import '@operato/property-editor/ox-property-editor-textarea.js'
|
|
18
|
+
import '@operato/property-editor/ox-property-editor-table.js'
|
|
19
|
+
import '@operato/property-editor/ox-property-editor-value-map.js'
|
|
20
|
+
import '@operato/property-editor/ox-property-editor-value-ranges.js'
|
|
21
|
+
import '@operato/attachment/ox-property-editor-attachment-selector.js'
|
|
22
|
+
import '@operato/attachment/ox-property-editor-image-selector.js'
|
|
23
|
+
import '@operato/font/ox-property-editor-font-selector.js'
|
|
24
|
+
import './ox-property-editor-graphql.js'
|
|
25
|
+
|
|
26
|
+
import { OxPropertyEditor } from '@operato/property-editor'
|
|
27
|
+
|
|
28
|
+
OxPropertyEditor.register({
|
|
29
|
+
legend: 'ox-property-editor-legend',
|
|
30
|
+
number: 'ox-property-editor-number',
|
|
31
|
+
slider: 'ox-property-editor-range',
|
|
32
|
+
password: 'ox-property-editor-password',
|
|
33
|
+
angle: 'ox-property-editor-angle',
|
|
34
|
+
string: 'ox-property-editor-string',
|
|
35
|
+
textarea: 'ox-property-editor-textarea',
|
|
36
|
+
javascript: 'ox-property-editor-textarea',
|
|
37
|
+
checkbox: 'ox-property-editor-checkbox',
|
|
38
|
+
boolean: 'ox-property-editor-checkbox',
|
|
39
|
+
select: 'ox-property-editor-select',
|
|
40
|
+
date: 'ox-property-editor-date',
|
|
41
|
+
options: 'ox-property-editor-options',
|
|
42
|
+
data: 'ox-property-editor-data',
|
|
43
|
+
file: 'ox-property-editor-file',
|
|
44
|
+
image: 'ox-property-editor-image',
|
|
45
|
+
'range-input': 'ox-property-editor-range',
|
|
46
|
+
'attachment-selector': 'ox-property-editor-attachment-selector',
|
|
47
|
+
'gltf-selector': 'ox-property-editor-attachment-selector',
|
|
48
|
+
'image-selector': 'ox-property-editor-image-selector',
|
|
49
|
+
color: 'ox-property-editor-color',
|
|
50
|
+
'solid-color-stops': 'ox-property-editor-solid-colorstops',
|
|
51
|
+
'gradient-color-stops': 'ox-property-editor-gradient-colorstops',
|
|
52
|
+
'multiple-color': 'ox-property-editor-multiple-colors',
|
|
53
|
+
map: 'ox-property-editor-value-map',
|
|
54
|
+
range: 'ox-property-editor-value-ranges',
|
|
55
|
+
graphql: 'ox-property-editor-graphql',
|
|
56
|
+
'editor-table': 'ox-property-editor-table',
|
|
57
|
+
'id-input': 'ox-property-editor-scene-component-id',
|
|
58
|
+
'font-selector': 'ox-property-editor-font-selector'
|
|
59
|
+
})
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import '../input/ox-input-graphql.js'
|
|
2
|
+
|
|
3
|
+
import { OxPropertyEditor } from '@operato/property-editor'
|
|
4
|
+
import { customElement } from 'lit/decorators.js'
|
|
5
|
+
import { html } from 'lit'
|
|
6
|
+
|
|
7
|
+
@customElement('ox-property-editor-graphql')
|
|
8
|
+
export class OxPropertyEditorGraphQL extends OxPropertyEditor {
|
|
9
|
+
editorTemplate() {
|
|
10
|
+
return html` <ox-input-graphql id="editor" .value=${this.value} fullwidth> </ox-input-graphql> `
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
body {
|
|
2
|
+
/* theme color */
|
|
3
|
+
--primary-color-rgb: 130, 105, 96;
|
|
4
|
+
--primary-color: rgb(var(--primary-color-rgb));
|
|
5
|
+
--secondary-color-rgb: 78, 78, 90;
|
|
6
|
+
--secondary-color: rgb(var(--secondary-color-rgb));
|
|
7
|
+
--focus-color: var(--theme-white-color);
|
|
8
|
+
--primary-background-color: var(--secondary-color);
|
|
9
|
+
--secondary-background-color: #283644;
|
|
10
|
+
--main-section-background-color: #f5f2ee;
|
|
11
|
+
--theme-white-color: #fff;
|
|
12
|
+
--theme-black-color: rgba(0, 0, 0, 0.9);
|
|
13
|
+
|
|
14
|
+
--focus-background-color: var(--primary-color);
|
|
15
|
+
--primary-text-color: #3c3938;
|
|
16
|
+
--secondary-text-color: var(--primary-color);
|
|
17
|
+
|
|
18
|
+
--opacity-dark-color: rgba(0, 0, 0, 0.4);
|
|
19
|
+
--opacity-light-color: rgba(255, 255, 255, 0.8);
|
|
20
|
+
|
|
21
|
+
/* status color */
|
|
22
|
+
--status-success-color: #35a24a;
|
|
23
|
+
--status-warning-color: #ee8d03;
|
|
24
|
+
--status-danger-color: #d14946;
|
|
25
|
+
--status-info-color: #398ace;
|
|
26
|
+
|
|
27
|
+
/* common style */
|
|
28
|
+
--border-radius: 4px;
|
|
29
|
+
--border-dark-color: 1px solid rgba(0, 0, 0, 0.15);
|
|
30
|
+
--border-light-color: 1px solid rgba(255, 255, 255, 0.3);
|
|
31
|
+
|
|
32
|
+
--box-shadow: 2px 2px 3px 0px rgba(0, 0, 0, 0.1);
|
|
33
|
+
|
|
34
|
+
--theme-font: 'Noto', Helvetica;
|
|
35
|
+
|
|
36
|
+
--margin-default: 9px;
|
|
37
|
+
--margin-narrow: 4px;
|
|
38
|
+
--margin-wide: 15px;
|
|
39
|
+
--padding-default: var(--margin-default);
|
|
40
|
+
--padding-narrow: var(--margin-narrow);
|
|
41
|
+
--padding-wide: var(--margin-wide);
|
|
42
|
+
|
|
43
|
+
--scrollbar-thumb-color: rgba(57, 78, 100, 0.5);
|
|
44
|
+
--scrollbar-thumb-hover-color: var(--primary-color);
|
|
45
|
+
|
|
46
|
+
--fontsize-default: 14px;
|
|
47
|
+
--fontsize-small: 13px;
|
|
48
|
+
--fontsize-large: 16px;
|
|
49
|
+
|
|
50
|
+
/* app layout style */
|
|
51
|
+
--app-grid-template-area: 'header header header' 'nav main aside' 'nav footer aside';
|
|
52
|
+
|
|
53
|
+
/* title & description style */
|
|
54
|
+
--title-margin: var(--margin-narrow) 0;
|
|
55
|
+
--title-font: bold 24px var(--theme-font);
|
|
56
|
+
--title-text-color: var(--secondary-color);
|
|
57
|
+
--title-font-mobile: bold 20px var(--theme-font);
|
|
58
|
+
|
|
59
|
+
--page-description-margin: var(--margin-narrow) 0 var(--margin-wide) 0;
|
|
60
|
+
--page-description-font: normal var(--fontsize-default) / 1.2rem var(--theme-font);
|
|
61
|
+
--page-description-color: var(--secondary-text-color);
|
|
62
|
+
|
|
63
|
+
--subtitle-padding: 12px 5px 3px 5px;
|
|
64
|
+
--subtitle-font: bold 18px var(--theme-font);
|
|
65
|
+
--subtitle-text-color: var(--primary-color);
|
|
66
|
+
--subtitle-border-bottom: 1px solid var(--primary-color);
|
|
67
|
+
|
|
68
|
+
/* icon style */
|
|
69
|
+
--icon-tiny-size: 24px;
|
|
70
|
+
--icon-default-size: 36px;
|
|
71
|
+
--icon-big-size: 48px;
|
|
72
|
+
--icon-default-color: var(--theme-white-color);
|
|
73
|
+
|
|
74
|
+
/* material design component themes */
|
|
75
|
+
--mdc-theme-on-primary: var(--theme-white-color);
|
|
76
|
+
--mdc-theme-primary: var(--secondary-text-color);
|
|
77
|
+
--mdc-theme-on-secondary: var(--theme-white-color);
|
|
78
|
+
--mdc-theme-secondary: var(--primary-color);
|
|
79
|
+
--mdc-button-outline-color: var(--primary-color);
|
|
80
|
+
--mdc-danger-button-primary-color: var(--status-danger-color);
|
|
81
|
+
--mdc-danger-button-outline-color: var(--status-danger-color);
|
|
82
|
+
--mdc-button-outline-width: 1px;
|
|
83
|
+
--mdc-button-horizontal-padding: 16px;
|
|
84
|
+
|
|
85
|
+
/* button style */
|
|
86
|
+
--button-background-color: #fafbfc;
|
|
87
|
+
--button-background-focus-color: var(--primary-color);
|
|
88
|
+
--button-border: var(--border-dark-color);
|
|
89
|
+
--button-border-radius: var(--border-radius);
|
|
90
|
+
--button-margin: var(--margin-default) var(--margin-default) var(--margin-default) 0;
|
|
91
|
+
--button-padding: var(--padding-default);
|
|
92
|
+
--button-color: var(--secondary-color);
|
|
93
|
+
--button-font: normal 15px var(--theme-font);
|
|
94
|
+
--button-text-transform: capitalize;
|
|
95
|
+
--button-active-box-shadow: 1px 1px 1px 0px rgba(0, 0, 0, 0.2);
|
|
96
|
+
--button-activ-border: 1px solid var(--primary-color);
|
|
97
|
+
|
|
98
|
+
--button-primary-background-color: var(--primary-color);
|
|
99
|
+
--button-primary-active-background-color: var(--status-success-color);
|
|
100
|
+
--button-primary-padding: var(--margin-default) var(--margin-wide);
|
|
101
|
+
--button-primary-color: var(--theme-white-color);
|
|
102
|
+
--button-primary-font: bold 16px var(--theme-font);
|
|
103
|
+
|
|
104
|
+
/* table style */
|
|
105
|
+
--th-padding: var(--padding-default) 0 var(--padding-default) var(--padding-default);
|
|
106
|
+
--th-border-top: 2px solid var(--secondary-color);
|
|
107
|
+
--th-text-transform: capitalize;
|
|
108
|
+
--th-font: bold var(--fontsize-small) var(--theme-font);
|
|
109
|
+
--th-color: rgba(var(--secondary-color-rgb), 0.8);
|
|
110
|
+
|
|
111
|
+
--tr-background-color: var(--theme-white-color);
|
|
112
|
+
--tr-background-odd-color: rgba(255, 255, 255, 0.4);
|
|
113
|
+
--tr-background-hover-color: #e1f5fe;
|
|
114
|
+
--td-border-bottom: 1px solid rgba(0, 0, 0, 0.09);
|
|
115
|
+
--td-padding: var(--padding-default);
|
|
116
|
+
--td-font: normal 13px var(--theme-font);
|
|
117
|
+
--td-color: var(--secondary-color);
|
|
118
|
+
|
|
119
|
+
/* form style */
|
|
120
|
+
--label-font: normal var(--fontsize-default) var(--theme-font);
|
|
121
|
+
--label-color: var(--secondary-color);
|
|
122
|
+
--label-text-transform: capitalize;
|
|
123
|
+
--input-margin: var(--margin-narrow) 0;
|
|
124
|
+
--input-padding: var(--padding-default);
|
|
125
|
+
--input-min-width: 200px;
|
|
126
|
+
--input-font: normal var(--fontsize-default) var(--theme-font);
|
|
127
|
+
--input-hint-font: normal var(--fontsize-small) var(--theme-font);
|
|
128
|
+
--input-hint-color: #666;
|
|
129
|
+
--input-container-max-width: 900px;
|
|
130
|
+
--fieldset-margin: var(--padding-wide) 0;
|
|
131
|
+
--fieldset-padding: 0 var(--padding-wide) var(--padding-wide) var(--padding-wide);
|
|
132
|
+
--legend-padding: var(--padding-default) 0;
|
|
133
|
+
--legend-color: var(--secondary-text-color);
|
|
134
|
+
--legend-font: bold 16px var(--theme-font);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
@media only screen and (max-width: 460px) {
|
|
138
|
+
body {
|
|
139
|
+
/* subtitle style */
|
|
140
|
+
--subtitle-margin: 0;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
body {
|
|
2
|
+
--grid-container-border-color: 1px solid rgba(0, 0, 0, 0.09);
|
|
3
|
+
--grid-container-border-width: 1px 0;
|
|
4
|
+
|
|
5
|
+
--grist-background-color: var(--main-section-background-color);
|
|
6
|
+
--grist-title-margin: 0 0 0 10px;
|
|
7
|
+
--grist-title-border: none;
|
|
8
|
+
--grist-title-font: bold 16px var(--theme-font);
|
|
9
|
+
--grist-title-color: var(--secondary-color);
|
|
10
|
+
--grist-title-font: bold 16px var(--theme-font);
|
|
11
|
+
--grist-title-icon-color: var(--primary-color);
|
|
12
|
+
--grist-title-icon-margin: 0 3px 2px 0;
|
|
13
|
+
--grist-title-icon-size: var(--fontsize-default);
|
|
14
|
+
--grist-title-with-grid-padding: 0;
|
|
15
|
+
|
|
16
|
+
--grist-object-editor-font: normal 1em var(--theme-font);
|
|
17
|
+
--grist-object-editor-color: var(--secondary-color);
|
|
18
|
+
|
|
19
|
+
--grist-input-zoom: 1;
|
|
20
|
+
--grist-input-progress-border: 1px solid rgba(255, 255, 255, 0.5);
|
|
21
|
+
--grist-input-progress-background: rgba(121, 110, 110, 0.1);
|
|
22
|
+
--grist-input-progress-bar-background: #4ac5fd;
|
|
23
|
+
--grist-input-progress-bar-color: var(--theme-white-color);
|
|
24
|
+
|
|
25
|
+
--grid-header-background-color: transparent;
|
|
26
|
+
--grid-header-top-border: 2px solid rgba(var(--secondary-color-rgb), 0.7);
|
|
27
|
+
--grid-header-bottom-border: var(--grid-container-border-color);
|
|
28
|
+
--grid-header-border-color: rgba(var(--primary-color-rgb), 0.3);
|
|
29
|
+
--grid-header-padding: var(--padding-default) 0 var(--padding-narrow) var(--padding-default);
|
|
30
|
+
--grid-header-sorter-size: 18px;
|
|
31
|
+
--grid-header-splitter-border: var(--grid-container-border-color);
|
|
32
|
+
--grid-header-splitter-border-hover: 1px solid var(--primary-color);
|
|
33
|
+
--grid-header-color: rgba(var(--secondary-color-rgb), 0.8);
|
|
34
|
+
--grid-header-font: bold var(--fontsize-small) var(--theme-font);
|
|
35
|
+
--grid-header-filter-title-color: var(--primary-text-color);
|
|
36
|
+
--grid-header-filter-title-font: normal 12px var(--theme-font);
|
|
37
|
+
--grid-header-filter-title-icon-color: var(--primary-color);
|
|
38
|
+
|
|
39
|
+
--grid-record-background-color: var(--theme-white-color);
|
|
40
|
+
--grid-record-odd-background-color: rgba(255, 255, 255, 0.4);
|
|
41
|
+
--grid-record-padding: var(--padding-default) 0 var(--padding-default) var(--padding-default);
|
|
42
|
+
--grid-record-color: var(--secondary-color);
|
|
43
|
+
--grid-record-color-hover: var(--primary-color);
|
|
44
|
+
--grid-record-wide-fontsize: var(--fontsize-small);
|
|
45
|
+
--grid-record-selected-background-color: #f1f8e9;
|
|
46
|
+
--grid-record-selected-color: var(--grid-record-color);
|
|
47
|
+
--grid-record-focused-background-color: rgba(var(--primary-color-rgb), 0.2);
|
|
48
|
+
--grid-record-focused-border: 1px solid var(--primary-color);
|
|
49
|
+
--grid-record-focused-cell-background-color: rgba(var(--primary-color-rgb), 0.25);
|
|
50
|
+
--grid-record-focused-cell-border: 1px dashed var(--primary-color);
|
|
51
|
+
--grid-record-focused-color: var(--grid-record-color);
|
|
52
|
+
--grid-record-focused-box-shadow: 0px 2px 0px 0px rgb(0 0 0 / 10%);
|
|
53
|
+
--grid-record-emphasized-background-color: var(--primary-color);
|
|
54
|
+
--grid-record-emphasized-color: var(--theme-white-color);
|
|
55
|
+
--grid-record-editing-background-color: var(--theme-white-color);
|
|
56
|
+
--grid-record-editing-border: 1px dashed rgba(var(--primary-color-rgb), 0.4);
|
|
57
|
+
--grid-record-fontsize: var(--fontsize-large);
|
|
58
|
+
--grid-record-border-bottom: var(--grid-container-border-color);
|
|
59
|
+
|
|
60
|
+
--grid-record-dirty-border-top: 24px solid rgba(var(--primary-color-rgb), 0.6);
|
|
61
|
+
--grid-record-dirty-border-left: 24px solid transparent;
|
|
62
|
+
--grid-record-dirty-icon-font: bold 10px/12px var(--mdc-icon-font, 'Material Icons');
|
|
63
|
+
--grid-record-dirty-icon-size: var(--fontsize-large);
|
|
64
|
+
--grid-record-dirty-color: var(--theme-white-color);
|
|
65
|
+
|
|
66
|
+
--grid-footer-background-color: transparent;
|
|
67
|
+
--grid-footer-font-size: var(--fontsize-default);
|
|
68
|
+
--grid-footer-color: var(--secondary-color);
|
|
69
|
+
--grid-footer-limit-color: rgba(var(--secondary-color-rgb), 0.6);
|
|
70
|
+
--grid-footer-inactive-color: var(--grid-footer-limit-color);
|
|
71
|
+
--grid-footer-padding: var(--padding-default) var(--padding-narrow);
|
|
72
|
+
|
|
73
|
+
--data-list-background-color: var(--main-section-background-color);
|
|
74
|
+
--data-list-item-margin: var(--margin-default) 0 var(--margin-default) var(--margin-wide);
|
|
75
|
+
--data-list-item-padding: var(--padding-default) var(--padding-wide);
|
|
76
|
+
--data-list-item-border-bottom: var(--grid-container-border-color);
|
|
77
|
+
--data-list-item-name-font: bold 1em/1em var(--theme-font);
|
|
78
|
+
--data-list-item-name-color: var(--secondary-color);
|
|
79
|
+
--data-list-item-disc-font: normal 0.9em/1em var(--theme-font);
|
|
80
|
+
--data-list-item-disc-color: var(--secondary-text-color);
|
|
81
|
+
--data-list-item-etc-label-font: bold 1em/1em var(--theme-font);
|
|
82
|
+
--data-list-item-etc-font: normal 0.8em/1em var(--theme-font);
|
|
83
|
+
--data-list-item-etc-color: #585858;
|
|
84
|
+
--data-list-item-icon-font: normal 1em/1em;
|
|
85
|
+
--data-list-item-icon-color: var(--secondary-text-color);
|
|
86
|
+
--data-list-selected-background-color: var(--grid-record-selected-background-color);
|
|
87
|
+
--data-list-fab-position-horizontal: 15px;
|
|
88
|
+
--data-list-fab-position-vertical: 15px;
|
|
89
|
+
--data-list-fab-color: var(--primary-color);
|
|
90
|
+
--data-list-fab-shadow: var(--box-shadow);
|
|
91
|
+
|
|
92
|
+
--data-card-background-color: var(--main-section-background-color);
|
|
93
|
+
--data-card-record-card-background-color: var(--theme-white-color);
|
|
94
|
+
--data-card-record-card-border: var(--border-dark-color);
|
|
95
|
+
--data-card-record-card-border-hover: 1px solid var(--primary-color);
|
|
96
|
+
--data-card-record-card-boxshadow-hover: 1px 1px 2px 1px rgba(0, 0, 0, 0.15);
|
|
97
|
+
--data-card-record-card-selected-border: 1px solid var(--primary-color);
|
|
98
|
+
--data-card-record-card-border-radius: var(--border-radius);
|
|
99
|
+
--data-card-item-margin: var(--margin-default) 0 var(--margin-default) var(--margin-wide);
|
|
100
|
+
--data-card-item-padding: var(--padding-default) var(--padding-wide);
|
|
101
|
+
--data-card-item-border-bottom: var(--grid-container-border-color);
|
|
102
|
+
--data-card-item-name-font: bold 1.2em/1em var(--theme-font);
|
|
103
|
+
--data-card-item-name-color: var(--secondary-text-color);
|
|
104
|
+
--data-card-item-name-label-font: normal 0.65em/0.8em var(--theme-font);
|
|
105
|
+
--data-card-item-name-label-color: rgba(var(--secondary-color-rgb), 0.8);
|
|
106
|
+
--data-card-item-disc-font: normal 0.9em/1em var(--theme-font);
|
|
107
|
+
--data-card-item-disc-color: var(--primary-color);
|
|
108
|
+
--data-card-item-etc-label-font: normal 1em/1em var(--theme-font);
|
|
109
|
+
--data-card-item-etc-font: bold 0.8em/1em var(--theme-font);
|
|
110
|
+
--data-card-item-etc-color: var(--secondary-color);
|
|
111
|
+
--data-card-item-icon-font: normal 1em/1em;
|
|
112
|
+
--data-card-item-icon-color: var(--secondary-text-color);
|
|
113
|
+
--data-card-item-btn-border: var(--border-dark-color);
|
|
114
|
+
--data-card-item-btn-border-radius: var(--border-radius);
|
|
115
|
+
--data-card-item-btn-padding: var(--padding-narrow);
|
|
116
|
+
--data-card-selected-background-color: var(--grid-record-selected-background-color);
|
|
117
|
+
--data-card-fab-position-horizontal: 15px;
|
|
118
|
+
--data-card-fab-position-vertical: 15px;
|
|
119
|
+
--data-card-fab-color: var(--primary-color);
|
|
120
|
+
--data-card-fab-shadow: var(--box-shadow);
|
|
121
|
+
--data-card-template: repeat(3, minmax(auto, 100%));
|
|
122
|
+
--data-card-thumbnail-height: 140px;
|
|
123
|
+
--data-card-thumbnail-border-bottom: var(--border-dark-color);
|
|
124
|
+
--data-card-attachimg-height: 70px;
|
|
125
|
+
|
|
126
|
+
--record-view-background-color: var(--main-section-background-color);
|
|
127
|
+
--record-view-gap: var(--margin-narrow) 0;
|
|
128
|
+
--record-view-padding: var(--padding-default);
|
|
129
|
+
--record-view-label-font: bold 15px var(--theme-font);
|
|
130
|
+
--record-view-label-color: var(--secondary-color);
|
|
131
|
+
--record-view-label-icon-size: var(--fontsize-small);
|
|
132
|
+
--record-view-font: normal 15px var(--theme-font);
|
|
133
|
+
--record-view-color: var(--secondary-color);
|
|
134
|
+
--record-view-focus-color: var(--primary-color);
|
|
135
|
+
--record-view-border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
|
136
|
+
--record-view-edit-border-bottom: 2px solid var(--primary-color);
|
|
137
|
+
--record-view-item-padding: var(--padding-default);
|
|
138
|
+
|
|
139
|
+
--record-view-footer-background: #586272;
|
|
140
|
+
--record-view-footer-button-border: 1px solid rgba(0, 0, 0, 0.3);
|
|
141
|
+
--record-view-footer-button-border-width: 0 0 0 1px;
|
|
142
|
+
--record-view-footer-button-font: 17px;
|
|
143
|
+
--record-view-footer-button-color: var(--theme-white-color);
|
|
144
|
+
--record-view-footer-iconbutton-size: 35px;
|
|
145
|
+
--record-view-footer-focus-background: var(--primary-color);
|
|
146
|
+
|
|
147
|
+
--ox-grist-padding: var(--padding-default) var(--padding-default) 0 var(--padding-default);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
@media print {
|
|
151
|
+
body {
|
|
152
|
+
--grist-input-zoom: 0.7;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
@media only screen and (max-width: 460px) {
|
|
157
|
+
body {
|
|
158
|
+
--record-view-label-font: bold 15px/32px var(--theme-font);
|
|
159
|
+
--record-view-font: normal 15px/32px var(--theme-font);
|
|
160
|
+
--data-card-template: repeat(1, minmax(auto, 100%));
|
|
161
|
+
--ox-grist-padding: 0;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
@media (min-width: 461px) and (max-width: 700px) {
|
|
165
|
+
body {
|
|
166
|
+
--data-card-template: repeat(2, minmax(auto, 100%));
|
|
167
|
+
--ox-grist-padding: 0;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
@media (min-width: 461px) and (max-width: 1024px) {
|
|
171
|
+
body {
|
|
172
|
+
--data-card-create-form-padding: 7px;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
@media (min-width: 1025px) and (max-width: 1400px) {
|
|
176
|
+
body {
|
|
177
|
+
--data-card-template: repeat(4, minmax(auto, 100%));
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
@media (min-width: 1401px) and (max-width: 1800px) {
|
|
181
|
+
body {
|
|
182
|
+
--data-card-template: repeat(5, minmax(auto, 100%));
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
@media (min-width: 1801px) and (max-width: 2200px) {
|
|
186
|
+
body {
|
|
187
|
+
--data-card-template: repeat(6, minmax(auto, 100%));
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
@media only screen and (min-width: 2201px) {
|
|
191
|
+
body {
|
|
192
|
+
--data-card-template: repeat(7, minmax(auto, 100%));
|
|
193
|
+
}
|
|
194
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
body {
|
|
2
|
+
/* oops spinner style */
|
|
3
|
+
|
|
4
|
+
--oops-spinner-image: url(/assets/images/spinner.png);
|
|
5
|
+
|
|
6
|
+
/* oops note style */
|
|
7
|
+
--oops-note-icon-font: normal 24px var(--mdc-icon-font, 'Material Icons');
|
|
8
|
+
--oops-note-icon-color: rgba(var(--secondary-color-rgb), 0.3);
|
|
9
|
+
--oops-note-icon-border: 2px solid rgba(var(--secondary-color-rgb), 0.3);
|
|
10
|
+
--oops-note-icon-border-radius: 50px;
|
|
11
|
+
--oops-note-icon-padding: var(--padding-default);
|
|
12
|
+
--oops-note-title-margin: 7px 0 2px 0;
|
|
13
|
+
--oops-note-title-font: bold 14px var(--theme-font);
|
|
14
|
+
--oops-note-title-color: var(--secondary-color);
|
|
15
|
+
--oops-note-description-font: normal 12px var(--theme-font);
|
|
16
|
+
--oops-note-description-color: var(--primary-color);
|
|
17
|
+
}
|
|
18
|
+
@media only screen and (max-width: 460px) {
|
|
19
|
+
body {
|
|
20
|
+
--oops-note-icon-padding: var(--padding-narrow);
|
|
21
|
+
--oops-note-icon-font: normal 18px var(--mdc-icon-font, 'Material Icons');
|
|
22
|
+
--oops-note-title-font: bold 13px var(--theme-font);
|
|
23
|
+
--oops-note-title-margin: var(--margin-narrow) 0 2px 0;
|
|
24
|
+
--oops-note-description-font: normal 0px var(--theme-font);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
body {
|
|
2
|
+
--report-background-color: var(--main-section-background-color);
|
|
3
|
+
--report-padding: 15px;
|
|
4
|
+
--report-title-margin: 0 0 0 10px;
|
|
5
|
+
--report-title-border: none;
|
|
6
|
+
--report-title-color: var(--secondary-color);
|
|
7
|
+
--report-title-icon-color: var(--primary-color);
|
|
8
|
+
--report-title-icon-margin: 0 3px 2px 0;
|
|
9
|
+
--report-title-icon-size: 14px;
|
|
10
|
+
--report-title-with-grid-padding: 0;
|
|
11
|
+
--report-component-border-radius: var(--border-radius);
|
|
12
|
+
|
|
13
|
+
--report-header-background-color: rgba(var(--primary-color-rgb), 0.05);
|
|
14
|
+
--report-header-border: 1px solid var(--report-header-border-color);
|
|
15
|
+
--report-header-border-color: rgba(var(--primary-color-rgb), 0.3);
|
|
16
|
+
--report-header-padding: 5px 0 5px 5px;
|
|
17
|
+
--report-header-color: var(--secondary-text-color);
|
|
18
|
+
--report-header-font: normal 1em/1.5 var(--theme-font);
|
|
19
|
+
--report-header-fontsize: 13px;
|
|
20
|
+
|
|
21
|
+
--report-record-background-color: #fff;
|
|
22
|
+
--report-record-odd-background-color: #f6f6f6;
|
|
23
|
+
--report-record-field-padding: 7px 10px;
|
|
24
|
+
--report-record-field-border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
|
25
|
+
--report-record-wide-fontsize: 13px;
|
|
26
|
+
--report-record-focused-background-color: #ffde3b47;
|
|
27
|
+
--report-record-focused-border: 1px dashed rgba(0, 0, 0, 0.5);
|
|
28
|
+
|
|
29
|
+
--report-totalized-background-color: #efefef;
|
|
30
|
+
--report-totalized-border: 1px solid rgba(0, 0, 0, 0.1);
|
|
31
|
+
--report-totalized-color: var(--secondary-text-color);
|
|
32
|
+
|
|
33
|
+
--report-grouped-background-color: #607d8bbf;
|
|
34
|
+
--report-grouped-border: 1px solid rgba(0, 0, 0, 0.2);
|
|
35
|
+
--report-grouped-color: #fff;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@media print {
|
|
39
|
+
body {
|
|
40
|
+
--report-header-padding: 5px;
|
|
41
|
+
--report-record-field-padding: 5px;
|
|
42
|
+
--report-record-wide-fontsize: 10px;
|
|
43
|
+
--report-grouped-background-color: #d7d7d7;
|
|
44
|
+
--report-grouped-color: #000;
|
|
45
|
+
--report-totalized-color: #000;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"code-editor.js","sourceRoot":"","sources":["../../../src/grist/code-editor.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAA;AAG3B,OAAO,EAAE,WAAW,EAAgB,MAAM,qBAAqB,CAAA;AAC/D,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAErD,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;AAED,MAAM,OAAO,UAAW,SAAQ,WAAW;IACzC,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;AAED,cAAc,CAAC,MAAM,CAAC,aAAa,EAAE,UAAU,CAAC,CAAA","sourcesContent":["import '@material/mwc-icon'\nimport {} from '@operato/shell'\n\nimport { InputEditor, RecordConfig } from '@operato/data-grist'\nimport { client, gqlContext } from '@operato/graphql'\n\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\nexport class CodeEditor 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\ncustomElements.define('code-editor', CodeEditor)\n"]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import '@material/mwc-icon';
|
|
2
|
-
import './id-selector.js';
|
|
3
|
-
import { ColumnConfig, GristRecord, InputEditor } from '@operato/data-grist';
|
|
4
|
-
import { TemplateResult } from 'lit';
|
|
5
|
-
export declare class IdInput extends InputEditor {
|
|
6
|
-
static styles: import("lit").CSSResult;
|
|
7
|
-
value?: {
|
|
8
|
-
id?: string;
|
|
9
|
-
[propany: string]: any;
|
|
10
|
-
};
|
|
11
|
-
column: ColumnConfig;
|
|
12
|
-
record: GristRecord;
|
|
13
|
-
row: number;
|
|
14
|
-
private popup?;
|
|
15
|
-
private template?;
|
|
16
|
-
render(): TemplateResult<1>;
|
|
17
|
-
firstUpdated(): Promise<void>;
|
|
18
|
-
openSelector(): void;
|
|
19
|
-
}
|