@webiny/app-admin 6.4.5 → 6.6.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/base/Admin.d.ts +2 -4
- package/base/Admin.js +9 -12
- package/base/Admin.js.map +1 -1
- package/base/Base/DefaultFieldRenderers.js +24 -0
- package/base/Base/DefaultFieldRenderers.js.map +1 -1
- package/base/Base/FieldRenderers/ApiKeyTokenRenderer.d.ts +4 -0
- package/base/Base/FieldRenderers/ApiKeyTokenRenderer.js +26 -0
- package/base/Base/FieldRenderers/ApiKeyTokenRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/CheckboxesRenderer.js +1 -0
- package/base/Base/FieldRenderers/CheckboxesRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/DateTimeInputsRenderer.js +5 -1
- package/base/Base/FieldRenderers/DateTimeInputsRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/FilePickerRenderer.js +2 -0
- package/base/Base/FieldRenderers/FilePickerRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/FileUrlPickerRenderer.js +1 -0
- package/base/Base/FieldRenderers/FileUrlPickerRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/HorizontalTabsRenderer.js +2 -1
- package/base/Base/FieldRenderers/HorizontalTabsRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/InputRenderer.js +2 -0
- package/base/Base/FieldRenderers/InputRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/LexicalEditorsRenderer.d.ts +14 -0
- package/base/Base/FieldRenderers/LexicalEditorsRenderer.js +78 -0
- package/base/Base/FieldRenderers/LexicalEditorsRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/MultiAutoCompleteRenderer.d.ts +13 -0
- package/base/Base/FieldRenderers/MultiAutoCompleteRenderer.js +29 -0
- package/base/Base/FieldRenderers/MultiAutoCompleteRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/NumberInputRenderer.js +1 -0
- package/base/Base/FieldRenderers/NumberInputRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/NumberInputsRenderer.js +19 -9
- package/base/Base/FieldRenderers/NumberInputsRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/ObjectRenderer/KeyValueTagsRenderer.js +2 -1
- package/base/Base/FieldRenderers/ObjectRenderer/KeyValueTagsRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone.js +46 -5
- package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone.js.map +1 -1
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectAccordionMultipleRenderer.d.ts +1 -0
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectAccordionMultipleRenderer.js +6 -4
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectAccordionMultipleRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectFieldComponents.d.ts +2 -1
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectFieldComponents.js +8 -6
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectFieldComponents.js.map +1 -1
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectRenderer.d.ts +4 -1
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectRenderer.js +31 -4
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/ObjectRenderer/SingleValueDynamicZone.js +45 -6
- package/base/Base/FieldRenderers/ObjectRenderer/SingleValueDynamicZone.js.map +1 -1
- package/base/Base/FieldRenderers/ObjectRenderer/resolveItemTitle.d.ts +3 -2
- package/base/Base/FieldRenderers/ObjectRenderer/resolveItemTitle.js +10 -1
- package/base/Base/FieldRenderers/ObjectRenderer/resolveItemTitle.js.map +1 -1
- package/base/Base/FieldRenderers/PasswordInputRenderer.d.ts +12 -0
- package/base/Base/FieldRenderers/PasswordInputRenderer.js +22 -0
- package/base/Base/FieldRenderers/PasswordInputRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/PermissionsRenderer.d.ts +14 -0
- package/base/Base/FieldRenderers/PermissionsRenderer.js +18 -0
- package/base/Base/FieldRenderers/PermissionsRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/RadioButtonsRenderer.js +1 -0
- package/base/Base/FieldRenderers/RadioButtonsRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/RolesMultiSelectRenderer.d.ts +12 -0
- package/base/Base/FieldRenderers/RolesMultiSelectRenderer.js +21 -0
- package/base/Base/FieldRenderers/RolesMultiSelectRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/SelectRenderer.js +1 -0
- package/base/Base/FieldRenderers/SelectRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/TagsRenderer.js +1 -0
- package/base/Base/FieldRenderers/TagsRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/TextInputsRenderer.js +19 -9
- package/base/Base/FieldRenderers/TextInputsRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/TextareaRenderer.js +1 -0
- package/base/Base/FieldRenderers/TextareaRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/TextareasRenderer.js +5 -1
- package/base/Base/FieldRenderers/TextareasRenderer.js.map +1 -1
- package/base/Base.d.ts +3 -1
- package/base/Base.js +2 -1
- package/base/Base.js.map +1 -1
- package/base/createRootContainer.js +10 -3
- package/base/createRootContainer.js.map +1 -1
- package/base/resolveApiUrl.d.ts +3 -0
- package/base/resolveApiUrl.js +18 -0
- package/base/resolveApiUrl.js.map +1 -0
- package/base/ui/FileManager.d.ts +2 -1
- package/components/BulkActions/BulkActionButton.d.ts +6 -0
- package/components/BulkActions/BulkActionButton.js +17 -0
- package/components/BulkActions/BulkActionButton.js.map +1 -0
- package/components/BulkActions/BulkActionRunner.d.ts +41 -0
- package/components/BulkActions/BulkActionRunner.js +32 -0
- package/components/BulkActions/BulkActionRunner.js.map +1 -0
- package/components/BulkActions/Worker.d.ts +9 -57
- package/components/BulkActions/Worker.js +5 -9
- package/components/BulkActions/Worker.js.map +1 -1
- package/components/BulkActions/index.d.ts +3 -0
- package/components/BulkActions/index.js +3 -0
- package/components/ConfirmationDialog/ConfirmationDialog.d.ts +11 -0
- package/components/ConfirmationDialog/ConfirmationDialog.js +41 -0
- package/components/ConfirmationDialog/ConfirmationDialog.js.map +1 -0
- package/components/ConfirmationDialog/index.d.ts +1 -0
- package/components/ConfirmationDialog/index.js +1 -0
- package/components/Dialogs/DialogsContext.js +2 -1
- package/components/Dialogs/DialogsContext.js.map +1 -1
- package/components/IconPicker/IconPicker.d.ts +7 -5
- package/components/IconPicker/components/IconPickerTrigger.d.ts +1 -1
- package/components/IconPicker/config/index.d.ts +2 -1
- package/components/IconPicker/plugins/customPlugin.js +4 -19
- package/components/IconPicker/plugins/customPlugin.js.map +1 -1
- package/components/ListView/ListView.d.ts +17 -0
- package/components/ListView/ListView.js +36 -0
- package/components/ListView/ListView.js.map +1 -0
- package/components/ListView/ListViewBottomBar.d.ts +14 -0
- package/components/ListView/ListViewBottomBar.js +45 -0
- package/components/ListView/ListViewBottomBar.js.map +1 -0
- package/components/ListView/ListViewBulkActions.d.ts +11 -0
- package/components/ListView/ListViewBulkActions.js +41 -0
- package/components/ListView/ListViewBulkActions.js.map +1 -0
- package/components/ListView/ListViewContent.d.ts +12 -0
- package/components/ListView/ListViewContent.js +25 -0
- package/components/ListView/ListViewContent.js.map +1 -0
- package/components/ListView/ListViewFilters.d.ts +15 -0
- package/components/ListView/ListViewFilters.js +21 -0
- package/components/ListView/ListViewFilters.js.map +1 -0
- package/components/ListView/ListViewHeader.d.ts +17 -0
- package/components/ListView/ListViewHeader.js +72 -0
- package/components/ListView/ListViewHeader.js.map +1 -0
- package/components/ListView/ListViewSidebar.d.ts +17 -0
- package/components/ListView/ListViewSidebar.js +25 -0
- package/components/ListView/ListViewSidebar.js.map +1 -0
- package/components/ListView/ListViewTable.d.ts +18 -0
- package/components/ListView/ListViewTable.js +33 -0
- package/components/ListView/ListViewTable.js.map +1 -0
- package/components/ListView/context.d.ts +3 -0
- package/components/ListView/context.js +11 -0
- package/components/ListView/context.js.map +1 -0
- package/components/ListView/index.d.ts +24 -0
- package/components/ListView/index.js +22 -0
- package/components/ListView/index.js.map +1 -0
- package/components/ListView/types.d.ts +7 -0
- package/components/ListView/types.js +0 -0
- package/components/OptionsMenu/OptionsMenuItem.d.ts +1 -0
- package/components/OptionsMenu/OptionsMenuItem.js +1 -0
- package/components/OptionsMenu/OptionsMenuItem.js.map +1 -1
- package/components/OverlayLayout/OverlayLayout.js +2 -4
- package/components/OverlayLayout/OverlayLayout.js.map +1 -1
- package/components/OverlayLayout/components/OverlayContent.js +0 -1
- package/components/OverlayLayout/components/OverlayContent.js.map +1 -1
- package/components/OverlayLayout/components/OverlayHeader.d.ts +1 -1
- package/components/Permissions/Permissions.js +2 -1
- package/components/Permissions/Permissions.js.map +1 -1
- package/components/Permissions/index.d.ts +1 -0
- package/components/Permissions/index.js +1 -0
- package/components/Permissions/mergeByName.d.ts +11 -0
- package/components/Permissions/mergeByName.js +33 -0
- package/components/Permissions/mergeByName.js.map +1 -0
- package/components/RolesMultiAutocomplete/index.d.ts +3 -1
- package/components/RolesMultiAutocomplete/index.js +24 -14
- package/components/RolesMultiAutocomplete/index.js.map +1 -1
- package/components/SimpleForm/SimpleForm.d.ts +1 -1
- package/components/SimpleUI/InputField.d.ts +2 -1
- package/components/SingleImageUpload.d.ts +1 -2
- package/components/SingleImageUpload.js +1 -2
- package/components/SingleImageUpload.js.map +1 -1
- package/components/Table/cells/CellAuthor.d.ts +2 -0
- package/components/Table/cells/CellAuthor.js +10 -0
- package/components/Table/cells/CellAuthor.js.map +1 -0
- package/components/Table/cells/CellCreated.d.ts +2 -0
- package/components/Table/cells/CellCreated.js +13 -0
- package/components/Table/cells/CellCreated.js.map +1 -0
- package/components/Table/cells/CellModified.d.ts +2 -0
- package/components/Table/cells/CellModified.js +13 -0
- package/components/Table/cells/CellModified.js.map +1 -0
- package/components/Table/cells/index.d.ts +3 -0
- package/components/Table/cells/index.js +3 -0
- package/components/Table/components/Table/ColumnVisibility/ColumnsVisibilityDecorator.d.ts +9 -0
- package/components/Table/components/Table/ColumnVisibility/ColumnsVisibilityDecorator.js +23 -0
- package/components/Table/components/Table/ColumnVisibility/ColumnsVisibilityDecorator.js.map +1 -0
- package/components/Table/components/Table/ColumnVisibility/ColumnsVisibilityPresenter.d.ts +9 -0
- package/components/Table/components/Table/ColumnVisibility/ColumnsVisibilityPresenter.js +21 -0
- package/components/Table/components/Table/ColumnVisibility/ColumnsVisibilityPresenter.js.map +1 -0
- package/components/Table/components/Table/ColumnVisibility/ColumnsVisibilityPresenter.test.d.ts +1 -0
- package/components/Table/components/Table/ColumnVisibility/ColumnsVisibilityPresenter.test.js +128 -0
- package/components/Table/components/Table/ColumnVisibility/ColumnsVisibilityPresenter.test.js.map +1 -0
- package/components/Table/components/Table/ColumnVisibility/ColumnsVisibilityRepository.d.ts +10 -0
- package/components/Table/components/Table/ColumnVisibility/ColumnsVisibilityRepository.js +30 -0
- package/components/Table/components/Table/ColumnVisibility/ColumnsVisibilityRepository.js.map +1 -0
- package/components/Table/components/Table/ColumnVisibility/ColumnsVisibilityRepositoryFactory.d.ts +9 -0
- package/components/Table/components/Table/ColumnVisibility/ColumnsVisibilityRepositoryFactory.js +18 -0
- package/components/Table/components/Table/ColumnVisibility/ColumnsVisibilityRepositoryFactory.js.map +1 -0
- package/components/Table/components/Table/ColumnVisibility/ColumnsVisibilityUpdater.d.ts +8 -0
- package/components/Table/components/Table/ColumnVisibility/ColumnsVisibilityUpdater.js +16 -0
- package/components/Table/components/Table/ColumnVisibility/ColumnsVisibilityUpdater.js.map +1 -0
- package/components/Table/components/Table/ColumnVisibility/IColumnsVisibilityRepository.d.ts +5 -0
- package/components/Table/components/Table/ColumnVisibility/IColumnsVisibilityRepository.js +0 -0
- package/components/Table/components/Table/ColumnVisibility/IColumnsVisibilityUpdater.d.ts +4 -0
- package/components/Table/components/Table/ColumnVisibility/IColumnsVisibilityUpdater.js +0 -0
- package/components/Table/components/Table/ColumnVisibility/index.d.ts +7 -0
- package/components/Table/components/Table/ColumnVisibility/index.js +5 -0
- package/components/Table/components/Table/Columns/Column.d.ts +42 -0
- package/components/Table/components/Table/Columns/Column.js +21 -0
- package/components/Table/components/Table/Columns/Column.js.map +1 -0
- package/components/Table/components/Table/Columns/ColumnMapper.d.ts +7 -0
- package/components/Table/components/Table/Columns/ColumnMapper.js +34 -0
- package/components/Table/components/Table/Columns/ColumnMapper.js.map +1 -0
- package/components/Table/components/Table/Columns/ColumnsPresenter.d.ts +9 -0
- package/components/Table/components/Table/Columns/ColumnsPresenter.js +18 -0
- package/components/Table/components/Table/Columns/ColumnsPresenter.js.map +1 -0
- package/components/Table/components/Table/Columns/ColumnsPresenter.test.d.ts +1 -0
- package/components/Table/components/Table/Columns/ColumnsPresenter.test.js +73 -0
- package/components/Table/components/Table/Columns/ColumnsPresenter.test.js.map +1 -0
- package/components/Table/components/Table/Columns/ColumnsRepository.d.ts +9 -0
- package/components/Table/components/Table/Columns/ColumnsRepository.js +19 -0
- package/components/Table/components/Table/Columns/ColumnsRepository.js.map +1 -0
- package/components/Table/components/Table/Columns/ColumnsRepositoryFactory.d.ts +9 -0
- package/components/Table/components/Table/Columns/ColumnsRepositoryFactory.js +21 -0
- package/components/Table/components/Table/Columns/ColumnsRepositoryFactory.js.map +1 -0
- package/components/Table/components/Table/Columns/IColumnsRepository.d.ts +5 -0
- package/components/Table/components/Table/Columns/IColumnsRepository.js +0 -0
- package/components/Table/components/Table/Columns/index.d.ts +6 -0
- package/components/Table/components/Table/Columns/index.js +5 -0
- package/components/Table/components/Table/Table.d.ts +17 -0
- package/components/Table/components/Table/Table.js +47 -0
- package/components/Table/components/Table/Table.js.map +1 -0
- package/components/Table/components/Table/TableInner.d.ts +24 -0
- package/components/Table/components/Table/TableInner.js +40 -0
- package/components/Table/components/Table/TableInner.js.map +1 -0
- package/components/Table/components/Table/TablePresenter.d.ts +15 -0
- package/components/Table/components/Table/TablePresenter.js +15 -0
- package/components/Table/components/Table/TablePresenter.js.map +1 -0
- package/components/Table/components/Table/gateways/ColumnsVisibilityLocalStorageGateway.d.ts +9 -0
- package/components/Table/components/Table/gateways/ColumnsVisibilityLocalStorageGateway.js +15 -0
- package/components/Table/components/Table/gateways/ColumnsVisibilityLocalStorageGateway.js.map +1 -0
- package/components/Table/components/Table/gateways/IColumnsVisibilityGateway.d.ts +4 -0
- package/components/Table/components/Table/gateways/IColumnsVisibilityGateway.js +0 -0
- package/components/Table/components/Table/gateways/index.d.ts +2 -0
- package/components/Table/components/Table/gateways/index.js +1 -0
- package/components/Table/components/Table/index.d.ts +1 -0
- package/components/Table/components/Table/index.js +1 -0
- package/components/Table/components/index.d.ts +1 -0
- package/components/Table/components/index.js +1 -0
- package/components/Table/createTableData.d.ts +5 -0
- package/components/Table/createTableData.js +9 -0
- package/components/Table/createTableData.js.map +1 -0
- package/components/Table/index.d.ts +5 -0
- package/components/Table/index.js +5 -0
- package/components/Table/table.types.d.ts +9 -0
- package/components/Table/table.types.js +0 -0
- package/components/Table/useTableRow.d.ts +18 -0
- package/components/Table/useTableRow.js +22 -0
- package/components/Table/useTableRow.js.map +1 -0
- package/components/TeamAutocomplete/index.d.ts +3 -1
- package/components/TeamAutocomplete/index.js +13 -14
- package/components/TeamAutocomplete/index.js.map +1 -1
- package/components/TeamsMultiAutocomplete/index.d.ts +3 -1
- package/components/TeamsMultiAutocomplete/index.js +24 -14
- package/components/TeamsMultiAutocomplete/index.js.map +1 -1
- package/components/index.d.ts +3 -2
- package/components/index.js +3 -2
- package/config/AdminConfig/Dashboard.d.ts +2 -1
- package/config/AdminConfig/Form.d.ts +4 -2
- package/config/AdminConfig/LexicalTheme/Typography.d.ts +4 -4
- package/config/AdminConfig/LexicalTheme.d.ts +6 -6
- package/config/AdminConfig/LexicalTheme.js +0 -2
- package/config/AdminConfig/LexicalTheme.js.map +1 -1
- package/config/AdminConfig/Logo.d.ts +8 -6
- package/config/AdminConfig/Menu/MenuGroup.d.ts +13 -12
- package/config/AdminConfig/Menu/MenuItem.d.ts +7 -6
- package/config/AdminConfig/Menu/MenuLink.d.ts +7 -6
- package/config/AdminConfig/Menu/SupportMenu/SupportMenuItem.d.ts +13 -12
- package/config/AdminConfig/Menu/SupportMenu/SupportMenuLink.d.ts +7 -6
- package/config/AdminConfig/Menu/SupportMenu.d.ts +8 -6
- package/config/AdminConfig/Menu/UserMenu.d.ts +8 -6
- package/config/AdminConfig/Menu.d.ts +15 -12
- package/config/AdminConfig/Security.d.ts +2 -1
- package/config/AdminConfig/SecurityPermissions.js +2 -1
- package/config/AdminConfig/SecurityPermissions.js.map +1 -1
- package/config/AdminConfig/Tenant/TenantLogo.d.ts +8 -6
- package/config/AdminConfig/Tenant/TenantName.d.ts +8 -6
- package/config/AdminConfig/Tenant.d.ts +3 -1
- package/config/AdminConfig/Title.d.ts +8 -6
- package/config/AdminConfig.d.ts +16 -30
- package/config/AdminConfig.js +1 -2
- package/config/AdminConfig.js.map +1 -1
- package/config/table/Column.d.ts +34 -0
- package/config/table/Column.js +69 -0
- package/config/table/Column.js.map +1 -0
- package/config/table/Sorting.d.ts +11 -0
- package/config/table/Sorting.js +28 -0
- package/config/table/Sorting.js.map +1 -0
- package/config/table/index.d.ts +13 -0
- package/config/table/index.js +9 -0
- package/config/table/index.js.map +1 -0
- package/domain/securityPermissionsSchema.d.ts +20 -0
- package/domain/securityPermissionsSchema.js +34 -0
- package/domain/securityPermissionsSchema.js.map +1 -0
- package/errors/ErrorOverlayNetworkErrorHandler.js +4 -4
- package/errors/ErrorOverlayNetworkErrorHandler.js.map +1 -1
- package/exports/admin/form.d.ts +2 -0
- package/exports/admin/form.js +1 -0
- package/exports/admin/ui.d.ts +4 -0
- package/exports/admin/ui.js +2 -1
- package/exports/admin.d.ts +1 -0
- package/exports/admin.js +1 -0
- package/features/accessManagement/apiKeys/createApiKey/CreateApiKeyGateway.d.ts +12 -0
- package/features/accessManagement/apiKeys/createApiKey/CreateApiKeyGateway.js +50 -0
- package/features/accessManagement/apiKeys/createApiKey/CreateApiKeyGateway.js.map +1 -0
- package/features/accessManagement/apiKeys/createApiKey/CreateApiKeyRepository.d.ts +13 -0
- package/features/accessManagement/apiKeys/createApiKey/CreateApiKeyRepository.js +25 -0
- package/features/accessManagement/apiKeys/createApiKey/CreateApiKeyRepository.js.map +1 -0
- package/features/accessManagement/apiKeys/createApiKey/CreateApiKeyUseCase.d.ts +11 -0
- package/features/accessManagement/apiKeys/createApiKey/CreateApiKeyUseCase.js +18 -0
- package/features/accessManagement/apiKeys/createApiKey/CreateApiKeyUseCase.js.map +1 -0
- package/features/accessManagement/apiKeys/createApiKey/abstractions.d.ts +29 -0
- package/features/accessManagement/apiKeys/createApiKey/abstractions.js +7 -0
- package/features/accessManagement/apiKeys/createApiKey/abstractions.js.map +1 -0
- package/features/accessManagement/apiKeys/createApiKey/feature.d.ts +3 -0
- package/features/accessManagement/apiKeys/createApiKey/feature.js +21 -0
- package/features/accessManagement/apiKeys/createApiKey/feature.js.map +1 -0
- package/features/accessManagement/apiKeys/createApiKey/index.d.ts +3 -0
- package/features/accessManagement/apiKeys/createApiKey/index.js +2 -0
- package/features/accessManagement/apiKeys/deleteApiKey/DeleteApiKeyGateway.d.ts +11 -0
- package/features/accessManagement/apiKeys/deleteApiKey/DeleteApiKeyGateway.js +39 -0
- package/features/accessManagement/apiKeys/deleteApiKey/DeleteApiKeyGateway.js.map +1 -0
- package/features/accessManagement/apiKeys/deleteApiKey/DeleteApiKeyRepository.d.ts +12 -0
- package/features/accessManagement/apiKeys/deleteApiKey/DeleteApiKeyRepository.js +22 -0
- package/features/accessManagement/apiKeys/deleteApiKey/DeleteApiKeyRepository.js.map +1 -0
- package/features/accessManagement/apiKeys/deleteApiKey/DeleteApiKeyUseCase.d.ts +10 -0
- package/features/accessManagement/apiKeys/deleteApiKey/DeleteApiKeyUseCase.js +18 -0
- package/features/accessManagement/apiKeys/deleteApiKey/DeleteApiKeyUseCase.js.map +1 -0
- package/features/accessManagement/apiKeys/deleteApiKey/abstractions.d.ts +21 -0
- package/features/accessManagement/apiKeys/deleteApiKey/abstractions.js +7 -0
- package/features/accessManagement/apiKeys/deleteApiKey/abstractions.js.map +1 -0
- package/features/accessManagement/apiKeys/deleteApiKey/feature.d.ts +3 -0
- package/features/accessManagement/apiKeys/deleteApiKey/feature.js +21 -0
- package/features/accessManagement/apiKeys/deleteApiKey/feature.js.map +1 -0
- package/features/accessManagement/apiKeys/deleteApiKey/index.d.ts +3 -0
- package/features/accessManagement/apiKeys/deleteApiKey/index.js +2 -0
- package/features/accessManagement/apiKeys/getApiKey/GetApiKeyGateway.d.ts +12 -0
- package/features/accessManagement/apiKeys/getApiKey/GetApiKeyGateway.js +49 -0
- package/features/accessManagement/apiKeys/getApiKey/GetApiKeyGateway.js.map +1 -0
- package/features/accessManagement/apiKeys/getApiKey/GetApiKeyRepository.d.ts +11 -0
- package/features/accessManagement/apiKeys/getApiKey/GetApiKeyRepository.js +18 -0
- package/features/accessManagement/apiKeys/getApiKey/GetApiKeyRepository.js.map +1 -0
- package/features/accessManagement/apiKeys/getApiKey/GetApiKeyUseCase.d.ts +11 -0
- package/features/accessManagement/apiKeys/getApiKey/GetApiKeyUseCase.js +18 -0
- package/features/accessManagement/apiKeys/getApiKey/GetApiKeyUseCase.js.map +1 -0
- package/features/accessManagement/apiKeys/getApiKey/abstractions.d.ts +22 -0
- package/features/accessManagement/apiKeys/getApiKey/abstractions.js +7 -0
- package/features/accessManagement/apiKeys/getApiKey/abstractions.js.map +1 -0
- package/features/accessManagement/apiKeys/getApiKey/feature.d.ts +3 -0
- package/features/accessManagement/apiKeys/getApiKey/feature.js +21 -0
- package/features/accessManagement/apiKeys/getApiKey/feature.js.map +1 -0
- package/features/accessManagement/apiKeys/getApiKey/index.d.ts +3 -0
- package/features/accessManagement/apiKeys/getApiKey/index.js +2 -0
- package/features/accessManagement/apiKeys/listApiKeys/ListApiKeysGateway.d.ts +11 -0
- package/features/accessManagement/apiKeys/listApiKeys/ListApiKeysGateway.js +44 -0
- package/features/accessManagement/apiKeys/listApiKeys/ListApiKeysGateway.js.map +1 -0
- package/features/accessManagement/apiKeys/listApiKeys/ListApiKeysRepository.d.ts +11 -0
- package/features/accessManagement/apiKeys/listApiKeys/ListApiKeysRepository.js +22 -0
- package/features/accessManagement/apiKeys/listApiKeys/ListApiKeysRepository.js.map +1 -0
- package/features/accessManagement/apiKeys/listApiKeys/ListApiKeysUseCase.d.ts +10 -0
- package/features/accessManagement/apiKeys/listApiKeys/ListApiKeysUseCase.js +18 -0
- package/features/accessManagement/apiKeys/listApiKeys/ListApiKeysUseCase.js.map +1 -0
- package/features/accessManagement/apiKeys/listApiKeys/abstractions.d.ts +30 -0
- package/features/accessManagement/apiKeys/listApiKeys/abstractions.js +8 -0
- package/features/accessManagement/apiKeys/listApiKeys/abstractions.js.map +1 -0
- package/features/accessManagement/apiKeys/listApiKeys/feature.d.ts +3 -0
- package/features/accessManagement/apiKeys/listApiKeys/feature.js +23 -0
- package/features/accessManagement/apiKeys/listApiKeys/feature.js.map +1 -0
- package/features/accessManagement/apiKeys/listApiKeys/index.d.ts +3 -0
- package/features/accessManagement/apiKeys/listApiKeys/index.js +2 -0
- package/features/accessManagement/apiKeys/updateApiKey/UpdateApiKeyGateway.d.ts +12 -0
- package/features/accessManagement/apiKeys/updateApiKey/UpdateApiKeyGateway.js +51 -0
- package/features/accessManagement/apiKeys/updateApiKey/UpdateApiKeyGateway.js.map +1 -0
- package/features/accessManagement/apiKeys/updateApiKey/UpdateApiKeyRepository.d.ts +13 -0
- package/features/accessManagement/apiKeys/updateApiKey/UpdateApiKeyRepository.js +23 -0
- package/features/accessManagement/apiKeys/updateApiKey/UpdateApiKeyRepository.js.map +1 -0
- package/features/accessManagement/apiKeys/updateApiKey/UpdateApiKeyUseCase.d.ts +11 -0
- package/features/accessManagement/apiKeys/updateApiKey/UpdateApiKeyUseCase.js +18 -0
- package/features/accessManagement/apiKeys/updateApiKey/UpdateApiKeyUseCase.js.map +1 -0
- package/features/accessManagement/apiKeys/updateApiKey/abstractions.d.ts +28 -0
- package/features/accessManagement/apiKeys/updateApiKey/abstractions.js +7 -0
- package/features/accessManagement/apiKeys/updateApiKey/abstractions.js.map +1 -0
- package/features/accessManagement/apiKeys/updateApiKey/feature.d.ts +3 -0
- package/features/accessManagement/apiKeys/updateApiKey/feature.js +21 -0
- package/features/accessManagement/apiKeys/updateApiKey/feature.js.map +1 -0
- package/features/accessManagement/apiKeys/updateApiKey/index.d.ts +3 -0
- package/features/accessManagement/apiKeys/updateApiKey/index.js +2 -0
- package/features/accessManagement/constants.d.ts +5 -0
- package/features/accessManagement/constants.js +9 -0
- package/features/accessManagement/constants.js.map +1 -0
- package/features/accessManagement/permissions/abstractions.d.ts +17 -0
- package/features/accessManagement/permissions/abstractions.js +6 -0
- package/features/accessManagement/permissions/abstractions.js.map +1 -0
- package/features/accessManagement/permissions/feature.d.ts +14 -0
- package/features/accessManagement/permissions/feature.js +7 -0
- package/features/accessManagement/permissions/feature.js.map +1 -0
- package/features/accessManagement/roles/createRole/CreateRoleGateway.d.ts +12 -0
- package/features/accessManagement/roles/createRole/CreateRoleGateway.js +51 -0
- package/features/accessManagement/roles/createRole/CreateRoleGateway.js.map +1 -0
- package/features/accessManagement/roles/createRole/CreateRoleRepository.d.ts +13 -0
- package/features/accessManagement/roles/createRole/CreateRoleRepository.js +25 -0
- package/features/accessManagement/roles/createRole/CreateRoleRepository.js.map +1 -0
- package/features/accessManagement/roles/createRole/CreateRoleUseCase.d.ts +11 -0
- package/features/accessManagement/roles/createRole/CreateRoleUseCase.js +18 -0
- package/features/accessManagement/roles/createRole/CreateRoleUseCase.js.map +1 -0
- package/features/accessManagement/roles/createRole/abstractions.d.ts +29 -0
- package/features/accessManagement/roles/createRole/abstractions.js +7 -0
- package/features/accessManagement/roles/createRole/abstractions.js.map +1 -0
- package/features/accessManagement/roles/createRole/feature.d.ts +3 -0
- package/features/accessManagement/roles/createRole/feature.js +21 -0
- package/features/accessManagement/roles/createRole/feature.js.map +1 -0
- package/features/accessManagement/roles/createRole/index.d.ts +3 -0
- package/features/accessManagement/roles/createRole/index.js +2 -0
- package/features/accessManagement/roles/deleteRole/DeleteRoleGateway.d.ts +11 -0
- package/features/accessManagement/roles/deleteRole/DeleteRoleGateway.js +40 -0
- package/features/accessManagement/roles/deleteRole/DeleteRoleGateway.js.map +1 -0
- package/features/accessManagement/roles/deleteRole/DeleteRoleRepository.d.ts +12 -0
- package/features/accessManagement/roles/deleteRole/DeleteRoleRepository.js +22 -0
- package/features/accessManagement/roles/deleteRole/DeleteRoleRepository.js.map +1 -0
- package/features/accessManagement/roles/deleteRole/DeleteRoleUseCase.d.ts +10 -0
- package/features/accessManagement/roles/deleteRole/DeleteRoleUseCase.js +18 -0
- package/features/accessManagement/roles/deleteRole/DeleteRoleUseCase.js.map +1 -0
- package/features/accessManagement/roles/deleteRole/abstractions.d.ts +21 -0
- package/features/accessManagement/roles/deleteRole/abstractions.js +7 -0
- package/features/accessManagement/roles/deleteRole/abstractions.js.map +1 -0
- package/features/accessManagement/roles/deleteRole/feature.d.ts +3 -0
- package/features/accessManagement/roles/deleteRole/feature.js +21 -0
- package/features/accessManagement/roles/deleteRole/feature.js.map +1 -0
- package/features/accessManagement/roles/deleteRole/index.d.ts +3 -0
- package/features/accessManagement/roles/deleteRole/index.js +2 -0
- package/features/accessManagement/roles/getRole/GetRoleGateway.d.ts +12 -0
- package/features/accessManagement/roles/getRole/GetRoleGateway.js +50 -0
- package/features/accessManagement/roles/getRole/GetRoleGateway.js.map +1 -0
- package/features/accessManagement/roles/getRole/GetRoleRepository.d.ts +11 -0
- package/features/accessManagement/roles/getRole/GetRoleRepository.js +18 -0
- package/features/accessManagement/roles/getRole/GetRoleRepository.js.map +1 -0
- package/features/accessManagement/roles/getRole/GetRoleUseCase.d.ts +11 -0
- package/features/accessManagement/roles/getRole/GetRoleUseCase.js +18 -0
- package/features/accessManagement/roles/getRole/GetRoleUseCase.js.map +1 -0
- package/features/accessManagement/roles/getRole/abstractions.d.ts +22 -0
- package/features/accessManagement/roles/getRole/abstractions.js +7 -0
- package/features/accessManagement/roles/getRole/abstractions.js.map +1 -0
- package/features/accessManagement/roles/getRole/feature.d.ts +3 -0
- package/features/accessManagement/roles/getRole/feature.js +21 -0
- package/features/accessManagement/roles/getRole/feature.js.map +1 -0
- package/features/accessManagement/roles/getRole/index.d.ts +3 -0
- package/features/accessManagement/roles/getRole/index.js +2 -0
- package/features/accessManagement/roles/listRoles/ListRolesGateway.d.ts +11 -0
- package/features/accessManagement/roles/listRoles/ListRolesGateway.js +45 -0
- package/features/accessManagement/roles/listRoles/ListRolesGateway.js.map +1 -0
- package/features/accessManagement/roles/listRoles/ListRolesRepository.d.ts +11 -0
- package/features/accessManagement/roles/listRoles/ListRolesRepository.js +22 -0
- package/features/accessManagement/roles/listRoles/ListRolesRepository.js.map +1 -0
- package/features/accessManagement/roles/listRoles/ListRolesUseCase.d.ts +10 -0
- package/features/accessManagement/roles/listRoles/ListRolesUseCase.js +18 -0
- package/features/accessManagement/roles/listRoles/ListRolesUseCase.js.map +1 -0
- package/features/accessManagement/roles/listRoles/abstractions.d.ts +30 -0
- package/features/accessManagement/roles/listRoles/abstractions.js +8 -0
- package/features/accessManagement/roles/listRoles/abstractions.js.map +1 -0
- package/features/accessManagement/roles/listRoles/feature.d.ts +3 -0
- package/features/accessManagement/roles/listRoles/feature.js +23 -0
- package/features/accessManagement/roles/listRoles/feature.js.map +1 -0
- package/features/accessManagement/roles/listRoles/index.d.ts +3 -0
- package/features/accessManagement/roles/listRoles/index.js +2 -0
- package/features/accessManagement/roles/updateRole/UpdateRoleGateway.d.ts +12 -0
- package/features/accessManagement/roles/updateRole/UpdateRoleGateway.js +52 -0
- package/features/accessManagement/roles/updateRole/UpdateRoleGateway.js.map +1 -0
- package/features/accessManagement/roles/updateRole/UpdateRoleRepository.d.ts +13 -0
- package/features/accessManagement/roles/updateRole/UpdateRoleRepository.js +23 -0
- package/features/accessManagement/roles/updateRole/UpdateRoleRepository.js.map +1 -0
- package/features/accessManagement/roles/updateRole/UpdateRoleUseCase.d.ts +11 -0
- package/features/accessManagement/roles/updateRole/UpdateRoleUseCase.js +18 -0
- package/features/accessManagement/roles/updateRole/UpdateRoleUseCase.js.map +1 -0
- package/features/accessManagement/roles/updateRole/abstractions.d.ts +28 -0
- package/features/accessManagement/roles/updateRole/abstractions.js +7 -0
- package/features/accessManagement/roles/updateRole/abstractions.js.map +1 -0
- package/features/accessManagement/roles/updateRole/feature.d.ts +3 -0
- package/features/accessManagement/roles/updateRole/feature.js +21 -0
- package/features/accessManagement/roles/updateRole/feature.js.map +1 -0
- package/features/accessManagement/roles/updateRole/index.d.ts +3 -0
- package/features/accessManagement/roles/updateRole/index.js +2 -0
- package/features/accessManagement/teams/createTeam/CreateTeamGateway.d.ts +12 -0
- package/features/accessManagement/teams/createTeam/CreateTeamGateway.js +55 -0
- package/features/accessManagement/teams/createTeam/CreateTeamGateway.js.map +1 -0
- package/features/accessManagement/teams/createTeam/CreateTeamRepository.d.ts +13 -0
- package/features/accessManagement/teams/createTeam/CreateTeamRepository.js +25 -0
- package/features/accessManagement/teams/createTeam/CreateTeamRepository.js.map +1 -0
- package/features/accessManagement/teams/createTeam/CreateTeamUseCase.d.ts +11 -0
- package/features/accessManagement/teams/createTeam/CreateTeamUseCase.js +18 -0
- package/features/accessManagement/teams/createTeam/CreateTeamUseCase.js.map +1 -0
- package/features/accessManagement/teams/createTeam/abstractions.d.ts +28 -0
- package/features/accessManagement/teams/createTeam/abstractions.js +7 -0
- package/features/accessManagement/teams/createTeam/abstractions.js.map +1 -0
- package/features/accessManagement/teams/createTeam/feature.d.ts +3 -0
- package/features/accessManagement/teams/createTeam/feature.js +21 -0
- package/features/accessManagement/teams/createTeam/feature.js.map +1 -0
- package/features/accessManagement/teams/createTeam/index.d.ts +3 -0
- package/features/accessManagement/teams/createTeam/index.js +2 -0
- package/features/accessManagement/teams/deleteTeam/DeleteTeamGateway.d.ts +11 -0
- package/features/accessManagement/teams/deleteTeam/DeleteTeamGateway.js +40 -0
- package/features/accessManagement/teams/deleteTeam/DeleteTeamGateway.js.map +1 -0
- package/features/accessManagement/teams/deleteTeam/DeleteTeamRepository.d.ts +12 -0
- package/features/accessManagement/teams/deleteTeam/DeleteTeamRepository.js +22 -0
- package/features/accessManagement/teams/deleteTeam/DeleteTeamRepository.js.map +1 -0
- package/features/accessManagement/teams/deleteTeam/DeleteTeamUseCase.d.ts +10 -0
- package/features/accessManagement/teams/deleteTeam/DeleteTeamUseCase.js +18 -0
- package/features/accessManagement/teams/deleteTeam/DeleteTeamUseCase.js.map +1 -0
- package/features/accessManagement/teams/deleteTeam/abstractions.d.ts +21 -0
- package/features/accessManagement/teams/deleteTeam/abstractions.js +7 -0
- package/features/accessManagement/teams/deleteTeam/abstractions.js.map +1 -0
- package/features/accessManagement/teams/deleteTeam/feature.d.ts +3 -0
- package/features/accessManagement/teams/deleteTeam/feature.js +21 -0
- package/features/accessManagement/teams/deleteTeam/feature.js.map +1 -0
- package/features/accessManagement/teams/deleteTeam/index.d.ts +3 -0
- package/features/accessManagement/teams/deleteTeam/index.js +2 -0
- package/features/accessManagement/teams/getTeam/GetTeamGateway.d.ts +12 -0
- package/features/accessManagement/teams/getTeam/GetTeamGateway.js +54 -0
- package/features/accessManagement/teams/getTeam/GetTeamGateway.js.map +1 -0
- package/features/accessManagement/teams/getTeam/GetTeamRepository.d.ts +11 -0
- package/features/accessManagement/teams/getTeam/GetTeamRepository.js +18 -0
- package/features/accessManagement/teams/getTeam/GetTeamRepository.js.map +1 -0
- package/features/accessManagement/teams/getTeam/GetTeamUseCase.d.ts +11 -0
- package/features/accessManagement/teams/getTeam/GetTeamUseCase.js +18 -0
- package/features/accessManagement/teams/getTeam/GetTeamUseCase.js.map +1 -0
- package/features/accessManagement/teams/getTeam/abstractions.d.ts +22 -0
- package/features/accessManagement/teams/getTeam/abstractions.js +7 -0
- package/features/accessManagement/teams/getTeam/abstractions.js.map +1 -0
- package/features/accessManagement/teams/getTeam/feature.d.ts +3 -0
- package/features/accessManagement/teams/getTeam/feature.js +21 -0
- package/features/accessManagement/teams/getTeam/feature.js.map +1 -0
- package/features/accessManagement/teams/getTeam/index.d.ts +3 -0
- package/features/accessManagement/teams/getTeam/index.js +2 -0
- package/features/accessManagement/teams/listTeams/ListTeamsGateway.d.ts +11 -0
- package/features/accessManagement/teams/listTeams/ListTeamsGateway.js +49 -0
- package/features/accessManagement/teams/listTeams/ListTeamsGateway.js.map +1 -0
- package/features/accessManagement/teams/listTeams/ListTeamsRepository.d.ts +11 -0
- package/features/accessManagement/teams/listTeams/ListTeamsRepository.js +22 -0
- package/features/accessManagement/teams/listTeams/ListTeamsRepository.js.map +1 -0
- package/features/accessManagement/teams/listTeams/ListTeamsUseCase.d.ts +10 -0
- package/features/accessManagement/teams/listTeams/ListTeamsUseCase.js +18 -0
- package/features/accessManagement/teams/listTeams/ListTeamsUseCase.js.map +1 -0
- package/features/accessManagement/teams/listTeams/abstractions.d.ts +30 -0
- package/features/accessManagement/teams/listTeams/abstractions.js +8 -0
- package/features/accessManagement/teams/listTeams/abstractions.js.map +1 -0
- package/features/accessManagement/teams/listTeams/feature.d.ts +3 -0
- package/features/accessManagement/teams/listTeams/feature.js +23 -0
- package/features/accessManagement/teams/listTeams/feature.js.map +1 -0
- package/features/accessManagement/teams/listTeams/index.d.ts +3 -0
- package/features/accessManagement/teams/listTeams/index.js +2 -0
- package/features/accessManagement/teams/updateTeam/UpdateTeamGateway.d.ts +12 -0
- package/features/accessManagement/teams/updateTeam/UpdateTeamGateway.js +56 -0
- package/features/accessManagement/teams/updateTeam/UpdateTeamGateway.js.map +1 -0
- package/features/accessManagement/teams/updateTeam/UpdateTeamRepository.d.ts +13 -0
- package/features/accessManagement/teams/updateTeam/UpdateTeamRepository.js +23 -0
- package/features/accessManagement/teams/updateTeam/UpdateTeamRepository.js.map +1 -0
- package/features/accessManagement/teams/updateTeam/UpdateTeamUseCase.d.ts +11 -0
- package/features/accessManagement/teams/updateTeam/UpdateTeamUseCase.js +18 -0
- package/features/accessManagement/teams/updateTeam/UpdateTeamUseCase.js.map +1 -0
- package/features/accessManagement/teams/updateTeam/abstractions.d.ts +27 -0
- package/features/accessManagement/teams/updateTeam/abstractions.js +7 -0
- package/features/accessManagement/teams/updateTeam/abstractions.js.map +1 -0
- package/features/accessManagement/teams/updateTeam/feature.d.ts +3 -0
- package/features/accessManagement/teams/updateTeam/feature.js +21 -0
- package/features/accessManagement/teams/updateTeam/feature.js.map +1 -0
- package/features/accessManagement/teams/updateTeam/index.d.ts +3 -0
- package/features/accessManagement/teams/updateTeam/index.js +2 -0
- package/features/accessManagement/types.d.ts +34 -0
- package/features/accessManagement/types.js +0 -0
- package/features/clipboard/ClipboardService.d.ts +15 -0
- package/features/clipboard/ClipboardService.js +51 -0
- package/features/clipboard/ClipboardService.js.map +1 -0
- package/features/clipboard/abstractions.d.ts +14 -0
- package/features/clipboard/abstractions.js +5 -0
- package/features/clipboard/abstractions.js.map +1 -0
- package/features/clipboard/feature.d.ts +3 -0
- package/features/clipboard/feature.js +17 -0
- package/features/clipboard/feature.js.map +1 -0
- package/features/clipboard/index.d.ts +2 -0
- package/features/clipboard/index.js +2 -0
- package/features/confirmation/Confirmation.d.ts +11 -0
- package/features/confirmation/Confirmation.js +29 -0
- package/features/confirmation/Confirmation.js.map +1 -0
- package/features/confirmation/ConfirmationBridge.d.ts +1 -0
- package/features/confirmation/ConfirmationBridge.js +20 -0
- package/features/confirmation/ConfirmationBridge.js.map +1 -0
- package/features/confirmation/abstractions.d.ts +15 -0
- package/features/confirmation/abstractions.js +6 -0
- package/features/confirmation/abstractions.js.map +1 -0
- package/features/confirmation/feature.d.ts +1 -0
- package/features/confirmation/feature.js +11 -0
- package/features/confirmation/feature.js.map +1 -0
- package/features/confirmation/index.d.ts +3 -0
- package/features/confirmation/index.js +3 -0
- package/features/formModel/Field.d.ts +5 -5
- package/features/formModel/Field.js +69 -23
- package/features/formModel/Field.js.map +1 -1
- package/features/formModel/FieldBuilder.d.ts +8 -3
- package/features/formModel/FieldBuilder.js +20 -1
- package/features/formModel/FieldBuilder.js.map +1 -1
- package/features/formModel/FormErrors.d.ts +2 -1
- package/features/formModel/FormErrors.js +4 -3
- package/features/formModel/FormErrors.js.map +1 -1
- package/features/formModel/FormModel.d.ts +8 -2
- package/features/formModel/FormModel.js +33 -10
- package/features/formModel/FormModel.js.map +1 -1
- package/features/formModel/FormModel.test.js +248 -53
- package/features/formModel/FormModel.test.js.map +1 -1
- package/features/formModel/FormView.js +25 -6
- package/features/formModel/FormView.js.map +1 -1
- package/features/formModel/LayoutBuilderFactory.d.ts +3 -2
- package/features/formModel/LayoutBuilderFactory.js +58 -5
- package/features/formModel/LayoutBuilderFactory.js.map +1 -1
- package/features/formModel/LayoutMutator.js +6 -0
- package/features/formModel/LayoutMutator.js.map +1 -1
- package/features/formModel/LayoutResolver.d.ts +1 -0
- package/features/formModel/LayoutResolver.js +27 -6
- package/features/formModel/LayoutResolver.js.map +1 -1
- package/features/formModel/ObjectField.d.ts +4 -2
- package/features/formModel/ObjectField.js +43 -3
- package/features/formModel/ObjectField.js.map +1 -1
- package/features/formModel/abstractions.d.ts +86 -19
- package/features/formModel/abstractions.js.map +1 -1
- package/features/formModel/demo/FormModelPhase11Presenter.js +5 -5
- package/features/formModel/demo/FormModelPhase11Presenter.js.map +1 -1
- package/features/formModel/feature.js +4 -1
- package/features/formModel/feature.js.map +1 -1
- package/features/formModel/fieldTypes/ObjectFieldType.js +2 -1
- package/features/formModel/fieldTypes/ObjectFieldType.js.map +1 -1
- package/features/formModel/fieldTypes/PasswordFieldType.d.ts +18 -0
- package/features/formModel/fieldTypes/PasswordFieldType.js +23 -0
- package/features/formModel/fieldTypes/PasswordFieldType.js.map +1 -0
- package/features/formModel/fieldTypes/PermissionsFieldType.d.ts +18 -0
- package/features/formModel/fieldTypes/PermissionsFieldType.js +27 -0
- package/features/formModel/fieldTypes/PermissionsFieldType.js.map +1 -0
- package/features/formModel/fieldTypes/RolesMultiSelectFieldType.d.ts +18 -0
- package/features/formModel/fieldTypes/RolesMultiSelectFieldType.js +24 -0
- package/features/formModel/fieldTypes/RolesMultiSelectFieldType.js.map +1 -0
- package/features/formModel/fieldTypes/index.d.ts +3 -0
- package/features/formModel/fieldTypes/index.js +3 -0
- package/features/formModel/index.d.ts +2 -3
- package/features/formModel/index.js +3 -4
- package/features/formModel/renderers.d.ts +4 -0
- package/features/formModel/renderers.js +4 -0
- package/features/iconPicker/listCustomIcons/ListCustomIconsGateway.d.ts +11 -0
- package/features/iconPicker/listCustomIcons/ListCustomIconsGateway.js +49 -0
- package/features/iconPicker/listCustomIcons/ListCustomIconsGateway.js.map +1 -0
- package/features/iconPicker/listCustomIcons/abstractions.d.ts +12 -0
- package/features/iconPicker/listCustomIcons/abstractions.js +5 -0
- package/features/iconPicker/listCustomIcons/abstractions.js.map +1 -0
- package/features/iconPicker/listCustomIcons/feature.d.ts +1 -0
- package/features/iconPicker/listCustomIcons/feature.js +11 -0
- package/features/iconPicker/listCustomIcons/feature.js.map +1 -0
- package/features/iconPicker/listCustomIcons/index.d.ts +3 -0
- package/features/iconPicker/listCustomIcons/index.js +2 -0
- package/features/listCache/ListCache.d.ts +4 -1
- package/features/listCache/ListCache.js +13 -3
- package/features/listCache/ListCache.js.map +1 -1
- package/features/notifications/Notifications.d.ts +16 -0
- package/features/notifications/Notifications.js +39 -0
- package/features/notifications/Notifications.js.map +1 -0
- package/features/notifications/NotificationsPresenter.d.ts +11 -0
- package/features/notifications/NotificationsPresenter.js +27 -0
- package/features/notifications/NotificationsPresenter.js.map +1 -0
- package/features/notifications/NotificationsRenderer.d.ts +7 -0
- package/features/notifications/NotificationsRenderer.js +38 -0
- package/features/notifications/NotificationsRenderer.js.map +1 -0
- package/features/notifications/abstractions.d.ts +38 -0
- package/features/notifications/abstractions.js +6 -0
- package/features/notifications/abstractions.js.map +1 -0
- package/features/notifications/feature.d.ts +4 -0
- package/features/notifications/feature.js +20 -0
- package/features/notifications/feature.js.map +1 -0
- package/features/notifications/index.d.ts +3 -0
- package/features/notifications/index.js +3 -0
- package/features/webinySdk/WebinySdk.d.ts +2 -1
- package/features/webinySdk/WebinySdk.js.map +1 -1
- package/hooks/index.d.ts +1 -0
- package/hooks/index.js +1 -0
- package/hooks/useNamedConfirmationDialog.d.ts +9 -0
- package/hooks/useNamedConfirmationDialog.js +20 -0
- package/hooks/useNamedConfirmationDialog.js.map +1 -0
- package/index.d.ts +34 -1
- package/index.js +39 -8
- package/modules/AccessManagementExtension.d.ts +2 -0
- package/modules/AccessManagementExtension.js +151 -0
- package/modules/AccessManagementExtension.js.map +1 -0
- package/package.json +29 -37
- package/permissions/createPermissions.js.map +1 -1
- package/presentation/accessManagement/SecurityPermissions.d.ts +2 -0
- package/presentation/accessManagement/SecurityPermissions.js +54 -0
- package/presentation/accessManagement/SecurityPermissions.js.map +1 -0
- package/presentation/accessManagement/apiKeys/ApiKeysDataSource.d.ts +13 -0
- package/presentation/accessManagement/apiKeys/ApiKeysDataSource.js +23 -0
- package/presentation/accessManagement/apiKeys/ApiKeysDataSource.js.map +1 -0
- package/presentation/accessManagement/apiKeys/ApiKeysPresenter.d.ts +38 -0
- package/presentation/accessManagement/apiKeys/ApiKeysPresenter.js +193 -0
- package/presentation/accessManagement/apiKeys/ApiKeysPresenter.js.map +1 -0
- package/presentation/accessManagement/apiKeys/abstractions.d.ts +25 -0
- package/presentation/accessManagement/apiKeys/abstractions.js +5 -0
- package/presentation/accessManagement/apiKeys/abstractions.js.map +1 -0
- package/presentation/accessManagement/apiKeys/components/ApiKeysView.d.ts +4 -0
- package/presentation/accessManagement/apiKeys/components/ApiKeysView.js +234 -0
- package/presentation/accessManagement/apiKeys/components/ApiKeysView.js.map +1 -0
- package/presentation/accessManagement/apiKeys/feature.d.ts +3 -0
- package/presentation/accessManagement/apiKeys/feature.js +17 -0
- package/presentation/accessManagement/apiKeys/feature.js.map +1 -0
- package/presentation/accessManagement/roles/RolesDataSource.d.ts +13 -0
- package/presentation/accessManagement/roles/RolesDataSource.js +23 -0
- package/presentation/accessManagement/roles/RolesDataSource.js.map +1 -0
- package/presentation/accessManagement/roles/RolesPresenter.d.ts +38 -0
- package/presentation/accessManagement/roles/RolesPresenter.js +201 -0
- package/presentation/accessManagement/roles/RolesPresenter.js.map +1 -0
- package/presentation/accessManagement/roles/abstractions.d.ts +27 -0
- package/presentation/accessManagement/roles/abstractions.js +5 -0
- package/presentation/accessManagement/roles/abstractions.js.map +1 -0
- package/presentation/accessManagement/roles/components/RolesView.d.ts +4 -0
- package/presentation/accessManagement/roles/components/RolesView.js +232 -0
- package/presentation/accessManagement/roles/components/RolesView.js.map +1 -0
- package/presentation/accessManagement/roles/feature.d.ts +3 -0
- package/presentation/accessManagement/roles/feature.js +17 -0
- package/presentation/accessManagement/roles/feature.js.map +1 -0
- package/presentation/accessManagement/roles/rolesAutocomplete/RolesAutocompletePresenter.d.ts +15 -0
- package/presentation/accessManagement/roles/rolesAutocomplete/RolesAutocompletePresenter.js +42 -0
- package/presentation/accessManagement/roles/rolesAutocomplete/RolesAutocompletePresenter.js.map +1 -0
- package/presentation/accessManagement/roles/rolesAutocomplete/abstractions.d.ts +18 -0
- package/presentation/accessManagement/roles/rolesAutocomplete/abstractions.js +5 -0
- package/presentation/accessManagement/roles/rolesAutocomplete/abstractions.js.map +1 -0
- package/presentation/accessManagement/roles/rolesAutocomplete/feature.d.ts +3 -0
- package/presentation/accessManagement/roles/rolesAutocomplete/feature.js +17 -0
- package/presentation/accessManagement/roles/rolesAutocomplete/feature.js.map +1 -0
- package/presentation/accessManagement/roles/rolesAutocomplete/index.d.ts +3 -0
- package/presentation/accessManagement/roles/rolesAutocomplete/index.js +2 -0
- package/presentation/accessManagement/routes.d.ts +21 -0
- package/presentation/accessManagement/routes.js +36 -0
- package/presentation/accessManagement/routes.js.map +1 -0
- package/presentation/accessManagement/teams/TeamsDataSource.d.ts +13 -0
- package/presentation/accessManagement/teams/TeamsDataSource.js +23 -0
- package/presentation/accessManagement/teams/TeamsDataSource.js.map +1 -0
- package/presentation/accessManagement/teams/TeamsPresenter.d.ts +39 -0
- package/presentation/accessManagement/teams/TeamsPresenter.js +200 -0
- package/presentation/accessManagement/teams/TeamsPresenter.js.map +1 -0
- package/presentation/accessManagement/teams/abstractions.d.ts +26 -0
- package/presentation/accessManagement/teams/abstractions.js +5 -0
- package/presentation/accessManagement/teams/abstractions.js.map +1 -0
- package/presentation/accessManagement/teams/components/TeamsView.d.ts +4 -0
- package/presentation/accessManagement/teams/components/TeamsView.js +214 -0
- package/presentation/accessManagement/teams/components/TeamsView.js.map +1 -0
- package/presentation/accessManagement/teams/feature.d.ts +3 -0
- package/presentation/accessManagement/teams/feature.js +17 -0
- package/presentation/accessManagement/teams/feature.js.map +1 -0
- package/presentation/accessManagement/teams/teamsAutocomplete/TeamsAutocompletePresenter.d.ts +15 -0
- package/presentation/accessManagement/teams/teamsAutocomplete/TeamsAutocompletePresenter.js +42 -0
- package/presentation/accessManagement/teams/teamsAutocomplete/TeamsAutocompletePresenter.js.map +1 -0
- package/presentation/accessManagement/teams/teamsAutocomplete/abstractions.d.ts +18 -0
- package/presentation/accessManagement/teams/teamsAutocomplete/abstractions.js +5 -0
- package/presentation/accessManagement/teams/teamsAutocomplete/abstractions.js.map +1 -0
- package/presentation/accessManagement/teams/teamsAutocomplete/feature.d.ts +3 -0
- package/presentation/accessManagement/teams/teamsAutocomplete/feature.js +17 -0
- package/presentation/accessManagement/teams/teamsAutocomplete/feature.js.map +1 -0
- package/presentation/accessManagement/teams/teamsAutocomplete/index.d.ts +3 -0
- package/presentation/accessManagement/teams/teamsAutocomplete/index.js +2 -0
- package/presentation/iconPicker/customIcons/CustomIconsPresenter.d.ts +16 -0
- package/presentation/iconPicker/customIcons/CustomIconsPresenter.js +40 -0
- package/presentation/iconPicker/customIcons/CustomIconsPresenter.js.map +1 -0
- package/presentation/iconPicker/customIcons/abstractions.d.ts +14 -0
- package/presentation/iconPicker/customIcons/abstractions.js +5 -0
- package/presentation/iconPicker/customIcons/abstractions.js.map +1 -0
- package/presentation/iconPicker/customIcons/feature.d.ts +3 -0
- package/presentation/iconPicker/customIcons/feature.js +17 -0
- package/presentation/iconPicker/customIcons/feature.js.map +1 -0
- package/presentation/iconPicker/customIcons/index.d.ts +3 -0
- package/presentation/iconPicker/customIcons/index.js +2 -0
- package/presentation/installation/components/SystemInstaller/SystemInstaller.js +3 -1
- package/presentation/installation/components/SystemInstaller/SystemInstaller.js.map +1 -1
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/createPasswordValidator.d.ts +1 -1
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/createPasswordValidator.js +1 -1
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/createPasswordValidator.js.map +1 -1
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep.js +5 -4
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep.js.map +1 -1
- package/presentation/installation/components/SystemInstaller/steps/FinishSetup.js +1 -1
- package/presentation/installation/components/SystemInstaller/steps/FinishSetup.js.map +1 -1
- package/presentation/installation/presenters/SystemInstaller/SystemInstallerPresenter.js +7 -5
- package/presentation/installation/presenters/SystemInstaller/SystemInstallerPresenter.js.map +1 -1
- package/presentation/listPresenter/FolderAwareDataSource.d.ts +50 -0
- package/presentation/listPresenter/FolderAwareDataSource.js +132 -0
- package/presentation/listPresenter/FolderAwareDataSource.js.map +1 -0
- package/presentation/listPresenter/ListPresenter.d.ts +4 -0
- package/presentation/listPresenter/ListPresenter.js +30 -4
- package/presentation/listPresenter/ListPresenter.js.map +1 -1
- package/presentation/listPresenter/QueryMatcher.d.ts +56 -0
- package/presentation/listPresenter/QueryMatcher.js +59 -0
- package/presentation/listPresenter/QueryMatcher.js.map +1 -0
- package/presentation/listPresenter/SimpleDataSource.d.ts +15 -0
- package/presentation/listPresenter/SimpleDataSource.js +70 -0
- package/presentation/listPresenter/SimpleDataSource.js.map +1 -0
- package/presentation/listPresenter/abstractions.d.ts +9 -0
- package/presentation/listPresenter/abstractions.js.map +1 -1
- package/presentation/listPresenter/index.d.ts +5 -0
- package/presentation/listPresenter/index.js +3 -0
- package/presentation/security/components/HasPermission.d.ts +1 -1
- package/presentation/tenancy/TenancyProvider.js +0 -4
- package/presentation/tenancy/TenancyProvider.js.map +1 -1
- package/presentation/trashBin/TrashBinDataSource.d.ts +16 -0
- package/presentation/trashBin/TrashBinDataSource.js +82 -0
- package/presentation/trashBin/TrashBinDataSource.js.map +1 -0
- package/presentation/trashBin/TrashBinPresenter.d.ts +20 -0
- package/presentation/trashBin/TrashBinPresenter.js +114 -0
- package/presentation/trashBin/TrashBinPresenter.js.map +1 -0
- package/presentation/trashBin/abstractions.d.ts +105 -0
- package/presentation/trashBin/abstractions.js +9 -0
- package/presentation/trashBin/abstractions.js.map +1 -0
- package/presentation/trashBin/components/Actions/DeleteItemAction.d.ts +2 -0
- package/presentation/trashBin/components/Actions/DeleteItemAction.js +20 -0
- package/presentation/trashBin/components/Actions/DeleteItemAction.js.map +1 -0
- package/presentation/trashBin/components/Actions/RestoreItemAction.d.ts +2 -0
- package/presentation/trashBin/components/Actions/RestoreItemAction.js +19 -0
- package/presentation/trashBin/components/Actions/RestoreItemAction.js.map +1 -0
- package/presentation/trashBin/components/Actions/index.d.ts +2 -0
- package/presentation/trashBin/components/Actions/index.js +2 -0
- package/presentation/trashBin/components/BulkActions/DeleteItems.d.ts +4 -0
- package/presentation/trashBin/components/BulkActions/DeleteItems.js +72 -0
- package/presentation/trashBin/components/BulkActions/DeleteItems.js.map +1 -0
- package/presentation/trashBin/components/BulkActions/RestoreItems.d.ts +4 -0
- package/presentation/trashBin/components/BulkActions/RestoreItems.js +81 -0
- package/presentation/trashBin/components/BulkActions/RestoreItems.js.map +1 -0
- package/presentation/trashBin/components/BulkActions/RestoreItemsReportMessage.d.ts +5 -0
- package/presentation/trashBin/components/BulkActions/RestoreItemsReportMessage.js +12 -0
- package/presentation/trashBin/components/BulkActions/RestoreItemsReportMessage.js.map +1 -0
- package/presentation/trashBin/components/BulkActions/index.d.ts +2 -0
- package/presentation/trashBin/components/BulkActions/index.js +2 -0
- package/presentation/trashBin/components/Cells/CellActions.d.ts +2 -0
- package/presentation/trashBin/components/Cells/CellActions.js +18 -0
- package/presentation/trashBin/components/Cells/CellActions.js.map +1 -0
- package/presentation/trashBin/components/Cells/CellCreatedBy.d.ts +2 -0
- package/presentation/trashBin/components/Cells/CellCreatedBy.js +11 -0
- package/presentation/trashBin/components/Cells/CellCreatedBy.js.map +1 -0
- package/presentation/trashBin/components/Cells/CellDeletedBy.d.ts +2 -0
- package/presentation/trashBin/components/Cells/CellDeletedBy.js +11 -0
- package/presentation/trashBin/components/Cells/CellDeletedBy.js.map +1 -0
- package/presentation/trashBin/components/Cells/CellDeletedOn.d.ts +2 -0
- package/presentation/trashBin/components/Cells/CellDeletedOn.js +14 -0
- package/presentation/trashBin/components/Cells/CellDeletedOn.js.map +1 -0
- package/presentation/trashBin/components/Cells/CellTitle.d.ts +2 -0
- package/presentation/trashBin/components/Cells/CellTitle.js +21 -0
- package/presentation/trashBin/components/Cells/CellTitle.js.map +1 -0
- package/presentation/trashBin/components/Cells/index.d.ts +5 -0
- package/presentation/trashBin/components/Cells/index.js +5 -0
- package/presentation/trashBin/components/TrashBinConfigs.d.ts +2 -0
- package/presentation/trashBin/components/TrashBinConfigs.js +55 -0
- package/presentation/trashBin/components/TrashBinConfigs.js.map +1 -0
- package/presentation/trashBin/components/TrashBinOverlay.d.ts +12 -0
- package/presentation/trashBin/components/TrashBinOverlay.js +139 -0
- package/presentation/trashBin/components/TrashBinOverlay.js.map +1 -0
- package/presentation/trashBin/components/TrashBinTable.d.ts +2 -0
- package/presentation/trashBin/components/TrashBinTable.js +48 -0
- package/presentation/trashBin/components/TrashBinTable.js.map +1 -0
- package/presentation/trashBin/configs/Browser/BulkAction.d.ts +34 -0
- package/presentation/trashBin/configs/Browser/BulkAction.js +59 -0
- package/presentation/trashBin/configs/Browser/BulkAction.js.map +1 -0
- package/presentation/trashBin/configs/Browser/EntryAction.d.ts +18 -0
- package/presentation/trashBin/configs/Browser/EntryAction.js +36 -0
- package/presentation/trashBin/configs/Browser/EntryAction.js.map +1 -0
- package/presentation/trashBin/configs/Browser/Table/Column.d.ts +16 -0
- package/presentation/trashBin/configs/Browser/Table/Column.js +9 -0
- package/presentation/trashBin/configs/Browser/Table/Column.js.map +1 -0
- package/presentation/trashBin/configs/Browser/Table/Sorting.d.ts +5 -0
- package/presentation/trashBin/configs/Browser/Table/Sorting.js +6 -0
- package/presentation/trashBin/configs/Browser/Table/Sorting.js.map +1 -0
- package/presentation/trashBin/configs/Browser/Table/index.d.ts +18 -0
- package/presentation/trashBin/configs/Browser/Table/index.js +9 -0
- package/presentation/trashBin/configs/Browser/Table/index.js.map +1 -0
- package/presentation/trashBin/configs/Browser/index.d.ts +40 -0
- package/presentation/trashBin/configs/Browser/index.js +11 -0
- package/presentation/trashBin/configs/Browser/index.js.map +1 -0
- package/presentation/trashBin/configs/TrashBinListConfig.d.ts +46 -0
- package/presentation/trashBin/configs/TrashBinListConfig.js +43 -0
- package/presentation/trashBin/configs/TrashBinListConfig.js.map +1 -0
- package/presentation/trashBin/configs/index.d.ts +1 -0
- package/presentation/trashBin/configs/index.js +1 -0
- package/presentation/trashBin/feature.d.ts +3 -0
- package/presentation/trashBin/feature.js +17 -0
- package/presentation/trashBin/feature.js.map +1 -0
- package/presentation/trashBin/hooks/index.d.ts +4 -0
- package/presentation/trashBin/hooks/index.js +4 -0
- package/presentation/trashBin/hooks/useDeleteTrashBinItem.d.ts +8 -0
- package/presentation/trashBin/hooks/useDeleteTrashBinItem.js +33 -0
- package/presentation/trashBin/hooks/useDeleteTrashBinItem.js.map +1 -0
- package/presentation/trashBin/hooks/useRestoreTrashBinItem.d.ts +8 -0
- package/presentation/trashBin/hooks/useRestoreTrashBinItem.js +35 -0
- package/presentation/trashBin/hooks/useRestoreTrashBinItem.js.map +1 -0
- package/presentation/trashBin/hooks/useTrashBinItem.d.ts +11 -0
- package/presentation/trashBin/hooks/useTrashBinItem.js +7 -0
- package/presentation/trashBin/hooks/useTrashBinItem.js.map +1 -0
- package/presentation/trashBin/hooks/useTrashBinPresenter.d.ts +13 -0
- package/presentation/trashBin/hooks/useTrashBinPresenter.js +7 -0
- package/presentation/trashBin/hooks/useTrashBinPresenter.js.map +1 -0
- package/presentation/trashBin/index.d.ts +6 -0
- package/presentation/trashBin/index.js +6 -0
- package/base/plugins/AddGraphQLQuerySelection.d.ts +0 -8
- package/base/plugins/AddGraphQLQuerySelection.js +0 -19
- package/base/plugins/AddGraphQLQuerySelection.js.map +0 -1
- package/base/providers/ApolloProvider.d.ts +0 -13
- package/base/providers/ApolloProvider.js +0 -10
- package/base/providers/ApolloProvider.js.map +0 -1
- package/components/IconPicker/plugins/graphql.d.ts +0 -20
- package/components/IconPicker/plugins/graphql.js +0 -22
- package/components/IconPicker/plugins/graphql.js.map +0 -1
- package/components/RoleAutocomplete/graphql.d.ts +0 -1
- package/components/RoleAutocomplete/graphql.js +0 -19
- package/components/RoleAutocomplete/graphql.js.map +0 -1
- package/components/RoleAutocomplete/index.d.ts +0 -7
- package/components/RoleAutocomplete/index.js +0 -26
- package/components/RoleAutocomplete/index.js.map +0 -1
- package/components/RolesMultiAutocomplete/graphql.d.ts +0 -1
- package/components/RolesMultiAutocomplete/graphql.js +0 -24
- package/components/RolesMultiAutocomplete/graphql.js.map +0 -1
- package/components/TeamAutocomplete/graphql.d.ts +0 -1
- package/components/TeamAutocomplete/graphql.js +0 -19
- package/components/TeamAutocomplete/graphql.js.map +0 -1
- package/components/TeamsMultiAutocomplete/graphql.d.ts +0 -1
- package/components/TeamsMultiAutocomplete/graphql.js +0 -24
- package/components/TeamsMultiAutocomplete/graphql.js.map +0 -1
- package/config/AdminConfig/LexicalTheme/AllowCustomColors.d.ts +0 -5
- package/config/AdminConfig/LexicalTheme/AllowCustomColors.js +0 -18
- package/config/AdminConfig/LexicalTheme/AllowCustomColors.js.map +0 -1
- package/features/apolloClient/abstraction.d.ts +0 -5
- package/features/apolloClient/abstraction.js +0 -5
- package/features/apolloClient/abstraction.js.map +0 -1
- package/features/apolloClient/feature.d.ts +0 -2
- package/features/apolloClient/feature.js +0 -31
- package/features/apolloClient/feature.js.map +0 -1
- package/plugins/MenuPlugin.d.ts +0 -37
- package/plugins/MenuPlugin.js +0 -20
- package/plugins/MenuPlugin.js.map +0 -1
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { action, computed, makeObservable, observable, runInAction } from "mobx";
|
|
2
|
+
import { QueryMatcher } from "./QueryMatcher.js";
|
|
3
|
+
class FolderAwareDataSource {
|
|
4
|
+
constructor(config){
|
|
5
|
+
this._meta = {
|
|
6
|
+
cursor: null,
|
|
7
|
+
hasMoreItems: false,
|
|
8
|
+
totalCount: 0
|
|
9
|
+
};
|
|
10
|
+
this._loading = false;
|
|
11
|
+
this._locationField = config.locationField ?? "location";
|
|
12
|
+
this._registeredFilterNames = new Set(config.registeredFilterNames ?? []);
|
|
13
|
+
this._getDescendantFolders = config.getDescendantFolders;
|
|
14
|
+
this._keyField = config.keyField;
|
|
15
|
+
const locationField = this._locationField;
|
|
16
|
+
const localFilters = {
|
|
17
|
+
folderId: (item, value)=>{
|
|
18
|
+
const folderId = value;
|
|
19
|
+
const location = item[locationField];
|
|
20
|
+
const itemFolderId = location?.folderId;
|
|
21
|
+
if (folderId && "root" !== folderId) return itemFolderId === folderId;
|
|
22
|
+
return !itemFolderId || "root" === itemFolderId;
|
|
23
|
+
},
|
|
24
|
+
...config.localFilters
|
|
25
|
+
};
|
|
26
|
+
this.queryMatcher = new QueryMatcher({
|
|
27
|
+
keyField: config.keyField,
|
|
28
|
+
localFilters
|
|
29
|
+
});
|
|
30
|
+
makeObservable(this, {
|
|
31
|
+
_meta: observable,
|
|
32
|
+
_loading: observable,
|
|
33
|
+
meta: computed,
|
|
34
|
+
loading: computed,
|
|
35
|
+
query: action,
|
|
36
|
+
loadMore: action
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
onQueryResult(_data) {}
|
|
40
|
+
onLoadMoreResult(_data) {}
|
|
41
|
+
get meta() {
|
|
42
|
+
return this._meta;
|
|
43
|
+
}
|
|
44
|
+
get loading() {
|
|
45
|
+
return this._loading;
|
|
46
|
+
}
|
|
47
|
+
async query(params) {
|
|
48
|
+
this._loading = true;
|
|
49
|
+
try {
|
|
50
|
+
const result = await this.fetch({
|
|
51
|
+
where: this.buildWhere(params),
|
|
52
|
+
sort: this.buildSort(params),
|
|
53
|
+
search: params.search,
|
|
54
|
+
limit: params.limit,
|
|
55
|
+
after: params.cursor
|
|
56
|
+
});
|
|
57
|
+
runInAction(()=>{
|
|
58
|
+
this.onQueryResult(result.data);
|
|
59
|
+
this.queryMatcher.updateFromQuery(params, result.data.map((item)=>String(item[this._keyField])));
|
|
60
|
+
this._meta = {
|
|
61
|
+
cursor: result.meta.cursor,
|
|
62
|
+
hasMoreItems: result.meta.hasMoreItems,
|
|
63
|
+
totalCount: result.meta.totalCount
|
|
64
|
+
};
|
|
65
|
+
});
|
|
66
|
+
} finally{
|
|
67
|
+
runInAction(()=>{
|
|
68
|
+
this._loading = false;
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
async loadMore(params) {
|
|
73
|
+
if (!this._meta.hasMoreItems || this._loading) return;
|
|
74
|
+
this._loading = true;
|
|
75
|
+
try {
|
|
76
|
+
const result = await this.fetch({
|
|
77
|
+
where: this.buildWhere(params),
|
|
78
|
+
sort: this.buildSort(params),
|
|
79
|
+
search: params.search,
|
|
80
|
+
limit: params.limit,
|
|
81
|
+
after: this._meta.cursor ?? void 0
|
|
82
|
+
});
|
|
83
|
+
runInAction(()=>{
|
|
84
|
+
this.onLoadMoreResult(result.data);
|
|
85
|
+
this.queryMatcher.appendResultKeys(result.data.map((item)=>String(item[this._keyField])));
|
|
86
|
+
this._meta = {
|
|
87
|
+
cursor: result.meta.cursor,
|
|
88
|
+
hasMoreItems: result.meta.hasMoreItems,
|
|
89
|
+
totalCount: result.meta.totalCount
|
|
90
|
+
};
|
|
91
|
+
});
|
|
92
|
+
} finally{
|
|
93
|
+
runInAction(()=>{
|
|
94
|
+
this._loading = false;
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
customizeWhere(_where, _filters) {}
|
|
99
|
+
shouldExpandFolders(_filters) {
|
|
100
|
+
return false;
|
|
101
|
+
}
|
|
102
|
+
buildWhere(params) {
|
|
103
|
+
const where = {};
|
|
104
|
+
const filters = params.filters ?? {};
|
|
105
|
+
const folderId = filters.folderId || "root";
|
|
106
|
+
const isRoot = "root" === folderId;
|
|
107
|
+
const hasAdvancedFilters = Object.keys(filters).some((k)=>"folderId" !== k && !this._registeredFilterNames.has(k));
|
|
108
|
+
const isSearching = !!params.search || hasAdvancedFilters || this.shouldExpandFolders(filters);
|
|
109
|
+
if (isSearching && isRoot) ;
|
|
110
|
+
else if (isSearching && this._getDescendantFolders) {
|
|
111
|
+
const descendants = this._getDescendantFolders.execute(folderId);
|
|
112
|
+
const folderIds = descendants.map((f)=>f.id);
|
|
113
|
+
where[this._locationField] = {
|
|
114
|
+
folderId_in: folderIds
|
|
115
|
+
};
|
|
116
|
+
} else where[this._locationField] = {
|
|
117
|
+
folderId
|
|
118
|
+
};
|
|
119
|
+
for (const [key, value] of Object.entries(filters))if ("folderId" !== key) where[key] = value;
|
|
120
|
+
this.customizeWhere(where, filters);
|
|
121
|
+
return Object.keys(where).length > 0 ? where : void 0;
|
|
122
|
+
}
|
|
123
|
+
buildSort(params) {
|
|
124
|
+
if (!params.sort) return;
|
|
125
|
+
return [
|
|
126
|
+
`${params.sort.field}_${params.sort.direction}`
|
|
127
|
+
];
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
export { FolderAwareDataSource };
|
|
131
|
+
|
|
132
|
+
//# sourceMappingURL=FolderAwareDataSource.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation/listPresenter/FolderAwareDataSource.js","sources":["../../../src/presentation/listPresenter/FolderAwareDataSource.ts"],"sourcesContent":["import { makeObservable, observable, computed, runInAction, action } from \"mobx\";\nimport type { IDataSource, IDataSourceQuery, IDataSourceMeta } from \"./abstractions.js\";\nimport { QueryMatcher } from \"./QueryMatcher.js\";\n\nexport interface FolderAwareDataSourceConfig<TRow> {\n locationField?: string;\n registeredFilterNames?: string[];\n getDescendantFolders?: { execute(folderId: string): { id: string }[] };\n keyField: keyof TRow & string;\n localFilters?: Record<string, (item: TRow, value: unknown) => boolean>;\n}\n\nexport interface FetchParams {\n where?: Record<string, unknown>;\n sort?: string[];\n search?: string;\n limit?: number;\n after?: string;\n}\n\nexport interface FetchResult<TRow> {\n data: TRow[];\n meta: { cursor: string | null; hasMoreItems: boolean; totalCount: number };\n}\n\nexport abstract class FolderAwareDataSource<TRow> implements IDataSource<TRow> {\n private _meta: IDataSourceMeta = { cursor: null, hasMoreItems: false, totalCount: 0 };\n private _loading = false;\n private _locationField: string;\n private _registeredFilterNames: Set<string>;\n private _getDescendantFolders: FolderAwareDataSourceConfig<TRow>[\"getDescendantFolders\"];\n private _keyField: keyof TRow & string;\n protected queryMatcher: QueryMatcher<TRow>;\n\n constructor(config: FolderAwareDataSourceConfig<TRow>) {\n this._locationField = config.locationField ?? \"location\";\n this._registeredFilterNames = new Set(config.registeredFilterNames ?? []);\n this._getDescendantFolders = config.getDescendantFolders;\n this._keyField = config.keyField;\n\n const locationField = this._locationField;\n const localFilters: Record<string, (item: TRow, value: unknown) => boolean> = {\n folderId: (item, value) => {\n const folderId = value as string;\n const location = (item as Record<string, any>)[locationField];\n const itemFolderId = location?.folderId as string | undefined;\n if (folderId && folderId !== \"root\") {\n return itemFolderId === folderId;\n }\n return !itemFolderId || itemFolderId === \"root\";\n },\n ...config.localFilters\n };\n\n this.queryMatcher = new QueryMatcher<TRow>({\n keyField: config.keyField,\n localFilters\n });\n\n makeObservable<FolderAwareDataSource<TRow>, \"_meta\" | \"_loading\">(this, {\n _meta: observable,\n _loading: observable,\n meta: computed,\n loading: computed,\n query: action,\n loadMore: action\n });\n }\n\n abstract get rows(): TRow[];\n\n abstract fetch(params: FetchParams): Promise<FetchResult<TRow>>;\n\n protected onQueryResult(_data: TRow[]): void {}\n\n protected onLoadMoreResult(_data: TRow[]): void {}\n\n get meta(): IDataSourceMeta {\n return this._meta;\n }\n\n get loading(): boolean {\n return this._loading;\n }\n\n async query(params: IDataSourceQuery): Promise<void> {\n this._loading = true;\n\n try {\n const result = await this.fetch({\n where: this.buildWhere(params),\n sort: this.buildSort(params),\n search: params.search,\n limit: params.limit,\n after: params.cursor\n });\n\n runInAction(() => {\n this.onQueryResult(result.data);\n this.queryMatcher.updateFromQuery(\n params,\n result.data.map(item => String(item[this._keyField]))\n );\n this._meta = {\n cursor: result.meta.cursor,\n hasMoreItems: result.meta.hasMoreItems,\n totalCount: result.meta.totalCount\n };\n });\n } finally {\n runInAction(() => {\n this._loading = false;\n });\n }\n }\n\n async loadMore(params: IDataSourceQuery): Promise<void> {\n if (!this._meta.hasMoreItems || this._loading) {\n return;\n }\n\n this._loading = true;\n\n try {\n const result = await this.fetch({\n where: this.buildWhere(params),\n sort: this.buildSort(params),\n search: params.search,\n limit: params.limit,\n after: this._meta.cursor ?? undefined\n });\n\n runInAction(() => {\n this.onLoadMoreResult(result.data);\n this.queryMatcher.appendResultKeys(\n result.data.map(item => String(item[this._keyField]))\n );\n this._meta = {\n cursor: result.meta.cursor,\n hasMoreItems: result.meta.hasMoreItems,\n totalCount: result.meta.totalCount\n };\n });\n } finally {\n runInAction(() => {\n this._loading = false;\n });\n }\n }\n\n protected customizeWhere(\n _where: Record<string, unknown>,\n _filters: Record<string, unknown>\n ): void {}\n\n protected shouldExpandFolders(_filters: Record<string, unknown>): boolean {\n return false;\n }\n\n private buildWhere(params: IDataSourceQuery): Record<string, unknown> | undefined {\n const where: Record<string, unknown> = {};\n const filters = params.filters ?? {};\n const folderId = (filters.folderId as string | undefined) || \"root\";\n const isRoot = folderId === \"root\";\n const hasAdvancedFilters = Object.keys(filters).some(\n k => k !== \"folderId\" && !this._registeredFilterNames.has(k)\n );\n const isSearching =\n !!params.search || hasAdvancedFilters || this.shouldExpandFolders(filters);\n\n if (isSearching && isRoot) {\n // Search/filter from root: no folder filter — search all folders.\n } else if (isSearching && this._getDescendantFolders) {\n const descendants = this._getDescendantFolders.execute(folderId);\n const folderIds = descendants.map(f => f.id);\n where[this._locationField] = { folderId_in: folderIds };\n } else {\n where[this._locationField] = { folderId };\n }\n\n for (const [key, value] of Object.entries(filters)) {\n if (key === \"folderId\") {\n continue;\n }\n where[key] = value;\n }\n\n this.customizeWhere(where, filters);\n\n return Object.keys(where).length > 0 ? where : undefined;\n }\n\n private buildSort(params: IDataSourceQuery): string[] | undefined {\n if (!params.sort) {\n return undefined;\n }\n return [`${params.sort.field}_${params.sort.direction}`];\n }\n}\n"],"names":["FolderAwareDataSource","config","Set","locationField","localFilters","item","value","folderId","location","itemFolderId","QueryMatcher","makeObservable","observable","computed","action","_data","params","result","runInAction","String","undefined","_where","_filters","where","filters","isRoot","hasAdvancedFilters","Object","k","isSearching","descendants","folderIds","f","key"],"mappings":";;AAyBO,MAAeA;IASlB,YAAYC,MAAyC,CAAE;aAR/C,KAAK,GAAoB;YAAE,QAAQ;YAAM,cAAc;YAAO,YAAY;QAAE;aAC5E,QAAQ,GAAG;QAQf,IAAI,CAAC,cAAc,GAAGA,OAAO,aAAa,IAAI;QAC9C,IAAI,CAAC,sBAAsB,GAAG,IAAIC,IAAID,OAAO,qBAAqB,IAAI,EAAE;QACxE,IAAI,CAAC,qBAAqB,GAAGA,OAAO,oBAAoB;QACxD,IAAI,CAAC,SAAS,GAAGA,OAAO,QAAQ;QAEhC,MAAME,gBAAgB,IAAI,CAAC,cAAc;QACzC,MAAMC,eAAwE;YAC1E,UAAU,CAACC,MAAMC;gBACb,MAAMC,WAAWD;gBACjB,MAAME,WAAY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A,KAAoB,CAAC,IAAI,CAAC,sBAAsB,CAAC,GAAG,CAACA;QAE9D,MAAMC,cACF,CAAC,CAACb,OAAO,MAAM,IAAIU,sBAAsB,IAAI,CAAC,mBAAmB,CAACF;QAEtE,IAAIK,eAAeJ;aAEZ,IAAII,eAAe,IAAI,CAAC,qBAAqB,EAAE;YAClD,MAAMC,cAAc,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAACvB;YACvD,MAAMwB,YAAYD,YAAY,GAAG,CAACE,CAAAA,IAAKA,EAAE,EAAE;YAC3CT,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,GAAG;gBAAE,aAAaQ;YAAU;QAC1D,OACIR,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,GAAG;YAAEhB;QAAS;QAG5C,KAAK,MAAM,CAAC0B,KAAK3B,MAAM,IAAIqB,OAAO,OAAO,CAACH,SACtC,IAAIS,AAAQ,eAARA,KAGJV,KAAK,CAACU,IAAI,GAAG3B;QAGjB,IAAI,CAAC,cAAc,CAACiB,OAAOC;QAE3B,OAAOG,OAAO,IAAI,CAACJ,OAAO,MAAM,GAAG,IAAIA,QAAQH;IACnD;IAEQ,UAAUJ,MAAwB,EAAwB;QAC9D,IAAI,CAACA,OAAO,IAAI,EACZ;QAEJ,OAAO;YAAC,GAAGA,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,EAAEA,OAAO,IAAI,CAAC,SAAS,EAAE;SAAC;IAC5D;AACJ"}
|
|
@@ -2,6 +2,7 @@ import { type IListPresenter, type IListPresenterConfig, type IListViewModel, ty
|
|
|
2
2
|
declare class ListPresenterImpl<TRow> implements IListPresenter<TRow> {
|
|
3
3
|
private _sort;
|
|
4
4
|
private _filters;
|
|
5
|
+
private _initialFilterKeys;
|
|
5
6
|
private _search;
|
|
6
7
|
private _selection;
|
|
7
8
|
private _error;
|
|
@@ -13,6 +14,8 @@ declare class ListPresenterImpl<TRow> implements IListPresenter<TRow> {
|
|
|
13
14
|
private _limit;
|
|
14
15
|
private _initialized;
|
|
15
16
|
private _loadingMore;
|
|
17
|
+
private _showingFilters;
|
|
18
|
+
private _itemLabel;
|
|
16
19
|
constructor();
|
|
17
20
|
get vm(): IListViewModel<TRow>;
|
|
18
21
|
actions: IListActions;
|
|
@@ -23,6 +26,7 @@ declare class ListPresenterImpl<TRow> implements IListPresenter<TRow> {
|
|
|
23
26
|
private debouncedRequery;
|
|
24
27
|
private clearDebounce;
|
|
25
28
|
private getRowId;
|
|
29
|
+
private buildSelectionLabel;
|
|
26
30
|
private toListError;
|
|
27
31
|
}
|
|
28
32
|
export declare const ListPresenter: typeof ListPresenterImpl & {
|
|
@@ -5,6 +5,7 @@ class ListPresenterImpl {
|
|
|
5
5
|
constructor(){
|
|
6
6
|
this._sort = null;
|
|
7
7
|
this._filters = {};
|
|
8
|
+
this._initialFilterKeys = new Set();
|
|
8
9
|
this._search = "";
|
|
9
10
|
this._error = null;
|
|
10
11
|
this._appliedQuery = null;
|
|
@@ -15,6 +16,11 @@ class ListPresenterImpl {
|
|
|
15
16
|
this._limit = void 0;
|
|
16
17
|
this._initialized = false;
|
|
17
18
|
this._loadingMore = false;
|
|
19
|
+
this._showingFilters = false;
|
|
20
|
+
this._itemLabel = {
|
|
21
|
+
singular: "item",
|
|
22
|
+
plural: "items"
|
|
23
|
+
};
|
|
18
24
|
this.actions = {
|
|
19
25
|
search: {
|
|
20
26
|
set: (query)=>{
|
|
@@ -64,6 +70,12 @@ class ListPresenterImpl {
|
|
|
64
70
|
clearAll: ()=>{
|
|
65
71
|
this._filters = {};
|
|
66
72
|
this.requery();
|
|
73
|
+
},
|
|
74
|
+
show: ()=>{
|
|
75
|
+
this._showingFilters = true;
|
|
76
|
+
},
|
|
77
|
+
hide: ()=>{
|
|
78
|
+
this._showingFilters = false;
|
|
67
79
|
}
|
|
68
80
|
},
|
|
69
81
|
selection: {
|
|
@@ -113,7 +125,7 @@ class ListPresenterImpl {
|
|
|
113
125
|
totalCount: 0
|
|
114
126
|
};
|
|
115
127
|
const loading = ds ? ds.loading : false;
|
|
116
|
-
const
|
|
128
|
+
const hasUserFilters = Object.keys(this._filters).some((k)=>!this._initialFilterKeys.has(k)) || this._search.length > 0;
|
|
117
129
|
return {
|
|
118
130
|
rows,
|
|
119
131
|
sort: this._sort,
|
|
@@ -130,10 +142,12 @@ class ListPresenterImpl {
|
|
|
130
142
|
selection: {
|
|
131
143
|
selectedIds: this._selection.selectedIds,
|
|
132
144
|
selectedCount: this._selection.selectedCount,
|
|
133
|
-
allSelected: this._selection.allSelected
|
|
145
|
+
allSelected: this._selection.allSelected,
|
|
146
|
+
label: this.buildSelectionLabel()
|
|
134
147
|
},
|
|
148
|
+
showingFilters: this._showingFilters,
|
|
135
149
|
empty: 0 === rows.length && !loading,
|
|
136
|
-
emptyWithFilters: 0 === rows.length && !loading &&
|
|
150
|
+
emptyWithFilters: 0 === rows.length && !loading && hasUserFilters,
|
|
137
151
|
error: this._error
|
|
138
152
|
};
|
|
139
153
|
}
|
|
@@ -141,9 +155,14 @@ class ListPresenterImpl {
|
|
|
141
155
|
this._dataSource = config.dataSource;
|
|
142
156
|
this._sort = config.initialSort ?? null;
|
|
143
157
|
this._filters = config.initialFilters ?? {};
|
|
158
|
+
this._initialFilterKeys = new Set(Object.keys(this._filters));
|
|
144
159
|
this._debounceMs = config.debounceMs ?? 300;
|
|
145
160
|
this._limit = config.limit;
|
|
146
|
-
this.
|
|
161
|
+
this._itemLabel = config.itemLabel ?? {
|
|
162
|
+
singular: "item",
|
|
163
|
+
plural: "items"
|
|
164
|
+
};
|
|
165
|
+
this._search = config.initialSearch ?? "";
|
|
147
166
|
this._appliedQuery = null;
|
|
148
167
|
this._selection.reset();
|
|
149
168
|
this._initialized = true;
|
|
@@ -200,6 +219,13 @@ class ListPresenterImpl {
|
|
|
200
219
|
getRowId(row) {
|
|
201
220
|
return row.id;
|
|
202
221
|
}
|
|
222
|
+
buildSelectionLabel() {
|
|
223
|
+
const { selectedCount, allSelected } = this._selection;
|
|
224
|
+
if (allSelected) return `all ${this._itemLabel.plural}`;
|
|
225
|
+
if (0 === selectedCount) return "";
|
|
226
|
+
const noun = 1 === selectedCount ? this._itemLabel.singular : this._itemLabel.plural;
|
|
227
|
+
return `${selectedCount} ${noun}`;
|
|
228
|
+
}
|
|
203
229
|
toListError(err) {
|
|
204
230
|
if (err instanceof Error) return {
|
|
205
231
|
code: "UNKNOWN",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presentation/listPresenter/ListPresenter.js","sources":["../../../src/presentation/listPresenter/ListPresenter.ts"],"sourcesContent":["import { makeAutoObservable, runInAction, computed } from \"mobx\";\nimport {\n ListPresenter as Abstraction,\n type IListPresenter,\n type IListPresenterConfig,\n type IListViewModel,\n type IListActions,\n type IListError,\n type IDataSource,\n type IDataSourceQuery\n} from \"./abstractions.js\";\nimport { SelectionController } from \"./SelectionController.js\";\n\nclass ListPresenterImpl<TRow> implements IListPresenter<TRow> {\n private _sort: { field: string; direction: \"ASC\" | \"DESC\" } | null = null;\n private _filters: Record<string, unknown> = {};\n private _search = \"\";\n private _selection: SelectionController<TRow>;\n private _error: IListError | null = null;\n private _appliedQuery: IDataSourceQuery | null = null;\n private _dataSource: IDataSource<TRow> | null = null;\n private _debounceMs = 300;\n private _debounceTimer: ReturnType<typeof setTimeout> | null = null;\n private _requeryScheduled = false;\n private _limit: number | undefined = undefined;\n private _initialized = false;\n private _loadingMore = false;\n\n constructor() {\n this._selection = new SelectionController<TRow>(\n () => this._dataSource?.rows ?? [],\n row => this.getRowId(row)\n );\n\n makeAutoObservable<ListPresenterImpl<TRow>, \"_debounceTimer\">(this, {\n _debounceTimer: false,\n vm: computed\n });\n }\n\n get vm(): IListViewModel<TRow> {\n const ds = this._dataSource;\n const rows = ds ? ds.rows : [];\n const meta = ds ? ds.meta : { cursor: null, hasMoreItems: false, totalCount: 0 };\n const loading = ds ? ds.loading : false;\n const hasFilters = Object.keys(this._filters).length > 0 || this._search.length > 0;\n\n return {\n rows,\n sort: this._sort,\n filters: this._filters,\n search: this._search,\n appliedQuery: this._appliedQuery,\n pagination: {\n hasMore: meta.hasMoreItems,\n loading: loading && !this._loadingMore,\n loadingMore: this._loadingMore,\n totalCount: meta.totalCount,\n currentCount: rows.length\n },\n selection: {\n selectedIds: this._selection.selectedIds,\n selectedCount: this._selection.selectedCount,\n allSelected: this._selection.allSelected\n },\n empty: rows.length === 0 && !loading,\n emptyWithFilters: rows.length === 0 && !loading && hasFilters,\n error: this._error\n };\n }\n\n actions: IListActions = {\n search: {\n set: (query: string) => {\n if (this._search === query) {\n return;\n }\n this._search = query;\n this.debouncedRequery();\n },\n clear: () => {\n if (this._search === \"\") {\n return;\n }\n this._search = \"\";\n this.requery();\n }\n },\n sort: {\n set: (field: string, direction: \"ASC\" | \"DESC\") => {\n this._sort = { field, direction };\n this.requery();\n },\n toggle: (field: string) => {\n if (this._sort && this._sort.field === field) {\n this._sort = {\n field,\n direction: this._sort.direction === \"ASC\" ? \"DESC\" : \"ASC\"\n };\n } else {\n this._sort = { field, direction: \"ASC\" };\n }\n this.requery();\n }\n },\n filter: {\n set: (key: string, value: unknown) => {\n this._filters = { ...this._filters, [key]: value };\n this.requery();\n },\n clear: (key: string) => {\n const { [key]: _, ...rest } = this._filters;\n this._filters = rest;\n this.requery();\n },\n clearAll: () => {\n this._filters = {};\n this.requery();\n }\n },\n selection: {\n toggle: (id: string) => this._selection.toggle(id),\n selectRangeTo: (id: string) => this._selection.selectRangeTo(id),\n selectAll: () => this._selection.selectAll(),\n deselectAll: () => this._selection.deselectAll(),\n selectRows: (ids: string[]) => this._selection.selectRows(ids),\n isSelected: (id: string) => this._selection.isSelected(id)\n },\n loadMore: async () => {\n if (!this._dataSource) {\n return;\n }\n const meta = this._dataSource.meta;\n if (!meta.hasMoreItems || this._dataSource.loading) {\n return;\n }\n this._loadingMore = true;\n try {\n await this._dataSource.loadMore(this.buildQuery(meta.cursor));\n runInAction(() => {\n this._error = null;\n });\n } catch (err) {\n runInAction(() => {\n this._error = this.toListError(err);\n });\n } finally {\n runInAction(() => {\n this._loadingMore = false;\n });\n }\n },\n refresh: async () => {\n await this.executeQuery();\n }\n };\n\n init(config: IListPresenterConfig<TRow>): void {\n this._dataSource = config.dataSource;\n this._sort = config.initialSort ?? null;\n this._filters = config.initialFilters ?? {};\n this._debounceMs = config.debounceMs ?? 300;\n this._limit = config.limit;\n this._search = \"\";\n this._appliedQuery = null;\n this._selection.reset();\n this._initialized = true;\n this.executeQuery();\n }\n\n private buildQuery(cursor?: string | null): IDataSourceQuery {\n return {\n search: this._search || undefined,\n filters: Object.keys(this._filters).length > 0 ? this._filters : undefined,\n sort: this._sort ?? undefined,\n cursor: cursor ?? undefined,\n limit: this._limit\n };\n }\n\n private async executeQuery(): Promise<void> {\n if (!this._dataSource) {\n return;\n }\n this._error = null;\n const query = this.buildQuery();\n try {\n await this._dataSource.query(query);\n runInAction(() => {\n this._appliedQuery = query;\n });\n } catch (err) {\n runInAction(() => {\n this._error = this.toListError(err);\n });\n }\n }\n\n private requery(): void {\n this.clearDebounce();\n this._selection.reset();\n\n if (!this._requeryScheduled) {\n this._requeryScheduled = true;\n queueMicrotask(() => {\n this._requeryScheduled = false;\n this.executeQuery();\n });\n }\n }\n\n private debouncedRequery(): void {\n this.clearDebounce();\n this._debounceTimer = setTimeout(() => {\n this._selection.reset();\n this.executeQuery();\n }, this._debounceMs);\n }\n\n private clearDebounce(): void {\n if (this._debounceTimer) {\n clearTimeout(this._debounceTimer);\n this._debounceTimer = null;\n }\n }\n\n private getRowId(row: TRow): string {\n return (row as any).id;\n }\n\n private toListError(err: unknown): IListError {\n if (err instanceof Error) {\n return { code: \"UNKNOWN\", message: err.message, retryable: true };\n }\n return { code: \"UNKNOWN\", message: String(err), retryable: true };\n }\n}\n\nexport const ListPresenter = Abstraction.createImplementation({\n implementation: ListPresenterImpl,\n dependencies: []\n});\n"],"names":["ListPresenterImpl","undefined","query","field","direction","key","value","_","rest","id","ids","meta","runInAction","err","SelectionController","row","makeAutoObservable","computed","ds","rows","loading","hasFilters","Object","config","cursor","queueMicrotask","setTimeout","clearTimeout","Error","String","ListPresenter","Abstraction"],"mappings":";;;AAaA,MAAMA;IAeF,aAAc;aAdN,KAAK,GAAwD;aAC7D,QAAQ,GAA4B,CAAC;aACrC,OAAO,GAAG;aAEV,MAAM,GAAsB;aAC5B,aAAa,GAA4B;aACzC,WAAW,GAA6B;aACxC,WAAW,GAAG;aACd,cAAc,GAAyC;aACvD,iBAAiB,GAAG;aACpB,MAAM,GAAuBC;aAC7B,YAAY,GAAG;aACf,YAAY,GAAG;aA6CvB,OAAO,GAAiB;YACpB,QAAQ;gBACJ,KAAK,CAACC;oBACF,IAAI,IAAI,CAAC,OAAO,KAAKA,OACjB;oBAEJ,IAAI,CAAC,OAAO,GAAGA;oBACf,IAAI,CAAC,gBAAgB;gBACzB;gBACA,OAAO;oBACH,IAAI,AAAiB,OAAjB,IAAI,CAAC,OAAO,EACZ;oBAEJ,IAAI,CAAC,OAAO,GAAG;oBACf,IAAI,CAAC,OAAO;gBAChB;YACJ;YACA,MAAM;gBACF,KAAK,CAACC,OAAeC;oBACjB,IAAI,CAAC,KAAK,GAAG;wBAAED;wBAAOC;oBAAU;oBAChC,IAAI,CAAC,OAAO;gBAChB;gBACA,QAAQ,CAACD;oBACL,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,KAAKA,OACnC,IAAI,CAAC,KAAK,GAAG;wBACTA;wBACA,WAAW,AAAyB,UAAzB,IAAI,CAAC,KAAK,CAAC,SAAS,GAAa,SAAS;oBACzD;yBAEA,IAAI,CAAC,KAAK,GAAG;wBAAEA;wBAAO,WAAW;oBAAM;oBAE3C,IAAI,CAAC,OAAO;gBAChB;YACJ;YACA,QAAQ;gBACJ,KAAK,CAACE,KAAaC;oBACf,IAAI,CAAC,QAAQ,GAAG;wBAAE,GAAG,IAAI,CAAC,QAAQ;wBAAE,CAACD,IAAI,EAAEC;oBAAM;oBACjD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AAG;gBACzB,IAAI,CAAC,YAAY;YACrB;QACJ;IACJ;IAEQ,mBAAyB;QAC7B,IAAI,CAAC,aAAa;QAClB,IAAI,CAAC,cAAc,GAAGC,WAAW;YAC7B,IAAI,CAAC,UAAU,CAAC,KAAK;YACrB,IAAI,CAAC,YAAY;QACrB,GAAG,IAAI,CAAC,WAAW;IACvB;IAEQ,gBAAsB;QAC1B,IAAI,IAAI,CAAC,cAAc,EAAE;YACrBC,aAAa,IAAI,CAAC,cAAc;YAChC,IAAI,CAAC,cAAc,GAAG;QAC1B;IACJ;IAEQ,SAASZ,GAAS,EAAU;QAChC,OAAQA,IAAY,EAAE;IAC1B;IAEQ,YAAYF,GAAY,EAAc;QAC1C,IAAIA,eAAee,OACf,OAAO;YAAE,MAAM;YAAW,SAASf,IAAI,OAAO;YAAE,WAAW;QAAK;QAEpE,OAAO;YAAE,MAAM;YAAW,SAASgB,OAAOhB;YAAM,WAAW;QAAK;IACpE;AACJ;AAEO,MAAMiB,8BAAgBC,cAAAA,oBAAgC,CAAC;IAC1D,gBAAgB/B;IAChB,cAAc,EAAE;AACpB"}
|
|
1
|
+
{"version":3,"file":"presentation/listPresenter/ListPresenter.js","sources":["../../../src/presentation/listPresenter/ListPresenter.ts"],"sourcesContent":["import { makeAutoObservable, runInAction, computed } from \"mobx\";\nimport {\n ListPresenter as Abstraction,\n type IListPresenter,\n type IListPresenterConfig,\n type IListViewModel,\n type IListActions,\n type IListError,\n type IDataSource,\n type IDataSourceQuery\n} from \"./abstractions.js\";\nimport { SelectionController } from \"./SelectionController.js\";\n\nclass ListPresenterImpl<TRow> implements IListPresenter<TRow> {\n private _sort: { field: string; direction: \"ASC\" | \"DESC\" } | null = null;\n private _filters: Record<string, unknown> = {};\n private _initialFilterKeys: Set<string> = new Set();\n private _search = \"\";\n private _selection: SelectionController<TRow>;\n private _error: IListError | null = null;\n private _appliedQuery: IDataSourceQuery | null = null;\n private _dataSource: IDataSource<TRow> | null = null;\n private _debounceMs = 300;\n private _debounceTimer: ReturnType<typeof setTimeout> | null = null;\n private _requeryScheduled = false;\n private _limit: number | undefined = undefined;\n private _initialized = false;\n private _loadingMore = false;\n private _showingFilters = false;\n private _itemLabel: { singular: string; plural: string } = {\n singular: \"item\",\n plural: \"items\"\n };\n\n constructor() {\n this._selection = new SelectionController<TRow>(\n () => this._dataSource?.rows ?? [],\n row => this.getRowId(row)\n );\n\n makeAutoObservable<ListPresenterImpl<TRow>, \"_debounceTimer\">(this, {\n _debounceTimer: false,\n vm: computed\n });\n }\n\n get vm(): IListViewModel<TRow> {\n const ds = this._dataSource;\n const rows = ds ? ds.rows : [];\n const meta = ds ? ds.meta : { cursor: null, hasMoreItems: false, totalCount: 0 };\n const loading = ds ? ds.loading : false;\n const hasUserFilters =\n Object.keys(this._filters).some(k => !this._initialFilterKeys.has(k)) ||\n this._search.length > 0;\n\n return {\n rows,\n sort: this._sort,\n filters: this._filters,\n search: this._search,\n appliedQuery: this._appliedQuery,\n pagination: {\n hasMore: meta.hasMoreItems,\n loading: loading && !this._loadingMore,\n loadingMore: this._loadingMore,\n totalCount: meta.totalCount,\n currentCount: rows.length\n },\n selection: {\n selectedIds: this._selection.selectedIds,\n selectedCount: this._selection.selectedCount,\n allSelected: this._selection.allSelected,\n label: this.buildSelectionLabel()\n },\n showingFilters: this._showingFilters,\n empty: rows.length === 0 && !loading,\n emptyWithFilters: rows.length === 0 && !loading && hasUserFilters,\n error: this._error\n };\n }\n\n actions: IListActions = {\n search: {\n set: (query: string) => {\n if (this._search === query) {\n return;\n }\n this._search = query;\n this.debouncedRequery();\n },\n clear: () => {\n if (this._search === \"\") {\n return;\n }\n this._search = \"\";\n this.requery();\n }\n },\n sort: {\n set: (field: string, direction: \"ASC\" | \"DESC\") => {\n this._sort = { field, direction };\n this.requery();\n },\n toggle: (field: string) => {\n if (this._sort && this._sort.field === field) {\n this._sort = {\n field,\n direction: this._sort.direction === \"ASC\" ? \"DESC\" : \"ASC\"\n };\n } else {\n this._sort = { field, direction: \"ASC\" };\n }\n this.requery();\n }\n },\n filter: {\n set: (key: string, value: unknown) => {\n this._filters = { ...this._filters, [key]: value };\n this.requery();\n },\n clear: (key: string) => {\n const { [key]: _, ...rest } = this._filters;\n this._filters = rest;\n this.requery();\n },\n clearAll: () => {\n this._filters = {};\n this.requery();\n },\n show: () => {\n this._showingFilters = true;\n },\n hide: () => {\n this._showingFilters = false;\n }\n },\n selection: {\n toggle: (id: string) => this._selection.toggle(id),\n selectRangeTo: (id: string) => this._selection.selectRangeTo(id),\n selectAll: () => this._selection.selectAll(),\n deselectAll: () => this._selection.deselectAll(),\n selectRows: (ids: string[]) => this._selection.selectRows(ids),\n isSelected: (id: string) => this._selection.isSelected(id)\n },\n loadMore: async () => {\n if (!this._dataSource) {\n return;\n }\n const meta = this._dataSource.meta;\n if (!meta.hasMoreItems || this._dataSource.loading) {\n return;\n }\n this._loadingMore = true;\n try {\n await this._dataSource.loadMore(this.buildQuery(meta.cursor));\n runInAction(() => {\n this._error = null;\n });\n } catch (err) {\n runInAction(() => {\n this._error = this.toListError(err);\n });\n } finally {\n runInAction(() => {\n this._loadingMore = false;\n });\n }\n },\n refresh: async () => {\n await this.executeQuery();\n }\n };\n\n init(config: IListPresenterConfig<TRow>): void {\n this._dataSource = config.dataSource;\n this._sort = config.initialSort ?? null;\n this._filters = config.initialFilters ?? {};\n this._initialFilterKeys = new Set(Object.keys(this._filters));\n this._debounceMs = config.debounceMs ?? 300;\n this._limit = config.limit;\n this._itemLabel = config.itemLabel ?? { singular: \"item\", plural: \"items\" };\n this._search = config.initialSearch ?? \"\";\n this._appliedQuery = null;\n this._selection.reset();\n this._initialized = true;\n this.executeQuery();\n }\n\n private buildQuery(cursor?: string | null): IDataSourceQuery {\n return {\n search: this._search || undefined,\n filters: Object.keys(this._filters).length > 0 ? this._filters : undefined,\n sort: this._sort ?? undefined,\n cursor: cursor ?? undefined,\n limit: this._limit\n };\n }\n\n private async executeQuery(): Promise<void> {\n if (!this._dataSource) {\n return;\n }\n this._error = null;\n const query = this.buildQuery();\n try {\n await this._dataSource.query(query);\n runInAction(() => {\n this._appliedQuery = query;\n });\n } catch (err) {\n runInAction(() => {\n this._error = this.toListError(err);\n });\n }\n }\n\n private requery(): void {\n this.clearDebounce();\n this._selection.reset();\n\n if (!this._requeryScheduled) {\n this._requeryScheduled = true;\n queueMicrotask(() => {\n this._requeryScheduled = false;\n this.executeQuery();\n });\n }\n }\n\n private debouncedRequery(): void {\n this.clearDebounce();\n this._debounceTimer = setTimeout(() => {\n this._selection.reset();\n this.executeQuery();\n }, this._debounceMs);\n }\n\n private clearDebounce(): void {\n if (this._debounceTimer) {\n clearTimeout(this._debounceTimer);\n this._debounceTimer = null;\n }\n }\n\n private getRowId(row: TRow): string {\n return (row as any).id;\n }\n\n private buildSelectionLabel(): string {\n const { selectedCount, allSelected } = this._selection;\n if (allSelected) {\n return `all ${this._itemLabel.plural}`;\n }\n if (selectedCount === 0) {\n return \"\";\n }\n const noun = selectedCount === 1 ? this._itemLabel.singular : this._itemLabel.plural;\n return `${selectedCount} ${noun}`;\n }\n\n private toListError(err: unknown): IListError {\n if (err instanceof Error) {\n return { code: \"UNKNOWN\", message: err.message, retryable: true };\n }\n return { code: \"UNKNOWN\", message: String(err), retryable: true };\n }\n}\n\nexport const ListPresenter = Abstraction.createImplementation({\n implementation: ListPresenterImpl,\n dependencies: []\n});\n"],"names":["ListPresenterImpl","Set","undefined","query","field","direction","key","value","_","rest","id","ids","meta","runInAction","err","SelectionController","row","makeAutoObservable","computed","ds","rows","loading","hasUserFilters","Object","k","config","cursor","queueMicrotask","setTimeout","clearTimeout","selectedCount","allSelected","noun","Error","String","ListPresenter","Abstraction"],"mappings":";;;AAaA,MAAMA;IAqBF,aAAc;aApBN,KAAK,GAAwD;aAC7D,QAAQ,GAA4B,CAAC;aACrC,kBAAkB,GAAgB,IAAIC;aACtC,OAAO,GAAG;aAEV,MAAM,GAAsB;aAC5B,aAAa,GAA4B;aACzC,WAAW,GAA6B;aACx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CAAC;IAC1D,gBAAgBpC;IAChB,cAAc,EAAE;AACpB"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { IDataSourceQuery } from "./abstractions.js";
|
|
2
|
+
type ItemPredicate<TRow> = (item: TRow, value: unknown) => boolean;
|
|
3
|
+
export interface QueryMatcherConfig<TRow> {
|
|
4
|
+
keyField: keyof TRow & string;
|
|
5
|
+
localFilters: Record<string, ItemPredicate<TRow>>;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Decides which cached items belong in the current view.
|
|
9
|
+
*
|
|
10
|
+
* A DataSource backed by a shared cache (e.g., per-model entry cache) needs to
|
|
11
|
+
* filter cached items to only those matching the active query. QueryMatcher does
|
|
12
|
+
* this by splitting filters into two categories:
|
|
13
|
+
*
|
|
14
|
+
* - **Local filters** (e.g., folderId, status) — evaluated client-side against
|
|
15
|
+
* each item using predicates provided via `localFilters` config. Used when
|
|
16
|
+
* browsing without search or server-side filters.
|
|
17
|
+
*
|
|
18
|
+
* - **Server-side filters** (search, advanced search, any filter key not in
|
|
19
|
+
* `localFilters`) — cannot be evaluated locally. Instead, QueryMatcher tracks
|
|
20
|
+
* the set of item keys returned by the last server query (`_queryResultKeys`)
|
|
21
|
+
* and restricts the view to those items.
|
|
22
|
+
*
|
|
23
|
+
* The `matcher` getter is MobX-computed, so any DataSource `rows` getter that
|
|
24
|
+
* reads it will recompute when the matcher changes after a query.
|
|
25
|
+
*
|
|
26
|
+
* Usage:
|
|
27
|
+
* ```ts
|
|
28
|
+
* const matcher = new QueryMatcher<MyItem>({
|
|
29
|
+
* keyField: "id",
|
|
30
|
+
* localFilters: {
|
|
31
|
+
* folderId: (item, value) => item.folderId === value,
|
|
32
|
+
* status: (item, value) => item.status === value,
|
|
33
|
+
* }
|
|
34
|
+
* });
|
|
35
|
+
*
|
|
36
|
+
* // In DataSource.query(), after fetching:
|
|
37
|
+
* matcher.updateFromQuery(params, result.data.map(item => item.id));
|
|
38
|
+
*
|
|
39
|
+
* // In DataSource.rows getter:
|
|
40
|
+
* return cache.getItems().filter(matcher.matcher);
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
export declare class QueryMatcher<TRow> {
|
|
44
|
+
private config;
|
|
45
|
+
private _queryResultKeys;
|
|
46
|
+
private _matcher;
|
|
47
|
+
private localFilterKeys;
|
|
48
|
+
constructor(config: QueryMatcherConfig<TRow>);
|
|
49
|
+
get matcher(): (item: TRow) => boolean;
|
|
50
|
+
filter(items: TRow[]): TRow[];
|
|
51
|
+
hasServerSideFilters(params: IDataSourceQuery): boolean;
|
|
52
|
+
updateFromQuery(params: IDataSourceQuery, resultKeys: string[]): void;
|
|
53
|
+
appendResultKeys(keys: string[]): void;
|
|
54
|
+
private buildMatcher;
|
|
55
|
+
}
|
|
56
|
+
export {};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { action, computed, makeObservable, observable } from "mobx";
|
|
2
|
+
class QueryMatcher {
|
|
3
|
+
constructor(config){
|
|
4
|
+
this.config = config;
|
|
5
|
+
this._queryResultKeys = null;
|
|
6
|
+
this._matcher = ()=>true;
|
|
7
|
+
this.localFilterKeys = new Set(Object.keys(config.localFilters));
|
|
8
|
+
makeObservable(this, {
|
|
9
|
+
_matcher: observable.ref,
|
|
10
|
+
matcher: computed,
|
|
11
|
+
updateFromQuery: action,
|
|
12
|
+
appendResultKeys: action
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
get matcher() {
|
|
16
|
+
return this._matcher;
|
|
17
|
+
}
|
|
18
|
+
filter(items) {
|
|
19
|
+
return items.filter(this._matcher);
|
|
20
|
+
}
|
|
21
|
+
hasServerSideFilters(params) {
|
|
22
|
+
if (params.search) return true;
|
|
23
|
+
const filters = params.filters ?? {};
|
|
24
|
+
return Object.keys(filters).some((key)=>!this.localFilterKeys.has(key));
|
|
25
|
+
}
|
|
26
|
+
updateFromQuery(params, resultKeys) {
|
|
27
|
+
if (this.hasServerSideFilters(params)) this._queryResultKeys = new Set(resultKeys);
|
|
28
|
+
else this._queryResultKeys = null;
|
|
29
|
+
this._matcher = this.buildMatcher(params);
|
|
30
|
+
}
|
|
31
|
+
appendResultKeys(keys) {
|
|
32
|
+
if (this._queryResultKeys) for (const key of keys)this._queryResultKeys.add(key);
|
|
33
|
+
}
|
|
34
|
+
buildMatcher(params) {
|
|
35
|
+
const filters = params.filters ?? {};
|
|
36
|
+
const queryResultKeys = this._queryResultKeys;
|
|
37
|
+
const isSearching = !!params.search;
|
|
38
|
+
const { keyField, localFilters } = this.config;
|
|
39
|
+
const activeLocalFilters = [];
|
|
40
|
+
for (const [key, predicate] of Object.entries(localFilters)){
|
|
41
|
+
const value = filters[key];
|
|
42
|
+
if (null != value) activeLocalFilters.push({
|
|
43
|
+
predicate,
|
|
44
|
+
value
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
return (item)=>{
|
|
48
|
+
if (queryResultKeys) {
|
|
49
|
+
if (!queryResultKeys.has(String(item[keyField]))) return false;
|
|
50
|
+
} else if (!isSearching) {
|
|
51
|
+
for (const { predicate, value } of activeLocalFilters)if (!predicate(item, value)) return false;
|
|
52
|
+
}
|
|
53
|
+
return true;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
export { QueryMatcher };
|
|
58
|
+
|
|
59
|
+
//# sourceMappingURL=QueryMatcher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation/listPresenter/QueryMatcher.js","sources":["../../../src/presentation/listPresenter/QueryMatcher.ts"],"sourcesContent":["import { makeObservable, observable, computed, action } from \"mobx\";\nimport type { IDataSourceQuery } from \"./abstractions.js\";\n\ntype ItemPredicate<TRow> = (item: TRow, value: unknown) => boolean;\n\nexport interface QueryMatcherConfig<TRow> {\n keyField: keyof TRow & string;\n localFilters: Record<string, ItemPredicate<TRow>>;\n}\n\n/**\n * Decides which cached items belong in the current view.\n *\n * A DataSource backed by a shared cache (e.g., per-model entry cache) needs to\n * filter cached items to only those matching the active query. QueryMatcher does\n * this by splitting filters into two categories:\n *\n * - **Local filters** (e.g., folderId, status) — evaluated client-side against\n * each item using predicates provided via `localFilters` config. Used when\n * browsing without search or server-side filters.\n *\n * - **Server-side filters** (search, advanced search, any filter key not in\n * `localFilters`) — cannot be evaluated locally. Instead, QueryMatcher tracks\n * the set of item keys returned by the last server query (`_queryResultKeys`)\n * and restricts the view to those items.\n *\n * The `matcher` getter is MobX-computed, so any DataSource `rows` getter that\n * reads it will recompute when the matcher changes after a query.\n *\n * Usage:\n * ```ts\n * const matcher = new QueryMatcher<MyItem>({\n * keyField: \"id\",\n * localFilters: {\n * folderId: (item, value) => item.folderId === value,\n * status: (item, value) => item.status === value,\n * }\n * });\n *\n * // In DataSource.query(), after fetching:\n * matcher.updateFromQuery(params, result.data.map(item => item.id));\n *\n * // In DataSource.rows getter:\n * return cache.getItems().filter(matcher.matcher);\n * ```\n */\nexport class QueryMatcher<TRow> {\n private _queryResultKeys: Set<string> | null = null;\n private _matcher: (item: TRow) => boolean = () => true;\n private localFilterKeys: Set<string>;\n\n constructor(private config: QueryMatcherConfig<TRow>) {\n this.localFilterKeys = new Set(Object.keys(config.localFilters));\n\n makeObservable<QueryMatcher<TRow>, \"_matcher\">(this, {\n _matcher: observable.ref,\n matcher: computed,\n updateFromQuery: action,\n appendResultKeys: action\n });\n }\n\n get matcher(): (item: TRow) => boolean {\n return this._matcher;\n }\n\n filter(items: TRow[]): TRow[] {\n return items.filter(this._matcher);\n }\n\n hasServerSideFilters(params: IDataSourceQuery): boolean {\n if (params.search) {\n return true;\n }\n const filters = params.filters ?? {};\n return Object.keys(filters).some(key => !this.localFilterKeys.has(key));\n }\n\n updateFromQuery(params: IDataSourceQuery, resultKeys: string[]): void {\n if (this.hasServerSideFilters(params)) {\n this._queryResultKeys = new Set(resultKeys);\n } else {\n this._queryResultKeys = null;\n }\n this._matcher = this.buildMatcher(params);\n }\n\n appendResultKeys(keys: string[]): void {\n if (this._queryResultKeys) {\n for (const key of keys) {\n this._queryResultKeys.add(key);\n }\n }\n }\n\n private buildMatcher(params: IDataSourceQuery): (item: TRow) => boolean {\n const filters = params.filters ?? {};\n const queryResultKeys = this._queryResultKeys;\n const isSearching = !!params.search;\n const { keyField, localFilters } = this.config;\n\n const activeLocalFilters: Array<{ predicate: ItemPredicate<TRow>; value: unknown }> = [];\n for (const [key, predicate] of Object.entries(localFilters)) {\n const value = filters[key];\n if (value !== undefined && value !== null) {\n activeLocalFilters.push({ predicate, value });\n }\n }\n\n return (item: TRow) => {\n if (queryResultKeys) {\n if (!queryResultKeys.has(String(item[keyField]))) {\n return false;\n }\n } else if (!isSearching) {\n for (const { predicate, value } of activeLocalFilters) {\n if (!predicate(item, value)) {\n return false;\n }\n }\n }\n\n return true;\n };\n }\n}\n"],"names":["QueryMatcher","config","Set","Object","makeObservable","observable","computed","action","items","params","filters","key","resultKeys","keys","queryResultKeys","isSearching","keyField","localFilters","activeLocalFilters","predicate","value","item","String"],"mappings":";AA8CO,MAAMA;IAKT,YAAoBC,MAAgC,CAAE;aAAlCA,MAAM,GAANA;aAJZ,gBAAgB,GAAuB;aACvC,QAAQ,GAA4B,IAAM;QAI9C,IAAI,CAAC,eAAe,GAAG,IAAIC,IAAIC,OAAO,IAAI,CAACF,OAAO,YAAY;QAE9DG,eAA+C,IAAI,EAAE;YACjD,UAAUC,WAAW,GAAG;YACxB,SAASC;YACT,iBAAiBC;YACjB,kBAAkBA;QACtB;IACJ;IAEA,IAAI,UAAmC;QACnC,OAAO,IAAI,CAAC,QAAQ;IACxB;IAEA,OAAOC,KAAa,EAAU;QAC1B,OAAOA,MAAM,MAAM,CAAC,IAAI,CAAC,QAAQ;IACrC;IAEA,qBAAqBC,MAAwB,EAAW;QACpD,IAAIA,OAAO,MAAM,EACb,OAAO;QAEX,MAAMC,UAAUD,OAAO,OAAO,IAAI,CAAC;QACnC,OAAON,OAAO,IAAI,CAACO,SAAS,IAAI,CAACC,CAAAA,MAAO,CAAC,IAAI,CA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import type { FetchResult } from "./FolderAwareDataSource.js";
|
|
3
|
+
export declare abstract class SimpleDataSource<TRow> implements IDataSource<TRow> {
|
|
4
|
+
private _meta;
|
|
5
|
+
private _loading;
|
|
6
|
+
protected constructor();
|
|
7
|
+
abstract get rows(): TRow[];
|
|
8
|
+
abstract fetch(params: IDataSourceQuery): Promise<FetchResult<TRow>>;
|
|
9
|
+
protected onQueryResult(_data: TRow[]): void;
|
|
10
|
+
protected onLoadMoreResult(_data: TRow[]): void;
|
|
11
|
+
get meta(): IDataSourceMeta;
|
|
12
|
+
get loading(): boolean;
|
|
13
|
+
query(params: IDataSourceQuery): Promise<void>;
|
|
14
|
+
loadMore(params: IDataSourceQuery): Promise<void>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { action, computed, makeObservable, observable, runInAction } from "mobx";
|
|
2
|
+
class SimpleDataSource {
|
|
3
|
+
constructor(){
|
|
4
|
+
this._meta = {
|
|
5
|
+
cursor: null,
|
|
6
|
+
hasMoreItems: false,
|
|
7
|
+
totalCount: 0
|
|
8
|
+
};
|
|
9
|
+
this._loading = false;
|
|
10
|
+
makeObservable(this, {
|
|
11
|
+
_meta: observable,
|
|
12
|
+
_loading: observable,
|
|
13
|
+
meta: computed,
|
|
14
|
+
loading: computed,
|
|
15
|
+
query: action,
|
|
16
|
+
loadMore: action
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
onQueryResult(_data) {}
|
|
20
|
+
onLoadMoreResult(_data) {}
|
|
21
|
+
get meta() {
|
|
22
|
+
return this._meta;
|
|
23
|
+
}
|
|
24
|
+
get loading() {
|
|
25
|
+
return this._loading;
|
|
26
|
+
}
|
|
27
|
+
async query(params) {
|
|
28
|
+
this._loading = true;
|
|
29
|
+
try {
|
|
30
|
+
const result = await this.fetch(params);
|
|
31
|
+
runInAction(()=>{
|
|
32
|
+
this.onQueryResult(result.data);
|
|
33
|
+
this._meta = {
|
|
34
|
+
cursor: result.meta.cursor,
|
|
35
|
+
hasMoreItems: result.meta.hasMoreItems,
|
|
36
|
+
totalCount: result.meta.totalCount
|
|
37
|
+
};
|
|
38
|
+
});
|
|
39
|
+
} finally{
|
|
40
|
+
runInAction(()=>{
|
|
41
|
+
this._loading = false;
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
async loadMore(params) {
|
|
46
|
+
if (!this._meta.hasMoreItems || this._loading) return;
|
|
47
|
+
this._loading = true;
|
|
48
|
+
try {
|
|
49
|
+
const result = await this.fetch({
|
|
50
|
+
...params,
|
|
51
|
+
cursor: this._meta.cursor ?? void 0
|
|
52
|
+
});
|
|
53
|
+
runInAction(()=>{
|
|
54
|
+
this.onLoadMoreResult(result.data);
|
|
55
|
+
this._meta = {
|
|
56
|
+
cursor: result.meta.cursor,
|
|
57
|
+
hasMoreItems: result.meta.hasMoreItems,
|
|
58
|
+
totalCount: result.meta.totalCount
|
|
59
|
+
};
|
|
60
|
+
});
|
|
61
|
+
} finally{
|
|
62
|
+
runInAction(()=>{
|
|
63
|
+
this._loading = false;
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
export { SimpleDataSource };
|
|
69
|
+
|
|
70
|
+
//# sourceMappingURL=SimpleDataSource.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation/listPresenter/SimpleDataSource.js","sources":["../../../src/presentation/listPresenter/SimpleDataSource.ts"],"sourcesContent":["import { makeObservable, observable, computed, runInAction, action } from \"mobx\";\nimport type { IDataSource, IDataSourceQuery, IDataSourceMeta } from \"./abstractions.js\";\nimport type { FetchResult } from \"./FolderAwareDataSource.js\";\n\nexport abstract class SimpleDataSource<TRow> implements IDataSource<TRow> {\n private _meta: IDataSourceMeta = { cursor: null, hasMoreItems: false, totalCount: 0 };\n private _loading = false;\n\n protected constructor() {\n makeObservable<SimpleDataSource<TRow>, \"_meta\" | \"_loading\">(this, {\n _meta: observable,\n _loading: observable,\n meta: computed,\n loading: computed,\n query: action,\n loadMore: action\n });\n }\n\n abstract get rows(): TRow[];\n\n abstract fetch(params: IDataSourceQuery): Promise<FetchResult<TRow>>;\n\n protected onQueryResult(_data: TRow[]): void {}\n\n protected onLoadMoreResult(_data: TRow[]): void {}\n\n get meta(): IDataSourceMeta {\n return this._meta;\n }\n\n get loading(): boolean {\n return this._loading;\n }\n\n async query(params: IDataSourceQuery): Promise<void> {\n this._loading = true;\n\n try {\n const result = await this.fetch(params);\n\n runInAction(() => {\n this.onQueryResult(result.data);\n this._meta = {\n cursor: result.meta.cursor,\n hasMoreItems: result.meta.hasMoreItems,\n totalCount: result.meta.totalCount\n };\n });\n } finally {\n runInAction(() => {\n this._loading = false;\n });\n }\n }\n\n async loadMore(params: IDataSourceQuery): Promise<void> {\n if (!this._meta.hasMoreItems || this._loading) {\n return;\n }\n\n this._loading = true;\n\n try {\n const result = await this.fetch({\n ...params,\n cursor: this._meta.cursor ?? undefined\n });\n\n runInAction(() => {\n this.onLoadMoreResult(result.data);\n this._meta = {\n cursor: result.meta.cursor,\n hasMoreItems: result.meta.hasMoreItems,\n totalCount: result.meta.totalCount\n };\n });\n } finally {\n runInAction(() => {\n this._loading = false;\n });\n }\n }\n}\n"],"names":["SimpleDataSource","makeObservable","observable","computed","action","_data","params","result","runInAction","undefined"],"mappings":";AAIO,MAAeA;IAIlB,aAAwB;aAHhB,KAAK,GAAoB;YAAE,QAAQ;YAAM,cAAc;YAAO,YAAY;QAAE;aAC5E,QAAQ,GAAG;QAGfC,eAA6D,IAAI,EAAE;YAC/D,OAAOC;YACP,UAAUA;YACV,MAAMC;YACN,SAASA;YACT,OAAOC;YACP,UAAUA;QACd;IACJ;IAMU,cAAcC,KAAa,EAAQ,CAAC;IAEpC,iBAAiBA,KAAa,EAAQ,CAAC;IAEjD,IAAI,OAAwB;QACxB,OAAO,IAAI,CAAC,KAAK;IACrB;IAEA,IAAI,UAAmB;QACnB,OAAO,IAAI,CAAC,QAAQ;IACxB;IAEA,MAAM,MAAMC,MAAwB,EAAiB;QACjD,IAAI,CAAC,QAAQ,GAAG;QAEhB,IAAI;YACA,MAAMC,SAAS,MAAM,IAAI,CAAC,KAAK,CAACD;YAEhCE,YAAY;gBACR,IAAI,CAAC,aAAa,CAACD,OAAO,IAAI;gBAC9B,IAAI,CAAC,KAAK,GAAG;oBACT,QAAQA,OAAO,IAAI,CAAC,MAAM;oBAC1B,cAAcA,OAAO,IAAI,CAAC,YAAY;oBACtC,YAAYA,OAAO,IAAI,CAAC,UAAU;gBACtC;YACJ;QACJ,SAAU;YACNC,YAAY;gBACR,IAAI,CAAC,QAAQ,GAAG;YACpB;QACJ;IACJ;IAEA,MAAM,SAASF,MAAwB,EAAiB;QACpD,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,IAAI,IAAI,CAAC,QAAQ,EACzC;QAGJ,IAAI,CAAC,QAAQ,GAAG;QAEhB,IAAI;YACA,MAAMC,SAAS,MAAM,IAAI,CAAC,KAAK,CAAC;gBAC5B,GAAGD,MAAM;gBACT,QAAQ,IAAI,CAAC,KAAK,CAAC,MAAM,IAAIG;YACjC;YAEAD,YAAY;gBACR,IAAI,CAAC,gBAAgB,CAACD,OAAO,IAAI;gBACjC,IAAI,CAAC,KAAK,GAAG;oBACT,QAAQA,OAAO,IAAI,CAAC,MAAM;oBAC1B,cAAcA,OAAO,IAAI,CAAC,YAAY;oBACtC,YAAYA,OAAO,IAAI,CAAC,UAAU;gBACtC;YACJ;QACJ,SAAU;YACNC,YAAY;gBACR,IAAI,CAAC,QAAQ,GAAG;YACpB;QACJ;IACJ;AACJ"}
|
|
@@ -31,8 +31,13 @@ export interface IListPresenterConfig<TRow> {
|
|
|
31
31
|
direction: "ASC" | "DESC";
|
|
32
32
|
};
|
|
33
33
|
initialFilters?: Record<string, unknown>;
|
|
34
|
+
initialSearch?: string;
|
|
34
35
|
debounceMs?: number;
|
|
35
36
|
limit?: number;
|
|
37
|
+
itemLabel?: {
|
|
38
|
+
singular: string;
|
|
39
|
+
plural: string;
|
|
40
|
+
};
|
|
36
41
|
}
|
|
37
42
|
export interface IListError {
|
|
38
43
|
code: string;
|
|
@@ -59,7 +64,9 @@ export interface IListViewModel<TRow> {
|
|
|
59
64
|
selectedIds: Set<string>;
|
|
60
65
|
selectedCount: number;
|
|
61
66
|
allSelected: boolean;
|
|
67
|
+
label: string;
|
|
62
68
|
};
|
|
69
|
+
showingFilters: boolean;
|
|
63
70
|
empty: boolean;
|
|
64
71
|
emptyWithFilters: boolean;
|
|
65
72
|
error: IListError | null;
|
|
@@ -77,6 +84,8 @@ export interface IListActions {
|
|
|
77
84
|
set(key: string, value: unknown): void;
|
|
78
85
|
clear(key: string): void;
|
|
79
86
|
clearAll(): void;
|
|
87
|
+
show(): void;
|
|
88
|
+
hide(): void;
|
|
80
89
|
};
|
|
81
90
|
selection: {
|
|
82
91
|
toggle(id: string): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presentation/listPresenter/abstractions.js","sources":["../../../src/presentation/listPresenter/abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/admin\";\n\n// ---------------------------------------------------------------------------\n// DataSource interfaces\n// ---------------------------------------------------------------------------\n\nexport interface IDataSourceQuery {\n search?: string;\n filters?: Record<string, unknown>;\n sort?: { field: string; direction: \"ASC\" | \"DESC\" };\n cursor?: string;\n limit?: number;\n}\n\nexport interface IDataSourceMeta {\n cursor: string | null;\n hasMoreItems: boolean;\n totalCount: number;\n}\n\nexport interface IDataSourceResult<TRow> {\n rows: TRow[];\n meta: IDataSourceMeta;\n}\n\nexport interface IDataSource<TRow> {\n readonly rows: TRow[];\n readonly meta: IDataSourceMeta;\n readonly loading: boolean;\n query(params: IDataSourceQuery): Promise<void>;\n loadMore(params: IDataSourceQuery): Promise<void>;\n}\n\n// ---------------------------------------------------------------------------\n// ListPresenter config\n// ---------------------------------------------------------------------------\n\nexport interface IListPresenterConfig<TRow> {\n dataSource: IDataSource<TRow>;\n initialSort?: { field: string; direction: \"ASC\" | \"DESC\" };\n initialFilters?: Record<string, unknown>;\n debounceMs?: number;\n limit?: number;\n}\n\n// ---------------------------------------------------------------------------\n// ListError\n// ---------------------------------------------------------------------------\n\nexport interface IListError {\n code: string;\n message: string;\n retryable: boolean;\n}\n\n// ---------------------------------------------------------------------------\n// ListViewModel\n// ---------------------------------------------------------------------------\n\nexport interface IListViewModel<TRow> {\n rows: TRow[];\n sort: { field: string; direction: \"ASC\" | \"DESC\" } | null;\n filters: Record<string, unknown>;\n search: string;\n appliedQuery: IDataSourceQuery | null;\n pagination: {\n hasMore: boolean;\n loading: boolean;\n loadingMore: boolean;\n totalCount: number;\n currentCount: number;\n };\n selection: {\n selectedIds: Set<string>;\n selectedCount: number;\n allSelected: boolean;\n };\n empty: boolean;\n emptyWithFilters: boolean;\n error: IListError | null;\n}\n\n// ---------------------------------------------------------------------------\n// ListActions\n// ---------------------------------------------------------------------------\n\nexport interface IListActions {\n search: {\n set(query: string): void;\n clear(): void;\n };\n sort: {\n set(field: string, direction: \"ASC\" | \"DESC\"): void;\n toggle(field: string): void;\n };\n filter: {\n set(key: string, value: unknown): void;\n clear(key: string): void;\n clearAll(): void;\n };\n selection: {\n toggle(id: string): void;\n selectRangeTo(id: string): void;\n selectAll(): void;\n deselectAll(): void;\n selectRows(ids: string[]): void;\n isSelected(id: string): boolean;\n };\n loadMore(): Promise<void>;\n refresh(): Promise<void>;\n}\n\n// ---------------------------------------------------------------------------\n// ListPresenter abstraction\n// ---------------------------------------------------------------------------\n\nexport interface IListPresenter<TRow> {\n vm: IListViewModel<TRow>;\n actions: IListActions;\n init(config: IListPresenterConfig<TRow>): void;\n}\n\nexport const ListPresenter = createAbstraction<IListPresenter<any>>(\"ListPresenter\");\n\nexport namespace ListPresenter {\n export type Interface<TRow = any> = IListPresenter<TRow>;\n export type ViewModel<TRow = any> = IListViewModel<TRow>;\n export type Actions = IListActions;\n export type Config<TRow = any> = IListPresenterConfig<TRow>;\n export type Error = IListError;\n export type DataSource<TRow = any> = IDataSource<TRow>;\n export type DataSourceQuery = IDataSourceQuery;\n export type DataSourceResult<TRow = any> = IDataSourceResult<TRow>;\n}\n"],"names":["ListPresenter","createAbstraction"],"mappings":";
|
|
1
|
+
{"version":3,"file":"presentation/listPresenter/abstractions.js","sources":["../../../src/presentation/listPresenter/abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/admin\";\n\n// ---------------------------------------------------------------------------\n// DataSource interfaces\n// ---------------------------------------------------------------------------\n\nexport interface IDataSourceQuery {\n search?: string;\n filters?: Record<string, unknown>;\n sort?: { field: string; direction: \"ASC\" | \"DESC\" };\n cursor?: string;\n limit?: number;\n}\n\nexport interface IDataSourceMeta {\n cursor: string | null;\n hasMoreItems: boolean;\n totalCount: number;\n}\n\nexport interface IDataSourceResult<TRow> {\n rows: TRow[];\n meta: IDataSourceMeta;\n}\n\nexport interface IDataSource<TRow> {\n readonly rows: TRow[];\n readonly meta: IDataSourceMeta;\n readonly loading: boolean;\n query(params: IDataSourceQuery): Promise<void>;\n loadMore(params: IDataSourceQuery): Promise<void>;\n}\n\n// ---------------------------------------------------------------------------\n// ListPresenter config\n// ---------------------------------------------------------------------------\n\nexport interface IListPresenterConfig<TRow> {\n dataSource: IDataSource<TRow>;\n initialSort?: { field: string; direction: \"ASC\" | \"DESC\" };\n initialFilters?: Record<string, unknown>;\n initialSearch?: string;\n debounceMs?: number;\n limit?: number;\n itemLabel?: { singular: string; plural: string };\n}\n\n// ---------------------------------------------------------------------------\n// ListError\n// ---------------------------------------------------------------------------\n\nexport interface IListError {\n code: string;\n message: string;\n retryable: boolean;\n}\n\n// ---------------------------------------------------------------------------\n// ListViewModel\n// ---------------------------------------------------------------------------\n\nexport interface IListViewModel<TRow> {\n rows: TRow[];\n sort: { field: string; direction: \"ASC\" | \"DESC\" } | null;\n filters: Record<string, unknown>;\n search: string;\n appliedQuery: IDataSourceQuery | null;\n pagination: {\n hasMore: boolean;\n loading: boolean;\n loadingMore: boolean;\n totalCount: number;\n currentCount: number;\n };\n selection: {\n selectedIds: Set<string>;\n selectedCount: number;\n allSelected: boolean;\n label: string;\n };\n showingFilters: boolean;\n empty: boolean;\n emptyWithFilters: boolean;\n error: IListError | null;\n}\n\n// ---------------------------------------------------------------------------\n// ListActions\n// ---------------------------------------------------------------------------\n\nexport interface IListActions {\n search: {\n set(query: string): void;\n clear(): void;\n };\n sort: {\n set(field: string, direction: \"ASC\" | \"DESC\"): void;\n toggle(field: string): void;\n };\n filter: {\n set(key: string, value: unknown): void;\n clear(key: string): void;\n clearAll(): void;\n show(): void;\n hide(): void;\n };\n selection: {\n toggle(id: string): void;\n selectRangeTo(id: string): void;\n selectAll(): void;\n deselectAll(): void;\n selectRows(ids: string[]): void;\n isSelected(id: string): boolean;\n };\n loadMore(): Promise<void>;\n refresh(): Promise<void>;\n}\n\n// ---------------------------------------------------------------------------\n// ListPresenter abstraction\n// ---------------------------------------------------------------------------\n\nexport interface IListPresenter<TRow> {\n vm: IListViewModel<TRow>;\n actions: IListActions;\n init(config: IListPresenterConfig<TRow>): void;\n}\n\nexport const ListPresenter = createAbstraction<IListPresenter<any>>(\"ListPresenter\");\n\nexport namespace ListPresenter {\n export type Interface<TRow = any> = IListPresenter<TRow>;\n export type ViewModel<TRow = any> = IListViewModel<TRow>;\n export type Actions = IListActions;\n export type Config<TRow = any> = IListPresenterConfig<TRow>;\n export type Error = IListError;\n export type DataSource<TRow = any> = IDataSource<TRow>;\n export type DataSourceQuery = IDataSourceQuery;\n export type DataSourceResult<TRow = any> = IDataSourceResult<TRow>;\n}\n"],"names":["ListPresenter","createAbstraction"],"mappings":";AAgIO,MAAMA,gBAAgBC,kBAAuC"}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
export { ListPresenterFeature } from "./feature.js";
|
|
2
2
|
export { ListPresenter } from "./abstractions.js";
|
|
3
3
|
export type { IListPresenter, IListPresenterConfig, IListViewModel, IListActions, IListError, IDataSource, IDataSourceQuery, IDataSourceResult } from "./abstractions.js";
|
|
4
|
+
export { QueryMatcher } from "./QueryMatcher.js";
|
|
5
|
+
export type { QueryMatcherConfig } from "./QueryMatcher.js";
|
|
6
|
+
export { FolderAwareDataSource } from "./FolderAwareDataSource.js";
|
|
7
|
+
export type { FolderAwareDataSourceConfig, FetchParams, FetchResult } from "./FolderAwareDataSource.js";
|
|
8
|
+
export { SimpleDataSource } from "./SimpleDataSource.js";
|
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
export { ListPresenterFeature } from "./feature.js";
|
|
2
2
|
export { ListPresenter } from "./abstractions.js";
|
|
3
|
+
export { QueryMatcher } from "./QueryMatcher.js";
|
|
4
|
+
export { FolderAwareDataSource } from "./FolderAwareDataSource.js";
|
|
5
|
+
export { SimpleDataSource } from "./SimpleDataSource.js";
|