@sankhyalabs/ezui 1.1.105 → 1.1.108

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 (59) hide show
  1. package/dist/cjs/{AssetsUtils-69356e76.js → AssetsUtils-697927e8.js} +52 -52
  2. package/dist/cjs/{FloatingManager-6cfeb947.js → FloatingManager-751368a8.js} +121 -121
  3. package/dist/cjs/{UnitMetadata-4b90ead3.js → UnitMetadata-de809a4b.js} +1305 -1305
  4. package/dist/cjs/ez-calendar_16.cjs.entry.js +88 -74
  5. package/dist/cjs/ez-dialog.cjs.entry.js +1 -1
  6. package/dist/cjs/ez-grid.cjs.entry.js +12 -1
  7. package/dist/cjs/ez-modal_2.cjs.entry.js +2 -2
  8. package/dist/cjs/ez-popover.cjs.entry.js +2 -2
  9. package/dist/cjs/ez-toast.cjs.entry.js +8 -4
  10. package/dist/cjs/ezui.cjs.js +1 -1
  11. package/dist/cjs/loader.cjs.js +1 -1
  12. package/dist/collection/components/ez-check/ez-check.js +3 -0
  13. package/dist/collection/components/ez-dialog/ez-dialog.css +1 -1
  14. package/dist/collection/components/ez-form/ez-form.js +8 -1
  15. package/dist/collection/components/ez-form/fieldbuilder/tpl/CheckBox.tpl.js +1 -1
  16. package/dist/collection/components/ez-form/fieldbuilder/tpl/ComboBox.tpl.js +1 -1
  17. package/dist/collection/components/ez-form/fieldbuilder/tpl/DateInput.tpl.js +3 -3
  18. package/dist/collection/components/ez-form/fieldbuilder/tpl/FileInput.tpl.js +1 -1
  19. package/dist/collection/components/ez-form/fieldbuilder/tpl/NumberInput.tpl.js +1 -1
  20. package/dist/collection/components/ez-form/fieldbuilder/tpl/SearchInput.tpl.js +1 -1
  21. package/dist/collection/components/ez-form/fieldbuilder/tpl/TextArea.tpl.js +1 -1
  22. package/dist/collection/components/ez-form/fieldbuilder/tpl/TextInput.tpl.js +1 -1
  23. package/dist/collection/components/ez-form/structure/FormSheet.js +2 -1
  24. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +11 -0
  25. package/dist/collection/components/ez-text-area/ez-text-area.css +1 -1
  26. package/dist/collection/components/ez-text-input/ez-text-input.css +1 -2
  27. package/dist/collection/components/ez-toast/ez-toast.css +8 -2
  28. package/dist/collection/components/ez-toast/ez-toast.js +27 -8
  29. package/dist/collection/utils/ApplicationUtils.js +6 -1
  30. package/dist/custom-elements/index.js +1615 -1586
  31. package/dist/esm/{AssetsUtils-0e207bec.js → AssetsUtils-f75711ac.js} +52 -52
  32. package/dist/esm/{FloatingManager-bb90ef41.js → FloatingManager-ee1f7fdf.js} +121 -121
  33. package/dist/esm/{UnitMetadata-8951d803.js → UnitMetadata-d300ae38.js} +1305 -1305
  34. package/dist/esm/ez-calendar_16.entry.js +88 -74
  35. package/dist/esm/ez-dialog.entry.js +1 -1
  36. package/dist/esm/ez-grid.entry.js +12 -1
  37. package/dist/esm/ez-modal_2.entry.js +2 -2
  38. package/dist/esm/ez-popover.entry.js +2 -2
  39. package/dist/esm/ez-toast.entry.js +8 -4
  40. package/dist/esm/ezui.js +1 -1
  41. package/dist/esm/loader.js +1 -1
  42. package/dist/ezui/ezui.esm.js +1 -1
  43. package/dist/ezui/{p-e06e47f1.entry.js → p-24ff7d92.entry.js} +1 -1
  44. package/dist/ezui/{p-18c00d88.entry.js → p-3e6fa4ca.entry.js} +1 -1
  45. package/dist/ezui/{p-ec7c1b86.js → p-47cf74f0.js} +0 -0
  46. package/dist/ezui/p-780fbe22.entry.js +1 -0
  47. package/dist/ezui/p-81fc41a5.js +1 -0
  48. package/dist/ezui/p-9ea5b22e.entry.js +1 -0
  49. package/dist/ezui/{p-ddd0ef12.js → p-b05feb1f.js} +0 -0
  50. package/dist/ezui/{p-7294c815.entry.js → p-c451d6e6.entry.js} +1 -1
  51. package/dist/ezui/{p-41518731.entry.js → p-db1797d7.entry.js} +2 -2
  52. package/dist/types/components/ez-form/ez-form.d.ts +1 -0
  53. package/dist/types/components/ez-toast/ez-toast.d.ts +4 -0
  54. package/dist/types/components.d.ts +8 -0
  55. package/dist/types/utils/ApplicationUtils.d.ts +5 -1
  56. package/package.json +17 -20
  57. package/dist/ezui/p-4305092e.entry.js +0 -1
  58. package/dist/ezui/p-b217f40b.entry.js +0 -1
  59. package/dist/ezui/p-c6760545.js +0 -1
@@ -9,6 +9,6 @@ export const buildComboBox = ({ name, label, readOnly }, properties) => {
9
9
  else {
10
10
  options = prop;
11
11
  }
12
- return (h("div", { class: "col col--sd-12 col--tb-3 padding--small" },
12
+ return (h("div", { class: "col col--sd-12 col--tb-3 padding-horizontal--small" },
13
13
  h("ez-combo-box", { enabled: !readOnly, label: label, "data-field-name": name, key: name, options: options })));
14
14
  };
@@ -1,13 +1,13 @@
1
1
  import { h } from "@stencil/core";
2
2
  export const buildDate = ({ name, label, readOnly }) => {
3
- return (h("div", { class: "col col--sd-12 col--tb-3 padding--small" },
3
+ return (h("div", { class: "col col--sd-12 col--tb-3 padding-horizontal--small" },
4
4
  h("ez-date-input", { enabled: !readOnly, label: label, "data-field-name": name, key: name })));
5
5
  };
6
6
  export const buildTime = ({ name, label }) => {
7
- return (h("div", { class: "col col--sd-12 col--tb-3 padding--small" },
7
+ return (h("div", { class: "col col--sd-12 col--tb-3 padding-horizontal--small" },
8
8
  h("ez-time-input", { label: label, "data-field-name": name, key: name })));
9
9
  };
10
10
  export const buildTimeDate = ({ name, label }) => {
11
- return (h("div", { class: "col col--sd-12 col--tb-3 padding--small" },
11
+ return (h("div", { class: "col col--sd-12 col--tb-3 padding-horizontal--small" },
12
12
  h("ez-date-time-input", { label: label, "data-field-name": name, key: name })));
13
13
  };
@@ -1,5 +1,5 @@
1
1
  import { h } from "@stencil/core";
2
2
  export const buildFile = ({ name, label, readOnly }) => {
3
- return (h("div", { class: "col col--sd-12 padding--small" },
3
+ return (h("div", { class: "col col--sd-12 padding-horizontal--small" },
4
4
  h("ez-upload", { enabled: !readOnly, label: label, urlUpload: "", requestHeaders: "", maxFiles: 10, "data-field-name": name, key: name })));
5
5
  };
@@ -8,6 +8,6 @@ export const buildInteger = ({ name, label, readOnly }) => {
8
8
  return buildNumeric(name, label, readOnly, 0, 0);
9
9
  };
10
10
  function buildNumeric(fieldName, fieldLabel, readOnly, precision, prettyPrecision) {
11
- return (h("div", { class: "col col--sd-12 col--tb-3 padding--small" },
11
+ return (h("div", { class: "col col--sd-12 col--tb-3 padding-horizontal--small" },
12
12
  h("ez-number-input", { enabled: !readOnly, label: fieldLabel, precision: precision, prettyPrecision: prettyPrecision, "data-field-name": fieldName, key: fieldName })));
13
13
  }
@@ -1,5 +1,5 @@
1
1
  import { h } from "@stencil/core";
2
2
  export const buildSearch = ({ name, label, readOnly }) => {
3
- return (h("div", { class: "col col--sd-12 col--tb-3 padding--small" },
3
+ return (h("div", { class: "col col--sd-12 col--tb-3 padding-horizontal--small" },
4
4
  h("ez-search", { enabled: !readOnly, label: label, "data-field-name": name, key: name })));
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { h } from "@stencil/core";
2
2
  export const buildTextArea = ({ name, label, readOnly }) => {
3
- return (h("div", { class: "col col--sd-12 padding--small", key: name },
3
+ return (h("div", { class: "col col--sd-12 padding-horizontal--small", key: name },
4
4
  h("ez-text-area", { enabled: !readOnly, label: label, "data-field-name": name })));
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { h } from "@stencil/core";
2
2
  export const buildTextInput = ({ name, label }) => {
3
- return (h("div", { class: "col col--sd-12 col--tb-3 padding--small" },
3
+ return (h("div", { class: "col col--sd-12 col--tb-3 padding-horizontal--small" },
4
4
  h("ez-text-input", { label: label, "data-field-name": name, key: name })));
5
5
  };
@@ -1,5 +1,6 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { FormItem } from "./FormItem";
3
3
  export const FormSheet = ({ store, source }) => {
4
- return (h("div", { class: "box__container" }, source.items.map(item => h(FormItem, { store: store, source: item }))));
4
+ return (h("div", { class: "box__container" },
5
+ h("div", { class: "row padding-vertical--small" }, source.items.map(item => h(FormItem, { store: store, source: item })))));
5
6
  };
@@ -40,6 +40,7 @@ export default class AgGridController {
40
40
  serverSideStoreType: "partial",
41
41
  rowSelection: this._multipleSelection ? "multiple" : "single",
42
42
  serverSideDatasource: new DataSource(this._dataUnit, this._serverURL),
43
+ getRowNodeId: (params) => params.__record__id__,
43
44
  getMainMenuItems: (params) => {
44
45
  const column = params.column;
45
46
  const items = [column.isPinned() ? "clearPinned" : "pinLeft", "separator"];
@@ -48,6 +49,16 @@ export default class AgGridController {
48
49
  action: () => m.action(column.getColId(), m.name)
49
50
  }));
50
51
  return items;
52
+ },
53
+ onViewportChanged: (evt) => {
54
+ if (this._gridOptions && this._gridOptions.api && evt && evt.api) {
55
+ if (this._dataUnit.getSelection()) {
56
+ this._dataUnit.getSelection().forEach(id => {
57
+ let node = evt.api.getRowNode(id);
58
+ node.setSelected(true);
59
+ });
60
+ }
61
+ }
51
62
  }
52
63
  };
53
64
  this.setOptionsEvents(this._gridOptions);
@@ -113,7 +113,7 @@ textarea:disabled {
113
113
  /*private*/
114
114
  min-height: 16px;
115
115
  min-width: 100%;
116
- margin-top: 2px;
116
+ margin-top: 3px;
117
117
  line-height: 12px;
118
118
  overflow: hidden;
119
119
  text-overflow: ellipsis;
@@ -116,10 +116,9 @@ input.text--right {
116
116
 
117
117
  .message-box {
118
118
  /*private*/
119
- display: flex;
120
119
  min-height: 16px;
121
120
  min-width: 100%;
122
- margin-top: 2px;
121
+ margin-top: 3px;
123
122
  line-height: 12px;
124
123
  overflow: hidden;
125
124
  text-overflow: ellipsis;
@@ -21,7 +21,7 @@
21
21
  bottom: 100px;
22
22
  z-index: var(--ez-toast__container-z-index);
23
23
  left: 100px;
24
- width: 30%;
24
+ width: 280px;
25
25
  box-sizing: border-box;
26
26
  background-color: var(--ez-toast__container--background-color);
27
27
  border-radius: 6px;
@@ -37,7 +37,11 @@
37
37
  font-size: 14px;
38
38
  width: 90%;
39
39
  overflow: hidden;
40
- white-space: nowrap;
40
+ word-break: break-all;
41
+ height: auto;
42
+ -webkit-box-orient: vertical;
43
+ -webkit-line-clamp: 4;
44
+ display: -webkit-box;
41
45
  text-overflow: ellipsis;
42
46
  }
43
47
 
@@ -47,8 +51,10 @@
47
51
  }
48
52
 
49
53
  .btn-close {
54
+ margin-top: 3px;
50
55
  display: flex;
51
56
  justify-content: flex-end;
57
+ align-self: flex-start;
52
58
  padding: 0;
53
59
  outline: none;
54
60
  width: 10%;
@@ -9,6 +9,10 @@ export class EzToast {
9
9
  * Adiciona ícone de check no componente.
10
10
  */
11
11
  this.useIcon = false;
12
+ /**
13
+ * Controla o uso do icone de fechar o toast.
14
+ */
15
+ this.canClose = true;
12
16
  }
13
17
  /**
14
18
  * Exibe o componente na tela.
@@ -23,14 +27,11 @@ export class EzToast {
23
27
  }
24
28
  render() {
25
29
  return (h("div", { ref: (el) => this.container = el, class: "toast__container" },
26
- this.useIcon ?
27
- h("slot", { name: "icon" })
28
- : undefined,
29
- h("div", { class: this.useIcon ? "message__container message__conteiner--icon" : "message__container", title: this.message },
30
- " ",
31
- this.message,
32
- " "),
33
- h("button", { class: "btn-close", onClick: () => { this.container.classList.remove("toast__container--oppened"); this.container.style.animation = `none`; } })));
30
+ this.useIcon &&
31
+ h("slot", { name: "icon" }),
32
+ h("div", { class: this.useIcon ? "message__container message__conteiner--icon" : "message__container", title: this.message, innerHTML: this.message }),
33
+ this.canClose &&
34
+ h("button", { class: "btn-close", onClick: () => { this.container.classList.remove("toast__container--oppened"); this.container.style.animation = `none`; } })));
34
35
  }
35
36
  static get is() { return "ez-toast"; }
36
37
  static get encapsulation() { return "shadow"; }
@@ -93,6 +94,24 @@ export class EzToast {
93
94
  "attribute": "use-icon",
94
95
  "reflect": false,
95
96
  "defaultValue": "false"
97
+ },
98
+ "canClose": {
99
+ "type": "boolean",
100
+ "mutable": true,
101
+ "complexType": {
102
+ "original": "boolean",
103
+ "resolved": "boolean",
104
+ "references": {}
105
+ },
106
+ "required": false,
107
+ "optional": false,
108
+ "docs": {
109
+ "tags": [],
110
+ "text": "Controla o uso do icone de fechar o toast."
111
+ },
112
+ "attribute": "can-close",
113
+ "reflect": false,
114
+ "defaultValue": "true"
96
115
  }
97
116
  }; }
98
117
  static get methods() { return {
@@ -18,14 +18,19 @@ export default class ApplicationUtils {
18
18
  static async confirm(title, message, icon = null, critical = false) {
19
19
  return ApplicationUtils.showDialog(title, message, icon, true, critical);
20
20
  }
21
- static async info(message) {
21
+ static async info(message, options = ApplicationUtils.defaultMessageOptions) {
22
22
  let toast = document.querySelector("ez-toast");
23
23
  if (!toast) {
24
24
  toast = document.createElement("ez-toast");
25
25
  window.document.body.appendChild(toast);
26
26
  }
27
+ toast.canClose = options.canClose;
27
28
  toast.message = message;
28
29
  toast.fadeTime = 4000;
29
30
  toast.show();
30
31
  }
31
32
  }
33
+ ApplicationUtils.defaultMessageOptions = {
34
+ canClose: true
35
+ };
36
+ ;