@sankhyalabs/sankhyablocks 8.15.1 → 8.16.0-dev.2
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.
- package/dist/cjs/{SnkMultiSelectionListDataSource-303e85d1.js → IExporterProvider-9479f618.js} +94 -4
- package/dist/cjs/RecordIDUtils-3735135c.js +43 -0
- package/dist/cjs/{SnkFormConfigManager-f9dc0d28.js → SnkFormConfigManager-1b13bacd.js} +6 -3
- package/dist/cjs/{SnkMessageBuilder-66aa2557.js → SnkMessageBuilder-722b104e.js} +8 -12
- package/dist/cjs/{pesquisa-fetcher-213797ec.js → dataunit-fetcher-0c7106a0.js} +88 -180
- package/dist/cjs/{index-0922807b.js → index-1dfc7a6e.js} +5 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/pesquisa-fetcher-680e198f.js +166 -0
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-actions-button_4.cjs.entry.js +4 -2
- package/dist/cjs/snk-application.cjs.entry.js +34 -11
- package/dist/cjs/snk-attach.cjs.entry.js +71 -46
- package/dist/cjs/snk-crud.cjs.entry.js +96 -10
- package/dist/cjs/snk-data-exporter.cjs.entry.js +315 -85
- package/dist/cjs/snk-data-unit-16791a2f.js +679 -0
- package/dist/cjs/snk-data-unit.cjs.entry.js +12 -2
- package/dist/cjs/snk-detail-view.cjs.entry.js +48 -7
- package/dist/cjs/snk-filter-bar.cjs.entry.js +5 -1
- package/dist/cjs/snk-form-view.cjs.entry.js +67 -0
- package/dist/cjs/snk-form.cjs.entry.js +51 -6
- package/dist/cjs/snk-grid.cjs.entry.js +164 -107
- package/dist/cjs/{snk-guides-viewer-4b6ecda8.js → snk-guides-viewer-d82746e8.js} +36 -8
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +8 -6
- package/dist/cjs/snk-simple-crud.cjs.entry.js +264 -37
- package/dist/cjs/snk-taskbar.cjs.entry.js +4 -3
- package/dist/cjs/{taskbar-elements-3ecd1278.js → taskbar-elements-9ad1f9c0.js} +3 -3
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/snk-application/snk-application.js +35 -11
- package/dist/collection/components/snk-attach/snk-attach.js +67 -44
- package/dist/collection/components/snk-crud/interfaces/PropsCustomEditor.js +1 -0
- package/dist/collection/components/snk-crud/interfaces/PropsCustomRender.js +1 -0
- package/dist/collection/components/snk-crud/snk-crud.js +249 -7
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +135 -0
- package/dist/collection/components/snk-crud/subcomponents/snk-form-view.js +161 -0
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +112 -5
- package/dist/collection/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.js +97 -0
- package/dist/collection/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.js +74 -0
- package/dist/collection/components/snk-data-exporter/interfaces/IExporterProvider.js +54 -1
- package/dist/collection/components/snk-data-exporter/interfaces/IExporterStrategy.js +1 -0
- package/dist/collection/components/snk-data-exporter/providers/ClientSideExporterProvider.js +58 -0
- package/dist/collection/components/snk-data-exporter/providers/ServerSideExporterProvider.js +55 -0
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +59 -52
- package/dist/collection/components/snk-data-exporter/structure/ItemBuilder.js +62 -0
- package/dist/collection/components/snk-data-exporter/test/resources/ClientSideExporterStrategyResources.js +88 -0
- package/dist/collection/components/snk-data-exporter/utils/ParserExport.js +20 -0
- package/dist/collection/components/snk-data-exporter/utils/RecordIDUtils.js +38 -0
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +507 -214
- package/dist/collection/components/snk-data-unit/test/resources/metadataMock.js +24 -0
- package/dist/collection/components/snk-data-unit/test/resources/parentMetadataMock.js +18 -0
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +22 -1
- package/dist/collection/components/snk-form/snk-form.js +102 -5
- package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +6 -3
- package/dist/collection/components/snk-grid/snk-grid.js +240 -101
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +386 -18
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +2 -2
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +2 -1
- package/dist/collection/lib/@types/index.js +5 -0
- package/dist/collection/lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter.js +35 -0
- package/dist/collection/lib/dataUnit/InMemoryLoader.js +8 -3
- package/dist/collection/lib/dataUnit/ValueFormatter.js +4 -0
- package/dist/collection/lib/dataUnit/interfaces/InMemoryLoaderConfig.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.js +3 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/ArrayRepository.js +4 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.js +11 -13
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/IBuildRequestBodyLoadRowMetadata.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/IRowMetadata.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +53 -4
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/test/resources/metadataMock.js +22 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +4 -4
- package/dist/collection/lib/message/SnkMessageBuilder.js +5 -12
- package/dist/collection/lib/message/resources/snk-data-exporter.msg.js +2 -0
- package/dist/collection/lib/message/resources/snk-data-unit.msg.js +1 -0
- package/dist/components/{field-search.js → IExporterProvider.js} +93 -6
- package/dist/components/ISave.js +47 -0
- package/dist/components/SnkFormConfigManager.js +6 -3
- package/dist/components/SnkMessageBuilder.js +8 -12
- package/dist/components/dataunit-fetcher.js +85 -182
- package/dist/components/index2.js +198 -33
- package/dist/components/pesquisa-fetcher.js +164 -0
- package/dist/components/snk-actions-button2.js +4 -11
- package/dist/components/snk-application2.js +31 -9
- package/dist/components/snk-attach2.js +65 -41
- package/dist/components/snk-crud.js +103 -11
- package/dist/components/snk-data-exporter2.js +309 -85
- package/dist/components/snk-data-unit2.js +470 -212
- package/dist/components/snk-detail-view2.js +87 -10
- package/dist/components/snk-expression-item2.js +1 -1
- package/dist/components/snk-filter-bar2.js +6 -1
- package/dist/components/snk-form-view2.js +72 -1
- package/dist/components/snk-form.js +53 -6
- package/dist/components/snk-grid2.js +168 -106
- package/dist/components/snk-personalized-filter2.js +1 -1
- package/dist/components/snk-simple-crud2.js +259 -23
- package/dist/components/snk-taskbar2.js +6 -5
- package/dist/esm/{SnkMultiSelectionListDataSource-36918dbf.js → IExporterProvider-5a858363.js} +93 -5
- package/dist/esm/RecordIDUtils-87d02110.js +41 -0
- package/dist/esm/{SnkFormConfigManager-f53f9f87.js → SnkFormConfigManager-d4554df9.js} +6 -3
- package/dist/esm/{SnkMessageBuilder-0a4becdd.js → SnkMessageBuilder-89925609.js} +8 -12
- package/dist/esm/{pesquisa-fetcher-fe6f3826.js → dataunit-fetcher-f7e0ffc0.js} +84 -181
- package/dist/esm/{index-0ece87a6.js → index-3aa4977a.js} +6 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/pesquisa-fetcher-03c8f919.js +164 -0
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-actions-button_4.entry.js +4 -2
- package/dist/esm/snk-application.entry.js +33 -10
- package/dist/esm/snk-attach.entry.js +66 -41
- package/dist/esm/snk-crud.entry.js +96 -10
- package/dist/esm/snk-data-exporter.entry.js +316 -86
- package/dist/esm/snk-data-unit-a327d22c.js +677 -0
- package/dist/esm/snk-data-unit.entry.js +12 -2
- package/dist/esm/snk-detail-view.entry.js +48 -7
- package/dist/esm/snk-filter-bar.entry.js +5 -1
- package/dist/esm/snk-form-view.entry.js +67 -0
- package/dist/esm/snk-form.entry.js +51 -6
- package/dist/esm/snk-grid.entry.js +162 -105
- package/dist/esm/{snk-guides-viewer-113be3fd.js → snk-guides-viewer-874da66f.js} +36 -8
- package/dist/esm/snk-guides-viewer.entry.js +8 -6
- package/dist/esm/snk-simple-crud.entry.js +252 -25
- package/dist/esm/snk-taskbar.entry.js +4 -3
- package/dist/esm/{taskbar-elements-2473c8ac.js → taskbar-elements-d59867f1.js} +3 -3
- package/dist/sankhyablocks/p-0046959e.entry.js +1 -0
- package/dist/sankhyablocks/p-0e11ee18.entry.js +1 -0
- package/dist/sankhyablocks/p-1db45d26.entry.js +1 -0
- package/dist/sankhyablocks/p-30cf616e.js +1 -0
- package/dist/sankhyablocks/p-47b60deb.entry.js +1 -0
- package/dist/sankhyablocks/p-60e46675.entry.js +11 -0
- package/dist/sankhyablocks/p-6d4f4614.js +60 -0
- package/dist/sankhyablocks/p-6ded2076.entry.js +1 -0
- package/dist/sankhyablocks/p-7a337364.js +1 -0
- package/dist/sankhyablocks/p-7d9baaf4.entry.js +1 -0
- package/dist/sankhyablocks/{p-ae4fc9a9.js → p-7e7a7473.js} +1 -1
- package/dist/sankhyablocks/p-829d4045.js +1 -0
- package/dist/sankhyablocks/p-8c6b44ea.entry.js +1 -0
- package/dist/sankhyablocks/p-8fc470e5.entry.js +1 -0
- package/dist/sankhyablocks/p-9863d682.js +1 -0
- package/dist/sankhyablocks/p-a4b1f1eb.js +1 -0
- package/dist/sankhyablocks/p-af8efd95.js +6 -0
- package/dist/sankhyablocks/p-b7c4feeb.entry.js +1 -0
- package/dist/sankhyablocks/p-b8cde0d8.entry.js +1 -0
- package/dist/sankhyablocks/p-c7cbad38.js +1 -0
- package/dist/sankhyablocks/p-e0b9f59a.entry.js +1 -0
- package/dist/sankhyablocks/p-e6210aec.js +1 -0
- package/dist/sankhyablocks/p-e9bbc3d5.entry.js +1 -0
- package/dist/sankhyablocks/p-f2809746.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-application/snk-application.d.ts +7 -3
- package/dist/types/components/snk-attach/snk-attach.d.ts +11 -9
- package/dist/types/components/snk-crud/interfaces/PropsCustomEditor.d.ts +4 -0
- package/dist/types/components/snk-crud/interfaces/PropsCustomRender.d.ts +4 -0
- package/dist/types/components/snk-crud/snk-crud.d.ts +36 -1
- package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +23 -0
- package/dist/types/components/snk-crud/subcomponents/snk-form-view.d.ts +28 -3
- package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +19 -0
- package/dist/types/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.d.ts +14 -0
- package/dist/types/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.d.ts +12 -0
- package/dist/types/components/snk-data-exporter/interfaces/IExporterProvider.d.ts +24 -4
- package/dist/types/components/snk-data-exporter/interfaces/IExporterStrategy.d.ts +5 -0
- package/dist/types/components/snk-data-exporter/providers/ClientSideExporterProvider.d.ts +17 -0
- package/dist/types/components/snk-data-exporter/providers/ServerSideExporterProvider.d.ts +17 -0
- package/dist/types/components/snk-data-exporter/snk-data-exporter.d.ts +4 -1
- package/dist/types/components/snk-data-exporter/structure/ItemBuilder.d.ts +21 -0
- package/dist/types/components/snk-data-exporter/test/resources/ClientSideExporterStrategyResources.d.ts +77 -0
- package/dist/types/components/snk-data-exporter/utils/ParserExport.d.ts +4 -0
- package/dist/types/components/snk-data-exporter/utils/RecordIDUtils.d.ts +3 -0
- package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +61 -2
- package/dist/types/components/snk-data-unit/test/resources/metadataMock.d.ts +3 -0
- package/dist/types/components/snk-data-unit/test/resources/parentMetadataMock.d.ts +3 -0
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +4 -0
- package/dist/types/components/snk-form/snk-form.d.ts +14 -0
- package/dist/types/components/snk-grid/snk-grid.d.ts +46 -6
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +58 -4
- package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +1 -1
- package/dist/types/components.d.ts +220 -4
- package/dist/types/lib/@types/index.d.ts +5 -0
- package/dist/types/lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter.d.ts +11 -0
- package/dist/types/lib/dataUnit/InMemoryLoader.d.ts +2 -1
- package/dist/types/lib/dataUnit/ValueFormatter.d.ts +2 -0
- package/dist/types/lib/dataUnit/interfaces/InMemoryLoaderConfig.d.ts +3 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.d.ts +2 -1
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/cache/ArrayRepository.d.ts +1 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.d.ts +1 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/interfaces/IBuildRequestBodyLoadRowMetadata.d.ts +10 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/interfaces/IRowMetadata.d.ts +7 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.d.ts +6 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/test/resources/metadataMock.d.ts +20 -0
- package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IExporterColumnMetadata.d.ts +3 -0
- package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IFetchDataExporterParams.d.ts +2 -1
- package/dist/types/lib/http/data-fetcher/fetchers/pesquisa-fetcher.d.ts +1 -0
- package/package.json +1 -1
- package/dist/cjs/snk-data-unit-41c29713.js +0 -462
- package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/index.js +0 -34
- package/dist/components/index3.js +0 -199
- package/dist/esm/snk-data-unit-de1d140d.js +0 -460
- package/dist/sankhyablocks/p-032fe52e.js +0 -1
- package/dist/sankhyablocks/p-03dcc5ff.entry.js +0 -1
- package/dist/sankhyablocks/p-07a61550.entry.js +0 -1
- package/dist/sankhyablocks/p-0899e0b5.entry.js +0 -1
- package/dist/sankhyablocks/p-154a7f33.entry.js +0 -1
- package/dist/sankhyablocks/p-15802c59.entry.js +0 -1
- package/dist/sankhyablocks/p-164666b1.js +0 -65
- package/dist/sankhyablocks/p-32556aa6.js +0 -1
- package/dist/sankhyablocks/p-328585d0.entry.js +0 -1
- package/dist/sankhyablocks/p-38289a55.js +0 -1
- package/dist/sankhyablocks/p-52c8e589.js +0 -1
- package/dist/sankhyablocks/p-5cb07080.js +0 -1
- package/dist/sankhyablocks/p-74d349c3.entry.js +0 -1
- package/dist/sankhyablocks/p-7fe120b8.entry.js +0 -11
- package/dist/sankhyablocks/p-add17f6a.entry.js +0 -1
- package/dist/sankhyablocks/p-af1ac81f.entry.js +0 -1
- package/dist/sankhyablocks/p-b4525fc0.entry.js +0 -1
- package/dist/sankhyablocks/p-cce0865d.js +0 -1
- package/dist/sankhyablocks/p-dec65f6c.entry.js +0 -1
- package/dist/sankhyablocks/p-ee9536bc.entry.js +0 -1
- package/dist/sankhyablocks/p-f13f7616.entry.js +0 -1
- package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/index.d.ts +0 -3
@@ -1,9 +1,9 @@
|
|
1
|
-
import { h } from
|
2
|
-
import {
|
3
|
-
import { AnexoSistemaFetcher, AttachFetcher, DataUnitFetcher } from
|
4
|
-
import { VIEW_MODE } from
|
5
|
-
import { AnexoSistemaDataUnitFactory, AttachFetcherDataUnitFactory, buildTaskBarManager,
|
6
|
-
import InMemoryLoader from
|
1
|
+
import { h } from '@stencil/core';
|
2
|
+
import { Action, ApplicationContext, DataUnit } from '@sankhyalabs/core';
|
3
|
+
import { AnexoSistemaFetcher, AttachFetcher, DataUnitFetcher } from '../../lib';
|
4
|
+
import { VIEW_MODE } from '../../lib/utils/constants';
|
5
|
+
import { anexoSistemaCrudConfig, AnexoSistemaDataUnitFactory, attachCrudConfig, AttachFetcherDataUnitFactory, buildTaskBarManager, } from './structure';
|
6
|
+
import InMemoryLoader from '../../lib/dataUnit/InMemoryLoader';
|
7
7
|
const RESOURCE_ID = 'AnexoSistema';
|
8
8
|
const DATA_UNIT_NAME = 'br.com.sankhya.core.v3.anexoSistema';
|
9
9
|
export class SnkAttach {
|
@@ -40,26 +40,37 @@ export class SnkAttach {
|
|
40
40
|
this._currentDataUnit = undefined;
|
41
41
|
this.crudConfig = undefined;
|
42
42
|
}
|
43
|
-
registerKeyWatcher(newRegisterKey, oldRegisterKey) {
|
44
|
-
var _a
|
45
|
-
if (
|
43
|
+
async registerKeyWatcher(newRegisterKey, oldRegisterKey) {
|
44
|
+
var _a;
|
45
|
+
if (this._currentDataUnit == null) {
|
46
46
|
this.loadAttachmentDataUnit();
|
47
47
|
}
|
48
48
|
if (oldRegisterKey !== newRegisterKey) {
|
49
|
-
this.
|
50
|
-
if (this.fetcherType === "AnexoSistema") {
|
51
|
-
this._currentFetcher = new AnexoSistemaFetcher(this.entityName, this.registerKey, (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.name);
|
52
|
-
(_b = this._currentDataUnitBuilder) === null || _b === void 0 ? void 0 : _b.initLoaders(this._currentDataUnit, this._currentFetcher, this.returnToGridMode.bind(this));
|
53
|
-
return (_c = this._currentDataUnit) === null || _c === void 0 ? void 0 : _c.loadData();
|
54
|
-
}
|
55
|
-
if (this.fetcherType === "Attach") {
|
56
|
-
const hasMoreOneItem = ((_d = this.registerKey) === null || _d === void 0 ? void 0 : _d.split("_").length) > 1;
|
57
|
-
if (hasMoreOneItem)
|
58
|
-
return;
|
59
|
-
}
|
60
|
-
return (_f = (_e = this._currentDataUnit) === null || _e === void 0 ? void 0 : _e.loadMetadata()) === null || _f === void 0 ? void 0 : _f.then(this._currentDataUnit.loadData.bind(undefined, undefined, true, this.registerKey));
|
49
|
+
await ((_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.loadData());
|
61
50
|
}
|
62
51
|
}
|
52
|
+
async initAttach() {
|
53
|
+
var _a, _b, _c, _d, _e, _f;
|
54
|
+
if (!this.fetcherType && !this.registerKey)
|
55
|
+
return;
|
56
|
+
if (!this.fetcherType) {
|
57
|
+
this.fetcherType = "AnexoSistema";
|
58
|
+
}
|
59
|
+
this.returnToGridMode();
|
60
|
+
if (this.fetcherType === "AnexoSistema") {
|
61
|
+
this._currentFetcher = new AnexoSistemaFetcher(this.entityName, this.registerKey, (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.name);
|
62
|
+
(_b = this._currentDataUnitBuilder) === null || _b === void 0 ? void 0 : _b.initLoaders(this._currentDataUnit, this._currentFetcher, this.returnToGridMode.bind(this));
|
63
|
+
await ((_c = this._currentDataUnit) === null || _c === void 0 ? void 0 : _c.loadData());
|
64
|
+
return;
|
65
|
+
}
|
66
|
+
if (this.fetcherType === "Attach") {
|
67
|
+
const hasMoreOneItem = ((_d = this.registerKey) === null || _d === void 0 ? void 0 : _d.split("_").length) > 1;
|
68
|
+
if (hasMoreOneItem)
|
69
|
+
return;
|
70
|
+
}
|
71
|
+
await ((_e = this._currentDataUnit) === null || _e === void 0 ? void 0 : _e.loadMetadata());
|
72
|
+
await ((_f = this._currentDataUnit) === null || _f === void 0 ? void 0 : _f.loadData(undefined, undefined, true, this.registerKey));
|
73
|
+
}
|
63
74
|
/**
|
64
75
|
* Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
|
65
76
|
* através de um pequeno modulo na estrutura da aplicação:
|
@@ -97,14 +108,14 @@ export class SnkAttach {
|
|
97
108
|
if (this._crudElement)
|
98
109
|
this._crudElement.goToView(VIEW_MODE.GRID);
|
99
110
|
}
|
100
|
-
loadAttachmentDataUnit() {
|
111
|
+
async loadAttachmentDataUnit() {
|
101
112
|
try {
|
102
113
|
switch (this.fetcherType) {
|
103
114
|
case "AnexoSistema":
|
104
|
-
this.loadAnexoSistema();
|
115
|
+
await this.loadAnexoSistema();
|
105
116
|
break;
|
106
117
|
case "Attach":
|
107
|
-
this.loadAttach();
|
118
|
+
await this.loadAttach();
|
108
119
|
break;
|
109
120
|
default:
|
110
121
|
this._currentFetcher = this.fetcher;
|
@@ -116,28 +127,29 @@ export class SnkAttach {
|
|
116
127
|
throw new Error('There was an error while creating the data unit');
|
117
128
|
}
|
118
129
|
}
|
119
|
-
loadAnexoSistema() {
|
120
|
-
var _a;
|
121
|
-
this._currentDataUnit =
|
130
|
+
async loadAnexoSistema() {
|
131
|
+
var _a, _b, _c;
|
132
|
+
this._currentDataUnit = new DataUnitFetcher().getDataUnit(RESOURCE_ID, DATA_UNIT_NAME);
|
122
133
|
this._currentFetcher = new AnexoSistemaFetcher(this.entityName, this.registerKey, (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.name);
|
123
134
|
if (!this._currentDataUnit.metadata) {
|
124
|
-
this._currentDataUnit
|
125
|
-
|
126
|
-
.then(() => this.crudConfig = Object.assign({}, anexoSistemaCrudConfig));
|
135
|
+
await ((_b = this._currentDataUnit) === null || _b === void 0 ? void 0 : _b.loadMetadata());
|
136
|
+
this.crudConfig = Object.assign({}, anexoSistemaCrudConfig);
|
127
137
|
}
|
128
|
-
this.
|
138
|
+
this.initDataUnitLoaders();
|
129
139
|
this._currentDataUnit.addFilterProvider({
|
130
140
|
getFilter: () => this._currentDataUnitBuilder.getFilters(this.registerKey)
|
131
141
|
});
|
132
142
|
this._currentDataUnit.addInterceptor({
|
133
143
|
interceptAction: (action) => this._currentDataUnitBuilder.getInterceptions(this._currentDataUnit, action, this._crudElement)
|
134
144
|
});
|
135
|
-
this._currentDataUnit.loadData()
|
145
|
+
await ((_c = this._currentDataUnit) === null || _c === void 0 ? void 0 : _c.loadData());
|
146
|
+
this.disableEditFieldsNotInForm();
|
136
147
|
}
|
137
|
-
loadAttach() {
|
138
|
-
var _a, _b
|
148
|
+
async loadAttach() {
|
149
|
+
var _a, _b;
|
139
150
|
this._currentFetcher = new AttachFetcher();
|
140
151
|
this._currentDataUnit = new DataUnit(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME);
|
152
|
+
this.initDataUnitLoaders();
|
141
153
|
this._currentDataUnit.addInterceptor({
|
142
154
|
interceptAction: (action) => {
|
143
155
|
var _a;
|
@@ -148,16 +160,26 @@ export class SnkAttach {
|
|
148
160
|
return this._currentDataUnitBuilder.getInterceptions(this._currentDataUnit, action, this._crudElement);
|
149
161
|
}
|
150
162
|
});
|
151
|
-
this._currentDataUnitBuilder = new AttachFetcherDataUnitFactory(this.getMessage.bind(this));
|
152
|
-
(_a = this._currentDataUnitBuilder) === null || _a === void 0 ? void 0 : _a.initLoaders(this._currentDataUnit, this._currentFetcher, async () => {
|
153
|
-
this.returnToGridMode();
|
154
|
-
await this._currentDataUnit.loadData(undefined, undefined, true, this.registerKey);
|
155
|
-
});
|
156
163
|
if (!this._currentDataUnit.metadata) {
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
164
|
+
await ((_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.loadMetadata());
|
165
|
+
this.crudConfig = Object.assign({}, attachCrudConfig);
|
166
|
+
await ((_b = this._currentDataUnit) === null || _b === void 0 ? void 0 : _b.loadData(undefined, undefined, true, this.registerKey));
|
167
|
+
this.disableEditFieldsNotInForm();
|
168
|
+
}
|
169
|
+
}
|
170
|
+
initDataUnitLoaders() {
|
171
|
+
var _a, _b, _c;
|
172
|
+
if (this.fetcherType === "AnexoSistema") {
|
173
|
+
this._currentFetcher = new AnexoSistemaFetcher(this.entityName, this.registerKey, (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.name);
|
174
|
+
this._currentDataUnitBuilder = new AnexoSistemaDataUnitFactory(this.entityName, this.getMessage.bind(this));
|
175
|
+
(_b = this._currentDataUnitBuilder) === null || _b === void 0 ? void 0 : _b.initLoaders(this._currentDataUnit, this._currentFetcher, this.returnToGridMode.bind(this));
|
176
|
+
}
|
177
|
+
if (this.fetcherType === "Attach") {
|
178
|
+
this._currentFetcher = new AttachFetcher();
|
179
|
+
this._currentDataUnitBuilder = new AttachFetcherDataUnitFactory(this.getMessage.bind(this));
|
180
|
+
(_c = this._currentDataUnitBuilder) === null || _c === void 0 ? void 0 : _c.initLoaders(this._currentDataUnit, this._currentFetcher, async () => {
|
181
|
+
this.returnToGridMode();
|
182
|
+
await this._currentDataUnit.loadData(undefined, undefined, true, this.registerKey);
|
161
183
|
});
|
162
184
|
}
|
163
185
|
}
|
@@ -171,8 +193,9 @@ export class SnkAttach {
|
|
171
193
|
}
|
172
194
|
});
|
173
195
|
}
|
174
|
-
componentWillLoad() {
|
196
|
+
async componentWillLoad() {
|
175
197
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
198
|
+
await this.initAttach();
|
176
199
|
}
|
177
200
|
componentWillRender() {
|
178
201
|
if (!this.fetcherType) {
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -13,6 +13,8 @@ export class SnkCrud {
|
|
13
13
|
constructor() {
|
14
14
|
this._keyDownHandler = async (event) => this.keyDownListener(event);
|
15
15
|
this._viewHistory = [];
|
16
|
+
this._customEditors = new Map();
|
17
|
+
this._customRenders = new Map();
|
16
18
|
this._dataUnit = undefined;
|
17
19
|
this._dataState = undefined;
|
18
20
|
this.attachmentRegisterKey = undefined;
|
@@ -35,6 +37,8 @@ export class SnkCrud {
|
|
35
37
|
this.filterBarLegacyConfigName = undefined;
|
36
38
|
this.formLegacyConfigName = undefined;
|
37
39
|
this.disablePersonalizedFilter = undefined;
|
40
|
+
this.autoLoad = undefined;
|
41
|
+
this.autoFocus = true;
|
38
42
|
this.customContainerId = `SNK-CRUD-CUSTOM-CONTAINER-${StringUtils.generateUUID()}`;
|
39
43
|
}
|
40
44
|
/**
|
@@ -70,6 +74,49 @@ export class SnkCrud {
|
|
70
74
|
async getFilterBar() {
|
71
75
|
return await this._snkGrid.getFilterBar();
|
72
76
|
}
|
77
|
+
/**
|
78
|
+
* Registra um editor customizado para campos da grade e formulário.
|
79
|
+
*/
|
80
|
+
async addCustomEditor(fieldName, customEditor) {
|
81
|
+
if (this._guidesViewer && this._snkGrid) {
|
82
|
+
this._guidesViewer.addCustomEditor(fieldName, customEditor);
|
83
|
+
this._snkGrid.addCustomEditor(fieldName, customEditor);
|
84
|
+
return;
|
85
|
+
}
|
86
|
+
const newCustomEditors = new Map(this._customEditors);
|
87
|
+
newCustomEditors.set(fieldName, customEditor);
|
88
|
+
this._customEditors = newCustomEditors;
|
89
|
+
}
|
90
|
+
/**
|
91
|
+
* Registra um render customizado para colunas da grid.
|
92
|
+
*/
|
93
|
+
async addGridCustomRender(fieldName, customRender) {
|
94
|
+
if (this._snkGrid) {
|
95
|
+
this._snkGrid.addGridCustomRender(fieldName, customRender);
|
96
|
+
return;
|
97
|
+
}
|
98
|
+
const newCustomRenders = new Map(this._customRenders);
|
99
|
+
newCustomRenders.set(fieldName, customRender);
|
100
|
+
this._customRenders = newCustomRenders;
|
101
|
+
}
|
102
|
+
/**
|
103
|
+
* Registra um formatador de valores para uma coluna da grid.
|
104
|
+
*/
|
105
|
+
async addCustomValueFormatter(columnName, customFormatter) {
|
106
|
+
this._snkGrid.addCustomValueFormatter(columnName, customFormatter);
|
107
|
+
}
|
108
|
+
/**
|
109
|
+
* Remove o formatador de valores de uma coluna da grid.
|
110
|
+
*/
|
111
|
+
async removeCustomValueFormatter(columnName) {
|
112
|
+
this._snkGrid.removeCustomValueFormatter(columnName);
|
113
|
+
}
|
114
|
+
/**
|
115
|
+
* Altera/adiciona uma propriedade nos metadados do campo.
|
116
|
+
*/
|
117
|
+
async setFieldProp(fieldName, propName, value) {
|
118
|
+
await this._guidesViewer.setFieldProp(fieldName, propName, value);
|
119
|
+
}
|
73
120
|
currentViewModeWatcher(currentView) {
|
74
121
|
this._viewHistory = [...this._viewHistory.slice(-1), currentView];
|
75
122
|
}
|
@@ -129,6 +176,29 @@ export class SnkCrud {
|
|
129
176
|
const joinedPrimaryKeys = recordCriteria.map(({ value }) => value).join('_');
|
130
177
|
return joinedPrimaryKeys;
|
131
178
|
}
|
179
|
+
setCustomRenders() {
|
180
|
+
if (!this._snkGrid) {
|
181
|
+
return;
|
182
|
+
}
|
183
|
+
for (const [fieldName, customRender] of this._customRenders) {
|
184
|
+
this._snkGrid.addGridCustomRender(fieldName, customRender);
|
185
|
+
this._customRenders.delete(fieldName);
|
186
|
+
}
|
187
|
+
}
|
188
|
+
setCustomEditors() {
|
189
|
+
if (!this._snkGrid || !this._guidesViewer) {
|
190
|
+
return;
|
191
|
+
}
|
192
|
+
for (const [fieldName, customEditor] of this._customEditors) {
|
193
|
+
this._guidesViewer.addCustomEditor(fieldName, customEditor);
|
194
|
+
this._snkGrid.addCustomEditor(fieldName, customEditor);
|
195
|
+
this._customEditors.delete(fieldName);
|
196
|
+
}
|
197
|
+
}
|
198
|
+
componentDidRender() {
|
199
|
+
this.setCustomRenders();
|
200
|
+
this.setCustomEditors();
|
201
|
+
}
|
132
202
|
componentWillLoad() {
|
133
203
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
134
204
|
let parent = this._element.parentElement;
|
@@ -151,12 +221,7 @@ export class SnkCrud {
|
|
151
221
|
else {
|
152
222
|
this.initDataUnit();
|
153
223
|
}
|
154
|
-
this._snkDataUnit.addEventListener("dataStateChange",
|
155
|
-
this._dataState = dataState;
|
156
|
-
if (dataState.selectedRecord !== undefined) {
|
157
|
-
this.attachmentRegisterKey = await this.getAttachmentRegisterKey();
|
158
|
-
}
|
159
|
-
});
|
224
|
+
this._snkDataUnit.addEventListener("dataStateChange", this.handleDataStateChange.bind(this));
|
160
225
|
break;
|
161
226
|
}
|
162
227
|
parent = parent.parentElement;
|
@@ -172,6 +237,26 @@ export class SnkCrud {
|
|
172
237
|
this.removeShortcuts();
|
173
238
|
window.removeEventListener("keydown", this._keyDownHandler);
|
174
239
|
}
|
240
|
+
async handleDataStateChange(evt) {
|
241
|
+
var _a;
|
242
|
+
this._dataState = evt.detail;
|
243
|
+
if (this._dataState.selectedRecord !== undefined) {
|
244
|
+
this.attachmentRegisterKey = await this.getAttachmentRegisterKey();
|
245
|
+
}
|
246
|
+
const fieldsWithRmPrecision = await this._snkDataUnit.getFieldsWithRmPrecision();
|
247
|
+
for (const field of fieldsWithRmPrecision || []) {
|
248
|
+
if (!field) {
|
249
|
+
continue;
|
250
|
+
}
|
251
|
+
const rmPrecision = (_a = this._dataState.rowMetadata) === null || _a === void 0 ? void 0 : _a.getProp('rm_precision', field);
|
252
|
+
if (!rmPrecision && rmPrecision !== 0) {
|
253
|
+
continue;
|
254
|
+
}
|
255
|
+
await this.setFieldProp(field, 'precision', rmPrecision);
|
256
|
+
await this.setFieldProp(field, 'prettyPrecision', rmPrecision);
|
257
|
+
}
|
258
|
+
;
|
259
|
+
}
|
175
260
|
async initKeyboardManager() {
|
176
261
|
var _a;
|
177
262
|
const keyboardManager = await ((_a = this._application) === null || _a === void 0 ? void 0 : _a.getKeyboardManager());
|
@@ -291,7 +376,7 @@ export class SnkCrud {
|
|
291
376
|
return;
|
292
377
|
}
|
293
378
|
this._snkDataUnit.ignoreSaveMessage = this._currentViewMode === VIEW_MODE.GRID;
|
294
|
-
return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", null, h("snk-grid", { ref: (ref) => this._snkGrid = ref, filterBarTitle: this.filterBarTitle, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, recordsValidator: this.recordsValidator, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID, disablePersonalizedFilter: this.disablePersonalizedFilter, gridLegacyConfigName: this.gridLegacyConfigName, filterBarLegacyConfigName: this.filterBarLegacyConfigName }, h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, recordsValidator: this.recordsValidator, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId, formLegacyConfigName: this.formLegacyConfigName }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkFormTaskBar" }))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this.customContainerId })), h("div", { id: `${this.customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }), h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
|
379
|
+
return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", null, h("snk-grid", { ref: (ref) => this._snkGrid = ref, filterBarTitle: this.filterBarTitle, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, recordsValidator: this.recordsValidator, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID, disablePersonalizedFilter: this.disablePersonalizedFilter, gridLegacyConfigName: this.gridLegacyConfigName, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, autoFocus: this.autoFocus }, h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, recordsValidator: this.recordsValidator, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId, formLegacyConfigName: this.formLegacyConfigName }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkFormTaskBar" }))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this.customContainerId })), h("div", { id: `${this.customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }), h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
|
295
380
|
}
|
296
381
|
static get is() { return "snk-crud"; }
|
297
382
|
static get encapsulation() { return "scoped"; }
|
@@ -612,6 +697,41 @@ export class SnkCrud {
|
|
612
697
|
},
|
613
698
|
"attribute": "disable-personalized-filter",
|
614
699
|
"reflect": false
|
700
|
+
},
|
701
|
+
"autoLoad": {
|
702
|
+
"type": "boolean",
|
703
|
+
"mutable": false,
|
704
|
+
"complexType": {
|
705
|
+
"original": "boolean",
|
706
|
+
"resolved": "boolean",
|
707
|
+
"references": {}
|
708
|
+
},
|
709
|
+
"required": false,
|
710
|
+
"optional": true,
|
711
|
+
"docs": {
|
712
|
+
"tags": [],
|
713
|
+
"text": "Define se a carga dos dados ser\u00E1 feita assim que o componente for carregado."
|
714
|
+
},
|
715
|
+
"attribute": "auto-load",
|
716
|
+
"reflect": false
|
717
|
+
},
|
718
|
+
"autoFocus": {
|
719
|
+
"type": "boolean",
|
720
|
+
"mutable": false,
|
721
|
+
"complexType": {
|
722
|
+
"original": "boolean",
|
723
|
+
"resolved": "boolean",
|
724
|
+
"references": {}
|
725
|
+
},
|
726
|
+
"required": false,
|
727
|
+
"optional": true,
|
728
|
+
"docs": {
|
729
|
+
"tags": [],
|
730
|
+
"text": "Define se a grid ser\u00E1 focada ao ser carregada."
|
731
|
+
},
|
732
|
+
"attribute": "auto-focus",
|
733
|
+
"reflect": false,
|
734
|
+
"defaultValue": "true"
|
615
735
|
}
|
616
736
|
};
|
617
737
|
}
|
@@ -783,6 +903,128 @@ export class SnkCrud {
|
|
783
903
|
"text": "Retorna o elemento da filter-bar da grade.",
|
784
904
|
"tags": []
|
785
905
|
}
|
906
|
+
},
|
907
|
+
"addCustomEditor": {
|
908
|
+
"complexType": {
|
909
|
+
"signature": "(fieldName: string, customEditor: ICustomEditor) => Promise<void>",
|
910
|
+
"parameters": [{
|
911
|
+
"tags": [],
|
912
|
+
"text": ""
|
913
|
+
}, {
|
914
|
+
"tags": [],
|
915
|
+
"text": ""
|
916
|
+
}],
|
917
|
+
"references": {
|
918
|
+
"Promise": {
|
919
|
+
"location": "global"
|
920
|
+
},
|
921
|
+
"ICustomEditor": {
|
922
|
+
"location": "import",
|
923
|
+
"path": "@sankhyalabs/ezui/dist/types/utils"
|
924
|
+
}
|
925
|
+
},
|
926
|
+
"return": "Promise<void>"
|
927
|
+
},
|
928
|
+
"docs": {
|
929
|
+
"text": "Registra um editor customizado para campos da grade e formul\u00E1rio.",
|
930
|
+
"tags": []
|
931
|
+
}
|
932
|
+
},
|
933
|
+
"addGridCustomRender": {
|
934
|
+
"complexType": {
|
935
|
+
"signature": "(fieldName: string, customRender: ICustomRender) => Promise<void>",
|
936
|
+
"parameters": [{
|
937
|
+
"tags": [],
|
938
|
+
"text": ""
|
939
|
+
}, {
|
940
|
+
"tags": [],
|
941
|
+
"text": ""
|
942
|
+
}],
|
943
|
+
"references": {
|
944
|
+
"Promise": {
|
945
|
+
"location": "global"
|
946
|
+
},
|
947
|
+
"ICustomRender": {
|
948
|
+
"location": "import",
|
949
|
+
"path": "@sankhyalabs/ezui/dist/types/utils"
|
950
|
+
}
|
951
|
+
},
|
952
|
+
"return": "Promise<void>"
|
953
|
+
},
|
954
|
+
"docs": {
|
955
|
+
"text": "Registra um render customizado para colunas da grid.",
|
956
|
+
"tags": []
|
957
|
+
}
|
958
|
+
},
|
959
|
+
"addCustomValueFormatter": {
|
960
|
+
"complexType": {
|
961
|
+
"signature": "(columnName: string, customFormatter: ICustomFormatter) => Promise<void>",
|
962
|
+
"parameters": [{
|
963
|
+
"tags": [],
|
964
|
+
"text": ""
|
965
|
+
}, {
|
966
|
+
"tags": [],
|
967
|
+
"text": ""
|
968
|
+
}],
|
969
|
+
"references": {
|
970
|
+
"Promise": {
|
971
|
+
"location": "global"
|
972
|
+
},
|
973
|
+
"ICustomFormatter": {
|
974
|
+
"location": "import",
|
975
|
+
"path": "@sankhyalabs/ezui/dist/types/components/ez-grid/interfaces"
|
976
|
+
}
|
977
|
+
},
|
978
|
+
"return": "Promise<void>"
|
979
|
+
},
|
980
|
+
"docs": {
|
981
|
+
"text": "Registra um formatador de valores para uma coluna da grid.",
|
982
|
+
"tags": []
|
983
|
+
}
|
984
|
+
},
|
985
|
+
"removeCustomValueFormatter": {
|
986
|
+
"complexType": {
|
987
|
+
"signature": "(columnName: string) => Promise<void>",
|
988
|
+
"parameters": [{
|
989
|
+
"tags": [],
|
990
|
+
"text": ""
|
991
|
+
}],
|
992
|
+
"references": {
|
993
|
+
"Promise": {
|
994
|
+
"location": "global"
|
995
|
+
}
|
996
|
+
},
|
997
|
+
"return": "Promise<void>"
|
998
|
+
},
|
999
|
+
"docs": {
|
1000
|
+
"text": "Remove o formatador de valores de uma coluna da grid.",
|
1001
|
+
"tags": []
|
1002
|
+
}
|
1003
|
+
},
|
1004
|
+
"setFieldProp": {
|
1005
|
+
"complexType": {
|
1006
|
+
"signature": "(fieldName: string, propName: string, value: any) => Promise<void>",
|
1007
|
+
"parameters": [{
|
1008
|
+
"tags": [],
|
1009
|
+
"text": ""
|
1010
|
+
}, {
|
1011
|
+
"tags": [],
|
1012
|
+
"text": ""
|
1013
|
+
}, {
|
1014
|
+
"tags": [],
|
1015
|
+
"text": ""
|
1016
|
+
}],
|
1017
|
+
"references": {
|
1018
|
+
"Promise": {
|
1019
|
+
"location": "global"
|
1020
|
+
}
|
1021
|
+
},
|
1022
|
+
"return": "Promise<void>"
|
1023
|
+
},
|
1024
|
+
"docs": {
|
1025
|
+
"text": "Altera/adiciona uma propriedade nos metadados do campo.",
|
1026
|
+
"tags": []
|
1027
|
+
}
|
786
1028
|
}
|
787
1029
|
};
|
788
1030
|
}
|