@sankhyalabs/sankhyablocks 2.10.0 → 2.11.0

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 (73) hide show
  1. package/dist/cjs/index-9c584423.js +7 -0
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  4. package/dist/cjs/snk-config-options.cjs.entry.js +1 -1
  5. package/dist/cjs/snk-configurator_3.cjs.entry.js +24 -9
  6. package/dist/cjs/snk-crud.cjs.entry.js +19 -5
  7. package/dist/cjs/snk-data-exporter_8.cjs.entry.js +21 -7
  8. package/dist/cjs/snk-form-config.cjs.entry.js +1 -1
  9. package/dist/cjs/snk-form.cjs.entry.js +58 -22
  10. package/dist/cjs/snk-tab-config.cjs.entry.js +1 -1
  11. package/dist/cjs/{taskbar-elements-bbb89cdb.js → taskbar-elements-89bf9399.js} +14 -3
  12. package/dist/collection/components/snk-crud/snk-crud.js +41 -4
  13. package/dist/collection/components/snk-data-exporter/snk-data-exporter.css +3 -1
  14. package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +4 -2
  15. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +1 -1
  16. package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +1 -1
  17. package/dist/collection/components/snk-form/snk-form.css +1 -1
  18. package/dist/collection/components/snk-form/snk-form.js +80 -21
  19. package/dist/collection/components/snk-form/subcomponents/snk-config-options/snk-config-options.css +8 -1
  20. package/dist/collection/components/snk-form/subcomponents/snk-field-config/snk-field-config.css +42 -19
  21. package/dist/collection/components/snk-form/subcomponents/snk-form-config/snk-form-config.css +92 -40
  22. package/dist/collection/components/snk-form/subcomponents/snk-tab-config/snk-tab-config.css +96 -45
  23. package/dist/collection/components/snk-grid/snk-grid.js +44 -6
  24. package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +14 -3
  25. package/dist/collection/components/snk-taskbar/snk-taskbar.js +37 -2
  26. package/dist/collection/lib/@types/index.js +5 -0
  27. package/dist/components/snk-config-options2.js +1 -1
  28. package/dist/components/snk-crud.js +20 -6
  29. package/dist/components/snk-data-exporter2.js +5 -3
  30. package/dist/components/snk-field-config2.js +1 -1
  31. package/dist/components/snk-filter-bar2.js +1 -1
  32. package/dist/components/snk-filter-item2.js +1 -1
  33. package/dist/components/snk-form-config2.js +1 -1
  34. package/dist/components/snk-form2.js +59 -23
  35. package/dist/components/snk-grid2.js +23 -8
  36. package/dist/components/snk-tab-config2.js +1 -1
  37. package/dist/components/snk-taskbar2.js +33 -5
  38. package/dist/esm/index-de5f37a6.js +7 -0
  39. package/dist/esm/loader.js +1 -1
  40. package/dist/esm/sankhyablocks.js +1 -1
  41. package/dist/esm/snk-config-options.entry.js +1 -1
  42. package/dist/esm/snk-configurator_3.entry.js +22 -7
  43. package/dist/esm/snk-crud.entry.js +20 -6
  44. package/dist/esm/snk-data-exporter_8.entry.js +21 -7
  45. package/dist/esm/snk-form-config.entry.js +1 -1
  46. package/dist/esm/snk-form.entry.js +58 -22
  47. package/dist/esm/snk-tab-config.entry.js +1 -1
  48. package/dist/esm/{taskbar-elements-beec3b27.js → taskbar-elements-c8966343.js} +14 -3
  49. package/dist/sankhyablocks/p-01c361bb.entry.js +1 -0
  50. package/dist/sankhyablocks/p-05fadb77.js +1 -0
  51. package/dist/sankhyablocks/p-3ee68d78.entry.js +1 -0
  52. package/dist/sankhyablocks/p-420d07c4.js +1 -0
  53. package/dist/sankhyablocks/p-4a5c1d36.entry.js +1 -0
  54. package/dist/sankhyablocks/{p-3cb9f3ad.entry.js → p-4c759619.entry.js} +1 -1
  55. package/dist/sankhyablocks/p-9b858e3a.entry.js +1 -0
  56. package/dist/sankhyablocks/p-a65d6ba3.entry.js +1 -0
  57. package/dist/sankhyablocks/p-cd19bd29.entry.js +1 -0
  58. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  59. package/dist/types/components/snk-crud/snk-crud.d.ts +8 -1
  60. package/dist/types/components/snk-form/snk-form.d.ts +10 -1
  61. package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +2 -1
  62. package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +6 -0
  63. package/dist/types/components.d.ts +35 -2
  64. package/dist/types/lib/@types/index.d.ts +4 -0
  65. package/dist/types/lib/store/index.d.ts +4 -3
  66. package/package.json +1 -1
  67. package/dist/sankhyablocks/p-13116d05.entry.js +0 -1
  68. package/dist/sankhyablocks/p-4ca32c86.entry.js +0 -1
  69. package/dist/sankhyablocks/p-6617d349.entry.js +0 -1
  70. package/dist/sankhyablocks/p-82e20fc0.entry.js +0 -1
  71. package/dist/sankhyablocks/p-9d474bc0.entry.js +0 -1
  72. package/dist/sankhyablocks/p-c8327a5c.js +0 -1
  73. package/dist/sankhyablocks/p-fc77347c.entry.js +0 -1
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const index = require('./index-2cd6f753.js');
4
+ const index$2 = require('./index-9c584423.js');
4
5
  const index$1 = require('./index-696b5c3b.js');
5
6
 
6
7
  exports.TaskbarElement = void 0;
@@ -47,7 +48,7 @@ const buildCustomButton = (def, className, dataElementId, action, isEnabled) =>
47
48
  return textButton(def.name, className, dataElementId, text, hint, action, isEnabled);
48
49
  }
49
50
  };
50
- const buildElem = (element, className, dataElementId, getTitle, action, isEnabled, actions, configName) => {
51
+ const buildElem = (element, className, dataElementId, getTitle, action, isEnabled, actions, configName, presentationMode) => {
51
52
  var _a;
52
53
  const title = getTitle(element);
53
54
  switch (element) {
@@ -64,11 +65,21 @@ const buildElem = (element, className, dataElementId, getTitle, action, isEnable
64
65
  case exports.TaskbarElement.REMOVE:
65
66
  return iconButton("delete", element, className, dataElementId, title, action, isEnabled);
66
67
  case exports.TaskbarElement.INSERT:
67
- return iconTextButton("plus", element, className, dataElementId, title, title, action, isEnabled);
68
+ if (presentationMode === index$2.PresentationMode.PRIMARY) {
69
+ return iconTextButton("plus", element, className, dataElementId, title, title, action, isEnabled);
70
+ }
71
+ else {
72
+ return iconButton("plus", element, className, dataElementId, title, action, isEnabled);
73
+ }
68
74
  case exports.TaskbarElement.CANCEL:
69
75
  return textButton(element, className, dataElementId, title, title, action, isEnabled);
70
76
  case exports.TaskbarElement.SAVE:
71
- return iconTextButton("save", element, className, dataElementId, title, title, action, isEnabled);
77
+ if (presentationMode === index$2.PresentationMode.PRIMARY) {
78
+ return iconTextButton("save", element, className, dataElementId, title, title, action, isEnabled);
79
+ }
80
+ else {
81
+ return iconButton("save", element, className, dataElementId, title, action, isEnabled);
82
+ }
72
83
  case exports.TaskbarElement.GRID_MODE:
73
84
  return iconButton("table", element, className, dataElementId, title, action, isEnabled);
74
85
  case exports.TaskbarElement.FORM_MODE:
@@ -2,6 +2,7 @@ import { h } from '@stencil/core';
2
2
  import { ApplicationContext, ElementIDUtils } from '@sankhyalabs/core';
3
3
  import { VIEW_MODE } from '../../lib/utils/constants';
4
4
  import { TaskbarElement } from '../snk-taskbar/elements/taskbar-elements';
5
+ import { PresentationMode } from '../../lib/@types';
5
6
  const GRID_MODE = VIEW_MODE.grid;
6
7
  const FORM_MODE = VIEW_MODE.form;
7
8
  /**
@@ -20,6 +21,10 @@ export class SnkCrud {
20
21
  * Determina se haverá exportação de dados
21
22
  */
22
23
  this.enableDataExporter = false;
24
+ /**
25
+ * Altera o modo de apresentação dos botões do snk-taskbar.
26
+ */
27
+ this.presentationMode = PresentationMode.PRIMARY;
23
28
  }
24
29
  /**
25
30
  * Usado para alternar a visão entre GRID e FORM externamente.
@@ -55,6 +60,16 @@ export class SnkCrud {
55
60
  this._snkForm.showConfig();
56
61
  }
57
62
  }
63
+ validatePresentationMode() {
64
+ if (Object.values(PresentationMode).includes(this.presentationMode)) {
65
+ return;
66
+ }
67
+ this.presentationMode = PresentationMode.PRIMARY;
68
+ }
69
+ addDataElementID() {
70
+ const dataInfo = { dataUnit: this._dataUnit };
71
+ ElementIDUtils.addIDInfo(this._element, null, dataInfo);
72
+ }
58
73
  insertionModeHandler() {
59
74
  this.gridToForm();
60
75
  }
@@ -93,12 +108,11 @@ export class SnkCrud {
93
108
  this.configName = application.configName;
94
109
  }
95
110
  }
96
- addDataElementID() {
97
- const dataInfo = { dataUnit: this._dataUnit };
98
- ElementIDUtils.addIDInfo(this._element, null, dataInfo);
111
+ componentWillRender() {
112
+ this.validatePresentationMode();
99
113
  }
100
114
  render() {
101
- return (h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", null, h("snk-grid", { ref: (ref) => this._snkGrid = ref, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, enableDataExporter: this.enableDataExporter }, h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-form", { ref: (ref) => this._snkForm = ref, "data-element-id": "crud_form", configName: this.configName, actionsList: this.actionsList, onExit: () => this.setViewMode(GRID_MODE), recordsValidator: this.recordsValidator, taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail) }, h("slot", { name: "SnkFormTaskBar" }))), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._viewMode, onConfigSelected: (evt) => this.executeAction(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail) })));
115
+ return (h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", null, h("snk-grid", { ref: (ref) => this._snkGrid = ref, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, enableDataExporter: this.enableDataExporter, presentationMode: this.presentationMode }, h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-form", { ref: (ref) => this._snkForm = ref, "data-element-id": "crud_form", configName: this.configName, actionsList: this.actionsList, onExit: () => this.setViewMode(GRID_MODE), recordsValidator: this.recordsValidator, taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode }, h("slot", { name: "SnkFormTaskBar" }))), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._viewMode, onConfigSelected: (evt) => this.executeAction(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail) })));
102
116
  }
103
117
  static get is() { return "snk-crud"; }
104
118
  static get encapsulation() { return "scoped"; }
@@ -249,6 +263,29 @@ export class SnkCrud {
249
263
  "attribute": "enable-data-exporter",
250
264
  "reflect": false,
251
265
  "defaultValue": "false"
266
+ },
267
+ "presentationMode": {
268
+ "type": "string",
269
+ "mutable": false,
270
+ "complexType": {
271
+ "original": "PresentationMode",
272
+ "resolved": "PresentationMode.PRIMARY | PresentationMode.SECONDARY",
273
+ "references": {
274
+ "PresentationMode": {
275
+ "location": "import",
276
+ "path": "../../lib/@types"
277
+ }
278
+ }
279
+ },
280
+ "required": false,
281
+ "optional": false,
282
+ "docs": {
283
+ "tags": [],
284
+ "text": "Altera o modo de apresenta\u00E7\u00E3o dos bot\u00F5es do snk-taskbar."
285
+ },
286
+ "attribute": "presentation-mode",
287
+ "reflect": false,
288
+ "defaultValue": "PresentationMode.PRIMARY"
252
289
  }
253
290
  };
254
291
  }
@@ -1,6 +1,6 @@
1
1
  :host {
2
2
  /*@doc Define o posicionamento de z-index do componente.*/
3
- --snk-data-exporter--z-index: var(--more-visible, 2);
3
+ --snk-data-exporter--z-index: var(--most-visible, 3);
4
4
 
5
5
  /*private*/
6
6
  display: flex;
@@ -13,7 +13,9 @@
13
13
  display: flex;
14
14
  width: fit-content;
15
15
  height: fit-content;
16
+ }
16
17
 
18
+ .snk-data-exporter--overlap {
17
19
  /*public*/
18
20
  z-index: var(--snk-data-exporter--z-index);
19
21
  }
@@ -148,9 +148,11 @@ export class SnkDataExporter {
148
148
  }
149
149
  }
150
150
  render() {
151
- return (h(Host, null, h("div", { class: "snk-data-exporter" }, h("ez-button", Object.assign({ ref: (ref) => this._ezButton = ref, iconName: "file-download", size: "small", mode: "icon", onClick: () => this.controlDropdown() }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo("button")}` })), this._showDropdown &&
151
+ return (h(Host, null, h("div", { class: `snk-data-exporter
152
+ ${this._showDropdown ? " snk-data-exporter--overlap" : ""}
153
+ ` }, h("ez-button", Object.assign({ ref: (ref) => this._ezButton = ref, iconName: "file-download", size: "small", mode: "icon", onClick: () => this.controlDropdown() }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo("button")}` })), this._showDropdown &&
152
154
  h("ez-dropdown", Object.assign({ ref: (ref) => this._ezDropdown = ref, items: this._items, onEzClick: (evt) => this.processExporter(evt) }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo("dropdown")}` }))), this._showDropdown &&
153
- h("div", Object.assign({ class: "ez-scrim ez-scrim-light" }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo("ezScrim")}` })), h("snk-exporter-email-sender", { ref: ref => this._snkEmailSender = ref, getMessage: (key, params) => this.getMessage(key, params) })));
155
+ h("div", Object.assign({ class: "ez-scrim ez-scrim--light" }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo("ezScrim")}` })), h("snk-exporter-email-sender", { ref: ref => this._snkEmailSender = ref, getMessage: (key, params) => this.getMessage(key, params) })));
154
156
  }
155
157
  static get is() { return "snk-data-exporter"; }
156
158
  static get encapsulation() { return "scoped"; }
@@ -44,7 +44,7 @@ export class SnkFilterItem {
44
44
  left: this.getScrollOffsetLeft(),
45
45
  top: this.getScrollOffsetTop(),
46
46
  useOverlay: true,
47
- overlayClassName: 'ez-scrim ez-scrim-light',
47
+ overlayClassName: 'ez-scrim ez-scrim--light',
48
48
  isFixed: true
49
49
  };
50
50
  }
@@ -19,7 +19,7 @@
19
19
  min-width: 265px;
20
20
 
21
21
  /*public*/
22
- z-index: var(--more-visible, 2);
22
+ z-index: var(--most-visible, 3);
23
23
  background-color: var(--background--xlight, #fff);
24
24
  border-radius: var(--border--radius-medium, 12px);
25
25
  box-shadow: var(--shadow, 0px 0px 16px 0px #000);
@@ -25,7 +25,7 @@
25
25
 
26
26
  /*public*/
27
27
  background: var(--background--body);
28
- z-index: var(--more-visible, 2);
28
+ z-index: var(--visible);
29
29
  padding-left: var(--space--large);
30
30
  padding-right: var(--space--large);
31
31
  margin-left: calc(var(--space--large) * -1);
@@ -1,17 +1,18 @@
1
1
  import { ApplicationContext, DateUtils, ObjectUtils, ElementIDUtils } from '@sankhyalabs/core';
2
2
  import { h } from '@stencil/core';
3
- import TaskbarProcessor from '../snk-taskbar/processor/taskbar-processor';
4
3
  import { ConfigStorage } from '../../lib/configs/ConfigStorage';
4
+ import { PresentationMode } from '../../lib/@types';
5
+ import TaskbarProcessor from '../snk-taskbar/processor/taskbar-processor';
5
6
  export class SnkForm {
6
7
  constructor() {
7
8
  this._renderTimer = 500;
8
- this._taskbarProcessor = new TaskbarProcessor({
9
- "snkForm.regular": ["PREVIOUS", "NEXT", "DIVIDER", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "GRID_MODE", "CONFIGURATOR", "INSERT"],
10
- "snkForm.finish_edition": ["CANCEL", "SAVE"]
11
- });
12
9
  this._editionFormConfig = {};
13
10
  this._insertionFormConfig = {};
14
11
  this._showFormConfig = false;
12
+ /**
13
+ * Altera o modo de apresentação dos botões do snk-taskbar.
14
+ */
15
+ this.presentationMode = PresentationMode.PRIMARY;
15
16
  }
16
17
  /**
17
18
  * Exibe a janela de configurações do formulário.
@@ -25,6 +26,22 @@ export class SnkForm {
25
26
  async hideConfig() {
26
27
  this._showFormConfig = false;
27
28
  }
29
+ getFinishEditionTaskbarButtons() {
30
+ if (this.presentationMode === PresentationMode.PRIMARY) {
31
+ return ["CANCEL", "SAVE"];
32
+ }
33
+ else {
34
+ return ["SAVE", "CANCEL"];
35
+ }
36
+ }
37
+ getRegularTaskbarButtons() {
38
+ if (this.presentationMode === PresentationMode.PRIMARY) {
39
+ return ["PREVIOUS", "NEXT", "DIVIDER", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "GRID_MODE", "CONFIGURATOR", "INSERT"];
40
+ }
41
+ else {
42
+ return ["INSERT", "PREVIOUS", "NEXT", "DIVIDER", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "GRID_MODE", "CONFIGURATOR"];
43
+ }
44
+ }
28
45
  loadConfig() {
29
46
  if (this.configName == undefined) {
30
47
  return;
@@ -128,6 +145,33 @@ export class SnkForm {
128
145
  closeConfig() {
129
146
  this.hideConfig();
130
147
  }
148
+ validatePresentationMode() {
149
+ if (Object.values(PresentationMode).includes(this.presentationMode)) {
150
+ return;
151
+ }
152
+ this.presentationMode = PresentationMode.PRIMARY;
153
+ }
154
+ dataunitReady() {
155
+ this.loadInsertionConfig();
156
+ const dataInfo = { dataUnit: this._dataUnit };
157
+ ElementIDUtils.addIDInfo(this._element, null, dataInfo);
158
+ }
159
+ loadTaskbarProcessor() {
160
+ var _a;
161
+ const taskbarId = ((_a = this._dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "snkForm.finish_edition" : "snkForm.regular";
162
+ const disabledButtons = [];
163
+ if (!this._dataState || !this._dataState.hasPrevious) {
164
+ disabledButtons.push("PREVIOUS");
165
+ }
166
+ if (!this._dataState || !this._dataState.hasNext) {
167
+ disabledButtons.push("NEXT");
168
+ }
169
+ this._taskbarProcessor = new TaskbarProcessor({
170
+ "snkForm.regular": this.getRegularTaskbarButtons(),
171
+ "snkForm.finish_edition": this.getFinishEditionTaskbarButtons(),
172
+ });
173
+ this._taskbarProcessor.process(taskbarId, this.taskbarManager, this._dataState, disabledButtons);
174
+ }
131
175
  getDisabledButtons() {
132
176
  const disabled = [];
133
177
  if (!this._dataState.hasPrevious) {
@@ -138,11 +182,6 @@ export class SnkForm {
138
182
  }
139
183
  return disabled;
140
184
  }
141
- dataunitReady() {
142
- this.loadInsertionConfig();
143
- const dataInfo = { dataUnit: this._dataUnit };
144
- ElementIDUtils.addIDInfo(this._element, null, dataInfo);
145
- }
146
185
  componentWillLoad() {
147
186
  this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
148
187
  let parent = this._element.parentElement;
@@ -170,23 +209,20 @@ export class SnkForm {
170
209
  this.loadConfig();
171
210
  }
172
211
  componentWillRender() {
173
- var _a;
174
- const taskbarId = ((_a = this._dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "snkForm.finish_edition" : "snkForm.regular";
175
- const disabledButtons = [];
176
- if (!this._dataState || !this._dataState.hasPrevious) {
177
- disabledButtons.push("PREVIOUS");
178
- }
179
- if (!this._dataState || !this._dataState.hasNext) {
180
- disabledButtons.push("NEXT");
181
- }
182
- this._taskbarProcessor.process(taskbarId, this.taskbarManager, this._dataState, disabledButtons);
212
+ this.validatePresentationMode();
213
+ this.loadTaskbarProcessor();
183
214
  }
184
215
  render() {
185
216
  var _a;
186
217
  if (!this._dataUnit || !this._dataState) {
187
218
  return undefined;
188
219
  }
189
- return (h("section", { class: "snk-form" }, h("div", { class: "snk-form__header snk-form__header--fixed ez-row" }, h("div", { class: "ez-col ez-col--sd-6 ez-col--tb-6", key: "formHeader" }, h("ez-button", { title: this.getMessage("snkForm.goBackTitle"), mode: "icon", iconName: "arrow_back", class: "ez-padding-right--medium", size: "small", onClick: () => this.exitForm(), "data-element-id": "formToBack" }), h("h1", { class: "ez-title ez-title--primary ez-title--xlarge ez-align--middle" }, this.getMessage("snkForm.title"))), h("div", { class: "ez-col ez-col--sd-6 ez-col--tb-6 ez-align--right" }, h("snk-taskbar", { key: "formTaskbar", "data-element-id": "form", configName: this.configName, buttons: this._taskbarProcessor.buttons, disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, actionsList: this.actionsList, primaryButton: ((_a = this._dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", dataUnit: this._dataUnit }))), h("section", null, h("div", { class: "ez-row" }, h("div", { class: "ez-col ez-col--sd-12" }, h("ez-form", { key: "ezForm" + this._snkDataUnit.entityName, "data-element-id": "embedded", dataUnit: this._dataUnit, config: this.getFormConfig(), recordsValidator: this.recordsValidator, class: this._showFormConfig ? 'snk-form__form--hidden' : '' }), this._showFormConfig &&
220
+ return (h("section", { class: "snk-form" }, h("div", { class: `snk-form__header ez-row
221
+ ${this.presentationMode === PresentationMode.PRIMARY ? 'snk-form__header--fixed' : ''}
222
+ ` }, this.presentationMode === PresentationMode.PRIMARY &&
223
+ h("div", { class: "ez-col ez-col--sd-6 ez-col--tb-6", key: "formHeader" }, h("ez-button", { title: this.getMessage("snkForm.goBackTitle"), mode: "icon", iconName: "arrow_back", class: "ez-padding-right--medium", size: "small", onClick: () => this.exitForm(), "data-element-id": "formToBack" }), h("h1", { class: "ez-title ez-title--primary ez-title--xlarge ez-align--middle" }, this.getMessage("snkForm.title"))), h("div", { class: `ez-col
224
+ ${this.presentationMode === PresentationMode.PRIMARY ? "ez-col--sd-6 ez-col--tb-6 ez-align--right" : ""}
225
+ ` }, h("snk-taskbar", { key: "formTaskbar", "data-element-id": "form", configName: this.configName, buttons: this._taskbarProcessor.buttons, disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, actionsList: this.actionsList, primaryButton: ((_a = this._dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", dataUnit: this._dataUnit, presentationMode: this.presentationMode }))), h("section", null, h("div", { class: "ez-row" }, h("div", { class: "ez-col ez-col--sd-12" }, h("ez-form", { key: "ezForm" + this._snkDataUnit.entityName, "data-element-id": "embedded", dataUnit: this._dataUnit, config: this.getFormConfig(), recordsValidator: this.recordsValidator, class: this._showFormConfig ? 'snk-form__form--hidden' : '' }), this._showFormConfig &&
190
226
  h("snk-form-config", { dataUnit: this._dataUnit, formConfig: this.getFormConfig(), configName: this.configName, onConfigChange: (evt) => this.changeConfig(evt.detail), onConfigClose: () => this.closeConfig() }))))));
191
227
  }
192
228
  static get is() { return "snk-form"; }
@@ -282,6 +318,29 @@ export class SnkForm {
282
318
  "tags": [],
283
319
  "text": "Gerenciador das barras de tarefas. \u00C9 poss\u00EDvel determinar bot\u00F5es espec\u00EDficos\nou mesmo gerenciar o estado dos bot\u00F5es."
284
320
  }
321
+ },
322
+ "presentationMode": {
323
+ "type": "string",
324
+ "mutable": false,
325
+ "complexType": {
326
+ "original": "PresentationMode",
327
+ "resolved": "PresentationMode.PRIMARY | PresentationMode.SECONDARY",
328
+ "references": {
329
+ "PresentationMode": {
330
+ "location": "import",
331
+ "path": "../../lib/@types"
332
+ }
333
+ }
334
+ },
335
+ "required": false,
336
+ "optional": false,
337
+ "docs": {
338
+ "tags": [],
339
+ "text": "Altera o modo de apresenta\u00E7\u00E3o dos bot\u00F5es do snk-taskbar."
340
+ },
341
+ "attribute": "presentation-mode",
342
+ "reflect": false,
343
+ "defaultValue": "PresentationMode.PRIMARY"
285
344
  }
286
345
  };
287
346
  }
@@ -1,9 +1,16 @@
1
1
  :host {
2
+ /*@doc Define o espaçamento interno direito do componente arrastável.*/
3
+ --snk-config-options--border: 2px solid var(--color--secondary-200, #D2D3DA);
4
+
5
+ /*private*/
2
6
  width: 100%;
3
- border: 2px solid var(--color--secondary-200);
4
7
  border-radius: 15px;
8
+
9
+ /*public*/
10
+ border: var(--snk-config-options--border);
5
11
  }
6
12
 
7
13
  .config-options__switch-row {
14
+ /*private*/
8
15
  margin-top: -30px;
9
16
  }
@@ -1,5 +1,4 @@
1
1
  :host {
2
- /* dimensions */
3
2
  /*@doc Define a altura do componente.*/
4
3
  --snk-field-config--height: 42px;
5
4
  /*@doc Define a largura do componente.*/
@@ -7,9 +6,7 @@
7
6
  /*@doc Define a largura do slot que contém o ícone.*/
8
7
  --snk-field-config__icon--width: 48px;
9
8
  /*@doc Define a altura do componente em modo "slim".*/
10
- --snk-field-config--height--slim: 32px;
11
-
12
- /* general */
9
+ --snk-field-config-slim--height: 32px;
13
10
  /*@doc Define o raio da borda do input do componente.*/
14
11
  --snk-field-config--border-radius: var(--border--radius-medium, 12px);
15
12
  /*@doc Define o tamanho da fonte do input e label do componente.*/
@@ -20,20 +17,28 @@
20
17
  --snk-field-config--font-weight: var(--text-weight--medium, 400);
21
18
  /*@doc Define a cor da fonte do input e label do componente.*/
22
19
  --snk-field-config--color: var(--title--primary, #000);
23
-
24
- /* input */
20
+ /*@doc Define o espaçamento interno esquerdo do componente.*/
21
+ --snk-field-config--padding-left: var(--space--medium, 6px);
25
22
  /*@doc Define a cor de fundo do input.*/
26
23
  --snk-field-config__input--background-color: var(--background--medium, #e0e0e0);
27
24
  /*@doc Define o estilo da borda do input.*/
28
25
  --snk-field-config__input--border: var(--border--medium, 2px solid);
29
26
  /*@doc Define a cor da borda do input.*/
30
27
  --snk-field-config__input--border-color: var(--background--xlight, #fff);
31
- /*no modo normal usamos a borda com a mesma cor do bg*/
28
+ /*@doc Define no modo normal a borda com a mesma cor do bg.*/
32
29
  --snk-field-config__required--color: var(--color--error, #FF0000);
33
-
34
- /*no modo normal usamos a borda com a mesma cor do bg*/
35
- --snk-field-config__transition--visibility: var(--transition, 0.2s linear);
36
- --snk-field-config__transition--opacity: var(--transition, 0.15s linear);
30
+ /*@doc Define espeçamento interno esquerdo do label de required.*/
31
+ --snk-field-config__required--padding-left: var(--space--extra-small, 3px);
32
+ /*@doc Define o efeito de visualização do componente.*/
33
+ --snk-field-config__transition--visibility: var(--transition, 0.2s linear);
34
+ /*@doc Define o efeito de opacidade do componente.*/
35
+ --snk-field-config__transition--opacity: var(--transition, 0.15s linear);
36
+ /*@doc Define o z-index do popover.*/
37
+ --snk-field-config__config-popover--z-index: var(--more-visible, 2);
38
+ /*@doc Define a cor de fundo da seta externa do popover.*/
39
+ --snk-field-config__config-outer-arrow--background-color: var(--color--secondary-200, #D2D3DA);
40
+ /*@doc Define o espaçamento interno direito do componente arrastável.*/
41
+ --snk-field-config__draggable--padding-right: var(--space--small, 6px);
37
42
 
38
43
  /***************
39
44
  host style
@@ -55,7 +60,7 @@
55
60
  align-items: center;
56
61
 
57
62
  /*public*/
58
- padding-left: var(--space--medium, 6px);
63
+ padding-left: var(--snk-field-config--padding-left);
59
64
  font-weight: var(--snk-field-config--font-weight);
60
65
  height: var(--snk-field-config--height);
61
66
  border-radius: var(--snk-field-config--border-radius);
@@ -68,74 +73,89 @@
68
73
  }
69
74
 
70
75
  .field-config__config-popover {
76
+ /*private*/
71
77
  width: 40px;
72
78
  margin-left: auto;
73
- z-index: var(--more-visible, 2);
79
+
80
+ /*public*/
81
+ z-index: var(--snk-field-config__config-popover--z-index);
74
82
  }
75
83
 
76
84
  .field-config__required-label {
77
- padding-left: var(--space--extra-small, 3px);
78
-
79
85
  /*public*/
80
86
  color: var(--snk-field-config__required--color);
87
+ padding-left: var(--snk-field-config__required--padding-left);
81
88
  }
82
89
 
83
90
  .field-config__add {
91
+ /*private*/
84
92
  display: flex;
85
93
  margin-left: auto;
86
-
87
94
  visibility:hidden;
88
95
  opacity:0;
96
+
97
+ /*public*/
89
98
  transition: visibility var(--snk-field-config__transition--visibility), opacity var(--snk-field-config__transition--opacity);
90
99
  }
91
100
 
92
101
 
93
102
  .field-config__options {
103
+ /*private*/
94
104
  display: flex;
95
105
  margin-left: auto;
96
-
97
106
  visibility:hidden;
98
107
  opacity:0;
108
+
109
+ /*public*/
99
110
  transition: visibility var(--snk-field-config__transition--visibility), opacity var(--snk-field-config__transition--opacity);
100
111
  }
101
112
 
102
113
  .field-config__options--is-active {
114
+ /*private*/
103
115
  display: flex;
104
116
  visibility:visible;
105
117
  opacity:1;
106
118
  }
107
119
 
108
120
  .field-config__remove-icon {
121
+ /*private*/
109
122
  margin-right: -15px;
110
123
  }
111
124
 
112
125
  .field-config:hover .field-config__options {
126
+ /*private*/
113
127
  display: flex;
114
128
  visibility:visible;
115
129
  opacity:1;
116
130
  }
117
131
 
118
132
  .field-config:hover .field-config__add {
133
+ /*private*/
119
134
  visibility:visible;
120
135
  opacity:1;
121
136
  }
122
137
 
123
138
 
124
139
  .field-config__draggable {
125
- padding-right: var(--space--small, 6px);
140
+ /*public*/
141
+ padding-right: var(--snk-field-config__draggable--padding-right);
126
142
  }
127
143
 
128
144
  .field-config__config-outer-arrow {
129
- background-color: var(--color--secondary-200);
145
+ /*private*/
130
146
  clip-path: polygon(50% 0, 90% 100%, 10% 100%);
131
147
  border-radius: 0.25em 0 0 0;
132
148
  width: 30px;
133
149
  height: 15px;
134
150
  padding-top: 3px;
135
151
  border-bottom: 1px solid #FFFFFF;
152
+
153
+ /*public*/
154
+ background-color: var(--snk-field-config__config-outer-arrow--background-color);
136
155
  }
137
156
 
138
157
  .field-config__config-inner-arrow {
158
+ /*private*/
139
159
  background-color: #FFFFFF;
140
160
  clip-path: polygon(50% 0, 90% 100%, 10% 100%);
141
161
  border-radius: 0.25em 0 0 0;
@@ -144,6 +164,7 @@
144
164
  }
145
165
 
146
166
  .ez-box__container ez-collapsible-box {
167
+ /*private*/
147
168
  --snk-collapsible-box__header--padding-left: 6px;
148
169
  }
149
170
 
@@ -153,11 +174,13 @@ ez-icon {
153
174
  }
154
175
 
155
176
  ez-popover {
177
+ /*private*/
156
178
  --snk-popover__box--background-color: transparent;
157
179
  --snk-popover__box--box-shadow: none
158
180
  }
159
181
 
160
182
  .field-config__options ez-button {
183
+ /*private*/
161
184
  --snk-button--background-color: transparent;
162
185
  --snk-button--focus--border: none;
163
186
  --snk-button--focus--box-shadow: none;