cronapp-framework-js 2.8.24 → 2.8.28

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.
Files changed (182) hide show
  1. package/components/crn-button.components.json +2 -12
  2. package/components/crn-chart.components.json +1 -0
  3. package/components/crn-dynamic-menu.components.json +1 -0
  4. package/components/crn-enterprise-checkbox.components.json +0 -5
  5. package/components/crn-enterprise-combobox-multiple.components.json +0 -5
  6. package/components/crn-enterprise-dynamic-combobox.components.json +1 -1
  7. package/components/crn-horizontal-container.components.json +1 -12
  8. package/components/crn-icon.components.json +12 -20
  9. package/components/crn-image.components.json +4 -4
  10. package/components/crn-ordered-sub-list.components.json +1 -2
  11. package/components/crn-rating.components.json +29 -31
  12. package/components/crn-textinputbutton.components.json +8 -0
  13. package/components/crn-upload-file.components.json +3 -2
  14. package/components/crn-upload.components.json +2 -2
  15. package/components/css/checkbox-color.css +0 -16
  16. package/components/css/color-default.css +0 -2
  17. package/components/templates/button.template.html +2 -2
  18. package/components/templates/cron-autocomplete.designtime.html +33 -1
  19. package/components/templates/cron-checkbox.template.html +2 -1
  20. package/components/templates/cron-combobox-multiple.template.html +1 -1
  21. package/components/templates/cron-crud.template.html +7 -43
  22. package/components/templates/cron-dynamic-combobox.template.html +1 -1
  23. package/components/templates/fileupload-button.template.html +1 -1
  24. package/components/templates/fileupload.template.html +1 -1
  25. package/components/templates/form.template.html +21 -44
  26. package/components/templates/icon.template.html +1 -1
  27. package/components/templates/image.default.template.html +2 -1
  28. package/components/templates/navbar.template.html +5 -5
  29. package/components/templates/rating.template.html +6 -6
  30. package/components/templates/social-button-bar.template.html +12 -11
  31. package/components/templates/sub-form.template.html +11 -44
  32. package/components/templates/textinputbutton.template.html +9 -6
  33. package/css/app.css +8 -20
  34. package/dist/components/css/checkbox-color.css +1 -1
  35. package/dist/components/css/color-default.css +1 -1
  36. package/dist/components/templates/button.template.html +1 -1
  37. package/dist/components/templates/cron-autocomplete.designtime.html +26 -1
  38. package/dist/components/templates/cron-checkbox.template.html +1 -1
  39. package/dist/components/templates/cron-combobox-multiple.template.html +1 -1
  40. package/dist/components/templates/cron-crud.template.html +1 -1
  41. package/dist/components/templates/cron-dynamic-combobox.template.html +1 -1
  42. package/dist/components/templates/fileupload-button.template.html +1 -1
  43. package/dist/components/templates/fileupload.template.html +1 -1
  44. package/dist/components/templates/form.template.html +1 -1
  45. package/dist/components/templates/icon.template.html +1 -1
  46. package/dist/components/templates/image.default.template.html +1 -1
  47. package/dist/components/templates/navbar.template.html +1 -1
  48. package/dist/components/templates/rating.template.html +1 -1
  49. package/dist/components/templates/social-button-bar.template.html +1 -1
  50. package/dist/components/templates/sub-form.template.html +1 -1
  51. package/dist/components/templates/textinputbutton.template.html +1 -1
  52. package/dist/css/animate.css +1 -0
  53. package/dist/css/app.css +1 -1
  54. package/dist/css/fonts/glyphicons-halflings-regular.eot +0 -0
  55. package/dist/css/fonts/glyphicons-halflings-regular.svg +1 -0
  56. package/dist/css/fonts/glyphicons-halflings-regular.ttf +0 -0
  57. package/dist/css/fonts/glyphicons-halflings-regular.woff +0 -0
  58. package/dist/css/fonts/glyphicons-halflings-regular.woff2 +0 -0
  59. package/dist/css/modalTemplate.css +1 -0
  60. package/dist/css/themes/cerulean.min.css +1 -0
  61. package/dist/css/themes/cosmo.min.css +1 -0
  62. package/dist/css/themes/custom/cerulean/custom-cerulean.min.css +13 -0
  63. package/dist/css/themes/custom/cosmo/custom-cosmo.min.css +13 -0
  64. package/dist/css/themes/custom/cyborg/custom-cyborg.min.css +13 -0
  65. package/dist/css/themes/custom/darkly/custom-darkly.min.css +13 -0
  66. package/dist/css/themes/custom/flatly/custom-flatly.min.css +13 -0
  67. package/dist/css/themes/custom/fuse/_bootswatch-v3.3.7/_media-print.css +1 -0
  68. package/dist/css/themes/custom/fuse/_bootswatch-v3.3.7/alert.css +1 -0
  69. package/dist/css/themes/custom/fuse/_bootswatch-v3.3.7/animations.css +1 -0
  70. package/dist/css/themes/custom/fuse/_bootswatch-v3.3.7/badge.css +1 -0
  71. package/dist/css/themes/custom/fuse/_bootswatch-v3.3.7/basics.css +11 -0
  72. package/dist/css/themes/custom/fuse/_bootswatch-v3.3.7/blockquote.css +1 -0
  73. package/dist/css/themes/custom/fuse/_bootswatch-v3.3.7/breadcrumb.css +1 -0
  74. package/dist/css/themes/custom/fuse/_bootswatch-v3.3.7/btn.css +1 -0
  75. package/dist/css/themes/custom/fuse/_bootswatch-v3.3.7/carousel.css +1 -0
  76. package/dist/css/themes/custom/fuse/_bootswatch-v3.3.7/close.css +1 -0
  77. package/dist/css/themes/custom/fuse/_bootswatch-v3.3.7/col.css +1 -0
  78. package/dist/css/themes/custom/fuse/_bootswatch-v3.3.7/collapse.css +1 -0
  79. package/dist/css/themes/custom/fuse/_bootswatch-v3.3.7/container.css +1 -0
  80. package/dist/css/themes/custom/fuse/_bootswatch-v3.3.7/dropdown.css +1 -0
  81. package/dist/css/themes/custom/fuse/_bootswatch-v3.3.7/embed-responsive.css +1 -0
  82. package/dist/css/themes/custom/fuse/_bootswatch-v3.3.7/fade.css +1 -0
  83. package/dist/css/themes/custom/fuse/_bootswatch-v3.3.7/figure_img.css +1 -0
  84. package/dist/css/themes/custom/fuse/_bootswatch-v3.3.7/form-control.css +1 -0
  85. package/dist/css/themes/custom/fuse/_bootswatch-v3.3.7/glyphicon.css +1 -0
  86. package/dist/css/themes/custom/fuse/_bootswatch-v3.3.7/import_bootswatch.css +1 -0
  87. package/dist/css/themes/custom/fuse/_bootswatch-v3.3.7/input-group.css +1 -0
  88. package/dist/css/themes/custom/fuse/_bootswatch-v3.3.7/input.css +1 -0
  89. package/dist/css/themes/custom/fuse/_bootswatch-v3.3.7/jumbotron.css +1 -0
  90. package/dist/css/themes/custom/fuse/_bootswatch-v3.3.7/label.css +1 -0
  91. package/dist/css/themes/custom/fuse/_bootswatch-v3.3.7/list-group.css +1 -0
  92. package/dist/css/themes/custom/fuse/_bootswatch-v3.3.7/media.css +1 -0
  93. package/dist/css/themes/custom/fuse/_bootswatch-v3.3.7/modal.css +1 -0
  94. package/dist/css/themes/custom/fuse/_bootswatch-v3.3.7/nav.css +1 -0
  95. package/dist/css/themes/custom/fuse/_bootswatch-v3.3.7/navbar.css +1 -0
  96. package/dist/css/themes/custom/fuse/_bootswatch-v3.3.7/pager.css +1 -0
  97. package/dist/css/themes/custom/fuse/_bootswatch-v3.3.7/pagination.css +1 -0
  98. package/dist/css/themes/custom/fuse/_bootswatch-v3.3.7/panel.css +1 -0
  99. package/dist/css/themes/custom/fuse/_bootswatch-v3.3.7/popover.css +1 -0
  100. package/dist/css/themes/custom/fuse/_bootswatch-v3.3.7/progress.css +1 -0
  101. package/dist/css/themes/custom/fuse/_bootswatch-v3.3.7/table.css +1 -0
  102. package/dist/css/themes/custom/fuse/_bootswatch-v3.3.7/text.css +1 -0
  103. package/dist/css/themes/custom/fuse/_bootswatch-v3.3.7/thumbnail.css +1 -0
  104. package/dist/css/themes/custom/fuse/_bootswatch-v3.3.7/tooltip.css +1 -0
  105. package/dist/css/themes/custom/fuse/_bootswatch-v3.3.7/visible.css +1 -0
  106. package/dist/css/themes/custom/fuse/_bootswatch-v3.3.7/well.css +1 -0
  107. package/dist/css/themes/custom/fuse/components_css/alert.css +1 -0
  108. package/dist/css/themes/custom/fuse/components_css/badge.css +1 -0
  109. package/dist/css/themes/custom/fuse/components_css/blockquote.css +1 -0
  110. package/dist/css/themes/custom/fuse/components_css/breadcrumb.css +1 -0
  111. package/dist/css/themes/custom/fuse/components_css/btn.css +1 -0
  112. package/dist/css/themes/custom/fuse/components_css/carousel.css +1 -0
  113. package/dist/css/themes/custom/fuse/components_css/close.css +1 -0
  114. package/dist/css/themes/custom/fuse/components_css/embed-responsive.css +1 -0
  115. package/dist/css/themes/custom/fuse/components_css/form.css +1 -0
  116. package/dist/css/themes/custom/fuse/components_css/glyphicon.css +1 -0
  117. package/dist/css/themes/custom/fuse/components_css/hidden.css +1 -0
  118. package/dist/css/themes/custom/fuse/components_css/import_components_css.css +1 -0
  119. package/dist/css/themes/custom/fuse/components_css/list-group.css +1 -0
  120. package/dist/css/themes/custom/fuse/components_css/media.css +1 -0
  121. package/dist/css/themes/custom/fuse/components_css/modal.css +1 -0
  122. package/dist/css/themes/custom/fuse/components_css/navbar.css +1 -0
  123. package/dist/css/themes/custom/fuse/components_css/pager.css +1 -0
  124. package/dist/css/themes/custom/fuse/components_css/pagination.css +1 -0
  125. package/dist/css/themes/custom/fuse/components_css/panel.css +1 -0
  126. package/dist/css/themes/custom/fuse/components_css/popover.css +1 -0
  127. package/dist/css/themes/custom/fuse/components_css/progress.css +1 -0
  128. package/dist/css/themes/custom/fuse/components_css/table.css +1 -0
  129. package/dist/css/themes/custom/fuse/components_css/thumbnail.css +1 -0
  130. package/dist/css/themes/custom/fuse/components_css/tooltip.css +1 -0
  131. package/dist/css/themes/custom/fuse/components_css/type_bootstrap.css +1 -0
  132. package/dist/css/themes/custom/fuse/components_css/visible.css +1 -0
  133. package/dist/css/themes/custom/fuse/components_css/well.css +1 -0
  134. package/dist/css/themes/custom/fuse/custom-fuse.min.css +1 -0
  135. package/dist/css/themes/custom/fuse/font/Inter-roman.var.woff2 +0 -0
  136. package/dist/css/themes/custom/fuse/font/font.css +1 -0
  137. package/dist/css/themes/custom/journal/custom-journal.min.css +12 -0
  138. package/dist/css/themes/custom/lumen/custom-lumen.min.css +13 -0
  139. package/dist/css/themes/custom/material/components_css/crn-button.css +1 -0
  140. package/dist/css/themes/custom/material/components_css/crn-carousel.css +1 -0
  141. package/dist/css/themes/custom/material/components_css/crn-cron-calendar.css +1 -0
  142. package/dist/css/themes/custom/material/components_css/crn-cron-grid.css +1 -0
  143. package/dist/css/themes/custom/material/components_css/crn-enterprise.css +1 -0
  144. package/dist/css/themes/custom/material/components_css/crn-navbar.css +1 -0
  145. package/dist/css/themes/custom/material/components_css/crn-scheduler.css +1 -0
  146. package/dist/css/themes/custom/material/components_css/login.css +1 -0
  147. package/dist/css/themes/custom/material/components_css/ui-notification.css +1 -0
  148. package/dist/css/themes/custom/material/custom-material.css +1 -0
  149. package/dist/css/themes/custom/navigator/custom-navigator.css +1 -0
  150. package/dist/css/themes/custom/paper/custom-paper.min.css +13 -0
  151. package/dist/css/themes/custom/readable/custom-readable.min.css +13 -0
  152. package/dist/css/themes/custom/sandstone/custom-sandstone.min.css +13 -0
  153. package/dist/css/themes/custom/simplex/custom-simplex.min.css +13 -0
  154. package/dist/css/themes/custom/slate/custom-slate.min.css +13 -0
  155. package/dist/css/themes/custom/spacelab/custom-spacelab.min.css +13 -0
  156. package/dist/css/themes/custom/superhero/custom-superhero.min.css +13 -0
  157. package/dist/css/themes/custom/united/custom-united.min.css +13 -0
  158. package/dist/css/themes/custom/yeti/custom-yeti.min.css +13 -0
  159. package/dist/css/themes/cyborg.min.css +1 -0
  160. package/dist/css/themes/darkly.min.css +1 -0
  161. package/dist/css/themes/flatly.min.css +1 -0
  162. package/dist/css/themes/fuse.min.css +1 -0
  163. package/dist/css/themes/journal.min.css +1 -0
  164. package/dist/css/themes/lumen.min.css +1 -0
  165. package/dist/css/themes/material.min.css +1 -0
  166. package/dist/css/themes/paper.min.css +1 -0
  167. package/dist/css/themes/readable.min.css +1 -0
  168. package/dist/css/themes/sandstone.min.css +1 -0
  169. package/dist/css/themes/simplex.min.css +1 -0
  170. package/dist/css/themes/slate.min.css +1 -0
  171. package/dist/css/themes/spacelab.min.css +1 -0
  172. package/dist/css/themes/superhero.min.css +1 -0
  173. package/dist/css/themes/united.min.css +1 -0
  174. package/dist/css/themes/yeti.min.css +1 -0
  175. package/dist/js/directives.js +1 -1
  176. package/dist/js/reports/reports.service.js +1 -1
  177. package/gulpfile.js +1 -1
  178. package/js/directives.js +24 -21
  179. package/js/reports/reports.service.js +3 -0
  180. package/package.json +1 -1
  181. package/components/css/font-size.css +0 -15
  182. package/components/css/image.css +0 -15
@@ -1 +1 @@
1
- (function(){angular.module("report.services",[]).service("ReportService",["$http","$compile","$modal","$translate","$window","$rootScope",function(a,b,c,d,e,f){var g=$("body"),i=angular.element(g.get(0)).scope(),j=["node_modules/cronapp-lib-js/dist/js/stimulsoft/stimulsoft-all.js","node_modules/cronapp-lib-js/dist/js/stimulsoft/stimulsoft-helper.js"],k=[];this.getReport=function(b){var c={url:"api/rest/report",method:"POST",data:angular.toJson({reportName:b})};return a(c)},this.getPDF=function(b){var c={url:"api/rest/report/pdf",method:"POST",responseType:"arraybuffer",data:angular.toJson(b)};return a(c)},this.getPDFAsFile=function(b){var c={url:"api/rest/report/pdfasfile",method:"POST",data:angular.toJson(b)};return a(c)},this.getContentAsString=function(b){var c={url:"api/rest/report/contentasstring",method:"POST",data:angular.toJson(b)};return a(c)},this.getDataSourcesParams=function(b){var c={url:"api/rest/report/getdatasourcesparams",method:"POST",data:angular.toJson(b)};return a(c)},this.openURLContent=function(a){var c=$("#reportViewContext");c.get(0)||(console.log("include[#reportViewContext]"),g.append("<div id=\"reportViewContext\" ng-include=\"'node_modules/cronapp-framework-js/components/reports/reports.view.html'\"></div>"),b(g)(i),c=$("#reportViewContext"));var d=function(){var b=$("<iframe/>");b.attr("frameborder",0);var e=parseInt($(window).height());b.attr("height",e-200),b.attr("width","100%"),b.attr("src",a+"?download=false");var f=$("#reportView .modal-body");f.get(0)?(f.html(b),$("#reportViewContext .modal-dialog").css("width","95%"),setTimeout(function(){console.log("open[#reportViewContext]"),$("body").append(c),$("#reportView").modal()},100)):(console.log("wait[#reportViewContext]"),setTimeout(d,200))};setTimeout(d,200)},this.initializeStimulsoft=function(a){if(!Stimulsoft.Base.StiLicense.Key){stimulsoftHelper.setLanguage(a);var b=stimulsoftHelper.getLocalization();Stimulsoft.Base.Localization.StiLocalization.loadLocalization(b.xml),Stimulsoft.Base.Localization.StiLocalization.cultureName=b.cultureName,Stimulsoft.Base.StiLicense.Key=stimulsoftHelper.getKey()}},this.openStimulsoftReport=function(a,c,d,e){var j=$("#reportViewContext");j.get(0)||(g.append("<div id=\"reportViewContext\" ng-include=\"'node_modules/cronapp-framework-js/components/reports/reports.view.html'\"></div>"),b(g)(i),j=$("#reportViewContext"));var k=parseInt($(window).height()),h=k-200+"px",l="StiViewer"+app.common.generateId(),m=new Stimulsoft.Report.StiReport;f.reportTitle=a.ReportAlias,m.load(a),d||(d=stimulsoftHelper.getDatasourcesInBand(m)),c&&c.forEach(function(a){d.datasources.forEach(function(b){for(var c=0;c<b.fieldParams.length;c++)if(b.fieldParams[c].param==a.originalName){b.fieldParams[c].value=a.value;break}})}),stimulsoftHelper.setParamsInFilter(m.dictionary.dataSources,d.datasources);var n=()=>{var a=new Stimulsoft.Viewer.StiViewerOptions;a.toolbar.showAboutButton=!1,e?(a.toolbar.visible=e.showToolbar,a.appearance.scrollbarsMode=e.showScrollbar,null!=e.height&&(a.height=e.height+"px")):(a.appearance.scrollbarsMode=!0,a.height=h);var b=new Stimulsoft.Viewer.StiViewer(a,l,!1);return b.report=m,b};if(e&&e.$element)n(e).renderHtml(e.$element[0]);else{function b(){var a,b,c,d,e,f=setInterval(function(){var g=$("#"+l);g.length?!a&&(a=g.parent(),b=a.parent(),c=b.parent(),d=c.parent(),e=d.parent()):(console.log("cleared interval: "+l),clearInterval(f))},100)}function d(c){var d=setInterval(function(){var f=$("<div/>");f.attr("id","contentReport"),f.attr("width","100%");var g=$("#reportView .modal-body");g.get(0)&&(g.html(f),$("#reportViewContext .modal-dialog").css("width","95%"),setTimeout(function(){console.log("open[#reportViewContext]"),$("body").append(j),cronapi.screen.showModal("reportView"),a.reportConfig&&"HTML"===a.reportConfig.renderType?n(e).renderHtml("contentReport"):$("#contentReport").html("<iframe src=\""+c+"\" width=\"100%\" height=\""+h+"\"></iframe>"),setTimeout(function(){b()},100)},100),clearInterval(d))},200)}if(!a.reportConfig||"PDFSERVER"===a.reportConfig.renderType)this.getPDF({reportName:a.reportName,parameters:c}).then(function(a){var b=new Blob([new Uint8Array(a.data)],{type:"application/pdf"}),c=URL.createObjectURL(b);d(c)}.bind(this));else{var o=new Stimulsoft.Report.Export.StiPdfExportSettings,p=new Stimulsoft.Report.Export.StiPdfExportService,q=new Stimulsoft.System.IO.MemoryStream;m.renderAsync(function(){a.reportConfig&&"PDF"!==a.reportConfig.renderType&&a.reportConfig.renderType!==void 0?d(null):p.exportToAsync(function(){var a=q.toArray(),b=new Blob([new Uint8Array(a)],{type:"application/pdf"}),c=URL.createObjectURL(b);d(c)},m,q,o)},!1)}}$(`#${l}`).find("img").attr("alt",""),$(`#${l}`).find("input").attr("aria-label",l)},this.showParameters=function(a){var b=a.parameters,d=[],e=0,f=function(a){return a.replace(/([.*+?^=!:()|\[\]\/\\])/g,"\\$1")},g=function(a,b,c){return a.replace(new RegExp(f(b),"g"),c)},h=function(){if(e<b.length){var f=b[e++];$.get("node_modules/cronapp-framework-js/components/reports/"+f.type+".parameter.html").done(function(a){d.push(g(a,"_field_",f.name)),h()})}else 0<d.length&&c.open({templateUrl:"node_modules/cronapp-framework-js/components/reports/reports.parameters.html",controller:"ParameterController",resolve:{report:function(){return JSON.parse(JSON.stringify(a))},htmlParameters:function(){return JSON.parse(JSON.stringify(d))}}})}.bind(this);h()},this.mergeParam=function(a,b){var c=function(a,b){for(var c in Object.keys(b)){var d=Object.keys(b[c])[0];if(a==d)return Object.values(b[c])[0]}};for(var d in Object.keys(a)){var e=a[d].name,f=a[d].value,g=c(e,b);g&&(a[d].value=g)}return a},this.setVariablesBasedOnParams=function(a,b){for(var c in b){var d=Object.keys(b[c])[0],e=b[c][d];for(var f in a)if(a[f]&&a[f].Name&&a[f].Name===d){a[f].Value=e;break}}},this.hasParameterWithOutValue=function(a){for(var b in Object.keys(a))if(!a[b].value)return!0;return!1},this.getDatasourcesInBand=function(a){var b=new Stimulsoft.Report.StiReport;b.load(a);var c=stimulsoftHelper.getDatasourcesInBand(b);return c},this.loadSriptsStimulsoft=function(a){var b=!0,c=j.length,d=0;Pace.options.initialRate=.7,Pace.options.minTime=1750,Pace.options.maxProgressPerFrame=1,Pace.options.ghostTime=12e4;let e=setInterval(()=>Pace.restart(),2500);j.forEach(function(f){this.loadScript(f,function(f){d++,f||(b=!1),d==c&&(clearInterval(e),Pace.options.initialRate=.03,Pace.options.minTime=250,Pace.options.maxProgressPerFrame=20,Pace.options.ghostTime=10,Pace.stop(),a(b))})}.bind(this))},this.loadScript=function(a,b){if(0<=$.inArray(a,k))return void(b&&b(!0));if(-1!=a.indexOf(".css")){var c=document.createElement("link");c.rel="stylesheet",c.type="text/css",c.href=a,c.media="all",c.onload=function(){k.push(a),b&&b(!0)},c.onerror=function(){b&&b(!1)};try{document.getElementsByTagName("head")[0].appendChild(c)}catch(a){console.log(a)}}else{var d=document.createElement("script");d.type="text/javascript",d.readyState?d.onreadystatechange=function(){("loaded"==d.readyState||"complete"==d.readyState)&&(d.onreadystatechange=null,k.push(a),b&&b(!0))}:d.onload=function(){k.push(a),b&&b(!0)},d.src=a,document.getElementsByTagName("head")[0].appendChild(d)}},this.openReport=function(a,b,c){this.getReport(a).then(function(a){a&&a.data&&(a.data.reportName.endsWith(".report")?this.loadSriptsStimulsoft(function(e){e?(this.initializeStimulsoft(d.use()),this.getContentAsString(a.data).then(function(e){var f=this.getDatasourcesInBand(e.data);this.getDataSourcesParams(f).then(function(g){f=g.data,a.data.parameters=stimulsoftHelper.parseToGroupedParam(f.datasources),a.data.contentData=e.data,a.data.datasourcesInBand=f,b&&(a.data.parameters=this.mergeParam(a.data.parameters,b),a.data.contentData.Dictionary=a.data.contentData.Dictionary||{},this.setVariablesBasedOnParams(a.data.contentData.Dictionary.Variables,b)),this.hasParameterWithOutValue(a.data.parameters)&&!c?(a.data.parameters.forEach(function(a){a.name=d.instant(a.name)}),this.showParameters(JSON.parse(JSON.stringify(a.data)))):this.openStimulsoftReport(e.data,a.data.parameters,a.data.datasourcesInBand,c)}.bind(this))}.bind(this),function(a){var b=cronapi.internal.getErrorMessage(a,a.statusText);i.Notification.error(b)}.bind(this))):i.Notification.error("Error loading report script")}.bind(this)):0==a.data.parameters.length||1==a.data.parameters.length&&"DATA_LIMIT"==a.data.parameters[0].name?this.getPDFAsFile(a.data.reportName).then(function(a){this.openURLContent(a.data)}.bind(this),function(a){var b=cronapi.internal.getErrorMessage(a,a.statusText);i.Notification.error(b)}.bind(this)):(b&&(a.data.parameters=this.mergeParam(a.data.parameters,b)),this.hasParameterWithOutValue(a.data.parameters)?this.showParameters(JSON.parse(JSON.stringify(a.data))):this.getPDFAsFile(a.data).then(function(a){this.openURLContent(a.data)}.bind(this))))}.bind(this))}}])})(app);
1
+ (function(){angular.module("report.services",[]).service("ReportService",["$http","$compile","$modal","$translate","$window","$rootScope",function(a,b,c,d,e,f){var g=$("body"),i=angular.element(g.get(0)).scope(),j=["node_modules/cronapp-lib-js/dist/js/stimulsoft/stimulsoft-all.js","node_modules/cronapp-lib-js/dist/js/stimulsoft/stimulsoft-helper.js"],k=[];this.getReport=function(b){var c={url:"api/rest/report",method:"POST",data:angular.toJson({reportName:b})};return a(c)},this.getPDF=function(b){var c={url:"api/rest/report/pdf",method:"POST",responseType:"arraybuffer",data:angular.toJson(b)};return a(c)},this.getPDFAsFile=function(b){var c={url:"api/rest/report/pdfasfile",method:"POST",data:angular.toJson(b)};return a(c)},this.getContentAsString=function(b){var c={url:"api/rest/report/contentasstring",method:"POST",data:angular.toJson(b)};return a(c)},this.getDataSourcesParams=function(b){var c={url:"api/rest/report/getdatasourcesparams",method:"POST",data:angular.toJson(b)};return a(c)},this.openURLContent=function(a){var c=$("#reportViewContext");c.get(0)||(console.log("include[#reportViewContext]"),g.append("<div id=\"reportViewContext\" ng-include=\"'node_modules/cronapp-framework-js/components/reports/reports.view.html'\"></div>"),b(g)(i),c=$("#reportViewContext"));var d=function(){var b=$("<iframe/>");b.attr("frameborder",0);var e=parseInt($(window).height());b.attr("height",e-200),b.attr("width","100%"),b.attr("src",a+"?download=false");var f=$("#reportView .modal-body");f.get(0)?(f.html(b),$("#reportViewContext .modal-dialog").css("width","95%"),setTimeout(function(){console.log("open[#reportViewContext]"),$("body").append(c),$("#reportView").modal()},100)):(console.log("wait[#reportViewContext]"),setTimeout(d,200))};setTimeout(d,200)},this.initializeStimulsoft=function(a){if(!Stimulsoft.Base.StiLicense.Key){stimulsoftHelper.setLanguage(a);var b=stimulsoftHelper.getLocalization();Stimulsoft.Base.Localization.StiLocalization.loadLocalization(b.xml),Stimulsoft.Base.Localization.StiLocalization.cultureName=b.cultureName,Stimulsoft.Base.StiLicense.Key=stimulsoftHelper.getKey()}},this.openStimulsoftReport=function(a,c,d,e){var j=$("#reportViewContext");j.get(0)||(g.append("<div id=\"reportViewContext\" ng-include=\"'node_modules/cronapp-framework-js/components/reports/reports.view.html'\"></div>"),b(g)(i),j=$("#reportViewContext"));var k=parseInt($(window).height()),h=k-200+"px",l="StiViewer"+app.common.generateId(),m=new Stimulsoft.Report.StiReport;f.reportTitle=a.ReportAlias,m.load(a),d||(d=stimulsoftHelper.getDatasourcesInBand(m)),c&&c.forEach(function(a){d.datasources.forEach(function(b){for(var c=0;c<b.fieldParams.length;c++)if(b.fieldParams[c].param==a.originalName){b.fieldParams[c].value=a.value;break}})}),stimulsoftHelper.setParamsInFilter(m.dictionary.dataSources,d.datasources);var n=()=>{var a=new Stimulsoft.Viewer.StiViewerOptions;a.toolbar.showAboutButton=!1,e?(a.toolbar.visible=e.showToolbar,a.appearance.scrollbarsMode=e.showScrollbar,null!=e.height&&(a.height=e.height+"px")):(a.appearance.scrollbarsMode=!0,a.height=h);var b=new Stimulsoft.Viewer.StiViewer(a,l,!1);return b.report=m,StiJsViewer.prototype.IsTouchDevice()&&(b.options.appearance.interfaceType=Stimulsoft.Viewer.StiInterfaceType.Touch),b};if(e&&e.$element)n(e).renderHtml(e.$element[0]);else{function b(){var a,b,c,d,e,f=setInterval(function(){var g=$("#"+l);g.length?!a&&(a=g.parent(),b=a.parent(),c=b.parent(),d=c.parent(),e=d.parent()):(console.log("cleared interval: "+l),clearInterval(f))},100)}function d(c){var d=setInterval(function(){var f=$("<div/>");f.attr("id","contentReport"),f.attr("width","100%");var g=$("#reportView .modal-body");g.get(0)&&(g.html(f),$("#reportViewContext .modal-dialog").css("width","95%"),setTimeout(function(){console.log("open[#reportViewContext]"),$("body").append(j),cronapi.screen.showModal("reportView"),a.reportConfig&&"HTML"===a.reportConfig.renderType?n(e).renderHtml("contentReport"):$("#contentReport").html("<iframe src=\""+c+"\" width=\"100%\" height=\""+h+"\"></iframe>"),setTimeout(function(){b()},100)},100),clearInterval(d))},200)}if(!a.reportConfig||"PDFSERVER"===a.reportConfig.renderType)this.getPDF({reportName:a.reportName,parameters:c}).then(function(a){var b=new Blob([new Uint8Array(a.data)],{type:"application/pdf"}),c=URL.createObjectURL(b);d(c)}.bind(this));else{var o=new Stimulsoft.Report.Export.StiPdfExportSettings,p=new Stimulsoft.Report.Export.StiPdfExportService,q=new Stimulsoft.System.IO.MemoryStream;m.renderAsync(function(){a.reportConfig&&"PDF"!==a.reportConfig.renderType&&a.reportConfig.renderType!==void 0?d(null):p.exportToAsync(function(){var a=q.toArray(),b=new Blob([new Uint8Array(a)],{type:"application/pdf"}),c=URL.createObjectURL(b);d(c)},m,q,o)},!1)}}$(`#${l}`).find("img").attr("alt",""),$(`#${l}`).find("input").attr("aria-label",l)},this.showParameters=function(a){var b=a.parameters,d=[],e=0,f=function(a){return a.replace(/([.*+?^=!:()|\[\]\/\\])/g,"\\$1")},g=function(a,b,c){return a.replace(new RegExp(f(b),"g"),c)},h=function(){if(e<b.length){var f=b[e++];$.get("node_modules/cronapp-framework-js/components/reports/"+f.type+".parameter.html").done(function(a){d.push(g(a,"_field_",f.name)),h()})}else 0<d.length&&c.open({templateUrl:"node_modules/cronapp-framework-js/components/reports/reports.parameters.html",controller:"ParameterController",resolve:{report:function(){return JSON.parse(JSON.stringify(a))},htmlParameters:function(){return JSON.parse(JSON.stringify(d))}}})}.bind(this);h()},this.mergeParam=function(a,b){var c=function(a,b){for(var c in Object.keys(b)){var d=Object.keys(b[c])[0];if(a==d)return Object.values(b[c])[0]}};for(var d in Object.keys(a)){var e=a[d].name,f=a[d].value,g=c(e,b);g&&(a[d].value=g)}return a},this.setVariablesBasedOnParams=function(a,b){for(var c in b){var d=Object.keys(b[c])[0],e=b[c][d];for(var f in a)if(a[f]&&a[f].Name&&a[f].Name===d){a[f].Value=e;break}}},this.hasParameterWithOutValue=function(a){for(var b in Object.keys(a))if(!a[b].value)return!0;return!1},this.getDatasourcesInBand=function(a){var b=new Stimulsoft.Report.StiReport;b.load(a);var c=stimulsoftHelper.getDatasourcesInBand(b);return c},this.loadSriptsStimulsoft=function(a){var b=!0,c=j.length,d=0;Pace.options.initialRate=.7,Pace.options.minTime=1750,Pace.options.maxProgressPerFrame=1,Pace.options.ghostTime=12e4;let e=setInterval(()=>Pace.restart(),2500);j.forEach(function(f){this.loadScript(f,function(f){d++,f||(b=!1),d==c&&(clearInterval(e),Pace.options.initialRate=.03,Pace.options.minTime=250,Pace.options.maxProgressPerFrame=20,Pace.options.ghostTime=10,Pace.stop(),a(b))})}.bind(this))},this.loadScript=function(a,b){if(0<=$.inArray(a,k))return void(b&&b(!0));if(-1!=a.indexOf(".css")){var c=document.createElement("link");c.rel="stylesheet",c.type="text/css",c.href=a,c.media="all",c.onload=function(){k.push(a),b&&b(!0)},c.onerror=function(){b&&b(!1)};try{document.getElementsByTagName("head")[0].appendChild(c)}catch(a){console.log(a)}}else{var d=document.createElement("script");d.type="text/javascript",d.readyState?d.onreadystatechange=function(){("loaded"==d.readyState||"complete"==d.readyState)&&(d.onreadystatechange=null,k.push(a),b&&b(!0))}:d.onload=function(){k.push(a),b&&b(!0)},d.src=a,document.getElementsByTagName("head")[0].appendChild(d)}},this.openReport=function(a,b,c){this.getReport(a).then(function(a){a&&a.data&&(a.data.reportName.endsWith(".report")?this.loadSriptsStimulsoft(function(e){e?(this.initializeStimulsoft(d.use()),this.getContentAsString(a.data).then(function(e){var f=this.getDatasourcesInBand(e.data);this.getDataSourcesParams(f).then(function(g){f=g.data,a.data.parameters=stimulsoftHelper.parseToGroupedParam(f.datasources),a.data.contentData=e.data,a.data.datasourcesInBand=f,b&&(a.data.parameters=this.mergeParam(a.data.parameters,b),a.data.contentData.Dictionary=a.data.contentData.Dictionary||{},this.setVariablesBasedOnParams(a.data.contentData.Dictionary.Variables,b)),this.hasParameterWithOutValue(a.data.parameters)&&!c?(a.data.parameters.forEach(function(a){a.name=d.instant(a.name)}),this.showParameters(JSON.parse(JSON.stringify(a.data)))):this.openStimulsoftReport(e.data,a.data.parameters,a.data.datasourcesInBand,c)}.bind(this))}.bind(this),function(a){var b=cronapi.internal.getErrorMessage(a,a.statusText);i.Notification.error(b)}.bind(this))):i.Notification.error("Error loading report script")}.bind(this)):0==a.data.parameters.length||1==a.data.parameters.length&&"DATA_LIMIT"==a.data.parameters[0].name?this.getPDFAsFile(a.data.reportName).then(function(a){this.openURLContent(a.data)}.bind(this),function(a){var b=cronapi.internal.getErrorMessage(a,a.statusText);i.Notification.error(b)}.bind(this)):(b&&(a.data.parameters=this.mergeParam(a.data.parameters,b)),this.hasParameterWithOutValue(a.data.parameters)?this.showParameters(JSON.parse(JSON.stringify(a.data))):this.getPDFAsFile(a.data).then(function(a){this.openURLContent(a.data)}.bind(this))))}.bind(this))}}])})(app);
package/gulpfile.js CHANGED
@@ -20,7 +20,7 @@ gulp.task('minify-js', function() {
20
20
  });
21
21
 
22
22
  gulp.task('minify-css', function() {
23
- return gulp.src(['css/app.css', 'css/cronos-bootstrap.css', 'css/cronos-template.css', 'css/cronos.css'])
23
+ return gulp.src(['css/**/*'])
24
24
  .pipe(uglifycss())
25
25
  .pipe(gulp.dest('dist/css/'));
26
26
  });
package/js/directives.js CHANGED
@@ -2126,7 +2126,8 @@
2126
2126
  let waitRender = setInterval(function() {
2127
2127
  let $myElement = $('#' + componentId);
2128
2128
  if ($myElement.length > 0) {
2129
- var x = angular.element($myElement);
2129
+ let $closeTdElemen = $myElement.closest('td');
2130
+ let x = angular.element($closeTdElemen || $myElement);
2130
2131
  $compile(x)(scope);
2131
2132
  clearInterval(waitRender);
2132
2133
  resolve(componentId);
@@ -2722,11 +2723,16 @@
2722
2723
  };
2723
2724
 
2724
2725
  var compileListing = function(e) {
2725
- if (e.sender.tbody && e.sender.tbody.length && !$(e.sender.tbody).find('.k-grid-edit-row').length) {
2726
+ if (e.sender.tbody && e.sender.tbody.length) {
2726
2727
 
2727
2728
  var toCompile = e.sender.tbody;
2728
- if (toCompile.parent() && toCompile.parent().parent() && toCompile.parent().parent().parent() )
2729
- toCompile = toCompile.parent().parent().parent();
2729
+ if (!$(e.sender.tbody).find('.k-grid-edit-row').length) {
2730
+ if (toCompile.parent() && toCompile.parent().parent() && toCompile.parent().parent().parent() )
2731
+ toCompile = toCompile.parent().parent().parent();
2732
+ }
2733
+ else {
2734
+ toCompile = $(e.sender.tbody).find('tr:not(.k-grid-edit-row)');
2735
+ }
2730
2736
 
2731
2737
  scope.safeApply(function() {
2732
2738
  var trs = $(toCompile);
@@ -4287,6 +4293,11 @@
4287
4293
  config.slide = attrs.ngSlide ? function (){scope.$eval(attrs.ngSlide)}: undefined;
4288
4294
  var slider = $(element).kendoSlider(config).data("kendoSlider");
4289
4295
 
4296
+ const resizeObserver = new ResizeObserver(entries => {
4297
+ slider.resize();
4298
+ });
4299
+ resizeObserver.observe(slider.wrapper[0])
4300
+
4290
4301
  if (attrs.ngRequired || attrs.required) {
4291
4302
  var id = attrs.id ? ' id="input' + app.common.generateId() + '"' : '';
4292
4303
  var name = attrs.name ? ' name="input' + app.common.generateId() + '"' : '';
@@ -4466,16 +4477,12 @@
4466
4477
  require: 'ngModel',
4467
4478
  link: function(scope, elem, attrs, ngModelCtrl) {
4468
4479
 
4480
+ attrs.theme = $(elem).find('i').attr('xattr-theme');
4481
+ attrs.iconOn = $(elem).find('i').attr('class');
4482
+
4469
4483
  var $elem = $(elem);
4470
4484
  var starArray = [];
4471
4485
 
4472
- var icon = $elem.find('i');
4473
-
4474
- attrs.iconSize = icon[0].dataset.size;
4475
- attrs.iconTheme = icon[0].dataset.theme;
4476
- attrs.iconOn = icon[0].className;
4477
- attrs.iconOn = attrs.iconOn.replace(attrs.iconSize).replace(attrs.iconTheme);
4478
-
4479
4486
  if (attrs.xattrDefaultValue) {
4480
4487
  ngModelCtrl.$viewValue = 0; //set new view value
4481
4488
  ngModelCtrl.$commitViewValue();
@@ -4483,7 +4490,6 @@
4483
4490
 
4484
4491
  for (var i=1;i<=5;i++) {
4485
4492
  starArray.push($(elem).find('i').get(i - 1));
4486
- $(starArray[i-1]).removeClass(attrs.iconOn);
4487
4493
  $(starArray[i-1]).addClass(attrs.iconOff || "fa fa-star-o");
4488
4494
  }
4489
4495
 
@@ -4512,16 +4518,13 @@
4512
4518
  for (var i=1;i<=5;i++) {
4513
4519
  stars[i-1].removeClass(attrs.iconOff || 'fa fa-star-o');
4514
4520
  stars[i-1].removeClass(attrs.iconOn);
4515
- stars[i-1].removeClass(attrs.iconSize);
4516
- stars[i-1].removeClass(attrs.iconTheme);
4521
+ stars[i-1].removeClass(attrs.theme);
4517
4522
  if (i <= value) {
4518
4523
  stars[i-1].addClass(attrs.iconOn);
4519
- stars[i-1].addClass(attrs.iconSize);
4520
- stars[i-1].addClass(attrs.iconTheme);
4524
+ stars[i-1].addClass(attrs.theme);
4521
4525
  } else {
4522
4526
  stars[i-1].addClass(attrs.iconOff || 'fa fa-star-o');
4523
- stars[i-1].addClass(attrs.iconSize);
4524
- stars[i-1].addClass(attrs.iconTheme);
4527
+ stars[i-1].addClass(attrs.theme);
4525
4528
  }
4526
4529
  }
4527
4530
  return value;
@@ -4590,13 +4593,13 @@
4590
4593
 
4591
4594
  if (item.menuItems.length > 0) {
4592
4595
  templateItens = templateItens + '\
4593
- <li class="dropdown-submenu" ' + hide + '> \
4596
+ <li class="dropdown-submenu" ' + security + hide + '> \
4594
4597
  <a href="" ' + action + ' class="dropdown-item dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">' + iconClass + title + caret + ' </a> \
4595
4598
  ' + populateSubitems(item) + '\
4596
4599
  </li>';
4597
4600
  } else {
4598
4601
  templateItens = templateItens + '\
4599
- <li class="dropdown-submenu" ' + hide + '> \
4602
+ <li class="dropdown-submenu" ' + security + hide + '> \
4600
4603
  <a href="" ' + action + ' class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">' + iconClass + title + caret + ' </a> \
4601
4604
  </li>';
4602
4605
  }
@@ -4648,7 +4651,7 @@
4648
4651
  //Somente fica na vertical se for o menu principal da IDE (E estiver configurado para isso)
4649
4652
  let isVertical = element.closest('.crn-navigator-vertical').length;
4650
4653
 
4651
- var TEMPLATE_MAIN = '<ul class="nav navbar-nav ' + (isVertical ? 'col-md-12 padding-0' : '') + ' "></ul>';
4654
+ var TEMPLATE_MAIN = '<ul class="nav navbar-nav ' + (isVertical ? 'col-md-12 padding-0' : '') + ' " style="float:left"></ul>';
4652
4655
  var options = {};
4653
4656
  try {
4654
4657
  options = JSON.parse(attrs.options);
@@ -156,6 +156,9 @@
156
156
  }
157
157
  var viewer = new Stimulsoft.Viewer.StiViewer(options, viewerId, false);
158
158
  viewer.report = report;
159
+ if(StiJsViewer.prototype.IsTouchDevice()) {
160
+ viewer.options.appearance.interfaceType = Stimulsoft.Viewer.StiInterfaceType.Touch;
161
+ }
159
162
  return viewer;
160
163
  };
161
164
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cronapp-framework-js",
3
- "version": "2.8.24",
3
+ "version": "2.8.28",
4
4
  "description": "Javascript library for CronApp's projects",
5
5
  "main": "cronapp.framework.js",
6
6
  "scripts": {
@@ -1,15 +0,0 @@
1
- .font-size-20 {
2
- font-size: 20px;
3
- }
4
-
5
- .font-size-25 {
6
- font-size: 25px;
7
- }
8
-
9
- .font-size-47 {
10
- font-size: 47px;
11
- }
12
-
13
- .font-size-30 {
14
- font-size: 30px;
15
- }
@@ -1,15 +0,0 @@
1
- .object-fit-contain {
2
- object-fit: contain;
3
- }
4
-
5
- .object-fit-cover {
6
- object-fit: cover;
7
- }
8
-
9
- .object-fit-fill {
10
- object-fit: fill;
11
- }
12
-
13
- .object-fit-none {
14
- object-fit: none;
15
- }