@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
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
# 함수 설명: getToday
|
|
2
|
-
|
|
3
|
-
이 함수는 오늘 날자의 시작시간을 제공합니다.
|
|
4
|
-
|
|
5
|
-
## 함수 시그니처
|
|
6
|
-
|
|
7
|
-
```typescript
|
|
8
|
-
function getToday(
|
|
9
|
-
params: { timeZone?: string; format?: 'timestamp' | 'date' | Intl.DateTimeFormatOptions } = {}
|
|
10
|
-
): Date | number | string
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## 매개변수
|
|
14
|
-
|
|
15
|
-
이 함수는 객체를 매개변수로 받습니다. 이 객체의 필드에 대한 상세한 정보는 다음과 같습니다:
|
|
16
|
-
|
|
17
|
-
- `timeZone?: string`: 시간을 얻고자 하는 시간대를 나타내는 문자열입니다. 이 값이 주어지지 않으면 사용자의 로컬 시간대가 사용됩니다.
|
|
18
|
-
|
|
19
|
-
- `format?: 'timestamp' | 'date' | Intl.DateTimeFormatOptions`: 반환하려는 시간의 형식을 결정합니다. 이 값은 다음 세 가지 중 하나일 수 있습니다:
|
|
20
|
-
- `'timestamp'`: 반환 값이 UNIX 타임스탬프 (1970년 1월 1일 00:00:00 UTC로부터의 밀리초)가 됩니다.
|
|
21
|
-
- `'date'`: 반환 값이 Date 객체가 됩니다.
|
|
22
|
-
- `Intl.DateTimeFormatOptions`: 반환 값이 이 옵션에 따라 포맷된 문자열이 됩니다. 이 값이 제공되지 않으면 기본적으로 Date 객체가 반환됩니다.
|
|
23
|
-
|
|
24
|
-
## 반환 값
|
|
25
|
-
|
|
26
|
-
이 함수는 `string | number | Date` 형식의 값을 반환합니다. 반환 값의 형식은 `format` 매개변수에 따라 결정됩니다.
|
|
27
|
-
|
|
28
|
-
## 예제
|
|
29
|
-
|
|
30
|
-
```typescript
|
|
31
|
-
/* get Date() object */
|
|
32
|
-
const todayDate = getToday({
|
|
33
|
-
timeZone: 'Asia/Seoul',
|
|
34
|
-
loclae: 'en-CA',
|
|
35
|
-
format: 'date'
|
|
36
|
-
})
|
|
37
|
-
|
|
38
|
-
console.log(todayDate)
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
```typescript
|
|
42
|
-
/* text format style */
|
|
43
|
-
const relativeDate = getToday({
|
|
44
|
-
relativeDays: 1,
|
|
45
|
-
timeZone: 'Asia/Seoul',
|
|
46
|
-
format: 'YYYY-MM-DD'
|
|
47
|
-
})
|
|
48
|
-
|
|
49
|
-
console.log(relativeDate)
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
```typescript
|
|
53
|
-
/* Intl.DateTimeFormat style */
|
|
54
|
-
const relativeDate = getToday({
|
|
55
|
-
relativeDays: 1,
|
|
56
|
-
timeZone: 'Asia/Seoul',
|
|
57
|
-
loclae: 'en-CA' /* YYYY-MM-DD format */,
|
|
58
|
-
format: {
|
|
59
|
-
year: 'numeric',
|
|
60
|
-
month: '2-digit',
|
|
61
|
-
day: '2-digit'
|
|
62
|
-
}
|
|
63
|
-
})
|
|
64
|
-
|
|
65
|
-
console.log(relativeDate)
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
이 코드는 오늘의 날짜를 `'Asia/Seoul'` 시간대에서의 Date 객체로 반환합니다.
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
# 함수 설명: getRelativeWeekDate
|
|
2
|
-
|
|
3
|
-
이 함수는 현재 날짜를 기준으로 파라미터로 주어진 상대적인 주(Week)의 상대적인 날짜(Date)의 시작 시간을 제공합니다.
|
|
4
|
-
|
|
5
|
-
## 함수 시그니처
|
|
6
|
-
|
|
7
|
-
```typescript
|
|
8
|
-
function getRelativeWeekDate(params: RelativeWeekDateParams = {}): string | number | Date
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## 매개변수
|
|
12
|
-
|
|
13
|
-
이 함수는 `RelativeWeekDateParams`라는 이름의 타입의 매개변수 객체를 받습니다. 이 객체의 필드에 대한 상세한 정보는 다음과 같습니다:
|
|
14
|
-
|
|
15
|
-
- `relativeWeeks?: number`: 상대적인 주를 나타내는 숫자입니다. 이 값은 현재 날짜로부터의 주 수를 나타냅니다. 예를 들어, 이 값이 3이면 현재 날짜로부터 3주 뒤를 나타냅니다. 이 값이 주어지지 않으면 기본값은 0입니다, 즉 현재 주를 의미합니다.
|
|
16
|
-
|
|
17
|
-
- `relativeDays?: number`: 상대적인 일수를 나타내는 숫자입니다. 이 값은 현재 날짜로부터의 일 수를 나타냅니다. 예를 들어, 이 값이 2이면 현재 날짜로부터 2일 뒤를 나타냅니다. 이 값이 주어지지 않으면 기본값은 0입니다, 즉 현재 날짜를 의미합니다.
|
|
18
|
-
|
|
19
|
-
- `timeZone?: string`: 날짜를 얻고자 하는 시간대를 나타내는 문자열입니다. 이 값이 주어지지 않으면 사용자의 로컬 시간대가 사용됩니다.
|
|
20
|
-
|
|
21
|
-
- `format?: 'timestamp' | 'date' | Intl.DateTimeFormatOptions`: 반환하려는 날짜의 형식을 결정합니다. 이 값은 다음 세 가지 중 하나일 수 있습니다:
|
|
22
|
-
- `'timestamp'`: 반환 값이 UNIX 타임스탬프 (1970년 1월 1일 00:00:00 UTC로부터의 밀리초)가 됩니다.
|
|
23
|
-
- `'date'`: 반환 값이 Date 객체가 됩니다.
|
|
24
|
-
- `Intl.DateTimeFormatOptions`: 반환 값이 이 옵션에 따라 포맷된 문자열이 됩니다. 이 값이 제공되지 않으면 기본적으로 타임스탬프 값이 반환됩니다.
|
|
25
|
-
|
|
26
|
-
## 반환 값
|
|
27
|
-
|
|
28
|
-
이 함수는 `string | number | Date` 형식의 값을 반환합니다. 반환 값의 형식은 `format` 매개변수에 따라 결정됩니다.
|
|
29
|
-
|
|
30
|
-
## 예제
|
|
31
|
-
|
|
32
|
-
```typescript
|
|
33
|
-
/* get Date() object */
|
|
34
|
-
const relativeWeekDate = getRelativeWeekDate({
|
|
35
|
-
relativeWeeks: 2,
|
|
36
|
-
relativeDays: 3,
|
|
37
|
-
timeZone: 'Asia/Seoul',
|
|
38
|
-
loclae: 'en-CA',
|
|
39
|
-
format: 'date'
|
|
40
|
-
})
|
|
41
|
-
|
|
42
|
-
console.log(relativeWeekDate)
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
```typescript
|
|
46
|
-
/* text format style */
|
|
47
|
-
const relativeWeekDate = getRelativeWeekDate({
|
|
48
|
-
relativeWeeks: 2,
|
|
49
|
-
relativeDays: 3,
|
|
50
|
-
timeZone: 'Asia/Seoul',
|
|
51
|
-
format: 'YYYY-MM-DD'
|
|
52
|
-
})
|
|
53
|
-
|
|
54
|
-
console.log(relativeWeekDate)
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
```typescript
|
|
58
|
-
/* Intl.DateTimeFormat style */
|
|
59
|
-
const relativeWeekDate = getRelativeWeekDate({
|
|
60
|
-
relativeWeeks: 2,
|
|
61
|
-
relativeDays: 3,
|
|
62
|
-
timeZone: 'Asia/Seoul',
|
|
63
|
-
loclae: 'en-CA' /* YYYY-MM-DD format */,
|
|
64
|
-
format: {
|
|
65
|
-
year: 'numeric',
|
|
66
|
-
month: '2-digit',
|
|
67
|
-
day: '2-digit'
|
|
68
|
-
}
|
|
69
|
-
})
|
|
70
|
-
|
|
71
|
-
console.log(relativeWeekDate)
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
이 코드는 현재 시간으로부터 2주 후와 3일 후의 날짜를 `'Asia/Seoul'` 시간대에서의 Date 객체로 반환합니다.
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
# 함수 설명: getRelativeYearDate
|
|
2
|
-
|
|
3
|
-
이 함수는 현재 날짜를 기준으로 파라미터로 주어진 상대적인 해(Year)의 상대적인 날짜(Date)의 시작 시간을 제공합니다.
|
|
4
|
-
|
|
5
|
-
## 함수 시그니처
|
|
6
|
-
|
|
7
|
-
```typescript
|
|
8
|
-
function getRelativeYearDate(params: RelativeYearDateParams = {}): string | number | Date
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## 매개변수
|
|
12
|
-
|
|
13
|
-
이 함수는 `RelativeYearDateParams`라는 이름의 타입의 매개변수 객체를 받습니다. 이 객체의 필드에 대한 상세한 정보는 다음과 같습니다:
|
|
14
|
-
|
|
15
|
-
- `relativeYears?: number`: 상대적인 연도를 나타내는 숫자입니다. 이 값은 현재 날짜로부터의 연도 수를 나타냅니다. 예를 들어, 이 값이 3이면 현재 날짜로부터 3년 뒤를 나타냅니다. 이 값이 주어지지 않으면 기본값은 0입니다, 즉 현재 연도를 의미합니다.
|
|
16
|
-
|
|
17
|
-
- `relativeDays?: number`: 상대적인 일수를 나타내는 숫자입니다. 이 값은 현재 날짜로부터의 일 수를 나타냅니다. 예를 들어, 이 값이 2이면 현재 날짜로부터 2일 뒤를 나타냅니다. 이 값이 주어지지 않으면 기본값은 0입니다, 즉 현재 날짜를 의미합니다.
|
|
18
|
-
|
|
19
|
-
- `timeZone?: string`: 날짜를 얻고자 하는 시간대를 나타내는 문자열입니다. 이 값이 주어지지 않으면 사용자의 로컬 시간대가 사용됩니다.
|
|
20
|
-
|
|
21
|
-
- `format?: 'timestamp' | 'date' | Intl.DateTimeFormatOptions`: 반환하려는 날짜의 형식을 결정합니다. 이 값은 다음 세 가지 중 하나일 수 있습니다:
|
|
22
|
-
- `'timestamp'`: 반환 값이 UNIX 타임스탬프 (1970년 1월 1일 00:00:00 UTC로부터의 밀리초)가 됩니다.
|
|
23
|
-
- `'date'`: 반환 값이 Date 객체가 됩니다.
|
|
24
|
-
- `Intl.DateTimeFormatOptions`: 반환 값이 이 옵션에 따라 포맷된 문자열이 됩니다. 이 값이 제공되지 않으면 기본적으로 Date 객체가 반환됩니다.
|
|
25
|
-
|
|
26
|
-
## 반환 값
|
|
27
|
-
|
|
28
|
-
이 함수는 `string | number | Date` 형식의 값을 반환합니다. 반환 값의 형식은 `format` 매개변수에 따라 결정됩니다.
|
|
29
|
-
|
|
30
|
-
## 예제
|
|
31
|
-
|
|
32
|
-
```typescript
|
|
33
|
-
/* get Date() object */
|
|
34
|
-
const relativeYearDate = getRelativeYearDate({
|
|
35
|
-
relativeYears: 2,
|
|
36
|
-
relativeDays: 3,
|
|
37
|
-
timeZone: 'Asia/Seoul',
|
|
38
|
-
loclae: 'en-CA',
|
|
39
|
-
format: 'date'
|
|
40
|
-
})
|
|
41
|
-
|
|
42
|
-
console.log(relativeYearDate)
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
```typescript
|
|
46
|
-
/* text format style */
|
|
47
|
-
const relativeYearDate = getRelativeYearDate({
|
|
48
|
-
relativeYears: 2,
|
|
49
|
-
relativeDays: 3,
|
|
50
|
-
timeZone: 'Asia/Seoul',
|
|
51
|
-
format: 'YYYY-MM-DD'
|
|
52
|
-
})
|
|
53
|
-
|
|
54
|
-
console.log(relativeYearDate)
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
```typescript
|
|
58
|
-
/* Intl.DateTimeFormat style */
|
|
59
|
-
const relativeYearDate = getRelativeYearDate({
|
|
60
|
-
relativeYears: 2,
|
|
61
|
-
relativeDays: 3,
|
|
62
|
-
timeZone: 'Asia/Seoul',
|
|
63
|
-
loclae: 'en-CA' /* YYYY-MM-DD format */,
|
|
64
|
-
format: {
|
|
65
|
-
year: 'numeric',
|
|
66
|
-
month: '2-digit',
|
|
67
|
-
day: '2-digit'
|
|
68
|
-
}
|
|
69
|
-
})
|
|
70
|
-
|
|
71
|
-
console.log(relativeYearDate)
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
이 코드는 현재 시간으로부터 2년 후와 3일 후의 날짜를 `'Asia/Seoul'` 시간대에서의 Date 객체로 반환합니다.
|
package/docs/gutter/gutter.md
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
# Gutter
|
|
2
|
-
|
|
3
|
-
"Gutter"는 테이블 형태에서 각 행의 왼쪽 또는 오른쪽에 위치한 추가적인 열(column)을 가리킵니다. 이 열은 주로 각 행(row)을 식별하거나 특정 작업을 수행하기 위한 버튼 또는 링크와 같은 요소를 표시하는 데 사용됩니다.
|
|
4
|
-
|
|
5
|
-
Gutter 열은 주로 데이터 행에 대한 조작 또는 행의 상태를 나타내는 데 사용됩니다. 예를 들어, 테이블에서 각 행이 특정 작업을 수행하는 버튼을 포함할 때, 이러한 버튼이 Gutter 열에 배치될 수 있습니다. 또한 Gutter 열은 행을 선택하거나 행의 상태를 나타내는 체크박스를 포함할 수도 있습니다.
|
|
6
|
-
|
|
7
|
-
Gutter 열의 구체적인 용도 및 디자인은 개발자 또는 디자이너에게 달려 있으며, 테이블 컴포넌트나 라이브러리에서 지원하는 기능에 따라 다를 수 있습니다. Gutter 열은 데이터 행을 더 유용하게 만들거나 조작할 수 있는 추가적인 공간을 제공하는 중요한 요소입니다.
|
|
@@ -1,408 +0,0 @@
|
|
|
1
|
-
import { expect, fixture } from '@open-wc/testing'
|
|
2
|
-
import { html } from 'lit'
|
|
3
|
-
|
|
4
|
-
import '../src/data-grid/data-grid.js'
|
|
5
|
-
import '../src/data-grid/data-grid-body.js'
|
|
6
|
-
import { buildColumn } from '../src/configure/column-builder.js'
|
|
7
|
-
import { columnText } from '../src/utils/column-text.js'
|
|
8
|
-
import { ZERO_CONFIG, ZERO_DATA } from '../src/configure/zero-config.js'
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Accessible names on the inputs inside the grid.
|
|
12
|
-
*
|
|
13
|
-
* ## Why this is tested
|
|
14
|
-
*
|
|
15
|
-
* Several inputs here had no name: the row-select checkboxes, the header filter boxes, and the IME
|
|
16
|
-
* buffer that holds focus. Position carries the meaning for a sighted reader — a narrow leftmost
|
|
17
|
-
* column means row select, a box under a header name filters that column — but position is a
|
|
18
|
-
* picture, not a relationship, so nothing of it reaches a screen reader.
|
|
19
|
-
*
|
|
20
|
-
* ## What has to hold
|
|
21
|
-
*
|
|
22
|
-
* The name has one source. Editing `header` must change what is announced, which means callers
|
|
23
|
-
* cannot spell the name out again. `columnText()` is that source.
|
|
24
|
-
*
|
|
25
|
-
* `buildColumn` turns a string header into `() => header`, and that function returns a lit template
|
|
26
|
-
* the name cannot be read back out of. The name was disappearing right there.
|
|
27
|
-
*/
|
|
28
|
-
|
|
29
|
-
describe('column name has one source', () => {
|
|
30
|
-
it('keeps the plain text after a string header becomes a function', () => {
|
|
31
|
-
const column = buildColumn({ type: 'string', name: 'palletId', header: '파렛트 번호' })
|
|
32
|
-
|
|
33
|
-
expect(columnText(column)).to.equal('파렛트 번호')
|
|
34
|
-
})
|
|
35
|
-
|
|
36
|
-
it('keeps it when the string arrives as header.renderer', () => {
|
|
37
|
-
const column = buildColumn({ type: 'string', name: 'palletId', header: { renderer: '파렛트 번호' } })
|
|
38
|
-
|
|
39
|
-
expect(columnText(column)).to.equal('파렛트 번호')
|
|
40
|
-
})
|
|
41
|
-
|
|
42
|
-
it('lets label: true inherit the header name', () => {
|
|
43
|
-
const column = buildColumn({ type: 'string', name: 'palletId', header: '파렛트 번호', label: true })
|
|
44
|
-
|
|
45
|
-
expect(columnText(column)).to.equal('파렛트 번호')
|
|
46
|
-
})
|
|
47
|
-
|
|
48
|
-
it('falls back to column.name when the header is drawn by a function', () => {
|
|
49
|
-
const column = buildColumn({ type: 'string', name: 'palletId', header: { renderer: () => html`<i>x</i>` } })
|
|
50
|
-
|
|
51
|
-
expect(columnText(column)).to.equal('palletId')
|
|
52
|
-
})
|
|
53
|
-
|
|
54
|
-
it('invents no name when there is no column', () => {
|
|
55
|
-
expect(columnText(undefined)).to.equal('')
|
|
56
|
-
expect(columnText(null)).to.equal('')
|
|
57
|
-
})
|
|
58
|
-
})
|
|
59
|
-
|
|
60
|
-
describe('row-select boxes are named', () => {
|
|
61
|
-
const columns = [
|
|
62
|
-
{ type: 'gutter', gutterName: 'row-selector', name: '__selected__', multiple: true },
|
|
63
|
-
{ type: 'string', name: 'palletId', header: '파렛트 번호' }
|
|
64
|
-
].map(buildColumn)
|
|
65
|
-
|
|
66
|
-
it('says which row each checkbox selects', async () => {
|
|
67
|
-
const body: any = await fixture(html`
|
|
68
|
-
<ox-grid-body
|
|
69
|
-
.config=${{ ...ZERO_CONFIG, columns }}
|
|
70
|
-
.columns=${columns}
|
|
71
|
-
.data=${{ ...ZERO_DATA, records: [{ palletId: 'P-0001' }, { palletId: 'P-0002' }] }}
|
|
72
|
-
></ox-grid-body>
|
|
73
|
-
`)
|
|
74
|
-
|
|
75
|
-
await body.updateComplete
|
|
76
|
-
|
|
77
|
-
/* The checkboxes live one shadow root deeper, inside each ox-grid-field. */
|
|
78
|
-
const fields = Array.from(body.renderRoot.querySelectorAll('ox-grid-field')) as any[]
|
|
79
|
-
|
|
80
|
-
await Promise.all(fields.map(field => field.updateComplete))
|
|
81
|
-
|
|
82
|
-
const boxes = fields.flatMap(field =>
|
|
83
|
-
Array.from(field.renderRoot?.querySelectorAll('input[type=checkbox], input[type=radio]') || [])
|
|
84
|
-
) as HTMLInputElement[]
|
|
85
|
-
|
|
86
|
-
expect(boxes.length, 'found no row-select box').to.be.greaterThan(0)
|
|
87
|
-
boxes.forEach(box =>
|
|
88
|
-
expect(box.getAttribute('aria-label'), 'an unnamed checkbox is left').to.be.a('string').and.not.equal('')
|
|
89
|
-
)
|
|
90
|
-
})
|
|
91
|
-
})
|
|
92
|
-
|
|
93
|
-
describe('IME buffer names the cell it stands in for', () => {
|
|
94
|
-
const columns = [
|
|
95
|
-
{ type: 'string', name: 'palletId', header: '파렛트 번호' },
|
|
96
|
-
{ type: 'string', name: 'location', header: '보관 위치' }
|
|
97
|
-
].map(buildColumn)
|
|
98
|
-
|
|
99
|
-
async function bodyFocusedAt(column: number) {
|
|
100
|
-
const body: any = await fixture(html`
|
|
101
|
-
<ox-grid-body
|
|
102
|
-
.config=${{ ...ZERO_CONFIG, columns }}
|
|
103
|
-
.columns=${columns}
|
|
104
|
-
.data=${{ ...ZERO_DATA, records: [{ palletId: 'P-0001', location: 'A-01' }] }}
|
|
105
|
-
.focused=${{ row: 0, column }}
|
|
106
|
-
></ox-grid-body>
|
|
107
|
-
`)
|
|
108
|
-
|
|
109
|
-
await body.updateComplete
|
|
110
|
-
|
|
111
|
-
return body.renderRoot.querySelector('#ime-buffer') as HTMLInputElement
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
it('reads the first column while focus sits there', async () => {
|
|
115
|
-
expect((await bodyFocusedAt(0)).getAttribute('aria-label')).to.contain('파렛트 번호')
|
|
116
|
-
})
|
|
117
|
-
|
|
118
|
-
it('changes what it reads when focus moves a column over', async () => {
|
|
119
|
-
expect((await bodyFocusedAt(1)).getAttribute('aria-label')).to.contain('보관 위치')
|
|
120
|
-
})
|
|
121
|
-
|
|
122
|
-
it('stays visible to assistive tech — it is where focus lands', async () => {
|
|
123
|
-
expect((await bodyFocusedAt(0)).getAttribute('aria-hidden')).to.be.null
|
|
124
|
-
})
|
|
125
|
-
})
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* Table semantics.
|
|
129
|
-
*
|
|
130
|
-
* ## Why this is tested
|
|
131
|
-
*
|
|
132
|
-
* The grid is drawn with CSS grid: cells sit flat and there is no row element. Rows are a picture
|
|
133
|
-
* made of equal offsetTop, so a screen reader saw a pile of inputs rather than a table — no "this
|
|
134
|
-
* is a table", no "row 3 column 3", no "40 rows in all".
|
|
135
|
-
*
|
|
136
|
-
* Adding row wrappers can break two things at once:
|
|
137
|
-
*
|
|
138
|
-
* ```
|
|
139
|
-
* semantics grid / row / columnheader / gridcell have to nest correctly
|
|
140
|
-
* layout display: contents must generate no box; if it does, the columns collapse
|
|
141
|
-
* ```
|
|
142
|
-
*
|
|
143
|
-
* The second one is why geometry is asserted: cells in a row must step right, and rows must step
|
|
144
|
-
* down.
|
|
145
|
-
*/
|
|
146
|
-
describe('grid declares itself a grid', () => {
|
|
147
|
-
/* ox-grid takes already-compiled columns; compiling them is ox-grist's job. */
|
|
148
|
-
const columns = [
|
|
149
|
-
{ type: 'gutter', gutterName: 'row-selector', name: '__selected__', multiple: true },
|
|
150
|
-
{ type: 'string', name: 'palletId', header: '파렛트 번호', sortable: true },
|
|
151
|
-
{ type: 'string', name: 'location', header: '보관 위치', sortable: true }
|
|
152
|
-
].map(buildColumn)
|
|
153
|
-
|
|
154
|
-
async function grid(overrides: any = {}) {
|
|
155
|
-
const el: any = await fixture(html`
|
|
156
|
-
<ox-grid
|
|
157
|
-
aria-label="입고 대기 목록"
|
|
158
|
-
.config=${{ ...ZERO_CONFIG, columns, rows: { ...ZERO_CONFIG.rows } }}
|
|
159
|
-
.data=${{
|
|
160
|
-
page: 1,
|
|
161
|
-
limit: 20,
|
|
162
|
-
total: 40,
|
|
163
|
-
records: [
|
|
164
|
-
{ palletId: 'P-0001', location: 'A-01' },
|
|
165
|
-
{ palletId: 'P-0002', location: 'A-02' }
|
|
166
|
-
],
|
|
167
|
-
...overrides
|
|
168
|
-
}}
|
|
169
|
-
></ox-grid>
|
|
170
|
-
`)
|
|
171
|
-
|
|
172
|
-
await el.updateComplete
|
|
173
|
-
|
|
174
|
-
const header = el.renderRoot.querySelector('ox-grid-header')
|
|
175
|
-
const body = el.renderRoot.querySelector('ox-grid-body')
|
|
176
|
-
|
|
177
|
-
await header?.updateComplete
|
|
178
|
-
await body?.updateComplete
|
|
179
|
-
|
|
180
|
-
return { el, header, body }
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
it('nests grid, row and cell', async () => {
|
|
184
|
-
const { el, header, body } = await grid()
|
|
185
|
-
|
|
186
|
-
const grid_ = el.renderRoot.querySelector('[role=grid]')
|
|
187
|
-
|
|
188
|
-
expect(grid_, 'no role=grid').to.exist
|
|
189
|
-
expect(header.getAttribute('role')).to.equal('rowgroup')
|
|
190
|
-
expect(body.getAttribute('role')).to.equal('rowgroup')
|
|
191
|
-
|
|
192
|
-
expect(header.renderRoot.querySelectorAll('[role=row]').length).to.equal(1)
|
|
193
|
-
expect(body.renderRoot.querySelectorAll('[role=row]').length).to.equal(2)
|
|
194
|
-
expect(header.renderRoot.querySelectorAll('[role=columnheader]').length).to.equal(3)
|
|
195
|
-
})
|
|
196
|
-
|
|
197
|
-
it('counts the whole table, not the page on screen', async () => {
|
|
198
|
-
const { el } = await grid()
|
|
199
|
-
|
|
200
|
-
const grid_ = el.renderRoot.querySelector('[role=grid]')
|
|
201
|
-
|
|
202
|
-
/* One header row plus 40 records. Two rows drawn is still a 40-row table. */
|
|
203
|
-
expect(grid_.getAttribute('aria-rowcount')).to.equal('41')
|
|
204
|
-
expect(grid_.getAttribute('aria-colcount')).to.equal('3')
|
|
205
|
-
expect(grid_.getAttribute('aria-label')).to.equal('입고 대기 목록')
|
|
206
|
-
})
|
|
207
|
-
|
|
208
|
-
it('numbers page 2 from row 22, not back at 1', async () => {
|
|
209
|
-
const { body } = await grid({ page: 2 })
|
|
210
|
-
|
|
211
|
-
const rows = Array.from(body.renderRoot.querySelectorAll('[role=row]')) as HTMLElement[]
|
|
212
|
-
|
|
213
|
-
/* One header row plus 20 records on page 1. */
|
|
214
|
-
expect(rows[0].getAttribute('aria-rowindex')).to.equal('22')
|
|
215
|
-
expect(rows[1].getAttribute('aria-rowindex')).to.equal('23')
|
|
216
|
-
})
|
|
217
|
-
|
|
218
|
-
it('numbers columns and leaves the width filler uncounted', async () => {
|
|
219
|
-
const { body } = await grid()
|
|
220
|
-
|
|
221
|
-
const row = body.renderRoot.querySelector('[role=row]') as HTMLElement
|
|
222
|
-
const cells = Array.from(row.querySelectorAll('[role=gridcell]')) as HTMLElement[]
|
|
223
|
-
|
|
224
|
-
expect(cells.map(cell => cell.getAttribute('aria-colindex'))).to.deep.equal(['1', '2', '3'])
|
|
225
|
-
expect(row.querySelectorAll('[role=presentation]').length, 'the filler was counted as a cell').to.equal(1)
|
|
226
|
-
})
|
|
227
|
-
|
|
228
|
-
it('states sort direction in text, not only as an arrow', async () => {
|
|
229
|
-
const el: any = await fixture(html`
|
|
230
|
-
<ox-grid
|
|
231
|
-
.config=${{ ...ZERO_CONFIG, columns, rows: { ...ZERO_CONFIG.rows } }}
|
|
232
|
-
.sorters=${[{ name: 'palletId', desc: true }]}
|
|
233
|
-
.data=${{ records: [{ palletId: 'P-0001', location: 'A-01' }] }}
|
|
234
|
-
></ox-grid>
|
|
235
|
-
`)
|
|
236
|
-
|
|
237
|
-
await el.updateComplete
|
|
238
|
-
|
|
239
|
-
const header = el.renderRoot.querySelector('ox-grid-header')
|
|
240
|
-
await header.updateComplete
|
|
241
|
-
|
|
242
|
-
const headers = Array.from(header.renderRoot.querySelectorAll('[role=columnheader]')) as HTMLElement[]
|
|
243
|
-
const sorts = headers.map(cell => cell.getAttribute('aria-sort'))
|
|
244
|
-
|
|
245
|
-
/* A gutter cannot be sorted; claiming otherwise announces a control that is not there. */
|
|
246
|
-
expect(sorts[0]).to.be.null
|
|
247
|
-
expect(sorts[1], 'sorted descending').to.equal('descending')
|
|
248
|
-
expect(sorts[2], 'sortable but not currently sorted').to.equal('none')
|
|
249
|
-
})
|
|
250
|
-
|
|
251
|
-
it('keeps the layout — a row wrapper that generates a box collapses the grid', async () => {
|
|
252
|
-
const { body } = await grid()
|
|
253
|
-
|
|
254
|
-
const rows = Array.from(body.renderRoot.querySelectorAll('[role=row]')) as HTMLElement[]
|
|
255
|
-
const first = Array.from(rows[0].children) as HTMLElement[]
|
|
256
|
-
|
|
257
|
-
expect(getComputedStyle(rows[0]).display).to.equal('contents')
|
|
258
|
-
|
|
259
|
-
/* Cells step right; stacked at one x means the columns are gone. */
|
|
260
|
-
const lefts = first.map(cell => cell.offsetLeft)
|
|
261
|
-
expect(new Set(lefts).size, 'cells stacked at the same x').to.be.greaterThan(1)
|
|
262
|
-
lefts.slice(1).forEach((left, index) => expect(left).to.be.greaterThan(lefts[index]))
|
|
263
|
-
|
|
264
|
-
/* Rows step down. */
|
|
265
|
-
const firstTop = (rows[0].children[0] as HTMLElement).offsetTop
|
|
266
|
-
const secondTop = (rows[1].children[0] as HTMLElement).offsetTop
|
|
267
|
-
expect(secondTop, 'two rows at the same y').to.be.greaterThan(firstTop)
|
|
268
|
-
})
|
|
269
|
-
})
|
|
270
|
-
|
|
271
|
-
/**
|
|
272
|
-
* Grouped headers.
|
|
273
|
-
*
|
|
274
|
-
* The header becomes two rows and ungrouped columns span both (`.span-both`). Placement runs
|
|
275
|
-
* through CSS `grid-row` / `grid-column`, which makes this the riskiest spot for a row wrapper.
|
|
276
|
-
*/
|
|
277
|
-
describe('grouped header spans two rows', () => {
|
|
278
|
-
const columns = [
|
|
279
|
-
{ type: 'string', name: 'palletId', header: '파렛트 번호' },
|
|
280
|
-
{ type: 'string', name: 'width', header: { renderer: '폭', group: '치수' } },
|
|
281
|
-
{ type: 'string', name: 'height', header: { renderer: '높이', group: '치수' } }
|
|
282
|
-
].map(buildColumn)
|
|
283
|
-
|
|
284
|
-
async function grouped() {
|
|
285
|
-
const el: any = await fixture(html`
|
|
286
|
-
<ox-grid
|
|
287
|
-
.config=${{ ...ZERO_CONFIG, columns, rows: { ...ZERO_CONFIG.rows } }}
|
|
288
|
-
.data=${{ total: 1, records: [{ palletId: 'P-0001', width: '1200', height: '900' }] }}
|
|
289
|
-
></ox-grid>
|
|
290
|
-
`)
|
|
291
|
-
|
|
292
|
-
await el.updateComplete
|
|
293
|
-
|
|
294
|
-
const header = el.renderRoot.querySelector('ox-grid-header')
|
|
295
|
-
const body = el.renderRoot.querySelector('ox-grid-body')
|
|
296
|
-
|
|
297
|
-
await header.updateComplete
|
|
298
|
-
await body.updateComplete
|
|
299
|
-
|
|
300
|
-
return { el, header, body }
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
it('counts two header rows so the body starts at row 3', async () => {
|
|
304
|
-
const { el, header, body } = await grouped()
|
|
305
|
-
|
|
306
|
-
expect(header.renderRoot.querySelectorAll('[role=row]').length).to.equal(2)
|
|
307
|
-
|
|
308
|
-
/* Two header rows plus one record. */
|
|
309
|
-
expect(el.renderRoot.querySelector('[role=grid]').getAttribute('aria-rowcount')).to.equal('3')
|
|
310
|
-
|
|
311
|
-
const rows = Array.from(body.renderRoot.querySelectorAll('[role=row]')) as HTMLElement[]
|
|
312
|
-
expect(rows[0].getAttribute('aria-rowindex')).to.equal('3')
|
|
313
|
-
})
|
|
314
|
-
|
|
315
|
-
it('says how many columns a group covers', async () => {
|
|
316
|
-
const { header } = await grouped()
|
|
317
|
-
|
|
318
|
-
const cells = Array.from(header.renderRoot.querySelectorAll('[role=columnheader]')) as HTMLElement[]
|
|
319
|
-
const first = cells[0]
|
|
320
|
-
const group = cells.find(cell => cell.getAttribute('aria-colspan'))
|
|
321
|
-
|
|
322
|
-
/* An ungrouped column spans both header rows. */
|
|
323
|
-
expect(first.getAttribute('aria-rowspan')).to.equal('2')
|
|
324
|
-
expect(first.getAttribute('aria-colindex')).to.equal('1')
|
|
325
|
-
|
|
326
|
-
/* The group header covers columns 2 and 3. */
|
|
327
|
-
expect(group, 'found no group header').to.exist
|
|
328
|
-
expect(group!.getAttribute('aria-colindex')).to.equal('2')
|
|
329
|
-
expect(group!.getAttribute('aria-colspan')).to.equal('2')
|
|
330
|
-
})
|
|
331
|
-
|
|
332
|
-
it('keeps two-row header placement — group sits above its leaf columns', async () => {
|
|
333
|
-
const { header } = await grouped()
|
|
334
|
-
|
|
335
|
-
const cells = Array.from(header.renderRoot.querySelectorAll('[role=columnheader]')) as HTMLElement[]
|
|
336
|
-
const group = cells.find(cell => cell.getAttribute('aria-colspan'))!
|
|
337
|
-
const leaf = cells.find(cell => !cell.getAttribute('aria-colspan') && cell !== cells[0])!
|
|
338
|
-
|
|
339
|
-
expect(leaf.offsetTop, 'group header and its leaf column at the same height').to.be.greaterThan(group.offsetTop)
|
|
340
|
-
expect(group.offsetWidth, 'group header does not cover two columns').to.be.greaterThan(leaf.offsetWidth)
|
|
341
|
-
})
|
|
342
|
-
})
|
|
343
|
-
|
|
344
|
-
/**
|
|
345
|
-
* The grid wrapper must not disturb the surrounding layout.
|
|
346
|
-
*
|
|
347
|
-
* `role=grid` admits only rows, so the settings-button slot and the pager moved outside the
|
|
348
|
-
* wrapper. Two things then depend on this structure:
|
|
349
|
-
*
|
|
350
|
-
* ```
|
|
351
|
-
* column layout the host is a flex column. The wrapper is itself a flex column (it is the one
|
|
352
|
-
* scroller that header and body share), so the body still takes the height
|
|
353
|
-
* left under the header
|
|
354
|
-
* sibling selector "show the settings button on header hover" is an adjacent-sibling rule, so
|
|
355
|
-
* the button has to sit directly after the wrapper
|
|
356
|
-
* ```
|
|
357
|
-
*/
|
|
358
|
-
describe('grid wrapper stays out of the layout', () => {
|
|
359
|
-
const columns = [
|
|
360
|
-
{ type: 'string', name: 'palletId', header: '파렛트 번호' },
|
|
361
|
-
{ type: 'string', name: 'location', header: '보관 위치' }
|
|
362
|
-
].map(buildColumn)
|
|
363
|
-
|
|
364
|
-
it('places the settings button after the grid, not inside it', async () => {
|
|
365
|
-
const el: any = await fixture(html`
|
|
366
|
-
<ox-grid
|
|
367
|
-
.config=${{ ...ZERO_CONFIG, columns, rows: { ...ZERO_CONFIG.rows } }}
|
|
368
|
-
.data=${{ total: 1, records: [{ palletId: 'P-0001', location: 'A-01' }] }}
|
|
369
|
-
></ox-grid>
|
|
370
|
-
`)
|
|
371
|
-
|
|
372
|
-
await el.updateComplete
|
|
373
|
-
|
|
374
|
-
const grid = el.renderRoot.querySelector('[role=grid]') as HTMLElement
|
|
375
|
-
const setting = el.renderRoot.querySelector('div[setting]') as HTMLElement
|
|
376
|
-
|
|
377
|
-
expect(setting, 'no settings slot').to.exist
|
|
378
|
-
expect(grid.contains(setting), 'settings button inside the grid breaks table reading').to.be.false
|
|
379
|
-
expect(grid.nextElementSibling, 'adjacent-sibling rule no longer holds').to.equal(setting)
|
|
380
|
-
})
|
|
381
|
-
|
|
382
|
-
it('lays header and body out as a column that fills the host', async () => {
|
|
383
|
-
const el: any = await fixture(html`
|
|
384
|
-
<div style="height: 300px; display: flex">
|
|
385
|
-
<ox-grid
|
|
386
|
-
style="flex: 1"
|
|
387
|
-
.config=${{ ...ZERO_CONFIG, columns, rows: { ...ZERO_CONFIG.rows } }}
|
|
388
|
-
.data=${{ total: 1, records: [{ palletId: 'P-0001', location: 'A-01' }] }}
|
|
389
|
-
></ox-grid>
|
|
390
|
-
</div>
|
|
391
|
-
`)
|
|
392
|
-
|
|
393
|
-
const grid = el.querySelector('ox-grid') as any
|
|
394
|
-
await grid.updateComplete
|
|
395
|
-
|
|
396
|
-
const wrapper = grid.renderRoot.querySelector('[role=grid]') as HTMLElement
|
|
397
|
-
const header = grid.renderRoot.querySelector('ox-grid-header') as HTMLElement
|
|
398
|
-
const body = grid.renderRoot.querySelector('ox-grid-body') as HTMLElement
|
|
399
|
-
|
|
400
|
-
expect(getComputedStyle(wrapper).display).to.equal('flex')
|
|
401
|
-
expect(getComputedStyle(wrapper).flexDirection).to.equal('column')
|
|
402
|
-
|
|
403
|
-
/* The body takes the remaining height; a wrapper with a box shrinks it to header height. */
|
|
404
|
-
expect(body.offsetHeight, 'body does not take the remaining height').to.be.greaterThan(100)
|
|
405
|
-
expect(body.offsetTop, 'body is not below the header').to.be.greaterThan(0)
|
|
406
|
-
expect(header.offsetTop).to.equal(0)
|
|
407
|
-
})
|
|
408
|
-
})
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { expect } from '@open-wc/testing'
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* The summary row tags a column with its accumulator's name - `label.accumulator_${type}`.
|
|
5
|
-
*
|
|
6
|
-
* max and min were swapped in all five locales: a column summed with `max` (Math.max) was tagged
|
|
7
|
-
* "min" / 「최소」. The words are written out here per locale, so a swap in any one of them fails.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
const EXPECTED: Record<string, { max: string; min: string }> = {
|
|
11
|
-
en: { max: 'max', min: 'min' },
|
|
12
|
-
ko: { max: '최대', min: '최소' },
|
|
13
|
-
ja: { max: '最大', min: '最小' },
|
|
14
|
-
zh: { max: '最大', min: '最小' },
|
|
15
|
-
ms: { max: 'Maksimum', min: 'Minimum' }
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
async function translations(locale: string): Promise<Record<string, string>> {
|
|
19
|
-
const response = await fetch(new URL(`../../translations/${locale}.json`, import.meta.url))
|
|
20
|
-
expect(response.ok, `${locale}.json is served`).to.equal(true)
|
|
21
|
-
return response.json()
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
describe('accumulator labels', () => {
|
|
25
|
-
for (const [locale, words] of Object.entries(EXPECTED)) {
|
|
26
|
-
it(`${locale}: max is the largest, min the smallest`, async () => {
|
|
27
|
-
const t = await translations(locale)
|
|
28
|
-
expect(t['label.accumulator_max']).to.equal(words.max)
|
|
29
|
-
expect(t['label.accumulator_min']).to.equal(words.min)
|
|
30
|
-
})
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
it('ko: count is 개수', async () => {
|
|
34
|
-
expect((await translations('ko'))['label.accumulator_count']).to.equal('개수')
|
|
35
|
-
})
|
|
36
|
-
})
|