@sankhyalabs/sankhyablocks 1.1.25 → 1.2.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 (250) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +75 -75
  3. package/package.json +94 -49
  4. package/react/.keepfolder +1 -0
  5. package/dist/cjs/ApplicationUtils-05b74ee9.js +0 -39
  6. package/dist/cjs/AssetsUtils-7e3c38f9.js +0 -24
  7. package/dist/cjs/CSSVarsUtils-75ca9c64.js +0 -19
  8. package/dist/cjs/ez-action-chip.cjs.entry.js +0 -27
  9. package/dist/cjs/ez-application.cjs.entry.js +0 -26
  10. package/dist/cjs/ez-button_4.cjs.entry.js +0 -660
  11. package/dist/cjs/ez-calendar.cjs.entry.js +0 -223
  12. package/dist/cjs/ez-collapsible-box.cjs.entry.js +0 -47
  13. package/dist/cjs/ez-combo-box.cjs.entry.js +0 -278
  14. package/dist/cjs/ez-date-input.cjs.entry.js +0 -102
  15. package/dist/cjs/ez-date-time-input.cjs.entry.js +0 -145
  16. package/dist/cjs/ez-dialog.cjs.entry.js +0 -89
  17. package/dist/cjs/ez-form.cjs.entry.js +0 -463
  18. package/dist/cjs/ez-grid.cjs.entry.js +0 -647
  19. package/dist/cjs/ez-icon.cjs.entry.js +0 -41
  20. package/dist/cjs/ez-label-chip.cjs.entry.js +0 -104
  21. package/dist/cjs/ez-modal_2.cjs.entry.js +0 -316
  22. package/dist/cjs/ez-number-input.cjs.entry.js +0 -86
  23. package/dist/cjs/ez-popover.cjs.entry.js +0 -120
  24. package/dist/cjs/ez-popup.cjs.entry.js +0 -48
  25. package/dist/cjs/ez-search.cjs.entry.js +0 -64
  26. package/dist/cjs/ez-tabselector.cjs.entry.js +0 -198
  27. package/dist/cjs/ez-text-area.cjs.entry.js +0 -114
  28. package/dist/cjs/ez-text-input.cjs.entry.js +0 -201
  29. package/dist/cjs/ez-time-input.cjs.entry.js +0 -118
  30. package/dist/cjs/ez-toast.cjs.entry.js +0 -44
  31. package/dist/cjs/ez-upload.cjs.entry.js +0 -356
  32. package/dist/cjs/index-682c98b2.js +0 -1771
  33. package/dist/cjs/index.cjs.js +0 -2
  34. package/dist/cjs/loader.cjs.js +0 -21
  35. package/dist/cjs/sankhyablocks.cjs.js +0 -19
  36. package/dist/cjs/snk-application.cjs.entry.js +0 -7065
  37. package/dist/cjs/test-du.cjs.entry.js +0 -76
  38. package/dist/collection/collection-manifest.json +0 -47
  39. package/dist/collection/components/snk-application/snk-application.css +0 -5
  40. package/dist/collection/components/snk-application/snk-application.js +0 -495
  41. package/dist/collection/index.js +0 -1
  42. package/dist/collection/lib/http/data-fetcher/DataFetcher.js +0 -158
  43. package/dist/collection/lib/http/data-fetcher/fetchers/application-config-fetcher.js +0 -23
  44. package/dist/collection/lib/http/data-fetcher/fetchers/dataunit-fetcher.js +0 -188
  45. package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +0 -25
  46. package/dist/collection/lib/http/data-fetcher/fetchers/grid-config-fetcher.js +0 -2
  47. package/dist/collection/lib/http/data-fetcher/fetchers/parameters-fecher.js +0 -59
  48. package/dist/collection/lib/http/data-fetcher/fetchers/resource-fetcher.js +0 -30
  49. package/dist/collection/lib/http/data-fetcher/state/LoadStateManager.js +0 -66
  50. package/dist/collection/lib/utils/pesquisa.js +0 -16
  51. package/dist/collection/lib/utils/urlutils.js +0 -23
  52. package/dist/collection/lib/workspace/workspace.js +0 -7
  53. package/dist/components/ApplicationUtils.js +0 -37
  54. package/dist/components/AssetsUtils.js +0 -22
  55. package/dist/components/CSSVarsUtils.js +0 -17
  56. package/dist/components/ez-action-chip.js +0 -44
  57. package/dist/components/ez-application.js +0 -39
  58. package/dist/components/ez-button.js +0 -6
  59. package/dist/components/ez-button2.js +0 -105
  60. package/dist/components/ez-calendar.js +0 -6
  61. package/dist/components/ez-calendar2.js +0 -242
  62. package/dist/components/ez-check.js +0 -6
  63. package/dist/components/ez-check2.js +0 -94
  64. package/dist/components/ez-collapsible-box.js +0 -67
  65. package/dist/components/ez-combo-box.js +0 -6
  66. package/dist/components/ez-combo-box2.js +0 -311
  67. package/dist/components/ez-date-input.js +0 -135
  68. package/dist/components/ez-date-time-input.js +0 -179
  69. package/dist/components/ez-dialog.js +0 -124
  70. package/dist/components/ez-form.js +0 -6
  71. package/dist/components/ez-form2.js +0 -485
  72. package/dist/components/ez-grid.js +0 -738
  73. package/dist/components/ez-icon.js +0 -6
  74. package/dist/components/ez-icon2.js +0 -56
  75. package/dist/components/ez-label-chip.js +0 -125
  76. package/dist/components/ez-list.js +0 -6
  77. package/dist/components/ez-list2.js +0 -523
  78. package/dist/components/ez-modal.js +0 -6
  79. package/dist/components/ez-modal2.js +0 -82
  80. package/dist/components/ez-number-input.js +0 -115
  81. package/dist/components/ez-popover.js +0 -145
  82. package/dist/components/ez-popup.js +0 -67
  83. package/dist/components/ez-search.js +0 -100
  84. package/dist/components/ez-tabselector.js +0 -6
  85. package/dist/components/ez-tabselector2.js +0 -213
  86. package/dist/components/ez-text-area.js +0 -137
  87. package/dist/components/ez-text-input.js +0 -6
  88. package/dist/components/ez-text-input2.js +0 -223
  89. package/dist/components/ez-time-input.js +0 -153
  90. package/dist/components/ez-toast.js +0 -64
  91. package/dist/components/ez-upload.js +0 -382
  92. package/dist/components/grid-config.js +0 -6
  93. package/dist/components/grid-config2.js +0 -318
  94. package/dist/components/index.d.ts +0 -26
  95. package/dist/components/index.js +0 -1
  96. package/dist/components/select-box.js +0 -6
  97. package/dist/components/select-box2.js +0 -47
  98. package/dist/components/snk-application.d.ts +0 -11
  99. package/dist/components/snk-application.js +0 -7094
  100. package/dist/components/test-du.js +0 -101
  101. package/dist/esm/ApplicationUtils-e0b6d857.js +0 -37
  102. package/dist/esm/AssetsUtils-6e6624dc.js +0 -22
  103. package/dist/esm/CSSVarsUtils-0787c3f3.js +0 -17
  104. package/dist/esm/ez-action-chip.entry.js +0 -23
  105. package/dist/esm/ez-application.entry.js +0 -22
  106. package/dist/esm/ez-button_4.entry.js +0 -653
  107. package/dist/esm/ez-calendar.entry.js +0 -219
  108. package/dist/esm/ez-collapsible-box.entry.js +0 -43
  109. package/dist/esm/ez-combo-box.entry.js +0 -274
  110. package/dist/esm/ez-date-input.entry.js +0 -98
  111. package/dist/esm/ez-date-time-input.entry.js +0 -141
  112. package/dist/esm/ez-dialog.entry.js +0 -85
  113. package/dist/esm/ez-form.entry.js +0 -459
  114. package/dist/esm/ez-grid.entry.js +0 -643
  115. package/dist/esm/ez-icon.entry.js +0 -37
  116. package/dist/esm/ez-label-chip.entry.js +0 -100
  117. package/dist/esm/ez-modal_2.entry.js +0 -311
  118. package/dist/esm/ez-number-input.entry.js +0 -82
  119. package/dist/esm/ez-popover.entry.js +0 -116
  120. package/dist/esm/ez-popup.entry.js +0 -44
  121. package/dist/esm/ez-search.entry.js +0 -60
  122. package/dist/esm/ez-tabselector.entry.js +0 -194
  123. package/dist/esm/ez-text-area.entry.js +0 -110
  124. package/dist/esm/ez-text-input.entry.js +0 -197
  125. package/dist/esm/ez-time-input.entry.js +0 -114
  126. package/dist/esm/ez-toast.entry.js +0 -40
  127. package/dist/esm/ez-upload.entry.js +0 -352
  128. package/dist/esm/index-35088a3f.js +0 -1740
  129. package/dist/esm/index.js +0 -1
  130. package/dist/esm/loader.js +0 -17
  131. package/dist/esm/polyfills/core-js.js +0 -11
  132. package/dist/esm/polyfills/css-shim.js +0 -1
  133. package/dist/esm/polyfills/dom.js +0 -79
  134. package/dist/esm/polyfills/es5-html-element.js +0 -1
  135. package/dist/esm/polyfills/index.js +0 -34
  136. package/dist/esm/polyfills/system.js +0 -6
  137. package/dist/esm/sankhyablocks.js +0 -17
  138. package/dist/esm/snk-application.entry.js +0 -7061
  139. package/dist/esm/test-du.entry.js +0 -72
  140. package/dist/index.cjs.js +0 -1
  141. package/dist/index.js +0 -1
  142. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-action-chip/ez-action-chip.css +0 -67
  143. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-application/ez-application.css +0 -3
  144. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-button/ez-button.css +0 -180
  145. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-calendar/ez-calendar.css +0 -319
  146. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-check/ez-check.css +0 -327
  147. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +0 -162
  148. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-combo-box/ez-combo-box.css +0 -217
  149. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-date-input/ez-date-input.css +0 -49
  150. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-date-time-input/ez-date-time-input.css +0 -44
  151. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-dialog/ez-dialog.css +0 -527
  152. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-form/ez-form.css +0 -5
  153. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-grid/ez-grid.css +0 -31
  154. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-grid/subcomponents/gridconfig/grid-config.css +0 -129
  155. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-grid/subcomponents/select-box/select-box.css +0 -10
  156. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-icon/ez-icon.css +0 -176
  157. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-label-chip/ez-label-chip.css +0 -139
  158. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-list/ez-list.css +0 -335
  159. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-modal/ez-modal.css +0 -358
  160. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-number-input/ez-number-input.css +0 -4
  161. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-popover/ez-popover.css +0 -44
  162. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-popup/ez-popup.css +0 -405
  163. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-search/ez-search.css +0 -3
  164. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-tabselector/ez-tabselector.css +0 -138
  165. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-text-area/ez-text-area.css +0 -165
  166. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-text-input/ez-text-input.css +0 -196
  167. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-time-input/ez-time-input.css +0 -10
  168. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-toast/ez-toast.css +0 -127
  169. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-upload/ez-upload.css +0 -568
  170. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/test-du/test-du.css +0 -3
  171. package/dist/sankhyablocks/index.esm.js +0 -0
  172. package/dist/sankhyablocks/p-0183d259.entry.js +0 -1
  173. package/dist/sankhyablocks/p-01f23a70.entry.js +0 -1
  174. package/dist/sankhyablocks/p-07c32f68.entry.js +0 -1
  175. package/dist/sankhyablocks/p-0f90499d.entry.js +0 -1
  176. package/dist/sankhyablocks/p-105724a3.entry.js +0 -1
  177. package/dist/sankhyablocks/p-2ac02d48.entry.js +0 -1
  178. package/dist/sankhyablocks/p-35364a97.entry.js +0 -1
  179. package/dist/sankhyablocks/p-3f6aa9a7.entry.js +0 -1
  180. package/dist/sankhyablocks/p-5f9af495.entry.js +0 -1
  181. package/dist/sankhyablocks/p-60967cf0.js +0 -1
  182. package/dist/sankhyablocks/p-6ce33b60.entry.js +0 -57
  183. package/dist/sankhyablocks/p-70ad6c16.entry.js +0 -1
  184. package/dist/sankhyablocks/p-710bfffe.entry.js +0 -1
  185. package/dist/sankhyablocks/p-735440c1.entry.js +0 -1
  186. package/dist/sankhyablocks/p-811b4b9d.js +0 -1
  187. package/dist/sankhyablocks/p-813fe4f7.js +0 -1
  188. package/dist/sankhyablocks/p-85a9446b.js +0 -2
  189. package/dist/sankhyablocks/p-89a1100f.entry.js +0 -1
  190. package/dist/sankhyablocks/p-8b543003.entry.js +0 -1
  191. package/dist/sankhyablocks/p-9750632b.entry.js +0 -1
  192. package/dist/sankhyablocks/p-a96272f7.entry.js +0 -1
  193. package/dist/sankhyablocks/p-ac8842e5.entry.js +0 -1
  194. package/dist/sankhyablocks/p-ba64cc41.entry.js +0 -1
  195. package/dist/sankhyablocks/p-c1ede043.entry.js +0 -1
  196. package/dist/sankhyablocks/p-d90ebb85.entry.js +0 -1
  197. package/dist/sankhyablocks/p-e17dfaae.entry.js +0 -1
  198. package/dist/sankhyablocks/p-e5355a29.entry.js +0 -1
  199. package/dist/sankhyablocks/p-ef04b633.entry.js +0 -1
  200. package/dist/sankhyablocks/p-f6db07fb.entry.js +0 -1
  201. package/dist/sankhyablocks/p-fcd9bd92.entry.js +0 -1
  202. package/dist/sankhyablocks/sankhyablocks.esm.js +0 -1
  203. package/dist/types/components/snk-application/snk-application.d.ts +0 -44
  204. package/dist/types/components.d.ts +0 -66
  205. package/dist/types/index.d.ts +0 -1
  206. package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +0 -15
  207. package/dist/types/lib/http/data-fetcher/fetchers/application-config-fetcher.d.ts +0 -6
  208. package/dist/types/lib/http/data-fetcher/fetchers/dataunit-fetcher.d.ts +0 -12
  209. package/dist/types/lib/http/data-fetcher/fetchers/form-config-fetcher.d.ts +0 -5
  210. package/dist/types/lib/http/data-fetcher/fetchers/grid-config-fetcher.d.ts +0 -2
  211. package/dist/types/lib/http/data-fetcher/fetchers/parameters-fecher.d.ts +0 -13
  212. package/dist/types/lib/http/data-fetcher/fetchers/resource-fetcher.d.ts +0 -6
  213. package/dist/types/lib/http/data-fetcher/state/LoadStateManager.d.ts +0 -23
  214. package/dist/types/lib/utils/pesquisa.d.ts +0 -2
  215. package/dist/types/lib/utils/urlutils.d.ts +0 -4
  216. package/dist/types/lib/workspace/workspace.d.ts +0 -4
  217. package/dist/types/stencil-public-runtime.d.ts +0 -1565
  218. package/loader/cdn.js +0 -3
  219. package/loader/index.cjs.js +0 -3
  220. package/loader/index.d.ts +0 -12
  221. package/loader/index.es2017.js +0 -3
  222. package/loader/index.js +0 -4
  223. package/loader/package.json +0 -10
  224. package/react/components.d.ts +0 -32
  225. package/react/components.js +0 -35
  226. package/react/components.js.map +0 -1
  227. package/react/react-component-lib/createComponent.d.ts +0 -10
  228. package/react/react-component-lib/createComponent.js +0 -75
  229. package/react/react-component-lib/createComponent.js.map +0 -1
  230. package/react/react-component-lib/createOverlayComponent.d.ts +0 -21
  231. package/react/react-component-lib/createOverlayComponent.js +0 -109
  232. package/react/react-component-lib/createOverlayComponent.js.map +0 -1
  233. package/react/react-component-lib/index.d.ts +0 -2
  234. package/react/react-component-lib/index.js +0 -3
  235. package/react/react-component-lib/index.js.map +0 -1
  236. package/react/react-component-lib/interfaces.d.ts +0 -29
  237. package/react/react-component-lib/interfaces.js +0 -1
  238. package/react/react-component-lib/interfaces.js.map +0 -1
  239. package/react/react-component-lib/utils/attachProps.d.ts +0 -12
  240. package/react/react-component-lib/utils/attachProps.js +0 -98
  241. package/react/react-component-lib/utils/attachProps.js.map +0 -1
  242. package/react/react-component-lib/utils/case.d.ts +0 -2
  243. package/react/react-component-lib/utils/case.js +0 -7
  244. package/react/react-component-lib/utils/case.js.map +0 -1
  245. package/react/react-component-lib/utils/dev.d.ts +0 -2
  246. package/react/react-component-lib/utils/dev.js +0 -13
  247. package/react/react-component-lib/utils/dev.js.map +0 -1
  248. package/react/react-component-lib/utils/index.d.ts +0 -10
  249. package/react/react-component-lib/utils/index.js +0 -34
  250. package/react/react-component-lib/utils/index.js.map +0 -1
@@ -1,76 +0,0 @@
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;
@@ -1,47 +0,0 @@
1
- {
2
- "entries": [
3
- "./components/snk-application/snk-application.js"
4
- ],
5
- "compiler": {
6
- "name": "@stencil/core",
7
- "version": "2.16.1",
8
- "typescriptVersion": "4.5.4"
9
- },
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
- ],
46
- "bundles": []
47
- }
@@ -1,5 +0,0 @@
1
- :host {
2
- display: flex;
3
- flex-direction: column;
4
- height: 100%;
5
- }
@@ -1,495 +0,0 @@
1
- import { Component, h, Method, Event } from "@stencil/core";
2
- import DataUnitFetcher from "../../lib/http/data-fetcher/fetchers/dataunit-fetcher";
3
- import UrlUtils from "../../lib/utils/urlutils";
4
- import Workspace from "../../lib/workspace/workspace";
5
- import ParametersFetcher from "../../lib/http/data-fetcher/fetchers/parameters-fecher";
6
- //FIXME: temporariamente estamos compiando essa classe do ezui pois não conseguimos
7
- //incluída no pacote. Isso deve ser resolvido nas proximas entregas e então ajustado aqui
8
- //import ApplicationUtils from "../../temp/ApplicationUtils";
9
- import { ApplicationUtils } from "@sankhyalabs/ezui/dist/collection/utils";
10
- import { FormConfigFetcher } from "../../lib/http/data-fetcher/fetchers/form-config-fetcher";
11
- import { ApplicationContext } from "@sankhyalabs/core";
12
- import { pesquisaLoadOptions } from "../../lib/utils/pesquisa";
13
- export class SnkApplication {
14
- get parameters() {
15
- if (!this._parameters) {
16
- this._parameters = new ParametersFetcher();
17
- }
18
- return this._parameters;
19
- }
20
- get resourceID() {
21
- if (!this._resourceID) {
22
- this._resourceID = this.urlParams.get("workspaceResourceID") ||
23
- this.urlParams.get("resourceID") ||
24
- Workspace.resourceID ||
25
- "unknown.resource.id";
26
- }
27
- return this._resourceID;
28
- }
29
- async getStringParam(name) {
30
- return this.parameters.asString(name, this.resourceID);
31
- }
32
- async getIntParam(name) {
33
- return this.parameters.asInteger(name, this.resourceID);
34
- }
35
- async getFloatParam(name) {
36
- return this.parameters.asFloat(name, this.resourceID);
37
- }
38
- async getBooleanParam(name) {
39
- return this.parameters.asBoolean(name, this.resourceID);
40
- }
41
- async getDateParam(name) {
42
- return this.parameters.asDate(name, this.resourceID);
43
- }
44
- async temOpcional(opcional) {
45
- const opts = opcional.split(",");
46
- return new Promise((resolve, reject) => {
47
- this.getAttributeFromHTMLWrapper("opc0009")
48
- .then(value => {
49
- if (value === "1") {
50
- resolve(true);
51
- }
52
- else {
53
- Promise.all(opts.map(opt => this.getAttributeFromHTMLWrapper("opc" + opt)))
54
- .then(result => {
55
- resolve(result.includes("1"));
56
- })
57
- .catch(error => {
58
- reject(error);
59
- });
60
- }
61
- })
62
- .catch(error => {
63
- reject(error);
64
- });
65
- });
66
- }
67
- async getAttributeFromHTMLWrapper(attribName) {
68
- return Promise.resolve(window[attribName]);
69
- }
70
- async openApp(resourceId, pkObject) {
71
- Workspace.openAppActivity(resourceId, pkObject);
72
- }
73
- async createDataunit(entityName) {
74
- return new Promise(resolve => {
75
- const dataUnit = this.dataUnitFetcher.getDataUnit(entityName, this.resourceID);
76
- dataUnit.loadMetadata();
77
- resolve(dataUnit);
78
- });
79
- }
80
- async getResourceID() {
81
- return Promise.resolve(this.resourceID);
82
- }
83
- async alert(title, message, icon) {
84
- return ApplicationUtils.alert(title, message, icon);
85
- }
86
- async error(title, message, icon) {
87
- return ApplicationUtils.error(title, message, icon);
88
- }
89
- async confirm(title, message, icon, critical) {
90
- return ApplicationUtils.confirm(title, message, icon, critical);
91
- }
92
- async info(message, options = undefined) {
93
- return ApplicationUtils.info(message, options);
94
- }
95
- async loadFormConfig(name) {
96
- return this.formConfigFetcher.loadFormConfig(name, this.resourceID);
97
- }
98
- get urlParams() {
99
- if (!this._urlParams) {
100
- this._urlParams = UrlUtils.getQueryParams(location.search);
101
- }
102
- return this._urlParams;
103
- }
104
- get dataUnitFetcher() {
105
- if (!this._dataUnitFetcher) {
106
- this._dataUnitFetcher = new DataUnitFetcher();
107
- }
108
- return this._dataUnitFetcher;
109
- }
110
- get formConfigFetcher() {
111
- if (!this._formConfigFetcher) {
112
- this._formConfigFetcher = new FormConfigFetcher();
113
- }
114
- return this._formConfigFetcher;
115
- }
116
- componentWillLoad() {
117
- ApplicationContext.setContextValue("__EZUI__SEARCH__OPTION__LOADER__", pesquisaLoadOptions);
118
- }
119
- componentDidLoad() {
120
- this.applicationLoading.emit(true);
121
- window.requestAnimationFrame(() => {
122
- this.applicationLoaded.emit(true);
123
- });
124
- }
125
- render() {
126
- return (h("div", null));
127
- }
128
- static get is() { return "snk-application"; }
129
- static get encapsulation() { return "scoped"; }
130
- static get originalStyleUrls() { return {
131
- "$": ["snk-application.css"]
132
- }; }
133
- static get styleUrls() { return {
134
- "$": ["snk-application.css"]
135
- }; }
136
- static get events() { return [{
137
- "method": "applicationLoaded",
138
- "name": "applicationLoaded",
139
- "bubbles": true,
140
- "cancelable": true,
141
- "composed": true,
142
- "docs": {
143
- "tags": [],
144
- "text": "Evento disparado quando a aplica\u00E7\u00E3o for carregada."
145
- },
146
- "complexType": {
147
- "original": "boolean",
148
- "resolved": "boolean",
149
- "references": {}
150
- }
151
- }, {
152
- "method": "applicationLoading",
153
- "name": "applicationLoading",
154
- "bubbles": true,
155
- "cancelable": true,
156
- "composed": true,
157
- "docs": {
158
- "tags": [],
159
- "text": "Evento"
160
- },
161
- "complexType": {
162
- "original": "boolean",
163
- "resolved": "boolean",
164
- "references": {}
165
- }
166
- }]; }
167
- static get methods() { return {
168
- "getStringParam": {
169
- "complexType": {
170
- "signature": "(name: string) => Promise<string>",
171
- "parameters": [{
172
- "tags": [],
173
- "text": ""
174
- }],
175
- "references": {
176
- "Promise": {
177
- "location": "global"
178
- }
179
- },
180
- "return": "Promise<string>"
181
- },
182
- "docs": {
183
- "text": "",
184
- "tags": []
185
- }
186
- },
187
- "getIntParam": {
188
- "complexType": {
189
- "signature": "(name: string) => Promise<number>",
190
- "parameters": [{
191
- "tags": [],
192
- "text": ""
193
- }],
194
- "references": {
195
- "Promise": {
196
- "location": "global"
197
- }
198
- },
199
- "return": "Promise<number>"
200
- },
201
- "docs": {
202
- "text": "",
203
- "tags": []
204
- }
205
- },
206
- "getFloatParam": {
207
- "complexType": {
208
- "signature": "(name: string) => Promise<number>",
209
- "parameters": [{
210
- "tags": [],
211
- "text": ""
212
- }],
213
- "references": {
214
- "Promise": {
215
- "location": "global"
216
- }
217
- },
218
- "return": "Promise<number>"
219
- },
220
- "docs": {
221
- "text": "",
222
- "tags": []
223
- }
224
- },
225
- "getBooleanParam": {
226
- "complexType": {
227
- "signature": "(name: string) => Promise<boolean>",
228
- "parameters": [{
229
- "tags": [],
230
- "text": ""
231
- }],
232
- "references": {
233
- "Promise": {
234
- "location": "global"
235
- }
236
- },
237
- "return": "Promise<boolean>"
238
- },
239
- "docs": {
240
- "text": "",
241
- "tags": []
242
- }
243
- },
244
- "getDateParam": {
245
- "complexType": {
246
- "signature": "(name: string) => Promise<Date>",
247
- "parameters": [{
248
- "tags": [],
249
- "text": ""
250
- }],
251
- "references": {
252
- "Promise": {
253
- "location": "global"
254
- },
255
- "Date": {
256
- "location": "global"
257
- }
258
- },
259
- "return": "Promise<Date>"
260
- },
261
- "docs": {
262
- "text": "",
263
- "tags": []
264
- }
265
- },
266
- "temOpcional": {
267
- "complexType": {
268
- "signature": "(opcional: string) => Promise<boolean>",
269
- "parameters": [{
270
- "tags": [],
271
- "text": ""
272
- }],
273
- "references": {
274
- "Promise": {
275
- "location": "global"
276
- }
277
- },
278
- "return": "Promise<boolean>"
279
- },
280
- "docs": {
281
- "text": "",
282
- "tags": []
283
- }
284
- },
285
- "getAttributeFromHTMLWrapper": {
286
- "complexType": {
287
- "signature": "(attribName: string) => Promise<string>",
288
- "parameters": [{
289
- "tags": [],
290
- "text": ""
291
- }],
292
- "references": {
293
- "Promise": {
294
- "location": "global"
295
- }
296
- },
297
- "return": "Promise<string>"
298
- },
299
- "docs": {
300
- "text": "",
301
- "tags": []
302
- }
303
- },
304
- "openApp": {
305
- "complexType": {
306
- "signature": "(resourceId: string, pkObject: Object) => Promise<void>",
307
- "parameters": [{
308
- "tags": [],
309
- "text": ""
310
- }, {
311
- "tags": [],
312
- "text": ""
313
- }],
314
- "references": {
315
- "Promise": {
316
- "location": "global"
317
- },
318
- "Object": {
319
- "location": "global"
320
- }
321
- },
322
- "return": "Promise<void>"
323
- },
324
- "docs": {
325
- "text": "",
326
- "tags": []
327
- }
328
- },
329
- "createDataunit": {
330
- "complexType": {
331
- "signature": "(entityName: string) => Promise<DataUnit>",
332
- "parameters": [{
333
- "tags": [],
334
- "text": ""
335
- }],
336
- "references": {
337
- "Promise": {
338
- "location": "global"
339
- },
340
- "DataUnit": {
341
- "location": "import",
342
- "path": "@sankhyalabs/core"
343
- }
344
- },
345
- "return": "Promise<DataUnit>"
346
- },
347
- "docs": {
348
- "text": "",
349
- "tags": []
350
- }
351
- },
352
- "getResourceID": {
353
- "complexType": {
354
- "signature": "() => Promise<string>",
355
- "parameters": [],
356
- "references": {
357
- "Promise": {
358
- "location": "global"
359
- }
360
- },
361
- "return": "Promise<string>"
362
- },
363
- "docs": {
364
- "text": "",
365
- "tags": []
366
- }
367
- },
368
- "alert": {
369
- "complexType": {
370
- "signature": "(title: string, message: string, icon?: string) => Promise<boolean>",
371
- "parameters": [{
372
- "tags": [],
373
- "text": ""
374
- }, {
375
- "tags": [],
376
- "text": ""
377
- }, {
378
- "tags": [],
379
- "text": ""
380
- }],
381
- "references": {
382
- "Promise": {
383
- "location": "global"
384
- }
385
- },
386
- "return": "Promise<boolean>"
387
- },
388
- "docs": {
389
- "text": "",
390
- "tags": []
391
- }
392
- },
393
- "error": {
394
- "complexType": {
395
- "signature": "(title: string, message: string, icon?: string) => Promise<boolean>",
396
- "parameters": [{
397
- "tags": [],
398
- "text": ""
399
- }, {
400
- "tags": [],
401
- "text": ""
402
- }, {
403
- "tags": [],
404
- "text": ""
405
- }],
406
- "references": {
407
- "Promise": {
408
- "location": "global"
409
- }
410
- },
411
- "return": "Promise<boolean>"
412
- },
413
- "docs": {
414
- "text": "",
415
- "tags": []
416
- }
417
- },
418
- "confirm": {
419
- "complexType": {
420
- "signature": "(title: string, message: string, icon?: string, critical?: boolean) => Promise<boolean>",
421
- "parameters": [{
422
- "tags": [],
423
- "text": ""
424
- }, {
425
- "tags": [],
426
- "text": ""
427
- }, {
428
- "tags": [],
429
- "text": ""
430
- }, {
431
- "tags": [],
432
- "text": ""
433
- }],
434
- "references": {
435
- "Promise": {
436
- "location": "global"
437
- }
438
- },
439
- "return": "Promise<boolean>"
440
- },
441
- "docs": {
442
- "text": "",
443
- "tags": []
444
- }
445
- },
446
- "info": {
447
- "complexType": {
448
- "signature": "(message: string, options?: any) => Promise<void>",
449
- "parameters": [{
450
- "tags": [],
451
- "text": ""
452
- }, {
453
- "tags": [],
454
- "text": ""
455
- }],
456
- "references": {
457
- "Promise": {
458
- "location": "global"
459
- }
460
- },
461
- "return": "Promise<void>"
462
- },
463
- "docs": {
464
- "text": "",
465
- "tags": []
466
- }
467
- },
468
- "loadFormConfig": {
469
- "complexType": {
470
- "signature": "(name: string) => Promise<Array<FieldConfig>>",
471
- "parameters": [{
472
- "tags": [],
473
- "text": ""
474
- }],
475
- "references": {
476
- "Promise": {
477
- "location": "global"
478
- },
479
- "FieldConfig": {
480
- "location": "import",
481
- "path": "@sankhyalabs/ezui/dist/types/components/ez-form/ez-form"
482
- },
483
- "Array": {
484
- "location": "global"
485
- }
486
- },
487
- "return": "Promise<FieldConfig[]>"
488
- },
489
- "docs": {
490
- "text": "",
491
- "tags": []
492
- }
493
- }
494
- }; }
495
- }
@@ -1 +0,0 @@
1
- export {};