@sankhyalabs/sankhyablocks 1.0.8 → 1.0.9

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/dist/index.js CHANGED
@@ -12759,8 +12759,8 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
12759
12759
 
12760
12760
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
12761
12761
 
12762
- /**
12763
- * Classe com utiliários comuns para Strings.
12762
+ /**
12763
+ * Classe com utiliários comuns para Strings.
12764
12764
  */
12765
12765
  var StringUtils = /*#__PURE__*/function () {
12766
12766
  function StringUtils() {
@@ -12770,12 +12770,12 @@ var StringUtils = /*#__PURE__*/function () {
12770
12770
  _createClass(StringUtils, null, [{
12771
12771
  key: "isEmpty",
12772
12772
  value:
12773
- /**
12774
- * Verifica se a string está vazia.
12775
- * Valores null e undefined são considerados como vazio.
12776
- *
12777
- * @param value String para ser validada.
12778
- */
12773
+ /**
12774
+ * Verifica se a string está vazia.
12775
+ * Valores null e undefined são considerados como vazio.
12776
+ *
12777
+ * @param value String para ser validada.
12778
+ */
12779
12779
  function isEmpty(value) {
12780
12780
  if (value == undefined || value === null) {
12781
12781
  return true;
@@ -12790,11 +12790,11 @@ var StringUtils = /*#__PURE__*/function () {
12790
12790
 
12791
12791
  return false;
12792
12792
  }
12793
- /**
12794
- * Remove acentos de vogais, substitui Ç por c e retorna a string em caixa alta.
12795
- *
12796
- * @param value String para ser transformada.
12797
- */
12793
+ /**
12794
+ * Remove acentos de vogais, substitui Ç por c e retorna a string em caixa alta.
12795
+ *
12796
+ * @param value String para ser transformada.
12797
+ */
12798
12798
 
12799
12799
  }, {
12800
12800
  key: "replaceAccentuatedChars",
@@ -12822,7 +12822,7 @@ var StringUtils = /*#__PURE__*/function () {
12822
12822
  text = text.replace(/[Û]/, "U");
12823
12823
  text = text.replace(/[Ü]/, "U");
12824
12824
  text = text.replace(/[Ç]/, "C");
12825
- return text.replace(/[^a-z0-9]/gi, "");
12825
+ return text.replace(/[^a-z0-9]/gi, '');
12826
12826
  }
12827
12827
  }]);
12828
12828
 
@@ -12836,102 +12836,107 @@ function NumberUtils_createClass(Constructor, protoProps, staticProps) { if (pro
12836
12836
  function NumberUtils_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
12837
12837
 
12838
12838
  var NUMBERINPUTS_REGEX_SCIENTIFIC_PARTS = /^([+-])?(\d+).?(\d*)[eE]([-+]?\d+)$/;
12839
- /**
12840
- * `NumberUtils` é uma biblioteca para manipulação de números
12841
- *
12842
- * `Métodos`:
12843
- *
12844
- * @stringToNumber: converte um número em formato de string em um valor numérico nativo do javascript
12845
- * @format: arredonda um número em formato de string baseado nos parâmetros "presision" e "prettyPrecision";
12839
+ /**
12840
+ * `NumberUtils` é uma biblioteca para manipulação de números
12841
+ *
12842
+ * `Métodos`:
12843
+ *
12844
+ * @stringToNumber: converte um número em formato de string em um valor numérico nativo do javascript
12845
+ * @format: arredonda um número em formato de string baseado nos parâmetros "presision" e "prettyPrecision";
12846
12846
  */
12847
12847
 
12848
12848
  var NumberUtils = /*#__PURE__*/NumberUtils_createClass(function NumberUtils() {
12849
12849
  NumberUtils_classCallCheck(this, NumberUtils);
12850
12850
  });
12851
- /**
12852
- * @stringToNumber: converte um numero em formato de string em numero
12853
- *
12854
- * @param value numero em formato de string a ser convertido (Importante: formato PT-BR ou já em formato numérico: ######.##)
12855
- *
12856
- * @returns string based number
12857
- *
12858
- * @Exemples
12859
- * @"100,12" | 100.12
12860
- * @"100.12" | 100.12
12861
- * @"-100,12" | -100.12
12862
- * @"R$100,12" | 100.12
12863
- * @"-R$100,12" | -100.12
12864
- * @"string" | NaN
12865
- */
12851
+ /**
12852
+ * @stringToNumber: converte um numero em formato de string em numero
12853
+ *
12854
+ * @param value numero em formato de string a ser convertido (Importante: formato PT-BR ou já em formato numérico: ######.##)
12855
+ *
12856
+ * @returns string based number
12857
+ *
12858
+ * @Exemples
12859
+ * @"100,12" | 100.12
12860
+ * @"100.12" | 100.12
12861
+ * @"-100,12" | -100.12
12862
+ * @"R$100,12" | 100.12
12863
+ * @"-R$100,12" | -100.12
12864
+ * @"string" | NaN
12865
+ */
12866
12866
 
12867
12867
  NumberUtils.stringToNumber = function (value) {
12868
- if (value === "" || value === null || value === undefined) {
12868
+ if (value === '' || value === null || value === undefined) {
12869
12869
  return NaN;
12870
12870
  }
12871
12871
 
12872
+ ;
12873
+
12872
12874
  if (value) {
12873
12875
  value = value.toString();
12874
- var negative = value.charAt(0) === "-";
12876
+ var negative = value.charAt(0) === '-';
12875
12877
 
12876
12878
  if (!NUMBERINPUTS_REGEX_SCIENTIFIC_PARTS.test(value)) {
12877
- value = value.replace(/[^\d.,]/g, "");
12879
+ value = value.replace(/[^\d.,]/g, '');
12878
12880
  } else {
12879
- value = value.replace(/^-/g, "");
12881
+ value = value.replace(/^-/g, '');
12880
12882
  } //In case of simple string such as: "@@@@@@@"
12881
12883
 
12882
12884
 
12883
- if (value === "") {
12885
+ if (value === '') {
12884
12886
  return Number(NaN);
12885
12887
  }
12886
12888
 
12887
- var indexV = value.indexOf(",");
12888
- var indexP = value.indexOf(".");
12889
+ var indexV = value.indexOf(',');
12890
+ var indexP = value.indexOf('.');
12889
12891
 
12890
12892
  if (indexP > indexV) {
12891
- value = value.replace(",", "");
12893
+ value = value.replace(',', '');
12892
12894
  } else if (indexP < indexV) {
12893
- value = value.replace(/\./g, "@").replace(",", ".").replace(/@/g, "");
12895
+ value = value.replace(/\./g, '@').replace(',', '.').replace(/@/g, '');
12894
12896
  }
12895
12897
 
12896
12898
  if (negative) {
12897
- value = "-" + value;
12899
+ value = '-' + value;
12898
12900
  }
12899
12901
  }
12900
12902
 
12901
12903
  return Number(value);
12902
12904
  };
12903
- /**
12904
- * @format: converte um numero em formato de string em um numero em formato de string formatado de acordo com os parametros de "precision" e "prettyPrecision"
12905
- *
12906
- * @param value numero em formato de string a ser convertido (Importante: formato PT-BR ou já em formato numérico<sem separadors de milhares>: ######.##)
12907
- * @param precision (numero de decimais)
12908
- * @param prettyPrecision (numero de zeros nos decimais)
12909
- *
12910
- * @returns numero em formato de string formatado em PT-BR
12911
- */
12905
+ /**
12906
+ * @format: converte um numero em formato de string em um numero em formato de string formatado de acordo com os parametros de "precision" e "prettyPrecision"
12907
+ *
12908
+ * @param value numero em formato de string a ser convertido (Importante: formato PT-BR ou já em formato numérico<sem separadors de milhares>: ######.##)
12909
+ * @param precision (numero de decimais)
12910
+ * @param prettyPrecision (numero de zeros nos decimais)
12911
+ *
12912
+ * @returns numero em formato de string formatado em PT-BR
12913
+ */
12912
12914
 
12913
12915
 
12914
12916
  NumberUtils.format = function (value, precision) {
12915
12917
  var prettyPrecision = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : NaN;
12916
12918
 
12917
- if (value === "" || value === undefined || value === "NaN") {
12919
+ if (value === '' || value === undefined || value === "NaN") {
12918
12920
  return NaN.toString();
12919
12921
  }
12920
12922
 
12923
+ ;
12921
12924
  var newValue = NumberUtils.stringToNumber(value);
12922
12925
 
12923
12926
  if (newValue === NaN) {
12924
12927
  return NaN.toString();
12925
- } //Validation "precision":
12928
+ }
12929
+
12930
+ ; //Validation "precision":
12926
12931
  // Case1: precision < 0 => does not use precision
12927
12932
  // Case2: presicion not int => does not use precision
12928
12933
 
12929
-
12930
12934
  if (precision < 0 || Math.abs(Math.round(precision * 1) / 1) !== precision) {
12931
12935
  //Once stringToNumber returns number format, we need to change to pt-br
12932
12936
  return NumberUtils.changeFormat(newValue.toString());
12933
- } //Validation "prettyPrecision"
12937
+ }
12934
12938
 
12939
+ ; //Validation "prettyPrecision"
12935
12940
 
12936
12941
  var prettyPrecisionInternal = 0; // Case1: prettyPrecision < 0 => prettyPrecision does not change de format that means: prettyPrecisionInternal = precision;
12937
12942
  // Case2: prettyPrecision not int => prettyPrecision does not change de format that means: prettyPrecisionInternal = precision;
@@ -12943,7 +12948,7 @@ NumberUtils.format = function (value, precision) {
12943
12948
  }
12944
12949
 
12945
12950
  var newValueStr;
12946
- newValueStr = (Math.round(newValue * Math.pow(10, precision)) / Math.pow(10, precision)).toLocaleString("pt-br", {
12951
+ newValueStr = (Math.round(newValue * Math.pow(10, precision)) / Math.pow(10, precision)).toLocaleString('pt-br', {
12947
12952
  minimumFractionDigits: precision
12948
12953
  }); //prettyPrecision
12949
12954
 
@@ -12964,44 +12969,46 @@ NumberUtils.format = function (value, precision) {
12964
12969
 
12965
12970
  return newValueStr;
12966
12971
  };
12967
- /**
12968
- * @keepOnlyDecimalSeparator: retira os separadores de milhar de um número em formato de string
12969
- *
12970
- * @param value numero em formato de string a ser convertido
12971
- * @param formatnumber (formatação de ENTRADA e SAÍDA do utilitário: pt-BR="###.###,##" en-US="###,###.##"; Default: "pt-BR")
12972
- *
12973
- * @returns numero em formato de string formatado apenas com separador decimal
12974
- */
12972
+ /**
12973
+ * @keepOnlyDecimalSeparator: retira os separadores de milhar de um número em formato de string
12974
+ *
12975
+ * @param value numero em formato de string a ser convertido
12976
+ * @param formatnumber (formatação de ENTRADA e SAÍDA do utilitário: pt-BR="###.###,##" en-US="###,###.##"; Default: "pt-BR")
12977
+ *
12978
+ * @returns numero em formato de string formatado apenas com separador decimal
12979
+ */
12975
12980
 
12976
12981
 
12977
12982
  NumberUtils.keepOnlyDecimalSeparator = function (value) {
12978
- var formatnumber = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "pt-BR";
12983
+ var formatnumber = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'pt-BR';
12979
12984
  //Formatting formatnumber to be able to get lowercases
12980
12985
  formatnumber = formatnumber.toUpperCase(); //Formatting value following formatnumber parameter
12981
12986
  //keep only decimal character in order to correct format the string
12982
12987
  //This transformation is due the "stringtoNumber" method is a general method that tries to convert all formated strings
12983
12988
 
12984
- if (formatnumber === "EN-US") {
12985
- value = value.replace(/\,/g, "");
12989
+ if (formatnumber === 'EN-US') {
12990
+ value = value.replace(/\,/g, '');
12986
12991
  } else {
12987
- value = value.replace(/\./g, "");
12992
+ value = value.replace(/\./g, '');
12988
12993
  }
12989
12994
 
12990
12995
  return value;
12991
12996
  };
12992
- /**
12993
- * @changeFormat: troca o formato do numero string de "PT-BR" para "EN-US" e vice-versa
12994
- *
12995
- * @param value numero em formato de string a ser convertido
12996
- *
12997
- * @returns numero em formato de string formatado de "PT-BR" para "EN-US" e vice-versa
12998
- */
12997
+ /**
12998
+ * @changeFormat: troca o formato do numero string de "PT-BR" para "EN-US" e vice-versa
12999
+ *
13000
+ * @param value numero em formato de string a ser convertido
13001
+ *
13002
+ * @returns numero em formato de string formatado de "PT-BR" para "EN-US" e vice-versa
13003
+ */
12999
13004
 
13000
13005
 
13001
13006
  NumberUtils.changeFormat = function (value) {
13002
13007
  //Formatting output following formatnumber
13003
- return value.replace(/\./g, "_").replace(/\,/g, ".").replace(/\_/g, ",");
13008
+ return value.replace(/\./g, '_').replace(/\,/g, '.').replace(/\_/g, ',');
13004
13009
  };
13010
+
13011
+ ;
13005
13012
  ;// CONCATENATED MODULE: ../sankhyacore/dist/utils/MaskFormatter.js
13006
13013
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
13007
13014
 
@@ -13029,87 +13036,87 @@ function MaskFormatter_defineProperties(target, props) { for (var i = 0; i < pro
13029
13036
 
13030
13037
  function MaskFormatter_createClass(Constructor, protoProps, staticProps) { if (protoProps) MaskFormatter_defineProperties(Constructor.prototype, protoProps); if (staticProps) MaskFormatter_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
13031
13038
 
13032
- /**
13033
- * `MaskFormatter` é usado para formatar strings. Seu comportamento
13034
- * é controlado pela formato do atributo `mask` que especifica quais
13035
- * caracteres são válidos e onde devem estar posicionados, intercalando-os
13036
- * com eventuais caracteres literais expressados no padrão informado.
13037
- * Sua implementação é inspirada pela implementação em Java do [MaskFormatter](https://docs.oracle.com/javase/7/docs/api/javax/swing/text/MaskFormatter.html).
13038
- *
13039
- * Para o padrão da máscara podem ser usados os seguintes caracteres especiais:
13040
- *
13041
- * | Caractere | Comportamento |
13042
- * |:---------:|-------------------------------------------------------------------------------------------------------------|
13043
- * | # | Qualquer número |
13044
- * | ' | "Escapa" o caractere que vem na sequência. Útil quando desejamos converter um caractere especial em literal.|
13045
- * | U | Qualquer letra. Transforma letras maiúsculas em maiúsculas. |
13046
- * | L | Qualquer letra. Transforma letras maiúsculas em minúsculas. |
13047
- * | A | Qualquer letra ou número. |
13048
- * | ? | Qualquer letra. Preserva maiúsculas e minúsculas. |
13049
- * | * | Qualquer caractere. |
13050
- *
13051
- * Os demais caracteres presentes no padrão serão tratados como literais, isto é,
13052
- * serão apenas inseridos naquela posição.
13053
- *
13054
- * Quando o o valor a ser formatado é menor que a máscara um 'placeHolder'
13055
- * será inserido em cada posição ausente, completando a formatação.
13056
- * Por padrão será usado um espaço em branco como 'placeHolder' mas
13057
- * esse valor pode ser alterado.
13058
- *
13059
- * For por exemplo:
13060
- * '''
13061
- * const formatter: MaskFormatter = new MaskFormatter("###-####");
13062
- * formatter.placeholder = '_';
13063
- * console.log(formatter.format("123"));
13064
- * '''
13065
- * resultaria na string '123-____'.
13066
- *
13067
- * ##Veja mais alguns exemplos:
13068
- * |Padrão |Máscara |Entrada |Saída |
13069
- * |----------------|------------------|--------------|------------------|
13070
- * |Telefone |(##) ####-#### |3432192515 |(34) 3219-2515 |
13071
- * |CPF |###.###.###-## |12345678901 |123.456.789-01 |
13072
- * |CNPJ |##.###.###/####-##|12345678901234|12.345.678/9012-34|
13073
- * |CEP |##.###-### |12345678 |12.345-678 |
13074
- * |PLACA (veículo) |UUU-#### |abc1234 |ABC-1234 |
13075
- * |Cor RGB |'#AAAAAA |00000F0 |#0000F0 |
13076
- *
13039
+ /**
13040
+ * `MaskFormatter` é usado para formatar strings. Seu comportamento
13041
+ * é controlado pela formato do atributo `mask` que especifica quais
13042
+ * caracteres são válidos e onde devem estar posicionados, intercalando-os
13043
+ * com eventuais caracteres literais expressados no padrão informado.
13044
+ * Sua implementação é inspirada pela implementação em Java do [MaskFormatter](https://docs.oracle.com/javase/7/docs/api/javax/swing/text/MaskFormatter.html).
13045
+ *
13046
+ * Para o padrão da máscara podem ser usados os seguintes caracteres especiais:
13047
+ *
13048
+ * | Caractere | Comportamento |
13049
+ * |:---------:|-------------------------------------------------------------------------------------------------------------|
13050
+ * | # | Qualquer número |
13051
+ * | ' | "Escapa" o caractere que vem na sequência. Útil quando desejamos converter um caractere especial em literal.|
13052
+ * | U | Qualquer letra. Transforma letras maiúsculas em maiúsculas. |
13053
+ * | L | Qualquer letra. Transforma letras maiúsculas em minúsculas. |
13054
+ * | A | Qualquer letra ou número. |
13055
+ * | ? | Qualquer letra. Preserva maiúsculas e minúsculas. |
13056
+ * | * | Qualquer caractere. |
13057
+ *
13058
+ * Os demais caracteres presentes no padrão serão tratados como literais, isto é,
13059
+ * serão apenas inseridos naquela posição.
13060
+ *
13061
+ * Quando o o valor a ser formatado é menor que a máscara um 'placeHolder'
13062
+ * será inserido em cada posição ausente, completando a formatação.
13063
+ * Por padrão será usado um espaço em branco como 'placeHolder' mas
13064
+ * esse valor pode ser alterado.
13065
+ *
13066
+ * For por exemplo:
13067
+ * '''
13068
+ * const formatter: MaskFormatter = new MaskFormatter("###-####");
13069
+ * formatter.placeholder = '_';
13070
+ * console.log(formatter.format("123"));
13071
+ * '''
13072
+ * resultaria na string '123-____'.
13073
+ *
13074
+ * ##Veja mais alguns exemplos:
13075
+ * |Padrão |Máscara |Entrada |Saída |
13076
+ * |----------------|------------------|--------------|------------------|
13077
+ * |Telefone |(##) ####-#### |3432192515 |(34) 3219-2515 |
13078
+ * |CPF |###.###.###-## |12345678901 |123.456.789-01 |
13079
+ * |CNPJ |##.###.###/####-##|12345678901234|12.345.678/9012-34|
13080
+ * |CEP |##.###-### |12345678 |12.345-678 |
13081
+ * |PLACA (veículo) |UUU-#### |abc1234 |ABC-1234 |
13082
+ * |Cor RGB |'#AAAAAA |00000F0 |#0000F0 |
13083
+ *
13077
13084
  */
13078
13085
  var MaskFormatter = /*#__PURE__*/function () {
13079
13086
  function MaskFormatter(mask) {
13080
13087
  MaskFormatter_classCallCheck(this, MaskFormatter);
13081
13088
 
13082
- this._mask = "";
13089
+ this._mask = '';
13083
13090
  this._maskChars = new Array();
13084
- /**
13085
- * Determina qual caractere será usado dos caracteres não presentes no valor
13086
- * ou seja, aqueles que o usuário ainda não informou. Por padrão usamos um espaço
13091
+ /**
13092
+ * Determina qual caractere será usado dos caracteres não presentes no valor
13093
+ * ou seja, aqueles que o usuário ainda não informou. Por padrão usamos um espaço
13087
13094
  */
13088
13095
 
13089
- this.placeholder = " ";
13096
+ this.placeholder = ' ';
13090
13097
  this.mask = mask;
13091
13098
  }
13092
- /**
13093
- * Setter para mask. Trata-se do padrão que se espera ao formatar o texto.
13099
+ /**
13100
+ * Setter para mask. Trata-se do padrão que se espera ao formatar o texto.
13094
13101
  */
13095
13102
 
13096
13103
 
13097
13104
  MaskFormatter_createClass(MaskFormatter, [{
13098
13105
  key: "mask",
13099
13106
  get:
13100
- /**
13101
- * Getter para mask
13102
- *
13103
- * @return A última máscara informada.
13107
+ /**
13108
+ * Getter para mask
13109
+ *
13110
+ * @return A última máscara informada.
13104
13111
  */
13105
13112
  function get() {
13106
13113
  return this._mask;
13107
13114
  }
13108
- /**
13109
- * Formata a string passada baseada na máscara definda pelo atributo mask.
13110
- *
13111
- * @param value Valor a ser formatado
13112
- * @return O valor processado de acordo com o padrão
13115
+ /**
13116
+ * Formata a string passada baseada na máscara definda pelo atributo mask.
13117
+ *
13118
+ * @param value Valor a ser formatado
13119
+ * @return O valor processado de acordo com o padrão
13113
13120
  */
13114
13121
  ,
13115
13122
  set: function set(mask) {
@@ -13119,7 +13126,7 @@ var MaskFormatter = /*#__PURE__*/function () {
13119
13126
  }, {
13120
13127
  key: "format",
13121
13128
  value: function format(value) {
13122
- var result = "";
13129
+ var result = '';
13123
13130
  var index = [0];
13124
13131
  var counter = 0;
13125
13132
  var maxCounter = this._maskChars.length;
@@ -13131,8 +13138,8 @@ var MaskFormatter = /*#__PURE__*/function () {
13131
13138
 
13132
13139
  return result;
13133
13140
  }
13134
- /**
13135
- * Preparamos a formatação internamente de acordo com o padrão.
13141
+ /**
13142
+ * Preparamos a formatação internamente de acordo com o padrão.
13136
13143
  */
13137
13144
 
13138
13145
  }, {
@@ -13218,9 +13225,9 @@ MaskFormatter.MaskCharacter = /*#__PURE__*/function () {
13218
13225
  this.maskFormatter = maskFormatter;
13219
13226
  this.type = type;
13220
13227
  }
13221
- /**
13222
- * Cada subclasse deve sobrescrever o retornando true, caso represente
13223
- * um caractere literal. Por padrão o retorno é false.
13228
+ /**
13229
+ * Cada subclasse deve sobrescrever o retornando true, caso represente
13230
+ * um caractere literal. Por padrão o retorno é false.
13224
13231
  */
13225
13232
 
13226
13233
 
@@ -13229,13 +13236,13 @@ MaskFormatter.MaskCharacter = /*#__PURE__*/function () {
13229
13236
  value: function isLiteral() {
13230
13237
  return false;
13231
13238
  }
13232
- /**
13233
- * Returns true if <code>aChar</code> is a valid reprensentation of
13234
- * the receiver. The default implementation returns true if the
13235
- * receiver represents a literal character and <code>getChar</code>
13236
- * == aChar. Otherwise, this will return true is <code>aChar</code>
13237
- * is contained in the valid characters and not contained
13238
- * in the invalid characters.
13239
+ /**
13240
+ * Returns true if <code>aChar</code> is a valid reprensentation of
13241
+ * the receiver. The default implementation returns true if the
13242
+ * receiver represents a literal character and <code>getChar</code>
13243
+ * == aChar. Otherwise, this will return true is <code>aChar</code>
13244
+ * is contained in the valid characters and not contained
13245
+ * in the invalid characters.
13239
13246
  */
13240
13247
 
13241
13248
  }, {
@@ -13248,11 +13255,11 @@ MaskFormatter.MaskCharacter = /*#__PURE__*/function () {
13248
13255
  aChar = this.getChar(aChar);
13249
13256
  return true;
13250
13257
  }
13251
- /**
13252
- * Returns the character to insert for <code>aChar</code>. The
13253
- * default implementation returns <code>aChar</code>. Subclasses
13254
- * that wish to do some sort of mapping, perhaps lower case to upper
13255
- * case should override this and do the necessary mapping.
13258
+ /**
13259
+ * Returns the character to insert for <code>aChar</code>. The
13260
+ * default implementation returns <code>aChar</code>. Subclasses
13261
+ * that wish to do some sort of mapping, perhaps lower case to upper
13262
+ * case should override this and do the necessary mapping.
13256
13263
  */
13257
13264
 
13258
13265
  }, {
@@ -13260,16 +13267,16 @@ MaskFormatter.MaskCharacter = /*#__PURE__*/function () {
13260
13267
  value: function getChar(aChar) {
13261
13268
  return aChar;
13262
13269
  }
13263
- /**
13264
- * Appends the necessary character in <code>formatting</code> at
13265
- * <code>index</code> to <code>buff</code>.
13270
+ /**
13271
+ * Appends the necessary character in <code>formatting</code> at
13272
+ * <code>index</code> to <code>buff</code>.
13266
13273
  */
13267
13274
 
13268
13275
  }, {
13269
13276
  key: "append",
13270
13277
  value: function append(result, formatting, index) {
13271
13278
  var inString = index[0] < formatting.length;
13272
- var aChar = inString ? formatting.charAt(index[0]) : "";
13279
+ var aChar = inString ? formatting.charAt(index[0]) : '';
13273
13280
 
13274
13281
  if (this.isLiteral()) {
13275
13282
  var literal = this.getChar(aChar);
@@ -13299,19 +13306,19 @@ MaskFormatter.MaskCharacter = /*#__PURE__*/function () {
13299
13306
  case MaskFormatter.UPPERCASE_KEY:
13300
13307
  case MaskFormatter.LOWERCASE_KEY:
13301
13308
  case MaskFormatter.CHARACTER_KEY:
13302
- message = "uma letra";
13309
+ message = 'uma letra';
13303
13310
  break;
13304
13311
 
13305
13312
  case MaskFormatter.DIGIT_KEY:
13306
- message = "um número";
13313
+ message = 'um número';
13307
13314
  break;
13308
13315
 
13309
13316
  case MaskFormatter.ALPHA_NUMERIC_KEY:
13310
- message = "uma letra ou um número";
13317
+ message = 'uma letra ou um número';
13311
13318
  break;
13312
13319
 
13313
13320
  default:
13314
- message = "";
13321
+ message = '';
13315
13322
  }
13316
13323
 
13317
13324
  return message;
@@ -13371,7 +13378,7 @@ MaskFormatter.DigitMaskCharacter = /*#__PURE__*/function (_MaskFormatter$MaskCh2
13371
13378
  }, {
13372
13379
  key: "isDigit",
13373
13380
  value: function isDigit(_char) {
13374
- return _char >= "0" && _char <= "9";
13381
+ return _char >= '0' && _char <= '9';
13375
13382
  }
13376
13383
  }]);
13377
13384
 
@@ -13527,8 +13534,8 @@ var FloatingManager = /*#__PURE__*/function () {
13527
13534
  key: "init",
13528
13535
  value: function init() {
13529
13536
  FloatingManager.entries = [];
13530
- document.addEventListener("mousedown", FloatingManager.handleDocumentEvent);
13531
- document.addEventListener("keydown", FloatingManager.handleKeyboardEvent);
13537
+ document.addEventListener('mousedown', FloatingManager.handleDocumentEvent);
13538
+ document.addEventListener('keydown', FloatingManager.handleKeyboardEvent);
13532
13539
  FloatingManager.initialized = true;
13533
13540
  }
13534
13541
  }, {
@@ -13573,7 +13580,7 @@ var FloatingManager = /*#__PURE__*/function () {
13573
13580
  }, {
13574
13581
  key: "handleKeyboardEvent",
13575
13582
  value: function handleKeyboardEvent(event) {
13576
- if (event.key === "Escape") {
13583
+ if (event.key === 'Escape') {
13577
13584
  for (var index = FloatingManager.entries.length; index >= 0; index--) {
13578
13585
  var entry = FloatingManager.entries[index];
13579
13586
 
@@ -13626,7 +13633,7 @@ var FloatingManager = /*#__PURE__*/function () {
13626
13633
  return alreadyFloatingIndex;
13627
13634
  }
13628
13635
 
13629
- content.style.position = "absolute";
13636
+ content.style.position = 'absolute';
13630
13637
  FloatingManager.applyStyle(content, "top", options.top);
13631
13638
  FloatingManager.applyStyle(content, "left", options.left);
13632
13639
  FloatingManager.applyStyle(content, "right", options.right);
@@ -13649,6 +13656,8 @@ var FloatingManager = /*#__PURE__*/function () {
13649
13656
  FloatingManager.applyStyle(content, "right", options.right);
13650
13657
  FloatingManager.applyStyle(content, "bottom", options.bottom);
13651
13658
  }
13659
+
13660
+ ;
13652
13661
  }
13653
13662
  }, {
13654
13663
  key: "close",
@@ -13688,8 +13697,8 @@ var DateUtils = /*#__PURE__*/function () {
13688
13697
  var adjustDayLightSavingTime = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
13689
13698
  var monthYearMode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
13690
13699
 
13691
- /** monthYearMode é um booleano para usar o formato MM/YYYY.
13692
- * Quando ativado, é retornado o primeiro dia do mês apenas para construir a data.
13700
+ /** monthYearMode é um booleano para usar o formato MM/YYYY.
13701
+ * Quando ativado, é retornado o primeiro dia do mês apenas para construir a data.
13693
13702
  * Não há necessidade de verificar o horário de verão quando utilizado esse modo. */
13694
13703
  var parts;
13695
13704
 
@@ -13746,8 +13755,8 @@ function TimeFormatter_defineProperties(target, props) { for (var i = 0; i < pro
13746
13755
  function TimeFormatter_createClass(Constructor, protoProps, staticProps) { if (protoProps) TimeFormatter_defineProperties(Constructor.prototype, protoProps); if (staticProps) TimeFormatter_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
13747
13756
 
13748
13757
 
13749
- /**
13750
- * `TimeFormatter` é um utilitário para formatação de strings desformatadas em strings válidas de horários
13758
+ /**
13759
+ * `TimeFormatter` é um utilitário para formatação de strings desformatadas em strings válidas de horários
13751
13760
  */
13752
13761
 
13753
13762
  var TimeFormatter = /*#__PURE__*/function () {
@@ -13758,18 +13767,18 @@ var TimeFormatter = /*#__PURE__*/function () {
13758
13767
  TimeFormatter_createClass(TimeFormatter, null, [{
13759
13768
  key: "prepareValue",
13760
13769
  value:
13761
- /**
13762
- * @prepareValue: converts an unformated time string into a formatted time.
13763
- *
13764
- * @param value unformated time string to convert
13765
- *
13766
- * @returns formatted time string
13767
- *
13768
- * @Exemples
13769
- * @"1012" | "10:12"
13770
- * @"10:12" | "10:12:00"
13771
- * @"100112" | "10:01:12"
13772
- */
13770
+ /**
13771
+ * @prepareValue: converts an unformated time string into a formatted time.
13772
+ *
13773
+ * @param value unformated time string to convert
13774
+ *
13775
+ * @returns formatted time string
13776
+ *
13777
+ * @Exemples
13778
+ * @"1012" | "10:12"
13779
+ * @"10:12" | "10:12:00"
13780
+ * @"100112" | "10:01:12"
13781
+ */
13773
13782
  function prepareValue(value, showSeconds) {
13774
13783
  if (value && value.length > 0 && value != "NaN") {
13775
13784
  var validationValue = value.replace(/:/g, "");
@@ -13802,20 +13811,20 @@ var TimeFormatter = /*#__PURE__*/function () {
13802
13811
  }
13803
13812
  }
13804
13813
 
13805
- return "";
13806
- }
13807
- /**
13808
- * @validateTime: validates if an input string has the corect time format.
13809
- *
13810
- * @param value input string to validate
13811
- *
13812
- * @returns true or false
13813
- *
13814
- * @Exemples
13815
- * @"1012" | true
13816
- * @"14e4" | false
13817
- * @"2624" | false
13818
- */
13814
+ return '';
13815
+ }
13816
+ /**
13817
+ * @validateTime: validates if an input string has the corect time format.
13818
+ *
13819
+ * @param value input string to validate
13820
+ *
13821
+ * @returns true or false
13822
+ *
13823
+ * @Exemples
13824
+ * @"1012" | true
13825
+ * @"14e4" | false
13826
+ * @"2624" | false
13827
+ */
13819
13828
 
13820
13829
  }, {
13821
13830
  key: "validateTime",
@@ -13872,13 +13881,13 @@ function RequestMetadata_createClass(Constructor, protoProps, staticProps) { if
13872
13881
 
13873
13882
  function RequestMetadata_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
13874
13883
 
13875
- /**
13876
- * Representa as propriedades necessárias para se executar uma requisição.
13884
+ /**
13885
+ * Representa as propriedades necessárias para se executar uma requisição.
13877
13886
  */
13878
13887
  var RequestMetadata = /*#__PURE__*/RequestMetadata_createClass(
13879
- /**
13880
- * @param {string} url A URL que deve ser chamada.
13881
- * @param {Method} method O Método da requisição (GET, PUT, POST ou DELETE).
13888
+ /**
13889
+ * @param {string} url A URL que deve ser chamada.
13890
+ * @param {Method} method O Método da requisição (GET, PUT, POST ou DELETE).
13882
13891
  */
13883
13892
  function RequestMetadata(url, method, headers) {
13884
13893
  RequestMetadata_classCallCheck(this, RequestMetadata);
@@ -13907,9 +13916,9 @@ function HttpProvider_defineProperties(target, props) { for (var i = 0; i < prop
13907
13916
  function HttpProvider_createClass(Constructor, protoProps, staticProps) { if (protoProps) HttpProvider_defineProperties(Constructor.prototype, protoProps); if (staticProps) HttpProvider_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
13908
13917
 
13909
13918
 
13910
- /**
13911
- * Abstração do XMLHttpRequest. Este serviço é responsável por realizar as requisições
13912
- * ao backend. Todos os métodos são estáticos.
13919
+ /**
13920
+ * Abstração do XMLHttpRequest. Este serviço é responsável por realizar as requisições
13921
+ * ao backend. Todos os métodos são estáticos.
13913
13922
  */
13914
13923
 
13915
13924
  var HttpProvider = /*#__PURE__*/function () {
@@ -13920,23 +13929,23 @@ var HttpProvider = /*#__PURE__*/function () {
13920
13929
  HttpProvider_createClass(HttpProvider, null, [{
13921
13930
  key: "get",
13922
13931
  value:
13923
- /**
13924
- * Faz uma requisição usando o método GET do HTTP para uma URL específica.
13925
- *
13926
- * @param {string} url A URL que deve ser chamada.
13927
- * @param {Array<Header>} headers [Opcional] Cabeçalhos HTTP.
13928
- * @returns {Promise<Object>} Uma promessa de que a requisição será preenchida.
13932
+ /**
13933
+ * Faz uma requisição usando o método GET do HTTP para uma URL específica.
13934
+ *
13935
+ * @param {string} url A URL que deve ser chamada.
13936
+ * @param {Array<Header>} headers [Opcional] Cabeçalhos HTTP.
13937
+ * @returns {Promise<Object>} Uma promessa de que a requisição será preenchida.
13929
13938
  */
13930
13939
  function get(url, headers) {
13931
13940
  return this.dispatch(new RequestMetadata(url, Method.GET, headers));
13932
13941
  }
13933
- /**
13934
- * Faz uma requisição usando o método POST do HTTP para uma URL específica.
13935
- *
13936
- * @param {string} url A URL que deve ser chamada.
13937
- * @param {Object} payload Informações a serem enviadas.
13938
- * @param {Array<Header>} headers [Opcional] Cabeçalhos HTTP.
13939
- * @returns {Promise<Object>} Uma promessa de que a requisição será preenchida.
13942
+ /**
13943
+ * Faz uma requisição usando o método POST do HTTP para uma URL específica.
13944
+ *
13945
+ * @param {string} url A URL que deve ser chamada.
13946
+ * @param {Object} payload Informações a serem enviadas.
13947
+ * @param {Array<Header>} headers [Opcional] Cabeçalhos HTTP.
13948
+ * @returns {Promise<Object>} Uma promessa de que a requisição será preenchida.
13940
13949
  */
13941
13950
 
13942
13951
  }, {
@@ -13954,14 +13963,14 @@ var HttpProvider = /*#__PURE__*/function () {
13954
13963
  request.onerror = function handleError() {
13955
13964
  reject({
13956
13965
  status: 404,
13957
- statusText: "Not Found"
13966
+ statusText: 'Not Found'
13958
13967
  });
13959
13968
  };
13960
13969
 
13961
13970
  request.ontimeout = function handleTimeout() {
13962
13971
  reject({
13963
13972
  status: 408,
13964
- statusText: "Request Timeout"
13973
+ statusText: 'Request Timeout'
13965
13974
  });
13966
13975
  };
13967
13976
 
@@ -14026,7 +14035,7 @@ var SkwHttpProvider = /*#__PURE__*/function () {
14026
14035
  return new Promise(function (resolve, reject) {
14027
14036
  var host = "http://192.168.1.218:8503/mge/";
14028
14037
  var appName = "ListaTarefa";
14029
- var module = "mge";
14038
+ var module = 'mge';
14030
14039
  _this._counter++;
14031
14040
 
14032
14041
  if (serviceName.indexOf("@") > -1) {
@@ -14046,38 +14055,38 @@ var SkwHttpProvider = /*#__PURE__*/function () {
14046
14055
 
14047
14056
  fetch(url, {
14048
14057
  body: JSON.stringify(requestContent),
14049
- method: "POST",
14058
+ method: 'POST',
14050
14059
  headers: headers
14051
14060
  }).then(function (res) {
14052
14061
  return res.json();
14053
14062
  }).then(function (data) {
14054
14063
  console.log(data);
14055
14064
  });
14056
- /*HttpProvider.post(url, requestContent, headers)
14057
- .then(res => {
14058
- if (!res.hasOwnProperty('status') ||
14059
- res.status == this.STATUS_ERROR ||
14060
- res.status == this.STATUS_TIMEOUT) {
14061
- let statusMessage = res.statusMessage;
14062
-
14063
- if (!statusMessage) {
14064
- statusMessage = 'Erro não identificado.'
14065
- }
14066
- //TODO: No futuro, exibir mensagens de erro. (MessageUtils.showError)
14067
- reject(new Error(statusMessage));
14068
- }else if (res.status == this.STATUS_CANCELED) {
14069
- if (res.statusMessage){
14070
- console.warn(res.statusMessage);
14071
- }
14072
- }else{
14073
- resolve(res);
14074
- }
14075
- if (res.status == this.STATUS_INFO) {
14076
- //TODO: No futuro, exibir mensagens de erro. (MessageUtils.showAlert)
14077
- console.info(res.statusMessage);
14078
- }
14079
- })
14080
- .catch((e)=>{reject(e)});*/
14065
+ /*HttpProvider.post(url, requestContent, headers)
14066
+ .then(res => {
14067
+ if (!res.hasOwnProperty('status') ||
14068
+ res.status == this.STATUS_ERROR ||
14069
+ res.status == this.STATUS_TIMEOUT) {
14070
+ let statusMessage = res.statusMessage;
14071
+
14072
+ if (!statusMessage) {
14073
+ statusMessage = 'Erro não identificado.'
14074
+ }
14075
+ //TODO: No futuro, exibir mensagens de erro. (MessageUtils.showError)
14076
+ reject(new Error(statusMessage));
14077
+ }else if (res.status == this.STATUS_CANCELED) {
14078
+ if (res.statusMessage){
14079
+ console.warn(res.statusMessage);
14080
+ }
14081
+ }else{
14082
+ resolve(res);
14083
+ }
14084
+ if (res.status == this.STATUS_INFO) {
14085
+ //TODO: No futuro, exibir mensagens de erro. (MessageUtils.showAlert)
14086
+ console.info(res.statusMessage);
14087
+ }
14088
+ })
14089
+ .catch((e)=>{reject(e)});*/
14081
14090
  });
14082
14091
  }
14083
14092
  }]);
@@ -14149,7 +14158,7 @@ var AuthorizedServiceCaller = /*#__PURE__*/function () {
14149
14158
  while (1) {
14150
14159
  switch (_context.prev = _context.next) {
14151
14160
  case 0:
14152
- token = localStorage.getItem("token");
14161
+ token = localStorage.getItem('token');
14153
14162
  body = request === null || request === void 0 ? void 0 : request.body;
14154
14163
  method = request === null || request === void 0 ? void 0 : request.method;
14155
14164
 
@@ -14157,9 +14166,9 @@ var AuthorizedServiceCaller = /*#__PURE__*/function () {
14157
14166
  window.location.pathname = this.unauthorizedPath;
14158
14167
  } else {
14159
14168
  headers = {
14160
- Authorization: "".concat(token),
14161
- "Content-Type": "application/json",
14162
- "Customer-Host": "http://localhost:8080/sankhyaw"
14169
+ 'Authorization': "".concat(token),
14170
+ 'Content-Type': 'application/json',
14171
+ 'Customer-Host': 'http://localhost:8080/sankhyaw'
14163
14172
  };
14164
14173
  }
14165
14174
 
@@ -14180,7 +14189,7 @@ var AuthorizedServiceCaller = /*#__PURE__*/function () {
14180
14189
  response = _context.sent;
14181
14190
 
14182
14191
  if (response instanceof Response && response.status === 401) {
14183
- localStorage.removeItem("token");
14192
+ localStorage.removeItem('token');
14184
14193
  window.location.pathname = this.unauthorizedPath;
14185
14194
  }
14186
14195
 
@@ -14310,22 +14319,22 @@ function StateManager_defineProperties(target, props) { for (var i = 0; i < prop
14310
14319
 
14311
14320
  function StateManager_createClass(Constructor, protoProps, staticProps) { if (protoProps) StateManager_defineProperties(Constructor.prototype, protoProps); if (staticProps) StateManager_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
14312
14321
 
14313
- /**
14314
- * Essa classe representa uma interpretação do padrão de projetos Flux.
14315
- * No padrão Flux os dados da aplicação são chamados de "estado" e existem
14316
- * algumas regras para gerenciamento/manipulação desse estado:
14317
- *
14318
- * 1 - O estado é imutável.
14319
- * 2 - Toda modificação de estado é representada por uma "ação".
14320
- * 3 - Quando "ações" acontecem a "store" cria um novo estado e notifica a todos interessados.
14321
- *
14322
- * Nessa interpretação desse design pattern, o StateManager faz o papel da store,
14323
- * notificando os manipuladores de estado (handlers), que são responsáveis por pedaços
14324
- * do estado (slices).
14325
- *
14326
- * O StateManager mantém dois tipos de estados: "Histórico" e "Não Histórico". No estado
14327
- * "Histórico", sempre que uma alteração de estado acontece, o estado anterior é guardado em
14328
- * uma pilha, o que permite que possamos voltar no tempo, desfazendo algumas ações
14322
+ /**
14323
+ * Essa classe representa uma interpretação do padrão de projetos Flux.
14324
+ * No padrão Flux os dados da aplicação são chamados de "estado" e existem
14325
+ * algumas regras para gerenciamento/manipulação desse estado:
14326
+ *
14327
+ * 1 - O estado é imutável.
14328
+ * 2 - Toda modificação de estado é representada por uma "ação".
14329
+ * 3 - Quando "ações" acontecem a "store" cria um novo estado e notifica a todos interessados.
14330
+ *
14331
+ * Nessa interpretação desse design pattern, o StateManager faz o papel da store,
14332
+ * notificando os manipuladores de estado (handlers), que são responsáveis por pedaços
14333
+ * do estado (slices).
14334
+ *
14335
+ * O StateManager mantém dois tipos de estados: "Histórico" e "Não Histórico". No estado
14336
+ * "Histórico", sempre que uma alteração de estado acontece, o estado anterior é guardado em
14337
+ * uma pilha, o que permite que possamos voltar no tempo, desfazendo algumas ações
14329
14338
  */
14330
14339
  var StateManager = /*#__PURE__*/function () {
14331
14340
  function StateManager(reducers) {
@@ -15545,7 +15554,7 @@ var LoadStateManager = /*#__PURE__*/function () {
15545
15554
  function LoadStateManager() {
15546
15555
  var _this = this;
15547
15556
 
15548
- var appName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "ez-application";
15557
+ var appName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'ez-application';
15549
15558
 
15550
15559
  LoadStateManager_classCallCheck(this, LoadStateManager);
15551
15560
 
@@ -15558,7 +15567,7 @@ var LoadStateManager = /*#__PURE__*/function () {
15558
15567
  console.warn("application".concat(appName, " not found, then state is loadded"));
15559
15568
  this.onStatusChange(LoadStatus.LOADED);
15560
15569
  } else {
15561
- (_a = this._application) === null || _a === void 0 ? void 0 : _a.addEventListener("applicationLoaded", function () {
15570
+ (_a = this._application) === null || _a === void 0 ? void 0 : _a.addEventListener('applicationLoaded', function () {
15562
15571
  return _this.onStatusChange(LoadStatus.LOADED);
15563
15572
  });
15564
15573
  this.onStatusChange(LoadStatus.PRE_INITIALIZE);
@@ -15771,7 +15780,7 @@ var HttpFetcher = /*#__PURE__*/function () {
15771
15780
  reject(res);
15772
15781
  } else {
15773
15782
  //resolve(res);
15774
- //FIXME: Precisamos trabalhar melhor a resposta, quem chamou
15783
+ //FIXME: Precisamos trabalhar melhor a resposta, quem chamou
15775
15784
  //a API não pode ficar responsavel por desempacotar... fiz uma
15776
15785
  //gambiarra aqui...
15777
15786
  resolve(res.data[0][reqKey]);
@@ -15931,7 +15940,7 @@ var HttpFetcher = /*#__PURE__*/function () {
15931
15940
  errorsResponse = [];
15932
15941
  _context5.prev = 3;
15933
15942
  _context5.next = 6;
15934
- return (0,dist.batchRequests)("http://localhost:8082/", request);
15943
+ return (0,dist.batchRequests)('http://localhost:8082/', request);
15935
15944
 
15936
15945
  case 6:
15937
15946
  res = _context5.sent;