cronapp-framework-js 2.9.6-SP.9 → 3.0.0

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 (65) hide show
  1. package/components/crn-calendar.components.json +1 -0
  2. package/components/crn-dynamic-image.components.json +8 -0
  3. package/components/crn-enterprise-combobox-multiple.components.json +7 -0
  4. package/components/crn-image.components.json +3 -0
  5. package/components/crn-navbar.components.json +1 -20
  6. package/components/templates/navbar.template.html +8 -7
  7. package/css/app.css +4 -0
  8. package/css/themes/custom/aquamarine/navbar-aquamarine.css +2 -1
  9. package/css/themes/custom/cerulean/navbar-cerulean.css +2 -1
  10. package/css/themes/custom/cosmo/navbar-cosmo.css +2 -1
  11. package/css/themes/custom/cyborg/custom-cyborg.css +3 -1
  12. package/css/themes/custom/cyborg/navbar-cyborg.css +2 -1
  13. package/css/themes/custom/darkly/custom-darkly.css +3 -1
  14. package/css/themes/custom/darkly/navbar-darkly.css +2 -1
  15. package/css/themes/custom/flatly/navbar-flatly.css +2 -1
  16. package/css/themes/custom/fuse/navbar-fuse.css +2 -1
  17. package/css/themes/custom/krypton/custom-krypton.css +2 -1
  18. package/css/themes/custom/material/navbar-material.css +2 -1
  19. package/css/themes/custom/material-round/custom-material-round.css +899 -30
  20. package/css/themes/custom/material-round/grid-material-round.css +231 -8
  21. package/css/themes/custom/material-round/navbar-material-round.css +15 -5
  22. package/css/themes/custom/material-round/panel-material-round.css +4 -4
  23. package/css/themes/custom/sandstone/navbar-sandstone.css +2 -1
  24. package/css/themes/custom/slate/custom-slate.css +3 -1
  25. package/css/themes/custom/slate/navbar-slate.css +2 -1
  26. package/css/themes/custom/superhero/custom-superhero.css +3 -1
  27. package/css/themes/custom/superhero/navbar-superhero.css +2 -1
  28. package/css/themes/custom/theme-general/theme-general.css +1 -1
  29. package/css/themes/custom/united/navbar-united.css +2 -1
  30. package/css/themes/custom/yeti/navbar-yeti.css +2 -1
  31. package/dist/components/templates/navbar.template.html +1 -1
  32. package/dist/css/app.css +1 -1
  33. package/dist/css/themes/custom/aquamarine/navbar-aquamarine.css +1 -1
  34. package/dist/css/themes/custom/cerulean/navbar-cerulean.css +1 -1
  35. package/dist/css/themes/custom/cosmo/navbar-cosmo.css +1 -1
  36. package/dist/css/themes/custom/cyborg/custom-cyborg.css +1 -1
  37. package/dist/css/themes/custom/cyborg/navbar-cyborg.css +1 -1
  38. package/dist/css/themes/custom/darkly/custom-darkly.css +1 -1
  39. package/dist/css/themes/custom/darkly/navbar-darkly.css +1 -1
  40. package/dist/css/themes/custom/flatly/navbar-flatly.css +1 -1
  41. package/dist/css/themes/custom/fuse/navbar-fuse.css +1 -1
  42. package/dist/css/themes/custom/krypton/custom-krypton.css +1 -1
  43. package/dist/css/themes/custom/material/navbar-material.css +1 -1
  44. package/dist/css/themes/custom/material-round/custom-material-round.css +1 -1
  45. package/dist/css/themes/custom/material-round/grid-material-round.css +1 -1
  46. package/dist/css/themes/custom/material-round/navbar-material-round.css +1 -1
  47. package/dist/css/themes/custom/material-round/panel-material-round.css +1 -1
  48. package/dist/css/themes/custom/sandstone/navbar-sandstone.css +1 -1
  49. package/dist/css/themes/custom/slate/custom-slate.css +1 -1
  50. package/dist/css/themes/custom/slate/navbar-slate.css +1 -1
  51. package/dist/css/themes/custom/superhero/custom-superhero.css +1 -1
  52. package/dist/css/themes/custom/superhero/navbar-superhero.css +1 -1
  53. package/dist/css/themes/custom/theme-general/theme-general.css +1 -1
  54. package/dist/css/themes/custom/united/navbar-united.css +1 -1
  55. package/dist/css/themes/custom/yeti/navbar-yeti.css +1 -1
  56. package/dist/i18n/locale_en_us.json +3 -1
  57. package/dist/i18n/locale_pt_br.json +3 -1
  58. package/dist/js/app.js +1 -1
  59. package/dist/js/directives.js +10 -10
  60. package/i18n/locale_en_us.json +3 -1
  61. package/i18n/locale_pt_br.json +3 -1
  62. package/js/app.js +5 -1
  63. package/js/directives.js +122 -163
  64. package/package.json +9 -4
  65. package/postupdate.json +8 -0
@@ -152,5 +152,7 @@
152
152
  "clear": "Clear",
153
153
  "noDataFound": "No data found",
154
154
  "yes": "Yes",
155
- "no": "No"
155
+ "no": "No",
156
+ "Datasource.Error": "Error",
157
+ "Datasource.Duplicate": "There is more than one data source with the same name, use a unique name for each, check if there is a modal with the data source that has the name: "
156
158
  }
@@ -152,5 +152,7 @@
152
152
  "clear": "Limpar",
153
153
  "noDataFound": "Nenhum dado encontrado",
154
154
  "yes": "Sim",
155
- "no": "Não"
155
+ "no": "Não",
156
+ "Datasource.Error": "Erro",
157
+ "Datasource.Duplicate": "Existem mais de uma fonte de dados com o mesmo nome, utilize nome único para cada, verifique se existe modal com a fonte de dados que tenha o nome: "
156
158
  }
package/js/app.js CHANGED
@@ -546,7 +546,11 @@ window.camelCaseToSentenceCase = function(str){
546
546
  const keyCodeFormActions = {
547
547
  initialize: () => $(document).on("keypress", "form[crn-datasource]", keyCodeFormActions.handle),
548
548
  handle: (e) => !keyCodeFormActions[e.keyCode || e.which] || keyCodeFormActions[e.keyCode || e.which](e),
549
- 13: (e) => e.preventDefault()
549
+ 13: (e) => {
550
+ if (!e.target || e.target.type !== 'textarea') {
551
+ e.preventDefault();
552
+ }
553
+ }
550
554
  };
551
555
  keyCodeFormActions.initialize();
552
556
 
package/js/directives.js CHANGED
@@ -102,11 +102,11 @@
102
102
  const expressionOnChange = options.expressionOnChange;
103
103
  const expressionOnNavigate = options.expressionOnNavigate;
104
104
 
105
- const initialDate = expressionInitialDate ? await scope.$eval(generateBlocklyCall(expressionInitialDate)) : new Date();
106
- const selectDates = (expressionSelectDates && options.isSelectableMultiple) ? await scope.$eval(generateBlocklyCall(expressionSelectDates)) : [];
107
- const disableDates = expressionDisableDates ? await scope.$eval(generateBlocklyCall(expressionDisableDates)) : null;
108
- const min = expressionMinDate ? await scope.$eval(generateBlocklyCall(expressionMinDate)) : new Date(1900, 0, 1);
109
- const max = expressionMaxDate ? await scope.$eval(generateBlocklyCall(expressionMaxDate)) : new Date(2099, 11, 31);
105
+ const initialDate = expressionInitialDate ? await scope.$eval(generateBlocklyCall(expressionInitialDate, true)) : new Date();
106
+ const selectDates = (expressionSelectDates && options.isSelectableMultiple) ? await scope.$eval(generateBlocklyCall(expressionSelectDates, true)) : [];
107
+ const disableDates = expressionDisableDates ? await scope.$eval(generateBlocklyCall(expressionDisableDates, true)) : null;
108
+ const min = expressionMinDate ? await scope.$eval(generateBlocklyCall(expressionMinDate, true)) : new Date(1900, 0, 1);
109
+ const max = expressionMaxDate ? await scope.$eval(generateBlocklyCall(expressionMaxDate), true) : new Date(2099, 11, 31);
110
110
 
111
111
  cronCalendarElement.kendoCalendar({
112
112
  culture: culture.startsWith('pt') ? 'pt-BR' : 'en-US',
@@ -221,7 +221,7 @@
221
221
 
222
222
  app.directive('textarea', transformText);
223
223
 
224
- var generateBlocklyCall = function(blocklyInfo) {
224
+ var generateBlocklyCall = function(blocklyInfo, hasToPromise) {
225
225
  var call = "";
226
226
  if (!blocklyInfo) return call;
227
227
 
@@ -238,7 +238,7 @@
238
238
  }
239
239
  else if (blocklyInfo.type == "server") {
240
240
  var blocklyName = blocklyInfo.blocklyClass + '.' + blocklyInfo.blocklyMethod;
241
- call = "cronapi.server('"+blocklyName+"')";
241
+ call = "cronapi.server('"+blocklyName+"')" + (hasToPromise ? '.toPromise()' : '');
242
242
 
243
243
  var params = "";
244
244
  blocklyInfo.blocklyParams.forEach(function(p) {
@@ -355,7 +355,7 @@
355
355
  var required = (attr.ngRequired && attr.ngRequired == "true"?"required":"");
356
356
  var content = element.html();
357
357
  const objectFit = attr.objectFit || 'unset';
358
- let templateDyn =`<div ngf-drop="" ngf-drag-over-class="dragover" style="display: flex; justify-content: center; width: 100%; height: 100%; ">
358
+ let templateDyn =`<div ngf-drop="" ngf-drag-over-class="dragover" style="display: flex; justify-content: center; width: 100%; height: 100%; position: relative; ">
359
359
  <img alt="$picture$" style="width: 100%; object-fit: ${objectFit}" ng-if="$ngModel$"
360
360
  data-ng-src="{{$ngModel$.startsWith(\'http\') || ($ngModel$.startsWith(\'/\') && $ngModel$.length < 1000)? $ngModel$ : \'data:image/png;base64,\' + $ngModel$}}">
361
361
  <input id="$id$" aria-label="$userHtml$" ng-if="!$ngModel$" autocomplete="off" tabindex="-1"
@@ -394,6 +394,12 @@
394
394
  .split('$picture$').join($translate.instant(imgAltText))
395
395
  );
396
396
 
397
+ var readOnly = attr.readOnly == 'true';
398
+ if (readOnly) {
399
+ templateDyn.find('.remove-image-button').remove();
400
+ templateDyn.find('.start-camera-button-attribute').remove();
401
+ }
402
+
397
403
  element.html(templateDyn);
398
404
  $compile(templateDyn)(element.scope());
399
405
  }
@@ -650,7 +656,12 @@
650
656
  $element.hide();
651
657
  }
652
658
  if (!enabled) {
653
- $element.find('*').addBack().attr('disabled', true).off('click').on('click', e => e.preventDefault());
659
+ $element.find('*')
660
+ .addBack()
661
+ .css('pointer-events', 'none')
662
+ .attr('disabled', true)
663
+ .off('click')
664
+ .on('click', e => e.preventDefault());
654
665
  }
655
666
  if (!render) {
656
667
  $element.remove();
@@ -1288,7 +1299,7 @@
1288
1299
  var tinyMCEOptions = {
1289
1300
  menubar: false,
1290
1301
  statusbar: false,
1291
- plugins: "bdesk_photo advlist anchor autolink autoresize autosave charmap code colorpicker contextmenu directionality emoticons fullpage fullscreen hr image imagetools importcss insertdatetime legacyoutput link lists media nonbreaking noneditable pagebreak paste preview print save searchreplace tabfocus table template toc visualblocks visualchars wordcount tiny_mce_wiris",
1302
+ plugins: "bdesk_photo advlist anchor autolink autoresize autosave charmap code colorpicker contextmenu directionality emoticons fullpage fullscreen hr image imagetools importcss insertdatetime legacyoutput link lists media nonbreaking noneditable pagebreak paste preview print save searchreplace tabfocus table template toc visualblocks visualchars wordcount tiny_mce_wiris colorpicker textcolor",
1292
1303
  toolbar: "",
1293
1304
  content_style: ""
1294
1305
  };
@@ -1299,6 +1310,8 @@
1299
1310
  tinyMCEOptions.toolbar += " " + toolbarGroup[key];
1300
1311
  }
1301
1312
  }
1313
+
1314
+ tinyMCEOptions.toolbar += " forecolor backcolor ";
1302
1315
  tinyMCEOptions.menubar = optionsSelected.showMenuBar;
1303
1316
  tinyMCEOptions.statusbar = optionsSelected.showStatusBar;
1304
1317
  tinyMCEOptions.content_style = optionsSelected.contentStyle;
@@ -1550,8 +1563,8 @@
1550
1563
  return datasource.active;
1551
1564
  }
1552
1565
  },
1553
- getSchedulerProperties: function(options, datasource, scope) {
1554
- let schedulerStartDate = (options.initialDateStrategy === 'Expression' ? scope.$eval(generateBlocklyCall(options.initialDateBlocklyInfo)) : options.initialDate);
1566
+ getSchedulerProperties: async function(options, datasource, scope) {
1567
+ let schedulerStartDate = (options.initialDateStrategy === 'Expression' ? await scope.$eval(generateBlocklyCall(options.initialDateBlocklyInfo, true)) : options.initialDate);
1555
1568
  let lastSearchedPeriod = {start: null, end: null};
1556
1569
 
1557
1570
  let needsToFetchData = function(searchablePeriod) {
@@ -1988,11 +2001,11 @@
1988
2001
 
1989
2002
  this.initCulture();
1990
2003
 
1991
- $.getScript(baseUrl, function() {
2004
+ $.getScript(baseUrl, async function() {
1992
2005
 
1993
2006
  let kendoDatasource = app.kendoHelper.getDataSource(options.dataSourceScreen.entityDataSource, scope, true, options.dataSourceScreen.rowsPerPage);
1994
2007
 
1995
- let schedulerProperties = this.getSchedulerProperties(options, datasource, scope);
2008
+ let schedulerProperties = await this.getSchedulerProperties(options, datasource, scope);
1996
2009
 
1997
2010
  schedulerElement.kendoScheduler(schedulerProperties);
1998
2011
 
@@ -3470,6 +3483,10 @@
3470
3483
  }
3471
3484
 
3472
3485
  $element = $(element);
3486
+ let $grid = $element.find('[data-role="grid"]');
3487
+ if ($grid.length) {
3488
+ $element = $grid;
3489
+ }
3473
3490
  let style = $element.attr("style")||"";
3474
3491
  if (style) {
3475
3492
  style += ", ";
@@ -4216,7 +4233,13 @@
4216
4233
  value = null;
4217
4234
  }
4218
4235
 
4219
- await combobox.value(value);
4236
+ let comboValue = combobox.value();
4237
+ comboValue = comboValue !== undefined && comboValue !== null ? comboValue.trim() : comboValue;
4238
+ let valueToCheck = value !== undefined && value !== null ? ('' + value).trim() : value;
4239
+
4240
+ if (valueToCheck !== comboValue) {
4241
+ await combobox.value(value);
4242
+ }
4220
4243
 
4221
4244
  if (select.changeCursor) {
4222
4245
  scope.safeApply(() => {
@@ -4580,11 +4603,21 @@
4580
4603
 
4581
4604
  }.bind(relactionDS);
4582
4605
 
4606
+ var hideSelectedItem = attrs.crnHideSelectedItem == 'true';
4607
+ var onSelectedItem = () => {
4608
+ if (hideSelectedItem) {
4609
+ if (combobox.list && combobox.list.length > 0) {
4610
+ combobox.list.find('.k-item').show();
4611
+ combobox.list.find('.k-item.k-state-selected').hide();
4612
+ }
4613
+ }
4614
+ }
4615
+
4583
4616
  options['change'] = attrs.ngChange ? function (){_scope.$eval(attrs.ngChange)}: undefined;
4584
4617
  options['close'] = attrs.ngClose ? function (){_scope.$eval(attrs.ngClose)}: undefined;
4585
4618
  options['dataBound'] = attrs.ngDatabound ? function (){_scope.$eval(attrs.ngDatabound)}: undefined;
4586
4619
  options['filtering'] = attrs.ngFiltering ? function (){_scope.$eval(attrs.ngFiltering)}: undefined;
4587
- options['open'] = attrs.ngOpen ? function (){_scope.$eval(attrs.ngOpen)}: undefined;
4620
+ options['open'] = attrs.ngOpen ? function (){_scope.$eval(attrs.ngOpen); onSelectedItem();}: onSelectedItem;
4588
4621
  options['cascade'] = attrs.ngCascade ? function (){_scope.$eval(attrs.ngCascade)}: undefined;
4589
4622
  evtSelect = attrs.ngSelect ? function (){_scope.$eval(attrs.ngSelect)}: undefined;
4590
4623
  deselect = attrs.ngDeselect ? function (){_scope.$eval(attrs.ngDeselect)}: undefined;
@@ -5242,165 +5275,91 @@
5242
5275
  replace: true,
5243
5276
  link: function (scope, element, attrs) {
5244
5277
 
5245
- let crnDelimiterIcon = attrs.crnDelimiterIcon;
5246
- let crnTypeMenu = attrs.typeMenu;
5247
- let idMenu = attrs.idMenu ? attrs.idMenu : null;
5248
- let breadcrumb = [];
5249
- let actionBlockly = attrs.ngInit ? attrs.ngInit : null;
5250
- let idBreadcrumb = attrs.id;
5251
- let arrayPaiBreadcrumb = [];
5278
+ var bcAction = attrs.ngInit ? attrs.ngInit : null;
5279
+ const bcDelimiterIcon = attrs.crnDelimiterIcon;
5280
+ const bcTypeMenu = attrs.typeMenu;
5281
+ const bcMenuId = attrs.idMenu ? attrs.idMenu : null;
5282
+ const bcId = attrs.id;
5283
+ const bcIconRoot = attrs.breadcrumbIcon ? attrs.breadcrumbIcon : null;
5284
+ const bcList = [];
5252
5285
 
5253
- let iconRoot = attrs.breadcrumbIcon ? attrs.breadcrumbIcon : null;
5286
+ const fillAction = async () => {
5287
+ const shortVersion = bcAction.replace("cronapi.client('js.", 'blockly.js.');
5288
+ bcAction = shortVersion.replace("').run()", '');
5289
+ bcAction = scope.$eval(bcAction);
5290
+ bcList = await bcAction();
5254
5291
 
5255
- async function functionActionBlockly() {
5256
- let shortVersion = actionBlockly.replace("cronapi.client('js.", 'blockly.js.');
5257
- actionBlockly = shortVersion.replace("').run()", '');
5258
- actionBlockly = scope.$eval(actionBlockly);
5259
- breadcrumb = await actionBlockly();
5260
-
5261
- var onclick = async (e) => {
5262
- if (e.item.action) {
5263
- e.item.action();
5264
- }
5265
- };
5292
+ const onclick = async (e) => {
5293
+ if (e.item.action) {
5294
+ e.item.action();
5295
+ }
5296
+ };
5266
5297
 
5267
- $(`#${idBreadcrumb}`).kendoBreadcrumb({
5268
- items: breadcrumb,
5269
- delimiterIcon: crnDelimiterIcon,
5270
- navigational: true,
5271
- click : onclick
5272
- });
5298
+ $(`#${bcId}`).kendoBreadcrumb({
5299
+ items: bcList,
5300
+ delimiterIcon: bcDelimiterIcon,
5301
+ navigational: true,
5302
+ click : onclick
5303
+ });
5273
5304
  }
5274
5305
 
5306
+ const clearAction = (action) => {
5307
+ if (action) {
5308
+ return action.replace("cronapi.screen.changeView('", '').replace("', [])", '');
5309
+ }
5310
+ return "#/home";
5311
+ }
5275
5312
 
5276
- if (actionBlockly && crnTypeMenu === "idBloco") {
5277
- functionActionBlockly()
5278
-
5313
+ if (bcAction && bcTypeMenu === "idBloco") {
5314
+ fillAction();
5279
5315
  } else {
5280
- setTimeout(() => {
5281
- // Capturar o json do menu
5282
- let menuOptions = $(`#${idMenu}`)[0].parentElement.attributes['options'];
5283
- menuOptions = JSON.parse(menuOptions.value);
5284
- let subMenuOptions = menuOptions.subMenuOptions;
5285
-
5286
- // Capturar a url da pagina
5287
- let page = document.location.hash;
5288
- if (page === "") {
5289
- page = "home"
5290
- } else {
5291
- page = page.split("/");
5292
- }
5293
-
5294
- inicio(subMenuOptions);
5295
-
5296
- function inicio(items) {
5297
- let x = false;
5298
-
5299
- for (let i in items) {
5300
-
5301
- let action = items[i].action;
5302
- if (action && action != "") {
5303
- action = action.replace("cronapi.screen.changeView('", '');
5304
- action = action.replace("', [])", '')
5305
- action = action.split("/");
5306
- } else {
5307
- action = null
5308
- }
5309
-
5310
- if (items[i].level === 1) {
5311
- arrayPaiBreadcrumb = [];
5312
- }
5313
-
5314
- if (arrayPaiBreadcrumb.length != 0 && items[i].level === arrayPaiBreadcrumb[arrayPaiBreadcrumb.length - 1].level) {
5315
- if (!action) {
5316
- arrayPaiBreadcrumb[arrayPaiBreadcrumb.length - 1] = {
5317
- level: items[i].level,
5318
- title: items[i].title,
5319
- href: '#'
5320
- };
5321
-
5322
- } else if (action) {
5323
- arrayPaiBreadcrumb[arrayPaiBreadcrumb.length - 1] = {
5324
- level: items[i].level,
5325
- title: items[i].title,
5326
- href: document.location.origin + '/' + action.join("/")
5327
- };
5328
-
5329
- }
5330
-
5331
- } else {
5332
- if (!action) {
5333
- arrayPaiBreadcrumb.push({
5334
- level: items[i].level,
5335
- title: items[i].title,
5336
- href: '#'
5337
- });
5338
- } else if (action) {
5339
- arrayPaiBreadcrumb.push({
5340
- level: items[i].level,
5341
- title: items[i].title,
5342
- href: document.location.origin + '/' + action.join("/")
5343
- });
5344
- }
5345
- }
5346
-
5347
- if (items[i].menuItems.length > 0) {
5348
- let result = inicio(items[i].menuItems);
5349
- if (result && result.length > 0) {
5350
- break;
5351
- }
5352
-
5353
- } else {
5354
- if (action) {
5355
- if (action[action.length - 1] === page[page.length - 1] || action[action.length - 1] === page) {
5356
- if (!$rootScope.__lastCronappMenuClick || $rootScope.__lastCronappMenuClick === items[i].id) {
5357
- x = true;
5316
+ var observer = new MutationObserver((mutation, observer) => {
5317
+ const $parent = $(`#${bcMenuId}`).parent();
5318
+ const attrOptions = $parent.attr('options');
5319
+ if (attrOptions) {
5320
+ observer.disconnect(); // stop observing
5321
+
5322
+ const options = JSON.parse(attrOptions);
5323
+ const page = document.location.hash || 'home';
5324
+
5325
+ const findTrace = (array, action, path = []) => {
5326
+ for (let i = 0; i < array.length; i++) {
5327
+ var item = array[i];
5328
+ item.action = clearAction(item.action);
5329
+ if (item.action === action) {
5330
+ return [...path, item];
5331
+ }
5332
+ if (item.menuItems) {
5333
+ const result = findTrace(item.menuItems, action, [...path, item]);
5334
+ if (result) {
5335
+ return result;
5336
+ }
5358
5337
  }
5359
5338
  }
5339
+ return null;
5360
5340
  }
5361
- }
5362
5341
 
5363
- if (x) {
5364
- for (let y in arrayPaiBreadcrumb) {
5365
-
5366
- if (y == 0 && arrayPaiBreadcrumb[y].level == 1) {
5367
- breadcrumb.push({
5368
- type: "rootitem",
5369
- href: arrayPaiBreadcrumb[y].href,
5370
- text: arrayPaiBreadcrumb[y].title,
5371
- showText: true,
5372
- showIcon: false
5373
- })
5374
- } else if (y == 0 && arrayPaiBreadcrumb[y].level != 1) {
5375
- breadcrumb.push({
5376
- type: "rootitem",
5377
- href: arrayPaiBreadcrumb[y].href,
5378
- text: arrayPaiBreadcrumb[y].title,
5379
- showText: true,
5380
- showIcon: false
5381
- })
5382
- } else {
5383
- breadcrumb.push({
5384
- type: "item",
5385
- href: arrayPaiBreadcrumb[y].href,
5386
- text: arrayPaiBreadcrumb[y].title,
5387
- showText: true,
5388
- showIcon: false
5389
- })
5390
- }
5342
+ const trace = findTrace(options.subMenuOptions, page);
5343
+ if (trace) {
5344
+ for (var index in trace) {
5345
+ const item = trace[index];
5346
+ bcList.push({
5347
+ type: index == 0 ? 'rootitem' : 'item',
5348
+ href: item.action,
5349
+ text: item.title,
5350
+ showText: true,
5351
+ showIcon: false
5352
+ });
5353
+ }
5354
+ $(`#${bcId}`).kendoBreadcrumb({
5355
+ items: bcList,
5356
+ delimiterIcon: bcDelimiterIcon,
5357
+ navigational: true
5358
+ });
5391
5359
  }
5392
- return breadcrumb
5393
- }
5394
5360
  }
5395
- }
5396
-
5397
- $(`#${idBreadcrumb}`).kendoBreadcrumb({
5398
- items: breadcrumb,
5399
- delimiterIcon: crnDelimiterIcon,
5400
- navigational: true
5401
- });
5402
-
5403
- }, 800);
5361
+ });
5362
+ observer.observe(document.body, { childList : true});
5404
5363
  }
5405
5364
  }
5406
5365
  }
@@ -5424,7 +5383,7 @@
5424
5383
  let blocklyParams = shortVersion.split('.run')[1];
5425
5384
  evaluated = await scope.$eval(blocklyPackage + blocklyParams);
5426
5385
  } else {
5427
- evaluated = scope.$eval(attrs.ngInitialValue);
5386
+ evaluated = scope.$eval(attrs.ngInitialValue) || attrs.ngInitialValue;
5428
5387
  }
5429
5388
  } catch (e) {
5430
5389
  evaluated = attrs.ngInitialValue;
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "cronapp-framework-js",
3
- "version": "2.9.6-SP.9",
3
+ "version": "3.0.0",
4
4
  "description": "Javascript library for CronApp's projects",
5
5
  "main": "cronapp.framework.js",
6
6
  "scripts": {
7
7
  "build": "npm i && gulp",
8
- "test": "echo \"Error: no test specified\" && exit 1"
8
+ "test": "echo \"Error: no test specified\" && exit 1",
9
+ "preinstall": "npx force-resolutions"
9
10
  },
10
11
  "repository": {
11
12
  "type": "git",
@@ -63,14 +64,18 @@
63
64
  "angular-ui-notification": "0.3.6",
64
65
  "ui-select": "0.18.1",
65
66
  "bootstrap": "3.4.1",
66
- "chart.js": "2.7.0",
67
+ "chart.js": "2.9.4",
67
68
  "cpf_cnpj": "0.2.0",
68
69
  "font-awesome": "4.4.0",
69
70
  "jquery": "3.5.1",
70
71
  "justgage": "1.3.5",
71
- "moment": "2.29.1",
72
+ "moment": "2.29.4",
72
73
  "moment-timezone": "0.5.33",
73
74
  "ng-file-upload": "12.2.13",
74
75
  "signature_pad": "^3.0.0-beta.4"
76
+ },
77
+ "resolutions": {
78
+ "chart.js": "2.9.4",
79
+ "moment": "2.29.4"
75
80
  }
76
81
  }
package/postupdate.json CHANGED
@@ -387,6 +387,10 @@
387
387
  "old": "plugins/chart.js/dist/Chart.min.js",
388
388
  "new": "node_modules/chart.js/dist/Chart.min.js"
389
389
  },
390
+ {
391
+ "old": "node_modules/cronapp-lib-js/dist/js/chart.js/Chart.min.js",
392
+ "new": "node_modules/chart.js/dist/Chart.min.js"
393
+ },
390
394
  {
391
395
  "old": "plugins/angular-chart.js/dist/angular-chart.min.js",
392
396
  "new": "node_modules/angular-chart.js/dist/angular-chart.min.js"
@@ -471,6 +475,10 @@
471
475
  "old": "plugins/moment/min/moment-with-locales.min.js",
472
476
  "new": "node_modules/moment/min/moment-with-locales.min.js"
473
477
  },
478
+ {
479
+ "old": "node_modules/cronapp-lib-js/dist/js/moment/moment-with-locales.min.js",
480
+ "new": "node_modules/moment/min/moment-with-locales.min.js"
481
+ },
474
482
  {
475
483
  "old": "plugins/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js",
476
484
  "new": "node_modules/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js"