@ingestro/importer-react 4.9.5 → 4.9.8

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.
@@ -0,0 +1 @@
1
+ import{J as T,L as F,a as G,b as q,c as Z,d as J,e as j,f as ee,h as te,l as re,m as f}from"./chunk-OVVPTSKA.js";import{a as u,c as a,f as x,h as C}from"./chunk-REPANPD5.js";import{a as g}from"./chunk-J5WOZVPO.js";var V=class{constructor({validation:e,regex:t,fields:i,errorMessage:o,operator:n,value:s}){this.getValidation=()=>this.validation;this.getRegex=()=>this.regex;this.getFields=()=>this.fields;this.getErrorMessage=()=>this.errorMessage;this.getOperator=()=>this.operator;this.getValue=()=>this.value;this.serialize=()=>({validation:this.getValidation(),fields:this.getFields(),regex:this.getRegex(),errorMessage:this.getErrorMessage(),operator:this.getOperator(),value:this.getValue()});this.validation=e,this.regex=t,this.fields=i??[],this.errorMessage=o,this.operator=n,this.value=s}},ht=V;var h=class r{constructor({description:e,key:t,example:i,label:o,type:n,validators:s,mappingValidation:y,alternativeMatches:c,columnSize:l,creator:p,baseKey:m,baseKeyCounter:E,outputFormat:M,inputFormat:b,numberFormat:O,hidden:P,disabled:R,optionMappingConfiguration:I,columnWidth:S,excludeFromAutoMatching:_}){this.getDescription=()=>this.description;this.getKey=()=>this.key;this.getExample=()=>this.example;this.getLabel=()=>this.label;this.setLabel=e=>{this.label=e};this.getType=()=>this.type;this.getOutputFormat=()=>r.getOutputFormat(this.outputFormat);this.getInputFormat=()=>this.inputFormat;this.getDeclaredInputFormat=()=>this.declaredInputFormat;this.setInputFormat=e=>{this.inputFormat=e};this.dateFormatPromptResolved=null;this.setDateFormatPromptResolved=e=>{this.dateFormatPromptResolved=e};this.getDateFormatPromptResolved=()=>this.dateFormatPromptResolved;this.resetSessionInputFormat=()=>{this.inputFormat=this.declaredInputFormat,this.dateFormatPromptResolved=null};this.getValidators=()=>this.validators;this.getColumnSize=()=>this.columnSize;this.getColumnWidth=()=>this.columnWidth;this.getIsRequired=()=>!!this.validators.find(t=>t.getValidation()==="REQUIRED");this.getIsUnique=()=>!!this.validators.find(t=>t.getValidation()==="UNIQUE");this.getIsUniqueAndRequired=()=>this.getIsRequired()===!0&&this.getIsUnique()===!0;this.hasMappingValidation=()=>!!(this.mappingValidation&&this.mappingValidation.logic&&this.mappingValidation.logic.trim().length>0);this.getMappingValidation=()=>this.mappingValidation||void 0;this.getAlternativeMatches=()=>this.alternativeMatches.filter(e=>!!e);this.getCreator=()=>this.creator;this.getBaseKey=()=>this.baseKey;this.getBaseKeyCounter=()=>this.baseKeyCounter;this.setCustomKey=({key:e,baseKey:t,baseKeyCounter:i,creator:o})=>{this.baseKey=t,this.key=e,this.baseKeyCounter=i,this.creator=o};this.isDropdown=()=>r.isTypeDropdown(this.getType());this.isCategoryType=()=>r.isTypeCategory(this.getType());this.isBooleanType=()=>this.type==="boolean";this.serialize=()=>({description:this.getDescription(),example:this.getExample(),key:this.getKey(),label:this.getLabel(),type:this.getType(),validators:[],alternativeMatches:this.getAlternativeMatches(),columnSize:this.getColumnSize(),columnWidth:this.getColumnWidth(),outputFormat:this.getOutputFormat(),inputFormat:this.getInputFormat(),isMultiSelection:this.getIsMultiSelection(),numberFormat:this.getNumberFormat(),baseKey:this.getBaseKey(),baseKeyCounter:this.getBaseKeyCounter(),creator:this.getCreator(),hidden:this.isHidden(),disabled:this.isDisabled(),optionMappingConfiguration:this.getOptionMappingConfiguration(),excludeFromAutoMatching:this.isExcludedFromAutoMatching()});this.getIsMultiSelection=()=>!1;this.getNumberFormat=()=>this.numberFormat;this.isDisabled=()=>this.disabled;this.isNumeric=()=>this.type==="int"||this.type==="float"||this.type==="currency_eur"||this.type==="currency_usd"||this.type==="percentage";this.isCurrency=()=>this.type==="currency_eur"||this.type==="currency_usd";this.baseClone=()=>{let e=this.serialize(),t=new r({description:e.description,example:e.example,key:e.key,label:e.label,type:e.type,validators:this.getValidators(),alternativeMatches:e.alternativeMatches,columnSize:e.columnSize,columnWidth:e.columnWidth,baseKey:e.baseKey,baseKeyCounter:e.baseKeyCounter,creator:e.creator,numberFormat:e.numberFormat,outputFormat:e.outputFormat,inputFormat:this.declaredInputFormat,hidden:e.hidden,disabled:e.disabled,optionMappingConfiguration:e.optionMappingConfiguration,excludeFromAutoMatching:e.excludeFromAutoMatching});return t.setInputFormat(this.inputFormat),t.setDateFormatPromptResolved(this.dateFormatPromptResolved),t};this.isHidden=()=>this.hidden;this.isExcludedFromAutoMatching=()=>this.excludeFromAutoMatching;this.getOptionMappingConfiguration=()=>this.optionMappingConfiguration;this.description=e,this.key=t,this.example=i,this.label=o,this.type=n,this.validators=s??[],this.mappingValidation=y,this.alternativeMatches=c?[...c.filter(d=>d!==o&&d!==t)?.map(d=>d?.toString())]:[],this.columnSize=l,this.creator=p,this.baseKey=m||t,this.baseKeyCounter=E||0,this.outputFormat=M||"",this.declaredInputFormat=b??null,this.inputFormat=b??null,this.numberFormat=O||"eu",this.hidden=P??!1,this.disabled=R??!1,this.optionMappingConfiguration=I,this.columnWidth=S,this.excludeFromAutoMatching=_??!1}static{this.getOutputFormat=e=>(e||"DD.MM.YYYY").replace(/d/g,"D").replace(/e|E/g,"")}static{this.isTypeDropdown=e=>r.isTypeCategory(e)||e==="boolean"}static{this.isTypeCategory=e=>e==="single-select"||e==="currency_code"||e==="country_code_alpha_2"||e==="country_code_alpha_3"}};import{isNil as z,escapeRegExp as Mt,isArray as gt}from"lodash";var N=()=>g.getInstance().getTruthyWords(),L=()=>g.getInstance().getFalsyWords(),It=()=>g.getInstance().getBooleanOptionToRender(),St=[...N(),...L()];import{isArray as Ae,isNil as De,isObject as Oe}from"lodash";var H=class{constructor(){this.parse=(e,t)=>De(e)||Ae(e)||Oe(e)?null:N().includes(`${e}`.toLowerCase())?!0:L().includes(`${e}`.toLowerCase())?!1:e===""?null:`${e}`}},oe=H;import{isArray as ne,isBoolean as se,isNil as ae,isObject as le}from"lodash";var Y=class{constructor(){this.parseSingle=(e,t)=>ae(e)||le(e)||ne(e)?null:se(e)?JSON.stringify(e):C({value:e,dataModel:t.dataModel,isTrim:!0});this.parseMultiple=(e,t)=>ne(e)?e.map(i=>C({value:i,dataModel:t.dataModel,isTrim:!0})):ae(e)||le(e)||e===""?null:se(e)?[JSON.stringify(e)]:[C({value:e,dataModel:t.dataModel,isTrim:!0})];this.parse=(e,t)=>t.dataModel.getIsMultiSelection()&&!t.forceSingle?this.parseMultiple(e,t):this.parseSingle(e,t)}},pe=Y;import{isArray as Pe,isBoolean as Re,isNil as Ie,isObject as Se}from"lodash";var w=class{constructor(){this.parse=(e,t)=>{if(Ie(e)||Pe(e)||Se(e))return null;if(Re(e))return JSON.stringify(e);if(e==="")return null;if(typeof e=="number"){let i=`${e}`;return a(u.isScientificNotation(i)?u.expandScientificNotation(i):i)}return a(`${e}`)}}},ue=w;import{isArray as _e,isBoolean as xe,isNil as Fe,isObject as Ve}from"lodash";var v=class{constructor(){this.parse=(e,t)=>Fe(e)?null:xe(e)?e?"1":"0":Ve(e)||_e(e)||e===""||a(e)===null?null:this.valueParser(e,t)}},A=v;var $=class extends A{constructor(){super(...arguments);this.valueParser=(t,i)=>{let o=u.convertStringToNumber(t,{format:i?.numberFormat});return o===null?a(`${t}`):Number(o)}}},me=$;var W=class extends A{constructor(){super(...arguments);this.valueParser=(t,i)=>{let o=u.convertStringToNumber(t,{format:i?.numberFormat});return o===null?a(`${t}`):Number(o)}}},de=W;import{isArray as Ue,isBoolean as Ne,isNil as Le,isNumber as He,isObject as Ye}from"lodash";var K=class{constructor(){this.parse=(e,t)=>{if(Le(e)||Ye(e)||Ue(e))return null;if(Ne(e))return JSON.stringify(e);if(He(e))return e;if(e===""||a(e)===null)return null;let i=u.convertStringToNumber(e,{adornment:"percentage"});return i===null?a(`${e}`):Number(i)}}},ye=K;import{isArray as we,isBoolean as ve,isNil as $e,isObject as We}from"lodash";var X=class{constructor(){this.parse=(e,t)=>{if($e(e)||we(e)||We(e))return null;if(ve(e))return JSON.stringify(e);if(e===""||a(e)===null)return null;let i=u.convertStringToNumber(e,{format:t?.numberFormat});return i===null?a(`${e}`):Number(i)}}},ce=X;var Me=["dd.MM.yyyy HH:mm","dd.MM.yyyy","dd/MM/yyyy HH:mm:ss","dd/MM/yyyy HH:mm","dd/MM/yyyy","dd-MM-yyyy HH:mm:ss","dd-MM-yyyy HH:mm","yyyy-MM-dd'T'HH:mm:ss","yyyy-MM-dd","yyyy-dd-MM","yyyy-MM-dd HH:mm:ss","dd-MM-yyyy","MM-dd-yyyy","MM/dd/yyyy","MM.dd.yyyy","yyyy/MM/dd","yyyyMMdd","dd MMM yyyy","dd MMMM yyyy","MM-dd-yyyy HH:mm:ss","MM/dd/yyyy HH:mm:ss","yyyy-MM-dd HH:mm","MM-dd-yyyy HH:mm","MM/dd/yyyy HH:mm","dd-MMM-yyyy","MMM yyyy","MMMM yyyy","MM/yyyy","M/yyyy","yyyy/MM","MM.yyyy","MM.yy","yyyy.MM","MM-yyyy","yyyy-MM","MMMM d, yyyy","MMM d, yyyy","MM dd yyyy","yyyy-MM-dd'T'HH:mm:ss.SSS","yyyy-MM-dd'T'HH:mm:ss.SSSxxx","yyyy.MM.dd","yyyy MM dd","yyyy/dd/MM","yyyy.dd.MM","dd yyyy MM","dd.yyyy.MM","dd-yyyy-MM","yyyy dd MM","MM yyyy dd","dd/yyyy/MM","MM/yyyy/dd"],Ke=["dd.MM.yyyy","dd/MM/yyyy","dd-MM-yyyy","MM.dd.yyyy","MM/dd/yyyy","MM-dd-yyyy","yyyy.MM.dd","yyyy/MM/dd","yyyy-MM-dd","yyyy.dd.MM","yyyy/dd/MM","yyyy-dd-MM","dd MMM yyyy","dd MMMM yyyy","MMM dd, yyyy","MMMM dd, yyyy","MMM dd yyyy","yyyy MMM dd"],Xe=["ddMMyyyy","MMddyyyy","yyyyMMdd"],Be=[""," HH:mm"," HH:mm:ss"],ke=["yyyy-MM-dd","yyyy-dd-MM"],ze=["'T'HH:mm:ss","'T'HH:mm:ss.SSS","'T'HH:mm:ss.SSSxxx"],Qe=[...Ke.flatMap(r=>Be.map(e=>`${r}${e}`)),...Xe,...ke.flatMap(r=>ze.map(e=>`${r}${e}`))],Ge=new Set(Me),ge=new Set([...Me,...Qe.filter(r=>!Ge.has(r))]);var qe={YYYY:"yyyy",YY:"yy",MMMM:"MMMM",MMM:"MMM",MM:"MM",M:"M",DD:"dd",D:"d",HH:"HH",H:"H",hh:"hh",h:"h",mm:"mm",m:"m",ss:"ss",s:"s",SSS:"SSS",SS:"SS",S:"S",A:"a",a:"a",XXXXX:"XXXXX",XXXX:"XXXX",XXX:"XXX",XX:"XX",X:"X",xxxxx:"xxxxx",xxxx:"xxxx",xxx:"xxx",xx:"xx",x:"x",ZZ:"xxx",Z:"X"},fe=r=>r.replace(/'/g,"''"),Ze=r=>{let e="",t=0;for(;t<r.length;){let i=r[t];if(i==="'"){t+=1;let o="";for(;t<r.length;)if(r[t]==="'")if(r[t+1]==="'")o+="'",t+=2;else{t+=1;break}else o+=r[t],t+=1;e+=`'${fe(o)}'`;continue}if(i==="["){t+=1;let o="";for(;t<r.length;)if(r[t]==="]")if(r[t+1]==="]")o+="]",t+=2;else{t+=1;break}else o+=r[t],t+=1;e+=`'${fe(o)}'`;continue}if(i==="T"){e+="'T'",t+=1;continue}if(/[A-Za-z]/.test(i)){let o=1;for(;r[t+o]===i;)o++;let n=r.slice(t,t+o);e+=qe[n]??n,t+=o}else e+=i,t+=1}return e},Je=r=>{if(!f(r))return!1;let e=Ze(r.trim());return ge.has(e)},cr=r=>{if(!f(r))return null;let e=r.trim();return Je(e)?e:null},je=({sourceRows:r,inputFormat:e})=>{let t=e.trim(),i=0,o=0;for(let n=0;n<r.length;n++){let s=r[n];re(s)&&(o+=1,T(s.trim(),t)||(i+=1))}return{mismatchCount:i,totalCount:o}},Mr=(r,e)=>{let t=e.trim();if(T(r,t))return!1;let i=r.trim();return/^\d{4}-\d{2}-\d{2}/.test(i)?!!(t.includes("/")||t.includes(".")&&!t.includes("/")):!1},gr=({columnKey:r,sourceRows:e,inputFormat:t})=>{let{mismatchCount:i,totalCount:o}=je({sourceRows:e,inputFormat:t});i!==0&&console.warn(`Ingestro: Column '${r}': ${i} of ${o} cells did not match inputFormat '${t.trim()}'.`)};import{parse as et,format as tt}from"date-fns";import{isArray as rt,isBoolean as it,isNil as ot,isObject as nt}from"lodash";import D from"moment";var Te=/([+-](?:0\d|1[0-4]):?[0-5]\d|Z)$/i,he=(r,e)=>{let o=!!r.match(Te)?D.parseZone(r,e,!0):D(r,e,!0);return o.isValid()&&o.format(e)===r},B=class{constructor(){this.parse=(e,t)=>{if(ot(e)||rt(e)||nt(e))return null;if(it(e))return JSON.stringify(e);let i=t?.dataModel?.getType();if(!i)return a(`${e}`);if(typeof e=="string"){if(e==="")return null;try{if(t?.dataModel?.getType()==="date"){let o=t?.dataModel?.getOutputFormat(),n=t?.dataModel?.getInputFormat(),s=`${e}`,y=!1;if(f(n)&&!t?.skipDeclaredInputFormatNormalization){let m=J(s);if(T(s,n)||m)m||(s=`${F([s],n)[0]}`),y=!0;else{let M=F([s],n)[0];if(M===s)return he(s,o)?s:a(s);s=`${M}`,y=!0}}if(!y&&he(s,o))return s;let p=!!s.match(Te)?D.parseZone(s,Z):D(s,q);if(p.isValid())return p.format(o);throw new Error("invalid date")}else{let o=j[i];if(!o)return a(`${e}`);let n=et(e,G,new Date);return tt(n,o)}}catch{let n=ee[i];return n?a(te(e,n)):a(`${e}`)}}else return a(`${e}`)}}},Ee=B;import{isArray as st}from"lodash";var at=new me,lt=new de,pt=new ce,ut=new ye,mt=new oe,dt=new pe,yt=new ue,ct=new Ee,k=class{static{this.parse=(e,t)=>{let i;switch(t?.dataModel?.getType()){case"int":i=at;break;case"float":i=lt;break;case"boolean":i=mt;break;case"single-select":case"currency_code":case"country_code_alpha_2":case"country_code_alpha_3":i=dt;break;case"percentage":i=ut;break;case"currency_eur":case"currency_usd":i=pt;break;case"date":case"date_dmy":case"date_mdy":case"date_iso":case"datetime":case"time_hms":case"time_hms_24":case"time_hm":case"time_hm_24":i=ct;break;case"email":case"url_www":case"url_https":case"url":case"phone":case"zip_code_de":case"bic":case"vat_eu":case"gtin":case"iban":default:i=yt;break}return i.parse(e,t)}}static{this.parseRawValueToDisplayValue=(e,t)=>{let i=e;if(t.isNumeric)i=u.convertToFormat(e,{targetFormat:t.numberFormat||"eu",adornment:t.type==="percentage"?"percentage":void 0}),["currency_eur","currency_usd"].includes(t.type)&&(t.type==="currency_usd"?i=`$${i}`:i=`${i} \u20AC`);else if(t.type==="boolean"){let n=g.getInstance().getOptionsForReviewEntries().find(s=>`${s.value}`.includes(`${e}`));n&&(i=`${n.label}`)}else if(h.isTypeCategory(t.type))if(t.isMultiSelection){if(st(e)){let o=t.options?.filter(n=>e.some(s=>x(n,s)));o&&(i=o.map(n=>n.label).join(", "))}}else{let o=t.options?.find(n=>x(n,e));o&&(i=`${o?.label}`)}return`${i}`}}static{this.parseDisplayValueToRawValue=(e,t)=>{if(t.isNumeric){let i=u.convertToUsWithDecimal(`${e}`,t.numberFormat??"eu");if(i===null)return e;let o=u.convertStringToNumber(i,{format:"us"});return o!==null?Number(o):e}else return e}}},be=k;var Zr=(r,e)=>Number(r).toLocaleString(e??"de-DE"),ft={de:"de-DE",en:"en-US",es:"es-ES",fr:"fr-FR",it:"it-IT",nl:"nl-NL",pl:"pl-PL",pt:"pt-PT",sv:"sv-SE",cz:"cs-CZ",dk:"da-DK",hu:"hu-HU",lt:"lt-LT",no:"nb-NO",ru:"ru-RU",sk:"sk-SK",zh:"zh-CN"},Jr=r=>r?ft[r]??"de-DE":"de-DE",jr=(r,e)=>{let{value:t,isExact:i,columns:o,isEmptyValues:n}=e;if(n)return z(r)||r==="";if(gt(r)&&o[0]?.isMultiSelection){let y=o[0],c=r.map(l=>{let p=y.options?.find(m=>`${m.value}`==`${l}`);return p?p.label:`${l}`}).join(", ");return i?c===t:c.toLowerCase().includes(t.toLowerCase())}let s=be.parseRawValueToDisplayValue(r,o[0]);return i&&!z(r)&&s===t?!0:!!(!i&&!z(r)&&s?.toLowerCase()?.includes(t?.toLowerCase()))},ei=(r,e,t,i)=>{let o=r.map(l=>{let p=i.options?.find(m=>`${m.value}`==`${l}`);return p?p.label:`${l}`}),n=e.split(",").map(l=>l.trim()).filter(Boolean);if(n.length===0)return r;let s=-1;for(let l=0;l<=o.length-n.length;l++){let p=!0;for(let m=0;m<n.length;m++)if(o[l+m].toLowerCase()!==n[m].toLowerCase()){p=!1;break}if(p){s=l;break}}if(s===-1)return r;let y=[...r.slice(0,s),...t,...r.slice(s+n.length)],c=new Set;return y.filter(l=>{let p=`${l}`;return c.has(p)?!1:(c.add(p),!0)})},ti=(r,e,t)=>{let i=new RegExp(Mt(e),"gi");return`${r}`.replace(i,t)},ri=r=>typeof r=="string"?r.replace(/(\r\n|\n|\r)/gm,""):r,ii=(r,e)=>e?e.map((t,i)=>r.map(o=>({rowIndex:i,valid:!0,key:o.key,value:t[o.key]}))):[];var Q=class r extends h{constructor({description:t,key:i,example:o,label:n,type:s,options:y,validators:c,alternativeMatches:l,columnSize:p,isMultiSelection:m,allowCustomOptions:E,allowedCustomOptionTypes:M,preserveUnmappedOptions:b,creator:O,baseKey:P,baseKeyCounter:R,hidden:I,optionMappingConfiguration:S,..._}){super({description:t,key:i,example:o,label:n,type:s,validators:c,alternativeMatches:l,columnSize:p,creator:O,baseKey:P,baseKeyCounter:R,hidden:I,optionMappingConfiguration:S,..._});this.optionTypeMap=null;this.getOptions=()=>this.options;this.getOptionTypeMap=()=>{if(!this.optionTypeMap){this.optionTypeMap=new Map;for(let t=0;t<this.options.length;t++){let i=this.options[t];this.optionTypeMap.set(i.value,i.type??"string")}}return this.optionTypeMap};this.setOptions=t=>{this.options=t,this.optionTypeMap=null};this.serialize=()=>{let t={description:this.getDescription(),example:this.getExample(),isRequired:this.getIsRequired(),key:this.getKey(),label:this.getLabel(),type:this.getType(),validators:this.getValidators().map(o=>o.serialize()),alternativeMatches:this.getAlternativeMatches(),columnSize:this.getColumnSize(),columnWidth:this.getColumnWidth(),outputFormat:this.getOutputFormat(),inputFormat:this.getInputFormat(),numberFormat:this.getNumberFormat(),baseKey:this.getBaseKey(),baseKeyCounter:this.getBaseKeyCounter(),creator:this.getCreator(),hidden:this.isHidden(),disabled:this.isDisabled(),optionMappingConfiguration:this.getOptionMappingConfiguration(),excludeFromAutoMatching:this.isExcludedFromAutoMatching()},i=this.getOptions();return{...t,options:i,isMultiSelection:this.isMultiSelection,allowCustomOptions:this.allowCustomOptions,allowedCustomOptionTypes:this.allowedCustomOptionTypes?[...this.allowedCustomOptionTypes]:void 0,preserveUnmappedOptions:this.preserveUnmappedOptions}};this.getIsMultiSelection=()=>this.isMultiSelection;this.getAllowCustomOptions=()=>this.allowCustomOptions;this.getAllowedCustomOptionTypes=()=>this.allowedCustomOptionTypes?[...this.allowedCustomOptionTypes]:void 0;this.getPreserveUnmappedOptions=()=>this.preserveUnmappedOptions;this.options=y?.map(d=>({...d,baseKey:d?.baseKey||d.value,baseKeyCounter:d.baseKeyCounter||0,alternativeMatches:d.alternativeMatches.filter(Ce=>Ce!==d.label),validations:d.validations||[]})),this.isMultiSelection=m,this.allowCustomOptions=E,this.allowedCustomOptionTypes=M?[...M]:void 0,this.preserveUnmappedOptions=b}clone(){let t=this.serialize();return new r({description:t.description,example:t.example,key:t.key,label:t.label,type:t.type,options:t.options,validators:this.getValidators(),alternativeMatches:t.alternativeMatches,columnSize:t.columnSize,columnWidth:t.columnWidth,isMultiSelection:t.isMultiSelection,allowCustomOptions:t.allowCustomOptions,allowedCustomOptionTypes:t.allowedCustomOptionTypes,preserveUnmappedOptions:t.preserveUnmappedOptions,hidden:t.hidden,disabled:t.disabled,optionMappingConfiguration:t.optionMappingConfiguration,excludeFromAutoMatching:t.excludeFromAutoMatching})}},pi=Q;export{N as a,L as b,It as c,St as d,cr as e,Mr as f,gr as g,ht as h,h as i,be as j,Zr as k,Jr as l,jr as m,ei as n,ti as o,ri as p,ii as q,pi as r};
package/index.d.ts CHANGED
@@ -299,17 +299,6 @@ export type IHeaderStepHandler = (params: {
299
299
  stay: IStayFn;
300
300
  }) => Promise<void> | void;
301
301
 
302
- export type IPreProcessingStepUpdateDataFn = IHeaderStepUpdateDataFn;
303
-
304
- export type IPreProcessingStepHandler = (params: {
305
- data: ISheetData[];
306
- updateData: IPreProcessingStepUpdateDataFn;
307
- alert: IAlertFn;
308
- block: IBlockFn;
309
- proceed: IProceedFn;
310
- stay: IStayFn;
311
- }) => Promise<void> | void;
312
-
313
302
  export type IReviewData = Record<
314
303
  string,
315
304
  {
@@ -331,7 +320,6 @@ export type IReviewStepHandler = (params: {
331
320
 
332
321
  export type IStepHandler = {
333
322
  uploadStep?: IUploadStepHandler;
334
- preProcessingStep?: IPreProcessingStepHandler;
335
323
  mappingStep?: IMappingStepHandler;
336
324
  headerStep?: IHeaderStepHandler;
337
325
  reviewStep?: IReviewStepHandler;
@@ -586,8 +574,6 @@ export type ColumnAPI = {
586
574
 
587
575
  export type I18nOverrides =
588
576
  | {
589
- ar?: Record<string, string>;
590
- he?: Record<string, string>;
591
577
  en?: Record<string, string>;
592
578
  de?: Record<string, string>;
593
579
  es?: Record<string, string>;
@@ -611,7 +597,6 @@ export type I18nOverrides =
611
597
  type IAdditionalInfo = {
612
598
  uploadStep?: boolean;
613
599
  sheetSelectionStep?: boolean;
614
- preProcessingStep?: boolean;
615
600
  headerStep?: boolean;
616
601
  mappingStep?: boolean;
617
602
  reviewStep?: boolean;
@@ -632,7 +617,6 @@ export type ISkipConfigurationMapping = {
632
617
  automaticMapping?: boolean;
633
618
  applyColumnMapping?: IApplyMappingMode;
634
619
  applyOptionMapping?: IApplyMappingMode;
635
- requireConfirmation?: boolean;
636
620
  };
637
621
 
638
622
  export type ISkipConfiguration = {
@@ -714,7 +698,6 @@ export type SettingsAPI = {
714
698
  transpose?: boolean;
715
699
  mergeHeaders?: boolean;
716
700
  metadataSelection?: boolean;
717
- preProcessing?: boolean;
718
701
  collapseMatchedColumns?: boolean;
719
702
  skipConfiguration?: ISkipConfiguration;
720
703
  disableColumnRemapping?: boolean;
@@ -804,18 +787,6 @@ export type EntryChangeRow = {
804
787
  info: RowInfo;
805
788
  };
806
789
 
807
- export type DatasetRow = {
808
- rowIndex: number;
809
- data: Row;
810
- info: RowInfo;
811
- };
812
-
813
- export type EntryChangeDataset = {
814
- readonly rowCount: number;
815
- getRow: (index: number) => DatasetRow | undefined;
816
- forEachRow: (cb: (row: DatasetRow, index: number) => void) => void;
817
- };
818
-
819
790
  export type RowResult = Record<string, HookedRecordResult | FieldValue>;
820
791
 
821
792
  export type EntryChangeResult = {
@@ -832,8 +803,7 @@ export type ResultOnEntryChange =
832
803
 
833
804
  export type OnEntryChange = (
834
805
  rows: EntryChangeRow[],
835
- logs: OnEntryChangeLogs,
836
- dataset: EntryChangeDataset
806
+ logs: OnEntryChangeLogs
837
807
  ) => ResultOnEntryChange;
838
808
 
839
809
  export type HookedRecordRowResult = [HookedRecordResult, number];
@@ -1003,7 +973,6 @@ export type ThemeAPI = {
1003
973
  };
1004
974
  loader?: LoaderThemeAPI;
1005
975
  headerSelect?: HeaderMatchAPI;
1006
- preProcessing?: PreProcessingThemeAPI;
1007
976
  dropzone?: DropzoneThemeAPI;
1008
977
  progressBar?: ProgressBarThemeAPI;
1009
978
  joinSheet?: JoinSheetThemeAPI;
@@ -1255,74 +1224,6 @@ export type HeaderMatchAPI = {
1255
1224
  };
1256
1225
  };
1257
1226
 
1258
- export type PreProcessingThemeAPI = {
1259
- accent?: {
1260
- color?: string;
1261
- };
1262
- root?: CSSInterpolation;
1263
- pageHeader?: HeaderThemeAPI;
1264
- content?: CSSInterpolation;
1265
- additionalInfo?: IAdditionalInfoTheme;
1266
- infoBox?: InfoBoxThemeAPI;
1267
- inventory?: {
1268
- root?: CSSInterpolation;
1269
- fileChip?: CSSInterpolation & {
1270
- focused?: CSSInterpolation;
1271
- configureButton?: CSSInterpolation;
1272
- parsedBadge?: CSSInterpolation;
1273
- };
1274
- sheetRow?: CSSInterpolation & {
1275
- selected?: CSSInterpolation;
1276
- viewing?: CSSInterpolation;
1277
- processedTag?: CSSInterpolation;
1278
- };
1279
- addFileButton?: CSSInterpolation;
1280
- };
1281
- preview?: {
1282
- root?: CSSInterpolation;
1283
- title?: CSSInterpolation;
1284
- headerHint?: CSSInterpolation;
1285
- combineRequired?: CSSInterpolation;
1286
- empty?: CSSInterpolation;
1287
- table?: HeaderMatchAPI['table'];
1288
- };
1289
- modal?: {
1290
- root?: CSSInterpolation;
1291
- overlay?: CSSInterpolation;
1292
- header?: CSSInterpolation;
1293
- footer?: CSSInterpolation;
1294
- tabs?: {
1295
- root?: CSSInterpolation;
1296
- tab?: CSSInterpolation;
1297
- activeTab?: CSSInterpolation;
1298
- };
1299
- recipe?: {
1300
- root?: CSSInterpolation;
1301
- step?: CSSInterpolation;
1302
- stepEditing?: CSSInterpolation;
1303
- stepGenerated?: CSSInterpolation;
1304
- empty?: CSSInterpolation;
1305
- addStep?: CSSInterpolation;
1306
- addStepOption?: CSSInterpolation;
1307
- };
1308
- combine?: {
1309
- joinPopover?: CSSInterpolation;
1310
- joinColumnsDialog?: JoinColumnsDialogThemeAPI;
1311
- appendColumnsDialog?: AppendColumnsDialogThemeAPI;
1312
- matchStatus?: JoinSheetMatchStatus;
1313
- };
1314
- aiAssist?: {
1315
- root?: CSSInterpolation;
1316
- input?: CSSInterpolation;
1317
- suggestion?: CSSInterpolation;
1318
- };
1319
- preview?: SheetPreviewThemeAPI;
1320
- metadataSelection?: NonNullable<
1321
- NonNullable<HeaderMatchAPI['features']>['metadataSelection']
1322
- >;
1323
- };
1324
- };
1325
-
1326
1227
  type DropzoneIllustrationStyle = {
1327
1228
  borderColor?: string;
1328
1229
  headerColor?: string;
@@ -2082,8 +1983,6 @@ export type ContextualEngineThemeAPI = {
2082
1983
  };
2083
1984
 
2084
1985
  export type LanguageType =
2085
- | 'ar'
2086
- | 'he'
2087
1986
  | 'de'
2088
1987
  | 'en'
2089
1988
  | 'es'
@@ -2122,7 +2021,6 @@ export declare const useDataImporter: (
2122
2021
  export type DynamicStepValues =
2123
2022
  | 'header'
2124
2023
  | 'mapping'
2125
- | 'preProcessing'
2126
2024
  | 'review'
2127
2025
  | 'sheetSelection';
2128
2026
 
@@ -2143,22 +2041,14 @@ export type IParseFileXmlConfiguration = {
2143
2041
  };
2144
2042
  };
2145
2043
 
2146
- export type IParseFilePdfConfiguration = {
2147
- sourcePdfFile?: File;
2148
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2149
- pdfDocument?: any;
2150
- selectedPdfTableIds?: string[];
2151
- };
2152
-
2153
2044
  export type SheetSelectionUploadFile = {
2154
- fileName?: string;
2045
+ fileName: string;
2155
2046
  sheets: {
2156
- sheetName?: string;
2047
+ sheetName: string;
2157
2048
  data: UploadData;
2158
2049
  visibility?: SheetVisibility;
2159
2050
  }[];
2160
2051
  xmlConfiguration?: IParseFileXmlConfiguration;
2161
- pdfConfiguration?: IParseFilePdfConfiguration;
2162
2052
  };
2163
2053
 
2164
2054
  export type SheetSelectionUploadData = SheetSelectionUploadFile[];
@@ -2181,7 +2071,6 @@ export type IParseFile = {
2181
2071
  fileName: string;
2182
2072
  sheets: IParseSheet[];
2183
2073
  xmlConfiguration?: IParseFileXmlConfiguration;
2184
- pdfConfiguration?: IParseFilePdfConfiguration;
2185
2074
  };
2186
2075
 
2187
2076
  export type OnEntryChangeLogs = {