@sankhyalabs/sankhyablocks 10.1.0-dev.44 → 10.1.0-dev.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -118,19 +118,21 @@ async function imageBlobToBase64(blob) {
118
118
  reader.readAsDataURL(blob);
119
119
  });
120
120
  }
121
- async function downloadImage(pks, fieldName, entityName) {
121
+ async function downloadImage(pks, fieldName, entityName, signal) {
122
122
  const uploadUrl = getBaseUrl(pks, entityName, fieldName);
123
123
  if (!uploadUrl) {
124
124
  return;
125
125
  }
126
126
  try {
127
- const response = await fetch(uploadUrl);
127
+ const response = await fetch(uploadUrl, { signal });
128
128
  if (response.ok) {
129
129
  const blob = await response.blob();
130
130
  return await imageBlobToBase64(blob);
131
131
  }
132
132
  }
133
133
  catch (error) {
134
+ if (signal === null || signal === void 0 ? void 0 : signal.aborted)
135
+ return;
134
136
  console.error('Error downloading image:', error);
135
137
  }
136
138
  }
@@ -6,7 +6,7 @@ const index = require('./index-1894343a.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
  const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
8
8
  const utils = require('@sankhyalabs/ezui/dist/collection/utils');
9
- const ImageUtils = require('./ImageUtils-c46f2d11.js');
9
+ const ImageUtils = require('./ImageUtils-d6139911.js');
10
10
 
11
11
  const snkFormViewCss = ".sc-snk-form-view-h{display:flex;width:100%;--ez-form-card-summary-field-content-weight:700}.level-path.sc-snk-form-view{color:var(--color--title-primary, #2B3A54);font-weight:var(--text-weight--medium, 400);padding-right:3px}.summary-wrapper.sc-snk-form-view{display:flex;overflow:hidden}.summary-header.sc-snk-form-view{border-bottom:1px solid var(--color--strokes);margin-bottom:var(--space--medium);padding-bottom:var(--space--medium)}.summary-container.sc-snk-form-view{display:flex;flex-direction:column}.summary-container.sc-snk-form-view{padding-right:calc(var(--space--extra-large) / 1.5)}.summary-field.sc-snk-form-view{min-width:30px;max-width:200px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.summary-field__title.sc-snk-form-view{color:var(--text--primary, #626e82);font-size:var(--title--small);white-space:nowrap;font-weight:var(--text-weight--medium)}.summary-field__content.sc-snk-form-view{color:var(--title--primary, #2b3a54);font-size:var(--text--large);font-weight:var(--ez-form-card-summary-field-content-weight)}";
12
12
 
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-1894343a.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
  const SnkMessageBuilder = require('./SnkMessageBuilder-a9300ebe.js');
8
- const ImageUtils = require('./ImageUtils-c46f2d11.js');
8
+ const ImageUtils = require('./ImageUtils-d6139911.js');
9
9
 
10
10
  const snkImageInputCss = ":host{display:block}";
11
11
 
@@ -29,6 +29,10 @@ const SnkImageInput = class {
29
29
  await this.clearImage();
30
30
  return;
31
31
  }
32
+ if (action.type === core.Action.EDITION_CANCELED) {
33
+ await this.loadImage();
34
+ return;
35
+ }
32
36
  };
33
37
  this.dataUnit = undefined;
34
38
  this.fieldName = undefined;
@@ -53,6 +57,8 @@ const SnkImageInput = class {
53
57
  return this.messagesBuilder.getMessage(key, params);
54
58
  }
55
59
  async clearImage() {
60
+ var _a;
61
+ (_a = this._loadAbortController) === null || _a === void 0 ? void 0 : _a.abort();
56
62
  this.imageValue = undefined;
57
63
  }
58
64
  async handleImageChange(event) {
@@ -114,11 +120,17 @@ const SnkImageInput = class {
114
120
  }
115
121
  }
116
122
  async loadImage(pks) {
117
- var _a;
123
+ var _a, _b;
124
+ (_a = this._loadAbortController) === null || _a === void 0 ? void 0 : _a.abort();
125
+ const controller = new AbortController();
126
+ this._loadAbortController = controller;
118
127
  this.loading = true;
119
128
  if (this.dataUnit && this.entityName) {
120
- pks = (_a = pks !== null && pks !== void 0 ? pks : this.getPksFromDataUnit()) !== null && _a !== void 0 ? _a : ImageUtils.getPKs(this.dataUnit);
121
- this.imageValue = await ImageUtils.downloadImage(pks, this.fieldName, this.entityName);
129
+ pks = (_b = pks !== null && pks !== void 0 ? pks : this.getPksFromDataUnit()) !== null && _b !== void 0 ? _b : ImageUtils.getPKs(this.dataUnit);
130
+ const image = await ImageUtils.downloadImage(pks, this.fieldName, this.entityName, controller.signal);
131
+ if (controller.signal.aborted)
132
+ return;
133
+ this.imageValue = image;
122
134
  }
123
135
  this.loading = false;
124
136
  }
@@ -21,6 +21,10 @@ export class SnkImageInput {
21
21
  await this.clearImage();
22
22
  return;
23
23
  }
24
+ if (action.type === Action.EDITION_CANCELED) {
25
+ await this.loadImage();
26
+ return;
27
+ }
24
28
  };
25
29
  this.dataUnit = undefined;
26
30
  this.fieldName = undefined;
@@ -45,6 +49,8 @@ export class SnkImageInput {
45
49
  return this.messagesBuilder.getMessage(key, params);
46
50
  }
47
51
  async clearImage() {
52
+ var _a;
53
+ (_a = this._loadAbortController) === null || _a === void 0 ? void 0 : _a.abort();
48
54
  this.imageValue = undefined;
49
55
  }
50
56
  async handleImageChange(event) {
@@ -106,11 +112,17 @@ export class SnkImageInput {
106
112
  }
107
113
  }
108
114
  async loadImage(pks) {
109
- var _a;
115
+ var _a, _b;
116
+ (_a = this._loadAbortController) === null || _a === void 0 ? void 0 : _a.abort();
117
+ const controller = new AbortController();
118
+ this._loadAbortController = controller;
110
119
  this.loading = true;
111
120
  if (this.dataUnit && this.entityName) {
112
- pks = (_a = pks !== null && pks !== void 0 ? pks : this.getPksFromDataUnit()) !== null && _a !== void 0 ? _a : getPKs(this.dataUnit);
113
- this.imageValue = await downloadImage(pks, this.fieldName, this.entityName);
121
+ pks = (_b = pks !== null && pks !== void 0 ? pks : this.getPksFromDataUnit()) !== null && _b !== void 0 ? _b : getPKs(this.dataUnit);
122
+ const image = await downloadImage(pks, this.fieldName, this.entityName, controller.signal);
123
+ if (controller.signal.aborted)
124
+ return;
125
+ this.imageValue = image;
114
126
  }
115
127
  this.loading = false;
116
128
  }
@@ -115,19 +115,21 @@ export async function imageBlobToBase64(blob) {
115
115
  reader.readAsDataURL(blob);
116
116
  });
117
117
  }
118
- export async function downloadImage(pks, fieldName, entityName) {
118
+ export async function downloadImage(pks, fieldName, entityName, signal) {
119
119
  const uploadUrl = getBaseUrl(pks, entityName, fieldName);
120
120
  if (!uploadUrl) {
121
121
  return;
122
122
  }
123
123
  try {
124
- const response = await fetch(uploadUrl);
124
+ const response = await fetch(uploadUrl, { signal });
125
125
  if (response.ok) {
126
126
  const blob = await response.blob();
127
127
  return await imageBlobToBase64(blob);
128
128
  }
129
129
  }
130
130
  catch (error) {
131
+ if (signal === null || signal === void 0 ? void 0 : signal.aborted)
132
+ return;
131
133
  console.error('Error downloading image:', error);
132
134
  }
133
135
  }
@@ -118,19 +118,21 @@ async function imageBlobToBase64(blob) {
118
118
  reader.readAsDataURL(blob);
119
119
  });
120
120
  }
121
- async function downloadImage(pks, fieldName, entityName) {
121
+ async function downloadImage(pks, fieldName, entityName, signal) {
122
122
  const uploadUrl = getBaseUrl(pks, entityName, fieldName);
123
123
  if (!uploadUrl) {
124
124
  return;
125
125
  }
126
126
  try {
127
- const response = await fetch(uploadUrl);
127
+ const response = await fetch(uploadUrl, { signal });
128
128
  if (response.ok) {
129
129
  const blob = await response.blob();
130
130
  return await imageBlobToBase64(blob);
131
131
  }
132
132
  }
133
133
  catch (error) {
134
+ if (signal === null || signal === void 0 ? void 0 : signal.aborted)
135
+ return;
134
136
  console.error('Error downloading image:', error);
135
137
  }
136
138
  }
@@ -159,6 +161,10 @@ const SnkImageInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
159
161
  await this.clearImage();
160
162
  return;
161
163
  }
164
+ if (action.type === Action.EDITION_CANCELED) {
165
+ await this.loadImage();
166
+ return;
167
+ }
162
168
  };
163
169
  this.dataUnit = undefined;
164
170
  this.fieldName = undefined;
@@ -183,6 +189,8 @@ const SnkImageInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
183
189
  return this.messagesBuilder.getMessage(key, params);
184
190
  }
185
191
  async clearImage() {
192
+ var _a;
193
+ (_a = this._loadAbortController) === null || _a === void 0 ? void 0 : _a.abort();
186
194
  this.imageValue = undefined;
187
195
  }
188
196
  async handleImageChange(event) {
@@ -244,11 +252,17 @@ const SnkImageInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
244
252
  }
245
253
  }
246
254
  async loadImage(pks) {
247
- var _a;
255
+ var _a, _b;
256
+ (_a = this._loadAbortController) === null || _a === void 0 ? void 0 : _a.abort();
257
+ const controller = new AbortController();
258
+ this._loadAbortController = controller;
248
259
  this.loading = true;
249
260
  if (this.dataUnit && this.entityName) {
250
- pks = (_a = pks !== null && pks !== void 0 ? pks : this.getPksFromDataUnit()) !== null && _a !== void 0 ? _a : getPKs(this.dataUnit);
251
- this.imageValue = await downloadImage(pks, this.fieldName, this.entityName);
261
+ pks = (_b = pks !== null && pks !== void 0 ? pks : this.getPksFromDataUnit()) !== null && _b !== void 0 ? _b : getPKs(this.dataUnit);
262
+ const image = await downloadImage(pks, this.fieldName, this.entityName, controller.signal);
263
+ if (controller.signal.aborted)
264
+ return;
265
+ this.imageValue = image;
252
266
  }
253
267
  this.loading = false;
254
268
  }
@@ -116,19 +116,21 @@ async function imageBlobToBase64(blob) {
116
116
  reader.readAsDataURL(blob);
117
117
  });
118
118
  }
119
- async function downloadImage(pks, fieldName, entityName) {
119
+ async function downloadImage(pks, fieldName, entityName, signal) {
120
120
  const uploadUrl = getBaseUrl(pks, entityName, fieldName);
121
121
  if (!uploadUrl) {
122
122
  return;
123
123
  }
124
124
  try {
125
- const response = await fetch(uploadUrl);
125
+ const response = await fetch(uploadUrl, { signal });
126
126
  if (response.ok) {
127
127
  const blob = await response.blob();
128
128
  return await imageBlobToBase64(blob);
129
129
  }
130
130
  }
131
131
  catch (error) {
132
+ if (signal === null || signal === void 0 ? void 0 : signal.aborted)
133
+ return;
132
134
  console.error('Error downloading image:', error);
133
135
  }
134
136
  }
@@ -2,7 +2,7 @@ import { r as registerInstance, e as createEvent, h, f as Host } from './index-0
2
2
  import { Action, UserInterface, ApplicationContext, ElementIDUtils } from '@sankhyalabs/core';
3
3
  import { DataBinder } from '@sankhyalabs/ezui/dist/collection/utils/form';
4
4
  import { focusOnFieldSerch, SEARCH_FIELD_FULL_WIDTH, FormLayout } from '@sankhyalabs/ezui/dist/collection/utils';
5
- import { g as getPKs } from './ImageUtils-7f3a4149.js';
5
+ import { g as getPKs } from './ImageUtils-efbea0e4.js';
6
6
 
7
7
  const snkFormViewCss = ".sc-snk-form-view-h{display:flex;width:100%;--ez-form-card-summary-field-content-weight:700}.level-path.sc-snk-form-view{color:var(--color--title-primary, #2B3A54);font-weight:var(--text-weight--medium, 400);padding-right:3px}.summary-wrapper.sc-snk-form-view{display:flex;overflow:hidden}.summary-header.sc-snk-form-view{border-bottom:1px solid var(--color--strokes);margin-bottom:var(--space--medium);padding-bottom:var(--space--medium)}.summary-container.sc-snk-form-view{display:flex;flex-direction:column}.summary-container.sc-snk-form-view{padding-right:calc(var(--space--extra-large) / 1.5)}.summary-field.sc-snk-form-view{min-width:30px;max-width:200px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.summary-field__title.sc-snk-form-view{color:var(--text--primary, #626e82);font-size:var(--title--small);white-space:nowrap;font-weight:var(--text-weight--medium)}.summary-field__content.sc-snk-form-view{color:var(--title--primary, #2b3a54);font-size:var(--text--large);font-weight:var(--ez-form-card-summary-field-content-weight)}";
8
8
 
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, e as createEvent, h, f as Host } from './index-04f73a26.js';
2
2
  import { Action, ApplicationContext } from '@sankhyalabs/core';
3
3
  import { S as SnkMessageBuilder } from './SnkMessageBuilder-1eb7a1af.js';
4
- import { b as base64ToBlob, s as sessionFileUpload, a as buildFileKey, g as getPKs, d as downloadImage } from './ImageUtils-7f3a4149.js';
4
+ import { b as base64ToBlob, s as sessionFileUpload, a as buildFileKey, g as getPKs, d as downloadImage } from './ImageUtils-efbea0e4.js';
5
5
 
6
6
  const snkImageInputCss = ":host{display:block}";
7
7
 
@@ -25,6 +25,10 @@ const SnkImageInput = class {
25
25
  await this.clearImage();
26
26
  return;
27
27
  }
28
+ if (action.type === Action.EDITION_CANCELED) {
29
+ await this.loadImage();
30
+ return;
31
+ }
28
32
  };
29
33
  this.dataUnit = undefined;
30
34
  this.fieldName = undefined;
@@ -49,6 +53,8 @@ const SnkImageInput = class {
49
53
  return this.messagesBuilder.getMessage(key, params);
50
54
  }
51
55
  async clearImage() {
56
+ var _a;
57
+ (_a = this._loadAbortController) === null || _a === void 0 ? void 0 : _a.abort();
52
58
  this.imageValue = undefined;
53
59
  }
54
60
  async handleImageChange(event) {
@@ -110,11 +116,17 @@ const SnkImageInput = class {
110
116
  }
111
117
  }
112
118
  async loadImage(pks) {
113
- var _a;
119
+ var _a, _b;
120
+ (_a = this._loadAbortController) === null || _a === void 0 ? void 0 : _a.abort();
121
+ const controller = new AbortController();
122
+ this._loadAbortController = controller;
114
123
  this.loading = true;
115
124
  if (this.dataUnit && this.entityName) {
116
- pks = (_a = pks !== null && pks !== void 0 ? pks : this.getPksFromDataUnit()) !== null && _a !== void 0 ? _a : getPKs(this.dataUnit);
117
- this.imageValue = await downloadImage(pks, this.fieldName, this.entityName);
125
+ pks = (_b = pks !== null && pks !== void 0 ? pks : this.getPksFromDataUnit()) !== null && _b !== void 0 ? _b : getPKs(this.dataUnit);
126
+ const image = await downloadImage(pks, this.fieldName, this.entityName, controller.signal);
127
+ if (controller.signal.aborted)
128
+ return;
129
+ this.imageValue = image;
118
130
  }
119
131
  this.loading = false;
120
132
  }
@@ -1 +1 @@
1
- import{ApplicationContext as n}from"@sankhyalabs/core";async function e(n){const e=await fetch(n);return await e.blob()}function r(n,e){return n?`${n}_${e}`:e}async function t(e,t,o,a){const i=r(t,o),s=function(e){let r=function(e,r="mge"){let t=`/${r}/sessionUpload.${r}?sessionkey=${e}`;return async function(e){var r;const t=n.getContextValue("__SNK__APPLICATION__");if(!t)return!1;const o=await(null===(r=t.getResourceID)||void 0===r?void 0:r.call(t))||"";return"mge"===e&&o.startsWith("br.com.sankhya.menu.adicional")}(r)&&/[ !@#$%^&*()+\-=\[\]{};':"\\|,.<>\/?]/.test(e)&&(t+=`&encodedKey=${btoa(encodeURI(e))}`),t}(e);return r+="&fitem=S&salvar=S&useCache=N",r}(i);return new Promise(((n,r)=>{const t=new FormData;t.append("arquivo",e);const o=new XMLHttpRequest;o.addEventListener("load",(()=>{o.status>=200&&o.status<300?n(`/mge/UPLOADING_${i}.dbimage`):r(new Error(`Upload failed: ${o.statusText}`))})),o.addEventListener("error",(()=>{r(new Error("Upload error"))})),a&&o.upload.addEventListener("progress",a),o.open("POST",s),o.send(t)}))}function o(n){if(!n)return;const e={},r=n.metadata.fields,t=n.getSelectedRecord();return r.forEach((n=>{n.properties.isPrimaryKey&&t&&(e[n.name]=t[n.name])})),e}async function a(n,e,r){const t=function(n,e,r){if(!n)return;let t=`${window.location.origin}/mge/${e}@${r}`;for(const e in n)t+=`@${e}=${n[e]}`;return t+=".dbimage",t}(n,r,e);if(t)try{const n=await fetch(t);if(n.ok){const e=await n.blob();return await async function(n){return new Promise(((e,r)=>{const t=new FileReader;t.onloadend=()=>{e(t.result)},t.onerror=r,t.readAsDataURL(n)}))}(e)}}catch(n){console.error("Error downloading image:",n)}}export{r as a,e as b,a as d,o as g,t as s}
1
+ import{ApplicationContext as n}from"@sankhyalabs/core";async function e(n){const e=await fetch(n);return await e.blob()}function r(n,e){return n?`${n}_${e}`:e}async function t(e,t,o,a){const i=r(t,o),s=function(e){let r=function(e,r="mge"){let t=`/${r}/sessionUpload.${r}?sessionkey=${e}`;return async function(e){var r;const t=n.getContextValue("__SNK__APPLICATION__");if(!t)return!1;const o=await(null===(r=t.getResourceID)||void 0===r?void 0:r.call(t))||"";return"mge"===e&&o.startsWith("br.com.sankhya.menu.adicional")}(r)&&/[ !@#$%^&*()+\-=\[\]{};':"\\|,.<>\/?]/.test(e)&&(t+=`&encodedKey=${btoa(encodeURI(e))}`),t}(e);return r+="&fitem=S&salvar=S&useCache=N",r}(i);return new Promise(((n,r)=>{const t=new FormData;t.append("arquivo",e);const o=new XMLHttpRequest;o.addEventListener("load",(()=>{o.status>=200&&o.status<300?n(`/mge/UPLOADING_${i}.dbimage`):r(new Error(`Upload failed: ${o.statusText}`))})),o.addEventListener("error",(()=>{r(new Error("Upload error"))})),a&&o.upload.addEventListener("progress",a),o.open("POST",s),o.send(t)}))}function o(n){if(!n)return;const e={},r=n.metadata.fields,t=n.getSelectedRecord();return r.forEach((n=>{n.properties.isPrimaryKey&&t&&(e[n.name]=t[n.name])})),e}async function a(n,e,r,t){const o=function(n,e,r){if(!n)return;let t=`${window.location.origin}/mge/${e}@${r}`;for(const e in n)t+=`@${e}=${n[e]}`;return t+=".dbimage",t}(n,r,e);if(o)try{const n=await fetch(o,{signal:t});if(n.ok){const e=await n.blob();return await async function(n){return new Promise(((e,r)=>{const t=new FileReader;t.onloadend=()=>{e(t.result)},t.onerror=r,t.readAsDataURL(n)}))}(e)}}catch(n){if(null==t?void 0:t.aborted)return;console.error("Error downloading image:",n)}}export{r as a,e as b,a as d,o as g,t as s}
@@ -1 +1 @@
1
- import{r as t,e as i,h as s,f as e}from"./p-2c9d0870.js";import{Action as o,UserInterface as r,ApplicationContext as n,ElementIDUtils as a}from"@sankhyalabs/core";import{DataBinder as h}from"@sankhyalabs/ezui/dist/collection/utils/form";import{focusOnFieldSerch as l,SEARCH_FIELD_FULL_WIDTH as d,FormLayout as m}from"@sankhyalabs/ezui/dist/collection/utils";import{g as c}from"./p-420b39b5.js";const f=class{constructor(e){t(this,e),this.snkContentCardChanged=i(this,"snkContentCardChanged",7),this.snkRequestClearFieldToFocus=i(this,"snkRequestClearFieldToFocus",7),this.formItemsReady=i(this,"formItemsReady",7),this._customEditors=new Map,this._fieldProps=new Map,this.dataUnitObserver=async t=>{if(t.type===o.RECORDS_COPIED){const i=this.buildSourceRecordPK(t);this.getImageField().forEach((async t=>{this.dataUnit.setFieldValue(t.name,JSON.stringify(i))}))}},this.customUiBuilders=new Map([[r.IMAGE,t=>{var{name:i}=t,e=function(t,i){var s={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&i.indexOf(e)<0&&(s[e]=t[e]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(e=Object.getOwnPropertySymbols(t);o<e.length;o++)i.indexOf(e[o])<0&&Object.prototype.propertyIsEnumerable.call(t,e[o])&&(s[e[o]]=t[e[o]])}return s}(t,["name"]);return s("snk-image-input",Object.assign({dataUnit:this.dataUnit,maxSize:1/0,fieldName:i,entityName:this.entityPath},e))}]]),this._singleColumn=!1,this._currentFormLayout=void 0,this.levelPath=void 0,this.fieldSearch=void 0,this.label=void 0,this.name=void 0,this.fields=void 0,this.formMetadata=void 0,this.dataUnit=void 0,this.contracted=void 0,this.fixed=!1,this.summaryFields=void 0,this.canExpand=!0,this.canFix=!0,this.recordsValidator=void 0,this.fieldToFocus=void 0,this.customEditors=void 0,this.fieldsProps=void 0,this.entityPath=void 0}async showUp(){this._formView&&this._formView.showUp()}async addCustomEditor(t,i,s){if(this._formView)return void this._formView.addCustomEditor(t,i,s);const e=new Map(this._customEditors);e.set(t,{customEditor:i,detailContext:s}),this._customEditors=e}async setFieldProp(t,i,s){const e=this._fieldProps.get(t)||[];this._fieldProps.set(t,[...e,{propName:i,value:s}])}async showSearchField(){if(!this._headerContainer||!this._ezPopoverFieldColumn)return;const t=this._headerContainer.getBoundingClientRect();await l(this.fieldSearch),this._ezPopoverFieldColumn.showUnder(this._headerContainer,{horizontalGap:t.width-d,verticalGap:-1*t.height})}observePropsCustomEditor(t){for(const i in t)this.addCustomEditor(i,t[i])}async observeFieldsProps(t){for(const i in t){const s=t[i],e=Object.keys(s);for(const t of e)await this.setFieldProp(i,t,s[t])}}async observeDataUnit(t,i){t!==i&&t&&t.subscribe(this.dataUnitObserver)}changeFix(){this.fixed=!this.fixed,this.emitEvent("fixed")}changeContracted(){this.contracted=!this.contracted,this.emitEvent("presentation")}emitEvent(t){this.snkContentCardChanged.emit({formName:this.name,cardConfig:{fixed:this.fixed,presentation:this.contracted?"CONTRACTED":"EXPANDED"},propertyChanged:t})}getCardSummary(){const t={};return this.getSummaryFields().forEach((({field:i,label:s})=>{var e;const o=this.dataUnit.getFormattedValue(i);""!==o&&(null==s&&(s=null===(e=this.dataUnit.getField(i))||void 0===e?void 0:e.label),t[s]=o)})),t}getSummaryFields(){return null==this.summaryFields?this.fields.map((t=>{const i=this.dataUnit.getField(t.name);return{field:t.name,label:t.label||(null==i?void 0:i.label)}})):this.summaryFields}bindFields(t){null==this._dataBinder&&null!=this.dataUnit&&(this._dataBinder=new h(this.dataUnit)),this._dataBinder&&this._dataBinder.bind(t,this.dataUnit.dataUnitId,this.formMetadata,this.recordsValidator)}handleFormItemsReady(t){t.stopPropagation(),this.formItemsReady.emit(Object.assign(Object.assign({},t.detail),{formId:this.name}))}disconnectedCallback(){null!=this._dataBinder&&this._dataBinder.onDisconnectedCallback(),this.dataUnit&&this.dataUnit.unsubscribe(this.dataUnitObserver)}async componentWillLoad(){await this.initLayoutFormConfig()}componentDidLoad(){this.observePropsCustomEditor(this.customEditors),this.observeFieldsProps(this.fieldsProps)}async initLayoutFormConfig(){var t;this._application||(this._application=n.getContextValue("__SNK__APPLICATION__"));const i=await(null===(t=this._application)||void 0===t?void 0:t.getLayoutFormConfig());i&&(this.setSingleColumn(i),this.registerNotifyListeners(i))}setSingleColumn(t){this._singleColumn=(null==t?void 0:t.config)===m.CASCADE||(null==t?void 0:t.config)===m.CLASSIC_CASCADE,this._currentFormLayout=null==t?void 0:t.config}registerNotifyListeners(t){t&&t.onConfigChange((t=>{this._singleColumn=t===m.CASCADE||t===m.CLASSIC_CASCADE,this._currentFormLayout=t}))}componentDidRender(){this.setCustomEditors(),this.setFieldProps(),null!=this.fieldToFocus&&this.fields.some((t=>t.name===this.fieldToFocus))&&requestAnimationFrame((()=>{this._dataBinder.setFocus(this.fieldToFocus),this.snkRequestClearFieldToFocus.emit()}))}setCustomEditors(){if(this._formView)for(const[t,i]of this._customEditors)this._formView.addCustomEditor(t,i.customEditor,i.detailContext),this._customEditors.delete(t)}setFieldProps(){if(this._formView)for(const[t,i]of this._fieldProps)i.forEach((i=>{this._formView.setFieldProp(t,i.propName,i.value),this._fieldProps.delete(t)}))}buildSourceRecordPK(t){var i,s;const e=(null===(i=t.payload)||void 0===i?void 0:i[0])||{},o=JSON.parse(atob(e.__record__source__id__||""));delete o.__DATA_UNIT_NAME__;const r=Object.keys(c(this.dataUnit)),n={};for(const t of r)n[t]=null===(s=o[t])||void 0===s?void 0:s.value;return n}getImageField(){return this.dataUnit.metadata.fields.filter((t=>t.userInterface===r.IMAGE))}render(){return s(e,{class:"ez-box__container"},s("div",{class:"summary-header ez-flex ez-size-width--full",ref:t=>this._headerContainer=t},s("div",{class:"ez-flex ez-text ez-title--primary ez-text--bold ez-flex--justify-start ez-flex--align-items-center ez-col--sd-9"},this.levelPath?s("span",{class:"level-path"},this.levelPath+" /"):void 0,this.label),s("div",{class:"ez-flex ez-flex--justify-end ez-col--sd-3"},this.canFix&&s("ez-button",{class:"ez-padding-left--medium",mode:"icon",size:"small",iconName:this.fixed?"un-pin":"push-pin","data-element-id":a.getInternalIDInfo("toggleFixed_ezFormCard"),onClick:()=>this.changeFix(),title:this.fixed?"Desafixar":"Fixar"}),this.canExpand&&s("ez-button",{class:"ez-padding-left--medium",mode:"icon",size:"small",iconName:this.contracted?"chevron-down":"chevron-up","data-element-id":a.getInternalIDInfo("toggleExpand_ezFormCard"),onClick:()=>this.changeContracted(),title:this.contracted?"Expandir":"Resumir"}))),s("slot",null),this.contracted?s("snk-form-summary",{summary:this.getCardSummary()}):s("ez-form-view",{ref:t=>this._formView=t,fields:this.fields,onEzContentReady:t=>this.bindFields(t.detail),onFormItemsReady:t=>this.handleFormItemsReady(t),singleColumn:this._singleColumn,customUiBuilders:this.customUiBuilders,formLayout:this._currentFormLayout}),this.fieldSearch&&s("ez-popover",{ref:t=>this._ezPopoverFieldColumn=t,overlayType:"none"},this.fieldSearch))}static get watchers(){return{customEditors:["observePropsCustomEditor"],fieldsProps:["observeFieldsProps"],dataUnit:["observeDataUnit"]}}};f.style=".sc-snk-form-view-h{display:flex;width:100%;--ez-form-card-summary-field-content-weight:700}.level-path.sc-snk-form-view{color:var(--color--title-primary, #2B3A54);font-weight:var(--text-weight--medium, 400);padding-right:3px}.summary-wrapper.sc-snk-form-view{display:flex;overflow:hidden}.summary-header.sc-snk-form-view{border-bottom:1px solid var(--color--strokes);margin-bottom:var(--space--medium);padding-bottom:var(--space--medium)}.summary-container.sc-snk-form-view{display:flex;flex-direction:column}.summary-container.sc-snk-form-view{padding-right:calc(var(--space--extra-large) / 1.5)}.summary-field.sc-snk-form-view{min-width:30px;max-width:200px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.summary-field__title.sc-snk-form-view{color:var(--text--primary, #626e82);font-size:var(--title--small);white-space:nowrap;font-weight:var(--text-weight--medium)}.summary-field__content.sc-snk-form-view{color:var(--title--primary, #2b3a54);font-size:var(--text--large);font-weight:var(--ez-form-card-summary-field-content-weight)}";export{f as snk_form_view}
1
+ import{r as t,e as i,h as s,f as e}from"./p-2c9d0870.js";import{Action as o,UserInterface as r,ApplicationContext as n,ElementIDUtils as a}from"@sankhyalabs/core";import{DataBinder as h}from"@sankhyalabs/ezui/dist/collection/utils/form";import{focusOnFieldSerch as l,SEARCH_FIELD_FULL_WIDTH as d,FormLayout as m}from"@sankhyalabs/ezui/dist/collection/utils";import{g as c}from"./p-af673291.js";const f=class{constructor(e){t(this,e),this.snkContentCardChanged=i(this,"snkContentCardChanged",7),this.snkRequestClearFieldToFocus=i(this,"snkRequestClearFieldToFocus",7),this.formItemsReady=i(this,"formItemsReady",7),this._customEditors=new Map,this._fieldProps=new Map,this.dataUnitObserver=async t=>{if(t.type===o.RECORDS_COPIED){const i=this.buildSourceRecordPK(t);this.getImageField().forEach((async t=>{this.dataUnit.setFieldValue(t.name,JSON.stringify(i))}))}},this.customUiBuilders=new Map([[r.IMAGE,t=>{var{name:i}=t,e=function(t,i){var s={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&i.indexOf(e)<0&&(s[e]=t[e]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(e=Object.getOwnPropertySymbols(t);o<e.length;o++)i.indexOf(e[o])<0&&Object.prototype.propertyIsEnumerable.call(t,e[o])&&(s[e[o]]=t[e[o]])}return s}(t,["name"]);return s("snk-image-input",Object.assign({dataUnit:this.dataUnit,maxSize:1/0,fieldName:i,entityName:this.entityPath},e))}]]),this._singleColumn=!1,this._currentFormLayout=void 0,this.levelPath=void 0,this.fieldSearch=void 0,this.label=void 0,this.name=void 0,this.fields=void 0,this.formMetadata=void 0,this.dataUnit=void 0,this.contracted=void 0,this.fixed=!1,this.summaryFields=void 0,this.canExpand=!0,this.canFix=!0,this.recordsValidator=void 0,this.fieldToFocus=void 0,this.customEditors=void 0,this.fieldsProps=void 0,this.entityPath=void 0}async showUp(){this._formView&&this._formView.showUp()}async addCustomEditor(t,i,s){if(this._formView)return void this._formView.addCustomEditor(t,i,s);const e=new Map(this._customEditors);e.set(t,{customEditor:i,detailContext:s}),this._customEditors=e}async setFieldProp(t,i,s){const e=this._fieldProps.get(t)||[];this._fieldProps.set(t,[...e,{propName:i,value:s}])}async showSearchField(){if(!this._headerContainer||!this._ezPopoverFieldColumn)return;const t=this._headerContainer.getBoundingClientRect();await l(this.fieldSearch),this._ezPopoverFieldColumn.showUnder(this._headerContainer,{horizontalGap:t.width-d,verticalGap:-1*t.height})}observePropsCustomEditor(t){for(const i in t)this.addCustomEditor(i,t[i])}async observeFieldsProps(t){for(const i in t){const s=t[i],e=Object.keys(s);for(const t of e)await this.setFieldProp(i,t,s[t])}}async observeDataUnit(t,i){t!==i&&t&&t.subscribe(this.dataUnitObserver)}changeFix(){this.fixed=!this.fixed,this.emitEvent("fixed")}changeContracted(){this.contracted=!this.contracted,this.emitEvent("presentation")}emitEvent(t){this.snkContentCardChanged.emit({formName:this.name,cardConfig:{fixed:this.fixed,presentation:this.contracted?"CONTRACTED":"EXPANDED"},propertyChanged:t})}getCardSummary(){const t={};return this.getSummaryFields().forEach((({field:i,label:s})=>{var e;const o=this.dataUnit.getFormattedValue(i);""!==o&&(null==s&&(s=null===(e=this.dataUnit.getField(i))||void 0===e?void 0:e.label),t[s]=o)})),t}getSummaryFields(){return null==this.summaryFields?this.fields.map((t=>{const i=this.dataUnit.getField(t.name);return{field:t.name,label:t.label||(null==i?void 0:i.label)}})):this.summaryFields}bindFields(t){null==this._dataBinder&&null!=this.dataUnit&&(this._dataBinder=new h(this.dataUnit)),this._dataBinder&&this._dataBinder.bind(t,this.dataUnit.dataUnitId,this.formMetadata,this.recordsValidator)}handleFormItemsReady(t){t.stopPropagation(),this.formItemsReady.emit(Object.assign(Object.assign({},t.detail),{formId:this.name}))}disconnectedCallback(){null!=this._dataBinder&&this._dataBinder.onDisconnectedCallback(),this.dataUnit&&this.dataUnit.unsubscribe(this.dataUnitObserver)}async componentWillLoad(){await this.initLayoutFormConfig()}componentDidLoad(){this.observePropsCustomEditor(this.customEditors),this.observeFieldsProps(this.fieldsProps)}async initLayoutFormConfig(){var t;this._application||(this._application=n.getContextValue("__SNK__APPLICATION__"));const i=await(null===(t=this._application)||void 0===t?void 0:t.getLayoutFormConfig());i&&(this.setSingleColumn(i),this.registerNotifyListeners(i))}setSingleColumn(t){this._singleColumn=(null==t?void 0:t.config)===m.CASCADE||(null==t?void 0:t.config)===m.CLASSIC_CASCADE,this._currentFormLayout=null==t?void 0:t.config}registerNotifyListeners(t){t&&t.onConfigChange((t=>{this._singleColumn=t===m.CASCADE||t===m.CLASSIC_CASCADE,this._currentFormLayout=t}))}componentDidRender(){this.setCustomEditors(),this.setFieldProps(),null!=this.fieldToFocus&&this.fields.some((t=>t.name===this.fieldToFocus))&&requestAnimationFrame((()=>{this._dataBinder.setFocus(this.fieldToFocus),this.snkRequestClearFieldToFocus.emit()}))}setCustomEditors(){if(this._formView)for(const[t,i]of this._customEditors)this._formView.addCustomEditor(t,i.customEditor,i.detailContext),this._customEditors.delete(t)}setFieldProps(){if(this._formView)for(const[t,i]of this._fieldProps)i.forEach((i=>{this._formView.setFieldProp(t,i.propName,i.value),this._fieldProps.delete(t)}))}buildSourceRecordPK(t){var i,s;const e=(null===(i=t.payload)||void 0===i?void 0:i[0])||{},o=JSON.parse(atob(e.__record__source__id__||""));delete o.__DATA_UNIT_NAME__;const r=Object.keys(c(this.dataUnit)),n={};for(const t of r)n[t]=null===(s=o[t])||void 0===s?void 0:s.value;return n}getImageField(){return this.dataUnit.metadata.fields.filter((t=>t.userInterface===r.IMAGE))}render(){return s(e,{class:"ez-box__container"},s("div",{class:"summary-header ez-flex ez-size-width--full",ref:t=>this._headerContainer=t},s("div",{class:"ez-flex ez-text ez-title--primary ez-text--bold ez-flex--justify-start ez-flex--align-items-center ez-col--sd-9"},this.levelPath?s("span",{class:"level-path"},this.levelPath+" /"):void 0,this.label),s("div",{class:"ez-flex ez-flex--justify-end ez-col--sd-3"},this.canFix&&s("ez-button",{class:"ez-padding-left--medium",mode:"icon",size:"small",iconName:this.fixed?"un-pin":"push-pin","data-element-id":a.getInternalIDInfo("toggleFixed_ezFormCard"),onClick:()=>this.changeFix(),title:this.fixed?"Desafixar":"Fixar"}),this.canExpand&&s("ez-button",{class:"ez-padding-left--medium",mode:"icon",size:"small",iconName:this.contracted?"chevron-down":"chevron-up","data-element-id":a.getInternalIDInfo("toggleExpand_ezFormCard"),onClick:()=>this.changeContracted(),title:this.contracted?"Expandir":"Resumir"}))),s("slot",null),this.contracted?s("snk-form-summary",{summary:this.getCardSummary()}):s("ez-form-view",{ref:t=>this._formView=t,fields:this.fields,onEzContentReady:t=>this.bindFields(t.detail),onFormItemsReady:t=>this.handleFormItemsReady(t),singleColumn:this._singleColumn,customUiBuilders:this.customUiBuilders,formLayout:this._currentFormLayout}),this.fieldSearch&&s("ez-popover",{ref:t=>this._ezPopoverFieldColumn=t,overlayType:"none"},this.fieldSearch))}static get watchers(){return{customEditors:["observePropsCustomEditor"],fieldsProps:["observeFieldsProps"],dataUnit:["observeDataUnit"]}}};f.style=".sc-snk-form-view-h{display:flex;width:100%;--ez-form-card-summary-field-content-weight:700}.level-path.sc-snk-form-view{color:var(--color--title-primary, #2B3A54);font-weight:var(--text-weight--medium, 400);padding-right:3px}.summary-wrapper.sc-snk-form-view{display:flex;overflow:hidden}.summary-header.sc-snk-form-view{border-bottom:1px solid var(--color--strokes);margin-bottom:var(--space--medium);padding-bottom:var(--space--medium)}.summary-container.sc-snk-form-view{display:flex;flex-direction:column}.summary-container.sc-snk-form-view{padding-right:calc(var(--space--extra-large) / 1.5)}.summary-field.sc-snk-form-view{min-width:30px;max-width:200px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.summary-field__title.sc-snk-form-view{color:var(--text--primary, #626e82);font-size:var(--title--small);white-space:nowrap;font-weight:var(--text-weight--medium)}.summary-field__content.sc-snk-form-view{color:var(--title--primary, #2b3a54);font-size:var(--text--large);font-weight:var(--ez-form-card-summary-field-content-weight)}";export{f as snk_form_view}
@@ -0,0 +1 @@
1
+ import{r as i,e as t,h as s,f as a}from"./p-2c9d0870.js";import{Action as h,ApplicationContext as e}from"@sankhyalabs/core";import{S as n}from"./p-554c0e54.js";import{b as o,s as r,a as d,g as l,d as c}from"./p-af673291.js";const m=class{constructor(s){i(this,s),this.imageError=t(this,"imageError",7),this.dataUnitObserver=async i=>{var t;if([h.NEXT_SELECTED,h.PREVIOUS_SELECTED].includes(i.type))return void await this.loadImage();const s=(null===(t=i.payload)||void 0===t?void 0:t.selection)||[];i.type===h.SELECTION_CHANGED&&s.length>0?await this.loadImage():i.type!==h.RECORDS_ADDED?i.type!==h.EDITION_CANCELED||await this.loadImage():await this.clearImage()},this.dataUnit=void 0,this.fieldName=void 0,this.entityName=void 0,this.enabled=!0,this.acceptType=void 0,this.maxSize=void 0,this.label=void 0,this.imageValue=void 0,this.loading=!0}async reloadImage(i){await this.loadImage(i)}getMessage(i,t){return this.messagesBuilder||(this.messagesBuilder=new n),this.messagesBuilder.getMessage(i,t)}async clearImage(){var i;null===(i=this._loadAbortController)||void 0===i||i.abort(),this.imageValue=void 0}async handleImageChange(i){const t=i.detail;if(!t)return await this.clearImage(),void await this.updatedataUnitField(!0);const s=await o(t);if(this.maxSize&&s.size>1024*this.maxSize){const i=this.getMessage("snkImageInput.errorImageSize")+this.maxSize+"(KB)";return this.imageError.emit(i),void(this.application&&await this.application.error(this.getMessage("snkImageInput.errorTitle"),i))}this.imageValue=t,await r(s,this.entityName,this.fieldName),await this.updatedataUnitField()}async updatedataUnitField(i=!1){this.dataUnit&&this.dataUnit.getSelectedRecord()&&(i?await this.dataUnit.setFieldValue(this.fieldName,"deletado"):await this.dataUnit.setFieldValue(this.fieldName,`$file.session.key{${d(this.entityName,this.fieldName)}}`))}async handleImageError(i){this.imageError.emit(i.detail),this.application&&await this.application.error(this.getMessage("snkImageInput.errorTitle"),i.detail)}getPksFromDataUnit(){if(!this.dataUnit)return;const i=this.dataUnit.getSelectedRecord();if(!i)return;const t=i[this.fieldName];if(t)try{return JSON.parse(t)}catch(i){return void console.error("Error parsing PK from data unit field:",i)}}async loadImage(i){var t,s;null===(t=this._loadAbortController)||void 0===t||t.abort();const a=new AbortController;if(this._loadAbortController=a,this.loading=!0,this.dataUnit&&this.entityName){i=null!==(s=null!=i?i:this.getPksFromDataUnit())&&void 0!==s?s:l(this.dataUnit);const t=await c(i,this.fieldName,this.entityName,a.signal);if(a.signal.aborted)return;this.imageValue=t}this.loading=!1}async componentWillLoad(){this.application=e.getContextValue("__SNK__APPLICATION__"),this.messagesBuilder||(this.messagesBuilder=new n),this.dataUnit&&this.dataUnit.subscribe(this.dataUnitObserver)}disconnectedCallback(){this.dataUnit&&this.dataUnit.unsubscribe(this.dataUnitObserver)}async componentDidLoad(){await this.loadImage()}render(){return s(a,null,s("ez-image-input",{enabled:this.enabled,label:this.label,name:this.fieldName,value:this.imageValue,maxFileSize:this.maxSize?1024*this.maxSize:void 0,accept:this.acceptType||"image/png,image/jpeg,image/gif",onEzChange:i=>this.handleImageChange(i),onEzError:i=>this.handleImageError(i),loading:this.loading}))}};m.style=":host{display:block}";export{m as snk_image_input}
@@ -1 +1 @@
1
- import{p as e,B as a,c as i,a as t,w as o,d as n,N as r,H as l,b as d}from"./p-2c9d0870.js";export{s as setNonce}from"./p-2c9d0870.js";const c=e=>{const a=e.cloneNode;e.cloneNode=function(e){if("TEMPLATE"===this.nodeName)return a.call(this,e);const i=a.call(this,!1),t=this.childNodes;if(e)for(let e=0;e<t.length;e++)2!==t[e].nodeType&&i.appendChild(t[e].cloneNode(!0));return i}};(()=>{a.isDev&&!a.isTesting&&i("Running in development mode."),a.cssVarShim&&(t.i=o.__cssshim),a.cloneNodeFix&&c(l.prototype),a.profile&&!performance.mark&&(performance.mark=performance.measure=()=>{},performance.getEntriesByName=()=>[]);const s=a.scriptDataOpts||a.safari10||a.dynamicImportShim?Array.from(n.querySelectorAll("script")).find((e=>new RegExp(`/${r}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===r)):null,d=import.meta.url,g=a.scriptDataOpts&&s["data-opts"]||{};if(a.safari10&&"onbeforeload"in s&&!history.scrollRestoration)return{then(){}};if(a.safari10||""===d){if((a.dynamicImportShim||a.safari10)&&(g.resourcesUrl=new URL(".",new URL(s.getAttribute("data-resources-url")||s.src,o.location.href)).href,a.dynamicImportShim&&((e,a)=>{const i=`__sc_import_${r.replace(/\s|-/g,"_")}`;try{o[i]=new Function("w",`return import(w);//${Math.random()}`)}catch(s){const r=new Map;o[i]=s=>{var l;const d=new URL(s,e).href;let c=r.get(d);if(!c){const e=n.createElement("script");e.type="module",e.crossOrigin=a.crossOrigin,e.src=URL.createObjectURL(new Blob([`import * as m from '${d}'; window.${i}.m = m;`],{type:"application/javascript"}));const s=null!==(l=t.t)&&void 0!==l?l:function(e){var a,i,t;return null!==(t=null===(i=null===(a=e.head)||void 0===a?void 0:a.querySelector('meta[name="csp-nonce"]'))||void 0===i?void 0:i.getAttribute("content"))&&void 0!==t?t:void 0}(n);null!=s&&e.setAttribute("nonce",s),c=new Promise((a=>{e.onload=()=>{a(o[i].m),e.remove()}})),r.set(d,c),n.head.appendChild(e)}return c}}})(g.resourcesUrl,s),a.dynamicImportShim&&!o.customElements))return import("./p-c3ec6642.js").then((()=>g))}else g.resourcesUrl=new URL(".",d).href;return e(g)})().then((e=>d(JSON.parse('[["p-f921270b",[[2,"snk-actions-form",{"action":[16],"applyParameters":[16],"dataUnit":[32],"openPopup":[64]}]]],["p-ae326d06",[[2,"snk-client-confirm",{"titleMessage":[1,"title-message"],"message":[1],"accept":[16],"cancel":[16],"openPopup":[64]}]]],["p-f152ef98",[[6,"snk-custom-slot-elements",{"slotName":[1,"slot-name"]}]]],["p-3a35917e",[[6,"snk-custom-slot-guide",{"slotName":[1,"slot-name"]},[[8,"snkShowGuide","onGuideChange"],[8,"formConfigVisibilityChanged","onFormConfigVisibilityChange"]]]]],["p-752c57f4",[[2,"snk-entity-list",{"config":[1040],"rightListSlotBuilder":[1040],"maxHeightList":[1,"max-height-list"],"value":[1040],"errorMessage":[1537,"error-message"],"_ezListSource":[32],"reloadList":[64]}]]],["p-90ae6c2e",[[0,"snk-filter-binary-select",{"value":[1544],"config":[16],"presentationMode":[2,"presentation-mode"],"errorMessage":[1537,"error-message"],"resetValues":[64],"clearValue":[64],"setFocus":[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-0a160fb5",[[0,"snk-filter-checkbox-list",{"config":[1040],"errorMessage":[1537,"error-message"],"optionsList":[32],"setFocus":[64],"clearValue":[64]}]]],["p-76729994",[[0,"snk-filter-multi-select",{"value":[1544],"config":[16],"errorMessage":[1537,"error-message"],"setFocus":[64],"clearValue":[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-a2a9f520",[[0,"snk-filter-number",{"config":[16],"getMessage":[16],"value":[1026],"presentationMode":[2,"presentation-mode"],"errorMessage":[1537,"error-message"],"show":[64],"setFocus":[64],"clearValue":[64]},[[0,"ezInput","ezInputListener"]]]]],["p-ee56dda6",[[0,"snk-filter-period",{"config":[16],"getMessage":[16],"value":[1040],"presentationMode":[2,"presentation-mode"],"errorMessage":[1537,"error-message"],"setFocus":[64],"clearValue":[64],"show":[64]}]]],["p-2cc2526e",[[0,"snk-filter-search",{"config":[16],"value":[16],"errorMessage":[1537,"error-message"],"setFocus":[64],"clearValue":[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-d657f71f",[[0,"snk-filter-text",{"config":[16],"value":[1],"errorMessage":[1537,"error-message"],"setFocus":[64],"clearValue":[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-175c9576",[[2,"snk-personalized-filter-editor",{"messagesBuilder":[1040],"presentationMode":[2,"presentation-mode"],"config":[16],"value":[1040],"items":[32],"show":[64]}]]],["p-8d946600",[[2,"snk-print-selector",{"_printServerActive":[32],"_selectedPrinter":[32],"_remotePrintersDataSource":[32],"_localPrintersDataSource":[32],"_printJobData":[32],"openPrintSelector":[64]}]]],["p-20af4b6a",[[2,"pesquisa-grid",{"metadata":[16],"dataSource":[16],"pkField":[1,"pk-field"],"descriptionField":[1,"description-field"],"entityName":[1,"entity-name"],"shouldLoadConfig":[4,"should-load-config"],"_gridConfig":[32],"_inMemoryLoader":[32],"_dataunit":[32]}],[2,"pesquisa-tree",{"treeLoader":[16],"argument":[1025],"allowsNonAnalytic":[4,"allows-non-analytic"],"shouldLoadTree":[4,"should-load-tree"],"messagesBuilder":[1040],"items":[32],"applyFilter":[64]}]]],["p-35317d9a",[[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],"_currentView":[32],"_valideDataSource":[32],"executeSearch":[64]}]]],["p-251aee41",[[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],"_templateSkeleton":[32],"_activeScrimWindow":[32],"getKeyboardManager":[64],"getLayoutFormConfig":[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],"isFeatureActive":[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],"executePreparedSearchPlus":[64],"executePreparedSearch":[64],"executePreparedSearchWithFullResponse":[64],"isDebugMode":[64],"getAppLabel":[64],"addSearchListener":[64],"importScript":[64],"getApplicationPath":[64],"executeSelectDistinct":[64],"getDataFetcher":[64],"whenApplicationReady":[64],"setSearchFilterContext":[64],"clearPopUpTitle":[64],"setPopUpTitle":[64],"showScrimApp":[64],"markToReload":[64],"addLoadingLock":[64]}]]],["p-5aae5c74",[[1,"teste-pesquisa"]]],["p-ce8ccd72",[[0,"snk-entity-search",{"entityName":[1,"entity-name"],"dataUnit":[16],"messagesBuilder":[16],"_searchInputValue":[32],"_showMoreOnSearch":[32],"visibleOptions":[32],"value":[32],"showLoading":[32],"showUnder":[64]}]]],["p-aff2d081",[[2,"snk-personalized-filter",{"messagesBuilder":[1040],"entityUri":[1025,"entity-uri"],"filterId":[1025,"filter-id"],"configName":[1025,"config-name"],"resourceID":[1,"resource-i-d"],"isDefaultFilter":[4,"is-default-filter"],"_filterAssistentMode":[32],"_filterAssistent":[32],"createPersonalizedFilter":[64]}]]],["p-ac384a1e",[[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"],"gridHeaderDynamicSearchSlotId":[1,"grid-header-dynamic-search-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"],"suppressHorizontalScroll":[4,"suppress-horizontal-scroll"],"strategyExporter":[1025,"strategy-exporter"],"useSearchColumn":[4,"use-search-column"],"multipleEditionEnabled":[4,"multiple-edition-enabled"],"paginationCounterMode":[1,"pagination-counter-mode"],"suppressCheckboxColumn":[4,"suppress-checkbox-column"],"suppressFilterColumn":[1028,"suppress-filter-column"],"compact":[4],"filterCustomConfig":[16],"filterCustomConfigInterceptor":[16],"hidePagination":[516,"hide-pagination"],"hideHeader":[516,"hide-header"],"hideGridTaskbar":[516,"hide-grid-taskbar"],"_dataUnit":[32],"_dataState":[32],"_gridConfig":[32],"_popUpGridConfig":[32],"_showSnkFilterBar":[32],"_enableContinuousInsert":[32],"_filterMode":[32],"refreshColumnFilterDataSource":[64],"reloadConfig":[64],"showConfig":[64],"hideConfig":[64],"setConfig":[64],"reloadFilterBar":[64],"getFilterBar":[64],"addCustomEditor":[64],"addGridCustomRender":[64],"addCustomValueFormatter":[64],"removeCustomValueFormatter":[64],"setFocus":[64],"handlePageChange":[64],"locateColumn":[64],"filterColumns":[64]},[[2,"click","handleClick"]]]]],["p-f7170e10",[[2,"configs-button",{"configOptions":[16],"selectedConfig":[16],"hasChanges":[4,"has-changes"],"messagesBuilder":[1040]}]]],["p-95af0bb1",[[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],"validate":[64]}],[2,"snk-form-config",{"dataUnit":[16],"configManager":[16],"ignoreReadOnlyFormFields":[4,"ignore-read-only-form-fields"],"messagesBuilder":[1040],"customGuidesConfig":[16],"availableFields":[32],"guidesList":[32],"groupsList":[32],"selectedGuide":[32],"_formConfig":[32],"configOptions":[32],"originalConfigSelected":[32],"configSelected":[32],"hasChanges":[32],"optionConfigChanged":[32]},[[16,"fieldConfigChanged","handleFieldConfigChanged"],[16,"formConfigOptionSelected","handleFormConfigOptionSelected"],[16,"addFieldToGuide","handleAddFieldToGuide"],[16,"setFieldAsAvailable","handleSetFieldAsAvailable"],[16,"removeFieldFromAvailable","handleRemoveFieldFromAvailable"]]]]],["p-9e109f5e",[[2,"snk-form-summary",{"fixed":[1540],"contracted":[1540],"summary":[16]}]]],["p-8a8900a9",[[6,"snk-form-view",{"levelPath":[1,"level-path"],"fieldSearch":[16],"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],"entityPath":[1,"entity-path"],"_singleColumn":[32],"_currentFormLayout":[32],"showUp":[64],"addCustomEditor":[64],"setFieldProp":[64],"showSearchField":[64]}]]],["p-9742ea0e",[[2,"fields-layout",{"selectedGuide":[16],"groupsList":[16],"guideNames":[16],"dataUnit":[16],"messagesBuilder":[1040],"isEditGuideNameActive":[32],"addFieldToLayout":[64]},[[16,"fieldConfigChanged","handleFieldConfigChanged"]]]]],["p-855ccf64",[[2,"fields-selector",{"availableFields":[16],"dataUnit":[16],"messagesBuilder":[1040],"filterTerm":[32]}]]],["p-2ebda226",[[2,"config-header",{"configOptions":[16],"selectedConfig":[16],"messagesBuilder":[1040],"hasChanges":[4,"has-changes"],"optionConfigChanged":[4,"option-config-changed"],"isEditingGuide":[32],"isEditingGroup":[32]},[[16,"isEditingGuideName","handleIsEditingGuideName"],[16,"isEditingGroupName","handleIsEditingGroupName"]]]]],["p-9e7dc97d",[[2,"guides-configurator",{"guidesList":[16],"selectedGuide":[16],"messagesBuilder":[1040],"mainGuide":[32],"filterTerm":[32],"visibleGuides":[32],"hiddenGuides":[32]}]]],["p-98241c21",[[1,"snk-image-input",{"dataUnit":[16],"fieldName":[1,"field-name"],"entityName":[1,"entity-name"],"enabled":[4],"acceptType":[1,"accept-type"],"maxSize":[2,"max-size"],"label":[1],"imageValue":[32],"loading":[32],"reloadImage":[64]}]]],["p-ab12f544",[[2,"snk-layout-form-config",{"messagesBuilder":[16],"layoutType":[32],"save":[64]}]]],["p-27e0cd68",[[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"],"layoutFormConfig":[4,"layout-form-config"],"entityName":[1,"entity-name"],"disableNumberingConfig":[4,"disable-numbering-config"],"messagesBuilder":[1040],"_opened":[32],"_permissions":[32],"open":[64],"close":[64]}]]],["p-46f75667",[[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]},[[0,"snkMasterFormConfigChange","onMasterFormConfigChange"]]]]],["p-ef9343c3",[[2,"snk-default-filter",{"getMessage":[16],"hasDefaultFilter":[4,"has-default-filter"],"_opened":[32]}]]],["p-438a225f",[[0,"snk-filter-detail",{"config":[1040],"getMessage":[16],"showHardFixed":[4,"show-hard-fixed"],"removalBlocked":[4,"removal-blocked"],"setFocusField":[64],"clearValue":[64]}]]],["p-bab4cde4",[[0,"snk-filter-modal-item",{"filterItem":[1040],"configName":[1025,"config-name"],"resourceID":[1,"resource-i-d"]}]]],["p-e737fd5a",[[0,"snk-exporter-email-sender",{"getMessage":[16],"_config":[32],"_opened":[32],"_currentStep":[32],"open":[64],"close":[64]}]]],["p-7c8bf699",[[2,"snk-data-exporter",{"provider":[16],"messagesBuilder":[1040],"size":[1],"_items":[32],"_showDropdown":[32]}]]],["p-2b3c284c",[[0,"snk-simple-form-config",{"dataUnit":[16],"configName":[1,"config-name"],"messagesBuilder":[16],"avaliableFields":[32],"selectedFields":[32],"show":[64]}],[2,"snk-grid-config",{"selectedIndex":[1026,"selected-index"],"columns":[1040],"originalColumns":[1040],"config":[1040],"configName":[1,"config-name"],"resourceID":[1,"resource-i-d"],"metadata":[16],"_collapsibleBoxListOrder":[32],"_collapsibleBoxListSelect":[32]}],[2,"snk-numbering-config",{"messagesBuilder":[16],"entityName":[1,"entity-name"],"resourceID":[1,"resource-i-d"],"autoNumbering":[32],"initialNumber":[32],"save":[64]}],[2,"snk-actions-button",{"size":[1],"_items":[32],"_showDropdown":[32]}],[1,"snk-select-box",{"selectedOption":[1,"selected-option"],"preventAutoFocus":[4,"prevent-auto-focus"]}],[2,"snk-taskbar-skeleton"],[2,"snk-view-representation",{"mode":[8]}],[2,"taskbar-actions-button",{"title":[1],"enabled":[4],"actions":[16],"size":[1],"_showDropdown":[32],"_openToLeft":[32],"showActions":[64],"hideActions":[64],"isOpened":[64]},[[8,"keydown","handleKeyDown"],[8,"ezOpenModal","handleClose"]]],[2,"taskbar-split-button",{"iconName":[1,"icon-name"],"action":[16],"name":[1],"className":[1,"class-name"],"dataElementId":[1,"data-element-id"],"title":[1],"enabled":[4],"actions":[16],"size":[1],"_showDropdown":[32]}]]],["p-77f608bc",[[6,"snk-taskbar",{"alignRigth":[4,"align-rigth"],"customSlotId":[1,"custom-slot-id"],"additionalSlotId":[1,"additional-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],"actionsSettingsList":[16],"customActionsList":[16],"primaryButton":[1,"primary-button"],"disabledButtons":[16],"dataUnit":[16],"presentationMode":[1537,"presentation-mode"],"messagesBuilder":[1040],"disableSkeleton":[4,"disable-skeleton"],"sizeButtons":[1,"size-buttons"],"_hiddenActionsList":[32],"_isWaitingForSave":[32],"_isLoading":[32]},[[8,"snkCustomSlotElementsLoaded","handleCustomSlotElementsLoaded"],[8,"taskbarSaveLocker","handleTaskbarSaveLocker"],[8,"taskbarSaveUnlocker","handleTaskbarSaveUnlocker"]]]]],["p-ce3b284c",[[6,"snk-simple-crud",{"enableLockManagerLoadingComp":[4,"enable-lock-manager-loading-comp"],"enableLockManagerTaskbarClick":[4,"enable-lock-manager-taskbar-click"],"dataState":[1040],"dataUnit":[16],"entityName":[1,"entity-name"],"mode":[2],"gridConfig":[1040],"formConfig":[1040],"enableContinuousInsert":[1028,"enable-continuous-insert"],"multipleSelection":[4,"multiple-selection"],"useCancelConfirm":[4,"use-cancel-confirm"],"pageSize":[2,"page-size"],"resourceID":[1,"resource-i-d"],"enableGridInsert":[4,"enable-grid-insert"],"paginationCounterMode":[1,"pagination-counter-mode"],"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"],"multipleEditionEnabled":[4,"multiple-edition-enabled"],"layoutFormConfig":[4,"layout-form-config"],"disableGridEdition":[4,"disable-grid-edition"],"autoLoad":[4,"auto-load"],"outlineMode":[4,"outline-mode"],"_container":[32],"_showPopUpGridConfig":[32],"_currentViewMode":[32],"_config":[32],"_fieldToGetFocus":[32],"_customContainerId":[32],"_formFields":[32],"_fieldsProps":[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-b3b51693",[[2,"snk-attach",{"gridLegacyConfigName":[1,"grid-legacy-config-name"],"fetcherType":[1025,"fetcher-type"],"fetcher":[16],"dataUnit":[16],"dataUnitBuilder":[16],"registerKey":[1,"register-key"],"entityName":[1,"entity-name"],"messagesBuilder":[1040],"_isOpen":[32],"_currentFetcher":[32],"_currentDataUnit":[32],"crudConfig":[32],"open":[64],"close":[64]}]]],["p-cd00a3d1",[[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-cc64239c",[[2,"snk-expression-group",{"parentTop":[1026,"parent-top"],"group":[1040],"messagesBuilder":[1040],"filterId":[1025,"filter-id"],"entityURI":[1025,"entity-u-r-i"],"isDefaultFilter":[4,"is-default-filter"],"_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],"isDefaultFilter":[4,"is-default-filter"],"entityURI":[1025,"entity-u-r-i"],"_showValueVariable":[32],"_fieldSelected":[32],"_optionNotNull":[32]}]]],["p-6ae7543b",[[2,"snk-filter-assistent-mode",{"filterAssistent":[1040],"messagesBuilder":[1040],"filterId":[1025,"filter-id"],"entityUri":[1025,"entity-uri"],"application":[1040],"isDefaultFilter":[4,"is-default-filter"]}],[2,"snk-filter-advanced-mode",{"filterAssistent":[1040],"application":[1040]}],[6,"snk-simple-bar",{"label":[1],"breadcrumbItens":[16],"messagesBuilder":[1040]}]]],["p-10f27dc6",[[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],"filterCustomConfig":[16],"filterCustomConfigInterceptor":[16],"hideFilterButton":[4,"hide-filter-button"],"sizeChips":[1,"size-chips"],"allowDefault":[32],"scrollerLocked":[32],"showPersonalizedFilter":[32],"personalizedFilterId":[32],"isFilterModalOpen":[32],"reload":[64],"getFilterItem":[64],"updateFilterItem":[64],"addFilterItem":[64],"removeFilterItem":[64],"getFilters":[64],"showFilterModal":[64]},[[0,"filterChange","filterChangeListener"],[8,"ezEmptySearch","emptySearchListener"]]],[0,"snk-filter-modal",{"getMessage":[16],"configName":[1025,"config-name"],"filterConfig":[1040],"opened":[4],"applyFilters":[16],"closeModal":[16],"addPersonalizedFilter":[16],"editPersonalizedFilter":[16],"deletePersonalizedFilter":[16],"filtersToDelete":[1040],"filterDefaultToDelete":[1040],"disablePersonalizedFilter":[4,"disable-personalized-filter"],"filterCustomConfigInterceptor":[16],"filtersWithError":[32]},[[0,"deleteFilter","deletePersonalizedFilterListener"]]],[2,"snk-filter-item",{"config":[1040],"getMessage":[16],"showChips":[4,"show-chips"],"sizeChips":[1,"size-chips"],"detailIsVisible":[32],"showUp":[64],"hideDetail":[64]},[[0,"filterChange","filterChangeListener"]]]]],["p-efd18bc2",[[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],"presentationMode":[1,"presentation-mode"],"_disabledButtons":[32],"_currentView":[32],"attachmentRegisterKey":[32],"_fieldToGetFocus":[32],"_hasToCreateFieldSearch":[32],"changeViewMode":[64],"configGrid":[64],"showUp":[64],"addCustomEditor":[64],"addGridCustomRender":[64]},[[0,"snkContentCardChanged","onContentCardChanged"]]]]],["p-b555ce38",[[2,"field-item",{"fieldConfig":[8,"field-config"],"onLayoutConfig":[4,"on-layout-config"],"dataUnit":[16],"messagesBuilder":[1040],"fieldDescriptor":[32]}],[2,"field-config",{"dataUnit":[16],"fieldConfig":[1544,"field-config"],"fieldDescriptor":[16],"messagesBuilder":[1040],"fieldLabel":[32],"fieldLabelErrorMessage":[32],"fieldDefaultValue":[32],"fieldCleanOnCopy":[32],"fieldRequired":[32],"fieldReadOnly":[32],"_defaultType":[32],"show":[64]}]]],["p-33492640",[[6,"snk-guides-viewer",{"dataUnit":[16],"dataState":[16],"configName":[1,"config-name"],"entityPath":[1,"entity-path"],"actionsList":[16],"recordsValidator":[16],"masterFormConfig":[1040],"selectedGuide":[1040],"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],"customGuidesConfig":[16],"_hasToCreateFieldSearch":[32],"_breadcrumbItems":[32],"_guides":[32],"_formEditorConfigManager":[32],"_formEditorDataUnit":[32],"_fieldToGetFocus":[32],"_customEditors":[32],"_customRenders":[32],"_fieldsProps":[32],"_mainForm":[32],"showFormConfig":[64],"addCustomEditor":[64],"addGridCustomRender":[64],"setFieldProp":[64],"setFocus":[64],"reloadGuides":[64]},[[2,"actionClick","onActionClick"],[0,"snkContentCardChanged","onContentCardChanged"]]]]],["p-1086fb0c",[[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],"strategyExporter":[1025,"strategy-exporter"],"layoutFormConfig":[4,"layout-form-config"],"multipleEditionEnabled":[4,"multiple-edition-enabled"],"paginationCounterMode":[1,"pagination-counter-mode"],"customGuidesConfig":[16],"showEntitySearch":[4,"show-entity-search"],"disableNumberingConfig":[4,"disable-numbering-config"],"_dataUnit":[32],"_dataState":[32],"attachmentRegisterKey":[32],"_currentViewMode":[32],"_canEdit":[32],"_resourceID":[32],"customContainerId":[32],"numberingConfig":[32],"_filterMode":[32],"_enableContinuousInsert":[32],"_headerVisible":[32],"goToView":[64],"openConfigurator":[64],"closeConfigurator":[64],"reloadFilterBar":[64],"getFilterBar":[64],"addCustomEditor":[64],"addGridCustomRender":[64],"addCustomValueFormatter":[64],"removeCustomValueFormatter":[64],"setFieldProp":[64],"getNumberingConfig":[64],"updateNumberingConfig":[64]},[[0,"actionClick","handleActionClick"]]]]]]'),e)));
1
+ import{p as e,B as a,c as i,a as t,w as o,d as n,N as r,H as l,b as d}from"./p-2c9d0870.js";export{s as setNonce}from"./p-2c9d0870.js";const c=e=>{const a=e.cloneNode;e.cloneNode=function(e){if("TEMPLATE"===this.nodeName)return a.call(this,e);const i=a.call(this,!1),t=this.childNodes;if(e)for(let e=0;e<t.length;e++)2!==t[e].nodeType&&i.appendChild(t[e].cloneNode(!0));return i}};(()=>{a.isDev&&!a.isTesting&&i("Running in development mode."),a.cssVarShim&&(t.i=o.__cssshim),a.cloneNodeFix&&c(l.prototype),a.profile&&!performance.mark&&(performance.mark=performance.measure=()=>{},performance.getEntriesByName=()=>[]);const s=a.scriptDataOpts||a.safari10||a.dynamicImportShim?Array.from(n.querySelectorAll("script")).find((e=>new RegExp(`/${r}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===r)):null,d=import.meta.url,g=a.scriptDataOpts&&s["data-opts"]||{};if(a.safari10&&"onbeforeload"in s&&!history.scrollRestoration)return{then(){}};if(a.safari10||""===d){if((a.dynamicImportShim||a.safari10)&&(g.resourcesUrl=new URL(".",new URL(s.getAttribute("data-resources-url")||s.src,o.location.href)).href,a.dynamicImportShim&&((e,a)=>{const i=`__sc_import_${r.replace(/\s|-/g,"_")}`;try{o[i]=new Function("w",`return import(w);//${Math.random()}`)}catch(s){const r=new Map;o[i]=s=>{var l;const d=new URL(s,e).href;let c=r.get(d);if(!c){const e=n.createElement("script");e.type="module",e.crossOrigin=a.crossOrigin,e.src=URL.createObjectURL(new Blob([`import * as m from '${d}'; window.${i}.m = m;`],{type:"application/javascript"}));const s=null!==(l=t.t)&&void 0!==l?l:function(e){var a,i,t;return null!==(t=null===(i=null===(a=e.head)||void 0===a?void 0:a.querySelector('meta[name="csp-nonce"]'))||void 0===i?void 0:i.getAttribute("content"))&&void 0!==t?t:void 0}(n);null!=s&&e.setAttribute("nonce",s),c=new Promise((a=>{e.onload=()=>{a(o[i].m),e.remove()}})),r.set(d,c),n.head.appendChild(e)}return c}}})(g.resourcesUrl,s),a.dynamicImportShim&&!o.customElements))return import("./p-c3ec6642.js").then((()=>g))}else g.resourcesUrl=new URL(".",d).href;return e(g)})().then((e=>d(JSON.parse('[["p-f921270b",[[2,"snk-actions-form",{"action":[16],"applyParameters":[16],"dataUnit":[32],"openPopup":[64]}]]],["p-ae326d06",[[2,"snk-client-confirm",{"titleMessage":[1,"title-message"],"message":[1],"accept":[16],"cancel":[16],"openPopup":[64]}]]],["p-f152ef98",[[6,"snk-custom-slot-elements",{"slotName":[1,"slot-name"]}]]],["p-3a35917e",[[6,"snk-custom-slot-guide",{"slotName":[1,"slot-name"]},[[8,"snkShowGuide","onGuideChange"],[8,"formConfigVisibilityChanged","onFormConfigVisibilityChange"]]]]],["p-752c57f4",[[2,"snk-entity-list",{"config":[1040],"rightListSlotBuilder":[1040],"maxHeightList":[1,"max-height-list"],"value":[1040],"errorMessage":[1537,"error-message"],"_ezListSource":[32],"reloadList":[64]}]]],["p-90ae6c2e",[[0,"snk-filter-binary-select",{"value":[1544],"config":[16],"presentationMode":[2,"presentation-mode"],"errorMessage":[1537,"error-message"],"resetValues":[64],"clearValue":[64],"setFocus":[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-0a160fb5",[[0,"snk-filter-checkbox-list",{"config":[1040],"errorMessage":[1537,"error-message"],"optionsList":[32],"setFocus":[64],"clearValue":[64]}]]],["p-76729994",[[0,"snk-filter-multi-select",{"value":[1544],"config":[16],"errorMessage":[1537,"error-message"],"setFocus":[64],"clearValue":[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-a2a9f520",[[0,"snk-filter-number",{"config":[16],"getMessage":[16],"value":[1026],"presentationMode":[2,"presentation-mode"],"errorMessage":[1537,"error-message"],"show":[64],"setFocus":[64],"clearValue":[64]},[[0,"ezInput","ezInputListener"]]]]],["p-ee56dda6",[[0,"snk-filter-period",{"config":[16],"getMessage":[16],"value":[1040],"presentationMode":[2,"presentation-mode"],"errorMessage":[1537,"error-message"],"setFocus":[64],"clearValue":[64],"show":[64]}]]],["p-2cc2526e",[[0,"snk-filter-search",{"config":[16],"value":[16],"errorMessage":[1537,"error-message"],"setFocus":[64],"clearValue":[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-d657f71f",[[0,"snk-filter-text",{"config":[16],"value":[1],"errorMessage":[1537,"error-message"],"setFocus":[64],"clearValue":[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-175c9576",[[2,"snk-personalized-filter-editor",{"messagesBuilder":[1040],"presentationMode":[2,"presentation-mode"],"config":[16],"value":[1040],"items":[32],"show":[64]}]]],["p-8d946600",[[2,"snk-print-selector",{"_printServerActive":[32],"_selectedPrinter":[32],"_remotePrintersDataSource":[32],"_localPrintersDataSource":[32],"_printJobData":[32],"openPrintSelector":[64]}]]],["p-20af4b6a",[[2,"pesquisa-grid",{"metadata":[16],"dataSource":[16],"pkField":[1,"pk-field"],"descriptionField":[1,"description-field"],"entityName":[1,"entity-name"],"shouldLoadConfig":[4,"should-load-config"],"_gridConfig":[32],"_inMemoryLoader":[32],"_dataunit":[32]}],[2,"pesquisa-tree",{"treeLoader":[16],"argument":[1025],"allowsNonAnalytic":[4,"allows-non-analytic"],"shouldLoadTree":[4,"should-load-tree"],"messagesBuilder":[1040],"items":[32],"applyFilter":[64]}]]],["p-35317d9a",[[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],"_currentView":[32],"_valideDataSource":[32],"executeSearch":[64]}]]],["p-251aee41",[[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],"_templateSkeleton":[32],"_activeScrimWindow":[32],"getKeyboardManager":[64],"getLayoutFormConfig":[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],"isFeatureActive":[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],"executePreparedSearchPlus":[64],"executePreparedSearch":[64],"executePreparedSearchWithFullResponse":[64],"isDebugMode":[64],"getAppLabel":[64],"addSearchListener":[64],"importScript":[64],"getApplicationPath":[64],"executeSelectDistinct":[64],"getDataFetcher":[64],"whenApplicationReady":[64],"setSearchFilterContext":[64],"clearPopUpTitle":[64],"setPopUpTitle":[64],"showScrimApp":[64],"markToReload":[64],"addLoadingLock":[64]}]]],["p-5aae5c74",[[1,"teste-pesquisa"]]],["p-ce8ccd72",[[0,"snk-entity-search",{"entityName":[1,"entity-name"],"dataUnit":[16],"messagesBuilder":[16],"_searchInputValue":[32],"_showMoreOnSearch":[32],"visibleOptions":[32],"value":[32],"showLoading":[32],"showUnder":[64]}]]],["p-aff2d081",[[2,"snk-personalized-filter",{"messagesBuilder":[1040],"entityUri":[1025,"entity-uri"],"filterId":[1025,"filter-id"],"configName":[1025,"config-name"],"resourceID":[1,"resource-i-d"],"isDefaultFilter":[4,"is-default-filter"],"_filterAssistentMode":[32],"_filterAssistent":[32],"createPersonalizedFilter":[64]}]]],["p-ac384a1e",[[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"],"gridHeaderDynamicSearchSlotId":[1,"grid-header-dynamic-search-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"],"suppressHorizontalScroll":[4,"suppress-horizontal-scroll"],"strategyExporter":[1025,"strategy-exporter"],"useSearchColumn":[4,"use-search-column"],"multipleEditionEnabled":[4,"multiple-edition-enabled"],"paginationCounterMode":[1,"pagination-counter-mode"],"suppressCheckboxColumn":[4,"suppress-checkbox-column"],"suppressFilterColumn":[1028,"suppress-filter-column"],"compact":[4],"filterCustomConfig":[16],"filterCustomConfigInterceptor":[16],"hidePagination":[516,"hide-pagination"],"hideHeader":[516,"hide-header"],"hideGridTaskbar":[516,"hide-grid-taskbar"],"_dataUnit":[32],"_dataState":[32],"_gridConfig":[32],"_popUpGridConfig":[32],"_showSnkFilterBar":[32],"_enableContinuousInsert":[32],"_filterMode":[32],"refreshColumnFilterDataSource":[64],"reloadConfig":[64],"showConfig":[64],"hideConfig":[64],"setConfig":[64],"reloadFilterBar":[64],"getFilterBar":[64],"addCustomEditor":[64],"addGridCustomRender":[64],"addCustomValueFormatter":[64],"removeCustomValueFormatter":[64],"setFocus":[64],"handlePageChange":[64],"locateColumn":[64],"filterColumns":[64]},[[2,"click","handleClick"]]]]],["p-f7170e10",[[2,"configs-button",{"configOptions":[16],"selectedConfig":[16],"hasChanges":[4,"has-changes"],"messagesBuilder":[1040]}]]],["p-95af0bb1",[[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],"validate":[64]}],[2,"snk-form-config",{"dataUnit":[16],"configManager":[16],"ignoreReadOnlyFormFields":[4,"ignore-read-only-form-fields"],"messagesBuilder":[1040],"customGuidesConfig":[16],"availableFields":[32],"guidesList":[32],"groupsList":[32],"selectedGuide":[32],"_formConfig":[32],"configOptions":[32],"originalConfigSelected":[32],"configSelected":[32],"hasChanges":[32],"optionConfigChanged":[32]},[[16,"fieldConfigChanged","handleFieldConfigChanged"],[16,"formConfigOptionSelected","handleFormConfigOptionSelected"],[16,"addFieldToGuide","handleAddFieldToGuide"],[16,"setFieldAsAvailable","handleSetFieldAsAvailable"],[16,"removeFieldFromAvailable","handleRemoveFieldFromAvailable"]]]]],["p-9e109f5e",[[2,"snk-form-summary",{"fixed":[1540],"contracted":[1540],"summary":[16]}]]],["p-ca3728c0",[[6,"snk-form-view",{"levelPath":[1,"level-path"],"fieldSearch":[16],"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],"entityPath":[1,"entity-path"],"_singleColumn":[32],"_currentFormLayout":[32],"showUp":[64],"addCustomEditor":[64],"setFieldProp":[64],"showSearchField":[64]}]]],["p-9742ea0e",[[2,"fields-layout",{"selectedGuide":[16],"groupsList":[16],"guideNames":[16],"dataUnit":[16],"messagesBuilder":[1040],"isEditGuideNameActive":[32],"addFieldToLayout":[64]},[[16,"fieldConfigChanged","handleFieldConfigChanged"]]]]],["p-855ccf64",[[2,"fields-selector",{"availableFields":[16],"dataUnit":[16],"messagesBuilder":[1040],"filterTerm":[32]}]]],["p-2ebda226",[[2,"config-header",{"configOptions":[16],"selectedConfig":[16],"messagesBuilder":[1040],"hasChanges":[4,"has-changes"],"optionConfigChanged":[4,"option-config-changed"],"isEditingGuide":[32],"isEditingGroup":[32]},[[16,"isEditingGuideName","handleIsEditingGuideName"],[16,"isEditingGroupName","handleIsEditingGroupName"]]]]],["p-9e7dc97d",[[2,"guides-configurator",{"guidesList":[16],"selectedGuide":[16],"messagesBuilder":[1040],"mainGuide":[32],"filterTerm":[32],"visibleGuides":[32],"hiddenGuides":[32]}]]],["p-d9ec8c4b",[[1,"snk-image-input",{"dataUnit":[16],"fieldName":[1,"field-name"],"entityName":[1,"entity-name"],"enabled":[4],"acceptType":[1,"accept-type"],"maxSize":[2,"max-size"],"label":[1],"imageValue":[32],"loading":[32],"reloadImage":[64]}]]],["p-ab12f544",[[2,"snk-layout-form-config",{"messagesBuilder":[16],"layoutType":[32],"save":[64]}]]],["p-27e0cd68",[[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"],"layoutFormConfig":[4,"layout-form-config"],"entityName":[1,"entity-name"],"disableNumberingConfig":[4,"disable-numbering-config"],"messagesBuilder":[1040],"_opened":[32],"_permissions":[32],"open":[64],"close":[64]}]]],["p-46f75667",[[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]},[[0,"snkMasterFormConfigChange","onMasterFormConfigChange"]]]]],["p-ef9343c3",[[2,"snk-default-filter",{"getMessage":[16],"hasDefaultFilter":[4,"has-default-filter"],"_opened":[32]}]]],["p-438a225f",[[0,"snk-filter-detail",{"config":[1040],"getMessage":[16],"showHardFixed":[4,"show-hard-fixed"],"removalBlocked":[4,"removal-blocked"],"setFocusField":[64],"clearValue":[64]}]]],["p-bab4cde4",[[0,"snk-filter-modal-item",{"filterItem":[1040],"configName":[1025,"config-name"],"resourceID":[1,"resource-i-d"]}]]],["p-e737fd5a",[[0,"snk-exporter-email-sender",{"getMessage":[16],"_config":[32],"_opened":[32],"_currentStep":[32],"open":[64],"close":[64]}]]],["p-7c8bf699",[[2,"snk-data-exporter",{"provider":[16],"messagesBuilder":[1040],"size":[1],"_items":[32],"_showDropdown":[32]}]]],["p-2b3c284c",[[0,"snk-simple-form-config",{"dataUnit":[16],"configName":[1,"config-name"],"messagesBuilder":[16],"avaliableFields":[32],"selectedFields":[32],"show":[64]}],[2,"snk-grid-config",{"selectedIndex":[1026,"selected-index"],"columns":[1040],"originalColumns":[1040],"config":[1040],"configName":[1,"config-name"],"resourceID":[1,"resource-i-d"],"metadata":[16],"_collapsibleBoxListOrder":[32],"_collapsibleBoxListSelect":[32]}],[2,"snk-numbering-config",{"messagesBuilder":[16],"entityName":[1,"entity-name"],"resourceID":[1,"resource-i-d"],"autoNumbering":[32],"initialNumber":[32],"save":[64]}],[2,"snk-actions-button",{"size":[1],"_items":[32],"_showDropdown":[32]}],[1,"snk-select-box",{"selectedOption":[1,"selected-option"],"preventAutoFocus":[4,"prevent-auto-focus"]}],[2,"snk-taskbar-skeleton"],[2,"snk-view-representation",{"mode":[8]}],[2,"taskbar-actions-button",{"title":[1],"enabled":[4],"actions":[16],"size":[1],"_showDropdown":[32],"_openToLeft":[32],"showActions":[64],"hideActions":[64],"isOpened":[64]},[[8,"keydown","handleKeyDown"],[8,"ezOpenModal","handleClose"]]],[2,"taskbar-split-button",{"iconName":[1,"icon-name"],"action":[16],"name":[1],"className":[1,"class-name"],"dataElementId":[1,"data-element-id"],"title":[1],"enabled":[4],"actions":[16],"size":[1],"_showDropdown":[32]}]]],["p-77f608bc",[[6,"snk-taskbar",{"alignRigth":[4,"align-rigth"],"customSlotId":[1,"custom-slot-id"],"additionalSlotId":[1,"additional-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],"actionsSettingsList":[16],"customActionsList":[16],"primaryButton":[1,"primary-button"],"disabledButtons":[16],"dataUnit":[16],"presentationMode":[1537,"presentation-mode"],"messagesBuilder":[1040],"disableSkeleton":[4,"disable-skeleton"],"sizeButtons":[1,"size-buttons"],"_hiddenActionsList":[32],"_isWaitingForSave":[32],"_isLoading":[32]},[[8,"snkCustomSlotElementsLoaded","handleCustomSlotElementsLoaded"],[8,"taskbarSaveLocker","handleTaskbarSaveLocker"],[8,"taskbarSaveUnlocker","handleTaskbarSaveUnlocker"]]]]],["p-ce3b284c",[[6,"snk-simple-crud",{"enableLockManagerLoadingComp":[4,"enable-lock-manager-loading-comp"],"enableLockManagerTaskbarClick":[4,"enable-lock-manager-taskbar-click"],"dataState":[1040],"dataUnit":[16],"entityName":[1,"entity-name"],"mode":[2],"gridConfig":[1040],"formConfig":[1040],"enableContinuousInsert":[1028,"enable-continuous-insert"],"multipleSelection":[4,"multiple-selection"],"useCancelConfirm":[4,"use-cancel-confirm"],"pageSize":[2,"page-size"],"resourceID":[1,"resource-i-d"],"enableGridInsert":[4,"enable-grid-insert"],"paginationCounterMode":[1,"pagination-counter-mode"],"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"],"multipleEditionEnabled":[4,"multiple-edition-enabled"],"layoutFormConfig":[4,"layout-form-config"],"disableGridEdition":[4,"disable-grid-edition"],"autoLoad":[4,"auto-load"],"outlineMode":[4,"outline-mode"],"_container":[32],"_showPopUpGridConfig":[32],"_currentViewMode":[32],"_config":[32],"_fieldToGetFocus":[32],"_customContainerId":[32],"_formFields":[32],"_fieldsProps":[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-b3b51693",[[2,"snk-attach",{"gridLegacyConfigName":[1,"grid-legacy-config-name"],"fetcherType":[1025,"fetcher-type"],"fetcher":[16],"dataUnit":[16],"dataUnitBuilder":[16],"registerKey":[1,"register-key"],"entityName":[1,"entity-name"],"messagesBuilder":[1040],"_isOpen":[32],"_currentFetcher":[32],"_currentDataUnit":[32],"crudConfig":[32],"open":[64],"close":[64]}]]],["p-cd00a3d1",[[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-cc64239c",[[2,"snk-expression-group",{"parentTop":[1026,"parent-top"],"group":[1040],"messagesBuilder":[1040],"filterId":[1025,"filter-id"],"entityURI":[1025,"entity-u-r-i"],"isDefaultFilter":[4,"is-default-filter"],"_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],"isDefaultFilter":[4,"is-default-filter"],"entityURI":[1025,"entity-u-r-i"],"_showValueVariable":[32],"_fieldSelected":[32],"_optionNotNull":[32]}]]],["p-6ae7543b",[[2,"snk-filter-assistent-mode",{"filterAssistent":[1040],"messagesBuilder":[1040],"filterId":[1025,"filter-id"],"entityUri":[1025,"entity-uri"],"application":[1040],"isDefaultFilter":[4,"is-default-filter"]}],[2,"snk-filter-advanced-mode",{"filterAssistent":[1040],"application":[1040]}],[6,"snk-simple-bar",{"label":[1],"breadcrumbItens":[16],"messagesBuilder":[1040]}]]],["p-10f27dc6",[[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],"filterCustomConfig":[16],"filterCustomConfigInterceptor":[16],"hideFilterButton":[4,"hide-filter-button"],"sizeChips":[1,"size-chips"],"allowDefault":[32],"scrollerLocked":[32],"showPersonalizedFilter":[32],"personalizedFilterId":[32],"isFilterModalOpen":[32],"reload":[64],"getFilterItem":[64],"updateFilterItem":[64],"addFilterItem":[64],"removeFilterItem":[64],"getFilters":[64],"showFilterModal":[64]},[[0,"filterChange","filterChangeListener"],[8,"ezEmptySearch","emptySearchListener"]]],[0,"snk-filter-modal",{"getMessage":[16],"configName":[1025,"config-name"],"filterConfig":[1040],"opened":[4],"applyFilters":[16],"closeModal":[16],"addPersonalizedFilter":[16],"editPersonalizedFilter":[16],"deletePersonalizedFilter":[16],"filtersToDelete":[1040],"filterDefaultToDelete":[1040],"disablePersonalizedFilter":[4,"disable-personalized-filter"],"filterCustomConfigInterceptor":[16],"filtersWithError":[32]},[[0,"deleteFilter","deletePersonalizedFilterListener"]]],[2,"snk-filter-item",{"config":[1040],"getMessage":[16],"showChips":[4,"show-chips"],"sizeChips":[1,"size-chips"],"detailIsVisible":[32],"showUp":[64],"hideDetail":[64]},[[0,"filterChange","filterChangeListener"]]]]],["p-efd18bc2",[[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],"presentationMode":[1,"presentation-mode"],"_disabledButtons":[32],"_currentView":[32],"attachmentRegisterKey":[32],"_fieldToGetFocus":[32],"_hasToCreateFieldSearch":[32],"changeViewMode":[64],"configGrid":[64],"showUp":[64],"addCustomEditor":[64],"addGridCustomRender":[64]},[[0,"snkContentCardChanged","onContentCardChanged"]]]]],["p-b555ce38",[[2,"field-item",{"fieldConfig":[8,"field-config"],"onLayoutConfig":[4,"on-layout-config"],"dataUnit":[16],"messagesBuilder":[1040],"fieldDescriptor":[32]}],[2,"field-config",{"dataUnit":[16],"fieldConfig":[1544,"field-config"],"fieldDescriptor":[16],"messagesBuilder":[1040],"fieldLabel":[32],"fieldLabelErrorMessage":[32],"fieldDefaultValue":[32],"fieldCleanOnCopy":[32],"fieldRequired":[32],"fieldReadOnly":[32],"_defaultType":[32],"show":[64]}]]],["p-33492640",[[6,"snk-guides-viewer",{"dataUnit":[16],"dataState":[16],"configName":[1,"config-name"],"entityPath":[1,"entity-path"],"actionsList":[16],"recordsValidator":[16],"masterFormConfig":[1040],"selectedGuide":[1040],"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],"customGuidesConfig":[16],"_hasToCreateFieldSearch":[32],"_breadcrumbItems":[32],"_guides":[32],"_formEditorConfigManager":[32],"_formEditorDataUnit":[32],"_fieldToGetFocus":[32],"_customEditors":[32],"_customRenders":[32],"_fieldsProps":[32],"_mainForm":[32],"showFormConfig":[64],"addCustomEditor":[64],"addGridCustomRender":[64],"setFieldProp":[64],"setFocus":[64],"reloadGuides":[64]},[[2,"actionClick","onActionClick"],[0,"snkContentCardChanged","onContentCardChanged"]]]]],["p-1086fb0c",[[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],"strategyExporter":[1025,"strategy-exporter"],"layoutFormConfig":[4,"layout-form-config"],"multipleEditionEnabled":[4,"multiple-edition-enabled"],"paginationCounterMode":[1,"pagination-counter-mode"],"customGuidesConfig":[16],"showEntitySearch":[4,"show-entity-search"],"disableNumberingConfig":[4,"disable-numbering-config"],"_dataUnit":[32],"_dataState":[32],"attachmentRegisterKey":[32],"_currentViewMode":[32],"_canEdit":[32],"_resourceID":[32],"customContainerId":[32],"numberingConfig":[32],"_filterMode":[32],"_enableContinuousInsert":[32],"_headerVisible":[32],"goToView":[64],"openConfigurator":[64],"closeConfigurator":[64],"reloadFilterBar":[64],"getFilterBar":[64],"addCustomEditor":[64],"addGridCustomRender":[64],"addCustomValueFormatter":[64],"removeCustomValueFormatter":[64],"setFieldProp":[64],"getNumberingConfig":[64],"updateNumberingConfig":[64]},[[0,"actionClick","handleActionClick"]]]]]]'),e)));
@@ -3,6 +3,7 @@ import { EventEmitter } from '../../stencil-public-runtime';
3
3
  export declare class SnkImageInput {
4
4
  private application;
5
5
  private messagesBuilder?;
6
+ private _loadAbortController?;
6
7
  /**
7
8
  * DataUnit associado ao componente
8
9
  */
@@ -12,4 +12,4 @@ export declare function getBaseUrl(pk: {
12
12
  }, entityName: string, fieldName: string): string | undefined;
13
13
  export declare function getPKs(dataUnit: DataUnit): Record<string, any> | undefined;
14
14
  export declare function imageBlobToBase64(blob: Blob): Promise<string>;
15
- export declare function downloadImage(pks: Record<string, any>, fieldName: string, entityName: string): Promise<string>;
15
+ export declare function downloadImage(pks: Record<string, any>, fieldName: string, entityName: string, signal?: AbortSignal): Promise<string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sankhyalabs/sankhyablocks",
3
- "version": "10.1.0-dev.44",
3
+ "version": "10.1.0-dev.45",
4
4
  "description": "Stencil Component Starter",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -1 +0,0 @@
1
- import{r as i,e as t,h as s,f as a}from"./p-2c9d0870.js";import{Action as h,ApplicationContext as e}from"@sankhyalabs/core";import{S as n}from"./p-554c0e54.js";import{b as o,s as r,a as d,g as c,d as l}from"./p-420b39b5.js";const m=class{constructor(s){i(this,s),this.imageError=t(this,"imageError",7),this.dataUnitObserver=async i=>{var t;if([h.NEXT_SELECTED,h.PREVIOUS_SELECTED].includes(i.type))return void await this.loadImage();const s=(null===(t=i.payload)||void 0===t?void 0:t.selection)||[];i.type===h.SELECTION_CHANGED&&s.length>0?await this.loadImage():i.type!==h.RECORDS_ADDED||await this.clearImage()},this.dataUnit=void 0,this.fieldName=void 0,this.entityName=void 0,this.enabled=!0,this.acceptType=void 0,this.maxSize=void 0,this.label=void 0,this.imageValue=void 0,this.loading=!0}async reloadImage(i){await this.loadImage(i)}getMessage(i,t){return this.messagesBuilder||(this.messagesBuilder=new n),this.messagesBuilder.getMessage(i,t)}async clearImage(){this.imageValue=void 0}async handleImageChange(i){const t=i.detail;if(!t)return await this.clearImage(),void await this.updatedataUnitField(!0);const s=await o(t);if(this.maxSize&&s.size>1024*this.maxSize){const i=this.getMessage("snkImageInput.errorImageSize")+this.maxSize+"(KB)";return this.imageError.emit(i),void(this.application&&await this.application.error(this.getMessage("snkImageInput.errorTitle"),i))}this.imageValue=t,await r(s,this.entityName,this.fieldName),await this.updatedataUnitField()}async updatedataUnitField(i=!1){this.dataUnit&&this.dataUnit.getSelectedRecord()&&(i?await this.dataUnit.setFieldValue(this.fieldName,"deletado"):await this.dataUnit.setFieldValue(this.fieldName,`$file.session.key{${d(this.entityName,this.fieldName)}}`))}async handleImageError(i){this.imageError.emit(i.detail),this.application&&await this.application.error(this.getMessage("snkImageInput.errorTitle"),i.detail)}getPksFromDataUnit(){if(!this.dataUnit)return;const i=this.dataUnit.getSelectedRecord();if(!i)return;const t=i[this.fieldName];if(t)try{return JSON.parse(t)}catch(i){return void console.error("Error parsing PK from data unit field:",i)}}async loadImage(i){var t;this.loading=!0,this.dataUnit&&this.entityName&&(i=null!==(t=null!=i?i:this.getPksFromDataUnit())&&void 0!==t?t:c(this.dataUnit),this.imageValue=await l(i,this.fieldName,this.entityName)),this.loading=!1}async componentWillLoad(){this.application=e.getContextValue("__SNK__APPLICATION__"),this.messagesBuilder||(this.messagesBuilder=new n),this.dataUnit&&this.dataUnit.subscribe(this.dataUnitObserver)}disconnectedCallback(){this.dataUnit&&this.dataUnit.unsubscribe(this.dataUnitObserver)}async componentDidLoad(){await this.loadImage()}render(){return s(a,null,s("ez-image-input",{enabled:this.enabled,label:this.label,name:this.fieldName,value:this.imageValue,maxFileSize:this.maxSize?1024*this.maxSize:void 0,accept:this.acceptType||"image/png,image/jpeg,image/gif",onEzChange:i=>this.handleImageChange(i),onEzError:i=>this.handleImageError(i),loading:this.loading}))}};m.style=":host{display:block}";export{m as snk_image_input}