@operato/grist-editor 2.0.0-alpha.64 → 2.0.0-alpha.68
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 +9 -0
- package/dist/src/ox-grist-editor-partition-keys.js +1 -1
- package/dist/src/ox-grist-editor-partition-keys.js.map +1 -1
- package/dist/src/ox-grist-renderer-partition-keys.d.ts +1 -1
- package/dist/src/ox-grist-renderer-partition-keys.js +4 -4
- package/dist/src/ox-grist-renderer-partition-keys.js.map +1 -1
- package/dist/src/ox-popup-crontab-input.d.ts +1 -0
- package/dist/src/ox-popup-crontab-input.js +3 -2
- package/dist/src/ox-popup-crontab-input.js.map +1 -1
- package/dist/src/ox-popup-duration-input.d.ts +1 -0
- package/dist/src/ox-popup-duration-input.js +3 -2
- package/dist/src/ox-popup-duration-input.js.map +1 -1
- package/dist/src/ox-popup-hashtags-input.d.ts +1 -0
- package/dist/src/ox-popup-hashtags-input.js +3 -2
- package/dist/src/ox-popup-hashtags-input.js.map +1 -1
- package/dist/src/ox-popup-i18n-label-input.d.ts +1 -0
- package/dist/src/ox-popup-i18n-label-input.js +3 -2
- package/dist/src/ox-popup-i18n-label-input.js.map +1 -1
- package/dist/src/ox-popup-parameters-builder.d.ts +1 -0
- package/dist/src/ox-popup-parameters-builder.js +3 -2
- package/dist/src/ox-popup-parameters-builder.js.map +1 -1
- package/dist/src/ox-popup-partition-keys-input.d.ts +1 -0
- package/dist/src/ox-popup-partition-keys-input.js +3 -2
- package/dist/src/ox-popup-partition-keys-input.js.map +1 -1
- package/dist/src/ox-popup-value-map-input.d.ts +1 -0
- package/dist/src/ox-popup-value-map-input.js +3 -2
- package/dist/src/ox-popup-value-map-input.js.map +1 -1
- package/dist/src/ox-popup-value-ranges-input.d.ts +1 -0
- package/dist/src/ox-popup-value-ranges-input.js +3 -2
- package/dist/src/ox-popup-value-ranges-input.js.map +1 -1
- package/dist/stories/ox-grist-editor-crontab.stories.d.ts +1 -1
- package/dist/stories/ox-grist-editor-crontab.stories.js +66 -54
- package/dist/stories/ox-grist-editor-crontab.stories.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -13
- package/src/ox-grist-editor-partition-keys.ts +1 -1
- package/src/ox-grist-renderer-partition-keys.ts +4 -4
- package/src/ox-popup-crontab-input.ts +3 -2
- package/src/ox-popup-duration-input.ts +3 -2
- package/src/ox-popup-hashtags-input.ts +3 -2
- package/src/ox-popup-i18n-label-input.ts +3 -2
- package/src/ox-popup-parameters-builder.ts +3 -2
- package/src/ox-popup-partition-keys-input.ts +3 -2
- package/src/ox-popup-value-map-input.ts +4 -2
- package/src/ox-popup-value-ranges-input.ts +3 -2
- package/stories/ox-grist-editor-crontab.stories.ts +71 -60
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@operato/grist-editor",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.68",
|
|
4
4
|
"description": "Webcomponent for grist-editor following open-wc recommendations",
|
|
5
5
|
"author": "heartyoh",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -95,16 +95,14 @@
|
|
|
95
95
|
"storybook:build": "tsc && npm run analyze -- --exclude dist && build-storybook"
|
|
96
96
|
},
|
|
97
97
|
"dependencies": {
|
|
98
|
-
"@material/
|
|
99
|
-
"@
|
|
100
|
-
"@
|
|
101
|
-
"@operato/data-grist": "^2.0.0-alpha.64",
|
|
102
|
-
"@operato/help": "^2.0.0-alpha.64",
|
|
98
|
+
"@material/web": "^1.4.0",
|
|
99
|
+
"@operato/data-grist": "^2.0.0-alpha.68",
|
|
100
|
+
"@operato/help": "^2.0.0-alpha.68",
|
|
103
101
|
"@operato/i18n": "^2.0.0-alpha.59",
|
|
104
|
-
"@operato/input": "^2.0.0-alpha.
|
|
105
|
-
"@operato/popup": "^2.0.0-alpha.
|
|
106
|
-
"@operato/property-editor": "^2.0.0-alpha.
|
|
107
|
-
"@operato/styles": "^2.0.0-alpha.
|
|
102
|
+
"@operato/input": "^2.0.0-alpha.68",
|
|
103
|
+
"@operato/popup": "^2.0.0-alpha.68",
|
|
104
|
+
"@operato/property-editor": "^2.0.0-alpha.68",
|
|
105
|
+
"@operato/styles": "^2.0.0-alpha.68",
|
|
108
106
|
"cronstrue": "^2.2.0",
|
|
109
107
|
"cross-fetch": "^3.1.5",
|
|
110
108
|
"lit": "^3.1.2",
|
|
@@ -113,8 +111,6 @@
|
|
|
113
111
|
"devDependencies": {
|
|
114
112
|
"@custom-elements-manifest/analyzer": "^0.9.2",
|
|
115
113
|
"@hatiolab/prettier-config": "^1.0.0",
|
|
116
|
-
"@material/mwc-fab": "^0.27.0",
|
|
117
|
-
"@material/mwc-icon": "^0.27.0",
|
|
118
114
|
"@open-wc/eslint-config": "^12.0.3",
|
|
119
115
|
"@open-wc/testing": "^3.1.6",
|
|
120
116
|
"@types/lodash-es": "^4.17.5",
|
|
@@ -146,5 +142,5 @@
|
|
|
146
142
|
"prettier --write"
|
|
147
143
|
]
|
|
148
144
|
},
|
|
149
|
-
"gitHead": "
|
|
145
|
+
"gitHead": "147f2ca9e09180c6851dccacf340fc660e7548ab"
|
|
150
146
|
}
|
|
@@ -18,7 +18,7 @@ export class OxGristEditorPartitionKeys extends OxGristEditor {
|
|
|
18
18
|
|
|
19
19
|
get editorTemplate() {
|
|
20
20
|
return this.value && this.value instanceof Array && this.value.length > 0
|
|
21
|
-
? html`<
|
|
21
|
+
? html`<md-icon style="--md-icon-size:1.3em">key</md-icon>`
|
|
22
22
|
: html``
|
|
23
23
|
}
|
|
24
24
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '@material/
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
2
2
|
import { html } from 'lit'
|
|
3
3
|
import { FieldRenderer } from '@operato/data-grist'
|
|
4
4
|
|
|
@@ -15,11 +15,11 @@ function onmouseout(e: MouseEvent) {
|
|
|
15
15
|
|
|
16
16
|
export const OxGristRendererPartitionKeys: FieldRenderer = (value, column, record, rowIndex, field) => {
|
|
17
17
|
return value && value instanceof Array && value.length > 0
|
|
18
|
-
? html`<
|
|
19
|
-
style="--
|
|
18
|
+
? html`<md-icon
|
|
19
|
+
style="--md-icon-size:1.3em"
|
|
20
20
|
@mouseover=${(e: MouseEvent) => onmouseover(e, value)}
|
|
21
21
|
@mouseout=${onmouseout}
|
|
22
|
-
>key</
|
|
22
|
+
>key</md-icon
|
|
23
23
|
>`
|
|
24
24
|
: html``
|
|
25
25
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import '@material/web/button/elevated-button.js'
|
|
1
2
|
import '@operato/input/ox-input-crontab.js'
|
|
2
3
|
|
|
3
4
|
import { css, html, LitElement } from 'lit'
|
|
@@ -52,8 +53,8 @@ export class OxPopupCrontabInput extends LitElement {
|
|
|
52
53
|
<ox-input-crontab .value=${this.value} @change=${this.onChange.bind(this)}> </ox-input-crontab>
|
|
53
54
|
|
|
54
55
|
<div class="button-container">
|
|
55
|
-
<
|
|
56
|
-
<
|
|
56
|
+
<md-elevated-button @click=${this.onCancel.bind(this)}>${i18next.t('button.cancel')}</md-elevated-button>
|
|
57
|
+
<md-elevated-button @click=${this.onConfirm.bind(this)}>${i18next.t('button.confirm')}</md-elevated-button>
|
|
57
58
|
</div>
|
|
58
59
|
`
|
|
59
60
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import '@material/web/button/elevated-button.js'
|
|
1
2
|
import '@operato/input/ox-input-duration.js'
|
|
2
3
|
|
|
3
4
|
import { css, html, LitElement } from 'lit'
|
|
@@ -42,8 +43,8 @@ export class OxPopupDurationInput extends LitElement {
|
|
|
42
43
|
<ox-input-duration .value=${this.value} @change=${this.onChange.bind(this)}> </ox-input-duration>
|
|
43
44
|
|
|
44
45
|
<div class="button-container">
|
|
45
|
-
<
|
|
46
|
-
<
|
|
46
|
+
<md-elevated-button @click=${this.onCancel.bind(this)}>${i18next.t('button.cancel')}</md-elevated-button>
|
|
47
|
+
<md-elevated-button @click=${this.onConfirm.bind(this)}>${i18next.t('button.confirm')}</md-elevated-button>
|
|
47
48
|
</div>
|
|
48
49
|
`
|
|
49
50
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import '@material/web/button/elevated-button.js'
|
|
1
2
|
import '@operato/input/ox-input-hashtags.js'
|
|
2
3
|
|
|
3
4
|
import { css, html, LitElement } from 'lit'
|
|
@@ -42,8 +43,8 @@ export class OxPopupHashtagsInput extends LitElement {
|
|
|
42
43
|
<ox-input-hashtags .value=${this.value} @change=${this.onChange.bind(this)}> </ox-input-hashtags>
|
|
43
44
|
|
|
44
45
|
<div class="button-container">
|
|
45
|
-
<
|
|
46
|
-
<
|
|
46
|
+
<md-elevated-button @click=${this.onCancel.bind(this)}>${i18next.t('button.cancel')}</md-elevated-button>
|
|
47
|
+
<md-elevated-button @click=${this.onConfirm.bind(this)}>${i18next.t('button.confirm')}</md-elevated-button>
|
|
47
48
|
</div>
|
|
48
49
|
`
|
|
49
50
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import '@material/web/button/elevated-button.js'
|
|
1
2
|
import '@operato/input/ox-input-i18n-label.js'
|
|
2
3
|
|
|
3
4
|
import { css, html, LitElement } from 'lit'
|
|
@@ -55,8 +56,8 @@ export class OxPopupValueMapInput extends LitElement {
|
|
|
55
56
|
</ox-input-i18n-label>
|
|
56
57
|
|
|
57
58
|
<div class="button-container">
|
|
58
|
-
<
|
|
59
|
-
<
|
|
59
|
+
<md-elevated-button @click=${this.onCancel.bind(this)}>${i18next.t('button.cancel')}</md-elevated-button>
|
|
60
|
+
<md-elevated-button @click=${this.onConfirm.bind(this)}>${i18next.t('button.confirm')}</md-elevated-button>
|
|
60
61
|
</div>
|
|
61
62
|
`
|
|
62
63
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import '@material/web/button/elevated-button.js'
|
|
1
2
|
import '@operato/i18n/ox-i18n.js'
|
|
2
3
|
|
|
3
4
|
import { css, html, LitElement } from 'lit'
|
|
@@ -68,8 +69,8 @@ export class OxPopupParametersBuilder extends LitElement {
|
|
|
68
69
|
: html` <span><ox-i18n msgid="text.no properties to set"></ox-i18n></span> `}
|
|
69
70
|
|
|
70
71
|
<div class="button-container">
|
|
71
|
-
<
|
|
72
|
-
<
|
|
72
|
+
<md-elevated-button @click=${this.onCancel.bind(this)}>${i18next.t('button.cancel')}</md-elevated-button>
|
|
73
|
+
<md-elevated-button @click=${this.onConfirm.bind(this)}>${i18next.t('button.confirm')}</md-elevated-button>
|
|
73
74
|
</div>
|
|
74
75
|
`
|
|
75
76
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import '@material/web/button/elevated-button.js'
|
|
1
2
|
import '@operato/input/ox-input-partition-keys.js'
|
|
2
3
|
|
|
3
4
|
import { css, html, LitElement } from 'lit'
|
|
@@ -54,8 +55,8 @@ export class OxPopupPartitionKeysInput extends LitElement {
|
|
|
54
55
|
<ox-input-partition-keys .value=${this.value} @change=${this.onChange.bind(this)}> </ox-input-partition-keys>
|
|
55
56
|
|
|
56
57
|
<div class="button-container">
|
|
57
|
-
<
|
|
58
|
-
<
|
|
58
|
+
<md-elevated-button @click=${this.onCancel.bind(this)}>${i18next.t('button.cancel')}</md-elevated-button>
|
|
59
|
+
<md-elevated-button @click=${this.onConfirm.bind(this)}>${i18next.t('button.confirm')}</md-elevated-button>
|
|
59
60
|
</div>
|
|
60
61
|
`
|
|
61
62
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import '@material/web/button/elevated-button.js'
|
|
2
|
+
|
|
1
3
|
import '@operato/input/ox-input-value-map.js'
|
|
2
4
|
|
|
3
5
|
import { css, html, LitElement } from 'lit'
|
|
@@ -61,8 +63,8 @@ export class OxPopupValueMapInput extends LitElement {
|
|
|
61
63
|
</ox-input-value-map>
|
|
62
64
|
|
|
63
65
|
<div class="button-container">
|
|
64
|
-
<
|
|
65
|
-
<
|
|
66
|
+
<md-elevated-button @click=${this.onCancel.bind(this)}>${i18next.t('button.cancel')}</md-elevated-button>
|
|
67
|
+
<md-elevated-button @click=${this.onConfirm.bind(this)}>${i18next.t('button.confirm')}</md-elevated-button>
|
|
66
68
|
</div>
|
|
67
69
|
`
|
|
68
70
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import '@material/web/button/elevated-button.js'
|
|
1
2
|
import '@operato/input/ox-input-value-ranges.js'
|
|
2
3
|
|
|
3
4
|
import { css, html, LitElement } from 'lit'
|
|
@@ -61,8 +62,8 @@ export class OxPopupValueRangesInput extends LitElement {
|
|
|
61
62
|
</ox-input-value-ranges>
|
|
62
63
|
|
|
63
64
|
<div class="button-container">
|
|
64
|
-
<
|
|
65
|
-
<
|
|
65
|
+
<md-elevated-button @click=${this.onCancel.bind(this)}>${i18next.t('button.cancel')}</md-elevated-button>
|
|
66
|
+
<md-elevated-button @click=${this.onConfirm.bind(this)}>${i18next.t('button.confirm')}</md-elevated-button>
|
|
66
67
|
</div>
|
|
67
68
|
`
|
|
68
69
|
}
|
|
@@ -6,7 +6,7 @@ import '@operato/property-editor/ox-properties-dynamic-view.js'
|
|
|
6
6
|
import '@operato/data-grist'
|
|
7
7
|
import '@operato/data-grist/ox-filters-form.js'
|
|
8
8
|
import '@operato/data-grist/ox-sorters-control.js'
|
|
9
|
-
import '@material/
|
|
9
|
+
import '@material/web/icon/icon.js'
|
|
10
10
|
|
|
11
11
|
/* set grist-editors */
|
|
12
12
|
import { css, html, LitElement, TemplateResult } from 'lit'
|
|
@@ -348,9 +348,9 @@ class GristDemo extends LitElement {
|
|
|
348
348
|
|
|
349
349
|
<div slot="headroom" id="headroom">
|
|
350
350
|
<div id="modes">
|
|
351
|
-
<
|
|
352
|
-
<
|
|
353
|
-
<
|
|
351
|
+
<md-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>view_list</md-icon>
|
|
352
|
+
<md-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>menu</md-icon>
|
|
353
|
+
<md-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</md-icon>
|
|
354
354
|
</div>
|
|
355
355
|
</div>
|
|
356
356
|
</ox-grist>
|
|
@@ -374,67 +374,78 @@ interface Story<T> {
|
|
|
374
374
|
|
|
375
375
|
interface ArgTypes {}
|
|
376
376
|
|
|
377
|
-
const Template: Story<ArgTypes> = ({}: ArgTypes) =>
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
377
|
+
const Template: Story<ArgTypes> = ({}: ArgTypes) => html`
|
|
378
|
+
<link
|
|
379
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
|
380
|
+
rel="stylesheet"
|
|
381
|
+
/>
|
|
382
|
+
<link
|
|
383
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
|
384
|
+
rel="stylesheet"
|
|
385
|
+
/>
|
|
386
|
+
<link
|
|
387
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
|
388
|
+
rel="stylesheet"
|
|
389
|
+
/>
|
|
390
|
+
|
|
391
|
+
<link href="/themes/app-theme.css" rel="stylesheet" />
|
|
392
|
+
<link href="/themes/oops-theme.css" rel="stylesheet" />
|
|
393
|
+
<link href="/themes/grist-theme.css" rel="stylesheet" />
|
|
394
|
+
|
|
395
|
+
<style>
|
|
396
|
+
[slot='headroom'] {
|
|
397
|
+
display: flex;
|
|
398
|
+
flex-direction: row;
|
|
399
|
+
align-items: center;
|
|
400
|
+
padding: var(--padding-default) var(--padding-wide);
|
|
401
|
+
background-color: var(--theme-white-color);
|
|
402
|
+
box-shadow: var(--box-shadow);
|
|
403
|
+
|
|
404
|
+
--md-icon-size: 24px;
|
|
405
|
+
}
|
|
406
|
+
#sorters md-icon,
|
|
407
|
+
#modes md-icon {
|
|
408
|
+
--md-icon-size: 18px;
|
|
409
|
+
}
|
|
410
|
+
#sorters {
|
|
411
|
+
margin-left: auto;
|
|
412
|
+
margin-right: var(--margin-default);
|
|
413
|
+
padding-left: var(--padding-narrow);
|
|
414
|
+
border-bottom: var(--border-dark-color);
|
|
415
|
+
position: relative;
|
|
416
|
+
color: var(--secondary-color);
|
|
417
|
+
font-size: var(--fontsize-default);
|
|
418
|
+
user-select: none;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
#sorters > * {
|
|
422
|
+
padding: var(--padding-narrow);
|
|
423
|
+
vertical-align: middle;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
#filters {
|
|
427
|
+
display: flex;
|
|
428
|
+
justify-content: center;
|
|
429
|
+
align-items: center;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
#filters * {
|
|
433
|
+
margin-right: var(--margin-default);
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
@media only screen and (max-width: 460px) {
|
|
415
437
|
#filters {
|
|
416
|
-
|
|
417
|
-
justify-content: center;
|
|
418
|
-
align-items: center;
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
#filters * {
|
|
422
|
-
margin-right: var(--margin-default);
|
|
438
|
+
flex-direction: column;
|
|
423
439
|
}
|
|
424
440
|
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
flex-direction: column;
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
#modes {
|
|
431
|
-
display: none;
|
|
432
|
-
}
|
|
441
|
+
#modes {
|
|
442
|
+
display: none;
|
|
433
443
|
}
|
|
434
|
-
|
|
444
|
+
}
|
|
445
|
+
</style>
|
|
435
446
|
|
|
436
|
-
|
|
437
|
-
|
|
447
|
+
<ox-grist-demo mode="LIST"></ox-grist-demo>
|
|
448
|
+
`
|
|
438
449
|
|
|
439
450
|
export const Regular = Template.bind({})
|
|
440
451
|
Regular.args = {}
|