@sankhyalabs/sankhyablocks 8.8.7 → 8.8.8
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 +26 -14
- package/dist/collection/components/snk-application/snk-application.js +26 -14
- package/dist/components/snk-application2.js +26 -14
- package/dist/esm/snk-application.entry.js +26 -14
- package/dist/sankhyablocks/{p-4efe1a8a.entry.js → p-3532eb1c.entry.js} +3 -3
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-application/snk-application.d.ts +2 -0
- package/package.json +1 -1
@@ -930,9 +930,7 @@ const SnkApplication = class {
|
|
930
930
|
this._currentPkParameter = pkHash;
|
931
931
|
return;
|
932
932
|
}
|
933
|
-
|
934
|
-
this._currentPkParameter = pkHash;
|
935
|
-
}
|
933
|
+
this.defaultLoadByPK(pkParam, pkHash);
|
936
934
|
}
|
937
935
|
getResourceIdFromToken() {
|
938
936
|
if ((top.window.location.pathname).indexOf("tabContent.jsp") > -1) {
|
@@ -940,24 +938,32 @@ const SnkApplication = class {
|
|
940
938
|
}
|
941
939
|
return DataFetcher.UrlUtils.getResourceIdFromUrlToken(top.window.location.hash);
|
942
940
|
}
|
943
|
-
defaultLoadByPK(pkObject) {
|
941
|
+
defaultLoadByPK(pkObject, pkHash) {
|
944
942
|
if (!(pkObject === null || pkObject === void 0 ? void 0 : pkObject.pk))
|
945
943
|
return;
|
946
|
-
const
|
944
|
+
const snkDataUnit = this.getFirstDataUnitFromDOM();
|
945
|
+
const dataUnit = snkDataUnit.dataUnit;
|
947
946
|
if (!dataUnit) {
|
948
947
|
console.warn("Dataunit não inicializado");
|
948
|
+
snkDataUnit.addEventListener("dataUnitReady", (event) => {
|
949
|
+
this.loadDataWithPKFilter(pkObject, event.detail);
|
950
|
+
this._currentPkParameter = pkHash;
|
951
|
+
});
|
949
952
|
return;
|
950
953
|
}
|
954
|
+
this.loadDataWithPKFilter(pkObject, dataUnit);
|
955
|
+
this._currentPkParameter = pkHash;
|
956
|
+
}
|
957
|
+
loadDataWithPKFilter(pkObject, dataUnit) {
|
951
958
|
const quickFilter = {
|
952
|
-
term:
|
959
|
+
term: '',
|
953
960
|
filter: {
|
954
|
-
name:
|
961
|
+
name: 'LOAD_BY_PK_FILTER',
|
955
962
|
expression: this.buildFilterExpressionByPkObject(pkObject),
|
956
|
-
params: this.getFilterParamsFromPkObject(pkObject, dataUnit)
|
957
|
-
}
|
963
|
+
params: this.getFilterParamsFromPkObject(pkObject, dataUnit),
|
964
|
+
},
|
958
965
|
};
|
959
966
|
dataUnit.loadData(quickFilter);
|
960
|
-
return true;
|
961
967
|
}
|
962
968
|
getFirstDataUnitFromDOM() {
|
963
969
|
//Primeiro tentamos obeter o dataunit para fazer o loadByPK
|
@@ -966,7 +972,7 @@ const SnkApplication = class {
|
|
966
972
|
snkDataUnit = this._element.querySelector("snk-data-unit");
|
967
973
|
}
|
968
974
|
if (snkDataUnit) {
|
969
|
-
return snkDataUnit
|
975
|
+
return snkDataUnit;
|
970
976
|
}
|
971
977
|
return undefined;
|
972
978
|
}
|
@@ -1052,6 +1058,14 @@ const SnkApplication = class {
|
|
1052
1058
|
const firstLoadConv = urlParams.get("firstLoadConv");
|
1053
1059
|
return firstLoadConv && firstLoadConv === "S";
|
1054
1060
|
}
|
1061
|
+
registerPkChangeListener() {
|
1062
|
+
if (window.hasOwnProperty("onhashchange")) {
|
1063
|
+
window.onhashchange = this.pkChangeListener.bind(this);
|
1064
|
+
}
|
1065
|
+
else {
|
1066
|
+
setInterval(this.pkChangeListener.bind(this), 100);
|
1067
|
+
}
|
1068
|
+
}
|
1055
1069
|
componentWillLoad() {
|
1056
1070
|
core.ApplicationContext.setContextValue("__SNK__APPLICATION__LOADING__", true);
|
1057
1071
|
this._errorHandler = new SnkErrorHandler(this);
|
@@ -1061,9 +1075,7 @@ const SnkApplication = class {
|
|
1061
1075
|
return this.executeSearch(searchArgument, fieldName, dataUnit);
|
1062
1076
|
});
|
1063
1077
|
core.ApplicationContext.setContextValue("__EZUI__GRID_LICENSE__", agGridLicense);
|
1064
|
-
|
1065
|
-
this.pkChangeListener();
|
1066
|
-
}, 100);
|
1078
|
+
this.registerPkChangeListener();
|
1067
1079
|
core.ErrorTracking.init();
|
1068
1080
|
ConfigStorage.ConfigStorage.preload(this.applicationResourceID, this.configName);
|
1069
1081
|
document.addEventListener("click", () => Workspace.applicationClick());
|
@@ -694,9 +694,7 @@ export class SnkApplication {
|
|
694
694
|
this._currentPkParameter = pkHash;
|
695
695
|
return;
|
696
696
|
}
|
697
|
-
|
698
|
-
this._currentPkParameter = pkHash;
|
699
|
-
}
|
697
|
+
this.defaultLoadByPK(pkParam, pkHash);
|
700
698
|
}
|
701
699
|
getResourceIdFromToken() {
|
702
700
|
if ((top.window.location.pathname).indexOf("tabContent.jsp") > -1) {
|
@@ -704,24 +702,32 @@ export class SnkApplication {
|
|
704
702
|
}
|
705
703
|
return UrlUtils.getResourceIdFromUrlToken(top.window.location.hash);
|
706
704
|
}
|
707
|
-
defaultLoadByPK(pkObject) {
|
705
|
+
defaultLoadByPK(pkObject, pkHash) {
|
708
706
|
if (!(pkObject === null || pkObject === void 0 ? void 0 : pkObject.pk))
|
709
707
|
return;
|
710
|
-
const
|
708
|
+
const snkDataUnit = this.getFirstDataUnitFromDOM();
|
709
|
+
const dataUnit = snkDataUnit.dataUnit;
|
711
710
|
if (!dataUnit) {
|
712
711
|
console.warn("Dataunit não inicializado");
|
712
|
+
snkDataUnit.addEventListener("dataUnitReady", (event) => {
|
713
|
+
this.loadDataWithPKFilter(pkObject, event.detail);
|
714
|
+
this._currentPkParameter = pkHash;
|
715
|
+
});
|
713
716
|
return;
|
714
717
|
}
|
718
|
+
this.loadDataWithPKFilter(pkObject, dataUnit);
|
719
|
+
this._currentPkParameter = pkHash;
|
720
|
+
}
|
721
|
+
loadDataWithPKFilter(pkObject, dataUnit) {
|
715
722
|
const quickFilter = {
|
716
|
-
term:
|
723
|
+
term: '',
|
717
724
|
filter: {
|
718
|
-
name:
|
725
|
+
name: 'LOAD_BY_PK_FILTER',
|
719
726
|
expression: this.buildFilterExpressionByPkObject(pkObject),
|
720
|
-
params: this.getFilterParamsFromPkObject(pkObject, dataUnit)
|
721
|
-
}
|
727
|
+
params: this.getFilterParamsFromPkObject(pkObject, dataUnit),
|
728
|
+
},
|
722
729
|
};
|
723
730
|
dataUnit.loadData(quickFilter);
|
724
|
-
return true;
|
725
731
|
}
|
726
732
|
getFirstDataUnitFromDOM() {
|
727
733
|
//Primeiro tentamos obeter o dataunit para fazer o loadByPK
|
@@ -730,7 +736,7 @@ export class SnkApplication {
|
|
730
736
|
snkDataUnit = this._element.querySelector("snk-data-unit");
|
731
737
|
}
|
732
738
|
if (snkDataUnit) {
|
733
|
-
return snkDataUnit
|
739
|
+
return snkDataUnit;
|
734
740
|
}
|
735
741
|
return undefined;
|
736
742
|
}
|
@@ -816,6 +822,14 @@ export class SnkApplication {
|
|
816
822
|
const firstLoadConv = urlParams.get("firstLoadConv");
|
817
823
|
return firstLoadConv && firstLoadConv === "S";
|
818
824
|
}
|
825
|
+
registerPkChangeListener() {
|
826
|
+
if (window.hasOwnProperty("onhashchange")) {
|
827
|
+
window.onhashchange = this.pkChangeListener.bind(this);
|
828
|
+
}
|
829
|
+
else {
|
830
|
+
setInterval(this.pkChangeListener.bind(this), 100);
|
831
|
+
}
|
832
|
+
}
|
819
833
|
componentWillLoad() {
|
820
834
|
ApplicationContext.setContextValue("__SNK__APPLICATION__LOADING__", true);
|
821
835
|
this._errorHandler = new SnkErrorHandler(this);
|
@@ -825,9 +839,7 @@ export class SnkApplication {
|
|
825
839
|
return this.executeSearch(searchArgument, fieldName, dataUnit);
|
826
840
|
});
|
827
841
|
ApplicationContext.setContextValue("__EZUI__GRID_LICENSE__", agGridLicense);
|
828
|
-
|
829
|
-
this.pkChangeListener();
|
830
|
-
}, 100);
|
842
|
+
this.registerPkChangeListener();
|
831
843
|
ErrorTracking.init();
|
832
844
|
ConfigStorage.preload(this.applicationResourceID, this.configName);
|
833
845
|
document.addEventListener("click", () => Workspace.applicationClick());
|
@@ -918,9 +918,7 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
918
918
|
this._currentPkParameter = pkHash;
|
919
919
|
return;
|
920
920
|
}
|
921
|
-
|
922
|
-
this._currentPkParameter = pkHash;
|
923
|
-
}
|
921
|
+
this.defaultLoadByPK(pkParam, pkHash);
|
924
922
|
}
|
925
923
|
getResourceIdFromToken() {
|
926
924
|
if ((top.window.location.pathname).indexOf("tabContent.jsp") > -1) {
|
@@ -928,24 +926,32 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
928
926
|
}
|
929
927
|
return UrlUtils.getResourceIdFromUrlToken(top.window.location.hash);
|
930
928
|
}
|
931
|
-
defaultLoadByPK(pkObject) {
|
929
|
+
defaultLoadByPK(pkObject, pkHash) {
|
932
930
|
if (!(pkObject === null || pkObject === void 0 ? void 0 : pkObject.pk))
|
933
931
|
return;
|
934
|
-
const
|
932
|
+
const snkDataUnit = this.getFirstDataUnitFromDOM();
|
933
|
+
const dataUnit = snkDataUnit.dataUnit;
|
935
934
|
if (!dataUnit) {
|
936
935
|
console.warn("Dataunit não inicializado");
|
936
|
+
snkDataUnit.addEventListener("dataUnitReady", (event) => {
|
937
|
+
this.loadDataWithPKFilter(pkObject, event.detail);
|
938
|
+
this._currentPkParameter = pkHash;
|
939
|
+
});
|
937
940
|
return;
|
938
941
|
}
|
942
|
+
this.loadDataWithPKFilter(pkObject, dataUnit);
|
943
|
+
this._currentPkParameter = pkHash;
|
944
|
+
}
|
945
|
+
loadDataWithPKFilter(pkObject, dataUnit) {
|
939
946
|
const quickFilter = {
|
940
|
-
term:
|
947
|
+
term: '',
|
941
948
|
filter: {
|
942
|
-
name:
|
949
|
+
name: 'LOAD_BY_PK_FILTER',
|
943
950
|
expression: this.buildFilterExpressionByPkObject(pkObject),
|
944
|
-
params: this.getFilterParamsFromPkObject(pkObject, dataUnit)
|
945
|
-
}
|
951
|
+
params: this.getFilterParamsFromPkObject(pkObject, dataUnit),
|
952
|
+
},
|
946
953
|
};
|
947
954
|
dataUnit.loadData(quickFilter);
|
948
|
-
return true;
|
949
955
|
}
|
950
956
|
getFirstDataUnitFromDOM() {
|
951
957
|
//Primeiro tentamos obeter o dataunit para fazer o loadByPK
|
@@ -954,7 +960,7 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
954
960
|
snkDataUnit = this._element.querySelector("snk-data-unit");
|
955
961
|
}
|
956
962
|
if (snkDataUnit) {
|
957
|
-
return snkDataUnit
|
963
|
+
return snkDataUnit;
|
958
964
|
}
|
959
965
|
return undefined;
|
960
966
|
}
|
@@ -1040,6 +1046,14 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
1040
1046
|
const firstLoadConv = urlParams.get("firstLoadConv");
|
1041
1047
|
return firstLoadConv && firstLoadConv === "S";
|
1042
1048
|
}
|
1049
|
+
registerPkChangeListener() {
|
1050
|
+
if (window.hasOwnProperty("onhashchange")) {
|
1051
|
+
window.onhashchange = this.pkChangeListener.bind(this);
|
1052
|
+
}
|
1053
|
+
else {
|
1054
|
+
setInterval(this.pkChangeListener.bind(this), 100);
|
1055
|
+
}
|
1056
|
+
}
|
1043
1057
|
componentWillLoad() {
|
1044
1058
|
ApplicationContext.setContextValue("__SNK__APPLICATION__LOADING__", true);
|
1045
1059
|
this._errorHandler = new SnkErrorHandler(this);
|
@@ -1049,9 +1063,7 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
1049
1063
|
return this.executeSearch(searchArgument, fieldName, dataUnit);
|
1050
1064
|
});
|
1051
1065
|
ApplicationContext.setContextValue("__EZUI__GRID_LICENSE__", agGridLicense);
|
1052
|
-
|
1053
|
-
this.pkChangeListener();
|
1054
|
-
}, 100);
|
1066
|
+
this.registerPkChangeListener();
|
1055
1067
|
ErrorTracking.init();
|
1056
1068
|
ConfigStorage.preload(this.applicationResourceID, this.configName);
|
1057
1069
|
document.addEventListener("click", () => Workspace.applicationClick());
|
@@ -926,9 +926,7 @@ const SnkApplication = class {
|
|
926
926
|
this._currentPkParameter = pkHash;
|
927
927
|
return;
|
928
928
|
}
|
929
|
-
|
930
|
-
this._currentPkParameter = pkHash;
|
931
|
-
}
|
929
|
+
this.defaultLoadByPK(pkParam, pkHash);
|
932
930
|
}
|
933
931
|
getResourceIdFromToken() {
|
934
932
|
if ((top.window.location.pathname).indexOf("tabContent.jsp") > -1) {
|
@@ -936,24 +934,32 @@ const SnkApplication = class {
|
|
936
934
|
}
|
937
935
|
return UrlUtils.getResourceIdFromUrlToken(top.window.location.hash);
|
938
936
|
}
|
939
|
-
defaultLoadByPK(pkObject) {
|
937
|
+
defaultLoadByPK(pkObject, pkHash) {
|
940
938
|
if (!(pkObject === null || pkObject === void 0 ? void 0 : pkObject.pk))
|
941
939
|
return;
|
942
|
-
const
|
940
|
+
const snkDataUnit = this.getFirstDataUnitFromDOM();
|
941
|
+
const dataUnit = snkDataUnit.dataUnit;
|
943
942
|
if (!dataUnit) {
|
944
943
|
console.warn("Dataunit não inicializado");
|
944
|
+
snkDataUnit.addEventListener("dataUnitReady", (event) => {
|
945
|
+
this.loadDataWithPKFilter(pkObject, event.detail);
|
946
|
+
this._currentPkParameter = pkHash;
|
947
|
+
});
|
945
948
|
return;
|
946
949
|
}
|
950
|
+
this.loadDataWithPKFilter(pkObject, dataUnit);
|
951
|
+
this._currentPkParameter = pkHash;
|
952
|
+
}
|
953
|
+
loadDataWithPKFilter(pkObject, dataUnit) {
|
947
954
|
const quickFilter = {
|
948
|
-
term:
|
955
|
+
term: '',
|
949
956
|
filter: {
|
950
|
-
name:
|
957
|
+
name: 'LOAD_BY_PK_FILTER',
|
951
958
|
expression: this.buildFilterExpressionByPkObject(pkObject),
|
952
|
-
params: this.getFilterParamsFromPkObject(pkObject, dataUnit)
|
953
|
-
}
|
959
|
+
params: this.getFilterParamsFromPkObject(pkObject, dataUnit),
|
960
|
+
},
|
954
961
|
};
|
955
962
|
dataUnit.loadData(quickFilter);
|
956
|
-
return true;
|
957
963
|
}
|
958
964
|
getFirstDataUnitFromDOM() {
|
959
965
|
//Primeiro tentamos obeter o dataunit para fazer o loadByPK
|
@@ -962,7 +968,7 @@ const SnkApplication = class {
|
|
962
968
|
snkDataUnit = this._element.querySelector("snk-data-unit");
|
963
969
|
}
|
964
970
|
if (snkDataUnit) {
|
965
|
-
return snkDataUnit
|
971
|
+
return snkDataUnit;
|
966
972
|
}
|
967
973
|
return undefined;
|
968
974
|
}
|
@@ -1048,6 +1054,14 @@ const SnkApplication = class {
|
|
1048
1054
|
const firstLoadConv = urlParams.get("firstLoadConv");
|
1049
1055
|
return firstLoadConv && firstLoadConv === "S";
|
1050
1056
|
}
|
1057
|
+
registerPkChangeListener() {
|
1058
|
+
if (window.hasOwnProperty("onhashchange")) {
|
1059
|
+
window.onhashchange = this.pkChangeListener.bind(this);
|
1060
|
+
}
|
1061
|
+
else {
|
1062
|
+
setInterval(this.pkChangeListener.bind(this), 100);
|
1063
|
+
}
|
1064
|
+
}
|
1051
1065
|
componentWillLoad() {
|
1052
1066
|
ApplicationContext.setContextValue("__SNK__APPLICATION__LOADING__", true);
|
1053
1067
|
this._errorHandler = new SnkErrorHandler(this);
|
@@ -1057,9 +1071,7 @@ const SnkApplication = class {
|
|
1057
1071
|
return this.executeSearch(searchArgument, fieldName, dataUnit);
|
1058
1072
|
});
|
1059
1073
|
ApplicationContext.setContextValue("__EZUI__GRID_LICENSE__", agGridLicense);
|
1060
|
-
|
1061
|
-
this.pkChangeListener();
|
1062
|
-
}, 100);
|
1074
|
+
this.registerPkChangeListener();
|
1063
1075
|
ErrorTracking.init();
|
1064
1076
|
ConfigStorage.preload(this.applicationResourceID, this.configName);
|
1065
1077
|
document.addEventListener("click", () => Workspace.applicationClick());
|
@@ -1,11 +1,11 @@
|
|
1
|
-
import{r as t,c as s,h as e,g as i}from"./p-d2d301a6.js";import{DateUtils as n,StringUtils as r,ObjectUtils as a,WaitingChangeException as o,WarningException as c,ErrorException as h,OnboardingUtils as u,DependencyType as l,ElementIDUtils as p,DataType as d,ApplicationContext as m,ErrorTracking as w}from"@sankhyalabs/core";import{ApplicationUtils as f}from"@sankhyalabs/ezui/dist/collection/utils";import{C as y}from"./p-29176742.js";import{d as P,D as
|
1
|
+
import{r as t,c as s,h as e,g as i}from"./p-d2d301a6.js";import{DateUtils as n,StringUtils as r,ObjectUtils as a,WaitingChangeException as o,WarningException as c,ErrorException as h,OnboardingUtils as u,DependencyType as l,ElementIDUtils as p,DataType as d,ApplicationContext as m,ErrorTracking as w}from"@sankhyalabs/core";import{ApplicationUtils as f}from"@sankhyalabs/ezui/dist/collection/utils";import{C as y}from"./p-29176742.js";import{d as P,D as g,U as v}from"./p-c9399ce6.js";import{A as I,a as A}from"./p-d0b36421.js";import{D as _}from"./p-73407f35.js";import{P as S}from"./p-41d156dd.js";import{S as C}from"./p-f1f7b545.js";import"./p-4651b43f.js";import"./p-584d7212.js";import"./p-112455b1.js";import"@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata";import"./p-8d884fab.js";import"@sankhyalabs/ezui/dist/collection/utils/constants";import"./p-c22c1d8e.js";import"@sankhyalabs/ezui/dist/collection/components/ez-grid/utils";import"./p-688dcb4c.js";class D{static webConnectionCaller(t,s,e){var i;null===(i=window.AppletCaller)||void 0===i||i.webConnectionCaller(t,s,e)}}const E=N;function N(t,s){const e=b();return(N=function(t){return e[t-=378]})(t,s)}function b(){const t=["true","863GKWjmo","parse","56355fjjjAm","isSup","putAccess","4324480sjuCdS","hasOwnProperty","239748okvJLB","name","6055770tXeRaU","actions","forEach","7RPRvzn","1042CHxkUw","2988126NIwRMm","20MTNzmH","authorizationSf","item","string","hasAccess","isArray","Objeto não pode ser indefinido.","3071943fWslZp","parseFromJSON"];return(b=function(){return t})()}!function(){const t=N,s=b();for(;;)try{if(281287==parseInt(t(399))/1*(-parseInt(t(387))/2)+-parseInt(t(401))/3+parseInt(t(381))/4*(-parseInt(t(389))/5)+parseInt(t(388))/6*(-parseInt(t(386))/7)+parseInt(t(379))/8+parseInt(t(396))/9+parseInt(t(383))/10)break;s.push(s.shift())}catch(t){s.push(s.shift())}}();class k{[E(397)](t){const s=E;if(typeof(t=utxt(t[s(390)]))==s(392)&&(t=JSON[s(400)](t)),null==t)throw Error(s(395));const e=new L("S"===t[s(402)]||!0===t[s(402)]);return Array[s(394)](t[s(391)])&&t[s(391)][s(385)]((t=>e.putAccess(t[s(382)],String(t.status)==s(398)))),e}}class L{constructor(t){const s=E;this.isSup=t,this[s(384)]={}}[E(378)](t,s){this[E(384)][t]=s}[E(393)](t){const s=E;if(this[s(402)])return!0;let e=!0;return this[s(384)][s(380)](t)&&(e=this.actions[t]),e}isUserSup(){return this.isSup}}class T{constructor(){this.templateByQuery=new Map,this.buldTemplates()}buldTemplates(){this.templateByQuery.set("fetchParam",P.gql`query($name: String!) {
|
2
2
|
$queryAlias$: fetchResource(name: $name){
|
3
3
|
name
|
4
4
|
resource
|
5
5
|
}
|
6
|
-
}`)}async getParam(t){const s=`param://application?params=${t}`;return
|
6
|
+
}`)}async getParam(t){const s=`param://application?params=${t}`;return g.get().callGraphQL({values:{name:s},query:this.templateByQuery.get("fetchParam")})}async asString(t){const s=await this.getParam(t);return this.getValue(s)}async asInteger(t){const s=await this.getParam(t);return parseInt(this.getValue(s))}async asFloat(t){const s=await this.getParam(t);return parseFloat(this.getValue(s))}async asBoolean(t){const s=await this.getParam(t);return"S"===this.getValue(s)}async asDate(t){const s=await this.getParam(t);return n.strToDate(this.getValue(s))}async getBatchParams(t){const s=await this.getParam(t.join(",")),e={};return s.forEach((t=>e[t.name]=t.resource)),e}getValue(t={}){if(Array.isArray(t)&&t.length>0&&(t=t[0]),r.isEmpty(t.resource))return"";try{const s=a.stringToObject(t.resource),[e]=Object.keys(s);return s[e]}catch(t){console.warn("Erro ao converter string JSON.")}}}class O{constructor(){this.templateByQuery=new Map,this.cancel=[],this.buildTemplates()}buildTemplates(){this.templateByQuery.set("fetchTotals",P.gql`query($filters: [InputFilter!] $name: String!) {
|
7
7
|
$queryAlias$: fetchTotals(name: $name, filters: $filters ){
|
8
8
|
name
|
9
9
|
value
|
10
10
|
}
|
11
|
-
}`)}fetchTotals(t,s,e=[]){const i=`${t}_${s}`,n=this.cancel.findIndex((t=>t[i]));return n>=0&&(this.cancel[n][i](),this.cancel.splice(n,1)),Promise.race([new Promise((t=>this.cancel.push({[i]:t}))),this.getTotals(t,s,e)]).then((t=>{let s=new Map;if(t){s=t;const e=this.cancel.findIndex((t=>t[i]));e>=0&&this.cancel.splice(e,1)}return s}))}getTotals(t,s,e=[]){return new Promise(((i,n)=>{v.get().callGraphQL({query:this.templateByQuery.get("fetchTotals"),values:{name:`totals://${t}/${s}`,filters:e}}).then((t=>{if(t.length>0){const s=new Map;return t.forEach((t=>s.set(t.name,parseFloat(t.value)))),i(s)}return n("Não foi possível recuperar os totalizadores")})).catch(n)}))}}function j(){const t=["2909523kXwted","CompanyName=Sankhya Jiva Tecnologia e Inovao Ltda,LicensedApplication=Sankhya Gestao,LicenseType=SingleApplication,LicensedConcurrentDeveloperCount=2,LicensedProductionInstancesCount=0,AssetReference=AG-019460,ExpiryDate=9_November_2022_[v2]_MTY2Nzk1MjAwMDAwMA==10487151e296ee4360f80961ca960869","1131048CARoeW","502909mLEPmu","447255iQEXuN","428UHbJwW","270AFTxAV","194369jhGqTI","1540nWuTrj","2044062GicUQI","30CkXPWg"];return(j=function(){return t})()}const U=$;function $(t,s){const e=j();return($=function(t){return e[t-=392]})(t,s)}!function(){const t=$,s=j();for(;;)try{if(951926==-parseInt(t(398))/1+-parseInt(t(393))/2+parseInt(t(395))/3+-parseInt(t(400))/4*(parseInt(t(392))/5)+-parseInt(t(401))/6*(-parseInt(t(402))/7)+parseInt(t(397))/8+-parseInt(t(399))/9*(-parseInt(t(394))/10))break;s.push(s.shift())}catch(t){s.push(s.shift())}}();const M=U(396);var R;class F{static openAppActivity(t,s){var e;null===(e=window.workspace)||void 0===e||e.openAppActivity(t,s)}static getAppLabel(t){if(null!=(null===window||void 0===window?void 0:window.workspace))return null==window.workspace.getAppLabel&&(window.workspace.getAppLabel=t=>(t||"").split(".").pop()),window.workspace.getAppLabel(t)}static setScreenToUseV3Layout(){var t;null===(t=window.workspace)||void 0===t||t.setScreenToUseV3Layout()}static setScreenToUseOldLayout(){var t;null===(t=window.workspace)||void 0===t||t.setScreenToUseOldLayout()}static applicationClick(){var t,s;(null===(t=window.workspace)||void 0===t?void 0:t.applicationClick)&&(null===(s=window.workspace)||void 0===s||s.applicationClick())}}F.resourceID=null===(R=window.workspace)||void 0===R?void 0:R.resourceID;class z{constructor(t){this._app=t,window.addEventListener("error",(t=>this.errorHandler(t))),window.addEventListener("unhandledrejection",(t=>this.rejectionHandler(t)))}rejectionHandler(t){const s=t.reason;s instanceof o||(s?this.processException(s):this._app.isDebugMode().then((t=>{t&&this._app.error("Promise rejeitada","Erro interno: Uma promise foi rejeitada sem razão determinada.")})))}errorHandler(t){this.processException(t.error)}buildErrorCodeHTML(t){return'<br><a href="#" onclick="try{window.workspace.openHelp(\'_tbcode:'+t+"')} catch(e){alert('Não é possível abrir a ajuda fora do workspace Sankhya');}\">Código: "+t+"</a>"}processException(t){t.errorCode&&(t.message+=this.buildErrorCodeHTML(t.errorCode)),t instanceof o||t instanceof c?this._app.alert(t.title,t.message):t instanceof h?this._app.error(t.title,t.message):this._app.isDebugMode().then((s=>{if(s)if(t instanceof Error)this._app.error(t.name,t.message);else{const s=(null==t?void 0:t.title)||"Erro detectado",e="string"==typeof t?t:t.message||`Erro interno "${a.objectToString(t)}"`;this._app.error(s,e)}}))}}const q=class{constructor(e){t(this,e),this.applicationLoaded=s(this,"applicationLoaded",7),this.applicationLoading=s(this,"applicationLoading",7),this.NEW_VERSION_POPUP_LOCKER="NEW_VERSION_POPUP_LOCKER",this._authPromises=[],this._duCache=new Map,this._duPromises=new Map,this._requestListener=new x,this._pendingActions=new Map,this._isLoadedByPk=!1,this.messagesBuilder=void 0,this.configName=void 0,this.loadByPK=void 0}async processPendingActions(t){const s=this._pendingActions.get(t);s&&s.length&&(s.forEach((t=>t())),this._pendingActions.set(t,[]))}get parameters(){return this._parameters||(this._parameters=new L),this._parameters}async getAuth(t){return null==t?this.getApplicationAuth():new Promise(((s,e)=>{this.authFetcher.getData(t).then((t=>{s(t)})).catch((t=>{e(t)}))}))}async getApplicationAuth(){return this._auth?Promise.resolve(this._auth):new Promise(((t,s)=>{const e=this._authPromises.length>0;this._authPromises.push(new B(t,s)),e||this.authFetcher.getData(this.applicationResourceID).then((t=>{for(this._auth=t;this._authPromises.length>0;)this._authPromises.pop().resolve(this._auth)})).catch((t=>{for(;this._authPromises.length>0;)this._authPromises.pop().reject(t)}))}))}async isUserSup(){return new Promise(((t,s)=>{this.getAuth().then((e=>{this.getAuthList(e).then((s=>{t(s.isSup)})).catch((t=>s(t)))}))}))}async addPendingAction(t,s){var e;const i=null!==(e=this._pendingActions.get(t))&&void 0!==e?e:[];this._pendingActions.set(t,[...i,s])}async callServiceBroker(t,s,e){return v.get().callServiceBroker(t,s,e)}async initOnboarding(t){this.hasToShowNewVersionPopup()?await this.addPendingAction(this.NEW_VERSION_POPUP_LOCKER,(()=>this.doInitOnboarding(t))):this.doInitOnboarding(t)}doInitOnboarding(t){u.getInstance().init(t,window.envContext)}async hasAccess(t,s){return new Promise(((e,i)=>{this.getAuth(s).then((s=>{this.getAuthList(s).then((s=>{e(s.isSup||s.actions[t])})).catch((t=>i(t)))}))}))}async getAllAccess(t){return new Promise(((s,e)=>{this.getAuth(t).then((t=>{this.getAuthList(t).then((t=>{const e={};e.isSup=t.isSup,Object.entries(I).forEach((s=>{e[s[0]]=t.actions[s[1]]||!1})),s(e)})).catch((t=>e(t)))}))}))}async getStringParam(t){return this.parameters.asString(t)}async getIntParam(t){return this.parameters.asInteger(t)}async getFloatParam(t){return this.parameters.asFloat(t)}async getBooleanParam(t){return this.parameters.asBoolean(t)}async getDateParam(t){return this.parameters.asDate(t)}async showPopUp(t,s="full",e=!0){this.clearContent(this._popUp),this._popUp.appendChild(t),this._popUp.opened=!0,this._popUp.heightMode=s,this._popUp.useHeader=e,"EZ-MODAL-CONTAINER"===t.tagName&&(this._popUp.useHeader=!1)}async showModal(t){this.clearContent(this._rightModal),this._rightModal.appendChild(t),this._rightModal.opened=!0}async closeModal(){this.clearContent(this._rightModal),this._rightModal.opened=!1}async closePopUp(){this.clearContent(this._popUp),this._popUp.opened=!1,this._popUp.useHeader=!0,this._popUp.heightMode="full"}async temOpcional(t){const s=t.split(",");return new Promise(((t,e)=>{this.getAttributeFromHTMLWrapper("opc0009").then((i=>{"1"===i?t(!0):Promise.all(s.map((t=>this.getAttributeFromHTMLWrapper("opc"+t)))).then((s=>{t(s.includes("1"))})).catch((t=>{e(t)}))})).catch((t=>{e(t)}))}))}async getConfig(t){let s={serviceName:"SystemUtilsSP.getConf",requestBody:{config:{chave:t,tipo:"T"}}};return new Promise(((t,e)=>{v.get().callServiceBroker("SystemUtilsSP.getConf",JSON.stringify(s)).then((s=>{var e;return t(null===(e=s.config)||void 0===e?void 0:e.data)})).catch((t=>e(t)))}))}async saveConfig(t,s){let e={serviceName:"SystemUtilsSP.saveConf",requestBody:{config:{chave:t,tipo:"T",data:s}}};return new Promise(((t,s)=>{v.get().callServiceBroker("SystemUtilsSP.saveConf",JSON.stringify(e)).then((s=>t(s))).catch((t=>s(t)))}))}async getAttributeFromHTMLWrapper(t){return Promise.resolve(window[t])}async openApp(t,s){F.openAppActivity(t,s)}async webConnection(t,s,e){this.getStringParam(t).then((t=>{N.webConnectionCaller(t,s,e)}))}getDuPromissesStack(t){let s;return t&&(s=this._duPromises.get(t),s||(s=[],this._duPromises.set(t,s))),s||[]}async createDataunit(t,s,e,i,n){return null==n&&(n=this.applicationResourceID),new Promise(((r,a)=>{const o=this.getDuPromissesStack(s),c=o.length>0;if(o.push(new B(r,a)),!c){const r=this.dataUnitFetcher.getDataUnit(t,n,e,i);r.loadMetadata().then((()=>{for(s&&this.updateDataunitCache(void 0,s,r);o.length>0;)o.pop().resolve(r)})).catch((t=>{for(;o.length>0;)o.pop().reject(t)}))}}))}async updateDataunitCache(t,s,e){t&&this._duCache.delete(t),this._duCache.set(s,e)}async getDataUnit(t,s,e,i,n){return new Promise(((r,a)=>{const o=this._duCache.get(s);o?r(o):this.createDataunit(t,s,e,i,n).then((t=>{r(t)})).catch((t=>a(t)))}))}async addClientEvent(t,s){return new Promise((e=>{v.addClientEvent(t,s),e()}))}async removeClientEvent(t){return new Promise((s=>{v.removeClientEvent(t),s()}))}async hasClientEvent(t){return new Promise((s=>{s(v.hasClientEvent(t))}))}get applicationResourceID(){return this._applicationResourceID||(this._applicationResourceID=this.urlParams.get("workspaceResourceID")||this.urlParams.get("resourceID")||F.resourceID||"unknown.resource.id"),this._applicationResourceID}async getResourceID(){return Promise.resolve(this.applicationResourceID)}async getUserID(){return Promise.resolve(window.UID)}async alert(t,s,e,i){return f.alert(t,s,e,i)}async error(t,s,e,i){return f.error(t,s,e,i)}async success(t,s,e,i){return f.success(t,s,e,i)}async message(t,s,e,i){return f.message(t,s,e,i)}async confirm(t,s,e,i,n){return f.confirm(t,s,e,i,n)}async info(t,s){return f.info(t,s)}async loadTotals(t,s,e){return this.totalsFetcher.fetchTotals(t,s,e)}async isLoadedByPk(){return Promise.resolve(this._isLoadedByPk)}async getAuthList(t){return await(new T).parseFromJSON(t)}get urlParams(){return this._urlParams||(this._urlParams=g.getQueryParams(location.search)),this._urlParams}getMessage(t,s){var e;return null===(e=this.messagesBuilder)||void 0===e?void 0:e.getMessage(t,s)}get dataUnitFetcher(){return this._dataUnitFetcher||(this._dataUnitFetcher=new _),this._dataUnitFetcher}get totalsFetcher(){return this._totalsFetcher||(this._totalsFetcher=new O),this._totalsFetcher}get pesquisaFetcher(){return this._pesquisaFetcher||(this._pesquisaFetcher=new S),this._pesquisaFetcher}get authFetcher(){return this._authFetcher||(this._authFetcher=new A),this._authFetcher}async executeSearch(t,s,e){const i=null==e?void 0:e.getField(s);if(i){const{mode:s,argument:n}=t,{ENTITYNAME:r,CODEFIELD:a,DESCRIPTIONFIELD:o,ROOTENTITY:c,DESCRIPTIONENTITY:h}=i.properties,u=i.dependencies;let p;const m={rootEntity:c,descriptionFieldName:o,codeFieldName:a,showInactives:!1,dataUnitId:e.dataUnitId};return null==u||u.filter((t=>t.masterFields)).forEach((t=>{var s;t.type===l.SEARCHING&&(null===(s=t.masterFields)||void 0===s?void 0:s.length)>0&&(p={expression:t.expression,params:t.masterFields.map((t=>{const s=e.getField(t),i=(null==s?void 0:s.dataType)||d.TEXT,n=e.getFieldValue(t);if(null==n)throw this.alert("Erro ao pesquisar",`É necessario informar o campo ${s.label} para executar a pesquisa.`),new Error(`É necessario informar o campo ${s.label} para executar a pesquisa.`);return{name:t,value:n,dataType:i}}))})})),this.executePreparedSearch(s,n,{entity:r,entityDescription:h,criteria:p,searchOptions:m})}}async executePreparedSearch(t,s,e){const{entity:i,entityDescription:n,criteria:r,searchOptions:a}=e;return"ADVANCED"===t?new Promise((t=>{const e=document.createElement("snk-pesquisa");e[p.DATA_ELEMENT_ID_ATTRIBUTE_NAME]=`entity_${i}`,e.argument=s,e.searchLoader=t=>this.pesquisaFetcher.loadAdvancedSearch(i,t,r,a),e.selectItem=s=>{t(s),this.clearPopUpTitle(),this.closePopUp()},this.setPopUpTitle(n),this.showPopUp(e)})):this.pesquisaFetcher.loadSearchOptions(i,s,r,a)}async isDebugMode(){return new Promise((t=>{t(window.isDebugMode)}))}async getAppLabel(){return F.getAppLabel(this.applicationResourceID)}addSearchListener(t,s,e){return new Promise((i=>{i(this.pesquisaFetcher.addSearchListener(t,s.dataUnitId,e))}))}importScript(t){return new Promise((s=>{this.getApplicationPath().then((e=>{let i=[];Array.isArray(t)||(i=[t]),i.forEach((t=>{const s=document.createElement("script");s.src=`${e}/${t}`,s.async=!0,document.body.appendChild(s)})),s()}))}))}async getApplicationPath(){return new Promise((t=>{"dev"===window.applicationenv?t(""):t(`/${this.getModuleName()}/labsApps/${window.APPLICATION_NAME}/build`)}))}getModuleName(){return window.MGE_MODULE_NAME||"mgefin-bff"}executeSelectDistinct(t,s,e){return this.dataUnitFetcher.loadSelectDistinct(t,s,e)}getDataFetcher(){return Promise.resolve(v.get())}clearContent(t){t&&Array.from(t.children).forEach((s=>{t.removeChild(s)}))}clearPopUpTitle(){this._popUp.ezTitle=""}setPopUpTitle(t){this._popUp.ezTitle=t}async pkChangeListener(){const t=top.window.location.hash.split("/")[2];if(this._currentPkParameter===t)return;const s=this.getResourceIdFromToken(),e=g.getPkObjectFromUrlToken(top.window.location.hash);if(null==e||s!==this.applicationResourceID)return;const i={pk:e};if(this._isLoadedByPk=!0,this.loadByPK)return this.loadByPK(i),void(this._currentPkParameter=t);this.defaultLoadByPK(i)&&(this._currentPkParameter=t)}getResourceIdFromToken(){return top.window.location.pathname.indexOf("tabContent.jsp")>-1?g.getResourceIdFromUrlToken(window.location.generateHash(window.location.hash)):g.getResourceIdFromUrlToken(top.window.location.hash)}defaultLoadByPK(t){if(!(null==t?void 0:t.pk))return;const s=this.getFirstDataUnitFromDOM();if(!s)return void console.warn("Dataunit não inicializado");const e={term:"",filter:{name:"LOAD_BY_PK_FILTER",expression:this.buildFilterExpressionByPkObject(t),params:this.getFilterParamsFromPkObject(t,s)}};return s.loadData(e),!0}getFirstDataUnitFromDOM(){let t=this._element.querySelector("snk-data-unit[data-load-by-pk]");if(t||(t=this._element.querySelector("snk-data-unit")),t)return t.dataUnit}getFilterParamsFromPkObject(t,s){var e;const i=[];for(const n in t.pk)t.pk.hasOwnProperty(n)&&!Array.isArray(t.pk[n])&&i.push({name:n,dataType:(null===(e=s.getField(n))||void 0===e?void 0:e.dataType)||this.getDefaultDataTypeLoadByPK(t.pk[n]),value:t.pk[n]});return i}getDefaultDataTypeLoadByPK(t){return"number"==typeof t||t instanceof Number?d.NUMBER:"boolean"==typeof t||t instanceof Boolean?d.BOOLEAN:t instanceof Date?d.DATE:d.TEXT}buildFilterExpressionByPkObject(t){let s="";for(const e in t.pk)r.isEmpty(s)||(s+=" AND "),Array.isArray(t.pk[e])?s+=`${e} IN (${t.pk[e].toString()})`:s+=`${e} = :${e}`;return s}async showNewVersionPopup(){const t=document.createElement("ez-modal-container"),s=await this.getAppLabel();t.modalTitle=this.getMessage("snkApplication.newVersionPopup.title",{screenName:s}),t.okButtonLabel=this.getMessage("snkApplication.newVersionPopup.okButton"),t.cancelButtonLabel=this.getMessage("snkApplication.newVersionPopup.cancelButton");const e=document.createElement("p");e.innerText=this.getMessage("snkApplication.newVersionPopup.info"),e.className="ez-text",t.appendChild(e),t.addEventListener("ezModalAction",this.newVersionPopupEventListener.bind(this));const i=await f.showPopup({content:t});this._removeVersionLayoutPopup=async()=>{await i(),await this.processPendingActions(this.NEW_VERSION_POPUP_LOCKER)}}async newVersionPopupEventListener(t){"LOAD"!==t.detail&&("OK"===t.detail&&F.setScreenToUseV3Layout(),"CANCEL"===t.detail&&F.setScreenToUseOldLayout(),this._popUp.opened=!1,this._removeVersionLayoutPopup&&await this._removeVersionLayoutPopup())}async handleShowNewVersionPopup(){this.hasToShowNewVersionPopup()&&await this.showNewVersionPopup()}hasToShowNewVersionPopup(){const t=new URLSearchParams(window.location.search).get("firstLoadConv");return t&&"S"===t}componentWillLoad(){m.setContextValue("__SNK__APPLICATION__LOADING__",!0),this._errorHandler=new z(this),this.messagesBuilder=new E,m.setContextValue("__EZUI__UPLOAD__ADD__URL__",`${g.getUrlBase()}/mge/upload/file`),m.setContextValue("__EZUI__SEARCH__OPTION__LOADER__",((t,s,e)=>this.executeSearch(t,s,e))),m.setContextValue("__EZUI__GRID_LICENSE__",M),setInterval((()=>{this.pkChangeListener()}),100),w.init(),y.preload(this.applicationResourceID,this.configName),document.addEventListener("click",(()=>F.applicationClick()))}connectedCallback(){m.setContextValue("__SNK__APPLICATION__",this),v.addRequestListener(this._requestListener)}disconnectedCallback(){v.removeRequestListener(this._requestListener)}async componentDidLoad(){this.applicationLoading.emit(!0),window.requestAnimationFrame((()=>{m.setContextValue("__SNK__APPLICATION__LOADING__",!1),this.applicationLoaded.emit(!0),this.pkChangeListener()})),p.addIDInfo(this._element,`resource_${this.applicationResourceID}`),await this.handleShowNewVersionPopup()}render(){return e("div",null,e("ez-loading-bar",{ref:t=>this._requestListener.loadingBar=t}),e("ez-popup",{opened:!1,ref:t=>this._popUp=t,onEzClosePopup:()=>this.closePopUp()}),e("ez-modal",{opened:!1,ref:t=>this._rightModal=t,"modal-size":"small",closeOutsideClick:!0,closeEsc:!0}))}get _element(){return i(this)}};class x{constructor(){this._debounceTime=1e3,this._ignoredNameTypes=["totals"],this._countRequest=0}onRequestStart(t){this.isIgnoreLoadingOnRequest(t)||(this._countRequest++,this.loadingBar.show(),this._timerLoading&&clearTimeout(this._timerLoading))}onRequestEnd(t){this.isIgnoreLoadingOnRequest(t)||(this._countRequest--,this._timerLoading=setTimeout((()=>{this._countRequest<=0&&this.loadingBar.hide()}),this._debounceTime))}isIgnoreLoadingOnRequest(t){if(null==t)return!1;if(t.url.includes("quietMode=true"))return!0;if(null==t.requestBody)return!1;if(1==t.requestBody.length){const{name:s}=t.requestBody[0].variables;if(s){const t=s.split(":");return this._ignoredNameTypes.indexOf(t[0])>=0}}return!1}}class B{constructor(t,s){this.resolve=t,this.reject=s}}q.style=".sc-snk-application-h{display:flex;flex-direction:column;height:100%}";export{q as snk_application}
|
11
|
+
}`)}fetchTotals(t,s,e=[]){const i=`${t}_${s}`,n=this.cancel.findIndex((t=>t[i]));return n>=0&&(this.cancel[n][i](),this.cancel.splice(n,1)),Promise.race([new Promise((t=>this.cancel.push({[i]:t}))),this.getTotals(t,s,e)]).then((t=>{let s=new Map;if(t){s=t;const e=this.cancel.findIndex((t=>t[i]));e>=0&&this.cancel.splice(e,1)}return s}))}getTotals(t,s,e=[]){return new Promise(((i,n)=>{g.get().callGraphQL({query:this.templateByQuery.get("fetchTotals"),values:{name:`totals://${t}/${s}`,filters:e}}).then((t=>{if(t.length>0){const s=new Map;return t.forEach((t=>s.set(t.name,parseFloat(t.value)))),i(s)}return n("Não foi possível recuperar os totalizadores")})).catch(n)}))}}function j(){const t=["2909523kXwted","CompanyName=Sankhya Jiva Tecnologia e Inovao Ltda,LicensedApplication=Sankhya Gestao,LicenseType=SingleApplication,LicensedConcurrentDeveloperCount=2,LicensedProductionInstancesCount=0,AssetReference=AG-019460,ExpiryDate=9_November_2022_[v2]_MTY2Nzk1MjAwMDAwMA==10487151e296ee4360f80961ca960869","1131048CARoeW","502909mLEPmu","447255iQEXuN","428UHbJwW","270AFTxAV","194369jhGqTI","1540nWuTrj","2044062GicUQI","30CkXPWg"];return(j=function(){return t})()}const U=$;function $(t,s){const e=j();return($=function(t){return e[t-=392]})(t,s)}!function(){const t=$,s=j();for(;;)try{if(951926==-parseInt(t(398))/1+-parseInt(t(393))/2+parseInt(t(395))/3+-parseInt(t(400))/4*(parseInt(t(392))/5)+-parseInt(t(401))/6*(-parseInt(t(402))/7)+parseInt(t(397))/8+-parseInt(t(399))/9*(-parseInt(t(394))/10))break;s.push(s.shift())}catch(t){s.push(s.shift())}}();const R=U(396);var M;class F{static openAppActivity(t,s){var e;null===(e=window.workspace)||void 0===e||e.openAppActivity(t,s)}static getAppLabel(t){if(null!=(null===window||void 0===window?void 0:window.workspace))return null==window.workspace.getAppLabel&&(window.workspace.getAppLabel=t=>(t||"").split(".").pop()),window.workspace.getAppLabel(t)}static setScreenToUseV3Layout(){var t;null===(t=window.workspace)||void 0===t||t.setScreenToUseV3Layout()}static setScreenToUseOldLayout(){var t;null===(t=window.workspace)||void 0===t||t.setScreenToUseOldLayout()}static applicationClick(){var t,s;(null===(t=window.workspace)||void 0===t?void 0:t.applicationClick)&&(null===(s=window.workspace)||void 0===s||s.applicationClick())}}F.resourceID=null===(M=window.workspace)||void 0===M?void 0:M.resourceID;class z{constructor(t){this._app=t,window.addEventListener("error",(t=>this.errorHandler(t))),window.addEventListener("unhandledrejection",(t=>this.rejectionHandler(t)))}rejectionHandler(t){const s=t.reason;s instanceof o||(s?this.processException(s):this._app.isDebugMode().then((t=>{t&&this._app.error("Promise rejeitada","Erro interno: Uma promise foi rejeitada sem razão determinada.")})))}errorHandler(t){this.processException(t.error)}buildErrorCodeHTML(t){return'<br><a href="#" onclick="try{window.workspace.openHelp(\'_tbcode:'+t+"')} catch(e){alert('Não é possível abrir a ajuda fora do workspace Sankhya');}\">Código: "+t+"</a>"}processException(t){t.errorCode&&(t.message+=this.buildErrorCodeHTML(t.errorCode)),t instanceof o||t instanceof c?this._app.alert(t.title,t.message):t instanceof h?this._app.error(t.title,t.message):this._app.isDebugMode().then((s=>{if(s)if(t instanceof Error)this._app.error(t.name,t.message);else{const s=(null==t?void 0:t.title)||"Erro detectado",e="string"==typeof t?t:t.message||`Erro interno "${a.objectToString(t)}"`;this._app.error(s,e)}}))}}const q=class{constructor(e){t(this,e),this.applicationLoaded=s(this,"applicationLoaded",7),this.applicationLoading=s(this,"applicationLoading",7),this.NEW_VERSION_POPUP_LOCKER="NEW_VERSION_POPUP_LOCKER",this._authPromises=[],this._duCache=new Map,this._duPromises=new Map,this._requestListener=new x,this._pendingActions=new Map,this._isLoadedByPk=!1,this.messagesBuilder=void 0,this.configName=void 0,this.loadByPK=void 0}async processPendingActions(t){const s=this._pendingActions.get(t);s&&s.length&&(s.forEach((t=>t())),this._pendingActions.set(t,[]))}get parameters(){return this._parameters||(this._parameters=new T),this._parameters}async getAuth(t){return null==t?this.getApplicationAuth():new Promise(((s,e)=>{this.authFetcher.getData(t).then((t=>{s(t)})).catch((t=>{e(t)}))}))}async getApplicationAuth(){return this._auth?Promise.resolve(this._auth):new Promise(((t,s)=>{const e=this._authPromises.length>0;this._authPromises.push(new B(t,s)),e||this.authFetcher.getData(this.applicationResourceID).then((t=>{for(this._auth=t;this._authPromises.length>0;)this._authPromises.pop().resolve(this._auth)})).catch((t=>{for(;this._authPromises.length>0;)this._authPromises.pop().reject(t)}))}))}async isUserSup(){return new Promise(((t,s)=>{this.getAuth().then((e=>{this.getAuthList(e).then((s=>{t(s.isSup)})).catch((t=>s(t)))}))}))}async addPendingAction(t,s){var e;const i=null!==(e=this._pendingActions.get(t))&&void 0!==e?e:[];this._pendingActions.set(t,[...i,s])}async callServiceBroker(t,s,e){return g.get().callServiceBroker(t,s,e)}async initOnboarding(t){this.hasToShowNewVersionPopup()?await this.addPendingAction(this.NEW_VERSION_POPUP_LOCKER,(()=>this.doInitOnboarding(t))):this.doInitOnboarding(t)}doInitOnboarding(t){u.getInstance().init(t,window.envContext)}async hasAccess(t,s){return new Promise(((e,i)=>{this.getAuth(s).then((s=>{this.getAuthList(s).then((s=>{e(s.isSup||s.actions[t])})).catch((t=>i(t)))}))}))}async getAllAccess(t){return new Promise(((s,e)=>{this.getAuth(t).then((t=>{this.getAuthList(t).then((t=>{const e={};e.isSup=t.isSup,Object.entries(I).forEach((s=>{e[s[0]]=t.actions[s[1]]||!1})),s(e)})).catch((t=>e(t)))}))}))}async getStringParam(t){return this.parameters.asString(t)}async getIntParam(t){return this.parameters.asInteger(t)}async getFloatParam(t){return this.parameters.asFloat(t)}async getBooleanParam(t){return this.parameters.asBoolean(t)}async getDateParam(t){return this.parameters.asDate(t)}async showPopUp(t,s="full",e=!0){this.clearContent(this._popUp),this._popUp.appendChild(t),this._popUp.opened=!0,this._popUp.heightMode=s,this._popUp.useHeader=e,"EZ-MODAL-CONTAINER"===t.tagName&&(this._popUp.useHeader=!1)}async showModal(t){this.clearContent(this._rightModal),this._rightModal.appendChild(t),this._rightModal.opened=!0}async closeModal(){this.clearContent(this._rightModal),this._rightModal.opened=!1}async closePopUp(){this.clearContent(this._popUp),this._popUp.opened=!1,this._popUp.useHeader=!0,this._popUp.heightMode="full"}async temOpcional(t){const s=t.split(",");return new Promise(((t,e)=>{this.getAttributeFromHTMLWrapper("opc0009").then((i=>{"1"===i?t(!0):Promise.all(s.map((t=>this.getAttributeFromHTMLWrapper("opc"+t)))).then((s=>{t(s.includes("1"))})).catch((t=>{e(t)}))})).catch((t=>{e(t)}))}))}async getConfig(t){let s={serviceName:"SystemUtilsSP.getConf",requestBody:{config:{chave:t,tipo:"T"}}};return new Promise(((t,e)=>{g.get().callServiceBroker("SystemUtilsSP.getConf",JSON.stringify(s)).then((s=>{var e;return t(null===(e=s.config)||void 0===e?void 0:e.data)})).catch((t=>e(t)))}))}async saveConfig(t,s){let e={serviceName:"SystemUtilsSP.saveConf",requestBody:{config:{chave:t,tipo:"T",data:s}}};return new Promise(((t,s)=>{g.get().callServiceBroker("SystemUtilsSP.saveConf",JSON.stringify(e)).then((s=>t(s))).catch((t=>s(t)))}))}async getAttributeFromHTMLWrapper(t){return Promise.resolve(window[t])}async openApp(t,s){F.openAppActivity(t,s)}async webConnection(t,s,e){this.getStringParam(t).then((t=>{D.webConnectionCaller(t,s,e)}))}getDuPromissesStack(t){let s;return t&&(s=this._duPromises.get(t),s||(s=[],this._duPromises.set(t,s))),s||[]}async createDataunit(t,s,e,i,n){return null==n&&(n=this.applicationResourceID),new Promise(((r,a)=>{const o=this.getDuPromissesStack(s),c=o.length>0;if(o.push(new B(r,a)),!c){const r=this.dataUnitFetcher.getDataUnit(t,n,e,i);r.loadMetadata().then((()=>{for(s&&this.updateDataunitCache(void 0,s,r);o.length>0;)o.pop().resolve(r)})).catch((t=>{for(;o.length>0;)o.pop().reject(t)}))}}))}async updateDataunitCache(t,s,e){t&&this._duCache.delete(t),this._duCache.set(s,e)}async getDataUnit(t,s,e,i,n){return new Promise(((r,a)=>{const o=this._duCache.get(s);o?r(o):this.createDataunit(t,s,e,i,n).then((t=>{r(t)})).catch((t=>a(t)))}))}async addClientEvent(t,s){return new Promise((e=>{g.addClientEvent(t,s),e()}))}async removeClientEvent(t){return new Promise((s=>{g.removeClientEvent(t),s()}))}async hasClientEvent(t){return new Promise((s=>{s(g.hasClientEvent(t))}))}get applicationResourceID(){return this._applicationResourceID||(this._applicationResourceID=this.urlParams.get("workspaceResourceID")||this.urlParams.get("resourceID")||F.resourceID||"unknown.resource.id"),this._applicationResourceID}async getResourceID(){return Promise.resolve(this.applicationResourceID)}async getUserID(){return Promise.resolve(window.UID)}async alert(t,s,e,i){return f.alert(t,s,e,i)}async error(t,s,e,i){return f.error(t,s,e,i)}async success(t,s,e,i){return f.success(t,s,e,i)}async message(t,s,e,i){return f.message(t,s,e,i)}async confirm(t,s,e,i,n){return f.confirm(t,s,e,i,n)}async info(t,s){return f.info(t,s)}async loadTotals(t,s,e){return this.totalsFetcher.fetchTotals(t,s,e)}async isLoadedByPk(){return Promise.resolve(this._isLoadedByPk)}async getAuthList(t){return await(new k).parseFromJSON(t)}get urlParams(){return this._urlParams||(this._urlParams=v.getQueryParams(location.search)),this._urlParams}getMessage(t,s){var e;return null===(e=this.messagesBuilder)||void 0===e?void 0:e.getMessage(t,s)}get dataUnitFetcher(){return this._dataUnitFetcher||(this._dataUnitFetcher=new _),this._dataUnitFetcher}get totalsFetcher(){return this._totalsFetcher||(this._totalsFetcher=new O),this._totalsFetcher}get pesquisaFetcher(){return this._pesquisaFetcher||(this._pesquisaFetcher=new S),this._pesquisaFetcher}get authFetcher(){return this._authFetcher||(this._authFetcher=new A),this._authFetcher}async executeSearch(t,s,e){const i=null==e?void 0:e.getField(s);if(i){const{mode:s,argument:n}=t,{ENTITYNAME:r,CODEFIELD:a,DESCRIPTIONFIELD:o,ROOTENTITY:c,DESCRIPTIONENTITY:h}=i.properties,u=i.dependencies;let p;const m={rootEntity:c,descriptionFieldName:o,codeFieldName:a,showInactives:!1,dataUnitId:e.dataUnitId};return null==u||u.filter((t=>t.masterFields)).forEach((t=>{var s;t.type===l.SEARCHING&&(null===(s=t.masterFields)||void 0===s?void 0:s.length)>0&&(p={expression:t.expression,params:t.masterFields.map((t=>{const s=e.getField(t),i=(null==s?void 0:s.dataType)||d.TEXT,n=e.getFieldValue(t);if(null==n)throw this.alert("Erro ao pesquisar",`É necessario informar o campo ${s.label} para executar a pesquisa.`),new Error(`É necessario informar o campo ${s.label} para executar a pesquisa.`);return{name:t,value:n,dataType:i}}))})})),this.executePreparedSearch(s,n,{entity:r,entityDescription:h,criteria:p,searchOptions:m})}}async executePreparedSearch(t,s,e){const{entity:i,entityDescription:n,criteria:r,searchOptions:a}=e;return"ADVANCED"===t?new Promise((t=>{const e=document.createElement("snk-pesquisa");e[p.DATA_ELEMENT_ID_ATTRIBUTE_NAME]=`entity_${i}`,e.argument=s,e.searchLoader=t=>this.pesquisaFetcher.loadAdvancedSearch(i,t,r,a),e.selectItem=s=>{t(s),this.clearPopUpTitle(),this.closePopUp()},this.setPopUpTitle(n),this.showPopUp(e)})):this.pesquisaFetcher.loadSearchOptions(i,s,r,a)}async isDebugMode(){return new Promise((t=>{t(window.isDebugMode)}))}async getAppLabel(){return F.getAppLabel(this.applicationResourceID)}addSearchListener(t,s,e){return new Promise((i=>{i(this.pesquisaFetcher.addSearchListener(t,s.dataUnitId,e))}))}importScript(t){return new Promise((s=>{this.getApplicationPath().then((e=>{let i=[];Array.isArray(t)||(i=[t]),i.forEach((t=>{const s=document.createElement("script");s.src=`${e}/${t}`,s.async=!0,document.body.appendChild(s)})),s()}))}))}async getApplicationPath(){return new Promise((t=>{"dev"===window.applicationenv?t(""):t(`/${this.getModuleName()}/labsApps/${window.APPLICATION_NAME}/build`)}))}getModuleName(){return window.MGE_MODULE_NAME||"mgefin-bff"}executeSelectDistinct(t,s,e){return this.dataUnitFetcher.loadSelectDistinct(t,s,e)}getDataFetcher(){return Promise.resolve(g.get())}clearContent(t){t&&Array.from(t.children).forEach((s=>{t.removeChild(s)}))}clearPopUpTitle(){this._popUp.ezTitle=""}setPopUpTitle(t){this._popUp.ezTitle=t}async pkChangeListener(){const t=top.window.location.hash.split("/")[2];if(this._currentPkParameter===t)return;const s=this.getResourceIdFromToken(),e=v.getPkObjectFromUrlToken(top.window.location.hash);if(null==e||s!==this.applicationResourceID)return;const i={pk:e};if(this._isLoadedByPk=!0,this.loadByPK)return this.loadByPK(i),void(this._currentPkParameter=t);this.defaultLoadByPK(i,t)}getResourceIdFromToken(){return top.window.location.pathname.indexOf("tabContent.jsp")>-1?v.getResourceIdFromUrlToken(window.location.generateHash(window.location.hash)):v.getResourceIdFromUrlToken(top.window.location.hash)}defaultLoadByPK(t,s){if(!(null==t?void 0:t.pk))return;const e=this.getFirstDataUnitFromDOM(),i=e.dataUnit;if(!i)return console.warn("Dataunit não inicializado"),void e.addEventListener("dataUnitReady",(e=>{this.loadDataWithPKFilter(t,e.detail),this._currentPkParameter=s}));this.loadDataWithPKFilter(t,i),this._currentPkParameter=s}loadDataWithPKFilter(t,s){const e={term:"",filter:{name:"LOAD_BY_PK_FILTER",expression:this.buildFilterExpressionByPkObject(t),params:this.getFilterParamsFromPkObject(t,s)}};s.loadData(e)}getFirstDataUnitFromDOM(){let t=this._element.querySelector("snk-data-unit[data-load-by-pk]");if(t||(t=this._element.querySelector("snk-data-unit")),t)return t}getFilterParamsFromPkObject(t,s){var e;const i=[];for(const n in t.pk)t.pk.hasOwnProperty(n)&&!Array.isArray(t.pk[n])&&i.push({name:n,dataType:(null===(e=s.getField(n))||void 0===e?void 0:e.dataType)||this.getDefaultDataTypeLoadByPK(t.pk[n]),value:t.pk[n]});return i}getDefaultDataTypeLoadByPK(t){return"number"==typeof t||t instanceof Number?d.NUMBER:"boolean"==typeof t||t instanceof Boolean?d.BOOLEAN:t instanceof Date?d.DATE:d.TEXT}buildFilterExpressionByPkObject(t){let s="";for(const e in t.pk)r.isEmpty(s)||(s+=" AND "),Array.isArray(t.pk[e])?s+=`${e} IN (${t.pk[e].toString()})`:s+=`${e} = :${e}`;return s}async showNewVersionPopup(){const t=document.createElement("ez-modal-container"),s=await this.getAppLabel();t.modalTitle=this.getMessage("snkApplication.newVersionPopup.title",{screenName:s}),t.okButtonLabel=this.getMessage("snkApplication.newVersionPopup.okButton"),t.cancelButtonLabel=this.getMessage("snkApplication.newVersionPopup.cancelButton");const e=document.createElement("p");e.innerText=this.getMessage("snkApplication.newVersionPopup.info"),e.className="ez-text",t.appendChild(e),t.addEventListener("ezModalAction",this.newVersionPopupEventListener.bind(this));const i=await f.showPopup({content:t});this._removeVersionLayoutPopup=async()=>{await i(),await this.processPendingActions(this.NEW_VERSION_POPUP_LOCKER)}}async newVersionPopupEventListener(t){"LOAD"!==t.detail&&("OK"===t.detail&&F.setScreenToUseV3Layout(),"CANCEL"===t.detail&&F.setScreenToUseOldLayout(),this._popUp.opened=!1,this._removeVersionLayoutPopup&&await this._removeVersionLayoutPopup())}async handleShowNewVersionPopup(){this.hasToShowNewVersionPopup()&&await this.showNewVersionPopup()}hasToShowNewVersionPopup(){const t=new URLSearchParams(window.location.search).get("firstLoadConv");return t&&"S"===t}registerPkChangeListener(){window.hasOwnProperty("onhashchange")?window.onhashchange=this.pkChangeListener.bind(this):setInterval(this.pkChangeListener.bind(this),100)}componentWillLoad(){m.setContextValue("__SNK__APPLICATION__LOADING__",!0),this._errorHandler=new z(this),this.messagesBuilder=new C,m.setContextValue("__EZUI__UPLOAD__ADD__URL__",`${v.getUrlBase()}/mge/upload/file`),m.setContextValue("__EZUI__SEARCH__OPTION__LOADER__",((t,s,e)=>this.executeSearch(t,s,e))),m.setContextValue("__EZUI__GRID_LICENSE__",R),this.registerPkChangeListener(),w.init(),y.preload(this.applicationResourceID,this.configName),document.addEventListener("click",(()=>F.applicationClick()))}connectedCallback(){m.setContextValue("__SNK__APPLICATION__",this),g.addRequestListener(this._requestListener)}disconnectedCallback(){g.removeRequestListener(this._requestListener)}async componentDidLoad(){this.applicationLoading.emit(!0),window.requestAnimationFrame((()=>{m.setContextValue("__SNK__APPLICATION__LOADING__",!1),this.applicationLoaded.emit(!0),this.pkChangeListener()})),p.addIDInfo(this._element,`resource_${this.applicationResourceID}`),await this.handleShowNewVersionPopup()}render(){return e("div",null,e("ez-loading-bar",{ref:t=>this._requestListener.loadingBar=t}),e("ez-popup",{opened:!1,ref:t=>this._popUp=t,onEzClosePopup:()=>this.closePopUp()}),e("ez-modal",{opened:!1,ref:t=>this._rightModal=t,"modal-size":"small",closeOutsideClick:!0,closeEsc:!0}))}get _element(){return i(this)}};class x{constructor(){this._debounceTime=1e3,this._ignoredNameTypes=["totals"],this._countRequest=0}onRequestStart(t){this.isIgnoreLoadingOnRequest(t)||(this._countRequest++,this.loadingBar.show(),this._timerLoading&&clearTimeout(this._timerLoading))}onRequestEnd(t){this.isIgnoreLoadingOnRequest(t)||(this._countRequest--,this._timerLoading=setTimeout((()=>{this._countRequest<=0&&this.loadingBar.hide()}),this._debounceTime))}isIgnoreLoadingOnRequest(t){if(null==t)return!1;if(t.url.includes("quietMode=true"))return!0;if(null==t.requestBody)return!1;if(1==t.requestBody.length){const{name:s}=t.requestBody[0].variables;if(s){const t=s.split(":");return this._ignoredNameTypes.indexOf(t[0])>=0}}return!1}}class B{constructor(t,s){this.resolve=t,this.reject=s}}q.style=".sc-snk-application-h{display:flex;flex-direction:column;height:100%}";export{q as snk_application}
|
@@ -1 +1 @@
|
|
1
|
-
import{p as e,b as t}from"./p-d2d301a6.js";export{s as setNonce}from"./p-d2d301a6.js";(()=>{const t=import.meta.url,a={};return""!==t&&(a.resourcesUrl=new URL(".",t).href),e(a)})().then((e=>t(JSON.parse('[["p-118e769b",[[1,"teste-pesquisa"]]],["p-e11c5038",[[0,"snk-filter-modal",{"getMessage":[16],"configName":[1025,"config-name"],"filters":[1040],"applyFilters":[16],"closeModal":[16],"addPersonalizedFilter":[16],"editPersonalizedFilter":[16]}]]],["p-ac8d1cd6",[[2,"snk-actions-form",{"action":[16],"applyParameters":[16],"dataUnit":[32],"openPopup":[64]}]]],["p-9531fd46",[[2,"snk-client-confirm",{"titleMessage":[1,"title-message"],"message":[1],"accept":[16],"cancel":[16],"openPopup":[64]}]]],["p-69754d94",[[6,"snk-custom-slot-elements",{"slotName":[1,"slot-name"]}]]],["p-d4f9ee17",[[2,"snk-entity-list",{"config":[1040],"rightListSlotBuilder":[1040],"maxHeightList":[1,"max-height-list"],"_searchValue":[32],"_ezListSource":[32],"reloadList":[64]}]]],["p-eb636e15",[[0,"snk-filter-binary-select",{"value":[1544],"config":[16],"presentationMode":[2,"presentation-mode"],"resetValues":[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-d3f53df2",[[4,"snk-filter-list",{"label":[1],"iconName":[1,"icon-name"],"items":[16],"getMessage":[16],"emptyText":[1,"empty-text"],"findFilterText":[1,"find-filter-text"],"buttonClass":[1,"button-class"],"_filterArgument":[32],"_showAll":[32],"hideDetail":[64]},[[2,"keydown","keyDownHandler"]]]]],["p-cb37982f",[[0,"snk-filter-multi-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-e3a82e1c",[[0,"snk-filter-number",{"config":[16],"value":[2],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-959e0835",[[0,"snk-filter-period",{"config":[16],"getMessage":[16],"value":[8],"presentationMode":[2,"presentation-mode"],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-fe49067d",[[0,"snk-filter-search",{"config":[16],"value":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-96a89d58",[[0,"snk-filter-text",{"config":[16],"value":[1]},[[0,"ezChange","ezChangeListener"]]]]],["p-26ad62b9",[[2,"snk-personalized-filter-editor",{"messagesBuilder":[1040],"presentationMode":[2,"presentation-mode"],"config":[16],"value":[1040],"items":[32],"show":[64]}]]],["p-72fc257b",[[2,"snk-print-selector",{"_printServerActive":[32],"_selectedPrinter":[32],"_remotePrintersDataSource":[32],"_localPrintersDataSource":[32],"_printJobData":[32],"openPrintSelector":[64]}]]],["p-3bf4df20",[[0,"snk-filter-modal-item",{"filterItem":[1040],"configName":[1025,"config-name"],"resourceID":[1,"resource-i-d"]}]]],["p-c606c748",[[0,"snk-filter-detail",{"config":[1040],"getMessage":[16],"show":[64]}]]],["p-88aa931b",[[6,"snk-simple-bar",{"label":[1],"breadcrumbItens":[16],"messagesBuilder":[1040]}]]],["p-2eb547d9",[[6,"snk-detail-view",{"formConfigManager":[1040],"dataUnitName":[1,"data-unit-name"],"resourceID":[1,"resource-i-d"],"guideItemPath":[16],"entityName":[1,"entity-name"],"label":[1],"dataUnit":[1040],"selectedForm":[1025,"selected-form"],"dataState":[1040],"messagesBuilder":[1040],"branchGuide":[1040],"canEdit":[4,"can-edit"],"taskbarCustomContainerId":[1,"taskbar-custom-container-id"],"_disabledButtons":[32],"_currentView":[32],"attachmentRegisterKey":[32],"changeViewMode":[64],"configGrid":[64],"showUp":[64]},[[0,"snkContentCardChanged","onContentCardChanged"]]]]],["p-73d3daa8",[[2,"snk-configurator",{"showActionButtons":[4,"show-action-buttons"],"configName":[1,"config-name"],"resourceID":[1,"resource-i-d"],"viewMode":[2,"view-mode"],"customContainerId":[1,"custom-container-id"],"messagesBuilder":[1040],"_opened":[32],"_permissions":[32],"open":[64],"close":[64]}]]],["p-247a8b36",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[32]}]]],["p-c0931902",[[2,"snk-filter-field-search",{"searchable":[4],"fieldsDataSource":[16],"breadcrumbItems":[32],"linkItems":[32],"fieldItems":[32],"searchEmpty":[32],"groupEmpty":[32],"show":[64],"applyFilter":[64]}],[0,"snk-filter-param-config",{"messagesBuilder":[1040],"_opened":[32],"_configType":[32],"_expressionItem":[32],"_informedInstance":[32],"_canSave":[32],"open":[64],"close":[64]}]]],["p-9d3a025a",[[2,"snk-expression-group",{"parentTop":[1026,"parent-top"],"group":[1040],"messagesBuilder":[1040],"filterId":[1025,"filter-id"],"entityURI":[1025,"entity-u-r-i"],"_conditionOperator":[32],"_group":[32],"_selfTop":[32],"canAddExpression":[32],"_showDashes":[32],"getExpressionGroup":[64]},[[8,"ezExpressionLayoutChanged","todoCompletedHandler"]]],[2,"snk-expression-item",{"expression":[16],"canRemove":[516,"can-remove"],"messagesBuilder":[1040],"entityURI":[1025,"entity-u-r-i"],"_showValueVariable":[32],"_fieldSelected":[32],"_optionNotNull":[32]}]]],["p-c78a80ae",[[2,"snk-filter-assistent-mode",{"filterAssistent":[1040],"messagesBuilder":[1040],"filterId":[1025,"filter-id"],"entityUri":[1025,"entity-uri"],"application":[1040]}],[2,"snk-filter-advanced-mode",{"filterAssistent":[1040],"application":[1040]}]]],["p-e60325bc",[[2,"snk-personalized-filter",{"messagesBuilder":[1040],"entityUri":[1025,"entity-uri"],"filterId":[1025,"filter-id"],"configName":[1025,"config-name"],"resourceID":[1,"resource-i-d"],"_filterAssistentMode":[32],"_filterAssistent":[32],"createPersonalizedFilter":[64]}]]],["p-6d765e32",[[2,"snk-filter-bar",{"dataUnit":[1040],"configName":[1,"config-name"],"resourceID":[1,"resource-i-d"],"filterConfig":[1040],"messagesBuilder":[1040],"allowDefault":[32],"scrollerLocked":[32],"showPersonalizedFilter":[32],"personalizedFilterId":[32],"reload":[64]},[[0,"filterChange","filterChangeListener"]]]]],["p-bd628455",[[2,"snk-config-options",{"fieldConfig":[16],"idConfig":[513,"id-config"],"dataUnit":[16],"messagesBuilder":[1040],"_defaultType":[32]}]]],["p-f30526a7",[[2,"snk-field-config",{"isConfigActive":[16],"fieldConfig":[16],"modeInsertion":[516,"mode-insertion"],"dataUnit":[16],"messagesBuilder":[1040]}]]],["p-d3ec3586",[[6,"snk-tab-config",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"tabItems":[16],"messagesBuilder":[1040],"_processedTabs":[32],"_activeEditText":[32],"_activeEditTextIndex":[32],"_actionsHide":[32],"_actionsShow":[32]}]]],["p-80692cbd",[[2,"snk-form-config",{"dataUnit":[16],"configManager":[16],"messagesBuilder":[1040],"_formConfigOptions":[32],"_fieldConfigSelected":[32],"_layoutFormConfig":[32],"_fieldsAvailable":[32],"_formConfig":[32],"_formConfigChanged":[32],"_optionFormConfigSelected":[32],"_optionFormConfigChanged":[32],"_tempGroups":[32]}]]],["p-838f8234",[[1,"snk-select-box",{"selectedOption":[1,"selected-option"]}]]],["p-47e4b6c9",[[2,"snk-grid-config",{"selectedIndex":[1026,"selected-index"],"application":[16],"columns":[1040],"config":[1040],"configName":[1,"config-name"],"resourceID":[1,"resource-i-d"]}]]],["p-b3dc25aa",[[0,"snk-filter-item",{"config":[1040],"getMessage":[16],"detailIsVisible":[32],"showUp":[64],"hideDetail":[64]},[[2,"click","clickListener"],[2,"mousedown","mouseDownListener"],[0,"filterChange","filterChangeListener"]]]]],["p-3eb28447",[[2,"snk-data-unit",{"dataState":[1040],"messagesBuilder":[1040],"dataUnitName":[1,"data-unit-name"],"entityName":[1,"entity-name"],"pageSize":[2,"page-size"],"dataUnit":[1040],"beforeSave":[16],"afterSave":[16],"useCancelConfirm":[4,"use-cancel-confirm"],"ignoreSaveMessage":[4,"ignore-save-message"],"configName":[1,"config-name"],"resourceID":[1,"resource-i-d"],"getDataUnit":[64],"getSelectedRecordsIDsInfo":[64]}]]],["p-219f888d",[[0,"snk-exporter-email-sender",{"getMessage":[16],"_config":[32],"_opened":[32],"_currentStep":[32],"open":[64],"close":[64]}]]],["p-54e3e05c",[[2,"snk-data-exporter",{"provider":[16],"messagesBuilder":[1040],"_items":[32],"_showDropdown":[32],"_releasedToExport":[32]}]]],["p-d4fb9642",[[6,"snk-taskbar",{"customSlotId":[1,"custom-slot-id"],"customContainerId":[1,"custom-container-id"],"configName":[1,"config-name"],"resourceID":[1,"resource-i-d"],"buttons":[1],"customButtons":[16],"actionsList":[16],"primaryButton":[1,"primary-button"],"disabledButtons":[16],"dataUnit":[16],"presentationMode":[1537,"presentation-mode"],"messagesBuilder":[1040],"_permissions":[32],"_customElements":[32],"_customElementsId":[32],"_slotContainer":[32]}]]],["p-7dc44b05",[[6,"snk-grid",{"columnFilterDataSource":[1040],"configName":[1,"config-name"],"resourceID":[1,"resource-i-d"],"selectionToastConfig":[16],"actionsList":[16],"isDetail":[4,"is-detail"],"taskbarManager":[16],"statusResolver":[16],"multipleSelection":[4,"multiple-selection"],"presentationMode":[1,"presentation-mode"],"messagesBuilder":[1040],"useEnterLikeTab":[4,"use-enter-like-tab"],"recordsValidator":[16],"canEdit":[4,"can-edit"],"taskbarCustomContainerId":[1,"taskbar-custom-container-id"],"gridHeaderCustomSlotId":[1,"grid-header-custom-slot-id"],"topTaskbarCustomSlotId":[1,"top-taskbar-custom-slot-id"],"_dataUnit":[32],"_dataState":[32],"_gridConfig":[32],"_popUpGridConfig":[32],"showConfig":[64],"hideConfig":[64],"setConfig":[64],"reloadFilterBar":[64]}]]],["p-cab6a969",[[6,"snk-guides-viewer",{"dataUnit":[16],"dataState":[16],"configName":[1,"config-name"],"entityPath":[1,"entity-path"],"actionsList":[16],"recordsValidator":[16],"masterFormConfig":[1040],"selectedGuide":[16],"taskbarManager":[16],"messagesBuilder":[1040],"canEdit":[4,"can-edit"],"presentationMode":[1,"presentation-mode"],"resourceID":[1,"resource-i-d"],"detailTaskbarCustomContainerId":[1,"detail-taskbar-custom-container-id"],"_breadcrumbItems":[32],"_guides":[32],"_formEditorConfigManager":[32],"_formEditorDataUnit":[32],"showFormConfig":[64]},[[2,"actionClick","onActionClick"],[0,"snkContentCardChanged","onContentCardChanged"]]]]],["p-7749c662",[[6,"snk-crud",{"configName":[1025,"config-name"],"selectionToastConfig":[16],"showActionButtons":[4,"show-action-buttons"],"actionsList":[16],"taskbarManager":[16],"recordsValidator":[16],"statusResolver":[16],"multipleSelection":[4,"multiple-selection"],"presentationMode":[1,"presentation-mode"],"messagesBuilder":[1040],"useEnterLikeTab":[4,"use-enter-like-tab"],"_dataUnit":[32],"_dataState":[32],"attachmentRegisterKey":[32],"_currentViewMode":[32],"_canEdit":[32],"_resourceID":[32],"customContainerId":[32],"goToView":[64],"openConfigurator":[64],"closeConfigurator":[64],"reloadFilterBar":[64]}]]],["p-06e76ed2",[[2,"snk-form",{"configName":[1,"config-name"],"recordsValidator":[16],"messagesBuilder":[1040],"resourceID":[1,"resource-i-d"],"_dataUnit":[32],"_dataState":[32],"_showFormConfig":[32],"_configManager":[32],"showConfig":[64],"hideConfig":[64]}]]],["p-4efe1a8a",[[2,"snk-application",{"messagesBuilder":[1040],"configName":[1,"config-name"],"loadByPK":[16],"isUserSup":[64],"addPendingAction":[64],"callServiceBroker":[64],"initOnboarding":[64],"hasAccess":[64],"getAllAccess":[64],"getStringParam":[64],"getIntParam":[64],"getFloatParam":[64],"getBooleanParam":[64],"getDateParam":[64],"showPopUp":[64],"showModal":[64],"closeModal":[64],"closePopUp":[64],"temOpcional":[64],"getConfig":[64],"saveConfig":[64],"getAttributeFromHTMLWrapper":[64],"openApp":[64],"webConnection":[64],"createDataunit":[64],"updateDataunitCache":[64],"getDataUnit":[64],"addClientEvent":[64],"removeClientEvent":[64],"hasClientEvent":[64],"getResourceID":[64],"getUserID":[64],"alert":[64],"error":[64],"success":[64],"message":[64],"confirm":[64],"info":[64],"loadTotals":[64],"isLoadedByPk":[64],"executeSearch":[64],"executePreparedSearch":[64],"isDebugMode":[64],"getAppLabel":[64],"addSearchListener":[64],"importScript":[64],"getApplicationPath":[64],"executeSelectDistinct":[64],"getDataFetcher":[64]}]]],["p-651b4f89",[[6,"snk-simple-crud",{"dataState":[16],"dataUnit":[16],"mode":[2],"gridConfig":[16],"formConfig":[16],"multipleSelection":[4,"multiple-selection"],"useCancelConfirm":[4,"use-cancel-confirm"],"taskbarManager":[16],"messagesBuilder":[1040],"useEnterLikeTab":[4,"use-enter-like-tab"],"_currentViewMode":[32],"_config":[32],"goToView":[64],"setMetadata":[64],"setRecords":[64],"getRecords":[64]},[[0,"actionClick","actionClickListener"]]]]],["p-0383e477",[[2,"snk-attach",{"registerKey":[1,"register-key"],"entityName":[1,"entity-name"],"messagesBuilder":[1040],"dataUnit":[32],"crudConfig":[32]}]]],["p-26b0ce3e",[[2,"snk-form-summary",{"fixed":[1540],"contracted":[1540],"summary":[16]}]]],["p-c555075c",[[6,"snk-form-view",{"levelPath":[1,"level-path"],"label":[1],"name":[1],"fields":[16],"formMetadata":[8,"form-metadata"],"dataUnit":[16],"contracted":[4],"fixed":[1540],"summaryFields":[16],"canExpand":[4,"can-expand"],"canFix":[4,"can-fix"],"recordsValidator":[16],"showUp":[64]}]]],["p-47d20cb0",[[2,"snk-actions-button",{"_items":[32],"_showDropdown":[32],"_actions":[32],"_isOrderActions":[32]}]]]]'),e)));
|
1
|
+
import{p as e,b as t}from"./p-d2d301a6.js";export{s as setNonce}from"./p-d2d301a6.js";(()=>{const t=import.meta.url,a={};return""!==t&&(a.resourcesUrl=new URL(".",t).href),e(a)})().then((e=>t(JSON.parse('[["p-118e769b",[[1,"teste-pesquisa"]]],["p-e11c5038",[[0,"snk-filter-modal",{"getMessage":[16],"configName":[1025,"config-name"],"filters":[1040],"applyFilters":[16],"closeModal":[16],"addPersonalizedFilter":[16],"editPersonalizedFilter":[16]}]]],["p-ac8d1cd6",[[2,"snk-actions-form",{"action":[16],"applyParameters":[16],"dataUnit":[32],"openPopup":[64]}]]],["p-9531fd46",[[2,"snk-client-confirm",{"titleMessage":[1,"title-message"],"message":[1],"accept":[16],"cancel":[16],"openPopup":[64]}]]],["p-69754d94",[[6,"snk-custom-slot-elements",{"slotName":[1,"slot-name"]}]]],["p-d4f9ee17",[[2,"snk-entity-list",{"config":[1040],"rightListSlotBuilder":[1040],"maxHeightList":[1,"max-height-list"],"_searchValue":[32],"_ezListSource":[32],"reloadList":[64]}]]],["p-eb636e15",[[0,"snk-filter-binary-select",{"value":[1544],"config":[16],"presentationMode":[2,"presentation-mode"],"resetValues":[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-d3f53df2",[[4,"snk-filter-list",{"label":[1],"iconName":[1,"icon-name"],"items":[16],"getMessage":[16],"emptyText":[1,"empty-text"],"findFilterText":[1,"find-filter-text"],"buttonClass":[1,"button-class"],"_filterArgument":[32],"_showAll":[32],"hideDetail":[64]},[[2,"keydown","keyDownHandler"]]]]],["p-cb37982f",[[0,"snk-filter-multi-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-e3a82e1c",[[0,"snk-filter-number",{"config":[16],"value":[2],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-959e0835",[[0,"snk-filter-period",{"config":[16],"getMessage":[16],"value":[8],"presentationMode":[2,"presentation-mode"],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-fe49067d",[[0,"snk-filter-search",{"config":[16],"value":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-96a89d58",[[0,"snk-filter-text",{"config":[16],"value":[1]},[[0,"ezChange","ezChangeListener"]]]]],["p-26ad62b9",[[2,"snk-personalized-filter-editor",{"messagesBuilder":[1040],"presentationMode":[2,"presentation-mode"],"config":[16],"value":[1040],"items":[32],"show":[64]}]]],["p-72fc257b",[[2,"snk-print-selector",{"_printServerActive":[32],"_selectedPrinter":[32],"_remotePrintersDataSource":[32],"_localPrintersDataSource":[32],"_printJobData":[32],"openPrintSelector":[64]}]]],["p-3bf4df20",[[0,"snk-filter-modal-item",{"filterItem":[1040],"configName":[1025,"config-name"],"resourceID":[1,"resource-i-d"]}]]],["p-c606c748",[[0,"snk-filter-detail",{"config":[1040],"getMessage":[16],"show":[64]}]]],["p-88aa931b",[[6,"snk-simple-bar",{"label":[1],"breadcrumbItens":[16],"messagesBuilder":[1040]}]]],["p-2eb547d9",[[6,"snk-detail-view",{"formConfigManager":[1040],"dataUnitName":[1,"data-unit-name"],"resourceID":[1,"resource-i-d"],"guideItemPath":[16],"entityName":[1,"entity-name"],"label":[1],"dataUnit":[1040],"selectedForm":[1025,"selected-form"],"dataState":[1040],"messagesBuilder":[1040],"branchGuide":[1040],"canEdit":[4,"can-edit"],"taskbarCustomContainerId":[1,"taskbar-custom-container-id"],"_disabledButtons":[32],"_currentView":[32],"attachmentRegisterKey":[32],"changeViewMode":[64],"configGrid":[64],"showUp":[64]},[[0,"snkContentCardChanged","onContentCardChanged"]]]]],["p-73d3daa8",[[2,"snk-configurator",{"showActionButtons":[4,"show-action-buttons"],"configName":[1,"config-name"],"resourceID":[1,"resource-i-d"],"viewMode":[2,"view-mode"],"customContainerId":[1,"custom-container-id"],"messagesBuilder":[1040],"_opened":[32],"_permissions":[32],"open":[64],"close":[64]}]]],["p-247a8b36",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[32]}]]],["p-c0931902",[[2,"snk-filter-field-search",{"searchable":[4],"fieldsDataSource":[16],"breadcrumbItems":[32],"linkItems":[32],"fieldItems":[32],"searchEmpty":[32],"groupEmpty":[32],"show":[64],"applyFilter":[64]}],[0,"snk-filter-param-config",{"messagesBuilder":[1040],"_opened":[32],"_configType":[32],"_expressionItem":[32],"_informedInstance":[32],"_canSave":[32],"open":[64],"close":[64]}]]],["p-9d3a025a",[[2,"snk-expression-group",{"parentTop":[1026,"parent-top"],"group":[1040],"messagesBuilder":[1040],"filterId":[1025,"filter-id"],"entityURI":[1025,"entity-u-r-i"],"_conditionOperator":[32],"_group":[32],"_selfTop":[32],"canAddExpression":[32],"_showDashes":[32],"getExpressionGroup":[64]},[[8,"ezExpressionLayoutChanged","todoCompletedHandler"]]],[2,"snk-expression-item",{"expression":[16],"canRemove":[516,"can-remove"],"messagesBuilder":[1040],"entityURI":[1025,"entity-u-r-i"],"_showValueVariable":[32],"_fieldSelected":[32],"_optionNotNull":[32]}]]],["p-c78a80ae",[[2,"snk-filter-assistent-mode",{"filterAssistent":[1040],"messagesBuilder":[1040],"filterId":[1025,"filter-id"],"entityUri":[1025,"entity-uri"],"application":[1040]}],[2,"snk-filter-advanced-mode",{"filterAssistent":[1040],"application":[1040]}]]],["p-e60325bc",[[2,"snk-personalized-filter",{"messagesBuilder":[1040],"entityUri":[1025,"entity-uri"],"filterId":[1025,"filter-id"],"configName":[1025,"config-name"],"resourceID":[1,"resource-i-d"],"_filterAssistentMode":[32],"_filterAssistent":[32],"createPersonalizedFilter":[64]}]]],["p-6d765e32",[[2,"snk-filter-bar",{"dataUnit":[1040],"configName":[1,"config-name"],"resourceID":[1,"resource-i-d"],"filterConfig":[1040],"messagesBuilder":[1040],"allowDefault":[32],"scrollerLocked":[32],"showPersonalizedFilter":[32],"personalizedFilterId":[32],"reload":[64]},[[0,"filterChange","filterChangeListener"]]]]],["p-bd628455",[[2,"snk-config-options",{"fieldConfig":[16],"idConfig":[513,"id-config"],"dataUnit":[16],"messagesBuilder":[1040],"_defaultType":[32]}]]],["p-f30526a7",[[2,"snk-field-config",{"isConfigActive":[16],"fieldConfig":[16],"modeInsertion":[516,"mode-insertion"],"dataUnit":[16],"messagesBuilder":[1040]}]]],["p-d3ec3586",[[6,"snk-tab-config",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"tabItems":[16],"messagesBuilder":[1040],"_processedTabs":[32],"_activeEditText":[32],"_activeEditTextIndex":[32],"_actionsHide":[32],"_actionsShow":[32]}]]],["p-80692cbd",[[2,"snk-form-config",{"dataUnit":[16],"configManager":[16],"messagesBuilder":[1040],"_formConfigOptions":[32],"_fieldConfigSelected":[32],"_layoutFormConfig":[32],"_fieldsAvailable":[32],"_formConfig":[32],"_formConfigChanged":[32],"_optionFormConfigSelected":[32],"_optionFormConfigChanged":[32],"_tempGroups":[32]}]]],["p-838f8234",[[1,"snk-select-box",{"selectedOption":[1,"selected-option"]}]]],["p-47e4b6c9",[[2,"snk-grid-config",{"selectedIndex":[1026,"selected-index"],"application":[16],"columns":[1040],"config":[1040],"configName":[1,"config-name"],"resourceID":[1,"resource-i-d"]}]]],["p-b3dc25aa",[[0,"snk-filter-item",{"config":[1040],"getMessage":[16],"detailIsVisible":[32],"showUp":[64],"hideDetail":[64]},[[2,"click","clickListener"],[2,"mousedown","mouseDownListener"],[0,"filterChange","filterChangeListener"]]]]],["p-3eb28447",[[2,"snk-data-unit",{"dataState":[1040],"messagesBuilder":[1040],"dataUnitName":[1,"data-unit-name"],"entityName":[1,"entity-name"],"pageSize":[2,"page-size"],"dataUnit":[1040],"beforeSave":[16],"afterSave":[16],"useCancelConfirm":[4,"use-cancel-confirm"],"ignoreSaveMessage":[4,"ignore-save-message"],"configName":[1,"config-name"],"resourceID":[1,"resource-i-d"],"getDataUnit":[64],"getSelectedRecordsIDsInfo":[64]}]]],["p-219f888d",[[0,"snk-exporter-email-sender",{"getMessage":[16],"_config":[32],"_opened":[32],"_currentStep":[32],"open":[64],"close":[64]}]]],["p-54e3e05c",[[2,"snk-data-exporter",{"provider":[16],"messagesBuilder":[1040],"_items":[32],"_showDropdown":[32],"_releasedToExport":[32]}]]],["p-d4fb9642",[[6,"snk-taskbar",{"customSlotId":[1,"custom-slot-id"],"customContainerId":[1,"custom-container-id"],"configName":[1,"config-name"],"resourceID":[1,"resource-i-d"],"buttons":[1],"customButtons":[16],"actionsList":[16],"primaryButton":[1,"primary-button"],"disabledButtons":[16],"dataUnit":[16],"presentationMode":[1537,"presentation-mode"],"messagesBuilder":[1040],"_permissions":[32],"_customElements":[32],"_customElementsId":[32],"_slotContainer":[32]}]]],["p-7dc44b05",[[6,"snk-grid",{"columnFilterDataSource":[1040],"configName":[1,"config-name"],"resourceID":[1,"resource-i-d"],"selectionToastConfig":[16],"actionsList":[16],"isDetail":[4,"is-detail"],"taskbarManager":[16],"statusResolver":[16],"multipleSelection":[4,"multiple-selection"],"presentationMode":[1,"presentation-mode"],"messagesBuilder":[1040],"useEnterLikeTab":[4,"use-enter-like-tab"],"recordsValidator":[16],"canEdit":[4,"can-edit"],"taskbarCustomContainerId":[1,"taskbar-custom-container-id"],"gridHeaderCustomSlotId":[1,"grid-header-custom-slot-id"],"topTaskbarCustomSlotId":[1,"top-taskbar-custom-slot-id"],"_dataUnit":[32],"_dataState":[32],"_gridConfig":[32],"_popUpGridConfig":[32],"showConfig":[64],"hideConfig":[64],"setConfig":[64],"reloadFilterBar":[64]}]]],["p-cab6a969",[[6,"snk-guides-viewer",{"dataUnit":[16],"dataState":[16],"configName":[1,"config-name"],"entityPath":[1,"entity-path"],"actionsList":[16],"recordsValidator":[16],"masterFormConfig":[1040],"selectedGuide":[16],"taskbarManager":[16],"messagesBuilder":[1040],"canEdit":[4,"can-edit"],"presentationMode":[1,"presentation-mode"],"resourceID":[1,"resource-i-d"],"detailTaskbarCustomContainerId":[1,"detail-taskbar-custom-container-id"],"_breadcrumbItems":[32],"_guides":[32],"_formEditorConfigManager":[32],"_formEditorDataUnit":[32],"showFormConfig":[64]},[[2,"actionClick","onActionClick"],[0,"snkContentCardChanged","onContentCardChanged"]]]]],["p-7749c662",[[6,"snk-crud",{"configName":[1025,"config-name"],"selectionToastConfig":[16],"showActionButtons":[4,"show-action-buttons"],"actionsList":[16],"taskbarManager":[16],"recordsValidator":[16],"statusResolver":[16],"multipleSelection":[4,"multiple-selection"],"presentationMode":[1,"presentation-mode"],"messagesBuilder":[1040],"useEnterLikeTab":[4,"use-enter-like-tab"],"_dataUnit":[32],"_dataState":[32],"attachmentRegisterKey":[32],"_currentViewMode":[32],"_canEdit":[32],"_resourceID":[32],"customContainerId":[32],"goToView":[64],"openConfigurator":[64],"closeConfigurator":[64],"reloadFilterBar":[64]}]]],["p-06e76ed2",[[2,"snk-form",{"configName":[1,"config-name"],"recordsValidator":[16],"messagesBuilder":[1040],"resourceID":[1,"resource-i-d"],"_dataUnit":[32],"_dataState":[32],"_showFormConfig":[32],"_configManager":[32],"showConfig":[64],"hideConfig":[64]}]]],["p-3532eb1c",[[2,"snk-application",{"messagesBuilder":[1040],"configName":[1,"config-name"],"loadByPK":[16],"isUserSup":[64],"addPendingAction":[64],"callServiceBroker":[64],"initOnboarding":[64],"hasAccess":[64],"getAllAccess":[64],"getStringParam":[64],"getIntParam":[64],"getFloatParam":[64],"getBooleanParam":[64],"getDateParam":[64],"showPopUp":[64],"showModal":[64],"closeModal":[64],"closePopUp":[64],"temOpcional":[64],"getConfig":[64],"saveConfig":[64],"getAttributeFromHTMLWrapper":[64],"openApp":[64],"webConnection":[64],"createDataunit":[64],"updateDataunitCache":[64],"getDataUnit":[64],"addClientEvent":[64],"removeClientEvent":[64],"hasClientEvent":[64],"getResourceID":[64],"getUserID":[64],"alert":[64],"error":[64],"success":[64],"message":[64],"confirm":[64],"info":[64],"loadTotals":[64],"isLoadedByPk":[64],"executeSearch":[64],"executePreparedSearch":[64],"isDebugMode":[64],"getAppLabel":[64],"addSearchListener":[64],"importScript":[64],"getApplicationPath":[64],"executeSelectDistinct":[64],"getDataFetcher":[64]}]]],["p-651b4f89",[[6,"snk-simple-crud",{"dataState":[16],"dataUnit":[16],"mode":[2],"gridConfig":[16],"formConfig":[16],"multipleSelection":[4,"multiple-selection"],"useCancelConfirm":[4,"use-cancel-confirm"],"taskbarManager":[16],"messagesBuilder":[1040],"useEnterLikeTab":[4,"use-enter-like-tab"],"_currentViewMode":[32],"_config":[32],"goToView":[64],"setMetadata":[64],"setRecords":[64],"getRecords":[64]},[[0,"actionClick","actionClickListener"]]]]],["p-0383e477",[[2,"snk-attach",{"registerKey":[1,"register-key"],"entityName":[1,"entity-name"],"messagesBuilder":[1040],"dataUnit":[32],"crudConfig":[32]}]]],["p-26b0ce3e",[[2,"snk-form-summary",{"fixed":[1540],"contracted":[1540],"summary":[16]}]]],["p-c555075c",[[6,"snk-form-view",{"levelPath":[1,"level-path"],"label":[1],"name":[1],"fields":[16],"formMetadata":[8,"form-metadata"],"dataUnit":[16],"contracted":[4],"fixed":[1540],"summaryFields":[16],"canExpand":[4,"can-expand"],"canFix":[4,"can-fix"],"recordsValidator":[16],"showUp":[64]}]]],["p-47d20cb0",[[2,"snk-actions-button",{"_items":[32],"_showDropdown":[32],"_actions":[32],"_isOrderActions":[32]}]]]]'),e)));
|
@@ -291,6 +291,7 @@ export declare class SnkApplication {
|
|
291
291
|
private pkChangeListener;
|
292
292
|
private getResourceIdFromToken;
|
293
293
|
private defaultLoadByPK;
|
294
|
+
private loadDataWithPKFilter;
|
294
295
|
private getFirstDataUnitFromDOM;
|
295
296
|
private getFilterParamsFromPkObject;
|
296
297
|
private getDefaultDataTypeLoadByPK;
|
@@ -299,6 +300,7 @@ export declare class SnkApplication {
|
|
299
300
|
private newVersionPopupEventListener;
|
300
301
|
private handleShowNewVersionPopup;
|
301
302
|
private hasToShowNewVersionPopup;
|
303
|
+
private registerPkChangeListener;
|
302
304
|
componentWillLoad(): void;
|
303
305
|
connectedCallback(): void;
|
304
306
|
disconnectedCallback(): void;
|