@sankhyalabs/sankhyablocks 2.3.0 → 2.4.1

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 (122) hide show
  1. package/dist/cjs/snk-application.cjs.entry.js +46 -29
  2. package/dist/cjs/snk-config-options.cjs.entry.js +1 -1
  3. package/dist/cjs/snk-configurator_3.cjs.entry.js +13 -7
  4. package/dist/cjs/snk-crud.cjs.entry.js +2 -2
  5. package/dist/cjs/snk-data-unit.cjs.entry.js +2 -4
  6. package/dist/cjs/snk-filter-bar_7.cjs.entry.js +27 -6
  7. package/dist/cjs/snk-filter-binary-select.cjs.entry.js +6 -0
  8. package/dist/cjs/snk-filter-detail.cjs.entry.js +4 -1
  9. package/dist/cjs/snk-filter-multi-select.cjs.entry.js +6 -0
  10. package/dist/cjs/snk-filter-number.cjs.entry.js +6 -0
  11. package/dist/cjs/snk-filter-period.cjs.entry.js +6 -0
  12. package/dist/cjs/snk-filter-personalized.cjs.entry.js +3 -0
  13. package/dist/cjs/snk-filter-search.cjs.entry.js +6 -0
  14. package/dist/cjs/snk-filter-text.cjs.entry.js +3 -0
  15. package/dist/cjs/snk-form-config.cjs.entry.js +2 -2
  16. package/dist/cjs/snk-form.cjs.entry.js +4 -4
  17. package/dist/collection/components/snk-application/snk-application.js +82 -65
  18. package/dist/collection/components/snk-configurator/snk-configurator.js +11 -5
  19. package/dist/collection/components/snk-crud/snk-crud.js +6 -6
  20. package/dist/collection/components/snk-data-unit/snk-data-unit.js +14 -19
  21. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.js +9 -3
  22. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.js +9 -3
  23. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-number.js +9 -3
  24. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-period.js +9 -3
  25. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-personalized.js +6 -3
  26. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-search.js +9 -3
  27. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-text.js +5 -2
  28. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +8 -5
  29. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +16 -7
  30. package/dist/collection/components/snk-filter-bar/filter-list/snk-filter-list.js +12 -9
  31. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +9 -9
  32. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +5 -2
  33. package/dist/collection/components/snk-form/snk-form.js +11 -11
  34. package/dist/collection/components/snk-form/subcomponents/snk-config-options/snk-config-options.js +5 -5
  35. package/dist/collection/components/snk-form/subcomponents/snk-field-config/snk-field-config.js +6 -6
  36. package/dist/collection/components/snk-form/subcomponents/snk-form-config/snk-form-config.js +6 -6
  37. package/dist/collection/components/snk-form/subcomponents/snk-tab-config/snk-tab-config.js +7 -7
  38. package/dist/collection/components/snk-grid/snk-grid.js +14 -14
  39. package/dist/collection/components/snk-grid/subcomponents/snk-grid-config/snk-grid-config.js +8 -5
  40. package/dist/collection/components/snk-grid/subcomponents/snk-select-box/snk-select-box.js +5 -2
  41. package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +11 -10
  42. package/dist/collection/components/snk-taskbar/snk-taskbar.js +10 -10
  43. package/dist/components/snk-application2.js +47 -30
  44. package/dist/components/snk-config-options2.js +1 -1
  45. package/dist/components/snk-configurator2.js +6 -0
  46. package/dist/components/snk-crud.js +3 -3
  47. package/dist/components/snk-data-unit.js +2 -4
  48. package/dist/components/snk-field-config2.js +2 -2
  49. package/dist/components/snk-filter-bar2.js +4 -1
  50. package/dist/components/snk-filter-binary-select.js +6 -0
  51. package/dist/components/snk-filter-detail2.js +4 -1
  52. package/dist/components/snk-filter-item2.js +10 -1
  53. package/dist/components/snk-filter-list2.js +3 -0
  54. package/dist/components/snk-filter-multi-select.js +6 -0
  55. package/dist/components/snk-filter-number.js +6 -0
  56. package/dist/components/snk-filter-period.js +6 -0
  57. package/dist/components/snk-filter-personalized.js +3 -0
  58. package/dist/components/snk-filter-search.js +6 -0
  59. package/dist/components/snk-filter-text.js +3 -0
  60. package/dist/components/snk-form-config2.js +3 -3
  61. package/dist/components/snk-form2.js +4 -4
  62. package/dist/components/snk-grid-config2.js +6 -3
  63. package/dist/components/snk-grid2.js +5 -5
  64. package/dist/components/snk-select-box2.js +3 -0
  65. package/dist/components/snk-taskbar2.js +3 -3
  66. package/dist/esm/snk-application.entry.js +47 -30
  67. package/dist/esm/snk-config-options.entry.js +1 -1
  68. package/dist/esm/snk-configurator_3.entry.js +13 -7
  69. package/dist/esm/snk-crud.entry.js +3 -3
  70. package/dist/esm/snk-data-unit.entry.js +2 -4
  71. package/dist/esm/snk-filter-bar_7.entry.js +27 -6
  72. package/dist/esm/snk-filter-binary-select.entry.js +6 -0
  73. package/dist/esm/snk-filter-detail.entry.js +4 -1
  74. package/dist/esm/snk-filter-multi-select.entry.js +6 -0
  75. package/dist/esm/snk-filter-number.entry.js +6 -0
  76. package/dist/esm/snk-filter-period.entry.js +6 -0
  77. package/dist/esm/snk-filter-personalized.entry.js +3 -0
  78. package/dist/esm/snk-filter-search.entry.js +6 -0
  79. package/dist/esm/snk-filter-text.entry.js +3 -0
  80. package/dist/esm/snk-form-config.entry.js +3 -3
  81. package/dist/esm/snk-form.entry.js +4 -4
  82. package/dist/sankhyablocks/p-2e0747f9.entry.js +1 -0
  83. package/dist/sankhyablocks/{p-de0fe8a4.entry.js → p-60e7e86d.entry.js} +1 -1
  84. package/dist/sankhyablocks/p-825c8975.entry.js +1 -0
  85. package/dist/sankhyablocks/{p-0e18f6e6.entry.js → p-a72a0a5d.entry.js} +2 -2
  86. package/dist/sankhyablocks/p-cd486089.entry.js +1 -0
  87. package/dist/sankhyablocks/p-d2b0f1fc.entry.js +1 -0
  88. package/dist/sankhyablocks/p-d61f2170.entry.js +1 -0
  89. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  90. package/dist/types/components/snk-application/snk-application.d.ts +48 -32
  91. package/dist/types/components/snk-configurator/snk-configurator.d.ts +9 -3
  92. package/dist/types/components/snk-crud/snk-crud.d.ts +4 -4
  93. package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +12 -14
  94. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.d.ts +12 -0
  95. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.d.ts +12 -0
  96. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-number.d.ts +12 -0
  97. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-period.d.ts +12 -0
  98. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-personalized.d.ts +9 -0
  99. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-search.d.ts +12 -0
  100. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-text.d.ts +9 -0
  101. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +12 -0
  102. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +20 -2
  103. package/dist/types/components/snk-filter-bar/filter-list/snk-filter-list.d.ts +27 -0
  104. package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +28 -1
  105. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +4 -1
  106. package/dist/types/components/snk-form/snk-form.d.ts +7 -7
  107. package/dist/types/components/snk-form/subcomponents/snk-config-options/snk-config-options.d.ts +4 -4
  108. package/dist/types/components/snk-form/subcomponents/snk-field-config/snk-field-config.d.ts +5 -5
  109. package/dist/types/components/snk-form/subcomponents/snk-form-config/snk-form-config.d.ts +4 -4
  110. package/dist/types/components/snk-form/subcomponents/snk-tab-config/snk-tab-config.d.ts +8 -10
  111. package/dist/types/components/snk-grid/snk-grid.d.ts +9 -9
  112. package/dist/types/components/snk-grid/subcomponents/snk-grid-config/snk-grid-config.d.ts +5 -2
  113. package/dist/types/components/snk-grid/subcomponents/snk-select-box/snk-select-box.d.ts +6 -0
  114. package/dist/types/components/snk-pesquisa/snk-pesquisa.d.ts +12 -2
  115. package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +8 -8
  116. package/dist/types/components.d.ts +428 -135
  117. package/package.json +2 -2
  118. package/dist/sankhyablocks/p-00f6d216.entry.js +0 -1
  119. package/dist/sankhyablocks/p-6ca95ef3.entry.js +0 -1
  120. package/dist/sankhyablocks/p-7e79ab39.entry.js +0 -1
  121. package/dist/sankhyablocks/p-975182f8.entry.js +0 -1
  122. package/dist/sankhyablocks/p-c4e9394c.entry.js +0 -1
@@ -709,7 +709,7 @@ const SnkApplication = class {
709
709
  }
710
710
  }
711
711
  /**
712
- * Caso o usuário logado seja o SUP.
712
+ * Obtém `true` caso o usuário logado seja o SUP.
713
713
  */
714
714
  async isUserSup() {
715
715
  return new Promise((resolve, reject) => {
@@ -721,7 +721,7 @@ const SnkApplication = class {
721
721
  });
722
722
  }
723
723
  /**
724
- * Se o usuário logado tem permissão pra determinada ação.
724
+ * Obtém `true` caso o usuário logado tem permissão pra determinada ação.
725
725
  */
726
726
  async hasAccess(access) {
727
727
  return new Promise((resolve, reject) => {
@@ -733,7 +733,7 @@ const SnkApplication = class {
733
733
  });
734
734
  }
735
735
  /**
736
- * Retorna todos os acessos do usuário logado.
736
+ * Obtém todos os acessos do usuário logado.
737
737
  */
738
738
  async getAllAccess() {
739
739
  return new Promise((resolve, reject) => {
@@ -750,37 +750,37 @@ const SnkApplication = class {
750
750
  });
751
751
  }
752
752
  /**
753
- * Retorna o valor de um parâmetro do tipo string.
753
+ * Obtém o valor de um parâmetro do tipo string.
754
754
  */
755
755
  async getStringParam(name) {
756
756
  return this.parameters.asString(name);
757
757
  }
758
758
  /**
759
- * Retorna o valor de um parâmetro do tipo Inteiro.
759
+ * Obtém o valor de um parâmetro do tipo Inteiro.
760
760
  */
761
761
  async getIntParam(name) {
762
762
  return this.parameters.asInteger(name);
763
763
  }
764
764
  /**
765
- * Retorna o valor de um parâmetro do tipo Decimal.
765
+ * Obtém o valor de um parâmetro do tipo Decimal.
766
766
  */
767
767
  async getFloatParam(name) {
768
768
  return this.parameters.asFloat(name);
769
769
  }
770
770
  /**
771
- * Retorna o valor de um parâmetro do tipo booleano.
771
+ * Obtém o valor de um parâmetro do tipo booleano.
772
772
  */
773
773
  async getBooleanParam(name) {
774
774
  return this.parameters.asBoolean(name);
775
775
  }
776
776
  /**
777
- * Retorna o valor de um parâmetro do tipo data.
777
+ * Obtém o valor de um parâmetro do tipo data.
778
778
  */
779
779
  async getDateParam(name) {
780
780
  return this.parameters.asDate(name);
781
781
  }
782
782
  /**
783
- * Mostra o conteúdo passado em um Popup
783
+ * Exibe o conteúdo passado em um Popup.
784
784
  */
785
785
  async showPopUp(content, size = "full", useHeader = true) {
786
786
  this.clearContent(this._popUp);
@@ -792,17 +792,23 @@ const SnkApplication = class {
792
792
  this._popUp.useHeader = false;
793
793
  }
794
794
  }
795
+ /**
796
+ * Exibe o conteúdo passado em um Modal.
797
+ */
795
798
  async showModal(content) {
796
799
  this.clearContent(this._rightModal);
797
800
  this._rightModal.appendChild(content);
798
801
  this._rightModal.opened = true;
799
802
  }
803
+ /**
804
+ * Fecha o Modal e limpa o conteúdo.
805
+ */
800
806
  async closeModal() {
801
807
  this.clearContent(this._rightModal);
802
808
  this._rightModal.opened = false;
803
809
  }
804
810
  /**
805
- * Fecha o popup, liberando o conteúdo.
811
+ * Fecha o Popup e limpa o conteúdo.
806
812
  */
807
813
  async closePopUp() {
808
814
  this.clearContent(this._popUp);
@@ -837,7 +843,7 @@ const SnkApplication = class {
837
843
  });
838
844
  }
839
845
  /**
840
- * Retorna a configuração de um recurso por service broker
846
+ * Obtém a configuração de um recurso por service broker
841
847
  */
842
848
  async getConfig(key) {
843
849
  let payload = {
@@ -878,13 +884,13 @@ const SnkApplication = class {
878
884
  });
879
885
  }
880
886
  /**
881
- * Acessa informações de contexto "empurrados" na abertura da tela
887
+ * Acessa informações de contexto "empurrados" na abertura da tela.
882
888
  */
883
889
  async getAttributeFromHTMLWrapper(attribName) {
884
890
  return Promise.resolve(window[attribName]);
885
891
  }
886
892
  /**
887
- * Abre determinada tela, repassando pkObject
893
+ * Abre determinada tela, repassando pkObject.
888
894
  */
889
895
  async openApp(resourceId, pkObject) {
890
896
  Workspace.openAppActivity(resourceId, pkObject);
@@ -902,7 +908,7 @@ const SnkApplication = class {
902
908
  }
903
909
  /**
904
910
  * Cria o DataUnit a partir do nome da entidade. É possível armazená-lo no cache
905
- * passando o dataUnitName, assim, se mais de uma chamada for feita, o mesmo DataUnit será usado
911
+ * passando o dataUnitName, assim, se mais de uma chamada for feita, o mesmo DataUnit será usado.
906
912
  */
907
913
  async createDataunit(entityName, dataUnitName) {
908
914
  return new Promise((resolve, reject) => {
@@ -943,31 +949,31 @@ const SnkApplication = class {
943
949
  });
944
950
  }
945
951
  /**
946
- * Retorna o resourceID da tela em questão.
952
+ * Obtém o resourceID da tela em questão.
947
953
  */
948
954
  async getResourceID() {
949
955
  return Promise.resolve(this.resourceID);
950
956
  }
951
957
  /**
952
- * Retorna o resourceID da tela em questão.
958
+ * Obtém o UserId da tela em questão.
953
959
  */
954
960
  async getUserID() {
955
961
  return Promise.resolve(window["UID"]);
956
962
  }
957
963
  /**
958
- * Mostra o diálogo de alerta de acordo com os parâmetros passados.
964
+ * Exibe o diálogo de alerta de acordo com os parâmetros passados.
959
965
  */
960
966
  async alert(title, message, icon, options) {
961
967
  return utils.ApplicationUtils.alert(title, message, icon, options);
962
968
  }
963
969
  /**
964
- * Mostra o diálogo de erro de acordo com os parâmetros passados.
970
+ * Exibe o diálogo de erro de acordo com os parâmetros passados.
965
971
  */
966
972
  async error(title, message, icon, options) {
967
973
  return utils.ApplicationUtils.error(title, message, icon, options);
968
974
  }
969
975
  /**
970
- * Mostra o diálogo de sucesso de acordo com os parâmetros passados.
976
+ * Exibe o diálogo de sucesso de acordo com os parâmetros passados.
971
977
  */
972
978
  async success(title, message, icon, options) {
973
979
  return utils.ApplicationUtils.success(title, message, icon, options);
@@ -985,43 +991,43 @@ const SnkApplication = class {
985
991
  return utils.ApplicationUtils.confirm(title, message, icon, dialogType, options);
986
992
  }
987
993
  /**
988
- * Mostra uma informação efêmera (de segundo plano).
994
+ * Exibe uma informação efêmera (de segundo plano).
989
995
  */
990
996
  async info(message, options) {
991
997
  return utils.ApplicationUtils.info(message, options);
992
998
  }
993
999
  /**
994
- * Busca a configuração de formulário.
1000
+ * Obtém a configuração de formulário.
995
1001
  */
996
1002
  async loadFormConfig(name) {
997
1003
  return this.formConfigFetcher.loadFormConfig(name, this.resourceID);
998
1004
  }
999
1005
  /**
1000
- * Busca a configuração de grade.
1006
+ * Obtém a configuração de grade.
1001
1007
  */
1002
1008
  async loadGridConfig(name) {
1003
1009
  return this.gridConfigFetcher.getConfig(name, this.resourceID);
1004
1010
  }
1005
1011
  /**
1006
- * Busca lista de configurações de formulário do usuário.
1012
+ * Obtém a lista de configurações de formulário do usuário.
1007
1013
  */
1008
1014
  async fetchUserAvailableConfigs(name) {
1009
1015
  return this.formConfigFetcher.fetchUserAvailableConfigs(name, this.resourceID);
1010
1016
  }
1011
1017
  /**
1012
- * Busca a configuração de formulário do usuário.
1018
+ * Obtém a configuração de formulário do usuário.
1013
1019
  */
1014
1020
  async fetchLegacyConfig(name) {
1015
1021
  return this.formConfigFetcher.fetchLegacyConfig(name, this.resourceID);
1016
1022
  }
1017
1023
  /**
1018
- * Busca a configuração padrão de formulário.
1024
+ * Obtém a configuração padrão de formulário.
1019
1025
  */
1020
1026
  async fetchDefaultConfig(name) {
1021
1027
  return this.formConfigFetcher.fetchDefaultConfig(name, this.resourceID);
1022
1028
  }
1023
1029
  /**
1024
- * Busca os totalizadores da grade.
1030
+ * Obtém os totalizadores da grade.
1025
1031
  */
1026
1032
  async loadTotals(name, resourceID, filters) {
1027
1033
  return this.totalsFetcher.fetchTotals(name, resourceID, filters);
@@ -1065,13 +1071,13 @@ const SnkApplication = class {
1065
1071
  return this.formConfigFetcher.saveConfig(config, name, this.resourceID);
1066
1072
  }
1067
1073
  /**
1068
- * Busca um objeto com um conjunto de valores padrão.
1074
+ * Obtém um objeto com um conjunto de valores padrão.
1069
1075
  */
1070
1076
  async getDefaultValues() {
1071
1077
  return this.defaultValuesFetcher.getDefaultValues(this.resourceID);
1072
1078
  }
1073
1079
  /**
1074
- * Retorna um valor padrão específico de uma expressão.
1080
+ * Obtém um valor padrão específico de uma expressão.
1075
1081
  */
1076
1082
  async getDefaultValue(expression) {
1077
1083
  return this._defaultValues && this._defaultValues[expression];
@@ -1133,6 +1139,10 @@ const SnkApplication = class {
1133
1139
  }
1134
1140
  return this._defaultValuesFetcher;
1135
1141
  }
1142
+ /**
1143
+ * Obtém as opções em componentes de pesquisa
1144
+ * Ex.: snk-config-options
1145
+ */
1136
1146
  async executeSearch(searchArgument, fieldName, dataUnit) {
1137
1147
  const descriptor = dataUnit === null || dataUnit === void 0 ? void 0 : dataUnit.getField(fieldName);
1138
1148
  if (!descriptor) ;
@@ -1170,12 +1180,16 @@ const SnkApplication = class {
1170
1180
  return this.executePreparedSearch(mode, argument, { entity: ENTITYNAME, entityDescription: DESCRIPTIONENTITY, criteria, searchOptions });
1171
1181
  }
1172
1182
  }
1183
+ /**
1184
+ * Obtém as opções em componentes de pesquisa
1185
+ * Ex.: snk-config-options
1186
+ */
1173
1187
  async executePreparedSearch(mode, argument, options) {
1174
1188
  const { entity, entityDescription, criteria, searchOptions } = options;
1175
1189
  if (mode === "ADVANCED") {
1176
1190
  return new Promise(accept => {
1177
1191
  const pesquisaContent = document.createElement("snk-pesquisa");
1178
- pesquisaContent["data-element-id"] = `entity_${entity}`;
1192
+ pesquisaContent[core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME] = `entity_${entity}`;
1179
1193
  pesquisaContent.argument = argument;
1180
1194
  pesquisaContent.searchLoader = (text) => this.pesquisaFetcher.loadAdvancedSearch(entity, text, criteria, searchOptions);
1181
1195
  pesquisaContent.selectItem = (option) => {
@@ -1191,6 +1205,9 @@ const SnkApplication = class {
1191
1205
  return this.pesquisaFetcher.loadSearchOptions(entity, argument, criteria, searchOptions);
1192
1206
  }
1193
1207
  }
1208
+ /**
1209
+ * Obtém `true` caso a tela esteja em modo de debug.
1210
+ */
1194
1211
  async isDebugMode() {
1195
1212
  return new Promise(accept => {
1196
1213
  accept(window['isDebugMode']);
@@ -15,7 +15,7 @@ const SnkConfigOptions = class {
15
15
  index.registerInstance(this, hostRef);
16
16
  this.configOptionsChanged = index.createEvent(this, "configOptionsChanged", 7);
17
17
  /**
18
- * Armazena as propriedades do campo
18
+ * Armazena as propriedades do campo.
19
19
  */
20
20
  this.fieldConfig = {};
21
21
  }
@@ -25,10 +25,16 @@ const SnkConfigurator = class {
25
25
  */
26
26
  this.viewMode = GRID_MODE.name;
27
27
  }
28
+ /**
29
+ * Exibe a janela de configuração.
30
+ */
28
31
  async open() {
29
32
  this._opened = true;
30
33
  this.configSelected.emit(this.getViewModeValue());
31
34
  }
35
+ /**
36
+ * Fecha a janela de configuração.
37
+ */
32
38
  async close() {
33
39
  this.closeConfig();
34
40
  }
@@ -104,7 +110,7 @@ const SnkFieldConfig = class {
104
110
  */
105
111
  this.isConfigActive = false;
106
112
  /**
107
- * Define se o componente está em modo de inserção
113
+ * Define se o componente está em modo de inserção.
108
114
  */
109
115
  this.modeInsertion = true;
110
116
  }
@@ -121,7 +127,7 @@ const SnkFieldConfig = class {
121
127
  * Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
122
128
  * através de um pequeno modulo na estrutura da aplicação:
123
129
  * - Criar um arquivo no seguinte caminho: /messages/appmessages.msg.js.
124
- * Para conhecer os detalhes do módulo, vide o arquivo neste projeto "/src/lib/message/resources/snk-form.msg.ts"
130
+ * Para conhecer os detalhes do módulo, vide o arquivo neste projeto "/src/lib/message/resources/snk-form.msg.ts".
125
131
  */
126
132
  getMessage(key) {
127
133
  return this._application.messagesBuilder.getMessage(key, {});
@@ -166,7 +172,7 @@ const SnkGrid = class {
166
172
  this._popUpGridConfig = false;
167
173
  }
168
174
  /**
169
- * Método responsável em abrir o modal de configurações da grade.
175
+ * Exibe a janela de configurações da grade.
170
176
  */
171
177
  async showConfig() {
172
178
  if (this._grid == undefined) {
@@ -175,7 +181,7 @@ const SnkGrid = class {
175
181
  this.openGridConfig();
176
182
  }
177
183
  /**
178
- * Método responsável em fechar o modal de configurações da grade.
184
+ * Fecha a janela de configurações da grade.
179
185
  */
180
186
  async hideConfig() {
181
187
  if (this._grid == undefined) {
@@ -184,7 +190,7 @@ const SnkGrid = class {
184
190
  this.closeGridConfig();
185
191
  }
186
192
  /**
187
- * Método responsável por setar as configurações da grade.
193
+ * Atribui o valor da configuração da grade.
188
194
  */
189
195
  async setConfig(config) {
190
196
  this.setGridConfig(config);
@@ -255,14 +261,14 @@ const SnkGrid = class {
255
261
  core.ElementIDUtils.addIDInfo(this._element, null, dataInfo);
256
262
  }
257
263
  getDataElementId(suffix) {
258
- const elemIdSnkGrid = this._element.getAttribute("data-element-id");
264
+ const elemIdSnkGrid = this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME);
259
265
  return `${elemIdSnkGrid}_${suffix}`;
260
266
  }
261
267
  render() {
262
268
  if (!this._dataUnit) {
263
269
  return undefined;
264
270
  }
265
- return (index.h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, index.h("div", { class: "snk-grid__header ez-padding-bottom--medium ez-margin-bottom--medium" }, index.h("snk-filter-bar", { dataUnit: this._dataUnit, "data-element-id": this.getDataElementId("internal_filter"), class: "snk-grid__filter-bar ez-align--top", configName: this.configName }), index.h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" }), index.h("snk-taskbar", { class: "ez-padding-left--medium", "data-element-id": this.getDataElementId("grid_top_taskbar"), key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: "INSERT" })), index.h("ez-grid", { ref: ref => this._grid = ref, "data-element-id": this.getDataElementId("internal_grid"), dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.saveConfig(evt.detail); }, onEzDoubleClick: () => this.gridDoubleClick.emit(), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection }, index.h("snk-taskbar", { dataUnit: this._dataUnit, "data-element-id": this.getDataElementId("grid_left_taskBar"), buttons: this._headerTaskbarProcessor.buttons, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.actionsList })), index.h("div", { class: "ez-col ez-col--sd-12" }, index.h("slot", { name: "SnkGridFooter" })), index.h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, index.h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute("data-element-id"), selectedIndex: 0, onConfigChange: (evt) => this.changeConfig(evt.detail), onConfigCancel: () => this.closeGridConfig() }))));
271
+ return (index.h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, index.h("div", { class: "snk-grid__header ez-padding-bottom--medium ez-margin-bottom--medium" }, index.h("snk-filter-bar", { dataUnit: this._dataUnit, "data-element-id": this.getDataElementId("internal_filter"), class: "snk-grid__filter-bar ez-align--top", configName: this.configName }), index.h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" }), index.h("snk-taskbar", { class: "ez-padding-left--medium", "data-element-id": this.getDataElementId("grid_top_taskbar"), key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: "INSERT" })), index.h("ez-grid", { ref: ref => this._grid = ref, "data-element-id": this.getDataElementId("internal_grid"), dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.saveConfig(evt.detail); }, onEzDoubleClick: () => this.gridDoubleClick.emit(), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection }, index.h("snk-taskbar", { dataUnit: this._dataUnit, "data-element-id": this.getDataElementId("grid_left_taskBar"), buttons: this._headerTaskbarProcessor.buttons, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.actionsList })), index.h("div", { class: "ez-col ez-col--sd-12" }, index.h("slot", { name: "SnkGridFooter" })), index.h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, index.h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, onConfigChange: (evt) => this.changeConfig(evt.detail), onConfigCancel: () => this.closeGridConfig() }))));
266
272
  }
267
273
  get _element() { return index.getElement(this); }
268
274
  };
@@ -17,7 +17,7 @@ const SnkCrud = class {
17
17
  this.actionClick = index.createEvent(this, "actionClick", 7);
18
18
  this._viewMode = GRID_MODE.name;
19
19
  /**
20
- * Determina se pode haver mais de uma linha selecionada na grade
20
+ * Determina se pode haver mais de uma linha selecionada na grade.
21
21
  */
22
22
  this.multipleSelection = true;
23
23
  }
@@ -64,7 +64,7 @@ const SnkCrud = class {
64
64
  }
65
65
  }
66
66
  getDataElementId(suffix) {
67
- const elemIdSnkCrud = this._element.getAttribute("data-element-id");
67
+ const elemIdSnkCrud = this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME);
68
68
  return `${elemIdSnkCrud}_${suffix}`;
69
69
  }
70
70
  componentWillLoad() {
@@ -18,7 +18,7 @@ const SnkDataUnit = class {
18
18
  this.cancelEdition = index.createEvent(this, "cancelEdition", 7);
19
19
  this._onDataUnitResolve = [];
20
20
  /**
21
- * Determina quantas linhas são retornadas por página
21
+ * Determina quantas linhas são retornadas por página.
22
22
  */
23
23
  this.pageSize = 150;
24
24
  this._dataUnitObserver = (action) => {
@@ -91,9 +91,7 @@ const SnkDataUnit = class {
91
91
  this.dataUnitReady.emit(this.dataUnit);
92
92
  }
93
93
  /**
94
- * Pode-se obter o dataUnit através desse método. Outra forma, é ouvir o evento de
95
- *
96
- * @returns dataUnit
94
+ * Obtém o dataUnit.
97
95
  */
98
96
  async getDataUnit() {
99
97
  return new Promise((resolve) => {
@@ -165,7 +165,7 @@ const SnkFilterBar = class {
165
165
  if (this._element) {
166
166
  const dataInfo = { dataUnit: this.dataUnit };
167
167
  core.ElementIDUtils.addIDInfo(this._element, null, dataInfo);
168
- const dataElementIdFilterBar = this._element.getAttribute("data-element-id");
168
+ const dataElementIdFilterBar = this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME);
169
169
  this._idSnkFilterItem = dataElementIdFilterBar;
170
170
  this._idSnkFilterList = dataElementIdFilterBar;
171
171
  }
@@ -437,6 +437,9 @@ const SnkFilterBar = class {
437
437
  this.registryFilterProvider();
438
438
  }
439
439
  }
440
+ /**
441
+ * Emitido quando acontece a alteração do estado do filtro.
442
+ */
440
443
  filterChangeListener(evt) {
441
444
  this.updateFilter(evt.detail);
442
445
  }
@@ -506,6 +509,9 @@ const SnkFilterItem = class {
506
509
  observeDetailIsVisible(value) {
507
510
  this.visibleChanged.emit(value);
508
511
  }
512
+ /**
513
+ * Exibe os detalhes de um item da lista.
514
+ */
509
515
  async showUp(open = false) {
510
516
  return new Promise(resolve => {
511
517
  this._filterItemElement.scrollIntoView({ behavior: "auto", block: "nearest", inline: "nearest" });
@@ -530,6 +536,9 @@ const SnkFilterItem = class {
530
536
  const rect = this._filterItemElement.getBoundingClientRect();
531
537
  return `calc(${rect.left}px + ${padding})`;
532
538
  }
539
+ /**
540
+ * Oculta os detalhes de um item da lista.
541
+ */
533
542
  async hideDetail() {
534
543
  if (this.detailIsVisible) {
535
544
  if (this._floatingID != undefined) {
@@ -628,7 +637,7 @@ const SnkFilterItem = class {
628
637
  componentDidLoad() {
629
638
  if (this._filterItemElement) {
630
639
  core.ElementIDUtils.addIDInfo(this._filterItemElement);
631
- const dataElementIdDoFilterItem = this._filterItemElement.getAttribute("data-element-id");
640
+ const dataElementIdDoFilterItem = this._filterItemElement.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME);
632
641
  this._idSnkFilterDetail = `${dataElementIdDoFilterItem}_${this.config.id}`;
633
642
  this._idEzChip = `${dataElementIdDoFilterItem}_${this.config.id}`;
634
643
  }
@@ -640,6 +649,9 @@ const SnkFilterItem = class {
640
649
  }
641
650
  }
642
651
  }
652
+ /**
653
+ * Emitido quando o estado do filtro é alterado.
654
+ */
643
655
  filterChangeListener() {
644
656
  this.hideDetail();
645
657
  }
@@ -696,6 +708,9 @@ const SnkFilterList = class {
696
708
  this._filterArgument = "";
697
709
  this._filterInput.setFocus();
698
710
  }
711
+ /**
712
+ * Oculta os detalhes do componente snk-filter-list.
713
+ */
699
714
  async hideDetail() {
700
715
  if (this._floatingID != undefined) {
701
716
  core.FloatingManager.close(this._floatingID);
@@ -871,6 +886,9 @@ const EzGridConfig = class {
871
886
  this.selectedIndex = 0;
872
887
  }
873
888
  /* Creation Methods */
889
+ /**
890
+ * Salva as configurações da grade.
891
+ */
874
892
  async saveConfig(config) {
875
893
  var _a;
876
894
  if (config == undefined || ((_a = this._application) === null || _a === void 0 ? void 0 : _a.configName) == undefined) {
@@ -954,11 +972,11 @@ const EzGridConfig = class {
954
972
  this._columListItems = [visibleGroup, hiddenGroup];
955
973
  }
956
974
  buildColumnListSlot(item, group) {
957
- const dataElementId = `${this._element.getAttribute("data-element-id")}_configItem_${core.StringUtils.toCamelCase(item.label)}`;
975
+ const dataElementId = `${this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME)}_configItem_${core.StringUtils.toCamelCase(item.label)}`;
958
976
  return (index.h("div", null, index.h("ez-check", { mode: 'switch', id: 'switch' + ((item === null || item === void 0 ? void 0 : item.label) || '') + ((group === null || group === void 0 ? void 0 : group.group) || ''), value: group.group === this.getMessage("snkGridConfig.group.visible"), "data-element-id": dataElementId, onEzChange: (evt) => { this.switchColumnGroup(evt, item); } })));
959
977
  }
960
978
  buildOrderListSlot(item) {
961
- const dataElementId = `${this._element.getAttribute("data-element-id")}_configItem_${core.StringUtils.toCamelCase(item.label)}`;
979
+ const dataElementId = `${this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME)}_configItem_${core.StringUtils.toCamelCase(item.label)}`;
962
980
  let selectedOption = constants.ORDER_VALUES.none.value;
963
981
  if ((item === null || item === void 0 ? void 0 : item.ascending) != undefined) {
964
982
  selectedOption = item.ascending == true ? constants.ORDER_VALUES.asc.value : constants.ORDER_VALUES.desc.value;
@@ -1330,6 +1348,9 @@ const SelectBox = class {
1330
1348
  constructor(hostRef) {
1331
1349
  index.registerInstance(this, hostRef);
1332
1350
  this.ezChange = index.createEvent(this, "ezChange", 7);
1351
+ /**
1352
+ * Determina a opção selecionada.
1353
+ */
1333
1354
  this.selectedOption = constants.ORDER_VALUES.none;
1334
1355
  }
1335
1356
  render() {
@@ -1459,11 +1480,11 @@ const SnkTaskbar = class {
1459
1480
  }
1460
1481
  }
1461
1482
  getIdElemBtnNative(taskbarElem) {
1462
- const elemIdTaskbar = this._element.getAttribute("data-element-id");
1483
+ const elemIdTaskbar = this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME);
1463
1484
  return `${elemIdTaskbar}_${core.StringUtils.toCamelCase(taskbarElem)}`;
1464
1485
  }
1465
1486
  getIdElemBtnCustom(btnCustom) {
1466
- const elemIdTaskbar = this._element.getAttribute("data-element-id");
1487
+ const elemIdTaskbar = this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME);
1467
1488
  return `${elemIdTaskbar}_${core.StringUtils.toCamelCase(btnCustom.name)}`;
1468
1489
  }
1469
1490
  isDivider(element) {
@@ -13,6 +13,9 @@ const SnkFilterBinarySelect = class {
13
13
  isSelected(option) {
14
14
  return this.value == undefined || this.value === option;
15
15
  }
16
+ /**
17
+ * Emitido quando acontece a alteração de valor do componente snk-filter-binary-select
18
+ */
16
19
  ezChangeListener(evt) {
17
20
  if (!evt.detail) {
18
21
  this.assertCheckedOption(evt.target);
@@ -41,6 +44,9 @@ const SnkFilterBinarySelect = class {
41
44
  this.value = undefined;
42
45
  }
43
46
  }
47
+ /**
48
+ * Exibe o componente snk-filter-binary-select
49
+ */
44
50
  async show() {
45
51
  this._checkOne.setFocus();
46
52
  }
@@ -12,13 +12,16 @@ const SnkFilterDetail = class {
12
12
  index.registerInstance(this, hostRef);
13
13
  this.filterChange = index.createEvent(this, "filterChange", 7);
14
14
  }
15
+ /**
16
+ * Exibe o componente snk-filter-detail.
17
+ */
15
18
  async show() {
16
19
  this._editor["show"]();
17
20
  }
18
21
  componentDidLoad() {
19
22
  if (this._element) {
20
23
  core.ElementIDUtils.addIDInfo(this._element);
21
- const dataElementIdDoFilterItem = this._element.getAttribute("data-element-id");
24
+ const dataElementIdDoFilterItem = this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME);
22
25
  this._idContentEditor = `${dataElementIdDoFilterItem}_${this.config.id}`;
23
26
  }
24
27
  }
@@ -10,9 +10,15 @@ const SnkFilterMultiSelect = class {
10
10
  constructor(hostRef) {
11
11
  index.registerInstance(this, hostRef);
12
12
  }
13
+ /**
14
+ * Emitido quando acontece a alteração de valor do componente snk-filter-multi-select
15
+ */
13
16
  ezChangeListener(evt) {
14
17
  this.value = evt.detail.value;
15
18
  }
19
+ /**
20
+ * Exibe o componente snk-filter-multi-select
21
+ */
16
22
  async show() {
17
23
  this._comboElement.setFocus();
18
24
  }
@@ -10,9 +10,15 @@ const SnkFilterPeriod = class {
10
10
  constructor(hostRef) {
11
11
  index.registerInstance(this, hostRef);
12
12
  }
13
+ /**
14
+ * Emitido quando acontece a alteração de valor do componente snk-filter-number
15
+ */
13
16
  ezChangeListener(evt) {
14
17
  this.value = evt.detail;
15
18
  }
19
+ /**
20
+ * Exibe o componente snk-filter-number
21
+ */
16
22
  async show() {
17
23
  this._numberElement.setFocus();
18
24
  }
@@ -10,6 +10,9 @@ const SnkFilterPeriod = class {
10
10
  constructor(hostRef) {
11
11
  index.registerInstance(this, hostRef);
12
12
  }
13
+ /**
14
+ * Emitido quando acontece a alteração de valor do componente snk-filter-period
15
+ */
13
16
  ezChangeListener() {
14
17
  const start = this._startDate.value;
15
18
  const end = this._endDate.value;
@@ -32,6 +35,9 @@ const SnkFilterPeriod = class {
32
35
  }
33
36
  return null;
34
37
  }
38
+ /**
39
+ * Exibe o componente snk-filter-period
40
+ */
35
41
  async show() {
36
42
  this._startDate.setFocus();
37
43
  }
@@ -77,6 +77,9 @@ const SnkFilterPersonalized = class {
77
77
  }
78
78
  });
79
79
  }
80
+ /**
81
+ * Exibe o componente snk-filter-personalized
82
+ */
80
83
  async show() {
81
84
  const elem = document.querySelector("#param_0");
82
85
  if (elem) {
@@ -10,6 +10,9 @@ const SnkFilterSearch = class {
10
10
  constructor(hostRef) {
11
11
  index.registerInstance(this, hostRef);
12
12
  }
13
+ /**
14
+ * Emitido quando acontece a alteração de valor do componente snk-filter-search
15
+ */
13
16
  ezChangeListener(_evt) {
14
17
  this.value = this._searchInput.value;
15
18
  }
@@ -29,6 +32,9 @@ const SnkFilterSearch = class {
29
32
  });
30
33
  });
31
34
  }
35
+ /**
36
+ * Exibe o componente snk-filter-search
37
+ */
32
38
  async show() {
33
39
  this._searchInput.setFocus();
34
40
  }
@@ -9,6 +9,9 @@ const SnkFilterText = class {
9
9
  constructor(hostRef) {
10
10
  index.registerInstance(this, hostRef);
11
11
  }
12
+ /**
13
+ * Emitido quando acontece a alteração de valor do componente snk-filter-text.
14
+ */
12
15
  ezChangeListener(evt) {
13
16
  this.value = evt.detail;
14
17
  }
@@ -242,8 +242,8 @@ const SnkFormConfig = class {
242
242
  var _a;
243
243
  return ((_a = group.fields) === null || _a === void 0 ? void 0 : _a.length) ? group.fields.map((field) => {
244
244
  var _a, _b;
245
- return index.h("div", { key: field.name, class: this.getFieldConfigStyle(field), "data-draggable-element": "field", onMouseDown: (evt) => this.controlMoveField(evt) }, index.h("snk-field-config", { onEzClickIcon: (evt) => { this.handleFieldConfigChange(evt); }, modeInsertion: false, fieldConfig: field, "data-element-id": this._element.getAttribute("data-element-id"), dataUnit: this.dataUnit, isConfigActive: ((_a = this._fieldConfigSelected) === null || _a === void 0 ? void 0 : _a.name) === field.name }), ((_b = this._fieldConfigSelected) === null || _b === void 0 ? void 0 : _b.name) === field.name &&
246
- index.h("div", { class: "ez-flex form-config__config-options" }, index.h("snk-config-options", { idConfig: field.name, dataUnit: this.dataUnit, fieldConfig: this._fieldConfigSelected, "data-element-id": this._element.getAttribute("data-element-id"), onConfigOptionsChanged: (evt) => this.handleconfigOptionsChanged(evt.detail) })));
245
+ return index.h("div", { key: field.name, class: this.getFieldConfigStyle(field), "data-draggable-element": "field", onMouseDown: (evt) => this.controlMoveField(evt) }, index.h("snk-field-config", { onEzClickIcon: (evt) => { this.handleFieldConfigChange(evt); }, modeInsertion: false, fieldConfig: field, "data-element-id": this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), dataUnit: this.dataUnit, isConfigActive: ((_a = this._fieldConfigSelected) === null || _a === void 0 ? void 0 : _a.name) === field.name }), ((_b = this._fieldConfigSelected) === null || _b === void 0 ? void 0 : _b.name) === field.name &&
246
+ index.h("div", { class: "ez-flex form-config__config-options" }, index.h("snk-config-options", { idConfig: field.name, dataUnit: this.dataUnit, fieldConfig: this._fieldConfigSelected, "data-element-id": this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), onConfigOptionsChanged: (evt) => this.handleconfigOptionsChanged(evt.detail) })));
247
247
  }) : index.h("div", { class: "form-config__add-group-container" }, index.h("div", { class: "form-config__add-group-content" }, index.h("div", { class: "form-config__add-group-label" }, index.h("label", { class: "ez-text ez-text--center ez-text--medium ez-text--primary ez-text--bold" }, this.getMessage("snkFormConfig.form.labelDropField")))));
248
248
  }
249
249
  handleconfigOptionsChanged(fieldEdited) {