@things-factory/worklist 7.0.1-alpha.26 → 7.0.1-alpha.30
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/grist-editor/popup-activity-search-keys-input.ts +4 -9
- package/client/pages/activity-approval/activity-approval-importer.ts +4 -11
- package/client/pages/activity-stats/activity-stats-importer.ts +4 -11
- package/client/pages/activity-template/activity-template-importer.ts +4 -11
- package/client/pages/activity-thread/activity-thread-importer.ts +6 -15
- package/client/pages/installable-activity/installable-activity-list-page.ts +1 -4
- package/client/pages/todo/approval-done-list-page.ts +1 -4
- package/client/pages/todo/approval-pending-list-page.ts +1 -4
- package/client/pages/todo/done-list-page.ts +1 -4
- package/client/pages/todo/pickable-list-page.ts +1 -4
- package/client/pages/todo/todo-list-page.ts +1 -4
- package/dist-client/grist-editor/popup-activity-search-keys-input.js +4 -9
- package/dist-client/grist-editor/popup-activity-search-keys-input.js.map +1 -1
- package/dist-client/pages/activity-approval/activity-approval-importer.d.ts +1 -0
- package/dist-client/pages/activity-approval/activity-approval-importer.js +4 -11
- package/dist-client/pages/activity-approval/activity-approval-importer.js.map +1 -1
- package/dist-client/pages/activity-stats/activity-stats-importer.d.ts +1 -0
- package/dist-client/pages/activity-stats/activity-stats-importer.js +4 -11
- package/dist-client/pages/activity-stats/activity-stats-importer.js.map +1 -1
- package/dist-client/pages/activity-template/activity-template-importer.d.ts +1 -0
- package/dist-client/pages/activity-template/activity-template-importer.js +4 -11
- package/dist-client/pages/activity-template/activity-template-importer.js.map +1 -1
- package/dist-client/pages/activity-thread/activity-thread-importer.d.ts +1 -0
- package/dist-client/pages/activity-thread/activity-thread-importer.js +6 -15
- package/dist-client/pages/activity-thread/activity-thread-importer.js.map +1 -1
- package/dist-client/pages/installable-activity/installable-activity-list-page.js +1 -4
- package/dist-client/pages/installable-activity/installable-activity-list-page.js.map +1 -1
- package/dist-client/pages/todo/approval-done-list-page.js +1 -4
- package/dist-client/pages/todo/approval-done-list-page.js.map +1 -1
- package/dist-client/pages/todo/approval-pending-list-page.js +1 -4
- package/dist-client/pages/todo/approval-pending-list-page.js.map +1 -1
- package/dist-client/pages/todo/done-list-page.js +1 -4
- package/dist-client/pages/todo/done-list-page.js.map +1 -1
- package/dist-client/pages/todo/pickable-list-page.js +1 -4
- package/dist-client/pages/todo/pickable-list-page.js.map +1 -1
- package/dist-client/pages/todo/todo-list-page.js +1 -4
- package/dist-client/pages/todo/todo-list-page.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -9
|
@@ -3,7 +3,7 @@ import { customElement, property, query, state } from 'lit/decorators.js'
|
|
|
3
3
|
|
|
4
4
|
import { i18next } from '@operato/i18n'
|
|
5
5
|
import { closePopup } from '@operato/popup'
|
|
6
|
-
import { ScrollbarStyles } from '@operato/styles'
|
|
6
|
+
import { ButtonContainerStyles, ScrollbarStyles } from '@operato/styles'
|
|
7
7
|
import { isMobileDevice } from '@operato/utils'
|
|
8
8
|
import { getEditor, getRenderer, ColumnConfig, DataGrist, FetchOption, SortersControl } from '@operato/data-grist'
|
|
9
9
|
import { ActivitySearchKeyItem } from '../types/activity-search-key-item-type'
|
|
@@ -11,6 +11,7 @@ import { ActivitySearchKeyItem } from '../types/activity-search-key-item-type'
|
|
|
11
11
|
@customElement('popup-activity-search-keys-input')
|
|
12
12
|
export class PopupActivitySearchKeysInput extends LitElement {
|
|
13
13
|
static styles = [
|
|
14
|
+
ButtonContainerStyles,
|
|
14
15
|
ScrollbarStyles,
|
|
15
16
|
css`
|
|
16
17
|
:host {
|
|
@@ -26,12 +27,6 @@ export class PopupActivitySearchKeysInput extends LitElement {
|
|
|
26
27
|
ox-grist {
|
|
27
28
|
flex: 1;
|
|
28
29
|
}
|
|
29
|
-
|
|
30
|
-
.button-container {
|
|
31
|
-
display: flex;
|
|
32
|
-
margin-left: auto;
|
|
33
|
-
padding: var(--padding-default);
|
|
34
|
-
}
|
|
35
30
|
`
|
|
36
31
|
]
|
|
37
32
|
|
|
@@ -127,8 +122,8 @@ export class PopupActivitySearchKeysInput extends LitElement {
|
|
|
127
122
|
<ox-grist .mode=${isMobileDevice() ? 'LIST' : 'GRID'} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}></ox-grist>
|
|
128
123
|
|
|
129
124
|
<div class="button-container">
|
|
130
|
-
<
|
|
131
|
-
<
|
|
125
|
+
<button @click=${this.onCancel.bind(this)} danger><md-icon>cancel</md-icon>${i18next.t('button.cancel')}</button>
|
|
126
|
+
<button @click=${this.onConfirm.bind(this)}><md-icon>done</md-icon>${i18next.t('button.confirm')}</button>
|
|
132
127
|
</div>
|
|
133
128
|
`
|
|
134
129
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
1
2
|
import '@operato/data-grist'
|
|
2
3
|
|
|
3
4
|
import gql from 'graphql-tag'
|
|
@@ -7,9 +8,11 @@ import { property } from 'lit/decorators.js'
|
|
|
7
8
|
import { client } from '@operato/graphql'
|
|
8
9
|
import { i18next } from '@operato/i18n'
|
|
9
10
|
import { isMobileDevice } from '@operato/utils'
|
|
11
|
+
import { ButtonContainerStyles } from '@operato/styles'
|
|
10
12
|
|
|
11
13
|
export class ActivityApprovalImporter extends LitElement {
|
|
12
14
|
static styles = [
|
|
15
|
+
ButtonContainerStyles,
|
|
13
16
|
css`
|
|
14
17
|
:host {
|
|
15
18
|
display: flex;
|
|
@@ -21,16 +24,6 @@ export class ActivityApprovalImporter extends LitElement {
|
|
|
21
24
|
ox-grist {
|
|
22
25
|
flex: 1;
|
|
23
26
|
}
|
|
24
|
-
|
|
25
|
-
.button-container {
|
|
26
|
-
display: flex;
|
|
27
|
-
margin-left: auto;
|
|
28
|
-
padding: var(--padding-default);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
md-elevated-button {
|
|
32
|
-
margin-left: var(--margin-default);
|
|
33
|
-
}
|
|
34
27
|
`
|
|
35
28
|
]
|
|
36
29
|
|
|
@@ -71,7 +64,7 @@ export class ActivityApprovalImporter extends LitElement {
|
|
|
71
64
|
></ox-grist>
|
|
72
65
|
|
|
73
66
|
<div class="button-container">
|
|
74
|
-
<
|
|
67
|
+
<button @click=${this.save.bind(this)}><md-icon>save</md-icon>${i18next.t('button.save')}</button>
|
|
75
68
|
</div>
|
|
76
69
|
`
|
|
77
70
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
1
2
|
import '@operato/data-grist'
|
|
2
3
|
|
|
3
4
|
import gql from 'graphql-tag'
|
|
@@ -7,9 +8,11 @@ import { property } from 'lit/decorators.js'
|
|
|
7
8
|
import { client } from '@operato/graphql'
|
|
8
9
|
import { i18next } from '@operato/i18n'
|
|
9
10
|
import { isMobileDevice } from '@operato/utils'
|
|
11
|
+
import { ButtonContainerStyles } from '@operato/styles'
|
|
10
12
|
|
|
11
13
|
export class ActivityStatsImporter extends LitElement {
|
|
12
14
|
static styles = [
|
|
15
|
+
ButtonContainerStyles,
|
|
13
16
|
css`
|
|
14
17
|
:host {
|
|
15
18
|
display: flex;
|
|
@@ -21,16 +24,6 @@ export class ActivityStatsImporter extends LitElement {
|
|
|
21
24
|
ox-grist {
|
|
22
25
|
flex: 1;
|
|
23
26
|
}
|
|
24
|
-
|
|
25
|
-
.button-container {
|
|
26
|
-
display: flex;
|
|
27
|
-
margin-left: auto;
|
|
28
|
-
padding: var(--padding-default);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
md-elevated-button {
|
|
32
|
-
margin-left: var(--margin-default);
|
|
33
|
-
}
|
|
34
27
|
`
|
|
35
28
|
]
|
|
36
29
|
|
|
@@ -71,7 +64,7 @@ export class ActivityStatsImporter extends LitElement {
|
|
|
71
64
|
></ox-grist>
|
|
72
65
|
|
|
73
66
|
<div class="button-container">
|
|
74
|
-
<
|
|
67
|
+
<button @click=${this.save.bind(this)}><md-icon>save</md-icon>${i18next.t('button.save')}</button>
|
|
75
68
|
</div>
|
|
76
69
|
`
|
|
77
70
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
1
2
|
import '@operato/data-grist'
|
|
2
3
|
|
|
3
4
|
import gql from 'graphql-tag'
|
|
@@ -7,10 +8,12 @@ import { customElement, property } from 'lit/decorators.js'
|
|
|
7
8
|
import { client } from '@operato/graphql'
|
|
8
9
|
import { i18next } from '@operato/i18n'
|
|
9
10
|
import { isMobileDevice } from '@operato/utils'
|
|
11
|
+
import { ButtonContainerStyles } from '@operato/styles'
|
|
10
12
|
|
|
11
13
|
@customElement('activity-template-importer')
|
|
12
14
|
export class ActivityTemplateImporter extends LitElement {
|
|
13
15
|
static styles = [
|
|
16
|
+
ButtonContainerStyles,
|
|
14
17
|
css`
|
|
15
18
|
:host {
|
|
16
19
|
display: flex;
|
|
@@ -22,16 +25,6 @@ export class ActivityTemplateImporter extends LitElement {
|
|
|
22
25
|
ox-grist {
|
|
23
26
|
flex: 1;
|
|
24
27
|
}
|
|
25
|
-
|
|
26
|
-
.button-container {
|
|
27
|
-
display: flex;
|
|
28
|
-
margin-left: auto;
|
|
29
|
-
padding: var(--padding-default);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
md-elevated-button {
|
|
33
|
-
margin-left: var(--margin-default);
|
|
34
|
-
}
|
|
35
28
|
`
|
|
36
29
|
]
|
|
37
30
|
|
|
@@ -77,7 +70,7 @@ export class ActivityTemplateImporter extends LitElement {
|
|
|
77
70
|
></ox-grist>
|
|
78
71
|
|
|
79
72
|
<div class="button-container">
|
|
80
|
-
<
|
|
73
|
+
<button @click=${this.save.bind(this)}><md-icon>save</md-icon>${i18next.t('button.save')}</button>
|
|
81
74
|
</div>
|
|
82
75
|
`
|
|
83
76
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
1
2
|
import '@operato/data-grist'
|
|
2
3
|
|
|
3
4
|
import gql from 'graphql-tag'
|
|
@@ -7,10 +8,12 @@ import { customElement, property } from 'lit/decorators.js'
|
|
|
7
8
|
import { client } from '@operato/graphql'
|
|
8
9
|
import { i18next } from '@operato/i18n'
|
|
9
10
|
import { isMobileDevice } from '@operato/utils'
|
|
11
|
+
import { ButtonContainerStyles } from '@operato/styles'
|
|
10
12
|
|
|
11
13
|
@customElement('activity-thread-importer')
|
|
12
14
|
export class ActivityThreadImporter extends LitElement {
|
|
13
15
|
static styles = [
|
|
16
|
+
ButtonContainerStyles,
|
|
14
17
|
css`
|
|
15
18
|
:host {
|
|
16
19
|
display: flex;
|
|
@@ -22,16 +25,6 @@ export class ActivityThreadImporter extends LitElement {
|
|
|
22
25
|
ox-grist {
|
|
23
26
|
flex: 1;
|
|
24
27
|
}
|
|
25
|
-
|
|
26
|
-
.button-container {
|
|
27
|
-
display: flex;
|
|
28
|
-
margin-left: auto;
|
|
29
|
-
padding: var(--padding-default);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
md-elevated-button {
|
|
33
|
-
margin-left: var(--margin-default);
|
|
34
|
-
}
|
|
35
28
|
`
|
|
36
29
|
]
|
|
37
30
|
|
|
@@ -67,8 +60,7 @@ export class ActivityThreadImporter extends LitElement {
|
|
|
67
60
|
}
|
|
68
61
|
|
|
69
62
|
render() {
|
|
70
|
-
return html`
|
|
71
|
-
<ox-grist
|
|
63
|
+
return html` <ox-grist
|
|
72
64
|
.mode=${isMobileDevice() ? 'LIST' : 'GRID'}
|
|
73
65
|
.config=${this.columns}
|
|
74
66
|
.data=${{
|
|
@@ -77,9 +69,8 @@ export class ActivityThreadImporter extends LitElement {
|
|
|
77
69
|
></ox-grist>
|
|
78
70
|
|
|
79
71
|
<div class="button-container">
|
|
80
|
-
<
|
|
81
|
-
</div
|
|
82
|
-
`
|
|
72
|
+
<button @click=${this.save.bind(this)}><md-icon>save</md-icon>${i18next.t('button.save')}</button>
|
|
73
|
+
</div>`
|
|
83
74
|
}
|
|
84
75
|
|
|
85
76
|
async save() {
|
|
@@ -69,10 +69,7 @@ export class ActivityTemplateListPage extends connect(store)(localize(i18next)(P
|
|
|
69
69
|
return html`
|
|
70
70
|
<ox-grist .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>
|
|
71
71
|
<div slot="headroom" class="header">
|
|
72
|
-
<div class="title">
|
|
73
|
-
<md-icon>apps</md-icon>
|
|
74
|
-
${i18next.t('title.installable activity list')}
|
|
75
|
-
</div>
|
|
72
|
+
<div class="title">${i18next.t('title.installable activity list')}</div>
|
|
76
73
|
|
|
77
74
|
<ox-context-page-toolbar class="actions" .context=${this.context}></ox-context-page-toolbar>
|
|
78
75
|
</div>
|
|
@@ -69,10 +69,7 @@ export class ApprovalDoneListPage extends connect(store)(localize(i18next)(PageV
|
|
|
69
69
|
return html`
|
|
70
70
|
<ox-grist .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>
|
|
71
71
|
<div slot="headroom" class="header">
|
|
72
|
-
<div class="title">
|
|
73
|
-
<md-icon>apps</md-icon>
|
|
74
|
-
${i18next.t('title.approval done list')}
|
|
75
|
-
</div>
|
|
72
|
+
<div class="title">${i18next.t('title.approval done list')}</div>
|
|
76
73
|
|
|
77
74
|
<div class="filters">
|
|
78
75
|
<ox-input-select-buttons
|
|
@@ -74,10 +74,7 @@ export class ApprovalPendingListPage extends connect(store)(localize(i18next)(Pa
|
|
|
74
74
|
return html`
|
|
75
75
|
<ox-grist .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>
|
|
76
76
|
<div slot="headroom" class="header">
|
|
77
|
-
<div class="title">
|
|
78
|
-
<md-icon>apps</md-icon>
|
|
79
|
-
${i18next.t('title.approval pending list')}
|
|
80
|
-
</div>
|
|
77
|
+
<div class="title">${i18next.t('title.approval pending list')}</div>
|
|
81
78
|
|
|
82
79
|
<div class="filters">
|
|
83
80
|
<ox-input-select-buttons
|
|
@@ -71,10 +71,7 @@ export class DoneListPage extends connect(store)(localize(i18next)(PageView)) {
|
|
|
71
71
|
return html`
|
|
72
72
|
<ox-grist .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>
|
|
73
73
|
<div slot="headroom" class="header">
|
|
74
|
-
<div class="title">
|
|
75
|
-
<md-icon>apps</md-icon>
|
|
76
|
-
${i18next.t('title.done list')}
|
|
77
|
-
</div>
|
|
74
|
+
<div class="title">${i18next.t('title.done list')}</div>
|
|
78
75
|
|
|
79
76
|
<div class="filters">
|
|
80
77
|
<ox-input-select-buttons
|
|
@@ -71,10 +71,7 @@ export class PickableListPage extends connect(store)(localize(i18next)(PageView)
|
|
|
71
71
|
return html`
|
|
72
72
|
<ox-grist .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>
|
|
73
73
|
<div slot="headroom" class="header">
|
|
74
|
-
<div class="title">
|
|
75
|
-
<md-icon>apps</md-icon>
|
|
76
|
-
${i18next.t('title.activity shopping')}
|
|
77
|
-
</div>
|
|
74
|
+
<div class="title">${i18next.t('title.activity shopping')}</div>
|
|
78
75
|
|
|
79
76
|
<div class="filters">
|
|
80
77
|
<ox-input-select-buttons
|
|
@@ -76,10 +76,7 @@ export class TodoListPage extends connect(store)(localize(i18next)(PageView)) {
|
|
|
76
76
|
return html`
|
|
77
77
|
<ox-grist .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>
|
|
78
78
|
<div slot="headroom" class="header">
|
|
79
|
-
<div class="title">
|
|
80
|
-
<md-icon>apps</md-icon>
|
|
81
|
-
${i18next.t('title.todo list')}
|
|
82
|
-
</div>
|
|
79
|
+
<div class="title">${i18next.t('title.todo list')}</div>
|
|
83
80
|
|
|
84
81
|
<div class="filters">
|
|
85
82
|
<ox-input-select-buttons
|
|
@@ -3,7 +3,7 @@ import { css, html, LitElement } from 'lit';
|
|
|
3
3
|
import { customElement, property, query, state } from 'lit/decorators.js';
|
|
4
4
|
import { i18next } from '@operato/i18n';
|
|
5
5
|
import { closePopup } from '@operato/popup';
|
|
6
|
-
import { ScrollbarStyles } from '@operato/styles';
|
|
6
|
+
import { ButtonContainerStyles, ScrollbarStyles } from '@operato/styles';
|
|
7
7
|
import { isMobileDevice } from '@operato/utils';
|
|
8
8
|
import { DataGrist } from '@operato/data-grist';
|
|
9
9
|
let PopupActivitySearchKeysInput = class PopupActivitySearchKeysInput extends LitElement {
|
|
@@ -97,8 +97,8 @@ let PopupActivitySearchKeysInput = class PopupActivitySearchKeysInput extends Li
|
|
|
97
97
|
<ox-grist .mode=${isMobileDevice() ? 'LIST' : 'GRID'} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}></ox-grist>
|
|
98
98
|
|
|
99
99
|
<div class="button-container">
|
|
100
|
-
<
|
|
101
|
-
<
|
|
100
|
+
<button @click=${this.onCancel.bind(this)} danger><md-icon>cancel</md-icon>${i18next.t('button.cancel')}</button>
|
|
101
|
+
<button @click=${this.onConfirm.bind(this)}><md-icon>done</md-icon>${i18next.t('button.confirm')}</button>
|
|
102
102
|
</div>
|
|
103
103
|
`;
|
|
104
104
|
}
|
|
@@ -127,6 +127,7 @@ let PopupActivitySearchKeysInput = class PopupActivitySearchKeysInput extends Li
|
|
|
127
127
|
}
|
|
128
128
|
};
|
|
129
129
|
PopupActivitySearchKeysInput.styles = [
|
|
130
|
+
ButtonContainerStyles,
|
|
130
131
|
ScrollbarStyles,
|
|
131
132
|
css `
|
|
132
133
|
:host {
|
|
@@ -142,12 +143,6 @@ PopupActivitySearchKeysInput.styles = [
|
|
|
142
143
|
ox-grist {
|
|
143
144
|
flex: 1;
|
|
144
145
|
}
|
|
145
|
-
|
|
146
|
-
.button-container {
|
|
147
|
-
display: flex;
|
|
148
|
-
margin-left: auto;
|
|
149
|
-
padding: var(--padding-default);
|
|
150
|
-
}
|
|
151
146
|
`
|
|
152
147
|
];
|
|
153
148
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popup-activity-search-keys-input.js","sourceRoot":"","sources":["../../client/grist-editor/popup-activity-search-keys-input.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAEzE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"popup-activity-search-keys-input.js","sourceRoot":"","sources":["../../client/grist-editor/popup-activity-search-keys-input.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAEzE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAC3C,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAwC,SAAS,EAA+B,MAAM,qBAAqB,CAAA;AAI3G,IAAM,4BAA4B,GAAlC,MAAM,4BAA6B,SAAQ,UAAU;IAArD;;QAqBsB,UAAK,GAA4B,EAAE,CAAA;QAGrD,gBAAW,GAAQ;YAC1B,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,MAAM,EAAE,aAAa,EAAE,QAAQ,CAAC,EAAE;YACnD,OAAO,EAAE;gBACP,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE;gBA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AAO;gBACL,IAAI;gBACJ,WAAW;gBACX,QAAQ;gBACR,IAAI;aACL,CAAA;QACH,CAAC,CAAC,CAAA;QAEF,IAAI,CAAC,eAAe,IAAI,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QACxD,UAAU,CAAC,IAAI,CAAC,CAAA;IAClB,CAAC;;AAhJM,mCAAM,GAAG;IACd,qBAAqB;IACrB,eAAe;IACf,GAAG,CAAA;;;;;;;;;;;;;;KAcF;CACF,CAAA;AAED;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;;2DAAoC;AAC9D;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;qEAAwC;AAEnE;IAAC,KAAK,EAAE;;iEAgFP;AAED;IAAC,KAAK,CAAC,UAAU,CAAC;8BAAiB,SAAS;2DAAA;AA1GjC,4BAA4B;IADxC,aAAa,CAAC,kCAAkC,CAAC;GACrC,4BAA4B,CAkJxC;SAlJY,4BAA4B","sourcesContent":["import { css, html, LitElement } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\n\nimport { i18next } from '@operato/i18n'\nimport { closePopup } from '@operato/popup'\nimport { ButtonContainerStyles, ScrollbarStyles } from '@operato/styles'\nimport { isMobileDevice } from '@operato/utils'\nimport { getEditor, getRenderer, ColumnConfig, DataGrist, FetchOption, SortersControl } from '@operato/data-grist'\nimport { ActivitySearchKeyItem } from '../types/activity-search-key-item-type'\n\n@customElement('popup-activity-search-keys-input')\nexport class PopupActivitySearchKeysInput extends LitElement {\n static styles = [\n ButtonContainerStyles,\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n background-color: #fff;\n\n width: var(--overlay-center-normal-width, 50%);\n height: var(--overlay-center-normal-height, 50%);\n }\n\n ox-grist {\n flex: 1;\n }\n `\n ]\n\n @property({ type: Array }) value: ActivitySearchKeyItem[] = []\n @property({ type: Object }) confirmCallback!: (newval: any) => void\n\n @state() gristConfig: any = {\n list: { fields: ['name', 'description', 'active'] },\n columns: [\n { type: 'gutter', gutterName: 'sequence' },\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'add',\n handlers: {\n click: 'record-copy'\n }\n },\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'delete',\n handlers: {\n click: 'record-delete'\n }\n },\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'arrow_upward',\n handlers: {\n click: 'move-up'\n }\n },\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'arrow_downward',\n handlers: {\n click: 'move-down'\n }\n },\n {\n type: 'string',\n name: 'name',\n header: i18next.t('field.name'),\n record: {\n editable: true\n },\n width: 140\n },\n {\n type: 'string',\n name: 'description',\n header: i18next.t('field.description'),\n record: {\n editable: true\n },\n width: 180\n },\n {\n type: 'string',\n name: 'inputKey',\n header: i18next.t('field.input-key'),\n record: {\n editable: true\n },\n width: 180\n },\n {\n type: 'string',\n name: 'tKey',\n header: i18next.t('field.t-key'),\n record: {\n editable: true\n },\n width: 180\n }\n ],\n rows: {\n selectable: false\n },\n pagination: {\n infinite: true\n },\n sorters: []\n }\n\n @query('ox-grist') private grist!: DataGrist\n\n render() {\n return html`\n <ox-grist .mode=${isMobileDevice() ? 'LIST' : 'GRID'} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}></ox-grist>\n\n <div class=\"button-container\">\n <button @click=${this.onCancel.bind(this)} danger><md-icon>cancel</md-icon>${i18next.t('button.cancel')}</button>\n <button @click=${this.onConfirm.bind(this)}><md-icon>done</md-icon>${i18next.t('button.confirm')}</button>\n </div>\n `\n }\n\n async fetchHandler({ page, limit, sortings = [], filters = [] }: FetchOption) {\n const records = this.value || []\n return {\n total: records.length,\n records\n }\n }\n\n private onCancel(e: Event) {\n closePopup(this)\n }\n\n private onConfirm(e: Event) {\n this.grist.commit()\n\n this.value = this.grist.data.records.map(({ name, description, inputKey, tKey }) => {\n return {\n name,\n description,\n inputKey,\n tKey\n }\n })\n\n this.confirmCallback && this.confirmCallback(this.value)\n closePopup(this)\n }\n}\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
import '@material/web/icon/icon.js';
|
|
2
3
|
import '@operato/data-grist';
|
|
3
4
|
import gql from 'graphql-tag';
|
|
4
5
|
import { css, html, LitElement } from 'lit';
|
|
@@ -6,6 +7,7 @@ import { property } from 'lit/decorators.js';
|
|
|
6
7
|
import { client } from '@operato/graphql';
|
|
7
8
|
import { i18next } from '@operato/i18n';
|
|
8
9
|
import { isMobileDevice } from '@operato/utils';
|
|
10
|
+
import { ButtonContainerStyles } from '@operato/styles';
|
|
9
11
|
export class ActivityApprovalImporter extends LitElement {
|
|
10
12
|
constructor() {
|
|
11
13
|
super(...arguments);
|
|
@@ -46,7 +48,7 @@ export class ActivityApprovalImporter extends LitElement {
|
|
|
46
48
|
></ox-grist>
|
|
47
49
|
|
|
48
50
|
<div class="button-container">
|
|
49
|
-
<
|
|
51
|
+
<button @click=${this.save.bind(this)}><md-icon>save</md-icon>${i18next.t('button.save')}</button>
|
|
50
52
|
</div>
|
|
51
53
|
`;
|
|
52
54
|
}
|
|
@@ -66,6 +68,7 @@ export class ActivityApprovalImporter extends LitElement {
|
|
|
66
68
|
}
|
|
67
69
|
}
|
|
68
70
|
ActivityApprovalImporter.styles = [
|
|
71
|
+
ButtonContainerStyles,
|
|
69
72
|
css `
|
|
70
73
|
:host {
|
|
71
74
|
display: flex;
|
|
@@ -77,16 +80,6 @@ ActivityApprovalImporter.styles = [
|
|
|
77
80
|
ox-grist {
|
|
78
81
|
flex: 1;
|
|
79
82
|
}
|
|
80
|
-
|
|
81
|
-
.button-container {
|
|
82
|
-
display: flex;
|
|
83
|
-
margin-left: auto;
|
|
84
|
-
padding: var(--padding-default);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
md-elevated-button {
|
|
88
|
-
margin-left: var(--margin-default);
|
|
89
|
-
}
|
|
90
83
|
`
|
|
91
84
|
];
|
|
92
85
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity-approval-importer.js","sourceRoot":"","sources":["../../../client/pages/activity-approval/activity-approval-importer.ts"],"names":[],"mappings":";AAAA,OAAO,qBAAqB,CAAA;AAE5B,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE5C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"activity-approval-importer.js","sourceRoot":"","sources":["../../../client/pages/activity-approval/activity-approval-importer.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,qBAAqB,CAAA;AAE5B,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE5C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAA;AAEvD,MAAM,OAAO,wBAAyB,SAAQ,UAAU;IAAxD;;QAiB6B,sBAAiB,GAAU,EAAE,CAAA;QAC5B,YAAO,GAAG;YACpC,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,MAAM,EAAE,aAAa,CAAC,EAAE;YACzC,UAAU,EAAE,EAAE,QAAQ,EA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AA;AAED;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;;mEAA8B;AACxD;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;yDAuB1B","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/data-grist'\n\nimport gql from 'graphql-tag'\nimport { css, html, LitElement } from 'lit'\nimport { property } from 'lit/decorators.js'\n\nimport { client } from '@operato/graphql'\nimport { i18next } from '@operato/i18n'\nimport { isMobileDevice } from '@operato/utils'\nimport { ButtonContainerStyles } from '@operato/styles'\n\nexport class ActivityApprovalImporter extends LitElement {\n static styles = [\n ButtonContainerStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n background-color: #fff;\n }\n\n ox-grist {\n flex: 1;\n }\n `\n ]\n\n @property({ type: Array }) activityApprovals: any[] = []\n @property({ type: Object }) columns = {\n list: { fields: ['name', 'description'] },\n pagination: { infinite: true },\n columns: [\n {\n type: 'string',\n name: 'name',\n header: i18next.t('field.name'),\n width: 150\n },\n {\n type: 'string',\n name: 'description',\n header: i18next.t('field.description'),\n width: 200\n },\n {\n type: 'checkbox',\n name: 'active',\n header: i18next.t('field.active'),\n width: 60\n }\n ]\n }\n\n render() {\n return html`\n <ox-grist\n .mode=${isMobileDevice() ? 'LIST' : 'GRID'}\n .config=${this.columns}\n .data=${{\n records: this.activityApprovals\n }}\n ></ox-grist>\n\n <div class=\"button-container\">\n <button @click=${this.save.bind(this)}><md-icon>save</md-icon>${i18next.t('button.save')}</button>\n </div>\n `\n }\n\n async save() {\n const response = await client.mutate({\n mutation: gql`\n mutation importActivityApprovals($activityApprovals: [ActivityApprovalPatch!]!) {\n importActivityApprovals(activityApprovals: $activityApprovals)\n }\n `,\n variables: { activityApprovals: this.activityApprovals }\n })\n\n if (response.errors?.length) return\n\n this.dispatchEvent(new CustomEvent('imported'))\n }\n}\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
import '@material/web/icon/icon.js';
|
|
2
3
|
import '@operato/data-grist';
|
|
3
4
|
import gql from 'graphql-tag';
|
|
4
5
|
import { css, html, LitElement } from 'lit';
|
|
@@ -6,6 +7,7 @@ import { property } from 'lit/decorators.js';
|
|
|
6
7
|
import { client } from '@operato/graphql';
|
|
7
8
|
import { i18next } from '@operato/i18n';
|
|
8
9
|
import { isMobileDevice } from '@operato/utils';
|
|
10
|
+
import { ButtonContainerStyles } from '@operato/styles';
|
|
9
11
|
export class ActivityStatsImporter extends LitElement {
|
|
10
12
|
constructor() {
|
|
11
13
|
super(...arguments);
|
|
@@ -46,7 +48,7 @@ export class ActivityStatsImporter extends LitElement {
|
|
|
46
48
|
></ox-grist>
|
|
47
49
|
|
|
48
50
|
<div class="button-container">
|
|
49
|
-
<
|
|
51
|
+
<button @click=${this.save.bind(this)}><md-icon>save</md-icon>${i18next.t('button.save')}</button>
|
|
50
52
|
</div>
|
|
51
53
|
`;
|
|
52
54
|
}
|
|
@@ -66,6 +68,7 @@ export class ActivityStatsImporter extends LitElement {
|
|
|
66
68
|
}
|
|
67
69
|
}
|
|
68
70
|
ActivityStatsImporter.styles = [
|
|
71
|
+
ButtonContainerStyles,
|
|
69
72
|
css `
|
|
70
73
|
:host {
|
|
71
74
|
display: flex;
|
|
@@ -77,16 +80,6 @@ ActivityStatsImporter.styles = [
|
|
|
77
80
|
ox-grist {
|
|
78
81
|
flex: 1;
|
|
79
82
|
}
|
|
80
|
-
|
|
81
|
-
.button-container {
|
|
82
|
-
display: flex;
|
|
83
|
-
margin-left: auto;
|
|
84
|
-
padding: var(--padding-default);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
md-elevated-button {
|
|
88
|
-
margin-left: var(--margin-default);
|
|
89
|
-
}
|
|
90
83
|
`
|
|
91
84
|
];
|
|
92
85
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity-stats-importer.js","sourceRoot":"","sources":["../../../client/pages/activity-stats/activity-stats-importer.ts"],"names":[],"mappings":";AAAA,OAAO,qBAAqB,CAAA;AAE5B,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE5C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"activity-stats-importer.js","sourceRoot":"","sources":["../../../client/pages/activity-stats/activity-stats-importer.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,qBAAqB,CAAA;AAE5B,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE5C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAA;AAEvD,MAAM,OAAO,qBAAsB,SAAQ,UAAU;IAArD;;QAiB6B,kBAAa,GAAU,EAAE,CAAA;QACxB,YAAO,GAAG;YACpC,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,MAAM,EAAE,aAAa,CAAC,EAAE;YACzC,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;YAC9B,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,MAAM;oBACZ,MAAM,EAAE,OAAO,CAAC,CA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AAC;;sDAuB1B","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/data-grist'\n\nimport gql from 'graphql-tag'\nimport { css, html, LitElement } from 'lit'\nimport { property } from 'lit/decorators.js'\n\nimport { client } from '@operato/graphql'\nimport { i18next } from '@operato/i18n'\nimport { isMobileDevice } from '@operato/utils'\nimport { ButtonContainerStyles } from '@operato/styles'\n\nexport class ActivityStatsImporter extends LitElement {\n static styles = [\n ButtonContainerStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n background-color: #fff;\n }\n\n ox-grist {\n flex: 1;\n }\n `\n ]\n\n @property({ type: Array }) activityStats: any[] = []\n @property({ type: Object }) columns = {\n list: { fields: ['name', 'description'] },\n pagination: { infinite: true },\n columns: [\n {\n type: 'string',\n name: 'name',\n header: i18next.t('field.name'),\n width: 150\n },\n {\n type: 'string',\n name: 'description',\n header: i18next.t('field.description'),\n width: 200\n },\n {\n type: 'checkbox',\n name: 'active',\n header: i18next.t('field.active'),\n width: 60\n }\n ]\n }\n\n render() {\n return html`\n <ox-grist\n .mode=${isMobileDevice() ? 'LIST' : 'GRID'}\n .config=${this.columns}\n .data=${{\n records: this.activityStats\n }}\n ></ox-grist>\n\n <div class=\"button-container\">\n <button @click=${this.save.bind(this)}><md-icon>save</md-icon>${i18next.t('button.save')}</button>\n </div>\n `\n }\n\n async save() {\n const response = await client.mutate({\n mutation: gql`\n mutation importActivityStats($activityStats: [ActivityStatsPatch!]!) {\n importActivityStats(activityStats: $activityStats)\n }\n `,\n variables: { activityStats: this.activityStats }\n })\n\n if (response.errors?.length) return\n\n this.dispatchEvent(new CustomEvent('imported'))\n }\n}\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
import '@material/web/icon/icon.js';
|
|
2
3
|
import '@operato/data-grist';
|
|
3
4
|
import gql from 'graphql-tag';
|
|
4
5
|
import { css, html, LitElement } from 'lit';
|
|
@@ -6,6 +7,7 @@ import { customElement, property } from 'lit/decorators.js';
|
|
|
6
7
|
import { client } from '@operato/graphql';
|
|
7
8
|
import { i18next } from '@operato/i18n';
|
|
8
9
|
import { isMobileDevice } from '@operato/utils';
|
|
10
|
+
import { ButtonContainerStyles } from '@operato/styles';
|
|
9
11
|
let ActivityTemplateImporter = class ActivityTemplateImporter extends LitElement {
|
|
10
12
|
constructor() {
|
|
11
13
|
super();
|
|
@@ -45,7 +47,7 @@ let ActivityTemplateImporter = class ActivityTemplateImporter extends LitElement
|
|
|
45
47
|
></ox-grist>
|
|
46
48
|
|
|
47
49
|
<div class="button-container">
|
|
48
|
-
<
|
|
50
|
+
<button @click=${this.save.bind(this)}><md-icon>save</md-icon>${i18next.t('button.save')}</button>
|
|
49
51
|
</div>
|
|
50
52
|
`;
|
|
51
53
|
}
|
|
@@ -65,6 +67,7 @@ let ActivityTemplateImporter = class ActivityTemplateImporter extends LitElement
|
|
|
65
67
|
}
|
|
66
68
|
};
|
|
67
69
|
ActivityTemplateImporter.styles = [
|
|
70
|
+
ButtonContainerStyles,
|
|
68
71
|
css `
|
|
69
72
|
:host {
|
|
70
73
|
display: flex;
|
|
@@ -76,16 +79,6 @@ ActivityTemplateImporter.styles = [
|
|
|
76
79
|
ox-grist {
|
|
77
80
|
flex: 1;
|
|
78
81
|
}
|
|
79
|
-
|
|
80
|
-
.button-container {
|
|
81
|
-
display: flex;
|
|
82
|
-
margin-left: auto;
|
|
83
|
-
padding: var(--padding-default);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
md-elevated-button {
|
|
87
|
-
margin-left: var(--margin-default);
|
|
88
|
-
}
|
|
89
82
|
`
|
|
90
83
|
];
|
|
91
84
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity-template-importer.js","sourceRoot":"","sources":["../../../client/pages/activity-template/activity-template-importer.ts"],"names":[],"mappings":";AAAA,OAAO,qBAAqB,CAAA;AAE5B,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"activity-template-importer.js","sourceRoot":"","sources":["../../../client/pages/activity-template/activity-template-importer.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,qBAAqB,CAAA;AAE5B,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAA;AAGhD,IAAM,wBAAwB,GAA9B,MAAM,wBAAyB,SAAQ,UAAU;IAoBtD;QACE,KAAK,EAAE,CAAA;QACP,IAAI,CAAC,OAAO,GAAG;YACb,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,MAAM,EAAE,aAAa,CAAC,EAAE;YACzC,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;YAC9B,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,MAAM;oBACZ,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC;oBAC/B,KAAK,EAAE,GAAG;iBACX;gBACD;oBACE,IAAI,EAA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AwB,CA8EpC;SA9EY,wBAAwB","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/data-grist'\n\nimport gql from 'graphql-tag'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { client } from '@operato/graphql'\nimport { i18next } from '@operato/i18n'\nimport { isMobileDevice } from '@operato/utils'\nimport { ButtonContainerStyles } from '@operato/styles'\n\n@customElement('activity-template-importer')\nexport class ActivityTemplateImporter extends LitElement {\n static styles = [\n ButtonContainerStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n background-color: #fff;\n }\n\n ox-grist {\n flex: 1;\n }\n `\n ]\n\n @property({ type: Object }) columns?: any\n @property({ type: Array }) activityTemplates?: any\n\n constructor() {\n super()\n this.columns = {\n list: { fields: ['name', 'description'] },\n pagination: { infinite: true },\n columns: [\n {\n type: 'string',\n name: 'name',\n header: i18next.t('field.name'),\n width: 150\n },\n {\n type: 'string',\n name: 'description',\n header: i18next.t('field.description'),\n width: 200\n },\n {\n type: 'checkbox',\n name: 'active',\n header: i18next.t('field.active'),\n width: 60\n }\n ]\n }\n }\n\n render() {\n return html`\n <ox-grist\n .mode=${isMobileDevice() ? 'LIST' : 'GRID'}\n .config=${this.columns}\n .data=${{\n records: this.activityTemplates\n }}\n ></ox-grist>\n\n <div class=\"button-container\">\n <button @click=${this.save.bind(this)}><md-icon>save</md-icon>${i18next.t('button.save')}</button>\n </div>\n `\n }\n\n async save() {\n const response = await client.mutate({\n mutation: gql`\n mutation importActivityTemplates($activityTemplates: [ActivityTemplatePatch!]!) {\n importActivityTemplates(activityTemplates: $activityTemplates)\n }\n `,\n variables: { activityTemplates: this.activityTemplates }\n })\n\n if (response.errors?.length) return\n\n this.dispatchEvent(new CustomEvent('imported'))\n }\n}\n"]}
|