cronapp-framework-js 2.8.35 → 2.8.36
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/components/templates/accordion.template.html +6 -6
- package/dist/components/js/format.min.js +1 -1
- package/dist/components/js/jquery.inputmask.bundle.js +1 -1
- package/dist/components/js/jquery.mask.min.js +1 -1
- package/dist/components/js/qrcode.js +1 -1
- package/dist/components/templates/accordion.template.html +1 -1
- package/dist/js/LanguageSelectDirective.js +1 -1
- package/dist/js/LocaleService.js +1 -1
- package/dist/js/directives.js +1 -1
- package/dist/js/reports/parameters.controller.js +1 -1
- package/js/directives.js +62 -52
- package/package.json +1 -1
- package/v10.22.1 +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){
|
|
1
|
+
(function(){'use strict';function a(a,b,c,d,e){function f(a){c.openURLContent(a.data)}b.getDescription=function(a){var b=a.name;return a.description&&(b=a.description,-1<b.indexOf("{{")&&-1<b.indexOf("}}")&&(b=b.replace("{{","").replace("}}",""),b=window.cronapi.i18n.translate(b,[]))),b},b.cloneElement=function(a){return angular.copy(a)},b.isVisibleParam=function(a){if("DATA_LIMIT"==a.name)return!1;return!(""!==a.value)||!(""!=a.value)};var g=d.reportName.match(/\/(.*?)(.*?)(\.jrxml|\.report)/);b.report=d,b.report.name=g[2],b.htmlParameters=e,b.onPrint=function(){b.report.reportName.endsWith(".report")?c.openStimulsoftReport(b.report.contentData,b.report.parameters,b.report.datasourcesInBand):c.getPDFAsFile(b.report).then(f)},b.onCancel=function(){a.dismiss("cancel")}}angular.module("custom.controllers").controller("ParameterController",a).filter("trusted",["$sce",function(a){return function(b){return a.trustAsHtml(b)}}]).directive("compile",["$compile","$timeout",function(a,b){return{restrict:"A",link:function(c,d){b(function(){a(d.contents())(c)})}}}]).directive("formatDate",function(){return{require:"ngModel",link:function(a,b,c,d){d.$formatters.push(function(a){return a?new Date(a):null})}}}),a.$inject=["$modalInstance","$scope","ReportService","report","htmlParameters"]})();
|
package/js/directives.js
CHANGED
|
@@ -796,7 +796,7 @@
|
|
|
796
796
|
if (o.length >= 10 && o.match(ISO_PATTERN)) {
|
|
797
797
|
return "datetimeoffset'" + o + "'";
|
|
798
798
|
} else {
|
|
799
|
-
return "'" + o + "'";
|
|
799
|
+
return "'" + o.replaceAll("'", "''") + "'";
|
|
800
800
|
}
|
|
801
801
|
}
|
|
802
802
|
} else {
|
|
@@ -3586,6 +3586,9 @@
|
|
|
3586
3586
|
_combobox.isEvaluating = false;
|
|
3587
3587
|
} else {
|
|
3588
3588
|
_dataSource.findObj([options.value], false, function(data) {
|
|
3589
|
+
if (Array.isArray(data)) {
|
|
3590
|
+
data = data[0];
|
|
3591
|
+
}
|
|
3589
3592
|
options.success(data);
|
|
3590
3593
|
_combobox.isEvaluating = false;
|
|
3591
3594
|
|
|
@@ -3695,9 +3698,16 @@
|
|
|
3695
3698
|
var found = _goTo(_scope, combobox, combobox.dataItem());
|
|
3696
3699
|
|
|
3697
3700
|
if (!found) {
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
+
dataSourceScreen.findObj([value], false, (dataresult) => {
|
|
3702
|
+
if (Array.isArray(dataresult)) {
|
|
3703
|
+
dataresult = dataresult[0];
|
|
3704
|
+
}
|
|
3705
|
+
if (dataresult) {
|
|
3706
|
+
dataSourceScreen.data.push(dataresult);
|
|
3707
|
+
_goTo(_scope, combobox, dataresult);
|
|
3708
|
+
modelSetter(_scope, value);
|
|
3709
|
+
}
|
|
3710
|
+
});
|
|
3701
3711
|
}
|
|
3702
3712
|
}
|
|
3703
3713
|
}
|
|
@@ -4160,7 +4170,7 @@
|
|
|
4160
4170
|
autoComplete.enable(false);
|
|
4161
4171
|
} else {
|
|
4162
4172
|
autoComplete.enable(true);
|
|
4163
|
-
}
|
|
4173
|
+
}
|
|
4164
4174
|
|
|
4165
4175
|
if (ngModelCtrl) {
|
|
4166
4176
|
ngModelCtrl.$formatters.push(function (value) {
|
|
@@ -4564,7 +4574,7 @@
|
|
|
4564
4574
|
const populateSubitems = (item) => {
|
|
4565
4575
|
var subitem = item.menuItems;
|
|
4566
4576
|
var templateSubitens = '';
|
|
4567
|
-
|
|
4577
|
+
|
|
4568
4578
|
subitem.forEach((subitem) => {
|
|
4569
4579
|
var securitySubitem = (subitem.security && subitem.security != null) ? ' cronapp-security="' + subitem.security + '" ' : '';
|
|
4570
4580
|
var actionSubitem = (subitem.action && subitem.action != null) ? ' ng-click="' + subitem.action + '" ' : '';
|
|
@@ -4572,48 +4582,48 @@
|
|
|
4572
4582
|
var iconClassSubitem = (subitem.iconClass && subitem.iconClass != null) ? '<i class="' + subitem.iconClass + '"></i> ' : '';
|
|
4573
4583
|
var titleSubitem = '<span></span>';
|
|
4574
4584
|
var caretSubitem = (subitem.menuItems && Array.isArray(subitem.menuItems) && (subitem.menuItems.length > 0)) ? '<span class="caret submenu"></span>' : '';
|
|
4575
|
-
|
|
4585
|
+
|
|
4576
4586
|
if (subitem.title) {
|
|
4577
4587
|
titleSubitem = '<span>' + $translate.instant(subitem.title) + '</span>';
|
|
4578
4588
|
}
|
|
4579
|
-
|
|
4589
|
+
|
|
4580
4590
|
if (subitem.menuItems.length > 0) {
|
|
4581
4591
|
templateSubitens = templateSubitens + '<li class="dropdown-submenu">\
|
|
4582
4592
|
<a class="dropdown-item dropdown-toggle" role="button" aria-haspopup="true" aria-expanded="false" href=""' + securitySubitem + actionSubitem + '>' + iconClassSubitem + titleSubitem + caretSubitem + '</a>\
|
|
4583
4593
|
' + populateItems(subitem.menuItems) + '\
|
|
4584
4594
|
</li>';
|
|
4585
|
-
|
|
4595
|
+
|
|
4586
4596
|
} else {
|
|
4587
4597
|
templateSubitens = templateSubitens + '<li class="dropdown-submenu">\
|
|
4588
4598
|
<a role="button" aria-haspopup="true" aria-expanded="false" href=""' + securitySubitem + actionSubitem + '>' + iconClassSubitem + titleSubitem + caretSubitem + '</a>\
|
|
4589
4599
|
</li>';
|
|
4590
4600
|
}
|
|
4591
4601
|
});
|
|
4592
|
-
|
|
4602
|
+
|
|
4593
4603
|
if (templateSubitens != '') {
|
|
4594
4604
|
templateSubitens = '<ul class="dropdown-menu">' + templateSubitens + '</ul>';
|
|
4595
4605
|
}
|
|
4596
|
-
|
|
4606
|
+
|
|
4597
4607
|
return templateSubitens;
|
|
4598
4608
|
};
|
|
4599
|
-
|
|
4609
|
+
|
|
4600
4610
|
const populateItems = (items) => {
|
|
4601
4611
|
var templateItens = '';
|
|
4602
|
-
|
|
4612
|
+
|
|
4603
4613
|
if (items && items.length > 0 && Array.isArray(items)) {
|
|
4604
4614
|
items.forEach(function (item) {
|
|
4605
|
-
|
|
4615
|
+
|
|
4606
4616
|
var security = (item.security && item.security != null) ? ' cronapp-security="' + item.security + '" ' : '';
|
|
4607
4617
|
var action = (item.action && item.action != null) ? ' ng-click="' + item.action + '" ' : '';
|
|
4608
4618
|
var hide = (item.hide && item.hide != null) ? ' ng-hide="' + item.hide + '" ' : '';
|
|
4609
4619
|
var iconClass = (item.iconClass && item.iconClass != null) ? '<i class="' + item.iconClass + '"></i> ' : '';
|
|
4610
4620
|
var title = '<span></span>';
|
|
4611
4621
|
var caret = (item.menuItems && Array.isArray(item.menuItems) && (item.menuItems.length > 0)) ? '<span class="caret submenu"></span>' : '';
|
|
4612
|
-
|
|
4622
|
+
|
|
4613
4623
|
if (item.title) {
|
|
4614
4624
|
title = '<span>' + $translate.instant(item.title) + '</span>';
|
|
4615
4625
|
}
|
|
4616
|
-
|
|
4626
|
+
|
|
4617
4627
|
if (item.menuItems.length > 0) {
|
|
4618
4628
|
templateItens = templateItens + '\
|
|
4619
4629
|
<li class="dropdown-submenu" ' + security + hide + '> \
|
|
@@ -4626,36 +4636,36 @@
|
|
|
4626
4636
|
<a href="" ' + action + ' class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">' + iconClass + title + caret + ' </a> \
|
|
4627
4637
|
</li>';
|
|
4628
4638
|
}
|
|
4629
|
-
|
|
4639
|
+
|
|
4630
4640
|
});
|
|
4631
|
-
|
|
4641
|
+
|
|
4632
4642
|
if (templateItens != '') {
|
|
4633
4643
|
templateItens = '<ul class="dropdown-menu">' + templateItens + '</ul>';
|
|
4634
4644
|
}
|
|
4635
4645
|
}
|
|
4636
|
-
|
|
4646
|
+
|
|
4637
4647
|
return templateItens;
|
|
4638
4648
|
}
|
|
4639
4649
|
return {
|
|
4640
4650
|
restrict: 'EA',
|
|
4641
4651
|
populateMenu: function (menuOptions, isVertical) {
|
|
4642
4652
|
var template = '';
|
|
4643
|
-
|
|
4653
|
+
|
|
4644
4654
|
if (menuOptions && menuOptions != null && menuOptions.subMenuOptions && menuOptions.subMenuOptions != null && Array.isArray(menuOptions.subMenuOptions)) {
|
|
4645
|
-
|
|
4655
|
+
|
|
4646
4656
|
menuOptions.subMenuOptions.forEach(function (menu) {
|
|
4647
|
-
|
|
4657
|
+
|
|
4648
4658
|
var security = (menu.security && menu.security != null) ? ' cronapp-security="' + menu.security + '" ' : '';
|
|
4649
4659
|
var action = (menu.action && menu.action != null) ? ' ng-click="' + menu.action + '" ' : '';
|
|
4650
4660
|
var caret = (menu.menuItems && Array.isArray(menu.menuItems) && (menu.menuItems.length > 0)) ? '<span class="caret"></span>' : '';
|
|
4651
4661
|
var hide = (menu.hide && menu.hide != null) ? ' ng-hide="' + menu.hide + '" ' : '';
|
|
4652
4662
|
var iconClass = (menu.iconClass && menu.iconClass != null) ? '<i class="' + menu.iconClass + '"></i> ' : '';
|
|
4653
4663
|
var title = '<span></span>'
|
|
4654
|
-
|
|
4664
|
+
|
|
4655
4665
|
if (menu.title) {
|
|
4656
4666
|
title = '<span>' + $translate.instant(menu.title) + '</span>';
|
|
4657
4667
|
}
|
|
4658
|
-
|
|
4668
|
+
|
|
4659
4669
|
template = template + '\
|
|
4660
4670
|
<li class="dropdown nav-item '+ (isVertical ? 'col-md-12 padding-0' : '') + '"' + security + hide + '>\
|
|
4661
4671
|
<a href="" ' + action + ' class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">\
|
|
@@ -4663,17 +4673,17 @@
|
|
|
4663
4673
|
</a> \
|
|
4664
4674
|
' + populateItems(menu.menuItems) + '\
|
|
4665
4675
|
</li>';
|
|
4666
|
-
|
|
4676
|
+
|
|
4667
4677
|
})
|
|
4668
4678
|
}
|
|
4669
|
-
|
|
4679
|
+
|
|
4670
4680
|
return template;
|
|
4671
4681
|
},
|
|
4672
4682
|
link: function (scope, element, attrs) {
|
|
4673
4683
|
$translate.onReady(() => {
|
|
4674
4684
|
//Somente fica na vertical se for o menu principal da IDE (E estiver configurado para isso)
|
|
4675
4685
|
let isVertical = element.closest('.crn-navigator-vertical').length;
|
|
4676
|
-
|
|
4686
|
+
|
|
4677
4687
|
var TEMPLATE_MAIN = '<ul class="nav navbar-nav ' + (isVertical ? 'col-md-12 padding-0' : '') + ' " style="float:left"></ul>';
|
|
4678
4688
|
var options = {};
|
|
4679
4689
|
try {
|
|
@@ -4681,30 +4691,30 @@
|
|
|
4681
4691
|
} catch (e) {
|
|
4682
4692
|
console.log('CronDynamicMenu: Invalid configuration!')
|
|
4683
4693
|
}
|
|
4684
|
-
|
|
4694
|
+
|
|
4685
4695
|
var main = $(TEMPLATE_MAIN);
|
|
4686
4696
|
main.attr('id', attrs.id);
|
|
4687
|
-
|
|
4697
|
+
|
|
4688
4698
|
var menus = this.populateMenu(options, isVertical);
|
|
4689
4699
|
main.append(menus);
|
|
4690
4700
|
if (isVertical) {
|
|
4691
4701
|
main.append($('#navbar2 li:first').addClass('col-md-12 padding-0'));
|
|
4692
4702
|
}
|
|
4693
|
-
|
|
4703
|
+
|
|
4694
4704
|
var newElement = angular.element(main);
|
|
4695
4705
|
element.html('');
|
|
4696
4706
|
element.append(main);
|
|
4697
4707
|
element.attr('id', null);
|
|
4698
4708
|
$compile(newElement)(scope);
|
|
4699
|
-
|
|
4709
|
+
|
|
4700
4710
|
var multilevelAction = attrs.multilevelAction;
|
|
4701
|
-
|
|
4711
|
+
|
|
4702
4712
|
if (multilevelAction === 'hover') {
|
|
4703
4713
|
$('.dropdown-menu .dropdown-submenu').on('mouseover', function () {
|
|
4704
4714
|
var subMenu = $(this).children('ul.dropdown-menu');
|
|
4705
4715
|
subMenu.addClass('displayBlock');
|
|
4706
4716
|
});
|
|
4707
|
-
|
|
4717
|
+
|
|
4708
4718
|
$('.dropdown-menu .dropdown-submenu').on('mouseout', function () {
|
|
4709
4719
|
var subMenu = $(this).children('ul.dropdown-menu');
|
|
4710
4720
|
subMenu.removeClass('displayBlock');
|
|
@@ -4723,7 +4733,7 @@
|
|
|
4723
4733
|
return false;
|
|
4724
4734
|
});
|
|
4725
4735
|
}
|
|
4726
|
-
|
|
4736
|
+
|
|
4727
4737
|
});
|
|
4728
4738
|
}
|
|
4729
4739
|
}
|
|
@@ -4758,9 +4768,9 @@
|
|
|
4758
4768
|
|
|
4759
4769
|
function inicio(items) {
|
|
4760
4770
|
let x = false;
|
|
4761
|
-
|
|
4771
|
+
|
|
4762
4772
|
for (let i in items) {
|
|
4763
|
-
|
|
4773
|
+
|
|
4764
4774
|
let action = items[i].action;
|
|
4765
4775
|
if (action && action != "") {
|
|
4766
4776
|
action = action.replace("cronapi.screen.changeView('", '');
|
|
@@ -4769,11 +4779,11 @@
|
|
|
4769
4779
|
} else {
|
|
4770
4780
|
action = null
|
|
4771
4781
|
}
|
|
4772
|
-
|
|
4782
|
+
|
|
4773
4783
|
if (items[i].level === 1) {
|
|
4774
4784
|
arrayPaiBreadcrumb = [];
|
|
4775
4785
|
}
|
|
4776
|
-
|
|
4786
|
+
|
|
4777
4787
|
if (arrayPaiBreadcrumb.length != 0 && items[i].level === arrayPaiBreadcrumb[arrayPaiBreadcrumb.length - 1].level) {
|
|
4778
4788
|
if (!action) {
|
|
4779
4789
|
arrayPaiBreadcrumb[arrayPaiBreadcrumb.length - 1] = {
|
|
@@ -4781,16 +4791,16 @@
|
|
|
4781
4791
|
title: items[i].title,
|
|
4782
4792
|
href: '#'
|
|
4783
4793
|
};
|
|
4784
|
-
|
|
4794
|
+
|
|
4785
4795
|
} else if (action) {
|
|
4786
4796
|
arrayPaiBreadcrumb[arrayPaiBreadcrumb.length - 1] = {
|
|
4787
4797
|
level: items[i].level,
|
|
4788
4798
|
title: items[i].title,
|
|
4789
4799
|
href: document.location.origin + '/' + action.join("/")
|
|
4790
4800
|
};
|
|
4791
|
-
|
|
4801
|
+
|
|
4792
4802
|
}
|
|
4793
|
-
|
|
4803
|
+
|
|
4794
4804
|
} else {
|
|
4795
4805
|
if (!action) {
|
|
4796
4806
|
arrayPaiBreadcrumb.push({
|
|
@@ -4806,10 +4816,10 @@
|
|
|
4806
4816
|
});
|
|
4807
4817
|
}
|
|
4808
4818
|
}
|
|
4809
|
-
|
|
4819
|
+
|
|
4810
4820
|
if (items[i].menuItems.length > 0) {
|
|
4811
4821
|
inicio(items[i].menuItems);
|
|
4812
|
-
|
|
4822
|
+
|
|
4813
4823
|
} else {
|
|
4814
4824
|
if (action) {
|
|
4815
4825
|
if (action[action.length - 1] === page[page.length - 1]) {
|
|
@@ -4817,10 +4827,10 @@
|
|
|
4817
4827
|
}
|
|
4818
4828
|
}
|
|
4819
4829
|
}
|
|
4820
|
-
|
|
4830
|
+
|
|
4821
4831
|
if (x) {
|
|
4822
4832
|
for (let y in arrayPaiBreadcrumb) {
|
|
4823
|
-
|
|
4833
|
+
|
|
4824
4834
|
if (y == 0 && arrayPaiBreadcrumb[y].level == 1) {
|
|
4825
4835
|
breadcrumb.push({
|
|
4826
4836
|
type: "rootitem",
|
|
@@ -4847,7 +4857,7 @@
|
|
|
4847
4857
|
})
|
|
4848
4858
|
}
|
|
4849
4859
|
}
|
|
4850
|
-
|
|
4860
|
+
|
|
4851
4861
|
return breadcrumb
|
|
4852
4862
|
}
|
|
4853
4863
|
}
|
|
@@ -4880,7 +4890,7 @@
|
|
|
4880
4890
|
let blocklyPackage = shortVersion.split("').names")[0];
|
|
4881
4891
|
blocklyPackage = blocklyPackage.split("').attr()")[0];
|
|
4882
4892
|
let blocklyParams = shortVersion.split('.run')[1];
|
|
4883
|
-
evaluated = await scope.$eval(blocklyPackage + blocklyParams);
|
|
4893
|
+
evaluated = await scope.$eval(blocklyPackage + blocklyParams);
|
|
4884
4894
|
} else {
|
|
4885
4895
|
evaluated = scope.$eval(attrs.ngInitialValue);
|
|
4886
4896
|
}
|
|
@@ -5099,7 +5109,7 @@
|
|
|
5099
5109
|
restrict: 'EA',
|
|
5100
5110
|
replace: true,
|
|
5101
5111
|
link: function (scope, element, attrs, ngModelCtrl) {
|
|
5102
|
-
|
|
5112
|
+
|
|
5103
5113
|
let attributeValue = attrs.attributeValue;
|
|
5104
5114
|
let orderedAttributeValue = attrs.orderedAttributeValue
|
|
5105
5115
|
let listType = attrs.listType;
|
|
@@ -5107,21 +5117,21 @@
|
|
|
5107
5117
|
content = $(content);
|
|
5108
5118
|
let templateDyn = '';
|
|
5109
5119
|
let contentUL = '';
|
|
5110
|
-
|
|
5120
|
+
|
|
5111
5121
|
$.each(content, function (i, item) {
|
|
5112
5122
|
contentUL = contentUL + item.outerHTML;
|
|
5113
5123
|
});
|
|
5114
|
-
|
|
5124
|
+
|
|
5115
5125
|
switch (listType) {
|
|
5116
5126
|
case 'numbered-list':
|
|
5117
5127
|
templateDyn = `<ol style="list-style-type: ${attributeValue}">${contentUL}</ol>`
|
|
5118
5128
|
break
|
|
5119
|
-
|
|
5129
|
+
|
|
5120
5130
|
case 'ordered-list':
|
|
5121
5131
|
templateDyn = `<ul style="list-style-type: ${orderedAttributeValue}">${contentUL}</ul>`
|
|
5122
5132
|
break
|
|
5123
5133
|
}
|
|
5124
|
-
|
|
5134
|
+
|
|
5125
5135
|
templateDyn = $(templateDyn);
|
|
5126
5136
|
$(element).replaceWith(templateDyn);
|
|
5127
5137
|
$compile(templateDyn)(scope);
|
package/package.json
CHANGED
package/v10.22.1
DELETED
|
File without changes
|