@operato/data-grist 0.4.2 → 0.4.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/CHANGELOG.md +24 -0
- package/dist/src/editors/ox-grist-editor-checkbox.d.ts +5 -0
- package/dist/src/editors/ox-grist-editor-checkbox.js +17 -0
- package/dist/src/editors/ox-grist-editor-checkbox.js.map +1 -0
- package/dist/src/editors/ox-grist-editor-color.d.ts +4 -0
- package/dist/src/editors/ox-grist-editor-color.js +14 -0
- package/dist/src/editors/ox-grist-editor-color.js.map +1 -0
- package/dist/src/editors/ox-grist-editor-date.d.ts +4 -0
- package/dist/src/editors/ox-grist-editor-date.js +14 -0
- package/dist/src/editors/ox-grist-editor-date.js.map +1 -0
- package/dist/src/editors/ox-grist-editor-dateTime.d.ts +6 -0
- package/dist/src/editors/ox-grist-editor-dateTime.js +27 -0
- package/dist/src/editors/ox-grist-editor-dateTime.js.map +1 -0
- package/dist/src/editors/ox-grist-editor-email.d.ts +4 -0
- package/dist/src/editors/ox-grist-editor-email.js +14 -0
- package/dist/src/editors/ox-grist-editor-email.js.map +1 -0
- package/dist/src/editors/ox-grist-editor-image.d.ts +7 -0
- package/dist/src/editors/ox-grist-editor-image.js +31 -0
- package/dist/src/editors/ox-grist-editor-image.js.map +1 -0
- package/dist/src/editors/ox-grist-editor-month.d.ts +4 -0
- package/dist/src/editors/ox-grist-editor-month.js +14 -0
- package/dist/src/editors/ox-grist-editor-month.js.map +1 -0
- package/dist/src/editors/ox-grist-editor-number.d.ts +5 -0
- package/dist/src/editors/ox-grist-editor-number.js +26 -0
- package/dist/src/editors/ox-grist-editor-number.js.map +1 -0
- package/dist/src/editors/ox-grist-editor-password.d.ts +4 -0
- package/dist/src/editors/ox-grist-editor-password.js +14 -0
- package/dist/src/editors/ox-grist-editor-password.js.map +1 -0
- package/dist/src/editors/ox-grist-editor-select.d.ts +4 -0
- package/dist/src/editors/ox-grist-editor-select.js +41 -0
- package/dist/src/editors/ox-grist-editor-select.js.map +1 -0
- package/dist/src/editors/ox-grist-editor-tel.d.ts +4 -0
- package/dist/src/editors/ox-grist-editor-tel.js +14 -0
- package/dist/src/editors/ox-grist-editor-tel.js.map +1 -0
- package/dist/src/editors/ox-grist-editor-text.d.ts +4 -0
- package/dist/src/editors/ox-grist-editor-text.js +14 -0
- package/dist/src/editors/ox-grist-editor-text.js.map +1 -0
- package/dist/src/editors/ox-grist-editor-time.d.ts +4 -0
- package/dist/src/editors/ox-grist-editor-time.js +14 -0
- package/dist/src/editors/ox-grist-editor-time.js.map +1 -0
- package/dist/src/editors/ox-grist-editor-week.d.ts +4 -0
- package/dist/src/editors/ox-grist-editor-week.js +14 -0
- package/dist/src/editors/ox-grist-editor-week.js.map +1 -0
- package/dist/src/editors/ox-grist-editor.d.ts +25 -0
- package/dist/src/editors/ox-grist-editor.js +159 -0
- package/dist/src/editors/ox-grist-editor.js.map +1 -0
- package/dist/src/renderers/ox-grist-renderer-boolean.d.ts +2 -0
- package/dist/src/renderers/ox-grist-renderer-boolean.js +30 -0
- package/dist/src/renderers/ox-grist-renderer-boolean.js.map +1 -0
- package/dist/src/renderers/ox-grist-renderer-color.d.ts +2 -0
- package/dist/src/renderers/ox-grist-renderer-color.js +12 -0
- package/dist/src/renderers/ox-grist-renderer-color.js.map +1 -0
- package/dist/src/renderers/ox-grist-renderer-date.d.ts +2 -0
- package/dist/src/renderers/ox-grist-renderer-date.js +53 -0
- package/dist/src/renderers/ox-grist-renderer-date.js.map +1 -0
- package/dist/src/renderers/ox-grist-renderer-image.d.ts +2 -0
- package/dist/src/renderers/ox-grist-renderer-image.js +24 -0
- package/dist/src/renderers/ox-grist-renderer-image.js.map +1 -0
- package/dist/src/renderers/ox-grist-renderer-json5.d.ts +2 -0
- package/dist/src/renderers/ox-grist-renderer-json5.js +27 -0
- package/dist/src/renderers/ox-grist-renderer-json5.js.map +1 -0
- package/dist/src/renderers/ox-grist-renderer-link.d.ts +2 -0
- package/dist/src/renderers/ox-grist-renderer-link.js +12 -0
- package/dist/src/renderers/ox-grist-renderer-link.js.map +1 -0
- package/dist/src/renderers/ox-grist-renderer-password.d.ts +2 -0
- package/dist/src/renderers/ox-grist-renderer-password.js +5 -0
- package/dist/src/renderers/ox-grist-renderer-password.js.map +1 -0
- package/dist/src/renderers/ox-grist-renderer-progress.d.ts +5 -0
- package/dist/src/renderers/ox-grist-renderer-progress.js +46 -0
- package/dist/src/renderers/ox-grist-renderer-progress.js.map +1 -0
- package/dist/src/renderers/ox-grist-renderer-select.d.ts +2 -0
- package/dist/src/renderers/ox-grist-renderer-select.js +20 -0
- package/dist/src/renderers/ox-grist-renderer-select.js.map +1 -0
- package/dist/src/renderers/ox-grist-renderer-text.d.ts +2 -0
- package/dist/src/renderers/ox-grist-renderer-text.js +17 -0
- package/dist/src/renderers/ox-grist-renderer-text.js.map +1 -0
- package/dist/src/renderers/ox-grist-renderer.d.ts +15 -0
- package/dist/src/renderers/ox-grist-renderer.js +48 -0
- package/dist/src/renderers/ox-grist-renderer.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/yarn-error.log +0 -17496
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,30 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
### [0.4.5](https://github.com/hatiolab/operato/compare/v0.4.4...v0.4.5) (2022-04-22)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @operato/data-grist
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### [0.4.4](https://github.com/hatiolab/operato/compare/v0.4.3...v0.4.4) (2022-04-22)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @operato/data-grist
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### [0.4.3](https://github.com/hatiolab/operato/compare/v0.4.2...v0.4.3) (2022-03-06)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @operato/data-grist
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
6
30
|
### [0.4.2](https://github.com/hatiolab/operato/compare/v0.4.1...v0.4.2) (2022-03-06)
|
|
7
31
|
|
|
8
32
|
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { OxGristEditor } from './ox-grist-editor.js';
|
|
3
|
+
import { customElement } from 'lit/decorators.js';
|
|
4
|
+
import { html } from 'lit';
|
|
5
|
+
let OxGristEditorCheckbox = class OxGristEditorCheckbox extends OxGristEditor {
|
|
6
|
+
formatFromEditor(e) {
|
|
7
|
+
return e.target.checked;
|
|
8
|
+
}
|
|
9
|
+
get editorTemplate() {
|
|
10
|
+
return html ` <input type="checkbox" .checked=${!!this.value} /> `;
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
OxGristEditorCheckbox = __decorate([
|
|
14
|
+
customElement('ox-grist-editor-checkbox')
|
|
15
|
+
], OxGristEditorCheckbox);
|
|
16
|
+
export { OxGristEditorCheckbox };
|
|
17
|
+
//# sourceMappingURL=ox-grist-editor-checkbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ox-grist-editor-checkbox.js","sourceRoot":"","sources":["../../../src/editors/ox-grist-editor-checkbox.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAG1B,IAAa,qBAAqB,GAAlC,MAAa,qBAAsB,SAAQ,aAAa;IACtD,gBAAgB,CAAC,CAAQ;QACvB,OAAQ,CAAC,CAAC,MAA2B,CAAC,OAAO,CAAA;IAC/C,CAAC;IAED,IAAI,cAAc;QAChB,OAAO,IAAI,CAAA,oCAAoC,CAAC,CAAC,IAAI,CAAC,KAAK,MAAM,CAAA;IACnE,CAAC;CACF,CAAA;AARY,qBAAqB;IADjC,aAAa,CAAC,0BAA0B,CAAC;GAC7B,qBAAqB,CAQjC;SARY,qBAAqB","sourcesContent":["import { OxGristEditor } from './ox-grist-editor.js'\nimport { customElement } from 'lit/decorators.js'\nimport { html } from 'lit'\n\n@customElement('ox-grist-editor-checkbox')\nexport class OxGristEditorCheckbox extends OxGristEditor {\n formatFromEditor(e: Event) {\n return (e.target as HTMLInputElement).checked\n }\n\n get editorTemplate() {\n return html` <input type=\"checkbox\" .checked=${!!this.value} /> `\n }\n}\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { OxGristEditor } from './ox-grist-editor.js';
|
|
3
|
+
import { customElement } from 'lit/decorators.js';
|
|
4
|
+
import { html } from 'lit';
|
|
5
|
+
let OxGristEditorColor = class OxGristEditorColor extends OxGristEditor {
|
|
6
|
+
get editorTemplate() {
|
|
7
|
+
return html ` <input type="color" .value=${this.value} /> `;
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
OxGristEditorColor = __decorate([
|
|
11
|
+
customElement('ox-grist-editor-color')
|
|
12
|
+
], OxGristEditorColor);
|
|
13
|
+
export { OxGristEditorColor };
|
|
14
|
+
//# sourceMappingURL=ox-grist-editor-color.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ox-grist-editor-color.js","sourceRoot":"","sources":["../../../src/editors/ox-grist-editor-color.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAG1B,IAAa,kBAAkB,GAA/B,MAAa,kBAAmB,SAAQ,aAAa;IACnD,IAAI,cAAc;QAChB,OAAO,IAAI,CAAA,+BAA+B,IAAI,CAAC,KAAK,MAAM,CAAA;IAC5D,CAAC;CACF,CAAA;AAJY,kBAAkB;IAD9B,aAAa,CAAC,uBAAuB,CAAC;GAC1B,kBAAkB,CAI9B;SAJY,kBAAkB","sourcesContent":["import { OxGristEditor } from './ox-grist-editor.js'\nimport { customElement } from 'lit/decorators.js'\nimport { html } from 'lit'\n\n@customElement('ox-grist-editor-color')\nexport class OxGristEditorColor extends OxGristEditor {\n get editorTemplate() {\n return html` <input type=\"color\" .value=${this.value} /> `\n }\n}\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { OxGristEditor } from './ox-grist-editor.js';
|
|
3
|
+
import { customElement } from 'lit/decorators.js';
|
|
4
|
+
import { html } from 'lit';
|
|
5
|
+
let OxGristEditorDate = class OxGristEditorDate extends OxGristEditor {
|
|
6
|
+
get editorTemplate() {
|
|
7
|
+
return html ` <input type="date" .value=${this.value} /> `;
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
OxGristEditorDate = __decorate([
|
|
11
|
+
customElement('ox-grist-editor-date')
|
|
12
|
+
], OxGristEditorDate);
|
|
13
|
+
export { OxGristEditorDate };
|
|
14
|
+
//# sourceMappingURL=ox-grist-editor-date.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ox-grist-editor-date.js","sourceRoot":"","sources":["../../../src/editors/ox-grist-editor-date.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAG1B,IAAa,iBAAiB,GAA9B,MAAa,iBAAkB,SAAQ,aAAa;IAClD,IAAI,cAAc;QAChB,OAAO,IAAI,CAAA,8BAA8B,IAAI,CAAC,KAAK,MAAM,CAAA;IAC3D,CAAC;CACF,CAAA;AAJY,iBAAiB;IAD7B,aAAa,CAAC,sBAAsB,CAAC;GACzB,iBAAiB,CAI7B;SAJY,iBAAiB","sourcesContent":["import { OxGristEditor } from './ox-grist-editor.js'\nimport { customElement } from 'lit/decorators.js'\nimport { html } from 'lit'\n\n@customElement('ox-grist-editor-date')\nexport class OxGristEditorDate extends OxGristEditor {\n get editorTemplate() {\n return html` <input type=\"date\" .value=${this.value} /> `\n }\n}\n"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { OxGristEditor } from './ox-grist-editor.js';
|
|
3
|
+
import { customElement } from 'lit/decorators.js';
|
|
4
|
+
import { html } from 'lit';
|
|
5
|
+
let OxGristEditorDateTime = class OxGristEditorDateTime extends OxGristEditor {
|
|
6
|
+
formatForEditor(timestamp) {
|
|
7
|
+
if (!timestamp) {
|
|
8
|
+
timestamp = Date.now();
|
|
9
|
+
}
|
|
10
|
+
var datetime = new Date(timestamp);
|
|
11
|
+
var tzoffset = datetime.getTimezoneOffset() * 60000; //offset in milliseconds
|
|
12
|
+
return new Date(timestamp - tzoffset).toISOString().slice(0, -1);
|
|
13
|
+
}
|
|
14
|
+
formatFromEditor(e) {
|
|
15
|
+
var value = e.target.value;
|
|
16
|
+
var datetime = new Date(value);
|
|
17
|
+
return datetime.getTime();
|
|
18
|
+
}
|
|
19
|
+
get editorTemplate() {
|
|
20
|
+
return html ` <input type="datetime-local" .value=${this.value} /> `;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
OxGristEditorDateTime = __decorate([
|
|
24
|
+
customElement('ox-grist-editor-datetime')
|
|
25
|
+
], OxGristEditorDateTime);
|
|
26
|
+
export { OxGristEditorDateTime };
|
|
27
|
+
//# sourceMappingURL=ox-grist-editor-dateTime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ox-grist-editor-dateTime.js","sourceRoot":"","sources":["../../../src/editors/ox-grist-editor-dateTime.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAG1B,IAAa,qBAAqB,GAAlC,MAAa,qBAAsB,SAAQ,aAAa;IACtD,eAAe,CAAC,SAAc;QAC5B,IAAI,CAAC,SAAS,EAAE;YACd,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;SACvB;QACD,IAAI,QAAQ,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,CAAA;QAElC,IAAI,QAAQ,GAAG,QAAQ,CAAC,iBAAiB,EAAE,GAAG,KAAK,CAAA,CAAC,wBAAwB;QAE5E,OAAO,IAAI,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;IAClE,CAAC;IAED,gBAAgB,CAAC,CAAQ;QACvB,IAAI,KAAK,GAAI,CAAC,CAAC,MAA2B,CAAC,KAAK,CAAA;QAChD,IAAI,QAAQ,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,CAAA;QAE9B,OAAO,QAAQ,CAAC,OAAO,EAAE,CAAA;IAC3B,CAAC;IAED,IAAI,cAAc;QAChB,OAAO,IAAI,CAAA,wCAAwC,IAAI,CAAC,KAAK,MAAM,CAAA;IACrE,CAAC;CACF,CAAA;AAtBY,qBAAqB;IADjC,aAAa,CAAC,0BAA0B,CAAC;GAC7B,qBAAqB,CAsBjC;SAtBY,qBAAqB","sourcesContent":["import { OxGristEditor } from './ox-grist-editor.js'\nimport { customElement } from 'lit/decorators.js'\nimport { html } from 'lit'\n\n@customElement('ox-grist-editor-datetime')\nexport class OxGristEditorDateTime extends OxGristEditor {\n formatForEditor(timestamp: any) {\n if (!timestamp) {\n timestamp = Date.now()\n }\n var datetime = new Date(timestamp)\n\n var tzoffset = datetime.getTimezoneOffset() * 60000 //offset in milliseconds\n\n return new Date(timestamp - tzoffset).toISOString().slice(0, -1)\n }\n\n formatFromEditor(e: Event) {\n var value = (e.target as HTMLInputElement).value\n var datetime = new Date(value)\n\n return datetime.getTime()\n }\n\n get editorTemplate() {\n return html` <input type=\"datetime-local\" .value=${this.value} /> `\n }\n}\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { OxGristEditor } from './ox-grist-editor.js';
|
|
3
|
+
import { customElement } from 'lit/decorators.js';
|
|
4
|
+
import { html } from 'lit';
|
|
5
|
+
let OxGristEditorEmail = class OxGristEditorEmail extends OxGristEditor {
|
|
6
|
+
get editorTemplate() {
|
|
7
|
+
return html ` <input type="email" .value=${this.value} /> `;
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
OxGristEditorEmail = __decorate([
|
|
11
|
+
customElement('ox-grist-editor-email')
|
|
12
|
+
], OxGristEditorEmail);
|
|
13
|
+
export { OxGristEditorEmail };
|
|
14
|
+
//# sourceMappingURL=ox-grist-editor-email.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ox-grist-editor-email.js","sourceRoot":"","sources":["../../../src/editors/ox-grist-editor-email.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAG1B,IAAa,kBAAkB,GAA/B,MAAa,kBAAmB,SAAQ,aAAa;IACnD,IAAI,cAAc;QAChB,OAAO,IAAI,CAAA,+BAA+B,IAAI,CAAC,KAAK,MAAM,CAAA;IAC5D,CAAC;CACF,CAAA;AAJY,kBAAkB;IAD9B,aAAa,CAAC,uBAAuB,CAAC;GAC1B,kBAAkB,CAI9B;SAJY,kBAAkB","sourcesContent":["import { OxGristEditor } from './ox-grist-editor.js'\nimport { customElement } from 'lit/decorators.js'\nimport { html } from 'lit'\n\n@customElement('ox-grist-editor-email')\nexport class OxGristEditorEmail extends OxGristEditor {\n get editorTemplate() {\n return html` <input type=\"email\" .value=${this.value} /> `\n }\n}\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import '@operato/input/ox-input-image.js';
|
|
2
|
+
import { OxGristEditor } from './ox-grist-editor.js';
|
|
3
|
+
export declare class OxGristEditorImage extends OxGristEditor {
|
|
4
|
+
get editorTemplate(): import("lit-html").TemplateResult<1>;
|
|
5
|
+
_onchange(e: Event): void;
|
|
6
|
+
formatFromEditor(e: Event): string | File;
|
|
7
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import '@operato/input/ox-input-image.js';
|
|
3
|
+
import { OxGristEditor } from './ox-grist-editor.js';
|
|
4
|
+
import { customElement } from 'lit/decorators.js';
|
|
5
|
+
import { html } from 'lit';
|
|
6
|
+
let OxGristEditorImage = class OxGristEditorImage extends OxGristEditor {
|
|
7
|
+
get editorTemplate() {
|
|
8
|
+
return html ` <ox-input-image .value=${this.value}></ox-input-image> `;
|
|
9
|
+
}
|
|
10
|
+
_onchange(e) {
|
|
11
|
+
e.stopPropagation();
|
|
12
|
+
this._dirtyValue = this.formatFromEditor(e);
|
|
13
|
+
this._onfocusout();
|
|
14
|
+
}
|
|
15
|
+
formatFromEditor(e) {
|
|
16
|
+
var _a;
|
|
17
|
+
// value가 image file object인지, image url인지 확인
|
|
18
|
+
const input = e.target;
|
|
19
|
+
if ((_a = input.files) === null || _a === void 0 ? void 0 : _a[0]) {
|
|
20
|
+
return input.files[0];
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
return input.value;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
OxGristEditorImage = __decorate([
|
|
28
|
+
customElement('ox-grist-editor-image')
|
|
29
|
+
], OxGristEditorImage);
|
|
30
|
+
export { OxGristEditorImage };
|
|
31
|
+
//# sourceMappingURL=ox-grist-editor-image.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ox-grist-editor-image.js","sourceRoot":"","sources":["../../../src/editors/ox-grist-editor-image.ts"],"names":[],"mappings":";AAAA,OAAO,kCAAkC,CAAA;AAEzC,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAG1B,IAAa,kBAAkB,GAA/B,MAAa,kBAAmB,SAAQ,aAAa;IACnD,IAAI,cAAc;QAChB,OAAO,IAAI,CAAA,2BAA2B,IAAI,CAAC,KAAK,qBAAqB,CAAA;IACvE,CAAC;IAED,SAAS,CAAC,CAAQ;QAChB,CAAC,CAAC,eAAe,EAAE,CAAA;QACnB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAA;QAC3C,IAAI,CAAC,WAAW,EAAE,CAAA;IACpB,CAAC;IAED,gBAAgB,CAAC,CAAQ;;QACvB,6CAA6C;QAC7C,MAAM,KAAK,GAAG,CAAC,CAAC,MAA0B,CAAA;QAC1C,IAAI,MAAA,KAAK,CAAC,KAAK,0CAAG,CAAC,CAAC,EAAE;YACpB,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;SACtB;aAAM;YACL,OAAO,KAAK,CAAC,KAAK,CAAA;SACnB;IACH,CAAC;CACF,CAAA;AApBY,kBAAkB;IAD9B,aAAa,CAAC,uBAAuB,CAAC;GAC1B,kBAAkB,CAoB9B;SApBY,kBAAkB","sourcesContent":["import '@operato/input/ox-input-image.js'\n\nimport { OxGristEditor } from './ox-grist-editor.js'\nimport { customElement } from 'lit/decorators.js'\nimport { html } from 'lit'\n\n@customElement('ox-grist-editor-image')\nexport class OxGristEditorImage extends OxGristEditor {\n get editorTemplate() {\n return html` <ox-input-image .value=${this.value}></ox-input-image> `\n }\n\n _onchange(e: Event) {\n e.stopPropagation()\n this._dirtyValue = this.formatFromEditor(e)\n this._onfocusout()\n }\n\n formatFromEditor(e: Event) {\n // value가 image file object인지, image url인지 확인\n const input = e.target as HTMLInputElement\n if (input.files?.[0]) {\n return input.files[0]\n } else {\n return input.value\n }\n }\n}\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { OxGristEditor } from './ox-grist-editor.js';
|
|
3
|
+
import { customElement } from 'lit/decorators.js';
|
|
4
|
+
import { html } from 'lit';
|
|
5
|
+
let OxGristEditorMonth = class OxGristEditorMonth extends OxGristEditor {
|
|
6
|
+
get editorTemplate() {
|
|
7
|
+
return html ` <input type="month" .value=${this.value} /> `;
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
OxGristEditorMonth = __decorate([
|
|
11
|
+
customElement('ox-grist-editor-month')
|
|
12
|
+
], OxGristEditorMonth);
|
|
13
|
+
export { OxGristEditorMonth };
|
|
14
|
+
//# sourceMappingURL=ox-grist-editor-month.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ox-grist-editor-month.js","sourceRoot":"","sources":["../../../src/editors/ox-grist-editor-month.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAG1B,IAAa,kBAAkB,GAA/B,MAAa,kBAAmB,SAAQ,aAAa;IACnD,IAAI,cAAc;QAChB,OAAO,IAAI,CAAA,+BAA+B,IAAI,CAAC,KAAK,MAAM,CAAA;IAC5D,CAAC;CACF,CAAA;AAJY,kBAAkB;IAD9B,aAAa,CAAC,uBAAuB,CAAC;GAC1B,kBAAkB,CAI9B;SAJY,kBAAkB","sourcesContent":["import { OxGristEditor } from './ox-grist-editor.js'\nimport { customElement } from 'lit/decorators.js'\nimport { html } from 'lit'\n\n@customElement('ox-grist-editor-month')\nexport class OxGristEditorMonth extends OxGristEditor {\n get editorTemplate() {\n return html` <input type=\"month\" .value=${this.value} /> `\n }\n}\n"]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { OxGristEditor } from './ox-grist-editor.js';
|
|
3
|
+
import { customElement } from 'lit/decorators.js';
|
|
4
|
+
import { html } from 'lit';
|
|
5
|
+
let OxGristEditorNumber = class OxGristEditorNumber extends OxGristEditor {
|
|
6
|
+
formatFromEditor(e) {
|
|
7
|
+
let value = e.target.value;
|
|
8
|
+
switch (this.column.type) {
|
|
9
|
+
case 'float':
|
|
10
|
+
return Number.parseFloat(value);
|
|
11
|
+
case 'integer':
|
|
12
|
+
return Number.parseInt(value);
|
|
13
|
+
default:
|
|
14
|
+
return Number(value);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
get editorTemplate() {
|
|
18
|
+
var { min = -Infinity, max = Infinity } = this.column.record.options || {};
|
|
19
|
+
return html ` <input type="number" .value=${this.value} .min=${Number(min)} .max=${Number(max)} /> `;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
OxGristEditorNumber = __decorate([
|
|
23
|
+
customElement('ox-grist-editor-number')
|
|
24
|
+
], OxGristEditorNumber);
|
|
25
|
+
export { OxGristEditorNumber };
|
|
26
|
+
//# sourceMappingURL=ox-grist-editor-number.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ox-grist-editor-number.js","sourceRoot":"","sources":["../../../src/editors/ox-grist-editor-number.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAG1B,IAAa,mBAAmB,GAAhC,MAAa,mBAAoB,SAAQ,aAAa;IACpD,gBAAgB,CAAC,CAAQ;QACvB,IAAI,KAAK,GAAI,CAAC,CAAC,MAA2B,CAAC,KAAK,CAAA;QAEhD,QAAQ,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;YACxB,KAAK,OAAO;gBACV,OAAO,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAA;YACjC,KAAK,SAAS;gBACZ,OAAO,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;YAC/B;gBACE,OAAO,MAAM,CAAC,KAAK,CAAC,CAAA;SACvB;IACH,CAAC;IAED,IAAI,cAAc;QAChB,IAAI,EAAE,GAAG,GAAG,CAAC,QAAQ,EAAE,GAAG,GAAG,QAAQ,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,IAAI,EAAE,CAAA;QAE1E,OAAO,IAAI,CAAA,gCAAgC,IAAI,CAAC,KAAK,SAAS,MAAM,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAAG,CAAC,MAAM,CAAA;IACrG,CAAC;CACF,CAAA;AAnBY,mBAAmB;IAD/B,aAAa,CAAC,wBAAwB,CAAC;GAC3B,mBAAmB,CAmB/B;SAnBY,mBAAmB","sourcesContent":["import { OxGristEditor } from './ox-grist-editor.js'\nimport { customElement } from 'lit/decorators.js'\nimport { html } from 'lit'\n\n@customElement('ox-grist-editor-number')\nexport class OxGristEditorNumber extends OxGristEditor {\n formatFromEditor(e: Event) {\n let value = (e.target as HTMLInputElement).value\n\n switch (this.column.type) {\n case 'float':\n return Number.parseFloat(value)\n case 'integer':\n return Number.parseInt(value)\n default:\n return Number(value)\n }\n }\n\n get editorTemplate() {\n var { min = -Infinity, max = Infinity } = this.column.record.options || {}\n\n return html` <input type=\"number\" .value=${this.value} .min=${Number(min)} .max=${Number(max)} /> `\n }\n}\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { OxGristEditor } from './ox-grist-editor.js';
|
|
3
|
+
import { customElement } from 'lit/decorators.js';
|
|
4
|
+
import { html } from 'lit';
|
|
5
|
+
let OxGristEditorPassword = class OxGristEditorPassword extends OxGristEditor {
|
|
6
|
+
get editorTemplate() {
|
|
7
|
+
return html ` <input type="password" .value=${this.value} /> `;
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
OxGristEditorPassword = __decorate([
|
|
11
|
+
customElement('ox-grist-editor-password')
|
|
12
|
+
], OxGristEditorPassword);
|
|
13
|
+
export { OxGristEditorPassword };
|
|
14
|
+
//# sourceMappingURL=ox-grist-editor-password.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ox-grist-editor-password.js","sourceRoot":"","sources":["../../../src/editors/ox-grist-editor-password.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAG1B,IAAa,qBAAqB,GAAlC,MAAa,qBAAsB,SAAQ,aAAa;IACtD,IAAI,cAAc;QAChB,OAAO,IAAI,CAAA,kCAAkC,IAAI,CAAC,KAAK,MAAM,CAAA;IAC/D,CAAC;CACF,CAAA;AAJY,qBAAqB;IADjC,aAAa,CAAC,0BAA0B,CAAC;GAC7B,qBAAqB,CAIjC;SAJY,qBAAqB","sourcesContent":["import { OxGristEditor } from './ox-grist-editor.js'\nimport { customElement } from 'lit/decorators.js'\nimport { html } from 'lit'\n\n@customElement('ox-grist-editor-password')\nexport class OxGristEditorPassword extends OxGristEditor {\n get editorTemplate() {\n return html` <input type=\"password\" .value=${this.value} /> `\n }\n}\n"]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { OxGristEditor } from './ox-grist-editor.js';
|
|
3
|
+
import { customElement } from 'lit/decorators.js';
|
|
4
|
+
import { html } from 'lit';
|
|
5
|
+
let OxGristEditorSelect = class OxGristEditorSelect extends OxGristEditor {
|
|
6
|
+
get editorTemplate() {
|
|
7
|
+
var rowOptionField = this.record[this.column.record.rowOptionField || ''];
|
|
8
|
+
var { options = [] } = rowOptionField ? rowOptionField : this.column.record;
|
|
9
|
+
if (typeof options == 'function') {
|
|
10
|
+
options = options.call(null, this.value, this.column, this.record, this.rowIndex, this.field);
|
|
11
|
+
}
|
|
12
|
+
options = options.map((option) => {
|
|
13
|
+
switch (typeof option) {
|
|
14
|
+
case 'string':
|
|
15
|
+
return {
|
|
16
|
+
display: option,
|
|
17
|
+
value: option
|
|
18
|
+
};
|
|
19
|
+
case 'object':
|
|
20
|
+
return {
|
|
21
|
+
display: option.display,
|
|
22
|
+
value: option.value
|
|
23
|
+
};
|
|
24
|
+
default:
|
|
25
|
+
return option;
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
return html `
|
|
29
|
+
<select>
|
|
30
|
+
${options.map((option) => html `
|
|
31
|
+
<option ?selected=${option.value == this.value} value=${option.value}>${option.display}</option>
|
|
32
|
+
`)}
|
|
33
|
+
</select>
|
|
34
|
+
`;
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
OxGristEditorSelect = __decorate([
|
|
38
|
+
customElement('ox-grist-editor-select')
|
|
39
|
+
], OxGristEditorSelect);
|
|
40
|
+
export { OxGristEditorSelect };
|
|
41
|
+
//# sourceMappingURL=ox-grist-editor-select.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ox-grist-editor-select.js","sourceRoot":"","sources":["../../../src/editors/ox-grist-editor-select.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAG1B,IAAa,mBAAmB,GAAhC,MAAa,mBAAoB,SAAQ,aAAa;IACpD,IAAI,cAAc;QAChB,IAAI,cAAc,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,cAAc,IAAI,EAAE,CAAC,CAAA;QACzE,IAAI,EAAE,OAAO,GAAG,EAAE,EAAE,GAAG,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAA;QAE3E,IAAI,OAAO,OAAO,IAAI,UAAU,EAAE;YAChC,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,CAAA;SAC9F;QAED,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,MAAW,EAAE,EAAE;YACpC,QAAQ,OAAO,MAAM,EAAE;gBACrB,KAAK,QAAQ;oBACX,OAAO;wBACL,OAAO,EAAE,MAAM;wBACf,KAAK,EAAE,MAAM;qBACd,CAAA;gBACH,KAAK,QAAQ;oBACX,OAAO;wBACL,OAAO,EAAE,MAAM,CAAC,OAAO;wBACvB,KAAK,EAAE,MAAM,CAAC,KAAK;qBACpB,CAAA;gBACH;oBACE,OAAO,MAAM,CAAA;aAChB;QACH,CAAC,CAAC,CAAA;QAEF,OAAO,IAAI,CAAA;;UAEL,OAAO,CAAC,GAAG,CACX,CAAC,MAAW,EAAE,EAAE,CAAC,IAAI,CAAA;gCACC,MAAM,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,UAAU,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,OAAO;WACvF,CACF;;KAEJ,CAAA;IACH,CAAC;CACF,CAAA;AApCY,mBAAmB;IAD/B,aAAa,CAAC,wBAAwB,CAAC;GAC3B,mBAAmB,CAoC/B;SApCY,mBAAmB","sourcesContent":["import { OxGristEditor } from './ox-grist-editor.js'\nimport { customElement } from 'lit/decorators.js'\nimport { html } from 'lit'\n\n@customElement('ox-grist-editor-select')\nexport class OxGristEditorSelect extends OxGristEditor {\n get editorTemplate() {\n var rowOptionField = this.record[this.column.record.rowOptionField || '']\n var { options = [] } = rowOptionField ? rowOptionField : this.column.record\n\n if (typeof options == 'function') {\n options = options.call(null, this.value, this.column, this.record, this.rowIndex, this.field)\n }\n\n options = options.map((option: any) => {\n switch (typeof option) {\n case 'string':\n return {\n display: option,\n value: option\n }\n case 'object':\n return {\n display: option.display,\n value: option.value\n }\n default:\n return option\n }\n })\n\n return html`\n <select>\n ${options.map(\n (option: any) => html`\n <option ?selected=${option.value == this.value} value=${option.value}>${option.display}</option>\n `\n )}\n </select>\n `\n }\n}\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { OxGristEditor } from './ox-grist-editor.js';
|
|
3
|
+
import { customElement } from 'lit/decorators.js';
|
|
4
|
+
import { html } from 'lit';
|
|
5
|
+
let OxGristEditorTel = class OxGristEditorTel extends OxGristEditor {
|
|
6
|
+
get editorTemplate() {
|
|
7
|
+
return html ` <input type="tel" .value=${this.value} /> `;
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
OxGristEditorTel = __decorate([
|
|
11
|
+
customElement('ox-grist-editor-tel')
|
|
12
|
+
], OxGristEditorTel);
|
|
13
|
+
export { OxGristEditorTel };
|
|
14
|
+
//# sourceMappingURL=ox-grist-editor-tel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ox-grist-editor-tel.js","sourceRoot":"","sources":["../../../src/editors/ox-grist-editor-tel.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAG1B,IAAa,gBAAgB,GAA7B,MAAa,gBAAiB,SAAQ,aAAa;IACjD,IAAI,cAAc;QAChB,OAAO,IAAI,CAAA,6BAA6B,IAAI,CAAC,KAAK,MAAM,CAAA;IAC1D,CAAC;CACF,CAAA;AAJY,gBAAgB;IAD5B,aAAa,CAAC,qBAAqB,CAAC;GACxB,gBAAgB,CAI5B;SAJY,gBAAgB","sourcesContent":["import { OxGristEditor } from './ox-grist-editor.js'\nimport { customElement } from 'lit/decorators.js'\nimport { html } from 'lit'\n\n@customElement('ox-grist-editor-tel')\nexport class OxGristEditorTel extends OxGristEditor {\n get editorTemplate() {\n return html` <input type=\"tel\" .value=${this.value} /> `\n }\n}\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { OxGristEditor } from './ox-grist-editor.js';
|
|
3
|
+
import { customElement } from 'lit/decorators.js';
|
|
4
|
+
import { html } from 'lit';
|
|
5
|
+
let OxGristEditorText = class OxGristEditorText extends OxGristEditor {
|
|
6
|
+
get editorTemplate() {
|
|
7
|
+
return html ` <input type="text" .value=${this.value} /> `;
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
OxGristEditorText = __decorate([
|
|
11
|
+
customElement('ox-grist-editor-text')
|
|
12
|
+
], OxGristEditorText);
|
|
13
|
+
export { OxGristEditorText };
|
|
14
|
+
//# sourceMappingURL=ox-grist-editor-text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ox-grist-editor-text.js","sourceRoot":"","sources":["../../../src/editors/ox-grist-editor-text.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAG1B,IAAa,iBAAiB,GAA9B,MAAa,iBAAkB,SAAQ,aAAa;IAClD,IAAI,cAAc;QAChB,OAAO,IAAI,CAAA,8BAA8B,IAAI,CAAC,KAAK,MAAM,CAAA;IAC3D,CAAC;CACF,CAAA;AAJY,iBAAiB;IAD7B,aAAa,CAAC,sBAAsB,CAAC;GACzB,iBAAiB,CAI7B;SAJY,iBAAiB","sourcesContent":["import { OxGristEditor } from './ox-grist-editor.js'\nimport { customElement } from 'lit/decorators.js'\nimport { html } from 'lit'\n\n@customElement('ox-grist-editor-text')\nexport class OxGristEditorText extends OxGristEditor {\n get editorTemplate() {\n return html` <input type=\"text\" .value=${this.value} /> `\n }\n}\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { OxGristEditor } from './ox-grist-editor.js';
|
|
3
|
+
import { customElement } from 'lit/decorators.js';
|
|
4
|
+
import { html } from 'lit';
|
|
5
|
+
let OxGristEditorTime = class OxGristEditorTime extends OxGristEditor {
|
|
6
|
+
get editorTemplate() {
|
|
7
|
+
return html ` <input type="time" .value=${this.value} /> `;
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
OxGristEditorTime = __decorate([
|
|
11
|
+
customElement('ox-grist-editor-time')
|
|
12
|
+
], OxGristEditorTime);
|
|
13
|
+
export { OxGristEditorTime };
|
|
14
|
+
//# sourceMappingURL=ox-grist-editor-time.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ox-grist-editor-time.js","sourceRoot":"","sources":["../../../src/editors/ox-grist-editor-time.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAG1B,IAAa,iBAAiB,GAA9B,MAAa,iBAAkB,SAAQ,aAAa;IAClD,IAAI,cAAc;QAChB,OAAO,IAAI,CAAA,8BAA8B,IAAI,CAAC,KAAK,MAAM,CAAA;IAC3D,CAAC;CACF,CAAA;AAJY,iBAAiB;IAD7B,aAAa,CAAC,sBAAsB,CAAC;GACzB,iBAAiB,CAI7B;SAJY,iBAAiB","sourcesContent":["import { OxGristEditor } from './ox-grist-editor.js'\nimport { customElement } from 'lit/decorators.js'\nimport { html } from 'lit'\n\n@customElement('ox-grist-editor-time')\nexport class OxGristEditorTime extends OxGristEditor {\n get editorTemplate() {\n return html` <input type=\"time\" .value=${this.value} /> `\n }\n}\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { OxGristEditor } from './ox-grist-editor.js';
|
|
3
|
+
import { customElement } from 'lit/decorators.js';
|
|
4
|
+
import { html } from 'lit';
|
|
5
|
+
let OxGristEditorWeek = class OxGristEditorWeek extends OxGristEditor {
|
|
6
|
+
get editorTemplate() {
|
|
7
|
+
return html ` <input type="week" .value=${this.value} /> `;
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
OxGristEditorWeek = __decorate([
|
|
11
|
+
customElement('ox-grist-editor-week')
|
|
12
|
+
], OxGristEditorWeek);
|
|
13
|
+
export { OxGristEditorWeek };
|
|
14
|
+
//# sourceMappingURL=ox-grist-editor-week.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ox-grist-editor-week.js","sourceRoot":"","sources":["../../../src/editors/ox-grist-editor-week.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAG1B,IAAa,iBAAiB,GAA9B,MAAa,iBAAkB,SAAQ,aAAa;IAClD,IAAI,cAAc;QAChB,OAAO,IAAI,CAAA,8BAA8B,IAAI,CAAC,KAAK,MAAM,CAAA;IAC3D,CAAC;CACF,CAAA;AAJY,iBAAiB;IAD7B,aAAa,CAAC,sBAAsB,CAAC;GACzB,iBAAiB,CAI7B;SAJY,iBAAiB","sourcesContent":["import { OxGristEditor } from './ox-grist-editor.js'\nimport { customElement } from 'lit/decorators.js'\nimport { html } from 'lit'\n\n@customElement('ox-grist-editor-week')\nexport class OxGristEditorWeek extends OxGristEditor {\n get editorTemplate() {\n return html` <input type=\"week\" .value=${this.value} /> `\n }\n}\n"]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ColumnConfig, GristRecord } from '../types';
|
|
2
|
+
import { LitElement } from 'lit';
|
|
3
|
+
import { DataGridField } from '../data-grid/data-grid-field';
|
|
4
|
+
export declare class OxGristEditor extends LitElement {
|
|
5
|
+
static styles: import("lit").CSSResult;
|
|
6
|
+
value?: any;
|
|
7
|
+
column: ColumnConfig;
|
|
8
|
+
record: GristRecord;
|
|
9
|
+
rowIndex?: number;
|
|
10
|
+
field?: DataGridField;
|
|
11
|
+
row?: number;
|
|
12
|
+
protected _dirtyValue?: any;
|
|
13
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
14
|
+
get editor(): HTMLElement | null;
|
|
15
|
+
firstUpdated(): Promise<void>;
|
|
16
|
+
select(): void;
|
|
17
|
+
focus(): void;
|
|
18
|
+
formatForEditor(value: any): any;
|
|
19
|
+
formatFromEditor(e: Event): any;
|
|
20
|
+
_onfocusout(): void;
|
|
21
|
+
_onchange(e: Event): void;
|
|
22
|
+
_onclick(e: Event): void;
|
|
23
|
+
_ondblclick(e: Event): void;
|
|
24
|
+
get editorTemplate(): import("lit-html").TemplateResult<1>;
|
|
25
|
+
}
|