Files
.Data
.vscode
Archive
.vscode
ApiControllers
Controllers
Models
Repositories
Services
Views
wwwroot
igniteui
css
js
extensions
i18n
modules
encoding
i18n
infragistics.barcode_core.js
infragistics.barcode_qrcodebarcode.js
infragistics.bulletgraph.js
infragistics.categorychart.js
infragistics.datachart_annotation.js
infragistics.datachart_category.js
infragistics.datachart_categorycore.js
infragistics.datachart_core.js
infragistics.datachart_domainChart.js
infragistics.datachart_extendedaxes.js
infragistics.datachart_extendedfinancial.js
infragistics.datachart_financial.js
infragistics.datachart_interactivity.js
infragistics.datachart_polar.js
infragistics.datachart_radial.js
infragistics.datachart_rangecategory.js
infragistics.datachart_scatter.js
infragistics.datachart_shape.js
infragistics.datachart_stacked.js
infragistics.datachart_verticalcategory.js
infragistics.datachart_visualdata.js
infragistics.datasource.js
infragistics.documents.core_core.js
infragistics.documents.core_openxml.js
infragistics.doughnutchart.js
infragistics.dv_core.js
infragistics.dv_dataseriesadapter.js
infragistics.dv_datasource.js
infragistics.dv_description.js
infragistics.dv_geo.js
infragistics.dv_geometry.js
infragistics.dv_interactivity.js
infragistics.dv_jquerydom.js
infragistics.dv_opd.js
infragistics.dv_visualdata.js
infragistics.dvcommonwidget.js
infragistics.excel_core.js
infragistics.excel_functions.js
infragistics.excel_serialization_biff8.js
infragistics.excel_serialization_openxml.js
infragistics.ext_collections.js
infragistics.ext_collectionsextended.js
infragistics.ext_core.js
infragistics.ext_io.js
infragistics.ext_text.js
infragistics.ext_threading.js
infragistics.ext_ui.js
infragistics.ext_web.js
infragistics.ext_xml.js
infragistics.financialchart.js
infragistics.funnelchart.js
infragistics.geographicmap_core.js
infragistics.gridexcelexporter.js
infragistics.legend.js
infragistics.lineargauge.js
infragistics.olap.js
infragistics.olapdatasource.doc.js
infragistics.olapflatdatasource.js
infragistics.olapxmladatasource.js
infragistics.piechart.js
infragistics.radialgauge.js
infragistics.radialmenu.js
infragistics.scheduler.core.js
infragistics.shapechart.js
infragistics.sparkline.js
infragistics.spreadsheet.js
infragistics.templating.js
infragistics.ui.barcode.js
infragistics.ui.basechart.js
infragistics.ui.bulletgraph.js
infragistics.ui.categorychart.js
infragistics.ui.chart.js
infragistics.ui.chart.template.js
infragistics.ui.chartlegend.js
infragistics.ui.colorpicker.js
infragistics.ui.colorpickersplitbutton.js
infragistics.ui.combo.js
infragistics.ui.dialog.js
infragistics.ui.doughnutchart.js
infragistics.ui.editors.js
infragistics.ui.financialchart.js
infragistics.ui.funnelchart.js
infragistics.ui.grid.appendrowsondemand.js
infragistics.ui.grid.cellmerging.js
infragistics.ui.grid.columnfixing.js
infragistics.ui.grid.columnmoving.js
infragistics.ui.grid.featurechooser.js
infragistics.ui.grid.filtering.js
infragistics.ui.grid.framework.js
infragistics.ui.grid.groupby.js
infragistics.ui.grid.hiding.js
infragistics.ui.grid.hierarchical.js
infragistics.ui.grid.multicolumnheaders.js
infragistics.ui.grid.paging.js
infragistics.ui.grid.resizing.js
infragistics.ui.grid.responsive.js
infragistics.ui.grid.rowselectors.js
infragistics.ui.grid.selection.js
infragistics.ui.grid.shared.js
infragistics.ui.grid.sorting.js
infragistics.ui.grid.summaries.js
infragistics.ui.grid.tooltips.js
infragistics.ui.grid.updating.js
infragistics.ui.htmleditor.js
infragistics.ui.layoutmanager.js
infragistics.ui.lineargauge.js
infragistics.ui.map.js
infragistics.ui.map.template.js
infragistics.ui.notifier.js
infragistics.ui.pivot.shared.js
infragistics.ui.pivotdataselector.js
infragistics.ui.pivotgrid.js
infragistics.ui.pivotview.js
infragistics.ui.popover.js
infragistics.ui.qrcodebarcode.js
infragistics.ui.radialgauge.js
infragistics.ui.radialmenu.js
infragistics.ui.rating.js
infragistics.ui.scheduler.core.js
infragistics.ui.scheduler.js
infragistics.ui.scroll.js
infragistics.ui.shapechart.js
infragistics.ui.shared.js
infragistics.ui.sparkline.js
infragistics.ui.splitbutton.js
infragistics.ui.splitter.js
infragistics.ui.spreadsheet.js
infragistics.ui.tilemanager.js
infragistics.ui.toolbar.js
infragistics.ui.toolbarbutton.js
infragistics.ui.tree.js
infragistics.ui.treegrid.columnfixing.js
infragistics.ui.treegrid.columnmoving.js
infragistics.ui.treegrid.filtering.js
infragistics.ui.treegrid.hiding.js
infragistics.ui.treegrid.js
infragistics.ui.treegrid.multicolumnheaders.js
infragistics.ui.treegrid.paging.js
infragistics.ui.treegrid.resizing.js
infragistics.ui.treegrid.rowselectors.js
infragistics.ui.treegrid.selection.js
infragistics.ui.treegrid.sorting.js
infragistics.ui.treegrid.tooltips.js
infragistics.ui.treegrid.updating.js
infragistics.ui.upload.js
infragistics.ui.validator.js
infragistics.ui.videoplayer.js
infragistics.ui.widget.js
infragistics.ui.zoombar.js
infragistics.ui.zoomslider.js
infragistics.undo.js
infragistics.util.jquery.js
infragistics.util.js
infragistics.xml.js
infragistics.zoomslider_core.js
infragistics.core.js
infragistics.dv.js
infragistics.excel-bundled.js
infragistics.loader.js
infragistics.lob.js
infragistics.scheduler-bundled.js
infragistics.spreadsheet-bundled.js
images
js
styles
.editorconfig
ApiLoggingMiddleware.cs
OI.Metrology.Archive.csproj
Program.cs
appsettings.Development.json
appsettings.json
compilerconfig.json
compilerconfig.json.defaults
Server
Shared
Static
Tests
View
Wafer-Counter
.editorconfig
.gitignore
OI-Metrology.sln
README.md
azure-pipelines-server-development.yml
azure-pipelines-server.yml
package.json
oi-metrology/Archive/wwwroot/igniteui/js/modules/infragistics.templating.js
2022-07-26 09:34:09 -07:00

22 lines
10 KiB
JavaScript

/*!@license
* Infragistics.Web.ClientUI Templating Engine 19.1.20
*
* Copyright (c) 2011-2019 Infragistics Inc.
*
* Engine used for data templating
*
* http://www.infragistics.com/
*
* Depends on:
* jquery-1.9.1.js
* infragistics.util.jquery.js
*/
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","./infragistics.util","./infragistics.util.jquery"],factory)}else{factory(jQuery)}})(function($){/*!@license
* Infragistics.Web.ClientUI templating localization resources 19.1.20
*
* Copyright (c) 2011-2019 Infragistics Inc.
*
* http://www.infragistics.com/
*
*/
(function($){$.ig=$.ig||{};$.ig.locale=$.ig.locale||{};$.ig.locale.en=$.ig.locale.en||{};$.ig.Templating=$.ig.Templating||{};$.ig.locale.en.Templating={undefinedArgument:"An error has occurred while trying to retrieve data source property: "};$.ig.Templating.locale=$.ig.Templating.locale||$.ig.locale.en.Templating;return $.ig.locale.en.Templating})($);$.ig=$.ig||{};$.extend($.ig,{tmpl:function(template,data,args){var tmpl=template,cacheConst;if(tmpl){tmpl=tmpl.replace(this.regExp.lineBreak,"");tmpl=tmpl.replace(this.regExp.comment,"");if(typeof data==="function"){if(args){data=data.apply(this,args)}else{data=data.call()}}if(this._internalTmplCache&&this._internalTmplCache.hasOwnProperty(tmpl)){this.tokens=this._internalTmplCache[tmpl].tokens;this.args=this._internalTmplCache[tmpl].args;this.i=this._internalTmplCache[tmpl].i;this._hasBlock=this._internalTmplCache[tmpl]._hasBlock;tmpl=this._internalTmplCache[tmpl].tmpl}else{this.tokens=[];this.args=[];this.i=0;this._tokenizeTemplate(tmpl);cacheConst=tmpl;this._internalTmplCache[cacheConst]={};this._internalTmplCache[cacheConst].tokens=this.tokens;if(this.regExp.block.test(tmpl)){this._hasBlock=true;tmpl=this._tokenizeDirectives(tmpl)}else{this._hasBlock=false}this._internalTmplCache[cacheConst].args=this.args;this._internalTmplCache[cacheConst].i=this.i;this._internalTmplCache[cacheConst]._hasBlock=this._hasBlock;this._internalTmplCache[cacheConst].tmpl=tmpl}if(!this.tokens.length){return tmpl}if(this._hasBlock){tmpl=this._compileTemplate(tmpl,data)}else{tmpl=this._populateTemplate(tmpl,data)}delete this.args;delete this.tokens;delete this._hasBlock;delete this.i}return tmpl},clearTmplCache:function(){delete this._internalTmplCache;this._internalTmplCache={}},regExp:{comment:/\s#[^#]*#/g,sub:/\$\{(([\w\$\-]+(\.|\s)?[\w\$\-]*)+)\}/,nonEncodeSub:/\{\{html\s+([\w\$\-]+(\.|\s)?[\w\$\-]*)+\}\}/,forSub:/\$\{(([\w\$]+\.[\w\$]*)+)\}/,arg:/args\[\d+\](?!.*\+)/,block:/\{\{(\w+).*?\}\}+(.*)(\{\{\/\1\}\})/,blockCont:/\{\{(?!\/)(\S+)(.*)\}\}(.*)/,blockDirective:/\{\{\S+.*?\}\}/,index:/\$i/g,lineBreak:/(\r\n|\n|\r)/gm,lt:/</g,gt:/>/g,ap:/'/g,ic:/"/g,amp:/&/g},_directives:{"if":{start:"if (",close:") {",end:" }"},elseif:{start:" } else if (",close:") {",end:""},"else":{start:" } else {",close:"",end:""},each:{start:"for (var i = 0; i < $data.length; i++) {",close:"",end:" }"}},_internalTmplCache:{},_tokenizeTemplate:function(template){var tempToken,splitName;if(this.regExp.sub.test(template)){tempToken=this.regExp.sub.exec(template);while(tempToken!==null){splitName=tempToken[1].split(".");template=template.replace(new RegExp("\\$\\{"+tempToken[1].replace(/\$/g,"\\$")+"\\}","g"),"");tempToken[3]=new RegExp("\\$\\{"+tempToken[1].replace(/\$/g,"\\$")+"\\}","g");tempToken[1]=splitName;tempToken[2]=true;this.tokens.push(tempToken);tempToken=this.regExp.sub.exec(template)}}if(this.regExp.nonEncodeSub.test(template)){tempToken=this.regExp.nonEncodeSub.exec(template);while(tempToken!==null){splitName=tempToken[1].split(".");template=template.replace(new RegExp("\\{\\{html\\s+"+tempToken[1].replace(/\$/g,"\\$")+"\\}\\}","g"),"");tempToken[3]=new RegExp("\\{\\{html\\s+"+tempToken[1].replace(/\$/g,"\\$")+"\\}\\}","g");tempToken[1]=splitName;tempToken[2]=false;this.tokens.push(tempToken);tempToken=this.regExp.nonEncodeSub.exec(template)}}},_tokenizeDirectives:function(template){var tmpl='var result = "";',tokens=this.regExp.block.exec(template),temp;if(template.indexOf(tokens[0])>0||template.length!==tokens[0].length){temp=template.split(tokens[0]);if(temp[0]&&temp[0].length>0){this.args.push(temp[0]);tmpl+="result += args["+this.i++ +"];"}}tmpl+=this._handleCompleteBlock(tokens);if(temp&&temp.length>0&&temp[1].length>0){this.args.push(temp[1]);tmpl+="result += args["+this.i++ +"];"}tmpl+="return result;";return tmpl},_handleCompleteBlock:function(tokens){var tmpl=tokens[0],template="",blocks=[],i,temp;tmpl=tmpl.replace("{{"+tokens[1],this._directives[tokens[1]].start);if(tokens[1]==="each"){blocks.push(tokens[0].split(tokens[3]));blocks.push(tokens[2].split(tokens[3]));for(i=0;i<blocks[1].length;i++){if(blocks[0][i].indexOf("{{each")>0){temp=blocks[0][i].split("{{each")[0];this.args.push(temp);template+="result += args["+this.i++ +"];";blocks[0][i]=blocks[0][i].substr(blocks[0][i].indexOf("{{each"));temp=this.regExp.blockDirective.exec(blocks[1][i]);blocks[1][i]=blocks[1][i].substr(blocks[1][i].indexOf(temp[0])+temp[0].length)}blocks[0][i]=blocks[0][i].replace("{{"+tokens[1],this._directives[tokens[1]].start);template+=this._handleEach(blocks[0][i]+"{{/each}}",[blocks[0][i]+"{{/each}}","each",blocks[1][i],"{{/each}}"])}}else if(tokens[1]==="if"){template+=this._handleIfElse(tmpl,tokens)}return template},_handleEach:function(template,tokens){var tmpl=template,eachVar,body,forSub,sub,expr;eachVar=this.regExp.sub.exec(tmpl);tmpl=tmpl.replace(eachVar[0],"");tmpl=tmpl.replace("$data",eachVar[0]);body=tokens[2];if(/\$data/.test(body)){body=body.replace(/\$data/g,'" + '+eachVar[0]+'[ i ] + "');this.args.push(eachVar[0]);this.i++}forSub=this.regExp.forSub.exec(body);while(forSub){body=body.replace(new RegExp("\\$\\{"+forSub[1]+"\\}","g"),'" + '+eachVar[0]+"[ i ]"+forSub[1].substr(forSub[1].indexOf("."))+' + "');forSub=this.regExp.forSub.exec(body)}body=body.replace(/\$index/g,'" + i + "');tmpl=tmpl.replace(tokens[2],'result += "'+body+'"');tmpl=tmpl.replace(/\}\}/,this._directives[tokens[1]].close);tmpl=tmpl.replace(tokens[3],this._directives[tokens[1]].end);sub=this.regExp.sub.exec(tmpl);while(sub){expr=new RegExp("\\$\\{"+sub[1]+"\\}","g");tmpl=tmpl.replace(expr,"args["+this.i++ +"]");this.args.push(sub[0]);sub=this.regExp.sub.exec(tmpl)}return tmpl},_handleIfElse:function(template,tokens){var tmpl=template,i=0,htmlStrings,sub,inner,index,tmplArr=[];tmpl=tmpl.replace(/\}\}/,this._directives[tokens[1]].close);index=tmpl.lastIndexOf(tokens[3]);tmpl=tmpl.substr(0,index)+tmpl.slice(index+tokens[3].length-1);if(this.regExp.block.test(tmpl)){inner=this.regExp.block.exec(tmpl);tmpl=tmpl.replace(inner[0],this._handleCompleteBlock(inner))}htmlStrings=tokens[2].split(this.regExp.blockDirective);tmplArr.push(tmpl.slice(0,tmpl.indexOf(") {")+3));tmplArr.push(tmpl.slice(tmpl.indexOf(") {")+3));for(i;i<htmlStrings.length;i++){if(htmlStrings[i]&&htmlStrings[i].length&&htmlStrings[i].length>0){tmplArr[1]=tmplArr[1].replace(htmlStrings[i],"result += args["+this.i++ +"];");this.args.push(htmlStrings[i])}}tmpl=tmplArr.join("");tokens=this.regExp.blockCont.exec(tmpl);while(tokens){tmpl=tmpl.replace("{{"+tokens[1],this._directives[tokens[1]].start);tmpl=tmpl.replace(/\}\}/,this._directives[tokens[1]].close);tokens=this.regExp.blockCont.exec(tmpl)}sub=this.regExp.sub.exec(tmpl);while(sub){tmpl=tmpl.replace(new RegExp("\\$\\{"+sub[1]+"\\}","g"),"args["+this.i++ +"]");this.args.push(sub[0]);sub=this.regExp.sub.exec(tmpl)}return tmpl},_populateTemplate:function(template,data){var i,j,result="",temp;if($.type(data)!=="array"){for(i=0;i<this.tokens.length;i++){template=this._populateArgumentValue(data,this.tokens[i],template)}result=template}else{for(j=0;j<data.length;j++){temp=template;for(i=0;i<this.tokens.length;i++){temp=this._populateArgumentValue(data[j],this.tokens[i],temp)}temp=temp.replace(this.regExp.index,j);result+=temp}}return result},_getUndefinedArgLocale:function(){return $.ig.util?$.ig.util.getLocaleValue("Templating","undefinedArgument"):$.ig.Templating.locale.undefinedArgument},_compileTemplate:function(template,data){var i,j,k,result="",temp,tempArgs=[],arg="",f;if($.type(data)!=="array"){for(j=0;j<this.args.length;j++){arg=this.args[j];for(i=0;i<this.tokens.length;i++){if(arg===this.tokens[i][0]){arg=this._getArgumentValue(data,this.tokens[i],arg);break}else if(typeof arg==="string"){arg=this._populateArgumentValue(data,this.tokens[i],arg)}}if(arg===undefined){throw new Error(this._getUndefinedArgLocale()+this.tokens[i][0])}if(typeof arg==="string"){arg=arg.replace(this.regExp.index,0)}tempArgs.push(arg)}template=template.replace(/\$i/g,0);result=new Function("args",template).call(this,tempArgs)||""}else{temp=template.replace(this.regExp.index,"args["+this.args.length+"]");f=new Function("args",temp);for(j=0;j<data.length;j++){tempArgs=[];for(k=0;k<this.args.length;k++){arg=this.args[k];for(i=0;i<this.tokens.length;i++){if(arg===this.tokens[i][0]){arg=this._getArgumentValue(data[j],this.tokens[i],arg);break}else if(typeof arg==="string"){arg=this._populateArgumentValue(data[j],this.tokens[i],arg)}}if(arg===undefined){throw new Error(this._getUndefinedArgLocale()+this.tokens[i][0])}if(typeof arg==="string"){arg=arg.replace(this.regExp.index,j)}tempArgs.push(arg)}tempArgs.push(j);result+=f.call(this,tempArgs)||""}}return result},_getArgumentValue:function(data,token,arg){var tempData,l;if(token[1].length&&token[1].length>1){tempData=data;for(l=0;l<token[1].length;l++){if(tempData&&tempData.hasOwnProperty(token[1][l])){tempData=tempData[token[1][l]]}else{tempData="";break}}if(token[2]&&typeof tempData==="string"){arg=this.encode(tempData)}else{arg=tempData}}else{if(token[2]&&typeof data[token[1]]==="string"){arg=this.encode(data[token[1]])}else{arg=data[token[1]]}}return arg},_populateArgumentValue:function(data,token,arg){var tempData,l,self=this;if(token[1].length&&token[1].length>1){tempData=data;for(l=0;l<token[1].length;l++){if(tempData&&tempData.hasOwnProperty(token[1][l])){tempData=typeof tempData[token[1][l]]==="function"?tempData[token[1][l]]():tempData[token[1][l]]}else{tempData="";break}}if(token[2]&&typeof tempData==="string"){arg=arg.replace(token[3],function(){return self.encode(tempData)})}else{arg=arg.replace(token[3],function(){return tempData===null?"":tempData})}}else{if(token[2]){arg=arg.replace(token[3],function(){return self.encode(typeof data[token[1]]==="function"?data[token[1]]():data[token[1]])})}else{arg=arg.replace(token[3],function(){return data[token[1]]===null?"":typeof data[token[1]]==="function"?data[token[1]]():data[token[1]]})}}return arg}})});