@ingestro/importer-react 4.8.5 → 4.9.1
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/chunk-EKOU24TN.js +7 -0
- package/chunk-JORVN4P2.js +1 -0
- package/chunk-QXD6LKS7.js +1 -0
- package/chunk-WKADKRGH.js +82 -0
- package/{chunk-RHL57REG.js → chunk-WOBUOLP3.js} +1 -1
- package/index.d.ts +34 -3
- package/index.js +495 -405
- package/package.json +22 -17
- package/workers/javascript/index.js +1 -1
- package/workers/matchValues/index.js +1 -1
- package/workers/parseData/index.js +1 -1
- package/workers/searchAndReplace/index.js +1 -1
- package/chunk-4HB6YDED.js +0 -1
- package/chunk-DHGB4FGN.js +0 -1
- package/chunk-TS3BDFZ6.js +0 -156
- package/chunk-XTL7TWAP.js +0 -1
|
@@ -1 +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-TS3BDFZ6.js";import{a as u,c as a,f as x,h as b}from"./chunk-REPANPD5.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:m,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=m||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;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 Ve,isObject as Ue}from"lodash";var $=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=$;var v=class extends C{constructor(){super(...arguments);this.valueParser=(t,i)=>{let o=u.convertStringToNumber(t,{format:i?.numberFormat});return o===null?a(`${t}`):Number(o)}}},me=v;var W=class extends C{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 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=u.convertStringToNumber(e,{adornment:"percentage"});return i===null?a(`${e}`):Number(i)}}},ye=K;import{isArray as we,isBoolean as $e,isNil as ve,isObject as We}from"lodash";var X=class{constructor(){this.parse=(e,t)=>{if(ve(e)||we(e)||We(e))return null;if($e(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","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 m=J(s);if(T(s,n)||m)m||(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=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: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=m,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};
|
|
1
|
+
import{C as T,D 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-WKADKRGH.js";import{a as u,c as a,f as x,h as b}from"./chunk-REPANPD5.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:m,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=m||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;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 Ve,isObject as Ue}from"lodash";var $=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=$;var v=class extends C{constructor(){super(...arguments);this.valueParser=(t,i)=>{let o=u.convertStringToNumber(t,{format:i?.numberFormat});return o===null?a(`${t}`):Number(o)}}},me=v;var W=class extends C{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 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=u.convertStringToNumber(e,{adornment:"percentage"});return i===null?a(`${e}`):Number(i)}}},ye=K;import{isArray as we,isBoolean as $e,isNil as ve,isObject as We}from"lodash";var X=class{constructor(){this.parse=(e,t)=>{if(ve(e)||we(e)||We(e))return null;if($e(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","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 m=J(s);if(T(s,n)||m)m||(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=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: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=m,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
|
@@ -638,6 +638,8 @@ export type SheetMappingConfiguration = {
|
|
|
638
638
|
};
|
|
639
639
|
};
|
|
640
640
|
|
|
641
|
+
export type SheetVisibility = 'visible' | 'hidden' | 'veryHidden';
|
|
642
|
+
|
|
641
643
|
export type SettingsAPI = {
|
|
642
644
|
developerMode?: boolean;
|
|
643
645
|
identifier: string;
|
|
@@ -685,6 +687,7 @@ export type SettingsAPI = {
|
|
|
685
687
|
contextualEngine?: `${ContextualEngineType}`;
|
|
686
688
|
columnMappingConfiguration?: IMappingConfiguration;
|
|
687
689
|
baseUrl?: string;
|
|
690
|
+
completeImportLogging?: boolean;
|
|
688
691
|
submitModalConfiguration?: ISubmitModalConfiguration;
|
|
689
692
|
prompts?: boolean;
|
|
690
693
|
successModalConfiguration?: ISuccessModalConfiguration;
|
|
@@ -698,6 +701,7 @@ export type SettingsAPI = {
|
|
|
698
701
|
skipConfiguration?: ISkipConfiguration;
|
|
699
702
|
disableColumnRemapping?: boolean;
|
|
700
703
|
sheetMappingConfiguration?: SheetMappingConfiguration;
|
|
704
|
+
sheetVisibility?: SheetVisibility;
|
|
701
705
|
};
|
|
702
706
|
|
|
703
707
|
export type FieldValue =
|
|
@@ -1492,6 +1496,10 @@ type SmartTableThemeAPI = {
|
|
|
1492
1496
|
dropdown?: FindColumnDropdown;
|
|
1493
1497
|
closeIcon?: CSSInterpolation;
|
|
1494
1498
|
};
|
|
1499
|
+
removeRows?: {
|
|
1500
|
+
root?: CSSInterpolation;
|
|
1501
|
+
dialog?: CSSInterpolation;
|
|
1502
|
+
};
|
|
1495
1503
|
freezeBoxShadow?: CSSObject['boxShadow'];
|
|
1496
1504
|
};
|
|
1497
1505
|
|
|
@@ -2002,10 +2010,31 @@ export type DynamicStepValues =
|
|
|
2002
2010
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2003
2011
|
export type UploadData = any[] | Record<string, any>;
|
|
2004
2012
|
|
|
2005
|
-
export type
|
|
2013
|
+
export type IParseFileXmlConfiguration = {
|
|
2014
|
+
pendingXmlConfigKey?: string;
|
|
2015
|
+
sourceXml?: string;
|
|
2016
|
+
|
|
2017
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2018
|
+
pendingXmlConfig?: {
|
|
2019
|
+
filename: string;
|
|
2020
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2021
|
+
tree: any;
|
|
2022
|
+
anchor?: string;
|
|
2023
|
+
detailModes?: Record<string, string>;
|
|
2024
|
+
};
|
|
2025
|
+
};
|
|
2026
|
+
|
|
2027
|
+
export type SheetSelectionUploadFile = {
|
|
2006
2028
|
fileName: string;
|
|
2007
|
-
sheets: {
|
|
2008
|
-
|
|
2029
|
+
sheets: {
|
|
2030
|
+
sheetName: string;
|
|
2031
|
+
data: UploadData;
|
|
2032
|
+
visibility?: SheetVisibility;
|
|
2033
|
+
}[];
|
|
2034
|
+
xmlConfiguration?: IParseFileXmlConfiguration;
|
|
2035
|
+
};
|
|
2036
|
+
|
|
2037
|
+
export type SheetSelectionUploadData = SheetSelectionUploadFile[];
|
|
2009
2038
|
|
|
2010
2039
|
export type UploadOptions = {
|
|
2011
2040
|
step: DynamicStepValues;
|
|
@@ -2018,11 +2047,13 @@ export type ValueType = boolean | number | string | null | undefined;
|
|
|
2018
2047
|
export type IParseSheet = {
|
|
2019
2048
|
sheetName: string;
|
|
2020
2049
|
data: ValueType[][];
|
|
2050
|
+
visibility?: SheetVisibility;
|
|
2021
2051
|
};
|
|
2022
2052
|
|
|
2023
2053
|
export type IParseFile = {
|
|
2024
2054
|
fileName: string;
|
|
2025
2055
|
sheets: IParseSheet[];
|
|
2056
|
+
xmlConfiguration?: IParseFileXmlConfiguration;
|
|
2026
2057
|
};
|
|
2027
2058
|
|
|
2028
2059
|
export type OnEntryChangeLogs = {
|