@operato/data-grist 10.29.81 → 10.29.84
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/dist/src/filters/filter-select-buttons.js +4 -1
- package/dist/src/filters/pill-choice.d.ts +4 -6
- package/dist/src/filters/pill-choice.js +9 -14
- package/dist/src/gutters/gutter-button.js +2 -4
- package/dist/stories/accumulator-format.stories.d.ts +41 -0
- package/dist/stories/accumulator-format.stories.js +241 -0
- package/dist/stories/append-position.stories.d.ts +8 -0
- package/dist/stories/append-position.stories.js +183 -0
- package/dist/stories/barcode-input-filter.stories.d.ts +33 -0
- package/dist/stories/barcode-input-filter.stories.js +185 -0
- package/dist/stories/bounded-select-filters.stories.d.ts +25 -0
- package/dist/stories/bounded-select-filters.stories.js +283 -0
- package/dist/stories/bounded-select-record.stories.d.ts +25 -0
- package/dist/stories/bounded-select-record.stories.js +286 -0
- package/dist/stories/click-event-custom.stories.d.ts +45 -0
- package/dist/stories/click-event-custom.stories.js +248 -0
- package/dist/stories/click-event.stories.d.ts +45 -0
- package/dist/stories/click-event.stories.js +243 -0
- package/dist/stories/creatable-only-column.stories.d.ts +29 -0
- package/dist/stories/creatable-only-column.stories.js +232 -0
- package/dist/stories/default-filters.stories.d.ts +26 -0
- package/dist/stories/default-filters.stories.js +219 -0
- package/dist/stories/dynamic-editable.stories.d.ts +25 -0
- package/dist/stories/dynamic-editable.stories.js +293 -0
- package/dist/stories/empty-sorters.stories.d.ts +25 -0
- package/dist/stories/empty-sorters.stories.js +162 -0
- package/dist/stories/explicit-fetch.stories.d.ts +25 -0
- package/dist/stories/explicit-fetch.stories.js +166 -0
- package/dist/stories/fixed-column.stories.d.ts +26 -0
- package/dist/stories/fixed-column.stories.js +383 -0
- package/dist/stories/grid-setting.stories.d.ts +47 -0
- package/dist/stories/grid-setting.stories.js +453 -0
- package/dist/stories/grist-modes.stories.d.ts +37 -0
- package/dist/stories/grist-modes.stories.js +416 -0
- package/dist/stories/group-header.stories.d.ts +26 -0
- package/dist/stories/group-header.stories.js +410 -0
- package/dist/stories/record-view.stories.d.ts +24 -0
- package/dist/stories/record-view.stories.js +125 -0
- package/dist/stories/secret.stories.d.ts +37 -0
- package/dist/stories/secret.stories.js +219 -0
- package/dist/stories/textarea.stories.d.ts +37 -0
- package/dist/stories/textarea.stories.js +229 -0
- package/dist/stories/tree-column-with-checkbox.stories.d.ts +26 -0
- package/dist/stories/tree-column-with-checkbox.stories.js +267 -0
- package/dist/stories/tree-column.stories.d.ts +26 -0
- package/dist/stories/tree-column.stories.js +266 -0
- package/package.json +28 -13
- package/CHANGELOG.md +0 -7721
- package/dist/src/accumulator/accumulator.js.map +0 -1
- package/dist/src/configure/column-builder.js.map +0 -1
- package/dist/src/configure/config-builder.js.map +0 -1
- package/dist/src/configure/filters-option-builder.js.map +0 -1
- package/dist/src/configure/imex-option-builder.js.map +0 -1
- package/dist/src/configure/list-option-builder.js.map +0 -1
- package/dist/src/configure/rows-option-builder.js.map +0 -1
- package/dist/src/configure/tree-option-builder.js.map +0 -1
- package/dist/src/configure/zero-config.js.map +0 -1
- package/dist/src/const.js.map +0 -1
- package/dist/src/data-card/data-card-field.js.map +0 -1
- package/dist/src/data-card/data-card-gutter-menu.js.map +0 -1
- package/dist/src/data-card/data-card-gutter.js.map +0 -1
- package/dist/src/data-card/data-card.js.map +0 -1
- package/dist/src/data-card/event-handlers/record-card-click-handler.js.map +0 -1
- package/dist/src/data-card/event-handlers/record-card-dblclick-handler.js.map +0 -1
- package/dist/src/data-card/ox-card-thumb.js.map +0 -1
- package/dist/src/data-card/record-card.js.map +0 -1
- package/dist/src/data-consumer.js.map +0 -1
- package/dist/src/data-grid/data-grid-accum-field.js.map +0 -1
- package/dist/src/data-grid/data-grid-body-style.js.map +0 -1
- package/dist/src/data-grid/data-grid-body.js.map +0 -1
- package/dist/src/data-grid/data-grid-field.js.map +0 -1
- package/dist/src/data-grid/data-grid-footer.js.map +0 -1
- package/dist/src/data-grid/data-grid-header.js.map +0 -1
- package/dist/src/data-grid/data-grid.js.map +0 -1
- package/dist/src/data-grid/event-handlers/data-grid-body-click-handler.js.map +0 -1
- package/dist/src/data-grid/event-handlers/data-grid-body-contextmenu-handler.js.map +0 -1
- package/dist/src/data-grid/event-handlers/data-grid-body-dblclick-handler.js.map +0 -1
- package/dist/src/data-grid/event-handlers/data-grid-body-focus-change-handler.js.map +0 -1
- package/dist/src/data-grid/event-handlers/data-grid-body-keydown-handler.js.map +0 -1
- package/dist/src/data-grist.js.map +0 -1
- package/dist/src/data-list/data-list-field.js.map +0 -1
- package/dist/src/data-list/data-list-gutter.js.map +0 -1
- package/dist/src/data-list/data-list.js.map +0 -1
- package/dist/src/data-list/event-handlers/record-partial-click-handler.js.map +0 -1
- package/dist/src/data-list/event-handlers/record-partial-dblclick-handler.js.map +0 -1
- package/dist/src/data-list/event-handlers/record-partial-long-press-handler.js.map +0 -1
- package/dist/src/data-list/record-partial.js.map +0 -1
- package/dist/src/data-manipulator.js.map +0 -1
- package/dist/src/data-provider.js.map +0 -1
- package/dist/src/data-report/data-report-body-style.js.map +0 -1
- package/dist/src/data-report/data-report-body.js.map +0 -1
- package/dist/src/data-report/data-report-component.js.map +0 -1
- package/dist/src/data-report/data-report-field.js.map +0 -1
- package/dist/src/data-report/data-report-header.js.map +0 -1
- package/dist/src/data-report/event-handlers/data-report-body-click-handler.js.map +0 -1
- package/dist/src/data-report/event-handlers/data-report-body-dblclick-handler.js.map +0 -1
- package/dist/src/data-report/event-handlers/data-report-body-keydown-handler.js.map +0 -1
- package/dist/src/data-report.js.map +0 -1
- package/dist/src/edit-rebase.js.map +0 -1
- package/dist/src/editors/index.js.map +0 -1
- package/dist/src/editors/ox-grist-editor-checkbox.js.map +0 -1
- package/dist/src/editors/ox-grist-editor-color.js.map +0 -1
- package/dist/src/editors/ox-grist-editor-date.js.map +0 -1
- package/dist/src/editors/ox-grist-editor-datetime.js.map +0 -1
- package/dist/src/editors/ox-grist-editor-email.js.map +0 -1
- package/dist/src/editors/ox-grist-editor-file.js.map +0 -1
- package/dist/src/editors/ox-grist-editor-image.js.map +0 -1
- package/dist/src/editors/ox-grist-editor-json5.js.map +0 -1
- package/dist/src/editors/ox-grist-editor-month.js.map +0 -1
- package/dist/src/editors/ox-grist-editor-multiple-select.js.map +0 -1
- package/dist/src/editors/ox-grist-editor-number.js.map +0 -1
- package/dist/src/editors/ox-grist-editor-password.js.map +0 -1
- package/dist/src/editors/ox-grist-editor-secret.js.map +0 -1
- package/dist/src/editors/ox-grist-editor-select.js.map +0 -1
- package/dist/src/editors/ox-grist-editor-tel.js.map +0 -1
- package/dist/src/editors/ox-grist-editor-text-select.js.map +0 -1
- package/dist/src/editors/ox-grist-editor-text.js.map +0 -1
- package/dist/src/editors/ox-grist-editor-textarea.js.map +0 -1
- package/dist/src/editors/ox-grist-editor-time.js.map +0 -1
- package/dist/src/editors/ox-grist-editor-timezone.js.map +0 -1
- package/dist/src/editors/ox-grist-editor-tree.js.map +0 -1
- package/dist/src/editors/ox-grist-editor-varname.js.map +0 -1
- package/dist/src/editors/ox-grist-editor-week.js.map +0 -1
- package/dist/src/editors/ox-grist-editor.js.map +0 -1
- package/dist/src/editors/ox-input-tree.js.map +0 -1
- package/dist/src/editors/ox-popup-code-input.js.map +0 -1
- package/dist/src/editors/registry.js.map +0 -1
- package/dist/src/empty-note-render.js.map +0 -1
- package/dist/src/empty-note.js.map +0 -1
- package/dist/src/filters/filter-checkbox.js.map +0 -1
- package/dist/src/filters/filter-input-barcode.js.map +0 -1
- package/dist/src/filters/filter-input.js.map +0 -1
- package/dist/src/filters/filter-ownership.js.map +0 -1
- package/dist/src/filters/filter-range-date.js.map +0 -1
- package/dist/src/filters/filter-range-number.js.map +0 -1
- package/dist/src/filters/filter-select-buttons.js.map +0 -1
- package/dist/src/filters/filter-select.js.map +0 -1
- package/dist/src/filters/filter-styles.js.map +0 -1
- package/dist/src/filters/filters-form.js.map +0 -1
- package/dist/src/filters/index.js.map +0 -1
- package/dist/src/filters/pill-choice.js.map +0 -1
- package/dist/src/filters/registry.js.map +0 -1
- package/dist/src/formatters/date-formatter.js.map +0 -1
- package/dist/src/formatters/index.js.map +0 -1
- package/dist/src/formatters/number-formatter.js.map +0 -1
- package/dist/src/formatters/registry.js.map +0 -1
- package/dist/src/formatters/text-formatter.js.map +0 -1
- package/dist/src/group-heading.js.map +0 -1
- package/dist/src/gutters/gutter-button.js.map +0 -1
- package/dist/src/gutters/gutter-dirty.js.map +0 -1
- package/dist/src/gutters/gutter-row-selector.js.map +0 -1
- package/dist/src/gutters/gutter-sequence.js.map +0 -1
- package/dist/src/gutters/index.js.map +0 -1
- package/dist/src/gutters/registry.js.map +0 -1
- package/dist/src/handlers/contextmenu-tree-mutation.js.map +0 -1
- package/dist/src/handlers/index.js.map +0 -1
- package/dist/src/handlers/move-down.js.map +0 -1
- package/dist/src/handlers/move-up.js.map +0 -1
- package/dist/src/handlers/record-copy.js.map +0 -1
- package/dist/src/handlers/record-delete.js.map +0 -1
- package/dist/src/handlers/record-view-handler.js.map +0 -1
- package/dist/src/handlers/registry.js.map +0 -1
- package/dist/src/handlers/select-row-toggle.js.map +0 -1
- package/dist/src/handlers/select-row.js.map +0 -1
- package/dist/src/index.js.map +0 -1
- package/dist/src/personalizer/index.js.map +0 -1
- package/dist/src/personalizer/ox-grist-filter-personalizer.js.map +0 -1
- package/dist/src/personalizer/ox-grist-personalizer.js.map +0 -1
- package/dist/src/personalizer/personalizer-chrome.js.map +0 -1
- package/dist/src/record-view/event-handlers/record-view-body-click-handler.js.map +0 -1
- package/dist/src/record-view/event-handlers/record-view-body-keydown-handler.js.map +0 -1
- package/dist/src/record-view/index.js.map +0 -1
- package/dist/src/record-view/ox-record-creator.js.map +0 -1
- package/dist/src/record-view/record-view-body.js.map +0 -1
- package/dist/src/record-view/record-view-handler.js.map +0 -1
- package/dist/src/record-view/record-view.js.map +0 -1
- package/dist/src/renderers/index.js.map +0 -1
- package/dist/src/renderers/ox-grist-renderer-boolean.js.map +0 -1
- package/dist/src/renderers/ox-grist-renderer-color.js.map +0 -1
- package/dist/src/renderers/ox-grist-renderer-date.js.map +0 -1
- package/dist/src/renderers/ox-grist-renderer-file.js.map +0 -1
- package/dist/src/renderers/ox-grist-renderer-image.js.map +0 -1
- package/dist/src/renderers/ox-grist-renderer-json5.js.map +0 -1
- package/dist/src/renderers/ox-grist-renderer-link.js.map +0 -1
- package/dist/src/renderers/ox-grist-renderer-password.js.map +0 -1
- package/dist/src/renderers/ox-grist-renderer-progress.js.map +0 -1
- package/dist/src/renderers/ox-grist-renderer-secret.js.map +0 -1
- package/dist/src/renderers/ox-grist-renderer-select.js.map +0 -1
- package/dist/src/renderers/ox-grist-renderer-sparkline.js.map +0 -1
- package/dist/src/renderers/ox-grist-renderer-text-select.js.map +0 -1
- package/dist/src/renderers/ox-grist-renderer-text.js.map +0 -1
- package/dist/src/renderers/ox-grist-renderer-textarea.js.map +0 -1
- package/dist/src/renderers/ox-grist-renderer-tree.js.map +0 -1
- package/dist/src/renderers/ox-grist-renderer.js.map +0 -1
- package/dist/src/renderers/registry.js.map +0 -1
- package/dist/src/sorters/sorters-control.js.map +0 -1
- package/dist/src/types.js.map +0 -1
- package/dist/src/utils/column-text.js.map +0 -1
- package/dist/src/utils/field-value.js.map +0 -1
- package/dist/src/utils/index.js.map +0 -1
- package/dist/src/utils/list-param.js.map +0 -1
- package/dist/src/utils/select-range.js.map +0 -1
- package/dist/src/utils/supports-passive.js.map +0 -1
- package/dist/test/accessible-name.test.d.ts +0 -2
- package/dist/test/accessible-name.test.js +0 -324
- package/dist/test/accessible-name.test.js.map +0 -1
- package/dist/test/accumulator-labels.test.d.ts +0 -1
- package/dist/test/accumulator-labels.test.js +0 -32
- package/dist/test/accumulator-labels.test.js.map +0 -1
- package/dist/test/address-intents.test.d.ts +0 -1
- package/dist/test/address-intents.test.js +0 -201
- package/dist/test/address-intents.test.js.map +0 -1
- package/dist/test/card-selector.test.d.ts +0 -1
- package/dist/test/card-selector.test.js +0 -71
- package/dist/test/card-selector.test.js.map +0 -1
- package/dist/test/card-thumb.test.d.ts +0 -1
- package/dist/test/card-thumb.test.js +0 -44
- package/dist/test/card-thumb.test.js.map +0 -1
- package/dist/test/card-totals-narrow.test.d.ts +0 -1
- package/dist/test/card-totals-narrow.test.js +0 -103
- package/dist/test/card-totals-narrow.test.js.map +0 -1
- package/dist/test/cell-button-row-height.test.d.ts +0 -1
- package/dist/test/cell-button-row-height.test.js +0 -53
- package/dist/test/cell-button-row-height.test.js.map +0 -1
- package/dist/test/column-resize.test.d.ts +0 -1
- package/dist/test/column-resize.test.js +0 -153
- package/dist/test/column-resize.test.js.map +0 -1
- package/dist/test/control-heights.test.d.ts +0 -1
- package/dist/test/control-heights.test.js +0 -25
- package/dist/test/control-heights.test.js.map +0 -1
- package/dist/test/count-handler.test.d.ts +0 -1
- package/dist/test/count-handler.test.js +0 -56
- package/dist/test/count-handler.test.js.map +0 -1
- package/dist/test/create-paste-policy.test.d.ts +0 -1
- package/dist/test/create-paste-policy.test.js +0 -159
- package/dist/test/create-paste-policy.test.js.map +0 -1
- package/dist/test/data-integrity.test.d.ts +0 -1
- package/dist/test/data-integrity.test.js +0 -145
- package/dist/test/data-integrity.test.js.map +0 -1
- package/dist/test/date-fields.test.d.ts +0 -2
- package/dist/test/date-fields.test.js +0 -138
- package/dist/test/date-fields.test.js.map +0 -1
- package/dist/test/destructive-actions.test.d.ts +0 -11
- package/dist/test/destructive-actions.test.js +0 -147
- package/dist/test/destructive-actions.test.js.map +0 -1
- package/dist/test/edit-lifecycle.test.d.ts +0 -2
- package/dist/test/edit-lifecycle.test.js +0 -270
- package/dist/test/edit-lifecycle.test.js.map +0 -1
- package/dist/test/edit-rebase.test.d.ts +0 -1
- package/dist/test/edit-rebase.test.js +0 -185
- package/dist/test/edit-rebase.test.js.map +0 -1
- package/dist/test/editor-commit.test.d.ts +0 -2
- package/dist/test/editor-commit.test.js +0 -68
- package/dist/test/editor-commit.test.js.map +0 -1
- package/dist/test/fetch-failure-state.test.d.ts +0 -1
- package/dist/test/fetch-failure-state.test.js +0 -129
- package/dist/test/fetch-failure-state.test.js.map +0 -1
- package/dist/test/field-contains-content.test.d.ts +0 -1
- package/dist/test/field-contains-content.test.js +0 -101
- package/dist/test/field-contains-content.test.js.map +0 -1
- package/dist/test/field-hint.test.d.ts +0 -2
- package/dist/test/field-hint.test.js +0 -54
- package/dist/test/field-hint.test.js.map +0 -1
- package/dist/test/filter-labels.test.d.ts +0 -2
- package/dist/test/filter-labels.test.js +0 -140
- package/dist/test/filter-labels.test.js.map +0 -1
- package/dist/test/filter-ownership.test.d.ts +0 -1
- package/dist/test/filter-ownership.test.js +0 -83
- package/dist/test/filter-ownership.test.js.map +0 -1
- package/dist/test/filter-select-buttons-count.test.d.ts +0 -1
- package/dist/test/filter-select-buttons-count.test.js +0 -36
- package/dist/test/filter-select-buttons-count.test.js.map +0 -1
- package/dist/test/filter-typing.test.d.ts +0 -2
- package/dist/test/filter-typing.test.js +0 -66
- package/dist/test/filter-typing.test.js.map +0 -1
- package/dist/test/filters-phone-width.test.d.ts +0 -1
- package/dist/test/filters-phone-width.test.js +0 -33
- package/dist/test/filters-phone-width.test.js.map +0 -1
- package/dist/test/filters-phone-wrap.test.d.ts +0 -1
- package/dist/test/filters-phone-wrap.test.js +0 -17
- package/dist/test/filters-phone-wrap.test.js.map +0 -1
- package/dist/test/filters-pills.test.d.ts +0 -2
- package/dist/test/filters-pills.test.js +0 -149
- package/dist/test/filters-pills.test.js.map +0 -1
- package/dist/test/first-click-stays.test.d.ts +0 -1
- package/dist/test/first-click-stays.test.js +0 -77
- package/dist/test/first-click-stays.test.js.map +0 -1
- package/dist/test/fixed-column-opaque.test.d.ts +0 -1
- package/dist/test/fixed-column-opaque.test.js +0 -134
- package/dist/test/fixed-column-opaque.test.js.map +0 -1
- package/dist/test/flexible-columns.test.d.ts +0 -1
- package/dist/test/flexible-columns.test.js +0 -134
- package/dist/test/flexible-columns.test.js.map +0 -1
- package/dist/test/grid-single-scroller.test.d.ts +0 -1
- package/dist/test/grid-single-scroller.test.js +0 -107
- package/dist/test/grid-single-scroller.test.js.map +0 -1
- package/dist/test/group-heading.test.d.ts +0 -1
- package/dist/test/group-heading.test.js +0 -208
- package/dist/test/group-heading.test.js.map +0 -1
- package/dist/test/latest-fetch-wins.test.d.ts +0 -1
- package/dist/test/latest-fetch-wins.test.js +0 -91
- package/dist/test/latest-fetch-wins.test.js.map +0 -1
- package/dist/test/list-defaults.test.d.ts +0 -2
- package/dist/test/list-defaults.test.js +0 -146
- package/dist/test/list-defaults.test.js.map +0 -1
- package/dist/test/list-records.test.d.ts +0 -1
- package/dist/test/list-records.test.js +0 -46
- package/dist/test/list-records.test.js.map +0 -1
- package/dist/test/office-density.test.d.ts +0 -1
- package/dist/test/office-density.test.js +0 -52
- package/dist/test/office-density.test.js.map +0 -1
- package/dist/test/page-errors.d.ts +0 -1
- package/dist/test/page-errors.js +0 -44
- package/dist/test/page-errors.js.map +0 -1
- package/dist/test/paste-integrity.test.d.ts +0 -1
- package/dist/test/paste-integrity.test.js +0 -163
- package/dist/test/paste-integrity.test.js.map +0 -1
- package/dist/test/record-card-height.test.d.ts +0 -1
- package/dist/test/record-card-height.test.js +0 -15
- package/dist/test/record-card-height.test.js.map +0 -1
- package/dist/test/record-view-popup-editor.test.d.ts +0 -1
- package/dist/test/record-view-popup-editor.test.js +0 -71
- package/dist/test/record-view-popup-editor.test.js.map +0 -1
- package/dist/test/renderer-date-calendar-day.test.d.ts +0 -1
- package/dist/test/renderer-date-calendar-day.test.js +0 -48
- package/dist/test/renderer-date-calendar-day.test.js.map +0 -1
- package/dist/test/request-generation.test.d.ts +0 -1
- package/dist/test/request-generation.test.js +0 -153
- package/dist/test/request-generation.test.js.map +0 -1
- package/dist/test/resubmit.test.d.ts +0 -1
- package/dist/test/resubmit.test.js +0 -83
- package/dist/test/resubmit.test.js.map +0 -1
- package/dist/test/row-hover-visible.test.d.ts +0 -1
- package/dist/test/row-hover-visible.test.js +0 -139
- package/dist/test/row-hover-visible.test.js.map +0 -1
- package/dist/test/search-term.test.d.ts +0 -1
- package/dist/test/search-term.test.js +0 -108
- package/dist/test/search-term.test.js.map +0 -1
- package/dist/test/searchable-select.test.d.ts +0 -1
- package/dist/test/searchable-select.test.js +0 -65
- package/dist/test/searchable-select.test.js.map +0 -1
- package/dist/test/select-empty-value.test.d.ts +0 -1
- package/dist/test/select-empty-value.test.js +0 -61
- package/dist/test/select-empty-value.test.js.map +0 -1
- package/dist/test/shift-range-select.test.d.ts +0 -1
- package/dist/test/shift-range-select.test.js +0 -100
- package/dist/test/shift-range-select.test.js.map +0 -1
- package/dist/test/sparkline-renderer.test.d.ts +0 -1
- package/dist/test/sparkline-renderer.test.js +0 -36
- package/dist/test/sparkline-renderer.test.js.map +0 -1
- package/dist/test/wheel-one-scroller.test.d.ts +0 -2
- package/dist/test/wheel-one-scroller.test.js +0 -275
- package/dist/test/wheel-one-scroller.test.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/docs/USER_GUIDE.md +0 -144
- package/docs/configuration/README.md +0 -68
- package/docs/configuration/columns.md +0 -391
- package/docs/configuration/editors.md +0 -53
- package/docs/configuration/events.md +0 -44
- package/docs/configuration/i18n.md +0 -40
- package/docs/configuration/options.md +0 -100
- package/docs/configuration/theme.md +0 -39
- package/docs/default-value/default-value.md +0 -97
- package/docs/default-value/value-generator/date-generator.md +0 -69
- package/docs/default-value/value-generator/hour-time-generator.md +0 -76
- package/docs/default-value/value-generator/minute-time-generator.md +0 -76
- package/docs/default-value/value-generator/month-date-generator.md +0 -45
- package/docs/default-value/value-generator/now-generator.md +0 -68
- package/docs/default-value/value-generator/time-generator.md +0 -71
- package/docs/default-value/value-generator/today-generator.md +0 -68
- package/docs/default-value/value-generator/week-date-generator.md +0 -74
- package/docs/default-value/value-generator/year-date-generator.md +0 -74
- package/docs/gutter/gutter.md +0 -7
- package/test/accessible-name.test.ts +0 -408
- package/test/accumulator-labels.test.ts +0 -36
- package/test/address-intents.test.ts +0 -202
- package/test/card-selector.test.ts +0 -82
- package/test/card-thumb.test.ts +0 -51
- package/test/card-totals-narrow.test.ts +0 -128
- package/test/cell-button-row-height.test.ts +0 -63
- package/test/column-resize.test.ts +0 -206
- package/test/control-heights.test.ts +0 -31
- package/test/count-handler.test.ts +0 -61
- package/test/create-paste-policy.test.ts +0 -177
- package/test/data-integrity.test.ts +0 -150
- package/test/date-fields.test.ts +0 -163
- package/test/destructive-actions.test.ts +0 -137
- package/test/edit-lifecycle.test.ts +0 -302
- package/test/edit-rebase.test.ts +0 -220
- package/test/editor-commit.test.ts +0 -103
- package/test/fetch-failure-state.test.ts +0 -156
- package/test/field-contains-content.test.ts +0 -125
- package/test/field-hint.test.ts +0 -60
- package/test/filter-labels.test.ts +0 -153
- package/test/filter-ownership.test.ts +0 -104
- package/test/filter-select-buttons-count.test.ts +0 -38
- package/test/filter-typing.test.ts +0 -77
- package/test/filters-phone-width.test.ts +0 -35
- package/test/filters-phone-wrap.test.ts +0 -22
- package/test/filters-pills.test.ts +0 -162
- package/test/first-click-stays.test.ts +0 -101
- package/test/fixed-column-opaque.test.ts +0 -183
- package/test/flexible-columns.test.ts +0 -181
- package/test/grid-single-scroller.test.ts +0 -150
- package/test/group-heading.test.ts +0 -244
- package/test/latest-fetch-wins.test.ts +0 -114
- package/test/list-defaults.test.ts +0 -164
- package/test/list-records.test.ts +0 -58
- package/test/office-density.test.ts +0 -57
- package/test/page-errors.ts +0 -43
- package/test/paste-integrity.test.ts +0 -168
- package/test/record-card-height.test.ts +0 -19
- package/test/record-view-popup-editor.test.ts +0 -84
- package/test/renderer-date-calendar-day.test.ts +0 -55
- package/test/request-generation.test.ts +0 -163
- package/test/resubmit.test.ts +0 -96
- package/test/row-hover-visible.test.ts +0 -180
- package/test/search-term.test.ts +0 -156
- package/test/searchable-select.test.ts +0 -77
- package/test/select-empty-value.test.ts +0 -71
- package/test/shift-range-select.test.ts +0 -112
- package/test/sparkline-renderer.test.ts +0 -40
- package/test/wheel-one-scroller.test.ts +0 -359
|
@@ -13,7 +13,10 @@ export const FilterSelectButtons = (column, value, owner) => {
|
|
|
13
13
|
}
|
|
14
14
|
options = options.call(column, owner);
|
|
15
15
|
}
|
|
16
|
-
/*
|
|
16
|
+
/*
|
|
17
|
+
* Add an all-selection chip when an empty selection is allowed; required single selections remain selected
|
|
18
|
+
* on a second click.
|
|
19
|
+
*/
|
|
17
20
|
const withAll = hasAllChip(filter, options);
|
|
18
21
|
options = options.map((option) => {
|
|
19
22
|
var _a, _b, _c;
|
|
@@ -7,17 +7,15 @@ export declare function wordWidth(text: string): number;
|
|
|
7
7
|
/** The choice that means no condition - a select's empty first line. */
|
|
8
8
|
export declare function isNoChoice(option: SelectOption): boolean;
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* opens with must always have one (the inquiry list's old 「보기」, the audit period) and has none. A lone chip is a
|
|
13
|
-
* switch - 「취소된 발행」 shows only those - and has none either.
|
|
10
|
+
* Include an all-selection chip for optional single selection and multiple selection. Omit it for required
|
|
11
|
+
* single selection and standalone toggle chips.
|
|
14
12
|
*/
|
|
15
13
|
export declare function hasAllChip(filter: FilterConfigObject & {
|
|
16
14
|
value?: any;
|
|
17
15
|
}, options: SelectOption[]): boolean;
|
|
18
16
|
/**
|
|
19
|
-
*
|
|
20
|
-
*
|
|
17
|
+
* Use chips for at most three fixed options, at least two visible chips including all, and short individual
|
|
18
|
+
* and combined labels.
|
|
21
19
|
*/
|
|
22
20
|
export declare function fitsAsPills(filter: FilterConfigObject & {
|
|
23
21
|
value?: any;
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* Chips stand on one line of a phone (about 300px of a 366px filter line) with the filter's name beside them, measured
|
|
6
|
-
* at :4700: three choices and the 「전체」 chip fit; six took two lines and doubled the filter area. So a select becomes
|
|
7
|
-
* chips only for two or three choices whose words are short, each and together. Words are counted in widths: a wide
|
|
8
|
-
* (Hangul, CJK, full-width) character is 2, any other 1 - one chip of 12 is 「내가 보낸 것」 or "Bug reports".
|
|
2
|
+
* Render two or three short fixed filter options as chips when they fit a mobile row. Include an all-
|
|
3
|
+
* selection chip when empty selection is allowed; retain a select for larger or dynamic option sets.
|
|
9
4
|
*/
|
|
10
5
|
export const PILL_MAX_CHOICES = 3;
|
|
11
6
|
export const PILL_MAX_WORD_WIDTH = 12;
|
|
@@ -28,16 +23,16 @@ export function isNoChoice(option) {
|
|
|
28
23
|
return value === '' || value === undefined || value === null;
|
|
29
24
|
}
|
|
30
25
|
/**
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
* opens with must always have one (the inquiry list's old 「보기」, the audit period) and has none. A lone chip is a
|
|
34
|
-
* switch - 「취소된 발행」 shows only those - and has none either.
|
|
26
|
+
* Include an all-selection chip for optional single selection and multiple selection. Omit it for required
|
|
27
|
+
* single selection and standalone toggle chips.
|
|
35
28
|
*/
|
|
36
29
|
export function hasAllChip(filter, options) {
|
|
37
30
|
const choices = options.filter(option => !isNoChoice(option));
|
|
38
31
|
if (!choices.length)
|
|
39
32
|
return false;
|
|
40
|
-
/*
|
|
33
|
+
/*
|
|
34
|
+
* Optional single selection with one option renders the all-selection chip and the option.
|
|
35
|
+
*/
|
|
41
36
|
if (filter.operator !== 'in' && options.some(isNoChoice))
|
|
42
37
|
return true;
|
|
43
38
|
if (choices.length < 2)
|
|
@@ -47,8 +42,8 @@ export function hasAllChip(filter, options) {
|
|
|
47
42
|
return filter.value === undefined || filter.value === null || filter.value === '';
|
|
48
43
|
}
|
|
49
44
|
/**
|
|
50
|
-
*
|
|
51
|
-
*
|
|
45
|
+
* Use chips for at most three fixed options, at least two visible chips including all, and short individual
|
|
46
|
+
* and combined labels.
|
|
52
47
|
*/
|
|
53
48
|
export function fitsAsPills(filter, options, allLabel) {
|
|
54
49
|
const choices = options.filter(option => !isNoChoice(option));
|
|
@@ -28,10 +28,8 @@ export class GutterButton {
|
|
|
28
28
|
? html ` <md-icon title=${ifDefined(title && titleFn(record))}>${iconFn(record)}</md-icon> `
|
|
29
29
|
: title || icon
|
|
30
30
|
? /*
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
* page's action height and weight - 「▷ 시작」 · 「≡ 상세」 came up large on every grid (2026-11-09).
|
|
34
|
-
*/
|
|
31
|
+
* Keep the gutter action's compact button styles. Page-level ButtonStyles would increase grid row height.
|
|
32
|
+
*/
|
|
35
33
|
html `<button unstyled><md-icon>${iconFn(record)}</md-icon><span>${titleFn(record)}</span></button>`
|
|
36
34
|
: nothing;
|
|
37
35
|
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import '../src/index.js';
|
|
2
|
+
import '../src/filters/filters-form.js';
|
|
3
|
+
import '../src/sorters/sorters-control.js';
|
|
4
|
+
import '../src/record-view/ox-record-creator.js';
|
|
5
|
+
import '@operato/popup/ox-popup-list.js';
|
|
6
|
+
import '@material/web/icon/icon.js';
|
|
7
|
+
import { TemplateResult } from 'lit';
|
|
8
|
+
import { FetchHandler } from '../src/types.js';
|
|
9
|
+
declare const _default: {
|
|
10
|
+
title: string;
|
|
11
|
+
component: string;
|
|
12
|
+
argTypes: {
|
|
13
|
+
config: {
|
|
14
|
+
control: string;
|
|
15
|
+
};
|
|
16
|
+
mode: {
|
|
17
|
+
control: string;
|
|
18
|
+
options: string[];
|
|
19
|
+
};
|
|
20
|
+
urlParamsSensitive: {
|
|
21
|
+
control: string;
|
|
22
|
+
};
|
|
23
|
+
withoutSearch: {
|
|
24
|
+
control: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
export default _default;
|
|
29
|
+
interface Story<T> {
|
|
30
|
+
(args: T): TemplateResult;
|
|
31
|
+
args?: Partial<T>;
|
|
32
|
+
argTypes?: Record<string, unknown>;
|
|
33
|
+
}
|
|
34
|
+
interface ArgTypes {
|
|
35
|
+
config: object;
|
|
36
|
+
mode: string;
|
|
37
|
+
urlParamsSensitive: boolean;
|
|
38
|
+
withoutSearch: boolean;
|
|
39
|
+
fetchHandler: FetchHandler;
|
|
40
|
+
}
|
|
41
|
+
export declare const Regular: Story<ArgTypes>;
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import '../src/index.js';
|
|
2
|
+
import '../src/filters/filters-form.js';
|
|
3
|
+
import '../src/sorters/sorters-control.js';
|
|
4
|
+
import '../src/record-view/ox-record-creator.js';
|
|
5
|
+
import '@operato/popup/ox-popup-list.js';
|
|
6
|
+
import '@material/web/icon/icon.js';
|
|
7
|
+
import { html } from 'lit';
|
|
8
|
+
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles.js';
|
|
9
|
+
import { CommonHeaderStyles, CommonGristStyles } from '@operato/styles';
|
|
10
|
+
const fetchHandler = async ({ page, limit }) => {
|
|
11
|
+
var total = 25;
|
|
12
|
+
var start = (page - 1) * limit;
|
|
13
|
+
await new Promise(resolve => setTimeout(resolve, 500));
|
|
14
|
+
return {
|
|
15
|
+
total,
|
|
16
|
+
records: Array(limit * page > total ? total % limit : limit)
|
|
17
|
+
.fill('')
|
|
18
|
+
.map((item, idx) => {
|
|
19
|
+
return {
|
|
20
|
+
id: String(idx),
|
|
21
|
+
name: idx % 2 ? `shnam-${start + idx + 1}` : `heartyoh-${start + idx + 1}`,
|
|
22
|
+
description: idx % 2 ? `hatiolabmanager${start + idx + 1}1234567890` : `hatiosea manager-${start + idx + 1}`,
|
|
23
|
+
accval: Math.random(),
|
|
24
|
+
accval2: Math.round(Math.random() * 15),
|
|
25
|
+
createdAt: Date.now(),
|
|
26
|
+
updatedAt: Date.now()
|
|
27
|
+
};
|
|
28
|
+
})
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
const config = {
|
|
32
|
+
columns: [
|
|
33
|
+
{
|
|
34
|
+
type: 'gutter',
|
|
35
|
+
gutterName: 'dirty'
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
type: 'gutter',
|
|
39
|
+
gutterName: 'sequence'
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
type: 'gutter',
|
|
43
|
+
gutterName: 'row-selector',
|
|
44
|
+
multiple: true
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
type: 'gutter',
|
|
48
|
+
gutterName: 'button',
|
|
49
|
+
icon: 'add',
|
|
50
|
+
title: 'add',
|
|
51
|
+
handlers: {
|
|
52
|
+
click: 'record-copy'
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
type: 'string',
|
|
57
|
+
name: 'id',
|
|
58
|
+
hidden: true
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
type: 'string',
|
|
62
|
+
name: 'name',
|
|
63
|
+
label: true,
|
|
64
|
+
header: 'name',
|
|
65
|
+
record: {
|
|
66
|
+
editable: true
|
|
67
|
+
},
|
|
68
|
+
filter: 'search',
|
|
69
|
+
sortable: true,
|
|
70
|
+
width: 120,
|
|
71
|
+
fixed: true
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
type: 'string',
|
|
75
|
+
name: 'description',
|
|
76
|
+
header: {
|
|
77
|
+
renderer: () => 'description',
|
|
78
|
+
style: 'text-transform: none;'
|
|
79
|
+
},
|
|
80
|
+
filter: 'search',
|
|
81
|
+
record: {
|
|
82
|
+
editable: true,
|
|
83
|
+
align: 'left',
|
|
84
|
+
renderer: (value) => {
|
|
85
|
+
return value + '\n' + '12312312';
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
multiline: true,
|
|
89
|
+
width: 200
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
type: 'number',
|
|
93
|
+
name: 'accval',
|
|
94
|
+
label: true,
|
|
95
|
+
header: 'accval',
|
|
96
|
+
record: {
|
|
97
|
+
editable: true,
|
|
98
|
+
align: 'right',
|
|
99
|
+
defaultValue: 100,
|
|
100
|
+
format: '+$#,##0.00'
|
|
101
|
+
},
|
|
102
|
+
accumulator: 'avg',
|
|
103
|
+
// accumulator: {
|
|
104
|
+
// type: 'avg',
|
|
105
|
+
// tag: true
|
|
106
|
+
// },
|
|
107
|
+
sortable: true,
|
|
108
|
+
width: 130
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
type: 'number',
|
|
112
|
+
name: 'accval2',
|
|
113
|
+
label: true,
|
|
114
|
+
header: 'accval2',
|
|
115
|
+
record: {
|
|
116
|
+
editable: true,
|
|
117
|
+
align: 'right',
|
|
118
|
+
renderer: (value, column, record) => {
|
|
119
|
+
return value && Intl.NumberFormat('en-US').format(value);
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
accumulator: {
|
|
123
|
+
type: 'sum',
|
|
124
|
+
tag: true
|
|
125
|
+
},
|
|
126
|
+
sortable: true,
|
|
127
|
+
width: 130
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
type: 'datetime',
|
|
131
|
+
name: 'updatedAt',
|
|
132
|
+
header: 'updated at',
|
|
133
|
+
record: {
|
|
134
|
+
editable: true,
|
|
135
|
+
defaultValue: {
|
|
136
|
+
name: 'now'
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
filter: 'between',
|
|
140
|
+
sortable: true,
|
|
141
|
+
width: 180
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
type: 'datetime',
|
|
145
|
+
name: 'createdAt',
|
|
146
|
+
header: 'created at',
|
|
147
|
+
record: {
|
|
148
|
+
editable: false
|
|
149
|
+
},
|
|
150
|
+
sortable: true,
|
|
151
|
+
width: 180
|
|
152
|
+
}
|
|
153
|
+
],
|
|
154
|
+
rows: {
|
|
155
|
+
selectable: {
|
|
156
|
+
multiple: false
|
|
157
|
+
},
|
|
158
|
+
accumulator: true
|
|
159
|
+
},
|
|
160
|
+
sorters: [
|
|
161
|
+
{
|
|
162
|
+
name: 'name',
|
|
163
|
+
desc: true
|
|
164
|
+
}
|
|
165
|
+
],
|
|
166
|
+
pagination: {
|
|
167
|
+
pages: [20, 30, 50, 100, 200]
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
export default {
|
|
171
|
+
title: 'Data-grist/accumulator format in ox-grist',
|
|
172
|
+
component: 'ox-grist',
|
|
173
|
+
argTypes: {
|
|
174
|
+
config: { control: 'object' },
|
|
175
|
+
mode: { control: 'select', options: ['GRID', 'LIST', 'CARD'] },
|
|
176
|
+
urlParamsSensitive: { control: 'boolean' },
|
|
177
|
+
withoutSearch: { control: 'boolean' }
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
const Template = ({ config, mode = 'GRID', urlParamsSensitive = false, withoutSearch = false, fetchHandler }) => html ` <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
|
181
|
+
|
|
182
|
+
<link href="/themes/light.css" rel="stylesheet" />
|
|
183
|
+
<link href="/themes/dark.css" rel="stylesheet" />
|
|
184
|
+
<link href="/themes/spacing.css" rel="stylesheet" />
|
|
185
|
+
<link href="/themes/grist-theme.css" rel="stylesheet" />
|
|
186
|
+
|
|
187
|
+
<link
|
|
188
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
|
189
|
+
rel="stylesheet"
|
|
190
|
+
/>
|
|
191
|
+
<link
|
|
192
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
|
193
|
+
rel="stylesheet"
|
|
194
|
+
/>
|
|
195
|
+
<link
|
|
196
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
|
197
|
+
rel="stylesheet"
|
|
198
|
+
/>
|
|
199
|
+
|
|
200
|
+
<style>
|
|
201
|
+
${MDTypeScaleStyles.cssText}
|
|
202
|
+
</style>
|
|
203
|
+
|
|
204
|
+
<style>
|
|
205
|
+
${CommonGristStyles.cssText}
|
|
206
|
+
${CommonHeaderStyles.cssText}
|
|
207
|
+
</style>
|
|
208
|
+
|
|
209
|
+
<style>
|
|
210
|
+
ox-grist {
|
|
211
|
+
height: 600px;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
ox-filters-form {
|
|
215
|
+
flex: 1;
|
|
216
|
+
}
|
|
217
|
+
</style>
|
|
218
|
+
|
|
219
|
+
<ox-grist
|
|
220
|
+
mode="GRID"
|
|
221
|
+
.config=${config}
|
|
222
|
+
.fetchHandler=${fetchHandler}
|
|
223
|
+
?url-params-sensitive=${urlParamsSensitive}
|
|
224
|
+
@filters-change=${(e) => console.log('filters', e.target.filters)}
|
|
225
|
+
>
|
|
226
|
+
<div slot="headroom" class="header">
|
|
227
|
+
<div class="filters">
|
|
228
|
+
<ox-filters-form ?without-search=${withoutSearch} autofocus></ox-filters-form>
|
|
229
|
+
<ox-record-creator id="add" light-popup>
|
|
230
|
+
<button><md-icon>add</md-icon></button>
|
|
231
|
+
</ox-record-creator>
|
|
232
|
+
</div>
|
|
233
|
+
</div>
|
|
234
|
+
</ox-grist>`;
|
|
235
|
+
export const Regular = Template.bind({});
|
|
236
|
+
Regular.args = {
|
|
237
|
+
config,
|
|
238
|
+
fetchHandler,
|
|
239
|
+
mode: 'GRID'
|
|
240
|
+
};
|
|
241
|
+
//# sourceMappingURL=accumulator-format.stories.js.map
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import '../src/data-grist.js';
|
|
2
|
+
import { html } from 'lit';
|
|
3
|
+
import { CommonHeaderStyles, CommonGristStyles } from '@operato/styles';
|
|
4
|
+
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles.js';
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Data-grist/append record position',
|
|
7
|
+
component: 'ox-grist',
|
|
8
|
+
argTypes: {}
|
|
9
|
+
};
|
|
10
|
+
const fetchHandler = async (param) => {
|
|
11
|
+
const { page = 1, limit = 10 } = param;
|
|
12
|
+
const total = 10;
|
|
13
|
+
const start = (page - 1) * limit;
|
|
14
|
+
await new Promise(resolve => setTimeout(resolve, 500));
|
|
15
|
+
return {
|
|
16
|
+
total,
|
|
17
|
+
records: Array(Math.min(limit, total - start))
|
|
18
|
+
.fill('')
|
|
19
|
+
.map((item, idx) => {
|
|
20
|
+
return {
|
|
21
|
+
id: String(start + idx + 1),
|
|
22
|
+
name: `Record ${start + idx + 1}`,
|
|
23
|
+
description: `Description for record ${start + idx + 1}`,
|
|
24
|
+
price: Math.round(Math.random() * 100000),
|
|
25
|
+
qty: Math.round(Math.random() * 10)
|
|
26
|
+
};
|
|
27
|
+
})
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
const config = {
|
|
31
|
+
list: {
|
|
32
|
+
fields: ['name', 'description']
|
|
33
|
+
},
|
|
34
|
+
pagination: {
|
|
35
|
+
infinite: false,
|
|
36
|
+
page: 1,
|
|
37
|
+
limit: 5
|
|
38
|
+
},
|
|
39
|
+
rows: {
|
|
40
|
+
selectable: {
|
|
41
|
+
multiple: true
|
|
42
|
+
},
|
|
43
|
+
appendable: false,
|
|
44
|
+
editable: true,
|
|
45
|
+
classifier: () => { },
|
|
46
|
+
handlers: {},
|
|
47
|
+
groups: [],
|
|
48
|
+
totals: []
|
|
49
|
+
},
|
|
50
|
+
columns: [
|
|
51
|
+
{
|
|
52
|
+
type: 'gutter',
|
|
53
|
+
gutterName: 'sequence'
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
type: 'gutter',
|
|
57
|
+
gutterName: 'row-selector',
|
|
58
|
+
multiple: true
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
type: 'string',
|
|
62
|
+
name: 'id',
|
|
63
|
+
hidden: true
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
type: 'string',
|
|
67
|
+
name: 'name',
|
|
68
|
+
header: '이름',
|
|
69
|
+
record: {
|
|
70
|
+
editable: true
|
|
71
|
+
},
|
|
72
|
+
sortable: true,
|
|
73
|
+
width: 180
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
type: 'string',
|
|
77
|
+
name: 'description',
|
|
78
|
+
header: '설명',
|
|
79
|
+
record: {
|
|
80
|
+
editable: true
|
|
81
|
+
},
|
|
82
|
+
sortable: true,
|
|
83
|
+
width: 200
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
type: 'number',
|
|
87
|
+
name: 'price',
|
|
88
|
+
header: '가격',
|
|
89
|
+
record: {
|
|
90
|
+
editable: true,
|
|
91
|
+
align: 'right'
|
|
92
|
+
},
|
|
93
|
+
sortable: true,
|
|
94
|
+
width: 100
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
type: 'number',
|
|
98
|
+
name: 'qty',
|
|
99
|
+
header: '수량',
|
|
100
|
+
record: {
|
|
101
|
+
editable: true,
|
|
102
|
+
align: 'right'
|
|
103
|
+
},
|
|
104
|
+
sortable: true,
|
|
105
|
+
width: 80
|
|
106
|
+
}
|
|
107
|
+
]
|
|
108
|
+
};
|
|
109
|
+
export const AddRecordToTop = () => {
|
|
110
|
+
return html `
|
|
111
|
+
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
|
112
|
+
|
|
113
|
+
<link href="/themes/light.css" rel="stylesheet" />
|
|
114
|
+
<link href="/themes/dark.css" rel="stylesheet" />
|
|
115
|
+
<link href="/themes/spacing.css" rel="stylesheet" />
|
|
116
|
+
<link href="/themes/grist-theme.css" rel="stylesheet" />
|
|
117
|
+
|
|
118
|
+
<link
|
|
119
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
|
120
|
+
rel="stylesheet"
|
|
121
|
+
/>
|
|
122
|
+
<link
|
|
123
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
|
124
|
+
rel="stylesheet"
|
|
125
|
+
/>
|
|
126
|
+
<link
|
|
127
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
|
128
|
+
rel="stylesheet"
|
|
129
|
+
/>
|
|
130
|
+
|
|
131
|
+
<style>
|
|
132
|
+
.button-container {
|
|
133
|
+
margin-bottom: 16px;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
button {
|
|
137
|
+
padding: 8px 16px;
|
|
138
|
+
background-color: var(--md-sys-color-primary);
|
|
139
|
+
color: var(--md-sys-color-on-primary);
|
|
140
|
+
border: none;
|
|
141
|
+
border-radius: 4px;
|
|
142
|
+
cursor: pointer;
|
|
143
|
+
font-weight: 500;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
button:hover {
|
|
147
|
+
background-color: var(--md-sys-color-primary-container);
|
|
148
|
+
color: var(--md-sys-color-on-primary-container);
|
|
149
|
+
}
|
|
150
|
+
</style>
|
|
151
|
+
|
|
152
|
+
<style>
|
|
153
|
+
${MDTypeScaleStyles.cssText}
|
|
154
|
+
</style>
|
|
155
|
+
|
|
156
|
+
<style>
|
|
157
|
+
${CommonGristStyles.cssText}
|
|
158
|
+
${CommonHeaderStyles.cssText}
|
|
159
|
+
</style>
|
|
160
|
+
|
|
161
|
+
<h2>addRecordToTop 메서드 사용 예시</h2>
|
|
162
|
+
<p>버튼을 클릭하면 새 레코드가 그리드 최상단에 추가됩니다.</p>
|
|
163
|
+
|
|
164
|
+
<ox-grist .mode=${'GRID'} .config=${config} .fetchHandler=${fetchHandler}>
|
|
165
|
+
<div class="button-container" slot="headroom">
|
|
166
|
+
<button
|
|
167
|
+
@click=${(e) => {
|
|
168
|
+
const grist = e.target.closest('ox-grist');
|
|
169
|
+
grist.addRecordToTop({
|
|
170
|
+
name: `신규 레코드 ${new Date().toLocaleTimeString()}`,
|
|
171
|
+
description: '상단에 추가된 레코드',
|
|
172
|
+
price: Math.round(Math.random() * 100000),
|
|
173
|
+
qty: Math.round(Math.random() * 10)
|
|
174
|
+
});
|
|
175
|
+
}}
|
|
176
|
+
>
|
|
177
|
+
상단에 행 추가
|
|
178
|
+
</button>
|
|
179
|
+
</div>
|
|
180
|
+
</ox-grist>
|
|
181
|
+
`;
|
|
182
|
+
};
|
|
183
|
+
//# sourceMappingURL=append-position.stories.js.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import '../src/index.js';
|
|
2
|
+
import '../src/filters/filters-form.js';
|
|
3
|
+
import '../src/sorters/sorters-control.js';
|
|
4
|
+
import '@operato/popup/ox-popup-list.js';
|
|
5
|
+
import '@material/web/icon/icon.js';
|
|
6
|
+
import { TemplateResult } from 'lit';
|
|
7
|
+
declare const _default: {
|
|
8
|
+
title: string;
|
|
9
|
+
component: string;
|
|
10
|
+
argTypes: {
|
|
11
|
+
englishOnly: {
|
|
12
|
+
control: string;
|
|
13
|
+
};
|
|
14
|
+
selectAfterChange: {
|
|
15
|
+
control: string;
|
|
16
|
+
};
|
|
17
|
+
headerFilter: {
|
|
18
|
+
control: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export default _default;
|
|
23
|
+
interface Story<T> {
|
|
24
|
+
(args: T): TemplateResult;
|
|
25
|
+
args?: Partial<T>;
|
|
26
|
+
argTypes?: Record<string, unknown>;
|
|
27
|
+
}
|
|
28
|
+
interface ArgTypes {
|
|
29
|
+
englishOnly: boolean;
|
|
30
|
+
selectAfterChange: boolean;
|
|
31
|
+
headerFilter: boolean;
|
|
32
|
+
}
|
|
33
|
+
export declare const Regular: Story<ArgTypes>;
|