nuxt-ui-tools 1.12.0 → 1.13.0
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/README.md +11 -5
- package/dist/module.json +1 -1
- package/dist/module.mjs +46 -0
- package/dist/runtime/dashboard/components/dashboard-stat.d.vue.ts +1 -1
- package/dist/runtime/dashboard/components/dashboard-stat.vue.d.ts +1 -1
- package/dist/runtime/file-preview/components/shell/file-preview-stage.d.vue.ts +2 -2
- package/dist/runtime/file-preview/components/shell/file-preview-stage.vue.d.ts +2 -2
- package/dist/runtime/i18n/locales/en.js +251 -130
- package/dist/runtime/i18n/locales/fr.js +251 -130
- package/dist/runtime/i18n/types.d.ts +241 -119
- package/dist/runtime/shared/types/remote-options.d.ts +11 -0
- package/dist/runtime/shared/utils/define-remote-options.js +6 -0
- package/dist/runtime/shared/utils/file.d.ts +1 -1
- package/dist/runtime/spreadsheet/components/{steps/review/spreadsheet-review-overflow-alert.d.vue.ts → internal/spreadsheet-import-cell-editor.d.vue.ts} +8 -5
- package/dist/runtime/spreadsheet/components/internal/spreadsheet-import-cell-editor.vue +73 -0
- package/dist/runtime/spreadsheet/components/{steps/review/spreadsheet-review-overflow-alert.vue.d.ts → internal/spreadsheet-import-cell-editor.vue.d.ts} +8 -5
- package/dist/runtime/spreadsheet/components/internal/spreadsheet-import-column-row.d.vue.ts +17 -0
- package/dist/runtime/spreadsheet/components/internal/spreadsheet-import-column-row.vue +98 -0
- package/dist/runtime/spreadsheet/components/internal/spreadsheet-import-column-row.vue.d.ts +17 -0
- package/dist/runtime/spreadsheet/components/internal/spreadsheet-import-heading.d.vue.ts +17 -0
- package/dist/runtime/spreadsheet/components/internal/spreadsheet-import-heading.vue +20 -0
- package/dist/runtime/spreadsheet/components/internal/spreadsheet-import-heading.vue.d.ts +17 -0
- package/dist/runtime/spreadsheet/components/internal/spreadsheet-import-status-badge.d.vue.ts +10 -0
- package/dist/runtime/spreadsheet/components/internal/spreadsheet-import-status-badge.vue +34 -0
- package/dist/runtime/spreadsheet/components/internal/spreadsheet-import-status-badge.vue.d.ts +10 -0
- package/dist/runtime/spreadsheet/components/internal/spreadsheet-import-value-row.d.vue.ts +13 -0
- package/dist/runtime/spreadsheet/components/internal/spreadsheet-import-value-row.vue +113 -0
- package/dist/runtime/spreadsheet/components/internal/spreadsheet-import-value-row.vue.d.ts +13 -0
- package/dist/runtime/spreadsheet/components/parts/spreadsheet-import-column-mapping.d.vue.ts +35 -0
- package/dist/runtime/spreadsheet/components/parts/spreadsheet-import-column-mapping.vue +154 -0
- package/dist/runtime/spreadsheet/components/parts/spreadsheet-import-column-mapping.vue.d.ts +35 -0
- package/dist/runtime/spreadsheet/components/parts/spreadsheet-import-dropzone.d.vue.ts +23 -0
- package/dist/runtime/spreadsheet/components/parts/spreadsheet-import-dropzone.vue +83 -0
- package/dist/runtime/spreadsheet/components/parts/spreadsheet-import-dropzone.vue.d.ts +23 -0
- package/dist/runtime/spreadsheet/components/parts/spreadsheet-import-expected-columns.d.vue.ts +19 -0
- package/dist/runtime/spreadsheet/components/parts/spreadsheet-import-expected-columns.vue +45 -0
- package/dist/runtime/spreadsheet/components/parts/spreadsheet-import-expected-columns.vue.d.ts +19 -0
- package/dist/runtime/spreadsheet/components/{shared/spreadsheet-object-preview-table.d.vue.ts → parts/spreadsheet-import-export-button.d.vue.ts} +3 -2
- package/dist/runtime/spreadsheet/components/parts/spreadsheet-import-export-button.vue +34 -0
- package/dist/runtime/spreadsheet/components/{layout/spreadsheet-import-file-bar.vue.d.ts → parts/spreadsheet-import-export-button.vue.d.ts} +3 -4
- package/dist/runtime/spreadsheet/components/parts/spreadsheet-import-file-card.d.vue.ts +17 -0
- package/dist/runtime/spreadsheet/components/parts/spreadsheet-import-file-card.vue +49 -0
- package/dist/runtime/spreadsheet/components/parts/spreadsheet-import-file-card.vue.d.ts +17 -0
- package/dist/runtime/spreadsheet/components/parts/spreadsheet-import-progress.d.vue.ts +18 -0
- package/dist/runtime/spreadsheet/components/parts/spreadsheet-import-progress.vue +101 -0
- package/dist/runtime/spreadsheet/components/parts/spreadsheet-import-progress.vue.d.ts +18 -0
- package/dist/runtime/spreadsheet/components/parts/spreadsheet-import-row-inspector.d.vue.ts +22 -0
- package/dist/runtime/spreadsheet/components/parts/spreadsheet-import-row-inspector.vue +276 -0
- package/dist/runtime/spreadsheet/components/parts/spreadsheet-import-row-inspector.vue.d.ts +22 -0
- package/dist/runtime/spreadsheet/components/parts/spreadsheet-import-source-settings.d.vue.ts +11 -0
- package/dist/runtime/spreadsheet/components/parts/spreadsheet-import-source-settings.vue +164 -0
- package/dist/runtime/spreadsheet/components/parts/spreadsheet-import-source-settings.vue.d.ts +11 -0
- package/dist/runtime/spreadsheet/components/{shared/spreadsheet-value-preview.d.vue.ts → parts/spreadsheet-import-stat.d.vue.ts} +7 -4
- package/dist/runtime/spreadsheet/components/parts/spreadsheet-import-stat.vue +30 -0
- package/dist/runtime/spreadsheet/components/{shared/spreadsheet-value-preview.vue.d.ts → parts/spreadsheet-import-stat.vue.d.ts} +7 -4
- package/dist/runtime/spreadsheet/components/parts/spreadsheet-import-stats.d.vue.ts +26 -0
- package/dist/runtime/spreadsheet/components/parts/spreadsheet-import-stats.vue +55 -0
- package/dist/runtime/spreadsheet/components/parts/spreadsheet-import-stats.vue.d.ts +26 -0
- package/dist/runtime/spreadsheet/components/{shared/spreadsheet-object-preview-table.vue.d.ts → parts/spreadsheet-import-submit-button.d.vue.ts} +3 -2
- package/dist/runtime/spreadsheet/components/parts/spreadsheet-import-submit-button.vue +27 -0
- package/dist/runtime/spreadsheet/components/parts/spreadsheet-import-submit-button.vue.d.ts +8 -0
- package/dist/runtime/spreadsheet/components/parts/spreadsheet-import-summary.d.vue.ts +16 -0
- package/dist/runtime/spreadsheet/components/parts/spreadsheet-import-summary.vue +51 -0
- package/dist/runtime/spreadsheet/components/parts/spreadsheet-import-summary.vue.d.ts +16 -0
- package/dist/runtime/spreadsheet/components/{layout/spreadsheet-import-file-bar.d.vue.ts → parts/spreadsheet-import-table-toolbar.d.vue.ts} +2 -4
- package/dist/runtime/spreadsheet/components/parts/spreadsheet-import-table-toolbar.vue +217 -0
- package/dist/runtime/spreadsheet/components/{shared/spreadsheet-raw-preview-table.d.vue.ts → parts/spreadsheet-import-table-toolbar.vue.d.ts} +2 -2
- package/dist/runtime/spreadsheet/components/parts/spreadsheet-import-table.d.vue.ts +33 -0
- package/dist/runtime/spreadsheet/components/parts/spreadsheet-import-table.vue +302 -0
- package/dist/runtime/spreadsheet/components/parts/spreadsheet-import-table.vue.d.ts +33 -0
- package/dist/runtime/spreadsheet/components/{layout/spreadsheet-import-sidebar.d.vue.ts → parts/spreadsheet-import-template-button.d.vue.ts} +5 -4
- package/dist/runtime/spreadsheet/components/parts/spreadsheet-import-template-button.vue +31 -0
- package/dist/runtime/spreadsheet/components/{layout/spreadsheet-import-sidebar.vue.d.ts → parts/spreadsheet-import-template-button.vue.d.ts} +5 -4
- package/dist/runtime/spreadsheet/components/parts/spreadsheet-import-value-mapping.d.vue.ts +27 -0
- package/dist/runtime/spreadsheet/components/parts/spreadsheet-import-value-mapping.vue +162 -0
- package/dist/runtime/spreadsheet/components/parts/spreadsheet-import-value-mapping.vue.d.ts +27 -0
- package/dist/runtime/spreadsheet/components/spreadsheet-import-root.d.vue.ts +24 -0
- package/dist/runtime/spreadsheet/components/spreadsheet-import-root.vue +23 -0
- package/dist/runtime/spreadsheet/components/spreadsheet-import-root.vue.d.ts +24 -0
- package/dist/runtime/spreadsheet/components/spreadsheet-import.d.vue.ts +21 -6
- package/dist/runtime/spreadsheet/components/spreadsheet-import.vue +46 -262
- package/dist/runtime/spreadsheet/components/spreadsheet-import.vue.d.ts +21 -6
- package/dist/runtime/spreadsheet/components/{layout/spreadsheet-import-header.d.vue.ts → steps/spreadsheet-import-step-nav.d.vue.ts} +6 -2
- package/dist/runtime/spreadsheet/components/steps/spreadsheet-import-step-nav.vue +116 -0
- package/dist/runtime/spreadsheet/components/{layout/spreadsheet-import-header.vue.d.ts → steps/spreadsheet-import-step-nav.vue.d.ts} +6 -2
- package/dist/runtime/spreadsheet/components/steps/spreadsheet-import-step.d.vue.ts +26 -0
- package/dist/runtime/spreadsheet/components/steps/spreadsheet-import-step.vue +106 -0
- package/dist/runtime/spreadsheet/components/steps/spreadsheet-import-step.vue.d.ts +26 -0
- package/dist/runtime/spreadsheet/components/steps/spreadsheet-import-stepper.d.vue.ts +15 -0
- package/dist/runtime/spreadsheet/components/steps/spreadsheet-import-stepper.vue +131 -0
- package/dist/runtime/spreadsheet/components/steps/spreadsheet-import-stepper.vue.d.ts +15 -0
- package/dist/runtime/spreadsheet/composables/index.d.ts +2 -0
- package/dist/runtime/spreadsheet/composables/index.js +2 -0
- package/dist/runtime/spreadsheet/composables/use-spreadsheet-answers.d.ts +8 -0
- package/dist/runtime/spreadsheet/composables/use-spreadsheet-answers.js +19 -0
- package/dist/runtime/spreadsheet/composables/use-spreadsheet-columns.d.ts +23 -0
- package/dist/runtime/spreadsheet/composables/use-spreadsheet-columns.js +75 -0
- package/dist/runtime/spreadsheet/composables/use-spreadsheet-context.d.ts +8 -45
- package/dist/runtime/spreadsheet/composables/use-spreadsheet-context.js +28 -32
- package/dist/runtime/spreadsheet/composables/use-spreadsheet-edits.d.ts +11 -0
- package/dist/runtime/spreadsheet/composables/use-spreadsheet-edits.js +25 -0
- package/dist/runtime/spreadsheet/composables/use-spreadsheet-fields.d.ts +16 -0
- package/dist/runtime/spreadsheet/composables/use-spreadsheet-fields.js +20 -0
- package/dist/runtime/spreadsheet/composables/use-spreadsheet-file.d.ts +14 -0
- package/dist/runtime/spreadsheet/composables/use-spreadsheet-file.js +44 -0
- package/dist/runtime/spreadsheet/composables/use-spreadsheet-import-context.d.ts +12 -0
- package/dist/runtime/spreadsheet/composables/use-spreadsheet-import-context.js +22 -0
- package/dist/runtime/spreadsheet/composables/use-spreadsheet-import.d.ts +18 -7
- package/dist/runtime/spreadsheet/composables/use-spreadsheet-import.js +340 -109
- package/dist/runtime/spreadsheet/composables/use-spreadsheet-layout.d.ts +36 -0
- package/dist/runtime/spreadsheet/composables/use-spreadsheet-layout.js +95 -0
- package/dist/runtime/spreadsheet/composables/use-spreadsheet-options.d.ts +24 -0
- package/dist/runtime/spreadsheet/composables/use-spreadsheet-options.js +159 -0
- package/dist/runtime/spreadsheet/composables/use-spreadsheet-queries.d.ts +14 -0
- package/dist/runtime/spreadsheet/composables/use-spreadsheet-queries.js +11 -0
- package/dist/runtime/spreadsheet/composables/use-spreadsheet-review.d.ts +37 -169
- package/dist/runtime/spreadsheet/composables/use-spreadsheet-review.js +148 -408
- package/dist/runtime/spreadsheet/composables/use-spreadsheet-rows.d.ts +48 -26
- package/dist/runtime/spreadsheet/composables/use-spreadsheet-rows.js +334 -21
- package/dist/runtime/spreadsheet/composables/use-spreadsheet-steps.d.ts +33 -0
- package/dist/runtime/spreadsheet/composables/use-spreadsheet-steps.js +126 -0
- package/dist/runtime/spreadsheet/composables/use-spreadsheet-submit.d.ts +37 -0
- package/dist/runtime/spreadsheet/composables/use-spreadsheet-submit.js +136 -0
- package/dist/runtime/spreadsheet/composables/use-spreadsheet-values.d.ts +27 -0
- package/dist/runtime/spreadsheet/composables/use-spreadsheet-values.js +121 -0
- package/dist/runtime/spreadsheet/index.d.ts +0 -1
- package/dist/runtime/spreadsheet/index.js +0 -1
- package/dist/runtime/spreadsheet/schema/builder.d.ts +8 -0
- package/dist/runtime/spreadsheet/schema/builder.js +31 -0
- package/dist/runtime/spreadsheet/schema/index.d.ts +24 -32
- package/dist/runtime/spreadsheet/schema/index.js +4 -21
- package/dist/runtime/spreadsheet/types/columns.d.ts +252 -273
- package/dist/runtime/spreadsheet/types/fields.d.ts +64 -0
- package/dist/runtime/spreadsheet/types/importer.d.ts +308 -0
- package/dist/runtime/spreadsheet/types/index.d.ts +6 -10
- package/dist/runtime/spreadsheet/types/options.d.ts +47 -9
- package/dist/runtime/spreadsheet/types/rows.d.ts +57 -48
- package/dist/runtime/spreadsheet/types/schema.d.ts +162 -76
- package/dist/runtime/spreadsheet/types/shared.d.ts +19 -21
- package/dist/runtime/spreadsheet/types/source.d.ts +39 -15
- package/dist/runtime/spreadsheet/types/steps.d.ts +76 -0
- package/dist/runtime/spreadsheet/types/validation.d.ts +49 -69
- package/dist/runtime/spreadsheet/types/values.d.ts +77 -0
- package/dist/runtime/spreadsheet/utils/download.d.ts +2 -0
- package/dist/runtime/spreadsheet/utils/download.js +8 -0
- package/dist/runtime/spreadsheet/utils/export.d.ts +26 -0
- package/dist/runtime/spreadsheet/utils/export.js +50 -0
- package/dist/runtime/spreadsheet/utils/fields.d.ts +26 -0
- package/dist/runtime/spreadsheet/utils/fields.js +169 -0
- package/dist/runtime/spreadsheet/utils/guards.d.ts +18 -0
- package/dist/runtime/spreadsheet/utils/guards.js +27 -0
- package/dist/runtime/spreadsheet/utils/headers.d.ts +15 -0
- package/dist/runtime/spreadsheet/utils/headers.js +36 -0
- package/dist/runtime/spreadsheet/utils/identity.d.ts +24 -0
- package/dist/runtime/spreadsheet/utils/identity.js +57 -0
- package/dist/runtime/spreadsheet/utils/index.d.ts +15 -6
- package/dist/runtime/spreadsheet/utils/index.js +15 -6
- package/dist/runtime/spreadsheet/utils/layout.d.ts +12 -0
- package/dist/runtime/spreadsheet/utils/layout.js +37 -0
- package/dist/runtime/spreadsheet/utils/options.d.ts +31 -10
- package/dist/runtime/spreadsheet/utils/options.js +58 -30
- package/dist/runtime/spreadsheet/utils/parse.d.ts +6 -0
- package/dist/runtime/spreadsheet/utils/parse.js +147 -0
- package/dist/runtime/spreadsheet/utils/paths.d.ts +4 -0
- package/dist/runtime/spreadsheet/utils/paths.js +29 -0
- package/dist/runtime/spreadsheet/utils/rows.d.ts +69 -0
- package/dist/runtime/spreadsheet/utils/rows.js +168 -0
- package/dist/runtime/spreadsheet/utils/rules.d.ts +4 -0
- package/dist/runtime/spreadsheet/utils/rules.js +95 -0
- package/dist/runtime/spreadsheet/utils/suggestions.d.ts +20 -0
- package/dist/runtime/spreadsheet/utils/suggestions.js +43 -0
- package/dist/runtime/spreadsheet/utils/text.d.ts +9 -0
- package/dist/runtime/spreadsheet/utils/text.js +11 -0
- package/dist/runtime/spreadsheet/utils/workbook.d.ts +13 -0
- package/dist/runtime/spreadsheet/utils/workbook.js +121 -0
- package/dist/runtime/table/components/filters/tags/boolean-filter-tag.d.vue.ts +2 -2
- package/dist/runtime/table/components/filters/tags/boolean-filter-tag.vue.d.ts +2 -2
- package/dist/runtime/table/components/filters/tags/date-filter-tag.d.vue.ts +2 -2
- package/dist/runtime/table/components/filters/tags/date-filter-tag.vue.d.ts +2 -2
- package/dist/runtime/table/components/filters/tags/number-filter-tag.d.vue.ts +2 -2
- package/dist/runtime/table/components/filters/tags/number-filter-tag.vue.d.ts +2 -2
- package/dist/runtime/table/components/filters/tags/option-filter-tag.d.vue.ts +2 -2
- package/dist/runtime/table/components/filters/tags/option-filter-tag.vue.d.ts +2 -2
- package/dist/runtime/table/components/filters/tags/text-filter-tag.d.vue.ts +2 -2
- package/dist/runtime/table/components/filters/tags/text-filter-tag.vue.d.ts +2 -2
- package/dist/runtime/table/components/table/table-cell-ellipsis.d.ts +1 -1
- package/dist/runtime/table/utils/data-list-ui.d.ts +1 -1
- package/package.json +18 -3
- package/dist/runtime/spreadsheet/components/layout/spreadsheet-import-file-bar.vue +0 -31
- package/dist/runtime/spreadsheet/components/layout/spreadsheet-import-footer.d.vue.ts +0 -24
- package/dist/runtime/spreadsheet/components/layout/spreadsheet-import-footer.vue +0 -69
- package/dist/runtime/spreadsheet/components/layout/spreadsheet-import-footer.vue.d.ts +0 -24
- package/dist/runtime/spreadsheet/components/layout/spreadsheet-import-header.vue +0 -36
- package/dist/runtime/spreadsheet/components/layout/spreadsheet-import-sidebar.vue +0 -63
- package/dist/runtime/spreadsheet/components/shared/spreadsheet-object-preview-table.vue +0 -67
- package/dist/runtime/spreadsheet/components/shared/spreadsheet-raw-preview-table.vue +0 -41
- package/dist/runtime/spreadsheet/components/shared/spreadsheet-raw-preview-table.vue.d.ts +0 -7
- package/dist/runtime/spreadsheet/components/shared/spreadsheet-summary-stats.d.vue.ts +0 -10
- package/dist/runtime/spreadsheet/components/shared/spreadsheet-summary-stats.vue +0 -25
- package/dist/runtime/spreadsheet/components/shared/spreadsheet-summary-stats.vue.d.ts +0 -10
- package/dist/runtime/spreadsheet/components/shared/spreadsheet-value-preview.vue +0 -201
- package/dist/runtime/spreadsheet/components/steps/matching/spreadsheet-matching-summary.d.vue.ts +0 -11
- package/dist/runtime/spreadsheet/components/steps/matching/spreadsheet-matching-summary.vue +0 -38
- package/dist/runtime/spreadsheet/components/steps/matching/spreadsheet-matching-summary.vue.d.ts +0 -11
- package/dist/runtime/spreadsheet/components/steps/matching/spreadsheet-matching-table.d.vue.ts +0 -45
- package/dist/runtime/spreadsheet/components/steps/matching/spreadsheet-matching-table.vue +0 -219
- package/dist/runtime/spreadsheet/components/steps/matching/spreadsheet-matching-table.vue.d.ts +0 -45
- package/dist/runtime/spreadsheet/components/steps/references/spreadsheet-references-accordion.d.vue.ts +0 -51
- package/dist/runtime/spreadsheet/components/steps/references/spreadsheet-references-accordion.vue +0 -166
- package/dist/runtime/spreadsheet/components/steps/references/spreadsheet-references-accordion.vue.d.ts +0 -51
- package/dist/runtime/spreadsheet/components/steps/references/spreadsheet-references-summary.d.vue.ts +0 -11
- package/dist/runtime/spreadsheet/components/steps/references/spreadsheet-references-summary.vue +0 -26
- package/dist/runtime/spreadsheet/components/steps/references/spreadsheet-references-summary.vue.d.ts +0 -11
- package/dist/runtime/spreadsheet/components/steps/review/spreadsheet-review-inspection.d.vue.ts +0 -41
- package/dist/runtime/spreadsheet/components/steps/review/spreadsheet-review-inspection.vue +0 -392
- package/dist/runtime/spreadsheet/components/steps/review/spreadsheet-review-inspection.vue.d.ts +0 -41
- package/dist/runtime/spreadsheet/components/steps/review/spreadsheet-review-overflow-alert.vue +0 -43
- package/dist/runtime/spreadsheet/components/steps/review/spreadsheet-review-stats.d.vue.ts +0 -15
- package/dist/runtime/spreadsheet/components/steps/review/spreadsheet-review-stats.vue +0 -40
- package/dist/runtime/spreadsheet/components/steps/review/spreadsheet-review-stats.vue.d.ts +0 -15
- package/dist/runtime/spreadsheet/components/steps/spreadsheet-import-matching-step.d.vue.ts +0 -7
- package/dist/runtime/spreadsheet/components/steps/spreadsheet-import-matching-step.vue +0 -137
- package/dist/runtime/spreadsheet/components/steps/spreadsheet-import-matching-step.vue.d.ts +0 -7
- package/dist/runtime/spreadsheet/components/steps/spreadsheet-import-references-step.d.vue.ts +0 -7
- package/dist/runtime/spreadsheet/components/steps/spreadsheet-import-references-step.vue +0 -222
- package/dist/runtime/spreadsheet/components/steps/spreadsheet-import-references-step.vue.d.ts +0 -7
- package/dist/runtime/spreadsheet/components/steps/spreadsheet-import-review-step.d.vue.ts +0 -7
- package/dist/runtime/spreadsheet/components/steps/spreadsheet-import-review-step.vue +0 -191
- package/dist/runtime/spreadsheet/components/steps/spreadsheet-import-review-step.vue.d.ts +0 -7
- package/dist/runtime/spreadsheet/components/steps/spreadsheet-import-structure-step.d.vue.ts +0 -7
- package/dist/runtime/spreadsheet/components/steps/spreadsheet-import-structure-step.vue +0 -62
- package/dist/runtime/spreadsheet/components/steps/spreadsheet-import-structure-step.vue.d.ts +0 -7
- package/dist/runtime/spreadsheet/components/steps/spreadsheet-import-upload-step.d.vue.ts +0 -8
- package/dist/runtime/spreadsheet/components/steps/spreadsheet-import-upload-step.vue +0 -81
- package/dist/runtime/spreadsheet/components/steps/spreadsheet-import-upload-step.vue.d.ts +0 -8
- package/dist/runtime/spreadsheet/components/steps/structure/spreadsheet-structure-preview-table.d.vue.ts +0 -15
- package/dist/runtime/spreadsheet/components/steps/structure/spreadsheet-structure-preview-table.vue +0 -95
- package/dist/runtime/spreadsheet/components/steps/structure/spreadsheet-structure-preview-table.vue.d.ts +0 -15
- package/dist/runtime/spreadsheet/components/steps/structure/spreadsheet-structure-sheet-list.d.vue.ts +0 -15
- package/dist/runtime/spreadsheet/components/steps/structure/spreadsheet-structure-sheet-list.vue +0 -56
- package/dist/runtime/spreadsheet/components/steps/structure/spreadsheet-structure-sheet-list.vue.d.ts +0 -15
- package/dist/runtime/spreadsheet/components/types.d.ts +0 -41
- package/dist/runtime/spreadsheet/composables/use-spreadsheet-column-matching.d.ts +0 -18
- package/dist/runtime/spreadsheet/composables/use-spreadsheet-column-matching.js +0 -62
- package/dist/runtime/spreadsheet/composables/use-spreadsheet-internals.d.ts +0 -629
- package/dist/runtime/spreadsheet/composables/use-spreadsheet-internals.js +0 -68
- package/dist/runtime/spreadsheet/composables/use-spreadsheet-references.d.ts +0 -1
- package/dist/runtime/spreadsheet/composables/use-spreadsheet-references.js +0 -3
- package/dist/runtime/spreadsheet/composables/use-spreadsheet-resolutions.d.ts +0 -40
- package/dist/runtime/spreadsheet/composables/use-spreadsheet-resolutions.js +0 -97
- package/dist/runtime/spreadsheet/composables/use-spreadsheet-row-state.d.ts +0 -24
- package/dist/runtime/spreadsheet/composables/use-spreadsheet-row-state.js +0 -74
- package/dist/runtime/spreadsheet/composables/use-spreadsheet-source.d.ts +0 -27
- package/dist/runtime/spreadsheet/composables/use-spreadsheet-source.js +0 -109
- package/dist/runtime/spreadsheet/composables/use-spreadsheet-view.d.ts +0 -15
- package/dist/runtime/spreadsheet/composables/use-spreadsheet-view.js +0 -109
- package/dist/runtime/spreadsheet/schema/normalize.d.ts +0 -73
- package/dist/runtime/spreadsheet/schema/normalize.js +0 -136
- package/dist/runtime/spreadsheet/types/context.d.ts +0 -9
- package/dist/runtime/spreadsheet/types/import.d.ts +0 -55
- package/dist/runtime/spreadsheet/types/inference.d.ts +0 -83
- package/dist/runtime/spreadsheet/types/normalized.d.ts +0 -50
- package/dist/runtime/spreadsheet/types/normalized.js +0 -0
- package/dist/runtime/spreadsheet/types/pipeline.d.ts +0 -7
- package/dist/runtime/spreadsheet/types/pipeline.js +0 -0
- package/dist/runtime/spreadsheet/types/reference-session.d.ts +0 -43
- package/dist/runtime/spreadsheet/types/reference-session.js +0 -0
- package/dist/runtime/spreadsheet/types/references.d.ts +0 -32
- package/dist/runtime/spreadsheet/types/references.js +0 -0
- package/dist/runtime/spreadsheet/types/resolution.d.ts +0 -43
- package/dist/runtime/spreadsheet/types/resolution.js +0 -0
- package/dist/runtime/spreadsheet/utils/builders/core.d.ts +0 -17
- package/dist/runtime/spreadsheet/utils/builders/core.js +0 -262
- package/dist/runtime/spreadsheet/utils/builders/index.d.ts +0 -1
- package/dist/runtime/spreadsheet/utils/builders/index.js +0 -1
- package/dist/runtime/spreadsheet/utils/context.d.ts +0 -20
- package/dist/runtime/spreadsheet/utils/context.js +0 -25
- package/dist/runtime/spreadsheet/utils/display.d.ts +0 -6
- package/dist/runtime/spreadsheet/utils/display.js +0 -26
- package/dist/runtime/spreadsheet/utils/object.d.ts +0 -9
- package/dist/runtime/spreadsheet/utils/object.js +0 -78
- package/dist/runtime/spreadsheet/utils/references/candidates.d.ts +0 -6
- package/dist/runtime/spreadsheet/utils/references/candidates.js +0 -28
- package/dist/runtime/spreadsheet/utils/references/core.d.ts +0 -3
- package/dist/runtime/spreadsheet/utils/references/core.js +0 -3
- package/dist/runtime/spreadsheet/utils/references/guards.d.ts +0 -4
- package/dist/runtime/spreadsheet/utils/references/guards.js +0 -28
- package/dist/runtime/spreadsheet/utils/references/index.d.ts +0 -1
- package/dist/runtime/spreadsheet/utils/references/index.js +0 -1
- package/dist/runtime/spreadsheet/utils/references/resolutions.d.ts +0 -17
- package/dist/runtime/spreadsheet/utils/references/resolutions.js +0 -172
- package/dist/runtime/spreadsheet/utils/references/shared.d.ts +0 -3
- package/dist/runtime/spreadsheet/utils/references/shared.js +0 -26
- package/dist/runtime/spreadsheet/utils/references/sources.d.ts +0 -9
- package/dist/runtime/spreadsheet/utils/references/sources.js +0 -38
- package/dist/runtime/spreadsheet/utils/rows/core.d.ts +0 -4
- package/dist/runtime/spreadsheet/utils/rows/core.js +0 -4
- package/dist/runtime/spreadsheet/utils/rows/headers.d.ts +0 -2
- package/dist/runtime/spreadsheet/utils/rows/headers.js +0 -9
- package/dist/runtime/spreadsheet/utils/rows/index.d.ts +0 -1
- package/dist/runtime/spreadsheet/utils/rows/index.js +0 -1
- package/dist/runtime/spreadsheet/utils/rows/matching.d.ts +0 -5
- package/dist/runtime/spreadsheet/utils/rows/matching.js +0 -209
- package/dist/runtime/spreadsheet/utils/rows/parsing.d.ts +0 -7
- package/dist/runtime/spreadsheet/utils/rows/parsing.js +0 -209
- package/dist/runtime/spreadsheet/utils/rows/shared.d.ts +0 -17
- package/dist/runtime/spreadsheet/utils/rows/shared.js +0 -309
- package/dist/runtime/spreadsheet/utils/rows/summary.d.ts +0 -2
- package/dist/runtime/spreadsheet/utils/rows/summary.js +0 -10
- package/dist/runtime/spreadsheet/utils/source/core.d.ts +0 -9
- package/dist/runtime/spreadsheet/utils/source/core.js +0 -65
- package/dist/runtime/spreadsheet/utils/source/index.d.ts +0 -1
- package/dist/runtime/spreadsheet/utils/source/index.js +0 -1
- package/dist/runtime/spreadsheet/utils/validation/core.d.ts +0 -16
- package/dist/runtime/spreadsheet/utils/validation/core.js +0 -211
- package/dist/runtime/spreadsheet/utils/validation/index.d.ts +0 -1
- package/dist/runtime/spreadsheet/utils/validation/index.js +0 -1
- /package/dist/runtime/spreadsheet/{components/types.js → types/fields.js} +0 -0
- /package/dist/runtime/spreadsheet/types/{context.js → importer.js} +0 -0
- /package/dist/runtime/spreadsheet/types/{import.js → steps.js} +0 -0
- /package/dist/runtime/spreadsheet/types/{inference.js → values.js} +0 -0
|
@@ -148,144 +148,266 @@ export interface UiToolsTableMessages {
|
|
|
148
148
|
};
|
|
149
149
|
}
|
|
150
150
|
export interface UiToolsSpreadsheetMessages {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
151
|
+
issues: {
|
|
152
|
+
required: string;
|
|
153
|
+
number: string;
|
|
154
|
+
date: string;
|
|
155
|
+
boolean: string;
|
|
156
|
+
unknownValue: string;
|
|
157
|
+
notFound: string;
|
|
158
|
+
skipped: string;
|
|
159
|
+
duplicate: string;
|
|
160
|
+
exists: string;
|
|
161
|
+
email: string;
|
|
162
|
+
pattern: string;
|
|
163
|
+
minLength: string;
|
|
164
|
+
maxLength: string;
|
|
165
|
+
min: string;
|
|
166
|
+
max: string;
|
|
167
|
+
between: string;
|
|
168
|
+
notFuture: string;
|
|
169
|
+
};
|
|
170
|
+
template: {
|
|
171
|
+
sheet: string;
|
|
172
|
+
guide: string;
|
|
173
|
+
column: string;
|
|
174
|
+
required: string;
|
|
175
|
+
allowed: string;
|
|
176
|
+
description: string;
|
|
177
|
+
yes: string;
|
|
168
178
|
};
|
|
169
179
|
steps: {
|
|
170
|
-
|
|
180
|
+
file: string;
|
|
181
|
+
columns: string;
|
|
182
|
+
values: string;
|
|
183
|
+
review: string;
|
|
184
|
+
submit: string;
|
|
185
|
+
auto: string;
|
|
186
|
+
};
|
|
187
|
+
stepHints: {
|
|
188
|
+
file: string;
|
|
189
|
+
columns: string;
|
|
190
|
+
values: string;
|
|
191
|
+
review: string;
|
|
192
|
+
submit: string;
|
|
193
|
+
};
|
|
194
|
+
headings: {
|
|
195
|
+
file: {
|
|
171
196
|
title: string;
|
|
172
197
|
description: string;
|
|
173
|
-
stageTitle: string;
|
|
174
198
|
};
|
|
175
|
-
|
|
199
|
+
columns: {
|
|
176
200
|
title: string;
|
|
177
201
|
description: string;
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
loadWorkbookFirstDescription: string;
|
|
181
|
-
sheetLabel: string;
|
|
182
|
-
previewTitle: string;
|
|
183
|
-
autoDetected: string;
|
|
184
|
-
headerDetectedAtRow: string;
|
|
185
|
-
};
|
|
186
|
-
matching: {
|
|
202
|
+
};
|
|
203
|
+
values: {
|
|
187
204
|
title: string;
|
|
188
205
|
description: string;
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
missing: string;
|
|
192
|
-
autoMapped: string;
|
|
193
|
-
ignored: string;
|
|
194
|
-
ignoreField: string;
|
|
195
|
-
columnFallback: string;
|
|
196
|
-
systemField: string;
|
|
197
|
-
requirement: string;
|
|
198
|
-
spreadsheetColumn: string;
|
|
199
|
-
statusHeader: string;
|
|
200
|
-
required: string;
|
|
201
|
-
optional: string;
|
|
202
|
-
searchColumns: string;
|
|
203
|
-
selectColumn: string;
|
|
204
|
-
assigned: string;
|
|
205
|
-
available: string;
|
|
206
|
-
autoMappedField: string;
|
|
207
|
-
ignoredColumns: string;
|
|
208
|
-
};
|
|
209
|
-
references: {
|
|
206
|
+
};
|
|
207
|
+
review: {
|
|
210
208
|
title: string;
|
|
211
209
|
description: string;
|
|
212
210
|
};
|
|
213
|
-
|
|
211
|
+
submit: {
|
|
214
212
|
title: string;
|
|
215
213
|
description: string;
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
214
|
+
};
|
|
215
|
+
};
|
|
216
|
+
nav: {
|
|
217
|
+
back: string;
|
|
218
|
+
continue: string;
|
|
219
|
+
cancel: string;
|
|
220
|
+
close: string;
|
|
221
|
+
import: string;
|
|
222
|
+
another: string;
|
|
223
|
+
blockers: {
|
|
224
|
+
file: string;
|
|
225
|
+
columns: string;
|
|
226
|
+
values: string;
|
|
227
|
+
review: string;
|
|
228
|
+
invalid: string;
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
|
+
file: {
|
|
232
|
+
dropTitle: string;
|
|
233
|
+
dropBrowse: string;
|
|
234
|
+
dropHint: string;
|
|
235
|
+
dropHintNoLimit: string;
|
|
236
|
+
paste: string;
|
|
237
|
+
reading: string;
|
|
238
|
+
readFailed: string;
|
|
239
|
+
replace: string;
|
|
240
|
+
summary: string;
|
|
241
|
+
sheet: string;
|
|
242
|
+
sheetOption: string;
|
|
243
|
+
headerRow: string;
|
|
244
|
+
rowOption: string;
|
|
245
|
+
emptyRow: string;
|
|
246
|
+
detected: string;
|
|
247
|
+
titleRows: string;
|
|
248
|
+
ambiguous: string;
|
|
249
|
+
noMatch: string;
|
|
250
|
+
useDetected: string;
|
|
251
|
+
previewTitle: string;
|
|
252
|
+
previewHeader: string;
|
|
253
|
+
expected: string;
|
|
254
|
+
expectedCount: string;
|
|
255
|
+
optional: string;
|
|
256
|
+
fromContext: string;
|
|
257
|
+
template: string;
|
|
258
|
+
};
|
|
259
|
+
columns: {
|
|
260
|
+
field: string;
|
|
261
|
+
column: string;
|
|
262
|
+
samples: string;
|
|
263
|
+
none: string;
|
|
264
|
+
columnFor: string;
|
|
265
|
+
emptyColumn: string;
|
|
266
|
+
statuses: {
|
|
267
|
+
matched: string;
|
|
268
|
+
manual: string;
|
|
269
|
+
default: string;
|
|
270
|
+
missing: string;
|
|
271
|
+
unmatched: string;
|
|
272
|
+
};
|
|
273
|
+
suggestion: string;
|
|
274
|
+
useSuggestion: string;
|
|
275
|
+
reset: string;
|
|
276
|
+
reads: string;
|
|
277
|
+
found: string;
|
|
278
|
+
allFound: string;
|
|
279
|
+
unused: string;
|
|
280
|
+
};
|
|
281
|
+
values: {
|
|
282
|
+
value: string;
|
|
283
|
+
rows: string;
|
|
284
|
+
answer: string;
|
|
285
|
+
rowCount: string;
|
|
286
|
+
choose: string;
|
|
287
|
+
search: string;
|
|
288
|
+
loading: string;
|
|
289
|
+
valueFor: string;
|
|
290
|
+
/** Heading of values checked against options that depend on other columns. */
|
|
291
|
+
scope: string;
|
|
292
|
+
condition: string;
|
|
293
|
+
leaveEmpty: string;
|
|
294
|
+
skipRows: string;
|
|
295
|
+
create: string;
|
|
296
|
+
statuses: {
|
|
297
|
+
open: string;
|
|
298
|
+
user: string;
|
|
299
|
+
policy: string;
|
|
300
|
+
recognized: string;
|
|
301
|
+
};
|
|
302
|
+
recognized: string;
|
|
303
|
+
nothing: string;
|
|
304
|
+
};
|
|
305
|
+
table: {
|
|
306
|
+
tabs: {
|
|
307
|
+
all: string;
|
|
308
|
+
importable: string;
|
|
227
309
|
invalid: string;
|
|
228
310
|
discarded: string;
|
|
229
|
-
|
|
311
|
+
};
|
|
312
|
+
levels: {
|
|
313
|
+
all: string;
|
|
230
314
|
blocking: string;
|
|
231
315
|
warnings: string;
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
316
|
+
};
|
|
317
|
+
modes: {
|
|
318
|
+
all: string;
|
|
319
|
+
create: string;
|
|
320
|
+
update: string;
|
|
321
|
+
};
|
|
322
|
+
search: string;
|
|
323
|
+
anyIssue: string;
|
|
324
|
+
byColumn: string;
|
|
325
|
+
byIssue: string;
|
|
326
|
+
columnIssueOption: string;
|
|
327
|
+
issueOption: string;
|
|
328
|
+
clearFilter: string;
|
|
329
|
+
selected: string;
|
|
330
|
+
discard: string;
|
|
331
|
+
restore: string;
|
|
332
|
+
clearSelection: string;
|
|
333
|
+
row: string;
|
|
334
|
+
selectRow: string;
|
|
335
|
+
selectAll: string;
|
|
336
|
+
inspectRow: string;
|
|
337
|
+
empty: string;
|
|
338
|
+
emptyCell: string;
|
|
339
|
+
edited: string;
|
|
340
|
+
defaulted: string;
|
|
341
|
+
created: string;
|
|
342
|
+
stored: string;
|
|
343
|
+
rowCount: string;
|
|
344
|
+
modeCreate: string;
|
|
345
|
+
modeUpdate: string;
|
|
346
|
+
status: {
|
|
347
|
+
valid: string;
|
|
348
|
+
warning: string;
|
|
349
|
+
blocking: string;
|
|
350
|
+
discarded: string;
|
|
351
|
+
};
|
|
352
|
+
reasons: {
|
|
353
|
+
manual: string;
|
|
354
|
+
value: string;
|
|
355
|
+
limit: string;
|
|
356
|
+
duplicate: string;
|
|
357
|
+
existing: string;
|
|
358
|
+
};
|
|
274
359
|
};
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
360
|
+
inspector: {
|
|
361
|
+
title: string;
|
|
362
|
+
close: string;
|
|
363
|
+
position: string;
|
|
364
|
+
positionNone: string;
|
|
365
|
+
previous: string;
|
|
366
|
+
next: string;
|
|
367
|
+
issues: string;
|
|
368
|
+
noIssue: string;
|
|
369
|
+
values: string;
|
|
370
|
+
inFile: string;
|
|
371
|
+
revert: string;
|
|
372
|
+
discard: string;
|
|
373
|
+
restore: string;
|
|
374
|
+
allRows: string;
|
|
375
|
+
answerIt: string;
|
|
376
|
+
};
|
|
377
|
+
stats: {
|
|
378
|
+
importable: string;
|
|
379
|
+
invalid: string;
|
|
380
|
+
discarded: string;
|
|
381
|
+
create: string;
|
|
382
|
+
update: string;
|
|
383
|
+
warnings: string;
|
|
384
|
+
blocking: string;
|
|
385
|
+
};
|
|
386
|
+
review: {
|
|
387
|
+
issuesColumn: string;
|
|
388
|
+
export: string;
|
|
389
|
+
};
|
|
390
|
+
summary: {
|
|
391
|
+
file: string;
|
|
392
|
+
toImport: string;
|
|
393
|
+
create: string;
|
|
394
|
+
update: string;
|
|
395
|
+
invalid: string;
|
|
396
|
+
discarded: string;
|
|
397
|
+
edited: string;
|
|
398
|
+
created: string;
|
|
399
|
+
};
|
|
400
|
+
progress: {
|
|
401
|
+
running: string;
|
|
402
|
+
count: string;
|
|
403
|
+
done: string;
|
|
404
|
+
doneHint: string;
|
|
405
|
+
rejected: string;
|
|
406
|
+
rejectedHint: string;
|
|
407
|
+
retry: string;
|
|
408
|
+
review: string;
|
|
409
|
+
error: string;
|
|
410
|
+
tryAgain: string;
|
|
289
411
|
};
|
|
290
412
|
}
|
|
291
413
|
export interface UiToolsFormMessages {
|
|
@@ -52,6 +52,13 @@ export interface RemoteOptionsLoader<TOption> {
|
|
|
52
52
|
resolveSelected: (request: {
|
|
53
53
|
values: readonly RemoteOptionValue[];
|
|
54
54
|
}) => QueryFnDefinition<readonly TOption[]>;
|
|
55
|
+
/**
|
|
56
|
+
* Options whose label is exactly one of `labels`, in one request. Spreadsheet imports use it to
|
|
57
|
+
* match the values of a file; without it they search each value.
|
|
58
|
+
*/
|
|
59
|
+
resolveLabels?: (request: {
|
|
60
|
+
labels: readonly string[];
|
|
61
|
+
}) => QueryFnDefinition<readonly TOption[]>;
|
|
55
62
|
pagination: RemoteOptionsPagination;
|
|
56
63
|
search?: RemoteOptionsSearch;
|
|
57
64
|
/** Identity of a page query, used by pickers that cache an infinite list as one query. */
|
|
@@ -77,6 +84,10 @@ export interface RemoteOptionsQueries<TPageQuery extends RemoteOptionsQueryDefin
|
|
|
77
84
|
resolveSelected: (request: {
|
|
78
85
|
values: readonly RemoteOptionValue[];
|
|
79
86
|
}) => TSelectedQuery;
|
|
87
|
+
/** Options whose label is one of `labels`; its response has the shape of `resolveSelected`'s. */
|
|
88
|
+
resolveLabels?: (request: {
|
|
89
|
+
labels: readonly string[];
|
|
90
|
+
}) => TSelectedQuery;
|
|
80
91
|
}
|
|
81
92
|
/** Maps endpoint responses to the option result shared by all three pickers. */
|
|
82
93
|
export interface DefineRemoteOptionsConfig<TPageQuery extends RemoteOptionsQueryDefinition, TSelectedQuery extends RemoteOptionsQueryDefinition, TOption extends RemoteOption> {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { mapRemoteOptionsQuery } from "./remote-options-query.js";
|
|
2
2
|
export function defineRemoteOptions(queries, config) {
|
|
3
3
|
const suffix = ["remote-options", config.key];
|
|
4
|
+
const resolveLabels = queries.resolveLabels;
|
|
4
5
|
return {
|
|
5
6
|
load: (request) => mapRemoteOptionsQuery(
|
|
6
7
|
queries.load(request),
|
|
@@ -9,6 +10,11 @@ export function defineRemoteOptions(queries, config) {
|
|
|
9
10
|
),
|
|
10
11
|
pagination: config.pagination,
|
|
11
12
|
queryKeyFor: (request) => [...queries.load(request).queryKey, ...suffix, "page"],
|
|
13
|
+
resolveLabels: resolveLabels ? (request) => mapRemoteOptionsQuery(
|
|
14
|
+
resolveLabels(request),
|
|
15
|
+
config.mapSelected,
|
|
16
|
+
[...suffix, "labels"]
|
|
17
|
+
) : void 0,
|
|
12
18
|
resolveSelected: (request) => mapRemoteOptionsQuery(
|
|
13
19
|
queries.resolveSelected(request),
|
|
14
20
|
config.mapSelected,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare function fileIconName(type: string | null | undefined): "i-lucide-file-
|
|
1
|
+
export declare function fileIconName(type: string | null | undefined): "i-lucide-file-text" | "i-lucide-file-image" | "i-lucide-file-video" | "i-lucide-file-audio" | "i-lucide-file-spreadsheet" | "i-lucide-file-type" | "i-lucide-file-archive" | "i-lucide-file";
|
|
2
2
|
/** Lowercase extension of a file name without the dot, or `null` when it has none. */
|
|
3
3
|
export declare function fileExtension(name: string): string | null;
|
|
4
4
|
export declare function fileExtensionLabel(file: {
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
/** Current text of the cell. */
|
|
3
|
+
text: string;
|
|
4
|
+
/** Labels to pick from, for a select column. */
|
|
5
|
+
choices?: readonly string[];
|
|
5
6
|
};
|
|
6
7
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
|
-
|
|
8
|
+
cancel: () => any;
|
|
9
|
+
commit: (text: string, move?: 1 | -1 | undefined) => any;
|
|
8
10
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
|
-
|
|
11
|
+
onCancel?: (() => any) | undefined;
|
|
12
|
+
onCommit?: ((text: string, move?: 1 | -1 | undefined) => any) | undefined;
|
|
10
13
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
14
|
declare const _default: typeof __VLS_export;
|
|
12
15
|
export default _default;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { nextTick, onMounted, useTemplateRef } from "vue";
|
|
3
|
+
import { useUiToolsLocale } from "#ui-tools/i18n";
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
text: { type: String, required: true },
|
|
6
|
+
choices: { type: Array, required: false }
|
|
7
|
+
});
|
|
8
|
+
const emit = defineEmits(["commit", "cancel"]);
|
|
9
|
+
const { t } = useUiToolsLocale();
|
|
10
|
+
const input = useTemplateRef("input");
|
|
11
|
+
const select = useTemplateRef("select");
|
|
12
|
+
let done = false;
|
|
13
|
+
onMounted(async () => {
|
|
14
|
+
await nextTick();
|
|
15
|
+
if (input.value) {
|
|
16
|
+
input.value.focus({ preventScroll: true });
|
|
17
|
+
input.value.select();
|
|
18
|
+
} else select.value?.focus({ preventScroll: true });
|
|
19
|
+
});
|
|
20
|
+
function finish(text, move) {
|
|
21
|
+
if (done) return;
|
|
22
|
+
done = true;
|
|
23
|
+
emit("commit", text.trim(), move);
|
|
24
|
+
}
|
|
25
|
+
function onKeydown(event) {
|
|
26
|
+
const target = event.target;
|
|
27
|
+
if (!(target instanceof HTMLInputElement || target instanceof HTMLSelectElement)) return;
|
|
28
|
+
if (event.key === "Escape") {
|
|
29
|
+
event.preventDefault();
|
|
30
|
+
done = true;
|
|
31
|
+
emit("cancel");
|
|
32
|
+
} else if (event.key === "Enter") {
|
|
33
|
+
event.preventDefault();
|
|
34
|
+
finish(target.value);
|
|
35
|
+
} else if (event.key === "Tab") {
|
|
36
|
+
event.preventDefault();
|
|
37
|
+
finish(target.value, event.shiftKey ? -1 : 1);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
function onCommit(event) {
|
|
41
|
+
const target = event.target;
|
|
42
|
+
if (target instanceof HTMLInputElement || target instanceof HTMLSelectElement)
|
|
43
|
+
finish(target.value);
|
|
44
|
+
}
|
|
45
|
+
</script>
|
|
46
|
+
|
|
47
|
+
<template>
|
|
48
|
+
<select
|
|
49
|
+
v-if="choices"
|
|
50
|
+
ref="select"
|
|
51
|
+
class="block h-full w-full min-w-40 bg-transparent px-2.5 text-highlighted outline-none"
|
|
52
|
+
@change="onCommit"
|
|
53
|
+
@keydown="onKeydown"
|
|
54
|
+
@blur="onCommit"
|
|
55
|
+
>
|
|
56
|
+
<option v-if="!choices.includes(text)" :value="text" selected>
|
|
57
|
+
{{ text || t("spreadsheet.table.emptyCell") }}
|
|
58
|
+
</option>
|
|
59
|
+
<option v-for="choice in choices" :key="choice" :value="choice" :selected="choice === text">
|
|
60
|
+
{{ choice }}
|
|
61
|
+
</option>
|
|
62
|
+
</select>
|
|
63
|
+
<input
|
|
64
|
+
v-else
|
|
65
|
+
ref="input"
|
|
66
|
+
:value="text"
|
|
67
|
+
autocomplete="off"
|
|
68
|
+
spellcheck="false"
|
|
69
|
+
class="block h-full w-full min-w-40 bg-transparent px-3 text-highlighted outline-none"
|
|
70
|
+
@keydown="onKeydown"
|
|
71
|
+
@blur="onCommit"
|
|
72
|
+
/>
|
|
73
|
+
</template>
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
/** Current text of the cell. */
|
|
3
|
+
text: string;
|
|
4
|
+
/** Labels to pick from, for a select column. */
|
|
5
|
+
choices?: readonly string[];
|
|
5
6
|
};
|
|
6
7
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
|
-
|
|
8
|
+
cancel: () => any;
|
|
9
|
+
commit: (text: string, move?: 1 | -1 | undefined) => any;
|
|
8
10
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
|
-
|
|
11
|
+
onCancel?: (() => any) | undefined;
|
|
12
|
+
onCommit?: ((text: string, move?: 1 | -1 | undefined) => any) | undefined;
|
|
10
13
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
14
|
declare const _default: typeof __VLS_export;
|
|
12
15
|
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { SpreadsheetFieldState, SpreadsheetHeaderCell } from '../../types/index.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
field: SpreadsheetFieldState;
|
|
4
|
+
headers: readonly SpreadsheetHeaderCell[];
|
|
5
|
+
suggestions: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
|
+
reset: () => any;
|
|
9
|
+
assign: (header: number) => any;
|
|
10
|
+
ignore: () => any;
|
|
11
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
12
|
+
onReset?: (() => any) | undefined;
|
|
13
|
+
onAssign?: ((header: number) => any) | undefined;
|
|
14
|
+
onIgnore?: (() => any) | undefined;
|
|
15
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import UButton from "@nuxt/ui/components/Button.vue";
|
|
3
|
+
import USelect from "@nuxt/ui/components/Select.vue";
|
|
4
|
+
import { computed } from "vue";
|
|
5
|
+
import { useUiToolsLocale } from "#ui-tools/i18n";
|
|
6
|
+
const NONE = -1;
|
|
7
|
+
const props = defineProps({
|
|
8
|
+
field: { type: Object, required: true },
|
|
9
|
+
headers: { type: Array, required: true },
|
|
10
|
+
suggestions: { type: Boolean, required: true }
|
|
11
|
+
});
|
|
12
|
+
const emit = defineEmits(["assign", "ignore", "reset"]);
|
|
13
|
+
const { t } = useUiToolsLocale();
|
|
14
|
+
const items = computed(() => [
|
|
15
|
+
{ label: t("spreadsheet.columns.none"), value: NONE },
|
|
16
|
+
...props.headers.filter((header) => header.text).map((header) => ({ label: header.text, value: header.index }))
|
|
17
|
+
]);
|
|
18
|
+
const tone = computed(
|
|
19
|
+
() => ({
|
|
20
|
+
default: "bg-info",
|
|
21
|
+
matched: props.field.assignedBy === "user" ? "bg-primary" : "bg-success",
|
|
22
|
+
missing: "bg-error",
|
|
23
|
+
unmatched: "bg-accented"
|
|
24
|
+
})[props.field.status]
|
|
25
|
+
);
|
|
26
|
+
function select(value) {
|
|
27
|
+
if (value === NONE) emit("ignore");
|
|
28
|
+
else emit("assign", value);
|
|
29
|
+
}
|
|
30
|
+
function useSuggestion() {
|
|
31
|
+
if (props.field.suggestion) emit("assign", props.field.suggestion.header.index);
|
|
32
|
+
}
|
|
33
|
+
</script>
|
|
34
|
+
|
|
35
|
+
<template>
|
|
36
|
+
<div
|
|
37
|
+
:data-spreadsheet-field="field.path"
|
|
38
|
+
:data-status="field.status"
|
|
39
|
+
class="grid grid-cols-1 items-center gap-x-4 gap-y-1.5 px-4 py-3 sm:grid-cols-[minmax(0,1fr)_minmax(0,1.05fr)_minmax(0,1fr)]"
|
|
40
|
+
:class="field.status === 'missing' ? 'bg-error/3' : ''"
|
|
41
|
+
>
|
|
42
|
+
<div class="flex min-w-0 items-center gap-2.5">
|
|
43
|
+
<span class="size-2 shrink-0 rounded-full" :class="tone" />
|
|
44
|
+
<span class="truncate font-medium text-highlighted">{{ field.label }}</span>
|
|
45
|
+
<span v-if="field.required" class="shrink-0 text-error" aria-hidden="true">*</span>
|
|
46
|
+
</div>
|
|
47
|
+
<USelect
|
|
48
|
+
:model-value="field.header?.index ?? NONE"
|
|
49
|
+
:items="items"
|
|
50
|
+
:color="field.status === 'missing' ? 'error' : 'neutral'"
|
|
51
|
+
:highlight="field.status === 'missing'"
|
|
52
|
+
:aria-label="t('spreadsheet.columns.columnFor', { field: field.label })"
|
|
53
|
+
class="w-full"
|
|
54
|
+
@update:model-value="select"
|
|
55
|
+
/>
|
|
56
|
+
<div class="min-w-0 text-[12.5px] leading-snug">
|
|
57
|
+
<template v-if="field.status === 'missing' && suggestions && field.suggestion">
|
|
58
|
+
<span class="text-muted">{{
|
|
59
|
+
t("spreadsheet.columns.suggestion", {
|
|
60
|
+
header: field.suggestion.header.text,
|
|
61
|
+
samples: field.suggestion.samples.join(", ")
|
|
62
|
+
})
|
|
63
|
+
}}</span>
|
|
64
|
+
<UButton
|
|
65
|
+
data-spreadsheet-use-suggestion
|
|
66
|
+
variant="link"
|
|
67
|
+
size="xs"
|
|
68
|
+
class="px-1"
|
|
69
|
+
:label="t('spreadsheet.columns.useSuggestion')"
|
|
70
|
+
@click="useSuggestion"
|
|
71
|
+
/>
|
|
72
|
+
</template>
|
|
73
|
+
<span v-else-if="field.status === 'missing'" class="font-medium text-error">{{
|
|
74
|
+
t("spreadsheet.columns.statuses.missing")
|
|
75
|
+
}}</span>
|
|
76
|
+
<span v-else-if="field.status === 'default'" class="text-info">{{
|
|
77
|
+
t("spreadsheet.columns.statuses.default")
|
|
78
|
+
}}</span>
|
|
79
|
+
<span v-else-if="field.status === 'unmatched'" class="text-dimmed">{{
|
|
80
|
+
t("spreadsheet.columns.statuses.unmatched")
|
|
81
|
+
}}</span>
|
|
82
|
+
<span v-else class="flex min-w-0 items-center gap-1.5">
|
|
83
|
+
<span class="truncate text-muted">{{
|
|
84
|
+
field.samples.join(" \xB7 ") || t("spreadsheet.columns.emptyColumn")
|
|
85
|
+
}}</span>
|
|
86
|
+
<UButton
|
|
87
|
+
v-if="field.assignedBy === 'user'"
|
|
88
|
+
variant="link"
|
|
89
|
+
color="neutral"
|
|
90
|
+
size="xs"
|
|
91
|
+
class="shrink-0 px-0"
|
|
92
|
+
:label="t('spreadsheet.columns.reset')"
|
|
93
|
+
@click="emit('reset')"
|
|
94
|
+
/>
|
|
95
|
+
</span>
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
98
|
+
</template>
|