@operato/grist-editor 8.0.0 → 9.0.0-beta.10

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 (43) hide show
  1. package/CHANGELOG.md +206 -25
  2. package/dist/src/index.js +2 -2
  3. package/dist/src/index.js.map +1 -1
  4. package/dist/src/ox-grist-editor-crontab.js +9 -0
  5. package/dist/src/ox-grist-editor-crontab.js.map +1 -1
  6. package/dist/src/ox-grist-editor-duration.js +9 -0
  7. package/dist/src/ox-grist-editor-duration.js.map +1 -1
  8. package/dist/src/ox-grist-editor-hashtags.js +9 -0
  9. package/dist/src/ox-grist-editor-hashtags.js.map +1 -1
  10. package/dist/src/ox-grist-editor-i18n-label.js +9 -0
  11. package/dist/src/ox-grist-editor-i18n-label.js.map +1 -1
  12. package/dist/src/ox-grist-editor-parameters.js +9 -0
  13. package/dist/src/ox-grist-editor-parameters.js.map +1 -1
  14. package/dist/src/ox-grist-editor-partition-keys.js +9 -0
  15. package/dist/src/ox-grist-editor-partition-keys.js.map +1 -1
  16. package/dist/src/ox-grist-editor-value-map.js +9 -0
  17. package/dist/src/ox-grist-editor-value-map.js.map +1 -1
  18. package/dist/src/ox-grist-editor-value-ranges.js +9 -0
  19. package/dist/src/ox-grist-editor-value-ranges.js.map +1 -1
  20. package/dist/src/ox-grist-renderer-crontab.js +1 -1
  21. package/dist/src/ox-grist-renderer-crontab.js.map +1 -1
  22. package/dist/src/ox-parameters-builder.js +27 -0
  23. package/dist/src/ox-parameters-builder.js.map +1 -1
  24. package/dist/src/ox-popup-crontab-input.js +25 -5
  25. package/dist/src/ox-popup-crontab-input.js.map +1 -1
  26. package/dist/src/ox-popup-duration-input.js +25 -5
  27. package/dist/src/ox-popup-duration-input.js.map +1 -1
  28. package/dist/src/ox-popup-hashtags-input.js +22 -6
  29. package/dist/src/ox-popup-hashtags-input.js.map +1 -1
  30. package/dist/src/ox-popup-i18n-label-input.js +28 -6
  31. package/dist/src/ox-popup-i18n-label-input.js.map +1 -1
  32. package/dist/src/ox-popup-parameters-builder.js +43 -5
  33. package/dist/src/ox-popup-parameters-builder.js.map +1 -1
  34. package/dist/src/ox-popup-partition-keys-input.js +28 -6
  35. package/dist/src/ox-popup-partition-keys-input.js.map +1 -1
  36. package/dist/src/ox-popup-value-map-input.js +34 -6
  37. package/dist/src/ox-popup-value-map-input.js.map +1 -1
  38. package/dist/src/ox-popup-value-ranges-input.js +34 -6
  39. package/dist/src/ox-popup-value-ranges-input.js.map +1 -1
  40. package/dist/stories/ox-grist-editor-crontab.stories.js +200 -185
  41. package/dist/stories/ox-grist-editor-crontab.stories.js.map +1 -1
  42. package/dist/tsconfig.tsbuildinfo +1 -1
  43. package/package.json +18 -17
@@ -103,200 +103,210 @@ const fetchHandler = async ({ page = 1, limit = 100, sortings = [], filters = []
103
103
  class GristDemo extends LitElement {
104
104
  constructor() {
105
105
  super(...arguments);
106
- this.mode = 'CARD';
107
- this.config = {
108
- list: { fields: ['name', 'description', 'active'] },
109
- columns: [
110
- { type: 'gutter', gutterName: 'row-selector', multiple: true },
111
- {
112
- type: 'gutter',
113
- gutterName: 'button',
114
- icon: 'add',
115
- handlers: {
116
- click: 'record-copy'
117
- }
118
- },
119
- { type: 'gutter', gutterName: 'sequence' },
120
- {
121
- type: 'gutter',
122
- gutterName: 'button',
123
- icon: 'arrow_upward',
124
- handlers: {
125
- click: 'move-up'
126
- }
127
- },
128
- {
129
- type: 'gutter',
130
- gutterName: 'button',
131
- icon: 'arrow_downward',
132
- handlers: {
133
- click: 'move-down'
134
- }
135
- },
136
- {
137
- type: 'number',
138
- name: 'sequence',
139
- hidden: true
140
- },
141
- {
142
- type: 'string',
143
- name: 'id',
144
- hidden: true
145
- },
146
- {
147
- type: 'string',
148
- name: 'name',
149
- header: i18next.t('field.name'),
150
- record: {
151
- editable: true
106
+ Object.defineProperty(this, "mode", {
107
+ enumerable: true,
108
+ configurable: true,
109
+ writable: true,
110
+ value: 'CARD'
111
+ });
112
+ Object.defineProperty(this, "config", {
113
+ enumerable: true,
114
+ configurable: true,
115
+ writable: true,
116
+ value: {
117
+ list: { fields: ['name', 'description', 'active'] },
118
+ columns: [
119
+ { type: 'gutter', gutterName: 'row-selector', multiple: true },
120
+ {
121
+ type: 'gutter',
122
+ gutterName: 'button',
123
+ icon: 'add',
124
+ handlers: {
125
+ click: 'record-copy'
126
+ }
152
127
  },
153
- width: 140
154
- },
155
- {
156
- type: 'string',
157
- name: 'description',
158
- header: i18next.t('field.description'),
159
- record: {
160
- editable: true
128
+ { type: 'gutter', gutterName: 'sequence' },
129
+ {
130
+ type: 'gutter',
131
+ gutterName: 'button',
132
+ icon: 'arrow_upward',
133
+ handlers: {
134
+ click: 'move-up'
135
+ }
161
136
  },
162
- width: 180
163
- },
164
- {
165
- type: 'checkbox',
166
- name: 'active',
167
- label: true,
168
- header: i18next.t('field.active'),
169
- record: {
170
- editable: true
137
+ {
138
+ type: 'gutter',
139
+ gutterName: 'button',
140
+ icon: 'arrow_downward',
141
+ handlers: {
142
+ click: 'move-down'
143
+ }
171
144
  },
172
- sortable: true,
173
- width: 60
174
- },
175
- {
176
- type: 'string',
177
- name: 'tag',
178
- header: i18next.t('field.tag'),
179
- record: {
180
- editable: true
145
+ {
146
+ type: 'number',
147
+ name: 'sequence',
148
+ hidden: true
181
149
  },
182
- width: 180
183
- },
184
- {
185
- type: 'select',
186
- name: 'type',
187
- header: i18next.t('field.type'),
188
- record: {
189
- options: ['', 'number', 'text', 'select', 'boolean', 'file'],
190
- editable: true
150
+ {
151
+ type: 'string',
152
+ name: 'id',
153
+ hidden: true
191
154
  },
192
- width: 120
193
- },
194
- {
195
- type: 'crontab',
196
- name: 'schedule',
197
- header: i18next.t('field.schedule'),
198
- record: {
199
- editable: true
155
+ {
156
+ type: 'string',
157
+ name: 'name',
158
+ header: i18next.t('field.name'),
159
+ record: {
160
+ editable: true
161
+ },
162
+ width: 140
200
163
  },
201
- width: 120
202
- },
203
- {
204
- type: 'duration',
205
- name: 'duration',
206
- header: i18next.t('field.duration'),
207
- record: {
208
- editable: true
164
+ {
165
+ type: 'string',
166
+ name: 'description',
167
+ header: i18next.t('field.description'),
168
+ record: {
169
+ editable: true
170
+ },
171
+ width: 180
209
172
  },
210
- width: 120
211
- },
212
- {
213
- type: 'partition-keys',
214
- name: 'keyvalue',
215
- header: i18next.t('field.keyvalue'),
216
- record: {
217
- editable: true,
218
- options: {
219
- objectified: true,
220
- valuetype: 'string'
221
- }
173
+ {
174
+ type: 'checkbox',
175
+ name: 'active',
176
+ label: true,
177
+ header: i18next.t('field.active'),
178
+ record: {
179
+ editable: true
180
+ },
181
+ sortable: true,
182
+ width: 60
222
183
  },
223
- width: 120
224
- },
225
- {
226
- type: 'parameters',
227
- name: 'options',
228
- header: i18next.t('field.options'),
229
- record: {
230
- editable: true,
231
- renderer: (value) => {
232
- return typeof value === 'string' ? value : typeof value === 'object' ? JSON.stringify(value) : '';
184
+ {
185
+ type: 'string',
186
+ name: 'tag',
187
+ header: i18next.t('field.tag'),
188
+ record: {
189
+ editable: true
233
190
  },
234
- options: async (value, column, record, row, field) => {
235
- return {
236
- name: record.type,
237
- help: '',
238
- spec: record.type === 'select'
239
- ? [
240
- {
241
- type: 'options',
242
- name: 'options',
243
- label: 'options'
244
- }
245
- ]
246
- : [],
247
- context: this.grist,
248
- objectified: true /* tell parameters editor not to need to parse */
249
- };
250
- }
191
+ width: 180
251
192
  },
252
- width: 120
253
- },
254
- {
255
- type: 'string',
256
- name: 'unit',
257
- header: i18next.t('field.unit'),
258
- record: {
259
- editable: true
193
+ {
194
+ type: 'select',
195
+ name: 'type',
196
+ header: i18next.t('field.type'),
197
+ record: {
198
+ options: ['', 'number', 'text', 'select', 'boolean', 'file'],
199
+ editable: true
200
+ },
201
+ width: 120
260
202
  },
261
- width: 120
262
- },
263
- {
264
- type: 'number',
265
- name: 'quota',
266
- header: i18next.t('field.quota'),
267
- record: {
268
- editable: true
203
+ {
204
+ type: 'crontab',
205
+ name: 'schedule',
206
+ header: i18next.t('field.schedule'),
207
+ record: {
208
+ editable: true
209
+ },
210
+ width: 120
269
211
  },
270
- width: 60
271
- },
272
- {
273
- type: 'crontab',
274
- name: 'spec',
275
- header: i18next.t('field.spec'),
276
- record: {
277
- editable: true,
278
- options: {
279
- name,
280
- objectified: true
281
- }
212
+ {
213
+ type: 'duration',
214
+ name: 'duration',
215
+ header: i18next.t('field.duration'),
216
+ record: {
217
+ editable: true
218
+ },
219
+ width: 120
220
+ },
221
+ {
222
+ type: 'partition-keys',
223
+ name: 'keyvalue',
224
+ header: i18next.t('field.keyvalue'),
225
+ record: {
226
+ editable: true,
227
+ options: {
228
+ objectified: true,
229
+ valuetype: 'string'
230
+ }
231
+ },
232
+ width: 120
233
+ },
234
+ {
235
+ type: 'parameters',
236
+ name: 'options',
237
+ header: i18next.t('field.options'),
238
+ record: {
239
+ editable: true,
240
+ renderer: (value) => {
241
+ return typeof value === 'string' ? value : typeof value === 'object' ? JSON.stringify(value) : '';
242
+ },
243
+ options: async (value, column, record, row, field) => {
244
+ return {
245
+ name: record.type,
246
+ help: '',
247
+ spec: record.type === 'select'
248
+ ? [
249
+ {
250
+ type: 'options',
251
+ name: 'options',
252
+ label: 'options'
253
+ }
254
+ ]
255
+ : [],
256
+ context: this.grist,
257
+ objectified: true /* tell parameters editor not to need to parse */
258
+ };
259
+ }
260
+ },
261
+ width: 120
282
262
  },
283
- width: 200
284
- }
285
- ],
286
- rows: {
287
- selectable: {
288
- multiple: true
289
- }
290
- },
291
- pagination: {
292
- infinite: true
293
- },
294
- sorters: [
295
- {
296
- name: 'sequence'
297
- }
298
- ]
299
- };
263
+ {
264
+ type: 'string',
265
+ name: 'unit',
266
+ header: i18next.t('field.unit'),
267
+ record: {
268
+ editable: true
269
+ },
270
+ width: 120
271
+ },
272
+ {
273
+ type: 'number',
274
+ name: 'quota',
275
+ header: i18next.t('field.quota'),
276
+ record: {
277
+ editable: true
278
+ },
279
+ width: 60
280
+ },
281
+ {
282
+ type: 'crontab',
283
+ name: 'spec',
284
+ header: i18next.t('field.spec'),
285
+ record: {
286
+ editable: true,
287
+ options: {
288
+ name,
289
+ objectified: true
290
+ }
291
+ },
292
+ width: 200
293
+ }
294
+ ],
295
+ rows: {
296
+ selectable: {
297
+ multiple: true
298
+ }
299
+ },
300
+ pagination: {
301
+ infinite: true
302
+ },
303
+ sorters: [
304
+ {
305
+ name: 'sequence'
306
+ }
307
+ ]
308
+ }
309
+ });
300
310
  }
301
311
  get grist() {
302
312
  return this.renderRoot.querySelector('ox-grist');
@@ -320,9 +330,13 @@ class GristDemo extends LitElement {
320
330
  `;
321
331
  }
322
332
  }
323
- GristDemo.styles = [
324
- CommonGristStyles,
325
- css `
333
+ Object.defineProperty(GristDemo, "styles", {
334
+ enumerable: true,
335
+ configurable: true,
336
+ writable: true,
337
+ value: [
338
+ CommonGristStyles,
339
+ css `
326
340
  :host {
327
341
  display: flex;
328
342
  flex-direction: column;
@@ -342,7 +356,8 @@ GristDemo.styles = [
342
356
  color: var(--md-sys-color-on-primary-container);
343
357
  }
344
358
  `
345
- ];
359
+ ]
360
+ });
346
361
  __decorate([
347
362
  state()
348
363
  ], GristDemo.prototype, "mode", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"ox-grist-editor-crontab.stories.js","sourceRoot":"","sources":["../../stories/ox-grist-editor-crontab.stories.ts"],"names":[],"mappings":";AAAA,OAAO,yDAAyD,CAAA;AAChE,OAAO,uDAAuD,CAAA;AAC9D,OAAO,uDAAuD,CAAA;AAC9D,OAAO,wDAAwD,CAAA;AAC/D,OAAO,wDAAwD,CAAA;AAC/D,OAAO,qBAAqB,CAAA;AAC5B,OAAO,wCAAwC,CAAA;AAC/C,OAAO,2CAA2C,CAAA;AAClD,OAAO,4BAA4B,CAAA;AAEnC,uBAAuB;AACvB,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAkB,MAAM,KAAK,CAAA;AAC3D,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuEvD,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG,EAAE,CAAA","sourcesContent":["import '@operato/property-editor/ox-property-editor-checkbox.js'\nimport '@operato/property-editor/ox-property-editor-number.js'\nimport '@operato/property-editor/ox-property-editor-string.js'\nimport '@operato/property-editor/ox-property-editor-options.js'\nimport '@operato/property-editor/ox-properties-dynamic-view.js'\nimport '@operato/data-grist'\nimport '@operato/data-grist/ox-filters-form.js'\nimport '@operato/data-grist/ox-sorters-control.js'\nimport '@material/web/icon/icon.js'\n\n/* set grist-editors */\nimport { css, html, LitElement, TemplateResult } from 'lit'\nimport { state } from 'lit/decorators.js'\n\nimport { FetchOption, GristRecord, OxGristRendererJson5, registerEditor, registerRenderer } from '@operato/data-grist'\nimport { i18next } from '@operato/i18n'\nimport { OxPropertyEditor } from '@operato/property-editor'\nimport { CommonGristStyles } from '@operato/styles'\n\nimport { OxGristEditorCrontab } from '../src/ox-grist-editor-crontab.js'\nimport { OxGristEditorDuration } from '../src/ox-grist-editor-duration.js'\nimport { OxGristEditorParameters } from '../src/ox-grist-editor-parameters.js'\nimport { OxGristEditorPartitionKeys } from '../src/ox-grist-editor-partition-keys.js'\n// import { OxGristRendererCrontab } from '../src/ox-grist-renderer-crontab.js'\nimport { OxGristEditorValueMap } from '../src/ox-grist-editor-value-map.js'\nimport { OxGristRendererDuration } from '../src/ox-grist-renderer-duration.js'\n\n// import { OxGristEditorJson } from './ox-grist-editor-json.js'\n// import { OxGristRendererCrontab } from '../src/ox-grist-renderer-crontab.js'\n\nOxPropertyEditor.register({\n number: 'ox-property-editor-number',\n string: 'ox-property-editor-string',\n boolean: 'ox-property-editor-checkbox',\n options: 'ox-property-editor-options'\n})\n\nregisterEditor('parameters', OxGristEditorParameters)\nregisterEditor('crontab', OxGristEditorCrontab)\nregisterEditor('value-map', OxGristEditorValueMap)\nregisterEditor('partition-keys', OxGristEditorPartitionKeys)\n\n/* register grist renderer/editor for id */\n// registerEditor('resource-id', OxGristEditorResourceId)\n// registerEditor('resource-object', OxGristEditorResourceObject)\n// registerEditor('resource-code', OxGristEditorResourceCode)\nregisterEditor('parameters', OxGristEditorParameters)\nregisterEditor('value-map', OxGristEditorValueMap)\nregisterEditor('partition-keys', OxGristEditorPartitionKeys)\nregisterEditor('crontab', OxGristEditorCrontab)\nregisterEditor('duration', OxGristEditorDuration)\n// registerEditor('json', OxGristEditorJson)\n\n// registerRenderer('resource-id', OxGristRendererResourceId)\n// registerRenderer('resource-object', OxGristRendererResourceObject)\nregisterRenderer('parameters', OxGristRendererJson5)\nregisterRenderer('value-map', OxGristRendererJson5)\nregisterRenderer('partition-keys', OxGristRendererJson5)\nregisterRenderer('duration', OxGristRendererDuration)\n// registerRenderer('crontab', OxGristRendererCrontab)\n\nconst fetchHandler = async ({ page = 1, limit = 100, sortings = [], filters = [] }: FetchOption) => {\n var total = 10\n var start = (page - 1) * limit\n\n return {\n total,\n records: Array(limit * page > total ? total % limit : limit)\n .fill('')\n .map((item, idx) => {\n return {\n id: idx,\n name: `name-${start + idx + 1}`,\n description: `description-${start + idx + 1}`,\n sequence: idx + 1,\n active: true,\n tag: `tag-${idx + 1}`,\n type: idx % 3 === 0 ? 'select' : idx % 3 === 1 ? 'number' : 'string',\n spec: {\n ccp: {\n criticalLimits: 100,\n targetLimits: 200\n },\n qc: {\n criticalLimits: 300,\n targetLimits: true\n }\n },\n options:\n idx % 2 === 0\n ? {\n options: [\n {\n text: 'A',\n value: 'a'\n },\n {\n text: 'B',\n value: 'b'\n }\n ]\n }\n : undefined,\n schedule: '* * * * * *',\n duration: -3600,\n keyvalue: {},\n createdAt: Date.now(),\n updatedAt: Date.now()\n }\n })\n }\n}\n\nclass GristDemo extends LitElement {\n static styles = [\n CommonGristStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n }\n\n #tailer {\n display: flex;\n flex-direction: row;\n margin: 0 var(--spacing-medium);\n }\n\n #tailer a {\n padding: 0 var(--padding-default) 0 var(--padding-default);\n margin: 0 var(--spacing-small);\n border-right: 1px solid rgba(0, 0, 0, 0.1);\n font-size: var(--fontsize-default);\n color: var(--md-sys-color-on-primary-container);\n }\n `\n ]\n\n @state() mode: String = 'CARD'\n\n get grist() {\n return this.renderRoot.querySelector('ox-grist')\n }\n\n config: any = {\n list: { fields: ['name', 'description', 'active'] },\n columns: [\n { type: 'gutter', gutterName: 'row-selector', multiple: true },\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'add',\n handlers: {\n click: 'record-copy'\n }\n },\n { type: 'gutter', gutterName: 'sequence' },\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'arrow_upward',\n handlers: {\n click: 'move-up'\n }\n },\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'arrow_downward',\n handlers: {\n click: 'move-down'\n }\n },\n {\n type: 'number',\n name: 'sequence',\n hidden: true\n },\n {\n type: 'string',\n name: 'id',\n hidden: true\n },\n {\n type: 'string',\n name: 'name',\n header: i18next.t('field.name'),\n record: {\n editable: true\n },\n width: 140\n },\n {\n type: 'string',\n name: 'description',\n header: i18next.t('field.description'),\n record: {\n editable: true\n },\n width: 180\n },\n {\n type: 'checkbox',\n name: 'active',\n label: true,\n header: i18next.t('field.active'),\n record: {\n editable: true\n },\n sortable: true,\n width: 60\n },\n {\n type: 'string',\n name: 'tag',\n header: i18next.t('field.tag'),\n record: {\n editable: true\n },\n width: 180\n },\n {\n type: 'select',\n name: 'type',\n header: i18next.t('field.type'),\n record: {\n options: ['', 'number', 'text', 'select', 'boolean', 'file'],\n editable: true\n },\n width: 120\n },\n {\n type: 'crontab',\n name: 'schedule',\n header: i18next.t('field.schedule'),\n record: {\n editable: true\n },\n width: 120\n },\n {\n type: 'duration',\n name: 'duration',\n header: i18next.t('field.duration'),\n record: {\n editable: true\n },\n width: 120\n },\n {\n type: 'partition-keys',\n name: 'keyvalue',\n header: i18next.t('field.keyvalue'),\n record: {\n editable: true,\n options: {\n objectified: true,\n valuetype: 'string'\n }\n },\n width: 120\n },\n {\n type: 'parameters',\n name: 'options',\n header: i18next.t('field.options'),\n record: {\n editable: true,\n renderer: (value: any) => {\n return typeof value === 'string' ? value : typeof value === 'object' ? JSON.stringify(value) : ''\n },\n options: async (value: any, column: any, record: GristRecord, row: GristRecord, field: any) => {\n return {\n name: record.type,\n help: '',\n spec:\n record.type === 'select'\n ? [\n {\n type: 'options',\n name: 'options',\n label: 'options'\n }\n ]\n : [],\n context: this.grist,\n objectified: true /* tell parameters editor not to need to parse */\n }\n }\n },\n width: 120\n },\n {\n type: 'string',\n name: 'unit',\n header: i18next.t('field.unit'),\n record: {\n editable: true\n },\n width: 120\n },\n {\n type: 'number',\n name: 'quota',\n header: i18next.t('field.quota'),\n record: {\n editable: true\n },\n width: 60\n },\n {\n type: 'crontab',\n name: 'spec',\n header: i18next.t('field.spec'),\n record: {\n editable: true,\n options: {\n name,\n objectified: true\n }\n },\n width: 200\n }\n ],\n rows: {\n selectable: {\n multiple: true\n }\n },\n pagination: {\n infinite: true\n },\n sorters: [\n {\n name: 'sequence'\n }\n ]\n }\n\n render() {\n const mode = this.mode || 'CARD'\n\n return html`\n <ox-grist .config=${this.config} .mode=${mode} auto-fetch .fetchHandler=${fetchHandler}>\n <div id=\"filters\" slot=\"headroom\">\n <ox-filters-form @filters-change=${(e: CustomEvent) => console.log('changed', e.detail)}></ox-filters-form>\n </div>\n\n <div slot=\"headroom\" id=\"headroom\">\n <div id=\"modes\">\n <md-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>view_list</md-icon>\n <md-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>menu</md-icon>\n <md-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</md-icon>\n </div>\n </div>\n </ox-grist>\n `\n }\n}\n\ncustomElements.define('ox-grist-demo', GristDemo)\n\nexport default {\n title: 'ox-grist-editor-crontab',\n component: 'ox-grist-editor-crontab',\n argTypes: {}\n}\n\ninterface Story<T> {\n (args: T): TemplateResult\n args?: Partial<T>\n argTypes?: Record<string, unknown>\n}\n\ninterface ArgTypes {}\n\nconst Template: Story<ArgTypes> = ({}: ArgTypes) => html`\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n\n <link href=\"/themes/app-theme.css\" rel=\"stylesheet\" />\n <link href=\"/themes/oops-theme.css\" rel=\"stylesheet\" />\n <link href=\"/themes/grist-theme.css\" rel=\"stylesheet\" />\n\n <style>\n [slot='headroom'] {\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: var(--padding-default) var(--spacing-large);\n background-color: var(--md-sys-color-surface);\n box-shadow: var(--box-shadow);\n\n --md-icon-size: 24px;\n }\n #sorters md-icon,\n #modes md-icon {\n --md-icon-size: 18px;\n }\n #sorters {\n margin-left: auto;\n margin-right: var(--spacing-medium);\n padding-left: var(--spacing-small);\n border-bottom: var(--border-dim-color);\n position: relative;\n color: var(--md-sys-color-on-secondary-container);\n font-size: var(--fontsize-default);\n user-select: none;\n }\n\n #sorters > * {\n padding: var(--spacing-small);\n vertical-align: middle;\n }\n\n #filters {\n display: flex;\n justify-content: center;\n align-items: center;\n }\n\n #filters * {\n margin-right: var(--spacing-medium);\n }\n\n @media only screen and (max-width: 460px) {\n #filters {\n flex-direction: column;\n }\n\n #modes {\n display: none;\n }\n }\n </style>\n\n <ox-grist-demo mode=\"LIST\"></ox-grist-demo>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {}\n"]}
1
+ {"version":3,"file":"ox-grist-editor-crontab.stories.js","sourceRoot":"","sources":["../../stories/ox-grist-editor-crontab.stories.ts"],"names":[],"mappings":";AAAA,OAAO,yDAAyD,CAAA;AAChE,OAAO,uDAAuD,CAAA;AAC9D,OAAO,uDAAuD,CAAA;AAC9D,OAAO,wDAAwD,CAAA;AAC/D,OAAO,wDAAwD,CAAA;AAC/D,OAAO,qBAAqB,CAAA;AAC5B,OAAO,wCAAwC,CAAA;AAC/C,OAAO,2CAA2C,CAAA;AAClD,OAAO,4BAA4B,CAAA;AAEnC,uBAAuB;AACvB,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAkB,MAAM,KAAK,CAAA;AAC3D,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAEzC,OAAO,EAA4B,oBAAoB,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACtH,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAEnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAA;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAA;AAC1E,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAA;AAC9E,OAAO,EAAE,0BAA0B,EAAE,MAAM,0CAA0C,CAAA;AACrF,+EAA+E;AAC/E,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAA;AAC3E,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAA;AAE9E,gEAAgE;AAChE,+EAA+E;AAE/E,gBAAgB,CAAC,QAAQ,CAAC;IACxB,MAAM,EAAE,2BAA2B;IACnC,MAAM,EAAE,2BAA2B;IACnC,OAA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,MAAM,CAAC,YAAY,IAAI,IAAI,MAAM;8BACpD,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,YAAY,IAAI,IAAI,MAAM;;;;KAI7E,CAAA;IACH,CAAC;;AAnPM;;;;WAAS;QACd,iBAAiB;QACjB,GAAG,CAAA;;;;;;;;;;;;;;;;;;;KAmBF;KACF;EAtBY,CAsBZ;AAEQ;IAAR,KAAK,EAAE;uCAAsB;AA8NhC,cAAc,CAAC,MAAM,CAAC,eAAe,EAAE,SAAS,CAAC,CAAA;AAEjD,eAAe;IACb,KAAK,EAAE,yBAAyB;IAChC,SAAS,EAAE,yBAAyB;IACpC,QAAQ,EAAE,EAAE;CACb,CAAA;AAUD,MAAM,QAAQ,GAAoB,CAAC,EAAY,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuEvD,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG,EAAE,CAAA","sourcesContent":["import '@operato/property-editor/ox-property-editor-checkbox.js'\nimport '@operato/property-editor/ox-property-editor-number.js'\nimport '@operato/property-editor/ox-property-editor-string.js'\nimport '@operato/property-editor/ox-property-editor-options.js'\nimport '@operato/property-editor/ox-properties-dynamic-view.js'\nimport '@operato/data-grist'\nimport '@operato/data-grist/ox-filters-form.js'\nimport '@operato/data-grist/ox-sorters-control.js'\nimport '@material/web/icon/icon.js'\n\n/* set grist-editors */\nimport { css, html, LitElement, TemplateResult } from 'lit'\nimport { state } from 'lit/decorators.js'\n\nimport { FetchOption, GristRecord, OxGristRendererJson5, registerEditor, registerRenderer } from '@operato/data-grist'\nimport { i18next } from '@operato/i18n'\nimport { OxPropertyEditor } from '@operato/property-editor'\nimport { CommonGristStyles } from '@operato/styles'\n\nimport { OxGristEditorCrontab } from '../src/ox-grist-editor-crontab.js'\nimport { OxGristEditorDuration } from '../src/ox-grist-editor-duration.js'\nimport { OxGristEditorParameters } from '../src/ox-grist-editor-parameters.js'\nimport { OxGristEditorPartitionKeys } from '../src/ox-grist-editor-partition-keys.js'\n// import { OxGristRendererCrontab } from '../src/ox-grist-renderer-crontab.js'\nimport { OxGristEditorValueMap } from '../src/ox-grist-editor-value-map.js'\nimport { OxGristRendererDuration } from '../src/ox-grist-renderer-duration.js'\n\n// import { OxGristEditorJson } from './ox-grist-editor-json.js'\n// import { OxGristRendererCrontab } from '../src/ox-grist-renderer-crontab.js'\n\nOxPropertyEditor.register({\n number: 'ox-property-editor-number',\n string: 'ox-property-editor-string',\n boolean: 'ox-property-editor-checkbox',\n options: 'ox-property-editor-options'\n})\n\nregisterEditor('parameters', OxGristEditorParameters)\nregisterEditor('crontab', OxGristEditorCrontab)\nregisterEditor('value-map', OxGristEditorValueMap)\nregisterEditor('partition-keys', OxGristEditorPartitionKeys)\n\n/* register grist renderer/editor for id */\n// registerEditor('resource-id', OxGristEditorResourceId)\n// registerEditor('resource-object', OxGristEditorResourceObject)\n// registerEditor('resource-code', OxGristEditorResourceCode)\nregisterEditor('parameters', OxGristEditorParameters)\nregisterEditor('value-map', OxGristEditorValueMap)\nregisterEditor('partition-keys', OxGristEditorPartitionKeys)\nregisterEditor('crontab', OxGristEditorCrontab)\nregisterEditor('duration', OxGristEditorDuration)\n// registerEditor('json', OxGristEditorJson)\n\n// registerRenderer('resource-id', OxGristRendererResourceId)\n// registerRenderer('resource-object', OxGristRendererResourceObject)\nregisterRenderer('parameters', OxGristRendererJson5)\nregisterRenderer('value-map', OxGristRendererJson5)\nregisterRenderer('partition-keys', OxGristRendererJson5)\nregisterRenderer('duration', OxGristRendererDuration)\n// registerRenderer('crontab', OxGristRendererCrontab)\n\nconst fetchHandler = async ({ page = 1, limit = 100, sortings = [], filters = [] }: FetchOption) => {\n var total = 10\n var start = (page - 1) * limit\n\n return {\n total,\n records: Array(limit * page > total ? total % limit : limit)\n .fill('')\n .map((item, idx) => {\n return {\n id: idx,\n name: `name-${start + idx + 1}`,\n description: `description-${start + idx + 1}`,\n sequence: idx + 1,\n active: true,\n tag: `tag-${idx + 1}`,\n type: idx % 3 === 0 ? 'select' : idx % 3 === 1 ? 'number' : 'string',\n spec: {\n ccp: {\n criticalLimits: 100,\n targetLimits: 200\n },\n qc: {\n criticalLimits: 300,\n targetLimits: true\n }\n },\n options:\n idx % 2 === 0\n ? {\n options: [\n {\n text: 'A',\n value: 'a'\n },\n {\n text: 'B',\n value: 'b'\n }\n ]\n }\n : undefined,\n schedule: '* * * * * *',\n duration: -3600,\n keyvalue: {},\n createdAt: Date.now(),\n updatedAt: Date.now()\n }\n })\n }\n}\n\nclass GristDemo extends LitElement {\n static styles = [\n CommonGristStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n }\n\n #tailer {\n display: flex;\n flex-direction: row;\n margin: 0 var(--spacing-medium);\n }\n\n #tailer a {\n padding: 0 var(--padding-default) 0 var(--padding-default);\n margin: 0 var(--spacing-small);\n border-right: 1px solid rgba(0, 0, 0, 0.1);\n font-size: var(--fontsize-default);\n color: var(--md-sys-color-on-primary-container);\n }\n `\n ]\n\n @state() mode: String = 'CARD'\n\n get grist() {\n return this.renderRoot.querySelector('ox-grist')\n }\n\n config: any = {\n list: { fields: ['name', 'description', 'active'] },\n columns: [\n { type: 'gutter', gutterName: 'row-selector', multiple: true },\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'add',\n handlers: {\n click: 'record-copy'\n }\n },\n { type: 'gutter', gutterName: 'sequence' },\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'arrow_upward',\n handlers: {\n click: 'move-up'\n }\n },\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'arrow_downward',\n handlers: {\n click: 'move-down'\n }\n },\n {\n type: 'number',\n name: 'sequence',\n hidden: true\n },\n {\n type: 'string',\n name: 'id',\n hidden: true\n },\n {\n type: 'string',\n name: 'name',\n header: i18next.t('field.name'),\n record: {\n editable: true\n },\n width: 140\n },\n {\n type: 'string',\n name: 'description',\n header: i18next.t('field.description'),\n record: {\n editable: true\n },\n width: 180\n },\n {\n type: 'checkbox',\n name: 'active',\n label: true,\n header: i18next.t('field.active'),\n record: {\n editable: true\n },\n sortable: true,\n width: 60\n },\n {\n type: 'string',\n name: 'tag',\n header: i18next.t('field.tag'),\n record: {\n editable: true\n },\n width: 180\n },\n {\n type: 'select',\n name: 'type',\n header: i18next.t('field.type'),\n record: {\n options: ['', 'number', 'text', 'select', 'boolean', 'file'],\n editable: true\n },\n width: 120\n },\n {\n type: 'crontab',\n name: 'schedule',\n header: i18next.t('field.schedule'),\n record: {\n editable: true\n },\n width: 120\n },\n {\n type: 'duration',\n name: 'duration',\n header: i18next.t('field.duration'),\n record: {\n editable: true\n },\n width: 120\n },\n {\n type: 'partition-keys',\n name: 'keyvalue',\n header: i18next.t('field.keyvalue'),\n record: {\n editable: true,\n options: {\n objectified: true,\n valuetype: 'string'\n }\n },\n width: 120\n },\n {\n type: 'parameters',\n name: 'options',\n header: i18next.t('field.options'),\n record: {\n editable: true,\n renderer: (value: any) => {\n return typeof value === 'string' ? value : typeof value === 'object' ? JSON.stringify(value) : ''\n },\n options: async (value: any, column: any, record: GristRecord, row: GristRecord, field: any) => {\n return {\n name: record.type,\n help: '',\n spec:\n record.type === 'select'\n ? [\n {\n type: 'options',\n name: 'options',\n label: 'options'\n }\n ]\n : [],\n context: this.grist,\n objectified: true /* tell parameters editor not to need to parse */\n }\n }\n },\n width: 120\n },\n {\n type: 'string',\n name: 'unit',\n header: i18next.t('field.unit'),\n record: {\n editable: true\n },\n width: 120\n },\n {\n type: 'number',\n name: 'quota',\n header: i18next.t('field.quota'),\n record: {\n editable: true\n },\n width: 60\n },\n {\n type: 'crontab',\n name: 'spec',\n header: i18next.t('field.spec'),\n record: {\n editable: true,\n options: {\n name,\n objectified: true\n }\n },\n width: 200\n }\n ],\n rows: {\n selectable: {\n multiple: true\n }\n },\n pagination: {\n infinite: true\n },\n sorters: [\n {\n name: 'sequence'\n }\n ]\n }\n\n render() {\n const mode = this.mode || 'CARD'\n\n return html`\n <ox-grist .config=${this.config} .mode=${mode} auto-fetch .fetchHandler=${fetchHandler}>\n <div id=\"filters\" slot=\"headroom\">\n <ox-filters-form @filters-change=${(e: CustomEvent) => console.log('changed', e.detail)}></ox-filters-form>\n </div>\n\n <div slot=\"headroom\" id=\"headroom\">\n <div id=\"modes\">\n <md-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>view_list</md-icon>\n <md-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>menu</md-icon>\n <md-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</md-icon>\n </div>\n </div>\n </ox-grist>\n `\n }\n}\n\ncustomElements.define('ox-grist-demo', GristDemo)\n\nexport default {\n title: 'ox-grist-editor-crontab',\n component: 'ox-grist-editor-crontab',\n argTypes: {}\n}\n\ninterface Story<T> {\n (args: T): TemplateResult\n args?: Partial<T>\n argTypes?: Record<string, unknown>\n}\n\ninterface ArgTypes {}\n\nconst Template: Story<ArgTypes> = ({}: ArgTypes) => html`\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n\n <link href=\"/themes/app-theme.css\" rel=\"stylesheet\" />\n <link href=\"/themes/oops-theme.css\" rel=\"stylesheet\" />\n <link href=\"/themes/grist-theme.css\" rel=\"stylesheet\" />\n\n <style>\n [slot='headroom'] {\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: var(--padding-default) var(--spacing-large);\n background-color: var(--md-sys-color-surface);\n box-shadow: var(--box-shadow);\n\n --md-icon-size: 24px;\n }\n #sorters md-icon,\n #modes md-icon {\n --md-icon-size: 18px;\n }\n #sorters {\n margin-left: auto;\n margin-right: var(--spacing-medium);\n padding-left: var(--spacing-small);\n border-bottom: var(--border-dim-color);\n position: relative;\n color: var(--md-sys-color-on-secondary-container);\n font-size: var(--fontsize-default);\n user-select: none;\n }\n\n #sorters > * {\n padding: var(--spacing-small);\n vertical-align: middle;\n }\n\n #filters {\n display: flex;\n justify-content: center;\n align-items: center;\n }\n\n #filters * {\n margin-right: var(--spacing-medium);\n }\n\n @media only screen and (max-width: 460px) {\n #filters {\n flex-direction: column;\n }\n\n #modes {\n display: none;\n }\n }\n </style>\n\n <ox-grist-demo mode=\"LIST\"></ox-grist-demo>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {}\n"]}