@sankhyalabs/sankhyablocks 1.1.22 → 1.1.25

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 (184) hide show
  1. package/dist/cjs/ApplicationUtils-05b74ee9.js +39 -0
  2. package/dist/cjs/AssetsUtils-7e3c38f9.js +24 -0
  3. package/dist/cjs/CSSVarsUtils-75ca9c64.js +19 -0
  4. package/dist/cjs/ez-action-chip.cjs.entry.js +27 -0
  5. package/dist/cjs/ez-application.cjs.entry.js +26 -0
  6. package/dist/cjs/ez-button_4.cjs.entry.js +660 -0
  7. package/dist/cjs/ez-calendar.cjs.entry.js +223 -0
  8. package/dist/cjs/ez-collapsible-box.cjs.entry.js +47 -0
  9. package/dist/cjs/ez-combo-box.cjs.entry.js +278 -0
  10. package/dist/cjs/ez-date-input.cjs.entry.js +102 -0
  11. package/dist/cjs/ez-date-time-input.cjs.entry.js +145 -0
  12. package/dist/cjs/ez-dialog.cjs.entry.js +89 -0
  13. package/dist/cjs/ez-form.cjs.entry.js +463 -0
  14. package/dist/cjs/ez-grid.cjs.entry.js +647 -0
  15. package/dist/cjs/ez-icon.cjs.entry.js +41 -0
  16. package/dist/cjs/ez-label-chip.cjs.entry.js +104 -0
  17. package/dist/cjs/ez-modal_2.cjs.entry.js +316 -0
  18. package/dist/cjs/ez-number-input.cjs.entry.js +86 -0
  19. package/dist/cjs/ez-popover.cjs.entry.js +120 -0
  20. package/dist/cjs/ez-popup.cjs.entry.js +48 -0
  21. package/dist/cjs/ez-search.cjs.entry.js +64 -0
  22. package/dist/cjs/ez-tabselector.cjs.entry.js +198 -0
  23. package/dist/cjs/ez-text-area.cjs.entry.js +114 -0
  24. package/dist/cjs/ez-text-input.cjs.entry.js +201 -0
  25. package/dist/cjs/ez-time-input.cjs.entry.js +118 -0
  26. package/dist/cjs/ez-toast.cjs.entry.js +44 -0
  27. package/dist/cjs/ez-upload.cjs.entry.js +356 -0
  28. package/dist/cjs/index-682c98b2.js +1771 -0
  29. package/dist/cjs/loader.cjs.js +3 -3
  30. package/dist/cjs/sankhyablocks.cjs.js +3 -3
  31. package/dist/cjs/snk-application.cjs.entry.js +319 -1275
  32. package/dist/cjs/test-du.cjs.entry.js +76 -0
  33. package/dist/collection/collection-manifest.json +37 -2
  34. package/dist/collection/components/snk-application/snk-application.js +8 -4
  35. package/dist/collection/lib/http/data-fetcher/fetchers/dataunit-fetcher.js +16 -9
  36. package/dist/{collection/temp → components}/ApplicationUtils.js +37 -31
  37. package/dist/components/AssetsUtils.js +22 -0
  38. package/dist/components/CSSVarsUtils.js +17 -0
  39. package/dist/components/ez-action-chip.js +44 -0
  40. package/dist/components/ez-application.js +39 -0
  41. package/dist/components/ez-button.js +6 -0
  42. package/dist/components/ez-button2.js +105 -0
  43. package/dist/components/ez-calendar.js +6 -0
  44. package/dist/components/ez-calendar2.js +242 -0
  45. package/dist/components/ez-check.js +6 -0
  46. package/dist/components/ez-check2.js +94 -0
  47. package/dist/components/ez-collapsible-box.js +67 -0
  48. package/dist/components/ez-combo-box.js +6 -0
  49. package/dist/components/ez-combo-box2.js +311 -0
  50. package/dist/components/ez-date-input.js +135 -0
  51. package/dist/components/ez-date-time-input.js +179 -0
  52. package/dist/components/ez-dialog.js +124 -0
  53. package/dist/components/ez-form.js +6 -0
  54. package/dist/components/ez-form2.js +485 -0
  55. package/dist/components/ez-grid.js +738 -0
  56. package/dist/components/ez-icon.js +6 -0
  57. package/dist/components/ez-icon2.js +56 -0
  58. package/dist/components/ez-label-chip.js +125 -0
  59. package/dist/components/ez-list.js +6 -0
  60. package/dist/components/ez-list2.js +523 -0
  61. package/dist/components/ez-modal.js +6 -0
  62. package/dist/components/ez-modal2.js +82 -0
  63. package/dist/components/ez-number-input.js +115 -0
  64. package/dist/components/ez-popover.js +145 -0
  65. package/dist/components/ez-popup.js +67 -0
  66. package/dist/components/ez-search.js +100 -0
  67. package/dist/components/ez-tabselector.js +6 -0
  68. package/dist/components/ez-tabselector2.js +213 -0
  69. package/dist/components/ez-text-area.js +137 -0
  70. package/dist/components/ez-text-input.js +6 -0
  71. package/dist/components/ez-text-input2.js +223 -0
  72. package/dist/components/ez-time-input.js +153 -0
  73. package/dist/components/ez-toast.js +64 -0
  74. package/dist/components/ez-upload.js +382 -0
  75. package/dist/components/grid-config.js +6 -0
  76. package/dist/components/grid-config2.js +318 -0
  77. package/dist/components/select-box.js +6 -0
  78. package/dist/components/select-box2.js +47 -0
  79. package/dist/components/snk-application.js +310 -1266
  80. package/dist/components/test-du.js +101 -0
  81. package/dist/esm/ApplicationUtils-e0b6d857.js +37 -0
  82. package/dist/esm/AssetsUtils-6e6624dc.js +22 -0
  83. package/dist/esm/CSSVarsUtils-0787c3f3.js +17 -0
  84. package/dist/esm/ez-action-chip.entry.js +23 -0
  85. package/dist/esm/ez-application.entry.js +22 -0
  86. package/dist/esm/ez-button_4.entry.js +653 -0
  87. package/dist/esm/ez-calendar.entry.js +219 -0
  88. package/dist/esm/ez-collapsible-box.entry.js +43 -0
  89. package/dist/esm/ez-combo-box.entry.js +274 -0
  90. package/dist/esm/ez-date-input.entry.js +98 -0
  91. package/dist/esm/ez-date-time-input.entry.js +141 -0
  92. package/dist/esm/ez-dialog.entry.js +85 -0
  93. package/dist/esm/ez-form.entry.js +459 -0
  94. package/dist/esm/ez-grid.entry.js +643 -0
  95. package/dist/esm/ez-icon.entry.js +37 -0
  96. package/dist/esm/ez-label-chip.entry.js +100 -0
  97. package/dist/esm/ez-modal_2.entry.js +311 -0
  98. package/dist/esm/ez-number-input.entry.js +82 -0
  99. package/dist/esm/ez-popover.entry.js +116 -0
  100. package/dist/esm/ez-popup.entry.js +44 -0
  101. package/dist/esm/ez-search.entry.js +60 -0
  102. package/dist/esm/ez-tabselector.entry.js +194 -0
  103. package/dist/esm/ez-text-area.entry.js +110 -0
  104. package/dist/esm/ez-text-input.entry.js +197 -0
  105. package/dist/esm/ez-time-input.entry.js +114 -0
  106. package/dist/esm/ez-toast.entry.js +40 -0
  107. package/dist/esm/ez-upload.entry.js +352 -0
  108. package/dist/esm/index-35088a3f.js +1740 -0
  109. package/dist/esm/loader.js +3 -3
  110. package/dist/esm/sankhyablocks.js +3 -3
  111. package/dist/esm/snk-application.entry.js +311 -1267
  112. package/dist/esm/test-du.entry.js +72 -0
  113. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-action-chip/ez-action-chip.css +67 -0
  114. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-application/ez-application.css +3 -0
  115. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-button/ez-button.css +180 -0
  116. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-calendar/ez-calendar.css +319 -0
  117. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-check/ez-check.css +327 -0
  118. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +162 -0
  119. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-combo-box/ez-combo-box.css +217 -0
  120. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-date-input/ez-date-input.css +49 -0
  121. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-date-time-input/ez-date-time-input.css +44 -0
  122. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-dialog/ez-dialog.css +527 -0
  123. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-form/ez-form.css +5 -0
  124. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-grid/ez-grid.css +31 -0
  125. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-grid/subcomponents/gridconfig/grid-config.css +129 -0
  126. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-grid/subcomponents/select-box/select-box.css +10 -0
  127. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-icon/ez-icon.css +176 -0
  128. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-label-chip/ez-label-chip.css +139 -0
  129. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-list/ez-list.css +335 -0
  130. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-modal/ez-modal.css +358 -0
  131. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-number-input/ez-number-input.css +4 -0
  132. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-popover/ez-popover.css +44 -0
  133. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-popup/ez-popup.css +405 -0
  134. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-search/ez-search.css +3 -0
  135. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-tabselector/ez-tabselector.css +138 -0
  136. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-text-area/ez-text-area.css +165 -0
  137. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-text-input/ez-text-input.css +196 -0
  138. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-time-input/ez-time-input.css +10 -0
  139. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-toast/ez-toast.css +127 -0
  140. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-upload/ez-upload.css +568 -0
  141. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/test-du/test-du.css +3 -0
  142. package/dist/sankhyablocks/p-0183d259.entry.js +1 -0
  143. package/dist/sankhyablocks/p-01f23a70.entry.js +1 -0
  144. package/dist/sankhyablocks/p-07c32f68.entry.js +1 -0
  145. package/dist/sankhyablocks/p-0f90499d.entry.js +1 -0
  146. package/dist/sankhyablocks/p-105724a3.entry.js +1 -0
  147. package/dist/sankhyablocks/p-2ac02d48.entry.js +1 -0
  148. package/dist/sankhyablocks/p-35364a97.entry.js +1 -0
  149. package/dist/sankhyablocks/p-3f6aa9a7.entry.js +1 -0
  150. package/dist/sankhyablocks/p-5f9af495.entry.js +1 -0
  151. package/dist/sankhyablocks/p-60967cf0.js +1 -0
  152. package/dist/sankhyablocks/p-6ce33b60.entry.js +57 -0
  153. package/dist/sankhyablocks/p-70ad6c16.entry.js +1 -0
  154. package/dist/sankhyablocks/p-710bfffe.entry.js +1 -0
  155. package/dist/sankhyablocks/p-735440c1.entry.js +1 -0
  156. package/dist/sankhyablocks/p-811b4b9d.js +1 -0
  157. package/dist/sankhyablocks/p-813fe4f7.js +1 -0
  158. package/dist/sankhyablocks/p-85a9446b.js +2 -0
  159. package/dist/sankhyablocks/p-89a1100f.entry.js +1 -0
  160. package/dist/sankhyablocks/p-8b543003.entry.js +1 -0
  161. package/dist/sankhyablocks/p-9750632b.entry.js +1 -0
  162. package/dist/sankhyablocks/p-a96272f7.entry.js +1 -0
  163. package/dist/sankhyablocks/p-ac8842e5.entry.js +1 -0
  164. package/dist/sankhyablocks/p-ba64cc41.entry.js +1 -0
  165. package/dist/sankhyablocks/p-c1ede043.entry.js +1 -0
  166. package/dist/sankhyablocks/p-d90ebb85.entry.js +1 -0
  167. package/dist/sankhyablocks/p-e17dfaae.entry.js +1 -0
  168. package/dist/sankhyablocks/p-e5355a29.entry.js +1 -0
  169. package/dist/sankhyablocks/p-ef04b633.entry.js +1 -0
  170. package/dist/sankhyablocks/p-f6db07fb.entry.js +1 -0
  171. package/dist/sankhyablocks/p-fcd9bd92.entry.js +1 -0
  172. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  173. package/dist/types/components/snk-application/snk-application.d.ts +1 -1
  174. package/dist/types/components.d.ts +7 -3
  175. package/dist/types/lib/http/data-fetcher/fetchers/dataunit-fetcher.d.ts +1 -0
  176. package/package.json +12 -7
  177. package/react/components.d.ts +29 -0
  178. package/react/components.js +29 -0
  179. package/react/components.js.map +1 -1
  180. package/dist/cjs/index-20a7d705.js +0 -733
  181. package/dist/esm/index-8d3572c4.js +0 -707
  182. package/dist/sankhyablocks/p-5fa264b9.js +0 -1
  183. package/dist/sankhyablocks/p-fe95f2c4.entry.js +0 -57
  184. package/dist/types/temp/ApplicationUtils.d.ts +0 -7
@@ -0,0 +1,76 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-682c98b2.js');
6
+ const core = require('@sankhyalabs/core');
7
+
8
+ const testDuCss = ":host{display:block}";
9
+
10
+ const TestDu = class {
11
+ constructor(hostRef) {
12
+ index.registerInstance(this, hostRef);
13
+ }
14
+ /*private _ezButton// : HTMLEzButton;
15
+ private _ezComboBox// : HTMLEzComboBox;
16
+ private _ezDateInput// : HTMLEzDateInput;
17
+ private _ezDateTimeInput// : HTMLEzDateTimeInput;
18
+ private _ezNumberInput// : HTMLEzNumberInput
19
+ private _ezSearch// : HTMLEzSearch
20
+ private _ezUpload// : HTMLEzUpload*/
21
+ componentWillLoad() {
22
+ this.dataUnit = new core.DataUnit("testes_com_formulario");
23
+ this.dataUnit.metadata = {
24
+ name: "dd://br.com.sankhya.fin.cad.movimentacaoFinanceira/Financeiro",
25
+ label: "Parceiro",
26
+ fields: [
27
+ {
28
+ name: "CODPARC",
29
+ label: "Parceiro",
30
+ dataType: core.DataType.NUMBER,
31
+ userInterface: core.UserInterface.SEARCH,
32
+ required: true,
33
+ properties: {}
34
+ },
35
+ {
36
+ name: "RECDESP",
37
+ label: "Receita/Despesa",
38
+ dataType: core.DataType.TEXT,
39
+ userInterface: core.UserInterface.OPTIONSELECTOR,
40
+ required: true,
41
+ properties: { options: `{"-1": "Despesa", "1": "Receita"}` }
42
+ },
43
+ {
44
+ name: "P",
45
+ label: "pera",
46
+ dataType: core.DataType.TEXT,
47
+ userInterface: core.UserInterface.OPTIONSELECTOR,
48
+ properties: { options: `{"M": "Madura", "V": "Verde", "P": "Passada"}` }
49
+ },
50
+ {
51
+ name: "ME",
52
+ label: "ME",
53
+ dataType: core.DataType.NUMBER,
54
+ userInterface: core.UserInterface.DECIMALNUMBER,
55
+ properties: { precision: 4, prettyPrecision: 1 }
56
+ }
57
+ ]
58
+ };
59
+ this.dataUnit.dataLoader = () => new Promise(accept => accept([
60
+ {
61
+ __record__id__: "1321321321321321",
62
+ CODPARC: 10,
63
+ NOMEPARC: "Parceiro 10",
64
+ P: "M",
65
+ L: "Bagaço",
66
+ LI: "Azedo"
67
+ }
68
+ ]));
69
+ }
70
+ render() {
71
+ return (index.h("ez-form", { dataUnit: this.dataUnit }));
72
+ }
73
+ };
74
+ TestDu.style = testDuCss;
75
+
76
+ exports.test_du = TestDu;
@@ -4,9 +4,44 @@
4
4
  ],
5
5
  "compiler": {
6
6
  "name": "@stencil/core",
7
- "version": "2.15.2",
7
+ "version": "2.16.1",
8
8
  "typescriptVersion": "4.5.4"
9
9
  },
10
- "collections": [],
10
+ "collections": [
11
+ {
12
+ "name": "@sankhyalabs/ezui",
13
+ "tags": [
14
+ "ez-action-chip",
15
+ "ez-application",
16
+ "ez-button",
17
+ "ez-calendar",
18
+ "ez-check",
19
+ "ez-collapsible-box",
20
+ "ez-combo-box",
21
+ "ez-date-input",
22
+ "ez-date-time-input",
23
+ "ez-dialog",
24
+ "ez-form",
25
+ "ez-grid",
26
+ "ez-icon",
27
+ "ez-label-chip",
28
+ "ez-list",
29
+ "ez-modal",
30
+ "ez-number-input",
31
+ "ez-popover",
32
+ "ez-popup",
33
+ "ez-search",
34
+ "ez-tabselector",
35
+ "ez-text-area",
36
+ "ez-text-input",
37
+ "ez-time-input",
38
+ "ez-toast",
39
+ "ez-upload",
40
+ "grid-config",
41
+ "select-box",
42
+ "test-du"
43
+ ]
44
+ }
45
+ ],
11
46
  "bundles": []
12
47
  }
@@ -5,7 +5,8 @@ import Workspace from "../../lib/workspace/workspace";
5
5
  import ParametersFetcher from "../../lib/http/data-fetcher/fetchers/parameters-fecher";
6
6
  //FIXME: temporariamente estamos compiando essa classe do ezui pois não conseguimos
7
7
  //incluída no pacote. Isso deve ser resolvido nas proximas entregas e então ajustado aqui
8
- import ApplicationUtils from "../../temp/ApplicationUtils";
8
+ //import ApplicationUtils from "../../temp/ApplicationUtils";
9
+ import { ApplicationUtils } from "@sankhyalabs/ezui/dist/collection/utils";
9
10
  import { FormConfigFetcher } from "../../lib/http/data-fetcher/fetchers/form-config-fetcher";
10
11
  import { ApplicationContext } from "@sankhyalabs/core";
11
12
  import { pesquisaLoadOptions } from "../../lib/utils/pesquisa";
@@ -88,8 +89,8 @@ export class SnkApplication {
88
89
  async confirm(title, message, icon, critical) {
89
90
  return ApplicationUtils.confirm(title, message, icon, critical);
90
91
  }
91
- async info(message) {
92
- return ApplicationUtils.info(message);
92
+ async info(message, options = undefined) {
93
+ return ApplicationUtils.info(message, options);
93
94
  }
94
95
  async loadFormConfig(name) {
95
96
  return this.formConfigFetcher.loadFormConfig(name, this.resourceID);
@@ -444,10 +445,13 @@ export class SnkApplication {
444
445
  },
445
446
  "info": {
446
447
  "complexType": {
447
- "signature": "(message: string) => Promise<void>",
448
+ "signature": "(message: string, options?: any) => Promise<void>",
448
449
  "parameters": [{
449
450
  "tags": [],
450
451
  "text": ""
452
+ }, {
453
+ "tags": [],
454
+ "text": ""
451
455
  }],
452
456
  "references": {
453
457
  "Promise": {
@@ -123,15 +123,7 @@ export default class DataUnitFetcher {
123
123
  const changes = duChanges.map((change) => {
124
124
  const { dataUnit: changeDU, record, updatingFields, operation } = change;
125
125
  const parsedUpdatingFields = Object.entries(updatingFields).map(([fieldName, value]) => {
126
- if (value) {
127
- try {
128
- value = JSON.stringify(value);
129
- }
130
- catch (_a) {
131
- value = value.toString();
132
- }
133
- }
134
- return { fieldName, value };
126
+ return { fieldName, value: this.formatValueToServer(value) };
135
127
  });
136
128
  return { dataUnit: changeDU, updatingFields: parsedUpdatingFields, operation, recordId: record.__record__id__ };
137
129
  });
@@ -160,6 +152,21 @@ export default class DataUnitFetcher {
160
152
  });
161
153
  });
162
154
  }
155
+ formatValueToServer(value) {
156
+ if (value === undefined)
157
+ return value;
158
+ try {
159
+ if (value instanceof Date) {
160
+ return value.toString();
161
+ }
162
+ //Any others objects
163
+ value = JSON.stringify(value);
164
+ }
165
+ catch (_a) {
166
+ value = value.toString();
167
+ }
168
+ return value;
169
+ }
163
170
  removeRecords(dataUnit, recordIds) {
164
171
  const changes = recordIds.map((recordId) => {
165
172
  return { dataUnit: dataUnit.name, operation: ChangeOperation.DELETE, recordId };
@@ -1,31 +1,37 @@
1
- export default class ApplicationUtils {
2
- static async showDialog(title, message, icon = null, confirm, critical = false) {
3
- return new Promise(resolve => {
4
- let dialog = document.querySelector("ez-dialog");
5
- if (!dialog) {
6
- dialog = document.createElement("ez-dialog");
7
- window.document.body.appendChild(dialog);
8
- }
9
- dialog.show(title, message, critical, confirm, icon).then(ok => resolve(ok));
10
- });
11
- }
12
- static async alert(title, message, icon = null) {
13
- return ApplicationUtils.showDialog(title, message, icon, false, false);
14
- }
15
- static async error(title, message, icon = null) {
16
- return ApplicationUtils.showDialog(title, message, icon, false, true);
17
- }
18
- static async confirm(title, message, icon = null, critical = false) {
19
- return ApplicationUtils.showDialog(title, message, icon, true, critical);
20
- }
21
- static async info(message) {
22
- let toast = document.querySelector("ez-toast");
23
- if (!toast) {
24
- toast = document.createElement("ez-toast");
25
- window.document.body.appendChild(toast);
26
- }
27
- toast.message = message;
28
- toast.fadeTime = 4000;
29
- toast.show();
30
- }
31
- }
1
+ class ApplicationUtils {
2
+ static async showDialog(title, message, icon = null, confirm, critical = false) {
3
+ return new Promise(resolve => {
4
+ let dialog = document.querySelector("ez-dialog");
5
+ if (!dialog) {
6
+ dialog = document.createElement("ez-dialog");
7
+ window.document.body.appendChild(dialog);
8
+ }
9
+ dialog.show(title, message, critical, confirm, icon).then(ok => resolve(ok));
10
+ });
11
+ }
12
+ static async alert(title, message, icon = null) {
13
+ return ApplicationUtils.showDialog(title, message, icon, false, false);
14
+ }
15
+ static async error(title, message, icon = null) {
16
+ return ApplicationUtils.showDialog(title, message, icon, false, true);
17
+ }
18
+ static async confirm(title, message, icon = null, critical = false) {
19
+ return ApplicationUtils.showDialog(title, message, icon, true, critical);
20
+ }
21
+ static async info(message, options = ApplicationUtils.defaultMessageOptions) {
22
+ let toast = document.querySelector("ez-toast");
23
+ if (!toast) {
24
+ toast = document.createElement("ez-toast");
25
+ window.document.body.appendChild(toast);
26
+ }
27
+ toast.canClose = options.canClose;
28
+ toast.message = message;
29
+ toast.fadeTime = 4000;
30
+ toast.show();
31
+ }
32
+ }
33
+ ApplicationUtils.defaultMessageOptions = {
34
+ canClose: true
35
+ };
36
+
37
+ export { ApplicationUtils as A };
@@ -0,0 +1,22 @@
1
+ import { getAssetPath, setAssetPath } from '@stencil/core/internal/client';
2
+
3
+ const getSpritePath = (sprite) => `${getContextAssetsPath("../assets/actions-sprite.svg")}#${sprite}`;
4
+ let ctxLoaded = false;
5
+ function getContextAssetsPath(resource) {
6
+ if (!ctxLoaded) {
7
+ const scriptElem = document.querySelector("script[data-ezui-assets-url]");
8
+ if (scriptElem) {
9
+ let assetsPath = scriptElem.dataset.ezuiAssetsUrl;
10
+ if (assetsPath) {
11
+ if (assetsPath.startsWith('/')) {
12
+ assetsPath = window.location.origin + assetsPath;
13
+ }
14
+ setAssetPath(assetsPath);
15
+ }
16
+ }
17
+ ctxLoaded = true;
18
+ }
19
+ return getAssetPath(resource);
20
+ }
21
+
22
+ export { getSpritePath as g };
@@ -0,0 +1,17 @@
1
+ class CSSVarsUtils {
2
+ static applyVarsTextInput(host, child) {
3
+ if (child) {
4
+ CSSVarsUtils.applyIfExists(host, child, '--ez-text-input__input--background-color');
5
+ CSSVarsUtils.applyIfExists(host, child, '--ez-text-input__input--border-color');
6
+ CSSVarsUtils.applyIfExists(host, child, '--ez-text-input--height');
7
+ }
8
+ }
9
+ static applyIfExists(host, element, varName) {
10
+ const prop = getComputedStyle(host).getPropertyValue(varName);
11
+ if (prop) {
12
+ element.style.setProperty(varName, prop);
13
+ }
14
+ }
15
+ }
16
+
17
+ export { CSSVarsUtils as C };
@@ -0,0 +1,44 @@
1
+ import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
+
3
+ const ezActionChipCss = ":host{--ez-action-chip--height:36px;--ez-action-chip--border-radius:var(--border--radius-large, 24px);--ez-action-chip__border:1px solid;--ez-action-chip__border-color-strokes:var(--color--strokes, #DCE0E8);--ez-action-chip--font-size:var(--text--medium, 14px);--ez-action-chip--font-family:var(--font-pattern, Arial);--ez-action-chip--font-weight:var(--text-weight--large, 500);--ez-action-chip__label--title--primary:var(--title--primary, #919191);--ez-action-chip__label-color--disable-secondary:var(--color--disable-secondary, #F2F5F8);--ez-action-chip__label__default--background-color--hover:var(--color--primary-200, #f2faf8);--ez-action-chip__label__default--border-color--hover:var(--color--primary-600, #007a5a)}.label__container{width:fit-content;display:flex;flex-wrap:wrap;position:relative;background-color:#FFFFFF;align-items:center;align-self:center;cursor:pointer;color:var(--ez-action-chip__label--title--primary);fill:var(--ez-action-chip__label--title--primary);border:var(--ez-action-chip__border);border-radius:var(--ez-action-chip--border-radius);border-color:var(--ez-action-chip__border-color-strokes);padding-right:var(--space--medium, 12px);padding-left:var(--space--medium, 12px)}.label__container:hover{border-color:var(--ez-action-chip__label__default--border-color--hover);background-color:var(--ez-action-chip__label__default--background-color--hover)}label{display:flex;align-items:center;font-weight:var(--text-weight--large, 600);cursor:pointer;height:var(--ez-action-chip--height);font-family:var(--ez-action-chip--font-family);font-size:var(--ez-action-chip--font-size)}";
4
+
5
+ const EzLabelChip = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
6
+ constructor() {
7
+ super();
8
+ this.__registerHost();
9
+ this.__attachShadow();
10
+ this.actionClick = createEvent(this, "actionClick", 7);
11
+ /**
12
+ * Deixa o componente disponível ou não para seleção.
13
+ */
14
+ this.enabled = true;
15
+ }
16
+ //---------------------------------------------
17
+ // Lifecycle web component
18
+ //---------------------------------------------
19
+ render() {
20
+ return (h("div", { onClick: () => this.actionClick.emit(), class: "label__container" }, h("slot", { name: "leftIcon" }), h("label", null, this.label), h("slot", { name: "rightIcon" })));
21
+ }
22
+ static get style() { return ezActionChipCss; }
23
+ }, [1, "ez-action-chip", {
24
+ "label": [513],
25
+ "enabled": [516]
26
+ }]);
27
+ function defineCustomElement$1() {
28
+ if (typeof customElements === "undefined") {
29
+ return;
30
+ }
31
+ const components = ["ez-action-chip"];
32
+ components.forEach(tagName => { switch (tagName) {
33
+ case "ez-action-chip":
34
+ if (!customElements.get(tagName)) {
35
+ customElements.define(tagName, EzLabelChip);
36
+ }
37
+ break;
38
+ } });
39
+ }
40
+
41
+ const EzActionChip = EzLabelChip;
42
+ const defineCustomElement = defineCustomElement$1;
43
+
44
+ export { EzActionChip, defineCustomElement };
@@ -0,0 +1,39 @@
1
+ import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
+
3
+ const ezApplicationCss = "";
4
+
5
+ const EzApplication$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
6
+ constructor() {
7
+ super();
8
+ this.__registerHost();
9
+ this.applicationLoaded = createEvent(this, "applicationLoaded", 7);
10
+ }
11
+ componentWillLoad() {
12
+ //Initizalize application
13
+ }
14
+ componentDidLoad() {
15
+ this.applicationLoaded.emit(true);
16
+ }
17
+ render() {
18
+ return (h("div", null));
19
+ }
20
+ static get style() { return ezApplicationCss; }
21
+ }, [0, "ez-application"]);
22
+ function defineCustomElement$1() {
23
+ if (typeof customElements === "undefined") {
24
+ return;
25
+ }
26
+ const components = ["ez-application"];
27
+ components.forEach(tagName => { switch (tagName) {
28
+ case "ez-application":
29
+ if (!customElements.get(tagName)) {
30
+ customElements.define(tagName, EzApplication$1);
31
+ }
32
+ break;
33
+ } });
34
+ }
35
+
36
+ const EzApplication = EzApplication$1;
37
+ const defineCustomElement = defineCustomElement$1;
38
+
39
+ export { EzApplication, defineCustomElement };
@@ -0,0 +1,6 @@
1
+ import { E as EzButton$1, d as defineCustomElement$1 } from './ez-button2.js';
2
+
3
+ const EzButton = EzButton$1;
4
+ const defineCustomElement = defineCustomElement$1;
5
+
6
+ export { EzButton, defineCustomElement };
@@ -0,0 +1,105 @@
1
+ import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
2
+ import { d as defineCustomElement$1 } from './ez-icon2.js';
3
+
4
+ const ezButtonCss = ":host{--ez-button--min-width:100px;--ez-button--height:42px;--ez-button__icon--width:18px;--ez-button__inline__icon--padding:12px;--ez-button--padding-top:var(--space--medium, 12px);--ez-button--padding-bottom:var(--space--medium, 12px);--ez-button--padding-right:var(--space--large, 24px);--ez-button--padding-left:var(--space--large, 24px);--ez-button--color:var(--text--primary, #FFF);--ez-button--font-size:var(--text--medium, 14px);--ez-button--font-family:var(--font-pattern, Arial);--ez-button--font-weight:var(--text-weight--large);--ez-button--background-color:var(--background--medium, #c0c0c0);--ez-button--border-radius:var(--border--radius-large, 12px);--ez-button--border:none;--ez-button--hover--background-color:var(--background--strong, var(--ez-button--background-color));--ez-button--disabled-color:var(--text--disable);--ez-button--disabled--background-color:var(--color--disable-secondary);--ez-button--focus--border:var(--ez-button--border);--ez-button--focus--box-shadow:none;--ez-button--link-color:var(--color--primary, '#008561');--ez-button--link--hover-color:var(--color--primary-700, '#1C1D22');--ez-button--link--small--font-size:var(--text--small, 12px);--ez-button--link--medium--font-size:var(--text--medium, 14px);--ez-button--link--large--font-size:var(--text--large, 16px)}ez-icon{--ez-icon--color:inherit}button{display:flex;align-items:center;justify-content:center;margin:0;cursor:pointer;transition:background-color 0.2s linear;min-width:var(--ez-button--min-width);height:var(--ez-button--height);font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);padding:var(--ez-button--padding-top) var(--ez-button--padding-right) var(--ez-button--padding-bottom) var(--ez-button--padding-left);border-radius:var(--ez-button--border-radius);background-color:var(--ez-button--background-color);color:var(--ez-button--color);fill:var(--ez-button--color);border:var(--ez-button--border)}button:hover{background-color:var(--ez-button--hover--background-color)}button:focus{outline:none;border:var(--ez-button--focus--border);box-shadow:var(--ez-button--focus--box-shadow)}button:disabled{background-color:var(--ez-button--disabled--background-color);color:var(--ez-button--disabled-color);fill:var(--ez-button--disabled-color);border:none;cursor:no-drop}button.icon{padding:0px}button.small{width:32px;min-width:32px;height:32px}button.medium{width:42px;min-width:42px;height:42px}button.large{width:52px;min-width:52px;height:52px}.label-icon{display:flex;flex-direction:column;align-items:center;color:var(--ez-button--color)}.label-icon label{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight)}a{font-family:var(--ez-button--font-family);font-weight:var(--ez-button--font-weight);color:var(--ez-button--link-color);cursor:pointer;display:flex;align-items:center;justify-content:center;}a:hover{color:var(--ez-button--link--hover-color)}a.small{font-size:var(--ez-button--link--small--font-size);line-height:var(--ez-button--link--small--font-size)}a.medium{font-size:var(--ez-button--link--medium--font-size);line-height:var(--ez-button--link--medium--font-size)}a.large{font-size:var(--ez-button--link--large--font-size);line-height:var(--ez-button--link--large--font-size)}";
5
+
6
+ const EzButton = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
7
+ constructor() {
8
+ super();
9
+ this.__registerHost();
10
+ this.__attachShadow();
11
+ /**
12
+ * Deixa o botão disponível ou não para interação com o usuário.
13
+ */
14
+ this.enabled = true;
15
+ /**
16
+ * Define o modo de uso do botão; opções: icon, link e regular
17
+ */
18
+ this.mode = "regular";
19
+ /**
20
+ * É possível escolher entre [small,medium,large] (somente para os modos "icon" e "link")
21
+ */
22
+ this.size = "medium";
23
+ }
24
+ /**
25
+ * Realiza o foco no botão
26
+ */
27
+ async setFocus() {
28
+ this._button.focus();
29
+ }
30
+ /**
31
+ * Remove o foco no botão
32
+ */
33
+ async setBlur() {
34
+ this._button.blur();
35
+ }
36
+ getIconSize() {
37
+ return this.size;
38
+ }
39
+ handleSlotChange(ev) {
40
+ const slot = ev.target;
41
+ const content = slot.assignedElements()[0];
42
+ if (this.mode == "link") {
43
+ content.style.display = "inline";
44
+ if (slot.name == "leftIcon") {
45
+ content.style.paddingRight = "var(--ez-button__inline__icon--padding)";
46
+ }
47
+ else if (slot.name == "rightIcon") {
48
+ content.style.paddingLeft = "var(--ez-button__inline__icon--padding)";
49
+ }
50
+ }
51
+ else {
52
+ content.style.setProperty('--ez-icon--color', 'var(--ez-icon--color)');
53
+ }
54
+ }
55
+ render() {
56
+ if (this.mode == "icon") {
57
+ return (h("button", { class: "icon " + this.size, type: "button", disabled: !this.enabled, ref: (el) => this._button = el }, h("ez-icon", { class: "icon", href: this.image, iconName: this.iconName, size: this.getIconSize(), onClick: evt => {
58
+ if (!this.enabled)
59
+ evt.stopPropagation();
60
+ } })));
61
+ }
62
+ else if (this.mode == "label-icon") {
63
+ return (h("div", { class: "label-icon" }, h("button", { class: "icon", type: "button", disabled: !this.enabled, ref: (el) => this._button = el }, h("ez-icon", { class: "icon", href: this.image, iconName: this.iconName, size: "large", onClick: evt => {
64
+ if (!this.enabled)
65
+ evt.stopPropagation();
66
+ } })), h("label", { title: this.label }, this.label)));
67
+ }
68
+ else if (this.mode == "link") {
69
+ return (h("a", { class: this.size, ref: (el) => this._button = el }, h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.label, h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } })));
70
+ }
71
+ else {
72
+ return (h("button", { type: "button", disabled: !this.enabled, ref: (el) => this._button = el }, h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.label, h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } })));
73
+ }
74
+ }
75
+ static get style() { return ezButtonCss; }
76
+ }, [1, "ez-button", {
77
+ "label": [513],
78
+ "enabled": [516],
79
+ "mode": [513],
80
+ "image": [513],
81
+ "iconName": [513, "icon-name"],
82
+ "size": [513],
83
+ "setFocus": [64],
84
+ "setBlur": [64]
85
+ }]);
86
+ function defineCustomElement() {
87
+ if (typeof customElements === "undefined") {
88
+ return;
89
+ }
90
+ const components = ["ez-button", "ez-icon"];
91
+ components.forEach(tagName => { switch (tagName) {
92
+ case "ez-button":
93
+ if (!customElements.get(tagName)) {
94
+ customElements.define(tagName, EzButton);
95
+ }
96
+ break;
97
+ case "ez-icon":
98
+ if (!customElements.get(tagName)) {
99
+ defineCustomElement$1();
100
+ }
101
+ break;
102
+ } });
103
+ }
104
+
105
+ export { EzButton as E, defineCustomElement as d };
@@ -0,0 +1,6 @@
1
+ import { E as EzCalendar$1, d as defineCustomElement$1 } from './ez-calendar2.js';
2
+
3
+ const EzCalendar = EzCalendar$1;
4
+ const defineCustomElement = defineCustomElement$1;
5
+
6
+ export { EzCalendar, defineCustomElement };