pict 1.0.129 → 1.0.130
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/debug/examples/informary/index.html +1 -1
- package/dist/pict.compatible.js +6 -6
- package/dist/pict.compatible.min.js +2 -2
- package/dist/pict.compatible.min.js.map +1 -1
- package/dist/pict.js +1 -1
- package/dist/pict.min.js +2 -2
- package/dist/pict.min.js.map +1 -1
- package/package.json +1 -1
- package/source/Pict-Content-Assignment.js +12 -1
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<script src="./jquery-3.7.0.js"></script>
|
|
12
12
|
<script src="bootstrap/js/bootstrap.min.js"></script>
|
|
13
13
|
<script src="../../../dist/pict.js"></script>
|
|
14
|
-
<script type="text/javascript">
|
|
14
|
+
<script id="DogfoodMyselfAsAScriptElement" type="text/javascript">
|
|
15
15
|
//<![CDATA[
|
|
16
16
|
function onDocumentReady(fCallback)
|
|
17
17
|
{
|
package/dist/pict.compatible.js
CHANGED
|
@@ -3433,13 +3433,13 @@ var tmpTargetElement=window.jQuery(pAddress);// Should we ensure we matched 1 an
|
|
|
3433
3433
|
//{
|
|
3434
3434
|
// Set the content
|
|
3435
3435
|
tmpTargetElement.html(pContent);//}
|
|
3436
|
-
}else if(this.inBrowser&&this.hasDocument){var
|
|
3437
|
-
this.log.trace("PICT Content ASSIGN to [".concat(pAddress,"]:"),pContent);}}},{key:"appendContent",value:function appendContent(pAddress,pContent){if(this.customAppendFunction){return this.customAppendFunction(pAddress,pContent);}else if(this.hasJquery){var tmpTargetElement=window.jQuery(pAddress);tmpTargetElement.append(pContent);}else if(this.inBrowser&&this.hasDocument){var
|
|
3438
|
-
this.log.trace("PICT Content APPEND to [".concat(pAddress,"]:"),pContent);}}},{key:"prependContent",value:function prependContent(pAddress,pContent){if(this.customAppendFunction){return this.customPrependFunction(pAddress,pContent);}else if(this.hasJquery){var tmpTargetElement=window.jQuery(pAddress);tmpTargetElement.prepend(pContent);}else if(this.inBrowser&&this.hasDocument){var
|
|
3439
|
-
this.log.trace("PICT Content PREPEND in [".concat(pAddress,"]:"),pContent);}}},{key:"readContent",value:function readContent(pAddress){if(this.customReadFunction){return this.customReadFunction(pAddress);}else if(this.hasJquery){var tmpTargetElement=window.jQuery(pAddress);return tmpTargetElement.html();}else if(this.inBrowser&&this.hasDocument){var
|
|
3436
|
+
}else if(this.inBrowser&&this.hasDocument){var _tmpTargetElementSet=window.document.querySelectorAll(pAddress);for(var i=0;i<_tmpTargetElementSet.length;i++){switch(_tmpTargetElementSet[i].tagName){case'INPUT':case'BUTTON':case'TEXTAREA':_tmpTargetElementSet[i].value=pContent;break;case'SCRIPT':case'A':_tmpTargetElementSet[i].text=pContent;break;default:_tmpTargetElementSet[i].innerHTML=pContent;break;}}}else{// Just log it out for now
|
|
3437
|
+
this.log.trace("PICT Content ASSIGN to [".concat(pAddress,"]:"),pContent);}}},{key:"appendContent",value:function appendContent(pAddress,pContent){if(this.customAppendFunction){return this.customAppendFunction(pAddress,pContent);}else if(this.hasJquery){var tmpTargetElement=window.jQuery(pAddress);tmpTargetElement.append(pContent);}else if(this.inBrowser&&this.hasDocument){var _tmpTargetElementSet2=window.document.querySelectorAll(pAddress);for(var i=0;i<_tmpTargetElementSet2.length;i++){_tmpTargetElementSet2[i].insertAdjacentHTML("beforeend",pContent);}}else{// Just log it out for now -- nothing browser in our mix.
|
|
3438
|
+
this.log.trace("PICT Content APPEND to [".concat(pAddress,"]:"),pContent);}}},{key:"prependContent",value:function prependContent(pAddress,pContent){if(this.customAppendFunction){return this.customPrependFunction(pAddress,pContent);}else if(this.hasJquery){var tmpTargetElement=window.jQuery(pAddress);tmpTargetElement.prepend(pContent);}else if(this.inBrowser&&this.hasDocument){var _tmpTargetElementSet3=window.document.querySelectorAll(pAddress);for(var i=0;i<_tmpTargetElementSet3.length;i++){_tmpTargetElementSet3[i].insertAdjacentHTML("afterbegin",pContent);}}else{// Just log it out for now -- nothing browser in our mix.
|
|
3439
|
+
this.log.trace("PICT Content PREPEND in [".concat(pAddress,"]:"),pContent);}}},{key:"readContent",value:function readContent(pAddress){if(this.customReadFunction){return this.customReadFunction(pAddress);}else if(this.hasJquery){var tmpTargetElement=window.jQuery(pAddress);if(tmpTargetElement.prop('tagName')=='INPUT'||tmpTargetElement.prop('tagName')=='TEXTAREA'){return tmpTargetElementSet[0].val();}else if(tmpTargetElement.prop('tagName')=='SCRIPT'){return tmpTargetElementSet[0].html();}else{return tmpTargetElementSet[0].html();}}else if(this.inBrowser&&this.hasDocument){var _tmpTargetElementSet4=window.document.querySelectorAll(pAddress);if(_tmpTargetElementSet4.length<1){return null;}else if(_tmpTargetElementSet4.length==1){if(_tmpTargetElementSet4[0].tagName=='INPUT'||_tmpTargetElementSet4[0].tagName=='TEXTAREA'){return _tmpTargetElementSet4[0].value;}else if(_tmpTargetElementSet4[0].tagName=='SCRIPT'){return _tmpTargetElementSet4[0].text;}else{return _tmpTargetElementSet4[0].innerHTML;}}}else{// Just log it out for now -- nothing browser in our mix.
|
|
3440
3440
|
this.log.trace("PICT Content READ from [".concat(pAddress,"]..."));return'';}}},{key:"addClass",value:function addClass(pAddress,pClass){if(this.customAddClassFunction){return this.customAddClassFunction(pAddress,pClass);}else if(this.hasJquery){// Get the element
|
|
3441
|
-
var tmpTargetElement=window.jQuery(pAddress);tmpTargetElement.addClass(pClass);}else if(this.inBrowser&&this.hasDocument){var
|
|
3442
|
-
var tmpTargetElement=window.jQuery(pAddress);tmpTargetElement.removeClass(pClass);}else if(this.inBrowser&&this.hasDocument){var
|
|
3441
|
+
var tmpTargetElement=window.jQuery(pAddress);tmpTargetElement.addClass(pClass);}else if(this.inBrowser&&this.hasDocument){var _tmpTargetElementSet5=window.document.querySelectorAll(pAddress);for(var i=0;i<_tmpTargetElementSet5.length;i++){_tmpTargetElementSet5[i].classList.add(pClass);}}else{this.log.trace("PICT Content ADDCLASS to [".concat(pAddress,"]:"),pClass);}}},{key:"removeClass",value:function removeClass(pAddress,pClass){if(this.customRemoveClassFunction){return this.customRemoveClassFunction(pAddress,pClass);}else if(this.hasJquery){// Get the element
|
|
3442
|
+
var tmpTargetElement=window.jQuery(pAddress);tmpTargetElement.removeClass(pClass);}else if(this.inBrowser&&this.hasDocument){var _tmpTargetElementSet6=window.document.querySelectorAll(pAddress);for(var i=0;i<_tmpTargetElementSet6.length;i++){_tmpTargetElementSet6[i].classList.remove(pClass);}}else{this.log.trace("PICT Content REMOVECLASS from [".concat(pAddress,"]:"),pClass);}}},{key:"toggleClass",value:function toggleClass(pAddress,pClass){// STUB
|
|
3443
3443
|
}},{key:"hasClass",value:function hasClass(pAddress,pClass){// STUB
|
|
3444
3444
|
}}]);return PictContentAssignment;}(libFableServiceBase);module.exports=PictContentAssignment;},{"fable":49}],136:[function(require,module,exports){var libFableServiceBase=require('fable').ServiceProviderBase;var PictDataProvider=/*#__PURE__*/function(_libFableServiceBase14){_inherits(PictDataProvider,_libFableServiceBase14);var _super26=_createSuper(PictDataProvider);function PictDataProvider(pFable,pOptions,pServiceHash){var _this52;_classCallCheck2(this,PictDataProvider);_this52=_super26.call(this,pFable,pOptions,pServiceHash);_this52.serviceType='PictDataProvider';return _this52;}_createClass2(PictDataProvider,[{key:"getDataByAddress",value:function getDataByAddress(pAddress,pData){var tmpData=typeof pData==='undefined'?{}:pData;return this.fable.manifest.getValueByHash({AppData:this.AppData,Bundle:this.Bundle,Record:tmpData},pAddress);}}]);return PictDataProvider;}(libFableServiceBase);module.exports=PictDataProvider;},{"fable":49}],137:[function(require,module,exports){var libFableServiceBase=require('fable').ServiceProviderBase;var PictMeadowEntityProvider=/*#__PURE__*/function(_libFableServiceBase15){_inherits(PictMeadowEntityProvider,_libFableServiceBase15);var _super27=_createSuper(PictMeadowEntityProvider);function PictMeadowEntityProvider(pFable,pOptions,pServiceHash){var _this53;_classCallCheck2(this,PictMeadowEntityProvider);_this53=_super27.call(this,pFable,pOptions,pServiceHash);_this53.serviceType='PictMeadowProvider';if(_this53.fable.settings.PictDefaultURLPrefix){_this53.options.urlPrefix=_this53.fable.settings.PictDefaultURLPrefix;}else if(!_this53.options.urlPrefix){_this53.options.urlPrefix='/1.0/';}if(_this53.fable.settings.PictDefaultDownloadBatchSize){_this53.options.downloadBatchSize=_this53.fable.settings.PictDefaultDownloadBatchSize;}else if(!_this53.options.downloadBatchSize){_this53.options.downloadBatchSize=100;}_this53.restClient=_this53.fable.instantiateServiceProviderWithoutRegistration('RestClient');_this53.cache={};_this53.prepareRequestOptions=function(pOptions){return pOptions;};return _this53;}_createClass2(PictMeadowEntityProvider,[{key:"initializeCache",value:function initializeCache(pEntity){// This should not be happening as often as it's happening.
|
|
3445
3445
|
if(!this.cache.hasOwnProperty(pEntity)){this.cache[pEntity]=this.fable.instantiateServiceProviderWithoutRegistration('ObjectCache');// TODO: Make this a configuration?
|