@omegagrid/editor 0.2.5
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/commands/index.d.ts +8 -0
- package/dist/commands/index.d.ts.map +1 -0
- package/dist/commands/index.js +19 -0
- package/dist/commands/index.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/dist/options.d.ts +12 -0
- package/dist/options.d.ts.map +1 -0
- package/dist/options.js +18 -0
- package/dist/options.js.map +1 -0
- package/dist/ui/editor.d.ts +70 -0
- package/dist/ui/editor.d.ts.map +1 -0
- package/dist/ui/editor.js +320 -0
- package/dist/ui/editor.js.map +1 -0
- package/dist/ui/editor.style.d.ts +2 -0
- package/dist/ui/editor.style.d.ts.map +1 -0
- package/dist/ui/editor.style.js +41 -0
- package/dist/ui/editor.style.js.map +1 -0
- package/dist/ui/editorZoom.d.ts +16 -0
- package/dist/ui/editorZoom.d.ts.map +1 -0
- package/dist/ui/editorZoom.js +85 -0
- package/dist/ui/editorZoom.js.map +1 -0
- package/dist/ui/forms/configForm.d.ts +12 -0
- package/dist/ui/forms/configForm.d.ts.map +1 -0
- package/dist/ui/forms/configForm.js +89 -0
- package/dist/ui/forms/configForm.js.map +1 -0
- package/dist/ui/forms/headerForm.d.ts +18 -0
- package/dist/ui/forms/headerForm.d.ts.map +1 -0
- package/dist/ui/forms/headerForm.js +150 -0
- package/dist/ui/forms/headerForm.js.map +1 -0
- package/dist/ui/forms/index.d.ts +7 -0
- package/dist/ui/forms/index.d.ts.map +1 -0
- package/dist/ui/forms/index.js +23 -0
- package/dist/ui/forms/index.js.map +1 -0
- package/dist/ui/forms/namesForm.d.ts +21 -0
- package/dist/ui/forms/namesForm.d.ts.map +1 -0
- package/dist/ui/forms/namesForm.js +127 -0
- package/dist/ui/forms/namesForm.js.map +1 -0
- package/dist/ui/forms/ruleForm.d.ts +20 -0
- package/dist/ui/forms/ruleForm.d.ts.map +1 -0
- package/dist/ui/forms/ruleForm.js +152 -0
- package/dist/ui/forms/ruleForm.js.map +1 -0
- package/dist/ui/forms/ruleForm.style.d.ts +3 -0
- package/dist/ui/forms/ruleForm.style.d.ts.map +1 -0
- package/dist/ui/forms/ruleForm.style.js +81 -0
- package/dist/ui/forms/ruleForm.style.js.map +1 -0
- package/dist/ui/forms/sparklineForm.d.ts +22 -0
- package/dist/ui/forms/sparklineForm.d.ts.map +1 -0
- package/dist/ui/forms/sparklineForm.js +202 -0
- package/dist/ui/forms/sparklineForm.js.map +1 -0
- package/dist/ui/forms/sparklineForm.style.d.ts +3 -0
- package/dist/ui/forms/sparklineForm.style.d.ts.map +1 -0
- package/dist/ui/forms/sparklineForm.style.js +97 -0
- package/dist/ui/forms/sparklineForm.style.js.map +1 -0
- package/dist/ui/forms/styleForm.d.ts +14 -0
- package/dist/ui/forms/styleForm.d.ts.map +1 -0
- package/dist/ui/forms/styleForm.js +150 -0
- package/dist/ui/forms/styleForm.js.map +1 -0
- package/dist/ui/formulabar.d.ts +23 -0
- package/dist/ui/formulabar.d.ts.map +1 -0
- package/dist/ui/formulabar.js +164 -0
- package/dist/ui/formulabar.js.map +1 -0
- package/dist/ui/formulabar.style.d.ts +2 -0
- package/dist/ui/formulabar.style.d.ts.map +1 -0
- package/dist/ui/formulabar.style.js +49 -0
- package/dist/ui/formulabar.style.js.map +1 -0
- package/dist/ui/gridStats.d.ts +11 -0
- package/dist/ui/gridStats.d.ts.map +1 -0
- package/dist/ui/gridStats.js +74 -0
- package/dist/ui/gridStats.js.map +1 -0
- package/dist/ui/index.d.ts +9 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +25 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/statusbar.d.ts +19 -0
- package/dist/ui/statusbar.d.ts.map +1 -0
- package/dist/ui/statusbar.js +72 -0
- package/dist/ui/statusbar.js.map +1 -0
- package/dist/ui/toolbar.config.d.ts +6 -0
- package/dist/ui/toolbar.config.d.ts.map +1 -0
- package/dist/ui/toolbar.config.js +138 -0
- package/dist/ui/toolbar.config.js.map +1 -0
- package/dist/ui/toolbar.d.ts +37 -0
- package/dist/ui/toolbar.d.ts.map +1 -0
- package/dist/ui/toolbar.js +288 -0
- package/dist/ui/toolbar.js.map +1 -0
- package/dist/ui/toolbar.style.d.ts +2 -0
- package/dist/ui/toolbar.style.d.ts.map +1 -0
- package/dist/ui/toolbar.style.js +25 -0
- package/dist/ui/toolbar.style.js.map +1 -0
- package/package.json +65 -0
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
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
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.EditorStatusbar = void 0;
|
|
10
|
+
const lit_1 = require("lit");
|
|
11
|
+
const decorators_js_1 = require("lit/decorators.js");
|
|
12
|
+
const core_1 = require("@omegagrid/core");
|
|
13
|
+
const rightItems = [
|
|
14
|
+
{ type: 'custom', id: 'stats' },
|
|
15
|
+
{ type: 'custom', id: 'zoom' },
|
|
16
|
+
// {type: 'button', id: 'btn1', text: 'item1', icon: 'book'},
|
|
17
|
+
// {type: 'button', id: 'btn2', text: 'item2', icon: 'book'},
|
|
18
|
+
];
|
|
19
|
+
const componentFactories = new Map([
|
|
20
|
+
['stats', (group) => {
|
|
21
|
+
const zoom = core_1.dom.createElement('og-editor-gridstats');
|
|
22
|
+
zoom.group = group;
|
|
23
|
+
return zoom;
|
|
24
|
+
}],
|
|
25
|
+
['zoom', (group) => {
|
|
26
|
+
const zoom = core_1.dom.createElement('og-editor-zoom');
|
|
27
|
+
zoom.group = group;
|
|
28
|
+
return zoom;
|
|
29
|
+
}]
|
|
30
|
+
]);
|
|
31
|
+
let EditorStatusbar = class EditorStatusbar extends lit_1.LitElement {
|
|
32
|
+
constructor() {
|
|
33
|
+
//static styles = [style];
|
|
34
|
+
super(...arguments);
|
|
35
|
+
this.components = new Map();
|
|
36
|
+
this._onGridEdit = (_e) => {
|
|
37
|
+
// this.updateToolbar();
|
|
38
|
+
};
|
|
39
|
+
this.createComponent = (id) => {
|
|
40
|
+
if (!this.components.has(id))
|
|
41
|
+
this.components.set(id, componentFactories.get(id)(this.group));
|
|
42
|
+
return this.components.get(id);
|
|
43
|
+
};
|
|
44
|
+
this.render = () => (0, lit_1.html) `
|
|
45
|
+
<og-statusbar
|
|
46
|
+
.rightItems="${rightItems}"
|
|
47
|
+
.createComponent="${this.createComponent}">
|
|
48
|
+
</og-statusbar>
|
|
49
|
+
`;
|
|
50
|
+
}
|
|
51
|
+
willUpdate(_props) {
|
|
52
|
+
this.components.forEach(c => {
|
|
53
|
+
c.group = this.group;
|
|
54
|
+
c.grid = this.grid;
|
|
55
|
+
c.range = this.range;
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
exports.EditorStatusbar = EditorStatusbar;
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, decorators_js_1.property)({ type: Object })
|
|
62
|
+
], EditorStatusbar.prototype, "group", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, decorators_js_1.property)({ type: Object })
|
|
65
|
+
], EditorStatusbar.prototype, "grid", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, decorators_js_1.property)({ type: Object })
|
|
68
|
+
], EditorStatusbar.prototype, "range", void 0);
|
|
69
|
+
exports.EditorStatusbar = EditorStatusbar = __decorate([
|
|
70
|
+
(0, decorators_js_1.customElement)('og-editor-statusbar')
|
|
71
|
+
], EditorStatusbar);
|
|
72
|
+
//# sourceMappingURL=statusbar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"statusbar.js","sourceRoot":"","sources":["../../src/ui/statusbar.ts"],"names":[],"mappings":";;;;;;;;;AACA,6BAAuC;AACvC,qDAA4D;AAE5D,0CAAmD;AAGnD,MAAM,UAAU,GAAoB;IACnC,EAAC,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,OAAO,EAAC;IAC7B,EAAC,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAC;IAC5B,6DAA6D;IAC7D,6DAA6D;CAC7D,CAAC;AAEF,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAiD;IAClF,CAAC,OAAO,EAAE,CAAC,KAAgB,EAAE,EAAE;YAC9B,MAAM,IAAI,GAAG,UAAG,CAAC,aAAa,CAAa,qBAAqB,CAAC,CAAC;YAClE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;YACnB,OAAO,IAAI,CAAC;QACb,CAAC,CAAC;IACF,CAAC,MAAM,EAAE,CAAC,KAAgB,EAAE,EAAE;YAC7B,MAAM,IAAI,GAAG,UAAG,CAAC,aAAa,CAAa,gBAAgB,CAAC,CAAC;YAC7D,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;YACnB,OAAO,IAAI,CAAC;QACb,CAAC,CAAC;CACF,CAAC,CAAC;AAKI,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,gBAAU;IAAxC;QAEN,0BAA0B;;QAE1B,eAAU,GAAG,IAAI,GAAG,EAAmC,CAAC;QAWxD,gBAAW,GAAG,CAAC,EAAiB,EAAE,EAAE;YACnC,wBAAwB;QACzB,CAAC,CAAA;QAUD,oBAAe,GAAG,CAAC,EAAe,EAAE,EAAE;YACrC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;gBAAE,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,EAAE,kBAAkB,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAuB,CAAC,CAAC;YACpH,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAChC,CAAC,CAAC;QAEF,WAAM,GAAG,GAAG,EAAE,CAAC,IAAA,UAAI,EAAA;;kBAEF,UAAU;uBACL,IAAI,CAAC,eAAe;;EAEzC,CAAC;IAEH,CAAC;IApBA,UAAU,CAAC,MAAiC;QAC3C,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;YAC3B,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;YACrB,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;YACnB,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACtB,CAAC,CAAC,CAAC;IACJ,CAAC;CAcD,CAAA;AAvCY,0CAAe;AAO3B;IADC,IAAA,wBAAQ,EAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;8CACR;AAGjB;IADC,IAAA,wBAAQ,EAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;6CACd;AAGX;IADC,IAAA,wBAAQ,EAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;8CACR;0BAbL,eAAe;IAD3B,IAAA,6BAAa,EAAC,qBAAqB,CAAC;GACxB,eAAe,CAuC3B"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ToolbarItem } from "@omegagrid/toolbar";
|
|
2
|
+
export declare const createBorderIcon: (border: 'top' | 'right' | 'left' | 'bottom' | 'bottom-double' | 'bottom-thick' | 'top-bottom' | 'top-bottom-thick' | 'all' | 'none' | 'outside' | 'outside-thick') => import("lit-html").TemplateResult<1>;
|
|
3
|
+
export declare const leftToolbarConfig: ToolbarItem[];
|
|
4
|
+
export declare const centerToolbarConfig: ToolbarItem[];
|
|
5
|
+
export declare const rightToolbarConfig: ToolbarItem[];
|
|
6
|
+
//# sourceMappingURL=toolbar.config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolbar.config.d.ts","sourceRoot":"","sources":["../../src/ui/toolbar.config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAIjD,eAAO,MAAM,gBAAgB,WAAY,KAAK,GAAC,OAAO,GAAC,MAAM,GAAC,QAAQ,GAAC,eAAe,GAAC,cAAc,GAAC,YAAY,GAAC,kBAAkB,GAAC,KAAK,GAAC,MAAM,GAAC,SAAS,GAAC,eAAe,yCAwE3K,CAAA;AAID,eAAO,MAAM,iBAAiB,EAAE,WAAW,EAyC1C,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,WAAW,EAK5C,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,WAAW,EAE3C,CAAC"}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.rightToolbarConfig = exports.centerToolbarConfig = exports.leftToolbarConfig = exports.createBorderIcon = void 0;
|
|
4
|
+
const core_1 = require("@omegagrid/core");
|
|
5
|
+
const lit_html_1 = require("lit-html");
|
|
6
|
+
const style_map_js_1 = require("lit-html/directives/style-map.js");
|
|
7
|
+
const createBorderIcon = (border) => {
|
|
8
|
+
const borderWidth = ['outside-thick', 'bottom-thick'].indexOf(border) > -1 ? '2px' : '1.5px';
|
|
9
|
+
const style = {
|
|
10
|
+
boxSizing: 'border-box',
|
|
11
|
+
width: "15px",
|
|
12
|
+
height: "15px",
|
|
13
|
+
marginLeft: "2px",
|
|
14
|
+
borderWidth: '1px',
|
|
15
|
+
borderColor: 'var(--text-color-2)',
|
|
16
|
+
borderStyle: 'dotted',
|
|
17
|
+
position: 'relative',
|
|
18
|
+
};
|
|
19
|
+
if (border == 'top' || border == 'top-bottom' || border == 'top-bottom-thick' || border == 'all' || border == 'outside' || border == 'outside-thick') {
|
|
20
|
+
style.borderTopStyle = 'solid';
|
|
21
|
+
style.borderTopWidth = borderWidth;
|
|
22
|
+
}
|
|
23
|
+
if (border == 'right' || border == 'all' || border == 'outside' || border == 'outside-thick') {
|
|
24
|
+
style.borderRightStyle = 'solid';
|
|
25
|
+
style.borderRightWidth = borderWidth;
|
|
26
|
+
}
|
|
27
|
+
if (border == 'bottom' || border == 'top-bottom' || border == 'all' || border == 'outside' || border == 'outside-thick') {
|
|
28
|
+
style.borderBottomStyle = 'solid';
|
|
29
|
+
style.borderBottomWidth = borderWidth;
|
|
30
|
+
}
|
|
31
|
+
if (border == 'bottom-double') {
|
|
32
|
+
style.borderBottomStyle = 'double';
|
|
33
|
+
style.borderBottomWidth = '2px';
|
|
34
|
+
}
|
|
35
|
+
if (border == 'bottom-thick' || border == 'top-bottom-thick') {
|
|
36
|
+
style.borderBottomStyle = 'solid';
|
|
37
|
+
style.borderBottomWidth = '2px';
|
|
38
|
+
}
|
|
39
|
+
if (border == 'left' || border == 'all' || border == 'outside' || border == 'outside-thick') {
|
|
40
|
+
style.borderLeftStyle = 'solid';
|
|
41
|
+
style.borderLeftWidth = borderWidth;
|
|
42
|
+
}
|
|
43
|
+
const insideStyle1 = {
|
|
44
|
+
position: 'absolute',
|
|
45
|
+
width: '100%',
|
|
46
|
+
height: '50%',
|
|
47
|
+
top: '0',
|
|
48
|
+
left: '0',
|
|
49
|
+
borderColor: 'var(--text-color-2)',
|
|
50
|
+
borderWidth: border == 'all' ? borderWidth : '1px',
|
|
51
|
+
borderBottomStyle: border == 'all' ? 'solid' : 'dotted'
|
|
52
|
+
};
|
|
53
|
+
const insideStyle2 = {
|
|
54
|
+
position: 'absolute',
|
|
55
|
+
width: '50%',
|
|
56
|
+
height: '100%',
|
|
57
|
+
top: '0',
|
|
58
|
+
left: '0',
|
|
59
|
+
borderColor: 'var(--text-color-2)',
|
|
60
|
+
borderWidth: border == 'all' ? borderWidth : '1px',
|
|
61
|
+
borderRightStyle: border == 'all' ? 'solid' : 'dotted'
|
|
62
|
+
};
|
|
63
|
+
return (0, lit_html_1.html) `
|
|
64
|
+
<div style="${(0, style_map_js_1.styleMap)(style)}">
|
|
65
|
+
<div style="${(0, style_map_js_1.styleMap)(insideStyle1)}"></div>
|
|
66
|
+
<div style="${(0, style_map_js_1.styleMap)(insideStyle2)}"></div>
|
|
67
|
+
</div>
|
|
68
|
+
`;
|
|
69
|
+
};
|
|
70
|
+
exports.createBorderIcon = createBorderIcon;
|
|
71
|
+
const predefinedFormats = ['#,0.0', '#,0.00', '#,0.000', '0%', '0.0%', '0.00%', '0.000%'];
|
|
72
|
+
exports.leftToolbarConfig = [
|
|
73
|
+
{ type: 'button', id: 'undo', icon: { icon: 'rotate-left' } },
|
|
74
|
+
{ type: 'button', id: 'redo', icon: { icon: 'rotate-right' } },
|
|
75
|
+
{ type: 'togglebutton', id: 'bold', icon: { icon: 'bold' } },
|
|
76
|
+
{ type: 'togglebutton', id: 'italic', icon: { icon: 'italic' } },
|
|
77
|
+
{ type: 'togglebutton', id: 'underline', icon: { icon: 'underline' } },
|
|
78
|
+
{ type: 'dropdown-button', id: 'alignment', items: [[
|
|
79
|
+
{ type: 'button', id: 'alignTopLeft', value: { vertical: 'top', horizontal: 'left' }, icon: { icon: 'arrow-up', rotation: -45 } },
|
|
80
|
+
{ type: 'button', id: 'alignTopCenter', value: { vertical: 'top', horizontal: 'center' }, icon: { icon: 'arrow-up', rotation: 0 } },
|
|
81
|
+
{ type: 'button', id: 'alignTopRight', value: { vertical: 'top', horizontal: 'right' }, icon: { icon: 'arrow-up', rotation: 45 } },
|
|
82
|
+
], [
|
|
83
|
+
{ type: 'button', id: 'alignCenterLeft', value: { vertical: 'center', horizontal: 'left' }, icon: { icon: 'arrow-left' } },
|
|
84
|
+
{ type: 'button', id: 'alignCenterCenter', value: { vertical: 'center', horizontal: 'center' }, icon: { icon: 'arrows-to-dot' } },
|
|
85
|
+
{ type: 'button', id: 'alignCenterRight', value: { vertical: 'center', horizontal: 'right' }, default: true, icon: { icon: 'arrow-right' } },
|
|
86
|
+
], [
|
|
87
|
+
{ type: 'button', id: 'alignBottomLeft', value: { vertical: 'bottom', horizontal: 'left' }, icon: { icon: 'arrow-left', rotation: -45 } },
|
|
88
|
+
{ type: 'button', id: 'alignBottomCenter', value: { vertical: 'bottom', horizontal: 'center' }, icon: { icon: 'arrow-down' } },
|
|
89
|
+
{ type: 'button', id: 'alignBottomRight', value: { vertical: 'bottom', horizontal: 'right' }, icon: { icon: 'arrow-right', rotation: 45 } },
|
|
90
|
+
]] },
|
|
91
|
+
{ type: 'dropdown', id: 'type', width: 80, items: Object.entries(core_1.UIValueType).map(entry => ({ k: entry[1], v: entry[0] })) },
|
|
92
|
+
{ type: 'text', id: 'format', width: 100, items: predefinedFormats.map(f => ({ k: f, v: f })), placeholder: '<format>' },
|
|
93
|
+
{ type: 'color', id: 'color', icon: { icon: 'font' } },
|
|
94
|
+
{ type: 'color', id: 'fgColor', icon: { icon: 'fill' } },
|
|
95
|
+
{ type: 'togglebutton', id: 'merge', title: 'Merge', icon: { icon: 'object-union' } },
|
|
96
|
+
{ type: 'togglebutton', id: 'wrap', title: 'Word wrap', icon: { icon: 'text', statusIcon: 'arrow-turn-down' } },
|
|
97
|
+
{ type: 'dropdown-button', id: 'border', icon: { icon: 'align-center' }, items: [[
|
|
98
|
+
{ type: 'button', id: 'borderLeft', value: { left: { style: 'thin' } }, content: (0, exports.createBorderIcon)('left') },
|
|
99
|
+
{ type: 'button', id: 'borderRight', value: { right: { style: 'thin' } }, content: (0, exports.createBorderIcon)('right') },
|
|
100
|
+
{ type: 'button', id: 'borderTop', value: { top: { style: 'thin' } }, content: (0, exports.createBorderIcon)('top') },
|
|
101
|
+
{ type: 'button', id: 'borderBottom', value: { bottom: { style: 'thin' } }, content: (0, exports.createBorderIcon)('bottom') },
|
|
102
|
+
], [
|
|
103
|
+
{ type: 'button', id: 'borderNone', value: { left: null, top: null, right: null, bottom: null }, content: (0, exports.createBorderIcon)('none') },
|
|
104
|
+
{ type: 'button', id: 'borderAll', value: { left: { style: 'thin' }, top: { style: 'thin' }, right: { style: 'thin' }, bottom: { style: 'thin' } }, content: (0, exports.createBorderIcon)('all') },
|
|
105
|
+
{ type: 'button', id: 'borderOutside', value: { left: { style: 'thin' }, top: { style: 'thin' }, right: { style: 'thin' }, bottom: { style: 'thin' } }, content: (0, exports.createBorderIcon)('outside') },
|
|
106
|
+
{ type: 'button', id: 'borderOutsideThick', value: { left: { style: 'thick' }, top: { style: 'thick' }, right: { style: 'thick' }, bottom: { style: 'thick' } }, content: (0, exports.createBorderIcon)('outside-thick') },
|
|
107
|
+
], [
|
|
108
|
+
{ type: 'button', id: 'borderBottomDouble', value: { bottom: { style: 'double' } }, content: (0, exports.createBorderIcon)('bottom-double') },
|
|
109
|
+
{ type: 'button', id: 'borderBottomThick', value: { bottom: { style: 'thick' } }, content: (0, exports.createBorderIcon)('bottom-thick') },
|
|
110
|
+
{ type: 'button', id: 'borderTopBottom', value: { top: { style: 'thin' }, bottom: { style: 'thin' } }, content: (0, exports.createBorderIcon)('top-bottom') },
|
|
111
|
+
{ type: 'button', id: 'borderTopBottomThick', value: { top: { style: 'thin' }, bottom: { style: 'thick' } }, content: (0, exports.createBorderIcon)('top-bottom-thick') },
|
|
112
|
+
], [{ type: 'color', id: 'borderColor', colspan: 4, icon: { icon: 'fill' } }]] }
|
|
113
|
+
];
|
|
114
|
+
exports.centerToolbarConfig = [
|
|
115
|
+
{ type: 'togglebutton', id: 'headers', icon: { icon: 'heading' } },
|
|
116
|
+
{ type: 'togglebutton', id: 'rules', icon: { icon: 'paintbrush-pencil' } },
|
|
117
|
+
{ type: 'togglebutton', id: 'sparklines', icon: { icon: 'chart-simple' } },
|
|
118
|
+
{ type: 'togglebutton', id: 'names', icon: { icon: 'table-cells', statusIcon: 'input-text' } }
|
|
119
|
+
];
|
|
120
|
+
exports.rightToolbarConfig = [
|
|
121
|
+
{ type: 'togglebutton', id: 'config', icon: { icon: 'gear' } }
|
|
122
|
+
];
|
|
123
|
+
// const fontCheck = new Set([
|
|
124
|
+
// // Windows 10
|
|
125
|
+
// 'Arial', 'Arial Black', 'Bahnschrift', 'Calibri', 'Cambria', 'Cambria Math', 'Candara', 'Comic Sans MS', 'Consolas', 'Constantia', 'Corbel', 'Courier New', 'Ebrima', 'Franklin Gothic Medium', 'Gabriola', 'Gadugi', 'Georgia', 'HoloLens MDL2 Assets', 'Impact', 'Ink Free', 'Javanese Text', 'Leelawadee UI', 'Lucida Console', 'Lucida Sans Unicode', 'Malgun Gothic', 'Marlett', 'Microsoft Himalaya', 'Microsoft JhengHei', 'Microsoft New Tai Lue', 'Microsoft PhagsPa', 'Microsoft Sans Serif', 'Microsoft Tai Le', 'Microsoft YaHei', 'Microsoft Yi Baiti', 'MingLiU-ExtB', 'Mongolian Baiti', 'MS Gothic', 'MV Boli', 'Myanmar Text', 'Nirmala UI', 'Palatino Linotype', 'Segoe MDL2 Assets', 'Segoe Print', 'Segoe Script', 'Segoe UI', 'Segoe UI Historic', 'Segoe UI Emoji', 'Segoe UI Symbol', 'SimSun', 'Sitka', 'Sylfaen', 'Symbol', 'Tahoma', 'Times New Roman', 'Trebuchet MS', 'Verdana', 'Webdings', 'Wingdings', 'Yu Gothic',
|
|
126
|
+
// // macOS
|
|
127
|
+
// 'American Typewriter', 'Andale Mono', 'Arial', 'Arial Black', 'Arial Narrow', 'Arial Rounded MT Bold', 'Arial Unicode MS', 'Avenir', 'Avenir Next', 'Avenir Next Condensed', 'Baskerville', 'Big Caslon', 'Bodoni 72', 'Bodoni 72 Oldstyle', 'Bodoni 72 Smallcaps', 'Bradley Hand', 'Brush Script MT', 'Chalkboard', 'Chalkboard SE', 'Chalkduster', 'Charter', 'Cochin', 'Comic Sans MS', 'Copperplate', 'Courier', 'Courier New', 'Didot', 'DIN Alternate', 'DIN Condensed', 'Futura', 'Geneva', 'Georgia', 'Gill Sans', 'Helvetica', 'Helvetica Neue', 'Herculanum', 'Hoefler Text', 'Impact', 'Lucida Grande', 'Luminari', 'Marker Felt', 'Menlo', 'Microsoft Sans Serif', 'Monaco', 'Noteworthy', 'Optima', 'Palatino', 'Papyrus', 'Phosphate', 'Rockwell', 'Savoye LET', 'SignPainter', 'Skia', 'Snell Roundhand', 'Tahoma', 'Times', 'Times New Roman', 'Trattatello', 'Trebuchet MS', 'Verdana', 'Zapfino',
|
|
128
|
+
// ].sort());
|
|
129
|
+
// (() => {
|
|
130
|
+
// const fontAvailable = new Set();
|
|
131
|
+
// for (const font of fontCheck.values()) {
|
|
132
|
+
// if (document.fonts.check(`12px "${font}"`)) {
|
|
133
|
+
// fontAvailable.add(font);
|
|
134
|
+
// }
|
|
135
|
+
// }
|
|
136
|
+
// console.log('Available Fonts:', [...fontAvailable.values()]);
|
|
137
|
+
// })();
|
|
138
|
+
//# sourceMappingURL=toolbar.config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolbar.config.js","sourceRoot":"","sources":["../../src/ui/toolbar.config.ts"],"names":[],"mappings":";;;AAAA,0CAA8C;AAE9C,uCAAgC;AAChC,mEAAuE;AAEhE,MAAM,gBAAgB,GAAG,CAAC,MAA2I,EAAE,EAAE;IAC/K,MAAM,WAAW,GAAG,CAAC,eAAe,EAAE,cAAc,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC;IAE7F,MAAM,KAAK,GAAc;QACxB,SAAS,EAAE,YAAY;QACvB,KAAK,EAAE,MAAM;QACb,MAAM,EAAE,MAAM;QACd,UAAU,EAAE,KAAK;QACjB,WAAW,EAAE,KAAK;QAClB,WAAW,EAAE,qBAAqB;QAClC,WAAW,EAAE,QAAQ;QACrB,QAAQ,EAAE,UAAU;KACpB,C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AAM;AACN,KAAK;AACL,iEAAiE;AACjE,QAAQ"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { actions } from '@omegagrid/core';
|
|
2
|
+
import { Border, ElementModel, Grid, GridEditEvent, Style } from '@omegagrid/grid';
|
|
3
|
+
import { LitElement } from 'lit';
|
|
4
|
+
import { Toolbar, ToolbarItem } from '@omegagrid/toolbar';
|
|
5
|
+
import { CellRange } from '@omegagrid/grid';
|
|
6
|
+
import { Editor } from './editor';
|
|
7
|
+
export declare class EditorToolbar extends LitElement {
|
|
8
|
+
static styles: import("lit").CSSResult[];
|
|
9
|
+
leftToolbar: Toolbar;
|
|
10
|
+
centerToolbar: Toolbar;
|
|
11
|
+
rightToolbar: Toolbar;
|
|
12
|
+
grid: Grid;
|
|
13
|
+
editor: Editor;
|
|
14
|
+
gridElement: ElementModel;
|
|
15
|
+
_borderColor: string;
|
|
16
|
+
get isEditingCell(): boolean;
|
|
17
|
+
get isEditingColumn(): boolean;
|
|
18
|
+
get isEditingRow(): boolean;
|
|
19
|
+
filterToolbarItems(items: ToolbarItem[]): ToolbarItem[];
|
|
20
|
+
getToolbarLeftConfig(): ToolbarItem[];
|
|
21
|
+
getToolbarCenterConfig(): ToolbarItem[];
|
|
22
|
+
getToolbarRightConfig(): ToolbarItem[];
|
|
23
|
+
_onGridEdit: (_e: GridEditEvent) => void;
|
|
24
|
+
willUpdate(props: Map<PropertyKey, unknown>): void;
|
|
25
|
+
getToolbarValues(): Record<string, unknown>;
|
|
26
|
+
getCellBorderStyles(element: ElementModel, range: CellRange, value: {
|
|
27
|
+
top?: Border;
|
|
28
|
+
right?: Border;
|
|
29
|
+
bottom?: Border;
|
|
30
|
+
left?: Border;
|
|
31
|
+
}, borderType: string): Record<keyof Style, unknown>;
|
|
32
|
+
applyProperty(target: ElementModel, action: actions.Action, value: unknown, isStyleProperty: boolean): void;
|
|
33
|
+
updateToolbar(): Promise<void>;
|
|
34
|
+
_onToolbarAction: (e: actions.ActionEvent) => void;
|
|
35
|
+
render: () => import("lit-html").TemplateResult<1>;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=toolbar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolbar.d.ts","sourceRoot":"","sources":["../../src/ui/toolbar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAyB,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAa,MAAM,EAA0B,YAAY,EAAE,IAAI,EAAE,aAAa,EAAY,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAChI,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAEvC,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,qBAEa,aAAc,SAAQ,UAAU;IAE5C,MAAM,CAAC,MAAM,4BAAW;IAGxB,WAAW,EAAE,OAAO,CAAC;IAGrB,aAAa,EAAE,OAAO,CAAC;IAGvB,YAAY,EAAE,OAAO,CAAC;IAGtB,IAAI,EAAE,IAAI,CAAC;IAGX,MAAM,EAAE,MAAM,CAAC;IAGf,WAAW,EAAE,YAAY,CAAC;IAE1B,YAAY,SAAY;IAExB,IAAI,aAAa,YAAmD;IACpE,IAAI,eAAe,YAAqD;IACxE,IAAI,YAAY,YAAkD;IAElE,kBAAkB,CAAC,KAAK,EAAE,WAAW,EAAE;IAWvC,oBAAoB;IAMpB,sBAAsB;IAItB,qBAAqB;IAIrB,WAAW,OAAQ,aAAa,UAE/B;IAED,UAAU,CAAC,KAAK,EAAE,GAAG,CAAC,WAAW,EAAE,OAAO,CAAC;IAO3C,gBAAgB;IAkBhB,mBAAmB,CAClB,OAAO,EAAE,YAAY,EACrB,KAAK,EAAE,SAAS,EAChB,KAAK,EAAE;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAC,EACrE,UAAU,EAAE,MAAM;IAiBnB,aAAa,CAAC,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,OAAO;IAoC9F,aAAa;IAInB,gBAAgB,MAAO,QAAQ,WAAW,UA4EzC;IAED,MAAM,6CAyBJ;CAEF"}
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
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
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.EditorToolbar = void 0;
|
|
10
|
+
const core_1 = require("@omegagrid/core");
|
|
11
|
+
const grid_1 = require("@omegagrid/grid");
|
|
12
|
+
const lit_1 = require("lit");
|
|
13
|
+
const decorators_js_1 = require("lit/decorators.js");
|
|
14
|
+
const toolbar_config_1 = require("./toolbar.config");
|
|
15
|
+
const toolbar_style_1 = require("./toolbar.style");
|
|
16
|
+
let EditorToolbar = class EditorToolbar extends lit_1.LitElement {
|
|
17
|
+
constructor() {
|
|
18
|
+
super(...arguments);
|
|
19
|
+
this._borderColor = 'ff0000';
|
|
20
|
+
this._onGridEdit = (_e) => {
|
|
21
|
+
this.updateToolbar();
|
|
22
|
+
};
|
|
23
|
+
this._onToolbarAction = (e) => {
|
|
24
|
+
if (!this.grid)
|
|
25
|
+
return;
|
|
26
|
+
let { key, value } = e.action;
|
|
27
|
+
key = key !== null && key !== void 0 ? key : '';
|
|
28
|
+
let hideSelector = false;
|
|
29
|
+
let isStyleProperty = false;
|
|
30
|
+
const isPreview = e.action.type == 'preview';
|
|
31
|
+
const isPreviewEnd = e.action.type == 'previewEnd';
|
|
32
|
+
if (key == 'undo') {
|
|
33
|
+
this.grid.editing.undo();
|
|
34
|
+
this.updateToolbar();
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
else if (key == 'redo') {
|
|
38
|
+
this.grid.editing.redo();
|
|
39
|
+
this.updateToolbar();
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
else if (key == 'merge') {
|
|
43
|
+
if (value) {
|
|
44
|
+
this.grid.selecting.mergeSelection();
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
this.grid.selecting.unmergeSelection();
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
else if (key == 'wrap') {
|
|
51
|
+
isStyleProperty = true;
|
|
52
|
+
}
|
|
53
|
+
else if (['color', 'fgColor', 'bgColor'].indexOf(key) > -1) {
|
|
54
|
+
value = value ? value.substring(1) : '';
|
|
55
|
+
hideSelector = true;
|
|
56
|
+
isStyleProperty = true;
|
|
57
|
+
}
|
|
58
|
+
else if (['bold', 'italic', 'underline'].indexOf(key) > -1) {
|
|
59
|
+
isStyleProperty = true;
|
|
60
|
+
}
|
|
61
|
+
else if (key.startsWith('borderColor')) {
|
|
62
|
+
this._borderColor = value;
|
|
63
|
+
}
|
|
64
|
+
else if (key.startsWith('align')) {
|
|
65
|
+
isStyleProperty = true;
|
|
66
|
+
}
|
|
67
|
+
else if (key.startsWith('border')) {
|
|
68
|
+
isStyleProperty = true;
|
|
69
|
+
hideSelector = true;
|
|
70
|
+
}
|
|
71
|
+
if (isPreview || isPreviewEnd || this.isEditingCell) {
|
|
72
|
+
for (const cell of this.grid.model.getRangeIterator(this.grid.selection.range, isPreview)) {
|
|
73
|
+
this.applyProperty(cell, e.action, value, isStyleProperty);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
this.applyProperty(this.gridElement, e.action, value, isStyleProperty);
|
|
78
|
+
}
|
|
79
|
+
if (isPreview && hideSelector) {
|
|
80
|
+
this.grid.selecting.hideSelector();
|
|
81
|
+
}
|
|
82
|
+
else if (isPreviewEnd) {
|
|
83
|
+
this.grid.selecting.showSelector();
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
this.updateToolbar();
|
|
87
|
+
}
|
|
88
|
+
this.grid.rendering.updateCellSelectionRange();
|
|
89
|
+
this.grid.focus();
|
|
90
|
+
if (key == 'config') {
|
|
91
|
+
this.editor.rightSidebarComponent = value ? 'config' : null;
|
|
92
|
+
this.updateToolbar();
|
|
93
|
+
}
|
|
94
|
+
else if (key == 'headers') {
|
|
95
|
+
this.editor.rightSidebarComponent = value ? 'headers' : null;
|
|
96
|
+
this.updateToolbar();
|
|
97
|
+
}
|
|
98
|
+
else if (key == 'rules') {
|
|
99
|
+
this.editor.rightSidebarComponent = value ? 'rules' : null;
|
|
100
|
+
this.updateToolbar();
|
|
101
|
+
}
|
|
102
|
+
else if (key == 'sparklines') {
|
|
103
|
+
this.editor.rightSidebarComponent = value ? 'sparklines' : null;
|
|
104
|
+
this.updateToolbar();
|
|
105
|
+
}
|
|
106
|
+
else if (key == 'names') {
|
|
107
|
+
this.editor.rightSidebarComponent = value ? 'names' : null;
|
|
108
|
+
this.updateToolbar();
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
this.render = () => (0, lit_1.html) `
|
|
112
|
+
<og-toolbar
|
|
113
|
+
id="leftToolbar"
|
|
114
|
+
.items="${this.getToolbarLeftConfig()}"
|
|
115
|
+
.values="${this.getToolbarValues()}"
|
|
116
|
+
@toolbar.action="${this._onToolbarAction}">
|
|
117
|
+
</og-toolbar>
|
|
118
|
+
|
|
119
|
+
<div class="emptyToolbar"> </div>
|
|
120
|
+
|
|
121
|
+
<og-toolbar
|
|
122
|
+
id="centerToolbar"
|
|
123
|
+
.items="${this.getToolbarCenterConfig()}"
|
|
124
|
+
.values="${this.getToolbarValues()}"
|
|
125
|
+
@toolbar.action="${this._onToolbarAction}">
|
|
126
|
+
</og-toolbar>
|
|
127
|
+
|
|
128
|
+
<div class="emptyToolbar"> </div>
|
|
129
|
+
|
|
130
|
+
<og-toolbar
|
|
131
|
+
id="rightToolbar"
|
|
132
|
+
.items="${this.getToolbarRightConfig()}"
|
|
133
|
+
.values="${this.getToolbarValues()}"
|
|
134
|
+
@toolbar.action="${this._onToolbarAction}">
|
|
135
|
+
</og-toolbar>
|
|
136
|
+
`;
|
|
137
|
+
}
|
|
138
|
+
get isEditingCell() { return this.gridElement instanceof grid_1.CellModel; }
|
|
139
|
+
get isEditingColumn() { return this.gridElement instanceof grid_1.ColumnModel; }
|
|
140
|
+
get isEditingRow() { return this.gridElement instanceof grid_1.RowModel; }
|
|
141
|
+
filterToolbarItems(items) {
|
|
142
|
+
return items.filter(item => {
|
|
143
|
+
var _a, _b, _c, _d, _f;
|
|
144
|
+
if (['undo', 'redo'].indexOf(item.id) > -1)
|
|
145
|
+
return (_a = this.grid) === null || _a === void 0 ? void 0 : _a.options.undoRedo;
|
|
146
|
+
if (item.id == 'headers')
|
|
147
|
+
return (_b = this.editor) === null || _b === void 0 ? void 0 : _b.options.editing.headers;
|
|
148
|
+
if (item.id == 'rules')
|
|
149
|
+
return (_c = this.editor) === null || _c === void 0 ? void 0 : _c.options.editing.conditionalStyles;
|
|
150
|
+
if (item.id == 'sparklines')
|
|
151
|
+
return (_d = this.editor) === null || _d === void 0 ? void 0 : _d.options.editing.sparklines;
|
|
152
|
+
if (item.id == 'names')
|
|
153
|
+
return (_f = this.editor) === null || _f === void 0 ? void 0 : _f.options.editing.names;
|
|
154
|
+
return true;
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
getToolbarLeftConfig() {
|
|
158
|
+
var _a, _b;
|
|
159
|
+
toolbar_config_1.leftToolbarConfig[0].disabled = !((_a = this.grid) === null || _a === void 0 ? void 0 : _a.history) || this.grid.history.stack.length == 0;
|
|
160
|
+
toolbar_config_1.leftToolbarConfig[1].disabled = !((_b = this.grid) === null || _b === void 0 ? void 0 : _b.history) || this.grid.history.restack.length == 0;
|
|
161
|
+
return this.filterToolbarItems(toolbar_config_1.leftToolbarConfig);
|
|
162
|
+
}
|
|
163
|
+
getToolbarCenterConfig() {
|
|
164
|
+
return this.filterToolbarItems(toolbar_config_1.centerToolbarConfig);
|
|
165
|
+
}
|
|
166
|
+
getToolbarRightConfig() {
|
|
167
|
+
return this.filterToolbarItems(toolbar_config_1.rightToolbarConfig);
|
|
168
|
+
}
|
|
169
|
+
willUpdate(props) {
|
|
170
|
+
var _a, _b;
|
|
171
|
+
if (props.has('editor')) {
|
|
172
|
+
(_a = props.get('editor')) === null || _a === void 0 ? void 0 : _a.removeEventListener('grid.edit', this._onGridEdit);
|
|
173
|
+
(_b = this.editor) === null || _b === void 0 ? void 0 : _b.addEventListener('grid.edit', this._onGridEdit);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
getToolbarValues() {
|
|
177
|
+
var _a, _b, _c, _d, _f;
|
|
178
|
+
if (!this.gridElement)
|
|
179
|
+
return null;
|
|
180
|
+
const values = Object.assign({}, this.gridElement.composedStyle);
|
|
181
|
+
values.type = this.gridElement.type;
|
|
182
|
+
if (values.color)
|
|
183
|
+
values.color = '#' + values.color;
|
|
184
|
+
if (values.fgColor)
|
|
185
|
+
values.fgColor = '#' + values.fgColor;
|
|
186
|
+
if (values.bgColor)
|
|
187
|
+
values.bgColor = '#' + values.bgColor;
|
|
188
|
+
if (values.alignment && values.alignment.wrapText)
|
|
189
|
+
values.wrap = true;
|
|
190
|
+
values.merge = this.gridElement instanceof grid_1.CellModel ? this.gridElement.colspan > 1 || this.gridElement.rowspan > 1 : false;
|
|
191
|
+
values.format = this.gridElement.format;
|
|
192
|
+
values.config = ((_a = this.editor) === null || _a === void 0 ? void 0 : _a.rightSidebarComponent) == 'config';
|
|
193
|
+
values.headers = ((_b = this.editor) === null || _b === void 0 ? void 0 : _b.rightSidebarComponent) == 'headers';
|
|
194
|
+
values.rules = ((_c = this.editor) === null || _c === void 0 ? void 0 : _c.rightSidebarComponent) == 'rules';
|
|
195
|
+
values.sparklines = ((_d = this.editor) === null || _d === void 0 ? void 0 : _d.rightSidebarComponent) == 'sparklines';
|
|
196
|
+
values.names = ((_f = this.editor) === null || _f === void 0 ? void 0 : _f.rightSidebarComponent) == 'names';
|
|
197
|
+
return values;
|
|
198
|
+
}
|
|
199
|
+
getCellBorderStyles(element, range, value, borderType) {
|
|
200
|
+
const color = this._borderColor.length > 6 ? this._borderColor.substring(1) : this._borderColor;
|
|
201
|
+
const styles = {};
|
|
202
|
+
if (value.top)
|
|
203
|
+
value.top.color = color;
|
|
204
|
+
if (value.right)
|
|
205
|
+
value.right.color = color;
|
|
206
|
+
if (value.bottom)
|
|
207
|
+
value.bottom.color = color;
|
|
208
|
+
if (value.left)
|
|
209
|
+
value.left.color = color;
|
|
210
|
+
styles.bottom = value.bottom && ((element instanceof grid_1.CellModel && element.r == range.r2) || borderType == 'borderAll') ? value.bottom : null;
|
|
211
|
+
styles.top = value.top && ((element instanceof grid_1.CellModel && element.r == range.r1) || borderType == 'borderAll') ? value.top : null;
|
|
212
|
+
styles.left = value.left && ((element instanceof grid_1.CellModel && element.c == range.c1) || borderType == 'borderAll') ? value.left : null;
|
|
213
|
+
styles.right = value.right && ((element instanceof grid_1.CellModel && element.c == range.c2) || borderType == 'borderAll') ? value.right : null;
|
|
214
|
+
return styles;
|
|
215
|
+
}
|
|
216
|
+
applyProperty(target, action, value, isStyleProperty) {
|
|
217
|
+
var _a, _b, _c, _d, _f, _g;
|
|
218
|
+
let { key } = action;
|
|
219
|
+
const isPreview = action.type == 'preview';
|
|
220
|
+
if (isPreview && target instanceof grid_1.CellModel)
|
|
221
|
+
target.invalidateStyle();
|
|
222
|
+
if (key.startsWith('align')) {
|
|
223
|
+
value = Object.assign((_c = (_b = (_a = this.gridElement) === null || _a === void 0 ? void 0 : _a.composedStyle) === null || _b === void 0 ? void 0 : _b.alignment) !== null && _c !== void 0 ? _c : {}, value);
|
|
224
|
+
key = 'alignment';
|
|
225
|
+
}
|
|
226
|
+
else if (key == 'type') {
|
|
227
|
+
target.type = value;
|
|
228
|
+
}
|
|
229
|
+
else if (key == 'format') {
|
|
230
|
+
target.format = value;
|
|
231
|
+
}
|
|
232
|
+
else if (key == 'wrap') {
|
|
233
|
+
value = Object.assign((_g = (_f = (_d = this.gridElement) === null || _d === void 0 ? void 0 : _d.composedStyle) === null || _f === void 0 ? void 0 : _f.alignment) !== null && _g !== void 0 ? _g : {}, { wrapText: !!value });
|
|
234
|
+
key = 'alignment';
|
|
235
|
+
}
|
|
236
|
+
if (isStyleProperty) {
|
|
237
|
+
if (action.type == 'previewEnd') {
|
|
238
|
+
if (target instanceof grid_1.CellModel)
|
|
239
|
+
target.invalidateStyle();
|
|
240
|
+
}
|
|
241
|
+
else if (key.startsWith('border')) {
|
|
242
|
+
const borderStyles = this.getCellBorderStyles(target, this.grid.selection.range, value, key);
|
|
243
|
+
if (isPreview) {
|
|
244
|
+
if (target instanceof grid_1.CellModel)
|
|
245
|
+
target.previewStyleProperties(borderStyles);
|
|
246
|
+
}
|
|
247
|
+
else {
|
|
248
|
+
target.setStyleProperties(borderStyles);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
else if (isPreview) {
|
|
252
|
+
if (target instanceof grid_1.CellModel)
|
|
253
|
+
target.previewStyleProperties({ [key]: value });
|
|
254
|
+
}
|
|
255
|
+
else {
|
|
256
|
+
target.setStyleProperties({ [key]: value });
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
async updateToolbar() {
|
|
261
|
+
this.requestUpdate();
|
|
262
|
+
}
|
|
263
|
+
};
|
|
264
|
+
exports.EditorToolbar = EditorToolbar;
|
|
265
|
+
EditorToolbar.styles = [toolbar_style_1.style];
|
|
266
|
+
__decorate([
|
|
267
|
+
(0, decorators_js_1.query)('#leftToolbar')
|
|
268
|
+
], EditorToolbar.prototype, "leftToolbar", void 0);
|
|
269
|
+
__decorate([
|
|
270
|
+
(0, decorators_js_1.query)('#centerToolbar')
|
|
271
|
+
], EditorToolbar.prototype, "centerToolbar", void 0);
|
|
272
|
+
__decorate([
|
|
273
|
+
(0, decorators_js_1.query)('#rightToolbar')
|
|
274
|
+
], EditorToolbar.prototype, "rightToolbar", void 0);
|
|
275
|
+
__decorate([
|
|
276
|
+
(0, decorators_js_1.property)({ type: Object })
|
|
277
|
+
], EditorToolbar.prototype, "grid", void 0);
|
|
278
|
+
__decorate([
|
|
279
|
+
(0, decorators_js_1.property)({ type: Object })
|
|
280
|
+
], EditorToolbar.prototype, "editor", void 0);
|
|
281
|
+
__decorate([
|
|
282
|
+
(0, decorators_js_1.property)({ type: Object })
|
|
283
|
+
], EditorToolbar.prototype, "gridElement", void 0);
|
|
284
|
+
exports.EditorToolbar = EditorToolbar = __decorate([
|
|
285
|
+
(0, decorators_js_1.customElement)('og-editor-toolbar'),
|
|
286
|
+
(0, core_1.stylable)({ vars: ['background-color', 'background-color-2', 'font-*', 'accent-color', 'accent-color-highlight', 'text-color-2'] })
|
|
287
|
+
], EditorToolbar);
|
|
288
|
+
//# sourceMappingURL=toolbar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolbar.js","sourceRoot":"","sources":["../../src/ui/toolbar.ts"],"names":[],"mappings":";;;;;;;;;AAAA,0CAAiE;AACjE,0CAAgI;AAChI,6BAAuC;AACvC,qDAAmE;AAGnE,qDAA8F;AAC9F,mDAAwC;AAKjC,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,gBAAU;IAAtC;;QAsBN,iBAAY,GAAG,QAAQ,C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kBAAkB,CAAC,EAAC,CAAC,GAAG,CAAC,EAAE,KAAK,EAAC,CAAC,CAAC;YAC3C,CAAC;QACF,CAAC;IACF,CAAC;IAED,KAAK,CAAC,aAAa;QAClB,IAAI,CAAC,aAAa,EAAE,CAAC;IACtB,CAAC;;AA7IW,sCAAa;AAElB,oBAAM,GAAG,CAAC,qBAAK,CAAC,AAAV,CAAW;AAGxB;IADC,IAAA,qBAAK,EAAC,cAAc,CAAC;kDACD;AAGrB;IADC,IAAA,qBAAK,EAAC,gBAAgB,CAAC;oDACD;AAGvB;IADC,IAAA,qBAAK,EAAC,eAAe,CAAC;mDACD;AAGtB;IADC,IAAA,wBAAQ,EAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;2CACd;AAGX;IADC,IAAA,wBAAQ,EAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;6CACV;AAGf;IADC,IAAA,wBAAQ,EAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;kDACC;wBApBd,aAAa;IAFzB,IAAA,6BAAa,EAAC,mBAAmB,CAAC;IAClC,IAAA,eAAQ,EAAC,EAAC,IAAI,EAAE,CAAC,kBAAkB,EAAE,oBAAoB,EAAE,QAAQ,EAAE,cAAc,EAAE,wBAAwB,EAAE,cAAc,CAAC,EAAC,CAAC;GACpH,aAAa,CAwPzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolbar.style.d.ts","sourceRoot":"","sources":["../../src/ui/toolbar.style.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK,yBAmBjB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.style = void 0;
|
|
4
|
+
const lit_1 = require("lit");
|
|
5
|
+
exports.style = (0, lit_1.css) `
|
|
6
|
+
* {
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
:host {
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: row;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
og-toolbar {
|
|
16
|
+
flex: 0;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.emptyToolbar {
|
|
20
|
+
flex: 1;
|
|
21
|
+
width: 10px;
|
|
22
|
+
background-color: var(--background-color-2);
|
|
23
|
+
}
|
|
24
|
+
`;
|
|
25
|
+
//# sourceMappingURL=toolbar.style.js.map
|