@sankhyalabs/ezui 1.2.0-beta.21 → 1.2.0-beta.23

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 (65) hide show
  1. package/dist/cjs/CheckMode-ecb90b87.js +7 -0
  2. package/dist/cjs/ez-actions-button.cjs.entry.js +1 -1
  3. package/dist/cjs/ez-check.cjs.entry.js +10 -8
  4. package/dist/cjs/ez-chip.cjs.entry.js +11 -1
  5. package/dist/cjs/ez-collapsible-box.cjs.entry.js +1 -2
  6. package/dist/cjs/ez-combo-box.cjs.entry.js +10 -3
  7. package/dist/cjs/ez-form.cjs.entry.js +116 -3
  8. package/dist/cjs/ez-grid.cjs.entry.js +2 -3
  9. package/dist/cjs/ez-modal-container.cjs.entry.js +5 -1
  10. package/dist/cjs/ez-popup.cjs.entry.js +1 -1
  11. package/dist/cjs/ez-text-edit.cjs.entry.js +1 -1
  12. package/dist/cjs/ezui.cjs.js +1 -1
  13. package/dist/cjs/loader.cjs.js +1 -1
  14. package/dist/collection/collection-manifest.json +3 -3
  15. package/dist/collection/components/ez-check/CheckMode.js +5 -0
  16. package/dist/collection/components/ez-check/ez-check.css +23 -24
  17. package/dist/collection/components/ez-check/ez-check.js +10 -8
  18. package/dist/collection/components/ez-chip/ez-chip.js +11 -1
  19. package/dist/collection/components/ez-combo-box/ez-combo-box.js +9 -2
  20. package/dist/collection/components/ez-form/fieldbuilder/tpl/CheckBox.tpl.js +2 -1
  21. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +2 -3
  22. package/dist/collection/components/ez-modal-container/ez-modal-container.js +26 -2
  23. package/dist/collection/components/ez-popup/ez-popup.css +1 -0
  24. package/dist/collection/utils/index.js +1 -1
  25. package/dist/custom-elements/index.js +158 -131
  26. package/dist/esm/CheckMode-bdb2ec19.js +7 -0
  27. package/dist/esm/ez-actions-button.entry.js +1 -1
  28. package/dist/esm/ez-check.entry.js +10 -8
  29. package/dist/esm/ez-chip.entry.js +11 -1
  30. package/dist/esm/ez-collapsible-box.entry.js +1 -2
  31. package/dist/esm/ez-combo-box.entry.js +10 -3
  32. package/dist/esm/ez-form.entry.js +115 -2
  33. package/dist/esm/ez-grid.entry.js +2 -3
  34. package/dist/esm/ez-modal-container.entry.js +5 -1
  35. package/dist/esm/ez-popup.entry.js +1 -1
  36. package/dist/esm/ez-text-edit.entry.js +1 -1
  37. package/dist/esm/ezui.js +1 -1
  38. package/dist/esm/loader.js +1 -1
  39. package/dist/ezui/ezui.esm.js +1 -1
  40. package/dist/ezui/{p-72c75a43.entry.js → p-198c487e.entry.js} +1 -1
  41. package/dist/ezui/p-2213da1f.entry.js +1 -0
  42. package/dist/ezui/{p-dd257f17.entry.js → p-5bdb1a41.entry.js} +1 -1
  43. package/dist/ezui/p-659616e4.entry.js +1 -0
  44. package/dist/ezui/p-6608b9a5.entry.js +1 -0
  45. package/dist/ezui/{p-f36dbc21.entry.js → p-73df9db8.entry.js} +1 -1
  46. package/dist/ezui/{p-6befd7e4.entry.js → p-77ec47ac.entry.js} +1 -1
  47. package/dist/ezui/p-9b9ebf95.entry.js +1 -0
  48. package/dist/ezui/p-b853763b.js +1 -0
  49. package/dist/ezui/p-dfcf55e0.entry.js +1 -0
  50. package/dist/ezui/p-e6971baf.entry.js +1 -0
  51. package/dist/types/components/ez-check/CheckMode.d.ts +4 -0
  52. package/dist/types/components/ez-chip/ez-chip.d.ts +1 -0
  53. package/dist/types/components/ez-modal-container/ez-modal-container.d.ts +4 -0
  54. package/dist/types/components.d.ts +8 -0
  55. package/dist/types/utils/index.d.ts +1 -1
  56. package/package.json +1 -1
  57. package/dist/cjs/FieldBuilder-cd3e45ed.js +0 -119
  58. package/dist/esm/FieldBuilder-9e9545fc.js +0 -117
  59. package/dist/ezui/p-3c87845d.entry.js +0 -1
  60. package/dist/ezui/p-4ad647fc.entry.js +0 -1
  61. package/dist/ezui/p-54ecd19a.js +0 -1
  62. package/dist/ezui/p-712bd293.entry.js +0 -1
  63. package/dist/ezui/p-86daa81a.entry.js +0 -1
  64. package/dist/ezui/p-d91527dc.entry.js +0 -1
  65. package/dist/ezui/p-e59adce6.entry.js +0 -1
@@ -115,7 +115,7 @@
115
115
 
116
116
  /******** REGULAR MODE ********/
117
117
  /*---------------------------unchecked------------------------------*/
118
- input.regularMode {
118
+ input.regular-mode {
119
119
  /*private*/
120
120
  display: flex;
121
121
  flex-wrap: wrap;
@@ -135,12 +135,12 @@ input.regularMode {
135
135
  }
136
136
 
137
137
 
138
- input.regularMode:enabled:hover {
138
+ input.regular-mode:enabled:hover {
139
139
  /*public*/
140
140
  background-color: var(--ez-check--hover--background-color);
141
141
  }
142
142
 
143
- input.regularMode:enabled:focus {
143
+ input.regular-mode:enabled:focus {
144
144
  /*private*/
145
145
  outline: none;
146
146
 
@@ -148,13 +148,13 @@ input.regularMode:enabled:focus {
148
148
  background-color: var(--ez-check--focus--background-color);
149
149
  }
150
150
 
151
- input.regularMode:disabled {
151
+ input.regular-mode:disabled {
152
152
  /*private*/
153
153
  cursor: auto;
154
154
  background: none;
155
155
  }
156
156
 
157
- input.regularMode::before {
157
+ input.regular-mode::before {
158
158
  /*private*/
159
159
  box-sizing: border-box;
160
160
  content: "";
@@ -167,35 +167,35 @@ input.regularMode::before {
167
167
  border: var(--ez-check--border);
168
168
  }
169
169
 
170
- input.regularMode:disabled::before {
170
+ input.regular-mode:disabled::before {
171
171
  /*public*/
172
172
  border: var(--ez-check--disabled--border);
173
173
  }
174
174
 
175
175
  /*-------------------------------checked---------------------------------*/
176
- input.regularMode:checked:enabled:hover {
176
+ input.regular-mode:checked:enabled:hover {
177
177
  /*public*/
178
178
  background-color: var(--ez-check--checked--hover--background-color);
179
179
  }
180
180
 
181
- input.regularMode:checked:enabled:focus {
181
+ input.regular-mode:checked:enabled:focus {
182
182
  /*public*/
183
183
  background-color: var(--ez-check--checked--focus--background-color);
184
184
  }
185
185
 
186
- input.regularMode:checked::before {
186
+ input.regular-mode:checked::before {
187
187
  /*public*/
188
188
  border: var(--ez-check--checked--border);
189
189
  background-color: var(--ez-check--checked--background-color);
190
190
  }
191
191
 
192
- input.regularMode:checked:disabled:before {
192
+ input.regular-mode:checked:disabled:before {
193
193
  /*public*/
194
194
  border: var(--ez-check--disabled--border);
195
195
  background-color: var(--ez-check--checked--disabled--background-color);
196
196
  }
197
197
 
198
- input.regularMode:checked::after {
198
+ input.regular-mode:checked::after {
199
199
  /*private*/
200
200
  display: flex;
201
201
  position: absolute;
@@ -209,14 +209,14 @@ input.regularMode:checked::after {
209
209
  mask-image: var(--ez-check--check--image);
210
210
  }
211
211
 
212
- input.regularMode:checked:disabled::after {
212
+ input.regular-mode:checked:disabled::after {
213
213
  /*public*/
214
214
  background-color: var(--ez-check--check--disabled--background-color);
215
215
  }
216
216
 
217
217
  /******** SWITCH MODE ********/
218
218
  /*-------------------------------OFF---------------------------------*/
219
- input.switchMode {
219
+ input.switch-mode {
220
220
  /*private*/
221
221
  flex-shrink: 0;
222
222
  -webkit-appearance: none;
@@ -234,18 +234,18 @@ input.switchMode {
234
234
  background-color: var(--ez-switch--background-color);
235
235
  }
236
236
 
237
- input.switchMode:disabled {
237
+ input.switch-mode:disabled {
238
238
  /*public*/
239
239
  background-color: var(--ez-switch--disabled--background-color);
240
240
  border: var(--border--small, 1px solid) var(--ez-switch--pin--disabled--border-color, #a2abb9);
241
241
  }
242
242
 
243
- input.switchMode:checked:disabled {
243
+ input.switch-mode:checked:disabled {
244
244
  /*public*/
245
245
  background-color: var(--ez-switch--disabled--checked--background-color);
246
246
  }
247
247
 
248
- input.switchMode::after {
248
+ input.switch-mode::after {
249
249
  /*private*/
250
250
  content: "";
251
251
  display: block;
@@ -264,14 +264,14 @@ input.switchMode::after {
264
264
  background-color: var(--ez-switch--pin--background-color);
265
265
  }
266
266
 
267
- input.switchMode:disabled::after {
267
+ input.switch-mode:disabled::after {
268
268
  /*public*/
269
269
  background-color: var(--ez-switch--pin--disabled--background-color);
270
270
  border: var(--border--small, 1px solid) var(--ez-switch--pin--disabled--border-color, #a2abb9);
271
271
  }
272
272
 
273
273
  /*-------------------------------ON---------------------------------*/
274
- input.switchMode:checked {
274
+ input.switch-mode:checked {
275
275
  /*private*/
276
276
  transition: background-color var(--transition), border var(--transition);
277
277
 
@@ -280,7 +280,7 @@ input.switchMode:checked {
280
280
  border: var(--border--small, 1px solid) var(--color--primary, #008561);
281
281
  }
282
282
 
283
- input.switchMode::before {
283
+ input.switch-mode::before {
284
284
  /*private*/
285
285
  display: block;
286
286
  content: "";
@@ -297,19 +297,19 @@ input.switchMode::before {
297
297
  background-color: var(--ez-switch--pin--focus--background-color);
298
298
  }
299
299
 
300
- input.switchMode:focus::before {
300
+ input.switch-mode:focus::before {
301
301
  /*private*/
302
302
  opacity: 0.24;
303
303
  transition: opacity var(--transition);
304
304
  }
305
305
 
306
- input.switchMode:checked:focus::before {
306
+ input.switch-mode:checked:focus::before {
307
307
  /*private*/
308
308
  background-color: var(--ez-switch--pin--checked--focus--background-color);
309
309
  transform: translateX(calc(var(--ez-switch--slider--width) - var(--ez-switch--pin--width) + 2px));
310
310
  }
311
311
 
312
- input.switchMode:checked::after {
312
+ input.switch-mode:checked::after {
313
313
  /*private*/
314
314
  transition: transform var(--transition);
315
315
  transition: background-color var(--transition);
@@ -322,7 +322,7 @@ input.switchMode:checked::after {
322
322
  border: var(--border--small, 1px solid) var(--color--primary, #008561);
323
323
  }
324
324
 
325
- input.switchMode:checked:disabled::after {
325
+ input.switch-mode:checked:disabled::after {
326
326
  /*public*/
327
327
  background-color: var(--ez-switch--pin--checked--disabled--background-color);
328
328
  }
@@ -333,7 +333,6 @@ input.switchMode:checked:disabled::after {
333
333
  overflow: hidden;
334
334
  text-overflow: ellipsis;
335
335
  color: var(--ez-check--label--color);
336
- text-shadow: var(--text-shadow);
337
336
  font-size: var(--ez-check--label--font-size);
338
337
  font-family: var(--ez-check--label--font-family);
339
338
  cursor: default;
@@ -1,4 +1,5 @@
1
1
  import { Component, Prop, h, Watch, Method, Event, Host } from '@stencil/core';
2
+ import { CheckMode } from './CheckMode';
2
3
  export class EzCheck {
3
4
  constructor() {
4
5
  /**
@@ -11,16 +12,17 @@ export class EzCheck {
11
12
  * No modo "regular" a visualização é a tradicional de uma caixinha marcada/desmarcada.
12
13
  * No modo "switch" o campo tem uma interface em formato de um pino liga/desliga.
13
14
  */
14
- this.mode = "regular";
15
+ this.mode = CheckMode.REGULAR;
15
16
  }
16
17
  observeMode() {
17
- if (this.mode === "switch") {
18
- this._inputElem.classList.remove("regularMode");
19
- this._inputElem.classList.add("switchMode");
18
+ var _a;
19
+ if (((_a = this.mode) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === CheckMode.SWITCH) {
20
+ this._inputElem.classList.remove("regular-mode");
21
+ this._inputElem.classList.add("switch-mode");
20
22
  }
21
23
  else {
22
- this._inputElem.classList.remove("switchMode");
23
- this._inputElem.classList.add("regularMode");
24
+ this._inputElem.classList.remove("switch-mode");
25
+ this._inputElem.classList.add("regular-mode");
24
26
  }
25
27
  }
26
28
  //---------------------------------------------
@@ -57,7 +59,7 @@ export class EzCheck {
57
59
  }
58
60
  render() {
59
61
  return (h(Host, null,
60
- h("input", { type: "checkbox", class: "regularMode", checked: this.value === true, onChange: () => { this.changeValue(); }, disabled: !this.enabled, ref: (el) => this._inputElem = el }),
62
+ h("input", { type: "checkbox", class: "regular-mode", checked: this.value === true, onChange: () => { this.changeValue(); }, disabled: !this.enabled, ref: (el) => this._inputElem = el }),
61
63
  this.label ? h("label", { class: this.getLabelClasses(), onClick: () => { this.changeValue(); }, title: this.label }, this.label) : undefined));
62
64
  }
63
65
  static get is() { return "ez-check"; }
@@ -137,7 +139,7 @@ export class EzCheck {
137
139
  },
138
140
  "attribute": "mode",
139
141
  "reflect": true,
140
- "defaultValue": "\"regular\""
142
+ "defaultValue": "CheckMode.REGULAR"
141
143
  }
142
144
  }; }
143
145
  static get events() { return [{
@@ -53,6 +53,12 @@ export class EzChip {
53
53
  this.value = !this.value;
54
54
  }
55
55
  }
56
+ formatLabel() {
57
+ if (this.label.length > ChipSize.CHAR_LIMIT) {
58
+ return this.label.substring(0, ChipSize.CHAR_LIMIT) + "...";
59
+ }
60
+ return this.label;
61
+ }
56
62
  observeValue() {
57
63
  (this.value && this.mode !== "action") ? this._containerElem.classList.add("label__container--active") : this._containerElem.classList.remove("label__container--active");
58
64
  }
@@ -81,7 +87,7 @@ export class EzChip {
81
87
  return (h("button", { onClick: (ev) => this.handleClick(ev), class: "label__container" + (this.removePosition === "left" ? " label__container--row-reverse" : ""), ref: (el) => this._containerElem = el },
82
88
  h("div", { class: "label__content" },
83
89
  h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }),
84
- h("label", { class: "lbl " + (this.value ? "lbl--active " : ""), ref: (el) => this._labelElem = el }, this.label),
90
+ h("label", { class: "lbl " + (this.value ? "lbl--active " : ""), ref: (el) => this._labelElem = el, title: this.label }, this.formatLabel()),
85
91
  h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } })),
86
92
  this.mode !== 'action' && this.removePosition && h("ez-icon", { class: "btn-close", size: "small", "icon-name": "close" })));
87
93
  }
@@ -270,3 +276,7 @@ export class EzChip {
270
276
  "methodName": "observeEnabled"
271
277
  }]; }
272
278
  }
279
+ var ChipSize;
280
+ (function (ChipSize) {
281
+ ChipSize[ChipSize["CHAR_LIMIT"] = 28] = "CHAR_LIMIT";
282
+ })(ChipSize || (ChipSize = {}));
@@ -93,7 +93,14 @@ export class EzComboBox {
93
93
  if (currentValue) {
94
94
  text = this.showSelectedValue ? `${currentValue.value} - ${currentValue.label}` : currentValue.label;
95
95
  }
96
- return text;
96
+ if (text == undefined) {
97
+ return;
98
+ }
99
+ return String(text)
100
+ .replace(/&/g, '&')
101
+ .replace(/&lt;/g, '<')
102
+ .replace(/&gt;/g, '>')
103
+ .replace(/&quot;/g, '"');
97
104
  }
98
105
  getSelectedOption(value) {
99
106
  if (typeof value === "string" || value instanceof String) {
@@ -186,7 +193,7 @@ export class EzComboBox {
186
193
  }
187
194
  scrollToOption(opt, down) {
188
195
  window.requestAnimationFrame(() => {
189
- const liElem = this._optionsList.querySelector(`li#item_${opt.value}`);
196
+ const liElem = (opt === null || opt === void 0 ? void 0 : opt.value) ? this._optionsList.querySelector(`li#item_${opt.value}`) : undefined;
190
197
  if (liElem) {
191
198
  const parent = liElem.parentElement;
192
199
  const parentRect = parent.getBoundingClientRect();
@@ -1,4 +1,5 @@
1
1
  import { h } from "@stencil/core";
2
+ import { CheckMode } from "../../../ez-check/CheckMode";
2
3
  export const buildSwitch = (fieldConfig) => {
3
4
  return buildField(fieldConfig.name, fieldConfig.label, fieldConfig.readOnly, true);
4
5
  };
@@ -7,5 +8,5 @@ export const buildCheckBox = (fieldConfig) => {
7
8
  };
8
9
  function buildField(fieldName, fieldLabel, readOnly, switchMode = false) {
9
10
  return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-align--middle ez-padding-horizontal--small ez-padding-bottom--large" },
10
- h("ez-check", { enabled: !readOnly, label: fieldLabel, mode: switchMode ? "switch" : "regular", "data-field-name": fieldName, key: fieldName })));
11
+ h("ez-check", { enabled: !readOnly, label: fieldLabel, mode: switchMode ? CheckMode.SWITCH : CheckMode.REGULAR, "data-field-name": fieldName, key: fieldName })));
11
12
  }
@@ -237,8 +237,7 @@ export default class AgGridController {
237
237
  let columns = this.getColumnsDef();
238
238
  let visibleColumns = [];
239
239
  let sort = [];
240
- state.forEach((cfgColumn, index) => {
241
- this._gridOptions.columnApi.moveColumn(cfgColumn.name, index + 1);
240
+ state.forEach((cfgColumn) => {
242
241
  this._gridOptions.columnApi.setColumnWidth(cfgColumn.name, cfgColumn.width);
243
242
  visibleColumns.push(cfgColumn.name);
244
243
  if (cfgColumn.ascending !== undefined) {
@@ -272,7 +271,7 @@ export default class AgGridController {
272
271
  props.set('sortable', def.sortable);
273
272
  this.conditionalSet(colState, "props", props);
274
273
  return colState;
275
- }).filter(c => c.name !== "__SELECTION__");
274
+ }).filter(c => c.name !== "__SELECTION__" && c.name !== this.STATUS_COL_ID);
276
275
  }
277
276
  getSelection() {
278
277
  return this._gridOptions.api.getSelectedRows();
@@ -2,6 +2,12 @@ import { Component, h, Host, Prop, Event } from '@stencil/core';
2
2
  import ModalAction from './modal-action';
3
3
  import ModalButtonStatus from './modal-button-status';
4
4
  export class EzModalContainer {
5
+ constructor() {
6
+ /**
7
+ * Determina se o cabeçalho com o título deverá ser mostrado
8
+ */
9
+ this.showTitleBar = true;
10
+ }
5
11
  cancelIsVisible() {
6
12
  return (this.cancelButtonStatus !== ModalButtonStatus.HIDDEN && this.cancelButtonLabel != undefined);
7
13
  }
@@ -22,13 +28,13 @@ export class EzModalContainer {
22
28
  render() {
23
29
  return (h(Host, null,
24
30
  h("button", { class: "ez-modal-container__focus-ctrl", onFocusin: evt => this.focusLast(evt) }),
25
- h("div", { class: "ez-modal-container__header ez-align--middle" },
31
+ this.showTitleBar && h("div", { class: "ez-modal-container__header ez-margin-bottom--large ez-align--middle" },
26
32
  h("div", { class: "ez-col ez-align--middle ez-modal-container__title" },
27
33
  h("h2", { class: "ez-text ez-title--large ez-title--primary ez-text--bold ez-margin-vertical--extra-small" }, this.modalTitle),
28
34
  this.modalSubTitle ? h("div", { class: "ez-text ez-text--medium ez-text--primary ez-margin-vertical--extra-small" }, this.modalSubTitle) : undefined),
29
35
  h("button", { ref: ref => this._closeButton = ref, class: "ez-modal-container__close-button", onClick: () => this.ezModalAction.emit(ModalAction.CLOSE) },
30
36
  h("ez-icon", { class: "ez-modal-container__close-icon", size: "medium", iconName: "close" }))),
31
- h("div", { class: "ez-modal-container__content ez-margin-top--large" },
37
+ h("div", { class: "ez-modal-container__content" },
32
38
  h("slot", null)),
33
39
  h("div", { class: 'ez-col ez-margin-left--auto' },
34
40
  this.cancelIsVisible() ? h("ez-button", { label: this.cancelButtonLabel, enabled: this.cancelButtonStatus !== ModalButtonStatus.DISABLED, onClick: () => this.ezModalAction.emit(ModalAction.CANCEL) }) : undefined,
@@ -78,6 +84,24 @@ export class EzModalContainer {
78
84
  "attribute": "modal-sub-title",
79
85
  "reflect": false
80
86
  },
87
+ "showTitleBar": {
88
+ "type": "boolean",
89
+ "mutable": false,
90
+ "complexType": {
91
+ "original": "boolean",
92
+ "resolved": "boolean",
93
+ "references": {}
94
+ },
95
+ "required": false,
96
+ "optional": false,
97
+ "docs": {
98
+ "tags": [],
99
+ "text": "Determina se o cabe\u00E7alho com o t\u00EDtulo dever\u00E1 ser mostrado"
100
+ },
101
+ "attribute": "show-title-bar",
102
+ "reflect": false,
103
+ "defaultValue": "true"
104
+ },
81
105
  "cancelButtonLabel": {
82
106
  "type": "string",
83
107
  "mutable": false,
@@ -62,6 +62,7 @@
62
62
  display: flex;
63
63
  flex-wrap: wrap;
64
64
  overflow: hidden;
65
+ outline: none;
65
66
  background: #FFFF;
66
67
  color: var(--ez-popup__container--color);
67
68
  border-radius: 12px;
@@ -1,4 +1,4 @@
1
1
  export { default as ApplicationUtils } from './ApplicationUtils';
2
2
  export { default as CSSVarsUtils } from './CSSVarsUtils';
3
3
  export { DialogType } from '../components/ez-dialog/DialogType';
4
- export { buildField as formFieldBuilder } from '../components/ez-form/fieldbuilder/FieldBuilder';
4
+ export { CheckMode } from '../components/ez-check/CheckMode';