@sankhyalabs/sankhyablocks 1.3.30 → 1.3.31-beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/dist/cjs/{index-1133bc2a.js → index-c6671817.js} +416 -9
  2. package/dist/cjs/loader.cjs.js +2 -2
  3. package/dist/cjs/sankhyablocks.cjs.js +2 -2
  4. package/dist/cjs/snk-application.cjs.entry.js +280 -107
  5. package/dist/cjs/snk-crud.cjs.entry.js +64 -0
  6. package/dist/cjs/snk-data-unit.cjs.entry.js +218 -0
  7. package/dist/cjs/snk-form_2.cjs.entry.js +170 -0
  8. package/dist/cjs/snk-pesquisa.cjs.entry.js +6 -3
  9. package/dist/cjs/snk-taskbar.cjs.entry.js +140 -0
  10. package/dist/cjs/taskbar-elements-7f99f0c9.js +70 -0
  11. package/dist/cjs/teste-pesquisa.cjs.entry.js +1 -1
  12. package/dist/collection/collection-manifest.json +5 -0
  13. package/dist/collection/components/snk-application/errorhandler/snk-error-handler.js +2 -2
  14. package/dist/collection/components/snk-application/snk-application.js +237 -62
  15. package/dist/collection/components/snk-crud/snk-crud.css +5 -0
  16. package/dist/collection/components/snk-crud/snk-crud.js +149 -0
  17. package/dist/collection/components/snk-data-unit/snk-data-unit.css +6 -0
  18. package/dist/collection/components/snk-data-unit/snk-data-unit.js +492 -0
  19. package/dist/collection/components/snk-form/snk-form.css +34 -0
  20. package/dist/collection/components/snk-form/snk-form.js +230 -0
  21. package/dist/collection/components/snk-grid/snk-grid.css +5 -0
  22. package/dist/collection/components/snk-grid/snk-grid.js +148 -0
  23. package/dist/collection/components/snk-pesquisa/snk-pesquisa.css +56 -13
  24. package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +5 -1
  25. package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +65 -0
  26. package/dist/collection/components/snk-taskbar/snk-taskbar.css +3 -0
  27. package/dist/collection/components/snk-taskbar/snk-taskbar.js +252 -0
  28. package/dist/collection/lib/http/data-fetcher/fetchers/dataunit-fetcher.js +52 -21
  29. package/dist/collection/lib/http/data-fetcher/fetchers/grid-config-fetcher.js +4 -3
  30. package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +2 -0
  31. package/dist/components/snk-application2.js +280 -106
  32. package/dist/components/snk-crud.d.ts +11 -0
  33. package/dist/components/snk-crud.js +102 -0
  34. package/dist/components/snk-data-unit.d.ts +11 -0
  35. package/dist/components/snk-data-unit.js +242 -0
  36. package/dist/components/snk-form.d.ts +11 -0
  37. package/dist/components/snk-form.js +6 -0
  38. package/dist/components/snk-form2.js +134 -0
  39. package/dist/components/snk-grid.d.ts +11 -0
  40. package/dist/components/snk-grid.js +6 -0
  41. package/dist/components/snk-grid2.js +91 -0
  42. package/dist/components/snk-pesquisa2.js +5 -2
  43. package/dist/components/snk-taskbar.d.ts +11 -0
  44. package/dist/components/snk-taskbar.js +6 -0
  45. package/dist/components/snk-taskbar2.js +221 -0
  46. package/dist/esm/{index-ffda6382.js → index-6a83ac96.js} +416 -10
  47. package/dist/esm/loader.js +2 -2
  48. package/dist/esm/sankhyablocks.js +2 -2
  49. package/dist/esm/snk-application.entry.js +280 -107
  50. package/dist/esm/snk-crud.entry.js +60 -0
  51. package/dist/esm/snk-data-unit.entry.js +214 -0
  52. package/dist/esm/snk-form_2.entry.js +165 -0
  53. package/dist/esm/snk-pesquisa.entry.js +6 -3
  54. package/dist/esm/snk-taskbar.entry.js +136 -0
  55. package/dist/esm/taskbar-elements-e0b8a285.js +68 -0
  56. package/dist/esm/teste-pesquisa.entry.js +1 -1
  57. package/dist/sankhyablocks/p-18fe0469.entry.js +69 -0
  58. package/dist/sankhyablocks/p-4c7b32d6.entry.js +1 -0
  59. package/dist/sankhyablocks/p-5b5afdbe.entry.js +1 -0
  60. package/dist/sankhyablocks/p-7fe9e5c2.entry.js +1 -0
  61. package/dist/sankhyablocks/p-8650ae26.entry.js +1 -0
  62. package/dist/sankhyablocks/p-a5439706.js +1 -0
  63. package/dist/sankhyablocks/p-c3d20542.entry.js +1 -0
  64. package/dist/sankhyablocks/p-cd1dc099.js +2 -0
  65. package/dist/sankhyablocks/{p-2a7b4cb3.entry.js → p-d25637c9.entry.js} +1 -1
  66. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  67. package/dist/types/components/snk-application/snk-application.d.ts +103 -15
  68. package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +25 -0
  69. package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +45 -0
  70. package/dist/types/components.d.ts +381 -6
  71. package/dist/types/lib/http/data-fetcher/fetchers/dataunit-fetcher.d.ts +2 -0
  72. package/dist/types/lib/http/data-fetcher/fetchers/grid-config-fetcher.d.ts +3 -3
  73. package/package.json +5 -5
  74. package/react/components.d.ts +5 -0
  75. package/react/components.js +5 -0
  76. package/react/components.js.map +1 -1
  77. package/dist/sankhyablocks/p-d62412bb.entry.js +0 -1
  78. package/dist/sankhyablocks/p-e6e91d5f.entry.js +0 -69
  79. package/dist/sankhyablocks/p-edcb9d8e.js +0 -2
@@ -0,0 +1,149 @@
1
+ import { Component, h, Prop, Element, State } from '@stencil/core';
2
+ const GRID_MODE = 0;
3
+ const FORM_MODE = 1;
4
+ export class SnkCrud {
5
+ async gridToForm(keepFormMode = false) {
6
+ this._backToGrid = !keepFormMode && await this._viewStack.getSelectedIndex() === GRID_MODE;
7
+ this._viewStack.show(FORM_MODE);
8
+ }
9
+ async executeAction(act) {
10
+ if (act === "GRID_MODE") {
11
+ this._viewStack.show(GRID_MODE);
12
+ }
13
+ else if (act === "FORM_MODE" || act === "UPDATE") {
14
+ this.gridToForm(act !== "UPDATE");
15
+ }
16
+ }
17
+ insertionModeHandler() {
18
+ this.gridToForm();
19
+ }
20
+ cancelHandler() {
21
+ if (this._backToGrid) {
22
+ this._viewStack.show(GRID_MODE);
23
+ }
24
+ }
25
+ componentWillLoad() {
26
+ let parent = this._element.parentElement;
27
+ while (parent) {
28
+ if (parent.tagName.toUpperCase() === "SNK-DATA-UNIT") {
29
+ this._snkDataUnit = parent;
30
+ this._snkDataUnit.addEventListener("insertionMode", () => this.insertionModeHandler());
31
+ this._snkDataUnit.addEventListener("cancelEdition", () => this.cancelHandler());
32
+ this._dataUnit = this._snkDataUnit.dataUnit;
33
+ this._dataState = this._snkDataUnit.dataState;
34
+ if (!this._dataUnit) {
35
+ this._snkDataUnit.addEventListener("dataUnitReady", (evt) => {
36
+ this._dataUnit = evt.detail;
37
+ });
38
+ }
39
+ this._snkDataUnit.addEventListener("dataStateChange", (evt) => {
40
+ this._dataState = evt.detail;
41
+ });
42
+ break;
43
+ }
44
+ parent = parent.parentElement;
45
+ }
46
+ }
47
+ render() {
48
+ return (h("ez-view-stack", { ref: (ref) => this._viewStack = ref },
49
+ h("stack-item", null,
50
+ h("snk-grid", { configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), onActionClick: evt => this.executeAction(evt.detail), actionsList: this.actionsList },
51
+ h("slot", null))),
52
+ h("stack-item", null,
53
+ h("snk-form", { formTitle: this.formTitle, configName: this.configName, actionsList: this.actionsList, onExit: () => this._viewStack.show(GRID_MODE), recordsValidator: this.recordsValidator, onActionClick: evt => this.executeAction(evt.detail) }))));
54
+ }
55
+ static get is() { return "snk-crud"; }
56
+ static get encapsulation() { return "scoped"; }
57
+ static get originalStyleUrls() { return {
58
+ "$": ["snk-crud.css"]
59
+ }; }
60
+ static get styleUrls() { return {
61
+ "$": ["snk-crud.css"]
62
+ }; }
63
+ static get properties() { return {
64
+ "configName": {
65
+ "type": "string",
66
+ "mutable": false,
67
+ "complexType": {
68
+ "original": "string",
69
+ "resolved": "string",
70
+ "references": {}
71
+ },
72
+ "required": false,
73
+ "optional": false,
74
+ "docs": {
75
+ "tags": [],
76
+ "text": ""
77
+ },
78
+ "attribute": "config-name",
79
+ "reflect": false
80
+ },
81
+ "formTitle": {
82
+ "type": "string",
83
+ "mutable": false,
84
+ "complexType": {
85
+ "original": "string",
86
+ "resolved": "string",
87
+ "references": {}
88
+ },
89
+ "required": false,
90
+ "optional": false,
91
+ "docs": {
92
+ "tags": [],
93
+ "text": ""
94
+ },
95
+ "attribute": "form-title",
96
+ "reflect": false
97
+ },
98
+ "actionsList": {
99
+ "type": "unknown",
100
+ "mutable": false,
101
+ "complexType": {
102
+ "original": "Array<Action>",
103
+ "resolved": "Action[]",
104
+ "references": {
105
+ "Array": {
106
+ "location": "global"
107
+ },
108
+ "Action": {
109
+ "location": "import",
110
+ "path": "../snk-taskbar/snk-taskbar"
111
+ }
112
+ }
113
+ },
114
+ "required": false,
115
+ "optional": false,
116
+ "docs": {
117
+ "tags": [],
118
+ "text": ""
119
+ }
120
+ },
121
+ "recordsValidator": {
122
+ "type": "any",
123
+ "mutable": false,
124
+ "complexType": {
125
+ "original": "RecordValidator",
126
+ "resolved": "RecordValidator",
127
+ "references": {
128
+ "RecordValidator": {
129
+ "location": "import",
130
+ "path": "@sankhyalabs/ezui/dist/types/components/ez-form/ez-form"
131
+ }
132
+ }
133
+ },
134
+ "required": false,
135
+ "optional": false,
136
+ "docs": {
137
+ "tags": [],
138
+ "text": "Validador respons\u00E1vel por checar a integridade das informa\u00E7\u00F5es do registro"
139
+ },
140
+ "attribute": "records-validator",
141
+ "reflect": false
142
+ }
143
+ }; }
144
+ static get states() { return {
145
+ "_dataUnit": {},
146
+ "_dataState": {}
147
+ }; }
148
+ static get elementRef() { return "_element"; }
149
+ }
@@ -0,0 +1,6 @@
1
+ :host {
2
+ display: flex;
3
+ flex-direction: column;
4
+ height: 100%;
5
+ }
6
+
@@ -0,0 +1,492 @@
1
+ import { Component, Host, h, Event, Element, Prop, Watch, Method } from '@stencil/core';
2
+ import { Action, ApplicationContext } from '@sankhyalabs/core';
3
+ import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
4
+ export class SnkDataUnit {
5
+ constructor() {
6
+ this._onDataUnitResolve = [];
7
+ /**
8
+ * Determina quantas linhas são retornadas por página
9
+ */
10
+ this.pageSize = 150;
11
+ /**
12
+ * Quando ativada essa propriedade faz com que haja uma carga imediata no DataUnit
13
+ */
14
+ this.autoLoad = true;
15
+ this._dataUnitObserver = (action) => {
16
+ let msg;
17
+ if (!this.isTransitionAction(action.type)) {
18
+ msg = this.getActionInfo(action.type);
19
+ }
20
+ if (msg) {
21
+ ApplicationUtils.info(msg);
22
+ }
23
+ if (action.type === Action.RECORDS_ADDED || action.type === Action.RECORDS_COPIED) {
24
+ this.insertionMode.emit();
25
+ }
26
+ if (action.type === Action.EDITION_CANCELED) {
27
+ this.cancelEdition.emit();
28
+ }
29
+ const duState = {
30
+ insertionMode: false,
31
+ hasNext: this.dataUnit.hasNext(),
32
+ hasPrevious: this.dataUnit.hasPrevious(),
33
+ copyMode: false,
34
+ isDirty: this.dataUnit.isDirty(),
35
+ hasDirtyRecords: this.dataUnit.hasDirtyRecords(),
36
+ selectedRecords: this.dataUnit.getSelectedRecords()
37
+ };
38
+ this.dataUnit.records.forEach(r => {
39
+ if (r.__record__id__.startsWith('NEW_')) {
40
+ duState.insertionMode = true;
41
+ duState.copyMode || (duState.copyMode = r['__record__source__id__'] != undefined);
42
+ }
43
+ });
44
+ this.dataState = duState;
45
+ };
46
+ }
47
+ observePageSize() {
48
+ if (this.dataUnit) {
49
+ this.dataUnit.pageSize = this.pageSize;
50
+ }
51
+ }
52
+ observeDataUnitName(newValue, oldValue) {
53
+ if (oldValue != newValue) {
54
+ this.dataUnit = undefined;
55
+ this.dataUnitName = newValue;
56
+ this.loadDataUnit();
57
+ }
58
+ }
59
+ observeEntityName(newValue, oldValue) {
60
+ if (oldValue != newValue) {
61
+ this.dataUnit = undefined;
62
+ this.entityName = newValue;
63
+ this.loadDataUnit();
64
+ }
65
+ }
66
+ observeDataState(newValue, oldValue) {
67
+ if (oldValue != newValue) {
68
+ this.dataStateChange.emit(newValue);
69
+ }
70
+ }
71
+ observeDataUnit() {
72
+ this.dataUnitReady.emit(this.dataUnit);
73
+ }
74
+ /**
75
+ * Pode-se obter o dataUnit através desse método. Outra forma, é ouvir o evento de
76
+ *
77
+ * @returns dataUnit
78
+ */
79
+ async getDataUnit() {
80
+ return new Promise((resolve) => {
81
+ if (this.dataUnit) {
82
+ resolve(this.dataUnit);
83
+ }
84
+ else {
85
+ this._onDataUnitResolve.push(resolve);
86
+ }
87
+ });
88
+ }
89
+ async interceptAction(action) {
90
+ return new Promise(resolve => {
91
+ switch (action.type) {
92
+ case Action.SAVING_DATA:
93
+ if (this.beforeSave) {
94
+ const continueAction = this.beforeSave(this.dataUnit);
95
+ if (continueAction instanceof Promise) {
96
+ continueAction.then(result => resolve(result ? action : undefined));
97
+ }
98
+ else {
99
+ resolve(continueAction ? action : undefined);
100
+ }
101
+ }
102
+ else {
103
+ resolve(action);
104
+ }
105
+ break;
106
+ case Action.DATA_SAVED:
107
+ if (this.afterSave) {
108
+ this.afterSave(this.dataUnit);
109
+ }
110
+ else {
111
+ resolve(action);
112
+ }
113
+ break;
114
+ case Action.EDITION_CANCELED:
115
+ if (this.dataState.hasDirtyRecords) {
116
+ ApplicationUtils.confirm(this.i18n("components.warning"), this.i18n("components.confirmCancelEdition"))
117
+ .then((result) => resolve(result ? action : undefined));
118
+ }
119
+ else {
120
+ resolve(action);
121
+ }
122
+ break;
123
+ case Action.REMOVING_RECORDS:
124
+ let msg = undefined;
125
+ if (this.messageBuilder) {
126
+ msg = this.messageBuilder(action.type, this.dataState, this.dataUnit);
127
+ }
128
+ ApplicationUtils.confirm(this.i18n("components.delete"), msg || this.i18n("components.confirmRemoveRecord"), "delete", true, { btnConfirmDanger: true })
129
+ .then((result) => resolve(result ? action : undefined));
130
+ break;
131
+ default:
132
+ resolve(action);
133
+ }
134
+ });
135
+ }
136
+ isTransitionAction(action) {
137
+ switch (action) {
138
+ case Action.LOADING_METADATA:
139
+ case Action.LOADING_DATA:
140
+ case Action.SAVING_DATA:
141
+ case Action.REMOVING_RECORDS:
142
+ case Action.CHANGING_DATA:
143
+ return true;
144
+ default:
145
+ return false;
146
+ }
147
+ }
148
+ getActionInfo(action) {
149
+ if (this.messageBuilder) {
150
+ return this.messageBuilder(action, this.dataState, this.dataUnit);
151
+ }
152
+ if (action === Action.EDITION_CANCELED) {
153
+ return this.i18n("components.editionCanceled");
154
+ }
155
+ }
156
+ async loadDataUnit() {
157
+ if (!this.dataUnit) {
158
+ const app = ApplicationContext.getContextValue("__SNK__APPLICATION__");
159
+ if (app && this.entityName) {
160
+ const cacheName = this.dataUnitName ? this.dataUnitName : this.entityName;
161
+ this.dataUnit = await app.getDataUnit(this.entityName, cacheName);
162
+ this.dataUnit.pageSize = this.pageSize;
163
+ this.dataUnit.unsubscribe(this._dataUnitObserver);
164
+ this.dataUnit.addInterceptor(this);
165
+ this.dataUnit.subscribe(this._dataUnitObserver);
166
+ let resolver;
167
+ while (resolver = this._onDataUnitResolve.pop()) {
168
+ resolver(this.dataUnit);
169
+ }
170
+ if (this.autoLoad) {
171
+ this.dataUnit.loadData();
172
+ }
173
+ }
174
+ }
175
+ }
176
+ i18n(key) {
177
+ const pt_br = {
178
+ "components.warning": "Aviso",
179
+ "components.delete": "Excluir",
180
+ "components.confirmRemoveRecord": "Deseja realmente excluir o registro atual?",
181
+ "components.confirmCancelEdition": "As alterações realizadas serão descartadas<br/><br/><b>Você realmente gostaria de sair?</b>",
182
+ "components.editionCanceled": "Todas as alterações foram descartadas.",
183
+ };
184
+ return pt_br[key];
185
+ }
186
+ //---------------------------------------------
187
+ // Lifecycle web component
188
+ //---------------------------------------------
189
+ componentWillLoad() {
190
+ this.loadDataUnit();
191
+ }
192
+ render() {
193
+ return (h(Host, null));
194
+ }
195
+ static get is() { return "snk-data-unit"; }
196
+ static get encapsulation() { return "scoped"; }
197
+ static get originalStyleUrls() { return {
198
+ "$": ["snk-data-unit.css"]
199
+ }; }
200
+ static get styleUrls() { return {
201
+ "$": ["snk-data-unit.css"]
202
+ }; }
203
+ static get properties() { return {
204
+ "dataState": {
205
+ "type": "unknown",
206
+ "mutable": true,
207
+ "complexType": {
208
+ "original": "DataState",
209
+ "resolved": "DataState",
210
+ "references": {
211
+ "DataState": {
212
+ "location": "local"
213
+ }
214
+ }
215
+ },
216
+ "required": false,
217
+ "optional": false,
218
+ "docs": {
219
+ "tags": [],
220
+ "text": "O estato atual dos dados, isto \u00E9 se h\u00E1 altera\u00E7\u00E3o, insers\u00E3o, as linhas selecionadas, etc."
221
+ }
222
+ },
223
+ "dataUnitName": {
224
+ "type": "string",
225
+ "mutable": false,
226
+ "complexType": {
227
+ "original": "string",
228
+ "resolved": "string",
229
+ "references": {}
230
+ },
231
+ "required": false,
232
+ "optional": false,
233
+ "docs": {
234
+ "tags": [],
235
+ "text": "Este atributo \u00E9 usado para criar o dataUnit uma \u00FAnica vez. Se omitido ser\u00E1 usado o pr\u00F3prio nome\nda entidade."
236
+ },
237
+ "attribute": "data-unit-name",
238
+ "reflect": false
239
+ },
240
+ "entityName": {
241
+ "type": "string",
242
+ "mutable": false,
243
+ "complexType": {
244
+ "original": "string",
245
+ "resolved": "string",
246
+ "references": {}
247
+ },
248
+ "required": false,
249
+ "optional": false,
250
+ "docs": {
251
+ "tags": [],
252
+ "text": "Determina qual a entidade representa os dados em quest\u00E3o."
253
+ },
254
+ "attribute": "entity-name",
255
+ "reflect": false
256
+ },
257
+ "pageSize": {
258
+ "type": "number",
259
+ "mutable": false,
260
+ "complexType": {
261
+ "original": "number",
262
+ "resolved": "number",
263
+ "references": {}
264
+ },
265
+ "required": false,
266
+ "optional": false,
267
+ "docs": {
268
+ "tags": [],
269
+ "text": "Determina quantas linhas s\u00E3o retornadas por p\u00E1gina"
270
+ },
271
+ "attribute": "page-size",
272
+ "reflect": false,
273
+ "defaultValue": "150"
274
+ },
275
+ "dataUnit": {
276
+ "type": "unknown",
277
+ "mutable": true,
278
+ "complexType": {
279
+ "original": "DataUnit",
280
+ "resolved": "DataUnit",
281
+ "references": {
282
+ "DataUnit": {
283
+ "location": "import",
284
+ "path": "@sankhyalabs/core"
285
+ }
286
+ }
287
+ },
288
+ "required": false,
289
+ "optional": false,
290
+ "docs": {
291
+ "tags": [],
292
+ "text": "Uma vez instanciado, pode-se obter o dataUnit por esta propriedade"
293
+ }
294
+ },
295
+ "messageBuilder": {
296
+ "type": "unknown",
297
+ "mutable": false,
298
+ "complexType": {
299
+ "original": "(messageKey: string, dataState: DataState, dataUnit: DataUnit) => string",
300
+ "resolved": "(messageKey: string, dataState: DataState, dataUnit: DataUnit) => string",
301
+ "references": {
302
+ "DataState": {
303
+ "location": "local"
304
+ },
305
+ "DataUnit": {
306
+ "location": "import",
307
+ "path": "@sankhyalabs/core"
308
+ }
309
+ }
310
+ },
311
+ "required": false,
312
+ "optional": false,
313
+ "docs": {
314
+ "tags": [],
315
+ "text": "Abstra\u00E7\u00E3o para obter-se mensagens de acordo com o estado dos dados."
316
+ }
317
+ },
318
+ "beforeSave": {
319
+ "type": "unknown",
320
+ "mutable": false,
321
+ "complexType": {
322
+ "original": "(dataUnit: DataUnit) => boolean | Promise<boolean>",
323
+ "resolved": "(dataUnit: DataUnit) => boolean | Promise<boolean>",
324
+ "references": {
325
+ "DataUnit": {
326
+ "location": "import",
327
+ "path": "@sankhyalabs/core"
328
+ },
329
+ "Promise": {
330
+ "location": "global"
331
+ }
332
+ }
333
+ },
334
+ "required": false,
335
+ "optional": false,
336
+ "docs": {
337
+ "tags": [],
338
+ "text": "Executado imediatamente antes da a\u00E7\u00E3o de salvar as altera\u00E7\u00F5es. \u00DAtil no caso de valida\u00E7\u00F5es por exemplo.\nCaso retorne \"false\" (ou a promessa se resolva como false), cancela a a\u00E7\u00E3o."
339
+ }
340
+ },
341
+ "afterSave": {
342
+ "type": "unknown",
343
+ "mutable": false,
344
+ "complexType": {
345
+ "original": "(dataUnit: DataUnit) => void",
346
+ "resolved": "(dataUnit: DataUnit) => void",
347
+ "references": {
348
+ "DataUnit": {
349
+ "location": "import",
350
+ "path": "@sankhyalabs/core"
351
+ }
352
+ }
353
+ },
354
+ "required": false,
355
+ "optional": false,
356
+ "docs": {
357
+ "tags": [],
358
+ "text": "Executado ap\u00F3s a a\u00E7\u00E3o de salvar"
359
+ }
360
+ },
361
+ "autoLoad": {
362
+ "type": "boolean",
363
+ "mutable": false,
364
+ "complexType": {
365
+ "original": "boolean",
366
+ "resolved": "boolean",
367
+ "references": {}
368
+ },
369
+ "required": false,
370
+ "optional": false,
371
+ "docs": {
372
+ "tags": [],
373
+ "text": "Quando ativada essa propriedade faz com que haja uma carga imediata no DataUnit"
374
+ },
375
+ "attribute": "auto-load",
376
+ "reflect": false,
377
+ "defaultValue": "true"
378
+ }
379
+ }; }
380
+ static get events() { return [{
381
+ "method": "dataStateChange",
382
+ "name": "dataStateChange",
383
+ "bubbles": true,
384
+ "cancelable": true,
385
+ "composed": true,
386
+ "docs": {
387
+ "tags": [],
388
+ "text": "Disparado quando o h\u00E1 qualquer mudan\u00E7a de estado no DataUnit"
389
+ },
390
+ "complexType": {
391
+ "original": "DataState",
392
+ "resolved": "DataState",
393
+ "references": {
394
+ "DataState": {
395
+ "location": "local"
396
+ }
397
+ }
398
+ }
399
+ }, {
400
+ "method": "dataUnitReady",
401
+ "name": "dataUnitReady",
402
+ "bubbles": true,
403
+ "cancelable": true,
404
+ "composed": true,
405
+ "docs": {
406
+ "tags": [],
407
+ "text": "Disparado quando o DataUnit est\u00E1 pronto"
408
+ },
409
+ "complexType": {
410
+ "original": "DataUnit",
411
+ "resolved": "DataUnit",
412
+ "references": {
413
+ "DataUnit": {
414
+ "location": "import",
415
+ "path": "@sankhyalabs/core"
416
+ }
417
+ }
418
+ }
419
+ }, {
420
+ "method": "insertionMode",
421
+ "name": "insertionMode",
422
+ "bubbles": true,
423
+ "cancelable": true,
424
+ "composed": true,
425
+ "docs": {
426
+ "tags": [],
427
+ "text": "Disparado quando um registro \u00E9 adicionado ou copiado"
428
+ },
429
+ "complexType": {
430
+ "original": "void",
431
+ "resolved": "void",
432
+ "references": {}
433
+ }
434
+ }, {
435
+ "method": "cancelEdition",
436
+ "name": "cancelEdition",
437
+ "bubbles": true,
438
+ "cancelable": true,
439
+ "composed": true,
440
+ "docs": {
441
+ "tags": [],
442
+ "text": "Disparado quando se cancela uma insers\u00E3o/c\u00F3pia"
443
+ },
444
+ "complexType": {
445
+ "original": "void",
446
+ "resolved": "void",
447
+ "references": {}
448
+ }
449
+ }]; }
450
+ static get methods() { return {
451
+ "getDataUnit": {
452
+ "complexType": {
453
+ "signature": "() => Promise<DataUnit>",
454
+ "parameters": [],
455
+ "references": {
456
+ "Promise": {
457
+ "location": "global"
458
+ },
459
+ "DataUnit": {
460
+ "location": "import",
461
+ "path": "@sankhyalabs/core"
462
+ }
463
+ },
464
+ "return": "Promise<DataUnit>"
465
+ },
466
+ "docs": {
467
+ "text": "Pode-se obter o dataUnit atrav\u00E9s desse m\u00E9todo. Outra forma, \u00E9 ouvir o evento de",
468
+ "tags": [{
469
+ "name": "returns",
470
+ "text": "dataUnit"
471
+ }]
472
+ }
473
+ }
474
+ }; }
475
+ static get elementRef() { return "element"; }
476
+ static get watchers() { return [{
477
+ "propName": "pageSize",
478
+ "methodName": "observePageSize"
479
+ }, {
480
+ "propName": "dataUnitName",
481
+ "methodName": "observeDataUnitName"
482
+ }, {
483
+ "propName": "entityName",
484
+ "methodName": "observeEntityName"
485
+ }, {
486
+ "propName": "dataState",
487
+ "methodName": "observeDataState"
488
+ }, {
489
+ "propName": "dataUnit",
490
+ "methodName": "observeDataUnit"
491
+ }]; }
492
+ }
@@ -0,0 +1,34 @@
1
+ :host {
2
+ display: block;
3
+ }
4
+
5
+ .snk-form {
6
+ position: relative;
7
+
8
+ /*public*/
9
+ padding: var(--space--large);
10
+ padding-top: var(--space--medium);
11
+ }
12
+
13
+ .snk-form__header {
14
+ position: relative;
15
+
16
+ /*public*/
17
+ padding-top: var(--space--medium);
18
+ padding-bottom: var(--space--medium);
19
+ margin-bottom: var(--space--medium);
20
+ }
21
+
22
+ .snk-form__header--fixed {
23
+ position: sticky;
24
+ top: 0;
25
+
26
+ /*public*/
27
+ background: var(--background--body);
28
+ z-index: var(--more-visible, 2);
29
+ padding-left: var(--space--large);
30
+ padding-right: var(--space--large);
31
+ margin-left: calc(var(--space--large) * -1);
32
+ margin-right: calc(var(--space--large) * -1);
33
+ width: calc(100% + (var(--space--large) * 2));
34
+ }