@operato/board 1.1.76 → 1.1.79
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/CHANGELOG.md +24 -0
- package/dist/src/modeller/property-sidebar/effects/property-event-hover.d.ts +1 -1
- package/dist/src/modeller/property-sidebar/inspector/inspector.d.ts +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +13 -13
- package/dist/src/selector/board-creation-card.d.ts +0 -14
- package/dist/src/selector/board-creation-card.js +0 -85
- package/dist/src/selector/board-creation-card.js.map +0 -1
- package/dist/src/selector/board-selector.d.ts +0 -44
- package/dist/src/selector/board-selector.js +0 -302
- package/dist/src/selector/board-selector.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@operato/board",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.79",
|
|
4
4
|
"description": "Webcomponent for board following open-wc recommendations",
|
|
5
5
|
"author": "heartyoh",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -87,17 +87,17 @@
|
|
|
87
87
|
},
|
|
88
88
|
"dependencies": {
|
|
89
89
|
"@open-wc/scoped-elements": "^2.0.0-next.6",
|
|
90
|
-
"@operato/app": "^1.1.
|
|
91
|
-
"@operato/data-grist": "^1.1.
|
|
92
|
-
"@operato/font": "^1.1.
|
|
93
|
-
"@operato/graphql": "^1.1.
|
|
94
|
-
"@operato/i18n": "^1.1.
|
|
95
|
-
"@operato/input": "^1.1.
|
|
96
|
-
"@operato/markdown": "^1.1.
|
|
97
|
-
"@operato/popup": "^1.1.
|
|
98
|
-
"@operato/property-editor": "^1.1.
|
|
99
|
-
"@operato/styles": "^1.1.
|
|
100
|
-
"@operato/utils": "^1.1.
|
|
90
|
+
"@operato/app": "^1.1.79",
|
|
91
|
+
"@operato/data-grist": "^1.1.79",
|
|
92
|
+
"@operato/font": "^1.1.79",
|
|
93
|
+
"@operato/graphql": "^1.1.79",
|
|
94
|
+
"@operato/i18n": "^1.1.79",
|
|
95
|
+
"@operato/input": "^1.1.79",
|
|
96
|
+
"@operato/markdown": "^1.1.79",
|
|
97
|
+
"@operato/popup": "^1.1.79",
|
|
98
|
+
"@operato/property-editor": "^1.1.79",
|
|
99
|
+
"@operato/styles": "^1.1.79",
|
|
100
|
+
"@operato/utils": "^1.1.79",
|
|
101
101
|
"@polymer/paper-dropdown-menu": "^3.2.0",
|
|
102
102
|
"@types/file-saver": "^2.0.4",
|
|
103
103
|
"@types/sortablejs": "^1.10.7",
|
|
@@ -146,5 +146,5 @@
|
|
|
146
146
|
"prettier --write"
|
|
147
147
|
]
|
|
148
148
|
},
|
|
149
|
-
"gitHead": "
|
|
149
|
+
"gitHead": "494af6d0e10a42c17c88649c27f65a3dc8cb2ccb"
|
|
150
150
|
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import '@material/mwc-icon';
|
|
2
|
-
import './board-creation-popup';
|
|
3
|
-
import { LitElement } from 'lit';
|
|
4
|
-
declare const BoardCreationCard_base: (new (...args: any[]) => LitElement) & typeof LitElement;
|
|
5
|
-
export declare class BoardCreationCard extends BoardCreationCard_base {
|
|
6
|
-
static get styles(): import("lit").CSSResult[];
|
|
7
|
-
defaultGroup?: string;
|
|
8
|
-
groups: any;
|
|
9
|
-
private popup;
|
|
10
|
-
render(): import("lit-html").TemplateResult<1>;
|
|
11
|
-
onClick(): void;
|
|
12
|
-
reset(): void;
|
|
13
|
-
}
|
|
14
|
-
export {};
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import '@material/mwc-icon';
|
|
3
|
-
import './board-creation-popup';
|
|
4
|
-
import { css, html, LitElement } from 'lit';
|
|
5
|
-
import { customElement, property } from 'lit/decorators.js';
|
|
6
|
-
import { i18next, localize } from '@operato/i18n';
|
|
7
|
-
import { openPopup } from '@operato/layout';
|
|
8
|
-
let BoardCreationCard = class BoardCreationCard extends localize(i18next)(LitElement) {
|
|
9
|
-
static get styles() {
|
|
10
|
-
return [
|
|
11
|
-
css `
|
|
12
|
-
:host {
|
|
13
|
-
display: flex;
|
|
14
|
-
border: var(--card-list-create-border);
|
|
15
|
-
border-radius: var(--card-list-create-border-radius);
|
|
16
|
-
|
|
17
|
-
background-color: #fff;
|
|
18
|
-
|
|
19
|
-
align-content: center;
|
|
20
|
-
justify-content: center;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
div {
|
|
24
|
-
text-align: center;
|
|
25
|
-
font-size: 0.8em;
|
|
26
|
-
color: var(--card-list-create-color);
|
|
27
|
-
text-transform: capitalize;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
mwc-icon {
|
|
31
|
-
display: block;
|
|
32
|
-
font-size: 3.5em;
|
|
33
|
-
color: var(--card-list-create-icon-color);
|
|
34
|
-
}
|
|
35
|
-
`
|
|
36
|
-
];
|
|
37
|
-
}
|
|
38
|
-
render() {
|
|
39
|
-
return html `<div @click=${(e) => this.onClick()}><mwc-icon>add_circle_outline</mwc-icon>create board</div> `;
|
|
40
|
-
}
|
|
41
|
-
onClick() {
|
|
42
|
-
if (this.popup) {
|
|
43
|
-
delete this.popup;
|
|
44
|
-
}
|
|
45
|
-
/*
|
|
46
|
-
* 기존 설정된 이미지가 선택된 상태가 되게 하기 위해서는 selector에 value를 전달해줄 필요가 있음.
|
|
47
|
-
* 주의. value는 object일 수도 있고, string일 수도 있다.
|
|
48
|
-
* string인 경우에는 해당 보드의 id로 해석한다.
|
|
49
|
-
*/
|
|
50
|
-
var template = html `
|
|
51
|
-
<board-creation-popup
|
|
52
|
-
.defaultGroup=${this.defaultGroup}
|
|
53
|
-
.groups=${this.groups}
|
|
54
|
-
@create-board=${async (e) => {
|
|
55
|
-
var { name, description, groupId } = e.detail;
|
|
56
|
-
this.dispatchEvent(new CustomEvent('create-board', {
|
|
57
|
-
detail: {
|
|
58
|
-
name,
|
|
59
|
-
description,
|
|
60
|
-
groupId
|
|
61
|
-
}
|
|
62
|
-
}));
|
|
63
|
-
this.popup && this.popup.close();
|
|
64
|
-
}}
|
|
65
|
-
></board-creation-popup>
|
|
66
|
-
`;
|
|
67
|
-
this.popup = openPopup(template, {
|
|
68
|
-
backdrop: true,
|
|
69
|
-
size: 'large',
|
|
70
|
-
title: i18next.t('title.create-board')
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
reset() { }
|
|
74
|
-
};
|
|
75
|
-
__decorate([
|
|
76
|
-
property({ type: String })
|
|
77
|
-
], BoardCreationCard.prototype, "defaultGroup", void 0);
|
|
78
|
-
__decorate([
|
|
79
|
-
property({ type: Array })
|
|
80
|
-
], BoardCreationCard.prototype, "groups", void 0);
|
|
81
|
-
BoardCreationCard = __decorate([
|
|
82
|
-
customElement('board-creation-card')
|
|
83
|
-
], BoardCreationCard);
|
|
84
|
-
export { BoardCreationCard };
|
|
85
|
-
//# sourceMappingURL=board-creation-card.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"board-creation-card.js","sourceRoot":"","sources":["../../../src/selector/board-creation-card.ts"],"names":[],"mappings":";AAAA,OAAO,oBAAoB,CAAA;AAC3B,OAAO,wBAAwB,CAAA;AAE/B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAGpC,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,QAAQ,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC;IAClE,MAAM,KAAK,MAAM;QACf,OAAO;YACL,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;OAwBF;SACF,CAAA;IACH,CAAC;IAQD,MAAM;QACJ,OAAO,IAAI,CAAA,eAAe,CAAC,CAAQ,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,6DAA6D,CAAA;IACrH,CAAC;IAED,OAAO;QACL,IAAI,IAAI,CAAC,KAAK,EAAE;YACd,OAAO,IAAI,CAAC,KAAK,CAAA;SAClB;QAED;;;;WAIG;QACH,IAAI,QAAQ,GAAG,IAAI,CAAA;;wBAEC,IAAI,CAAC,YAAY;kBACvB,IAAI,CAAC,MAAM;wBACL,KAAK,EAAE,CAAc,EAAE,EAAE;YACvC,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC,MAAM,CAAA;YAE7C,IAAI,CAAC,aAAa,CAChB,IAAI,WAAW,CAAC,cAAc,EAAE;gBAC9B,MAAM,EAAE;oBACN,IAAI;oBACJ,WAAW;oBACX,OAAO;iBACR;aACF,CAAC,CACH,CAAA;YAED,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAA;QAClC,CAAC;;KAEJ,CAAA;QAED,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC,QAAQ,EAAE;YAC/B,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,oBAAoB,CAAC;SACvC,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,KAAI,CAAC;CACX,CAAA;AAjD6B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uDAAsB;AACtB;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;iDAAY;AAjC3B,iBAAiB;IAD7B,aAAa,CAAC,qBAAqB,CAAC;GACxB,iBAAiB,CAiF7B;SAjFY,iBAAiB","sourcesContent":["import '@material/mwc-icon'\nimport './board-creation-popup'\n\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { i18next, localize } from '@operato/i18n'\nimport { openPopup } from '@operato/layout'\n\n@customElement('board-creation-card')\nexport class BoardCreationCard extends localize(i18next)(LitElement) {\n static get styles() {\n return [\n css`\n :host {\n display: flex;\n border: var(--card-list-create-border);\n border-radius: var(--card-list-create-border-radius);\n\n background-color: #fff;\n\n align-content: center;\n justify-content: center;\n }\n\n div {\n text-align: center;\n font-size: 0.8em;\n color: var(--card-list-create-color);\n text-transform: capitalize;\n }\n\n mwc-icon {\n display: block;\n font-size: 3.5em;\n color: var(--card-list-create-icon-color);\n }\n `\n ]\n }\n\n /* default group id */\n @property({ type: String }) defaultGroup?: string\n @property({ type: Array }) groups: any\n\n private popup: any\n\n render() {\n return html`<div @click=${(e: Event) => this.onClick()}><mwc-icon>add_circle_outline</mwc-icon>create board</div> `\n }\n\n onClick() {\n if (this.popup) {\n delete this.popup\n }\n\n /*\n * 기존 설정된 이미지가 선택된 상태가 되게 하기 위해서는 selector에 value를 전달해줄 필요가 있음.\n * 주의. value는 object일 수도 있고, string일 수도 있다.\n * string인 경우에는 해당 보드의 id로 해석한다.\n */\n var template = html`\n <board-creation-popup\n .defaultGroup=${this.defaultGroup}\n .groups=${this.groups}\n @create-board=${async (e: CustomEvent) => {\n var { name, description, groupId } = e.detail\n\n this.dispatchEvent(\n new CustomEvent('create-board', {\n detail: {\n name,\n description,\n groupId\n }\n })\n )\n\n this.popup && this.popup.close()\n }}\n ></board-creation-popup>\n `\n\n this.popup = openPopup(template, {\n backdrop: true,\n size: 'large',\n title: i18next.t('title.create-board')\n })\n }\n\n reset() {}\n}\n"]}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import './board-creation-card';
|
|
2
|
-
import { LitElement, PropertyValues } from 'lit';
|
|
3
|
-
declare const BoardSelector_base: (new (...args: any[]) => {
|
|
4
|
-
_infiniteScrollOptions: {
|
|
5
|
-
threshold: number;
|
|
6
|
-
limit: number;
|
|
7
|
-
totalProp: string;
|
|
8
|
-
pageProp: string;
|
|
9
|
-
};
|
|
10
|
-
onScroll: import("lodash").DebouncedFunc<(e: any) => void>;
|
|
11
|
-
readonly scrollTargetEl: HTMLElement | null;
|
|
12
|
-
scrollAction(): Promise<void>;
|
|
13
|
-
}) & (new (...args: any[]) => LitElement) & typeof LitElement;
|
|
14
|
-
export declare class BoardSelector extends BoardSelector_base {
|
|
15
|
-
static get styles(): import("lit").CSSResult[];
|
|
16
|
-
groups: {
|
|
17
|
-
id: string;
|
|
18
|
-
name: string;
|
|
19
|
-
description: string;
|
|
20
|
-
}[];
|
|
21
|
-
boards: any[];
|
|
22
|
-
group?: string;
|
|
23
|
-
creatable: boolean;
|
|
24
|
-
value?: string;
|
|
25
|
-
private _page;
|
|
26
|
-
private _total;
|
|
27
|
-
constructor();
|
|
28
|
-
render(): import("lit-html").TemplateResult<1>;
|
|
29
|
-
get scrollTargetEl(): HTMLElement | null;
|
|
30
|
-
scrollAction(): Promise<void>;
|
|
31
|
-
firstUpdated(): void;
|
|
32
|
-
updated(changed: PropertyValues<this>): Promise<void>;
|
|
33
|
-
onClickSelect(board: any): void;
|
|
34
|
-
onCreateBoard(e: CustomEvent): Promise<void>;
|
|
35
|
-
refreshGroups(): Promise<void>;
|
|
36
|
-
refreshBoards(): Promise<void>;
|
|
37
|
-
appendBoards(): Promise<void>;
|
|
38
|
-
getBoards({ page, limit }?: {
|
|
39
|
-
page?: number | undefined;
|
|
40
|
-
limit?: number | undefined;
|
|
41
|
-
}): Promise<any>;
|
|
42
|
-
createBoard(name: string, description: string, groupId: string): Promise<any>;
|
|
43
|
-
}
|
|
44
|
-
export {};
|
|
@@ -1,302 +0,0 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import './board-creation-card';
|
|
3
|
-
import gql from 'graphql-tag';
|
|
4
|
-
import { css, html, LitElement } from 'lit';
|
|
5
|
-
import { customElement, property } from 'lit/decorators.js';
|
|
6
|
-
import { buildArgs, client, gqlContext } from '@operato/graphql';
|
|
7
|
-
import { i18next, localize } from '@operato/i18n';
|
|
8
|
-
import { ScrollbarStyles } from '@operato/styles';
|
|
9
|
-
import InfiniteScrollable from '@operato/utils/mixins/infinite-scrollable.js';
|
|
10
|
-
const FETCH_BOARD_LIST_GQL = (listParam) => {
|
|
11
|
-
return gql `
|
|
12
|
-
{
|
|
13
|
-
boards(${buildArgs(listParam)}) {
|
|
14
|
-
items {
|
|
15
|
-
id
|
|
16
|
-
name
|
|
17
|
-
description
|
|
18
|
-
thumbnail
|
|
19
|
-
}
|
|
20
|
-
total
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
`;
|
|
24
|
-
};
|
|
25
|
-
const FETCH_BOARD_GROUP_LIST_GQL = gql `
|
|
26
|
-
{
|
|
27
|
-
groups {
|
|
28
|
-
items {
|
|
29
|
-
id
|
|
30
|
-
name
|
|
31
|
-
description
|
|
32
|
-
}
|
|
33
|
-
total
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
`;
|
|
37
|
-
const CREATE_BOARD_GQL = gql `
|
|
38
|
-
mutation CreateBoard($board: NewBoard!) {
|
|
39
|
-
createBoard(board: $board) {
|
|
40
|
-
id
|
|
41
|
-
name
|
|
42
|
-
description
|
|
43
|
-
model
|
|
44
|
-
createdAt
|
|
45
|
-
updatedAt
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
`;
|
|
49
|
-
let BoardSelector = class BoardSelector extends InfiniteScrollable(localize(i18next)(LitElement)) {
|
|
50
|
-
static get styles() {
|
|
51
|
-
return [
|
|
52
|
-
ScrollbarStyles,
|
|
53
|
-
css `
|
|
54
|
-
:host {
|
|
55
|
-
display: grid;
|
|
56
|
-
grid-template-rows: auto auto 1fr;
|
|
57
|
-
overflow: hidden;
|
|
58
|
-
background-color: var(--popup-content-background-color);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
#main {
|
|
62
|
-
overflow: auto;
|
|
63
|
-
padding: var(--popup-content-padding);
|
|
64
|
-
display: grid;
|
|
65
|
-
grid-template-columns: var(--card-list-template);
|
|
66
|
-
grid-auto-rows: var(--card-list-rows-height);
|
|
67
|
-
grid-gap: 20px;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.card {
|
|
71
|
-
display: flex;
|
|
72
|
-
flex-direction: column;
|
|
73
|
-
align-items: center;
|
|
74
|
-
overflow: hidden;
|
|
75
|
-
border-radius: var(--card-list-border-radius);
|
|
76
|
-
background-color: var(--card-list-background-color);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.card[selected] {
|
|
80
|
-
border: red solid;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.card.create {
|
|
84
|
-
overflow: visible;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.card:hover {
|
|
88
|
-
cursor: pointer;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.card > .name {
|
|
92
|
-
background-color: var(--board-renderer-name-background-color);
|
|
93
|
-
opacity: 0.8;
|
|
94
|
-
margin-top: -35px;
|
|
95
|
-
width: 100%;
|
|
96
|
-
color: #fff;
|
|
97
|
-
font-weight: bolder;
|
|
98
|
-
font-size: 13px;
|
|
99
|
-
text-indent: 7px;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.card > .description {
|
|
103
|
-
background-color: rgba(0, 0, 0, 0.7);
|
|
104
|
-
width: 100%;
|
|
105
|
-
min-height: 15px;
|
|
106
|
-
font-size: 0.6rem;
|
|
107
|
-
color: #fff;
|
|
108
|
-
text-indent: 7px;
|
|
109
|
-
}
|
|
110
|
-
.card img {
|
|
111
|
-
max-height: 100%;
|
|
112
|
-
min-height: 100%;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
#filter {
|
|
116
|
-
padding: var(--popup-content-padding);
|
|
117
|
-
background-color: #fff;
|
|
118
|
-
box-shadow: var(--box-shadow);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
#filter * {
|
|
122
|
-
font-size: 15px;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
select {
|
|
126
|
-
text-transform: capitalize;
|
|
127
|
-
float: right;
|
|
128
|
-
}
|
|
129
|
-
`
|
|
130
|
-
];
|
|
131
|
-
}
|
|
132
|
-
constructor() {
|
|
133
|
-
super();
|
|
134
|
-
this.groups = [];
|
|
135
|
-
this.boards = [];
|
|
136
|
-
this.creatable = false;
|
|
137
|
-
this._page = 1;
|
|
138
|
-
this._total = 0;
|
|
139
|
-
this._infiniteScrollOptions.limit = 20;
|
|
140
|
-
}
|
|
141
|
-
render() {
|
|
142
|
-
return html `
|
|
143
|
-
<div id="filter">
|
|
144
|
-
<select
|
|
145
|
-
@change=${(e) => {
|
|
146
|
-
var _a;
|
|
147
|
-
this.group = (_a = e.currentTarget) === null || _a === void 0 ? void 0 : _a.value;
|
|
148
|
-
this.requestUpdate();
|
|
149
|
-
}}
|
|
150
|
-
>
|
|
151
|
-
<option value="">${i18next.t('label.all')}</option>
|
|
152
|
-
${this.groups.map(group => html ` <option value=${group.id}>${group.description}</option> `)}
|
|
153
|
-
</select>
|
|
154
|
-
</div>
|
|
155
|
-
|
|
156
|
-
<div
|
|
157
|
-
id="main"
|
|
158
|
-
@scroll=${(e) => {
|
|
159
|
-
this.onScroll(e);
|
|
160
|
-
}}
|
|
161
|
-
>
|
|
162
|
-
${this.creatable
|
|
163
|
-
? html `
|
|
164
|
-
<board-creation-card
|
|
165
|
-
class="card create"
|
|
166
|
-
.groups=${this.groups}
|
|
167
|
-
.defaultGroup=${this.group}
|
|
168
|
-
@create-board=${(e) => this.onCreateBoard(e)}
|
|
169
|
-
></board-creation-card>
|
|
170
|
-
`
|
|
171
|
-
: html ``}
|
|
172
|
-
${this.boards.map(board => html `
|
|
173
|
-
<div class="card" @click=${(e) => this.onClickSelect(board)} ?selected=${this.value === board.id}>
|
|
174
|
-
<img src=${board.thumbnail} />
|
|
175
|
-
<div class="name">${board.name}</div>
|
|
176
|
-
<div class="description">${board.description}</div>
|
|
177
|
-
</div>
|
|
178
|
-
`)}
|
|
179
|
-
</div>
|
|
180
|
-
`;
|
|
181
|
-
}
|
|
182
|
-
//@ts-ignore
|
|
183
|
-
get scrollTargetEl() {
|
|
184
|
-
return this.renderRoot.querySelector('#main');
|
|
185
|
-
}
|
|
186
|
-
async scrollAction() {
|
|
187
|
-
return this.appendBoards();
|
|
188
|
-
}
|
|
189
|
-
firstUpdated() {
|
|
190
|
-
this.refreshGroups();
|
|
191
|
-
}
|
|
192
|
-
async updated(changed) {
|
|
193
|
-
if (changed.has('group')) {
|
|
194
|
-
this.refreshBoards();
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
onClickSelect(board) {
|
|
198
|
-
this.dispatchEvent(new CustomEvent('board-selected', {
|
|
199
|
-
composed: true,
|
|
200
|
-
bubbles: true,
|
|
201
|
-
detail: {
|
|
202
|
-
board
|
|
203
|
-
}
|
|
204
|
-
}));
|
|
205
|
-
}
|
|
206
|
-
async onCreateBoard(e) {
|
|
207
|
-
var { name, description, groupId } = e.detail;
|
|
208
|
-
await this.createBoard(name, description, groupId);
|
|
209
|
-
this.refreshBoards();
|
|
210
|
-
}
|
|
211
|
-
async refreshGroups() {
|
|
212
|
-
var groupListResponse = await client.query({
|
|
213
|
-
query: FETCH_BOARD_GROUP_LIST_GQL,
|
|
214
|
-
context: gqlContext()
|
|
215
|
-
});
|
|
216
|
-
if (!groupListResponse || !groupListResponse.data)
|
|
217
|
-
return;
|
|
218
|
-
var groups = groupListResponse.data.groups.items;
|
|
219
|
-
this.groups = [...groups];
|
|
220
|
-
this.group = groups.filter((group) => group.id == this.group).length > 0 ? this.group : '';
|
|
221
|
-
}
|
|
222
|
-
async refreshBoards() {
|
|
223
|
-
var boards = await this.getBoards();
|
|
224
|
-
this.boards = [...boards];
|
|
225
|
-
var creationCard = this.renderRoot.querySelector('board-creation-card');
|
|
226
|
-
if (creationCard) {
|
|
227
|
-
;
|
|
228
|
-
creationCard.reset();
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
async appendBoards() {
|
|
232
|
-
var boards = await this.getBoards({ page: this._page + 1 });
|
|
233
|
-
this.boards = [...this.boards, ...boards];
|
|
234
|
-
}
|
|
235
|
-
async getBoards({ page = 1, limit = this._infiniteScrollOptions.limit } = {}) {
|
|
236
|
-
var filters = [];
|
|
237
|
-
var sortings = [];
|
|
238
|
-
var pagination = {
|
|
239
|
-
limit,
|
|
240
|
-
page
|
|
241
|
-
};
|
|
242
|
-
if (this.group)
|
|
243
|
-
filters.push({
|
|
244
|
-
name: 'groupId',
|
|
245
|
-
operator: 'eq',
|
|
246
|
-
value: this.group
|
|
247
|
-
});
|
|
248
|
-
var params = {
|
|
249
|
-
filters,
|
|
250
|
-
sortings,
|
|
251
|
-
pagination
|
|
252
|
-
};
|
|
253
|
-
var boardListResponse = await client.query({
|
|
254
|
-
query: FETCH_BOARD_LIST_GQL(params),
|
|
255
|
-
context: gqlContext()
|
|
256
|
-
});
|
|
257
|
-
if (!boardListResponse || !boardListResponse.data)
|
|
258
|
-
return [];
|
|
259
|
-
this._total = boardListResponse.data.boards.total;
|
|
260
|
-
this._page = page;
|
|
261
|
-
return boardListResponse.data.boards.items;
|
|
262
|
-
}
|
|
263
|
-
async createBoard(name, description, groupId) {
|
|
264
|
-
var model = JSON.stringify({
|
|
265
|
-
width: 800,
|
|
266
|
-
height: 600
|
|
267
|
-
});
|
|
268
|
-
const response = await client.mutate({
|
|
269
|
-
mutation: CREATE_BOARD_GQL,
|
|
270
|
-
variables: {
|
|
271
|
-
board: {
|
|
272
|
-
name,
|
|
273
|
-
description,
|
|
274
|
-
groupId,
|
|
275
|
-
model
|
|
276
|
-
}
|
|
277
|
-
},
|
|
278
|
-
context: gqlContext()
|
|
279
|
-
});
|
|
280
|
-
return response.data;
|
|
281
|
-
}
|
|
282
|
-
};
|
|
283
|
-
__decorate([
|
|
284
|
-
property({ type: Array })
|
|
285
|
-
], BoardSelector.prototype, "groups", void 0);
|
|
286
|
-
__decorate([
|
|
287
|
-
property({ type: Array })
|
|
288
|
-
], BoardSelector.prototype, "boards", void 0);
|
|
289
|
-
__decorate([
|
|
290
|
-
property({ type: String })
|
|
291
|
-
], BoardSelector.prototype, "group", void 0);
|
|
292
|
-
__decorate([
|
|
293
|
-
property({ type: Boolean })
|
|
294
|
-
], BoardSelector.prototype, "creatable", void 0);
|
|
295
|
-
__decorate([
|
|
296
|
-
property({ type: String })
|
|
297
|
-
], BoardSelector.prototype, "value", void 0);
|
|
298
|
-
BoardSelector = __decorate([
|
|
299
|
-
customElement('board-selector')
|
|
300
|
-
], BoardSelector);
|
|
301
|
-
export { BoardSelector };
|
|
302
|
-
//# sourceMappingURL=board-selector.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"board-selector.js","sourceRoot":"","sources":["../../../src/selector/board-selector.ts"],"names":[],"mappings":";AAAA,OAAO,uBAAuB,CAAA;AAE9B,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAkB,MAAM,KAAK,CAAA;AAC3D,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAChE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,kBAAkB,MAAM,8CAA8C,CAAA;AAE7E,MAAM,oBAAoB,GAAG,CAAC,SAAc,EAAE,EAAE;IAC9C,OAAO,GAAG,CAAA;;aAEC,SAAS,CAAC,SAAS,CAAC;;;;;;;;;;CAUhC,CAAA;AACD,CAAC,CAAA;AAED,MAAM,0BAA0B,GAAG,GAAG,CAAA;;;;;;;;;;;CAWrC,CAAA;AAED,MAAM,gBAAgB,GAAG,GAAG,CAAA;;;;;;;;;;;CAW3B,CAAA;AAGM,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,kBAAkB,CA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KAAK,EAAE,CAAC;6CAAiE;AAChE;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;6CAAmB;AACjB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CAAe;AACb;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;gDAA2B;AAC3B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CAAe;AAxF/B,aAAa;IADzB,aAAa,CAAC,gBAAgB,CAAC;GACnB,aAAa,CAsQzB;SAtQY,aAAa","sourcesContent":["import './board-creation-card'\n\nimport gql from 'graphql-tag'\nimport { css, html, LitElement, PropertyValues } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { buildArgs, client, gqlContext } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { ScrollbarStyles } from '@operato/styles'\nimport InfiniteScrollable from '@operato/utils/mixins/infinite-scrollable.js'\n\nconst FETCH_BOARD_LIST_GQL = (listParam: any) => {\n return gql`\n {\n boards(${buildArgs(listParam)}) {\n items {\n id\n name\n description\n thumbnail\n }\n total\n }\n }\n`\n}\n\nconst FETCH_BOARD_GROUP_LIST_GQL = gql`\n {\n groups {\n items {\n id\n name\n description\n }\n total\n }\n }\n`\n\nconst CREATE_BOARD_GQL = gql`\n mutation CreateBoard($board: NewBoard!) {\n createBoard(board: $board) {\n id\n name\n description\n model\n createdAt\n updatedAt\n }\n }\n`\n\n@customElement('board-selector')\nexport class BoardSelector extends InfiniteScrollable(localize(i18next)(LitElement)) {\n static get styles() {\n return [\n ScrollbarStyles,\n css`\n :host {\n display: grid;\n grid-template-rows: auto auto 1fr;\n overflow: hidden;\n background-color: var(--popup-content-background-color);\n }\n\n #main {\n overflow: auto;\n padding: var(--popup-content-padding);\n display: grid;\n grid-template-columns: var(--card-list-template);\n grid-auto-rows: var(--card-list-rows-height);\n grid-gap: 20px;\n }\n\n .card {\n display: flex;\n flex-direction: column;\n align-items: center;\n overflow: hidden;\n border-radius: var(--card-list-border-radius);\n background-color: var(--card-list-background-color);\n }\n\n .card[selected] {\n border: red solid;\n }\n\n .card.create {\n overflow: visible;\n }\n\n .card:hover {\n cursor: pointer;\n }\n\n .card > .name {\n background-color: var(--board-renderer-name-background-color);\n opacity: 0.8;\n margin-top: -35px;\n width: 100%;\n color: #fff;\n font-weight: bolder;\n font-size: 13px;\n text-indent: 7px;\n }\n\n .card > .description {\n background-color: rgba(0, 0, 0, 0.7);\n width: 100%;\n min-height: 15px;\n font-size: 0.6rem;\n color: #fff;\n text-indent: 7px;\n }\n .card img {\n max-height: 100%;\n min-height: 100%;\n }\n\n #filter {\n padding: var(--popup-content-padding);\n background-color: #fff;\n box-shadow: var(--box-shadow);\n }\n\n #filter * {\n font-size: 15px;\n }\n\n select {\n text-transform: capitalize;\n float: right;\n }\n `\n ]\n }\n\n @property({ type: Array }) groups: { id: string; name: string; description: string }[] = []\n @property({ type: Array }) boards: any[] = []\n @property({ type: String }) group?: string\n @property({ type: Boolean }) creatable: boolean = false\n @property({ type: String }) value?: string\n\n private _page: number = 1\n private _total: number = 0\n\n constructor() {\n super()\n\n this._infiniteScrollOptions.limit = 20\n }\n\n render() {\n return html`\n <div id=\"filter\">\n <select\n @change=${(e: Event) => {\n this.group = (e.currentTarget as any)?.value\n this.requestUpdate()\n }}\n >\n <option value=\"\">${i18next.t('label.all')}</option>\n ${this.groups.map(group => html` <option value=${group.id}>${group.description}</option> `)}\n </select>\n </div>\n\n <div\n id=\"main\"\n @scroll=${(e: Event) => {\n this.onScroll(e)\n }}\n >\n ${this.creatable\n ? html`\n <board-creation-card\n class=\"card create\"\n .groups=${this.groups}\n .defaultGroup=${this.group}\n @create-board=${(e: CustomEvent) => this.onCreateBoard(e)}\n ></board-creation-card>\n `\n : html``}\n ${this.boards.map(\n board => html`\n <div class=\"card\" @click=${(e: Event) => this.onClickSelect(board)} ?selected=${this.value === board.id}>\n <img src=${board.thumbnail} />\n <div class=\"name\">${board.name}</div>\n <div class=\"description\">${board.description}</div>\n </div>\n `\n )}\n </div>\n `\n }\n\n //@ts-ignore\n get scrollTargetEl(): HTMLElement | null {\n return this.renderRoot.querySelector('#main') as HTMLElement\n }\n\n async scrollAction() {\n return this.appendBoards()\n }\n\n firstUpdated() {\n this.refreshGroups()\n }\n\n async updated(changed: PropertyValues<this>) {\n if (changed.has('group')) {\n this.refreshBoards()\n }\n }\n\n onClickSelect(board: any) {\n this.dispatchEvent(\n new CustomEvent('board-selected', {\n composed: true,\n bubbles: true,\n detail: {\n board\n }\n })\n )\n }\n\n async onCreateBoard(e: CustomEvent) {\n var { name, description, groupId } = e.detail\n\n await this.createBoard(name, description, groupId)\n this.refreshBoards()\n }\n\n async refreshGroups() {\n var groupListResponse = await client.query({\n query: FETCH_BOARD_GROUP_LIST_GQL,\n context: gqlContext()\n })\n\n if (!groupListResponse || !groupListResponse.data) return\n\n var groups = groupListResponse.data.groups.items\n this.groups = [...groups]\n\n this.group = groups.filter((group: { id: string }) => group.id == this.group).length > 0 ? this.group : ''\n }\n\n async refreshBoards() {\n var boards = await this.getBoards()\n this.boards = [...boards]\n\n var creationCard = this.renderRoot.querySelector('board-creation-card')\n if (creationCard) {\n ;(creationCard as any).reset()\n }\n }\n\n async appendBoards() {\n var boards = await this.getBoards({ page: this._page + 1 })\n this.boards = [...this.boards, ...boards]\n }\n\n async getBoards({ page = 1, limit = this._infiniteScrollOptions.limit } = {}) {\n var filters = []\n var sortings = [] as any[]\n var pagination = {\n limit,\n page\n }\n\n if (this.group)\n filters.push({\n name: 'groupId',\n operator: 'eq',\n value: this.group\n })\n\n var params = {\n filters,\n sortings,\n pagination\n }\n var boardListResponse = await client.query({\n query: FETCH_BOARD_LIST_GQL(params),\n context: gqlContext()\n })\n\n if (!boardListResponse || !boardListResponse.data) return []\n this._total = boardListResponse.data.boards.total\n this._page = page\n\n return boardListResponse.data.boards.items\n }\n\n async createBoard(name: string, description: string, groupId: string) {\n var model = JSON.stringify({\n width: 800,\n height: 600\n })\n\n const response = await client.mutate({\n mutation: CREATE_BOARD_GQL,\n variables: {\n board: {\n name,\n description,\n groupId,\n model\n }\n },\n context: gqlContext()\n })\n\n return response.data\n }\n}\n"]}
|