@things-factory/meta-ui 7.0.1-alpha.3 → 7.0.1-alpha.31
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/client/actions/main.js +15 -20
- package/client/bootstrap.ts +23 -25
- package/client/component/grist/renderer/grist-renderer-meta-object-selector.js +18 -13
- package/client/component/popup/code-input-editor-popup.js +36 -45
- package/client/component/popup/file-upload-popup.js +8 -22
- package/client/component/popup/meta-object-selector-popup.js +113 -131
- package/client/component/popup/record-based-code-editor-popup.js +36 -45
- package/client/index.ts +1 -0
- package/client/pages/activity/meta-activity-define-page.js +26 -25
- package/client/pages/entity/config-entity.js +192 -122
- package/client/pages/entity/main-menu-selector.js +72 -86
- package/client/pages/history/history-copy-list-popup.js +33 -45
- package/client/pages/history/history-json-list-popup.js +38 -50
- package/client/pages/menu/dynamic-menu-template.js +2 -5
- package/client/pages/menu/dynamic-menu.js +142 -124
- package/client/pages/menu/export-menu-popup.js +206 -220
- package/client/pages/personalize/personal-column-selector.js +13 -18
- package/client/pages/terms/config-terminology.js +27 -25
- package/client/utils/meta-ui-util.js +57 -112
- package/client/utils/rest-service-util.js +328 -0
- package/client/utils/service-util.js +3 -3
- package/client/utils/terms-util.js +25 -99
- package/client/viewparts/dynamic-menu-part.js +7 -29
- package/dist-client/actions/main.js +6 -5
- package/dist-client/actions/main.js.map +1 -1
- package/dist-client/bootstrap.d.ts +1 -0
- package/dist-client/bootstrap.js +17 -20
- package/dist-client/bootstrap.js.map +1 -1
- package/dist-client/component/grist/renderer/grist-renderer-code-input.d.ts +1 -1
- package/dist-client/component/grist/renderer/grist-renderer-meta-code-selector.d.ts +1 -1
- package/dist-client/component/grist/renderer/grist-renderer-meta-object-selector.d.ts +1 -1
- package/dist-client/component/grist/renderer/grist-renderer-meta-object-selector.js +9 -3
- package/dist-client/component/grist/renderer/grist-renderer-meta-object-selector.js.map +1 -1
- package/dist-client/component/popup/code-input-editor-popup.d.ts +1 -1
- package/dist-client/component/popup/code-input-editor-popup.js +9 -17
- package/dist-client/component/popup/code-input-editor-popup.js.map +1 -1
- package/dist-client/component/popup/file-upload-popup.js +6 -21
- package/dist-client/component/popup/file-upload-popup.js.map +1 -1
- package/dist-client/component/popup/meta-object-selector-popup.d.ts +1 -1
- package/dist-client/component/popup/meta-object-selector-popup.js +27 -35
- package/dist-client/component/popup/meta-object-selector-popup.js.map +1 -1
- package/dist-client/component/popup/record-based-code-editor-popup.d.ts +1 -1
- package/dist-client/component/popup/record-based-code-editor-popup.js +16 -25
- package/dist-client/component/popup/record-based-code-editor-popup.js.map +1 -1
- package/dist-client/index.d.ts +1 -0
- package/dist-client/index.js +1 -0
- package/dist-client/index.js.map +1 -1
- package/dist-client/mixin/meta-basic-grist-mixin.d.ts +1 -1
- package/dist-client/pages/activity/meta-activity-define-page.js +11 -8
- package/dist-client/pages/activity/meta-activity-define-page.js.map +1 -1
- package/dist-client/pages/activity/meta-activity-viewer-element.d.ts +1 -1
- package/dist-client/pages/activity/meta-activity-writer-element.d.ts +1 -1
- package/dist-client/pages/button-role/button-role-detail.d.ts +1 -1
- package/dist-client/pages/entity/config-entity.js +142 -72
- package/dist-client/pages/entity/config-entity.js.map +1 -1
- package/dist-client/pages/entity/main-menu-selector.d.ts +1 -1
- package/dist-client/pages/entity/main-menu-selector.js +60 -75
- package/dist-client/pages/entity/main-menu-selector.js.map +1 -1
- package/dist-client/pages/history/history-copy-list-popup.d.ts +1 -1
- package/dist-client/pages/history/history-copy-list-popup.js +14 -26
- package/dist-client/pages/history/history-copy-list-popup.js.map +1 -1
- package/dist-client/pages/history/history-json-list-popup.d.ts +5 -5
- package/dist-client/pages/history/history-json-list-popup.js +19 -31
- package/dist-client/pages/history/history-json-list-popup.js.map +1 -1
- package/dist-client/pages/menu/dynamic-menu-setting-let.d.ts +1 -1
- package/dist-client/pages/menu/dynamic-menu-template.js +2 -5
- package/dist-client/pages/menu/dynamic-menu-template.js.map +1 -1
- package/dist-client/pages/menu/dynamic-menu.js +72 -51
- package/dist-client/pages/menu/dynamic-menu.js.map +1 -1
- package/dist-client/pages/menu/export-menu-popup.d.ts +5 -5
- package/dist-client/pages/menu/export-menu-popup.js +45 -56
- package/dist-client/pages/menu/export-menu-popup.js.map +1 -1
- package/dist-client/pages/meta-grist-element.d.ts +1 -1
- package/dist-client/pages/meta-grist-page.d.ts +1 -1
- package/dist-client/pages/personalize/personal-column-selector.d.ts +1 -1
- package/dist-client/pages/personalize/personal-column-selector.js +12 -18
- package/dist-client/pages/personalize/personal-column-selector.js.map +1 -1
- package/dist-client/pages/terms/config-terminology.js +13 -11
- package/dist-client/pages/terms/config-terminology.js.map +1 -1
- package/dist-client/pages/work-code/work-code-detail-popup.d.ts +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-client/utils/meta-ui-util.js +53 -109
- package/dist-client/utils/meta-ui-util.js.map +1 -1
- package/dist-client/utils/rest-service-util.d.ts +120 -0
- package/dist-client/utils/rest-service-util.js +291 -0
- package/dist-client/utils/rest-service-util.js.map +1 -0
- package/dist-client/utils/service-util.js +3 -3
- package/dist-client/utils/service-util.js.map +1 -1
- package/dist-client/utils/terms-util.d.ts +9 -26
- package/dist-client/utils/terms-util.js +2 -76
- package/dist-client/utils/terms-util.js.map +1 -1
- package/dist-client/viewparts/dynamic-menu-part.d.ts +1 -1
- package/dist-client/viewparts/dynamic-menu-part.js +7 -27
- package/dist-client/viewparts/dynamic-menu-part.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +11 -9
- package/translations/en.json +2 -12
- package/translations/ko.json +2 -12
- package/translations/ms.json +2 -12
- package/translations/zh.json +2 -12
- package/client/viewparts/dynamic-menu-landscape-styles.js +0 -149
- package/client/viewparts/dynamic-menu-landscape.js +0 -106
- package/client/viewparts/dynamic-menu-portrait-styles.js +0 -130
- package/client/viewparts/dynamic-menu-portrait.js +0 -90
- package/client/viewparts/dynamic-top-menu-bar.js +0 -148
- package/dist-client/viewparts/dynamic-menu-landscape-styles.d.ts +0 -1
- package/dist-client/viewparts/dynamic-menu-landscape-styles.js +0 -149
- package/dist-client/viewparts/dynamic-menu-landscape-styles.js.map +0 -1
- package/dist-client/viewparts/dynamic-menu-landscape.d.ts +0 -21
- package/dist-client/viewparts/dynamic-menu-landscape.js +0 -87
- package/dist-client/viewparts/dynamic-menu-landscape.js.map +0 -1
- package/dist-client/viewparts/dynamic-menu-portrait-styles.d.ts +0 -1
- package/dist-client/viewparts/dynamic-menu-portrait-styles.js +0 -130
- package/dist-client/viewparts/dynamic-menu-portrait-styles.js.map +0 -1
- package/dist-client/viewparts/dynamic-menu-portrait.d.ts +0 -13
- package/dist-client/viewparts/dynamic-menu-portrait.js +0 -74
- package/dist-client/viewparts/dynamic-menu-portrait.js.map +0 -1
- package/dist-client/viewparts/dynamic-top-menu-bar.d.ts +0 -27
- package/dist-client/viewparts/dynamic-top-menu-bar.js +0 -133
- package/dist-client/viewparts/dynamic-top-menu-bar.js.map +0 -1
- package/dist-server/constants/error-code.js +0 -6
- package/dist-server/constants/error-code.js.map +0 -1
- package/server/constants/error-code.ts +0 -2
package/client/actions/main.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
2
|
+
|
|
1
3
|
import '../viewparts/dynamic-menu-part'
|
|
2
|
-
import '@material/mwc-icon'
|
|
3
4
|
|
|
4
5
|
import gql from 'graphql-tag'
|
|
5
6
|
import { html } from 'lit'
|
|
@@ -17,13 +18,7 @@ export const UPDATE_META_MENU_TEMPLATE = 'UPDATE_META_MENU_TEMPLATE'
|
|
|
17
18
|
var HAMBURGER
|
|
18
19
|
|
|
19
20
|
export async function setupMenuPart(options) {
|
|
20
|
-
var {
|
|
21
|
-
hovering = isMobileDevice() ? true : false,
|
|
22
|
-
slotTemplate,
|
|
23
|
-
portraitSlotTemplate,
|
|
24
|
-
landscapeSlotTemplate,
|
|
25
|
-
position = VIEWPART_POSITION.NAVBAR
|
|
26
|
-
} = options || {}
|
|
21
|
+
var { hovering = isMobileDevice() ? true : false, slotTemplate, portraitSlotTemplate, landscapeSlotTemplate, position = VIEWPART_POSITION.NAVBAR } = options || {}
|
|
27
22
|
|
|
28
23
|
const { hovering: hoveringSetting } = (await clientSettingStore.get('dynamic-menu'))?.value || {}
|
|
29
24
|
if (hoveringSetting !== undefined) {
|
|
@@ -31,8 +26,7 @@ export async function setupMenuPart(options) {
|
|
|
31
26
|
}
|
|
32
27
|
|
|
33
28
|
const orientation = position == VIEWPART_POSITION.HEADERBAR ? 'landscape' : 'portrait'
|
|
34
|
-
const orientatedSlotTemplate =
|
|
35
|
-
(orientation == 'landscape' ? landscapeSlotTemplate : portraitSlotTemplate) || slotTemplate || html``
|
|
29
|
+
const orientatedSlotTemplate = (orientation == 'landscape' ? landscapeSlotTemplate : portraitSlotTemplate) || slotTemplate || html``
|
|
36
30
|
|
|
37
31
|
appendViewpart({
|
|
38
32
|
name: 'dynamic-menu-part',
|
|
@@ -50,11 +44,13 @@ export async function setupMenuPart(options) {
|
|
|
50
44
|
HAMBURGER = {
|
|
51
45
|
name: 'hamburger',
|
|
52
46
|
template: html`
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
47
|
+
<md-icon
|
|
48
|
+
@click=${e =>
|
|
49
|
+
toggleOverlay('dynamic-menu-part', {
|
|
50
|
+
backdrop: true
|
|
51
|
+
})}
|
|
52
|
+
>view_headline</md-icon
|
|
53
|
+
>
|
|
58
54
|
`,
|
|
59
55
|
position: TOOL_POSITION.FRONT_END
|
|
60
56
|
}
|
|
@@ -84,8 +80,7 @@ export async function updateMenuTemplate(template) {
|
|
|
84
80
|
await client.query({
|
|
85
81
|
query: gql`
|
|
86
82
|
query ($filters: [Filter!], $sortings: [Sorting!]) {
|
|
87
|
-
liteMenus:
|
|
88
|
-
sortings: $sortings) {
|
|
83
|
+
liteMenus: myLiteMenus(filters: $filters, sortings: $sortings) {
|
|
89
84
|
items {
|
|
90
85
|
id
|
|
91
86
|
name
|
|
@@ -115,10 +110,10 @@ export async function updateMenuTemplate(template) {
|
|
|
115
110
|
value: ['', applicationName]
|
|
116
111
|
}
|
|
117
112
|
],
|
|
118
|
-
sortings:[
|
|
113
|
+
sortings: [
|
|
119
114
|
{
|
|
120
|
-
|
|
121
|
-
|
|
115
|
+
name: 'rank',
|
|
116
|
+
desc: false
|
|
122
117
|
}
|
|
123
118
|
]
|
|
124
119
|
}
|
package/client/bootstrap.ts
CHANGED
|
@@ -1,15 +1,9 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
2
|
+
|
|
1
3
|
import { html } from 'lit-html'
|
|
2
4
|
|
|
3
|
-
import { auth } from '@things-factory/auth-base/dist-client/auth.js'
|
|
4
|
-
import { ADD_MORENDA } from '@things-factory/more-base'
|
|
5
5
|
import { navigate, store } from '@operato/shell'
|
|
6
|
-
|
|
7
|
-
import { updateMenuTemplate } from './actions/main'
|
|
8
|
-
import metaUI from './reducers/main'
|
|
9
|
-
import { TermsUtil } from './utils/terms-util'
|
|
10
|
-
import { GristDefaultValue } from './utils/grist-default-value'
|
|
11
|
-
import { MENUS } from './dynamic-menus'
|
|
12
|
-
|
|
6
|
+
import { i18next } from '@operato/i18n'
|
|
13
7
|
import {
|
|
14
8
|
registerEditor as gristColumnRegisterEditor,
|
|
15
9
|
registerRenderer as gristColumnRegisterRenderer,
|
|
@@ -17,6 +11,14 @@ import {
|
|
|
17
11
|
} from '@operato/data-grist'
|
|
18
12
|
import { registerFilterRenderer as formRegisterFilterRenderer } from '@operato/form'
|
|
19
13
|
|
|
14
|
+
import { auth } from '@things-factory/auth-base/dist-client/auth.js'
|
|
15
|
+
import { ADD_MORENDA } from '@things-factory/more-base/client'
|
|
16
|
+
|
|
17
|
+
import { updateMenuTemplate } from './actions/main'
|
|
18
|
+
import metaUI from './reducers/main'
|
|
19
|
+
import { GristDefaultValue } from './utils/grist-default-value'
|
|
20
|
+
import { MENUS } from './dynamic-menus'
|
|
21
|
+
|
|
20
22
|
/** GRIST Renderer Compoment */
|
|
21
23
|
import { GristRendererMetaCodeSelector } from './component/grist/renderer/grist-renderer-meta-code-selector'
|
|
22
24
|
import { GristRendererMetaObjectSelector } from './component/grist/renderer/grist-renderer-meta-object-selector'
|
|
@@ -41,7 +43,6 @@ import './pages/history/history-json-list-popup'
|
|
|
41
43
|
|
|
42
44
|
import './pages/activity/meta-activity-writer-element'
|
|
43
45
|
import './pages/activity/meta-activity-viewer-element'
|
|
44
|
-
import { i18next } from '@operato/i18n'
|
|
45
46
|
|
|
46
47
|
export default async function bootstrap(module) {
|
|
47
48
|
// GRIST Renderer
|
|
@@ -69,23 +70,20 @@ export default async function bootstrap(module) {
|
|
|
69
70
|
metaUI
|
|
70
71
|
})
|
|
71
72
|
|
|
72
|
-
// 1. 용어 다운로드
|
|
73
|
-
var locale = i18next.language
|
|
74
|
-
if (locale == 'ko') {
|
|
75
|
-
locale = 'ko-KR'
|
|
76
|
-
}
|
|
77
|
-
await TermsUtil.downloadTerminologies(locale)
|
|
78
|
-
|
|
79
73
|
auth.on('profile', async ({ credential, domains, domain }) => {
|
|
80
74
|
// 2. 메뉴 정보를 서버로 부터 받아서 적용
|
|
81
75
|
const menuRoutes = await MENUS
|
|
82
76
|
updateMenuTemplate(menuRoutes.menus)
|
|
83
77
|
|
|
78
|
+
i18next.on('languageChanged', async () => {
|
|
79
|
+
updateMenuTemplate(menuRoutes.menus)
|
|
80
|
+
})
|
|
81
|
+
|
|
84
82
|
// 3. 동적 메뉴 관리 화면 추가
|
|
85
83
|
store.dispatch({
|
|
86
84
|
type: ADD_MORENDA,
|
|
87
85
|
morenda: {
|
|
88
|
-
icon: html`<
|
|
86
|
+
icon: html`<md-icon>auto_fix_high</md-icon>`,
|
|
89
87
|
name: html`<ox-i18n msgid="title.dynamic_menu"></ox-i18n>`,
|
|
90
88
|
action: () => {
|
|
91
89
|
navigate('dynamic-menu')
|
|
@@ -97,7 +95,7 @@ export default async function bootstrap(module) {
|
|
|
97
95
|
store.dispatch({
|
|
98
96
|
type: ADD_MORENDA,
|
|
99
97
|
morenda: {
|
|
100
|
-
icon: html`<
|
|
98
|
+
icon: html`<md-icon>filter_tilt_shift</md-icon>`,
|
|
101
99
|
name: html`<ox-i18n msgid="title.entity"></ox-i18n>`,
|
|
102
100
|
action: () => {
|
|
103
101
|
navigate('config-entity')
|
|
@@ -109,7 +107,7 @@ export default async function bootstrap(module) {
|
|
|
109
107
|
store.dispatch({
|
|
110
108
|
type: ADD_MORENDA,
|
|
111
109
|
morenda: {
|
|
112
|
-
icon: html`<
|
|
110
|
+
icon: html`<md-icon>speaker_notes</md-icon>`,
|
|
113
111
|
name: html`<ox-i18n msgid="title.terminology"></ox-i18n>`,
|
|
114
112
|
action: () => {
|
|
115
113
|
navigate('config-terminology')
|
|
@@ -121,7 +119,7 @@ export default async function bootstrap(module) {
|
|
|
121
119
|
store.dispatch({
|
|
122
120
|
type: ADD_MORENDA,
|
|
123
121
|
morenda: {
|
|
124
|
-
icon: html`<
|
|
122
|
+
icon: html`<md-icon>code</md-icon>`,
|
|
125
123
|
name: html`<ox-i18n msgid="title.code_management"></ox-i18n>`,
|
|
126
124
|
action: () => {
|
|
127
125
|
navigate('codes')
|
|
@@ -133,7 +131,7 @@ export default async function bootstrap(module) {
|
|
|
133
131
|
store.dispatch({
|
|
134
132
|
type: ADD_MORENDA,
|
|
135
133
|
morenda: {
|
|
136
|
-
icon: html`<
|
|
134
|
+
icon: html`<md-icon>business_center</md-icon>`,
|
|
137
135
|
name: html`<ox-i18n msgid="title.meta_activity_list"></ox-i18n>`,
|
|
138
136
|
action: () => {
|
|
139
137
|
navigate('meta-activity-list')
|
|
@@ -144,7 +142,7 @@ export default async function bootstrap(module) {
|
|
|
144
142
|
store.dispatch({
|
|
145
143
|
type: ADD_MORENDA,
|
|
146
144
|
morenda: {
|
|
147
|
-
icon: html`<
|
|
145
|
+
icon: html`<md-icon>margin</md-icon>`,
|
|
148
146
|
name: html`<ox-i18n msgid="title.meta_activity_define"></ox-i18n>`,
|
|
149
147
|
action: () => {
|
|
150
148
|
navigate('meta-activity-define')
|
|
@@ -155,7 +153,7 @@ export default async function bootstrap(module) {
|
|
|
155
153
|
store.dispatch({
|
|
156
154
|
type: ADD_MORENDA,
|
|
157
155
|
morenda: {
|
|
158
|
-
icon: html`<
|
|
156
|
+
icon: html`<md-icon>work</md-icon>`,
|
|
159
157
|
name: html`<ox-i18n msgid="title.activity_list"></ox-i18n>`,
|
|
160
158
|
action: () => {
|
|
161
159
|
navigate('activity-list')
|
|
@@ -166,7 +164,7 @@ export default async function bootstrap(module) {
|
|
|
166
164
|
store.dispatch({
|
|
167
165
|
type: ADD_MORENDA,
|
|
168
166
|
morenda: {
|
|
169
|
-
icon: html` <
|
|
167
|
+
icon: html` <md-icon>dataset</md-icon> `,
|
|
170
168
|
name: html` <ox-i18n msgid="text.attribute management"></ox-i18n> `,
|
|
171
169
|
action: () => {
|
|
172
170
|
navigate('attributes')
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 그리드 Resource-column 타입 셀렉터
|
|
2
|
+
* 그리드 Resource-column 타입 셀렉터
|
|
3
3
|
* @auth yang
|
|
4
4
|
*/
|
|
5
5
|
import { html } from 'lit'
|
|
@@ -7,28 +7,33 @@ import { html } from 'lit'
|
|
|
7
7
|
import { detectOverflow } from '@operato/utils'
|
|
8
8
|
|
|
9
9
|
function onmouseover(e) {
|
|
10
|
-
const element = e.target
|
|
10
|
+
const element = e.target
|
|
11
11
|
if (detectOverflow(element)) {
|
|
12
12
|
element.setAttribute('data-tooltip', element.textContent)
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
function onmouseout(e) {
|
|
17
|
-
const element = e.target
|
|
18
|
-
element.removeAttribute('data-tooltip')
|
|
17
|
+
const element = e.target
|
|
18
|
+
element.removeAttribute('data-tooltip')
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
export const GristRendererMetaObjectSelector = (value, column, record, rowIndex, field) => {
|
|
22
|
+
let text = ''
|
|
22
23
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
text = value[fields[0]];
|
|
24
|
+
if (value && column.record.options?.nameField) {
|
|
25
|
+
let fields = column.record.options.nameField.split(',')
|
|
26
|
+
text = value[fields[0]]
|
|
27
27
|
|
|
28
|
-
if(fields.length > 1){
|
|
29
|
-
text+= `(${fields
|
|
28
|
+
if (fields.length > 1) {
|
|
29
|
+
text += `(${fields
|
|
30
|
+
.splice(1)
|
|
31
|
+
.map(field => {
|
|
32
|
+
return value[field]
|
|
33
|
+
})
|
|
34
|
+
.join(',')})`
|
|
30
35
|
}
|
|
31
|
-
}
|
|
36
|
+
}
|
|
32
37
|
|
|
33
|
-
return html`<span @mouseover=${onmouseover} @mouseout=${onmouseout}>${text}</span
|
|
34
|
-
}
|
|
38
|
+
return html`<span @mouseover=${onmouseover} @mouseout=${onmouseout}>${text}</span>`
|
|
39
|
+
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
2
|
+
|
|
1
3
|
import { css, html, LitElement } from 'lit'
|
|
2
4
|
import { CommonGristStyles, ButtonContainerStyles } from '@operato/styles'
|
|
3
|
-
import { TermsUtil } from '../../utils/terms-util'
|
|
4
|
-
import { MetaApi } from
|
|
5
|
+
import { TermsUtil } from '../../utils/terms-util'
|
|
6
|
+
import { MetaApi } from '../../utils/meta-api'
|
|
5
7
|
import '@operato/input/ox-input-code.js'
|
|
6
8
|
import { closePopup } from '@operato/popup'
|
|
7
9
|
|
|
@@ -24,47 +26,36 @@ export class CodeInputEditorPopup extends LitElement {
|
|
|
24
26
|
}
|
|
25
27
|
|
|
26
28
|
ox-input-code {
|
|
27
|
-
margin:10px;
|
|
29
|
+
margin: 10px;
|
|
28
30
|
overflow-y: auto;
|
|
29
31
|
flex: 1;
|
|
30
32
|
}
|
|
31
|
-
|
|
32
|
-
.button-container {
|
|
33
|
-
display: flex;
|
|
34
|
-
margin-left: auto;
|
|
35
|
-
}
|
|
36
33
|
`
|
|
37
34
|
]
|
|
38
35
|
|
|
39
|
-
async connectedCallback(){
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
this.codeVlaue = JSON.stringify(this.value, 0, 2);
|
|
36
|
+
async connectedCallback() {
|
|
37
|
+
if (typeof this.value === 'object') {
|
|
38
|
+
this.codeVlaue = JSON.stringify(this.value, 0, 2)
|
|
43
39
|
} else {
|
|
44
|
-
this.codeVlaue = this.value
|
|
45
|
-
|
|
40
|
+
this.codeVlaue = this.value
|
|
46
41
|
}
|
|
47
42
|
|
|
48
|
-
await super.connectedCallback()
|
|
43
|
+
await super.connectedCallback()
|
|
49
44
|
}
|
|
50
45
|
|
|
51
|
-
async firstUpdated(){
|
|
52
|
-
await super.firstUpdated()
|
|
46
|
+
async firstUpdated() {
|
|
47
|
+
await super.firstUpdated()
|
|
53
48
|
}
|
|
54
49
|
|
|
55
|
-
render(){
|
|
50
|
+
render() {
|
|
56
51
|
return html`
|
|
57
52
|
<ox-input-code mode="javascript" value=${this.codeVlaue} tab-size="2" tab-as-space="true"></ox-input-code>
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
<
|
|
63
|
-
|
|
64
|
-
</mwc-button>
|
|
65
|
-
<mwc-button raised label="${TermsUtil.tButton('confirm')}" style="margin-left:7px;margin-top:7px;"
|
|
66
|
-
@click=${this.clickConfirm.bind(this)}>
|
|
67
|
-
</mwc-button>
|
|
53
|
+
|
|
54
|
+
<div id="button-container" class="button-container" style="margin-left:unset;">
|
|
55
|
+
<button @click=${this.clickEmpty.bind(this)}><md-icon>clear_box_outline_blank</md-icon>${TermsUtil.tButton('empty')}</button>
|
|
56
|
+
<div filler></div>
|
|
57
|
+
<button @click=${this.clickCancel.bind(this)}><md-icon>cancel</md-icon>${TermsUtil.tButton('cancel')}</button>
|
|
58
|
+
<button @click=${this.clickConfirm.bind(this)}><md-icon>done</md-icon>${TermsUtil.tButton('confirm')}</button>
|
|
68
59
|
</div>
|
|
69
60
|
`
|
|
70
61
|
}
|
|
@@ -76,42 +67,42 @@ export class CodeInputEditorPopup extends LitElement {
|
|
|
76
67
|
/**
|
|
77
68
|
* @description 비우기
|
|
78
69
|
***************************
|
|
79
|
-
* @returns
|
|
70
|
+
* @returns
|
|
80
71
|
*/
|
|
81
|
-
async clickEmpty(e){
|
|
72
|
+
async clickEmpty(e) {
|
|
82
73
|
this.confirmCallback && this.confirmCallback(null)
|
|
83
74
|
closePopup(this)
|
|
84
75
|
}
|
|
85
76
|
/**
|
|
86
|
-
* @description 취소
|
|
77
|
+
* @description 취소
|
|
87
78
|
***************************
|
|
88
|
-
* @returns
|
|
79
|
+
* @returns
|
|
89
80
|
*/
|
|
90
|
-
async clickCancel(e){
|
|
81
|
+
async clickCancel(e) {
|
|
91
82
|
closePopup(this)
|
|
92
83
|
}
|
|
93
84
|
/**
|
|
94
|
-
* @description 확인
|
|
85
|
+
* @description 확인
|
|
95
86
|
***************************
|
|
96
|
-
* @returns
|
|
87
|
+
* @returns
|
|
97
88
|
*/
|
|
98
|
-
async clickConfirm(e){
|
|
99
|
-
if(this.codeVlaue === this.codeEditor.value){
|
|
100
|
-
MetaApi.showToast('info', TermsUtil.tText('NOTHING_CHANGED'))
|
|
101
|
-
return
|
|
89
|
+
async clickConfirm(e) {
|
|
90
|
+
if (this.codeVlaue === this.codeEditor.value) {
|
|
91
|
+
MetaApi.showToast('info', TermsUtil.tText('NOTHING_CHANGED'))
|
|
92
|
+
return
|
|
102
93
|
}
|
|
103
|
-
this.changedValue(this.codeEditor.value)
|
|
94
|
+
this.changedValue(this.codeEditor.value)
|
|
104
95
|
}
|
|
105
96
|
|
|
106
97
|
/**
|
|
107
|
-
* @description 확정
|
|
98
|
+
* @description 확정
|
|
108
99
|
***************************
|
|
109
|
-
* @param {*} record
|
|
100
|
+
* @param {*} record
|
|
110
101
|
*/
|
|
111
|
-
async changedValue(value){
|
|
102
|
+
async changedValue(value) {
|
|
112
103
|
this.confirmCallback && this.confirmCallback(value)
|
|
113
104
|
closePopup(this)
|
|
114
105
|
}
|
|
115
106
|
}
|
|
116
|
-
|
|
117
|
-
customElements.define('code-input-editor-popup', CodeInputEditorPopup)
|
|
107
|
+
|
|
108
|
+
customElements.define('code-input-editor-popup', CodeInputEditorPopup)
|
|
@@ -1,19 +1,22 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
2
|
+
|
|
1
3
|
import { client, gqlContext } from '@things-factory/shell'
|
|
2
4
|
import { css, html, LitElement } from 'lit'
|
|
3
5
|
import { SingleColumnFormStyles } from '@things-factory/form-ui'
|
|
4
6
|
import { CommonGristStyles, ButtonContainerStyles } from '@operato/styles'
|
|
5
7
|
import gql from 'graphql-tag'
|
|
6
|
-
import { TermsUtil } from '../../utils/terms-util'
|
|
8
|
+
import { TermsUtil } from '../../utils/terms-util'
|
|
7
9
|
import { ValueUtil } from '../../utils/value-util'
|
|
8
10
|
import { ServiceUtil } from '../../utils/service-util'
|
|
9
|
-
import { MetaApi } from
|
|
10
|
-
import { MetaUiUtil } from
|
|
11
|
+
import { MetaApi } from '../../utils/meta-api'
|
|
12
|
+
import { MetaUiUtil } from '../../utils/meta-ui-util'
|
|
11
13
|
import { isMobileDevice } from '@operato/utils'
|
|
12
14
|
import { closePopup } from '@operato/popup'
|
|
13
15
|
|
|
14
16
|
class FileUploadPopup extends LitElement {
|
|
15
17
|
static get styles() {
|
|
16
18
|
return [
|
|
19
|
+
ButtonContainerStyles,
|
|
17
20
|
SingleColumnFormStyles,
|
|
18
21
|
css`
|
|
19
22
|
:host {
|
|
@@ -23,27 +26,10 @@ class FileUploadPopup extends LitElement {
|
|
|
23
26
|
overflow-x: overlay;
|
|
24
27
|
background-color: var(--main-section-background-color);
|
|
25
28
|
}
|
|
29
|
+
|
|
26
30
|
.input-container {
|
|
27
31
|
display: flex;
|
|
28
32
|
}
|
|
29
|
-
.button-container {
|
|
30
|
-
padding: 10px 0 12px 0;
|
|
31
|
-
text-align: center;
|
|
32
|
-
}
|
|
33
|
-
.button-container > button {
|
|
34
|
-
background-color: var(--button-background-color);
|
|
35
|
-
border: var(--button-border);
|
|
36
|
-
border-radius: var(--button-border-radius);
|
|
37
|
-
margin: var(--button-margin);
|
|
38
|
-
padding: var(--button-padding);
|
|
39
|
-
color: var(--button-color);
|
|
40
|
-
font: var(--button-font);
|
|
41
|
-
text-transform: var(--button-text-transform);
|
|
42
|
-
}
|
|
43
|
-
.button-container > button:hover,
|
|
44
|
-
.button-container > button:active {
|
|
45
|
-
background-color: var(--button-background-focus-color);
|
|
46
|
-
}
|
|
47
33
|
`
|
|
48
34
|
]
|
|
49
35
|
}
|
|
@@ -84,7 +70,7 @@ class FileUploadPopup extends LitElement {
|
|
|
84
70
|
</div>
|
|
85
71
|
|
|
86
72
|
<div class="button-container">
|
|
87
|
-
<
|
|
73
|
+
<button @click=${this._createAttachment}><md-icon>attach_file_add</md-icon>${TermsUtil.tButton('create')}</button>
|
|
88
74
|
</div>
|
|
89
75
|
`
|
|
90
76
|
}
|