@sankhyalabs/sankhyablocks 2.4.0 → 2.4.2
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/cjs/snk-application.cjs.entry.js +45 -28
- package/dist/cjs/snk-config-options.cjs.entry.js +1 -1
- package/dist/cjs/snk-configurator_3.cjs.entry.js +11 -5
- package/dist/cjs/snk-crud.cjs.entry.js +1 -1
- package/dist/cjs/snk-data-unit.cjs.entry.js +2 -4
- package/dist/cjs/snk-filter-bar_7.cjs.entry.js +21 -0
- package/dist/cjs/snk-filter-binary-select.cjs.entry.js +6 -0
- package/dist/cjs/snk-filter-detail.cjs.entry.js +3 -0
- package/dist/cjs/snk-filter-multi-select.cjs.entry.js +6 -0
- package/dist/cjs/snk-filter-number.cjs.entry.js +6 -0
- package/dist/cjs/snk-filter-period.cjs.entry.js +6 -0
- package/dist/cjs/snk-filter-personalized.cjs.entry.js +3 -0
- package/dist/cjs/snk-filter-search.cjs.entry.js +6 -0
- package/dist/cjs/snk-filter-text.cjs.entry.js +3 -0
- package/dist/cjs/snk-form.cjs.entry.js +2 -2
- package/dist/collection/components/snk-application/snk-application.js +81 -64
- package/dist/collection/components/snk-configurator/snk-configurator.js +11 -5
- package/dist/collection/components/snk-crud/snk-crud.js +5 -5
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +14 -19
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.js +9 -3
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.js +9 -3
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-number.js +9 -3
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-period.js +9 -3
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-personalized.js +6 -3
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-search.js +9 -3
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-text.js +5 -2
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +7 -4
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +15 -6
- package/dist/collection/components/snk-filter-bar/filter-list/snk-filter-list.js +12 -9
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +9 -9
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +4 -1
- package/dist/collection/components/snk-form/snk-form.js +9 -9
- package/dist/collection/components/snk-form/subcomponents/snk-config-options/snk-config-options.js +5 -5
- package/dist/collection/components/snk-form/subcomponents/snk-field-config/snk-field-config.js +6 -6
- package/dist/collection/components/snk-form/subcomponents/snk-form-config/snk-form-config.js +4 -4
- package/dist/collection/components/snk-form/subcomponents/snk-tab-config/snk-tab-config.js +7 -7
- package/dist/collection/components/snk-grid/snk-grid.js +12 -12
- package/dist/collection/components/snk-grid/subcomponents/snk-grid-config/snk-grid-config.js +6 -3
- package/dist/collection/components/snk-grid/subcomponents/snk-select-box/snk-select-box.js +5 -2
- package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +11 -10
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +8 -8
- package/dist/components/snk-application2.js +45 -28
- package/dist/components/snk-config-options2.js +1 -1
- package/dist/components/snk-configurator2.js +6 -0
- package/dist/components/snk-crud.js +1 -1
- package/dist/components/snk-data-unit.js +2 -4
- package/dist/components/snk-field-config2.js +2 -2
- package/dist/components/snk-filter-bar2.js +3 -0
- package/dist/components/snk-filter-binary-select.js +6 -0
- package/dist/components/snk-filter-detail2.js +3 -0
- package/dist/components/snk-filter-item2.js +9 -0
- package/dist/components/snk-filter-list2.js +3 -0
- package/dist/components/snk-filter-multi-select.js +6 -0
- package/dist/components/snk-filter-number.js +6 -0
- package/dist/components/snk-filter-period.js +6 -0
- package/dist/components/snk-filter-personalized.js +3 -0
- package/dist/components/snk-filter-search.js +6 -0
- package/dist/components/snk-filter-text.js +3 -0
- package/dist/components/snk-form2.js +2 -2
- package/dist/components/snk-grid-config2.js +3 -0
- package/dist/components/snk-grid2.js +3 -3
- package/dist/components/snk-select-box2.js +3 -0
- package/dist/esm/snk-application.entry.js +45 -28
- package/dist/esm/snk-config-options.entry.js +1 -1
- package/dist/esm/snk-configurator_3.entry.js +11 -5
- package/dist/esm/snk-crud.entry.js +1 -1
- package/dist/esm/snk-data-unit.entry.js +2 -4
- package/dist/esm/snk-filter-bar_7.entry.js +21 -0
- package/dist/esm/snk-filter-binary-select.entry.js +6 -0
- package/dist/esm/snk-filter-detail.entry.js +3 -0
- package/dist/esm/snk-filter-multi-select.entry.js +6 -0
- package/dist/esm/snk-filter-number.entry.js +6 -0
- package/dist/esm/snk-filter-period.entry.js +6 -0
- package/dist/esm/snk-filter-personalized.entry.js +3 -0
- package/dist/esm/snk-filter-search.entry.js +6 -0
- package/dist/esm/snk-filter-text.entry.js +3 -0
- package/dist/esm/snk-form.entry.js +2 -2
- package/dist/types/components/snk-application/snk-application.d.ts +48 -32
- package/dist/types/components/snk-configurator/snk-configurator.d.ts +9 -3
- package/dist/types/components/snk-crud/snk-crud.d.ts +4 -4
- package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +12 -14
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.d.ts +12 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.d.ts +12 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-number.d.ts +12 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-period.d.ts +12 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-personalized.d.ts +9 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-search.d.ts +12 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-text.d.ts +9 -0
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +12 -0
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +20 -2
- package/dist/types/components/snk-filter-bar/filter-list/snk-filter-list.d.ts +27 -0
- package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +28 -1
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +4 -1
- package/dist/types/components/snk-form/snk-form.d.ts +7 -7
- package/dist/types/components/snk-form/subcomponents/snk-config-options/snk-config-options.d.ts +4 -4
- package/dist/types/components/snk-form/subcomponents/snk-field-config/snk-field-config.d.ts +5 -5
- package/dist/types/components/snk-form/subcomponents/snk-form-config/snk-form-config.d.ts +4 -4
- package/dist/types/components/snk-form/subcomponents/snk-tab-config/snk-tab-config.d.ts +8 -10
- package/dist/types/components/snk-grid/snk-grid.d.ts +9 -9
- package/dist/types/components/snk-grid/subcomponents/snk-grid-config/snk-grid-config.d.ts +5 -2
- package/dist/types/components/snk-grid/subcomponents/snk-select-box/snk-select-box.d.ts +6 -0
- package/dist/types/components/snk-pesquisa/snk-pesquisa.d.ts +12 -2
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +8 -8
- package/dist/types/components.d.ts +428 -135
- package/package.json +2 -2
|
@@ -706,7 +706,7 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
706
706
|
}
|
|
707
707
|
}
|
|
708
708
|
/**
|
|
709
|
-
*
|
|
709
|
+
* Obtém `true` caso o usuário logado seja o SUP.
|
|
710
710
|
*/
|
|
711
711
|
async isUserSup() {
|
|
712
712
|
return new Promise((resolve, reject) => {
|
|
@@ -718,7 +718,7 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
718
718
|
});
|
|
719
719
|
}
|
|
720
720
|
/**
|
|
721
|
-
*
|
|
721
|
+
* Obtém `true` caso o usuário logado tem permissão pra determinada ação.
|
|
722
722
|
*/
|
|
723
723
|
async hasAccess(access) {
|
|
724
724
|
return new Promise((resolve, reject) => {
|
|
@@ -730,7 +730,7 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
730
730
|
});
|
|
731
731
|
}
|
|
732
732
|
/**
|
|
733
|
-
*
|
|
733
|
+
* Obtém todos os acessos do usuário logado.
|
|
734
734
|
*/
|
|
735
735
|
async getAllAccess() {
|
|
736
736
|
return new Promise((resolve, reject) => {
|
|
@@ -747,37 +747,37 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
747
747
|
});
|
|
748
748
|
}
|
|
749
749
|
/**
|
|
750
|
-
*
|
|
750
|
+
* Obtém o valor de um parâmetro do tipo string.
|
|
751
751
|
*/
|
|
752
752
|
async getStringParam(name) {
|
|
753
753
|
return this.parameters.asString(name);
|
|
754
754
|
}
|
|
755
755
|
/**
|
|
756
|
-
*
|
|
756
|
+
* Obtém o valor de um parâmetro do tipo Inteiro.
|
|
757
757
|
*/
|
|
758
758
|
async getIntParam(name) {
|
|
759
759
|
return this.parameters.asInteger(name);
|
|
760
760
|
}
|
|
761
761
|
/**
|
|
762
|
-
*
|
|
762
|
+
* Obtém o valor de um parâmetro do tipo Decimal.
|
|
763
763
|
*/
|
|
764
764
|
async getFloatParam(name) {
|
|
765
765
|
return this.parameters.asFloat(name);
|
|
766
766
|
}
|
|
767
767
|
/**
|
|
768
|
-
*
|
|
768
|
+
* Obtém o valor de um parâmetro do tipo booleano.
|
|
769
769
|
*/
|
|
770
770
|
async getBooleanParam(name) {
|
|
771
771
|
return this.parameters.asBoolean(name);
|
|
772
772
|
}
|
|
773
773
|
/**
|
|
774
|
-
*
|
|
774
|
+
* Obtém o valor de um parâmetro do tipo data.
|
|
775
775
|
*/
|
|
776
776
|
async getDateParam(name) {
|
|
777
777
|
return this.parameters.asDate(name);
|
|
778
778
|
}
|
|
779
779
|
/**
|
|
780
|
-
*
|
|
780
|
+
* Exibe o conteúdo passado em um Popup.
|
|
781
781
|
*/
|
|
782
782
|
async showPopUp(content, size = "full", useHeader = true) {
|
|
783
783
|
this.clearContent(this._popUp);
|
|
@@ -789,17 +789,23 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
789
789
|
this._popUp.useHeader = false;
|
|
790
790
|
}
|
|
791
791
|
}
|
|
792
|
+
/**
|
|
793
|
+
* Exibe o conteúdo passado em um Modal.
|
|
794
|
+
*/
|
|
792
795
|
async showModal(content) {
|
|
793
796
|
this.clearContent(this._rightModal);
|
|
794
797
|
this._rightModal.appendChild(content);
|
|
795
798
|
this._rightModal.opened = true;
|
|
796
799
|
}
|
|
800
|
+
/**
|
|
801
|
+
* Fecha o Modal e limpa o conteúdo.
|
|
802
|
+
*/
|
|
797
803
|
async closeModal() {
|
|
798
804
|
this.clearContent(this._rightModal);
|
|
799
805
|
this._rightModal.opened = false;
|
|
800
806
|
}
|
|
801
807
|
/**
|
|
802
|
-
* Fecha o
|
|
808
|
+
* Fecha o Popup e limpa o conteúdo.
|
|
803
809
|
*/
|
|
804
810
|
async closePopUp() {
|
|
805
811
|
this.clearContent(this._popUp);
|
|
@@ -834,7 +840,7 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
834
840
|
});
|
|
835
841
|
}
|
|
836
842
|
/**
|
|
837
|
-
*
|
|
843
|
+
* Obtém a configuração de um recurso por service broker
|
|
838
844
|
*/
|
|
839
845
|
async getConfig(key) {
|
|
840
846
|
let payload = {
|
|
@@ -875,13 +881,13 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
875
881
|
});
|
|
876
882
|
}
|
|
877
883
|
/**
|
|
878
|
-
* Acessa informações de contexto "empurrados" na abertura da tela
|
|
884
|
+
* Acessa informações de contexto "empurrados" na abertura da tela.
|
|
879
885
|
*/
|
|
880
886
|
async getAttributeFromHTMLWrapper(attribName) {
|
|
881
887
|
return Promise.resolve(window[attribName]);
|
|
882
888
|
}
|
|
883
889
|
/**
|
|
884
|
-
* Abre determinada tela, repassando pkObject
|
|
890
|
+
* Abre determinada tela, repassando pkObject.
|
|
885
891
|
*/
|
|
886
892
|
async openApp(resourceId, pkObject) {
|
|
887
893
|
Workspace.openAppActivity(resourceId, pkObject);
|
|
@@ -899,7 +905,7 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
899
905
|
}
|
|
900
906
|
/**
|
|
901
907
|
* Cria o DataUnit a partir do nome da entidade. É possível armazená-lo no cache
|
|
902
|
-
* passando o dataUnitName, assim, se mais de uma chamada for feita, o mesmo DataUnit será usado
|
|
908
|
+
* passando o dataUnitName, assim, se mais de uma chamada for feita, o mesmo DataUnit será usado.
|
|
903
909
|
*/
|
|
904
910
|
async createDataunit(entityName, dataUnitName) {
|
|
905
911
|
return new Promise((resolve, reject) => {
|
|
@@ -940,31 +946,31 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
940
946
|
});
|
|
941
947
|
}
|
|
942
948
|
/**
|
|
943
|
-
*
|
|
949
|
+
* Obtém o resourceID da tela em questão.
|
|
944
950
|
*/
|
|
945
951
|
async getResourceID() {
|
|
946
952
|
return Promise.resolve(this.resourceID);
|
|
947
953
|
}
|
|
948
954
|
/**
|
|
949
|
-
*
|
|
955
|
+
* Obtém o UserId da tela em questão.
|
|
950
956
|
*/
|
|
951
957
|
async getUserID() {
|
|
952
958
|
return Promise.resolve(window["UID"]);
|
|
953
959
|
}
|
|
954
960
|
/**
|
|
955
|
-
*
|
|
961
|
+
* Exibe o diálogo de alerta de acordo com os parâmetros passados.
|
|
956
962
|
*/
|
|
957
963
|
async alert(title, message, icon, options) {
|
|
958
964
|
return ApplicationUtils.alert(title, message, icon, options);
|
|
959
965
|
}
|
|
960
966
|
/**
|
|
961
|
-
*
|
|
967
|
+
* Exibe o diálogo de erro de acordo com os parâmetros passados.
|
|
962
968
|
*/
|
|
963
969
|
async error(title, message, icon, options) {
|
|
964
970
|
return ApplicationUtils.error(title, message, icon, options);
|
|
965
971
|
}
|
|
966
972
|
/**
|
|
967
|
-
*
|
|
973
|
+
* Exibe o diálogo de sucesso de acordo com os parâmetros passados.
|
|
968
974
|
*/
|
|
969
975
|
async success(title, message, icon, options) {
|
|
970
976
|
return ApplicationUtils.success(title, message, icon, options);
|
|
@@ -982,43 +988,43 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
982
988
|
return ApplicationUtils.confirm(title, message, icon, dialogType, options);
|
|
983
989
|
}
|
|
984
990
|
/**
|
|
985
|
-
*
|
|
991
|
+
* Exibe uma informação efêmera (de segundo plano).
|
|
986
992
|
*/
|
|
987
993
|
async info(message, options) {
|
|
988
994
|
return ApplicationUtils.info(message, options);
|
|
989
995
|
}
|
|
990
996
|
/**
|
|
991
|
-
*
|
|
997
|
+
* Obtém a configuração de formulário.
|
|
992
998
|
*/
|
|
993
999
|
async loadFormConfig(name) {
|
|
994
1000
|
return this.formConfigFetcher.loadFormConfig(name, this.resourceID);
|
|
995
1001
|
}
|
|
996
1002
|
/**
|
|
997
|
-
*
|
|
1003
|
+
* Obtém a configuração de grade.
|
|
998
1004
|
*/
|
|
999
1005
|
async loadGridConfig(name) {
|
|
1000
1006
|
return this.gridConfigFetcher.getConfig(name, this.resourceID);
|
|
1001
1007
|
}
|
|
1002
1008
|
/**
|
|
1003
|
-
*
|
|
1009
|
+
* Obtém a lista de configurações de formulário do usuário.
|
|
1004
1010
|
*/
|
|
1005
1011
|
async fetchUserAvailableConfigs(name) {
|
|
1006
1012
|
return this.formConfigFetcher.fetchUserAvailableConfigs(name, this.resourceID);
|
|
1007
1013
|
}
|
|
1008
1014
|
/**
|
|
1009
|
-
*
|
|
1015
|
+
* Obtém a configuração de formulário do usuário.
|
|
1010
1016
|
*/
|
|
1011
1017
|
async fetchLegacyConfig(name) {
|
|
1012
1018
|
return this.formConfigFetcher.fetchLegacyConfig(name, this.resourceID);
|
|
1013
1019
|
}
|
|
1014
1020
|
/**
|
|
1015
|
-
*
|
|
1021
|
+
* Obtém a configuração padrão de formulário.
|
|
1016
1022
|
*/
|
|
1017
1023
|
async fetchDefaultConfig(name) {
|
|
1018
1024
|
return this.formConfigFetcher.fetchDefaultConfig(name, this.resourceID);
|
|
1019
1025
|
}
|
|
1020
1026
|
/**
|
|
1021
|
-
*
|
|
1027
|
+
* Obtém os totalizadores da grade.
|
|
1022
1028
|
*/
|
|
1023
1029
|
async loadTotals(name, resourceID, filters) {
|
|
1024
1030
|
return this.totalsFetcher.fetchTotals(name, resourceID, filters);
|
|
@@ -1062,13 +1068,13 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
1062
1068
|
return this.formConfigFetcher.saveConfig(config, name, this.resourceID);
|
|
1063
1069
|
}
|
|
1064
1070
|
/**
|
|
1065
|
-
*
|
|
1071
|
+
* Obtém um objeto com um conjunto de valores padrão.
|
|
1066
1072
|
*/
|
|
1067
1073
|
async getDefaultValues() {
|
|
1068
1074
|
return this.defaultValuesFetcher.getDefaultValues(this.resourceID);
|
|
1069
1075
|
}
|
|
1070
1076
|
/**
|
|
1071
|
-
*
|
|
1077
|
+
* Obtém um valor padrão específico de uma expressão.
|
|
1072
1078
|
*/
|
|
1073
1079
|
async getDefaultValue(expression) {
|
|
1074
1080
|
return this._defaultValues && this._defaultValues[expression];
|
|
@@ -1130,6 +1136,10 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
1130
1136
|
}
|
|
1131
1137
|
return this._defaultValuesFetcher;
|
|
1132
1138
|
}
|
|
1139
|
+
/**
|
|
1140
|
+
* Obtém as opções em componentes de pesquisa
|
|
1141
|
+
* Ex.: snk-config-options
|
|
1142
|
+
*/
|
|
1133
1143
|
async executeSearch(searchArgument, fieldName, dataUnit) {
|
|
1134
1144
|
const descriptor = dataUnit === null || dataUnit === void 0 ? void 0 : dataUnit.getField(fieldName);
|
|
1135
1145
|
if (!descriptor) ;
|
|
@@ -1167,6 +1177,10 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
1167
1177
|
return this.executePreparedSearch(mode, argument, { entity: ENTITYNAME, entityDescription: DESCRIPTIONENTITY, criteria, searchOptions });
|
|
1168
1178
|
}
|
|
1169
1179
|
}
|
|
1180
|
+
/**
|
|
1181
|
+
* Obtém as opções em componentes de pesquisa
|
|
1182
|
+
* Ex.: snk-config-options
|
|
1183
|
+
*/
|
|
1170
1184
|
async executePreparedSearch(mode, argument, options) {
|
|
1171
1185
|
const { entity, entityDescription, criteria, searchOptions } = options;
|
|
1172
1186
|
if (mode === "ADVANCED") {
|
|
@@ -1188,6 +1202,9 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
1188
1202
|
return this.pesquisaFetcher.loadSearchOptions(entity, argument, criteria, searchOptions);
|
|
1189
1203
|
}
|
|
1190
1204
|
}
|
|
1205
|
+
/**
|
|
1206
|
+
* Obtém `true` caso a tela esteja em modo de debug.
|
|
1207
|
+
*/
|
|
1191
1208
|
async isDebugMode() {
|
|
1192
1209
|
return new Promise(accept => {
|
|
1193
1210
|
accept(window['isDebugMode']);
|
|
@@ -12,7 +12,7 @@ const SnkConfigOptions = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
12
12
|
this.__registerHost();
|
|
13
13
|
this.configOptionsChanged = createEvent(this, "configOptionsChanged", 7);
|
|
14
14
|
/**
|
|
15
|
-
* Armazena as propriedades do campo
|
|
15
|
+
* Armazena as propriedades do campo.
|
|
16
16
|
*/
|
|
17
17
|
this.fieldConfig = {};
|
|
18
18
|
}
|
|
@@ -19,10 +19,16 @@ const SnkConfigurator = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
19
19
|
*/
|
|
20
20
|
this.viewMode = GRID_MODE.name;
|
|
21
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Exibe a janela de configuração.
|
|
24
|
+
*/
|
|
22
25
|
async open() {
|
|
23
26
|
this._opened = true;
|
|
24
27
|
this.configSelected.emit(this.getViewModeValue());
|
|
25
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* Fecha a janela de configuração.
|
|
31
|
+
*/
|
|
26
32
|
async close() {
|
|
27
33
|
this.closeConfig();
|
|
28
34
|
}
|
|
@@ -28,7 +28,7 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
28
28
|
this.actionClick = createEvent(this, "actionClick", 7);
|
|
29
29
|
this._viewMode = GRID_MODE.name;
|
|
30
30
|
/**
|
|
31
|
-
* Determina se pode haver mais de uma linha selecionada na grade
|
|
31
|
+
* Determina se pode haver mais de uma linha selecionada na grade.
|
|
32
32
|
*/
|
|
33
33
|
this.multipleSelection = true;
|
|
34
34
|
}
|
|
@@ -15,7 +15,7 @@ const SnkDataUnit$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
15
15
|
this.cancelEdition = createEvent(this, "cancelEdition", 7);
|
|
16
16
|
this._onDataUnitResolve = [];
|
|
17
17
|
/**
|
|
18
|
-
* Determina quantas linhas são retornadas por página
|
|
18
|
+
* Determina quantas linhas são retornadas por página.
|
|
19
19
|
*/
|
|
20
20
|
this.pageSize = 150;
|
|
21
21
|
this._dataUnitObserver = (action) => {
|
|
@@ -88,9 +88,7 @@ const SnkDataUnit$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
88
88
|
this.dataUnitReady.emit(this.dataUnit);
|
|
89
89
|
}
|
|
90
90
|
/**
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
* @returns dataUnit
|
|
91
|
+
* Obtém o dataUnit.
|
|
94
92
|
*/
|
|
95
93
|
async getDataUnit() {
|
|
96
94
|
return new Promise((resolve) => {
|
|
@@ -14,7 +14,7 @@ const SnkFieldConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
14
14
|
*/
|
|
15
15
|
this.isConfigActive = false;
|
|
16
16
|
/**
|
|
17
|
-
* Define se o componente está em modo de inserção
|
|
17
|
+
* Define se o componente está em modo de inserção.
|
|
18
18
|
*/
|
|
19
19
|
this.modeInsertion = true;
|
|
20
20
|
}
|
|
@@ -31,7 +31,7 @@ const SnkFieldConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
31
31
|
* Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
|
|
32
32
|
* através de um pequeno modulo na estrutura da aplicação:
|
|
33
33
|
* - Criar um arquivo no seguinte caminho: /messages/appmessages.msg.js.
|
|
34
|
-
* Para conhecer os detalhes do módulo, vide o arquivo neste projeto "/src/lib/message/resources/snk-form.msg.ts"
|
|
34
|
+
* Para conhecer os detalhes do módulo, vide o arquivo neste projeto "/src/lib/message/resources/snk-form.msg.ts".
|
|
35
35
|
*/
|
|
36
36
|
getMessage(key) {
|
|
37
37
|
return this._application.messagesBuilder.getMessage(key, {});
|
|
@@ -432,6 +432,9 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
432
432
|
this.registryFilterProvider();
|
|
433
433
|
}
|
|
434
434
|
}
|
|
435
|
+
/**
|
|
436
|
+
* Emitido quando acontece a alteração do estado do filtro.
|
|
437
|
+
*/
|
|
435
438
|
filterChangeListener(evt) {
|
|
436
439
|
this.updateFilter(evt.detail);
|
|
437
440
|
}
|
|
@@ -10,6 +10,9 @@ const SnkFilterBinarySelect$1 = /*@__PURE__*/ proxyCustomElement(class extends H
|
|
|
10
10
|
isSelected(option) {
|
|
11
11
|
return this.value == undefined || this.value === option;
|
|
12
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* Emitido quando acontece a alteração de valor do componente snk-filter-binary-select
|
|
15
|
+
*/
|
|
13
16
|
ezChangeListener(evt) {
|
|
14
17
|
if (!evt.detail) {
|
|
15
18
|
this.assertCheckedOption(evt.target);
|
|
@@ -38,6 +41,9 @@ const SnkFilterBinarySelect$1 = /*@__PURE__*/ proxyCustomElement(class extends H
|
|
|
38
41
|
this.value = undefined;
|
|
39
42
|
}
|
|
40
43
|
}
|
|
44
|
+
/**
|
|
45
|
+
* Exibe o componente snk-filter-binary-select
|
|
46
|
+
*/
|
|
41
47
|
async show() {
|
|
42
48
|
this._checkOne.setFocus();
|
|
43
49
|
}
|
|
@@ -9,6 +9,9 @@ const SnkFilterDetail = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
9
9
|
this.__registerHost();
|
|
10
10
|
this.filterChange = createEvent(this, "filterChange", 7);
|
|
11
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* Exibe o componente snk-filter-detail.
|
|
14
|
+
*/
|
|
12
15
|
async show() {
|
|
13
16
|
this._editor["show"]();
|
|
14
17
|
}
|
|
@@ -20,6 +20,9 @@ const SnkFilterItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
20
20
|
observeDetailIsVisible(value) {
|
|
21
21
|
this.visibleChanged.emit(value);
|
|
22
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Exibe os detalhes de um item da lista.
|
|
25
|
+
*/
|
|
23
26
|
async showUp(open = false) {
|
|
24
27
|
return new Promise(resolve => {
|
|
25
28
|
this._filterItemElement.scrollIntoView({ behavior: "auto", block: "nearest", inline: "nearest" });
|
|
@@ -44,6 +47,9 @@ const SnkFilterItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
44
47
|
const rect = this._filterItemElement.getBoundingClientRect();
|
|
45
48
|
return `calc(${rect.left}px + ${padding})`;
|
|
46
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* Oculta os detalhes de um item da lista.
|
|
52
|
+
*/
|
|
47
53
|
async hideDetail() {
|
|
48
54
|
if (this.detailIsVisible) {
|
|
49
55
|
if (this._floatingID != undefined) {
|
|
@@ -154,6 +160,9 @@ const SnkFilterItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
154
160
|
}
|
|
155
161
|
}
|
|
156
162
|
}
|
|
163
|
+
/**
|
|
164
|
+
* Emitido quando o estado do filtro é alterado.
|
|
165
|
+
*/
|
|
157
166
|
filterChangeListener() {
|
|
158
167
|
this.hideDetail();
|
|
159
168
|
}
|
|
@@ -30,6 +30,9 @@ const SnkFilterList = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
30
30
|
this._filterArgument = "";
|
|
31
31
|
this._filterInput.setFocus();
|
|
32
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* Oculta os detalhes do componente snk-filter-list.
|
|
35
|
+
*/
|
|
33
36
|
async hideDetail() {
|
|
34
37
|
if (this._floatingID != undefined) {
|
|
35
38
|
FloatingManager.close(this._floatingID);
|
|
@@ -7,9 +7,15 @@ const SnkFilterMultiSelect$1 = /*@__PURE__*/ proxyCustomElement(class extends HT
|
|
|
7
7
|
super();
|
|
8
8
|
this.__registerHost();
|
|
9
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* Emitido quando acontece a alteração de valor do componente snk-filter-multi-select
|
|
12
|
+
*/
|
|
10
13
|
ezChangeListener(evt) {
|
|
11
14
|
this.value = evt.detail.value;
|
|
12
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* Exibe o componente snk-filter-multi-select
|
|
18
|
+
*/
|
|
13
19
|
async show() {
|
|
14
20
|
this._comboElement.setFocus();
|
|
15
21
|
}
|
|
@@ -7,9 +7,15 @@ const SnkFilterPeriod = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
7
7
|
super();
|
|
8
8
|
this.__registerHost();
|
|
9
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* Emitido quando acontece a alteração de valor do componente snk-filter-number
|
|
12
|
+
*/
|
|
10
13
|
ezChangeListener(evt) {
|
|
11
14
|
this.value = evt.detail;
|
|
12
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* Exibe o componente snk-filter-number
|
|
18
|
+
*/
|
|
13
19
|
async show() {
|
|
14
20
|
this._numberElement.setFocus();
|
|
15
21
|
}
|
|
@@ -7,6 +7,9 @@ const SnkFilterPeriod$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
7
7
|
super();
|
|
8
8
|
this.__registerHost();
|
|
9
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* Emitido quando acontece a alteração de valor do componente snk-filter-period
|
|
12
|
+
*/
|
|
10
13
|
ezChangeListener() {
|
|
11
14
|
const start = this._startDate.value;
|
|
12
15
|
const end = this._endDate.value;
|
|
@@ -29,6 +32,9 @@ const SnkFilterPeriod$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
29
32
|
}
|
|
30
33
|
return null;
|
|
31
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* Exibe o componente snk-filter-period
|
|
37
|
+
*/
|
|
32
38
|
async show() {
|
|
33
39
|
this._startDate.setFocus();
|
|
34
40
|
}
|
|
@@ -7,6 +7,9 @@ const SnkFilterSearch$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
7
7
|
super();
|
|
8
8
|
this.__registerHost();
|
|
9
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* Emitido quando acontece a alteração de valor do componente snk-filter-search
|
|
12
|
+
*/
|
|
10
13
|
ezChangeListener(_evt) {
|
|
11
14
|
this.value = this._searchInput.value;
|
|
12
15
|
}
|
|
@@ -26,6 +29,9 @@ const SnkFilterSearch$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
26
29
|
});
|
|
27
30
|
});
|
|
28
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* Exibe o componente snk-filter-search
|
|
34
|
+
*/
|
|
29
35
|
async show() {
|
|
30
36
|
this._searchInput.setFocus();
|
|
31
37
|
}
|
|
@@ -6,6 +6,9 @@ const SnkFilterText$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
6
6
|
super();
|
|
7
7
|
this.__registerHost();
|
|
8
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* Emitido quando acontece a alteração de valor do componente snk-filter-text.
|
|
11
|
+
*/
|
|
9
12
|
ezChangeListener(evt) {
|
|
10
13
|
this.value = evt.detail;
|
|
11
14
|
}
|
|
@@ -26,13 +26,13 @@ const SnkForm = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
26
26
|
this._showFormConfig = false;
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* Exibe a janela de configurações do formulário.
|
|
30
30
|
*/
|
|
31
31
|
async showConfig() {
|
|
32
32
|
this._showFormConfig = true;
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
35
|
+
* Fecha a janela de configurações do formulário.
|
|
36
36
|
*/
|
|
37
37
|
async hideConfig() {
|
|
38
38
|
this._showFormConfig = false;
|
|
@@ -25,6 +25,9 @@ const EzGridConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
25
25
|
this.selectedIndex = 0;
|
|
26
26
|
}
|
|
27
27
|
/* Creation Methods */
|
|
28
|
+
/**
|
|
29
|
+
* Salva as configurações da grade.
|
|
30
|
+
*/
|
|
28
31
|
async saveConfig(config) {
|
|
29
32
|
var _a;
|
|
30
33
|
if (config == undefined || ((_a = this._application) === null || _a === void 0 ? void 0 : _a.configName) == undefined) {
|
|
@@ -29,7 +29,7 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
29
29
|
this._popUpGridConfig = false;
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
32
|
+
* Exibe a janela de configurações da grade.
|
|
33
33
|
*/
|
|
34
34
|
async showConfig() {
|
|
35
35
|
if (this._grid == undefined) {
|
|
@@ -38,7 +38,7 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
38
38
|
this.openGridConfig();
|
|
39
39
|
}
|
|
40
40
|
/**
|
|
41
|
-
*
|
|
41
|
+
* Fecha a janela de configurações da grade.
|
|
42
42
|
*/
|
|
43
43
|
async hideConfig() {
|
|
44
44
|
if (this._grid == undefined) {
|
|
@@ -47,7 +47,7 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
47
47
|
this.closeGridConfig();
|
|
48
48
|
}
|
|
49
49
|
/**
|
|
50
|
-
*
|
|
50
|
+
* Atribui o valor da configuração da grade.
|
|
51
51
|
*/
|
|
52
52
|
async setConfig(config) {
|
|
53
53
|
this.setGridConfig(config);
|
|
@@ -9,6 +9,9 @@ const SelectBox = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
9
9
|
this.__registerHost();
|
|
10
10
|
this.__attachShadow();
|
|
11
11
|
this.ezChange = createEvent(this, "ezChange", 7);
|
|
12
|
+
/**
|
|
13
|
+
* Determina a opção selecionada.
|
|
14
|
+
*/
|
|
12
15
|
this.selectedOption = ORDER_VALUES.none;
|
|
13
16
|
}
|
|
14
17
|
render() {
|