@ivandt/importer 1.15.4 → 1.15.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{bg.min-C69Z6n1X.cjs → bg.min-CwfSQ_nM.cjs} +1 -1
- package/dist/{bg.min-C8UsIawT.js → bg.min-Phy_JdGS.js} +1 -1
- package/dist/{cs-CZ.min-CdL1Awnh.cjs → cs-CZ.min-BNdAN1we.cjs} +1 -1
- package/dist/{cs-CZ.min-BVq2yKMy.js → cs-CZ.min-BeDNFabu.js} +1 -1
- package/dist/{da-DK.min-D4qmg_nS.js → da-DK.min-D2Aq4sYm.js} +1 -1
- package/dist/{da-DK.min-DxJLRrfQ.cjs → da-DK.min-O6wXgt8j.cjs} +1 -1
- package/dist/{de-AT.min-CnOHuEpw.cjs → de-AT.min-B9HZQafQ.cjs} +1 -1
- package/dist/{de-AT.min-CffYKZXh.js → de-AT.min-BsYKqHzX.js} +1 -1
- package/dist/{de-CH.min-ClPXbjEq.cjs → de-CH.min-DCG5OQ1u.cjs} +1 -1
- package/dist/{de-CH.min-dPy39Db0.js → de-CH.min-oV0-vOsU.js} +1 -1
- package/dist/{de-DE.min-jptUYxXX.cjs → de-DE.min-ACPl7rd-.cjs} +1 -1
- package/dist/{de-DE.min-y9MNuvjw.js → de-DE.min-ByjtvEe8.js} +1 -1
- package/dist/{de-LI.min-BVcvA1wQ.cjs → de-LI.min-BM_D-cGn.cjs} +1 -1
- package/dist/{de-LI.min-D8T0mRLM.js → de-LI.min-DWUrvlq8.js} +1 -1
- package/dist/{el.min-DOX_ZGNe.cjs → el.min-BRpKff5B.cjs} +1 -1
- package/dist/{el.min-BOm4FlOl.js → el.min-uMPqiCDR.js} +1 -1
- package/dist/{en-AU.min-DTEhTSVR.cjs → en-AU.min-O8FpePf0.cjs} +1 -1
- package/dist/{en-AU.min-eIs6Y6Ds.js → en-AU.min-TbClnF7o.js} +1 -1
- package/dist/{en-GB.min-DcvnHgNR.cjs → en-GB.min-CAFp-O9_.cjs} +1 -1
- package/dist/{en-GB.min-CIpfsqF5.js → en-GB.min-IYW-VjhF.js} +1 -1
- package/dist/{en-IE.min-BplOhc9M.cjs → en-IE.min-CHkUiZs4.cjs} +1 -1
- package/dist/{en-IE.min-LbOxe8qq.js → en-IE.min-DGDfZDqw.js} +1 -1
- package/dist/{en-NZ.min-BFgvZFR6.cjs → en-NZ.min-5-sUHVoh.cjs} +1 -1
- package/dist/{en-NZ.min-jNw4l8sV.js → en-NZ.min-5uAcINbz.js} +1 -1
- package/dist/{en-ZA.min-BXjrn1nK.js → en-ZA.min-C6SfPrjg.js} +1 -1
- package/dist/{en-ZA.min-DG8b15Uc.cjs → en-ZA.min-DuNft0aG.cjs} +1 -1
- package/dist/{es-AR.min-DeBG23PR.cjs → es-AR.min-CJ7aJNgV.cjs} +1 -1
- package/dist/{es-AR.min-QLTKPNmd.js → es-AR.min-CjL5P_vR.js} +1 -1
- package/dist/{es-CL.min-KcxooSuw.cjs → es-CL.min-6MSJTcrC.cjs} +1 -1
- package/dist/{es-CL.min-BrHfRlIv.js → es-CL.min-xoRoLDuI.js} +1 -1
- package/dist/{es-CO.min-B8TOc4x3.js → es-CO.min-DmwYUo82.js} +1 -1
- package/dist/{es-CO.min-B3xsaphv.cjs → es-CO.min-jjcNheJX.cjs} +1 -1
- package/dist/{es-CR.min-Ccb_pDI3.cjs → es-CR.min-CD5musCQ.cjs} +1 -1
- package/dist/{es-CR.min--eU1Tu4i.js → es-CR.min-srotSCMQ.js} +1 -1
- package/dist/{es-ES.min-CsqYswIF.cjs → es-ES.min-B_6K5LOn.cjs} +1 -1
- package/dist/{es-ES.min-teOCaodT.js → es-ES.min-Bh2Lw09M.js} +1 -1
- package/dist/{es-MX.min-Cpe7Pn9G.cjs → es-MX.min-BE16WI9a.cjs} +1 -1
- package/dist/{es-MX.min-B5HCOAcF.js → es-MX.min-bP9T8ZPN.js} +1 -1
- package/dist/{es-NI.min-D_2IkbR5.js → es-NI.min-D34gr_nM.js} +1 -1
- package/dist/{es-NI.min-BNf832gF.cjs → es-NI.min-pMqb33q5.cjs} +1 -1
- package/dist/{es-PE.min-BWuiJ649.cjs → es-PE.min-B-UvtYfx.cjs} +1 -1
- package/dist/{es-PE.min-BX3-fwcO.js → es-PE.min-BMubxdxd.js} +1 -1
- package/dist/{es-PR.min-lY8kumvl.cjs → es-PR.min-4tpTawUN.cjs} +1 -1
- package/dist/{es-PR.min-DZCrAW1t.js → es-PR.min-DmjDdnNT.js} +1 -1
- package/dist/{es-SV.min-CUwzPQty.cjs → es-SV.min-0BZuMtJO.cjs} +1 -1
- package/dist/{es-SV.min-61WVfMxd.js → es-SV.min-CkWi-AmE.js} +1 -1
- package/dist/{et-EE.min-BD8vLD3M.cjs → et-EE.min-6HVjbWWW.cjs} +1 -1
- package/dist/{et-EE.min-JQsMUdjJ.js → et-EE.min-CwkgWF2X.js} +1 -1
- package/dist/{fa-IR.min-Roo6hnFi.cjs → fa-IR.min-Cjnfyba3.cjs} +1 -1
- package/dist/{fa-IR.min-DHeF2jAP.js → fa-IR.min-DP_zRxsm.js} +1 -1
- package/dist/{fi-FI.min-Bde_EakM.js → fi-FI.min-BD6I3JgI.js} +1 -1
- package/dist/{fi-FI.min-B_-CelD7.cjs → fi-FI.min-BwAfvoHw.cjs} +1 -1
- package/dist/{fil-PH.min-D4b_0OHp.js → fil-PH.min-CuhxTw5g.js} +1 -1
- package/dist/{fil-PH.min-BJNu6Rud.cjs → fil-PH.min-c7Q2FsYQ.cjs} +1 -1
- package/dist/{fr-CA.min-DHg7r-7J.cjs → fr-CA.min-BQNUMFFl.cjs} +1 -1
- package/dist/{fr-CA.min-CSxFbt5u.js → fr-CA.min-ezgHnjtI.js} +1 -1
- package/dist/{fr-CH.min-M2KJxC7O.cjs → fr-CH.min-C8rwZtLn.cjs} +1 -1
- package/dist/{fr-CH.min-Dom6iNNp.js → fr-CH.min-CVOtGO08.js} +1 -1
- package/dist/{fr-FR.min-B_VKfLfg.js → fr-FR.min-B8q8WdzN.js} +1 -1
- package/dist/{fr-FR.min-DLHuc-gJ.cjs → fr-FR.min-DsRk6a9y.cjs} +1 -1
- package/dist/{he-IL.min-22jSwgeJ.js → he-IL.min-B-hIqwSA.js} +1 -1
- package/dist/{he-IL.min-CFbBk4gb.cjs → he-IL.min-lG_dOON7.cjs} +1 -1
- package/dist/{hu-HU.min-eZpFiPqw.cjs → hu-HU.min-B_A32BDL.cjs} +1 -1
- package/dist/{hu-HU.min-fhDzbuIt.js → hu-HU.min-f8aGNOGI.js} +1 -1
- package/dist/{id.min-FoJ7vFLl.js → id.min-C-OnTYtg.js} +1 -1
- package/dist/{id.min-BAlQjY8K.cjs → id.min-CE-zZ443.cjs} +1 -1
- package/dist/{importer-B8OsAD5f.cjs → importer-CS8e0h0r.cjs} +114 -114
- package/dist/{importer-QNXn2aT1.js → importer-ie3oulDX.js} +12129 -12117
- package/dist/importer.cjs.js +1 -1
- package/dist/importer.es.js +1 -1
- package/dist/index-DyXi21Im.cjs +1 -0
- package/dist/{index-F8dlW9ZP.js → index-JWQPftvo.js} +64 -65
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +7 -7
- package/dist/{it-CH.min-B97G7DpZ.js → it-CH.min-BZTmubYL.js} +1 -1
- package/dist/{it-CH.min-CViKfWOc.cjs → it-CH.min-c6owkMCg.cjs} +1 -1
- package/dist/{it-IT.min-BFQxoVOU.cjs → it-IT.min-B513Yob4.cjs} +1 -1
- package/dist/{it-IT.min-CNoE1VR-.js → it-IT.min-DYQ9uUOL.js} +1 -1
- package/dist/{ja-JP.min-ndeTzO87.js → ja-JP.min-Cv06d77k.js} +1 -1
- package/dist/{ja-JP.min-CBIkZGHr.cjs → ja-JP.min-l2ClevzI.cjs} +1 -1
- package/dist/{ko-KR.min-CNFdsYkz.js → ko-KR.min-Z7vAv3mL.js} +1 -1
- package/dist/{ko-KR.min-BT5JJQ0h.cjs → ko-KR.min-lNmFZQ8V.cjs} +1 -1
- package/dist/{lv-LV.min-60fVs7YE.js → lv-LV.min-9sHCpg44.js} +1 -1
- package/dist/{lv-LV.min-CHSqoRJJ.cjs → lv-LV.min-CvWo4wyT.cjs} +1 -1
- package/dist/{nb-NO.min-DPHyQCvG.cjs → nb-NO.min-BVHbs7mH.cjs} +1 -1
- package/dist/{nb-NO.min-Du3yzT8C.js → nb-NO.min-iULb-SfX.js} +1 -1
- package/dist/{nb.min-Cw261LXS.cjs → nb.min-B62fAAKg.cjs} +1 -1
- package/dist/{nb.min-B9Qn8mBi.js → nb.min-OQFWxFOj.js} +1 -1
- package/dist/{nl-BE.min-BRjtpWyM.cjs → nl-BE.min-DaguNMhY.cjs} +1 -1
- package/dist/{nl-BE.min-DRRiylAx.js → nl-BE.min-Df4Ee9Hn.js} +1 -1
- package/dist/{nl-NL.min-BQUMKp7O.js → nl-NL.min-DJO2FI9b.js} +1 -1
- package/dist/{nl-NL.min-jd1iNQOs.cjs → nl-NL.min-DRal7XOp.cjs} +1 -1
- package/dist/{nn.min-D3vWk3Oi.cjs → nn.min-BJLrvf1x.cjs} +1 -1
- package/dist/{nn.min-DBVFWk7t.js → nn.min-o2YzjRW2.js} +1 -1
- package/dist/{pl-PL.min-CQxfbb0t.cjs → pl-PL.min-C6hA2lK0.cjs} +1 -1
- package/dist/{pl-PL.min-BvwrWSYA.js → pl-PL.min-DjhoK7iA.js} +1 -1
- package/dist/{pt-BR.min-OURi-nZZ.js → pt-BR.min-CJD_xdfd.js} +1 -1
- package/dist/{pt-BR.min-Cv8zrX1V.cjs → pt-BR.min-DHgX_4UM.cjs} +1 -1
- package/dist/{pt-PT.min-BJqZpk0t.js → pt-PT.min-C79tUCdb.js} +1 -1
- package/dist/{pt-PT.min-B71RNvYe.cjs → pt-PT.min-DHykJeSS.cjs} +1 -1
- package/dist/{ro-RO.min-HRxm_W4n.cjs → ro-RO.min-CTk0Sf5T.cjs} +1 -1
- package/dist/{ro-RO.min-BPQvNO5B.js → ro-RO.min-FGwcSkwh.js} +1 -1
- package/dist/{ro.min-lL12kdsP.cjs → ro.min-BDgqOE7g.cjs} +1 -1
- package/dist/{ro.min-BPQvNO5B.js → ro.min-FGwcSkwh.js} +1 -1
- package/dist/{ru-RU.min-D5OTsWmi.js → ru-RU.min-BugMsmqo.js} +1 -1
- package/dist/{ru-RU.min-Bt54klBt.cjs → ru-RU.min-C1E5tMIP.cjs} +1 -1
- package/dist/{ru-UA.min-BpzYBvqf.cjs → ru-UA.min-C6EBp0r9.cjs} +1 -1
- package/dist/{ru-UA.min-DYIzkL1b.js → ru-UA.min-DOgOvzjg.js} +1 -1
- package/dist/{sk-SK.min-NfOeqEi2.js → sk-SK.min-BxXZYXqa.js} +1 -1
- package/dist/{sk-SK.min-C4NqhdZK.cjs → sk-SK.min-CrYAW0i7.cjs} +1 -1
- package/dist/{sl.min-DV3AvMIN.js → sl.min-CgyT2Kgg.js} +1 -1
- package/dist/{sl.min-BNoJLDp7.cjs → sl.min-DqvPGW8Y.cjs} +1 -1
- package/dist/{sr-Cyrl-RS.min-hD7vkp8d.cjs → sr-Cyrl-RS.min-DKeXdw4K.cjs} +1 -1
- package/dist/{sr-Cyrl-RS.min-B7xqMYbB.js → sr-Cyrl-RS.min-DYNCHu-q.js} +1 -1
- package/dist/src/index.d.ts +3 -4
- package/dist/src/lib/actions/applyToColumn.d.ts +1 -1
- package/dist/src/lib/actions/applyToField.d.ts +2 -3
- package/dist/src/lib/actions/autoIncrementIdsAction.d.ts +2 -2
- package/dist/src/lib/actions/backwardFillAction.d.ts +2 -2
- package/dist/src/lib/actions/clampRangeAction.d.ts +2 -2
- package/dist/src/lib/actions/cleanNumberAction.d.ts +2 -2
- package/dist/src/lib/actions/clearCellRangeAction.d.ts +2 -2
- package/dist/src/lib/actions/clearCulmn.d.ts +2 -2
- package/dist/src/lib/actions/combineColumnsAction.d.ts +2 -3
- package/dist/src/lib/actions/defaultValueAction.d.ts +2 -2
- package/dist/src/lib/actions/fillWithTimestampAction.d.ts +2 -2
- package/dist/src/lib/actions/findAndReplace.d.ts +2 -2
- package/dist/src/lib/actions/formatBooleansAction.d.ts +2 -2
- package/dist/src/lib/actions/formatDatesAction.d.ts +2 -3
- package/dist/src/lib/actions/formatEmailsAction.d.ts +2 -2
- package/dist/src/lib/actions/formatPhoneNumbersAction.d.ts +2 -2
- package/dist/src/lib/actions/forwardFillAction.d.ts +2 -2
- package/dist/src/lib/actions/fuzzyFixAction/fuzzyFixAction.d.ts +3 -3
- package/dist/src/lib/actions/generateUUIDsAction.d.ts +2 -2
- package/dist/src/lib/actions/mapCountryNamesAction.d.ts +2 -2
- package/dist/src/lib/actions/mapToEnumAction.d.ts +2 -2
- package/dist/src/lib/actions/normalizeUrlsAction.d.ts +2 -2
- package/dist/src/lib/actions/normalizeZScoreAction.d.ts +2 -2
- package/dist/src/lib/actions/padStringAction.d.ts +2 -2
- package/dist/src/lib/actions/regexReplaceAction.d.ts +2 -2
- package/dist/src/lib/actions/roundNumbersAction.d.ts +2 -2
- package/dist/src/lib/actions/scaleNumbersAction.d.ts +2 -2
- package/dist/src/lib/actions/smartCleanNumberAction.d.ts +2 -2
- package/dist/src/lib/actions/specs/_helpers.d.ts +4 -4
- package/dist/src/lib/actions/stripHtmlTagsAction.d.ts +2 -2
- package/dist/src/lib/actions/titleCaseTextAction.d.ts +2 -2
- package/dist/src/lib/actions/toLowerCaseAction.d.ts +2 -2
- package/dist/src/lib/actions/toUpperCaseAction.d.ts +2 -2
- package/dist/src/lib/actions/trimWhitespace.d.ts +2 -2
- package/dist/src/lib/actions/truncateTextAction.d.ts +2 -2
- package/dist/src/lib/components/FieldSettings/fieldSchemas.d.ts +32 -32
- package/dist/src/lib/components/IvtTransform/mergeDiffRows.d.ts +2 -2
- package/dist/src/lib/components/IvtTransform/transformerSchemas.d.ts +18 -18
- package/dist/src/lib/constants.d.ts +6 -7
- package/dist/src/lib/services/eventHandler.service.d.ts +4 -4
- package/dist/src/lib/store/dataSource.store.d.ts +5 -5
- package/dist/src/lib/store/schema.store.d.ts +3 -3
- package/dist/src/lib/store/stepper.store.d.ts +2 -2
- package/dist/src/lib/store/tableRows.store.d.ts +2 -2
- package/dist/src/lib/types/cellTransformerAction.type.d.ts +5 -6
- package/dist/src/lib/types/columnTransformerAction.type.d.ts +1 -1
- package/dist/src/lib/types/csvExport.types.d.ts +2 -2
- package/dist/src/lib/types/dropdownResolver.types.d.ts +3 -3
- package/dist/src/lib/types/excelExport.types.d.ts +2 -2
- package/dist/src/lib/types/index.d.ts +0 -3
- package/dist/src/lib/types/schema.types.d.ts +247 -63
- package/dist/src/lib/types/transformActions.types.d.ts +30 -12
- package/dist/src/lib/types/validators.types.d.ts +7 -8
- package/dist/src/lib/utils/augmentCellChangesWithTableRows.d.ts +3 -3
- package/dist/src/lib/utils/augmentChangesForCrossFieldValidation.d.ts +2 -2
- package/dist/src/lib/utils/createField.d.ts +2 -2
- package/dist/src/lib/utils/extractFieldKeysFromTemplate.d.ts +6 -3
- package/dist/src/lib/utils/getAllPossibleOptions.d.ts +2 -2
- package/dist/src/lib/utils/getVisibleFieldSchemas.d.ts +2 -2
- package/dist/src/lib/utils/hasCalculatedField.d.ts +2 -2
- package/dist/src/lib/utils/hot/convertHotDataToIngTableRows.d.ts +2 -2
- package/dist/src/lib/utils/hot/convertTableRowsToHotCellChanges.d.ts +2 -2
- package/dist/src/lib/utils/hot/convertTableRowsToHotData.d.ts +2 -2
- package/dist/src/lib/utils/initialData/generateEmptyRows.d.ts +2 -2
- package/dist/src/lib/utils/initialData/processInitialData.d.ts +2 -2
- package/dist/src/lib/utils/initialData/validateInitialDataStructure.d.ts +2 -2
- package/dist/src/lib/utils/isOfType.d.ts +5 -5
- package/dist/src/lib/utils/mustache.d.ts +2 -2
- package/dist/src/lib/utils/normaliseSchema.d.ts +2 -2
- package/dist/src/lib/utils/resolveLocale.d.ts +2 -2
- package/dist/src/lib/utils/sanitiseFieldMappingsAndExtractFieldsForWorker.d.ts +2 -2
- package/dist/src/lib/utils/smartFix/smartFixCell.d.ts +2 -2
- package/dist/src/lib/utils/validateRows/applyExistenceBatch.d.ts +2 -2
- package/dist/src/lib/utils/validateRows/collectRemoteTasks.d.ts +2 -2
- package/dist/src/lib/utils/validateRows/ensureProvider.d.ts +2 -2
- package/dist/src/lib/utils/validateRows/runRemoteValidation.d.ts +2 -2
- package/dist/src/lib/utils/validateRows/separateSyncAsyncSchemas.d.ts +2 -2
- package/dist/src/lib/utils/validateRows/types.d.ts +2 -2
- package/dist/src/lib/utils/validators/makeResult.d.ts +2 -2
- package/dist/src/lib/utils/validators/resolveEnumerate.d.ts +2 -2
- package/dist/src/lib/utils/validators/sortValidators.d.ts +2 -2
- package/dist/src/lib/utils/validators/spec/spec.utils.d.ts +2 -2
- package/dist/src/lib/utils/validators/validateCell.d.ts +2 -2
- package/dist/src/lib/utils/validators/validateEnumerate.d.ts +2 -2
- package/dist/src/lib/utils/validators/validateRequired.d.ts +2 -2
- package/dist/src/lib/utils/validators/validateRules.d.ts +2 -2
- package/dist/src/lib/utils/validators/validateUnique.d.ts +2 -2
- package/dist/src/lib/workers/csv-export/generateCsvForRows.d.ts +2 -2
- package/dist/src/lib/workers/csv-export/useCsvExportWorker.d.ts +2 -2
- package/dist/src/lib/workers/dropdown-resolver/resolveDropdownsForRows.d.ts +2 -2
- package/dist/src/lib/workers/dropdown-resolver/useDropdownResolverWorker.d.ts +2 -2
- package/dist/src/lib/workers/excel-export/useExcelExportWorker.d.ts +2 -2
- package/dist/src/lib/workers/excel-to-table-rows/excel-to-table-rows.worker.d.ts +2 -2
- package/dist/src/lib/workers/excel-to-table-rows/sortWorkbookMappings.d.ts +2 -2
- package/dist/src/lib/workers/excel-to-table-rows/useExcelToTableRowsWorker.d.ts +2 -2
- package/dist/src/lib/workers/hooks/actionDispatcher.d.ts +2 -2
- package/dist/src/lib/workers/transform-table-rows/transformTableRows.d.ts +2 -2
- package/dist/src/lib/workers/transform-table-rows/useTransformTableRows.d.ts +2 -2
- package/dist/src/lib/workers/validator/useValidatorWorker.d.ts +2 -2
- package/dist/{sv-SE.min-D1kuIGcT.js → sv-SE.min-CxdN0uAG.js} +1 -1
- package/dist/{sv-SE.min-Cal47WU4.cjs → sv-SE.min-Cy0QanSF.cjs} +1 -1
- package/dist/{th-TH.min-BUehzRSC.cjs → th-TH.min-C1mu7rQ_.cjs} +1 -1
- package/dist/{th-TH.min-DRe0nSHF.js → th-TH.min-DpwReKn7.js} +1 -1
- package/dist/{tr-TR.min-O_fG8A__.cjs → tr-TR.min-ChfaGvwE.cjs} +1 -1
- package/dist/{tr-TR.min-DnDm8hVO.js → tr-TR.min-DazOj4zV.js} +1 -1
- package/dist/{uk-UA.min-DnL57i1a.js → uk-UA.min-D8Qoa9Dj.js} +1 -1
- package/dist/{uk-UA.min-YtEImU_e.cjs → uk-UA.min-uZvCOslK.cjs} +1 -1
- package/dist/{zh-CN.min-C74aOZCN.js → zh-CN.min-BYhYk9lZ.js} +1 -1
- package/dist/{zh-CN.min-witTaVQR.cjs → zh-CN.min-DuQMejNG.cjs} +1 -1
- package/dist/{zh-MO.min-DAgjqzbf.cjs → zh-MO.min-DgRBZasn.cjs} +1 -1
- package/dist/{zh-MO.min-9wdftM4y.js → zh-MO.min-DhFhTikI.js} +1 -1
- package/dist/{zh-SG.min-_A6Awd29.cjs → zh-SG.min-B6_lPHU9.cjs} +1 -1
- package/dist/{zh-SG.min-D_042HWx.js → zh-SG.min-BYA84UDA.js} +1 -1
- package/dist/{zh-TW.min-BtVwa6x1.js → zh-TW.min-DJOdauOy.js} +1 -1
- package/dist/{zh-TW.min-Cb_nZSSu.cjs → zh-TW.min-KvPCMxkX.cjs} +1 -1
- package/package.json +104 -103
- package/dist/index-CCksJlwR.cjs +0 -1
- package/dist/src/lib/types/events.d.ts +0 -15
- package/dist/src/lib/types/external.types.d.ts +0 -91
- package/dist/src/lib/types/internal.types.d.ts +0 -167
- package/dist/src/lib/types/table.types.d.ts +0 -4
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { DataSources, IFieldSchemaSanitised,
|
|
1
|
+
import { DataSources, IFieldSchemaSanitised, ITableRow } from '.';
|
|
2
2
|
export interface IDropdownResolverWorkerMessage {
|
|
3
|
-
tableRows:
|
|
3
|
+
tableRows: ITableRow[];
|
|
4
4
|
dropdownFields: IFieldSchemaSanitised[];
|
|
5
5
|
dataSources: DataSources;
|
|
6
6
|
chunkStart: number;
|
|
7
7
|
}
|
|
8
8
|
export interface IDropdownResolverWorkerResponse {
|
|
9
|
-
data:
|
|
9
|
+
data: ITableRow[];
|
|
10
10
|
chunkStart: number;
|
|
11
11
|
status: 'done' | 'failed';
|
|
12
12
|
error?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IFieldSchemaSanitised,
|
|
1
|
+
import { IFieldSchemaSanitised, ITableRow } from '.';
|
|
2
2
|
export interface IExcelExportWorkerMessage {
|
|
3
|
-
tableRows:
|
|
3
|
+
tableRows: ITableRow[];
|
|
4
4
|
fieldSchemas: IFieldSchemaSanitised[];
|
|
5
5
|
chunkStart: number;
|
|
6
6
|
}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
export * from './internal.types';
|
|
2
1
|
export * from './parser.types';
|
|
3
2
|
export * from './transformActions.types';
|
|
4
3
|
export * from './schema.types';
|
|
5
|
-
export * from './external.types';
|
|
6
|
-
export * from './table.types';
|
|
7
4
|
export * from './validators.types';
|
|
8
5
|
export * from './cellTransformerAction.type';
|
|
9
6
|
export * from './columnTransformerAction.type';
|
|
@@ -1,16 +1,186 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IFieldValidator, ICellError } from './validators.types';
|
|
2
2
|
import { IRemoteOptionsConfig } from './remote.types';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { IFieldTransformerMapInternal } from './transformActions.types';
|
|
6
|
-
import { IEventHandlersInternal } from './events';
|
|
7
|
-
import { ICleanNumberOptions, ICombineColumnsTransformActionPayload, IFormatBooleanOptions } from './cellTransformerAction.type';
|
|
3
|
+
import { IFieldTransformerMap, ITransformActionPayload, ITransformActionRunOn } from './transformActions.types';
|
|
4
|
+
import { ICleanNumberOptions, ICombineColumnsTransformActionPayload, IFormatBooleanOptions, ICellTransformAction } from './cellTransformerAction.type';
|
|
8
5
|
import { ILocale, ILocaleLanguage } from '.';
|
|
9
6
|
import { CountryCode } from '../utils/locale';
|
|
7
|
+
import { IFileInfo, IMeta } from './meta';
|
|
8
|
+
import { WorkBook } from 'xlsx';
|
|
9
|
+
import { IParsedSheetData } from './parser.types';
|
|
10
|
+
import { IColumnTransformAction } from './columnTransformerAction.type';
|
|
11
|
+
import { DetailedSettings } from 'handsontable/plugins/pagination';
|
|
12
|
+
export type ITableCell = Pick<IFieldSchema, 'key' | 'type' | 'defaultValue'> & {
|
|
13
|
+
currentValue: IvtCellValue;
|
|
14
|
+
currentError: ICellError | null;
|
|
15
|
+
currentOptions?: IDropdownFieldObjectOption[];
|
|
16
|
+
newValue?: IvtCellValue;
|
|
17
|
+
newError: ICellError | null;
|
|
18
|
+
newOptions?: IDropdownFieldObjectOption[];
|
|
19
|
+
};
|
|
20
|
+
export type DefaultTableRowType = Record<string, IvtCellValue>;
|
|
21
|
+
export type ITableRow<TableRow = DefaultTableRowType> = Record<keyof TableRow, IvtCellValue>;
|
|
22
|
+
export type ITableRowChange<TableRow = DefaultTableRowType> = Record<keyof TableRow, ITableCell>;
|
|
23
|
+
export type ITableRows<TableRow = DefaultTableRowType> = ITableRow<TableRow>[];
|
|
24
|
+
export interface FieldSchemaMap {
|
|
25
|
+
dropdown: IDropdownFieldSchema;
|
|
26
|
+
phone: IPhoneFieldSchema;
|
|
27
|
+
monetary: IMonetaryFieldSchema;
|
|
28
|
+
checkbox: ICheckBoxFieldSchema;
|
|
29
|
+
date: IDateFieldSchema;
|
|
30
|
+
numeric: INumericFieldSchema;
|
|
31
|
+
password: IPasswordFieldSchema;
|
|
32
|
+
text: ITextFieldSchema;
|
|
33
|
+
time: ITimeFieldSchema;
|
|
34
|
+
combine: ICombineFiledSchema;
|
|
35
|
+
}
|
|
36
|
+
export interface IFileHeader {
|
|
37
|
+
label: string;
|
|
38
|
+
key: string;
|
|
39
|
+
order: number;
|
|
40
|
+
}
|
|
41
|
+
export interface IFieldMapping {
|
|
42
|
+
field: IFieldSchema;
|
|
43
|
+
file: IFileHeader | null;
|
|
44
|
+
perfectMatch: boolean;
|
|
45
|
+
guessMatch: boolean;
|
|
46
|
+
aiMatch: boolean;
|
|
47
|
+
manualMatch: boolean;
|
|
48
|
+
hiddenInMappingStage: boolean;
|
|
49
|
+
hiddenInReviewState: boolean;
|
|
50
|
+
}
|
|
51
|
+
export interface IFieldMappingSanitised {
|
|
52
|
+
field: IFieldSchemaSanitised;
|
|
53
|
+
file: IFileHeader | null;
|
|
54
|
+
perfectMatch: boolean;
|
|
55
|
+
guessMatch: boolean;
|
|
56
|
+
aiMatch: boolean;
|
|
57
|
+
}
|
|
58
|
+
export type IHotCellEditChange = [
|
|
59
|
+
number,
|
|
60
|
+
string,
|
|
61
|
+
IvtCellValue,
|
|
62
|
+
IvtCellValue
|
|
63
|
+
];
|
|
64
|
+
export type IHotCellUpdateChange = [
|
|
65
|
+
number,
|
|
66
|
+
string,
|
|
67
|
+
IvtCellValue
|
|
68
|
+
];
|
|
69
|
+
export type ISimpleOption = {
|
|
70
|
+
label: string;
|
|
71
|
+
value: string;
|
|
72
|
+
};
|
|
73
|
+
export type IFieldSchemaSanitised<TSchema extends IFieldSchema = IFieldSchema> = Pick<TSchema, 'validators' | 'key' | 'order' | 'label' | 'type' | 'transformers'> & Partial<Pick<IBaseFieldSchema, 'alternativeMatches'>> & Partial<Pick<IMenuFieldSchema, 'options' | 'acceptNewValueIfNoOptions'>>;
|
|
74
|
+
export type IFieldMappings = IFieldMapping[];
|
|
75
|
+
export type IFileStore = {
|
|
76
|
+
fileHeaders: IFileHeader[];
|
|
77
|
+
workBook: WorkBook | null;
|
|
78
|
+
};
|
|
79
|
+
export interface ICellErrorWithMeta<TableRow = DefaultTableRowType> {
|
|
80
|
+
row: number;
|
|
81
|
+
fieldKey: keyof TableRow;
|
|
82
|
+
col: number;
|
|
83
|
+
error: ICellError;
|
|
84
|
+
}
|
|
85
|
+
export interface IValidatorWorkerResponse {
|
|
86
|
+
errors: ICellErrorWithMeta[];
|
|
87
|
+
status: 'in-progress' | 'done' | 'failed';
|
|
88
|
+
error?: string;
|
|
89
|
+
progress?: {
|
|
90
|
+
inc: number;
|
|
91
|
+
total: number;
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
export interface IActionWorkerResponse {
|
|
95
|
+
data: ITableRows;
|
|
96
|
+
status: 'done' | 'failed';
|
|
97
|
+
}
|
|
98
|
+
export interface ITransformerWorkerResponse {
|
|
99
|
+
data: ITableRows;
|
|
100
|
+
chunkStart: number;
|
|
101
|
+
status: 'done' | 'failed';
|
|
102
|
+
}
|
|
103
|
+
export type FuzzyIndexes = Map<string, string>;
|
|
104
|
+
export interface IValidatorWorkerMessage {
|
|
105
|
+
rowRange: ITableRowRange;
|
|
106
|
+
tableRows: ITableRow[];
|
|
107
|
+
dataSource: DataSources;
|
|
108
|
+
tableRowsStartIndex: number;
|
|
109
|
+
fieldSchemas: IFieldSchemaSanitised[];
|
|
110
|
+
}
|
|
111
|
+
export interface ITableRowRange {
|
|
112
|
+
startRowIndex: number;
|
|
113
|
+
rowsLength: number;
|
|
114
|
+
}
|
|
115
|
+
export interface IValidateCellChangesData {
|
|
116
|
+
changes: IHotCellEditChange[];
|
|
117
|
+
tableRows: ITableRows;
|
|
118
|
+
dataSource?: DataSources;
|
|
119
|
+
fieldSchemas: IFieldSchemaSanitised[];
|
|
120
|
+
}
|
|
121
|
+
export interface IActionWorkerMessage {
|
|
122
|
+
tableRows: ITableRows;
|
|
123
|
+
hiddenRows: number[];
|
|
124
|
+
cellErrors: ICellErrorWithMeta[];
|
|
125
|
+
action: IColumnTransformAction | ICellTransformAction;
|
|
126
|
+
payload: ITransformActionPayload;
|
|
127
|
+
dataSources: DataSources;
|
|
128
|
+
}
|
|
129
|
+
export interface IMappingWorkerResponse {
|
|
130
|
+
tableRows: ITableRows;
|
|
131
|
+
status: 'done' | 'failed';
|
|
132
|
+
error?: string;
|
|
133
|
+
}
|
|
134
|
+
export interface IMappingWorkerMessage {
|
|
135
|
+
fieldMappings: IFieldMappingSanitised[];
|
|
136
|
+
sheetData: IParsedSheetData['rows'];
|
|
137
|
+
}
|
|
138
|
+
export interface ITransformerTableWorkerMessage {
|
|
139
|
+
tableRows: ITableRows;
|
|
140
|
+
hiddenRows: number[];
|
|
141
|
+
chunkStart: number;
|
|
142
|
+
dataSources: DataSources;
|
|
143
|
+
cellErrors: ICellErrorWithMeta[];
|
|
144
|
+
runOns: ITransformActionRunOn[];
|
|
145
|
+
fieldSchemas: IFieldSchemaSanitised[];
|
|
146
|
+
}
|
|
147
|
+
export type IToastMessage = {
|
|
148
|
+
id?: string;
|
|
149
|
+
title?: string;
|
|
150
|
+
message?: string;
|
|
151
|
+
type: 'info' | 'error' | 'warning' | 'success';
|
|
152
|
+
dismissible?: boolean;
|
|
153
|
+
timeout?: number;
|
|
154
|
+
};
|
|
155
|
+
export type IFileExtension = 'xls' | 'xlsx' | 'csv' | 'pdf' | 'json' | 'txt' | 'xml' | 'unknown';
|
|
156
|
+
export type IvtCellValue = string | number | Date | null | undefined | boolean | IDropdownFieldObjectOption;
|
|
157
|
+
export type ISearchColumnResult = {
|
|
158
|
+
row: number;
|
|
159
|
+
column: number;
|
|
160
|
+
cellValue: string;
|
|
161
|
+
};
|
|
162
|
+
export type IActiveBadge = 'valid' | 'warning' | 'invalid' | 'all' | 'duplicate';
|
|
163
|
+
export type IRowRange = 'all' | 'errors' | 'warnings' | 'valids' | 'duplicates';
|
|
164
|
+
export type CreateImportRequest = {
|
|
165
|
+
rows: ITableRows;
|
|
166
|
+
meta: IMeta;
|
|
167
|
+
originalSchema: IvtSchema;
|
|
168
|
+
};
|
|
169
|
+
export interface CreateImportResponse {
|
|
170
|
+
id: string;
|
|
171
|
+
templateId: string;
|
|
172
|
+
createdAt: Date;
|
|
173
|
+
updatedAt: Date;
|
|
174
|
+
originalFileUrl: string | null;
|
|
175
|
+
meta: IMeta;
|
|
176
|
+
}
|
|
177
|
+
export type PaginationProps = Required<Omit<DetailedSettings, 'uiContainer' | 'pageSize'>> & {
|
|
178
|
+
pageSize: number;
|
|
179
|
+
};
|
|
10
180
|
export type IFieldSchemaType = 'dropdown' | 'checkbox' | 'date' | 'numeric' | 'monetary' | 'password' | 'text' | 'combine' | 'time' | 'phone';
|
|
11
|
-
export interface
|
|
12
|
-
validators?:
|
|
13
|
-
transformers?:
|
|
181
|
+
export interface IBaseFieldSchema<TableRow = DefaultTableRowType> {
|
|
182
|
+
validators?: IFieldValidator<TableRow>[];
|
|
183
|
+
transformers?: IFieldTransformerMap[];
|
|
14
184
|
type: IFieldSchemaType;
|
|
15
185
|
label: string;
|
|
16
186
|
key: string;
|
|
@@ -24,12 +194,12 @@ export interface IBaseFieldSchemaInternal {
|
|
|
24
194
|
defaultValue?: IvtCellValue;
|
|
25
195
|
onChange?: (rowNumber: number, oldValue: string, newValue: string) => void;
|
|
26
196
|
}
|
|
27
|
-
export interface
|
|
197
|
+
export interface ICheckBoxFieldSchema extends Omit<IBaseFieldSchema, 'defaultValue'> {
|
|
28
198
|
type: 'checkbox';
|
|
29
199
|
defaultValue?: boolean;
|
|
30
200
|
autoClean?: false | IFormatBooleanOptions;
|
|
31
201
|
}
|
|
32
|
-
export interface
|
|
202
|
+
export interface IDateFieldSchema extends Omit<IBaseFieldSchema, 'defaultValue'> {
|
|
33
203
|
type: 'date';
|
|
34
204
|
defaultValue?: Date | string;
|
|
35
205
|
formatPattern: string;
|
|
@@ -40,13 +210,13 @@ export interface IFormatDateAutoCleanOptions {
|
|
|
40
210
|
parsePatterns?: string[];
|
|
41
211
|
strictParsing?: boolean;
|
|
42
212
|
}
|
|
43
|
-
export interface
|
|
213
|
+
export interface INumericFieldSchema extends Omit<IBaseFieldSchema, 'defaultValue'> {
|
|
44
214
|
type: 'numeric';
|
|
45
215
|
defaultValue?: number;
|
|
46
216
|
locale?: ILocale;
|
|
47
217
|
autoClean?: false | Omit<ICleanNumberOptions, 'locale'>;
|
|
48
218
|
}
|
|
49
|
-
export interface
|
|
219
|
+
export interface IMonetaryFieldSchema<TableRow = DefaultTableRowType> extends Omit<IBaseFieldSchema, 'defaultValue'> {
|
|
50
220
|
type: 'monetary';
|
|
51
221
|
locale?: ILocale | {
|
|
52
222
|
fieldKey: keyof TableRow;
|
|
@@ -61,33 +231,33 @@ export interface IMonetaryFieldSchemaInternal<TableRow = DefaultTableRowType> ex
|
|
|
61
231
|
};
|
|
62
232
|
defaultValue?: number;
|
|
63
233
|
}
|
|
64
|
-
export interface
|
|
234
|
+
export interface IPasswordFieldSchema extends IBaseFieldSchema {
|
|
65
235
|
type: 'password';
|
|
66
236
|
defaultValue?: string;
|
|
67
237
|
}
|
|
68
|
-
export interface
|
|
238
|
+
export interface IDropdownFieldSchema extends IBaseFieldSchema {
|
|
69
239
|
type: 'dropdown';
|
|
70
|
-
options: IDataSourceResolver | IRemoteOptionsConfig;
|
|
240
|
+
options: string[] | IDropdownFieldObjectOption[] | IDataSourceResolver | IRemoteOptionsConfig;
|
|
71
241
|
acceptNewValueIfNoOptions?: boolean;
|
|
72
242
|
}
|
|
73
243
|
export type IDropdownFieldObjectOption = {
|
|
74
244
|
label: string;
|
|
75
245
|
value: string;
|
|
76
246
|
};
|
|
77
|
-
export interface
|
|
247
|
+
export interface ITextFieldSchema extends IBaseFieldSchema {
|
|
78
248
|
type: 'text';
|
|
79
249
|
defaultValue?: string;
|
|
80
250
|
}
|
|
81
|
-
export interface
|
|
251
|
+
export interface ICombineFiledSchema extends Omit<IBaseFieldSchema, 'alternativeMatches'> {
|
|
82
252
|
type: 'combine';
|
|
83
253
|
combine: Omit<ICombineColumnsTransformActionPayload, 'fieldSchemas' | 'columnNumber'>;
|
|
84
254
|
defaultValue?: string;
|
|
85
255
|
}
|
|
86
|
-
export interface
|
|
256
|
+
export interface ITimeFieldSchema extends IBaseFieldSchema {
|
|
87
257
|
type: 'time';
|
|
88
258
|
}
|
|
89
259
|
/**
|
|
90
|
-
*
|
|
260
|
+
* IPhoneFieldSchema
|
|
91
261
|
* Field for phone numbers with automatic validation and formatting.
|
|
92
262
|
*
|
|
93
263
|
* The SDK automatically adds:
|
|
@@ -97,7 +267,7 @@ export interface ITimeFieldSchemaInternal extends IBaseFieldSchemaInternal {
|
|
|
97
267
|
* Phone numbers are validated against allowed countries using libphonenumber-js.
|
|
98
268
|
* The transformer cleans and formats numbers consistently based on withInternationalCode setting.
|
|
99
269
|
* */
|
|
100
|
-
export interface
|
|
270
|
+
export interface IPhoneFieldSchema extends IBaseFieldSchema {
|
|
101
271
|
type: 'phone';
|
|
102
272
|
/**
|
|
103
273
|
* countries
|
|
@@ -160,61 +330,75 @@ export type DataSources = Record<string, any>;
|
|
|
160
330
|
export interface IDataSourceResolver {
|
|
161
331
|
query: string;
|
|
162
332
|
}
|
|
163
|
-
export type
|
|
164
|
-
export type
|
|
165
|
-
export type
|
|
333
|
+
export type IMenuFieldSchema = IDropdownFieldSchema;
|
|
334
|
+
export type IFieldSchema = IMenuFieldSchema | ICheckBoxFieldSchema | IDateFieldSchema | INumericFieldSchema | IMonetaryFieldSchema | IPasswordFieldSchema | ITextFieldSchema | ICombineFiledSchema | ITimeFieldSchema | IPhoneFieldSchema;
|
|
335
|
+
export type IvtSchema<TableRow = DefaultTableRowType> = {
|
|
166
336
|
id?: string;
|
|
167
337
|
title: string;
|
|
168
338
|
key: string;
|
|
169
|
-
dataSources
|
|
170
|
-
fields:
|
|
339
|
+
dataSources?: DataSources;
|
|
340
|
+
fields: IFieldSchema[];
|
|
171
341
|
publicKey: string;
|
|
172
342
|
sessionToken: string;
|
|
173
|
-
initialData?:
|
|
343
|
+
initialData?: ITableRows;
|
|
174
344
|
initialFile?: File;
|
|
175
345
|
environment?: 'local' | 'dev' | 'staging' | 'prod';
|
|
176
|
-
eventHandlers?:
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
346
|
+
eventHandlers?: {
|
|
347
|
+
onBeforeRowsChange?: (changedTableRows: ITableRowChange<TableRow>[], range: ITableRowRange, fullTableRows: ITableRows<TableRow>) => Promise<{
|
|
348
|
+
changedRows: ITableRowChange<TableRow>[];
|
|
349
|
+
}>;
|
|
350
|
+
onSubmit?: (tableRows: ITableRows<TableRow>, meta: IMeta, cellErrors: ICellErrorWithMeta[], submitMeta: CreateImportResponse | null) => Promise<void>;
|
|
351
|
+
onExport?: (tableRows: ITableRows<TableRow>, meta: IMeta, cellErrors: ICellErrorWithMeta[]) => Promise<void>;
|
|
352
|
+
onSubmitError?: (error: any) => void;
|
|
353
|
+
onSubmitCancel?: () => void;
|
|
354
|
+
onFileUpload?: (file: File, fileMeta: IFileInfo) => void;
|
|
355
|
+
onReady?: (rootElement: HTMLElement) => void;
|
|
356
|
+
onCancelImporter?: () => void;
|
|
357
|
+
};
|
|
358
|
+
stepsConfig?: {
|
|
359
|
+
uploadFileStep?: {
|
|
360
|
+
title?: string;
|
|
361
|
+
subTitle?: string;
|
|
362
|
+
supportedExtensions?: IFileExtension[];
|
|
363
|
+
dataEntryMethod?: 'manual' | 'upload' | 'manual_and_upload';
|
|
364
|
+
maxColumns?: number;
|
|
365
|
+
maxRows?: number;
|
|
366
|
+
maxFileSize?: number;
|
|
367
|
+
};
|
|
368
|
+
mapHeadersStep?: {
|
|
369
|
+
title?: string;
|
|
370
|
+
subTitle?: string;
|
|
371
|
+
passThroughExcessColumns?: boolean;
|
|
372
|
+
unMatchedHeadersBehaviour?: 'block' | 'allow' | 'warn';
|
|
373
|
+
intelligentImport?: boolean;
|
|
186
374
|
};
|
|
187
|
-
|
|
188
|
-
title
|
|
189
|
-
subTitle
|
|
190
|
-
passThroughExcessColumns: boolean;
|
|
191
|
-
unMatchedHeadersBehaviour: 'block' | 'allow' | 'warn';
|
|
192
|
-
intelligentImport: boolean;
|
|
375
|
+
chooseSheetStep?: {
|
|
376
|
+
title?: string;
|
|
377
|
+
subTitle?: string;
|
|
193
378
|
};
|
|
194
|
-
|
|
195
|
-
title
|
|
196
|
-
subTitle
|
|
379
|
+
mapFieldsStep?: {
|
|
380
|
+
title?: string;
|
|
381
|
+
subTitle?: string;
|
|
382
|
+
intelligentFieldMapping?: boolean;
|
|
197
383
|
};
|
|
198
|
-
|
|
199
|
-
title
|
|
200
|
-
subTitle
|
|
201
|
-
|
|
384
|
+
reviewStep?: {
|
|
385
|
+
title?: string;
|
|
386
|
+
subTitle?: string;
|
|
387
|
+
invalidDataBehaviour?: 'block_submit' | 'remove_invalid_rows' | 'include_invalid_rows';
|
|
388
|
+
storeInIvandtServer?: boolean;
|
|
389
|
+
allowCustomColumn?: boolean;
|
|
390
|
+
allowSubmitCancel?: boolean;
|
|
391
|
+
pagination?: boolean | IPaginationOptions;
|
|
202
392
|
};
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
subTitle: string;
|
|
206
|
-
invalidDataBehaviour: 'block_submit' | 'remove_invalid_rows' | 'include_invalid_rows';
|
|
207
|
-
storeInIvandtServer: boolean;
|
|
208
|
-
allowCustomColumn: boolean;
|
|
209
|
-
allowSubmitCancel: boolean;
|
|
210
|
-
pagination: boolean | IPaginationOptions;
|
|
393
|
+
shared?: {
|
|
394
|
+
withCancelButton?: boolean;
|
|
211
395
|
};
|
|
212
396
|
};
|
|
213
|
-
advanced
|
|
214
|
-
maxInMemoryValidationRows
|
|
215
|
-
maxPerWorkerValidationRows
|
|
216
|
-
maxInMemoryTransformationRows
|
|
217
|
-
maxPerWorkerTransformationRows
|
|
397
|
+
advanced?: {
|
|
398
|
+
maxInMemoryValidationRows?: number;
|
|
399
|
+
maxPerWorkerValidationRows?: number;
|
|
400
|
+
maxInMemoryTransformationRows?: number;
|
|
401
|
+
maxPerWorkerTransformationRows?: number;
|
|
218
402
|
};
|
|
219
403
|
locale?: ILocaleLanguage;
|
|
220
404
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IFieldSchemaSanitised } from './internal.types';
|
|
2
1
|
import { ColumnActionPayloadMap, IColumnTransformActionPayload } from './columnTransformerAction.type';
|
|
3
2
|
import { CellActionPayloadMap, ICellTransformActionPayload } from './cellTransformerAction.type';
|
|
3
|
+
import { IFieldSchemaSanitised } from './schema.types';
|
|
4
4
|
export type ITransformActionRunOn = 'load' | 'cells-change';
|
|
5
5
|
export interface ITransformActionPayloadBase {
|
|
6
6
|
runOns?: ITransformActionRunOn[];
|
|
@@ -8,16 +8,34 @@ export interface ITransformActionPayloadBase {
|
|
|
8
8
|
fieldSchemas: IFieldSchemaSanitised[];
|
|
9
9
|
}
|
|
10
10
|
export type ITransformActionPayload = IColumnTransformActionPayload | ICellTransformActionPayload;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Extract required keys from a type.
|
|
13
|
+
* Returns `never` if all keys are optional (or type is empty).
|
|
14
|
+
*/
|
|
15
|
+
type RequiredKeys<T> = {
|
|
16
|
+
[K in keyof T]-?: object extends Pick<T, K> ? never : K;
|
|
17
|
+
}[keyof T];
|
|
18
|
+
/**
|
|
19
|
+
* The user-facing payload type (internal fields stripped out).
|
|
20
|
+
*/
|
|
21
|
+
type UserPayload<T> = Omit<T, 'columnNumber' | 'fieldSchemas'>;
|
|
22
|
+
/**
|
|
23
|
+
* Build a transformer map entry where:
|
|
24
|
+
* - If the payload has required keys → `payload` is required
|
|
25
|
+
* - If the payload has NO required keys (all optional or empty) → `payload` is optional
|
|
26
|
+
*/
|
|
27
|
+
type TransformerMapEntry<A, P> = RequiredKeys<UserPayload<P>> extends never ? {
|
|
28
|
+
action: A;
|
|
29
|
+
payload?: UserPayload<P>;
|
|
30
|
+
} : {
|
|
31
|
+
action: A;
|
|
32
|
+
payload: UserPayload<P>;
|
|
33
|
+
};
|
|
34
|
+
export type ICellFieldTransformerMap = {
|
|
35
|
+
[A in keyof CellActionPayloadMap]: TransformerMapEntry<A, CellActionPayloadMap[A]>;
|
|
16
36
|
}[keyof CellActionPayloadMap];
|
|
17
|
-
export type
|
|
18
|
-
[A in keyof ColumnActionPayloadMap]:
|
|
19
|
-
action: A;
|
|
20
|
-
payload: Omit<ColumnActionPayloadMap[A], 'columnNumber' | 'fieldSchemas'>;
|
|
21
|
-
};
|
|
37
|
+
export type IColumnFieldTransformerMap = {
|
|
38
|
+
[A in keyof ColumnActionPayloadMap]: TransformerMapEntry<A, ColumnActionPayloadMap[A]>;
|
|
22
39
|
}[keyof ColumnActionPayloadMap];
|
|
23
|
-
export type
|
|
40
|
+
export type IFieldTransformerMap = IColumnFieldTransformerMap | ICellFieldTransformerMap;
|
|
41
|
+
export {};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { IsCreditCardOptions } from 'validator';
|
|
2
|
-
import { DefaultTableRowType,
|
|
2
|
+
import { DefaultTableRowType, ITableRow, IFormatDateAutoCleanOptions } from './schema.types';
|
|
3
3
|
import { IsURLOptions } from 'validator/lib/isURL';
|
|
4
4
|
import { Rule } from '@ivandt/json-rules';
|
|
5
5
|
import { ICleanNumberOptions, IFormatBooleanOptions, IGenerateUUIDsTransformActionPayload, IsEmailOptions } from './cellTransformerAction.type';
|
|
6
6
|
import { CountryCode } from '../utils/locale';
|
|
7
7
|
import { ILocale } from './locale';
|
|
8
|
-
import { IFormatDateAutoCleanOptions } from './schema.types';
|
|
9
8
|
export type IFieldValidatorType = 'required' | 'rules' | 'uuid' | 'numeric' | 'boolean' | 'unique' | 'regex' | 'email' | 'min' | 'max' | 'range' | 'minLength' | 'maxLength' | 'url' | 'phone' | 'date' | 'enumerate' | 'creditcard' | 'custom';
|
|
10
9
|
/**
|
|
11
10
|
* Severity level for validation errors.
|
|
@@ -14,7 +13,7 @@ export type IFieldValidatorType = 'required' | 'rules' | 'uuid' | 'numeric' | 'b
|
|
|
14
13
|
* - 'w' (warning): Marks the cell with an orange warning indicator. Does not block submission. Useful for optional fields where data would be beneficial but not required.
|
|
15
14
|
*/
|
|
16
15
|
export type IErrorSeverity = 'w' | 'e';
|
|
17
|
-
export type IFieldValidatorValidate = (cellValue: string, rowData?:
|
|
16
|
+
export type IFieldValidatorValidate = (cellValue: string, rowData?: ITableRow) => ICellError | Promise<ICellError>;
|
|
18
17
|
export interface IBaseFieldValidator {
|
|
19
18
|
type: IFieldValidatorType;
|
|
20
19
|
message?: string;
|
|
@@ -29,7 +28,7 @@ export interface ICellError {
|
|
|
29
28
|
/**
|
|
30
29
|
* The type of validator that produced this error, or null if validation passed.
|
|
31
30
|
*/
|
|
32
|
-
type:
|
|
31
|
+
type: IFieldValidator['type'] | null;
|
|
33
32
|
/**
|
|
34
33
|
* Severity level of the error.
|
|
35
34
|
* - 'e': Error that blocks submission or removes the row.
|
|
@@ -231,7 +230,7 @@ export interface IBooleanFieldValidator extends IBaseFieldValidator {
|
|
|
231
230
|
* }
|
|
232
231
|
* ```
|
|
233
232
|
*/
|
|
234
|
-
export interface
|
|
233
|
+
export interface IUniqueFieldValidator extends IBaseFieldValidator {
|
|
235
234
|
/**
|
|
236
235
|
* Validator type identifier.
|
|
237
236
|
* @constant 'unique'
|
|
@@ -242,7 +241,7 @@ export interface IUniqueFieldValidatorInternal extends IBaseFieldValidator {
|
|
|
242
241
|
* Key is the cell value, value is the count of occurrences.
|
|
243
242
|
* @internal
|
|
244
243
|
*/
|
|
245
|
-
valueCounts
|
|
244
|
+
valueCounts?: Record<string, number>;
|
|
246
245
|
}
|
|
247
246
|
/**
|
|
248
247
|
* Validates that a field matches a specified regular expression pattern.
|
|
@@ -633,13 +632,13 @@ export interface ICustomFieldValidator extends IBaseFieldValidator {
|
|
|
633
632
|
*/
|
|
634
633
|
validate: IFieldValidatorValidate;
|
|
635
634
|
}
|
|
636
|
-
export type
|
|
635
|
+
export type IFieldValidator<TableRow = DefaultTableRowType> = IRequiredFieldValidator | IRulesFieldValidator<TableRow> | IUUIDFieldValidator | INumericFieldValidator | IBooleanFieldValidator | IUniqueFieldValidator | IRegexFieldValidator | IEmailFieldValidator | IMinFieldValidator | IMaxFieldValidator | IRangeFieldValidator | IMinLengthFieldValidator | IMaxLengthFieldValidator | IUrlFieldValidator | IPhoneFieldValidator | IDateFieldValidator | IEnumerateFieldValidator | ICreditCardFieldValidator | ICustomFieldValidator;
|
|
637
636
|
export interface IFieldValidatorMap {
|
|
638
637
|
required: IRequiredFieldValidator;
|
|
639
638
|
rules: IRulesFieldValidator;
|
|
640
639
|
numeric: INumericFieldValidator;
|
|
641
640
|
boolean: IBooleanFieldValidator;
|
|
642
|
-
unique:
|
|
641
|
+
unique: IUniqueFieldValidator;
|
|
643
642
|
regex: IRegexFieldValidator;
|
|
644
643
|
email: IEmailFieldValidator;
|
|
645
644
|
min: IMinFieldValidator;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IHotCellEditChange,
|
|
1
|
+
import { IHotCellEditChange, ITableRows, ITableRowRange } from '../types';
|
|
2
2
|
/**
|
|
3
3
|
* Extracts and merges a contiguous slice of table rows based on a set of cell edits.
|
|
4
4
|
*
|
|
@@ -15,7 +15,7 @@ import { IHotCellEditChange, ITableRowInternal, ITableRowRange } from '../types'
|
|
|
15
15
|
* - `augmentedRows`: The merged row objects for every index from the first change to the last.
|
|
16
16
|
* - `range`: An object `{ startRowIndex, rowsLength }` describing the slice of rows extracted.
|
|
17
17
|
*/
|
|
18
|
-
export declare function augmentCellChangesWithTableRows(changes: IHotCellEditChange[], tableRows:
|
|
19
|
-
augmentedRows:
|
|
18
|
+
export declare function augmentCellChangesWithTableRows(changes: IHotCellEditChange[], tableRows: ITableRows): {
|
|
19
|
+
augmentedRows: ITableRows;
|
|
20
20
|
range: ITableRowRange;
|
|
21
21
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { IFieldMappings, IHotCellEditChange,
|
|
2
|
-
export declare function augmentChangesForCrossColumnValidation(changes: IHotCellEditChange[], fieldMappings: IFieldMappings, tableRows:
|
|
1
|
+
import { IFieldMappings, IHotCellEditChange, ITableRows } from '../types';
|
|
2
|
+
export declare function augmentChangesForCrossColumnValidation(changes: IHotCellEditChange[], fieldMappings: IFieldMappings, tableRows: ITableRows): IHotCellEditChange[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function createField<T extends IFieldSchemaType>(type: T, field: Omit<
|
|
1
|
+
import { FieldSchemaMap, IFieldSchemaType } from '../types';
|
|
2
|
+
export declare function createField<T extends IFieldSchemaType>(type: T, field: Omit<FieldSchemaMap[T], 'type'>): FieldSchemaMap[T];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IFieldMappings,
|
|
1
|
+
import { IFieldMappings, IFieldSchema, ICellTransformAction } from '../types';
|
|
2
2
|
/**
|
|
3
3
|
* Extracts all field keys from a combine template string.
|
|
4
4
|
* Template format: "Hello {firstName} {lastName}"
|
|
@@ -8,9 +8,12 @@ export declare function extractFieldKeysFromTemplate(template: string): string[]
|
|
|
8
8
|
/**
|
|
9
9
|
* Gets the combine transformer from a field schema if it exists.
|
|
10
10
|
*/
|
|
11
|
-
export declare function getCombineTransformer(field:
|
|
11
|
+
export declare function getCombineTransformer(field: IFieldSchema): {
|
|
12
12
|
action: ICellTransformAction.CombineColumns;
|
|
13
|
-
payload:
|
|
13
|
+
payload: {
|
|
14
|
+
runOns?: import('../types').ITransformActionRunOn[] | undefined;
|
|
15
|
+
template: string;
|
|
16
|
+
};
|
|
14
17
|
} | undefined;
|
|
15
18
|
/**
|
|
16
19
|
* Extracts all field keys used in combine transformers across all field mappings.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function getAllPossibleOptions(fieldSchema:
|
|
1
|
+
import { IFieldSchema } from '../types';
|
|
2
|
+
export declare function getAllPossibleOptions(fieldSchema: IFieldSchema): string[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function getVisibleFieldSchemas():
|
|
1
|
+
import { IFieldSchema } from '../types';
|
|
2
|
+
export declare function getVisibleFieldSchemas(): IFieldSchema[];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { IFieldMappings,
|
|
1
|
+
import { IFieldMappings, IFieldSchema } from '../types';
|
|
2
2
|
export declare const hasCalculatedField: (fieldMappings: IFieldMappings) => boolean;
|
|
3
|
-
export declare const hasCalculatedTransformer: (field:
|
|
3
|
+
export declare const hasCalculatedTransformer: (field: IFieldSchema) => boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { IFieldSchemaSanitised,
|
|
2
|
-
export declare const convertHotDataToIngTableRows: (hotData: IvtCellValue[][], fieldSchemas: IFieldSchemaSanitised[]) =>
|
|
1
|
+
import { IFieldSchemaSanitised, ITableRows, IvtCellValue } from '../../types';
|
|
2
|
+
export declare const convertHotDataToIngTableRows: (hotData: IvtCellValue[][], fieldSchemas: IFieldSchemaSanitised[]) => ITableRows;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { IHotCellUpdateChange,
|
|
2
|
-
export declare function convertTableRowsToHotCellChanges(transformedTableRows:
|
|
1
|
+
import { IHotCellUpdateChange, ITableRows, ITableRowRange } from '../../types';
|
|
2
|
+
export declare function convertTableRowsToHotCellChanges(transformedTableRows: ITableRows, range: ITableRowRange): IHotCellUpdateChange[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { IFieldSchemaSanitised,
|
|
2
|
-
export declare const convertTableRowsToHotData: (tableRows:
|
|
1
|
+
import { IFieldSchemaSanitised, ITableRows, IvtCellValue } from '../../types';
|
|
2
|
+
export declare const convertTableRowsToHotData: (tableRows: ITableRows, fieldSchemas: IFieldSchemaSanitised[]) => IvtCellValue[][];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IFieldSchema, ITableRows } from '../../types';
|
|
2
2
|
/**
|
|
3
3
|
* Generates empty rows for manual data entry
|
|
4
4
|
* Each row contains all field keys with null values
|
|
@@ -6,4 +6,4 @@ import { IFieldSchemaInternal, ITableRowsInternal } from '../../types';
|
|
|
6
6
|
* @param count - Number of empty rows to generate (default: 100)
|
|
7
7
|
* @returns Array of empty table rows
|
|
8
8
|
*/
|
|
9
|
-
export declare function generateEmptyRows(fields:
|
|
9
|
+
export declare function generateEmptyRows(fields: IFieldSchema[], count?: number): ITableRows;
|