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
|
@@ -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,17 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
title: string;
|
|
3
|
+
description?: string;
|
|
4
|
+
};
|
|
5
|
+
declare var __VLS_1: {};
|
|
6
|
+
type __VLS_Slots = {} & {
|
|
7
|
+
default?: (props: typeof __VLS_1) => any;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
12
|
+
export default _default;
|
|
13
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
14
|
+
new (): {
|
|
15
|
+
$slots: S;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
defineProps({
|
|
3
|
+
title: { type: String, required: true },
|
|
4
|
+
description: { type: String, required: false }
|
|
5
|
+
});
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<template>
|
|
9
|
+
<div class="flex flex-wrap items-start justify-between gap-3">
|
|
10
|
+
<div class="grid min-w-0 gap-1">
|
|
11
|
+
<h3 class="text-lg font-semibold tracking-[-0.015em] text-balance text-highlighted">
|
|
12
|
+
{{ title }}
|
|
13
|
+
</h3>
|
|
14
|
+
<p v-if="description" class="max-w-[62ch] text-sm text-pretty text-muted">
|
|
15
|
+
{{ description }}
|
|
16
|
+
</p>
|
|
17
|
+
</div>
|
|
18
|
+
<slot />
|
|
19
|
+
</div>
|
|
20
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
title: string;
|
|
3
|
+
description?: string;
|
|
4
|
+
};
|
|
5
|
+
declare var __VLS_1: {};
|
|
6
|
+
type __VLS_Slots = {} & {
|
|
7
|
+
default?: (props: typeof __VLS_1) => any;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
12
|
+
export default _default;
|
|
13
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
14
|
+
new (): {
|
|
15
|
+
$slots: S;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { SpreadsheetRowStatus } from '../../types/index.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
status: SpreadsheetRowStatus;
|
|
4
|
+
count?: number;
|
|
5
|
+
/** Shows the label; the compact form shows an icon and the issue count. */
|
|
6
|
+
full?: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const _default: typeof __VLS_export;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import UIcon from "@nuxt/ui/components/Icon.vue";
|
|
3
|
+
import { computed } from "vue";
|
|
4
|
+
import { useUiToolsLocale } from "#ui-tools/i18n";
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
status: { type: String, required: true },
|
|
7
|
+
count: { type: Number, required: false },
|
|
8
|
+
full: { type: Boolean, required: false }
|
|
9
|
+
});
|
|
10
|
+
const { t } = useUiToolsLocale();
|
|
11
|
+
const config = computed(
|
|
12
|
+
() => ({
|
|
13
|
+
blocking: { classes: "bg-error/10 text-error", icon: "i-lucide-circle-x" },
|
|
14
|
+
discarded: { classes: "bg-elevated text-muted", icon: "i-lucide-ban" },
|
|
15
|
+
valid: { classes: "text-success", icon: "i-lucide-circle-check" },
|
|
16
|
+
warning: { classes: "bg-warning/12 text-warning", icon: "i-lucide-triangle-alert" }
|
|
17
|
+
})[props.status]
|
|
18
|
+
);
|
|
19
|
+
const label = computed(() => t(`spreadsheet.table.status.${props.status}`));
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<template>
|
|
23
|
+
<span
|
|
24
|
+
class="inline-flex h-5 shrink-0 items-center gap-1 rounded-md px-1.5 text-[11.5px] font-semibold whitespace-nowrap tabular-nums"
|
|
25
|
+
:class="config.classes"
|
|
26
|
+
:title="count ? `${label} \xB7 ${count}` : label"
|
|
27
|
+
>
|
|
28
|
+
<UIcon :name="config.icon" class="size-3.5" />
|
|
29
|
+
<template v-if="full"
|
|
30
|
+
>{{ label }}<template v-if="count"> · {{ count }}</template></template
|
|
31
|
+
>
|
|
32
|
+
<template v-else-if="count">{{ count }}</template>
|
|
33
|
+
</span>
|
|
34
|
+
</template>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { SpreadsheetRowStatus } from '../../types/index.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
status: SpreadsheetRowStatus;
|
|
4
|
+
count?: number;
|
|
5
|
+
/** Shows the label; the compact form shows an icon and the issue count. */
|
|
6
|
+
full?: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const _default: typeof __VLS_export;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { SpreadsheetResolvedOption, SpreadsheetValueAnswer, SpreadsheetValueQuestion } from '../../types/index.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
question: SpreadsheetValueQuestion;
|
|
4
|
+
choices: readonly SpreadsheetResolvedOption[];
|
|
5
|
+
search: (text: string) => Promise<readonly SpreadsheetResolvedOption[]>;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
|
+
answer: (answer: SpreadsheetValueAnswer) => any;
|
|
9
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
+
onAnswer?: ((answer: SpreadsheetValueAnswer) => any) | undefined;
|
|
11
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import USelectMenu from "@nuxt/ui/components/SelectMenu.vue";
|
|
3
|
+
import { refDebounced } from "@vueuse/core";
|
|
4
|
+
import { computed, shallowRef, watch } from "vue";
|
|
5
|
+
import { useUiToolsLocale } from "#ui-tools/i18n";
|
|
6
|
+
const props = defineProps({
|
|
7
|
+
question: { type: Object, required: true },
|
|
8
|
+
choices: { type: Array, required: true },
|
|
9
|
+
search: { type: Function, required: true }
|
|
10
|
+
});
|
|
11
|
+
const emit = defineEmits(["answer"]);
|
|
12
|
+
const { t } = useUiToolsLocale();
|
|
13
|
+
const term = shallowRef("");
|
|
14
|
+
const debounced = refDebounced(term, 250);
|
|
15
|
+
const found = shallowRef([]);
|
|
16
|
+
const searching = shallowRef(false);
|
|
17
|
+
watch(debounced, async (text) => {
|
|
18
|
+
if (!props.question.remote) return;
|
|
19
|
+
searching.value = true;
|
|
20
|
+
try {
|
|
21
|
+
found.value = await props.search(text);
|
|
22
|
+
} finally {
|
|
23
|
+
searching.value = false;
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
const options = computed(() => {
|
|
27
|
+
const list = props.question.remote ? found.value : props.choices;
|
|
28
|
+
const answer = props.question.answer;
|
|
29
|
+
if (answer?.action === "map" && !list.some((option) => option.value === answer.value))
|
|
30
|
+
return [{ aliases: [], label: answer.label, value: answer.value }, ...list];
|
|
31
|
+
return list;
|
|
32
|
+
});
|
|
33
|
+
const items = computed(() => [
|
|
34
|
+
...options.value.map((option, index) => ({ label: option.label, value: `option:${index}` })),
|
|
35
|
+
{ type: "separator" },
|
|
36
|
+
...props.question.canCreate ? [
|
|
37
|
+
{
|
|
38
|
+
icon: "i-lucide-plus",
|
|
39
|
+
label: t("spreadsheet.values.create", { value: props.question.value }),
|
|
40
|
+
value: "action:create"
|
|
41
|
+
}
|
|
42
|
+
] : [],
|
|
43
|
+
{
|
|
44
|
+
icon: "i-lucide-eraser",
|
|
45
|
+
label: t("spreadsheet.values.leaveEmpty"),
|
|
46
|
+
value: "action:leave-empty"
|
|
47
|
+
},
|
|
48
|
+
{ icon: "i-lucide-ban", label: t("spreadsheet.values.skipRows"), value: "action:skip-rows" }
|
|
49
|
+
]);
|
|
50
|
+
const selected = computed(() => {
|
|
51
|
+
const answer = props.question.answer;
|
|
52
|
+
if (!answer) return void 0;
|
|
53
|
+
if (answer.action !== "map") return `action:${answer.action}`;
|
|
54
|
+
const index = options.value.findIndex((option) => option.value === answer.value);
|
|
55
|
+
return index < 0 ? void 0 : `option:${index}`;
|
|
56
|
+
});
|
|
57
|
+
const status = computed(
|
|
58
|
+
() => props.question.state === "open" ? "open" : props.question.answeredBy === "policy" ? "policy" : "user"
|
|
59
|
+
);
|
|
60
|
+
function select(value) {
|
|
61
|
+
if (!value) return;
|
|
62
|
+
if (value === "action:create") emit("answer", { action: "create" });
|
|
63
|
+
else if (value === "action:leave-empty") emit("answer", { action: "leave-empty" });
|
|
64
|
+
else if (value === "action:skip-rows") emit("answer", { action: "skip-rows" });
|
|
65
|
+
else {
|
|
66
|
+
const option = options.value[Number(value.slice("option:".length))];
|
|
67
|
+
if (option) emit("answer", { action: "map", label: option.label, value: option.value });
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
</script>
|
|
71
|
+
|
|
72
|
+
<template>
|
|
73
|
+
<div
|
|
74
|
+
:data-spreadsheet-value="question.id"
|
|
75
|
+
:data-state="question.state"
|
|
76
|
+
class="grid grid-cols-[minmax(0,1fr)_auto] items-center gap-x-4 gap-y-2 px-4 py-3 sm:grid-cols-[minmax(0,1fr)_4.5rem_minmax(0,1.15fr)_6.5rem]"
|
|
77
|
+
:class="question.state === 'open' ? 'bg-warning/4' : ''"
|
|
78
|
+
>
|
|
79
|
+
<span
|
|
80
|
+
class="line-clamp-2 min-w-0 font-medium break-words text-highlighted"
|
|
81
|
+
:title="question.value"
|
|
82
|
+
>{{ question.value }}</span
|
|
83
|
+
>
|
|
84
|
+
<span class="text-end text-sm text-muted tabular-nums sm:text-start">{{
|
|
85
|
+
t("spreadsheet.values.rowCount", { count: question.rows.length })
|
|
86
|
+
}}</span>
|
|
87
|
+
<USelectMenu
|
|
88
|
+
v-model:search-term="term"
|
|
89
|
+
:model-value="selected"
|
|
90
|
+
:items="items"
|
|
91
|
+
value-key="value"
|
|
92
|
+
:ignore-filter="question.remote"
|
|
93
|
+
:loading="searching"
|
|
94
|
+
:placeholder="t('spreadsheet.values.choose')"
|
|
95
|
+
:search-input="{ placeholder: t('spreadsheet.values.search') }"
|
|
96
|
+
:color="question.state === 'open' ? 'warning' : 'neutral'"
|
|
97
|
+
:highlight="question.state === 'open'"
|
|
98
|
+
:aria-label="t('spreadsheet.values.valueFor', { value: question.value })"
|
|
99
|
+
class="col-span-2 w-full sm:col-span-1"
|
|
100
|
+
@update:model-value="select"
|
|
101
|
+
/>
|
|
102
|
+
<span
|
|
103
|
+
class="hidden h-5.5 items-center justify-self-start rounded-full px-2 text-[11.5px] font-semibold whitespace-nowrap sm:inline-flex"
|
|
104
|
+
:class="{
|
|
105
|
+
'bg-warning/12 text-warning': status === 'open',
|
|
106
|
+
'bg-primary/10 text-primary': status === 'user',
|
|
107
|
+
'bg-elevated text-muted': status === 'policy'
|
|
108
|
+
}"
|
|
109
|
+
>
|
|
110
|
+
{{ t(`spreadsheet.values.statuses.${status}`) }}
|
|
111
|
+
</span>
|
|
112
|
+
</div>
|
|
113
|
+
</template>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { SpreadsheetResolvedOption, SpreadsheetValueAnswer, SpreadsheetValueQuestion } from '../../types/index.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
question: SpreadsheetValueQuestion;
|
|
4
|
+
choices: readonly SpreadsheetResolvedOption[];
|
|
5
|
+
search: (text: string) => Promise<readonly SpreadsheetResolvedOption[]>;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
|
+
answer: (answer: SpreadsheetValueAnswer) => any;
|
|
9
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
+
onAnswer?: ((answer: SpreadsheetValueAnswer) => any) | undefined;
|
|
11
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { SpreadsheetFieldState, SpreadsheetHeaderCell, SpreadsheetImporter } from '../../types/index.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
importer?: SpreadsheetImporter;
|
|
4
|
+
/** `missing`: only fields without a column; renders nothing when every field has one. */
|
|
5
|
+
only?: 'missing';
|
|
6
|
+
/** Missing fields first, the others folded. Defaults to `true`. */
|
|
7
|
+
groupByStatus?: boolean;
|
|
8
|
+
/** Offers a column whose values fit a missing field. Defaults to `true`. */
|
|
9
|
+
suggestions?: boolean;
|
|
10
|
+
};
|
|
11
|
+
type __VLS_Slots = {
|
|
12
|
+
default?: (props: {
|
|
13
|
+
fields: readonly SpreadsheetFieldState[];
|
|
14
|
+
headers: readonly SpreadsheetHeaderCell[];
|
|
15
|
+
assign: (field: string, header: number) => void;
|
|
16
|
+
ignore: (field: string) => void;
|
|
17
|
+
reset: (field: string) => void;
|
|
18
|
+
}) => unknown;
|
|
19
|
+
field?: (props: {
|
|
20
|
+
field: SpreadsheetFieldState;
|
|
21
|
+
}) => unknown;
|
|
22
|
+
};
|
|
23
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
24
|
+
only: "missing";
|
|
25
|
+
suggestions: boolean;
|
|
26
|
+
groupByStatus: boolean;
|
|
27
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
28
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
29
|
+
declare const _default: typeof __VLS_export;
|
|
30
|
+
export default _default;
|
|
31
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
32
|
+
new (): {
|
|
33
|
+
$slots: S;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import UIcon from "@nuxt/ui/components/Icon.vue";
|
|
3
|
+
import { computed, shallowRef, watch, watchEffect } from "vue";
|
|
4
|
+
import { useUiToolsLocale } from "#ui-tools/i18n";
|
|
5
|
+
import { useSpreadsheetImporter } from "../../composables/use-spreadsheet-import-context";
|
|
6
|
+
import SpreadsheetImportColumnRow from "../internal/spreadsheet-import-column-row.vue";
|
|
7
|
+
const props = defineProps({
|
|
8
|
+
importer: { type: Object, required: false },
|
|
9
|
+
only: { type: String, required: false, default: void 0 },
|
|
10
|
+
groupByStatus: { type: Boolean, required: false, default: true },
|
|
11
|
+
suggestions: { type: Boolean, required: false, default: true }
|
|
12
|
+
});
|
|
13
|
+
defineSlots();
|
|
14
|
+
const importer = useSpreadsheetImporter(() => props.importer);
|
|
15
|
+
const { t } = useUiToolsLocale();
|
|
16
|
+
const open = shallowRef(false);
|
|
17
|
+
const fields = computed(() => importer.value.columns.fields.filter((field) => !field.from));
|
|
18
|
+
const attentionPaths = shallowRef(/* @__PURE__ */ new Set());
|
|
19
|
+
watch(
|
|
20
|
+
() => importer.value.columns.headers,
|
|
21
|
+
() => {
|
|
22
|
+
attentionPaths.value = /* @__PURE__ */ new Set();
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
watchEffect(() => {
|
|
26
|
+
if (!importer.value.file.loaded) return;
|
|
27
|
+
const missing = fields.value.filter(
|
|
28
|
+
(field) => field.status === "missing" && !attentionPaths.value.has(field.path)
|
|
29
|
+
);
|
|
30
|
+
if (missing.length)
|
|
31
|
+
attentionPaths.value = /* @__PURE__ */ new Set([...attentionPaths.value, ...missing.map((field) => field.path)]);
|
|
32
|
+
});
|
|
33
|
+
const attention = computed(
|
|
34
|
+
() => fields.value.filter(
|
|
35
|
+
(field) => attentionPaths.value.has(field.path) || field.status === "missing"
|
|
36
|
+
)
|
|
37
|
+
);
|
|
38
|
+
const others = computed(() => fields.value.filter((field) => !attention.value.includes(field)));
|
|
39
|
+
const sections = computed(() => {
|
|
40
|
+
const list = [];
|
|
41
|
+
for (const field of others.value) {
|
|
42
|
+
const key = field.group?.path ?? "";
|
|
43
|
+
const section = list.find((entry) => entry.key === key);
|
|
44
|
+
if (section) section.fields.push(field);
|
|
45
|
+
else list.push({ fields: [field], key, label: field.group?.label ?? "" });
|
|
46
|
+
}
|
|
47
|
+
return list.sort((left, right) => (left.key ? 1 : 0) - (right.key ? 1 : 0));
|
|
48
|
+
});
|
|
49
|
+
const unused = computed(() => importer.value.columns.unusedHeaders.map((header) => header.text));
|
|
50
|
+
const visible = computed(
|
|
51
|
+
() => importer.value.file.loaded && (props.only === "missing" ? attention.value.length > 0 : fields.value.length > 0)
|
|
52
|
+
);
|
|
53
|
+
function assign(field, header) {
|
|
54
|
+
importer.value.columns.assign(field, header);
|
|
55
|
+
}
|
|
56
|
+
function ignore(field) {
|
|
57
|
+
importer.value.columns.ignore(field);
|
|
58
|
+
}
|
|
59
|
+
function reset(field) {
|
|
60
|
+
importer.value.columns.reset(field);
|
|
61
|
+
}
|
|
62
|
+
</script>
|
|
63
|
+
|
|
64
|
+
<template>
|
|
65
|
+
<div v-if="visible" data-spreadsheet-column-mapping class="grid gap-4">
|
|
66
|
+
<slot
|
|
67
|
+
:fields="fields"
|
|
68
|
+
:headers="importer.columns.headers"
|
|
69
|
+
:assign="assign"
|
|
70
|
+
:ignore="ignore"
|
|
71
|
+
:reset="reset"
|
|
72
|
+
>
|
|
73
|
+
<div
|
|
74
|
+
v-if="attention.length || !groupByStatus"
|
|
75
|
+
class="divide-y divide-default overflow-hidden rounded-xl border border-default bg-default"
|
|
76
|
+
>
|
|
77
|
+
<template v-for="field in groupByStatus ? attention : fields" :key="field.path">
|
|
78
|
+
<slot name="field" :field="field">
|
|
79
|
+
<SpreadsheetImportColumnRow
|
|
80
|
+
:field="field"
|
|
81
|
+
:headers="importer.columns.headers"
|
|
82
|
+
:suggestions="suggestions"
|
|
83
|
+
@assign="(header) => assign(field.path, header)"
|
|
84
|
+
@ignore="ignore(field.path)"
|
|
85
|
+
@reset="reset(field.path)"
|
|
86
|
+
/>
|
|
87
|
+
</slot>
|
|
88
|
+
</template>
|
|
89
|
+
</div>
|
|
90
|
+
<div
|
|
91
|
+
v-else-if="only !== 'missing'"
|
|
92
|
+
class="flex items-center gap-3 rounded-xl border border-default bg-default px-4 py-3.5"
|
|
93
|
+
>
|
|
94
|
+
<span
|
|
95
|
+
class="grid size-8 shrink-0 place-items-center rounded-full bg-success/10 text-success"
|
|
96
|
+
>
|
|
97
|
+
<UIcon name="i-lucide-check" class="size-4" />
|
|
98
|
+
</span>
|
|
99
|
+
<span class="font-medium text-highlighted">{{ t("spreadsheet.columns.allFound") }}</span>
|
|
100
|
+
</div>
|
|
101
|
+
|
|
102
|
+
<div
|
|
103
|
+
v-if="groupByStatus && only !== 'missing' && others.length"
|
|
104
|
+
class="overflow-hidden rounded-xl border border-default bg-default"
|
|
105
|
+
>
|
|
106
|
+
<button
|
|
107
|
+
type="button"
|
|
108
|
+
class="flex w-full items-center gap-2 px-4 py-3 text-start text-sm font-medium text-toned hover:bg-elevated/60"
|
|
109
|
+
:aria-expanded="open"
|
|
110
|
+
@click="open = !open"
|
|
111
|
+
>
|
|
112
|
+
<UIcon
|
|
113
|
+
name="i-lucide-chevron-right"
|
|
114
|
+
class="size-4 text-dimmed transition-transform"
|
|
115
|
+
:class="open ? 'rotate-90' : ''"
|
|
116
|
+
/>
|
|
117
|
+
{{
|
|
118
|
+
t("spreadsheet.columns.found", {
|
|
119
|
+
count: others.filter((field2) => field2.status === "matched").length
|
|
120
|
+
})
|
|
121
|
+
}}
|
|
122
|
+
</button>
|
|
123
|
+
<div v-if="open" class="border-t border-default">
|
|
124
|
+
<template v-for="section in sections" :key="section.key">
|
|
125
|
+
<div
|
|
126
|
+
v-if="section.label"
|
|
127
|
+
class="border-b border-default bg-elevated/50 px-4 py-1.5 text-[11px] font-semibold tracking-[0.08em] text-dimmed uppercase"
|
|
128
|
+
>
|
|
129
|
+
{{ section.label }}
|
|
130
|
+
</div>
|
|
131
|
+
<div class="divide-y divide-default border-b border-default last:border-b-0">
|
|
132
|
+
<template v-for="field in section.fields" :key="field.path">
|
|
133
|
+
<slot name="field" :field="field">
|
|
134
|
+
<SpreadsheetImportColumnRow
|
|
135
|
+
:field="field"
|
|
136
|
+
:headers="importer.columns.headers"
|
|
137
|
+
:suggestions="suggestions"
|
|
138
|
+
@assign="(header) => assign(field.path, header)"
|
|
139
|
+
@ignore="ignore(field.path)"
|
|
140
|
+
@reset="reset(field.path)"
|
|
141
|
+
/>
|
|
142
|
+
</slot>
|
|
143
|
+
</template>
|
|
144
|
+
</div>
|
|
145
|
+
</template>
|
|
146
|
+
</div>
|
|
147
|
+
</div>
|
|
148
|
+
|
|
149
|
+
<p v-if="only !== 'missing' && unused.length" class="text-sm text-muted">
|
|
150
|
+
{{ t("spreadsheet.columns.unused", { columns: unused.join(", ") }) }}
|
|
151
|
+
</p>
|
|
152
|
+
</slot>
|
|
153
|
+
</div>
|
|
154
|
+
</template>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { SpreadsheetFieldState, SpreadsheetHeaderCell, SpreadsheetImporter } from '../../types/index.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
importer?: SpreadsheetImporter;
|
|
4
|
+
/** `missing`: only fields without a column; renders nothing when every field has one. */
|
|
5
|
+
only?: 'missing';
|
|
6
|
+
/** Missing fields first, the others folded. Defaults to `true`. */
|
|
7
|
+
groupByStatus?: boolean;
|
|
8
|
+
/** Offers a column whose values fit a missing field. Defaults to `true`. */
|
|
9
|
+
suggestions?: boolean;
|
|
10
|
+
};
|
|
11
|
+
type __VLS_Slots = {
|
|
12
|
+
default?: (props: {
|
|
13
|
+
fields: readonly SpreadsheetFieldState[];
|
|
14
|
+
headers: readonly SpreadsheetHeaderCell[];
|
|
15
|
+
assign: (field: string, header: number) => void;
|
|
16
|
+
ignore: (field: string) => void;
|
|
17
|
+
reset: (field: string) => void;
|
|
18
|
+
}) => unknown;
|
|
19
|
+
field?: (props: {
|
|
20
|
+
field: SpreadsheetFieldState;
|
|
21
|
+
}) => unknown;
|
|
22
|
+
};
|
|
23
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
24
|
+
only: "missing";
|
|
25
|
+
suggestions: boolean;
|
|
26
|
+
groupByStatus: boolean;
|
|
27
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
28
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
29
|
+
declare const _default: typeof __VLS_export;
|
|
30
|
+
export default _default;
|
|
31
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
32
|
+
new (): {
|
|
33
|
+
$slots: S;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { SpreadsheetImporter } from '../../types/index.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
importer?: SpreadsheetImporter;
|
|
4
|
+
};
|
|
5
|
+
declare var __VLS_1: {
|
|
6
|
+
load: (source: import("../../types/index.js").SpreadsheetFileSource, name?: string) => void;
|
|
7
|
+
paste: (text: string, name?: string) => void;
|
|
8
|
+
reading: boolean;
|
|
9
|
+
error: unknown;
|
|
10
|
+
accept: readonly string[];
|
|
11
|
+
};
|
|
12
|
+
type __VLS_Slots = {} & {
|
|
13
|
+
default?: (props: typeof __VLS_1) => any;
|
|
14
|
+
};
|
|
15
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
17
|
+
declare const _default: typeof __VLS_export;
|
|
18
|
+
export default _default;
|
|
19
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
20
|
+
new (): {
|
|
21
|
+
$slots: S;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import UIcon from "@nuxt/ui/components/Icon.vue";
|
|
3
|
+
import { computed, shallowRef } from "vue";
|
|
4
|
+
import { useUiToolsLocale } from "#ui-tools/i18n";
|
|
5
|
+
import { useSpreadsheetImporter } from "../../composables/use-spreadsheet-import-context";
|
|
6
|
+
const DEFAULT_ACCEPT = [".xlsx", ".xls", ".csv"];
|
|
7
|
+
const props = defineProps({
|
|
8
|
+
importer: { type: Object, required: false }
|
|
9
|
+
});
|
|
10
|
+
const importer = useSpreadsheetImporter(() => props.importer);
|
|
11
|
+
const { t } = useUiToolsLocale();
|
|
12
|
+
const dragging = shallowRef(false);
|
|
13
|
+
const accept = computed(() => importer.value.schema.file?.accept ?? DEFAULT_ACCEPT);
|
|
14
|
+
const hint = computed(() => {
|
|
15
|
+
const types = accept.value.join(", ");
|
|
16
|
+
const max = importer.value.schema.file?.maxRows;
|
|
17
|
+
return max ? t("spreadsheet.file.dropHint", { count: max.toLocaleString(), types }) : t("spreadsheet.file.dropHintNoLimit", { types });
|
|
18
|
+
});
|
|
19
|
+
function load(file) {
|
|
20
|
+
if (file) importer.value.file.load(file);
|
|
21
|
+
}
|
|
22
|
+
function onDrop(event) {
|
|
23
|
+
dragging.value = false;
|
|
24
|
+
load(event.dataTransfer?.files[0]);
|
|
25
|
+
}
|
|
26
|
+
function onChange(event) {
|
|
27
|
+
if (event.target instanceof HTMLInputElement) load(event.target.files?.[0]);
|
|
28
|
+
}
|
|
29
|
+
function onPaste(event) {
|
|
30
|
+
const text = event.clipboardData?.getData("text/plain");
|
|
31
|
+
if (text?.includes(" ") || text?.includes("\n")) importer.value.file.paste(text);
|
|
32
|
+
}
|
|
33
|
+
</script>
|
|
34
|
+
|
|
35
|
+
<template>
|
|
36
|
+
<div data-spreadsheet-dropzone class="grid gap-2">
|
|
37
|
+
<slot
|
|
38
|
+
:load="importer.file.load"
|
|
39
|
+
:paste="importer.file.paste"
|
|
40
|
+
:reading="importer.file.reading"
|
|
41
|
+
:error="importer.file.error"
|
|
42
|
+
:accept="accept"
|
|
43
|
+
>
|
|
44
|
+
<label
|
|
45
|
+
tabindex="0"
|
|
46
|
+
class="flex cursor-pointer items-center gap-4 rounded-xl border-[1.5px] border-dashed px-5 py-4.5 transition-colors outline-none focus-visible:border-primary focus-visible:ring-2 focus-visible:ring-primary/25"
|
|
47
|
+
:class="
|
|
48
|
+
dragging ? 'border-primary bg-primary/6' : 'border-accented bg-default hover:border-primary hover:bg-primary/3'
|
|
49
|
+
"
|
|
50
|
+
@dragover.prevent="dragging = true"
|
|
51
|
+
@dragleave="dragging = false"
|
|
52
|
+
@drop.prevent="onDrop"
|
|
53
|
+
@paste="onPaste"
|
|
54
|
+
>
|
|
55
|
+
<span
|
|
56
|
+
class="grid size-11 shrink-0 place-items-center rounded-lg bg-elevated text-muted"
|
|
57
|
+
aria-hidden="true"
|
|
58
|
+
>
|
|
59
|
+
<span
|
|
60
|
+
v-if="importer.file.reading"
|
|
61
|
+
class="size-4.5 animate-spin rounded-full border-2 border-accented border-t-primary"
|
|
62
|
+
/>
|
|
63
|
+
<UIcon v-else name="i-lucide-file-up" class="size-5" />
|
|
64
|
+
</span>
|
|
65
|
+
<span class="grid min-w-0 gap-0.5">
|
|
66
|
+
<span class="font-medium text-highlighted">
|
|
67
|
+
{{ t("spreadsheet.file.dropTitle") }}
|
|
68
|
+
<span class="text-primary underline decoration-primary/40 underline-offset-2">{{
|
|
69
|
+
t("spreadsheet.file.dropBrowse")
|
|
70
|
+
}}</span>
|
|
71
|
+
</span>
|
|
72
|
+
<span class="text-sm text-muted">{{ hint }}</span>
|
|
73
|
+
</span>
|
|
74
|
+
<input type="file" class="sr-only" :accept="accept.join(',')" @change="onChange" />
|
|
75
|
+
</label>
|
|
76
|
+
<p v-if="importer.file.error" class="flex items-center gap-1.5 text-sm text-error">
|
|
77
|
+
<UIcon name="i-lucide-circle-x" class="size-4 shrink-0" />
|
|
78
|
+
{{ t("spreadsheet.file.readFailed") }}
|
|
79
|
+
</p>
|
|
80
|
+
<p v-else class="text-xs text-dimmed">{{ t("spreadsheet.file.paste") }}</p>
|
|
81
|
+
</slot>
|
|
82
|
+
</div>
|
|
83
|
+
</template>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { SpreadsheetImporter } from '../../types/index.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
importer?: SpreadsheetImporter;
|
|
4
|
+
};
|
|
5
|
+
declare var __VLS_1: {
|
|
6
|
+
load: (source: import("../../types/index.js").SpreadsheetFileSource, name?: string) => void;
|
|
7
|
+
paste: (text: string, name?: string) => void;
|
|
8
|
+
reading: boolean;
|
|
9
|
+
error: unknown;
|
|
10
|
+
accept: readonly string[];
|
|
11
|
+
};
|
|
12
|
+
type __VLS_Slots = {} & {
|
|
13
|
+
default?: (props: typeof __VLS_1) => any;
|
|
14
|
+
};
|
|
15
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
17
|
+
declare const _default: typeof __VLS_export;
|
|
18
|
+
export default _default;
|
|
19
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
20
|
+
new (): {
|
|
21
|
+
$slots: S;
|
|
22
|
+
};
|
|
23
|
+
};
|
package/dist/runtime/spreadsheet/components/parts/spreadsheet-import-expected-columns.d.vue.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { SpreadsheetFieldState, SpreadsheetImporter } from '../../types/index.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
importer?: SpreadsheetImporter;
|
|
4
|
+
};
|
|
5
|
+
type __VLS_Slots = {
|
|
6
|
+
column?: (props: {
|
|
7
|
+
field: SpreadsheetFieldState;
|
|
8
|
+
}) => unknown;
|
|
9
|
+
actions?: () => unknown;
|
|
10
|
+
};
|
|
11
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|
|
15
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
16
|
+
new (): {
|
|
17
|
+
$slots: S;
|
|
18
|
+
};
|
|
19
|
+
};
|