@sankhyalabs/sankhyablocks 8.16.0-dev.67 → 8.16.0-dev.68
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/snk-application.cjs.entry.js +12 -14
- package/dist/collection/components/snk-application/snk-application.js +12 -14
- package/dist/components/snk-application2.js +12 -14
- package/dist/esm/snk-application.entry.js +12 -14
- package/dist/sankhyablocks/{p-0cda2226.entry.js → p-16cc8640.entry.js} +1 -1
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/package.json +1 -1
@@ -1428,7 +1428,7 @@ const SnkApplication = class {
|
|
1428
1428
|
try {
|
1429
1429
|
await this.checkTimeoutLimitLockManager();
|
1430
1430
|
await core.LockManager.whenHasLock(this._element, core.LockManagerOperation.APP_LOADING);
|
1431
|
-
await core.LockManager.whenResolve(this._element, core.LockManagerOperation.APP_LOADING,
|
1431
|
+
await core.LockManager.whenResolve(this._element, core.LockManagerOperation.APP_LOADING, 200);
|
1432
1432
|
await core.LockManager.resetLocks(this._element, core.LockManagerOperation.APP_LOADING);
|
1433
1433
|
this._applicationReady = true;
|
1434
1434
|
}
|
@@ -1468,19 +1468,17 @@ const SnkApplication = class {
|
|
1468
1468
|
}
|
1469
1469
|
// TODO: Etapa 2 - implementar template de loading
|
1470
1470
|
renderLoadingSkeleton(template) {
|
1471
|
-
if (this.enableLockManagerLoadingApp)
|
1472
|
-
|
1473
|
-
|
1474
|
-
|
1475
|
-
|
1476
|
-
|
1477
|
-
|
1478
|
-
|
1479
|
-
|
1480
|
-
|
1481
|
-
|
1482
|
-
return this.getSpinnerLoadingDefault();
|
1483
|
-
}
|
1471
|
+
if (!this.enableLockManagerLoadingApp)
|
1472
|
+
return;
|
1473
|
+
if (this._isBrowserTypeElectron) {
|
1474
|
+
return this.getSpinnerLoadingDefault();
|
1475
|
+
}
|
1476
|
+
switch (template) {
|
1477
|
+
case TEMPLATES_LOADING_SKELETON.APPLICATION:
|
1478
|
+
case TEMPLATES_LOADING_SKELETON.GRID:
|
1479
|
+
return this.getSkeletonTemplateApplication();
|
1480
|
+
default:
|
1481
|
+
return this.getSkeletonTemplateApplication();
|
1484
1482
|
}
|
1485
1483
|
}
|
1486
1484
|
getLoadingVisibilityStyle() {
|
@@ -1063,7 +1063,7 @@ export class SnkApplication {
|
|
1063
1063
|
try {
|
1064
1064
|
await this.checkTimeoutLimitLockManager();
|
1065
1065
|
await LockManager.whenHasLock(this._element, LockManagerOperation.APP_LOADING);
|
1066
|
-
await LockManager.whenResolve(this._element, LockManagerOperation.APP_LOADING,
|
1066
|
+
await LockManager.whenResolve(this._element, LockManagerOperation.APP_LOADING, 200);
|
1067
1067
|
await LockManager.resetLocks(this._element, LockManagerOperation.APP_LOADING);
|
1068
1068
|
this._applicationReady = true;
|
1069
1069
|
}
|
@@ -1103,19 +1103,17 @@ export class SnkApplication {
|
|
1103
1103
|
}
|
1104
1104
|
// TODO: Etapa 2 - implementar template de loading
|
1105
1105
|
renderLoadingSkeleton(template) {
|
1106
|
-
if (this.enableLockManagerLoadingApp)
|
1107
|
-
|
1108
|
-
|
1109
|
-
|
1110
|
-
|
1111
|
-
|
1112
|
-
|
1113
|
-
|
1114
|
-
|
1115
|
-
|
1116
|
-
|
1117
|
-
return this.getSpinnerLoadingDefault();
|
1118
|
-
}
|
1106
|
+
if (!this.enableLockManagerLoadingApp)
|
1107
|
+
return;
|
1108
|
+
if (this._isBrowserTypeElectron) {
|
1109
|
+
return this.getSpinnerLoadingDefault();
|
1110
|
+
}
|
1111
|
+
switch (template) {
|
1112
|
+
case TEMPLATES_LOADING_SKELETON.APPLICATION:
|
1113
|
+
case TEMPLATES_LOADING_SKELETON.GRID:
|
1114
|
+
return this.getSkeletonTemplateApplication();
|
1115
|
+
default:
|
1116
|
+
return this.getSkeletonTemplateApplication();
|
1119
1117
|
}
|
1120
1118
|
}
|
1121
1119
|
getLoadingVisibilityStyle() {
|
@@ -1420,7 +1420,7 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
1420
1420
|
try {
|
1421
1421
|
await this.checkTimeoutLimitLockManager();
|
1422
1422
|
await LockManager.whenHasLock(this._element, LockManagerOperation.APP_LOADING);
|
1423
|
-
await LockManager.whenResolve(this._element, LockManagerOperation.APP_LOADING,
|
1423
|
+
await LockManager.whenResolve(this._element, LockManagerOperation.APP_LOADING, 200);
|
1424
1424
|
await LockManager.resetLocks(this._element, LockManagerOperation.APP_LOADING);
|
1425
1425
|
this._applicationReady = true;
|
1426
1426
|
}
|
@@ -1460,19 +1460,17 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
1460
1460
|
}
|
1461
1461
|
// TODO: Etapa 2 - implementar template de loading
|
1462
1462
|
renderLoadingSkeleton(template) {
|
1463
|
-
if (this.enableLockManagerLoadingApp)
|
1464
|
-
|
1465
|
-
|
1466
|
-
|
1467
|
-
|
1468
|
-
|
1469
|
-
|
1470
|
-
|
1471
|
-
|
1472
|
-
|
1473
|
-
|
1474
|
-
return this.getSpinnerLoadingDefault();
|
1475
|
-
}
|
1463
|
+
if (!this.enableLockManagerLoadingApp)
|
1464
|
+
return;
|
1465
|
+
if (this._isBrowserTypeElectron) {
|
1466
|
+
return this.getSpinnerLoadingDefault();
|
1467
|
+
}
|
1468
|
+
switch (template) {
|
1469
|
+
case TEMPLATES_LOADING_SKELETON.APPLICATION:
|
1470
|
+
case TEMPLATES_LOADING_SKELETON.GRID:
|
1471
|
+
return this.getSkeletonTemplateApplication();
|
1472
|
+
default:
|
1473
|
+
return this.getSkeletonTemplateApplication();
|
1476
1474
|
}
|
1477
1475
|
}
|
1478
1476
|
getLoadingVisibilityStyle() {
|
@@ -1424,7 +1424,7 @@ const SnkApplication = class {
|
|
1424
1424
|
try {
|
1425
1425
|
await this.checkTimeoutLimitLockManager();
|
1426
1426
|
await LockManager.whenHasLock(this._element, LockManagerOperation.APP_LOADING);
|
1427
|
-
await LockManager.whenResolve(this._element, LockManagerOperation.APP_LOADING,
|
1427
|
+
await LockManager.whenResolve(this._element, LockManagerOperation.APP_LOADING, 200);
|
1428
1428
|
await LockManager.resetLocks(this._element, LockManagerOperation.APP_LOADING);
|
1429
1429
|
this._applicationReady = true;
|
1430
1430
|
}
|
@@ -1464,19 +1464,17 @@ const SnkApplication = class {
|
|
1464
1464
|
}
|
1465
1465
|
// TODO: Etapa 2 - implementar template de loading
|
1466
1466
|
renderLoadingSkeleton(template) {
|
1467
|
-
if (this.enableLockManagerLoadingApp)
|
1468
|
-
|
1469
|
-
|
1470
|
-
|
1471
|
-
|
1472
|
-
|
1473
|
-
|
1474
|
-
|
1475
|
-
|
1476
|
-
|
1477
|
-
|
1478
|
-
return this.getSpinnerLoadingDefault();
|
1479
|
-
}
|
1467
|
+
if (!this.enableLockManagerLoadingApp)
|
1468
|
+
return;
|
1469
|
+
if (this._isBrowserTypeElectron) {
|
1470
|
+
return this.getSpinnerLoadingDefault();
|
1471
|
+
}
|
1472
|
+
switch (template) {
|
1473
|
+
case TEMPLATES_LOADING_SKELETON.APPLICATION:
|
1474
|
+
case TEMPLATES_LOADING_SKELETON.GRID:
|
1475
|
+
return this.getSkeletonTemplateApplication();
|
1476
|
+
default:
|
1477
|
+
return this.getSkeletonTemplateApplication();
|
1480
1478
|
}
|
1481
1479
|
}
|
1482
1480
|
getLoadingVisibilityStyle() {
|
@@ -8,4 +8,4 @@ import{r as t,c as i,h as e,H as s,g as n}from"./p-d2d301a6.js";import{DateUtils
|
|
8
8
|
name
|
9
9
|
value
|
10
10
|
}
|
11
|
-
}`)}fetchTotals(t,i,e=[]){const s=`${t}_${i}`,n=this.cancel.findIndex((t=>t[s]));return n>=0&&(this.cancel[n][s](),this.cancel.splice(n,1)),Promise.race([new Promise((t=>this.cancel.push({[s]:t}))),this.getTotals(t,i,e)]).then((t=>{let i=new Map;if(t){i=t;const e=this.cancel.findIndex((t=>t[s]));e>=0&&this.cancel.splice(e,1)}return i}))}getTotals(t,i,e=[]){return new Promise(((s,n)=>{T.get().callGraphQL({query:this.templateByQuery.get("fetchTotals"),values:{name:`totals://${t}/${i}`,filters:e}}).then((t=>{if(t.length>0){const i=new Map;return t.forEach((t=>i.set(t.name,parseFloat(t.value)))),s(i)}return n("Não foi possível recuperar os totalizadores")})).catch(n)}))}}function q(){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(q=function(){return t})()}const B=H;function H(t,i){const e=q();return(H=function(t){return e[t-=392]})(t,i)}!function(){const t=H,i=q();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;i.push(i.shift())}catch(t){i.push(i.shift())}}();const K=B(396);var V;class G{static openAppActivity(t,i){var e;null===(e=window.workspace)||void 0===e||e.openAppActivity(t,i)}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 showDesktop(){var t,i;null===(i=null===(t=window.workspace)||void 0===t?void 0:t.showDesktop)||void 0===i||i.call(t)}static searchApp(){var t,i;null===(i=null===(t=window.workspace)||void 0===t?void 0:t.searchApp)||void 0===i||i.call(t)}static openHelp(){var t,i;null===(i=null===(t=window.workspace)||void 0===t?void 0:t.openHelp)||void 0===i||i.call(t)}static applicationClick(){var t,i;(null===(t=window.workspace)||void 0===t?void 0:t.applicationClick)&&(null===(i=window.workspace)||void 0===i||i.applicationClick())}}G.resourceID=null===(V=window.workspace)||void 0===V?void 0:V.resourceID;class W{constructor(t){this._app=t,window.addEventListener("error",(t=>this.errorHandler(t))),window.addEventListener("unhandledrejection",(t=>this.rejectionHandler(t)))}rejectionHandler(t){const i=t.reason;i instanceof c||(i?this.processException(i):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 c||t instanceof h?this._app.alert(t.title,t.message):t instanceof l?this._app.error(t.title,t.message):this._app.isDebugMode().then((i=>{if(i)if(t instanceof Error)this._app.error(t.name,t.message);else{const i=(null==t?void 0:t.title)||"Erro detectado",e="string"==typeof t?t:t.message||`Erro interno "${o.objectToString(t)}"`;this._app.error(i,e)}}))}}class J{constructor(){this._debounceTime=1500,this.requests=new Map,this.requestsLoadingBar=[]}onRequestStart(t){if(t.url.includes("quietMode=true"))return;this.requestsLoadingBar.push(t.requestId);const i=setTimeout((()=>{this.ezLoadingBar.show()}),this._debounceTime);this.requests.set(t.requestId,i)}onRequestEnd(t){var i,e,s;const n=this.requests.get(t.requestId);clearTimeout(n),(null===(i=this.requestsLoadingBar)||void 0===i?void 0:i.includes(t.requestId))&&(this.requestsLoadingBar=null===(e=this.requestsLoadingBar)||void 0===e?void 0:e.filter((i=>i!==t.requestId)),!this.requestsLoadingBar.length&&(null===(s=this.ezLoadingBar)||void 0===s||s.hide()))}}class Y{constructor(){this._debounceTime=1e3,this._ignoredNameTypes=["totals"],this._countRequest=0}onRequestStart(t){this.isIgnoreLoadingOnRequest(t)||(this._countRequest++,this.ezLoadingBar.show(),this._timerLoading&&clearTimeout(this._timerLoading))}onRequestEnd(t){this.isIgnoreLoadingOnRequest(t)||(this._countRequest--,this._timerLoading=setTimeout((()=>{this._countRequest<=0&&this.ezLoadingBar.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:i}=t.requestBody[0].variables;if(i){const t=i.split(":");return this._ignoredNameTypes.indexOf(t[0])>=0}}return!1}}class X{static create({strategy:t}){switch(t){case"request_name":return new Y;case"request_time":return new J;default:throw new Error("Strategy not found")}}}const Z=class{constructor(e){t(this,e),this.applicationLoaded=i(this,"applicationLoaded",7),this.applicationLoading=i(this,"applicationLoading",7),this.NEW_VERSION_POPUP_LOCKER="NEW_VERSION_POPUP_LOCKER",this._authPromises=[],this._keyboardManager=new u,this._waitingAppReady=new Array,this._duCache=new Map,this._duPromises=new Map,this._requestListener=X.create({strategy:"request_time"}),this._maxTimeLockAppLoading=1e4,this._isBrowserTypeElectron=!1,this._pendingActions=new Map,this._loadPkParameter=null,this._isLoadedByPk=!1,this._applicationReady=!1,this.enableLockManagerLoadingApp=void 0,this.messagesBuilder=void 0,this.configName=void 0,this.gridLegacyConfigName=void 0,this.formLegacyConfigName=void 0,this.loadByPK=void 0}async processPendingActions(t){const i=this._pendingActions.get(t);i&&i.length&&(i.forEach((t=>t())),this._pendingActions.set(t,[]))}get parameters(){return this._parameters||(this._parameters=new F),this._parameters}async getAuth(t){return null==t?this.getApplicationAuth():new Promise(((i,e)=>{this.authFetcher.getData(t).then((t=>{i(t)})).catch((t=>{e(t)}))}))}async getApplicationAuth(){return this._auth?Promise.resolve(this._auth):new Promise(((t,i)=>{const e=this._authPromises.length>0;this._authPromises.push(new Q(t,i)),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)}))}))}watchPropHandler(t,i){t&&this._loadPkParameter&&(this.loadByPK(this._loadPkParameter.pk,this._loadPkParameter.redirect),this._loadPkParameter=null)}async getKeyboardManager(){return Promise.resolve(this._keyboardManager)}async isUserSup(){return new Promise(((t,i)=>{this.getAuth().then((e=>{this.getAuthList(e).then((i=>{t(i.isSup)})).catch((t=>i(t)))}))}))}async addPendingAction(t,i){var e;const s=null!==(e=this._pendingActions.get(t))&&void 0!==e?e:[];this._pendingActions.set(t,[...s,i])}async callServiceBroker(t,i,e){return T.get().callServiceBroker(t,i,e)}async initOnboarding(t){this.hasToShowNewVersionPopup()?await this.addPendingAction(this.NEW_VERSION_POPUP_LOCKER,(()=>this.doInitOnboarding(t))):this.doInitOnboarding(t)}doInitOnboarding(t){d.getInstance().init(t,window.envContext)}async hasAccess(t,i){return new Promise(((e,s)=>{this.getAuth(i).then((i=>{this.getAuthList(i).then((i=>{e(i.isSup||i.actions[t])})).catch((t=>s(t)))}))}))}async getAllAccess(t){return new Promise(((i,e)=>{this.getAuth(t).then((t=>{this.getAuthList(t).then((t=>{const e={};e.isSup=t.isSup,Object.entries(L).forEach((i=>{e[i[0]]=t.actions[i[1]]||!1})),i(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,i="full",e=!0,s){this.clearContent(this._popUp),this._popUp.addEventListener("ezClosePopup",(()=>{s()}),{once:!0}),this._popUp.appendChild(t),this._popUp.opened=!0,this._popUp.heightMode=i,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}showAlerts(t){return I.showAlerts({alerts:t})}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 i=t.split(",");return new Promise(((t,e)=>{this.getAttributeFromHTMLWrapper("opc0009").then((s=>{"1"===s?t(!0):Promise.all(i.map((t=>this.getAttributeFromHTMLWrapper("opc"+t)))).then((i=>{t(i.includes("1"))})).catch((t=>{e(t)}))})).catch((t=>{e(t)}))}))}async getConfig(t){let i={serviceName:"SystemUtilsSP.getConf",requestBody:{config:{chave:t,tipo:"T"}}};return new Promise(((t,e)=>{T.get().callServiceBroker("SystemUtilsSP.getConf",JSON.stringify(i)).then((i=>{var e;return t(null===(e=i.config)||void 0===e?void 0:e.data)})).catch((t=>e(t)))}))}async saveConfig(t,i){let e={serviceName:"SystemUtilsSP.saveConf",requestBody:{config:{chave:t,tipo:"T",data:i}}};return new Promise(((t,i)=>{T.get().callServiceBroker("SystemUtilsSP.saveConf",JSON.stringify(e)).then((i=>t(i))).catch((t=>i(t)))}))}async getAttributeFromHTMLWrapper(t){return Promise.resolve(window[t])}async openApp(t,i){G.openAppActivity(t,i)}async webConnection(t,i,e){this.getStringParam(t).then((t=>{z.webConnectionCaller(t,i,e)}))}getDuPromissesStack(t){let i;return t&&(i=this._duPromises.get(t),i||(i=[],this._duPromises.set(t,i))),i||[]}async createDataunit(t,i,e,s,n){return null==n&&(n=this.applicationResourceID),new Promise(((r,a)=>{const o=this.getDuPromissesStack(i),c=o.length>0;if(o.push(new Q(r,a)),!c){const r=this.dataUnitFetcher.getDataUnit(t,n,e,s);r.loadMetadata().then((()=>{this.processResolveDataUnit(r,i,o)})).catch((t=>{for(;o.length>0;)o.pop().reject(t)}))}}))}processResolveDataUnit(t,i,e){for(i&&this.updateDataunitCache(void 0,i,t);e.length>0;)e.pop().resolve(t)}async updateDataunitCache(t,i,e){t&&this._duCache.delete(t),this._duCache.set(i,e)}async getDataUnit(t,i,e,s,n){return new Promise(((r,a)=>{const o=this._duCache.get(i);o?r(o):this.createDataunit(t,i,e,s,n).then((t=>{r(t)})).catch((t=>a(t)))}))}async addClientEvent(t,i){return new Promise((e=>{T.addClientEvent(t,i),e()}))}async removeClientEvent(t){return new Promise((i=>{T.removeClientEvent(t),i()}))}async hasClientEvent(t){return new Promise((i=>{i(T.hasClientEvent(t))}))}get applicationResourceID(){return this._applicationResourceID||(this._applicationResourceID=this.urlParams.get("workspaceResourceID")||this.urlParams.get("resourceID")||G.resourceID||"unknown.resource.id"),this._applicationResourceID}async getResourceID(){return Promise.resolve(this.applicationResourceID)}async getUserID(){return Promise.resolve(window.UID)}async alert(t,i,e,s){return I.alert(t,i,e,s)}async error(t,i,e,s){return I.error(t,i,e,s)}async success(t,i,e,s){return I.success(t,i,e,s)}async message(t,i,e,s){return I.message(t,i,e,s)}async confirm(t,i,e,s,n){return I.confirm(t,i,e,s,n)}async info(t,i){return I.info(t,i)}async loadTotals(t,i,e){return this.totalsFetcher.fetchTotals(t,i,e)}async isLoadedByPk(){return Promise.resolve(this._isLoadedByPk)}async preloadMangerRemoveRecord(t,i){const e=i.map((t=>({__record__id__:t})));N.removeRecords(t,e)}getCountSkeleton(t,i,e){let s=window.innerHeight-350;return e=e||20,Math.floor(s/(i+e))||1}async getAuthList(t){return await(new U).parseFromJSON(t)}get urlParams(){return this._urlParams||(this._urlParams=b.getQueryParams(location.search)),this._urlParams}getMessage(t,i){var e;return null===(e=this.messagesBuilder)||void 0===e?void 0:e.getMessage(t,i)}get dataUnitFetcher(){return this._dataUnitFetcher||(this._dataUnitFetcher=new E),this._dataUnitFetcher}get totalsFetcher(){return this._totalsFetcher||(this._totalsFetcher=new $),this._totalsFetcher}get pesquisaFetcher(){return this._pesquisaFetcher||(this._pesquisaFetcher=new D),this._pesquisaFetcher}get authFetcher(){return this._authFetcher||(this._authFetcher=new C),this._authFetcher}async executeSearch(t,i,e,s){const n=null==e?void 0:e.getField(i);if(n){const{mode:i,argument:r}=t,{ENTITYNAME:a,CODEFIELD:o,DESCRIPTIONFIELD:c,ROOTENTITY:h,DESCRIPTIONENTITY:l,ISHIERARCHYENTITY:u}=n.properties,d=n.dependencies;let m;const w={rootEntity:h,descriptionFieldName:c,codeFieldName:o,showInactives:!1,dataUnitId:e.dataUnitId};return null==d||d.filter((t=>t.masterFields)).forEach((t=>{var i;t.type===p.SEARCHING&&(null===(i=t.masterFields)||void 0===i?void 0:i.length)>0&&(m={expression:t.expression,params:t.masterFields.map((t=>{const i=e.getField(t),s=(null==i?void 0:i.dataType)||g.TEXT,n=e.getFieldValue(t);if(null==n)throw this.alert("Erro ao pesquisar",`É necessario informar o campo ${i.label} para executar a pesquisa.`),new Error(`É necessario informar o campo ${i.label} para executar a pesquisa.`);return{name:t,value:n,dataType:s}}))})})),this.executePreparedSearch(i,r,{entity:a,entityDescription:l,isHierarchyEntity:u,criteria:m,searchOptions:w,allowsNonAnalytic:null==s?void 0:s.allowsNonAnalytic})}}filterInvalidFields(t,i,e){return t.fieldsMetadata.filter((s=>{let n=!a.isEmpty(i[s.fieldName])&&!1!==s.visible&&"B"!==s.type&&t.pkField!==s.fieldName&&t.descriptionField!==s.fieldName&&(s.isPrimaryKey||!s.isLinkField)&&!("S"===s.type&&"H"===s.presentationType);return n&&(e[s.fieldName]=s),("string"!=typeof i[s.fieldName]||!(i[s.fieldName].indexOf("<img")>-1||i[s.fieldName].indexOf("<svg")>-1))&&n}))}filterMathFields(t,i,e,s){return t&&Array.isArray(t)&&t.forEach((t=>{let e=m.removeReference(i,s[t]);e&&i.unshift(e)})),i=i.slice(0,e)}builOptionItem(t,i,e,s,n){var r;return{value:a.highlightValue(t,i.__matchFields,null===(r=i[n])||void 0===r?void 0:r.toString(),e,!0),label:s?a.highlightValue(t,i.__matchFields,i[s],e,!0):"",details:w.buildDetails(t,e,i)}}async executePreparedSearch(t,i,e){const s={},{entity:n,entityDescription:r,criteria:a,searchOptions:c,isHierarchyEntity:h,allowsNonAnalytic:l}=e;return new Promise("ADVANCED"===t?(t,e)=>{const s=document.createElement("snk-pesquisa");s[y.DATA_ELEMENT_ID_ATTRIBUTE_NAME]=`entity_${n}`,s.entityName=n,s.argument=i,s.searchLoader=t=>this.pesquisaFetcher.loadAdvancedSearch(n,t,a,c),s.isHierarchyEntity=h,h&&(s.treeLoader=t=>this.pesquisaFetcher.loadTree(n,t,a,c),s.allowsNonAnalytic=l),s.selectItem=i=>{t(i),this.clearPopUpTitle(),this.closePopUp()},this.setPopUpTitle(r),this.showPopUp(s,void 0,void 0,e)}:(t,e)=>{this.pesquisaFetcher.loadAdvancedSearch(n,i,a,c).then((e=>{let n=(e=o.stringToObject(e.json.$)).descriptionField,r=e.pkField;const a=[];e.data.forEach((t=>{let o=this.filterInvalidFields(e,t,s),c=this.filterMathFields(t.__matchFields,o,6,s);a.push(this.builOptionItem(i,t,c,n,r))})),t(a)})).catch((t=>{e(t)}))})}async isDebugMode(){return new Promise((t=>{t(window.isDebugMode)}))}async getAppLabel(){return G.getAppLabel(this.applicationResourceID)}addSearchListener(t,i,e){return new Promise((s=>{s(this.pesquisaFetcher.addSearchListener(t,i.dataUnitId,e))}))}importScript(t){return new Promise((i=>{this.getApplicationPath().then((e=>{let s=[];Array.isArray(t)||(s=[t]),s.forEach((t=>{const i=document.createElement("script");i.src=`${e}/${t}`,i.async=!0,document.body.appendChild(i)})),i()}))}))}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,i,e){return this.dataUnitFetcher.loadSelectDistinct(t,i,e)}getDataFetcher(){return Promise.resolve(T.get())}async whenApplicationReady(){return f.getContextValue("__SNK__APPLICATION__LOADING__")?Promise.resolve(this):new Promise((t=>{this._waitingAppReady.push((()=>t(this)))}))}async setSearchFilterContext(t,i){f.setContextValue(`__SNK__APPLICATION__FILTER__CONTEXT(${t})__`,i)}clearContent(t){t&&Array.from(t.children).forEach((i=>{t.removeChild(i)}))}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 i=this.getResourceIdFromToken(),e=b.getPkObjectFromUrlToken(top.window.location.hash),s=window.redirectFrom;if(void 0===e)return;if((!s||-1===s.split("_")[0].indexOf(i.split("_")[0]))&&i!==this.applicationResourceID)return;const n={pk:e};if(this._isLoadedByPk=!0,this.loadByPK)return this.loadByPK(n,s),void(this._currentPkParameter=t);this._loadPkParameter={pk:n,redirect:s},this.defaultLoadByPK(n,t)}getResourceIdFromToken(){return top.window.location.pathname.indexOf("tabContent.jsp")>-1?b.getResourceIdFromUrlToken(window.location.generateHash(window.location.hash)):b.getResourceIdFromUrlToken(top.window.location.hash)}defaultLoadByPK(t,i){if(!(null==t?void 0:t.pk))return;const e=this.getFirstDataUnitFromDOM(),s=e.dataUnit;if(!s)return console.warn("Dataunit não inicializado"),void e.addEventListener("dataUnitReady",(e=>{this.loadDataWithPKFilter(t,e.detail),this._currentPkParameter=i}));this.loadDataWithPKFilter(t,s),this._currentPkParameter=i}loadDataWithPKFilter(t,i){const e={term:"",filter:{name:"LOAD_BY_PK_FILTER",expression:this.buildFilterExpressionByPkObject(t),params:this.getFilterParamsFromPkObject(t,i)}};i.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,i){var e;const s=[];for(const n in t.pk)t.pk.hasOwnProperty(n)&&!Array.isArray(t.pk[n])&&s.push({name:n,dataType:(null===(e=i.getField(n))||void 0===e?void 0:e.dataType)||this.getDefaultDataTypeLoadByPK(t.pk[n]),value:t.pk[n]});return s}getDefaultDataTypeLoadByPK(t){return"number"==typeof t||t instanceof Number?g.NUMBER:"boolean"==typeof t||t instanceof Boolean?g.BOOLEAN:t instanceof Date?g.DATE:g.TEXT}buildFilterExpressionByPkObject(t){let i="";for(const e in t.pk)a.isEmpty(i)||(i+=" AND "),Array.isArray(t.pk[e])?i+=`${e} IN (${t.pk[e].toString()})`:i+=`${e} = :${e}`;return i}async showNewVersionPopup(){const t=document.createElement("ez-modal-container"),i=await this.getAppLabel();t.modalTitle=this.getMessage("snkApplication.newVersionPopup.title",{screenName:i}),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 s=await I.showPopup({content:t});this._removeVersionLayoutPopup=async()=>{await s(),await this.processPendingActions(this.NEW_VERSION_POPUP_LOCKER)}}async newVersionPopupEventListener(t){"LOAD"!==t.detail&&("OK"===t.detail&&G.setScreenToUseV3Layout(),"CANCEL"===t.detail&&G.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(){f.setContextValue("__SNK__APPLICATION__LOADING__",!0),this._errorHandler=new W(this),this.messagesBuilder=new O,f.setContextValue("__EZUI__UPLOAD__ADD__URL__",`${b.getUrlBase()}/mge/upload/file`),f.setContextValue("__EZUI__SEARCH__OPTION__LOADER__",((t,i,e,s)=>this.executeSearch(t,i,e,s))),f.setContextValue("__EZUI__GRID_LICENSE__",K),this.registerPkChangeListener(),v.init(),k.preload(this.applicationResourceID,this.configName,{gridLegacyConfig:this.gridLegacyConfigName,formLegacyConfig:this.formLegacyConfigName}),document.addEventListener("click",(()=>G.applicationClick())),this._waitingAppReady.forEach((t=>t()))}connectedCallback(){this._isBrowserTypeElectron=P.isElectron(),f.setContextValue("__SNK__APPLICATION__",this),T.addRequestListener(this._requestListener)}disconnectedCallback(){null==T||T.removeRequestListener(this._requestListener),this.removeShortcuts(),this._lockManagerTimer&&clearTimeout(this._lockManagerTimer)}async componentDidLoad(){this.applicationLoading.emit(!0),window.requestAnimationFrame((()=>{f.setContextValue("__SNK__APPLICATION__LOADING__",!1),this.applicationLoaded.emit(!0),this.pkChangeListener()})),y.addIDInfo(this._element,`resource_${this.applicationResourceID}`),await this.handleShowNewVersionPopup(),this.initKeyboardManager(),this.enableLockManagerLoadingApp?(_.addLockManagerCtxId(this._element),this.resolveApplicationReady()):this._applicationReady=!0}async markToReload(){this.enableLockManagerLoadingApp&&(this._applicationReady=!1,await _.resetLocks(this._element,A.APP_LOADING),this.resolveApplicationReady())}async addLoadingLock(t=!1){if(this.enableLockManagerLoadingApp)return t&&(this._applicationReady=!1,await _.resetLocks(this._element,A.APP_LOADING)),this.resolveApplicationReady(),await _.lock(this._element,A.APP_LOADING)}async resolveApplicationReady(){if(!this._applicationReady)try{await this.checkTimeoutLimitLockManager(),await _.whenHasLock(this._element,A.APP_LOADING),await _.whenResolve(this._element,A.APP_LOADING,1200),await _.resetLocks(this._element,A.APP_LOADING),this._applicationReady=!0}catch(t){console.warn(t),this._applicationReady=!0}}stopTimeoutLockManager(){this._lockManagerTimer&&clearTimeout(this._lockManagerTimer)}async checkTimeoutLimitLockManager(){this.stopTimeoutLockManager(),this._applicationReady||(this._lockManagerTimer=setTimeout((async()=>{this._applicationReady||(await _.resetLocks(this._element,A.APP_LOADING),this.stopTimeoutLockManager(),this._applicationReady=!0)}),this._maxTimeLockAppLoading))}initKeyboardManager(){this._keyboardManager.bind("ctrl + g",G.searchApp.bind(this),{description:"Pesquisar por telas"}).bind("ctrl + d",G.showDesktop.bind(this),{description:"Mostrar o desktop"}).bind("F1",G.openHelp.bind(this),{description:"Abrir ajuda"})}removeShortcuts(){this._keyboardManager.unbind("ctrl + g").unbind("ctrl + d").unbind("F1")}renderLoadingSkeleton(t){if(this.enableLockManagerLoadingApp)return this._isBrowserTypeElectron?this.getSpinnerLoadingDefault():this.getSkeletonTemplateApplication()}getLoadingVisibilityStyle(){return{visibility:this._applicationReady?"hidden":"initial",display:this._applicationReady?"none":"unset"}}getSkeletonTemplateApplication(){return e("div",{class:"loading-hidden",style:this.getLoadingVisibilityStyle()},e("div",{class:"ez-margin--medium ez-margin-top--extra-small"},e("ez-skeleton",{count:1,variant:"rect",width:"100%",height:"150px",animation:"progress"})),e("div",{class:"ez-flex ez-flex--align-items-stretch skeleton-content"},e("div",{class:"skeleton-content-left ez-margin--medium"},e("ez-skeleton",{count:1,variant:"rect",width:"100%",height:"calc(100% - 15px)",animation:"progress",marginBottom:"20px"})),e("div",{class:"ez-flex-item--auto skeleton-content-right ez-margin--medium"},e("ez-skeleton",{count:this.getCountSkeleton("skeleton-content-right",50,20),variant:"rect",width:"100%",height:"49px",animation:"progress",marginBottom:"20px"}))),e("div",{class:"skeleton-content-footer ez-margin--medium ez-margin-top--extra-small"},e("ez-skeleton",{count:1,variant:"rect",width:"100%",height:"100px",animation:"progress"})))}getSpinnerLoadingDefault(){return e("div",{class:"loading-hidden",style:this.getLoadingVisibilityStyle()},e("div",{class:"ez-flex ez-size-height--full ez-size-width--full ez-flex--justify-center ez-flex--align-items-center spinner"},e("ez-icon",{iconName:"sync",size:"x-large",class:"spin"}),e("span",{class:"ez-title ez-title--secondary ez-title--extra-large"},"Carregando...")))}render(){return e(s,{style:{visibility:!this.enableLockManagerLoadingApp||this._applicationReady?"unset":"hidden",overflow:!this.enableLockManagerLoadingApp||this._applicationReady?"unset":"hidden"}},e("div",null,e("ez-loading-bar",{ref:t=>this._requestListener.ezLoadingBar=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}),this.renderLoadingSkeleton()))}get _element(){return n(this)}static get watchers(){return{loadByPK:["watchPropHandler"]}}};class Q{constructor(t,i){this.resolve=t,this.reject=i}}var tt;!function(t){t[t.APPLICATION=1]="APPLICATION",t[t.GRID=2]="GRID"}(tt||(tt={})),Z.style=".sc-snk-application-h{display:flex;flex-direction:column;height:100%}.sc-snk-application-h>.loading-hidden.sc-snk-application{display:none;pointer-events:none}.skeleton-content-left.sc-snk-application{width:300px;padding-right:5px}.skeleton-content.sc-snk-application{height:calc(100vh - 310px)}.spinner.sc-snk-application{height:100vh;gap:10px}.spinner.sc-snk-application>.spin.sc-snk-application{animation-name:spin;animation-duration:5000ms;animation-iteration-count:infinite;animation-timing-function:linear}@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}";export{Z as snk_application}
|
11
|
+
}`)}fetchTotals(t,i,e=[]){const s=`${t}_${i}`,n=this.cancel.findIndex((t=>t[s]));return n>=0&&(this.cancel[n][s](),this.cancel.splice(n,1)),Promise.race([new Promise((t=>this.cancel.push({[s]:t}))),this.getTotals(t,i,e)]).then((t=>{let i=new Map;if(t){i=t;const e=this.cancel.findIndex((t=>t[s]));e>=0&&this.cancel.splice(e,1)}return i}))}getTotals(t,i,e=[]){return new Promise(((s,n)=>{T.get().callGraphQL({query:this.templateByQuery.get("fetchTotals"),values:{name:`totals://${t}/${i}`,filters:e}}).then((t=>{if(t.length>0){const i=new Map;return t.forEach((t=>i.set(t.name,parseFloat(t.value)))),s(i)}return n("Não foi possível recuperar os totalizadores")})).catch(n)}))}}function q(){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(q=function(){return t})()}const B=H;function H(t,i){const e=q();return(H=function(t){return e[t-=392]})(t,i)}!function(){const t=H,i=q();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;i.push(i.shift())}catch(t){i.push(i.shift())}}();const K=B(396);var V;class G{static openAppActivity(t,i){var e;null===(e=window.workspace)||void 0===e||e.openAppActivity(t,i)}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 showDesktop(){var t,i;null===(i=null===(t=window.workspace)||void 0===t?void 0:t.showDesktop)||void 0===i||i.call(t)}static searchApp(){var t,i;null===(i=null===(t=window.workspace)||void 0===t?void 0:t.searchApp)||void 0===i||i.call(t)}static openHelp(){var t,i;null===(i=null===(t=window.workspace)||void 0===t?void 0:t.openHelp)||void 0===i||i.call(t)}static applicationClick(){var t,i;(null===(t=window.workspace)||void 0===t?void 0:t.applicationClick)&&(null===(i=window.workspace)||void 0===i||i.applicationClick())}}G.resourceID=null===(V=window.workspace)||void 0===V?void 0:V.resourceID;class W{constructor(t){this._app=t,window.addEventListener("error",(t=>this.errorHandler(t))),window.addEventListener("unhandledrejection",(t=>this.rejectionHandler(t)))}rejectionHandler(t){const i=t.reason;i instanceof c||(i?this.processException(i):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 c||t instanceof h?this._app.alert(t.title,t.message):t instanceof l?this._app.error(t.title,t.message):this._app.isDebugMode().then((i=>{if(i)if(t instanceof Error)this._app.error(t.name,t.message);else{const i=(null==t?void 0:t.title)||"Erro detectado",e="string"==typeof t?t:t.message||`Erro interno "${o.objectToString(t)}"`;this._app.error(i,e)}}))}}class J{constructor(){this._debounceTime=1500,this.requests=new Map,this.requestsLoadingBar=[]}onRequestStart(t){if(t.url.includes("quietMode=true"))return;this.requestsLoadingBar.push(t.requestId);const i=setTimeout((()=>{this.ezLoadingBar.show()}),this._debounceTime);this.requests.set(t.requestId,i)}onRequestEnd(t){var i,e,s;const n=this.requests.get(t.requestId);clearTimeout(n),(null===(i=this.requestsLoadingBar)||void 0===i?void 0:i.includes(t.requestId))&&(this.requestsLoadingBar=null===(e=this.requestsLoadingBar)||void 0===e?void 0:e.filter((i=>i!==t.requestId)),!this.requestsLoadingBar.length&&(null===(s=this.ezLoadingBar)||void 0===s||s.hide()))}}class Y{constructor(){this._debounceTime=1e3,this._ignoredNameTypes=["totals"],this._countRequest=0}onRequestStart(t){this.isIgnoreLoadingOnRequest(t)||(this._countRequest++,this.ezLoadingBar.show(),this._timerLoading&&clearTimeout(this._timerLoading))}onRequestEnd(t){this.isIgnoreLoadingOnRequest(t)||(this._countRequest--,this._timerLoading=setTimeout((()=>{this._countRequest<=0&&this.ezLoadingBar.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:i}=t.requestBody[0].variables;if(i){const t=i.split(":");return this._ignoredNameTypes.indexOf(t[0])>=0}}return!1}}class X{static create({strategy:t}){switch(t){case"request_name":return new Y;case"request_time":return new J;default:throw new Error("Strategy not found")}}}const Z=class{constructor(e){t(this,e),this.applicationLoaded=i(this,"applicationLoaded",7),this.applicationLoading=i(this,"applicationLoading",7),this.NEW_VERSION_POPUP_LOCKER="NEW_VERSION_POPUP_LOCKER",this._authPromises=[],this._keyboardManager=new u,this._waitingAppReady=new Array,this._duCache=new Map,this._duPromises=new Map,this._requestListener=X.create({strategy:"request_time"}),this._maxTimeLockAppLoading=1e4,this._isBrowserTypeElectron=!1,this._pendingActions=new Map,this._loadPkParameter=null,this._isLoadedByPk=!1,this._applicationReady=!1,this.enableLockManagerLoadingApp=void 0,this.messagesBuilder=void 0,this.configName=void 0,this.gridLegacyConfigName=void 0,this.formLegacyConfigName=void 0,this.loadByPK=void 0}async processPendingActions(t){const i=this._pendingActions.get(t);i&&i.length&&(i.forEach((t=>t())),this._pendingActions.set(t,[]))}get parameters(){return this._parameters||(this._parameters=new F),this._parameters}async getAuth(t){return null==t?this.getApplicationAuth():new Promise(((i,e)=>{this.authFetcher.getData(t).then((t=>{i(t)})).catch((t=>{e(t)}))}))}async getApplicationAuth(){return this._auth?Promise.resolve(this._auth):new Promise(((t,i)=>{const e=this._authPromises.length>0;this._authPromises.push(new Q(t,i)),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)}))}))}watchPropHandler(t,i){t&&this._loadPkParameter&&(this.loadByPK(this._loadPkParameter.pk,this._loadPkParameter.redirect),this._loadPkParameter=null)}async getKeyboardManager(){return Promise.resolve(this._keyboardManager)}async isUserSup(){return new Promise(((t,i)=>{this.getAuth().then((e=>{this.getAuthList(e).then((i=>{t(i.isSup)})).catch((t=>i(t)))}))}))}async addPendingAction(t,i){var e;const s=null!==(e=this._pendingActions.get(t))&&void 0!==e?e:[];this._pendingActions.set(t,[...s,i])}async callServiceBroker(t,i,e){return T.get().callServiceBroker(t,i,e)}async initOnboarding(t){this.hasToShowNewVersionPopup()?await this.addPendingAction(this.NEW_VERSION_POPUP_LOCKER,(()=>this.doInitOnboarding(t))):this.doInitOnboarding(t)}doInitOnboarding(t){d.getInstance().init(t,window.envContext)}async hasAccess(t,i){return new Promise(((e,s)=>{this.getAuth(i).then((i=>{this.getAuthList(i).then((i=>{e(i.isSup||i.actions[t])})).catch((t=>s(t)))}))}))}async getAllAccess(t){return new Promise(((i,e)=>{this.getAuth(t).then((t=>{this.getAuthList(t).then((t=>{const e={};e.isSup=t.isSup,Object.entries(L).forEach((i=>{e[i[0]]=t.actions[i[1]]||!1})),i(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,i="full",e=!0,s){this.clearContent(this._popUp),this._popUp.addEventListener("ezClosePopup",(()=>{s()}),{once:!0}),this._popUp.appendChild(t),this._popUp.opened=!0,this._popUp.heightMode=i,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}showAlerts(t){return I.showAlerts({alerts:t})}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 i=t.split(",");return new Promise(((t,e)=>{this.getAttributeFromHTMLWrapper("opc0009").then((s=>{"1"===s?t(!0):Promise.all(i.map((t=>this.getAttributeFromHTMLWrapper("opc"+t)))).then((i=>{t(i.includes("1"))})).catch((t=>{e(t)}))})).catch((t=>{e(t)}))}))}async getConfig(t){let i={serviceName:"SystemUtilsSP.getConf",requestBody:{config:{chave:t,tipo:"T"}}};return new Promise(((t,e)=>{T.get().callServiceBroker("SystemUtilsSP.getConf",JSON.stringify(i)).then((i=>{var e;return t(null===(e=i.config)||void 0===e?void 0:e.data)})).catch((t=>e(t)))}))}async saveConfig(t,i){let e={serviceName:"SystemUtilsSP.saveConf",requestBody:{config:{chave:t,tipo:"T",data:i}}};return new Promise(((t,i)=>{T.get().callServiceBroker("SystemUtilsSP.saveConf",JSON.stringify(e)).then((i=>t(i))).catch((t=>i(t)))}))}async getAttributeFromHTMLWrapper(t){return Promise.resolve(window[t])}async openApp(t,i){G.openAppActivity(t,i)}async webConnection(t,i,e){this.getStringParam(t).then((t=>{z.webConnectionCaller(t,i,e)}))}getDuPromissesStack(t){let i;return t&&(i=this._duPromises.get(t),i||(i=[],this._duPromises.set(t,i))),i||[]}async createDataunit(t,i,e,s,n){return null==n&&(n=this.applicationResourceID),new Promise(((r,a)=>{const o=this.getDuPromissesStack(i),c=o.length>0;if(o.push(new Q(r,a)),!c){const r=this.dataUnitFetcher.getDataUnit(t,n,e,s);r.loadMetadata().then((()=>{this.processResolveDataUnit(r,i,o)})).catch((t=>{for(;o.length>0;)o.pop().reject(t)}))}}))}processResolveDataUnit(t,i,e){for(i&&this.updateDataunitCache(void 0,i,t);e.length>0;)e.pop().resolve(t)}async updateDataunitCache(t,i,e){t&&this._duCache.delete(t),this._duCache.set(i,e)}async getDataUnit(t,i,e,s,n){return new Promise(((r,a)=>{const o=this._duCache.get(i);o?r(o):this.createDataunit(t,i,e,s,n).then((t=>{r(t)})).catch((t=>a(t)))}))}async addClientEvent(t,i){return new Promise((e=>{T.addClientEvent(t,i),e()}))}async removeClientEvent(t){return new Promise((i=>{T.removeClientEvent(t),i()}))}async hasClientEvent(t){return new Promise((i=>{i(T.hasClientEvent(t))}))}get applicationResourceID(){return this._applicationResourceID||(this._applicationResourceID=this.urlParams.get("workspaceResourceID")||this.urlParams.get("resourceID")||G.resourceID||"unknown.resource.id"),this._applicationResourceID}async getResourceID(){return Promise.resolve(this.applicationResourceID)}async getUserID(){return Promise.resolve(window.UID)}async alert(t,i,e,s){return I.alert(t,i,e,s)}async error(t,i,e,s){return I.error(t,i,e,s)}async success(t,i,e,s){return I.success(t,i,e,s)}async message(t,i,e,s){return I.message(t,i,e,s)}async confirm(t,i,e,s,n){return I.confirm(t,i,e,s,n)}async info(t,i){return I.info(t,i)}async loadTotals(t,i,e){return this.totalsFetcher.fetchTotals(t,i,e)}async isLoadedByPk(){return Promise.resolve(this._isLoadedByPk)}async preloadMangerRemoveRecord(t,i){const e=i.map((t=>({__record__id__:t})));N.removeRecords(t,e)}getCountSkeleton(t,i,e){let s=window.innerHeight-350;return e=e||20,Math.floor(s/(i+e))||1}async getAuthList(t){return await(new U).parseFromJSON(t)}get urlParams(){return this._urlParams||(this._urlParams=b.getQueryParams(location.search)),this._urlParams}getMessage(t,i){var e;return null===(e=this.messagesBuilder)||void 0===e?void 0:e.getMessage(t,i)}get dataUnitFetcher(){return this._dataUnitFetcher||(this._dataUnitFetcher=new E),this._dataUnitFetcher}get totalsFetcher(){return this._totalsFetcher||(this._totalsFetcher=new $),this._totalsFetcher}get pesquisaFetcher(){return this._pesquisaFetcher||(this._pesquisaFetcher=new D),this._pesquisaFetcher}get authFetcher(){return this._authFetcher||(this._authFetcher=new C),this._authFetcher}async executeSearch(t,i,e,s){const n=null==e?void 0:e.getField(i);if(n){const{mode:i,argument:r}=t,{ENTITYNAME:a,CODEFIELD:o,DESCRIPTIONFIELD:c,ROOTENTITY:h,DESCRIPTIONENTITY:l,ISHIERARCHYENTITY:u}=n.properties,d=n.dependencies;let m;const w={rootEntity:h,descriptionFieldName:c,codeFieldName:o,showInactives:!1,dataUnitId:e.dataUnitId};return null==d||d.filter((t=>t.masterFields)).forEach((t=>{var i;t.type===p.SEARCHING&&(null===(i=t.masterFields)||void 0===i?void 0:i.length)>0&&(m={expression:t.expression,params:t.masterFields.map((t=>{const i=e.getField(t),s=(null==i?void 0:i.dataType)||g.TEXT,n=e.getFieldValue(t);if(null==n)throw this.alert("Erro ao pesquisar",`É necessario informar o campo ${i.label} para executar a pesquisa.`),new Error(`É necessario informar o campo ${i.label} para executar a pesquisa.`);return{name:t,value:n,dataType:s}}))})})),this.executePreparedSearch(i,r,{entity:a,entityDescription:l,isHierarchyEntity:u,criteria:m,searchOptions:w,allowsNonAnalytic:null==s?void 0:s.allowsNonAnalytic})}}filterInvalidFields(t,i,e){return t.fieldsMetadata.filter((s=>{let n=!a.isEmpty(i[s.fieldName])&&!1!==s.visible&&"B"!==s.type&&t.pkField!==s.fieldName&&t.descriptionField!==s.fieldName&&(s.isPrimaryKey||!s.isLinkField)&&!("S"===s.type&&"H"===s.presentationType);return n&&(e[s.fieldName]=s),("string"!=typeof i[s.fieldName]||!(i[s.fieldName].indexOf("<img")>-1||i[s.fieldName].indexOf("<svg")>-1))&&n}))}filterMathFields(t,i,e,s){return t&&Array.isArray(t)&&t.forEach((t=>{let e=m.removeReference(i,s[t]);e&&i.unshift(e)})),i=i.slice(0,e)}builOptionItem(t,i,e,s,n){var r;return{value:a.highlightValue(t,i.__matchFields,null===(r=i[n])||void 0===r?void 0:r.toString(),e,!0),label:s?a.highlightValue(t,i.__matchFields,i[s],e,!0):"",details:w.buildDetails(t,e,i)}}async executePreparedSearch(t,i,e){const s={},{entity:n,entityDescription:r,criteria:a,searchOptions:c,isHierarchyEntity:h,allowsNonAnalytic:l}=e;return new Promise("ADVANCED"===t?(t,e)=>{const s=document.createElement("snk-pesquisa");s[y.DATA_ELEMENT_ID_ATTRIBUTE_NAME]=`entity_${n}`,s.entityName=n,s.argument=i,s.searchLoader=t=>this.pesquisaFetcher.loadAdvancedSearch(n,t,a,c),s.isHierarchyEntity=h,h&&(s.treeLoader=t=>this.pesquisaFetcher.loadTree(n,t,a,c),s.allowsNonAnalytic=l),s.selectItem=i=>{t(i),this.clearPopUpTitle(),this.closePopUp()},this.setPopUpTitle(r),this.showPopUp(s,void 0,void 0,e)}:(t,e)=>{this.pesquisaFetcher.loadAdvancedSearch(n,i,a,c).then((e=>{let n=(e=o.stringToObject(e.json.$)).descriptionField,r=e.pkField;const a=[];e.data.forEach((t=>{let o=this.filterInvalidFields(e,t,s),c=this.filterMathFields(t.__matchFields,o,6,s);a.push(this.builOptionItem(i,t,c,n,r))})),t(a)})).catch((t=>{e(t)}))})}async isDebugMode(){return new Promise((t=>{t(window.isDebugMode)}))}async getAppLabel(){return G.getAppLabel(this.applicationResourceID)}addSearchListener(t,i,e){return new Promise((s=>{s(this.pesquisaFetcher.addSearchListener(t,i.dataUnitId,e))}))}importScript(t){return new Promise((i=>{this.getApplicationPath().then((e=>{let s=[];Array.isArray(t)||(s=[t]),s.forEach((t=>{const i=document.createElement("script");i.src=`${e}/${t}`,i.async=!0,document.body.appendChild(i)})),i()}))}))}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,i,e){return this.dataUnitFetcher.loadSelectDistinct(t,i,e)}getDataFetcher(){return Promise.resolve(T.get())}async whenApplicationReady(){return f.getContextValue("__SNK__APPLICATION__LOADING__")?Promise.resolve(this):new Promise((t=>{this._waitingAppReady.push((()=>t(this)))}))}async setSearchFilterContext(t,i){f.setContextValue(`__SNK__APPLICATION__FILTER__CONTEXT(${t})__`,i)}clearContent(t){t&&Array.from(t.children).forEach((i=>{t.removeChild(i)}))}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 i=this.getResourceIdFromToken(),e=b.getPkObjectFromUrlToken(top.window.location.hash),s=window.redirectFrom;if(void 0===e)return;if((!s||-1===s.split("_")[0].indexOf(i.split("_")[0]))&&i!==this.applicationResourceID)return;const n={pk:e};if(this._isLoadedByPk=!0,this.loadByPK)return this.loadByPK(n,s),void(this._currentPkParameter=t);this._loadPkParameter={pk:n,redirect:s},this.defaultLoadByPK(n,t)}getResourceIdFromToken(){return top.window.location.pathname.indexOf("tabContent.jsp")>-1?b.getResourceIdFromUrlToken(window.location.generateHash(window.location.hash)):b.getResourceIdFromUrlToken(top.window.location.hash)}defaultLoadByPK(t,i){if(!(null==t?void 0:t.pk))return;const e=this.getFirstDataUnitFromDOM(),s=e.dataUnit;if(!s)return console.warn("Dataunit não inicializado"),void e.addEventListener("dataUnitReady",(e=>{this.loadDataWithPKFilter(t,e.detail),this._currentPkParameter=i}));this.loadDataWithPKFilter(t,s),this._currentPkParameter=i}loadDataWithPKFilter(t,i){const e={term:"",filter:{name:"LOAD_BY_PK_FILTER",expression:this.buildFilterExpressionByPkObject(t),params:this.getFilterParamsFromPkObject(t,i)}};i.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,i){var e;const s=[];for(const n in t.pk)t.pk.hasOwnProperty(n)&&!Array.isArray(t.pk[n])&&s.push({name:n,dataType:(null===(e=i.getField(n))||void 0===e?void 0:e.dataType)||this.getDefaultDataTypeLoadByPK(t.pk[n]),value:t.pk[n]});return s}getDefaultDataTypeLoadByPK(t){return"number"==typeof t||t instanceof Number?g.NUMBER:"boolean"==typeof t||t instanceof Boolean?g.BOOLEAN:t instanceof Date?g.DATE:g.TEXT}buildFilterExpressionByPkObject(t){let i="";for(const e in t.pk)a.isEmpty(i)||(i+=" AND "),Array.isArray(t.pk[e])?i+=`${e} IN (${t.pk[e].toString()})`:i+=`${e} = :${e}`;return i}async showNewVersionPopup(){const t=document.createElement("ez-modal-container"),i=await this.getAppLabel();t.modalTitle=this.getMessage("snkApplication.newVersionPopup.title",{screenName:i}),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 s=await I.showPopup({content:t});this._removeVersionLayoutPopup=async()=>{await s(),await this.processPendingActions(this.NEW_VERSION_POPUP_LOCKER)}}async newVersionPopupEventListener(t){"LOAD"!==t.detail&&("OK"===t.detail&&G.setScreenToUseV3Layout(),"CANCEL"===t.detail&&G.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(){f.setContextValue("__SNK__APPLICATION__LOADING__",!0),this._errorHandler=new W(this),this.messagesBuilder=new O,f.setContextValue("__EZUI__UPLOAD__ADD__URL__",`${b.getUrlBase()}/mge/upload/file`),f.setContextValue("__EZUI__SEARCH__OPTION__LOADER__",((t,i,e,s)=>this.executeSearch(t,i,e,s))),f.setContextValue("__EZUI__GRID_LICENSE__",K),this.registerPkChangeListener(),v.init(),k.preload(this.applicationResourceID,this.configName,{gridLegacyConfig:this.gridLegacyConfigName,formLegacyConfig:this.formLegacyConfigName}),document.addEventListener("click",(()=>G.applicationClick())),this._waitingAppReady.forEach((t=>t()))}connectedCallback(){this._isBrowserTypeElectron=P.isElectron(),f.setContextValue("__SNK__APPLICATION__",this),T.addRequestListener(this._requestListener)}disconnectedCallback(){null==T||T.removeRequestListener(this._requestListener),this.removeShortcuts(),this._lockManagerTimer&&clearTimeout(this._lockManagerTimer)}async componentDidLoad(){this.applicationLoading.emit(!0),window.requestAnimationFrame((()=>{f.setContextValue("__SNK__APPLICATION__LOADING__",!1),this.applicationLoaded.emit(!0),this.pkChangeListener()})),y.addIDInfo(this._element,`resource_${this.applicationResourceID}`),await this.handleShowNewVersionPopup(),this.initKeyboardManager(),this.enableLockManagerLoadingApp?(_.addLockManagerCtxId(this._element),this.resolveApplicationReady()):this._applicationReady=!0}async markToReload(){this.enableLockManagerLoadingApp&&(this._applicationReady=!1,await _.resetLocks(this._element,A.APP_LOADING),this.resolveApplicationReady())}async addLoadingLock(t=!1){if(this.enableLockManagerLoadingApp)return t&&(this._applicationReady=!1,await _.resetLocks(this._element,A.APP_LOADING)),this.resolveApplicationReady(),await _.lock(this._element,A.APP_LOADING)}async resolveApplicationReady(){if(!this._applicationReady)try{await this.checkTimeoutLimitLockManager(),await _.whenHasLock(this._element,A.APP_LOADING),await _.whenResolve(this._element,A.APP_LOADING,200),await _.resetLocks(this._element,A.APP_LOADING),this._applicationReady=!0}catch(t){console.warn(t),this._applicationReady=!0}}stopTimeoutLockManager(){this._lockManagerTimer&&clearTimeout(this._lockManagerTimer)}async checkTimeoutLimitLockManager(){this.stopTimeoutLockManager(),this._applicationReady||(this._lockManagerTimer=setTimeout((async()=>{this._applicationReady||(await _.resetLocks(this._element,A.APP_LOADING),this.stopTimeoutLockManager(),this._applicationReady=!0)}),this._maxTimeLockAppLoading))}initKeyboardManager(){this._keyboardManager.bind("ctrl + g",G.searchApp.bind(this),{description:"Pesquisar por telas"}).bind("ctrl + d",G.showDesktop.bind(this),{description:"Mostrar o desktop"}).bind("F1",G.openHelp.bind(this),{description:"Abrir ajuda"})}removeShortcuts(){this._keyboardManager.unbind("ctrl + g").unbind("ctrl + d").unbind("F1")}renderLoadingSkeleton(t){if(this.enableLockManagerLoadingApp)return this._isBrowserTypeElectron?this.getSpinnerLoadingDefault():this.getSkeletonTemplateApplication()}getLoadingVisibilityStyle(){return{visibility:this._applicationReady?"hidden":"initial",display:this._applicationReady?"none":"unset"}}getSkeletonTemplateApplication(){return e("div",{class:"loading-hidden",style:this.getLoadingVisibilityStyle()},e("div",{class:"ez-margin--medium ez-margin-top--extra-small"},e("ez-skeleton",{count:1,variant:"rect",width:"100%",height:"150px",animation:"progress"})),e("div",{class:"ez-flex ez-flex--align-items-stretch skeleton-content"},e("div",{class:"skeleton-content-left ez-margin--medium"},e("ez-skeleton",{count:1,variant:"rect",width:"100%",height:"calc(100% - 15px)",animation:"progress",marginBottom:"20px"})),e("div",{class:"ez-flex-item--auto skeleton-content-right ez-margin--medium"},e("ez-skeleton",{count:this.getCountSkeleton("skeleton-content-right",50,20),variant:"rect",width:"100%",height:"49px",animation:"progress",marginBottom:"20px"}))),e("div",{class:"skeleton-content-footer ez-margin--medium ez-margin-top--extra-small"},e("ez-skeleton",{count:1,variant:"rect",width:"100%",height:"100px",animation:"progress"})))}getSpinnerLoadingDefault(){return e("div",{class:"loading-hidden",style:this.getLoadingVisibilityStyle()},e("div",{class:"ez-flex ez-size-height--full ez-size-width--full ez-flex--justify-center ez-flex--align-items-center spinner"},e("ez-icon",{iconName:"sync",size:"x-large",class:"spin"}),e("span",{class:"ez-title ez-title--secondary ez-title--extra-large"},"Carregando...")))}render(){return e(s,{style:{visibility:!this.enableLockManagerLoadingApp||this._applicationReady?"unset":"hidden",overflow:!this.enableLockManagerLoadingApp||this._applicationReady?"unset":"hidden"}},e("div",null,e("ez-loading-bar",{ref:t=>this._requestListener.ezLoadingBar=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}),this.renderLoadingSkeleton()))}get _element(){return n(this)}static get watchers(){return{loadByPK:["watchPropHandler"]}}};class Q{constructor(t,i){this.resolve=t,this.reject=i}}var tt;!function(t){t[t.APPLICATION=1]="APPLICATION",t[t.GRID=2]="GRID"}(tt||(tt={})),Z.style=".sc-snk-application-h{display:flex;flex-direction:column;height:100%}.sc-snk-application-h>.loading-hidden.sc-snk-application{display:none;pointer-events:none}.skeleton-content-left.sc-snk-application{width:300px;padding-right:5px}.skeleton-content.sc-snk-application{height:calc(100vh - 310px)}.spinner.sc-snk-application{height:100vh;gap:10px}.spinner.sc-snk-application>.spin.sc-snk-application{animation-name:spin;animation-duration:5000ms;animation-iteration-count:infinite;animation-timing-function:linear}@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}";export{Z as snk_application}
|
@@ -1 +1 @@
|
|
1
|
-
import{p as e,b as a}from"./p-d2d301a6.js";export{s as setNonce}from"./p-d2d301a6.js";(()=>{const a=import.meta.url,t={};return""!==a&&(t.resourcesUrl=new URL(".",a).href),e(t)})().then((e=>a(JSON.parse('[["p-118e769b",[[1,"teste-pesquisa"]]],["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-21a81901",[[6,"snk-custom-slot-elements",{"slotName":[1,"slot-name"]}]]],["p-33718dfc",[[2,"snk-entity-list",{"config":[1040],"rightListSlotBuilder":[1040],"maxHeightList":[1,"max-height-list"],"_searchValue":[32],"_ezListSource":[32],"reloadList":[64]}]]],["p-8c235d4c",[[0,"snk-filter-binary-select",{"value":[1544],"config":[16],"presentationMode":[2,"presentation-mode"],"resetValues":[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-5f157b09",[[0,"snk-filter-checkbox-list",{"config":[1040],"optionsList":[32]}]]],["p-bf2acf72",[[0,"snk-filter-multi-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-01ba23cd",[[0,"snk-filter-number",{"config":[16],"getMessage":[16],"value":[2],"presentationMode":[2,"presentation-mode"],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-7e2ded86",[[0,"snk-filter-period",{"config":[16],"getMessage":[16],"value":[8],"presentationMode":[2,"presentation-mode"],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-c8622597",[[0,"snk-filter-search",{"config":[16],"value":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-89c92727",[[0,"snk-filter-text",{"config":[16],"value":[1]},[[0,"ezChange","ezChangeListener"]]]]],["p-47178038",[[2,"snk-personalized-filter-editor",{"messagesBuilder":[1040],"presentationMode":[2,"presentation-mode"],"config":[16],"value":[1040],"items":[32],"show":[64]}]]],["p-434817f0",[[2,"snk-print-selector",{"_printServerActive":[32],"_selectedPrinter":[32],"_remotePrintersDataSource":[32],"_localPrintersDataSource":[32],"_printJobData":[32],"openPrintSelector":[64]}]]],["p-b50a0753",[[2,"snk-pesquisa",{"searchLoader":[16],"treeLoader":[16],"selectItem":[16],"entityName":[1,"entity-name"],"argument":[1025],"isHierarchyEntity":[4,"is-hierarchy-entity"],"allowsNonAnalytic":[4,"allows-non-analytic"],"_itemList":[32],"_startLoading":[32],"_presentationMode":[32]}]]],["p-0cda2226",[[2,"snk-application",{"enableLockManagerLoadingApp":[4,"enable-lock-manager-loading-app"],"messagesBuilder":[1040],"configName":[1,"config-name"],"gridLegacyConfigName":[1,"grid-legacy-config-name"],"formLegacyConfigName":[1,"form-legacy-config-name"],"loadByPK":[16],"_applicationReady":[32],"getKeyboardManager":[64],"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],"showAlerts":[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],"preloadMangerRemoveRecord":[64],"executeSearch":[64],"executePreparedSearch":[64],"isDebugMode":[64],"getAppLabel":[64],"addSearchListener":[64],"importScript":[64],"getApplicationPath":[64],"executeSelectDistinct":[64],"getDataFetcher":[64],"whenApplicationReady":[64],"setSearchFilterContext":[64],"markToReload":[64],"addLoadingLock":[64]}]]],["p-1cf39cfd",[[0,"snk-filter-modal-item",{"filterItem":[1040],"configName":[1025,"config-name"],"resourceID":[1,"resource-i-d"]}]]],["p-54a5d52a",[[0,"snk-filter-detail",{"config":[1040],"getMessage":[16],"showHardFixed":[4,"show-hard-fixed"],"show":[64]}]]],["p-c2e468c9",[[6,"snk-simple-bar",{"label":[1],"breadcrumbItens":[16],"messagesBuilder":[1040]}]]],["p-8002dcd0",[[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-3ab6df3d",[[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-82ee6dc3",[[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-d92d4f91",[[0,"snk-simple-form-config",{"dataUnit":[16],"configName":[1,"config-name"],"avaliableFields":[32],"selectedFields":[32],"show":[64]}],[2,"snk-grid-config",{"selectedIndex":[1026,"selected-index"],"columns":[1040],"config":[1040],"configName":[1,"config-name"],"resourceID":[1,"resource-i-d"]}],[2,"snk-actions-button",{"_items":[32],"_showDropdown":[32]}],[1,"snk-select-box",{"selectedOption":[1,"selected-option"]}],[2,"taskbar-actions-button",{"title":[1],"enabled":[4],"actions":[16],"_showDropdown":[32],"showActions":[64],"hideActions":[64],"isOpened":[64]},[[8,"keydown","handleKeyDown"],[8,"ezOpenModal","handleClose"]]]]],["p-68134a67",[[6,"snk-grid",{"columnFilterDataSource":[1040],"enableLockManagerLoadingComp":[4,"enable-lock-manager-loading-comp"],"enableLockManagerTaskbarClick":[4,"enable-lock-manager-taskbar-click"],"configName":[1,"config-name"],"filterBarTitle":[1,"filter-bar-title"],"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"],"disablePersonalizedFilter":[4,"disable-personalized-filter"],"gridLegacyConfigName":[1,"grid-legacy-config-name"],"filterBarLegacyConfigName":[1,"filter-bar-legacy-config-name"],"autoLoad":[4,"auto-load"],"autoFocus":[4,"auto-focus"],"enableGridInsert":[4,"enable-grid-insert"],"outlineMode":[4,"outline-mode"],"_dataUnit":[32],"_dataState":[32],"_gridConfig":[32],"_popUpGridConfig":[32],"_showSnkFilterBar":[32],"_enableContinuousInsert":[32],"reloadConfig":[64],"showConfig":[64],"hideConfig":[64],"setConfig":[64],"reloadFilterBar":[64],"getFilterBar":[64],"findColumn":[64],"addCustomEditor":[64],"addGridCustomRender":[64],"addCustomValueFormatter":[64],"removeCustomValueFormatter":[64],"setFocus":[64]},[[2,"click","handleClick"]]]]],["p-26b0ce3e",[[2,"snk-form-summary",{"fixed":[1540],"contracted":[1540],"summary":[16]}]]],["p-1db45d26",[[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],"fieldToFocus":[1,"field-to-focus"],"customEditors":[16],"fieldsProps":[16],"showUp":[64],"addCustomEditor":[64],"setFieldProp":[64]}]]],["p-8b4fc28f",[[2,"snk-field-config",{"isConfigActive":[16],"fieldConfig":[16],"modeInsertion":[516,"mode-insertion"],"dataUnit":[16],"messagesBuilder":[1040]}]]],["p-2d3f9482",[[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-41793e17",[[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-1a91d1f3",[[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"],"domainMessagesBuilder":[1,"domain-messages-builder"],"fieldsToLink":[32],"getDataUnit":[64],"getSelectedRecordsIDsInfo":[64],"getFieldsWithRmp":[64],"getFieldsWithRmPrecision":[64],"getRowMetadata":[64]}]]],["p-c475ac24",[[2,"pesquisa-grid",{"metadata":[16],"dataSource":[16],"pkField":[1,"pk-field"],"descriptionField":[1,"description-field"],"entityName":[1,"entity-name"],"_inMemoryLoader":[32],"_dataunit":[32],"_gridConfig":[32]}],[2,"pesquisa-tree",{"treeLoader":[16],"argument":[1025],"allowsNonAnalytic":[4,"allows-non-analytic"],"items":[32],"applyFilter":[64]}]]],["p-16a1dd18",[[0,"snk-exporter-email-sender",{"getMessage":[16],"_config":[32],"_opened":[32],"_currentStep":[32],"open":[64],"close":[64]}]]],["p-09067bee",[[2,"snk-data-exporter",{"provider":[16],"messagesBuilder":[1040],"_items":[32],"_showDropdown":[32]}]]],["p-619aeac8",[[6,"snk-taskbar",{"alignRigth":[4,"align-rigth"],"customSlotId":[1,"custom-slot-id"],"customContainerId":[1,"custom-container-id"],"overflowStrategy":[1,"overflow-strategy"],"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],"_overFlowedElements":[32],"_customElements":[32],"_customElementsId":[32],"_slotContainer":[32],"_hiddenActionsList":[32],"_lastWidth":[32],"_hasToUpdateOverFlow":[32],"_isWaitingForSave":[32]},[[8,"snkCustomSlotElementsLoaded","handleCustomSlotElementsLoaded"],[8,"taskbarSaveLocker","handleTaskbarSaveLocker"],[8,"taskbarSaveUnlocker","handleTaskbarSaveUnlocker"]]]]],["p-f258690a",[[6,"snk-simple-crud",{"enableLockManagerLoadingComp":[4,"enable-lock-manager-loading-comp"],"enableLockManagerTaskbarClick":[4,"enable-lock-manager-taskbar-click"],"dataState":[16],"dataUnit":[16],"entityName":[1,"entity-name"],"mode":[2],"gridConfig":[1040],"formConfig":[1040],"multipleSelection":[4,"multiple-selection"],"useCancelConfirm":[4,"use-cancel-confirm"],"pageSize":[2,"page-size"],"resourceID":[1,"resource-i-d"],"enableGridInsert":[4,"enable-grid-insert"],"taskbarManager":[16],"messagesBuilder":[1040],"useEnterLikeTab":[4,"use-enter-like-tab"],"actionsList":[16],"configName":[1025,"config-name"],"showConfiguratorButtons":[4,"show-configurator-buttons"],"gridLegacyConfigName":[1,"grid-legacy-config-name"],"formLegacyConfigName":[1,"form-legacy-config-name"],"ignoreReadOnlyFormFields":[4,"ignore-read-only-form-fields"],"autoFocus":[4,"auto-focus"],"domainMessagesBuilder":[1,"domain-messages-builder"],"autoLoad":[4,"auto-load"],"outlineMode":[4,"outline-mode"],"_showPopUpGridConfig":[32],"_currentViewMode":[32],"_config":[32],"_fieldToGetFocus":[32],"_customContainerId":[32],"_formFields":[32],"_fieldsProps":[32],"_enableContinuousInsert":[32],"addCustomEditor":[64],"addGridCustomRender":[64],"addCustomValueFormatter":[64],"removeCustomValueFormatter":[64],"setFieldProp":[64],"goToView":[64],"setMetadata":[64],"setRecords":[64],"getRecords":[64],"openConfigurator":[64],"closeConfigurator":[64],"updateConfig":[64]},[[0,"actionClick","actionClickListener"]]]]],["p-469384a2",[[2,"snk-attach",{"fetcherType":[1,"fetcher-type"],"fetcher":[16],"dataUnit":[16],"dataUnitBuilder":[16],"registerKey":[1,"register-key"],"entityName":[1,"entity-name"],"messagesBuilder":[1040],"_currentFetcher":[32],"_currentDataUnit":[32],"crudConfig":[32]}]]],["p-e5430b29",[[0,"snk-filter-modal",{"getMessage":[16],"configName":[1025,"config-name"],"filters":[1040],"applyFilters":[16],"closeModal":[16],"addPersonalizedFilter":[16],"editPersonalizedFilter":[16],"deletePersonalizedFilter":[16],"filtersToDelete":[16],"disablePersonalizedFilter":[4,"disable-personalized-filter"]},[[0,"deleteFilter","deletePersonalizedFilterListener"]]],[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"]]],[2,"snk-filter-bar",{"enableLockManagerLoadingComp":[4,"enable-lock-manager-loading-comp"],"customFilterBarConfig":[16],"dataUnit":[1040],"title":[1],"configName":[1,"config-name"],"resourceID":[1,"resource-i-d"],"mode":[1],"filterConfig":[1040],"messagesBuilder":[1040],"disablePersonalizedFilter":[4,"disable-personalized-filter"],"filterBarLegacyConfigName":[1,"filter-bar-legacy-config-name"],"autoLoad":[4,"auto-load"],"afterApplyConfig":[16],"allowDefault":[32],"scrollerLocked":[32],"showPersonalizedFilter":[32],"personalizedFilterId":[32],"reload":[64],"getFilterItem":[64],"updateFilterItem":[64],"addFilterItem":[64],"removeFilterItem":[64],"showFilterModal":[64]},[[0,"filterChange","filterChangeListener"]]],[0,"snk-filter-item",{"config":[1040],"getMessage":[16],"showChips":[4,"show-chips"],"detailIsVisible":[32],"showUp":[64],"hideDetail":[64]},[[2,"click","clickListener"],[2,"mousedown","mouseDownListener"],[0,"filterChange","filterChangeListener"]]]]],["p-254c59d2",[[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"],"customEditors":[16],"customRenders":[16],"_disabledButtons":[32],"_currentView":[32],"attachmentRegisterKey":[32],"changeViewMode":[64],"configGrid":[64],"showUp":[64],"addCustomEditor":[64],"addGridCustomRender":[64]},[[0,"snkContentCardChanged","onContentCardChanged"]]]]],["p-f975370f",[[2,"snk-form",{"configName":[1,"config-name"],"recordsValidator":[16],"messagesBuilder":[1040],"formLegacyConfigName":[1,"form-legacy-config-name"],"resourceID":[1,"resource-i-d"],"_dataUnit":[32],"_dataState":[32],"_showFormConfig":[32],"_configManager":[32],"showConfig":[64],"hideConfig":[64],"addCustomEditor":[64],"setFieldProp":[64]}],[2,"snk-form-config",{"dataUnit":[16],"configManager":[16],"messagesBuilder":[1040],"ignoreReadOnlyFormFields":[4,"ignore-read-only-form-fields"],"_formConfigOptions":[32],"_fieldConfigSelected":[32],"_layoutFormConfig":[32],"_fieldsAvailable":[32],"_formConfig":[32],"_formConfigChanged":[32],"_optionFormConfigSelected":[32],"_optionFormConfigChanged":[32],"_tempGroups":[32]}],[2,"snk-config-options",{"fieldConfig":[16],"idConfig":[513,"id-config"],"dataUnit":[16],"messagesBuilder":[1040],"_defaultType":[32]}]]],["p-54f5354a",[[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"],"formLegacyConfigName":[1,"form-legacy-config-name"],"enableGridInsert":[4,"enable-grid-insert"],"ignoreReadOnlyFormFields":[4,"ignore-read-only-form-fields"],"getCustomTitle":[16],"_hasToCreateFieldSearch":[32],"_breadcrumbItems":[32],"_guides":[32],"_formEditorConfigManager":[32],"_formEditorDataUnit":[32],"_fieldToGetFocus":[32],"_customEditors":[32],"_customRenders":[32],"_fieldsProps":[32],"showFormConfig":[64],"findField":[64],"addCustomEditor":[64],"addGridCustomRender":[64],"setFieldProp":[64],"setFocus":[64]},[[2,"actionClick","onActionClick"],[0,"snkContentCardChanged","onContentCardChanged"]]]]],["p-8bd86610",[[6,"snk-crud",{"enableLockManagerLoadingComp":[4,"enable-lock-manager-loading-comp"],"enableLockManagerTaskbarClick":[4,"enable-lock-manager-taskbar-click"],"configName":[1025,"config-name"],"filterBarTitle":[1,"filter-bar-title"],"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"],"gridLegacyConfigName":[1,"grid-legacy-config-name"],"filterBarLegacyConfigName":[1,"filter-bar-legacy-config-name"],"formLegacyConfigName":[1,"form-legacy-config-name"],"disablePersonalizedFilter":[4,"disable-personalized-filter"],"autoLoad":[4,"auto-load"],"autoFocus":[4,"auto-focus"],"enableGridInsert":[4,"enable-grid-insert"],"domainMessagesBuilder":[1,"domain-messages-builder"],"ignoreReadOnlyFormFields":[4,"ignore-read-only-form-fields"],"setCustomFormTitle":[16],"_dataUnit":[32],"_dataState":[32],"attachmentRegisterKey":[32],"_currentViewMode":[32],"_canEdit":[32],"_resourceID":[32],"customContainerId":[32],"goToView":[64],"openConfigurator":[64],"closeConfigurator":[64],"reloadFilterBar":[64],"getFilterBar":[64],"addCustomEditor":[64],"addGridCustomRender":[64],"addCustomValueFormatter":[64],"removeCustomValueFormatter":[64],"setFieldProp":[64]}]]]]'),e)));
|
1
|
+
import{p as e,b as a}from"./p-d2d301a6.js";export{s as setNonce}from"./p-d2d301a6.js";(()=>{const a=import.meta.url,t={};return""!==a&&(t.resourcesUrl=new URL(".",a).href),e(t)})().then((e=>a(JSON.parse('[["p-118e769b",[[1,"teste-pesquisa"]]],["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-21a81901",[[6,"snk-custom-slot-elements",{"slotName":[1,"slot-name"]}]]],["p-33718dfc",[[2,"snk-entity-list",{"config":[1040],"rightListSlotBuilder":[1040],"maxHeightList":[1,"max-height-list"],"_searchValue":[32],"_ezListSource":[32],"reloadList":[64]}]]],["p-8c235d4c",[[0,"snk-filter-binary-select",{"value":[1544],"config":[16],"presentationMode":[2,"presentation-mode"],"resetValues":[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-5f157b09",[[0,"snk-filter-checkbox-list",{"config":[1040],"optionsList":[32]}]]],["p-bf2acf72",[[0,"snk-filter-multi-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-01ba23cd",[[0,"snk-filter-number",{"config":[16],"getMessage":[16],"value":[2],"presentationMode":[2,"presentation-mode"],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-7e2ded86",[[0,"snk-filter-period",{"config":[16],"getMessage":[16],"value":[8],"presentationMode":[2,"presentation-mode"],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-c8622597",[[0,"snk-filter-search",{"config":[16],"value":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-89c92727",[[0,"snk-filter-text",{"config":[16],"value":[1]},[[0,"ezChange","ezChangeListener"]]]]],["p-47178038",[[2,"snk-personalized-filter-editor",{"messagesBuilder":[1040],"presentationMode":[2,"presentation-mode"],"config":[16],"value":[1040],"items":[32],"show":[64]}]]],["p-434817f0",[[2,"snk-print-selector",{"_printServerActive":[32],"_selectedPrinter":[32],"_remotePrintersDataSource":[32],"_localPrintersDataSource":[32],"_printJobData":[32],"openPrintSelector":[64]}]]],["p-b50a0753",[[2,"snk-pesquisa",{"searchLoader":[16],"treeLoader":[16],"selectItem":[16],"entityName":[1,"entity-name"],"argument":[1025],"isHierarchyEntity":[4,"is-hierarchy-entity"],"allowsNonAnalytic":[4,"allows-non-analytic"],"_itemList":[32],"_startLoading":[32],"_presentationMode":[32]}]]],["p-16cc8640",[[2,"snk-application",{"enableLockManagerLoadingApp":[4,"enable-lock-manager-loading-app"],"messagesBuilder":[1040],"configName":[1,"config-name"],"gridLegacyConfigName":[1,"grid-legacy-config-name"],"formLegacyConfigName":[1,"form-legacy-config-name"],"loadByPK":[16],"_applicationReady":[32],"getKeyboardManager":[64],"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],"showAlerts":[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],"preloadMangerRemoveRecord":[64],"executeSearch":[64],"executePreparedSearch":[64],"isDebugMode":[64],"getAppLabel":[64],"addSearchListener":[64],"importScript":[64],"getApplicationPath":[64],"executeSelectDistinct":[64],"getDataFetcher":[64],"whenApplicationReady":[64],"setSearchFilterContext":[64],"markToReload":[64],"addLoadingLock":[64]}]]],["p-1cf39cfd",[[0,"snk-filter-modal-item",{"filterItem":[1040],"configName":[1025,"config-name"],"resourceID":[1,"resource-i-d"]}]]],["p-54a5d52a",[[0,"snk-filter-detail",{"config":[1040],"getMessage":[16],"showHardFixed":[4,"show-hard-fixed"],"show":[64]}]]],["p-c2e468c9",[[6,"snk-simple-bar",{"label":[1],"breadcrumbItens":[16],"messagesBuilder":[1040]}]]],["p-8002dcd0",[[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-3ab6df3d",[[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-82ee6dc3",[[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-d92d4f91",[[0,"snk-simple-form-config",{"dataUnit":[16],"configName":[1,"config-name"],"avaliableFields":[32],"selectedFields":[32],"show":[64]}],[2,"snk-grid-config",{"selectedIndex":[1026,"selected-index"],"columns":[1040],"config":[1040],"configName":[1,"config-name"],"resourceID":[1,"resource-i-d"]}],[2,"snk-actions-button",{"_items":[32],"_showDropdown":[32]}],[1,"snk-select-box",{"selectedOption":[1,"selected-option"]}],[2,"taskbar-actions-button",{"title":[1],"enabled":[4],"actions":[16],"_showDropdown":[32],"showActions":[64],"hideActions":[64],"isOpened":[64]},[[8,"keydown","handleKeyDown"],[8,"ezOpenModal","handleClose"]]]]],["p-68134a67",[[6,"snk-grid",{"columnFilterDataSource":[1040],"enableLockManagerLoadingComp":[4,"enable-lock-manager-loading-comp"],"enableLockManagerTaskbarClick":[4,"enable-lock-manager-taskbar-click"],"configName":[1,"config-name"],"filterBarTitle":[1,"filter-bar-title"],"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"],"disablePersonalizedFilter":[4,"disable-personalized-filter"],"gridLegacyConfigName":[1,"grid-legacy-config-name"],"filterBarLegacyConfigName":[1,"filter-bar-legacy-config-name"],"autoLoad":[4,"auto-load"],"autoFocus":[4,"auto-focus"],"enableGridInsert":[4,"enable-grid-insert"],"outlineMode":[4,"outline-mode"],"_dataUnit":[32],"_dataState":[32],"_gridConfig":[32],"_popUpGridConfig":[32],"_showSnkFilterBar":[32],"_enableContinuousInsert":[32],"reloadConfig":[64],"showConfig":[64],"hideConfig":[64],"setConfig":[64],"reloadFilterBar":[64],"getFilterBar":[64],"findColumn":[64],"addCustomEditor":[64],"addGridCustomRender":[64],"addCustomValueFormatter":[64],"removeCustomValueFormatter":[64],"setFocus":[64]},[[2,"click","handleClick"]]]]],["p-26b0ce3e",[[2,"snk-form-summary",{"fixed":[1540],"contracted":[1540],"summary":[16]}]]],["p-1db45d26",[[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],"fieldToFocus":[1,"field-to-focus"],"customEditors":[16],"fieldsProps":[16],"showUp":[64],"addCustomEditor":[64],"setFieldProp":[64]}]]],["p-8b4fc28f",[[2,"snk-field-config",{"isConfigActive":[16],"fieldConfig":[16],"modeInsertion":[516,"mode-insertion"],"dataUnit":[16],"messagesBuilder":[1040]}]]],["p-2d3f9482",[[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-41793e17",[[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-1a91d1f3",[[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"],"domainMessagesBuilder":[1,"domain-messages-builder"],"fieldsToLink":[32],"getDataUnit":[64],"getSelectedRecordsIDsInfo":[64],"getFieldsWithRmp":[64],"getFieldsWithRmPrecision":[64],"getRowMetadata":[64]}]]],["p-c475ac24",[[2,"pesquisa-grid",{"metadata":[16],"dataSource":[16],"pkField":[1,"pk-field"],"descriptionField":[1,"description-field"],"entityName":[1,"entity-name"],"_inMemoryLoader":[32],"_dataunit":[32],"_gridConfig":[32]}],[2,"pesquisa-tree",{"treeLoader":[16],"argument":[1025],"allowsNonAnalytic":[4,"allows-non-analytic"],"items":[32],"applyFilter":[64]}]]],["p-16a1dd18",[[0,"snk-exporter-email-sender",{"getMessage":[16],"_config":[32],"_opened":[32],"_currentStep":[32],"open":[64],"close":[64]}]]],["p-09067bee",[[2,"snk-data-exporter",{"provider":[16],"messagesBuilder":[1040],"_items":[32],"_showDropdown":[32]}]]],["p-619aeac8",[[6,"snk-taskbar",{"alignRigth":[4,"align-rigth"],"customSlotId":[1,"custom-slot-id"],"customContainerId":[1,"custom-container-id"],"overflowStrategy":[1,"overflow-strategy"],"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],"_overFlowedElements":[32],"_customElements":[32],"_customElementsId":[32],"_slotContainer":[32],"_hiddenActionsList":[32],"_lastWidth":[32],"_hasToUpdateOverFlow":[32],"_isWaitingForSave":[32]},[[8,"snkCustomSlotElementsLoaded","handleCustomSlotElementsLoaded"],[8,"taskbarSaveLocker","handleTaskbarSaveLocker"],[8,"taskbarSaveUnlocker","handleTaskbarSaveUnlocker"]]]]],["p-f258690a",[[6,"snk-simple-crud",{"enableLockManagerLoadingComp":[4,"enable-lock-manager-loading-comp"],"enableLockManagerTaskbarClick":[4,"enable-lock-manager-taskbar-click"],"dataState":[16],"dataUnit":[16],"entityName":[1,"entity-name"],"mode":[2],"gridConfig":[1040],"formConfig":[1040],"multipleSelection":[4,"multiple-selection"],"useCancelConfirm":[4,"use-cancel-confirm"],"pageSize":[2,"page-size"],"resourceID":[1,"resource-i-d"],"enableGridInsert":[4,"enable-grid-insert"],"taskbarManager":[16],"messagesBuilder":[1040],"useEnterLikeTab":[4,"use-enter-like-tab"],"actionsList":[16],"configName":[1025,"config-name"],"showConfiguratorButtons":[4,"show-configurator-buttons"],"gridLegacyConfigName":[1,"grid-legacy-config-name"],"formLegacyConfigName":[1,"form-legacy-config-name"],"ignoreReadOnlyFormFields":[4,"ignore-read-only-form-fields"],"autoFocus":[4,"auto-focus"],"domainMessagesBuilder":[1,"domain-messages-builder"],"autoLoad":[4,"auto-load"],"outlineMode":[4,"outline-mode"],"_showPopUpGridConfig":[32],"_currentViewMode":[32],"_config":[32],"_fieldToGetFocus":[32],"_customContainerId":[32],"_formFields":[32],"_fieldsProps":[32],"_enableContinuousInsert":[32],"addCustomEditor":[64],"addGridCustomRender":[64],"addCustomValueFormatter":[64],"removeCustomValueFormatter":[64],"setFieldProp":[64],"goToView":[64],"setMetadata":[64],"setRecords":[64],"getRecords":[64],"openConfigurator":[64],"closeConfigurator":[64],"updateConfig":[64]},[[0,"actionClick","actionClickListener"]]]]],["p-469384a2",[[2,"snk-attach",{"fetcherType":[1,"fetcher-type"],"fetcher":[16],"dataUnit":[16],"dataUnitBuilder":[16],"registerKey":[1,"register-key"],"entityName":[1,"entity-name"],"messagesBuilder":[1040],"_currentFetcher":[32],"_currentDataUnit":[32],"crudConfig":[32]}]]],["p-e5430b29",[[0,"snk-filter-modal",{"getMessage":[16],"configName":[1025,"config-name"],"filters":[1040],"applyFilters":[16],"closeModal":[16],"addPersonalizedFilter":[16],"editPersonalizedFilter":[16],"deletePersonalizedFilter":[16],"filtersToDelete":[16],"disablePersonalizedFilter":[4,"disable-personalized-filter"]},[[0,"deleteFilter","deletePersonalizedFilterListener"]]],[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"]]],[2,"snk-filter-bar",{"enableLockManagerLoadingComp":[4,"enable-lock-manager-loading-comp"],"customFilterBarConfig":[16],"dataUnit":[1040],"title":[1],"configName":[1,"config-name"],"resourceID":[1,"resource-i-d"],"mode":[1],"filterConfig":[1040],"messagesBuilder":[1040],"disablePersonalizedFilter":[4,"disable-personalized-filter"],"filterBarLegacyConfigName":[1,"filter-bar-legacy-config-name"],"autoLoad":[4,"auto-load"],"afterApplyConfig":[16],"allowDefault":[32],"scrollerLocked":[32],"showPersonalizedFilter":[32],"personalizedFilterId":[32],"reload":[64],"getFilterItem":[64],"updateFilterItem":[64],"addFilterItem":[64],"removeFilterItem":[64],"showFilterModal":[64]},[[0,"filterChange","filterChangeListener"]]],[0,"snk-filter-item",{"config":[1040],"getMessage":[16],"showChips":[4,"show-chips"],"detailIsVisible":[32],"showUp":[64],"hideDetail":[64]},[[2,"click","clickListener"],[2,"mousedown","mouseDownListener"],[0,"filterChange","filterChangeListener"]]]]],["p-254c59d2",[[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"],"customEditors":[16],"customRenders":[16],"_disabledButtons":[32],"_currentView":[32],"attachmentRegisterKey":[32],"changeViewMode":[64],"configGrid":[64],"showUp":[64],"addCustomEditor":[64],"addGridCustomRender":[64]},[[0,"snkContentCardChanged","onContentCardChanged"]]]]],["p-f975370f",[[2,"snk-form",{"configName":[1,"config-name"],"recordsValidator":[16],"messagesBuilder":[1040],"formLegacyConfigName":[1,"form-legacy-config-name"],"resourceID":[1,"resource-i-d"],"_dataUnit":[32],"_dataState":[32],"_showFormConfig":[32],"_configManager":[32],"showConfig":[64],"hideConfig":[64],"addCustomEditor":[64],"setFieldProp":[64]}],[2,"snk-form-config",{"dataUnit":[16],"configManager":[16],"messagesBuilder":[1040],"ignoreReadOnlyFormFields":[4,"ignore-read-only-form-fields"],"_formConfigOptions":[32],"_fieldConfigSelected":[32],"_layoutFormConfig":[32],"_fieldsAvailable":[32],"_formConfig":[32],"_formConfigChanged":[32],"_optionFormConfigSelected":[32],"_optionFormConfigChanged":[32],"_tempGroups":[32]}],[2,"snk-config-options",{"fieldConfig":[16],"idConfig":[513,"id-config"],"dataUnit":[16],"messagesBuilder":[1040],"_defaultType":[32]}]]],["p-54f5354a",[[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"],"formLegacyConfigName":[1,"form-legacy-config-name"],"enableGridInsert":[4,"enable-grid-insert"],"ignoreReadOnlyFormFields":[4,"ignore-read-only-form-fields"],"getCustomTitle":[16],"_hasToCreateFieldSearch":[32],"_breadcrumbItems":[32],"_guides":[32],"_formEditorConfigManager":[32],"_formEditorDataUnit":[32],"_fieldToGetFocus":[32],"_customEditors":[32],"_customRenders":[32],"_fieldsProps":[32],"showFormConfig":[64],"findField":[64],"addCustomEditor":[64],"addGridCustomRender":[64],"setFieldProp":[64],"setFocus":[64]},[[2,"actionClick","onActionClick"],[0,"snkContentCardChanged","onContentCardChanged"]]]]],["p-8bd86610",[[6,"snk-crud",{"enableLockManagerLoadingComp":[4,"enable-lock-manager-loading-comp"],"enableLockManagerTaskbarClick":[4,"enable-lock-manager-taskbar-click"],"configName":[1025,"config-name"],"filterBarTitle":[1,"filter-bar-title"],"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"],"gridLegacyConfigName":[1,"grid-legacy-config-name"],"filterBarLegacyConfigName":[1,"filter-bar-legacy-config-name"],"formLegacyConfigName":[1,"form-legacy-config-name"],"disablePersonalizedFilter":[4,"disable-personalized-filter"],"autoLoad":[4,"auto-load"],"autoFocus":[4,"auto-focus"],"enableGridInsert":[4,"enable-grid-insert"],"domainMessagesBuilder":[1,"domain-messages-builder"],"ignoreReadOnlyFormFields":[4,"ignore-read-only-form-fields"],"setCustomFormTitle":[16],"_dataUnit":[32],"_dataState":[32],"attachmentRegisterKey":[32],"_currentViewMode":[32],"_canEdit":[32],"_resourceID":[32],"customContainerId":[32],"goToView":[64],"openConfigurator":[64],"closeConfigurator":[64],"reloadFilterBar":[64],"getFilterBar":[64],"addCustomEditor":[64],"addGridCustomRender":[64],"addCustomValueFormatter":[64],"removeCustomValueFormatter":[64],"setFieldProp":[64]}]]]]'),e)));
|