@sankhyalabs/sankhyablocks 8.15.0-dev.8 → 8.15.0-dev.80
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/{ConfigStorage-302bbbd4.js → ConfigStorage-942ce74b.js} +70 -7
- package/dist/cjs/{DataFetcher-ba94ed5b.js → DataFetcher-313debd8.js} +18 -8
- package/dist/cjs/IExporterProvider-0c814e9a.js +230 -0
- package/dist/cjs/{ISave-d68ce3cd.js → ISave-e91b70a7.js} +1 -0
- package/dist/cjs/RecordIDUtils-3735135c.js +43 -0
- package/dist/cjs/{SnkFormConfigManager-71c4768e.js → SnkFormConfigManager-52f99b4d.js} +23 -15
- package/dist/cjs/{SnkMessageBuilder-7293d0ad.js → SnkMessageBuilder-4a95fe86.js} +25 -13
- package/dist/cjs/{auth-fetcher-c8467c07.js → auth-fetcher-54f5ff9d.js} +1 -1
- package/dist/cjs/{dataunit-fetcher-14108bec.js → dataunit-fetcher-620b29a1.js} +409 -77
- package/dist/cjs/{form-config-fetcher-df043d3d.js → form-config-fetcher-2dd00e5b.js} +13 -1
- package/dist/cjs/index-f9e81701.js +2 -10
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{pesquisa-fetcher-ef050a47.js → pesquisa-fetcher-680e198f.js} +12 -13
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/{snk-actions-button_2.cjs.entry.js → snk-actions-button_4.cjs.entry.js} +526 -8
- package/dist/cjs/snk-application.cjs.entry.js +88 -26
- package/dist/cjs/snk-attach.cjs.entry.js +441 -65
- package/dist/cjs/snk-configurator.cjs.entry.js +1 -1
- package/dist/cjs/snk-crud.cjs.entry.js +125 -28
- package/dist/cjs/snk-custom-slot-elements.cjs.entry.js +6 -2
- package/dist/cjs/snk-data-exporter.cjs.entry.js +207 -83
- package/dist/cjs/snk-data-unit-eca53cfc.js +671 -0
- package/dist/cjs/snk-data-unit.cjs.entry.js +11 -2
- package/dist/cjs/snk-detail-view.cjs.entry.js +52 -13
- package/dist/cjs/snk-entity-list.cjs.entry.js +5 -3
- package/dist/cjs/snk-filter-bar.cjs.entry.js +65 -8
- package/dist/cjs/snk-filter-detail.cjs.entry.js +4 -1
- package/dist/cjs/snk-filter-item.cjs.entry.js +13 -6
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
- package/dist/cjs/snk-filter-modal.cjs.entry.js +2 -1
- package/dist/cjs/snk-filter-multi-select.cjs.entry.js +2 -1
- package/dist/cjs/snk-form-config.cjs.entry.js +47 -27
- package/dist/cjs/snk-form-view.cjs.entry.js +67 -0
- package/dist/cjs/snk-form.cjs.entry.js +60 -8
- package/dist/cjs/snk-grid.cjs.entry.js +200 -122
- package/dist/cjs/{snk-guides-viewer-c8b9374f.js → snk-guides-viewer-5d5f0f25.js} +56 -20
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +10 -10
- package/dist/cjs/snk-personalized-filter-editor.cjs.entry.js +3 -1
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
- package/dist/cjs/snk-pesquisa.cjs.entry.js +1 -1
- package/dist/cjs/snk-simple-crud.cjs.entry.js +512 -40
- package/dist/cjs/snk-taskbar.cjs.entry.js +143 -20
- package/dist/cjs/{taskbar-elements-01b85b99.js → taskbar-elements-d9392685.js} +11 -11
- package/dist/collection/collection-manifest.json +8 -8
- package/dist/collection/components/snk-application/__mocks__/snk-application.js +7 -0
- package/dist/collection/components/snk-application/snk-application.js +148 -24
- package/dist/collection/components/snk-attach/snk-attach.js +231 -44
- package/dist/collection/components/snk-attach/structure/{crud-config-builder.js → builder/anexo-sistema-crud-config.builder.js} +1 -1
- package/dist/collection/components/snk-attach/structure/builder/attach-crud-config.builder.js +62 -0
- package/dist/collection/components/snk-attach/structure/{taskbar-builder.js → builder/taskbar-builder.js} +1 -1
- package/dist/collection/components/snk-attach/structure/fetcher/facade/fetcher.facade.js +1 -0
- package/dist/collection/components/snk-attach/structure/{data-unit-builder.js → fetcher/factory/anexo-sistema-data-unit.factory.js} +14 -11
- package/dist/collection/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.js +118 -0
- package/dist/collection/components/snk-attach/structure/index.js +6 -3
- package/dist/collection/components/snk-configurator/snk-configurator.js +1 -1
- 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 +359 -19
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +137 -2
- package/dist/collection/components/snk-crud/subcomponents/snk-form-view.js +161 -0
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.css +11 -2
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +163 -13
- package/dist/collection/components/snk-custom-slot-elements/snk-custom-slot-elements.css +1 -1
- package/dist/collection/components/snk-custom-slot-elements/snk-custom-slot-elements.js +22 -1
- package/dist/collection/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.js +90 -0
- package/dist/collection/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.js +68 -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 +44 -50
- package/dist/collection/components/snk-data-exporter/test/resources/ClientSideExporterStrategyResources.js +88 -0
- package/dist/collection/components/snk-data-exporter/utils/RecordIDUtils.js +38 -0
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +501 -216
- package/dist/collection/components/snk-data-unit/test/resources/metadataMock.js +24 -0
- package/dist/collection/components/snk-entity-list/snk-entity-list.js +5 -3
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.js +2 -1
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-personalized-filter-editor/snk-personalized-filter-editor.js +3 -1
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +22 -1
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +31 -6
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +19 -1
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +24 -1
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +175 -3
- package/dist/collection/components/snk-filter-bar/utils/SnkFilterModalFactory.js +3 -1
- package/dist/collection/components/snk-form/snk-form.js +126 -5
- package/dist/collection/components/{snk-form → snk-form-config}/SnkFormConfigManager.js +22 -14
- package/dist/collection/components/{snk-form/subcomponents/snk-form-config → snk-form-config}/snk-form-config.js +50 -30
- package/dist/collection/components/snk-grid/snk-grid.js +360 -115
- package/dist/collection/components/{snk-grid/subcomponents/snk-grid-config → snk-grid-config}/snk-grid-config.js +130 -123
- package/dist/collection/components/{snk-grid/subcomponents → snk-grid-config}/snk-select-box/snk-select-box.js +1 -1
- package/dist/collection/components/snk-pesquisa/snk-pesquisa.css +2 -4
- package/dist/collection/components/snk-simple-crud/regular-buttons.js +3 -0
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.css +10 -2
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +847 -23
- package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.js +4 -2
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +11 -11
- package/dist/collection/components/snk-taskbar/snk-taskbar.css +17 -0
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +195 -19
- package/dist/collection/lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter.js +35 -0
- package/dist/collection/lib/configs/ConfigStorage.js +63 -3
- package/dist/collection/lib/dataUnit/InMemoryLoader.js +15 -42
- package/dist/collection/lib/dataUnit/ValueFormatter.js +4 -0
- package/dist/collection/lib/dataUnit/dataUnitInMemoryUtils.js +33 -0
- package/dist/collection/lib/dataUnit/interfaces/InMemoryLoaderConfig.js +1 -0
- package/dist/collection/lib/http/data-fetcher/DataFetcher.js +18 -8
- package/dist/collection/lib/http/data-fetcher/fetchers/{attach-fetcher.js → AttachFetcher/anexo-sistema-fetcher.js} +16 -15
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/attach-fetcher.js +90 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/facade/attach-fetcher.facade.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/index.js +2 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/interfaces/IDelete.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/interfaces/IDownloadKey.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/ISave.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 +30 -2
- 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 +87 -24
- 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/form-config-fetcher.js +12 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/parameters-fecher.js +21 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.js +6 -3
- package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +12 -13
- package/dist/collection/lib/index.js +1 -1
- package/dist/collection/lib/message/SnkMessageBuilder.js +25 -32
- package/dist/collection/lib/message/resources/snk-attach.msg.js +13 -0
- package/dist/collection/lib/message/resources/snk-data-exporter.msg.js +2 -1
- package/dist/collection/lib/message/resources/snk-data-unit.msg.js +1 -0
- package/dist/collection/lib/message/resources/snk-simple-crud.msg.js +4 -0
- package/dist/collection/lib/utils/CrudUtils.js +13 -1
- package/dist/components/ConfigStorage.js +68 -5
- package/dist/components/DataFetcher.js +18 -8
- package/dist/components/IExporterProvider.js +298 -0
- package/dist/components/ISave.js +42 -0
- package/dist/components/SnkFormConfigManager.js +21 -13
- package/dist/components/SnkMessageBuilder.js +25 -13
- package/dist/components/dataunit-fetcher.js +185 -241
- package/dist/components/form-config-fetcher.js +12 -0
- package/dist/components/index.d.ts +6 -6
- package/dist/components/index2.js +198 -33
- package/dist/{esm/pesquisa-fetcher-dd3ca0a5.js → components/pesquisa-fetcher.js} +13 -14
- package/dist/components/snk-actions-button2.js +4 -10
- package/dist/components/snk-application2.js +86 -20
- package/dist/components/snk-attach2.js +496 -72
- package/dist/components/snk-configurator2.js +1 -1
- package/dist/components/snk-crud.js +133 -23
- package/dist/components/snk-custom-slot-elements.js +7 -3
- package/dist/components/snk-data-exporter2.js +202 -83
- package/dist/components/snk-data-unit2.js +464 -214
- package/dist/components/snk-detail-view2.js +137 -23
- package/dist/components/snk-entity-list.js +5 -3
- package/dist/components/snk-expression-item2.js +1 -1
- package/dist/components/snk-filter-bar2.js +69 -6
- package/dist/components/snk-filter-detail2.js +5 -1
- package/dist/components/snk-filter-item2.js +14 -6
- package/dist/components/snk-filter-modal.js +4 -2
- package/dist/components/snk-filter-multi-select.js +2 -1
- package/dist/components/snk-form-config2.js +46 -26
- package/dist/components/snk-form-view2.js +72 -1
- package/dist/components/snk-form.js +60 -5
- package/dist/components/snk-grid-config2.js +128 -102
- package/dist/components/snk-grid2.js +209 -119
- package/dist/components/snk-personalized-filter-editor.js +3 -1
- package/dist/components/snk-personalized-filter2.js +1 -1
- package/dist/components/snk-pesquisa2.js +1 -1
- package/dist/components/snk-simple-crud2.js +574 -36
- package/dist/components/snk-taskbar2.js +164 -35
- package/dist/components/taskbar-actions-button2.js +4 -2
- package/dist/esm/{ConfigStorage-4151acc8.js → ConfigStorage-86187da3.js} +70 -7
- package/dist/esm/{DataFetcher-aa159c5a.js → DataFetcher-c1baf61d.js} +18 -8
- package/dist/esm/IExporterProvider-c0194569.js +221 -0
- package/dist/esm/{ISave-4412b20c.js → ISave-d8c8bc59.js} +1 -0
- package/dist/esm/RecordIDUtils-87d02110.js +41 -0
- package/dist/esm/{SnkFormConfigManager-5c7d3771.js → SnkFormConfigManager-5b0d69cd.js} +23 -15
- package/dist/esm/{SnkMessageBuilder-ca843d1b.js → SnkMessageBuilder-3a767111.js} +25 -13
- package/dist/esm/{auth-fetcher-c05dc474.js → auth-fetcher-039abba3.js} +1 -1
- package/dist/esm/{dataunit-fetcher-cbec1594.js → dataunit-fetcher-3fbf9d12.js} +392 -70
- package/dist/esm/{form-config-fetcher-36219cd3.js → form-config-fetcher-30fb808f.js} +13 -1
- package/dist/esm/index-a7d3d3f1.js +2 -10
- 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_2.entry.js → snk-actions-button_4.entry.js} +525 -9
- package/dist/esm/snk-application.entry.js +88 -26
- package/dist/esm/snk-attach.entry.js +441 -65
- package/dist/esm/snk-configurator.entry.js +1 -1
- package/dist/esm/snk-crud.entry.js +125 -28
- package/dist/esm/snk-custom-slot-elements.entry.js +7 -3
- package/dist/esm/snk-data-exporter.entry.js +208 -84
- package/dist/esm/snk-data-unit-49b898f7.js +669 -0
- package/dist/esm/snk-data-unit.entry.js +11 -2
- package/dist/esm/snk-detail-view.entry.js +52 -13
- package/dist/esm/snk-entity-list.entry.js +5 -3
- package/dist/esm/snk-filter-bar.entry.js +65 -8
- package/dist/esm/snk-filter-detail.entry.js +4 -1
- package/dist/esm/snk-filter-item.entry.js +13 -6
- package/dist/esm/snk-filter-modal-item.entry.js +3 -3
- package/dist/esm/snk-filter-modal.entry.js +2 -1
- package/dist/esm/snk-filter-multi-select.entry.js +2 -1
- package/dist/esm/snk-form-config.entry.js +48 -28
- package/dist/esm/snk-form-view.entry.js +67 -0
- package/dist/esm/snk-form.entry.js +60 -8
- package/dist/esm/snk-grid.entry.js +200 -122
- package/dist/esm/{snk-guides-viewer-8da24475.js → snk-guides-viewer-ef8c4eec.js} +56 -20
- package/dist/esm/snk-guides-viewer.entry.js +10 -10
- package/dist/esm/snk-personalized-filter-editor.entry.js +3 -1
- package/dist/esm/snk-personalized-filter.entry.js +3 -3
- package/dist/esm/snk-pesquisa.entry.js +1 -1
- package/dist/esm/snk-simple-crud.entry.js +505 -33
- package/dist/esm/snk-taskbar.entry.js +144 -21
- package/dist/esm/{taskbar-elements-d4d0b424.js → taskbar-elements-ad766858.js} +11 -11
- package/dist/sankhyablocks/p-039c7148.entry.js +1 -0
- package/dist/sankhyablocks/p-04821c60.entry.js +1 -0
- package/dist/sankhyablocks/p-060fdb6c.js +1 -0
- package/dist/sankhyablocks/p-14a08904.entry.js +1 -0
- package/dist/sankhyablocks/p-1db45d26.entry.js +1 -0
- package/dist/sankhyablocks/{p-9e7d65a4.js → p-21749402.js} +1 -1
- package/dist/sankhyablocks/p-21a81901.entry.js +1 -0
- package/dist/sankhyablocks/p-294df368.entry.js +1 -0
- package/dist/sankhyablocks/p-2ac8bd11.entry.js +1 -0
- package/dist/sankhyablocks/p-32062be4.entry.js +1 -0
- package/dist/sankhyablocks/p-33718dfc.entry.js +1 -0
- package/dist/sankhyablocks/p-3d0cc5c0.entry.js +1 -0
- package/dist/sankhyablocks/p-3f1efb97.entry.js +1 -0
- package/dist/sankhyablocks/p-47b60deb.entry.js +1 -0
- package/dist/sankhyablocks/p-4ce73e88.js +1 -0
- package/dist/sankhyablocks/p-54a5d52a.entry.js +1 -0
- package/dist/sankhyablocks/p-5fa1576b.entry.js +11 -0
- package/dist/sankhyablocks/p-61dd89eb.js +1 -0
- package/dist/sankhyablocks/p-672302c3.js +60 -0
- package/dist/sankhyablocks/p-70a4af56.entry.js +1 -0
- package/dist/sankhyablocks/p-7663f597.entry.js +1 -0
- package/dist/sankhyablocks/p-8322ccdb.entry.js +1 -0
- package/dist/sankhyablocks/p-913a9979.js +1 -0
- package/dist/sankhyablocks/p-9863d682.js +1 -0
- package/dist/sankhyablocks/{p-e0fd9555.entry.js → p-a1d72395.entry.js} +1 -1
- package/dist/sankhyablocks/p-a64baa0f.entry.js +1 -0
- package/dist/sankhyablocks/p-af8efd95.js +6 -0
- package/dist/sankhyablocks/p-aff76a53.js +56 -0
- package/dist/sankhyablocks/p-b11aa1e0.entry.js +1 -0
- package/dist/sankhyablocks/p-ba05fdb8.entry.js +1 -0
- package/dist/sankhyablocks/p-babe7665.js +1 -0
- package/dist/sankhyablocks/p-bf2acf72.entry.js +1 -0
- package/dist/sankhyablocks/{p-247a8b36.entry.js → p-d1791da2.entry.js} +1 -1
- package/dist/sankhyablocks/p-d26365ad.js +1 -0
- package/dist/sankhyablocks/{p-9695f78b.js → p-dc7c9047.js} +1 -1
- package/dist/sankhyablocks/p-df5451c7.js +26 -0
- package/dist/sankhyablocks/p-e5c25e0b.entry.js +1 -0
- package/dist/sankhyablocks/p-e8763234.entry.js +1 -0
- package/dist/sankhyablocks/{p-7f3c7b09.entry.js → p-eae7a817.entry.js} +1 -1
- package/dist/sankhyablocks/p-f88cfc3c.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-application/__mocks__/snk-application.d.ts +3 -0
- package/dist/types/components/snk-application/snk-application.d.ts +27 -5
- package/dist/types/components/snk-attach/{structure/crud-config-builder.d.ts → interfaces/ICrudConfig.d.ts} +1 -2
- package/dist/types/components/snk-attach/interfaces/TFetcherType.d.ts +1 -0
- package/dist/types/components/snk-attach/snk-attach.d.ts +34 -10
- package/dist/types/components/snk-attach/structure/builder/anexo-sistema-crud-config.builder.d.ts +2 -0
- package/dist/types/components/snk-attach/structure/builder/attach-crud-config.builder.d.ts +40 -0
- package/dist/types/components/snk-attach/structure/{taskbar-builder.d.ts → builder/taskbar-builder.d.ts} +1 -1
- package/dist/types/components/snk-attach/structure/fetcher/facade/fetcher.facade.d.ts +11 -0
- package/dist/types/components/snk-attach/structure/fetcher/factory/anexo-sistema-data-unit.factory.d.ts +17 -0
- package/dist/types/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.d.ts +16 -0
- package/dist/types/components/snk-attach/structure/index.d.ts +6 -3
- 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 +57 -1
- package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +24 -1
- 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 +30 -1
- package/dist/types/components/snk-custom-slot-elements/snk-custom-slot-elements.d.ts +6 -0
- package/dist/types/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.d.ts +13 -0
- package/dist/types/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.d.ts +11 -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 +3 -1
- package/dist/types/components/snk-data-exporter/test/resources/ClientSideExporterStrategyResources.d.ts +77 -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-filter-bar/filter-item/snk-filter-detail.d.ts +4 -0
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +7 -3
- package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +5 -0
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +31 -1
- package/dist/types/components/snk-filter-bar/utils/SnkFilterModalFactory.d.ts +3 -1
- package/dist/types/components/snk-form/snk-form.d.ts +20 -1
- package/dist/types/components/{snk-form → snk-form-config}/SnkFormConfigManager.d.ts +2 -1
- package/dist/types/components/{snk-form/subcomponents/snk-form-config → snk-form-config}/snk-form-config.d.ts +5 -3
- package/dist/types/components/snk-grid/snk-grid.d.ts +69 -7
- package/dist/types/components/{snk-grid/subcomponents/snk-grid-config → snk-grid-config}/snk-grid-config.d.ts +11 -6
- package/dist/types/components/{snk-grid/subcomponents → snk-grid-config}/snk-select-box/snk-select-box.d.ts +1 -1
- package/dist/types/components/snk-simple-crud/regular-buttons.d.ts +3 -0
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +142 -6
- package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +1 -1
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +36 -1
- package/dist/types/components.d.ts +536 -18
- package/dist/types/lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter.d.ts +11 -0
- package/dist/types/lib/configs/ConfigStorage.d.ts +21 -1
- package/dist/types/lib/dataUnit/InMemoryLoader.d.ts +2 -3
- package/dist/types/lib/dataUnit/ValueFormatter.d.ts +2 -0
- package/dist/types/lib/dataUnit/dataUnitInMemoryUtils.d.ts +4 -0
- package/dist/types/lib/dataUnit/interfaces/InMemoryLoaderConfig.d.ts +3 -0
- package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +1 -1
- package/dist/types/lib/http/data-fetcher/fetchers/{attach-fetcher.d.ts → AttachFetcher/anexo-sistema-fetcher.d.ts} +3 -2
- package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/attach-fetcher.d.ts +11 -0
- package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/facade/attach-fetcher.facade.d.ts +8 -0
- package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/index.d.ts +3 -0
- package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/ISave.d.ts +2 -1
- 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/dataunit-fetcher.d.ts +2 -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 +7 -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/form-config-fetcher.d.ts +2 -0
- package/dist/types/lib/http/data-fetcher/fetchers/parameters-fecher.d.ts +1 -0
- package/dist/types/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.d.ts +2 -1
- package/dist/types/lib/http/data-fetcher/fetchers/pesquisa-fetcher.d.ts +1 -0
- package/dist/types/lib/index.d.ts +1 -1
- package/dist/types/lib/utils/CrudUtils.d.ts +3 -0
- package/package.json +15 -6
- package/dist/cjs/PreloadManager-84466da6.js +0 -224
- package/dist/cjs/SnkMultiSelectionListDataSource-ba5838c2.js +0 -49
- package/dist/cjs/snk-data-unit-1bc69073.js +0 -462
- package/dist/cjs/snk-grid-config.cjs.entry.js +0 -483
- package/dist/cjs/snk-select-box.cjs.entry.js +0 -25
- package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/index.js +0 -34
- package/dist/components/field-search.js +0 -121
- package/dist/components/index3.js +0 -199
- package/dist/esm/PreloadManager-c1c2f2b4.js +0 -222
- package/dist/esm/SnkMultiSelectionListDataSource-44494b0e.js +0 -43
- package/dist/esm/snk-data-unit-6208ebf0.js +0 -460
- package/dist/esm/snk-grid-config.entry.js +0 -479
- package/dist/esm/snk-select-box.entry.js +0 -21
- package/dist/sankhyablocks/p-03dcc5ff.entry.js +0 -1
- package/dist/sankhyablocks/p-0874adb5.entry.js +0 -1
- package/dist/sankhyablocks/p-094c30cb.js +0 -1
- package/dist/sankhyablocks/p-0d7863ed.js +0 -26
- package/dist/sankhyablocks/p-1d75d9f9.entry.js +0 -1
- package/dist/sankhyablocks/p-20726710.entry.js +0 -1
- package/dist/sankhyablocks/p-25927311.entry.js +0 -1
- package/dist/sankhyablocks/p-32f0935f.js +0 -1
- package/dist/sankhyablocks/p-374d03f6.js +0 -1
- package/dist/sankhyablocks/p-3891ae6f.js +0 -60
- package/dist/sankhyablocks/p-4775a293.entry.js +0 -1
- package/dist/sankhyablocks/p-573a07c5.js +0 -1
- package/dist/sankhyablocks/p-5f74c859.entry.js +0 -1
- package/dist/sankhyablocks/p-69754d94.entry.js +0 -1
- package/dist/sankhyablocks/p-6977a26c.entry.js +0 -1
- package/dist/sankhyablocks/p-69efa80d.entry.js +0 -1
- package/dist/sankhyablocks/p-761ed32f.entry.js +0 -1
- package/dist/sankhyablocks/p-7d8d7fe9.entry.js +0 -1
- package/dist/sankhyablocks/p-8d70b5d5.entry.js +0 -1
- package/dist/sankhyablocks/p-98674137.entry.js +0 -1
- package/dist/sankhyablocks/p-a9e4bb55.entry.js +0 -1
- package/dist/sankhyablocks/p-a9e5b094.entry.js +0 -1
- package/dist/sankhyablocks/p-aa0ae6bc.entry.js +0 -1
- package/dist/sankhyablocks/p-aa95fb2c.js +0 -56
- package/dist/sankhyablocks/p-b05ab13d.entry.js +0 -1
- package/dist/sankhyablocks/p-ba3d3fa9.entry.js +0 -11
- package/dist/sankhyablocks/p-c22c1d8e.js +0 -1
- package/dist/sankhyablocks/p-c4d19840.entry.js +0 -1
- package/dist/sankhyablocks/p-c6e477ff.js +0 -1
- package/dist/sankhyablocks/p-c758265f.entry.js +0 -1
- package/dist/sankhyablocks/p-cb7419e0.entry.js +0 -1
- package/dist/sankhyablocks/p-d4f9ee17.entry.js +0 -1
- package/dist/sankhyablocks/p-d6317851.entry.js +0 -1
- package/dist/sankhyablocks/p-d81f20c4.entry.js +0 -1
- package/dist/sankhyablocks/p-d9bb09b3.js +0 -6
- package/dist/sankhyablocks/p-e6380c60.js +0 -1
- package/dist/sankhyablocks/p-ff6064e7.js +0 -1
- package/dist/types/components/snk-attach/structure/data-unit-builder.d.ts +0 -15
- package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/index.d.ts +0 -3
- /package/dist/collection/{lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDelete.js → components/snk-attach/interfaces/ICrudConfig.js} +0 -0
- /package/dist/collection/{lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDownloadKey.js → components/snk-attach/interfaces/TFetcherType.js} +0 -0
- /package/dist/collection/components/{snk-form/subcomponents/snk-form-config → snk-form-config}/snk-form-config.css +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-config-options/snk-config-options.css +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-config-options/snk-config-options.js +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-field-config/snk-field-config.css +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-field-config/snk-field-config.js +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-tab-config/snk-tab-config.css +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-tab-config/snk-tab-config.js +0 -0
- /package/dist/collection/components/{snk-grid/subcomponents/snk-grid-config → snk-grid-config}/snk-grid-config.css +0 -0
- /package/dist/collection/components/{snk-grid/subcomponents → snk-grid-config}/snk-select-box/snk-select-box.css +0 -0
- /package/dist/collection/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/index.js +0 -0
- /package/dist/types/components/{snk-form → snk-form-config}/subcomponents/snk-config-options/snk-config-options.d.ts +0 -0
- /package/dist/types/components/{snk-form → snk-form-config}/subcomponents/snk-field-config/snk-field-config.d.ts +0 -0
- /package/dist/types/components/{snk-form → snk-form-config}/subcomponents/snk-tab-config/snk-tab-config.d.ts +0 -0
- /package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/IDelete.d.ts +0 -0
- /package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/IDownloadKey.d.ts +0 -0
- /package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/index.d.ts +0 -0
@@ -0,0 +1,11 @@
|
|
1
|
+
import { EzGridColumn } from "@sankhyalabs/ezui/dist/types/components/ez-grid/controller/EzGridController";
|
2
|
+
import { DataState } from "../../components/snk-data-unit/snk-data-unit";
|
3
|
+
import { ICustomFormatter } from "@sankhyalabs/ezui/dist/types/components/ez-grid/interfaces";
|
4
|
+
export default class RmPrecisionCustomValueFormatter implements ICustomFormatter {
|
5
|
+
private _dataState;
|
6
|
+
private _grid;
|
7
|
+
setGrid(grid: HTMLEzGridElement): void;
|
8
|
+
setDataState(dataState: DataState): void;
|
9
|
+
format(currentValue: string, column: EzGridColumn, recordId: string): string;
|
10
|
+
refreshSelectedRows(): void;
|
11
|
+
}
|
@@ -3,13 +3,30 @@ import { SnkFilterItemConfig } from "../../components/snk-filter-bar/filter-item
|
|
3
3
|
import { IFormCardConfig, IFormConfig } from "@sankhyalabs/ezui/dist/types/utils/form/interfaces";
|
4
4
|
import { ISaveResourceResponse } from "../http/data-fetcher/fetchers/resource-fetcher";
|
5
5
|
import { IPersonalizedFilter, IValidateFilter } from "../../components/snk-personalized-filter/interfaces/IPersonalizedFilter";
|
6
|
+
export declare enum CONFIG_SOURCE {
|
7
|
+
form = "form",
|
8
|
+
grid = "grid",
|
9
|
+
filterBar = "filterBar"
|
10
|
+
}
|
11
|
+
export interface ILegacyConfigNameParams {
|
12
|
+
gridLegacyConfig?: string;
|
13
|
+
formLegacyConfig?: string;
|
14
|
+
}
|
6
15
|
export declare class ConfigStorage {
|
16
|
+
private static readonly CONFIG_NAME_ERROR_MESSAGE;
|
17
|
+
private static readonly LEGACY_CONFIG_NAME_ERROR_MESSAGE;
|
18
|
+
private static filterBarLegacyConfig;
|
19
|
+
private static formLegacyConfig;
|
20
|
+
private static gridLegacyConfig;
|
7
21
|
private static configById;
|
8
22
|
private static filterBarConfigFetcher;
|
9
23
|
private static formConfigFetcher;
|
10
24
|
private static gridConfigFetcher;
|
11
25
|
private static personalizedFilterFetcher;
|
12
|
-
static
|
26
|
+
static addFilterBarLegacyConfig(configName: string, legacyConfigName: string): void;
|
27
|
+
static addFormLegacyConfig(configName: string, legacyConfigName: string): void;
|
28
|
+
static addGridLegacyConfig(configName: string, legacyConfigName: string): void;
|
29
|
+
static preload(resourceID: string, configName: string, legacyConfigs?: ILegacyConfigNameParams): void;
|
13
30
|
static loadFilterBarConfig(name: string, resourceID: string, urlParams?: object): Promise<Array<SnkFilterItemConfig>>;
|
14
31
|
static loadFormConfig(name: string, resourceID: string): Promise<IFormConfig>;
|
15
32
|
static loadGridConfig(name: string, resourceID: string): Promise<IGridConfig>;
|
@@ -24,6 +41,9 @@ export declare class ConfigStorage {
|
|
24
41
|
static deleteGridConfigCache(name: string, resourceID: string): Promise<void>;
|
25
42
|
static deleteFormConfigCache(name: string, resourceID: string): Promise<void>;
|
26
43
|
static deleteFilterBarConfigCache(name: string, resourceID: string): Promise<void>;
|
44
|
+
private static validateConfigName;
|
45
|
+
private static handleLegacyConfig;
|
46
|
+
private static handleLegacyConfigAsString;
|
27
47
|
private static deleteConfigCache;
|
28
48
|
private static buildCacheID;
|
29
49
|
}
|
@@ -1,10 +1,11 @@
|
|
1
1
|
import { DataUnit, FieldDescriptor, Record, UnitMetadata } from '@sankhyalabs/core';
|
2
|
+
import { InMemoryLoaderConfig } from './interfaces/InMemoryLoaderConfig';
|
2
3
|
export default class InMemoryLoader {
|
3
4
|
private _dataUnit;
|
4
5
|
private _metadata;
|
5
6
|
private _initialRecords;
|
6
7
|
static readonly IN_MEMORY_DATA_UNIT_NAME = "InMemoryDataUnit";
|
7
|
-
constructor(metadata?: UnitMetadata, records?: Array<Record
|
8
|
+
constructor(metadata?: UnitMetadata, records?: Array<Record>, config?: InMemoryLoaderConfig);
|
8
9
|
private getRecordsToLoad;
|
9
10
|
get dataUnit(): DataUnit;
|
10
11
|
get records(): Array<Record>;
|
@@ -14,8 +15,6 @@ export default class InMemoryLoader {
|
|
14
15
|
set metadata(metadata: UnitMetadata);
|
15
16
|
private generateUniqueId;
|
16
17
|
private inMemoryLoader;
|
17
|
-
private applyFilter;
|
18
|
-
private applySorting;
|
19
18
|
private metadaLoader;
|
20
19
|
private saveLoader;
|
21
20
|
removeLoader(_dataUnit: DataUnit, recordIds: Array<string>): Promise<Array<string>>;
|
@@ -0,0 +1,4 @@
|
|
1
|
+
import { DataUnit, Filter, PaginationInfo, Record, Sort } from '@sankhyalabs/core';
|
2
|
+
export declare function applyFilter(records: Array<Record>, dataUnit: DataUnit, filters: Array<Filter>): Array<Record>;
|
3
|
+
export declare function applySorting(records: Array<Record>, dataUnit: DataUnit, sorting: Array<Sort>): Array<Record>;
|
4
|
+
export declare function buildPaginationInfo(records: Array<Record>, offset?: number, limit?: number): PaginationInfo | undefined;
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import { IClientEventResponse } from './interfaces/IClientEventResponse';
|
2
2
|
import { IDataFetcherRecaller } from './recaller/IDataFetcherRecaller';
|
3
|
-
type ClientEventHandler = (clientEvent: IClientEventResponse, dataFetcherReacaller: IDataFetcherRecaller) => Promise<void>;
|
4
3
|
export declare class DataFetcher {
|
5
4
|
private static appTagName;
|
6
5
|
private static instance;
|
@@ -39,6 +38,7 @@ export declare class DataFetcher {
|
|
39
38
|
static hasClientEvent(eventID: String): boolean;
|
40
39
|
static removeClientEvent(eventID: String): boolean;
|
41
40
|
}
|
41
|
+
type ClientEventHandler = (clientEvent: IClientEventResponse, dataFetcherReacaller: IDataFetcherRecaller) => void | Promise<void>;
|
42
42
|
export interface RequestListener {
|
43
43
|
onRequestStart(param: RequestListenerParams): void;
|
44
44
|
onRequestEnd(param: RequestListenerParams): void;
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { Change, Record } from "@sankhyalabs/core";
|
2
|
-
import {
|
3
|
-
|
2
|
+
import { DeleteResponse, DownloadKeyResponse, SaveResponse } from "./interfaces";
|
3
|
+
import { AttachFetcherFacadeInterface } from "./facade/attach-fetcher.facade";
|
4
|
+
export declare class AnexoSistemaFetcher implements AttachFetcherFacadeInterface {
|
4
5
|
private entityName;
|
5
6
|
private registerKey;
|
6
7
|
private dataUnitName;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { Change, Record } from "@sankhyalabs/core";
|
2
|
+
import { SaveResponse, DeleteResponse, DownloadKeyResponse } from "./interfaces";
|
3
|
+
import { AttachFetcherFacadeInterface } from "./facade/attach-fetcher.facade";
|
4
|
+
export declare class AttachFetcher implements AttachFetcherFacadeInterface {
|
5
|
+
private dataUnitName?;
|
6
|
+
constructor(dataUnitName?: string);
|
7
|
+
save({ dataUnit: dataUnitName, record, updatingFields: fields, operation }: Change): Promise<Array<SaveResponse>>;
|
8
|
+
edit(change: Change): Promise<SaveResponse[]>;
|
9
|
+
delete(record: Record): Promise<DeleteResponse>;
|
10
|
+
getDownloadKey(record: Record): Promise<DownloadKeyResponse>;
|
11
|
+
}
|
package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/facade/attach-fetcher.facade.d.ts
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
import { Change, Record } from '@sankhyalabs/core';
|
2
|
+
import { DeleteResponse, DownloadKeyResponse, SaveResponse } from '../interfaces';
|
3
|
+
export interface AttachFetcherFacadeInterface {
|
4
|
+
save(change: Change): Promise<Array<SaveResponse>>;
|
5
|
+
edit(change: Change): Promise<Array<SaveResponse>>;
|
6
|
+
delete(record: Record): Promise<DeleteResponse>;
|
7
|
+
getDownloadKey(record: Record): Promise<DownloadKeyResponse>;
|
8
|
+
}
|
@@ -22,5 +22,6 @@ export type SaveResponse = {
|
|
22
22
|
export declare enum SaveErrorsEnum {
|
23
23
|
LINK_AND_FILE_AT_THE_SAME_TIME = "LINK_AND_FILE_AT_THE_SAME_TIME",
|
24
24
|
ANY_LINK_OR_FILE_FILLED = "ANY_LINK_OR_FILE_FILLED",
|
25
|
-
UNKNOWN = "UNKNOWN"
|
25
|
+
UNKNOWN = "UNKNOWN",
|
26
|
+
DESCRIPTION_CANNOT_BE_CHANGED = "DESCRIPTION_CANNOT_BE_CHANGED"
|
26
27
|
}
|
@@ -1,9 +1,10 @@
|
|
1
|
-
import { DataUnit, LoadDataRequest, LoadDataResponse } from "@sankhyalabs/core";
|
1
|
+
import { DataUnit, LoadDataRequest, LoadDataResponse, Record } from "@sankhyalabs/core";
|
2
2
|
export default class DataUnitDataLoader {
|
3
3
|
private static _requestTimeByDataUnit;
|
4
4
|
private static _debouncingTimeouts;
|
5
5
|
private static debounce;
|
6
6
|
static loadData(dataUnit: DataUnit, request: LoadDataRequest): Promise<LoadDataResponse>;
|
7
|
+
static getCachedRecords(dataUnit: DataUnit): Array<Record>;
|
7
8
|
private static loadFromServer;
|
8
9
|
private static callLoader;
|
9
10
|
private static afterLoadingPage;
|
@@ -16,6 +16,7 @@ export default class PreloadManager {
|
|
16
16
|
static countRecords(dataUnit: DataUnit): Promise<number>;
|
17
17
|
private static getRepository;
|
18
18
|
private static loadFromCache;
|
19
|
+
static getCachedRecords(dataUnit: DataUnit): Array<Record>;
|
19
20
|
}
|
20
21
|
export interface DataLoader {
|
21
22
|
(dataUnit: DataUnit, request: LoadDataRequest): Promise<LoadDataResponse>;
|
@@ -10,6 +10,8 @@ export default class DataUnitFetcher {
|
|
10
10
|
getDataUnit(entityName: string, resourceID: string, parentDataUnit?: DataUnit, configName?: string): DataUnit;
|
11
11
|
private loadMetadata;
|
12
12
|
loadSelectDistinct(dataUnit: DataUnit, fieldName: string, argument: string): Promise<Array<string>>;
|
13
|
+
private addTransientProperties;
|
14
|
+
private getUpdatingFields;
|
13
15
|
private saveData;
|
14
16
|
private updateCache;
|
15
17
|
private getTransientInfo;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { SnkDataUnit } from "../../../../../../components/snk-data-unit/snk-data-unit";
|
2
|
+
export interface IBuildRequestBodyLoadRowMetadata {
|
3
|
+
snkDataUnit: SnkDataUnit;
|
4
|
+
serviceName: string;
|
5
|
+
metadataName: string;
|
6
|
+
fieldName: string;
|
7
|
+
updatedFields: {
|
8
|
+
[key: string]: any;
|
9
|
+
};
|
10
|
+
}
|
package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.d.ts
CHANGED
@@ -2,9 +2,16 @@ import { DataUnit, LoadDataRequest } from '@sankhyalabs/core';
|
|
2
2
|
import { ILoadDataResult } from "../interfaces/ILoadDataResult";
|
3
3
|
import { ILoadDataStrategy } from "../interfaces/ILoadDataStrategy";
|
4
4
|
import { ILoadingInfo } from "../interfaces/ILoadingInfo";
|
5
|
+
import { SnkDataUnit } from '../../../../../../components/snk-data-unit/snk-data-unit';
|
6
|
+
import { IRowMetadata } from '../interfaces/IRowMetadata';
|
5
7
|
export declare class DatasetStrategy implements ILoadDataStrategy {
|
6
8
|
canSlice(): boolean;
|
9
|
+
private processSortingSide;
|
7
10
|
load(dataUnit: DataUnit, request: LoadDataRequest, loadingInfo: ILoadingInfo): Promise<ILoadDataResult>;
|
11
|
+
loadRowMetadata(snkDataUnit: SnkDataUnit, fieldName: string, metadataName: string, updatedFields?: {
|
12
|
+
[key: string]: any;
|
13
|
+
}): Promise<IRowMetadata>;
|
14
|
+
private buildRequestBodyLoadRowMetadata;
|
8
15
|
private getFieldsList;
|
9
16
|
private getStandAloneFieldsList;
|
10
17
|
private getFieldNames;
|
@@ -0,0 +1,20 @@
|
|
1
|
+
declare const metadataMock: {
|
2
|
+
label: string;
|
3
|
+
name: string;
|
4
|
+
fields: ({
|
5
|
+
name: string;
|
6
|
+
label: string;
|
7
|
+
dataType: string;
|
8
|
+
properties?: undefined;
|
9
|
+
} | {
|
10
|
+
name: string;
|
11
|
+
label: string;
|
12
|
+
dataType: string;
|
13
|
+
properties: {
|
14
|
+
rmp: {
|
15
|
+
value: string;
|
16
|
+
};
|
17
|
+
};
|
18
|
+
})[];
|
19
|
+
};
|
20
|
+
export default metadataMock;
|
@@ -1,9 +1,12 @@
|
|
1
1
|
import { DataType } from '@sankhyalabs/core/dist/dataunit/metadata/DataType';
|
2
2
|
import { UserInterface } from '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
3
|
+
import { ICustomFormatter } from '@sankhyalabs/ezui/dist/types/components/ez-grid/interfaces';
|
3
4
|
export default interface IExporterColumnMetadata {
|
4
5
|
label: string;
|
5
6
|
id: string;
|
6
7
|
width: number;
|
7
8
|
type: DataType;
|
8
9
|
userInterface: UserInterface;
|
10
|
+
descriptionFrom?: string;
|
11
|
+
customFormatter?: ICustomFormatter;
|
9
12
|
}
|
@@ -12,6 +12,8 @@ export declare class FormConfigFetcher extends ResourceFetcher {
|
|
12
12
|
fetchLegacyConfig(formName: string, resourceID: string): Promise<IFormConfig>;
|
13
13
|
fetchDefaultConfig(formName: string, resourceID: string): Promise<IFormConfig>;
|
14
14
|
private getPath;
|
15
|
+
fetchLegacyConfigurableForm(configName: string): Promise<IFormConfig>;
|
16
|
+
private buildLegacyConfigurableForm;
|
15
17
|
}
|
16
18
|
export declare enum UserConfigType {
|
17
19
|
USER = "USER",
|
@@ -5,7 +5,8 @@ export default class PersonalizedFilterFetcher {
|
|
5
5
|
constructor();
|
6
6
|
private resolveURI;
|
7
7
|
private buildTemplates;
|
8
|
-
loadPersonalizedFilter(resourceID: string, filterID: string, configName?: string): Promise<IPersonalizedFilter>;
|
8
|
+
loadPersonalizedFilter(resourceID: string, filterID: string, configName?: string, legacyConfigName?: string): Promise<IPersonalizedFilter>;
|
9
|
+
private resolveLegacyConfigName;
|
9
10
|
savePersonalizedFilter(personalizedFilter: IPersonalizedFilter, resourceID: string, configName?: string): Promise<IPersonalizedFilter>;
|
10
11
|
removePersonalizedFilter(personalizedFilter: IPersonalizedFilter, resourceID: string, configName?: string): Promise<IPersonalizedFilter>;
|
11
12
|
validatePersonalizedFilter(dataUnitName: string, expression: string): Promise<IValidateFilter>;
|
@@ -4,7 +4,7 @@ export { CrudUtils } from './utils/CrudUtils';
|
|
4
4
|
export { PresentationMode } from "./@types";
|
5
5
|
export { TotalsFetcher } from './http/data-fetcher/fetchers/totals-fetcher';
|
6
6
|
export { default as ApplicationConfigFetcher } from './http/data-fetcher/fetchers/application-config-fetcher';
|
7
|
-
export { AttachFetcher } from './http/data-fetcher/fetchers/
|
7
|
+
export { AttachFetcher, AnexoSistemaFetcher, AttachFetcherFacadeInterface } from './http/data-fetcher/fetchers/AttachFetcher';
|
8
8
|
export { Authorization } from './http/data-fetcher/fetchers/auth-fetcher';
|
9
9
|
export { default as DataUnitFetcher } from './http/data-fetcher/fetchers/data-unit/dataunit-fetcher';
|
10
10
|
export { default as FilterBarConfigFetcher } from './http/data-fetcher/fetchers/filter-bar-config-fetcher';
|
@@ -1,6 +1,9 @@
|
|
1
|
+
import { DataUnit } from '@sankhyalabs/core';
|
2
|
+
import { IGridConfig } from '@sankhyalabs/ezui/dist/types/components/ez-grid/controller/EzGridController';
|
1
3
|
export interface CrudFindResult {
|
2
4
|
fields: Map<string, string>;
|
3
5
|
}
|
4
6
|
export declare class CrudUtils {
|
7
|
+
static assertDefaultSorting(gridConfig: IGridConfig, dataUnit: DataUnit): void;
|
5
8
|
static find(entityName: string, fields: Array<string>, criteria: Map<string, string>, onlyFirst: boolean, criteriaExpression: string, orderBy: string): Promise<unknown>;
|
6
9
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@sankhyalabs/sankhyablocks",
|
3
|
-
"version": "8.15.0-dev.
|
3
|
+
"version": "8.15.0-dev.80",
|
4
4
|
"description": "Stencil Component Starter",
|
5
5
|
"main": "dist/index.cjs.js",
|
6
6
|
"module": "dist/index.js",
|
@@ -20,11 +20,12 @@
|
|
20
20
|
"react/"
|
21
21
|
],
|
22
22
|
"scripts": {
|
23
|
+
"prebuild": "(test -f ./src/components.d.ts && git checkout ./src/components.d.ts) || true",
|
23
24
|
"build": "stencil build --docs",
|
24
|
-
"build.prod": "stencil build --docs --prod",
|
25
|
+
"build.prod": "npm run prebuild && stencil build --docs --prod",
|
25
26
|
"build.with.peerdeps": "stencil build --docs --prod --force-peer-deps",
|
26
27
|
"start": "stencil build --dev --watch --serve --force-peer-deps",
|
27
|
-
"test": "stencil test --spec --e2e",
|
28
|
+
"test": "stencil test --spec --e2e --coverage --silent --testResultsProcessor jest-sonar-reporter",
|
28
29
|
"test.watch": "stencil test --spec --e2e --watchAll",
|
29
30
|
"generate": "stencil generate",
|
30
31
|
"build.css.docs": "node docscsstask.js",
|
@@ -42,9 +43,9 @@
|
|
42
43
|
"@babel/preset-env": "^7.18.2",
|
43
44
|
"@commitlint/cli": "^18.4.3",
|
44
45
|
"@commitlint/config-conventional": "^18.4.3",
|
45
|
-
"@sankhyalabs/core": "^5.
|
46
|
+
"@sankhyalabs/core": "^5.16.0",
|
46
47
|
"@sankhyalabs/docscss": "^1.0.4",
|
47
|
-
"@sankhyalabs/ezui": "^5.19.
|
48
|
+
"@sankhyalabs/ezui": "^5.19.4",
|
48
49
|
"@sankhyalabs/skippeerdeps": "^1.0.2",
|
49
50
|
"@stencil/core": "^2.13.0",
|
50
51
|
"@stencil/react-output-target": "0.0.9",
|
@@ -57,11 +58,19 @@
|
|
57
58
|
"husky": "^8.0.3",
|
58
59
|
"jest": "^27.4.5",
|
59
60
|
"jest-cli": "^27.4.5",
|
61
|
+
"jest-sonar-reporter": "^2.0.0",
|
60
62
|
"puppeteer": "^10.0.0",
|
61
63
|
"redux": "^4.1.2"
|
62
64
|
},
|
63
65
|
"jest": {
|
64
|
-
"verbose": true
|
66
|
+
"verbose": true,
|
67
|
+
"testResultsProcessor": "jest-sonar-reporter"
|
68
|
+
},
|
69
|
+
"jestSonar": {
|
70
|
+
"sonar56x": true,
|
71
|
+
"reportPath": "reports",
|
72
|
+
"reportFile": "test-report.xml",
|
73
|
+
"indent": 4
|
65
74
|
},
|
66
75
|
"peerDependencies": {
|
67
76
|
"@sankhyalabs/core": "^5.0.0",
|
@@ -1,224 +0,0 @@
|
|
1
|
-
'use strict';
|
2
|
-
|
3
|
-
const core = require('@sankhyalabs/core');
|
4
|
-
const utils = require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
5
|
-
|
6
|
-
class ArrayRepository {
|
7
|
-
constructor(equalsFunction) {
|
8
|
-
this._list = [];
|
9
|
-
this._equalsFunction = equalsFunction;
|
10
|
-
}
|
11
|
-
async load(filterFunction, sortingFunction, offset, limit) {
|
12
|
-
let result = [].concat(this._list);
|
13
|
-
if (filterFunction != undefined) {
|
14
|
-
result = this._list.filter(item => filterFunction(item));
|
15
|
-
}
|
16
|
-
if (sortingFunction != undefined) {
|
17
|
-
result = result.sort(sortingFunction);
|
18
|
-
}
|
19
|
-
const count = result.length;
|
20
|
-
if (limit != undefined) {
|
21
|
-
const start = offset || 0;
|
22
|
-
const end = limit ? start + limit : result.length;
|
23
|
-
result = result.slice(start, end);
|
24
|
-
}
|
25
|
-
return Promise.resolve({ result, count });
|
26
|
-
}
|
27
|
-
async distict(itemProcessor) {
|
28
|
-
const processedItems = [];
|
29
|
-
let hasEmpty = false;
|
30
|
-
for (const item of this._list) {
|
31
|
-
const processedItem = itemProcessor(item);
|
32
|
-
if (processedItem == undefined) {
|
33
|
-
continue;
|
34
|
-
}
|
35
|
-
if (processedItem.value == undefined) {
|
36
|
-
hasEmpty = true;
|
37
|
-
continue;
|
38
|
-
}
|
39
|
-
processedItems.push(processedItem);
|
40
|
-
}
|
41
|
-
if (hasEmpty) {
|
42
|
-
processedItems.push({ key: "", value: null });
|
43
|
-
}
|
44
|
-
return Promise.resolve(new Map(processedItems.map(item => [item.key, item.value])));
|
45
|
-
}
|
46
|
-
async push(items) {
|
47
|
-
this._list.push(...items);
|
48
|
-
}
|
49
|
-
async clear() {
|
50
|
-
this._list = [];
|
51
|
-
}
|
52
|
-
async delete(items) {
|
53
|
-
this._list = this._list.filter(item => {
|
54
|
-
for (const removed of items) {
|
55
|
-
if (this._equalsFunction(item, removed)) {
|
56
|
-
return false;
|
57
|
-
}
|
58
|
-
}
|
59
|
-
return true;
|
60
|
-
});
|
61
|
-
}
|
62
|
-
async update(items) {
|
63
|
-
this._list = this._list.map(existingItem => {
|
64
|
-
const newItem = items.find(newItem => this._equalsFunction(existingItem, newItem));
|
65
|
-
return newItem == undefined ? existingItem : newItem;
|
66
|
-
});
|
67
|
-
}
|
68
|
-
async insert(itemReference, items) {
|
69
|
-
const itemPosition = this._list.indexOf(itemReference);
|
70
|
-
if (itemPosition == -1) {
|
71
|
-
this._list.push(...items);
|
72
|
-
return;
|
73
|
-
}
|
74
|
-
this._list = this._list.slice(0, itemPosition).concat(items).concat(this._list.slice(itemPosition));
|
75
|
-
}
|
76
|
-
isOperating() {
|
77
|
-
return true;
|
78
|
-
}
|
79
|
-
async isEmpty() {
|
80
|
-
return Promise.resolve(this._list.length === 0);
|
81
|
-
}
|
82
|
-
async count() {
|
83
|
-
return Promise.resolve(this._list.length);
|
84
|
-
}
|
85
|
-
}
|
86
|
-
|
87
|
-
class PreloadManager {
|
88
|
-
static setLoadingStatus(dataUnit, loadingInProgress) {
|
89
|
-
this._loadingStatus.set(dataUnit.name, loadingInProgress);
|
90
|
-
}
|
91
|
-
static isCacheEnabled(_dataUnit) {
|
92
|
-
return true;
|
93
|
-
}
|
94
|
-
static cacheRecords(dataUnit, records, resetDatabase, loadingInProgress) {
|
95
|
-
PreloadManager.setLoadingStatus(dataUnit, loadingInProgress);
|
96
|
-
if (PreloadManager.isCacheEnabled(dataUnit)) {
|
97
|
-
this.getRepository(dataUnit).push(records);
|
98
|
-
}
|
99
|
-
else {
|
100
|
-
if (resetDatabase) {
|
101
|
-
this._repositories.delete(dataUnit.name);
|
102
|
-
}
|
103
|
-
}
|
104
|
-
}
|
105
|
-
static getSortingFunction(dataUnit, sorting) {
|
106
|
-
if (sorting == undefined || sorting.length == 0) {
|
107
|
-
return undefined;
|
108
|
-
}
|
109
|
-
return (recordA, recordB) => {
|
110
|
-
for (const sort of sorting) {
|
111
|
-
const result = core.FieldComparator.compare(dataUnit.getField(sort.field), recordA, recordB, sort.mode === core.SortMode.ASC);
|
112
|
-
if (result != 0) {
|
113
|
-
return result;
|
114
|
-
}
|
115
|
-
}
|
116
|
-
};
|
117
|
-
}
|
118
|
-
static async getDistinct(dataUnit, fieldName) {
|
119
|
-
if (!PreloadManager.isCacheEnabled(dataUnit)) {
|
120
|
-
return Promise.resolve(utils.ColumnFilterManager.compileDistinct(fieldName, dataUnit));
|
121
|
-
}
|
122
|
-
let filterFunction;
|
123
|
-
const request = dataUnit.getLastLoadRequest();
|
124
|
-
if (request != undefined) {
|
125
|
-
const columnFilters = utils.ColumnFilterManager.getColumnFilters(request.filters, fieldName);
|
126
|
-
filterFunction = utils.ColumnFilterManager.getFilterFunction(dataUnit, Array.from(columnFilters.values()));
|
127
|
-
}
|
128
|
-
return new Promise((accept, reject) => {
|
129
|
-
PreloadManager.getRepository(dataUnit).distict(record => {
|
130
|
-
if (filterFunction != undefined && !filterFunction(record)) {
|
131
|
-
return undefined;
|
132
|
-
}
|
133
|
-
const fieldValue = record[fieldName];
|
134
|
-
if (fieldValue == undefined) {
|
135
|
-
return { key: null, value: null };
|
136
|
-
}
|
137
|
-
const value = fieldValue.value != undefined ? fieldValue.value : fieldValue;
|
138
|
-
return { key: dataUnit.getFormattedValue(fieldName, fieldValue), value };
|
139
|
-
})
|
140
|
-
.then(result => {
|
141
|
-
if (result == undefined) {
|
142
|
-
accept(undefined);
|
143
|
-
return;
|
144
|
-
}
|
145
|
-
accept(Array.from(result.entries()).map(([label, value]) => ({ label, value, check: true })));
|
146
|
-
})
|
147
|
-
.catch(reason => reject(reason));
|
148
|
-
});
|
149
|
-
}
|
150
|
-
static async loadData(dataUnit, request, loadFromServer) {
|
151
|
-
try {
|
152
|
-
if (PreloadManager.isCacheEnabled(dataUnit)) {
|
153
|
-
let useCache = request.source === "EZ_GRID_LOADING_SOURCE" || request.source === core.DataUnit.CHANGING_PAGE_LOADING_SOURCE;
|
154
|
-
if (useCache) {
|
155
|
-
const isCacheEmpty = await PreloadManager.getRepository(dataUnit).isEmpty();
|
156
|
-
if (!isCacheEmpty) {
|
157
|
-
return PreloadManager.loadFromCache(dataUnit, request);
|
158
|
-
}
|
159
|
-
}
|
160
|
-
//Como não vamos aproveitar o cache, ele precisa ser limpo.
|
161
|
-
PreloadManager.getRepository(dataUnit).clear().catch(() => { });
|
162
|
-
}
|
163
|
-
return loadFromServer(dataUnit, request);
|
164
|
-
}
|
165
|
-
catch (error) {
|
166
|
-
console.error(error);
|
167
|
-
return Promise.reject(error);
|
168
|
-
}
|
169
|
-
}
|
170
|
-
static insertRecords(dataUnit, reference, records) {
|
171
|
-
if (PreloadManager.isCacheEnabled(dataUnit)) {
|
172
|
-
PreloadManager.getRepository(dataUnit).insert(reference, records);
|
173
|
-
}
|
174
|
-
}
|
175
|
-
static updateRecords(dataUnit, records) {
|
176
|
-
if (PreloadManager.isCacheEnabled(dataUnit)) {
|
177
|
-
PreloadManager.getRepository(dataUnit).update(records);
|
178
|
-
}
|
179
|
-
}
|
180
|
-
static removeRecords(dataUnit, records) {
|
181
|
-
if (PreloadManager.isCacheEnabled(dataUnit)) {
|
182
|
-
PreloadManager.getRepository(dataUnit).delete(records);
|
183
|
-
}
|
184
|
-
}
|
185
|
-
static async countRecords(dataUnit) {
|
186
|
-
if (PreloadManager.isCacheEnabled(dataUnit)) {
|
187
|
-
return PreloadManager.getRepository(dataUnit).count();
|
188
|
-
}
|
189
|
-
return Promise.resolve(0);
|
190
|
-
}
|
191
|
-
static getRepository(dataUnit) {
|
192
|
-
const name = dataUnit.name;
|
193
|
-
if (!PreloadManager._repositories.has(name)) {
|
194
|
-
PreloadManager._repositories.set(name, new ArrayRepository((recordA, recordB) => recordA.__record__id__ === recordB.__record__id__));
|
195
|
-
}
|
196
|
-
return PreloadManager._repositories.get(name);
|
197
|
-
}
|
198
|
-
static async loadFromCache(dataUnit, request) {
|
199
|
-
return new Promise((accept, reject) => {
|
200
|
-
const columnFilters = utils.ColumnFilterManager.getColumnFilters(request.filters, "");
|
201
|
-
const { limit, offset, sort } = request;
|
202
|
-
PreloadManager.getRepository(dataUnit)
|
203
|
-
.load(utils.ColumnFilterManager.getFilterFunction(dataUnit, Array.from(columnFilters.values())), PreloadManager.getSortingFunction(dataUnit, sort), offset, limit)
|
204
|
-
.then(loadResult => {
|
205
|
-
const stillLoading = PreloadManager._loadingStatus.get(dataUnit.name);
|
206
|
-
const { count, result: records } = loadResult;
|
207
|
-
const firstRecord = count == 0 ? 0 : offset + 1;
|
208
|
-
const lastRecord = offset + Math.min(records.length, limit);
|
209
|
-
const currentPage = offset / limit;
|
210
|
-
const paginationInfo = {
|
211
|
-
count, currentPage, firstRecord, lastRecord,
|
212
|
-
hasMore: stillLoading || (lastRecord < count),
|
213
|
-
total: stillLoading ? undefined : count
|
214
|
-
};
|
215
|
-
accept({ records, paginationInfo });
|
216
|
-
})
|
217
|
-
.catch(reason => reject(reason));
|
218
|
-
});
|
219
|
-
}
|
220
|
-
}
|
221
|
-
PreloadManager._repositories = new Map();
|
222
|
-
PreloadManager._loadingStatus = new Map();
|
223
|
-
|
224
|
-
exports.PreloadManager = PreloadManager;
|