@omegagrid/grid 0.11.31 → 0.11.33
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/editors/baseEditor.d.ts.map +1 -1
- package/dist/editors/baseEditor.js +6 -3
- package/dist/editors/baseEditor.js.map +1 -1
- package/dist/editors/calendarEditor.d.ts +10 -1
- package/dist/editors/calendarEditor.d.ts.map +1 -1
- package/dist/editors/calendarEditor.js +113 -19
- package/dist/editors/calendarEditor.js.map +1 -1
- package/dist/editors/dateEditor.d.ts +3 -1
- package/dist/editors/dateEditor.d.ts.map +1 -1
- package/dist/editors/dateEditor.js +22 -3
- package/dist/editors/dateEditor.js.map +1 -1
- package/dist/editors/index.d.ts.map +1 -1
- package/dist/editors/index.js +2 -0
- package/dist/editors/index.js.map +1 -1
- package/dist/renderers/DateTimeRenderer.d.ts.map +1 -1
- package/dist/renderers/DateTimeRenderer.js +3 -1
- package/dist/renderers/DateTimeRenderer.js.map +1 -1
- package/dist/ui/grid.editing.d.ts.map +1 -1
- package/dist/ui/grid.editing.js +5 -4
- package/dist/ui/grid.editing.js.map +1 -1
- package/package.json +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"baseEditor.d.ts","sourceRoot":"","sources":["../../src/editors/baseEditor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"baseEditor.d.ts","sourceRoot":"","sources":["../../src/editors/baseEditor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA+B,MAAM,sBAAsB,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAO,MAAM,KAAK,CAAC;AAEtC,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAElC,qBAAa,WAAY,SAAQ,KAAK;CAAI;AAE1C,8BAAsB,UAAW,SAAQ,UAAU;IAElD,MAAM,CAAC,UAAU,0BAef;IAEF,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC;IACrB,SAAS,CAAC,MAAM,UAAS;IACzB,SAAS,CAAC,UAAU,EAAE,oBAAoB,CAAC;IAC3C,SAAS,CAAC,eAAe,EAAE,SAAS,CAAC;IACrC,SAAS,CAAC,YAAY,EAAE,OAAO,CAAC;IAEhC,SAAS,CAAC,KAAK,UAAS;IACxB,IAAI,MAAM,YAAwB;IAElC,SAAS,CAAC,MAAM,UAAQ;IACxB,IAAI,OAAO,YAAyB;IAEpC,SAAS,KAAK,eAAe,YAAgE;IAG7F,QAAQ;;IAaR,QAAQ,CAAC,QAAQ,IAAK,OAAO;IAE7B,QAAQ,CAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAI,IAAI;IAExC,eAAe,IAAK,MAAM;IAI1B,IAAI;IAaJ,iBAAiB;IAKjB,aAAa;IAOb,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,YAAY,GAAE,OAAc,EAAE,cAAc,UAAO;IAkBpE,MAAM;IAWN,KAAK;IAgBL,QAAQ,CAAC,IAAI,EAAE,SAAS,GAAI,IAAI;IAKhC,UAAU,IAAK,IAAI;CAInB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { isValidValue } from "@omegagrid/grid-core";
|
|
2
2
|
import { LitElement, css } from 'lit';
|
|
3
3
|
import { dom } from "@omegagrid/core";
|
|
4
4
|
export class EditorEvent extends Event {
|
|
@@ -7,10 +7,11 @@ export class BaseEditor extends LitElement {
|
|
|
7
7
|
get isOpen() { return this._open; }
|
|
8
8
|
get isValid() { return this._valid; }
|
|
9
9
|
get formulasEnabled() { return this.grid ? this.grid.model.formulasEnabled : true; }
|
|
10
|
+
// an invalid value is marked also when the cell takes it (validation.allowInvalid)
|
|
10
11
|
validate() {
|
|
11
12
|
this._valid = true;
|
|
12
13
|
if (this.activeCell)
|
|
13
|
-
this._valid =
|
|
14
|
+
this._valid = isValidValue(this.activeCellModel, this.getValue());
|
|
14
15
|
this.classList.toggle('invalid', !this._valid);
|
|
15
16
|
return this._valid;
|
|
16
17
|
}
|
|
@@ -51,6 +52,7 @@ export class BaseEditor extends LitElement {
|
|
|
51
52
|
}
|
|
52
53
|
open(grid, initialValue = null, updatePosition = true) {
|
|
53
54
|
this._valid = true;
|
|
55
|
+
this.classList.remove('invalid'); // the editor is shared by the cells, the mark of the previous one must not stay
|
|
54
56
|
this.initialValue = initialValue;
|
|
55
57
|
this._open = true;
|
|
56
58
|
this.grid = grid;
|
|
@@ -81,7 +83,8 @@ export class BaseEditor extends LitElement {
|
|
|
81
83
|
this.grid.table.renderBodyCell(this.activeCellModel);
|
|
82
84
|
this.grid.selecting.showSelector();
|
|
83
85
|
// preventScroll: focus would otherwise natively scroll overflow:hidden
|
|
84
|
-
// ancestors (e.g. og-container) that manage scrolling themselves
|
|
86
|
+
// ancestors (e.g. og-container) that manage scrolling themselves;
|
|
87
|
+
// the editor is still open here: the blur of a text input commits its value (TextEditor)
|
|
85
88
|
this.grid.focus({ preventScroll: true });
|
|
86
89
|
this._open = false;
|
|
87
90
|
this.grid.editing.endEdit();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"baseEditor.js","sourceRoot":"","sources":["../../src/editors/baseEditor.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,
|
|
1
|
+
{"version":3,"file":"baseEditor.js","sourceRoot":"","sources":["../../src/editors/baseEditor.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AACtC,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAGtC,MAAM,OAAO,WAAY,SAAQ,KAAK;CAAI;AAE1C,MAAM,OAAgB,UAAW,SAAQ,UAAU;IA0BlD,IAAI,MAAM,KAAK,OAAO,IAAI,CAAC,KAAK,CAAA,CAAC,CAAC;IAGlC,IAAI,OAAO,KAAK,OAAO,IAAI,CAAC,MAAM,CAA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CAAC;QAC7B,CAAC;QACD,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACrB,CAAC;IAED,QAAQ,CAAC,IAAe;QACvB,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;QAC5B,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC;IACjD,CAAC;IAED,UAAU;QACT,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC;IACnD,CAAC;;AAlIM,qBAAU,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;EAetB,AAfgB,CAef","sourcesContent":["import { CellModel, CellValueType, isValidValue } from \"@omegagrid/grid-core\";\nimport { LitElement, css } from 'lit';\nimport { dom } from \"@omegagrid/core\";\nimport { Grid } from \"../ui/grid\";\n\nexport class EditorEvent extends Event { }\n\nexport abstract class BaseEditor extends LitElement {\n\n\tstatic baseStyles = css`\n\t\t* { box-sizing: border-box }\n\n\t\t:host {\n\t\t\tdisplay: block;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tbackground: var(--og-cell-background);\n\t\t\tz-index: 200;\n\t\t}\n\n\t\t:host(.invalid) input {\n\t\t\tcolor: #ff0000;\n\t\t\tborder: 1px solid #ff0000;\n\t\t}\n\t`;\n\n\tprotected grid: Grid;\n\tprotected cancel = false;\n\tprotected activeCell: HTMLTableCellElement;\n\tprotected activeCellModel: CellModel;\n\tprotected initialValue: unknown;\n\t\n\tprotected _open = false;\n\tget isOpen() { return this._open }\n\n\tprotected _valid = true;\n\tget isValid() { return this._valid }\n\n\tprotected get formulasEnabled() { return this.grid ? this.grid.model.formulasEnabled : true }\n\n\t// an invalid value is marked also when the cell takes it (validation.allowInvalid)\n\tvalidate() {\n\t\tthis._valid = true;\n\t\tif (this.activeCell) this._valid = isValidValue(this.activeCellModel, this.getValue());\n\t\tthis.classList.toggle('invalid', !this._valid);\n\t\treturn this._valid;\n\t}\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis.init();\n\t}\n\n\t\n\tabstract getValue() : unknown;\n\n\tabstract setValue(value: unknown) : void;\n\t\n\tgetDisplayValue() : string {\n\t\treturn null;\n\t}\n\n\tinit() {\n\t\tthis.addEventListener('keydown', e => {\n\t\t\tif (e.key == 'Enter') {\n\t\t\t\tthis.close();\n\t\t\t} else if (e.key == 'Escape') {\n\t\t\t\tthis.cancel = true;\n\t\t\t\tthis.close();\n\t\t\t} else {\n\t\t\t\te.stopPropagation();\n\t\t\t}\n\t\t});\n\t}\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback();\n\t\tthis.performUpdate();\n\t}\n\n\talignWithCell() {\n\t\tif (!this.activeCell) return;\n\t\tconst offset = dom.getElementOffset(this.activeCell, this.grid);\n\t\tdom.setPosition(this, {t: offset.top * this.grid.zoom, l: offset.left * this.grid.zoom});\n\t\tdom.setSize(this, {w: this.activeCell.offsetWidth, h: this.activeCell.offsetHeight});\n\t}\n\n\topen(grid: Grid, initialValue: unknown = null, updatePosition = true) {\n\t\tthis._valid = true;\n\t\tthis.classList.remove('invalid'); // the editor is shared by the cells, the mark of the previous one must not stay\n\t\tthis.initialValue = initialValue;\n\t\tthis._open = true;\n\t\tthis.grid = grid;\n\t\tconst cellModel = grid.selecting.activeCell;\n\t\tthis.activeCellModel = cellModel;\n\t\tthis.activeCell = this.grid.table.getCellByModelIndex(cellModel.c, cellModel.r);\n\t\tthis.grid.selector.hide();\n\t\tdom.showElement(this);\n\t\tif (updatePosition) this.alignWithCell();\n\t\tthis.activate(cellModel);\n\t\tif (initialValue !== null) this.setValue(initialValue);\n\t\tdom.zoomElement(this, this.grid.zoom);\n\t\treturn this;\n\t}\n\n\tcommit() {\n\t\tif (this._open && !this.cancel && this.activeCellModel) {\n\t\t\tthis.grid.editing.updateCell(\n\t\t\t\tthis.activeCellModel, \n\t\t\t\t{v: this.getValue() as CellValueType, dv: this.getDisplayValue()}\n\t\t\t);\n\t\t\tthis.grid.rendering.updateCell(this.activeCellModel, true);\n\t\t}\n\t\tthis.cancel = false;\n\t}\n\n\tclose() {\n\t\tif (this._open) {\n\t\t\tthis.deactivate();\n\t\t\tdom.hideElement(this);\n\t\t\tthis.grid.table.renderBodyCell(this.activeCellModel);\n\t\t\tthis.grid.selecting.showSelector();\n\t\t\t// preventScroll: focus would otherwise natively scroll overflow:hidden\n\t\t\t// ancestors (e.g. og-container) that manage scrolling themselves;\n\t\t\t// the editor is still open here: the blur of a text input commits its value (TextEditor)\n\t\t\tthis.grid.focus({preventScroll: true});\n\t\t\tthis._open = false;\n\t\t\tthis.grid.editing.endEdit();\n\t\t}\n\t\tthis.cancel = false;\n\t}\n\n\tactivate(cell: CellModel) : void {\n\t\tthis.activeCellModel = cell;\n\t\tthis.dispatchEvent(new EditorEvent('activate'));\n\t}\n\t\n\tdeactivate() : void {\n\t\tthis.dispatchEvent(new EditorEvent('deactivate'));\n\t}\n\n}"]}
|
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
import { BaseEditor } from "./baseEditor";
|
|
2
2
|
import { CellModel } from '@omegagrid/grid-core';
|
|
3
3
|
export declare class CalendarEditor extends BaseEditor {
|
|
4
|
+
#private;
|
|
4
5
|
calendar: any;
|
|
6
|
+
protected withTime: boolean;
|
|
7
|
+
protected timeOnly: boolean;
|
|
8
|
+
init(): void;
|
|
5
9
|
setValue(value: number | string | Date): void;
|
|
6
|
-
getValue(): number;
|
|
10
|
+
getValue(): number | Date;
|
|
11
|
+
getDateFormat(cell: CellModel): string;
|
|
7
12
|
activate(cell: CellModel): Promise<void>;
|
|
13
|
+
commit(): void;
|
|
8
14
|
_onChange: () => void;
|
|
15
|
+
_onDropdownClose: () => void;
|
|
16
|
+
_onDocumentKeyDown: (e: KeyboardEvent) => void;
|
|
9
17
|
render: () => import("lit-html").TemplateResult<1>;
|
|
18
|
+
disconnectedCallback(): void;
|
|
10
19
|
close(): void;
|
|
11
20
|
}
|
|
12
21
|
//# sourceMappingURL=calendarEditor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendarEditor.d.ts","sourceRoot":"","sources":["../../src/editors/calendarEditor.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"calendarEditor.d.ts","sourceRoot":"","sources":["../../src/editors/calendarEditor.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,SAAS,EAAoC,MAAM,sBAAsB,CAAC;AAEnF,qBACa,cAAe,SAAQ,UAAU;;IAG7C,QAAQ,EAAE,GAAG,CAAC;IAGd,SAAS,CAAC,QAAQ,UAAS;IAG3B,SAAS,CAAC,QAAQ,UAAS;IAQ3B,IAAI;IAQJ,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAC,MAAM,GAAC,IAAI;IAuBlC,QAAQ,IAAK,MAAM,GAAC,IAAI;IAOxB,aAAa,CAAC,IAAI,EAAE,SAAS;IAMvB,QAAQ,CAAC,IAAI,EAAE,SAAS;IAoB9B,MAAM;IAUN,SAAS,aAGR;IAED,gBAAgB,aAEf;IAGD,kBAAkB,GAAI,GAAG,aAAa,UAKrC;IAED,MAAM,6CAOJ;IAGF,oBAAoB;IAMpB,KAAK;CAgBL"}
|
|
@@ -5,65 +5,159 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
7
|
};
|
|
8
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
9
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
10
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
11
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
12
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
13
|
+
};
|
|
14
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
15
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
16
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
17
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
18
|
+
};
|
|
19
|
+
var _CalendarEditor_changed, _CalendarEditor_typedText, _CalendarEditor_closing;
|
|
8
20
|
import { customElement, query } from 'lit/decorators.js';
|
|
9
21
|
import { dates, utils } from "@omegagrid/core";
|
|
10
22
|
import { getLocale } from "@omegagrid/localize";
|
|
11
23
|
import { BaseEditor } from "./baseEditor";
|
|
12
24
|
import { html } from 'lit';
|
|
13
|
-
import {
|
|
25
|
+
import { getDateTimeFormat, getTimeFormat } from '@omegagrid/grid-core';
|
|
14
26
|
let CalendarEditor = class CalendarEditor extends BaseEditor {
|
|
15
27
|
constructor() {
|
|
16
28
|
super(...arguments);
|
|
29
|
+
// a date and time cell (type dt) and a time cell (type tm) hold a Date, a date cell a serial date
|
|
30
|
+
this.withTime = false;
|
|
31
|
+
// a time cell picks its time of day alone, without the calendar
|
|
32
|
+
this.timeOnly = false;
|
|
33
|
+
// whether the calendar changed the value: an untouched value is not written back (the cell would count as edited)
|
|
34
|
+
_CalendarEditor_changed.set(this, false);
|
|
35
|
+
// a text the editing starts with (the key pressed on the cell): typed into the input of the dropdown when it opens
|
|
36
|
+
_CalendarEditor_typedText.set(this, null);
|
|
37
|
+
// the editing is ending: a change taken over from the input meanwhile does not end it again
|
|
38
|
+
_CalendarEditor_closing.set(this, false);
|
|
39
|
+
// a day pick ends the editing; with time the dropdown stays open for the time row (or shows it alone) and the editing ends with it
|
|
17
40
|
this._onChange = () => {
|
|
18
|
-
this
|
|
41
|
+
__classPrivateFieldSet(this, _CalendarEditor_changed, true, "f");
|
|
42
|
+
if (!this.withTime && !__classPrivateFieldGet(this, _CalendarEditor_closing, "f"))
|
|
43
|
+
this.close();
|
|
44
|
+
};
|
|
45
|
+
this._onDropdownClose = () => {
|
|
46
|
+
if (this.isOpen)
|
|
47
|
+
this.close();
|
|
48
|
+
};
|
|
49
|
+
// the dropdown is not inside the editor: a key pressed after a click in it goes to the document
|
|
50
|
+
this._onDocumentKeyDown = (e) => {
|
|
51
|
+
if (e.key != 'Escape' || !this.isOpen)
|
|
52
|
+
return;
|
|
53
|
+
if (this.calendar.closeInnerList?.())
|
|
54
|
+
return; // the month or year list of the calendar was open: closed alone
|
|
55
|
+
this.cancel = true;
|
|
19
56
|
this.close();
|
|
20
57
|
};
|
|
21
58
|
this.render = () => html `
|
|
22
59
|
<og-calendar-dropdown
|
|
23
60
|
buttonInput
|
|
24
61
|
cross
|
|
25
|
-
@change="${this._onChange}"
|
|
62
|
+
@change="${this._onChange}"
|
|
63
|
+
@dropdown.close="${this._onDropdownClose}">
|
|
26
64
|
</og-calendar-dropdown>
|
|
27
65
|
`;
|
|
28
66
|
}
|
|
67
|
+
init() {
|
|
68
|
+
super.init();
|
|
69
|
+
// Escape with the month or year list of the calendar open (the focus in the input) closes that list alone
|
|
70
|
+
this.addEventListener('keydown', (e) => {
|
|
71
|
+
if (e.key == 'Escape' && this.calendar?.closeInnerList?.())
|
|
72
|
+
e.stopImmediatePropagation();
|
|
73
|
+
}, { capture: true });
|
|
74
|
+
}
|
|
29
75
|
setValue(value) {
|
|
30
76
|
if (value == null) {
|
|
31
77
|
this.calendar.value = null;
|
|
32
78
|
return;
|
|
33
79
|
}
|
|
34
|
-
if (
|
|
35
|
-
|
|
36
|
-
if (date) {
|
|
37
|
-
this.calendar.value = date;
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
else if (utils.isNumber(value)) {
|
|
42
|
-
this.calendar.value = dates.serialDateToDate(value);
|
|
80
|
+
if (value instanceof Date) {
|
|
81
|
+
this.calendar.value = value;
|
|
43
82
|
return;
|
|
44
83
|
}
|
|
45
|
-
|
|
46
|
-
this.calendar.value = value;
|
|
84
|
+
if (utils.isNumber(value)) {
|
|
85
|
+
this.calendar.value = this.withTime ? dates.serialDateToDateTime(value) : dates.serialDateToDate(value);
|
|
47
86
|
return;
|
|
48
87
|
}
|
|
49
|
-
|
|
88
|
+
const date = this.timeOnly
|
|
89
|
+
? dates.parseTime(value, getLocale())
|
|
90
|
+
: (this.withTime ? dates.parseDateTime(value, getLocale()) : dates.parse(value, getLocale()));
|
|
91
|
+
if (date)
|
|
92
|
+
this.calendar.value = date;
|
|
93
|
+
else
|
|
94
|
+
__classPrivateFieldSet(this, _CalendarEditor_typedText, value, "f"); // not a date yet: the text goes on being typed in the input
|
|
50
95
|
}
|
|
51
96
|
getValue() {
|
|
52
97
|
const date = this.calendar?.value;
|
|
53
|
-
|
|
54
|
-
|
|
98
|
+
if (!date)
|
|
99
|
+
return null;
|
|
100
|
+
return this.withTime ? date : dates.dateToSerialDate(date);
|
|
101
|
+
}
|
|
102
|
+
// the format the cell shows its date in (the dropdown falls back to its own when it is not a date format)
|
|
103
|
+
getDateFormat(cell) {
|
|
104
|
+
const options = cell.model.options;
|
|
105
|
+
return cell.format
|
|
106
|
+
|| (this.timeOnly ? getTimeFormat(options) : (this.withTime ? getDateTimeFormat(options) : options.dateFormat));
|
|
55
107
|
}
|
|
56
108
|
async activate(cell) {
|
|
57
109
|
super.activate(cell);
|
|
58
|
-
|
|
59
|
-
|
|
110
|
+
__classPrivateFieldSet(this, _CalendarEditor_changed, false, "f");
|
|
111
|
+
__classPrivateFieldSet(this, _CalendarEditor_typedText, null, "f");
|
|
112
|
+
this.withTime = cell.type === 'dt' || cell.type === 'tm';
|
|
113
|
+
this.timeOnly = cell.type === 'tm';
|
|
114
|
+
this.calendar.withTime = cell.type === 'dt';
|
|
115
|
+
this.calendar.timeOnly = this.timeOnly;
|
|
116
|
+
this.calendar.dateFormat = this.getDateFormat(cell);
|
|
117
|
+
// the value goes first, the key the editing started with comes next (BaseEditor.open) and is typed on top of it
|
|
60
118
|
this.setValue(cell.value);
|
|
119
|
+
document.addEventListener('keydown', this._onDocumentKeyDown);
|
|
120
|
+
await this.calendar.updateComplete;
|
|
121
|
+
if (!this.isOpen)
|
|
122
|
+
return; // closed meanwhile
|
|
123
|
+
await this.calendar.open(__classPrivateFieldGet(this, _CalendarEditor_typedText, "f"));
|
|
124
|
+
// the keys typed go on in the input of the dropdown
|
|
125
|
+
this.calendar.input?.focus();
|
|
126
|
+
__classPrivateFieldSet(this, _CalendarEditor_typedText, null, "f");
|
|
127
|
+
}
|
|
128
|
+
commit() {
|
|
129
|
+
if (__classPrivateFieldGet(this, _CalendarEditor_changed, "f"))
|
|
130
|
+
super.commit();
|
|
131
|
+
else
|
|
132
|
+
this.cancel = false;
|
|
133
|
+
__classPrivateFieldSet(this, _CalendarEditor_changed, false, "f");
|
|
61
134
|
}
|
|
135
|
+
// a grid removed while the editor is open does not close it: the document listener would keep both alive
|
|
136
|
+
disconnectedCallback() {
|
|
137
|
+
super.disconnectedCallback();
|
|
138
|
+
document.removeEventListener('keydown', this._onDocumentKeyDown);
|
|
139
|
+
}
|
|
140
|
+
// the editing may end outside the dropdown too (a click on another cell): the picked value is kept unless cancelled
|
|
62
141
|
close() {
|
|
142
|
+
document.removeEventListener('keydown', this._onDocumentKeyDown);
|
|
143
|
+
if (this.isOpen && !this.cancel) {
|
|
144
|
+
// a text typed into the input and not left yet: the click elsewhere ends the editing before the input loses the focus
|
|
145
|
+
__classPrivateFieldSet(this, _CalendarEditor_closing, true, "f");
|
|
146
|
+
try {
|
|
147
|
+
this.calendar.commitInput?.();
|
|
148
|
+
}
|
|
149
|
+
finally {
|
|
150
|
+
__classPrivateFieldSet(this, _CalendarEditor_closing, false, "f");
|
|
151
|
+
}
|
|
152
|
+
this.commit();
|
|
153
|
+
}
|
|
63
154
|
super.close();
|
|
64
155
|
this.calendar.close();
|
|
65
156
|
}
|
|
66
157
|
};
|
|
158
|
+
_CalendarEditor_changed = new WeakMap();
|
|
159
|
+
_CalendarEditor_typedText = new WeakMap();
|
|
160
|
+
_CalendarEditor_closing = new WeakMap();
|
|
67
161
|
__decorate([
|
|
68
162
|
query('og-calendar-dropdown')
|
|
69
163
|
], CalendarEditor.prototype, "calendar", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendarEditor.js","sourceRoot":"","sources":["../../src/editors/calendarEditor.ts"],"names":[],"mappings":"AAAA,uDAAuD;;;;;;;AAEvD,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAI/B,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,UAAU;IAAvC;;QAyCN,cAAS,GAAG,GAAG,EAAE;YAChB,IAAI,CAAC,MAAM,EAAE,CAAC;YACd,IAAI,CAAC,KAAK,EAAE,CAAC;QACd,CAAC,CAAA;QAED,WAAM,GAAG,GAAG,EAAE,CAAC,IAAI,CAAA;;;;cAIN,IAAI,CAAC,SAAS;;EAE1B,CAAC;IAOH,CAAC;IAtDA,QAAQ,CAAC,KAAyB;QACjC,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;YACnB,IAAI,CAAC,QAAQ,CAAC,KAAK,GAAG,IAAI,CAAC;YAC3B,OAAO;QACR,CAAC;QAED,IAAI,KAAK,CAAC,QAAQ,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AAK,CAAC,sBAAsB,CAAC;gDAChB;AAHF,cAAc;IAD1B,aAAa,CAAC,wBAAwB,CAAC;GAC3B,cAAc,CA2D1B","sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport { customElement, query } from 'lit/decorators.js';\nimport { dates, utils } from \"@omegagrid/core\";\nimport { getLocale } from \"@omegagrid/localize\";\nimport { BaseEditor } from \"./baseEditor\";\nimport { html } from 'lit';\nimport { startOfDay } from 'date-fns';\nimport { CellModel } from '@omegagrid/grid-core';\n\n@customElement('og-grid-calendareditor')\nexport class CalendarEditor extends BaseEditor {\n\n\t@query('og-calendar-dropdown')\n\tcalendar: any;\n\n\tsetValue(value: number|string|Date) {\n\t\tif (value == null) {\n\t\t\tthis.calendar.value = null;\n\t\t\treturn;\n\t\t}\n\n\t\tif (utils.isString(value)) {\n\t\t\tconst date = dates.parse(value as string, getLocale());\n\t\t\tif (date) {\n\t\t\t\tthis.calendar.value = date;\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (utils.isNumber(value)) {\n\t\t\tthis.calendar.value = dates.serialDateToDate(value as number);\n\t\t\treturn;\n\t\t} else {\n\t\t\tthis.calendar.value = value as Date;\n\t\t\treturn;\n\t\t}\n\n\t\tthis.calendar.value = startOfDay(new Date());\n\t}\n\n\tgetValue() : number {\n\t\tconst date = this.calendar?.value;\n\t\tconsole.log(date);\n\t\treturn date ? dates.dateToSerialDate(date) : null;\n\t}\n\n\tasync activate(cell: CellModel) {\n super.activate(cell);\n\t\tawait this.calendar.updateComplete;\n\t\tawait this.calendar.open();\n this.setValue(cell.value as number);\n }\n\n\t_onChange = () => {\n\t\tthis.commit();\n\t\tthis.close();\n\t}\t\t\n\n\trender = () => html`\n\t\t<og-calendar-dropdown\n\t\t\tbuttonInput\n\t\t\tcross\n\t\t\t@change=\"${this._onChange}\">\n\t\t</og-calendar-dropdown>\n\t`;\n\t\n\tclose() {\n\t\tsuper.close();\n\t\tthis.calendar.close();\n\t}\n\n}"]}
|
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,CAAC,SAAS,EAAE,IAAI,CAAC,kBAAkB,CAAC,CAAC;QACjE,IAAI,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;YACjC,sHAAsH;YACtH,uBAAA,IAAI,2BAAY,IAAI,MAAA,CAAC;YACrB,IAAI,CAAC;gBACJ,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,EAAE,CAAC;YAC/B,CAAC;oBAAS,CAAC;gBACV,uBAAA,IAAI,2BAAY,KAAK,MAAA,CAAC;YACvB,CAAC;YACD,IAAI,CAAC,MAAM,EAAE,CAAC;QACf,CAAC;QACD,KAAK,CAAC,KAAK,EAAE,CAAC;QACd,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;IACvB,CAAC;CAED,CAAA;;;;AAzIA;IADC,KAAK,CAAC,sBAAsB,CAAC;gDAChB;AAHF,cAAc;IAD1B,aAAa,CAAC,wBAAwB,CAAC;GAC3B,cAAc,CA4I1B","sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport { customElement, query } from 'lit/decorators.js';\nimport { dates, utils } from \"@omegagrid/core\";\nimport { getLocale } from \"@omegagrid/localize\";\nimport { BaseEditor } from \"./baseEditor\";\nimport { html } from 'lit';\nimport { CellModel, getDateTimeFormat, getTimeFormat } from '@omegagrid/grid-core';\n\n@customElement('og-grid-calendareditor')\nexport class CalendarEditor extends BaseEditor {\n\n\t@query('og-calendar-dropdown')\n\tcalendar: any;\n\n\t// a date and time cell (type dt) and a time cell (type tm) hold a Date, a date cell a serial date\n\tprotected withTime = false;\n\n\t// a time cell picks its time of day alone, without the calendar\n\tprotected timeOnly = false;\n\n\t// whether the calendar changed the value: an untouched value is not written back (the cell would count as edited)\n\t#changed = false;\n\n\t// a text the editing starts with (the key pressed on the cell): typed into the input of the dropdown when it opens\n\t#typedText: string = null;\n\n\tinit() {\n\t\tsuper.init();\n\t\t// Escape with the month or year list of the calendar open (the focus in the input) closes that list alone\n\t\tthis.addEventListener('keydown', (e: KeyboardEvent) => {\n\t\t\tif (e.key == 'Escape' && this.calendar?.closeInnerList?.()) e.stopImmediatePropagation();\n\t\t}, {capture: true});\n\t}\n\n\tsetValue(value: number|string|Date) {\n\t\tif (value == null) {\n\t\t\tthis.calendar.value = null;\n\t\t\treturn;\n\t\t}\n\n\t\tif (value instanceof Date) {\n\t\t\tthis.calendar.value = value;\n\t\t\treturn;\n\t\t}\n\n\t\tif (utils.isNumber(value)) {\n\t\t\tthis.calendar.value = this.withTime ? dates.serialDateToDateTime(value as number) : dates.serialDateToDate(value as number);\n\t\t\treturn;\n\t\t}\n\n\t\tconst date = this.timeOnly\n\t\t\t? dates.parseTime(value as string, getLocale())\n\t\t\t: (this.withTime ? dates.parseDateTime(value as string, getLocale()) : dates.parse(value as string, getLocale()));\n\t\tif (date) this.calendar.value = date;\n\t\telse this.#typedText = value as string; // not a date yet: the text goes on being typed in the input\n\t}\n\n\tgetValue() : number|Date {\n\t\tconst date = this.calendar?.value;\n\t\tif (!date) return null;\n\t\treturn this.withTime ? date : dates.dateToSerialDate(date);\n\t}\n\n\t// the format the cell shows its date in (the dropdown falls back to its own when it is not a date format)\n\tgetDateFormat(cell: CellModel) {\n\t\tconst options = cell.model.options;\n\t\treturn cell.format\n\t\t\t|| (this.timeOnly ? getTimeFormat(options) : (this.withTime ? getDateTimeFormat(options) : options.dateFormat));\n\t}\n\n\tasync activate(cell: CellModel) {\n\t\tsuper.activate(cell);\n\t\tthis.#changed = false;\n\t\tthis.#typedText = null;\n\t\tthis.withTime = cell.type === 'dt' || cell.type === 'tm';\n\t\tthis.timeOnly = cell.type === 'tm';\n\t\tthis.calendar.withTime = cell.type === 'dt';\n\t\tthis.calendar.timeOnly = this.timeOnly;\n\t\tthis.calendar.dateFormat = this.getDateFormat(cell);\n\t\t// the value goes first, the key the editing started with comes next (BaseEditor.open) and is typed on top of it\n\t\tthis.setValue(cell.value as number);\n\t\tdocument.addEventListener('keydown', this._onDocumentKeyDown);\n\t\tawait this.calendar.updateComplete;\n\t\tif (!this.isOpen) return; // closed meanwhile\n\t\tawait this.calendar.open(this.#typedText);\n\t\t// the keys typed go on in the input of the dropdown\n\t\tthis.calendar.input?.focus();\n\t\tthis.#typedText = null;\n\t}\n\n\tcommit() {\n\t\tif (this.#changed) super.commit();\n\t\telse this.cancel = false;\n\t\tthis.#changed = false;\n\t}\n\n\t// the editing is ending: a change taken over from the input meanwhile does not end it again\n\t#closing = false;\n\n\t// a day pick ends the editing; with time the dropdown stays open for the time row (or shows it alone) and the editing ends with it\n\t_onChange = () => {\n\t\tthis.#changed = true;\n\t\tif (!this.withTime && !this.#closing) this.close();\n\t}\n\n\t_onDropdownClose = () => {\n\t\tif (this.isOpen) this.close();\n\t}\n\n\t// the dropdown is not inside the editor: a key pressed after a click in it goes to the document\n\t_onDocumentKeyDown = (e: KeyboardEvent) => {\n\t\tif (e.key != 'Escape' || !this.isOpen) return;\n\t\tif (this.calendar.closeInnerList?.()) return; // the month or year list of the calendar was open: closed alone\n\t\tthis.cancel = true;\n\t\tthis.close();\n\t}\n\n\trender = () => html`\n\t\t<og-calendar-dropdown\n\t\t\tbuttonInput\n\t\t\tcross\n\t\t\t@change=\"${this._onChange}\"\n\t\t\t@dropdown.close=\"${this._onDropdownClose}\">\n\t\t</og-calendar-dropdown>\n\t`;\n\n\t// a grid removed while the editor is open does not close it: the document listener would keep both alive\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback();\n\t\tdocument.removeEventListener('keydown', this._onDocumentKeyDown);\n\t}\n\n\t// the editing may end outside the dropdown too (a click on another cell): the picked value is kept unless cancelled\n\tclose() {\n\t\tdocument.removeEventListener('keydown', this._onDocumentKeyDown);\n\t\tif (this.isOpen && !this.cancel) {\n\t\t\t// a text typed into the input and not left yet: the click elsewhere ends the editing before the input loses the focus\n\t\t\tthis.#closing = true;\n\t\t\ttry {\n\t\t\t\tthis.calendar.commitInput?.();\n\t\t\t} finally {\n\t\t\t\tthis.#closing = false;\n\t\t\t}\n\t\t\tthis.commit();\n\t\t}\n\t\tsuper.close();\n\t\tthis.calendar.close();\n\t}\n\n}"]}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { TextEditor } from "./textEditor";
|
|
2
2
|
import { CellModel } from "@omegagrid/grid-core";
|
|
3
3
|
export declare class DateEditor extends TextEditor {
|
|
4
|
+
protected withTime: boolean;
|
|
5
|
+
protected timeOnly: boolean;
|
|
4
6
|
setValue(value: number | string | Date): void;
|
|
5
|
-
getValue(): number;
|
|
7
|
+
getValue(): number | Date;
|
|
6
8
|
activate(cell: CellModel): void;
|
|
7
9
|
}
|
|
8
10
|
//# sourceMappingURL=dateEditor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dateEditor.d.ts","sourceRoot":"","sources":["../../src/editors/dateEditor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAI1C,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,qBACa,UAAW,SAAQ,UAAU;
|
|
1
|
+
{"version":3,"file":"dateEditor.d.ts","sourceRoot":"","sources":["../../src/editors/dateEditor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAI1C,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,qBACa,UAAW,SAAQ,UAAU;IAGzC,SAAS,CAAC,QAAQ,UAAS;IAG3B,SAAS,CAAC,QAAQ,UAAS;IAE3B,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAC,MAAM,GAAC,IAAI;IAoBlC,QAAQ,IAAK,MAAM,GAAC,IAAI;IAOxB,QAAQ,CAAC,IAAI,EAAE,SAAS;CAOxB"}
|
|
@@ -6,27 +6,46 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
import { TextEditor } from "./textEditor";
|
|
8
8
|
import { customElement } from 'lit/decorators.js';
|
|
9
|
-
import { dates } from "@omegagrid/core";
|
|
9
|
+
import { dates, utils } from "@omegagrid/core";
|
|
10
10
|
import { getLocale } from "@omegagrid/localize";
|
|
11
11
|
let DateEditor = class DateEditor extends TextEditor {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments);
|
|
14
|
+
// a date and time cell (type dt) holds a Date, a date cell a serial date
|
|
15
|
+
this.withTime = false;
|
|
16
|
+
// a time cell (type tm) holds a Date of its time of day
|
|
17
|
+
this.timeOnly = false;
|
|
18
|
+
}
|
|
12
19
|
setValue(value) {
|
|
13
20
|
if (value == null) {
|
|
14
21
|
this.input.value = '';
|
|
15
22
|
return;
|
|
16
23
|
}
|
|
24
|
+
// a text is shown as it is: the key that started the editing (a date is formatted only from its Date or serial date)
|
|
25
|
+
if (utils.isString(value)) {
|
|
26
|
+
this.input.value = value;
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
17
29
|
try {
|
|
18
|
-
this.
|
|
30
|
+
const format = this.timeOnly ? 'HH:mm:ss' : (this.withTime ? 'yyyy-MM-dd HH:mm:ss' : 'yyyy-MM-dd');
|
|
31
|
+
this.input.value = dates.getDateFormatter(getLocale(), format)(value);
|
|
19
32
|
}
|
|
20
33
|
catch (error) {
|
|
21
|
-
this.input.value = value
|
|
34
|
+
this.input.value = value.toString();
|
|
22
35
|
}
|
|
23
36
|
}
|
|
24
37
|
getValue() {
|
|
38
|
+
if (this.timeOnly)
|
|
39
|
+
return dates.parseTime(this.input.value, getLocale());
|
|
40
|
+
if (this.withTime)
|
|
41
|
+
return dates.parseDateTime(this.input.value, getLocale());
|
|
25
42
|
const date = dates.parse(this.input.value, getLocale());
|
|
26
43
|
return date ? dates.dateToSerialDate(date) : null;
|
|
27
44
|
}
|
|
28
45
|
activate(cell) {
|
|
29
46
|
super.activate(cell);
|
|
47
|
+
this.withTime = cell.type === 'dt';
|
|
48
|
+
this.timeOnly = cell.type === 'tm';
|
|
30
49
|
this.setValue(cell.value);
|
|
31
50
|
}
|
|
32
51
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dateEditor.js","sourceRoot":"","sources":["../../src/editors/dateEditor.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"dateEditor.js","sourceRoot":"","sources":["../../src/editors/dateEditor.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAIzC,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,UAAU;IAAnC;;QAEN,yEAAyE;QAC/D,aAAQ,GAAG,KAAK,CAAC;QAE3B,wDAAwD;QAC9C,aAAQ,GAAG,KAAK,CAAC;IAoC5B,CAAC;IAlCA,QAAQ,CAAC,KAAyB;QACjC,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;YACnB,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,EAAE,CAAC;YACtB,OAAO;QACR,CAAC;QAED,qHAAqH;QACrH,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;YAC3B,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,KAAe,CAAC;YACnC,OAAO;QACR,CAAC;QAED,IAAI,CAAC;YACJ,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC;YACnG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,gBAAgB,CAAC,SAAS,EAAE,EAAE,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC;QACvE,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC;QACrC,CAAC;IACF,CAAC;IAED,QAAQ;QACP,IAAI,IAAI,CAAC,QAAQ;YAAE,OAAO,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;QACzE,IAAI,IAAI,CAAC,QAAQ;YAAE,OAAO,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;QAC7E,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;QACxD,OAAO,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACnD,CAAC;IAED,QAAQ,CAAC,IAAe;QACjB,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAC3B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC;QACnC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC;QAC7B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAe,CAAC,CAAC;IACxC,CAAC;CAEJ,CAAA;AA1CY,UAAU;IADtB,aAAa,CAAC,oBAAoB,CAAC;GACvB,UAAU,CA0CtB","sourcesContent":["import { TextEditor } from \"./textEditor\";\nimport { customElement } from 'lit/decorators.js';\nimport { dates, utils } from \"@omegagrid/core\";\nimport { getLocale } from \"@omegagrid/localize\";\nimport { CellModel } from \"@omegagrid/grid-core\";\n\n@customElement('og-grid-dateeditor')\nexport class DateEditor extends TextEditor {\n\n\t// a date and time cell (type dt) holds a Date, a date cell a serial date\n\tprotected withTime = false;\n\n\t// a time cell (type tm) holds a Date of its time of day\n\tprotected timeOnly = false;\n\n\tsetValue(value: number|string|Date) {\n\t\tif (value == null) {\n\t\t\tthis.input.value = '';\n\t\t\treturn;\n\t\t}\n\n\t\t// a text is shown as it is: the key that started the editing (a date is formatted only from its Date or serial date)\n\t\tif (utils.isString(value)) {\n\t\t\tthis.input.value = value as string;\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tconst format = this.timeOnly ? 'HH:mm:ss' : (this.withTime ? 'yyyy-MM-dd HH:mm:ss' : 'yyyy-MM-dd');\n\t\t\tthis.input.value = dates.getDateFormatter(getLocale(), format)(value);\n\t\t} catch (error) {\n\t\t\tthis.input.value = value.toString();\n\t\t}\n\t}\n\n\tgetValue() : number|Date {\n\t\tif (this.timeOnly) return dates.parseTime(this.input.value, getLocale());\n\t\tif (this.withTime) return dates.parseDateTime(this.input.value, getLocale());\n\t\tconst date = dates.parse(this.input.value, getLocale());\n\t\treturn date ? dates.dateToSerialDate(date) : null;\n\t}\n\n\tactivate(cell: CellModel) {\n super.activate(cell);\n\t\tthis.withTime = cell.type === 'dt';\n\t\tthis.timeOnly = cell.type === 'tm';\n this.setValue(cell.value as number);\n }\n\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/editors/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAO1C,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE/D,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAEhC,MAAM,MAAM,iBAAiB,GAAG,aAAa,CAAC,UAAU,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/editors/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAO1C,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE/D,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAEhC,MAAM,MAAM,iBAAiB,GAAG,aAAa,CAAC,UAAU,CAAC,CAAC;AAa1D,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,QAAQ,GAAI,iBAAiB,CAEnE"}
|
package/dist/editors/index.js
CHANGED
|
@@ -19,6 +19,8 @@ const editorMap = new Map([
|
|
|
19
19
|
['s', () => new DropdownEditor()],
|
|
20
20
|
['m', () => new DropdownEditor()],
|
|
21
21
|
['d', (_cell, options) => options?.dateCalendarEditor ? new CalendarEditor() : new DateEditor()],
|
|
22
|
+
['dt', (_cell, options) => options?.dateCalendarEditor ? new CalendarEditor() : new DateEditor()],
|
|
23
|
+
['tm', (_cell, options) => options?.dateCalendarEditor ? new CalendarEditor() : new DateEditor()],
|
|
22
24
|
]);
|
|
23
25
|
export function getEditorFactory(type) {
|
|
24
26
|
return editorMap.get(editorMap.has(type) ? type : 't');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/editors/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE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I,UAAU,EAAE,CAAC;CACjG,CAAC,CAAC;AAEH,MAAM,UAAU,gBAAgB,CAAC,IAAc;IAC9C,OAAO,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAE,CAAC;AACzD,CAAC","sourcesContent":["import { BaseEditor } from \"./baseEditor\";\nimport { CheckboxEditor } from \"./checkboxEditor\";\nimport { NumberEditor } from \"./numberEditor\";\nimport { TextEditor } from \"./textEditor\";\nimport { DropdownEditor } from \"./dropdownEditor\";\nimport { DateEditor } from \"./dateEditor\";\nimport { CalendarEditor } from \"./calendarEditor\";\nimport { CellType, EditorFactory } from \"@omegagrid/grid-core\";\n\nexport * from \"./baseEditor\";\nexport * from \"./checkboxEditor\";\nexport * from \"./numberEditor\";\nexport * from \"./textEditor\";\nexport * from \"./dropdownEditor\";\nexport * from \"./dateEditor\";\nexport * from \"./calendarEditor\";\nexport * from \"./formulaEditor\";\n\nexport type GridEditorFactory = EditorFactory<BaseEditor>;\n\nconst editorMap = new Map<CellType, GridEditorFactory>([\n\t['t', () => new TextEditor()],\n\t['n', () => new NumberEditor()],\n\t['b', () => new CheckboxEditor()],\n\t['s', () => new DropdownEditor()],\n\t['m', () => new DropdownEditor()],\n\t['d', (_cell, options) => options?.dateCalendarEditor ? new CalendarEditor() : new DateEditor()],\n\t['dt', (_cell, options) => options?.dateCalendarEditor ? new CalendarEditor() : new DateEditor()],\n\t['tm', (_cell, options) => options?.dateCalendarEditor ? new CalendarEditor() : new DateEditor()],\n]);\n\nexport function getEditorFactory(type: CellType) : GridEditorFactory {\n\treturn editorMap.get(editorMap.has(type) ? type : 't')!;\n}"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateTimeRenderer.d.ts","sourceRoot":"","sources":["../../src/renderers/DateTimeRenderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAG/C,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,cAAc,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAI,cAAc,
|
|
1
|
+
{"version":3,"file":"DateTimeRenderer.d.ts","sourceRoot":"","sources":["../../src/renderers/DateTimeRenderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAG/C,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,cAAc,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAI,cAAc,CAoBrH"}
|
|
@@ -3,8 +3,10 @@ import { dom } from "@omegagrid/core";
|
|
|
3
3
|
export function DateTimeRenderer(div, cell, options) {
|
|
4
4
|
const opts = cell.model.options;
|
|
5
5
|
try {
|
|
6
|
+
// a date and time cell (type dt) or a time cell (type tm) without a format of its own shows the format of its type
|
|
7
|
+
const formatter = cell.type == 'dt' ? opts.dateTimeFormatter : (cell.type == 'tm' ? opts.timeFormatter : opts.dateFormatter);
|
|
6
8
|
div.textContent = cell.value
|
|
7
|
-
?
|
|
9
|
+
? formatter(cell.value, cell.format)
|
|
8
10
|
: '';
|
|
9
11
|
}
|
|
10
12
|
catch (_err) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateTimeRenderer.js","sourceRoot":"","sources":["../../src/renderers/DateTimeRenderer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAEtC,MAAM,UAAU,gBAAgB,CAAC,GAAmB,EAAE,IAAe,EAAE,OAA6B;IACnG,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAA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CAAC,CAAC;IAC3B,CAAC;IAED,OAAO,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;AACpD,CAAC","sourcesContent":["import { CellModel } from \"@omegagrid/grid-core\";\nimport { BaseRenderer } from \"./BaseRenderer\";\nimport { CellRendererOptions } from \"../types\";\nimport { dom } from \"@omegagrid/core\";\n\nexport function DateTimeRenderer(div: HTMLDivElement, cell: CellModel, options?: CellRendererOptions) : HTMLDivElement {\n\tconst opts = cell.model.options;\n\ttry {\n\t\t// a date and time cell (type dt) or a time cell (type tm) without a format of its own shows the format of its type\n\t\tconst formatter = cell.type == 'dt' ? opts.dateTimeFormatter : (cell.type == 'tm' ? opts.timeFormatter : opts.dateFormatter);\n\t\tdiv.textContent = cell.value\n\t\t\t? formatter(cell.value as Date|string, cell.format)\n\t\t\t: '';\n\t} catch (_err) {\n\t\tdiv.textContent = '!invalid format';\n\t}\n\t\n\tif (cell.editable && opts.editing?.dateCalendarEditor) {\n\t\tconst triangle = dom.createElement('div');\n\t\ttriangle.className = 'triangle-down';\n\t\tdom.setPosition(triangle, {t: 8, r: 8});\n\t\tdiv.appendChild(triangle);\n\t}\n\n\treturn BaseRenderer.call(this, div, cell, options);\n}"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid.editing.d.ts","sourceRoot":"","sources":["../../src/ui/grid.editing.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,OAAO,EAAE,SAAS,EAA0D,aAAa,EAA2B,UAAU,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"grid.editing.d.ts","sourceRoot":"","sources":["../../src/ui/grid.editing.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,OAAO,EAAE,SAAS,EAA0D,aAAa,EAA2B,UAAU,EAAE,WAAW,EAAgB,MAAM,sBAAsB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AOV,UAAU,CAAC,OAAO,EAAE,aAAa;IAYjC,aAAa,CAAC,OAAO,EAAE,aAAa;IAYpC,UAAU,CAAC,OAAO,EAAE,aAAa;IAYjC,aAAa,CAAC,OAAO,EAAE,aAAa;IAYpC,QAAQ,CAAC,OAAO,EAAE,aAAa;IAY/B,WAAW,CAAC,OAAO,EAAE,aAAa;IAYlC,cAAc,CAAC,aAAa,UAAO;IAMnC,SAAS,CAAC,IAAI,EAAE,SAAS;IAoBzB,gBAAgB;IAUhB,mGAAmG;IACnG,oBAAoB;IAMpB;;;OAGG;IACH,aAAa;YA2BC,WAAW;IA4FzB;;;OAGG;YACW,qBAAqB;YAiBrB,SAAS;IAIjB,KAAK;IAoBX,YAAY,CAAC,IAAI,EAAE,SAAS;IAM5B,IAAI;IA6BJ,IAAI;IA6BJ,iBAAiB,CAAC,EAAE,EAAE,MAAM;IAI5B,KAAK,CAAC,KAAK,CAAC,EAAE,WAAW;IASzB,OAAO,CAAC,KAAK,CAAC,EAAE,WAAW;CAW3B"}
|
package/dist/ui/grid.editing.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { csv, utils } from "@omegagrid/core";
|
|
2
2
|
import { FormulaEditor, getEditorFactory } from "../editors";
|
|
3
3
|
import { getDropdownListSource, loadDropdownList } from "../editors/dropdownList";
|
|
4
|
-
import { isFormula, hasQuotePrefix, stripQuotePrefix, CellRange, decodeColumn, decodeRow } from "@omegagrid/grid-core";
|
|
4
|
+
import { isFormula, hasQuotePrefix, stripQuotePrefix, CellRange, decodeColumn, decodeRow, isCellSource } from "@omegagrid/grid-core";
|
|
5
5
|
import { GridEditEvent, GridEvent } from "./grid.events";
|
|
6
6
|
import constants from "../constants";
|
|
7
7
|
export class GridEditing {
|
|
@@ -36,7 +36,8 @@ export class GridEditing {
|
|
|
36
36
|
const oldValue = cell.value;
|
|
37
37
|
let newValue;
|
|
38
38
|
let newProps;
|
|
39
|
-
|
|
39
|
+
// a Date (the value of a date and time cell put back by redo) is a value, not the properties of the cell
|
|
40
|
+
if (isCellSource(values[i])) {
|
|
40
41
|
newProps = values[i];
|
|
41
42
|
newValue = ('v' in newProps) ? newProps.v : undefined;
|
|
42
43
|
if (cell.quotePrefixable && hasQuotePrefix(newValue)) {
|
|
@@ -324,7 +325,7 @@ export class GridEditing {
|
|
|
324
325
|
if (!cell.editable)
|
|
325
326
|
continue;
|
|
326
327
|
const j = (c - range.c1) % data[i].length;
|
|
327
|
-
if (pasteProps &&
|
|
328
|
+
if (pasteProps && isCellSource(data[i][j])) {
|
|
328
329
|
// filter unwanted properties
|
|
329
330
|
const updateProps = {};
|
|
330
331
|
pasteProps.forEach((key) => {
|
|
@@ -355,7 +356,7 @@ export class GridEditing {
|
|
|
355
356
|
const source = getDropdownListSource(cell);
|
|
356
357
|
// a pasted formula stays a formula, its result is not an item of the list
|
|
357
358
|
const formula = this.model.formulasEnabled
|
|
358
|
-
&& (
|
|
359
|
+
&& (isCellSource(values[i]) ? !!values[i].f : isFormula(values[i]));
|
|
359
360
|
if (!source || formula)
|
|
360
361
|
return;
|
|
361
362
|
if (!lists.has(source))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid.editing.js","sourceRoot":"","sources":["../../src/ui/grid.editing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAU,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE7D,OAAO,EAAgB,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChG,OAAO,EAAa,SAAS,EAAE,cAAc,EAAE,gBAAgB,EAAE,SAAS,EAAiB,YAAY,EAAE,SAAS,EAA2B,MAAM,sBAAsB,CAAC;AAE1K,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,SAAS,MAAM,cAAc,CAAC;AAiBrC,MAAM,OAAO,WAAW;IAQ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,CAAC,EAAC,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAC,CAAC,CAAC;QACpE,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAC/B,CAAC;IAED,OAAO,CAAC,KAAmB;QAC1B,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;QACjE,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QAC/C,IAAI,CAAC,IAAI;YAAE,OAAO;QAClB,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC9D,IAAI,CAAC,KAAK;YAAE,OAAO;QACnB,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACvC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,EAAC,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAC,CAAC,CAAC;QACpE,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,KAAK,CAAC,EAAE,GAAG,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,KAAK,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;IAC7G,CAAC;CAED","sourcesContent":["import { csv, Matrix, utils } from \"@omegagrid/core\";\nimport { FormulaEditor, getEditorFactory } from \"../editors\";\nimport { BaseEditor } from \"../editors/baseEditor\";\nimport { DropdownList, getDropdownListSource, loadDropdownList } from \"../editors/dropdownList\";\nimport { CellModel, isFormula, hasQuotePrefix, stripQuotePrefix, CellRange, CellValueType, decodeColumn, decodeRow, CellSource, CellAddress } from \"@omegagrid/grid-core\";\nimport { Grid } from \"./grid\";\nimport { GridEditEvent, GridEvent } from \"./grid.events\";\nimport constants from \"../constants\";\n\nexport type DeleteOptions = {\n\tindex: number,\n\tcount: number,\n\tdispatchEvent?: boolean,\n\tfromHistory?: boolean\n};\n\nexport type InsertOptions = DeleteOptions & {\n\tafter?: boolean\n};\n\nexport type MovingOptions = DeleteOptions & {\n\ttargetIndex: number\n};\n\nexport class GridEditing {\n\n\tprivate editorMap = new Map<string, BaseEditor>();\n\tprivate editor: BaseEditor;\n\n\tcolumnMoving = false;\n\trowMoving = false;\n\n\tget model() { return this.grid.model }\n\tget selection() { return this.grid.selection }\n\tget selector() { return this.grid.selector }\n\tget events() { return this.grid.events }\n\tget table() { return this.grid.table }\n\tget isEditing() { return !!this.editor }\n\tget activeEditor() { return this.editor }\n\n\tprivate _formulaMode = false;\n\tget isFormulaMode() { return this._formulaMode || this.grid.group?.isFormulaMode }\n\n\tconstructor(readonly grid: Grid) { }\n\n\tcanEdit(cell: CellModel) {\n\t\treturn (cell.editable || this.grid.designMode) && cell.type !== 'a';\n\t}\n\n\tupdateCell(cell: CellModel, value: CellValueType | CellSource, dispatchEvent = true, fromHistory = false) {\n\t\tthis.updateCells([cell], [value], dispatchEvent, fromHistory);\n\t}\n\n\tupdateCells(cells: CellModel[], values: (CellValueType | CellSource)[], dispatchEvent = true, fromHistory = false) {\n\t\tlet oldValues: CellValueType[];\n\t\tlet oldPropsArr: CellValueType[];\n\t\tlet newValues: CellValueType[];\n\t\tlet newPropsArr: CellValueType[];\n\t\tlet editedCells: CellModel[];\n\t\tcells.forEach((cell, i) => {\n\t\t\tconst oldValue = cell.value;\n\t\t\tlet newValue: CellValueType;\n\t\t\tlet newProps: Partial<CellSource>;\n\n\t\t\tif (utils.isObject(values[i])) {\n\t\t\t\tnewProps = values[i] as CellSource;\n\t\t\t\tnewValue = ('v' in newProps) ? newProps.v : undefined;\n\t\t\t\tif (cell.quotePrefixable && hasQuotePrefix(newValue)) {\n\t\t\t\t\tnewProps = {...newProps, dv: stripQuotePrefix(newValue) as string};\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tnewValue = values[i] as CellValueType;\n\t\t\t}\n\n\t\t\tlet oldProps: Partial<CellSource>;\n\t\t\tif (newProps) {\n\t\t\t\toldProps = cell.update(newProps);\n\t\t\t} else {\n\t\t\t\tcell.clearFormula();\n\t\t\t\tif (oldValue !== newValue) {\n\t\t\t\t\toldProps = {v: oldValue, dv: cell.displayValue};\n\t\t\t\t\tcell.value = newValue;\n\t\t\t\t\tif (cell.quotePrefix) cell.displayValue = stripQuotePrefix(newValue) as string;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (dispatchEvent && oldProps) {\n\t\t\t\toldValues = oldValues || [];\n\t\t\t\toldPropsArr = oldPropsArr || [];\n\t\t\t\tnewValues = newValues || [];\n\t\t\t\tnewPropsArr = newPropsArr || [];\n\t\t\t\teditedCells = editedCells || [];\n\t\t\t\toldValues.push(oldValue);\n\t\t\t\toldPropsArr.push(oldProps);\n\t\t\t\tnewValues.push(newValue);\n\t\t\t\tnewPropsArr.push(newProps);\n\t\t\t\teditedCells.push(cell);\n\t\t\t}\n\t\t});\n\n\t\tif (dispatchEvent && editedCells?.length) {\n\t\t\tthis.grid.dispatchEvent(new GridEditEvent({\n\t\t\t\tgrid: this.grid,\n\t\t\t\tfromHistory: !!fromHistory,\n\t\t\t\tcells: editedCells,\n\t\t\t\teditType: 'value',\n\t\t\t\tnewValues: newValues,\n\t\t\t\tnewProps: newPropsArr,\n\t\t\t\toldValues: oldValues,\n\t\t\t\toldProps: oldPropsArr\n\t\t\t}));\n\t\t}\n\t}\n\n\tstartFormulaMode() {\n\t\tthis._formulaMode = true;\n\t\tif (this.grid.group) this.grid.group.startFormulaMode(this.grid);\n\t}\n\n\tendFormulaMode(group = true) {\n\t\tthis._formulaMode = false;\n\t\tif (group && this.grid.group) this.grid.group.endFormulaMode();\n\t\tthis.grid.selecting.hideFormulaSelector();\n\t\tthis.grid.selecting.removeFormulaHighlight();\n\t\tthis.grid.selecting.showSelector();\n\t}\n\n\tstartEdit(initialValue: unknown = null) {\n\t\tconst cell = this.grid.selecting.activeCell;\n\t\tif (cell && this.canEdit(cell)) {\n\t\t\tthis.grid.logger.info(`start edit ${(new CellRange(cell.c, cell.r)).A1}`);\n\t\t\tlet formula = true;\n\t\t\tif (this.model.formulasEnabled && isFormula(initialValue as string)) {\n\t\t\t\tthis.editor = this.getFormulaEditor().open(this.grid, initialValue);\n\t\t\t} else {\n\t\t\t\tif (initialValue == null && cell.hasOwnFormula) {\n\t\t\t\t\tthis.editor = this.getFormulaEditor().open(this.grid, initialValue);\n\t\t\t\t} else {\n\t\t\t\t\tformula = false;\n\t\t\t\t\tthis.editor = this.getEditor(cell).open(this.grid, initialValue);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.grid.dispatchEvent(new GridEvent('startEdit', {grid: this.grid}));\n\t\t\tif (formula) {\n\t\t\t\tthis.startFormulaMode();\n\t\t\t\tthis.grid.dispatchEvent(new GridEvent('startFormulaEdit', {grid: this.grid}));\n\t\t\t}\n\t\t}\n\t}\n\n\tendEdit() {\n\t\tif (!this.editor) return;\n\t\tthis.grid.logger.info('end edit');\n\t\tthis.grid.editing.endFormulaMode();\n\t\tthis.editor?.close();\n\t\tthis.editor = null;\n\t\tthis.grid.dispatchEvent(new GridEvent('endEdit', {grid: this.grid}));\n\t}\n\n\tcommitEdit() {\n\t\tif (this.editor) {\n\t\t\tthis.editor.commit();\n\t\t\tthis.endEdit();\n\t\t}\n\t}\n\n\tinsertRows(options: InsertOptions) {\n\t\tconst newRows = this.model.insertRows(options.index, options.count, options.after);\n\t\tthis.grid.rendering.renderAll(true);\n\t\tif (utils.ifNull(options.dispatchEvent, true)) this.grid.dispatchEvent(new GridEditEvent({\n\t\t\tgrid: this.grid,\n\t\t\tfromHistory: !!options.fromHistory,\n\t\t\teditType: 'insert_row',\n\t\t\tnewValues: newRows\n\t\t}));\n\t\treturn newRows;\n\t}\n\n\tinsertColumns(options: InsertOptions) {\n\t\tconst newColumns = this.model.insertColumns(options.index , options.count, options.after);\n\t\tthis.grid.rendering.renderAll(true);\n\t\tif (utils.ifNull(options.dispatchEvent, true)) this.grid.dispatchEvent(new GridEditEvent({\n\t\t\tgrid: this.grid,\n\t\t\tfromHistory: !!options.fromHistory,\n\t\t\teditType: 'insert_column',\n\t\t\tnewValues: newColumns\n\t\t}));\n\t\treturn newColumns;\n\t}\n\n\tdeleteRows(options: DeleteOptions) {\n\t\tconst deletedRows = this.model.deleteRows(options.index, options.count);\n\t\tthis.grid.rendering.renderAll(true);\n\t\tif (utils.ifNull(options.dispatchEvent, true)) this.grid.dispatchEvent(new GridEditEvent({\n\t\t\tgrid: this.grid,\n\t\t\tfromHistory: !!options.fromHistory,\n\t\t\teditType: 'delete_row',\n\t\t\toldValues: deletedRows\n\t\t}));\n\t\treturn deletedRows;\n\t}\n\n\tdeleteColumns(options: DeleteOptions) {\n\t\tconst deletedColumns = this.model.deleteColumns(options.index, options.count);\n\t\tthis.grid.rendering.renderAll(true);\n\t\tif (utils.ifNull(options.dispatchEvent, true)) this.grid.dispatchEvent(new GridEditEvent({\n\t\t\tgrid: this.grid,\n\t\t\tfromHistory: !!options.fromHistory,\n\t\t\teditType: 'delete_column',\n\t\t\toldValues: deletedColumns\n\t\t}));\n\t\treturn deletedColumns\n\t}\n\n\tmoveRows(options: MovingOptions) {\n\t\tthis.model.moveRows(options.index, options.count, options.targetIndex);\n\t\tthis.grid.rendering.renderAll(false);\n\t\tif (utils.ifNull(options.dispatchEvent, true)) this.grid.dispatchEvent(new GridEditEvent({\n\t\t\tgrid: this.grid,\n\t\t\tfromHistory: options.fromHistory,\n\t\t\teditType: 'move_row',\n\t\t\toldValues: [new CellRange(0, options.index, Infinity, options.index + options.count - 1)],\n\t\t\tnewValues: [new CellRange(0, options.targetIndex, Infinity, options.targetIndex + options.count - 1)],\n\t\t}));\n\t}\n\n\tmoveColumns(options: MovingOptions) {\n\t\tthis.model.moveColumns(options.index, options.count, options.targetIndex);\n\t\tthis.grid.rendering.renderAll(false);\n\t\tif (utils.ifNull(options.dispatchEvent, true)) this.grid.dispatchEvent(new GridEditEvent({\n\t\t\tgrid: this.grid,\n\t\t\tfromHistory: options.fromHistory,\n\t\t\teditType: 'move_column',\n\t\t\toldValues: [new CellRange(options.index, options.index + options.count - 1, Infinity)],\n\t\t\tnewValues: [new CellRange(options.targetIndex, 0, options.targetIndex + options.count - 1, Infinity)],\n\t\t}));\n\t}\n\n\tclearSelection(dispatchEvent = true) {\n\t\tconst cells = this.model.getCellArray(this.selection.range).filter(cell => this.canEdit(cell));\n\t\tthis.updateCells(cells, cells.map(() => null as CellModel), dispatchEvent);\n\t\tthis.grid.rendering.updateCells(cells, true);\n\t}\n\n\tgetEditor(cell: CellModel) {\n\t\tlet factory = cell.editorFactory;\n\t\tlet key: string = null;\n\n\t\tif (factory) {\n\t\t\tkey = cell.address;\n\t\t} else {\n\t\t\tkey = cell.type;\n\t\t\tfactory = getEditorFactory(cell.type);\n\t\t}\n\n\t\tif (!this.editorMap.has(key)) {\n\t\t\tconst editor = factory(cell, this.model.options.editing) as BaseEditor;\n\t\t\tthis.grid.shadowRoot.appendChild(editor);\n\t\t\tthis.editorMap.set(key, editor);\n\t\t}\n\n\t\treturn this.editorMap.get(key);\n\t}\n\n\tgetFormulaEditor() {\n\t\tconst type = 'formula';\n\t\tif (!this.editorMap.has(type)) {\n\t\t\tconst editor = new FormulaEditor();\n\t\t\tthis.grid.shadowRoot.appendChild(editor);\n\t\t\tthis.editorMap.set(type, editor);\n\t\t}\n\t\treturn this.editorMap.get(type);\n\t}\n\n\t/** the cells of the selection for the clipboard: the rows the user sees only, see copySelection */\n\tgetSelectionCellData() {\n\t\treturn this.model.getCellMatrix(this.selection.range, true).map(\n\t\t\trow => row.map(cell => cell.getSourceData({displayValue: true}))\n\t\t);\n\t}\n\n\t/**\n\t * Copies the selection: the rows the table shows only, as the user does not see the rows a filter\n\t * or a collapsed row hides inside the range and does not expect them in the clipboard.\n\t */\n\tcopySelection() {\n\t\tconst customClipboardSupport = ClipboardItem.supports(constants.CUSTOM_CLIPBOARD_TYPE);\n\t\tconst values = this.model.getValuesInRange(this.selection.range, customClipboardSupport, true);\n\t\tthis.grid.selecting.hideSelector();\n\t\tthis.grid.selecting.showCopySelector();\n\n\t\tlet csvText = csv.arrayToCsv(values, {decimalSeparator: this.model.options.systemDecimalSeparator});\n\t\tif (values.length === 1 && values[0].length === 1) csvText = csvText.replace(/[\\r\\n]+$/, '');\n\n\t\tconst clipboardData: Record<string, string|Blob> = {'text/plain': new Blob([csvText], {\n\t\t\ttype: \"text/plain\"\n\t\t})};\n\n\t\tif (customClipboardSupport) {\n\t\t\tclipboardData[constants.CUSTOM_CLIPBOARD_TYPE] = new Blob([JSON.stringify(this.getSelectionCellData())], {\n\t\t\t\ttype: \"application/json\"\n\t\t\t});\n\t\t} else {\n\t\t\tthis.grid.logger.warn(\"Browser does not support custom clipboard type\");\n\t\t}\n\n\t\tnavigator.clipboard.write([new ClipboardItem(clipboardData)]).then(\n\t\t\t() => this.grid.logger.info(\"selected content copied\"),\n\t\t\t() => this.grid.logger.error(\"copy rejected\")\n\t\t);\n\t}\n\n\tprivate async pasteMatrix(data: Matrix<string | CellSource>) {\n\t\tconst range = this.selection.range;\n\t\tconst cells: CellModel[] = [];\n\t\tconst cellValues: CellValueType[] = [];\n\t\tconst rowPasteMode = this.model.options.clipboard?.rowPasteMode;\n\t\tconst columnPasteMode = this.model.options.clipboard?.columnPasteMode;\n\n\t\tconst pasteProps = (this.model.options.clipboard?.pasteProps ?? 'all') == 'all'\n\t\t\t? null : this.model.options.clipboard.pasteProps as (keyof CellSource)[];\n\n\t\tconst height = data.length;\n\t\tconst width = height > 0 ? data[0].length : 0;\n\n\t\t// insert rows if needed\n\t\tif (rowPasteMode == 'insert') {\n\t\t\tthis.insertRows({index: range.r1, count: height, after: false});\n\t\t} else if (rowPasteMode == 'rewrite_append' && range.r1 + height > this.model.rows.length - 1) {\n\t\t\tthis.insertRows({\n\t\t\t\tindex: this.model.rows.length - 1,\n\t\t\t\tcount: range.r1 + height - this.model.rows.length,\n\t\t\t\tafter: true\n\t\t\t});\n\t\t}\n\n\t\t// insert columns if needed\n\t\tif (columnPasteMode == 'insert') {\n\t\t\tthis.insertColumns({index: range.c1, count: width, after: false});\n\t\t} else if (columnPasteMode == 'rewrite_append' && range.c1 + width > this.model.columns.length - 1) {\n\t\t\tthis.insertColumns({\n\t\t\t\tindex: this.model.columns.length - 1,\n\t\t\t\tcount: range.c1 + width - this.model.columns.length,\n\t\t\t\tafter: true\n\t\t\t});\n\t\t}\n\n\t\t// duplicate clipboard matrix over selection range if it fits\n\t\tconst dataFitsSelection = height > 0 && width > 0 &&\n\t\t\trange.size.rows % height == 0 && range.size.columns % width == 0;\n\n\t\tlet rMax = Math.min(\n\t\t\tdataFitsSelection ? range.r2 : range.r1 + height - 1,\n\t\t\tthis.model.rows.length - 1\n\t\t);\n\n\t\tconst cMax = Math.min(\n\t\t\tdataFitsSelection ? range.c2 : range.c1 + width - 1,\n\t\t\tthis.model.columns.length - 1\n\t\t);\n\n\t\tfor (let r = range.r1; r <= rMax; r++) {\n\t\t\tconst i = (r - range.r1) % height;\n\t\t\tconst row = this.model.rows[r];\n\t\t\tif (!row) break;\n\n\t\t\tif (this.model.options.clipboard?.skipHiddenRows) {\n\t\t\t\tif (!row.visible) {\n\t\t\t\t\t// resize target range to accommodate skipped row, but only if clipboard data is larger than selection\n\t\t\t\t\tif (height > range.size.rows) rMax++;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (let c = range.c1; c <= cMax; c++) {\n\t\t\t\tconst cell = row.cell(c);\n\t\t\t\tif (!cell.editable) continue;\n\n\t\t\t\tconst j = (c - range.c1) % data[i].length;\n\n\t\t\t\tif (pasteProps && utils.isObject(data[i][j])) {\n\t\t\t\t\t// filter unwanted properties\n\t\t\t\t\tconst updateProps: Partial<CellSource> = {};\n\t\t\t\t\tpasteProps.forEach(<T extends keyof Partial<CellSource>>(key: T) => {\n\t\t\t\t\t\tupdateProps[key] = (data[i][j] as CellSource)[key];\n\t\t\t\t\t});\n\n\t\t\t\t\t// copiing properties of cell with display value into cell without display value\n\t\t\t\t\tif (!cell.prefersDisplayValue) updateProps.dv = undefined;\n\n\t\t\t\t\tcellValues.push(updateProps);\n\t\t\t\t} else {\n\t\t\t\t\tcellValues.push(data[i][j]);\n\t\t\t\t}\n\n\t\t\t\tcells.push(cell);\n\t\t\t}\n\t\t}\n\n\t\tawait this.resolveDropdownValues(cells, cellValues);\n\t\tthis.updateCells(cells, cellValues, true);\n\t\tthis.grid.rendering.updateCells(cells, true);\n\t}\n\n\t/**\n\t * A value pasted into a dropdown cell becomes the item of its list it stands for, see DropdownList.resolve;\n\t * a list the cells share (an adapter of a column) is loaded once.\n\t */\n\tprivate async resolveDropdownValues(cells: CellModel[], values: CellValueType[]) {\n\t\tconst lists = new Map<unknown, Promise<DropdownList>>();\n\t\tawait Promise.all(cells.map(async (cell, i) => {\n\t\t\tconst source = getDropdownListSource(cell);\n\t\t\t// a pasted formula stays a formula, its result is not an item of the list\n\t\t\tconst formula = this.model.formulasEnabled\n\t\t\t\t&& (utils.isObject(values[i]) ? !!(values[i] as CellSource).f : isFormula(values[i] as string));\n\t\t\tif (!source || formula) return;\n\t\t\tif (!lists.has(source)) lists.set(source, loadDropdownList(source).catch((): DropdownList => {\n\t\t\t\tthis.grid.logger.warn('dropdown list failed to load, the pasted values stay unchecked');\n\t\t\t\treturn null;\n\t\t\t}));\n\t\t\tconst list = await lists.get(source);\n\t\t\tif (list) values[i] = list.resolve(values[i], cell.validation?.allowInvalid);\n\t\t}));\n\t}\n\n\tprivate async pasteText(text: string) {\n\t\tawait this.pasteMatrix(csv.csvToArray(text));\n\t}\n\n\tasync paste() {\n\t\tthis.grid.selecting.hideCopySelector();\n\n\t\ttry\t{\n\t\t\tconst clipboardItems = await navigator.clipboard.read();\n\t\t\tif (clipboardItems.length == 0) return;\n\t\t\tconst clipboardItem = clipboardItems[0];\n\t\t\tif (clipboardItem.types.includes(constants.CUSTOM_CLIPBOARD_TYPE)) {\n\t\t\t\tconst data = await clipboardItem.getType(constants.CUSTOM_CLIPBOARD_TYPE);\n\t\t\t\tawait this.pasteMatrix(JSON.parse(await data.text()));\n\t\t\t} else if (clipboardItem.types.includes('text/plain')) {\n\t\t\t\tconst data = await clipboardItem.getType('text/plain');\n\t\t\t\tawait this.pasteText(await data.text());\n\t\t\t}\n\t\t} catch (_e) {\n\t\t\tthis.grid.logger.error(\"paste rejected\");\n\t\t\treturn;\n\t\t}\n\t}\n\n\topenComments(cell: CellModel) {\n\t\tsetTimeout(() => {\n\t\t\tthis.grid.comment.attachTo(this.grid.table.getCellByCellModel(cell), cell, true);\n\t\t}, 100);\n\t}\n\n\tundo() {\n\t\tlet cells: CellModel[];\n\t\tconst [item] = this.grid.history.pop();\n\t\tif (!item) return;\n\t\tswitch (item.type) {\n\t\t\tcase 'value':\n\t\t\t\tcells = item.addresses.map(addr => this.model.getCellByA1(addr));\n\t\t\t\tthis.updateCells(cells, item.oldProps, true, true);\n\t\t\t\tthis.grid.rendering.updateCells(cells, true);\n\t\t\t\tbreak;\n\t\t\tcase 'insert_column':\n\t\t\t\titem.newValues.forEach((_, i) => this.grid.editing.deleteColumns({\n\t\t\t\t\tindex: decodeColumn(item.addresses[i]),\n\t\t\t\t\tcount: 1,\n\t\t\t\t\tdispatchEvent: true,\n\t\t\t\t\tfromHistory: true\n\t\t\t\t}));\n\t\t\t\tbreak;\n\t\t\tcase 'insert_row':\n\t\t\t\titem.newValues.forEach((_, i) => this.grid.editing.deleteRows({\n\t\t\t\t\tindex: decodeRow(item.addresses[i]),\n\t\t\t\t\tcount: 1,\n\t\t\t\t\tdispatchEvent: true,\n\t\t\t\t\tfromHistory: true\n\t\t\t\t}));\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tredo() {\n\t\tlet cells: CellModel[];\n\t\tconst [item] = this.grid.history.pop2();\n\t\tif (!item) return;\n\t\tswitch (item.type) {\n\t\t\tcase 'value':\n\t\t\t\tcells = item.addresses.map(addr => this.model.getCellByA1(addr))\n\t\t\t\tthis.updateCells(cells, item.newValues, true, true);\n\t\t\t\tthis.grid.rendering.updateCells(cells, true);\n\t\t\t\tbreak;\n\t\t\tcase 'insert_column':\n\t\t\t\titem.newValues.forEach((_, i) => this.grid.editing.insertColumns({\n\t\t\t\t\tindex: decodeColumn(item.addresses[i]),\n\t\t\t\t\tcount: 1,\n\t\t\t\t\tdispatchEvent: true,\n\t\t\t\t\tfromHistory: true\n\t\t\t\t}));\n\t\t\t\tbreak;\n\t\t\tcase 'insert_row':\n\t\t\t\titem.newValues.forEach((_, i) => this.grid.editing.insertRows({\n\t\t\t\t\tindex: decodeRow(item.addresses[i]),\n\t\t\t\t\tcount: 1,\n\t\t\t\t\tdispatchEvent: true,\n\t\t\t\t\tfromHistory: true\n\t\t\t\t}));\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tstartColumnMoving(_c: number) {\n\t\tthis.columnMoving = true;\n\t}\n\n\tmerge(range?: CellAddress) {\n\t\tconst r = range ? CellRange.fromA1(range) : this.selection.range;\n\t\tconst cell = this.model.rows[r.r1]?.cell(r.c1);\n\t\tif (!cell) return;\n\t\tthis.model.merges.add({r: r.r1, c: r.c1, rs: r.size.rows, cs: r.size.columns});\n\t\tthis.grid.rendering.renderCells({vertical: true, horizontal: true});\n\t\tthis.grid.selecting.select(r);\n\t}\n\n\tunmerge(range?: CellAddress) {\n\t\tconst r = range ? CellRange.fromA1(range) : this.selection.range;\n\t\tconst cell = this.model.rows[r.r1]?.cell(r.c1);\n\t\tif (!cell) return;\n\t\tconst merge = this.model.merges.mergedCells.get(cell.address);\n\t\tif (!merge) return;\n\t\tthis.model.merges.remove(cell.address);\n\t\tthis.grid.rendering.renderCells({vertical: true, horizontal: true});\n\t\tthis.grid.selecting.select(new CellRange(merge.c, merge.r, merge.c + merge.cs - 1, merge.r + merge.rs - 1));\n\t}\n\n}\n"]}
|
|
1
|
+
{"version":3,"file":"grid.editing.js","sourceRoot":"","sources":["../../src/ui/grid.editing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAU,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE7D,OAAO,EAAgB,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChG,OAAO,EAAa,SAAS,EAAE,cAAc,EAAE,gBAAgB,EAAE,SAAS,EAAiB,YAAY,EAAE,SAAS,EAA2B,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAExL,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,SAAS,MAAM,cAAc,CAAC;AAiBrC,MAAM,OAAO,WAAW;IAQvB,IAAI,KAAK,KAAK,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,CAAA,CAAC,CAAC;IACtC,IAAI,SAAS,KAAK,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,CAAA,CAAC,CAAC;IAC9C,IAAI,QAAQ,KAAK,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAA,CAAC,CAAC;IAC5C,IAAI,MAAM,KAAK,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,CAAA,CAAC,CAAC;IACxC,IAAI,KAAK,KAAK,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,CAAA,CAAC,CAAC;IACtC,IAAI,SAAS,KAAK,OAAO,CAAC,CAAC,IAAI,CAAC,MAAM,CAAA,CAAC,CAAC;IACxC,IAAI,YAAY,KAAK,OAAO,IAAI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AAK,CAAC,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC9D,IAAI,CAAC,KAAK;YAAE,OAAO;QACnB,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACvC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,EAAC,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAC,CAAC,CAAC;QACpE,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,KAAK,CAAC,EAAE,GAAG,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,KAAK,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;IAC7G,CAAC;CAED","sourcesContent":["import { csv, Matrix, utils } from \"@omegagrid/core\";\nimport { FormulaEditor, getEditorFactory } from \"../editors\";\nimport { BaseEditor } from \"../editors/baseEditor\";\nimport { DropdownList, getDropdownListSource, loadDropdownList } from \"../editors/dropdownList\";\nimport { CellModel, isFormula, hasQuotePrefix, stripQuotePrefix, CellRange, CellValueType, decodeColumn, decodeRow, CellSource, CellAddress, isCellSource } from \"@omegagrid/grid-core\";\nimport { Grid } from \"./grid\";\nimport { GridEditEvent, GridEvent } from \"./grid.events\";\nimport constants from \"../constants\";\n\nexport type DeleteOptions = {\n\tindex: number,\n\tcount: number,\n\tdispatchEvent?: boolean,\n\tfromHistory?: boolean\n};\n\nexport type InsertOptions = DeleteOptions & {\n\tafter?: boolean\n};\n\nexport type MovingOptions = DeleteOptions & {\n\ttargetIndex: number\n};\n\nexport class GridEditing {\n\n\tprivate editorMap = new Map<string, BaseEditor>();\n\tprivate editor: BaseEditor;\n\n\tcolumnMoving = false;\n\trowMoving = false;\n\n\tget model() { return this.grid.model }\n\tget selection() { return this.grid.selection }\n\tget selector() { return this.grid.selector }\n\tget events() { return this.grid.events }\n\tget table() { return this.grid.table }\n\tget isEditing() { return !!this.editor }\n\tget activeEditor() { return this.editor }\n\n\tprivate _formulaMode = false;\n\tget isFormulaMode() { return this._formulaMode || this.grid.group?.isFormulaMode }\n\n\tconstructor(readonly grid: Grid) { }\n\n\tcanEdit(cell: CellModel) {\n\t\treturn (cell.editable || this.grid.designMode) && cell.type !== 'a';\n\t}\n\n\tupdateCell(cell: CellModel, value: CellValueType | CellSource, dispatchEvent = true, fromHistory = false) {\n\t\tthis.updateCells([cell], [value], dispatchEvent, fromHistory);\n\t}\n\n\tupdateCells(cells: CellModel[], values: (CellValueType | CellSource)[], dispatchEvent = true, fromHistory = false) {\n\t\tlet oldValues: CellValueType[];\n\t\tlet oldPropsArr: CellValueType[];\n\t\tlet newValues: CellValueType[];\n\t\tlet newPropsArr: CellValueType[];\n\t\tlet editedCells: CellModel[];\n\t\tcells.forEach((cell, i) => {\n\t\t\tconst oldValue = cell.value;\n\t\t\tlet newValue: CellValueType;\n\t\t\tlet newProps: Partial<CellSource>;\n\n\t\t\t// a Date (the value of a date and time cell put back by redo) is a value, not the properties of the cell\n\t\t\tif (isCellSource(values[i])) {\n\t\t\t\tnewProps = values[i] as CellSource;\n\t\t\t\tnewValue = ('v' in newProps) ? newProps.v : undefined;\n\t\t\t\tif (cell.quotePrefixable && hasQuotePrefix(newValue)) {\n\t\t\t\t\tnewProps = {...newProps, dv: stripQuotePrefix(newValue) as string};\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tnewValue = values[i] as CellValueType;\n\t\t\t}\n\n\t\t\tlet oldProps: Partial<CellSource>;\n\t\t\tif (newProps) {\n\t\t\t\toldProps = cell.update(newProps);\n\t\t\t} else {\n\t\t\t\tcell.clearFormula();\n\t\t\t\tif (oldValue !== newValue) {\n\t\t\t\t\toldProps = {v: oldValue, dv: cell.displayValue};\n\t\t\t\t\tcell.value = newValue;\n\t\t\t\t\tif (cell.quotePrefix) cell.displayValue = stripQuotePrefix(newValue) as string;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (dispatchEvent && oldProps) {\n\t\t\t\toldValues = oldValues || [];\n\t\t\t\toldPropsArr = oldPropsArr || [];\n\t\t\t\tnewValues = newValues || [];\n\t\t\t\tnewPropsArr = newPropsArr || [];\n\t\t\t\teditedCells = editedCells || [];\n\t\t\t\toldValues.push(oldValue);\n\t\t\t\toldPropsArr.push(oldProps);\n\t\t\t\tnewValues.push(newValue);\n\t\t\t\tnewPropsArr.push(newProps);\n\t\t\t\teditedCells.push(cell);\n\t\t\t}\n\t\t});\n\n\t\tif (dispatchEvent && editedCells?.length) {\n\t\t\tthis.grid.dispatchEvent(new GridEditEvent({\n\t\t\t\tgrid: this.grid,\n\t\t\t\tfromHistory: !!fromHistory,\n\t\t\t\tcells: editedCells,\n\t\t\t\teditType: 'value',\n\t\t\t\tnewValues: newValues,\n\t\t\t\tnewProps: newPropsArr,\n\t\t\t\toldValues: oldValues,\n\t\t\t\toldProps: oldPropsArr\n\t\t\t}));\n\t\t}\n\t}\n\n\tstartFormulaMode() {\n\t\tthis._formulaMode = true;\n\t\tif (this.grid.group) this.grid.group.startFormulaMode(this.grid);\n\t}\n\n\tendFormulaMode(group = true) {\n\t\tthis._formulaMode = false;\n\t\tif (group && this.grid.group) this.grid.group.endFormulaMode();\n\t\tthis.grid.selecting.hideFormulaSelector();\n\t\tthis.grid.selecting.removeFormulaHighlight();\n\t\tthis.grid.selecting.showSelector();\n\t}\n\n\tstartEdit(initialValue: unknown = null) {\n\t\tconst cell = this.grid.selecting.activeCell;\n\t\tif (cell && this.canEdit(cell)) {\n\t\t\tthis.grid.logger.info(`start edit ${(new CellRange(cell.c, cell.r)).A1}`);\n\t\t\tlet formula = true;\n\t\t\tif (this.model.formulasEnabled && isFormula(initialValue as string)) {\n\t\t\t\tthis.editor = this.getFormulaEditor().open(this.grid, initialValue);\n\t\t\t} else {\n\t\t\t\tif (initialValue == null && cell.hasOwnFormula) {\n\t\t\t\t\tthis.editor = this.getFormulaEditor().open(this.grid, initialValue);\n\t\t\t\t} else {\n\t\t\t\t\tformula = false;\n\t\t\t\t\tthis.editor = this.getEditor(cell).open(this.grid, initialValue);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.grid.dispatchEvent(new GridEvent('startEdit', {grid: this.grid}));\n\t\t\tif (formula) {\n\t\t\t\tthis.startFormulaMode();\n\t\t\t\tthis.grid.dispatchEvent(new GridEvent('startFormulaEdit', {grid: this.grid}));\n\t\t\t}\n\t\t}\n\t}\n\n\tendEdit() {\n\t\tif (!this.editor) return;\n\t\tthis.grid.logger.info('end edit');\n\t\tthis.grid.editing.endFormulaMode();\n\t\tthis.editor?.close();\n\t\tthis.editor = null;\n\t\tthis.grid.dispatchEvent(new GridEvent('endEdit', {grid: this.grid}));\n\t}\n\n\tcommitEdit() {\n\t\tif (this.editor) {\n\t\t\tthis.editor.commit();\n\t\t\tthis.endEdit();\n\t\t}\n\t}\n\n\tinsertRows(options: InsertOptions) {\n\t\tconst newRows = this.model.insertRows(options.index, options.count, options.after);\n\t\tthis.grid.rendering.renderAll(true);\n\t\tif (utils.ifNull(options.dispatchEvent, true)) this.grid.dispatchEvent(new GridEditEvent({\n\t\t\tgrid: this.grid,\n\t\t\tfromHistory: !!options.fromHistory,\n\t\t\teditType: 'insert_row',\n\t\t\tnewValues: newRows\n\t\t}));\n\t\treturn newRows;\n\t}\n\n\tinsertColumns(options: InsertOptions) {\n\t\tconst newColumns = this.model.insertColumns(options.index , options.count, options.after);\n\t\tthis.grid.rendering.renderAll(true);\n\t\tif (utils.ifNull(options.dispatchEvent, true)) this.grid.dispatchEvent(new GridEditEvent({\n\t\t\tgrid: this.grid,\n\t\t\tfromHistory: !!options.fromHistory,\n\t\t\teditType: 'insert_column',\n\t\t\tnewValues: newColumns\n\t\t}));\n\t\treturn newColumns;\n\t}\n\n\tdeleteRows(options: DeleteOptions) {\n\t\tconst deletedRows = this.model.deleteRows(options.index, options.count);\n\t\tthis.grid.rendering.renderAll(true);\n\t\tif (utils.ifNull(options.dispatchEvent, true)) this.grid.dispatchEvent(new GridEditEvent({\n\t\t\tgrid: this.grid,\n\t\t\tfromHistory: !!options.fromHistory,\n\t\t\teditType: 'delete_row',\n\t\t\toldValues: deletedRows\n\t\t}));\n\t\treturn deletedRows;\n\t}\n\n\tdeleteColumns(options: DeleteOptions) {\n\t\tconst deletedColumns = this.model.deleteColumns(options.index, options.count);\n\t\tthis.grid.rendering.renderAll(true);\n\t\tif (utils.ifNull(options.dispatchEvent, true)) this.grid.dispatchEvent(new GridEditEvent({\n\t\t\tgrid: this.grid,\n\t\t\tfromHistory: !!options.fromHistory,\n\t\t\teditType: 'delete_column',\n\t\t\toldValues: deletedColumns\n\t\t}));\n\t\treturn deletedColumns\n\t}\n\n\tmoveRows(options: MovingOptions) {\n\t\tthis.model.moveRows(options.index, options.count, options.targetIndex);\n\t\tthis.grid.rendering.renderAll(false);\n\t\tif (utils.ifNull(options.dispatchEvent, true)) this.grid.dispatchEvent(new GridEditEvent({\n\t\t\tgrid: this.grid,\n\t\t\tfromHistory: options.fromHistory,\n\t\t\teditType: 'move_row',\n\t\t\toldValues: [new CellRange(0, options.index, Infinity, options.index + options.count - 1)],\n\t\t\tnewValues: [new CellRange(0, options.targetIndex, Infinity, options.targetIndex + options.count - 1)],\n\t\t}));\n\t}\n\n\tmoveColumns(options: MovingOptions) {\n\t\tthis.model.moveColumns(options.index, options.count, options.targetIndex);\n\t\tthis.grid.rendering.renderAll(false);\n\t\tif (utils.ifNull(options.dispatchEvent, true)) this.grid.dispatchEvent(new GridEditEvent({\n\t\t\tgrid: this.grid,\n\t\t\tfromHistory: options.fromHistory,\n\t\t\teditType: 'move_column',\n\t\t\toldValues: [new CellRange(options.index, options.index + options.count - 1, Infinity)],\n\t\t\tnewValues: [new CellRange(options.targetIndex, 0, options.targetIndex + options.count - 1, Infinity)],\n\t\t}));\n\t}\n\n\tclearSelection(dispatchEvent = true) {\n\t\tconst cells = this.model.getCellArray(this.selection.range).filter(cell => this.canEdit(cell));\n\t\tthis.updateCells(cells, cells.map(() => null as CellModel), dispatchEvent);\n\t\tthis.grid.rendering.updateCells(cells, true);\n\t}\n\n\tgetEditor(cell: CellModel) {\n\t\tlet factory = cell.editorFactory;\n\t\tlet key: string = null;\n\n\t\tif (factory) {\n\t\t\tkey = cell.address;\n\t\t} else {\n\t\t\tkey = cell.type;\n\t\t\tfactory = getEditorFactory(cell.type);\n\t\t}\n\n\t\tif (!this.editorMap.has(key)) {\n\t\t\tconst editor = factory(cell, this.model.options.editing) as BaseEditor;\n\t\t\tthis.grid.shadowRoot.appendChild(editor);\n\t\t\tthis.editorMap.set(key, editor);\n\t\t}\n\n\t\treturn this.editorMap.get(key);\n\t}\n\n\tgetFormulaEditor() {\n\t\tconst type = 'formula';\n\t\tif (!this.editorMap.has(type)) {\n\t\t\tconst editor = new FormulaEditor();\n\t\t\tthis.grid.shadowRoot.appendChild(editor);\n\t\t\tthis.editorMap.set(type, editor);\n\t\t}\n\t\treturn this.editorMap.get(type);\n\t}\n\n\t/** the cells of the selection for the clipboard: the rows the user sees only, see copySelection */\n\tgetSelectionCellData() {\n\t\treturn this.model.getCellMatrix(this.selection.range, true).map(\n\t\t\trow => row.map(cell => cell.getSourceData({displayValue: true}))\n\t\t);\n\t}\n\n\t/**\n\t * Copies the selection: the rows the table shows only, as the user does not see the rows a filter\n\t * or a collapsed row hides inside the range and does not expect them in the clipboard.\n\t */\n\tcopySelection() {\n\t\tconst customClipboardSupport = ClipboardItem.supports(constants.CUSTOM_CLIPBOARD_TYPE);\n\t\tconst values = this.model.getValuesInRange(this.selection.range, customClipboardSupport, true);\n\t\tthis.grid.selecting.hideSelector();\n\t\tthis.grid.selecting.showCopySelector();\n\n\t\tlet csvText = csv.arrayToCsv(values, {decimalSeparator: this.model.options.systemDecimalSeparator});\n\t\tif (values.length === 1 && values[0].length === 1) csvText = csvText.replace(/[\\r\\n]+$/, '');\n\n\t\tconst clipboardData: Record<string, string|Blob> = {'text/plain': new Blob([csvText], {\n\t\t\ttype: \"text/plain\"\n\t\t})};\n\n\t\tif (customClipboardSupport) {\n\t\t\tclipboardData[constants.CUSTOM_CLIPBOARD_TYPE] = new Blob([JSON.stringify(this.getSelectionCellData())], {\n\t\t\t\ttype: \"application/json\"\n\t\t\t});\n\t\t} else {\n\t\t\tthis.grid.logger.warn(\"Browser does not support custom clipboard type\");\n\t\t}\n\n\t\tnavigator.clipboard.write([new ClipboardItem(clipboardData)]).then(\n\t\t\t() => this.grid.logger.info(\"selected content copied\"),\n\t\t\t() => this.grid.logger.error(\"copy rejected\")\n\t\t);\n\t}\n\n\tprivate async pasteMatrix(data: Matrix<string | CellSource>) {\n\t\tconst range = this.selection.range;\n\t\tconst cells: CellModel[] = [];\n\t\tconst cellValues: CellValueType[] = [];\n\t\tconst rowPasteMode = this.model.options.clipboard?.rowPasteMode;\n\t\tconst columnPasteMode = this.model.options.clipboard?.columnPasteMode;\n\n\t\tconst pasteProps = (this.model.options.clipboard?.pasteProps ?? 'all') == 'all'\n\t\t\t? null : this.model.options.clipboard.pasteProps as (keyof CellSource)[];\n\n\t\tconst height = data.length;\n\t\tconst width = height > 0 ? data[0].length : 0;\n\n\t\t// insert rows if needed\n\t\tif (rowPasteMode == 'insert') {\n\t\t\tthis.insertRows({index: range.r1, count: height, after: false});\n\t\t} else if (rowPasteMode == 'rewrite_append' && range.r1 + height > this.model.rows.length - 1) {\n\t\t\tthis.insertRows({\n\t\t\t\tindex: this.model.rows.length - 1,\n\t\t\t\tcount: range.r1 + height - this.model.rows.length,\n\t\t\t\tafter: true\n\t\t\t});\n\t\t}\n\n\t\t// insert columns if needed\n\t\tif (columnPasteMode == 'insert') {\n\t\t\tthis.insertColumns({index: range.c1, count: width, after: false});\n\t\t} else if (columnPasteMode == 'rewrite_append' && range.c1 + width > this.model.columns.length - 1) {\n\t\t\tthis.insertColumns({\n\t\t\t\tindex: this.model.columns.length - 1,\n\t\t\t\tcount: range.c1 + width - this.model.columns.length,\n\t\t\t\tafter: true\n\t\t\t});\n\t\t}\n\n\t\t// duplicate clipboard matrix over selection range if it fits\n\t\tconst dataFitsSelection = height > 0 && width > 0 &&\n\t\t\trange.size.rows % height == 0 && range.size.columns % width == 0;\n\n\t\tlet rMax = Math.min(\n\t\t\tdataFitsSelection ? range.r2 : range.r1 + height - 1,\n\t\t\tthis.model.rows.length - 1\n\t\t);\n\n\t\tconst cMax = Math.min(\n\t\t\tdataFitsSelection ? range.c2 : range.c1 + width - 1,\n\t\t\tthis.model.columns.length - 1\n\t\t);\n\n\t\tfor (let r = range.r1; r <= rMax; r++) {\n\t\t\tconst i = (r - range.r1) % height;\n\t\t\tconst row = this.model.rows[r];\n\t\t\tif (!row) break;\n\n\t\t\tif (this.model.options.clipboard?.skipHiddenRows) {\n\t\t\t\tif (!row.visible) {\n\t\t\t\t\t// resize target range to accommodate skipped row, but only if clipboard data is larger than selection\n\t\t\t\t\tif (height > range.size.rows) rMax++;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (let c = range.c1; c <= cMax; c++) {\n\t\t\t\tconst cell = row.cell(c);\n\t\t\t\tif (!cell.editable) continue;\n\n\t\t\t\tconst j = (c - range.c1) % data[i].length;\n\n\t\t\t\tif (pasteProps && isCellSource(data[i][j])) {\n\t\t\t\t\t// filter unwanted properties\n\t\t\t\t\tconst updateProps: Partial<CellSource> = {};\n\t\t\t\t\tpasteProps.forEach(<T extends keyof Partial<CellSource>>(key: T) => {\n\t\t\t\t\t\tupdateProps[key] = (data[i][j] as CellSource)[key];\n\t\t\t\t\t});\n\n\t\t\t\t\t// copiing properties of cell with display value into cell without display value\n\t\t\t\t\tif (!cell.prefersDisplayValue) updateProps.dv = undefined;\n\n\t\t\t\t\tcellValues.push(updateProps);\n\t\t\t\t} else {\n\t\t\t\t\tcellValues.push(data[i][j]);\n\t\t\t\t}\n\n\t\t\t\tcells.push(cell);\n\t\t\t}\n\t\t}\n\n\t\tawait this.resolveDropdownValues(cells, cellValues);\n\t\tthis.updateCells(cells, cellValues, true);\n\t\tthis.grid.rendering.updateCells(cells, true);\n\t}\n\n\t/**\n\t * A value pasted into a dropdown cell becomes the item of its list it stands for, see DropdownList.resolve;\n\t * a list the cells share (an adapter of a column) is loaded once.\n\t */\n\tprivate async resolveDropdownValues(cells: CellModel[], values: CellValueType[]) {\n\t\tconst lists = new Map<unknown, Promise<DropdownList>>();\n\t\tawait Promise.all(cells.map(async (cell, i) => {\n\t\t\tconst source = getDropdownListSource(cell);\n\t\t\t// a pasted formula stays a formula, its result is not an item of the list\n\t\t\tconst formula = this.model.formulasEnabled\n\t\t\t\t&& (isCellSource(values[i]) ? !!(values[i] as CellSource).f : isFormula(values[i] as string));\n\t\t\tif (!source || formula) return;\n\t\t\tif (!lists.has(source)) lists.set(source, loadDropdownList(source).catch((): DropdownList => {\n\t\t\t\tthis.grid.logger.warn('dropdown list failed to load, the pasted values stay unchecked');\n\t\t\t\treturn null;\n\t\t\t}));\n\t\t\tconst list = await lists.get(source);\n\t\t\tif (list) values[i] = list.resolve(values[i], cell.validation?.allowInvalid);\n\t\t}));\n\t}\n\n\tprivate async pasteText(text: string) {\n\t\tawait this.pasteMatrix(csv.csvToArray(text));\n\t}\n\n\tasync paste() {\n\t\tthis.grid.selecting.hideCopySelector();\n\n\t\ttry\t{\n\t\t\tconst clipboardItems = await navigator.clipboard.read();\n\t\t\tif (clipboardItems.length == 0) return;\n\t\t\tconst clipboardItem = clipboardItems[0];\n\t\t\tif (clipboardItem.types.includes(constants.CUSTOM_CLIPBOARD_TYPE)) {\n\t\t\t\tconst data = await clipboardItem.getType(constants.CUSTOM_CLIPBOARD_TYPE);\n\t\t\t\tawait this.pasteMatrix(JSON.parse(await data.text()));\n\t\t\t} else if (clipboardItem.types.includes('text/plain')) {\n\t\t\t\tconst data = await clipboardItem.getType('text/plain');\n\t\t\t\tawait this.pasteText(await data.text());\n\t\t\t}\n\t\t} catch (_e) {\n\t\t\tthis.grid.logger.error(\"paste rejected\");\n\t\t\treturn;\n\t\t}\n\t}\n\n\topenComments(cell: CellModel) {\n\t\tsetTimeout(() => {\n\t\t\tthis.grid.comment.attachTo(this.grid.table.getCellByCellModel(cell), cell, true);\n\t\t}, 100);\n\t}\n\n\tundo() {\n\t\tlet cells: CellModel[];\n\t\tconst [item] = this.grid.history.pop();\n\t\tif (!item) return;\n\t\tswitch (item.type) {\n\t\t\tcase 'value':\n\t\t\t\tcells = item.addresses.map(addr => this.model.getCellByA1(addr));\n\t\t\t\tthis.updateCells(cells, item.oldProps, true, true);\n\t\t\t\tthis.grid.rendering.updateCells(cells, true);\n\t\t\t\tbreak;\n\t\t\tcase 'insert_column':\n\t\t\t\titem.newValues.forEach((_, i) => this.grid.editing.deleteColumns({\n\t\t\t\t\tindex: decodeColumn(item.addresses[i]),\n\t\t\t\t\tcount: 1,\n\t\t\t\t\tdispatchEvent: true,\n\t\t\t\t\tfromHistory: true\n\t\t\t\t}));\n\t\t\t\tbreak;\n\t\t\tcase 'insert_row':\n\t\t\t\titem.newValues.forEach((_, i) => this.grid.editing.deleteRows({\n\t\t\t\t\tindex: decodeRow(item.addresses[i]),\n\t\t\t\t\tcount: 1,\n\t\t\t\t\tdispatchEvent: true,\n\t\t\t\t\tfromHistory: true\n\t\t\t\t}));\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tredo() {\n\t\tlet cells: CellModel[];\n\t\tconst [item] = this.grid.history.pop2();\n\t\tif (!item) return;\n\t\tswitch (item.type) {\n\t\t\tcase 'value':\n\t\t\t\tcells = item.addresses.map(addr => this.model.getCellByA1(addr))\n\t\t\t\tthis.updateCells(cells, item.newValues, true, true);\n\t\t\t\tthis.grid.rendering.updateCells(cells, true);\n\t\t\t\tbreak;\n\t\t\tcase 'insert_column':\n\t\t\t\titem.newValues.forEach((_, i) => this.grid.editing.insertColumns({\n\t\t\t\t\tindex: decodeColumn(item.addresses[i]),\n\t\t\t\t\tcount: 1,\n\t\t\t\t\tdispatchEvent: true,\n\t\t\t\t\tfromHistory: true\n\t\t\t\t}));\n\t\t\t\tbreak;\n\t\t\tcase 'insert_row':\n\t\t\t\titem.newValues.forEach((_, i) => this.grid.editing.insertRows({\n\t\t\t\t\tindex: decodeRow(item.addresses[i]),\n\t\t\t\t\tcount: 1,\n\t\t\t\t\tdispatchEvent: true,\n\t\t\t\t\tfromHistory: true\n\t\t\t\t}));\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tstartColumnMoving(_c: number) {\n\t\tthis.columnMoving = true;\n\t}\n\n\tmerge(range?: CellAddress) {\n\t\tconst r = range ? CellRange.fromA1(range) : this.selection.range;\n\t\tconst cell = this.model.rows[r.r1]?.cell(r.c1);\n\t\tif (!cell) return;\n\t\tthis.model.merges.add({r: r.r1, c: r.c1, rs: r.size.rows, cs: r.size.columns});\n\t\tthis.grid.rendering.renderCells({vertical: true, horizontal: true});\n\t\tthis.grid.selecting.select(r);\n\t}\n\n\tunmerge(range?: CellAddress) {\n\t\tconst r = range ? CellRange.fromA1(range) : this.selection.range;\n\t\tconst cell = this.model.rows[r.r1]?.cell(r.c1);\n\t\tif (!cell) return;\n\t\tconst merge = this.model.merges.mergedCells.get(cell.address);\n\t\tif (!merge) return;\n\t\tthis.model.merges.remove(cell.address);\n\t\tthis.grid.rendering.renderCells({vertical: true, horizontal: true});\n\t\tthis.grid.selecting.select(new CellRange(merge.c, merge.r, merge.c + merge.cs - 1, merge.r + merge.rs - 1));\n\t}\n\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@omegagrid/grid",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.33",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"description": "Universal datagrid component",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
"_prepublish": "yarn test && yarn lint"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@omegagrid/commands": "^0.11.
|
|
39
|
-
"@omegagrid/core": "^0.11.
|
|
40
|
-
"@omegagrid/grid-core": "^0.11.
|
|
41
|
-
"@omegagrid/localize": "^0.11.
|
|
42
|
-
"@omegagrid/tabs": "^0.11.
|
|
43
|
-
"@omegagrid/tree": "^0.11.
|
|
38
|
+
"@omegagrid/commands": "^0.11.33",
|
|
39
|
+
"@omegagrid/core": "^0.11.33",
|
|
40
|
+
"@omegagrid/grid-core": "^0.11.33",
|
|
41
|
+
"@omegagrid/localize": "^0.11.33",
|
|
42
|
+
"@omegagrid/tabs": "^0.11.33",
|
|
43
|
+
"@omegagrid/tree": "^0.11.33",
|
|
44
44
|
"@stdlib/stats": "^0.0.13",
|
|
45
45
|
"date-fns": "^3.2.0",
|
|
46
46
|
"lit": "^3.1.1",
|