@operato/app 1.0.0-alpha.50 → 1.0.0-alpha.53
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 +26 -0
- package/dist/src/grist-editor/ox-grist-renderer-crontab.js +11 -3
- package/dist/src/grist-editor/ox-grist-renderer-crontab.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +14 -14
- package/src/grist-editor/ox-grist-renderer-crontab.ts +13 -5
- package/yarn-error.log +0 -17112
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,32 @@
|
|
|
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
|
+
## [1.0.0-alpha.53](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.52...v1.0.0-alpha.53) (2022-04-08)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @operato/app
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [1.0.0-alpha.52](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.51...v1.0.0-alpha.52) (2022-04-08)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @operato/app
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## [1.0.0-alpha.51](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.50...v1.0.0-alpha.51) (2022-04-05)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### :bug: Bug Fix
|
|
26
|
+
|
|
27
|
+
* crontab translation ([e87b431](https://github.com/hatiolab/operato/commit/e87b43145f5d01c4b71c4498578b4b172c50ae03))
|
|
28
|
+
* export ox-grist-renderer-crontab.js ([3615720](https://github.com/hatiolab/operato/commit/3615720d119526a17272db2369bd80340b6cbc31))
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
6
32
|
## [1.0.0-alpha.50](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.49...v1.0.0-alpha.50) (2022-04-04)
|
|
7
33
|
|
|
8
34
|
**Note:** Version bump only for package @operato/app
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import cronstrue from 'cronstrue/i18n';
|
|
2
|
-
import { html } from 'lit';
|
|
3
2
|
import { detectOverflow } from '@operato/utils';
|
|
3
|
+
import { html } from 'lit';
|
|
4
|
+
import i18next from 'i18next';
|
|
4
5
|
function onmouseover(e) {
|
|
5
6
|
const element = e.target;
|
|
6
7
|
if (detectOverflow(element)) {
|
|
@@ -12,7 +13,14 @@ function onmouseout(e) {
|
|
|
12
13
|
element.removeAttribute('data-tooltip');
|
|
13
14
|
}
|
|
14
15
|
export const OxGristRendererCrontab = (value, column, record, rowIndex, field) => {
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
let text = '';
|
|
17
|
+
try {
|
|
18
|
+
const language = (i18next.language || 'en').substring(0, 2);
|
|
19
|
+
text = value === undefined ? '' : cronstrue.toString(value, { locale: language || 'en' });
|
|
20
|
+
}
|
|
21
|
+
catch (e) {
|
|
22
|
+
console.error(e);
|
|
23
|
+
}
|
|
24
|
+
return html `<span @mouseover=${onmouseover} @mouseout=${onmouseout}>${text}</span>`;
|
|
17
25
|
};
|
|
18
26
|
//# sourceMappingURL=ox-grist-renderer-crontab.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ox-grist-renderer-crontab.js","sourceRoot":"","sources":["../../../src/grist-editor/ox-grist-renderer-crontab.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ox-grist-renderer-crontab.js","sourceRoot":"","sources":["../../../src/grist-editor/ox-grist-renderer-crontab.ts"],"names":[],"mappings":"AACA,OAAO,SAAS,MAAM,gBAAgB,CAAA;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC1B,OAAO,OAAO,MAAM,SAAS,CAAA;AAE7B,SAAS,WAAW,CAAC,CAAQ;IAC3B,MAAM,OAAO,GAAG,CAAC,CAAC,MAAyB,CAAA;IAC3C,IAAI,cAAc,CAAC,OAAO,CAAC,EAAE;QAC3B,OAAO,CAAC,YAAY,CAAC,cAAc,EAAE,OAAO,CAAC,WAAY,CAAC,CAAA;KAC3D;AACH,CAAC;AAED,SAAS,UAAU,CAAC,CAAQ;IAC1B,MAAM,OAAO,GAAG,CAAC,CAAC,MAAyB,CAAA;IAC3C,OAAO,CAAC,eAAe,CAAC,cAAc,CAAC,CAAA;AACzC,CAAC;AAED,MAAM,CAAC,MAAM,sBAAsB,GAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE;IAC9F,IAAI,IAAI,GAAG,EAAE,CAAA;IAEb,IAAI;QACF,MAAM,QAAQ,GAAG,CAAC,OAAO,CAAC,QAAQ,IAAI,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;QAC3D,IAAI,GAAG,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,EAAE,MAAM,EAAE,QAAQ,IAAI,IAAI,EAAE,CAAC,CAAA;KAC1F;IAAC,OAAO,CAAC,EAAE;QACV,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;KACjB;IAED,OAAO,IAAI,CAAA,oBAAoB,WAAW,cAAc,UAAU,IAAI,IAAI,SAAS,CAAA;AACrF,CAAC,CAAA","sourcesContent":["import { FieldRenderer } from '@operato/data-grist'\nimport cronstrue from 'cronstrue/i18n'\nimport { detectOverflow } from '@operato/utils'\nimport { html } from 'lit'\nimport i18next from 'i18next'\n\nfunction onmouseover(e: Event) {\n const element = e.target as HTMLSpanElement\n if (detectOverflow(element)) {\n element.setAttribute('data-tooltip', element.textContent!)\n }\n}\n\nfunction onmouseout(e: Event) {\n const element = e.target as HTMLSpanElement\n element.removeAttribute('data-tooltip')\n}\n\nexport const OxGristRendererCrontab: FieldRenderer = (value, column, record, rowIndex, field) => {\n let text = ''\n\n try {\n const language = (i18next.language || 'en').substring(0, 2)\n text = value === undefined ? '' : cronstrue.toString(value, { locale: language || 'en' })\n } catch (e) {\n console.error(e)\n }\n\n return html`<span @mouseover=${onmouseover} @mouseout=${onmouseout}>${text}</span>`\n}\n"]}
|