@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.
Files changed (93) hide show
  1. package/dist/commands/index.d.ts +8 -0
  2. package/dist/commands/index.d.ts.map +1 -0
  3. package/dist/commands/index.js +19 -0
  4. package/dist/commands/index.js.map +1 -0
  5. package/dist/index.d.ts +3 -0
  6. package/dist/index.d.ts.map +1 -0
  7. package/dist/index.js +18 -0
  8. package/dist/index.js.map +1 -0
  9. package/dist/options.d.ts +12 -0
  10. package/dist/options.d.ts.map +1 -0
  11. package/dist/options.js +18 -0
  12. package/dist/options.js.map +1 -0
  13. package/dist/ui/editor.d.ts +70 -0
  14. package/dist/ui/editor.d.ts.map +1 -0
  15. package/dist/ui/editor.js +320 -0
  16. package/dist/ui/editor.js.map +1 -0
  17. package/dist/ui/editor.style.d.ts +2 -0
  18. package/dist/ui/editor.style.d.ts.map +1 -0
  19. package/dist/ui/editor.style.js +41 -0
  20. package/dist/ui/editor.style.js.map +1 -0
  21. package/dist/ui/editorZoom.d.ts +16 -0
  22. package/dist/ui/editorZoom.d.ts.map +1 -0
  23. package/dist/ui/editorZoom.js +85 -0
  24. package/dist/ui/editorZoom.js.map +1 -0
  25. package/dist/ui/forms/configForm.d.ts +12 -0
  26. package/dist/ui/forms/configForm.d.ts.map +1 -0
  27. package/dist/ui/forms/configForm.js +89 -0
  28. package/dist/ui/forms/configForm.js.map +1 -0
  29. package/dist/ui/forms/headerForm.d.ts +18 -0
  30. package/dist/ui/forms/headerForm.d.ts.map +1 -0
  31. package/dist/ui/forms/headerForm.js +150 -0
  32. package/dist/ui/forms/headerForm.js.map +1 -0
  33. package/dist/ui/forms/index.d.ts +7 -0
  34. package/dist/ui/forms/index.d.ts.map +1 -0
  35. package/dist/ui/forms/index.js +23 -0
  36. package/dist/ui/forms/index.js.map +1 -0
  37. package/dist/ui/forms/namesForm.d.ts +21 -0
  38. package/dist/ui/forms/namesForm.d.ts.map +1 -0
  39. package/dist/ui/forms/namesForm.js +127 -0
  40. package/dist/ui/forms/namesForm.js.map +1 -0
  41. package/dist/ui/forms/ruleForm.d.ts +20 -0
  42. package/dist/ui/forms/ruleForm.d.ts.map +1 -0
  43. package/dist/ui/forms/ruleForm.js +152 -0
  44. package/dist/ui/forms/ruleForm.js.map +1 -0
  45. package/dist/ui/forms/ruleForm.style.d.ts +3 -0
  46. package/dist/ui/forms/ruleForm.style.d.ts.map +1 -0
  47. package/dist/ui/forms/ruleForm.style.js +81 -0
  48. package/dist/ui/forms/ruleForm.style.js.map +1 -0
  49. package/dist/ui/forms/sparklineForm.d.ts +22 -0
  50. package/dist/ui/forms/sparklineForm.d.ts.map +1 -0
  51. package/dist/ui/forms/sparklineForm.js +202 -0
  52. package/dist/ui/forms/sparklineForm.js.map +1 -0
  53. package/dist/ui/forms/sparklineForm.style.d.ts +3 -0
  54. package/dist/ui/forms/sparklineForm.style.d.ts.map +1 -0
  55. package/dist/ui/forms/sparklineForm.style.js +97 -0
  56. package/dist/ui/forms/sparklineForm.style.js.map +1 -0
  57. package/dist/ui/forms/styleForm.d.ts +14 -0
  58. package/dist/ui/forms/styleForm.d.ts.map +1 -0
  59. package/dist/ui/forms/styleForm.js +150 -0
  60. package/dist/ui/forms/styleForm.js.map +1 -0
  61. package/dist/ui/formulabar.d.ts +23 -0
  62. package/dist/ui/formulabar.d.ts.map +1 -0
  63. package/dist/ui/formulabar.js +164 -0
  64. package/dist/ui/formulabar.js.map +1 -0
  65. package/dist/ui/formulabar.style.d.ts +2 -0
  66. package/dist/ui/formulabar.style.d.ts.map +1 -0
  67. package/dist/ui/formulabar.style.js +49 -0
  68. package/dist/ui/formulabar.style.js.map +1 -0
  69. package/dist/ui/gridStats.d.ts +11 -0
  70. package/dist/ui/gridStats.d.ts.map +1 -0
  71. package/dist/ui/gridStats.js +74 -0
  72. package/dist/ui/gridStats.js.map +1 -0
  73. package/dist/ui/index.d.ts +9 -0
  74. package/dist/ui/index.d.ts.map +1 -0
  75. package/dist/ui/index.js +25 -0
  76. package/dist/ui/index.js.map +1 -0
  77. package/dist/ui/statusbar.d.ts +19 -0
  78. package/dist/ui/statusbar.d.ts.map +1 -0
  79. package/dist/ui/statusbar.js +72 -0
  80. package/dist/ui/statusbar.js.map +1 -0
  81. package/dist/ui/toolbar.config.d.ts +6 -0
  82. package/dist/ui/toolbar.config.d.ts.map +1 -0
  83. package/dist/ui/toolbar.config.js +138 -0
  84. package/dist/ui/toolbar.config.js.map +1 -0
  85. package/dist/ui/toolbar.d.ts +37 -0
  86. package/dist/ui/toolbar.d.ts.map +1 -0
  87. package/dist/ui/toolbar.js +288 -0
  88. package/dist/ui/toolbar.js.map +1 -0
  89. package/dist/ui/toolbar.style.d.ts +2 -0
  90. package/dist/ui/toolbar.style.d.ts.map +1 -0
  91. package/dist/ui/toolbar.style.js +25 -0
  92. package/dist/ui/toolbar.style.js.map +1 -0
  93. package/package.json +65 -0
@@ -0,0 +1,152 @@
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.RuleForm = void 0;
10
+ const core_1 = require("@omegagrid/core");
11
+ const decorators_js_1 = require("lit/decorators.js");
12
+ const grid_1 = require("@omegagrid/grid");
13
+ const lit_1 = require("lit");
14
+ const ruleForm_style_1 = require("./ruleForm.style");
15
+ let RuleForm = class RuleForm extends lit_1.LitElement {
16
+ constructor() {
17
+ super(...arguments);
18
+ this.updateList = () => {
19
+ this.list.size = this.model.conditionalFormats.formats.length;
20
+ this.list.renderItems(true);
21
+ };
22
+ this._onApplyClick = () => {
23
+ this.model.clearCalculatedStyles();
24
+ this.grid.rendering.render(false);
25
+ };
26
+ this._itemRenderer = (_div, index) => {
27
+ const format = this.model.conditionalFormats.formats[index];
28
+ format.style = format.style || {};
29
+ return (0, lit_1.html) `
30
+ <div class="item-content p">
31
+ <div class="item-form">
32
+ <div class="row item-header">Rule #${index + 1}</div>
33
+
34
+ <div class="row">Range</div>
35
+ <div class="row">
36
+ <og-input
37
+ data-id="ranges"
38
+ .value="${format.ranges ? grid_1.CellRange.toA1s(format.ranges) : ''}"
39
+ style="width: 100%"
40
+ @change="${(e) => this._onInputChange(e, format)}">
41
+ </og-input>
42
+ </div>
43
+
44
+ <div class="row">Condition</div>
45
+ <div class="row">
46
+ <og-input
47
+ data-id="condition"
48
+ .value="${format.condition || ''}"
49
+ style="width: 100%"
50
+ @change="${(e) => this._onInputChange(e, format)}">
51
+ </og-input>
52
+ </div>
53
+
54
+ <div class="row">
55
+ <og-editor-form-style .data="${format.style}"></og-editor-form-style>
56
+ </div>
57
+ </div>
58
+ <div class="item-controls">
59
+ <og-button
60
+ icon="arrow-up"
61
+ style="flex: 1"
62
+ @click="${() => this.moveRuleUp(index)}"
63
+ ?disabled="${index == 0}">
64
+ </og-button>
65
+ <og-button
66
+ icon="arrow-down"
67
+ style="flex: 1"
68
+ @click="${() => this.moveRuleDown(index)}"
69
+ ?disabled="${index >= this.model.conditionalFormats.formats.length - 1}">
70
+ </og-button>
71
+ <og-button
72
+ icon="trash"
73
+ color="red"
74
+ style="min-height: 24px; flex: 0"
75
+ @click="${() => this.deleteRule(index)}">
76
+ </og-button>
77
+ </div>
78
+ </div>
79
+ `;
80
+ };
81
+ this.render = () => this.model ? (0, lit_1.html) `
82
+ <div class="controls p">
83
+ <og-button text="+" @click="${() => this.addRule()}"></og-button>
84
+ <og-button @click="${this._onApplyClick}">
85
+ <div slot="content"><og-fa-icon icon="refresh"></og-fa-icon> Apply</div>
86
+ </og-button>
87
+ </div>
88
+ <div class="body">
89
+ <og-list ?nativeHeight="${true}"
90
+ itemHeight="150"
91
+ .customStyle=${ruleForm_style_1.itemStyle}
92
+ .itemRenderer="${this._itemRenderer}"
93
+ .size="${this.model.conditionalFormats.formats.length}">
94
+ </og-list>
95
+ </div>
96
+ ` : '';
97
+ }
98
+ connectedCallback() {
99
+ super.connectedCallback();
100
+ }
101
+ moveRuleUp(index) {
102
+ if (index == 0)
103
+ return;
104
+ const formats = this.model.conditionalFormats.formats;
105
+ formats.splice(index - 1, 0, formats.splice(index, 1)[0]);
106
+ this.updateList();
107
+ }
108
+ moveRuleDown(index) {
109
+ const formats = this.model.conditionalFormats.formats;
110
+ if (index >= formats.length)
111
+ return;
112
+ formats.splice(index + 1, 0, formats.splice(index, 1)[0]);
113
+ this.updateList();
114
+ }
115
+ deleteRule(index) {
116
+ const formats = this.model.conditionalFormats.formats;
117
+ formats.splice(index, 1);
118
+ this.updateList();
119
+ }
120
+ addRule() {
121
+ const formats = this.model.conditionalFormats.formats;
122
+ formats.push({});
123
+ this.updateList();
124
+ }
125
+ _onInputChange(e, format) {
126
+ const input = e.target;
127
+ switch (input.dataset.id) {
128
+ case 'ranges':
129
+ format.ranges = grid_1.CellRange.fromA1s(input.value);
130
+ break;
131
+ case 'condition':
132
+ format.condition = input.value;
133
+ break;
134
+ }
135
+ }
136
+ };
137
+ exports.RuleForm = RuleForm;
138
+ RuleForm.styles = [ruleForm_style_1.style];
139
+ __decorate([
140
+ (0, decorators_js_1.property)({ type: Object })
141
+ ], RuleForm.prototype, "grid", void 0);
142
+ __decorate([
143
+ (0, decorators_js_1.property)({ type: Object })
144
+ ], RuleForm.prototype, "model", void 0);
145
+ __decorate([
146
+ (0, decorators_js_1.query)('og-list')
147
+ ], RuleForm.prototype, "list", void 0);
148
+ exports.RuleForm = RuleForm = __decorate([
149
+ (0, decorators_js_1.customElement)('og-editor-form-rules'),
150
+ (0, core_1.stylable)({ vars: ['background-color', 'font-*', 'accent-color', 'accent-color-highlight', 'text-color-2', 'colortype-*'] })
151
+ ], RuleForm);
152
+ //# sourceMappingURL=ruleForm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ruleForm.js","sourceRoot":"","sources":["../../../src/ui/forms/ruleForm.ts"],"names":[],"mappings":";;;;;;;;;AAAA,0CAAwD;AACxD,qDAAmE;AACnE,0CAAgF;AAChF,6BAAuC;AACvC,qDAAoD;AAI7C,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,gBAAU;IAAjC;;QAiBN,eAAU,GAAG,GAAG,EAAE;YACjB,IAAI,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,OAAO,CAAC,MAAM,CAAC;YAC9D,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAC7B,CAAC,CAAA;QA4BD,kBAAa,GAAG,GAAG,EAAE;YACpB,IAAI,CAAC,KAAK,CAAC,qBAAqB,EAAE,CAAC;YACnC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACnC,CAAC,CAAA;QAUD,kBAAa,GAAG,CAAC,IAAoB,EAAE,KAAa,EAAE,EAAE;YACvD,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YAC5D,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC;YAClC,OAAO,IAAA,UAAI,EAAA;;;0CAG6B,KAAK,GAAG,CAAC;;;;;;iBAMlC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,gBAAS,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE;;kBAElD,CAAC,CAAQ,EAAE,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,EAAE,MAAM,CAAC;;;;;;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AAI,EAAE,MAAM,EAAC,CAAC;sCACd;AAGX;IADC,IAAA,wBAAQ,EAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;uCACR;AAGjB;IADC,IAAA,qBAAK,EAAC,SAAS,CAAC;sCACN;mBAXC,QAAQ;IAFpB,IAAA,6BAAa,EAAC,sBAAsB,CAAC;IACrC,IAAA,eAAQ,EAAC,EAAC,IAAI,EAAE,CAAC,kBAAkB,EAAE,QAAQ,EAAE,cAAc,EAAE,wBAAwB,EAAE,cAAc,EAAE,aAAa,CAAC,EAAC,CAAC;GAC7G,QAAQ,CAqIpB"}
@@ -0,0 +1,3 @@
1
+ export declare const style: import("lit").CSSResult;
2
+ export declare const itemStyle: import("lit").CSSResult;
3
+ //# sourceMappingURL=ruleForm.style.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ruleForm.style.d.ts","sourceRoot":"","sources":["../../../src/ui/forms/ruleForm.style.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK,yBAgCjB,CAAC;AAEF,eAAO,MAAM,SAAS,yBA0CrB,CAAC"}
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.itemStyle = 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
+ font-size: var(--font-size);
12
+ display: flex;
13
+ flex-direction: column;
14
+ }
15
+
16
+ .controls {
17
+ flex: 0;
18
+ display: flex;
19
+ flex-direction: row;
20
+ gap: 2px;
21
+ padding: 2px;
22
+ }
23
+
24
+ .controls > * {
25
+ flex: 1;
26
+ text-align: center
27
+ }
28
+
29
+ .body {
30
+ flex: 1;
31
+ overflow: hidden;
32
+ }
33
+
34
+ og-list {
35
+ height: 100%;
36
+ }
37
+ `;
38
+ exports.itemStyle = (0, lit_1.css) `
39
+ .p {
40
+ padding: 5px;
41
+ }
42
+
43
+ .row {
44
+ line-height: 22px;
45
+ max-height: 22px;
46
+ }
47
+
48
+ og-input {
49
+ display: block;
50
+ }
51
+
52
+ .item-header {
53
+ padding-left: 4px;
54
+ background-color: var(--accent-color);
55
+ color: var(--colortype-accent-text-color);
56
+ }
57
+
58
+ .item-content {
59
+ height: 100%;
60
+ display: flex;
61
+ flex-direction: row;
62
+ }
63
+
64
+ .item-form {
65
+ flex: 1;
66
+ }
67
+
68
+ .item-controls {
69
+ flex: 0;
70
+ padding: 0 2px;
71
+ display: flex;
72
+ flex-direction: column;
73
+ gap: 2px;
74
+ }
75
+
76
+ .item-controls og-button {
77
+ width: 24px;
78
+ display: block;
79
+ }
80
+ `;
81
+ //# sourceMappingURL=ruleForm.style.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ruleForm.style.js","sourceRoot":"","sources":["../../../src/ui/forms/ruleForm.style.ts"],"names":[],"mappings":";;;AAAA,6BAA0B;AAEb,QAAA,KAAK,GAAG,IAAA,SAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCvB,CAAC;AAEW,QAAA,SAAS,GAAG,IAAA,SAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0C3B,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { actions, List } from '@omegagrid/core';
2
+ import { Grid, GridModel, SparklineOptions } from '@omegagrid/grid';
3
+ import { LitElement } from 'lit';
4
+ export declare class SparklineForm extends LitElement {
5
+ static styles: import("lit").CSSResult[];
6
+ grid: Grid;
7
+ model: GridModel;
8
+ list: List;
9
+ _groupIndexMap: Map<number, number>;
10
+ get groupIndexMap(): Map<number, number>;
11
+ connectedCallback(): void;
12
+ updateList: () => void;
13
+ deleteGroup(index: number): void;
14
+ addGroup(): void;
15
+ _onApplyClick: () => void;
16
+ _onInputChange(e: Event, groupIndex: number): void;
17
+ _onOptionsToolbarAction: (e: actions.ActionEvent, groupIndex: number) => void;
18
+ getToolbarValues(options: SparklineOptions): Record<string, unknown>;
19
+ _itemRenderer: (_div: HTMLDivElement, index: number) => import("lit-html").TemplateResult<1>;
20
+ render: () => import("lit-html").TemplateResult<1> | "";
21
+ }
22
+ //# sourceMappingURL=sparklineForm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sparklineForm.d.ts","sourceRoot":"","sources":["../../../src/ui/forms/sparklineForm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAS,IAAI,EAAY,MAAM,iBAAiB,CAAC;AAEjE,OAAO,EAAa,IAAI,EAAE,SAAS,EAAyB,gBAAgB,EAAiB,MAAM,iBAAiB,CAAC;AACrH,OAAO,EAAQ,UAAU,EAAE,MAAM,KAAK,CAAC;AAyBvC,qBAEa,aAAc,SAAQ,UAAU;IAE5C,MAAM,CAAC,MAAM,4BAAW;IAGxB,IAAI,EAAE,IAAI,CAAC;IAGX,KAAK,EAAE,SAAS,CAAC;IAGjB,IAAI,EAAE,IAAI,CAAC;IAEX,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,IAAI,aAAa,wBAOhB;IAED,iBAAiB;IAIjB,UAAU,aAIT;IAgBD,WAAW,CAAC,KAAK,EAAE,MAAM;IAKzB,QAAQ;IAKR,aAAa,aAGZ;IAED,cAAc,CAAC,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM;IAU3C,uBAAuB,MAAO,QAAQ,WAAW,cAAc,MAAM,UAUpE;IAED,gBAAgB,CAAC,OAAO,EAAE,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IASpE,aAAa,SAAU,cAAc,SAAS,MAAM,0CAgDnD;IAED,MAAM,kDAeC;CACP"}
@@ -0,0 +1,202 @@
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.SparklineForm = void 0;
10
+ const core_1 = require("@omegagrid/core");
11
+ const decorators_js_1 = require("lit/decorators.js");
12
+ const grid_1 = require("@omegagrid/grid");
13
+ const lit_1 = require("lit");
14
+ const sparklineForm_style_1 = require("./sparklineForm.style");
15
+ const minMaxItems = [
16
+ { k: 'auto', v: 'auto' },
17
+ { k: 'common', v: 'common' }
18
+ ];
19
+ const optionToolbarItems = [
20
+ { type: 'dropdown', id: 'chartType', width: 80, items: [
21
+ { k: 'column', v: 'column', icon: 'chart-column' },
22
+ { k: 'line', v: 'line', icon: 'chart-line' }
23
+ ] },
24
+ { type: 'color', id: 'color', icon: { icon: 'fill' } },
25
+ { type: 'text', id: 'min', width: 80, items: minMaxItems, placeholder: '<min>' },
26
+ { type: 'text', id: 'max', width: 80, items: minMaxItems, placeholder: '<max>' }
27
+ ];
28
+ function stringToSparklineExtrme(v) {
29
+ if (v === '' || v == null)
30
+ return 'auto';
31
+ if (v == 'auto' || v == 'common')
32
+ return v;
33
+ return parseFloat(v);
34
+ }
35
+ let SparklineForm = class SparklineForm extends lit_1.LitElement {
36
+ constructor() {
37
+ super(...arguments);
38
+ this.updateList = () => {
39
+ this._groupIndexMap = null;
40
+ this.list.size = this.model.sparklines.groups.size;
41
+ this.list.renderItems(true);
42
+ };
43
+ this._onApplyClick = () => {
44
+ this.grid.model.refreshSparklines();
45
+ this.grid.rendering.render(true);
46
+ };
47
+ this._onOptionsToolbarAction = (e, groupIndex) => {
48
+ const a = e.action;
49
+ const group = this.model.sparklines.groups.get(groupIndex);
50
+ if (/^preview/.test(a.type))
51
+ return;
52
+ switch (a.key) {
53
+ case 'chartType':
54
+ group.type = a.value;
55
+ break;
56
+ case 'color':
57
+ group.style.color = a.value.substring(1);
58
+ break;
59
+ case 'min':
60
+ group.minValue = stringToSparklineExtrme(a.value);
61
+ break;
62
+ case 'max':
63
+ group.maxValue = stringToSparklineExtrme(a.value);
64
+ break;
65
+ }
66
+ };
67
+ this._itemRenderer = (_div, index) => {
68
+ var _a;
69
+ const groupIndex = this.groupIndexMap.get(index);
70
+ const group = this.model.sparklines.groups.get(groupIndex);
71
+ return (0, lit_1.html) `
72
+ <div class="item-content p">
73
+ <div class="item-form">
74
+ <div class="row item-header">
75
+ <div class="item-header-title">Definition #${index + 1}</div>
76
+ <div class="item-header-controls">
77
+ <og-button
78
+ icon="trash"
79
+ color="red"
80
+ @click="${() => this.deleteGroup(groupIndex)}">
81
+ </og-button>
82
+ </div>
83
+ </div>
84
+
85
+ <div class="row">Location range</div>
86
+ <div class="row">
87
+ <og-input
88
+ data-id="locRange"
89
+ .value="${((_a = group.locRange) === null || _a === void 0 ? void 0 : _a.A1) || ''}"
90
+ style="width: 100%"
91
+ @change="${(e) => this._onInputChange(e, groupIndex)}">
92
+ </og-input>
93
+ </div>
94
+
95
+ <div class="row">Data range</div>
96
+ <div class="row">
97
+ <og-input
98
+ data-id="dataRange"
99
+ .value="${(group.dataRanges ? grid_1.CellRange.toA1s(group.dataRanges.map(item => item[0])) : null) || ''}"
100
+ style="width: 100%"
101
+ @change="${(e) => this._onInputChange(e, groupIndex)}">
102
+ </og-input>
103
+ </div>
104
+
105
+ <div class="row">Options</div>
106
+ <div class="row">
107
+ <og-toolbar
108
+ .items="${optionToolbarItems}"
109
+ .values="${this.getToolbarValues(group)}"
110
+ @toolbar.action="${(e) => this._onOptionsToolbarAction(e, groupIndex)}">
111
+ </og-toolbar>
112
+ </div>
113
+ </div>
114
+ </div>
115
+ `;
116
+ };
117
+ this.render = () => this.model ? (0, lit_1.html) `
118
+ <div class="controls p">
119
+ <og-button text="+" @click="${() => this.addGroup()}"></og-button>
120
+ <og-button @click="${this._onApplyClick}">
121
+ <div slot="content"><og-fa-icon icon="refresh"></og-fa-icon> Apply</div>
122
+ </og-button>
123
+ </div>
124
+ <div class="body">
125
+ <og-list ?nativeHeight="${true}"
126
+ itemHeight="170"
127
+ .customStyle=${sparklineForm_style_1.itemStyle}
128
+ .itemRenderer="${this._itemRenderer}"
129
+ .size="${this.model.sparklines.groups.size}">
130
+ </og-list>
131
+ </div>
132
+ ` : '';
133
+ }
134
+ get groupIndexMap() {
135
+ if (!this._groupIndexMap) {
136
+ this._groupIndexMap = new Map();
137
+ let i = 0;
138
+ this.model.sparklines.groups.forEach((_group, index) => this._groupIndexMap.set(i++, index));
139
+ }
140
+ return this._groupIndexMap;
141
+ }
142
+ connectedCallback() {
143
+ super.connectedCallback();
144
+ }
145
+ // moveRuleUp(index: number) {
146
+ // if (index == 0) return;
147
+ // const formats = this.model.conditionalFormats.formats;
148
+ // formats.splice(index - 1, 0, formats.splice(index, 1)[0]);
149
+ // this.updateList();
150
+ // }
151
+ // moveRuleDown(index: number) {
152
+ // const formats = this.model.conditionalFormats.formats;
153
+ // if (index >= formats.length) return;
154
+ // formats.splice(index + 1, 0, formats.splice(index, 1)[0]);
155
+ // this.updateList();
156
+ // }
157
+ deleteGroup(index) {
158
+ this.model.sparklines.delete(index);
159
+ this.updateList();
160
+ }
161
+ addGroup() {
162
+ this.model.sparklines.add(null, null);
163
+ this.updateList();
164
+ }
165
+ _onInputChange(e, groupIndex) {
166
+ const sparklines = this.model.sparklines;
167
+ const group = sparklines.groups.get(groupIndex);
168
+ const input = e.target;
169
+ switch (input.dataset.id) {
170
+ case 'locRange':
171
+ sparklines.update(groupIndex, input.value ? grid_1.CellRange.fromA1(input.value) : null, group.dataRanges);
172
+ break;
173
+ case 'dataRange':
174
+ sparklines.update(groupIndex, group.locRange, input.value ? grid_1.CellRange.fromA1s(input.value).map(r => ([r, null])) : null);
175
+ break;
176
+ }
177
+ }
178
+ getToolbarValues(options) {
179
+ return {
180
+ chartType: options.type,
181
+ color: `#${options.style.color}`,
182
+ min: options.minValue,
183
+ max: options.maxValue,
184
+ };
185
+ }
186
+ };
187
+ exports.SparklineForm = SparklineForm;
188
+ SparklineForm.styles = [sparklineForm_style_1.style];
189
+ __decorate([
190
+ (0, decorators_js_1.property)({ type: Object })
191
+ ], SparklineForm.prototype, "grid", void 0);
192
+ __decorate([
193
+ (0, decorators_js_1.property)({ type: Object })
194
+ ], SparklineForm.prototype, "model", void 0);
195
+ __decorate([
196
+ (0, decorators_js_1.query)('og-list')
197
+ ], SparklineForm.prototype, "list", void 0);
198
+ exports.SparklineForm = SparklineForm = __decorate([
199
+ (0, decorators_js_1.customElement)('og-editor-form-sparklines'),
200
+ (0, core_1.stylable)({ vars: ['background-color', 'font-*', 'accent-color', 'accent-color-highlight', 'text-color-2', 'colortype-*'] })
201
+ ], SparklineForm);
202
+ //# sourceMappingURL=sparklineForm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sparklineForm.js","sourceRoot":"","sources":["../../../src/ui/forms/sparklineForm.ts"],"names":[],"mappings":";;;;;;;;;AAAA,0CAAiE;AACjE,qDAAmE;AACnE,0CAAqH;AACrH,6BAAuC;AACvC,+DAAyD;AAGzD,MAAM,WAAW,GAAG;IACnB,EAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAC;IACtB,EAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAC;CAC1B,CAAC;AAEF,MAAM,kBAAkB,GAAkB;IACzC,EAAC,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE;YACrD,EAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,cAAc,EAAC;YAChD,EAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAC;SAC1C,EAAC;IACF,EAAC,IA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AC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;gBAAC,MAAM;QACnJ,CAAC;IACF,CAAC;IAcD,gBAAgB,CAAC,OAAyB;QACzC,OAAO;YACN,SAAS,EAAE,OAAO,CAAC,IAAI;YACvB,KAAK,EAAE,IAAI,OAAO,CAAC,KAAK,CAAC,KAAK,EAAE;YAChC,GAAG,EAAE,OAAO,CAAC,QAAQ;YACrB,GAAG,EAAE,OAAO,CAAC,QAAQ;SACrB,CAAC;IACH,CAAC;;AA3FW,sCAAa;AAElB,oBAAM,GAAG,CAAC,2BAAK,CAAC,AAAV,CAAW;AAGxB;IADC,IAAA,wBAAQ,EAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;2CACd;AAGX;IADC,IAAA,wBAAQ,EAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;4CACR;AAGjB;IADC,IAAA,qBAAK,EAAC,SAAS,CAAC;2CACN;wBAXC,aAAa;IAFzB,IAAA,6BAAa,EAAC,2BAA2B,CAAC;IAC1C,IAAA,eAAQ,EAAC,EAAC,IAAI,EAAE,CAAC,kBAAkB,EAAE,QAAQ,EAAE,cAAc,EAAE,wBAAwB,EAAE,cAAc,EAAE,aAAa,CAAC,EAAC,CAAC;GAC7G,aAAa,CA+JzB"}
@@ -0,0 +1,3 @@
1
+ export declare const style: import("lit").CSSResult;
2
+ export declare const itemStyle: import("lit").CSSResult;
3
+ //# sourceMappingURL=sparklineForm.style.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sparklineForm.style.d.ts","sourceRoot":"","sources":["../../../src/ui/forms/sparklineForm.style.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK,yBAgCjB,CAAC;AAEF,eAAO,MAAM,SAAS,yBA0DrB,CAAC"}
@@ -0,0 +1,97 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.itemStyle = 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
+ font-size: var(--font-size);
12
+ display: flex;
13
+ flex-direction: column;
14
+ }
15
+
16
+ .controls {
17
+ flex: 0;
18
+ display: flex;
19
+ flex-direction: row;
20
+ gap: 2px;
21
+ padding: 2px;
22
+ }
23
+
24
+ .controls > * {
25
+ flex: 1;
26
+ text-align: center
27
+ }
28
+
29
+ .body {
30
+ flex: 1;
31
+ overflow: hidden;
32
+ }
33
+
34
+ og-list {
35
+ height: 100%;
36
+ }
37
+ `;
38
+ exports.itemStyle = (0, lit_1.css) `
39
+ .p {
40
+ padding: 5px;
41
+ }
42
+
43
+ .row {
44
+ line-height: 22px;
45
+ max-height: 22px;
46
+ }
47
+
48
+ og-input {
49
+ display: block;
50
+ }
51
+
52
+ .item-header {
53
+ padding-left: 4px;
54
+ background-color: var(--accent-color);
55
+ color: var(--colortype-accent-text-color);
56
+ display: flex;
57
+ }
58
+
59
+ .item-header-controls {
60
+ flex: 1;
61
+ display: flex;
62
+ flex-direction: row;
63
+ justify-content: flex-end;
64
+ align-items: center;
65
+ padding-right: 2px;
66
+ gap: 2px;
67
+ }
68
+
69
+ .item-header-controls og-button {
70
+ min-width: 20px;
71
+ height: 20px;
72
+ }
73
+
74
+ .item-content {
75
+ height: 100%;
76
+ display: flex;
77
+ flex-direction: row;
78
+ }
79
+
80
+ .item-form {
81
+ flex: 1;
82
+ }
83
+
84
+ .item-controls {
85
+ flex: 0;
86
+ padding: 0 2px;
87
+ display: flex;
88
+ flex-direction: column;
89
+ gap: 2px;
90
+ }
91
+
92
+ .item-controls og-button {
93
+ width: 24px;
94
+ display: block;
95
+ }
96
+ `;
97
+ //# sourceMappingURL=sparklineForm.style.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sparklineForm.style.js","sourceRoot":"","sources":["../../../src/ui/forms/sparklineForm.style.ts"],"names":[],"mappings":";;;AAAA,6BAA0B;AAEb,QAAA,KAAK,GAAG,IAAA,SAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCvB,CAAC;AAEW,QAAA,SAAS,GAAG,IAAA,SAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0D3B,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { actions } from '@omegagrid/core';
2
+ import { Style } from '@omegagrid/grid';
3
+ import { LitElement } from 'lit';
4
+ import { Toolbar } from '@omegagrid/toolbar';
5
+ export declare class StyleForm extends LitElement {
6
+ static styles: import("lit").CSSResult[];
7
+ data: Style;
8
+ toolbar: Toolbar;
9
+ styleToToolbarValues(s: Style): Record<string, unknown>;
10
+ connectedCallback(): void;
11
+ _onAction: (e: actions.ActionEvent) => void;
12
+ render: () => import("lit-html").TemplateResult<1>;
13
+ }
14
+ //# sourceMappingURL=styleForm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styleForm.d.ts","sourceRoot":"","sources":["../../../src/ui/forms/styleForm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAEpD,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAa,UAAU,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAe,MAAM,oBAAoB,CAAC;AAyC1D,qBAEa,SAAU,SAAQ,UAAU;IAExC,MAAM,CAAC,MAAM,4BAcV;IAGH,IAAI,EAAE,KAAK,CAAM;IAGjB,OAAO,EAAE,OAAO,CAAC;IAEjB,oBAAoB,CAAC,CAAC,EAAE,KAAK;IAU7B,iBAAiB;IAIjB,SAAS,MAAO,QAAQ,WAAW,UAmBlC;IAED,MAAM,6CAMJ;CAEF"}