@things-factory/meta-ui 6.2.75 → 6.2.77
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,30 +1,344 @@
|
|
|
1
|
-
const a0_0x168315
|
|
1
|
+
const a0_0x168315 = a0_0x5cb8
|
|
2
|
+
function a0_0x6064() {
|
|
3
|
+
const _0xb32811 = [
|
|
4
|
+
'1091834onXVSj',
|
|
5
|
+
'fetchHandler',
|
|
6
|
+
'716436kWTdBj',
|
|
7
|
+
'2328390SXPNMj',
|
|
8
|
+
'data',
|
|
9
|
+
'after',
|
|
10
|
+
'field.approval-line',
|
|
11
|
+
'approvalLine',
|
|
12
|
+
'grist',
|
|
13
|
+
'save',
|
|
14
|
+
'select',
|
|
15
|
+
'map',
|
|
16
|
+
'approval-line',
|
|
17
|
+
'gutter',
|
|
18
|
+
'button',
|
|
19
|
+
'released',
|
|
20
|
+
'worklist/activity',
|
|
21
|
+
'label.filter-deprecated',
|
|
22
|
+
'shadowRoot',
|
|
23
|
+
'total',
|
|
24
|
+
'1369340KFDxMy',
|
|
25
|
+
'mode',
|
|
26
|
+
'value',
|
|
27
|
+
'deprecated',
|
|
28
|
+
'button.save',
|
|
29
|
+
'meta-activity-define-page',
|
|
30
|
+
'select-row-toggle',
|
|
31
|
+
'styles',
|
|
32
|
+
'define',
|
|
33
|
+
'search',
|
|
34
|
+
'activity-search-keys',
|
|
35
|
+
'gristConfig',
|
|
36
|
+
'length',
|
|
37
|
+
'includes',
|
|
38
|
+
'large',
|
|
39
|
+
'GRID',
|
|
40
|
+
'querySelector',
|
|
41
|
+
'field.supervisory-role',
|
|
42
|
+
'responses',
|
|
43
|
+
'datetime',
|
|
44
|
+
'label.status',
|
|
45
|
+
'thumbnail',
|
|
46
|
+
'reorder',
|
|
47
|
+
'field.search-keys',
|
|
48
|
+
'updateActivity',
|
|
49
|
+
'sequence',
|
|
50
|
+
'customElements',
|
|
51
|
+
'field.updated_at',
|
|
52
|
+
'field.updater',
|
|
53
|
+
'getGristPagination100Config',
|
|
54
|
+
'center',
|
|
55
|
+
'2048478kMySam',
|
|
56
|
+
'currentTarget',
|
|
57
|
+
'field.description',
|
|
58
|
+
'pageInitialized',
|
|
59
|
+
'dirtyRecords',
|
|
60
|
+
'6992NoBslh',
|
|
61
|
+
'bind',
|
|
62
|
+
'title.lookup\x20role',
|
|
63
|
+
'resource-object',
|
|
64
|
+
'cuFlag',
|
|
65
|
+
'row-selector',
|
|
66
|
+
'4fIOHgM',
|
|
67
|
+
'5103196GNIgCs',
|
|
68
|
+
'context',
|
|
69
|
+
'title.activity\x20list',
|
|
70
|
+
'searchText',
|
|
71
|
+
'state',
|
|
72
|
+
'__dirtyfields__',
|
|
73
|
+
'900eGGVLq',
|
|
74
|
+
'CARD',
|
|
75
|
+
'string',
|
|
76
|
+
'connectedCallback',
|
|
77
|
+
'updatedAt',
|
|
78
|
+
'5KdXEaW',
|
|
79
|
+
'supervisoryRole',
|
|
80
|
+
'filters',
|
|
81
|
+
'label.filter-draft',
|
|
82
|
+
'ox-grist',
|
|
83
|
+
'fetch',
|
|
84
|
+
'errors',
|
|
85
|
+
'description',
|
|
86
|
+
'filter',
|
|
87
|
+
'name',
|
|
88
|
+
'draft'
|
|
89
|
+
]
|
|
90
|
+
a0_0x6064 = function () {
|
|
91
|
+
return _0xb32811
|
|
92
|
+
}
|
|
93
|
+
return a0_0x6064()
|
|
94
|
+
}
|
|
95
|
+
;(function (_0x1ed13b, _0x2abf32) {
|
|
96
|
+
const _0x3d47c0 = a0_0x5cb8,
|
|
97
|
+
_0x12f9a3 = _0x1ed13b()
|
|
98
|
+
while (!![]) {
|
|
99
|
+
try {
|
|
100
|
+
const _0x4d69ca =
|
|
101
|
+
parseInt(_0x3d47c0(0x145)) / 0x1 +
|
|
102
|
+
parseInt(_0x3d47c0(0x131)) / 0x2 +
|
|
103
|
+
(parseInt(_0x3d47c0(0x133)) / 0x3) * (parseInt(_0x3d47c0(0x16f)) / 0x4) +
|
|
104
|
+
(parseInt(_0x3d47c0(0x126)) / 0x5) * (-parseInt(_0x3d47c0(0x164)) / 0x6) +
|
|
105
|
+
-parseInt(_0x3d47c0(0x170)) / 0x7 +
|
|
106
|
+
(parseInt(_0x3d47c0(0x169)) / 0x8) * (parseInt(_0x3d47c0(0x121)) / 0x9) +
|
|
107
|
+
-parseInt(_0x3d47c0(0x134)) / 0xa
|
|
108
|
+
if (_0x4d69ca === _0x2abf32) break
|
|
109
|
+
else _0x12f9a3['push'](_0x12f9a3['shift']())
|
|
110
|
+
} catch (_0x43f479) {
|
|
111
|
+
_0x12f9a3['push'](_0x12f9a3['shift']())
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
})(a0_0x6064, 0xe50cd)
|
|
115
|
+
import '@operato/data-grist'
|
|
116
|
+
import '@things-factory/worklist/dist-client/pages/activity/activity-model-item-list.js'
|
|
117
|
+
import { ActivityStatus } from '@things-factory/worklist/dist-client/types/types.js'
|
|
118
|
+
import a0_0x4aecb1 from 'graphql-tag'
|
|
119
|
+
import { css, html } from 'lit'
|
|
120
|
+
function a0_0x5cb8(_0x4b416a, _0x5e0aa7) {
|
|
121
|
+
const _0x6064c5 = a0_0x6064()
|
|
122
|
+
return (
|
|
123
|
+
(a0_0x5cb8 = function (_0x5cb859, _0x3951ec) {
|
|
124
|
+
_0x5cb859 = _0x5cb859 - 0x121
|
|
125
|
+
let _0x57860e = _0x6064c5[_0x5cb859]
|
|
126
|
+
return _0x57860e
|
|
127
|
+
}),
|
|
128
|
+
a0_0x5cb8(_0x4b416a, _0x5e0aa7)
|
|
129
|
+
)
|
|
130
|
+
}
|
|
131
|
+
import { client } from '@operato/graphql'
|
|
132
|
+
import { i18next, localize } from '@operato/i18n'
|
|
133
|
+
import { notify, openPopup } from '@operato/layout'
|
|
134
|
+
import { PageView } from '@operato/shell'
|
|
135
|
+
import { CommonButtonStyles, CommonGristStyles, ScrollbarStyles } from '@operato/styles'
|
|
136
|
+
import { adjustFilters, isMobileDevice } from '@operato/utils'
|
|
137
|
+
import { MetaApi } from './../../utils/meta-api'
|
|
138
|
+
class MetaActivityDefinePage extends localize(i18next)(PageView) {
|
|
139
|
+
static get [a0_0x168315(0x14c)]() {
|
|
140
|
+
return [
|
|
141
|
+
ScrollbarStyles,
|
|
142
|
+
CommonGristStyles,
|
|
143
|
+
css`
|
|
2
144
|
:host {
|
|
3
145
|
display: flex;
|
|
4
|
-
|
|
146
|
+
|
|
5
147
|
width: 100%;
|
|
6
|
-
|
|
7
|
-
--grid-record-emphasized-background-color:
|
|
8
|
-
--grid-record-emphasized-color:
|
|
148
|
+
|
|
149
|
+
--grid-record-emphasized-background-color: #8b0000;
|
|
150
|
+
--grid-record-emphasized-color: #ff6b6b;
|
|
151
|
+
}
|
|
152
|
+
`
|
|
153
|
+
]
|
|
154
|
+
}
|
|
155
|
+
static get ['properties']() {
|
|
156
|
+
return { gristConfig: Object, mode: String, grist: Object, filters: [] }
|
|
157
|
+
}
|
|
158
|
+
get [a0_0x168315(0x139)]() {
|
|
159
|
+
const _0x1e4cd8 = a0_0x168315
|
|
160
|
+
return this[_0x1e4cd8(0x143)][_0x1e4cd8(0x155)](_0x1e4cd8(0x12a))
|
|
161
|
+
}
|
|
162
|
+
async [a0_0x168315(0x124)]() {
|
|
163
|
+
const _0x49c3e7 = a0_0x168315
|
|
164
|
+
;(this[_0x49c3e7(0x146)] = isMobileDevice() ? _0x49c3e7(0x122) : _0x49c3e7(0x154)),
|
|
165
|
+
(this[_0x49c3e7(0x128)] = [_0x49c3e7(0x140)]),
|
|
166
|
+
super[_0x49c3e7(0x124)] && (await super['connectedCallback']())
|
|
167
|
+
}
|
|
168
|
+
get [a0_0x168315(0x171)]() {
|
|
169
|
+
const _0x3af41c = a0_0x168315
|
|
170
|
+
return {
|
|
171
|
+
title: i18next['t'](_0x3af41c(0x172)),
|
|
172
|
+
search: {
|
|
173
|
+
handler: _0x231e28 => {
|
|
174
|
+
const _0x173d9b = _0x3af41c
|
|
175
|
+
this['grist'][_0x173d9b(0x173)] = _0x231e28
|
|
176
|
+
},
|
|
177
|
+
value: this[_0x3af41c(0x139)]?.[_0x3af41c(0x173)] || ''
|
|
178
|
+
},
|
|
179
|
+
filter: {
|
|
180
|
+
handler: () => {
|
|
181
|
+
const _0x4986ee = _0x3af41c
|
|
182
|
+
this[_0x4986ee(0x139)]['toggleHeadroom']()
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
help: _0x3af41c(0x141),
|
|
186
|
+
actions: [
|
|
187
|
+
{
|
|
188
|
+
title: i18next['t'](_0x3af41c(0x149)),
|
|
189
|
+
action: this[_0x3af41c(0x15d)]['bind'](this),
|
|
190
|
+
...CommonButtonStyles[_0x3af41c(0x13a)]
|
|
9
191
|
}
|
|
10
|
-
|
|
11
|
-
|
|
192
|
+
]
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
['render']() {
|
|
196
|
+
const _0x30313d = a0_0x168315,
|
|
197
|
+
_0x29299d = this[_0x30313d(0x146)]
|
|
198
|
+
return html`
|
|
199
|
+
<ox-grist
|
|
200
|
+
.mode=${_0x29299d}
|
|
201
|
+
.config=${this['gristConfig']}
|
|
202
|
+
.fetchHandler=${this[_0x30313d(0x132)][_0x30313d(0x16a)](this)}
|
|
203
|
+
>
|
|
12
204
|
<div slot="headroom">
|
|
13
205
|
<div id="filters">
|
|
14
206
|
<ox-input-select-buttons
|
|
15
207
|
.value=${this[_0x30313d(0x128)]}
|
|
16
|
-
.options=${[
|
|
17
|
-
|
|
208
|
+
.options=${[
|
|
209
|
+
{ display: i18next['t'](_0x30313d(0x129)), value: _0x30313d(0x130) },
|
|
210
|
+
{ display: i18next['t']('label.filter-released'), value: _0x30313d(0x140) },
|
|
211
|
+
{ display: i18next['t'](_0x30313d(0x142)), value: _0x30313d(0x148) }
|
|
212
|
+
]}
|
|
213
|
+
@change=${_0x4adc17 => {
|
|
214
|
+
const _0xbb7685 = _0x30313d
|
|
215
|
+
_0x4adc17[_0xbb7685(0x165)] && (this[_0xbb7685(0x128)] = _0x4adc17['currentTarget'][_0xbb7685(0x147)]),
|
|
216
|
+
this[_0xbb7685(0x139)][_0xbb7685(0x12b)]()
|
|
217
|
+
}}
|
|
18
218
|
></ox-input-select-buttons>
|
|
19
219
|
</div>
|
|
20
220
|
|
|
21
221
|
<div id="modes">
|
|
22
|
-
<mwc-icon
|
|
23
|
-
|
|
222
|
+
<mwc-icon
|
|
223
|
+
@click=${() => (this[_0x30313d(0x146)] = _0x30313d(0x154))}
|
|
224
|
+
?active=${_0x30313d(0x154) == _0x29299d}
|
|
225
|
+
>grid_on</mwc-icon
|
|
226
|
+
>
|
|
227
|
+
<mwc-icon @click=${() => (this[_0x30313d(0x146)] = 'CARD')} ?active=${_0x30313d(0x122) == _0x29299d}
|
|
228
|
+
>apps</mwc-icon
|
|
229
|
+
>
|
|
24
230
|
</div>
|
|
25
231
|
</div>
|
|
26
232
|
</ox-grist>
|
|
27
|
-
|
|
233
|
+
`
|
|
234
|
+
}
|
|
235
|
+
async [a0_0x168315(0x167)](_0x306802) {
|
|
236
|
+
const _0x4dbf0b = a0_0x168315
|
|
237
|
+
this[_0x4dbf0b(0x150)] = {
|
|
238
|
+
pagination: MetaApi[_0x4dbf0b(0x162)](),
|
|
239
|
+
list: { thumbnail: _0x4dbf0b(0x15a), fields: [_0x4dbf0b(0x12f), _0x4dbf0b(0x12d)], details: [_0x4dbf0b(0x125)] },
|
|
240
|
+
columns: [
|
|
241
|
+
{ type: _0x4dbf0b(0x13e), gutterName: _0x4dbf0b(0x15e) },
|
|
242
|
+
{ type: _0x4dbf0b(0x13e), gutterName: _0x4dbf0b(0x16e), multiple: !0x0 },
|
|
243
|
+
{
|
|
244
|
+
type: 'gutter',
|
|
245
|
+
gutterName: _0x4dbf0b(0x13f),
|
|
246
|
+
title: i18next['t']('title.activity\x20model\x20item\x20list'),
|
|
247
|
+
icon: _0x4dbf0b(0x15b),
|
|
248
|
+
handlers: {
|
|
249
|
+
click: (_0x1dae2a, _0x40c6ef, _0x5bcd2a, _0x6fcf8a, _0x15fcf7) => {
|
|
250
|
+
const _0x14cbb3 = _0x4dbf0b
|
|
251
|
+
if (!_0x6fcf8a['id']) return
|
|
252
|
+
openPopup(html` <activity-model-item-list .activity=${_0x6fcf8a}></activity-model-item-list> `, {
|
|
253
|
+
backdrop: !0x0,
|
|
254
|
+
help: 'worklist/activity/activity-model-item-list',
|
|
255
|
+
size: _0x14cbb3(0x153),
|
|
256
|
+
title: i18next['t']('title.activity\x20model\x20item\x20list')
|
|
257
|
+
})['onclosed'] = () => {
|
|
258
|
+
const _0x552476 = _0x14cbb3
|
|
259
|
+
this[_0x552476(0x139)]?.[_0x552476(0x12b)]()
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
type: _0x4dbf0b(0x123),
|
|
266
|
+
name: 'name',
|
|
267
|
+
header: i18next['t']('field.name'),
|
|
268
|
+
record: { editable: !0x0 },
|
|
269
|
+
filter: _0x4dbf0b(0x14e),
|
|
270
|
+
sortable: !0x0,
|
|
271
|
+
width: 0x122
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
type: _0x4dbf0b(0x123),
|
|
275
|
+
name: _0x4dbf0b(0x12d),
|
|
276
|
+
header: i18next['t'](_0x4dbf0b(0x166)),
|
|
277
|
+
record: { editable: !0x0 },
|
|
278
|
+
filter: 'search',
|
|
279
|
+
width: 0x122
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
type: _0x4dbf0b(0x13d),
|
|
283
|
+
name: _0x4dbf0b(0x138),
|
|
284
|
+
header: i18next['t'](_0x4dbf0b(0x137)),
|
|
285
|
+
record: { editable: !0x0, align: _0x4dbf0b(0x163) },
|
|
286
|
+
width: 0x3c
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
type: _0x4dbf0b(0x13b),
|
|
290
|
+
name: _0x4dbf0b(0x174),
|
|
291
|
+
header: i18next['t'](_0x4dbf0b(0x159)),
|
|
292
|
+
record: { editable: !0x0, options: ActivityStatus },
|
|
293
|
+
filter: !0x0,
|
|
294
|
+
width: 0x50
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
type: _0x4dbf0b(0x14f),
|
|
298
|
+
name: 'searchKeys',
|
|
299
|
+
label: !0x0,
|
|
300
|
+
header: i18next['t'](_0x4dbf0b(0x15c)),
|
|
301
|
+
record: { editable: !0x0 },
|
|
302
|
+
width: 0x78
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
type: _0x4dbf0b(0x16c),
|
|
306
|
+
name: _0x4dbf0b(0x127),
|
|
307
|
+
header: i18next['t'](_0x4dbf0b(0x156)),
|
|
308
|
+
record: { editable: !0x0, options: { title: i18next['t'](_0x4dbf0b(0x16b)), queryName: 'roles' } },
|
|
309
|
+
filter: 'search',
|
|
310
|
+
width: 0x5a
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
type: 'resource-object',
|
|
314
|
+
name: 'updater',
|
|
315
|
+
header: i18next['t'](_0x4dbf0b(0x161)),
|
|
316
|
+
record: { editable: !0x1 },
|
|
317
|
+
sortable: !0x0,
|
|
318
|
+
width: 0x5a
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
type: _0x4dbf0b(0x158),
|
|
322
|
+
name: 'updatedAt',
|
|
323
|
+
header: i18next['t'](_0x4dbf0b(0x160)),
|
|
324
|
+
record: { editable: !0x1 },
|
|
325
|
+
sortable: !0x0,
|
|
326
|
+
width: 0xb4
|
|
327
|
+
}
|
|
328
|
+
],
|
|
329
|
+
rows: { selectable: { multiple: !0x0 }, handlers: { click: _0x4dbf0b(0x14b) } },
|
|
330
|
+
sorters: [{ name: _0x4dbf0b(0x12f) }]
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
async ['fetchHandler']({ page: _0x11ab22, limit: _0x222fcc, sortings: _0x1b255c = [], filters: _0x115f24 = [] }) {
|
|
334
|
+
const _0x1a8d47 = a0_0x168315,
|
|
335
|
+
_0x62f828 = [_0x1a8d47(0x130), _0x1a8d47(0x140), _0x1a8d47(0x148)][_0x1a8d47(0x12e)](_0x5c8490 =>
|
|
336
|
+
this[_0x1a8d47(0x128)]?.[_0x1a8d47(0x152)](_0x5c8490)
|
|
337
|
+
)
|
|
338
|
+
_0x62f828[_0x1a8d47(0x151)] > 0x0 &&
|
|
339
|
+
(_0x115f24 = adjustFilters(_0x115f24, [{ name: 'state', operator: 'in', value: _0x62f828 }]))
|
|
340
|
+
const _0x305b90 = await client['query']({
|
|
341
|
+
query: a0_0x4aecb1`
|
|
28
342
|
query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
|
|
29
343
|
responses: activities(filters: $filters, pagination: $pagination, sortings: $sortings) {
|
|
30
344
|
items {
|
|
@@ -106,10 +420,39 @@ const a0_0x168315=a0_0x5cb8;function a0_0x6064(){const _0xb32811=['1091834onXVSj
|
|
|
106
420
|
total
|
|
107
421
|
}
|
|
108
422
|
}
|
|
109
|
-
`,
|
|
423
|
+
`,
|
|
424
|
+
variables: { filters: _0x115f24, pagination: { page: _0x11ab22, limit: _0x222fcc }, sortings: _0x1b255c }
|
|
425
|
+
})
|
|
426
|
+
return {
|
|
427
|
+
total: _0x305b90[_0x1a8d47(0x135)][_0x1a8d47(0x157)][_0x1a8d47(0x144)] || 0x0,
|
|
428
|
+
records: _0x305b90[_0x1a8d47(0x135)][_0x1a8d47(0x157)]['items'] || []
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
async [a0_0x168315(0x15d)]() {
|
|
432
|
+
const _0x25ad24 = a0_0x168315
|
|
433
|
+
let _0x50369c = this['grist']?.[_0x25ad24(0x168)]
|
|
434
|
+
_0x50369c &&
|
|
435
|
+
_0x50369c['length'] &&
|
|
436
|
+
((_0x50369c = _0x50369c[_0x25ad24(0x13c)](_0x5f0c97 => {
|
|
437
|
+
const _0x45e729 = _0x25ad24
|
|
438
|
+
let _0x4330e5 = _0x5f0c97['id'] ? { id: _0x5f0c97['id'] } : {}
|
|
439
|
+
const _0x2b9eec = _0x5f0c97[_0x45e729(0x175)]
|
|
440
|
+
for (let _0x428555 in _0x2b9eec) _0x4330e5[_0x428555] = _0x2b9eec[_0x428555][_0x45e729(0x136)]
|
|
441
|
+
return (_0x4330e5[_0x45e729(0x16d)] = _0x5f0c97['__dirty__']), _0x4330e5
|
|
442
|
+
})),
|
|
443
|
+
(
|
|
444
|
+
await client['mutate']({
|
|
445
|
+
mutation: a0_0x4aecb1`
|
|
110
446
|
mutation ($patches: [ActivityPatch!]!) {
|
|
111
447
|
updateMultipleActivity(patches: $patches) {
|
|
112
448
|
name
|
|
113
449
|
}
|
|
114
450
|
}
|
|
115
|
-
`,
|
|
451
|
+
`,
|
|
452
|
+
variables: { patches: _0x50369c },
|
|
453
|
+
context: { hasUpload: !0x0 }
|
|
454
|
+
})
|
|
455
|
+
)[_0x25ad24(0x12c)] || this[_0x25ad24(0x139)]?.[_0x25ad24(0x12b)]())
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
window[a0_0x168315(0x15f)][a0_0x168315(0x14d)](a0_0x168315(0x14a), MetaActivityDefinePage)
|