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