@things-factory/meta-ui 7.0.1-alpha.36 → 7.0.1-alpha.38
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '@material/web/icon/icon.js'
|
|
2
2
|
|
|
3
3
|
import moment from 'moment-timezone'
|
|
4
|
-
import { css, html, render } from 'lit'
|
|
4
|
+
import { css, html, render, nothing } from 'lit'
|
|
5
5
|
|
|
6
6
|
import { getEditor, getRenderer } from '@operato/data-grist'
|
|
7
7
|
import { getValueGenerators } from '@operato/time-calculator'
|
|
@@ -225,10 +225,10 @@ export class MetaUiUtil {
|
|
|
225
225
|
})
|
|
226
226
|
|
|
227
227
|
// 7. 검색 필드의 검색 Operator가 in인 경우 디폴트 값을 배열로 변경
|
|
228
|
-
if(menuMetaData.search && menuMetaData.search.length > 0) {
|
|
228
|
+
if (menuMetaData.search && menuMetaData.search.length > 0) {
|
|
229
229
|
menuMetaData.search.forEach(c => {
|
|
230
230
|
let value = c.value
|
|
231
|
-
if(c.operator == 'in' && value.indexOf(',') > 0) {
|
|
231
|
+
if (c.operator == 'in' && value.indexOf(',') > 0) {
|
|
232
232
|
c.value = value.split(',')
|
|
233
233
|
}
|
|
234
234
|
})
|
|
@@ -1013,13 +1013,11 @@ export class MetaUiUtil {
|
|
|
1013
1013
|
|
|
1014
1014
|
if (dateKeywords.includes(x)) {
|
|
1015
1015
|
defRes.push(todayMoment.startOf(durationType[x]).format(dateFormat[col.type]))
|
|
1016
|
-
|
|
1017
1016
|
} else if (x.includes('-')) {
|
|
1018
1017
|
let wordSplits = x.split('-')
|
|
1019
1018
|
let key = wordSplits[0]
|
|
1020
1019
|
let value = wordSplits[1]
|
|
1021
1020
|
defRes.push(todayMoment.subtract(value, durationType[key]).startOf(durationType[key]).format(dateFormat[col.type]))
|
|
1022
|
-
|
|
1023
1021
|
} else if (x.includes('+')) {
|
|
1024
1022
|
let wordSplits = x.split('+')
|
|
1025
1023
|
let key = wordSplits[0]
|
|
@@ -1986,27 +1984,14 @@ export class MetaUiUtil {
|
|
|
1986
1984
|
static getGristPersonalizedStyles() {
|
|
1987
1985
|
return [
|
|
1988
1986
|
css`
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
user-select: none;
|
|
1993
|
-
align-self: end;
|
|
1994
|
-
height: var(--padding-narrow);
|
|
1995
|
-
}
|
|
1996
|
-
|
|
1997
|
-
#grist-personal > md-icon {
|
|
1998
|
-
--md-icon-size: 16px;
|
|
1999
|
-
padding: 2px;
|
|
2000
|
-
margin: 0;
|
|
2001
|
-
background-color: rgba(var(--secondary-color-rgb), 0.8);
|
|
2002
|
-
color: var(--theme-white-color);
|
|
2003
|
-
vertical-align: bottom;
|
|
1987
|
+
[slot='setting'] {
|
|
1988
|
+
--md-icon-size: 18px;
|
|
1989
|
+
color: rgba(var(--secondary-color-rgb), 0.8);
|
|
2004
1990
|
cursor: pointer;
|
|
2005
|
-
border-radius: 50%;
|
|
2006
1991
|
}
|
|
2007
1992
|
|
|
2008
|
-
|
|
2009
|
-
|
|
1993
|
+
[slot='setting']:hover {
|
|
1994
|
+
color: var(--primary-color);
|
|
2010
1995
|
}
|
|
2011
1996
|
`
|
|
2012
1997
|
]
|
|
@@ -3138,45 +3123,43 @@ export class MetaUiUtil {
|
|
|
3138
3123
|
let useSortButton = JSON.parse((pageView.etcConfig || {}).use_grid_sort_button || 'false')
|
|
3139
3124
|
useFilterAddButton = useFilterAddButton === true && useAddButton === true
|
|
3140
3125
|
|
|
3141
|
-
return
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
>
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
<md-icon>add</md-icon>
|
|
3174
|
-
</button>
|
|
3175
|
-
</ox-record-creator>
|
|
3126
|
+
return html`
|
|
3127
|
+
${useFilterForm
|
|
3128
|
+
? html`
|
|
3129
|
+
<div slot="headroom" style="flex-direction: column;padding: 0px;border-top: none;box-shadow: none;background: none;align-items: stretch;">
|
|
3130
|
+
<div slot="headroom">
|
|
3131
|
+
<div id="filters"><ox-filters-form></ox-filters-form></div>
|
|
3132
|
+
${useSortButton
|
|
3133
|
+
? html`
|
|
3134
|
+
<div id="sorters">
|
|
3135
|
+
<md-icon
|
|
3136
|
+
@click=${e => {
|
|
3137
|
+
const target = e.currentTarget
|
|
3138
|
+
target.nextElementSibling.open({
|
|
3139
|
+
right: 0,
|
|
3140
|
+
top: target.offsetTop + target.offsetHeight
|
|
3141
|
+
})
|
|
3142
|
+
}}
|
|
3143
|
+
>sort</md-icon
|
|
3144
|
+
>
|
|
3145
|
+
<ox-popup id="sorter-control">
|
|
3146
|
+
<ox-sorters-control></ox-sorters-control>
|
|
3147
|
+
</ox-popup>
|
|
3148
|
+
</div>
|
|
3149
|
+
`
|
|
3150
|
+
: html``}
|
|
3151
|
+
${MetaUiUtil.getGridViewOption(pageView)}
|
|
3152
|
+
<ox-record-creator id="add" ?hidden="${!useFilterAddButton}" .callback=${recordCreationCallback}>
|
|
3153
|
+
<button style="display: flex; justify-content: center">
|
|
3154
|
+
<md-icon>add</md-icon>
|
|
3155
|
+
</button>
|
|
3156
|
+
</ox-record-creator>
|
|
3157
|
+
</div>
|
|
3176
3158
|
</div>
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3159
|
+
`
|
|
3160
|
+
: nothing}
|
|
3161
|
+
${this.getGridColumnPersonalizeButton(pageView)}
|
|
3162
|
+
`
|
|
3180
3163
|
}
|
|
3181
3164
|
|
|
3182
3165
|
/**
|
|
@@ -3192,18 +3175,17 @@ export class MetaUiUtil {
|
|
|
3192
3175
|
|
|
3193
3176
|
if (pageView.is_activity !== true) {
|
|
3194
3177
|
return html`
|
|
3195
|
-
<
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
</div>
|
|
3178
|
+
<md-icon
|
|
3179
|
+
slot="setting"
|
|
3180
|
+
@click=${e => {
|
|
3181
|
+
let element = MetaApi.createCustomElement('personal-column-selector', 'personal-column-selector')
|
|
3182
|
+
element.configGrist = e.currentTarget.closest('ox-grist')
|
|
3183
|
+
element.menuId = pageView.menuId
|
|
3184
|
+
|
|
3185
|
+
MetaApi.openPopupByElement(TermsUtil.tTitle('grid-column-personalize'), 'midium', element, false)
|
|
3186
|
+
}}
|
|
3187
|
+
>tune</md-icon
|
|
3188
|
+
>
|
|
3207
3189
|
`
|
|
3208
3190
|
} else {
|
|
3209
3191
|
return html``
|