@ingestro/importer-react 4.7.1 → 4.8.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.
@@ -0,0 +1 @@
1
+ import{B as T,C as V,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-MPSYBYIV.js";import{a as m,c as a,f as x,h as b}from"./chunk-AAZKUHPZ.js";import{a as g}from"./chunk-J5WOZVPO.js";var U=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=U;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:u,baseKeyCounter:E,outputFormat:M,inputFormat:O,numberFormat:D,hidden:S,disabled:P,optionMappingConfiguration:R,columnWidth:I,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.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();return 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:e.inputFormat,hidden:e.hidden,disabled:e.disabled,optionMappingConfiguration:e.optionMappingConfiguration,excludeFromAutoMatching:e.excludeFromAutoMatching})};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=u||t,this.baseKeyCounter=E||0,this.outputFormat=M||"",this.inputFormat=O??null,this.numberFormat=D||"eu",this.hidden=S??!1,this.disabled=P??!1,this.optionMappingConfiguration=R,this.columnWidth=I,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(),Rt=()=>g.getInstance().getBooleanOptionToRender(),It=[...N(),...L()];import{isArray as Ae,isNil as Oe,isObject as De}from"lodash";var H=class{constructor(){this.parse=(e,t)=>Oe(e)||Ae(e)||De(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):b({value:e,dataModel:t.dataModel,isTrim:!0});this.parseMultiple=(e,t)=>ne(e)?e.map(i=>b({value:i,dataModel:t.dataModel,isTrim:!0})):ae(e)||le(e)||e===""?null:se(e)?[JSON.stringify(e)]:[b({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 Se,isBoolean as Pe,isNil as Re,isObject as Ie}from"lodash";var w=class{constructor(){this.parse=(e,t)=>{if(Re(e)||Se(e)||Ie(e))return null;if(Pe(e))return JSON.stringify(e);if(e==="")return null;let i=`${e}`;return a(/[eE]/.test(i)?m.expandScientificNotation(i):i)}}},ue=w;import{isArray as _e,isBoolean as xe,isNil as Ve,isObject as Ue}from"lodash";var v=class{constructor(){this.parse=(e,t)=>Ve(e)?null:xe(e)?e?"1":"0":Ue(e)||_e(e)||e===""||a(e)===null?null:this.valueParser(e,t)}},C=v;var $=class extends C{constructor(){super(...arguments);this.valueParser=(t,i)=>{let o=m.convertStringToNumber(t,{format:i?.numberFormat});return o===null?a(`${t}`):Number(o)}}},me=$;var W=class extends C{constructor(){super(...arguments);this.valueParser=(t,i)=>{let o=m.convertStringToNumber(t,{format:i?.numberFormat});return o===null?a(`${t}`):Number(o)}}},de=W;import{isArray as Fe,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)||Fe(e))return null;if(Ne(e))return JSON.stringify(e);if(He(e))return e;if(e===""||a(e)===null)return null;let i=m.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=m.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","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 A from"moment";var Te=/([+-](?:0\d|1[0-4]):?[0-5]\d|Z)$/i,he=(r,e)=>{let o=!!r.match(Te)?A.parseZone(r,e,!0):A(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 u=J(s);if(T(s,n)||u)u||(s=`${V([s],n)[0]}`),y=!0;else{let M=V([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)?A.parseZone(s,Z):A(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=m.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=m.convertToUsWithDecimal(`${e}`,t.numberFormat??"eu");if(i===null)return e;let o=m.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(u=>`${u.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(u=>`${u.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 u=0;u<n.length;u++)if(o[l+u].toLowerCase()!==n[u].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:u,allowCustomOptions:E,allowedCustomOptionTypes:M,preserveUnmappedOptions:O,creator:D,baseKey:S,baseKeyCounter:P,hidden:R,optionMappingConfiguration:I,..._}){super({description:t,key:i,example:o,label:n,type:s,validators:c,alternativeMatches:l,columnSize:p,creator:D,baseKey:S,baseKeyCounter:P,hidden:R,optionMappingConfiguration:I,..._});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=u,this.allowCustomOptions=E,this.allowedCustomOptionTypes=M?[...M]:void 0,this.preserveUnmappedOptions=O}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,Rt as c,It 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
@@ -103,6 +103,7 @@ export type ModifierAddColumn = ({
103
103
  validations,
104
104
  dropdownOptions,
105
105
  outputFormat,
106
+ inputFormat,
106
107
  isMultiSelect,
107
108
  columnWidth,
108
109
  hidden,
@@ -114,6 +115,7 @@ export type ModifierAddColumn = ({
114
115
  validations?: ValidatorAPI[] | null;
115
116
  dropdownOptions?: DropdownOptionAPI[];
116
117
  outputFormat?: string | null;
118
+ inputFormat?: string | null;
117
119
  isMultiSelect?: boolean;
118
120
  columnWidth?: number;
119
121
  hidden?: boolean;
@@ -133,6 +135,7 @@ export type ModifierStack<ROW_DATA> = {
133
135
  columnIndex?: number;
134
136
  columnDropdownOptions?: DropdownOptionAPI[];
135
137
  outputFormat?: string | null;
138
+ inputFormat?: string | null;
136
139
  isMultiSelect?: boolean;
137
140
  hidden?: boolean;
138
141
  disabled?: boolean;
@@ -343,6 +346,25 @@ export declare const STEP_IDENTIFIERS: {
343
346
 
344
347
  export type OnStepChange = (step: StepIdentifier) => void;
345
348
 
349
+ export type UploadErrorType =
350
+ | 'file-invalid-type'
351
+ | 'file-too-large'
352
+ | 'too-many-files'
353
+ | 'parse-error'
354
+ | 'advanced-parsing-not-allowed'
355
+ | 'empty-file'
356
+ | 'max-records-exceeded'
357
+ | 'unknown';
358
+
359
+ export type UploadError = {
360
+ type: UploadErrorType;
361
+ message: string;
362
+ };
363
+
364
+ export type OnUploadError = (error: UploadError) => void;
365
+
366
+ export type OnUploadSuccess = () => void;
367
+
346
368
  export type ConfigureAPI = {
347
369
  licenseKey: string;
348
370
  settings: SettingsAPI;
@@ -352,6 +374,8 @@ export type ConfigureAPI = {
352
374
  onEntryChange?: OnEntryChange;
353
375
  onEntryInit?: OnEntryInit;
354
376
  onStepChange?: OnStepChange;
377
+ onUploadError?: OnUploadError;
378
+ onUploadSuccess?: OnUploadSuccess;
355
379
  /** @deprecated - this setting is deprecated. */
356
380
  dataHandler?: DataHandler;
357
381
  stepHandler?: IStepHandler;
@@ -405,6 +429,8 @@ export type ActiveColumnType = Exclude<
405
429
  | 'currency_code'
406
430
  >;
407
431
 
432
+ export type CompareOperator = 'GTE' | 'GT' | 'LT' | 'LTE' | 'EQ' | 'NEQ';
433
+
408
434
  export type ValidationTypeAPI =
409
435
  | 'required'
410
436
  | 'unique'
@@ -416,7 +442,8 @@ export type ValidationTypeAPI =
416
442
  | 'required_with_values'
417
443
  | 'required_without_values'
418
444
  | 'required_with_all_values'
419
- | 'required_without_all_values';
445
+ | 'required_without_all_values'
446
+ | 'compare';
420
447
 
421
448
  export type ColumnValueAPI = Record<string, FieldValue[] | FieldValue>;
422
449
 
@@ -424,6 +451,8 @@ export type columnsAPI = string[];
424
451
 
425
452
  export type ValidatorAPI = {
426
453
  validate: ValidationTypeAPI;
454
+ operator?: CompareOperator;
455
+ value?: number;
427
456
  regex?: string | null;
428
457
  columnValues?: ColumnValueAPI | null;
429
458
  columns?: columnsAPI;
@@ -528,6 +557,7 @@ export type ColumnAPI = {
528
557
  alternativeMatches?: string[];
529
558
  isMultiSelect?: boolean;
530
559
  outputFormat?: string | null;
560
+ inputFormat?: string | null;
531
561
  allowCustomOptions?: boolean;
532
562
  allowedCustomOptionTypes?: DropdownOptionType[];
533
563
  preserveUnmappedOptions?: PreserveUnmappedOptions;
@@ -553,6 +583,14 @@ export type I18nOverrides =
553
583
  pl?: Record<string, string>;
554
584
  pt?: Record<string, string>;
555
585
  sv?: Record<string, string>;
586
+ cz?: Record<string, string>;
587
+ hu?: Record<string, string>;
588
+ lt?: Record<string, string>;
589
+ no?: Record<string, string>;
590
+ ru?: Record<string, string>;
591
+ sk?: Record<string, string>;
592
+ zh?: Record<string, string>;
593
+ dk?: Record<string, string>;
556
594
  }
557
595
  | Record<string, string>;
558
596
 
@@ -586,6 +624,20 @@ export type ISkipConfiguration = {
586
624
  mapping?: ISkipConfigurationMapping;
587
625
  };
588
626
 
627
+ export type SheetMappingMode =
628
+ | 'disabled'
629
+ | 'headers_only'
630
+ | 'headers_with_samples';
631
+
632
+ export type SheetMappingConfiguration = {
633
+ join?: {
634
+ mode: SheetMappingMode;
635
+ };
636
+ append?: {
637
+ mode: SheetMappingMode;
638
+ };
639
+ };
640
+
589
641
  export type SettingsAPI = {
590
642
  developerMode?: boolean;
591
643
  identifier: string;
@@ -609,6 +661,7 @@ export type SettingsAPI = {
609
661
  onlyMappedColumns?: boolean;
610
662
  allowCustomColumns?: boolean;
611
663
  allowedCustomColumnTypes?: ActiveColumnType[];
664
+ allowColumnNameEdits?: boolean;
612
665
  columnResize?: boolean;
613
666
  /** @deprecated - this setting will be deprecated. Use allowCustomOptions from Target Data Model instead. */
614
667
  allowCustomOptions?: boolean;
@@ -642,8 +695,9 @@ export type SettingsAPI = {
642
695
  mergeHeaders?: boolean;
643
696
  metadataSelection?: boolean;
644
697
  collapseMatchedColumns?: boolean;
645
- skipConfiguration?: SkipConfiguration;
698
+ skipConfiguration?: ISkipConfiguration;
646
699
  disableColumnRemapping?: boolean;
700
+ sheetMappingConfiguration?: SheetMappingConfiguration;
647
701
  };
648
702
 
649
703
  export type FieldValue =
@@ -772,6 +826,7 @@ export type ImportLogsAddedColumn = {
772
826
  key: string;
773
827
  columnType: ColumnType;
774
828
  outputFormat?: string | null;
829
+ inputFormat?: string | null;
775
830
  };
776
831
 
777
832
  export type ImportLogsAddedOptions = {
@@ -802,7 +857,6 @@ export type IAdditionalInfoTheme = {
802
857
  text?: CSSInterpolation;
803
858
  infoModal?: {
804
859
  root?: CSSInterpolation;
805
- closeIcon?: CSSInterpolation;
806
860
  scrollbar?: {
807
861
  navigatorColor?: string;
808
862
  backgroundColor?: string;
@@ -963,6 +1017,7 @@ type ButtonThemeVariantAPI = {
963
1017
  secondary?: ButtonThemeCssObjectAPI;
964
1018
  tertiary?: ButtonThemeCssObjectAPI;
965
1019
  import?: ButtonThemeCssObjectAPI;
1020
+ select?: ButtonThemeCssObjectAPI;
966
1021
  cleanData?: ButtonThemeCssObjectAPI;
967
1022
  exportExcel?: ButtonThemeCssObjectAPI & {
968
1023
  dropdown?: {
@@ -1024,44 +1079,144 @@ type LoaderThemeAPI = {
1024
1079
  loadAnimationColor?: string;
1025
1080
  };
1026
1081
 
1027
- type HeaderMatchAPI = {
1082
+ type HeaderMatchScrollbarAPI = {
1083
+ navigatorColor?: string;
1084
+ backgroundColor?: string;
1085
+ };
1086
+
1087
+ type HeaderMatchSurfaceAPI = {
1088
+ root?: CSSInterpolation;
1089
+ backgroundColor?: string;
1090
+ borderColor?: string;
1091
+ borderRadius?: string;
1092
+ boxShadow?: string;
1093
+ };
1094
+
1095
+ type HeaderMatchDividerSectionAPI = {
1096
+ root?: CSSInterpolation;
1097
+ dividerColor?: string;
1098
+ };
1099
+
1100
+ type HeaderMatchTextStyleAPI = {
1101
+ root?: CSSInterpolation;
1102
+ color?: string;
1103
+ fontSize?: string;
1104
+ fontWeight?: string;
1105
+ };
1106
+
1107
+ // Shared by the unselected and selected ("selected") sheet-tab states — same shape either way.
1108
+ type HeaderMatchSheetTabAPI = {
1109
+ root?: CSSInterpolation;
1110
+ title?: CSSInterpolation;
1111
+ description?: CSSInterpolation;
1112
+ border?: CSSInterpolation;
1113
+ // styles the file icon shown next to the sheet/tab name
1114
+ icon?: CSSInterpolation;
1115
+ };
1116
+
1117
+ // Header-select button themes intentionally omit ButtonThemeCssObjectAPI's nested `icon`
1118
+ // key — that path was never wired for popover/merge confirm buttons.
1119
+ type HeaderMatchButtonThemeAPI = CSSInterpolation;
1120
+
1121
+ type HeaderMatchDeleteButtonThemeAPI = CSSInterpolation & {
1122
+ // trash icon color (read as an inline style on the SVG, not via CSS spread on the button)
1123
+ icon?: CSSInterpolation;
1124
+ };
1125
+
1126
+ type HeaderMatchDropdownItemThemeAPI = CSSInterpolation & {
1127
+ // persistent selected separator item — backgroundColor is applied; text color uses `color` on the item
1128
+ selected?: CSSInterpolation;
1129
+ };
1130
+
1131
+ type HeaderMatchQuickFillButtonThemeAPI = CSSInterpolation & {
1132
+ label?: CSSInterpolation;
1133
+ value?: CSSInterpolation;
1134
+ icon?: CSSInterpolation;
1135
+ };
1136
+
1137
+ export type HeaderMatchAPI = {
1138
+ // core — always rendered, no settings flag
1028
1139
  root?: CSSInterpolation;
1029
1140
  pageHeader?: HeaderThemeAPI;
1030
1141
  content?: CSSInterpolation;
1031
- sheetName?: {
1032
- root?: CSSInterpolation;
1033
- title?: CSSInterpolation;
1034
- description?: CSSInterpolation;
1035
- border?: CSSInterpolation;
1142
+ sheetName?: HeaderMatchSheetTabAPI & {
1143
+ // persistent "currently active sheet tab" state - distinct from :hover/:active
1144
+ selected?: HeaderMatchSheetTabAPI;
1036
1145
  };
1037
1146
  table?: {
1038
1147
  th?: CSSInterpolation;
1039
1148
  td?: CSSInterpolation;
1040
1149
  selectRowColor?: string;
1041
1150
  hoverRowColor?: string;
1042
- scrollbar?: {
1043
- navigatorColor?: string;
1044
- backgroundColor?: string;
1045
- };
1151
+ // background/text color for a row that is both selected and hovered (defaults to a darkened selectRowColor)
1152
+ highlightRowColor?: string;
1153
+ textColor?: string;
1154
+ mergedCell?: CSSInterpolation;
1155
+ scrollbar?: HeaderMatchScrollbarAPI;
1046
1156
  };
1047
1157
  fullScreen?: {
1048
1158
  root?: CSSInterpolation;
1049
1159
  icon?: CSSInterpolation;
1050
1160
  };
1051
- sheetNameSelected?: {
1052
- root?: CSSInterpolation;
1053
- title?: CSSInterpolation;
1054
- description?: CSSInterpolation;
1055
- border?: CSSInterpolation;
1056
- };
1057
- progressBar?: {
1058
- root?: CSSInterpolation;
1059
- progress?: {
1060
- navigatorColor?: string;
1061
- backgroundColor?: string;
1161
+ additionalInfo?: IAdditionalInfoTheme;
1162
+
1163
+ // gated behind settings.transpose / settings.mergeHeaders / settings.metadataSelection
1164
+ features?: {
1165
+ buttons?: {
1166
+ primary?: HeaderMatchButtonThemeAPI;
1167
+ secondary?: HeaderMatchButtonThemeAPI;
1168
+ };
1169
+ toolbar?: HeaderMatchSurfaceAPI & {
1170
+ dividerColor?: string;
1171
+ spinnerColor?: string;
1172
+ // pen / merge-info SVG color (inline style)
1173
+ iconColor?: string;
1174
+ button?: HeaderMatchButtonThemeAPI;
1175
+ // pen button + merge separator trigger wrapper
1176
+ iconButton?: HeaderMatchButtonThemeAPI;
1177
+ deleteButton?: HeaderMatchDeleteButtonThemeAPI;
1178
+ // the "Select headers to merge" / "N rows selected" status text in the merge edit bar
1179
+ text?: CSSInterpolation;
1180
+ dropdownMenu?: HeaderMatchSurfaceAPI & {
1181
+ item?: HeaderMatchDropdownItemThemeAPI;
1182
+ };
1183
+ };
1184
+ metadataSelection?: {
1185
+ root?: CSSInterpolation;
1186
+ selectedBorderColor?: string;
1187
+ hoverBackground?: string;
1188
+ // metadata +/- button container
1189
+ iconButton?: CSSInterpolation;
1190
+ // metadata +/- SVG color (falls back to selectedBorderColor)
1191
+ iconColor?: string;
1192
+ valuePreview?: {
1193
+ root?: CSSInterpolation;
1194
+ label?: CSSInterpolation;
1195
+ value?: CSSInterpolation;
1196
+ };
1197
+ };
1198
+ formPopover?: HeaderMatchSurfaceAPI & {
1199
+ width?: string;
1200
+ header?: HeaderMatchDividerSectionAPI;
1201
+ title?: HeaderMatchTextStyleAPI;
1202
+ description?: HeaderMatchTextStyleAPI;
1203
+ content?: CSSInterpolation;
1204
+ footer?: HeaderMatchDividerSectionAPI;
1205
+ controls?: {
1206
+ input?: {
1207
+ root?: CSSInterpolation;
1208
+ color?: string;
1209
+ backgroundColor?: string;
1210
+ borderColor?: string;
1211
+ borderRadius?: string;
1212
+ fontSize?: string;
1213
+ placeholderColor?: string;
1214
+ focusBorderColor?: string;
1215
+ };
1216
+ quickFillButton?: HeaderMatchQuickFillButtonThemeAPI;
1217
+ };
1062
1218
  };
1063
1219
  };
1064
- additionalInfo?: IAdditionalInfoTheme;
1065
1220
  };
1066
1221
 
1067
1222
  type DropzoneIllustrationStyle = {
@@ -1360,12 +1515,14 @@ export type ReviewEntriesThemeAPI = {
1360
1515
  warning?: CSSInterpolation;
1361
1516
  info?: CSSInterpolation;
1362
1517
  addColumn?: CSSInterpolation;
1518
+ disabled?: CSSInterpolation;
1363
1519
  };
1364
1520
  selectedBackground?: {
1365
1521
  normal?: string;
1366
1522
  error?: string;
1367
1523
  warning?: string;
1368
1524
  info?: string;
1525
+ disabled?: string;
1369
1526
  };
1370
1527
  scrollbar?: {
1371
1528
  navigatorColor?: string;
@@ -1428,6 +1585,7 @@ export type ReviewEntriesThemeAPI = {
1428
1585
  error?: string;
1429
1586
  warning?: string;
1430
1587
  info?: string;
1588
+ disabled?: string;
1431
1589
  };
1432
1590
  icon?: CSSInterpolation;
1433
1591
  infoIcon?: CSSInterpolation;
@@ -1439,6 +1597,7 @@ export type ReviewEntriesThemeAPI = {
1439
1597
  checkbox?: CSSInterpolation;
1440
1598
  allCheckbox?: CSSInterpolation;
1441
1599
  };
1600
+ prompts?: CSSInterpolation;
1442
1601
  addRowButton?: CSSInterpolation;
1443
1602
  duplicateButton?: CSSInterpolation;
1444
1603
  clearFilterButton?: CSSInterpolation;
@@ -1455,6 +1614,8 @@ export type ReviewEntriesThemeAPI = {
1455
1614
  selected?: CSSInterpolation;
1456
1615
  allRows?: CSSInterpolation;
1457
1616
  errorRows?: CSSInterpolation;
1617
+ warningRows?: CSSInterpolation;
1618
+ infoRows?: CSSInterpolation;
1458
1619
  root?: CSSInterpolation;
1459
1620
  };
1460
1621
  submitModal?: Omit<DialogThemeAPI, 'scrollbar'> & {
@@ -1746,6 +1907,7 @@ export type CleaningAssistantThemeAPI = {
1746
1907
  findButton?: CSSInterpolation;
1747
1908
  dismissButton?: CSSInterpolation;
1748
1909
  applyButton?: CSSInterpolation;
1910
+ applyButtonDisabled?: CSSInterpolation;
1749
1911
  };
1750
1912
  loadingState?: {
1751
1913
  root?: CSSInterpolation;