pict 1.0.181 → 1.0.183

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.
@@ -1020,7 +1020,7 @@ tmpEnclosureStack.pop();}}return tmpSegmentCount;}/**
1020
1020
  * @param {object} pEnclosureStartSymbolMap
1021
1021
  * @param {object} pEnclosureEndSymbolMap
1022
1022
  * @returns the first segment in the string as a string
1023
- */},{key:"stringGetSegments",value:function stringGetSegments(pString,pSeparator,pEnclosureStartSymbolMap,pEnclosureEndSymbolMap){var tmpString=typeof pString=='string'?pString:'';var tmpSeparator=typeof pSeparator=='string'?pSeparator:'.';var tmpEnclosureStartSymbolMap=_typeof(pEnclosureStartSymbolMap)=='object'?pEnclosureStart:{'{':0,'[':1,'(':2};var tmpEnclosureEndSymbolMap=_typeof(pEnclosureEndSymbolMap)=='object'?pEnclosureEnd:{'}':0,']':1,')':2};var tmpCurrentSegmentStart=0;var tmpSegmentList=[];if(pString.length<1){return tmpSegmentList;}var tmpEnclosureStack=[];for(var i=0;i<tmpString.length;i++){// IF This is the start of a segment
1023
+ */},{key:"stringGetSegments",value:function stringGetSegments(pString,pSeparator,pEnclosureStartSymbolMap,pEnclosureEndSymbolMap){var tmpString=typeof pString=='string'?pString:'';var tmpSeparator=typeof pSeparator=='string'?pSeparator:'.';var tmpEnclosureStartSymbolMap=_typeof(pEnclosureStartSymbolMap)=='object'?pEnclosureStart:{'{':0,'[':1,'(':2,'"':3,"'":4};var tmpEnclosureEndSymbolMap=_typeof(pEnclosureEndSymbolMap)=='object'?pEnclosureEnd:{'}':0,']':1,')':2,'"':3,"'":4};var tmpCurrentSegmentStart=0;var tmpSegmentList=[];if(pString.length<1){return tmpSegmentList;}var tmpEnclosureStack=[];for(var i=0;i<tmpString.length;i++){// IF This is the start of a segment
1024
1024
  if(tmpString[i]==tmpSeparator// AND we are not in a nested portion of the string
1025
1025
  &&tmpEnclosureStack.length==0){// Return the segment
1026
1026
  tmpSegmentList.push(tmpString.substring(tmpCurrentSegmentStart,i));tmpCurrentSegmentStart=i+1;}// IF This is the start of an enclosure
@@ -2037,8 +2037,7 @@ return false;}// Now see if the function has arguments.
2037
2037
  // Implementation notes: * ARGUMENTS MUST SHARE THE SAME ROOT OBJECT CONTEXT *
2038
2038
  var tmpFunctionArguments=_MockFable.DataFormat.stringGetSegments(_MockFable.DataFormat.stringGetEnclosureValueByIndex(pAddress.substring(tmpFunctionAddress.length),0),',');if(tmpFunctionArguments.length==0||tmpFunctionArguments[0]==''){// No arguments... just call the function (bound to the scope of the object it is contained withing)
2039
2039
  return pObject[tmpFunctionAddress].apply(pObject);}else{var tmpArgumentValues=[];var _tmpRootObject2=typeof pRootObject=='undefined'?pObject:pRootObject;// Now get the value for each argument
2040
- for(var _i19=0;_i19<tmpFunctionArguments.length;_i19++){// Resolve the values for each subsequent entry
2041
- tmpArgumentValues.push(this.getValueAtAddress(_tmpRootObject2,tmpFunctionArguments[_i19]));}return pObject[tmpFunctionAddress].apply(pObject,tmpArgumentValues);}}// Boxed elements look like this:
2040
+ for(var _i19=0;_i19<tmpFunctionArguments.length;_i19++){if(tmpFunctionArguments[_i19][0]=="'"&&tmpFunctionArguments[_i19][tmpFunctionArguments[_i19].length-1]=="'"){tmpArgumentValues.push(tmpFunctionArguments[_i19].substring(1,tmpFunctionArguments[_i19].length-1));}else if(tmpFunctionArguments[_i19][0]=='"'&&tmpFunctionArguments[_i19][tmpFunctionArguments[_i19].length-1]=='"'){tmpArgumentValues.push(tmpFunctionArguments[_i19].substring(1,tmpFunctionArguments[_i19].length-1));}else if(tmpFunctionArguments[_i19][0]=="`"&&tmpFunctionArguments[_i19][tmpFunctionArguments[_i19].length-1]=="`"){tmpArgumentValues.push(tmpFunctionArguments[_i19].substring(1,tmpFunctionArguments[_i19].length-1));}else{tmpArgumentValues.push(this.getValueAtAddress(_tmpRootObject2,tmpFunctionArguments[_i19]));}}return pObject[tmpFunctionAddress].apply(pObject,tmpArgumentValues);}}// Boxed elements look like this:
2042
2041
  // MyValues[10]
2043
2042
  // MyValues['Name']
2044
2043
  // MyValues["Age"]
@@ -3995,7 +3994,7 @@ _this65.customRemoveAttributeFunction=false;// API Consumers can also craft thei
3995
3994
  _this65.customReadClassFunction=false;// API Consumers can also craft their own class set function
3996
3995
  _this65.customSetClassFunction=false;// API Consumers can also craft their own class remove function
3997
3996
  _this65.customRemoveClassFunction=false;return _this65;}_inherits(PictContentAssignment,_libFableServiceBase18);return _createClass2(PictContentAssignment,[{key:"getElement",value:function getElement(pAddress){if(this.customGetElementFunction){return this.customGetElementFunction(pAddress);}else if(this.hasJquery){var tmpElements=window.jQuery(pAddress);if(tmpElements.length==0){return[];}else{// TODO: This isn't the most efficient method, but it is the most compatible.
3998
- var tmpElementSet=[];for(var i=0;i<tmpElements.length;i++){tmpElementSet.push(tmpElements[0]);}return tmpElementSet;}}else if(this.inBrowser&&this.hasDocument){return window.document.querySelectorAll(pAddress);}else{// Just log it out for now
3997
+ var tmpElementSet=[];for(var i=0;i<tmpElements.length;i++){tmpElementSet.push(tmpElements[i]);}return tmpElementSet;}}else if(this.inBrowser&&this.hasDocument){return window.document.querySelectorAll(pAddress);}else{// Just log it out for now
3999
3998
  this.log.trace("PICT Content GET ELEMENT for [".concat(pAddress,"] will return empty because none of the browser methods are available"));return[];}}},{key:"assignContent",value:function assignContent(pAddress,pContent){if(this.customAssignFunction){return this.customAssignFunction(pAddress,pContent);}else if(this.hasJquery){// Get the element(s)
4000
3999
  var tmpTargetElementSet=window.jQuery(pAddress);for(var i=0;i<tmpTargetElementSet.length;i++){switch(tmpTargetElementSet[i].tagName){case'INPUT':case'SELECT':case'TEXTAREA':tmpTargetElementSet[i].value=pContent;break;case'SCRIPT':tmpTargetElementSet[i].text=pContent;break;default:tmpTargetElementSet[i].innerHTML=pContent;}}}else if(this.inBrowser&&this.hasDocument){// Get the element(s)
4001
4000
  var _tmpTargetElementSet=window.document.querySelectorAll(pAddress);for(var _i46=0;_i46<_tmpTargetElementSet.length;_i46++){switch(_tmpTargetElementSet[_i46].tagName){case'INPUT':case'SELECT':case'TEXTAREA':_tmpTargetElementSet[_i46].value=pContent;break;case'SCRIPT':_tmpTargetElementSet[_i46].text=pContent;break;default:_tmpTargetElementSet[_i46].innerHTML=pContent;}}}else{// Just log it out for now