@ingestro/importer-react 4.1.0 → 4.2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ingestro/importer-react",
3
- "version": "4.1.0",
3
+ "version": "4.2.1",
4
4
  "homepage": "https://docs.ingestro.com",
5
5
  "peerDependencies": {
6
6
  "react": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
@@ -1 +1 @@
1
- import{a as s,b as m}from"../../chunk-GEB7CZLW.js";import{g as a,h as g}from"../../chunk-JEZAW3BC.js";import"../../chunk-J5WOZVPO.js";import"../../chunk-EK7ODJWE.js";import{isEmpty as p,isNil as v,isUndefined as R}from"lodash";import{expose as h}from"comlink";var I=(n,t,o,f,r)=>{p(n)||Object.keys(n).forEach(e=>{let l=a(r,e);R(n[e].value)||(f[t][e]=n[e].value);let d=g(e,r.filter(i=>!i.isHidden()));v(n[e].info)||d<0||n[e].info?.forEach(i=>{if(!l?.isDisabled()&&i.level===m)return;let c={rowIndex:t,colIndex:d,popover:{message:i.message,level:i.level||s}};(o[t]?.length??0)===0?o[t]=[c]:o[t].push(c)})})},E=async({initResults:n,dataInfos:t,initialValues:o},f)=>{for(let r=0;r<n.length;r++)I(n[r][0],n[r][1],t,o,f);return{dataInfos:t,initialValues:o}},b=async({initialValues:n,key:t,result:o,colIndex:f})=>{let r={};for(let e=0;e<o.length;e++)if(R(o[e][0].value)||n[o[e][1]]&&(n[o[e][1]][t]=o[e][0].value),o?.[e]?.[0]?.info&&f>=0){let l=o?.[e]?.[0]?.info??[],d={message:o?.[e]?.[0]?.info?.[0]?.message??"",level:o?.[e]?.[0]?.info?.[0]?.level??s};for(let c=0;c<l?.length;c++)if(l[c].level!==m){d={message:o?.[e]?.[0]?.info?.[c]?.message??"",level:o?.[e]?.[0]?.info?.[c]?.level??s};break}let i={rowIndex:o[e][1],colIndex:f,popover:d};i.popover.level!==m&&n[o[e][1]]&&((r[o[e][1]]?.length??0)===0?r[o[e][1]]=[i]:r[o[e][1]].push(i))}return{dataInfos:r,initialValues:n}},x=async({dataInfos:n,columnDataInfos:t})=>{let o=Object.keys(t);for(let f=0;f<o.length;f++){let r=o[f];t?.[r]?.length>0&&(n[r]||(n[r]=[]),n[r].push(...t[r]))}return{dataInfos:n}},D=()=>!0;h({check:D,handleOnEntryInit:E,handleColumnHooks:b,integrateColumnHooksData:x});
1
+ import{a as s,b as m}from"../../chunk-GEB7CZLW.js";import{g as a,h as g}from"../../chunk-K3RCWAEY.js";import"../../chunk-J5WOZVPO.js";import"../../chunk-EK7ODJWE.js";import{isEmpty as p,isNil as v,isUndefined as R}from"lodash";import{expose as h}from"comlink";var I=(n,t,o,f,r)=>{p(n)||Object.keys(n).forEach(e=>{let l=a(r,e);R(n[e].value)||(f[t][e]=n[e].value);let d=g(e,r.filter(i=>!i.isHidden()));v(n[e].info)||d<0||n[e].info?.forEach(i=>{if(!l?.isDisabled()&&i.level===m)return;let c={rowIndex:t,colIndex:d,popover:{message:i.message,level:i.level||s}};(o[t]?.length??0)===0?o[t]=[c]:o[t].push(c)})})},E=async({initResults:n,dataInfos:t,initialValues:o},f)=>{for(let r=0;r<n.length;r++)I(n[r][0],n[r][1],t,o,f);return{dataInfos:t,initialValues:o}},b=async({initialValues:n,key:t,result:o,colIndex:f})=>{let r={};for(let e=0;e<o.length;e++)if(R(o[e][0].value)||n[o[e][1]]&&(n[o[e][1]][t]=o[e][0].value),o?.[e]?.[0]?.info&&f>=0){let l=o?.[e]?.[0]?.info??[],d={message:o?.[e]?.[0]?.info?.[0]?.message??"",level:o?.[e]?.[0]?.info?.[0]?.level??s};for(let c=0;c<l?.length;c++)if(l[c].level!==m){d={message:o?.[e]?.[0]?.info?.[c]?.message??"",level:o?.[e]?.[0]?.info?.[c]?.level??s};break}let i={rowIndex:o[e][1],colIndex:f,popover:d};i.popover.level!==m&&n[o[e][1]]&&((r[o[e][1]]?.length??0)===0?r[o[e][1]]=[i]:r[o[e][1]].push(i))}return{dataInfos:r,initialValues:n}},x=async({dataInfos:n,columnDataInfos:t})=>{let o=Object.keys(t);for(let f=0;f<o.length;f++){let r=o[f];t?.[r]?.length>0&&(n[r]||(n[r]=[]),n[r].push(...t[r]))}return{dataInfos:n}},D=()=>!0;h({check:D,handleOnEntryInit:E,handleColumnHooks:b,integrateColumnHooksData:x});
@@ -1 +1 @@
1
- import{e as o,f as t,g as m,h as n,i,j as r}from"../../chunk-YBKWOGX7.js";import"../../chunk-INNZ66AJ.js";import"../../chunk-JEZAW3BC.js";import"../../chunk-J5WOZVPO.js";import"../../chunk-EK7ODJWE.js";import{expose as e}from"comlink";var p=()=>!0;e({check:p,getValues:r,addToAllRows:o,joinWithoutColumns:t,joinOnColumns:m,appendToColumns:n,countMatching:i});
1
+ import{e as o,f as t,g as m,h as n,i,j as r}from"../../chunk-XPJMBSXB.js";import"../../chunk-TFISPYML.js";import"../../chunk-K3RCWAEY.js";import"../../chunk-J5WOZVPO.js";import"../../chunk-EK7ODJWE.js";import{expose as e}from"comlink";var p=()=>!0;e({check:p,getValues:r,addToAllRows:o,joinWithoutColumns:t,joinOnColumns:m,appendToColumns:n,countMatching:i});
@@ -1 +1 @@
1
- import{e as o}from"../../chunk-YJM4L5IQ.js";import"../../chunk-INNZ66AJ.js";import"../../chunk-JEZAW3BC.js";import"../../chunk-J5WOZVPO.js";import"../../chunk-EK7ODJWE.js";import*as e from"comlink";var m=()=>!0;e.expose({check:m,getCountBySearchValue:o});
1
+ import{e as o}from"../../chunk-ISBIW3UL.js";import"../../chunk-TFISPYML.js";import"../../chunk-K3RCWAEY.js";import"../../chunk-J5WOZVPO.js";import"../../chunk-EK7ODJWE.js";import*as e from"comlink";var m=()=>!0;e.expose({check:m,getCountBySearchValue:o});
package/chunk-INNZ66AJ.js DELETED
@@ -1 +0,0 @@
1
- import{r as a}from"./chunk-JEZAW3BC.js";var n=class s extends a{constructor({description:t,key:e,example:o,label:p,type:l,options:r,validators:u,alternativeMatches:g,columnSize:h,isMultiSelection:d,allowCustomOptions:M,creator:m,baseKey:c,baseKeyCounter:C,hidden:y,optionMappingConfiguration:b,...O}){super({description:t,key:e,example:o,label:p,type:l,validators:u,alternativeMatches:g,columnSize:h,creator:m,baseKey:c,baseKeyCounter:C,hidden:y,optionMappingConfiguration:b,...O});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 e=this.options[t];this.optionTypeMap.set(e.value,e.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(),outputFormat:this.getOutputFormat(),numberFormat:this.getNumberFormat(),baseKey:this.getBaseKey(),baseKeyCounter:this.getBaseKeyCounter(),creator:this.getCreator(),hidden:this.isHidden(),disabled:this.isDisabled(),optionMappingConfiguration:this.getOptionMappingConfiguration()},e=this.getOptions();return{...t,options:e,isMultiSelection:this.isMultiSelection,allowCustomOptions:this.allowCustomOptions}};this.getIsMultiSelection=()=>this.isMultiSelection;this.getAllowCustomOptions=()=>this.allowCustomOptions;this.options=r?.map(i=>({...i,baseKey:i?.baseKey||i.value,baseKeyCounter:i.baseKeyCounter||0,alternativeMatches:i.alternativeMatches.filter(v=>v!==i.label),validations:i.validations||[]})),this.isMultiSelection=d,this.allowCustomOptions=M||!1}clone(){let t=this.serialize();return new s({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,isMultiSelection:t.isMultiSelection,allowCustomOptions:t.allowCustomOptions,hidden:t.hidden,disabled:t.disabled,optionMappingConfiguration:t.optionMappingConfiguration})}},T=n;export{T as a};
package/chunk-JEZAW3BC.js DELETED
@@ -1 +0,0 @@
1
- import{a as d}from"./chunk-J5WOZVPO.js";import{isNil as ie,escapeRegExp as tt,isString as rt}from"lodash";import ce from"numbro";import{isNil as fe}from"lodash";var u=class r{static{this.currencySymbol={eu:"\u20AC",us:"$"}}static{this.percentageSymbol="%"}static{this.maxSafeNumberLength=17}static convertToFormat(e,t){if(e==null||e===""||typeof e=="string"&&e.trim()==="")return"";let i="";if(typeof e=="string"){let m=this.convertStringToNumber(e,{targetFormat:t?.targetFormat});if(m===null)return e;i=m}else if(typeof e=="number"){let m=e;t?.adornment==="percentage"&&(m=e*100,m=Number(m.toFixed(10))),i=m.toString()}else throw new Error(`[convertToFormat] unsupported type of the "value" - ${typeof e}`);let[n,o]=i.split("."),a=t?.decimalDigits||o?.length||0,l="";try{l=ce(i).format({thousandSeparated:!0,mantissa:a})}catch{return i}if(t?.targetFormat==="eu"){let m=l.replace(/,/g,"$").replace(/\./g,",").replace(/\$/g,".");return this.appendAdornment(m,t)}return this.appendAdornment(l,t)}static detectNumberFormat(e,t){let i=[];for(let l=0;l<e.length;l++)(e[l]===","||e[l]===".")&&i.push(e[l]);if(i.length===0)return;let n=e.replace(/([+\-EUR€SD$%\s])/g,"");if(i.length===1){let[l,m]=n.split(i[0]);return l.length>3?i[0]===","?"eu":"us":l.replace(/0/g,"")===""?i[0]===","?"eu":"us":m.length===3?t?.targetFormat?t?.targetFormat:t?.resolveUncertainty===!1?void 0:i[0]===","?"us":"eu":i[0]===","?"eu":"us"}let o=/^([1-9]\d{0,2})(\.\d{3})*(,\d+)?$/,a=/^([1-9]\d{0,2})(,\d{3})*(\.\d+)?$/;return o.test(n)?"eu":a.test(n)?"us":null}static convertToUsWithDecimal(e,t){let i=e,n=r.getDelimiters(e),o=e.replace(/([+\-EUR€SD$%\s])/g,"");if(n.length===1){let[a,l]=o.split(n[0]);if(l.length===3)return t==="us"?i=`${e}`?.replace(/,/g,""):i=`${e}`?.replace(/\./g,"$")?.replace(/,/,".").replace(/\$/g,""),i}return this.replaceDelimiter(e)}static{this.convertStringToNumber=(e,t)=>{if(typeof e=="number")return`${e}`;if(typeof e!="string")return null;let i=e.trim().replace(/([EUR€SD$%\s])/g,"");if(i==="")return e;let n=t?.format||this.detectNumberFormat(i,{targetFormat:t?.targetFormat}),o="";if(n===null||(n==="us"?o=i.replace(/,/g,""):o=i.replace(/\./g,"$").replace(/,/,".").replace(/\$/g,""),o.length>r.maxSafeNumberLength&&(o=o.slice(0,r.maxSafeNumberLength),o.at(-1)==="."&&(o=o.slice(0,r.maxSafeNumberLength-1))),isNaN(Number(o))))return null;if(t?.adornment==="percentage"&&e.includes("%")){let a=Number(o)/100;o=Number(a.toFixed(10)).toString()}return o}}static hasDecimalPart(e,t){if(typeof e=="number")return e%1!==0;let i=e.trim(),n=t||this.detectNumberFormat(i);return n===null?!1:n==="us"?e.includes("."):e.includes(",")}static appendAdornment(e,t){return t?.adornment==="currency"?t.symbol==="us"?`${this.currencySymbol.us}${e}`:`${e} ${this.currencySymbol[t.symbol??"eu"]}`:t?.adornment==="percentage"?`${e} ${this.percentageSymbol}`:e}static getDelimiters(e){let t=[];for(let i=0;i<e.length;i++)(e[i]===","||e[i]===".")&&t.push(e[i]);return t}static replaceDelimiter(e){let t=e,i=r.detectNumberFormat(`${e}`);return fe(i)?null:(i==="eu"?t=`${e}`?.replace(/\./g,"$")?.replace(/,/,".").replace(/\$/g,""):t=`${e}`?.replace(/,/g,""),t)}};var D=()=>d.getInstance().getTruthyWords(),I=()=>d.getInstance().getFalsyWords(),ft=()=>d.getInstance().getBooleanOptionToRender(),gt=[...D(),...I()];import{isArray as ge,isNil as Ee,isObject as ye}from"lodash";var N=class{constructor(){this.parse=(e,t)=>Ee(e)||ge(e)||ye(e)?null:D().includes(`${e}`.toLowerCase())?!0:I().includes(`${e}`.toLowerCase())?!1:e===""?null:`${e}`}},w=N;import{isArray as $,isBoolean as Y,isNil as K,isObject as B}from"lodash";var O=class{constructor(){this.parseSingle=(e,t)=>K(e)||B(e)||$(e)?null:Y(e)?JSON.stringify(e):e===""?null:y({value:e,dataModel:t.dataModel,isTrim:!0});this.parseMultiple=(e,t)=>$(e)?e.map(i=>y({value:i,dataModel:t.dataModel,isTrim:!0})):K(e)||B(e)||e===""?null:Y(e)?[JSON.stringify(e)]:[y({value:e,dataModel:t.dataModel,isTrim:!0})];this.parse=(e,t)=>t.dataModel.getIsMultiSelection()&&!t.forceSingle?this.parseMultiple(e,t):this.parseSingle(e,t)}},W=O;import{isArray as _e,isBoolean as be,isNil as Me,isObject as Te}from"lodash";var R=class{constructor(){this.parse=(e,t)=>Me(e)||_e(e)||Te(e)?null:be(e)?JSON.stringify(e):e===""?null:s(`${e}`)}},G=R;import{isArray as he,isBoolean as De,isNil as Ie,isObject as Ne}from"lodash";var A=class{constructor(){this.parse=(e,t)=>Ie(e)?null:De(e)?e?"1":"0":Ne(e)||he(e)||e===""||s(e)===null?null:this.valueParser(e,t)}},_=A;var C=class extends _{constructor(){super(...arguments);this.valueParser=(t,i)=>{let n=u.convertStringToNumber(t,{format:i?.numberFormat});return n===null?s(`${t}`):Number(n)}}},k=C;var S=class extends _{constructor(){super(...arguments);this.valueParser=(t,i)=>{let n=u.convertStringToNumber(t,{format:i?.numberFormat});return n===null?s(`${t}`):Number(n)}}},q=S;import{isArray as Oe,isBoolean as Re,isNil as Ae,isNumber as Ce,isObject as Se}from"lodash";var U=class{constructor(){this.parse=(e,t)=>{if(Ae(e)||Se(e)||Oe(e))return null;if(Re(e))return JSON.stringify(e);if(Ce(e))return e;if(e===""||s(e)===null)return null;let i=u.convertStringToNumber(e,{adornment:"percentage"});return i===null?s(`${e}`):Number(i)}}},Q=U;import{isArray as Ue,isBoolean as Pe,isNil as Ve,isObject as xe}from"lodash";var P=class{constructor(){this.parse=(e,t)=>{if(Ve(e)||Ue(e)||xe(e))return null;if(Pe(e))return JSON.stringify(e);if(e===""||s(e)===null)return null;let i=u.convertStringToNumber(e,{format:t?.numberFormat});return i===null?s(`${e}`):Number(i)}}},Z=P;import{parse as j,format as X,isMatch as Fe}from"date-fns";import p from"moment";var f="dd.MM.yyyy HH:mm:ss:SSS";var z="DD.MM.YYYY HH:mm:ss:SSS",J="DD.MM.YYYY HH:mm:ss:SSSZ";var b={date_dmy:"dd.MM.yyyy",date_mdy:"MM.dd.yyyy",date_iso:"yyyy-MM-dd",datetime:"yyyy-MM-dd HH:mm:ss",time_hm:"hh:mm aaa",time_hms:"hh:mm:ss aaa",time_hm_24:"HH:mm",time_hms_24:"HH:mm:ss"},v={time_hm:"hh:mm a",time_hms:"hh:mm:ss a",time_hm_24:"HH:mm",time_hms_24:"HH:mm:ss"},Jt=r=>{try{return X(j(r,f,new Date),"dd.MM.yyyy")}catch{return r}},He=(r,e,t,i)=>{try{if(typeof r=="string"){if(i===!1||isNaN(Date.parse(r))&&!we(r))return r;let n=t||["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","dd/MM/yyyy","dd-MM-yyyy HH:mm:ss","dd-MM-yyyy HH:mm","yyyy-MM-dd'T'HH:mm:ssZ","yyyy-MM-dd'T'HH:mm:ss","yyyy-MM-dd","yyyy-MM-dd HH:mm:ss","dd-MM-yyyy"],o;for(let a=0;a<n.length;++a)if(Fe(r,n[a])){o=n[a];break}if(o)return X(j(r,o,new Date),e||f);throw new Error("not found format")}else throw new Error("not date string")}catch{return r}},Le=["YYYY-MM-DDTHH:mm:ss.SSSZ","X","x"],ee=(r,e)=>{r===null&&(r=""),r=/^\d{3,}$/.test(r)?parseInt(r,10):r;let t=/^\d{1,2}$/.test(r);t&&(r+=":00");let i=p(r,Le,!0).isValid()?p(r):p(r,e),n=i.isValid(),o=p(r,e,!0).isValid()&&!t;return r===""&&(n=!0,o=!0),n&&!o?i.format(e):r},jt=(r,e)=>{let t=()=>p.parseZone(r).format(e);try{if(typeof r=="string"){if(p(r,e,!0).isValid())return e.includes("Z")?t():p.utc(r,e).format(e);if(p(r).isValid())return e.includes("Z")?t():p.utc(r).format(e);throw new Error("not found format")}else throw new Error("not date string")}catch{return r}},Xt=(r,e)=>{switch(e){case"date_dmy":case"date_mdy":case"date_iso":case"datetime":return He(r,b[e],[b[e]]);default:return r}},we=r=>{let[e,t,i]=r?.split(" ")?.[0]?.split(/[./-]/);return!!(Number(i)&&Number(t)<=12&&Number(e)<=31)};import{parse as $e,format as Ye}from"date-fns";import{isArray as Ke,isBoolean as Be,isNil as We,isObject as Ge}from"lodash";import T from"moment";var ke=/([+-](?:0\d|1[0-4]):?[0-5]\d|Z)$/i,V=class{constructor(){this.parse=(e,t)=>{if(We(e)||Ke(e)||Ge(e))return null;if(Be(e))return JSON.stringify(e);let i=t?.dataModel?.getType();if(!i)return s(`${e}`);if(typeof e=="string"){if(e==="")return null;try{if(t?.dataModel?.getType()==="date"){let n=t?.dataModel?.getOutputFormat(),o=e.match(ke),l=!!(o?o[0]:"");if((l?T.parseZone(e,n,!0):T(e,n,!0)).isValid())return e;let c=l?T.parseZone(e,J):T(e,z);if(c.isValid())return c.format(n);throw new Error("invalid date")}else{let n=b[i];if(!n)return s(`${e}`);let o=$e(e,f,new Date);return Ye(o,n)}}catch{let o=v[i];return o?s(ee(e,o)):s(`${e}`)}}else return s(`${e}`)}}},te=V;import{isArray as qe}from"lodash";var x=class{constructor({validation:e,regex:t,fields:i,errorMessage:n}){this.getValidation=()=>this.validation;this.getRegex=()=>this.regex;this.getFields=()=>this.fields;this.getErrorMessage=()=>this.errorMessage;this.serialize=()=>({validation:this.getValidation(),fields:this.getFields(),regex:this.getRegex(),errorMessage:this.getErrorMessage()});this.validation=e,this.regex=t,this.fields=i??[],this.errorMessage=n}},lr=x;var h=class r{constructor({description:e,key:t,example:i,label:n,type:o,validators:a,mappingValidation:l,alternativeMatches:m,columnSize:c,creator:oe,baseKey:se,baseKeyCounter:ae,outputFormat:le,numberFormat:ue,hidden:me,disabled:pe,optionMappingConfiguration:de}){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.getValidators=()=>this.validators;this.getColumnSize=()=>this.columnSize;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:n})=>{this.baseKey=t,this.key=e,this.baseKeyCounter=i,this.creator=n};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(),outputFormat:this.getOutputFormat(),isMultiSelection:this.getIsMultiSelection(),numberFormat:this.getNumberFormat(),baseKey:this.getBaseKey(),baseKeyCounter:this.getBaseKeyCounter(),creator:this.getCreator(),hidden:this.isHidden(),disabled:this.isDisabled(),optionMappingConfiguration:this.getOptionMappingConfiguration()});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,baseKey:e.baseKey,baseKeyCounter:e.baseKeyCounter,creator:e.creator,numberFormat:e.numberFormat,outputFormat:e.outputFormat,hidden:e.hidden,disabled:e.disabled,optionMappingConfiguration:e.optionMappingConfiguration})};this.isHidden=()=>this.hidden;this.getOptionMappingConfiguration=()=>this.optionMappingConfiguration;this.description=e,this.key=t,this.example=i,this.label=n,this.type=o,this.validators=a??[],this.mappingValidation=l,this.alternativeMatches=m?[...m.filter(g=>g!==n&&g!==t)?.map(g=>g?.toString())]:[],this.columnSize=c,this.creator=oe,this.baseKey=se||t,this.baseKeyCounter=ae||0,this.outputFormat=le||"",this.numberFormat=ue||"eu",this.hidden=me??!1,this.disabled=pe??!1,this.optionMappingConfiguration=de}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"}};var Qe=new k,Ze=new q,ze=new Z,Je=new Q,je=new w,Xe=new W,ve=new G,et=new te,H=class{static{this.parse=(e,t)=>{let i;switch(t?.dataModel?.getType()){case"int":i=Qe;break;case"float":i=Ze;break;case"boolean":i=je;break;case"single-select":case"currency_code":case"country_code_alpha_2":case"country_code_alpha_3":i=Xe;break;case"percentage":i=Je;break;case"currency_eur":case"currency_usd":i=ze;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=et;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=ve;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 o=d.getInstance().getOptionsForReviewEntries().find(a=>`${a.value}`.includes(`${e}`));o&&(i=`${o.label}`)}else if(h.isTypeCategory(t.type))if(t.isMultiSelection){if(qe(e)){let n=t.options?.filter(o=>e.some(a=>F(o,a)));n&&(i=n.map(o=>o.label).join(", "))}}else{let n=t.options?.find(o=>F(o,e));n&&(i=`${n?.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 n=u.convertStringToNumber(i,{format:"us"});return n!==null?Number(n):e}else return e}}},re=H;var $r=r=>Number(r).toLocaleString("de-DE"),Yr=(r,e)=>{let{value:t,isExact:i,columns:n}=e,o=re.parseRawValueToDisplayValue(r,n[0]);return i&&!ie(r)&&o===t?!0:!!(!i&&!ie(r)&&o?.toLowerCase()?.includes(t?.toLowerCase()))},Kr=(r,e,t)=>{let i=new RegExp(tt(e),"gi");return`${r}`.replace(i,t)},Br=r=>typeof r=="string"?r.replace(/(\r\n|\n|\r)/gm,""):r,Wr=(r,e)=>e?e.map((t,i)=>r.map(n=>({rowIndex:i,valid:!0,key:n.key,value:t[n.key]}))):[],s=r=>{if(rt(r)){let e=r.trimEnd();return e===""?null:e}return r};var ne=r=>r.trim()?.replace(/[-!$%^&*()+|~=`{}\[\]:";'<>?,.\/]/g,"")?.replace(/^_+/,"")?.replace(/_+$/,"")?.replace(/(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe23\u20d0-\u20f0]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe23\u20d0-\u20f0]|\ud83c[\udffb-\udfff])?)*/g,"")?.replace(/ /g,"_")?.replace(/ß/g,"ss")?.replace(/ä/g,"ae")?.replace(/ö/g,"oe")?.replace(/ü/g,"ue")?.toLowerCase(),L=r=>r?.replace(/[-!$%^&*()_+|~=`{}\\[\]:";'<>?,.\\/]/g," ")?.replace(/(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe23\u20d0-\u20f0]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe23\u20d0-\u20f0]|\ud83c[\udffb-\udfff])?)*/g," ")?.toLowerCase();import{isInteger as it,isNumber as nt}from"lodash";var jr=(r,e,t)=>{for(let i=0;i<r.length;i++){let n=r[i].getKey(),o=e;if(t&&(n=L(n),o=L(o)),n===o)return r[i]}return null},Xr=(r,e)=>{for(let t=0;t<e.length;t++)if(e[t].getKey()===r)return t;return-1},F=(r,e)=>`${r.value}`==`${e}`,ot=(r,e)=>{let t=0;for(let i=0;i<e.length;i++){let n=e[i],o="baseKeyCounter";n?.[o]&&r===n?.["baseKey"]&&t<(n?.[o]??0)&&(t=n?.[o]||0)}return t},st=(r,e)=>!r.some(t=>t.baseKey===e),vr=(r,e,t=!0)=>{let i=t?ne(r):r,n=ot(i,e)+1,o=i;return st(e,i)?n--:n>0&&(o=`${i}_${n}`),{key:{value:o,baseKey:i,baseKeyCounter:n}}},y=({value:r,dataModel:e,isTrim:t})=>{let i=e.getOptionTypeMap(),n=r!==void 0?i.get(r):void 0;if(!n&&typeof r=="number"&&(n=i.get(String(r))),!n&&typeof r=="string"){let o=Number(r);isNaN(o)||(n=i.get(o))}if(n=n??"string",n==="int"){let o=Number(r);return!isNaN(o)&&it(o)?o:t?s(`${r}`):`${r}`}else if(n==="float"){if(nt(r))return r;let o=`${r}`.replace(/,/,"."),a=u.convertStringToNumber(`${o}`,{format:"us"});return a===null?t?s(`${r}`):`${r}`:Number(a)}else return t?s(`${r}`):`${r}`};export{u as a,D as b,I as c,ft as d,gt as e,L as f,jr as g,Xr as h,F as i,vr as j,y as k,v as l,Jt as m,ee as n,jt as o,Xt as p,lr as q,h as r,re as s,$r as t,Yr as u,Kr as v,Br as w,Wr as x,s as y};
package/chunk-YBKWOGX7.js DELETED
@@ -1 +0,0 @@
1
- import{a as F}from"./chunk-INNZ66AJ.js";import{e as v,f as c,r as y,s as M}from"./chunk-JEZAW3BC.js";import{isEmpty as W,uniq as q}from"lodash";var J=0,D=class{constructor({sheet:e,columnKey:t,rows:o,id:s,notSetUnique:a=!1,label:r,refJoinSheetColum:n}){this.removed=!1;this.label="";this.parsedDate=!1;this.getColumnKey=()=>this.columnKey;this.getId=()=>this.id;this.getSheet=()=>this.sheet;this.getRows=()=>this.rows;this.getUniqueRows=()=>this.uniques;this.remove=()=>{this.removed=!0};this.unRemove=()=>{this.removed=!1};this.isRemoved=()=>this.removed;this.getType=()=>0;this.getFileName=()=>this.sheet.getSheetFileName();this.toJSON=()=>({columnKey:this.columnKey,id:this.id,rows:this.rows,type:this.getType()});this.equal=e=>this.getId()===e.getId();this.keyEqual=e=>this.columnKey===e.columnKey;this.setIndex=e=>{this.index=e};this.getIndex=()=>this.index;this.getRefJoinSheetColum=()=>this.refJoinSheetColum;this.columnKey=t.trim(),this.sheet=e,this.rows=W(o)?[""]:o,typeof s>"u"?(J++,this.id=`${t}-${J}`):this.id=s,a?this.uniques=[]:this.uniques=q(this.getRows()),r&&(this.label=r),this.refJoinSheetColum=n}setRows(e){this.rows=e}setParsedDate(e){this.parsedDate=e}hasParsedDate(){return this.parsedDate}},g=D;var I=class extends g{constructor({sheet:t,sheetColumns:o,rows:s,id:a,columnKey:r}){super({columnKey:r,rows:s,sheet:t,id:a});this.getType=()=>1;this.getJoinedSheetColumns=()=>this.sheetColumns;this.toJSON=()=>({columnKey:this.columnKey,id:this.id,rows:this.rows,sheetColumns:this.sheetColumns.map(t=>t.toJSON()),type:this.getType()});this.sheetColumns=o}},T=I;var _=["?",",","@"];import{isNaN as X,minBy as G,isString as Q,isEqual as Y,isEmpty as b,isNil as P}from"lodash";var x=class{constructor({sheets:e,filename:t,type:o,fileSize:s}){this.globalNumberFormat="eu";this.columnsNumberFormat=[];this.addSheet=e=>{this.sheets.push(e)};this.isSelected=()=>{for(let e=0;e<this.sheets.length;e++)if(this.sheets[e].isSelected())return!0;return!1};this.getSheets=()=>this.sheets;this.getSelectedSheets=()=>this.sheets.filter(e=>e.isSelected());this.getFilename=()=>this.filename;this.selectAllSheet=e=>this.sheets.forEach(t=>{t.setSelected(e)});this.getType=()=>this.type;this.getFileSize=()=>{let e=this.fileSize/1e6;return Number(parseFloat(`${e}`).toFixed(4))};this.sheets=e,this.filename=t,this.type=o,this.fileSize=s??0,this.sheets.forEach(a=>{a.setSpreadSheet(this)})}setNumberFormat(e){this.globalNumberFormat=e.global,this.columnsNumberFormat=e.columns}getNumberFormat(){return{global:this.globalNumberFormat,columns:this.columnsNumberFormat}}},H=x;var K=0,N=class{constructor({data:e,name:t,isNotSetColumn:o,id:s}){this.selected=!1;this.isManualSelectHeader=!1;this.columns=[];this.headerRowIndex=0;this.spreadSheet=new H({filename:"",sheets:[],type:"xlsx",fileSize:0});this.getId=()=>this.id;this.setSpreadSheet=e=>{this.spreadSheet=e};this.getSpreadSheet=()=>this.spreadSheet;this.setSelected=e=>{this.selected=e};this.isSelected=()=>this.selected;this.setHeaderRowIndex=e=>{this.headerRowIndex=e,this.setColumns()};this.getDataTransform=()=>this.data.map((e,t)=>({data:e,index:t,length:e.filter(o=>o).length}));this.getMaxLengthColumns=()=>this.getDataTransform().reduce((o,s)=>Math.max(o,s.data?.filter(a=>!b(a)&&!_.some(r=>r===a.toString()?.trim()&&a.toString()?.startsWith(r))).length),0);this.setHeaderByAutoDetection=()=>{let e=this.getMaxLengthColumns(),t=this.getDataTransform(),o=[];for(let a=0;a<(t.length>50?50:t.length);a++){let r=t[a],n=r.length===e;r.data.filter(h=>!v.includes(Q(h)?h.toLowerCase():h)&&X(Number(h))).length===e&&n&&o.push(r)}let s=o.length===1?o[0].index:G(o,a=>a.length)?.index??0;this.setHeaderRowIndex(s)};this.getHeaderRowIndex=()=>this.headerRowIndex;this.getHeaderRow=()=>this.data[this.headerRowIndex]?.filter(e=>!!e);this.getColumns=()=>this.columns.filter(e=>!e.isRemoved());this.getSortedColumns=()=>[...this.getColumns()].sort((e,t)=>c(e.getColumnKey())<c(t.getColumnKey())?-1:c(e.getColumnKey())>c(t.getColumnKey())?1:0);this.getColumnsWithRemoved=()=>this.columns.filter(e=>e.getType()!==1);this.getColumn=(e,t)=>this.columns.find(o=>t?c(o.getColumnKey())===c(`${e}`):o.getColumnKey()===e);this.getColumnsByKey=(e,t)=>this.columns.filter(o=>t?c(o.getColumnKey())===c(`${e}`):o.getColumnKey()===e);this.getValues=()=>{let e=this.data.filter((o,s)=>s>this.headerRowIndex);if(b(e))return[[]];let t=[];for(let o=0;o<e.length;o++){let s=[];for(let a=0;a<this.data[this.headerRowIndex].length;a++)P(this.data[this.headerRowIndex][a])||s.push(this.parseValue(e[o][a]));t.push(s)}return t};this.getData=()=>this.data;this.getName=()=>this.name;this.getDisplayName=({t:e})=>{if(this.getName()?.length>0)return this.getName();switch(this.spreadSheet.getType()){case"json":return`${e("txt_default_sheet_prefix_name")} 1`;case"csv":return`${e("txt_default_sheet_prefix_name")} 1`;default:return""}};this.getSheetFileName=()=>`${this.spreadSheet.getFilename()}`;this.getIsManualSelectHeader=()=>this.isManualSelectHeader;this.setIsManualSelectHeader=()=>{this.isManualSelectHeader=!0};this.clearIsManualSelectHeader=()=>{this.isManualSelectHeader=!1};this.getDataAsResults=()=>{let e=[],t=this.getColumnsWithRemoved(),o=this.data.filter((s,a)=>a>this.headerRowIndex);for(let s=0;s<o.length;s++){let a=o[s];e[s]={};for(let r=0;r<t.length;r++){let n=a?.[r];if(!b(n)&&!P(n)){let i=t[r].getColumnKey();e[s][i]=this.parseValue(n)}}}return e};this.addColumn=e=>{this.columns.push(new g({columnKey:`${e}`,sheet:this,rows:this.getRowsByColumnIndex(this.getColumnIndex(e))}))};this.removeColumn=e=>{this.columns.find(t=>t.getColumnKey()===e)?.remove()};this.removeColumnByIndex=e=>{this.columns.find((t,o)=>o===e)?.remove()};this.setData=e=>{this.data=e};this.toJSON=()=>({name:this.name,id:this.id,type:this.getType(),values:this.getValues(),headerRow:this.getHeaderRow()});this.equal=e=>this.id===e.getId();this.getType=()=>0;this.getRowsByColumnIndex=e=>{if(e===-1)return[];let t=[];for(let o=0;o<this.data.length;o++){let s=this.data[o];if(o>this.headerRowIndex){let a=s[e]??"";t.push(this.parseValue(a))}}return t};this.setColumns=()=>{let e=this.data[this.headerRowIndex];if(e){let t=[];for(let o=0;o<e.length;++o){let s=e[o];s&&t.push(new g({columnKey:`${s}`,sheet:this,rows:this.getRowsByColumnIndex(o)}))}this.columns=t}else this.columns=[]};this.getColumnIndex=e=>this.data[this.headerRowIndex].findIndex(s=>Y(`${s}`,`${e}`));this.parseValue=e=>typeof e=="string"?e.trim():e;this.data=e,this.name=t,typeof s>"u"?(K++,this.id=`${t}-${K}`):this.id=s,o||this.setColumns(),this.modifiedData=this.getDataAsResults()}getModifiedData(){return this.modifiedData}mergedModifiedData(e){let t=[],o=this.getColumns();for(let s=0;s<o.length;s++){let a=o[s],r=[];if(!a.isRemoved()){for(let n=0;n<e.length;n++){t[n]||(t[n]=[]);let i=e[n][s];t[n][s]=i,r[n]=i}a.setRows(r)}}this.setData(t)}},L=N;var V=class extends L{constructor({joinedData:t,sheets:o,mappings:s,mappingIndexes:a}){super({data:t.data,name:"join-sheet",isNotSetColumn:!0});this.sheets=[];this.joinHistory=[];this.findRefJoinSheetColumn=t=>{let o=this.sheets.length===2?this.sheets[0]:this,s=this.sheets[this.sheets.length-1];if(t<o.getColumns().length)return o.getColumns()[t];let a=t-o.getColumns().length;return s.getColumns().filter((r,n)=>this.joinHistory[this.joinHistory.length-1].mappingIndexes.every(i=>i.target!==n))[a]};this.setJoinColumns=(t,o)=>{let s=this.data[this.headerRowIndex];if(!s){this.columns=[];return}let a=[];for(let r=0;r<s.length;++r){let n=s[r],i=o.findIndex(u=>u.source===r),h=this.columns[r]&&this.columns[r].getType()===1;if(i>=0||h){let u=t[i],m;h&&i>=0?m=[...this.columns[r].getJoinedSheetColumns(),u.target]:h?m=this.columns[r].getJoinedSheetColumns():m=[u.source.getRefJoinSheetColum()??u.source,u.target],a.push(new T({columnKey:`${n}`,sheetColumns:m,sheet:this,rows:this.getRowsByColumnIndex(r)}))}else{let u=this.columns[r]?this.columns[r].getRefJoinSheetColum()??this.columns[r]:this.findRefJoinSheetColumn(r);a.push(new g({columnKey:`${n}`,sheet:u.getSheet(),rows:this.getRowsByColumnIndex(r),refJoinSheetColum:u}))}}this.columns=a};this.getJoinedSheets=()=>this.sheets;this.getType=()=>1;this.joinSheet=(t,o,s,a)=>{this.setData(t.data),this.sheets.push(o),this.joinHistory.push({mappingIndexes:a,type:t.type,row:t.data.length,col:this.data[this.headerRowIndex]?.length??0}),this.setJoinColumns(s,a)};this.getJoinColumns=()=>this.columns.filter(t=>t.getType()===1);this.getJoinHistory=()=>this.joinHistory;this.headerRowIndex=0,this.joinHistory.push({mappingIndexes:a,type:t.type,row:t.data.length,col:this.data[this.headerRowIndex]?.length??0}),this.sheets=o,this.setJoinColumns(s,a)}},Ne=V;var z=({rowA:l,rowB:e},t)=>t.every(o=>{let s=`${l[o.source]??""}`,a=`${e[o.target]??""}`;return s===a&&s!==""&&a!==""}),Z=(l,e,t)=>{let o=[],s=l.headerRow,a=e.headerRow;for(let r=0;r<s.length;++r)o.push(s[r]);for(let r=0;r<a.length;++r)t.every(n=>n.target!==r)&&o.push(a[r]);return o},Fe=async(l,e)=>{let t=l.values,o=e.values,s=l.headerRow,a=e.headerRow,r=[...s,...a],n=[];n.push(r);for(let i=0;i<t.length;++i)n.push([...t[i],...o[0]]);return{data:n,type:"ADD_TO_ALL_ROWS"}},Je=async(l,e)=>{let t=l.values,o=e.values,s=l.headerRow,a=e.headerRow,r=[...s,...a],n=[];n.push(r);for(let i=0;i<t.length;++i)n.push([...t[i],...a.map(()=>"")]);for(let i=0;i<o.length;++i)n.push([...s.map(()=>""),...o[i]]);return{data:n,type:"JOIN_WITHOUT_COLUMNS"}},Te=async(l,e,t)=>{let o=l.values,s=e.values,a=[],r=[],n={},i=Z(l,e,t);a.push(i);for(let h=0;h<o.length;++h){let u=!1,m=o[h];for(let d=0;d<s.length;++d){let p=s[d];z({rowA:m,rowB:p},t)&&(n[d]=!0,u=!0,a.push([...m,...p.filter((C,$)=>t.every(U=>U.target!==$))]))}u||r.push([...m,...e.headerRow.filter((d,p)=>t.every(C=>C.target!==p)).map(()=>"")])}for(let h=0;h<s.length;++h){if(n[h])continue;let u=s[h],m=l.headerRow.map(()=>"");t.forEach(d=>{m[d.source]=u[d.target]}),r.push([...m,...u.filter((d,p)=>t.every(C=>C.target!==p))])}return r.forEach(h=>{a.push(h)}),{data:a,type:"JOIN_ON_COLUMNS"}},_e=async(l,e,t)=>{let o=e.headerRow.filter((n,i)=>t.every(h=>h.target!==i)),a=[[...l.headerRow,...o]];for(let n=0;n<l.values.length;++n){let i=[...l.values[n],...o.map(()=>"")];a.push(i)}let r=e.values;for(let n=0;n<r.length;++n){let i=l.headerRow.map(()=>""),h=[];for(let u=0;u<e.headerRow.length;++u){let m=t.find(d=>d.target===u);m?i[m.source]=r[n][u]:h.push(r[n][u])}a.push([...i,...h])}return{data:a,type:"APPEND_TO_COLUMNS"}},Ae=async(l,e,t)=>{let o=l.values,s=e.values,a=o.length+s.length,r=0,n={};for(let i=0;i<o.length;i++){let h=o[i],u=null,m=0;for(let d=0;d<s.length;d++){let p=s[d];if(z({rowA:h,rowB:p},t)&&(u=d,m++,m===2))break}m===1&&u!==null&&(r+=1,n[u]=!0)}for(let i=0;i<s.length;i++)n[i]&&(r+=1);return{count:r,total:a}};var R=class{constructor({sheetColumn:e,matchedDataModel:t,detectedNumberFormats:o}){this.getOptionValue=(e,t)=>{if(!t)if(this.matchedDataModel.dataModel){let o=this.sheetColumn.columnKey,a=this.detectedNumberFormats.columns.find(r=>r.column===o)?.numberFormat||this.detectedNumberFormats.global;return M.parse(e,{dataModel:this.matchedDataModel.dataModel,isParseFromSheet:!0,numberFormat:a})}else return e;for(let o=0;o<t.length;o++)if(`${t[o]?.sheetOption}`==`${e}`)return this.matchedDataModel.dataModel&&this.matchedDataModel.dataModel.getIsMultiSelection()?M.parse(t[o]?.dataModelOptions,{dataModel:this.matchedDataModel.dataModel,isParseFromSheet:!0}):this.matchedDataModel.dataModel?M.parse(t[o]?.dataModelOption,{dataModel:this.matchedDataModel.dataModel,isParseFromSheet:!0}):t[o]?.dataModelOption};this.getValues=()=>{let e=this.sheetColumn.rows,t=[];for(let o=0;o<e.length;o++){let s=e[o];t.push(this.getOptionValue(s,this.matchedOptions))}return t};if(this.sheetColumn=e,this.matchedDataModel=t,this.matchedOptions=void 0,this.detectedNumberFormats=o||{global:"eu",columns:[]},this.matchedDataModel.matchedOptions){this.matchedOptions=[];for(let s=0;s<(this.matchedDataModel.matchedOptions?.length??0);s++)this.matchedDataModel.dataModel?.getIsMultiSelection()?this.matchedDataModel.matchedOptions?.[s].dataModelOptions&&this.matchedOptions.push(this.matchedDataModel.matchedOptions?.[s]):this.matchedDataModel.matchedOptions?.[s].dataModelOption&&this.matchedOptions.push(this.matchedDataModel.matchedOptions?.[s])}}},B=R;var O=class{constructor(e){this.matchedColumns=[];this.parseValues=()=>{let e=[];this.matchedColumns.forEach(t=>{let o=t.matchedDataModel,a=new B({sheetColumn:t.sheetColumn,matchedDataModel:o,detectedNumberFormats:this.detectedNumberFormats}).getValues(),r=o.dataModel.getKey();a.forEach((n,i)=>{e[i]?e[i][r]=n:e[i]={[r]:n}})});for(let t=0;t<e.length;++t)for(let o=0;o<this.columns.length;++o){let a=this.columns[o].key;e[t][a]===void 0&&(e[t][a]=null)}return e};this.getValues=()=>(this.matchedColumns=[],this.matching.filter(t=>t.matchedDataModel?.dataModel).forEach(t=>{this.matchedColumns.push({sheetColumn:t.sheetColumn,matchedDataModel:t.matchedDataModel})}),this.parseValues());let{matching:t,detectedNumberFormats:o}=e;this.matching=t,this.detectedNumberFormats=o||{global:"eu",columns:[]},this.columns=e.columns??[]}},j=O;var qe=({matching:l,detectedNumberFormats:e,columns:t})=>new j({matching:l,detectedNumberFormats:e,columns:t}).getValues();import*as E from"comlink";var f=class{static{this.serialize=e=>e.serialize()}static{this.deSerialize=e=>y.isTypeCategory(e.type)?new F({description:e.description,example:e.example,key:e.key,label:e.label,type:e.type,options:e.options,validators:[],alternativeMatches:e.alternativeMatches,columnSize:e.columnSize,isMultiSelection:e.isMultiSelection??!1,allowCustomOptions:e.allowCustomOptions||!1,hidden:e.hidden,disabled:e.disabled,optionMappingConfiguration:e.optionMappingConfiguration}):new y({description:e.description,example:e.example,key:e.key,label:e.label,type:e.type,validators:[],alternativeMatches:e.alternativeMatches,columnSize:e.columnSize,outputFormat:e.outputFormat,numberFormat:e.numberFormat,hidden:e.hidden,disabled:e.disabled,optionMappingConfiguration:e.optionMappingConfiguration})}};var S=class{static{this.serialize=e=>{let t={matching:[],detectedNumberFormats:e.detectedNumberFormats,columns:e.columns};return t.matching=e.matching.map(o=>({sheetColumn:o.sheetColumn,matchedDataModel:o.matchedDataModel?{dataModel:o.matchedDataModel.dataModel?f.serialize(o.matchedDataModel.dataModel):o.matchedDataModel.dataModel,matchedOptions:o.matchedDataModel.matchedOptions}:o.matchedDataModel})),[t,[]]}}static{this.deserialize=e=>({matching:e.matching.map(t=>({sheetColumn:t.sheetColumn,matchedDataModel:t.matchedDataModel?{dataModel:t.matchedDataModel.dataModel?f.deSerialize(t.matchedDataModel.dataModel):t.matchedDataModel.dataModel,matchedOptions:t.matchedDataModel.matchedOptions}:t.matchedDataModel})),detectedNumberFormats:e.detectedNumberFormats,columns:e.columns})}};E.transferHandlers.set("Matching",{canHandle:l=>!!(typeof l=="object"&&l.matching),serialize:l=>S.serialize(l),deserialize:l=>S.deserialize(l)});export{g as a,H as b,L as c,Ne as d,Fe as e,Je as f,Te as g,_e as h,Ae as i,qe as j,f as k};