@omegagrid/grid 0.2.36 → 0.2.37
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/dist/ui/comment.d.ts +14 -7
- package/dist/ui/comment.d.ts.map +1 -1
- package/dist/ui/comment.js +63 -49
- package/dist/ui/comment.js.map +1 -1
- package/dist/ui/comment.style.d.ts.map +1 -1
- package/dist/ui/comment.style.js +11 -5
- package/dist/ui/comment.style.js.map +1 -1
- package/package.json +8 -8
package/dist/ui/comment.d.ts
CHANGED
|
@@ -3,15 +3,20 @@ import { CellModel, CommentModel } from '@omegagrid/grid-core';
|
|
|
3
3
|
import { TableCell } from './table';
|
|
4
4
|
export declare class CommentEvent extends Event {
|
|
5
5
|
readonly comment: CommentModel;
|
|
6
|
+
readonly index: number;
|
|
6
7
|
readonly cell: CellModel;
|
|
7
|
-
constructor(type: string, comment: CommentModel, cell: CellModel);
|
|
8
|
+
constructor(type: string, comment: CommentModel, index: number, cell: CellModel);
|
|
8
9
|
}
|
|
9
10
|
export declare class Comment extends LitElement {
|
|
10
11
|
static styles: import("lit").CSSResult[];
|
|
11
|
-
|
|
12
|
+
items: CommentModel[];
|
|
12
13
|
cellModel: CellModel;
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
editIndex: number;
|
|
15
|
+
bodies: NodeList;
|
|
16
|
+
get editBody(): HTMLDivElement;
|
|
17
|
+
get editing(): boolean;
|
|
18
|
+
get editItem(): CommentModel;
|
|
19
|
+
get globalOptions(): import("@omegagrid/grid-core").CommentOptions;
|
|
15
20
|
private _attachedTo;
|
|
16
21
|
private _hideTimer;
|
|
17
22
|
private _hideTimerDisabled;
|
|
@@ -21,7 +26,8 @@ export declare class Comment extends LitElement {
|
|
|
21
26
|
get isAttached(): boolean;
|
|
22
27
|
hide: () => HTMLElement;
|
|
23
28
|
show: () => HTMLElement;
|
|
24
|
-
|
|
29
|
+
constructor();
|
|
30
|
+
startEdit(index: number): void;
|
|
25
31
|
endEdit(): void;
|
|
26
32
|
commit(): void;
|
|
27
33
|
disconnectedCallback(): void;
|
|
@@ -32,9 +38,10 @@ export declare class Comment extends LitElement {
|
|
|
32
38
|
_onParentMouseUp: () => void;
|
|
33
39
|
_onHeaderMouseDown: (e: MouseEvent) => void;
|
|
34
40
|
_onParentMouseMove: (e: MouseEvent) => void;
|
|
35
|
-
_onEditButtonClick: () => void;
|
|
36
41
|
updated(): void;
|
|
37
|
-
|
|
42
|
+
canEdit(index: number): boolean;
|
|
43
|
+
renderItemHeader: (item: CommentModel, index: number) => import("lit-html").TemplateResult<1> | "";
|
|
44
|
+
renderItem: (item: CommentModel, index: number) => import("lit-html").TemplateResult<1>;
|
|
38
45
|
render: () => import("lit-html").TemplateResult<1>;
|
|
39
46
|
deatach(timeout?: number): void;
|
|
40
47
|
get zIndex(): number;
|
package/dist/ui/comment.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comment.d.ts","sourceRoot":"","sources":["../../src/ui/comment.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAEvC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAiB,MAAM,sBAAsB,CAAC;AAE9E,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"comment.d.ts","sourceRoot":"","sources":["../../src/ui/comment.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAEvC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAiB,MAAM,sBAAsB,CAAC;AAE9E,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAGpC,qBAAa,YAAa,SAAQ,KAAK;aAIrB,OAAO,EAAE,YAAY;aACrB,KAAK,EAAE,MAAM;aACb,IAAI,EAAE,SAAS;gBAH/B,IAAI,EAAE,MAAM,EACI,OAAO,EAAE,YAAY,EACrB,KAAK,EAAE,MAAM,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1 = require("lit/decorators.js");
|
|
13
13
|
const grid_core_1 = require("@omegagrid/grid-core");
|
|
14
14
|
const comment_style_1 = require("./comment.style");
|
|
15
|
+
const map_js_1 = require("lit-html/directives/map.js");
|
|
15
16
|
class CommentEvent extends Event {
|
|
16
|
-
constructor(type, comment, cell) {
|
|
17
|
+
constructor(type, comment, index, cell) {
|
|
17
18
|
super(`comment.${type}`);
|
|
18
19
|
this.comment = comment;
|
|
20
|
+
this.index = index;
|
|
19
21
|
this.cell = cell;
|
|
20
22
|
}
|
|
21
23
|
}
|
|
22
24
|
exports.CommentEvent = CommentEvent;
|
|
23
25
|
let Comment = class Comment extends lit_1.LitElement {
|
|
26
|
+
get editBody() { return this.bodies[this.editIndex]; }
|
|
27
|
+
get editing() { return this.editIndex > -1; }
|
|
28
|
+
get editItem() { return this.items[this.editIndex]; }
|
|
29
|
+
get globalOptions() { var _a; return (_a = this.cellModel) === null || _a === void 0 ? void 0 : _a.model.options.comments; }
|
|
30
|
+
get attachedTo() { return this._attachedTo; }
|
|
31
|
+
get isAttached() { return !!this._attachedTo; }
|
|
24
32
|
constructor() {
|
|
25
|
-
super(
|
|
26
|
-
this.
|
|
33
|
+
super();
|
|
34
|
+
this.editIndex = -1;
|
|
27
35
|
this._hideTimer = null;
|
|
28
36
|
this._hideTimerDisabled = false;
|
|
29
37
|
this._movingOffset = null;
|
|
@@ -59,43 +67,47 @@ let Comment = class Comment extends lit_1.LitElement {
|
|
|
59
67
|
});
|
|
60
68
|
this.updateConnector();
|
|
61
69
|
};
|
|
62
|
-
this.
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
<div id="inner" @mousedown="${this._onMouseDown}" @mouseover="${this._onMouseOver}">
|
|
69
|
-
<div class="head" @mousedown="${this._onHeaderMouseDown}"></div>
|
|
70
|
-
${this.hasTitle ? (0, lit_1.html) `
|
|
71
|
-
<div class="title">
|
|
72
|
-
<div class="author">${(_a = this.comment) === null || _a === void 0 ? void 0 : _a.author}</div>
|
|
73
|
-
${((_b = this.comment) === null || _b === void 0 ? void 0 : _b.date) ? (0, lit_1.html) `
|
|
74
|
-
<div class="date">${this.cellModel.model.options.dateFormatter((_c = this.comment) === null || _c === void 0 ? void 0 : _c.date)}</div>
|
|
75
|
-
` : ``}
|
|
70
|
+
this.renderItemHeader = (item, index) => (item === null || item === void 0 ? void 0 : item.author) || (item === null || item === void 0 ? void 0 : item.date) || this.canEdit(index) ? (0, lit_1.html) `
|
|
71
|
+
<div class="comment-title">
|
|
72
|
+
<div class="author">${item === null || item === void 0 ? void 0 : item.author}</div>
|
|
73
|
+
${(item === null || item === void 0 ? void 0 : item.date) ? (0, lit_1.html) `
|
|
74
|
+
<div class="date">${this.cellModel.model.options.dateFormatter(item === null || item === void 0 ? void 0 : item.date)}</div>
|
|
75
|
+
` : ``}
|
|
76
76
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
` : ``}
|
|
80
|
-
</div>
|
|
77
|
+
${this.canEdit(index) ? (0, lit_1.html) `
|
|
78
|
+
<og-button icon="pen" color="gray" @click="${() => this.startEdit(index)}"></og-button>
|
|
81
79
|
` : ``}
|
|
82
|
-
|
|
80
|
+
</div>
|
|
81
|
+
` : ``;
|
|
82
|
+
this.renderItem = (item, index) => {
|
|
83
|
+
var _a, _b;
|
|
84
|
+
return (0, lit_1.html) `
|
|
85
|
+
<div class="comment">
|
|
86
|
+
${((_a = this.globalOptions) === null || _a === void 0 ? void 0 : _a.headerPosition) == 'top' ? this.renderItemHeader(item, index) : null}
|
|
87
|
+
<div class="comment-body" ?contenteditable="${this.editing}"></div>
|
|
88
|
+
${((_b = this.globalOptions) === null || _b === void 0 ? void 0 : _b.headerPosition) == 'bottom' ? this.renderItemHeader(item, index) : null}
|
|
83
89
|
</div>
|
|
84
90
|
`;
|
|
85
91
|
};
|
|
92
|
+
this.render = () => (0, lit_1.html) `
|
|
93
|
+
<div class="head" @mousedown="${this._onHeaderMouseDown}"></div>
|
|
94
|
+
<div class="body">${(0, map_js_1.map)(this.items, this.renderItem)}</div>
|
|
95
|
+
`;
|
|
96
|
+
this.addEventListener('mousedown', this._onMouseDown);
|
|
97
|
+
this.addEventListener('mouseover', this._onMouseOver);
|
|
86
98
|
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
startEdit() {
|
|
90
|
-
this.editing = true;
|
|
99
|
+
startEdit(index) {
|
|
100
|
+
this.editIndex = index;
|
|
91
101
|
}
|
|
92
102
|
endEdit() {
|
|
93
103
|
this.commit();
|
|
94
|
-
this.
|
|
104
|
+
this.editIndex = -1;
|
|
95
105
|
}
|
|
96
106
|
commit() {
|
|
97
|
-
|
|
98
|
-
|
|
107
|
+
if (!this.editItem)
|
|
108
|
+
return;
|
|
109
|
+
this.editItem.text = this.editBody.innerText;
|
|
110
|
+
this.dispatchEvent(new CommentEvent('commit', this.editItem, this.editIndex, this.cellModel));
|
|
99
111
|
}
|
|
100
112
|
disconnectedCallback() {
|
|
101
113
|
this.destroy();
|
|
@@ -106,25 +118,27 @@ let Comment = class Comment extends lit_1.LitElement {
|
|
|
106
118
|
this._connector.remove();
|
|
107
119
|
}
|
|
108
120
|
updated() {
|
|
109
|
-
var _a
|
|
110
|
-
if (this.
|
|
111
|
-
this.
|
|
112
|
-
this.
|
|
121
|
+
var _a;
|
|
122
|
+
if (this.editBody) {
|
|
123
|
+
this.editBody.focus();
|
|
124
|
+
this.editBody.addEventListener('blur', () => this.endEdit(), { once: true });
|
|
113
125
|
}
|
|
114
|
-
|
|
126
|
+
(_a = this.items) === null || _a === void 0 ? void 0 : _a.forEach((item, i) => {
|
|
127
|
+
var _a, _b, _c;
|
|
128
|
+
const body = this.bodies[i];
|
|
115
129
|
if ((_a = this.cellModel) === null || _a === void 0 ? void 0 : _a.commentRenderer) {
|
|
116
|
-
|
|
117
|
-
(_b = this.cellModel) === null || _b === void 0 ? void 0 : _b.commentRenderer(
|
|
130
|
+
body.style.whiteSpace = 'normal';
|
|
131
|
+
(_b = this.cellModel) === null || _b === void 0 ? void 0 : _b.commentRenderer(body, item, this.cellModel);
|
|
118
132
|
}
|
|
119
133
|
else {
|
|
120
|
-
|
|
121
|
-
|
|
134
|
+
body.style.whiteSpace = 'pre-wrap';
|
|
135
|
+
body.textContent = (_c = item === null || item === void 0 ? void 0 : item.text) !== null && _c !== void 0 ? _c : '';
|
|
122
136
|
}
|
|
123
|
-
}
|
|
137
|
+
});
|
|
124
138
|
}
|
|
125
|
-
|
|
126
|
-
var _a
|
|
127
|
-
return ((_a = this.
|
|
139
|
+
canEdit(index) {
|
|
140
|
+
var _a;
|
|
141
|
+
return ((_a = this.cellModel) === null || _a === void 0 ? void 0 : _a.commentable) && !this.items[index].readOnly;
|
|
128
142
|
}
|
|
129
143
|
deatach(timeout = 0) {
|
|
130
144
|
if (!this.isAttached)
|
|
@@ -174,7 +188,7 @@ let Comment = class Comment extends lit_1.LitElement {
|
|
|
174
188
|
}
|
|
175
189
|
attachTo(cell, cellModel, startEdit = false) {
|
|
176
190
|
this._attachedTo = cell;
|
|
177
|
-
this.
|
|
191
|
+
this.items = cellModel.comments;
|
|
178
192
|
this.cellModel = cellModel;
|
|
179
193
|
this._hideTimerDisabled = startEdit;
|
|
180
194
|
if (this._hideTimer)
|
|
@@ -192,23 +206,23 @@ let Comment = class Comment extends lit_1.LitElement {
|
|
|
192
206
|
this.style.zIndex = this.zIndex.toString();
|
|
193
207
|
this.updateConnector();
|
|
194
208
|
if (startEdit)
|
|
195
|
-
this.startEdit();
|
|
209
|
+
this.startEdit(0);
|
|
196
210
|
}
|
|
197
211
|
};
|
|
198
212
|
exports.Comment = Comment;
|
|
199
213
|
Comment.styles = [comment_style_1.style];
|
|
200
214
|
__decorate([
|
|
201
|
-
(0, decorators_js_1.property)({ type:
|
|
202
|
-
], Comment.prototype, "
|
|
215
|
+
(0, decorators_js_1.property)({ type: Array })
|
|
216
|
+
], Comment.prototype, "items", void 0);
|
|
203
217
|
__decorate([
|
|
204
218
|
(0, decorators_js_1.state)()
|
|
205
219
|
], Comment.prototype, "cellModel", void 0);
|
|
206
220
|
__decorate([
|
|
207
221
|
(0, decorators_js_1.state)()
|
|
208
|
-
], Comment.prototype, "
|
|
222
|
+
], Comment.prototype, "editIndex", void 0);
|
|
209
223
|
__decorate([
|
|
210
|
-
(0, decorators_js_1.
|
|
211
|
-
], Comment.prototype, "
|
|
224
|
+
(0, decorators_js_1.queryAll)('.comment-body')
|
|
225
|
+
], Comment.prototype, "bodies", void 0);
|
|
212
226
|
exports.Comment = Comment = __decorate([
|
|
213
227
|
(0, decorators_js_1.customElement)('og-grid-comment'),
|
|
214
228
|
(0, core_1.stylable)({ vars: ['font-size', 'accent-color', 'background-color', 'text-color', 'colortype-*'] })
|
package/dist/ui/comment.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comment.js","sourceRoot":"","sources":["../../src/ui/comment.ts"],"names":[],"mappings":";;;;;;;;;AAAA,0CAAgD;AAChD,6BAAuC;AACvC,
|
|
1
|
+
{"version":3,"file":"comment.js","sourceRoot":"","sources":["../../src/ui/comment.ts"],"names":[],"mappings":";;;;;;;;;AAAA,0CAAgD;AAChD,6BAAuC;AACvC,qDAA6E;AAC7E,oDAA8E;AAC9E,mDAAwC;AAExC,uDAAiD;AAEjD,MAAa,YAAa,SAAQ,KAAK;IAEtC,YACC,IAAY,EACI,OAAqB,EACrB,KAAa,EACb,IAAe;QAE/B,KAAK,CAAC,WAAW,IAAI,EAAE,CAAC,CAAC;QAJT,YAAO,GAAP,OAAO,CAAc;QACrB,UAAK,GAAL,KAAK,CAAQ;QACb,SAAI,GAAJ,IAAI,CAAW;IAGhC,CAAC;CAED;AAXD,oCAWC;AAIM,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,gBAAU;IAgBtC,IAAI,QAAQ,KAAK,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAmB,CAAA,CAAC,CAAC;IACvE,IAAI,OAAO,KAAK,OA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AC;sCACF;AAGtB;IADC,IAAA,qBAAK,GAAE;0CACa;AAGrB;IADC,IAAA,qBAAK,GAAE;0CACO;AAGf;IADC,IAAA,wBAAQ,EAAC,eAAe,CAAC;uCACT;kBAdL,OAAO;IAFnB,IAAA,6BAAa,EAAC,iBAAiB,CAAC;IAChC,IAAA,eAAQ,EAAC,EAAC,IAAI,EAAE,CAAC,WAAW,EAAE,cAAc,EAAE,kBAAkB,EAAE,YAAY,EAAE,aAAa,CAAC,EAAC,CAAC;GACpF,OAAO,CAyNnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comment.style.d.ts","sourceRoot":"","sources":["../../src/ui/comment.style.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"comment.style.d.ts","sourceRoot":"","sources":["../../src/ui/comment.style.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK,yBAkDjB,CAAC"}
|
package/dist/ui/comment.style.js
CHANGED
|
@@ -13,8 +13,10 @@ exports.style = (0, lit_1.css) `
|
|
|
13
13
|
max-width: 250px;
|
|
14
14
|
min-width: 250px;
|
|
15
15
|
min-height: 100px;
|
|
16
|
+
resize: both;
|
|
17
|
+
overflow: hidden;
|
|
16
18
|
}
|
|
17
|
-
|
|
19
|
+
|
|
18
20
|
.head {
|
|
19
21
|
cursor: move;
|
|
20
22
|
user-select: none;
|
|
@@ -22,7 +24,7 @@ exports.style = (0, lit_1.css) `
|
|
|
22
24
|
height: 10px;
|
|
23
25
|
}
|
|
24
26
|
|
|
25
|
-
.title {
|
|
27
|
+
.comment-title {
|
|
26
28
|
padding: 5px;
|
|
27
29
|
user-select: none;
|
|
28
30
|
border-bottom: 1px solid var(--colortype-yellow-border-color);
|
|
@@ -34,17 +36,21 @@ exports.style = (0, lit_1.css) `
|
|
|
34
36
|
white-space: nowrap;
|
|
35
37
|
}
|
|
36
38
|
|
|
37
|
-
.title > div {
|
|
39
|
+
.comment-title > div {
|
|
38
40
|
flex: 1;
|
|
39
41
|
}
|
|
40
42
|
|
|
41
|
-
.title > div.date {
|
|
43
|
+
.comment-title > div.date {
|
|
42
44
|
text-align: right;
|
|
43
45
|
}
|
|
44
46
|
|
|
45
|
-
.body {
|
|
47
|
+
.comment-body {
|
|
46
48
|
text-align: justify;
|
|
47
49
|
padding: 5px;
|
|
48
50
|
}
|
|
51
|
+
|
|
52
|
+
.comment {
|
|
53
|
+
border-bottom: 3px solid var(--colortype-yellow-border-color);
|
|
54
|
+
}
|
|
49
55
|
`;
|
|
50
56
|
//# sourceMappingURL=comment.style.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comment.style.js","sourceRoot":"","sources":["../../src/ui/comment.style.ts"],"names":[],"mappings":";;;AAAA,6BAA0B;AAEb,QAAA,KAAK,GAAG,IAAA,SAAG,EAAA
|
|
1
|
+
{"version":3,"file":"comment.style.js","sourceRoot":"","sources":["../../src/ui/comment.style.ts"],"names":[],"mappings":";;;AAAA,6BAA0B;AAEb,QAAA,KAAK,GAAG,IAAA,SAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkDvB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@omegagrid/grid",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.37",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"description": "Universal datagrid component",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@lit/localize": "^0.12.1",
|
|
39
|
-
"@omegagrid/commands": "^0.2.
|
|
40
|
-
"@omegagrid/core": "^0.2.
|
|
41
|
-
"@omegagrid/grid-core": "^0.2.
|
|
42
|
-
"@omegagrid/tabs": "^0.2.
|
|
43
|
-
"@omegagrid/tree": "^0.2.
|
|
39
|
+
"@omegagrid/commands": "^0.2.37",
|
|
40
|
+
"@omegagrid/core": "^0.2.37",
|
|
41
|
+
"@omegagrid/grid-core": "^0.2.37",
|
|
42
|
+
"@omegagrid/tabs": "^0.2.37",
|
|
43
|
+
"@omegagrid/tree": "^0.2.37",
|
|
44
44
|
"@stdlib/stats": "^0.0.13",
|
|
45
45
|
"lit": "^3.1.1",
|
|
46
46
|
"lit-html": "^3.1.1",
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
"@types/jest": "^29.5.11",
|
|
53
53
|
"@types/node": "^20.11.5",
|
|
54
54
|
"@types/sha1": "^1.1.3",
|
|
55
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
56
|
-
"@typescript-eslint/parser": "^
|
|
55
|
+
"@typescript-eslint/eslint-plugin": "^7.16.0",
|
|
56
|
+
"@typescript-eslint/parser": "^7.16.0",
|
|
57
57
|
"eslint": "^8.56.0",
|
|
58
58
|
"jest": "^29.7.0",
|
|
59
59
|
"jest-environment-jsdom": "^29.7.0",
|