@ivandt/importer 1.0.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 +30 -0
- package/dist/assets/importer.css +1 -0
- package/dist/importer.cjs.js +514 -0
- package/dist/importer.d.ts +1 -0
- package/dist/importer.es.js +91645 -0
- package/dist/index-C1bluYVj.js +118 -0
- package/dist/index-CI2WmQs5.cjs +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.es.js +8 -0
- package/dist/src/importer.d.ts +0 -0
- package/dist/src/index.d.ts +7 -0
- package/dist/src/lib/IvtImporter.svelte.d.ts +1 -0
- package/dist/src/lib/actions/applyToColumn.d.ts +6 -0
- package/dist/src/lib/actions/autoIncrementIdsAction.d.ts +3 -0
- package/dist/src/lib/actions/backwardFillAction.d.ts +3 -0
- package/dist/src/lib/actions/clampRangeAction.d.ts +3 -0
- package/dist/src/lib/actions/clearCellRangeAction.d.ts +3 -0
- package/dist/src/lib/actions/clearCulmn.d.ts +3 -0
- package/dist/src/lib/actions/combineColumnsAction.d.ts +4 -0
- package/dist/src/lib/actions/defaultValueAction.d.ts +3 -0
- package/dist/src/lib/actions/dispatcher.d.ts +5 -0
- package/dist/src/lib/actions/fillWithTimestampAction.d.ts +3 -0
- package/dist/src/lib/actions/findAndReplace.d.ts +3 -0
- package/dist/src/lib/actions/formatDatesAction.d.ts +9 -0
- package/dist/src/lib/actions/formatPhoneNumbersAction.d.ts +0 -0
- package/dist/src/lib/actions/forwardFillAction.d.ts +3 -0
- package/dist/src/lib/actions/fuzzyFixAction/fastestfuzzyFixAction.d.ts +7 -0
- package/dist/src/lib/actions/fuzzyFixAction/fuzzyFixAction.d.ts +3 -0
- package/dist/src/lib/actions/fuzzyFixAction/fuzzyFixAction.spec.d.ts +1 -0
- package/dist/src/lib/actions/generateUUIDsAction.d.ts +3 -0
- package/dist/src/lib/actions/lookupCountryNamesAction.d.ts +18 -0
- package/dist/src/lib/actions/mapToEnumAction.d.ts +4 -0
- package/dist/src/lib/actions/normalizeUrlsAction.d.ts +30 -0
- package/dist/src/lib/actions/normalizeZScoreAction.d.ts +24 -0
- package/dist/src/lib/actions/padStringAction.d.ts +3 -0
- package/dist/src/lib/actions/parseNumberAction.d.ts +3 -0
- package/dist/src/lib/actions/regexReplaceAction.d.ts +3 -0
- package/dist/src/lib/actions/removeDuplicatesAction.d.ts +3 -0
- package/dist/src/lib/actions/roundNumbersAction.d.ts +3 -0
- package/dist/src/lib/actions/scaleNumbersAction.d.ts +3 -0
- package/dist/src/lib/actions/specs/autoIncrementIdsAction.spec.d.ts +1 -0
- package/dist/src/lib/actions/specs/backwardFillAction.spec.d.ts +1 -0
- package/dist/src/lib/actions/specs/clampRangeAction.spec.d.ts +1 -0
- package/dist/src/lib/actions/specs/clearCellRangeAction.spec.d.ts +1 -0
- package/dist/src/lib/actions/specs/combineColumnsAction.spec.d.ts +1 -0
- package/dist/src/lib/actions/specs/fillWithTimestampAction.spec.d.ts +1 -0
- package/dist/src/lib/actions/specs/findAndReplace.spec.d.ts +1 -0
- package/dist/src/lib/actions/specs/formatDatesAction.spec.d.ts +1 -0
- package/dist/src/lib/actions/specs/forwardFillAction.spec.d.ts +1 -0
- package/dist/src/lib/actions/specs/generateUUIDsAction.spec.d.ts +1 -0
- package/dist/src/lib/actions/specs/lookupCountryNamesAction.spec.d.ts +1 -0
- package/dist/src/lib/actions/specs/normalizeUrlsAction.spec.d.ts +1 -0
- package/dist/src/lib/actions/specs/normalizeZScoreAction.spec.d.ts +1 -0
- package/dist/src/lib/actions/specs/padStringAction.spec.d.ts +1 -0
- package/dist/src/lib/actions/specs/parseNumberAction.spec.d.ts +1 -0
- package/dist/src/lib/actions/specs/regexReplaceAction.spec.d.ts +1 -0
- package/dist/src/lib/actions/specs/removeDuplicatesAction.spec.d.ts +1 -0
- package/dist/src/lib/actions/specs/roundNumbersAction.spec.d.ts +1 -0
- package/dist/src/lib/actions/specs/scaleNumbersAction.spec.d.ts +1 -0
- package/dist/src/lib/actions/specs/stripHtmlTagsAction.spec.d.ts +1 -0
- package/dist/src/lib/actions/specs/titleCaseTextAction.spec.d.ts +1 -0
- package/dist/src/lib/actions/specs/toLowerCaseAction.spec.d.ts +1 -0
- package/dist/src/lib/actions/specs/toUpperCaseAction.spec.d.ts +1 -0
- package/dist/src/lib/actions/specs/trimWhitespaceAction.spec.d.ts +1 -0
- package/dist/src/lib/actions/specs/truncateTextAction.spec.d.ts +1 -0
- package/dist/src/lib/actions/stripHtmlTagsAction.d.ts +3 -0
- package/dist/src/lib/actions/titleCaseTextAction.d.ts +3 -0
- package/dist/src/lib/actions/toLowerCaseAction.d.ts +3 -0
- package/dist/src/lib/actions/toUpperCaseAction.d.ts +3 -0
- package/dist/src/lib/actions/trimWhitespace.d.ts +3 -0
- package/dist/src/lib/actions/truncateTextAction.d.ts +3 -0
- package/dist/src/lib/api/suggestMapHeaders.d.ts +5 -0
- package/dist/src/lib/api/validateApiKey.d.ts +2 -0
- package/dist/src/lib/components/IvtAnimatedDots.svelte.d.ts +1 -0
- package/dist/src/lib/components/IvtAutocomplete.svelte.d.ts +1 -0
- package/dist/src/lib/components/IvtCellMenu.svelte.d.ts +1 -0
- package/dist/src/lib/components/IvtCellTooltip.svelte.d.ts +1 -0
- package/dist/src/lib/components/IvtChooseHeader.svelte.d.ts +1 -0
- package/dist/src/lib/components/IvtColDescTooltip.svelte.d.ts +1 -0
- package/dist/src/lib/components/IvtCombineDialog.svelte.d.ts +1 -0
- package/dist/src/lib/components/IvtConfirmDialog.svelte.d.ts +1 -0
- package/dist/src/lib/components/IvtContextMenu/IvtContextMenu.svelte.d.ts +1 -0
- package/dist/src/lib/components/IvtContextMenu/contentMenu.util.d.ts +3 -0
- package/dist/src/lib/components/IvtContextMenu/contextMenu.store.d.ts +10 -0
- package/dist/src/lib/components/IvtDialog.svelte.d.ts +1 -0
- package/dist/src/lib/components/IvtDiffTable/DiffTableLogic.d.ts +12 -0
- package/dist/src/lib/components/IvtDiffTable/DiffTableLogic.spec.d.ts +1 -0
- package/dist/src/lib/components/IvtDiffTable/IngDiffTable.spec.d.ts +1 -0
- package/dist/src/lib/components/IvtDiffTable/IvtDiffTable.svelte.d.ts +1 -0
- package/dist/src/lib/components/IvtExportExcel.svelte.d.ts +1 -0
- package/dist/src/lib/components/IvtFindAndReplaceDialog.svelte.d.ts +1 -0
- package/dist/src/lib/components/IvtFullPageTextLoading.svelte.d.ts +1 -0
- package/dist/src/lib/components/IvtHot.svelte.d.ts +1 -0
- package/dist/src/lib/components/IvtInfoTooltip.svelte.d.ts +1 -0
- package/dist/src/lib/components/IvtMapHeaders.svelte.d.ts +1 -0
- package/dist/src/lib/components/IvtMappingWarningDialog.svelte.d.ts +1 -0
- package/dist/src/lib/components/IvtMention/Caret.d.ts +45 -0
- package/dist/src/lib/components/IvtMention/IvtMention.spec.d.ts +1 -0
- package/dist/src/lib/components/IvtMention/IvtMention.svelte.d.ts +1 -0
- package/dist/src/lib/components/IvtMention/renderTemplate.d.ts +2 -0
- package/dist/src/lib/components/IvtMention/renderTemplate.spec.d.ts +1 -0
- package/dist/src/lib/components/IvtMention/replaceLabelsWithValues.d.ts +2 -0
- package/dist/src/lib/components/IvtPaginator.svelte.d.ts +1 -0
- package/dist/src/lib/components/IvtSmartFixButton.svelte.d.ts +1 -0
- package/dist/src/lib/components/IvtStepper/IvtStepper.svelte.d.ts +1 -0
- package/dist/src/lib/components/IvtStepper/constants.d.ts +14 -0
- package/dist/src/lib/components/IvtSubmitDialog.svelte.d.ts +1 -0
- package/dist/src/lib/components/IvtTable.svelte.d.ts +1 -0
- package/dist/src/lib/components/IvtTableBadges.svelte.d.ts +1 -0
- package/dist/src/lib/components/IvtTableWrapper.svelte.d.ts +1 -0
- package/dist/src/lib/components/IvtToast.svelte.d.ts +1 -0
- package/dist/src/lib/components/IvtToasts.svelte.d.ts +1 -0
- package/dist/src/lib/components/IvtTooltip.svelte.d.ts +1 -0
- package/dist/src/lib/components/IvtUploadIcons.svelte.d.ts +1 -0
- package/dist/src/lib/components/IvtUploader.svelte.d.ts +1 -0
- package/dist/src/lib/constants.d.ts +17 -0
- package/dist/src/lib/icons/IconCSV.svelte.d.ts +1 -0
- package/dist/src/lib/icons/IconCheck.svelte.d.ts +1 -0
- package/dist/src/lib/icons/IconClearColumn.svelte.d.ts +1 -0
- package/dist/src/lib/icons/IconClose.svelte.d.ts +1 -0
- package/dist/src/lib/icons/IconCombined.svelte.d.ts +1 -0
- package/dist/src/lib/icons/IconError.svelte.d.ts +1 -0
- package/dist/src/lib/icons/IconExcel.svelte.d.ts +1 -0
- package/dist/src/lib/icons/IconFindAndReplace.svelte.d.ts +1 -0
- package/dist/src/lib/icons/IconIntelligence.svelte.d.ts +1 -0
- package/dist/src/lib/icons/IconPDF.svelte.d.ts +1 -0
- package/dist/src/lib/icons/IconRemoveColumn.svelte.d.ts +1 -0
- package/dist/src/lib/icons/IconReplaceEmptyCells.svelte.d.ts +1 -0
- package/dist/src/lib/icons/IconTick.svelte.d.ts +1 -0
- package/dist/src/lib/icons/InfoIcon.svelte.d.ts +1 -0
- package/dist/src/lib/renderers/date-picker.renderer.d.ts +1 -0
- package/dist/src/lib/services/eventHandler.service.d.ts +26 -0
- package/dist/src/lib/store/activeBadge.store.d.ts +3 -0
- package/dist/src/lib/store/constants.d.ts +2 -0
- package/dist/src/lib/store/dataSource.store.d.ts +28 -0
- package/dist/src/lib/store/dataSource.store.spec.d.ts +1 -0
- package/dist/src/lib/store/dialog.store.d.ts +16 -0
- package/dist/src/lib/store/excel-parser.store.d.ts +4 -0
- package/dist/src/lib/store/file.store.d.ts +7 -0
- package/dist/src/lib/store/fileHeaders.store.d.ts +2 -0
- package/dist/src/lib/store/fuzzy.store.d.ts +3 -0
- package/dist/src/lib/store/index.d.ts +13 -0
- package/dist/src/lib/store/initialiseStores.d.ts +3 -0
- package/dist/src/lib/store/mapping.store.d.ts +5 -0
- package/dist/src/lib/store/schema.store.d.ts +3 -0
- package/dist/src/lib/store/stepper.store.d.ts +9 -0
- package/dist/src/lib/store/tableRows.store.d.ts +3 -0
- package/dist/src/lib/store/toast.store.d.ts +4 -0
- package/dist/src/lib/store/validations.store.d.ts +38 -0
- package/dist/src/lib/store/validations.store.spec.d.ts +1 -0
- package/dist/src/lib/types/dto.types.d.ts +10 -0
- package/dist/src/lib/types/events.d.ts +9 -0
- package/dist/src/lib/types/external.types.d.ts +66 -0
- package/dist/src/lib/types/index.d.ts +7 -0
- package/dist/src/lib/types/internal.types.d.ts +143 -0
- package/dist/src/lib/types/parser.types.d.ts +53 -0
- package/dist/src/lib/types/schema.types.d.ts +118 -0
- package/dist/src/lib/types/table.types.d.ts +4 -0
- package/dist/src/lib/types/transformActions.types.d.ts +266 -0
- package/dist/src/lib/types/validators.types.d.ts +113 -0
- package/dist/src/lib/utils/augmentCellChangesWithTableRows.d.ts +21 -0
- package/dist/src/lib/utils/augmentCellChangesWithTableRows.spec.d.ts +1 -0
- package/dist/src/lib/utils/augmentChangesForCrossFieldValidation.d.ts +2 -0
- package/dist/src/lib/utils/augmentChangesForCrossFieldValidation.spec.d.ts +1 -0
- package/dist/src/lib/utils/createField.d.ts +2 -0
- package/dist/src/lib/utils/createFileReaderStore.d.ts +3 -0
- package/dist/src/lib/utils/debounce.d.ts +5 -0
- package/dist/src/lib/utils/downloadTemplate.d.ts +2 -0
- package/dist/src/lib/utils/formatFileSize.d.ts +1 -0
- package/dist/src/lib/utils/getAllPossibleOptions.d.ts +2 -0
- package/dist/src/lib/utils/getCellChangesRowsRange.d.ts +2 -0
- package/dist/src/lib/utils/getCellChangesRowsRange.spec.d.ts +1 -0
- package/dist/src/lib/utils/getEventCords.d.ts +2 -0
- package/dist/src/lib/utils/getFileExtension.d.ts +2 -0
- package/dist/src/lib/utils/hasCalculatedField.d.ts +3 -0
- package/dist/src/lib/utils/hasFullColumnValidators.d.ts +3 -0
- package/dist/src/lib/utils/hot/convertHotDataToIngTableRows.d.ts +2 -0
- package/dist/src/lib/utils/hot/convertTableRowsToHotCellChanges.d.ts +2 -0
- package/dist/src/lib/utils/hot/convertTableRowsToHotData.d.ts +2 -0
- package/dist/src/lib/utils/hot/searchColumn.d.ts +3 -0
- package/dist/src/lib/utils/hot/searchColumn.spec.d.ts +1 -0
- package/dist/src/lib/utils/hot/valueDropdownCellType.d.ts +17 -0
- package/dist/src/lib/utils/isAllMapped.d.ts +3 -0
- package/dist/src/lib/utils/isEqualValue.d.ts +2 -0
- package/dist/src/lib/utils/isEqualValue.spec.d.ts +1 -0
- package/dist/src/lib/utils/isNoOpChanges.d.ts +2 -0
- package/dist/src/lib/utils/isOfType.d.ts +8 -0
- package/dist/src/lib/utils/isSelectOptions.d.ts +1 -0
- package/dist/src/lib/utils/mappers/mapHeaders.d.ts +17 -0
- package/dist/src/lib/utils/mappers/mapHeaders.spec.d.ts +1 -0
- package/dist/src/lib/utils/mappers/mapIngToHotColumns.d.ts +3 -0
- package/dist/src/lib/utils/mustache.d.ts +2 -0
- package/dist/src/lib/utils/mustache.spec.d.ts +1 -0
- package/dist/src/lib/utils/normaliseSchema.d.ts +9 -0
- package/dist/src/lib/utils/normaliseSchema.spec.d.ts +1 -0
- package/dist/src/lib/utils/normalizeFieldOrder/normalizeFieldOrder.d.ts +7 -0
- package/dist/src/lib/utils/normalizeFieldOrder/normalizeFieldOrder.spec.d.ts +1 -0
- package/dist/src/lib/utils/parseNumberOrReturnNull.d.ts +2 -0
- package/dist/src/lib/utils/parseNumberOrReturnNull.spec.d.ts +1 -0
- package/dist/src/lib/utils/sanitiseFieldMappingsAndExtractFieldsForWorker.d.ts +4 -0
- package/dist/src/lib/utils/stripRowDependentClauses.d.ts +5 -0
- package/dist/src/lib/utils/stripRowDependentClauses.spec.d.ts +1 -0
- package/dist/src/lib/utils/throttle.d.ts +5 -0
- package/dist/src/lib/utils/toCleanCamelCase.d.ts +1 -0
- package/dist/src/lib/utils/transformers/transoformTableRows.d.ts +1 -0
- package/dist/src/lib/utils/validators/createValidator.d.ts +2 -0
- package/dist/src/lib/utils/validators/makeResult.d.ts +2 -0
- package/dist/src/lib/utils/validators/resolveEnumerate.d.ts +2 -0
- package/dist/src/lib/utils/validators/rulepilot.d.ts +0 -0
- package/dist/src/lib/utils/validators/sortValidators.d.ts +2 -0
- package/dist/src/lib/utils/validators/spec/boolean.spec.d.ts +1 -0
- package/dist/src/lib/utils/validators/spec/comparator.spec.d.ts +1 -0
- package/dist/src/lib/utils/validators/spec/creditCard.spec.d.ts +1 -0
- package/dist/src/lib/utils/validators/spec/date.spec.d.ts +1 -0
- package/dist/src/lib/utils/validators/spec/email.spec.d.ts +1 -0
- package/dist/src/lib/utils/validators/spec/enum.spec.d.ts +1 -0
- package/dist/src/lib/utils/validators/spec/max.spec.d.ts +1 -0
- package/dist/src/lib/utils/validators/spec/maxLength.spec.d.ts +1 -0
- package/dist/src/lib/utils/validators/spec/min.spec.d.ts +1 -0
- package/dist/src/lib/utils/validators/spec/minLength.spec.d.ts +1 -0
- package/dist/src/lib/utils/validators/spec/multiple.spec.d.ts +1 -0
- package/dist/src/lib/utils/validators/spec/numeric.spec.d.ts +1 -0
- package/dist/src/lib/utils/validators/spec/phone.spec.d.ts +1 -0
- package/dist/src/lib/utils/validators/spec/range.spec.d.ts +1 -0
- package/dist/src/lib/utils/validators/spec/regex.spec.d.ts +1 -0
- package/dist/src/lib/utils/validators/spec/required.spec.d.ts +1 -0
- package/dist/src/lib/utils/validators/spec/sortValidators.spec.d.ts +1 -0
- package/dist/src/lib/utils/validators/spec/spec.utils.d.ts +4 -0
- package/dist/src/lib/utils/validators/spec/unique.spec.d.ts +1 -0
- package/dist/src/lib/utils/validators/spec/url.spec.d.ts +1 -0
- package/dist/src/lib/utils/validators/validateBoolean.d.ts +2 -0
- package/dist/src/lib/utils/validators/validateCell.d.ts +2 -0
- package/dist/src/lib/utils/validators/validateCell.spec.d.ts +1 -0
- package/dist/src/lib/utils/validators/validateCreditCard.d.ts +2 -0
- package/dist/src/lib/utils/validators/validateDate.d.ts +2 -0
- package/dist/src/lib/utils/validators/validateDate.spec.d.ts +1 -0
- package/dist/src/lib/utils/validators/validateEmail.d.ts +2 -0
- package/dist/src/lib/utils/validators/validateEnumerate.d.ts +2 -0
- package/dist/src/lib/utils/validators/validateInvalidIf.spec.d.ts +1 -0
- package/dist/src/lib/utils/validators/validateMax.d.ts +2 -0
- package/dist/src/lib/utils/validators/validateMaxLength.d.ts +2 -0
- package/dist/src/lib/utils/validators/validateMin.d.ts +2 -0
- package/dist/src/lib/utils/validators/validateMinLength.d.ts +2 -0
- package/dist/src/lib/utils/validators/validateNumeric.d.ts +2 -0
- package/dist/src/lib/utils/validators/validatePhone.d.ts +2 -0
- package/dist/src/lib/utils/validators/validateRange.d.ts +2 -0
- package/dist/src/lib/utils/validators/validateRegex.d.ts +2 -0
- package/dist/src/lib/utils/validators/validateRequired.d.ts +2 -0
- package/dist/src/lib/utils/validators/validateRows.d.ts +2 -0
- package/dist/src/lib/utils/validators/validateRows.spec.d.ts +1 -0
- package/dist/src/lib/utils/validators/validateRules.d.ts +14 -0
- package/dist/src/lib/utils/validators/validateRules.spec.d.ts +1 -0
- package/dist/src/lib/utils/validators/validateUUID.d.ts +2 -0
- package/dist/src/lib/utils/validators/validateUnique.d.ts +2 -0
- package/dist/src/lib/utils/validators/validateUrl.d.ts +2 -0
- package/dist/src/lib/workers/action.worker.d.ts +1 -0
- package/dist/src/lib/workers/excel-parser/createExcelFile.d.ts +6 -0
- package/dist/src/lib/workers/excel-parser/excel-parser.worker.d.ts +1 -0
- package/dist/src/lib/workers/excel-parser/isSameCalendarDate.d.ts +1 -0
- package/dist/src/lib/workers/excel-parser/loadBuffer.d.ts +2 -0
- package/dist/src/lib/workers/excel-parser/normaliseCell.d.ts +13 -0
- package/dist/src/lib/workers/excel-parser/normaliseCell.spec.d.ts +1 -0
- package/dist/src/lib/workers/excel-parser/normaliseRows.d.ts +2 -0
- package/dist/src/lib/workers/excel-parser/normaliseRows.spec.d.ts +1 -0
- package/dist/src/lib/workers/excel-parser/parseComplete.d.ts +8 -0
- package/dist/src/lib/workers/excel-parser/parseComplete.spec.d.ts +1 -0
- package/dist/src/lib/workers/excel-parser/parsePreview.d.ts +9 -0
- package/dist/src/lib/workers/excel-parser/parsePreview.spec.d.ts +1 -0
- package/dist/src/lib/workers/excel-parser/useExcelParseWorker.d.ts +6 -0
- package/dist/src/lib/workers/excel-to-table-rows/excel-to-table-rows.worker.d.ts +3 -0
- package/dist/src/lib/workers/excel-to-table-rows/sortWorkbookMappings.d.ts +2 -0
- package/dist/src/lib/workers/excel-to-table-rows/sortWorkbookMappings.spec.d.ts +1 -0
- package/dist/src/lib/workers/excel-to-table-rows/useExcelToTableRowsWorker.d.ts +5 -0
- package/dist/src/lib/workers/hooks/actionDispatcher.d.ts +2 -0
- package/dist/src/lib/workers/hooks/useActionWorker.d.ts +4 -0
- package/dist/src/lib/workers/transform-table-rows/transformTable.worker.d.ts +1 -0
- package/dist/src/lib/workers/transform-table-rows/transformTableRows.d.ts +2 -0
- package/dist/src/lib/workers/transform-table-rows/transformTableRows.spec.d.ts +1 -0
- package/dist/src/lib/workers/transform-table-rows/useTransformTableRows.d.ts +6 -0
- package/dist/src/lib/workers/validator/useValidatorWorker.d.ts +6 -0
- package/dist/src/lib/workers/validator/validator.worker.d.ts +1 -0
- package/dist/src/lib/workers/workerPool.d.ts +11 -0
- package/dist/src/mock/mock-field-mappings.d.ts +15 -0
- package/dist/src/routes/e2e/mock-mappings/mock-fields-ai-mapping.d.ts +2 -0
- package/dist/src/routes/e2e/mock-mappings/mock-fields-all-match.d.ts +2 -0
- package/dist/src/routes/shared.d.ts +1 -0
- package/dist/vite.config.d.ts +2 -0
- package/package.json +101 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { IsCreditCardOptions, UUIDVersion } from 'validator';
|
|
2
|
+
import { IDateFieldSchemaInternal } from './schema.types';
|
|
3
|
+
import { DefaultTableRowType, ITableRowInternal } from './table.types';
|
|
4
|
+
import { IsURLOptions } from 'validator/lib/isURL';
|
|
5
|
+
import { Rule } from '@ivandt/json-rules';
|
|
6
|
+
export type IFieldValidatorType = 'required' | 'rules' | 'uuid' | 'numeric' | 'boolean' | 'unique' | 'regex' | 'email' | 'min' | 'max' | 'range' | 'minLength' | 'maxLength' | 'url' | 'phone' | 'date' | 'enumerate' | 'creditcard' | 'custom';
|
|
7
|
+
export type IErrorSeverity = 'w' | 'e';
|
|
8
|
+
export type IFieldValidatorValidate = (cellValue: string, rowData?: ITableRowInternal) => ICellError | Promise<ICellError>;
|
|
9
|
+
export interface IBaseFieldValidator {
|
|
10
|
+
type: IFieldValidatorType;
|
|
11
|
+
message?: string;
|
|
12
|
+
severity?: IErrorSeverity;
|
|
13
|
+
}
|
|
14
|
+
export interface ICellError {
|
|
15
|
+
type: IFieldValidatorInternal['type'] | null;
|
|
16
|
+
severity: IErrorSeverity | null;
|
|
17
|
+
message?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface IRequiredFieldValidator extends IBaseFieldValidator {
|
|
20
|
+
type: 'required';
|
|
21
|
+
}
|
|
22
|
+
export interface IRulesFieldValidator<TableRow = DefaultTableRowType> extends IBaseFieldValidator {
|
|
23
|
+
type: 'rules';
|
|
24
|
+
effect: 'checked' | 'not_checked' | 'required' | 'invalid';
|
|
25
|
+
rule: Rule<TableRow, boolean>['conditions'];
|
|
26
|
+
}
|
|
27
|
+
export interface IUUIDFieldValidator extends IBaseFieldValidator {
|
|
28
|
+
type: 'uuid';
|
|
29
|
+
version: UUIDVersion;
|
|
30
|
+
}
|
|
31
|
+
export interface INumericFieldValidator extends IBaseFieldValidator {
|
|
32
|
+
type: 'numeric';
|
|
33
|
+
}
|
|
34
|
+
export interface IBooleanFieldValidator extends IBaseFieldValidator {
|
|
35
|
+
type: 'boolean';
|
|
36
|
+
}
|
|
37
|
+
export interface IUniqueFieldValidatorInternal extends IBaseFieldValidator {
|
|
38
|
+
type: 'unique';
|
|
39
|
+
valueCounts: Record<string, number>;
|
|
40
|
+
}
|
|
41
|
+
export interface IRegexFieldValidator extends IBaseFieldValidator {
|
|
42
|
+
type: 'regex';
|
|
43
|
+
pattern: string | RegExp;
|
|
44
|
+
}
|
|
45
|
+
export interface IEmailFieldValidator extends IBaseFieldValidator {
|
|
46
|
+
type: 'email';
|
|
47
|
+
}
|
|
48
|
+
export interface IMinFieldValidator extends IBaseFieldValidator {
|
|
49
|
+
type: 'min';
|
|
50
|
+
value: number;
|
|
51
|
+
}
|
|
52
|
+
export interface IMaxFieldValidator extends IBaseFieldValidator {
|
|
53
|
+
type: 'max';
|
|
54
|
+
value: number;
|
|
55
|
+
}
|
|
56
|
+
export interface IRangeFieldValidator extends IBaseFieldValidator {
|
|
57
|
+
type: 'range';
|
|
58
|
+
min: number;
|
|
59
|
+
max: number;
|
|
60
|
+
}
|
|
61
|
+
export interface IMinLengthFieldValidator extends IBaseFieldValidator {
|
|
62
|
+
type: 'minLength';
|
|
63
|
+
value: number;
|
|
64
|
+
}
|
|
65
|
+
export interface IMaxLengthFieldValidator extends IBaseFieldValidator {
|
|
66
|
+
type: 'maxLength';
|
|
67
|
+
value: number;
|
|
68
|
+
}
|
|
69
|
+
export interface IUrlFieldValidator extends IBaseFieldValidator {
|
|
70
|
+
type: 'url';
|
|
71
|
+
options?: IsURLOptions;
|
|
72
|
+
}
|
|
73
|
+
export interface IPhoneFieldValidator extends IBaseFieldValidator {
|
|
74
|
+
type: 'phone';
|
|
75
|
+
locale?: string;
|
|
76
|
+
}
|
|
77
|
+
export type IDateFieldValidator = IBaseFieldValidator & {
|
|
78
|
+
type: 'date';
|
|
79
|
+
} & Pick<IDateFieldSchemaInternal, 'parsePatterns' | 'formatPattern' | 'strictParsing'>;
|
|
80
|
+
export interface IEnumerateFieldValidator extends IBaseFieldValidator {
|
|
81
|
+
type: 'enumerate';
|
|
82
|
+
allowedLabels: string[];
|
|
83
|
+
}
|
|
84
|
+
export interface ICreditCardFieldValidator extends IBaseFieldValidator {
|
|
85
|
+
type: 'creditcard';
|
|
86
|
+
providers?: IsCreditCardOptions['provider'][];
|
|
87
|
+
}
|
|
88
|
+
export interface ICustomFieldValidator extends IBaseFieldValidator {
|
|
89
|
+
type: 'custom';
|
|
90
|
+
validate: IFieldValidatorValidate;
|
|
91
|
+
}
|
|
92
|
+
export type IFieldValidatorInternal = IRequiredFieldValidator | IRulesFieldValidator | IUUIDFieldValidator | INumericFieldValidator | IBooleanFieldValidator | IUniqueFieldValidatorInternal | IRegexFieldValidator | IEmailFieldValidator | IMinFieldValidator | IMaxFieldValidator | IRangeFieldValidator | IMinLengthFieldValidator | IMaxLengthFieldValidator | IUrlFieldValidator | IPhoneFieldValidator | IDateFieldValidator | IEnumerateFieldValidator | ICreditCardFieldValidator | ICustomFieldValidator;
|
|
93
|
+
export interface IFieldValidatorMap {
|
|
94
|
+
required: IRequiredFieldValidator;
|
|
95
|
+
rules: IRulesFieldValidator;
|
|
96
|
+
numeric: INumericFieldValidator;
|
|
97
|
+
boolean: IBooleanFieldValidator;
|
|
98
|
+
unique: IUniqueFieldValidatorInternal;
|
|
99
|
+
regex: IRegexFieldValidator;
|
|
100
|
+
email: IEmailFieldValidator;
|
|
101
|
+
min: IMinFieldValidator;
|
|
102
|
+
max: IMaxFieldValidator;
|
|
103
|
+
range: IRangeFieldValidator;
|
|
104
|
+
minLength: IMinLengthFieldValidator;
|
|
105
|
+
maxLength: IMaxLengthFieldValidator;
|
|
106
|
+
url: IUrlFieldValidator;
|
|
107
|
+
uuid: IUUIDFieldValidator;
|
|
108
|
+
phone: IPhoneFieldValidator;
|
|
109
|
+
date: IDateFieldValidator;
|
|
110
|
+
enumerate: IEnumerateFieldValidator;
|
|
111
|
+
creditcard: ICreditCardFieldValidator;
|
|
112
|
+
custom: ICustomFieldValidator;
|
|
113
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { IHotCellEditChange, ITableRowInternal, ITableRowRange } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Extracts and merges a contiguous slice of table rows based on a set of cell edits.
|
|
4
|
+
*
|
|
5
|
+
* For the given array of cell changes, this function:
|
|
6
|
+
* 1. Determines the smallest and largest row indices that were edited.
|
|
7
|
+
* 2. Builds the full range of rows from start to end (inclusive), pulling each row
|
|
8
|
+
* from the provided `tableRows` (or an empty object if that row is missing).
|
|
9
|
+
* 3. Applies each change to its corresponding row, overriding the original value
|
|
10
|
+
* even if the new value is `null` or an empty string.
|
|
11
|
+
*
|
|
12
|
+
* @param changes - Array of cell edits in the form `[rowIndex, fieldKey, oldValue, newValue]`.
|
|
13
|
+
* @param tableRows - The source table rows, where each row is a record of fieldKey → cell value.
|
|
14
|
+
* @returns An object containing:
|
|
15
|
+
* - `augmentedRows`: The merged row objects for every index from the first change to the last.
|
|
16
|
+
* - `range`: An object `{ startRowIndex, rowsLength }` describing the slice of rows extracted.
|
|
17
|
+
*/
|
|
18
|
+
export declare function augmentCellChangesWithTableRows(changes: IHotCellEditChange[], tableRows: ITableRowInternal[]): {
|
|
19
|
+
augmentedRows: ITableRowInternal[];
|
|
20
|
+
range: ITableRowRange;
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function formatFileSize(bytes: number, decimals?: number): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { default as Handsontable } from 'handsontable';
|
|
2
|
+
import { ISearchColumnResult } from '../../types';
|
|
3
|
+
export declare function searchColumn(hot: Handsontable, query: string | number | null, column: number, allowedRows: number[], insensitive: boolean, wholeWord: boolean): ISearchColumnResult[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as Handsontable } from 'handsontable';
|
|
2
|
+
import { IDropdownFieldOption } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Custom editor that extends AutocompleteEditor to handle value/label mapping
|
|
5
|
+
*/
|
|
6
|
+
declare class ValueLabelAutocompleteEditor extends Handsontable.editors.AutocompleteEditor {
|
|
7
|
+
setOptions(options: IDropdownFieldOption[]): void;
|
|
8
|
+
getValue(): string;
|
|
9
|
+
setValue(value: any): void;
|
|
10
|
+
destroy(): void;
|
|
11
|
+
close(): void;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Custom renderer that displays labels for values
|
|
15
|
+
*/
|
|
16
|
+
declare function valueLabelRenderer(hotInstance: Handsontable.Core, td: HTMLTableCellElement, row: number, col: number, prop: string | number, value: any, cellProperties: any): HTMLTableCellElement;
|
|
17
|
+
export { ValueLabelAutocompleteEditor, valueLabelRenderer };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IAutoCompleteFieldSchemaInternal, ICombineFiledSchemaInternal, IDataSourceResolver, IDropDownFieldSchemaInternal, IFieldSchemaInternal, IFieldSchemaSanitised, IMenuFieldSchemaInternal, ISelectFieldSchemaInternal } from '../types';
|
|
2
|
+
export declare const isDropDownField: (field: IFieldSchemaInternal | IFieldSchemaSanitised) => field is IDropDownFieldSchemaInternal;
|
|
3
|
+
export declare const isOptionsResolver: (options: IMenuFieldSchemaInternal["options"]) => options is IDataSourceResolver;
|
|
4
|
+
export declare const isAutoCompleteField: (field: IFieldSchemaInternal | IFieldSchemaSanitised) => field is IAutoCompleteFieldSchemaInternal;
|
|
5
|
+
export declare const isSelectField: (field: IFieldSchemaInternal | IFieldSchemaSanitised) => field is ISelectFieldSchemaInternal;
|
|
6
|
+
export declare const isMenuField: (field: IFieldSchemaInternal | IFieldSchemaSanitised) => field is IMenuFieldSchemaInternal;
|
|
7
|
+
export declare const isCombineField: (field: IFieldSchemaInternal) => field is ICombineFiledSchemaInternal;
|
|
8
|
+
export declare const isComputedField: (field: IFieldSchemaInternal) => field is ICombineFiledSchemaInternal;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isSelectOptions(options: unknown): options is string[];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IFieldMappings, IFileHeader } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Main header mapping function.
|
|
4
|
+
*
|
|
5
|
+
* It follows three levels:
|
|
6
|
+
* 1. Perfect Match: Match schema field to file header if normalized labels are equal.
|
|
7
|
+
* 2. Guess Match: For unmapped fields, match using the schema's alternativeColumnLabels array.
|
|
8
|
+
* 3. AI Suggestion: For any remaining unmapped fields, call the AI suggestion API.
|
|
9
|
+
*
|
|
10
|
+
* If the AI API call fails, the function throws an error.
|
|
11
|
+
*
|
|
12
|
+
* @param apiKey The api key to use for the AI suggestion.
|
|
13
|
+
* @param fieldMappings The initial field mappings generated in the IngImporter'
|
|
14
|
+
* @param fileHeaders The parsed file headers from the uploaded Excel.
|
|
15
|
+
* @returns An array of IFieldMapping objects with mapping details.
|
|
16
|
+
*/
|
|
17
|
+
export declare function mapHeaders(apiKey: string, fieldMappings: IFieldMappings, fileHeaders: IFileHeader[]): Promise<IFieldMappings>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DataSources, IFieldMappings, IFieldSchema, IngSchemaInternal, IvtSchema } from '../types';
|
|
2
|
+
export declare const normaliseFieldMappings: (fields: IFieldSchema[]) => {
|
|
3
|
+
dataSources: DataSources;
|
|
4
|
+
mappings: IFieldMappings;
|
|
5
|
+
};
|
|
6
|
+
export declare const normaliseSchema: (schema: IvtSchema) => {
|
|
7
|
+
normalisedSchema: IngSchemaInternal;
|
|
8
|
+
initialFieldMappings: IFieldMappings;
|
|
9
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IFieldSchema } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Sorts an array of fields by their `order` property in ascending order,
|
|
4
|
+
* then reassigns each field's `order` to its index in the sorted array,
|
|
5
|
+
* eliminating gaps and ensuring a contiguous sequence starting from 0.
|
|
6
|
+
*/
|
|
7
|
+
export declare function normalizeFieldOrder(fields: readonly IFieldSchema[]): IFieldSchema[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IFieldMappings, IFieldMappingSanitised, IFieldSchemaInternal, IFieldSchemaSanitised } from '../types';
|
|
2
|
+
export declare const sanitiseFieldMappingsAndExtractFieldsForWorker: (fieldMappings: IFieldMappings) => IFieldSchemaSanitised[];
|
|
3
|
+
export declare const sanitiseFieldMappingsForWorker: (fieldMappings: IFieldMappings) => IFieldMappingSanitised[];
|
|
4
|
+
export declare const sanitiseFieldSchemasForWorker: (schemas: IFieldSchemaInternal[]) => IFieldSchemaSanitised[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const toCleanCamelCase: (str: string) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { ICellError, IErrorSeverity, IFieldValidatorInternal } from '../../types';
|
|
2
|
+
export declare const makeResult: (valid: boolean, errorMsg: string, userDefaultMessage: string, severity: (IErrorSeverity | null) | undefined, type: IFieldValidatorInternal["type"] | null) => ICellError | null;
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ICellError, IFieldValidatorInternal } from '../../../types/validators.types';
|
|
2
|
+
export declare const assertValid: (result: ICellError | null, _?: string) => void;
|
|
3
|
+
export declare const assertInvalid: (result: ICellError | null, expectedMsg: string) => void;
|
|
4
|
+
export declare const createMockField: (validators: IFieldValidatorInternal[]) => import('../../../types').ITextFieldSchemaInternal;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { DataSources, ICellError, IFieldSchemaSanitised, ITableRowInternal, IvtCellValue } from '../../types';
|
|
2
|
+
export declare const validateCell: (v: IvtCellValue, rowData: ITableRowInternal, rowIndex: number, schema: IFieldSchemaSanitised, dataSources?: DataSources) => Promise<ICellError | null>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { DataSources, IEnumerateFieldValidator, IFieldSchemaSanitised, ITableRowInternal } from '../../types';
|
|
2
|
+
export declare function validateEnumerate(schema: IFieldSchemaSanitised, rowData: ITableRowInternal, rowIndex: number, dataSources: DataSources, validator: IEnumerateFieldValidator, value: string, m: string): import('../../types').ICellError | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { DataSources, ICellErrorWithMeta, IFieldSchemaSanitised, ITableRowRange } from '../../types';
|
|
2
|
+
export declare function validateRows(tableRows: Record<string, any>[], _fieldSchemas: IFieldSchemaSanitised[], rowRange: ITableRowRange, dataSource: DataSources, tableRowsStartIndex: number): Promise<ICellErrorWithMeta[]>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ICellError, IFieldSchemaSanitised, IRulesFieldValidator, ITableRowInternal } from '../../types';
|
|
2
|
+
import { Rule } from '@ivandt/json-rules';
|
|
3
|
+
/**
|
|
4
|
+
* Build the JsonRules “trigger” rule from sugar-style validator
|
|
5
|
+
* (does NOT append the field-check itself)
|
|
6
|
+
*/
|
|
7
|
+
export declare function normalizeRulesValidator(validator: IRulesFieldValidator): Rule;
|
|
8
|
+
/**
|
|
9
|
+
* Evaluate a sugar-style rules validator:
|
|
10
|
+
* - First check the trigger rule.
|
|
11
|
+
* - If triggers are false → always valid.
|
|
12
|
+
* - If triggers are true → enforce the “effect” on fieldKey.
|
|
13
|
+
*/
|
|
14
|
+
export declare function validateRules(rowData: ITableRowInternal, validator: IRulesFieldValidator<any>, schema: IFieldSchemaSanitised): Promise<ICellError | null>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generates an Excel file under e2e/fixtures.
|
|
3
|
+
* @param sheetsData Map of sheetName → 2D array of cell values (Date|string|number|null|undefined)
|
|
4
|
+
* @param fileName Filename (e.g. 'complete_fixture.xlsx')
|
|
5
|
+
*/
|
|
6
|
+
export declare function generateExcelFixture(sheetsData: Record<string, unknown[][]>, fileName: string): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isSameCalendarDate(value: unknown, expected: string | Date): boolean;
|