From 8fe3554d1a2a7b18814bf7cf5deab65cb7fb5ce4 Mon Sep 17 00:00:00 2001 From: "Christopher A. Flores" Date: Sun, 11 Feb 2024 14:44:12 -0600 Subject: [PATCH] feat: add base handler to commands --- packages/core/src/forms/axioma/commands/create-form.ts | 4 ++-- .../forms/axioma/commands/dispatch-on-failed-form-event.ts | 4 ++-- .../forms/axioma/commands/dispatch-on-success-form-event.ts | 4 ++-- .../src/forms/axioma/commands/filter-fields-by-form-mode.ts | 4 ++-- packages/core/src/forms/axioma/commands/generate-form-data.ts | 4 ++-- .../forms/axioma/commands/get-button-label-by-form-mode.ts | 4 ++-- .../core/src/forms/axioma/commands/get-title-by-form-mode.ts | 4 ++-- packages/core/src/forms/axioma/commands/load-remote-record.ts | 4 ++-- packages/core/src/forms/axioma/commands/normalize-buttons.ts | 4 ++-- packages/core/src/forms/axioma/commands/normalize-fields.ts | 4 ++-- packages/core/src/forms/axioma/commands/normalize-settings.ts | 4 ++-- .../core/src/forms/axioma/commands/reset-fields-by-form-id.ts | 4 ++-- packages/core/src/forms/axioma/commands/reset-fields.ts | 4 ++-- packages/core/src/forms/axioma/commands/save-form.ts | 4 ++-- packages/core/src/forms/axioma/commands/set-fields-errors.ts | 4 ++-- packages/core/src/forms/axioma/commands/set-fields-values.ts | 4 ++-- .../src/forms/axioma/commands/switch-form-to-create-mode.ts | 4 ++-- .../src/forms/axioma/commands/switch-form-to-update-mode.ts | 4 ++-- .../src/forms/axioma/commands/trigger-form-notification.ts | 4 ++-- .../axioma/commands/trigger-form-response-interceptor.ts | 4 ++-- .../core/src/forms/axioma/commands/validate-field-rules.ts | 4 ++-- packages/core/src/forms/axioma/commands/validate-form.ts | 4 ++-- packages/core/src/tables/axioma/commands/column-value.ts | 4 ++-- packages/core/src/tables/axioma/commands/create-table.ts | 4 ++-- packages/core/src/tables/axioma/commands/delete-record.ts | 4 ++-- packages/core/src/tables/axioma/commands/fetch-list-data.ts | 4 ++-- packages/core/src/tables/axioma/commands/normalize-columns.ts | 4 ++-- .../core/src/tables/axioma/commands/normalize-pagination.ts | 4 ++-- .../src/tables/axioma/commands/normalize-table-buttons.ts | 4 ++-- .../src/tables/axioma/commands/normalize-table-filters.ts | 4 ++-- .../core/src/tables/axioma/commands/normalize-table-list.ts | 4 ++-- .../src/tables/axioma/commands/normalize-table-settings.ts | 4 ++-- .../core/src/tables/axioma/commands/prepare-form-to-create.ts | 4 ++-- .../core/src/tables/axioma/commands/prepare-form-to-update.ts | 4 ++-- .../core/src/tables/axioma/commands/reset-table-pagination.ts | 4 ++-- packages/core/src/tables/axioma/commands/set-list-data.ts | 4 ++-- packages/core/src/tables/axioma/commands/update-row-value.ts | 4 ++-- 37 files changed, 74 insertions(+), 74 deletions(-) diff --git a/packages/core/src/forms/axioma/commands/create-form.ts b/packages/core/src/forms/axioma/commands/create-form.ts index 26495f2..85ce760 100644 --- a/packages/core/src/forms/axioma/commands/create-form.ts +++ b/packages/core/src/forms/axioma/commands/create-form.ts @@ -1,5 +1,5 @@ import { meta } from '@fancy-crud/bus' -import type { BaseCommand } from '@fancy-crud/bus' +import type { BaseCommand, BaseHandler } from '@fancy-crud/bus' import type { ResponseInterceptorState } from '@packages/core/common/response-interceptor/axioma' import type { NotificationState } from '@packages/core/common/notifications/axioma' import type { BaseObjectWithRawFields, Form, RawFormButtons, RawSetting } from '../typing' @@ -26,7 +26,7 @@ export class CreateFormCommand< ) {} } -export abstract class ICreateFormHandler { +export abstract class ICreateFormHandler implements BaseHandler { /** * Creates a form from raw fields and settings. * diff --git a/packages/core/src/forms/axioma/commands/dispatch-on-failed-form-event.ts b/packages/core/src/forms/axioma/commands/dispatch-on-failed-form-event.ts index 78fcc76..97ff115 100644 --- a/packages/core/src/forms/axioma/commands/dispatch-on-failed-form-event.ts +++ b/packages/core/src/forms/axioma/commands/dispatch-on-failed-form-event.ts @@ -1,5 +1,5 @@ import { meta } from '@fancy-crud/bus' -import type { BaseCommand } from '@fancy-crud/bus' +import type { BaseCommand, BaseHandler } from '@fancy-crud/bus' import type { StandardErrorResponseStructure } from '../typing' export class DispatchOnFailedFormEventCommand implements BaseCommand { @@ -11,6 +11,6 @@ export class DispatchOnFailedFormEventCommand implements BaseCommand { ) {} } -export abstract class IDispatchOnFailedFormEventHandler { +export abstract class IDispatchOnFailedFormEventHandler implements BaseHandler { abstract execute(command: DispatchOnFailedFormEventCommand): void } diff --git a/packages/core/src/forms/axioma/commands/dispatch-on-success-form-event.ts b/packages/core/src/forms/axioma/commands/dispatch-on-success-form-event.ts index 014cc19..f13882d 100644 --- a/packages/core/src/forms/axioma/commands/dispatch-on-success-form-event.ts +++ b/packages/core/src/forms/axioma/commands/dispatch-on-success-form-event.ts @@ -1,5 +1,5 @@ import { meta } from '@fancy-crud/bus' -import type { BaseCommand } from '@fancy-crud/bus' +import type { BaseCommand, BaseHandler } from '@fancy-crud/bus' import type { StandardErrorResponseStructure } from '../typing' export class DispatchOnSuccessFormEventCommand implements BaseCommand { @@ -11,6 +11,6 @@ export class DispatchOnSuccessFormEventCommand implements BaseCommand { ) {} } -export abstract class IDispatchOnSuccessFormEventHandler { +export abstract class IDispatchOnSuccessFormEventHandler implements BaseHandler { abstract execute(command: DispatchOnSuccessFormEventCommand): void } diff --git a/packages/core/src/forms/axioma/commands/filter-fields-by-form-mode.ts b/packages/core/src/forms/axioma/commands/filter-fields-by-form-mode.ts index e2b8fc9..6e9e4f5 100644 --- a/packages/core/src/forms/axioma/commands/filter-fields-by-form-mode.ts +++ b/packages/core/src/forms/axioma/commands/filter-fields-by-form-mode.ts @@ -1,5 +1,5 @@ import { meta } from '@fancy-crud/bus' -import type { BaseCommand } from '@fancy-crud/bus' +import type { BaseCommand, BaseHandler } from '@fancy-crud/bus' import type { BaseObjectWithNormalizedFields, FormMode, NormalizedField } from '@packages/core/forms/axioma' import { FORM_MODE, UnknownFormMode } from '@packages/core/forms/axioma' @@ -17,6 +17,6 @@ export class FilterFieldsByFormModeCommand({ mode, fields }: FilterFieldsByFormModeCommand): [string, T][] } diff --git a/packages/core/src/forms/axioma/commands/generate-form-data.ts b/packages/core/src/forms/axioma/commands/generate-form-data.ts index 64ff204..d962aee 100644 --- a/packages/core/src/forms/axioma/commands/generate-form-data.ts +++ b/packages/core/src/forms/axioma/commands/generate-form-data.ts @@ -1,4 +1,4 @@ -import type { BaseCommand } from '@fancy-crud/bus' +import type { BaseCommand, BaseHandler } from '@fancy-crud/bus' import type { BaseObjectWithNormalizedFields, NormalizedField } from '@packages/core/forms/axioma' import { meta } from '@fancy-crud/bus' @@ -24,7 +24,7 @@ export class GenerateFormDataCommand implem ) {} } -export abstract class INormalizeButtonsHandler { +export abstract class INormalizeButtonsHandler implements BaseHandler { abstract execute({ buttons }: NormalizeButtonsCommand): NormalizedFormButtons } diff --git a/packages/core/src/forms/axioma/commands/normalize-fields.ts b/packages/core/src/forms/axioma/commands/normalize-fields.ts index 639eaf4..1eb449a 100644 --- a/packages/core/src/forms/axioma/commands/normalize-fields.ts +++ b/packages/core/src/forms/axioma/commands/normalize-fields.ts @@ -1,5 +1,5 @@ import { meta } from '@fancy-crud/bus' -import type { BaseCommand } from '@fancy-crud/bus' +import type { BaseCommand, BaseHandler } from '@fancy-crud/bus' import type { BaseObjectWithRawFields, NormalizedFields } from '@packages/core/forms/axioma' export type NormalizeFormFieldsCommandInputType = BaseObjectWithRawFields @@ -17,7 +17,7 @@ export class NormalizeFormFieldsCommand @@ -13,6 +13,6 @@ export class ResetFieldsCommand implements BaseCommand { ) {} } -export abstract class IResetFieldsHandler { +export abstract class IResetFieldsHandler implements BaseHandler { abstract execute(command: ResetFieldsCommand): void } diff --git a/packages/core/src/forms/axioma/commands/save-form.ts b/packages/core/src/forms/axioma/commands/save-form.ts index eef2791..075e692 100644 --- a/packages/core/src/forms/axioma/commands/save-form.ts +++ b/packages/core/src/forms/axioma/commands/save-form.ts @@ -1,5 +1,5 @@ import { meta } from '@fancy-crud/bus' -import type { BaseCommand } from '@fancy-crud/bus' +import type { BaseCommand, BaseHandler } from '@fancy-crud/bus' import type { CreateRequestOptions, UpdateRequestOptions } from '@packages/core/common/http/axioma' export class SaveFormCommand implements BaseCommand { @@ -11,6 +11,6 @@ export class SaveFormCommand implements BaseCommand { ) {} } -export abstract class ISaveFormHandler { +export abstract class ISaveFormHandler implements BaseHandler { abstract execute(command: SaveFormCommand): void } diff --git a/packages/core/src/forms/axioma/commands/set-fields-errors.ts b/packages/core/src/forms/axioma/commands/set-fields-errors.ts index b766ac0..76b672e 100644 --- a/packages/core/src/forms/axioma/commands/set-fields-errors.ts +++ b/packages/core/src/forms/axioma/commands/set-fields-errors.ts @@ -1,5 +1,5 @@ import { meta } from '@fancy-crud/bus' -import type { BaseCommand } from '@fancy-crud/bus' +import type { BaseCommand, BaseHandler } from '@fancy-crud/bus' import type { BaseObjectWithNormalizedFields, FieldErrors, NormalizedField } from '@packages/core/forms/axioma' type MinimumNormalizedField = Pick @@ -16,6 +16,6 @@ export class SetFieldsErrorsCommand implements BaseCommand { /** * Class that fills the normalized fields of a form with corresponding values from a record. */ -export abstract class ISetFieldsErrorsHandler { +export abstract class ISetFieldsErrorsHandler implements BaseHandler { abstract execute({ normalizedFields, errors }: SetFieldsErrorsCommand): void } diff --git a/packages/core/src/forms/axioma/commands/set-fields-values.ts b/packages/core/src/forms/axioma/commands/set-fields-values.ts index 1e3626d..52fe754 100644 --- a/packages/core/src/forms/axioma/commands/set-fields-values.ts +++ b/packages/core/src/forms/axioma/commands/set-fields-values.ts @@ -1,4 +1,4 @@ -import type { BaseCommand } from '@fancy-crud/bus' +import type { BaseCommand, BaseHandler } from '@fancy-crud/bus' import { meta } from '@fancy-crud/bus' import type { BaseObjectWithNormalizedFields, NormalizedField, NormalizedSettings } from '@packages/core/forms/axioma' @@ -17,6 +17,6 @@ export class SetFieldsValuesCommand implements BaseCommand { ) {} } -export abstract class ISetFieldsValuesHandler { +export abstract class ISetFieldsValuesHandler implements BaseHandler { abstract execute(command: SetFieldsValuesCommand): void } diff --git a/packages/core/src/forms/axioma/commands/switch-form-to-create-mode.ts b/packages/core/src/forms/axioma/commands/switch-form-to-create-mode.ts index 9e33075..ebaeee4 100644 --- a/packages/core/src/forms/axioma/commands/switch-form-to-create-mode.ts +++ b/packages/core/src/forms/axioma/commands/switch-form-to-create-mode.ts @@ -1,4 +1,4 @@ -import type { BaseCommand } from '@fancy-crud/bus' +import type { BaseCommand, BaseHandler } from '@fancy-crud/bus' import { meta } from '@fancy-crud/bus' import type { BaseObjectWithNormalizedFields, NormalizedSettings, ObjectWithNormalizedButtons } from '@packages/core/forms/axioma' @@ -18,6 +18,6 @@ export class SwitchFormToCreateModeCommand implements BaseCommand { ) {} } -export abstract class ISwitchFormToCreateModeHandler { +export abstract class ISwitchFormToCreateModeHandler implements BaseHandler { abstract execute(command: SwitchFormToCreateModeCommand): void } diff --git a/packages/core/src/forms/axioma/commands/switch-form-to-update-mode.ts b/packages/core/src/forms/axioma/commands/switch-form-to-update-mode.ts index ca6592e..c59188c 100644 --- a/packages/core/src/forms/axioma/commands/switch-form-to-update-mode.ts +++ b/packages/core/src/forms/axioma/commands/switch-form-to-update-mode.ts @@ -1,6 +1,6 @@ import { meta } from '@fancy-crud/bus' import type { BaseObjectWithNormalizedFields, NormalizedSettings, ObjectWithNormalizedButtons } from '@packages/core/forms/axioma' -import type { BaseCommand } from '@fancy-crud/bus' +import type { BaseCommand, BaseHandler } from '@fancy-crud/bus' export type SwitchFormToUpdateModeCommandInput = symbol | { originalNormalizedFields: BaseObjectWithNormalizedFields @@ -18,6 +18,6 @@ export class SwitchFormToUpdateModeCommand implements BaseCommand { ) {} } -export abstract class ISwitchFormToUpdateModeHandler { +export abstract class ISwitchFormToUpdateModeHandler implements BaseHandler { abstract execute(command: SwitchFormToUpdateModeCommand): void } diff --git a/packages/core/src/forms/axioma/commands/trigger-form-notification.ts b/packages/core/src/forms/axioma/commands/trigger-form-notification.ts index 05f02de..0c9e237 100644 --- a/packages/core/src/forms/axioma/commands/trigger-form-notification.ts +++ b/packages/core/src/forms/axioma/commands/trigger-form-notification.ts @@ -1,5 +1,5 @@ import { meta } from '@fancy-crud/bus' -import type { BaseCommand } from '@fancy-crud/bus' +import type { BaseCommand, BaseHandler } from '@fancy-crud/bus' import type { NotificationType } from '@packages/core/common/notifications/axioma' export class TriggerFormNotificationCommand implements BaseCommand { @@ -11,6 +11,6 @@ export class TriggerFormNotificationCommand implements BaseCommand { ) {} } -export abstract class ITriggerFormNotificationHandler { +export abstract class ITriggerFormNotificationHandler implements BaseHandler { abstract execute(command: TriggerFormNotificationCommand): void } diff --git a/packages/core/src/forms/axioma/commands/trigger-form-response-interceptor.ts b/packages/core/src/forms/axioma/commands/trigger-form-response-interceptor.ts index 6bf4b5a..d0f2879 100644 --- a/packages/core/src/forms/axioma/commands/trigger-form-response-interceptor.ts +++ b/packages/core/src/forms/axioma/commands/trigger-form-response-interceptor.ts @@ -1,5 +1,5 @@ import { meta } from '@fancy-crud/bus' -import type { BaseCommand } from '@fancy-crud/bus' +import type { BaseCommand, BaseHandler } from '@fancy-crud/bus' import type { StandardErrorResponseStructure } from '../typing' export class TriggerFormResponseInterceptorCommand implements BaseCommand { @@ -12,6 +12,6 @@ export class TriggerFormResponseInterceptorCommand implements BaseCommand { ) {} } -export abstract class ITriggerFormResponseInterceptorHandler { +export abstract class ITriggerFormResponseInterceptorHandler implements BaseHandler { abstract execute(command: TriggerFormResponseInterceptorCommand): void } diff --git a/packages/core/src/forms/axioma/commands/validate-field-rules.ts b/packages/core/src/forms/axioma/commands/validate-field-rules.ts index 49516ee..4f352f5 100644 --- a/packages/core/src/forms/axioma/commands/validate-field-rules.ts +++ b/packages/core/src/forms/axioma/commands/validate-field-rules.ts @@ -1,5 +1,5 @@ import { meta } from '@fancy-crud/bus' -import type { BaseCommand } from '@fancy-crud/bus' +import type { BaseCommand, BaseHandler } from '@fancy-crud/bus' import type { NormalizedField, Rule, RuleConfig, RuleResult } from '@packages/core/forms/axioma' export type NormalizedFieldToValidate = Pick & { rules?: Rule } @@ -13,6 +13,6 @@ export class ValidateFieldRulesCommand implements BaseCommand { ) {} } -export abstract class IValidateFieldRulesHandler { +export abstract class IValidateFieldRulesHandler implements BaseHandler { abstract execute(command: ValidateFieldRulesCommand): RuleResult } diff --git a/packages/core/src/forms/axioma/commands/validate-form.ts b/packages/core/src/forms/axioma/commands/validate-form.ts index 5e4426b..0b6cbd3 100644 --- a/packages/core/src/forms/axioma/commands/validate-form.ts +++ b/packages/core/src/forms/axioma/commands/validate-form.ts @@ -1,4 +1,4 @@ -import type { BaseCommand } from '@fancy-crud/bus' +import type { BaseCommand, BaseHandler } from '@fancy-crud/bus' import type { BaseObjectWithNormalizedFields, NormalizedField, RuleConfig } from '@packages/core/forms/axioma' import { meta } from '@fancy-crud/bus' @@ -13,6 +13,6 @@ export class ValidateFormCommand implements BaseCommand { ) {} } -export abstract class IValidateFormHandler { +export abstract class IValidateFormHandler implements BaseHandler { abstract execute({ fields, options }: ValidateFormCommand): boolean } diff --git a/packages/core/src/tables/axioma/commands/column-value.ts b/packages/core/src/tables/axioma/commands/column-value.ts index 467c001..85b384f 100644 --- a/packages/core/src/tables/axioma/commands/column-value.ts +++ b/packages/core/src/tables/axioma/commands/column-value.ts @@ -1,4 +1,4 @@ -import type { BaseCommand } from '@fancy-crud/bus' +import type { BaseCommand, BaseHandler } from '@fancy-crud/bus' import { meta } from '@fancy-crud/bus' import type { NormalizedColumn } from '../typing' @@ -12,6 +12,6 @@ export class GetColumnValueCommand implements BaseCommand { ) {} } -export abstract class IGetColumnValueHandler { +export abstract class IGetColumnValueHandler implements BaseHandler { abstract execute({ row, column, rowIndex }: GetColumnValueCommand): unknown } diff --git a/packages/core/src/tables/axioma/commands/create-table.ts b/packages/core/src/tables/axioma/commands/create-table.ts index a6e10a0..50431ce 100644 --- a/packages/core/src/tables/axioma/commands/create-table.ts +++ b/packages/core/src/tables/axioma/commands/create-table.ts @@ -1,4 +1,4 @@ -import type { BaseCommand } from '@fancy-crud/bus' +import type { BaseCommand, BaseHandler } from '@fancy-crud/bus' import type { BaseTableForm, MappedRawColumn, ObjectWithRawColumns, RawTableFilters, RawTableList, RawTablePagination, RawTableSettings, Table } from '@packages/core/tables/axioma' import { meta } from '@fancy-crud/bus' import type { RawTableButtons } from '../typing/buttons' @@ -25,6 +25,6 @@ export class CreateTableCommand< ) {} } -export abstract class ICreateTableHandler { +export abstract class ICreateTableHandler implements BaseHandler { abstract execute(command: CreateTableCommand): Table } diff --git a/packages/core/src/tables/axioma/commands/delete-record.ts b/packages/core/src/tables/axioma/commands/delete-record.ts index 4cdd7fc..25366bb 100644 --- a/packages/core/src/tables/axioma/commands/delete-record.ts +++ b/packages/core/src/tables/axioma/commands/delete-record.ts @@ -1,5 +1,5 @@ import type { DeleteRecordOptions, NormalizedTableSettings, Row } from '@packages/core/tables/axioma' -import type { BaseCommand } from '@fancy-crud/bus' +import type { BaseCommand, BaseHandler } from '@fancy-crud/bus' import { meta } from '@fancy-crud/bus' export class DeleteRecordCommand implements BaseCommand { @@ -13,6 +13,6 @@ export class DeleteRecordCommand implements BaseCommand { ) {} } -export abstract class IDeleteRecordHandler { +export abstract class IDeleteRecordHandler implements BaseHandler { abstract execute({ row, options, tableSettings }: DeleteRecordCommand): void } diff --git a/packages/core/src/tables/axioma/commands/fetch-list-data.ts b/packages/core/src/tables/axioma/commands/fetch-list-data.ts index 74de830..85d890e 100644 --- a/packages/core/src/tables/axioma/commands/fetch-list-data.ts +++ b/packages/core/src/tables/axioma/commands/fetch-list-data.ts @@ -1,4 +1,4 @@ -import type { BaseCommand } from '@fancy-crud/bus' +import type { BaseCommand, BaseHandler } from '@fancy-crud/bus' import { meta } from '@fancy-crud/bus' import type { ListRequestOptions } from '@packages/core/common/http/axioma' @@ -12,6 +12,6 @@ export class FetchListDataCommand implements BaseCommand { ) {} } -export abstract class IFetchListDataHandler { +export abstract class IFetchListDataHandler implements BaseHandler { abstract execute(command: FetchListDataCommand): void } diff --git a/packages/core/src/tables/axioma/commands/normalize-columns.ts b/packages/core/src/tables/axioma/commands/normalize-columns.ts index fbb246e..c62c007 100644 --- a/packages/core/src/tables/axioma/commands/normalize-columns.ts +++ b/packages/core/src/tables/axioma/commands/normalize-columns.ts @@ -1,4 +1,4 @@ -import type { BaseCommand } from '@fancy-crud/bus' +import type { BaseCommand, BaseHandler } from '@fancy-crud/bus' import { meta } from '@fancy-crud/bus' import type { BaseFormField, ObjectWithNormalizedColumns, ObjectWithRawColumns } from '@packages/core/tables/axioma' @@ -11,6 +11,6 @@ export class NormalizeColumnsCommand implements BaseCommand { ) {} } -export abstract class INormalizeColumnsHandler { +export abstract class INormalizeColumnsHandler implements BaseHandler { abstract execute({ fields, columns }: NormalizeColumnsCommand): ObjectWithNormalizedColumns } diff --git a/packages/core/src/tables/axioma/commands/normalize-pagination.ts b/packages/core/src/tables/axioma/commands/normalize-pagination.ts index 6aac6ba..f13a627 100644 --- a/packages/core/src/tables/axioma/commands/normalize-pagination.ts +++ b/packages/core/src/tables/axioma/commands/normalize-pagination.ts @@ -1,4 +1,4 @@ -import type { BaseCommand } from '@fancy-crud/bus' +import type { BaseCommand, BaseHandler } from '@fancy-crud/bus' import { meta } from '@fancy-crud/bus' import type { NormalizedTablePagination, RawTablePagination } from '@packages/core/tables/axioma' @@ -10,6 +10,6 @@ export class NormalizePaginationCommand implements BaseCommand { ) {} } -export abstract class INormalizePaginationHandler { +export abstract class INormalizePaginationHandler implements BaseHandler { abstract execute({ rawPagination }: NormalizePaginationCommand): NormalizedTablePagination } diff --git a/packages/core/src/tables/axioma/commands/normalize-table-buttons.ts b/packages/core/src/tables/axioma/commands/normalize-table-buttons.ts index 4d1bb5d..b0db05d 100644 --- a/packages/core/src/tables/axioma/commands/normalize-table-buttons.ts +++ b/packages/core/src/tables/axioma/commands/normalize-table-buttons.ts @@ -1,5 +1,5 @@ import { meta } from '@fancy-crud/bus' -import type { BaseCommand } from '@fancy-crud/bus' +import type { BaseCommand, BaseHandler } from '@fancy-crud/bus' import type { NormalizedTableButtons, RawTableButtons } from '../typing/buttons' export class NormalizeTableButtonsCommand implements BaseCommand { @@ -10,6 +10,6 @@ export class NormalizeTableButtonsCommand implements ) {} } -export abstract class INormalizeTableButtonsHandler { +export abstract class INormalizeTableButtonsHandler implements BaseHandler { abstract execute({ buttons }: NormalizeTableButtonsCommand): NormalizedTableButtons } diff --git a/packages/core/src/tables/axioma/commands/normalize-table-filters.ts b/packages/core/src/tables/axioma/commands/normalize-table-filters.ts index d6aa000..cf7edfb 100644 --- a/packages/core/src/tables/axioma/commands/normalize-table-filters.ts +++ b/packages/core/src/tables/axioma/commands/normalize-table-filters.ts @@ -1,4 +1,4 @@ -import type { BaseCommand } from '@fancy-crud/bus' +import type { BaseCommand, BaseHandler } from '@fancy-crud/bus' import { meta } from '@fancy-crud/bus' import type { NormalizedTableFilters, RawTableFilters } from '..' @@ -10,6 +10,6 @@ export class NormalizeTableFiltersCommand implements ) {} } -export abstract class INormalizeTableFiltersHandler { +export abstract class INormalizeTableFiltersHandler implements BaseHandler { abstract execute({ rawFilters }: NormalizeTableFiltersCommand): T & NormalizedTableFilters } diff --git a/packages/core/src/tables/axioma/commands/normalize-table-list.ts b/packages/core/src/tables/axioma/commands/normalize-table-list.ts index c56ef0e..07fa83f 100644 --- a/packages/core/src/tables/axioma/commands/normalize-table-list.ts +++ b/packages/core/src/tables/axioma/commands/normalize-table-list.ts @@ -1,4 +1,4 @@ -import type { BaseCommand } from '@fancy-crud/bus' +import type { BaseCommand, BaseHandler } from '@fancy-crud/bus' import { meta } from '@fancy-crud/bus' import type { NormalizedTableList, RawTableList } from '..' @@ -10,6 +10,6 @@ export class NormalizeTableListCommand implements BaseCo ) {} } -export abstract class INormalizeTableListHandler { +export abstract class INormalizeTableListHandler implements BaseHandler { abstract execute({ rawList }: NormalizeTableListCommand): T & NormalizedTableList } diff --git a/packages/core/src/tables/axioma/commands/normalize-table-settings.ts b/packages/core/src/tables/axioma/commands/normalize-table-settings.ts index c0c3a3d..a0673ad 100644 --- a/packages/core/src/tables/axioma/commands/normalize-table-settings.ts +++ b/packages/core/src/tables/axioma/commands/normalize-table-settings.ts @@ -1,5 +1,5 @@ import type { NormalizedTableSettings, RawTableSettings } from '@packages/core/tables/axioma' -import type { BaseCommand } from '@fancy-crud/bus' +import type { BaseCommand, BaseHandler } from '@fancy-crud/bus' import { meta } from '@fancy-crud/bus' export class NormalizeTableSettingsCommand implements BaseCommand { @@ -10,6 +10,6 @@ export class NormalizeTableSettingsCommand implement ) {} } -export abstract class INormalizeTableSettingsHandler { +export abstract class INormalizeTableSettingsHandler implements BaseHandler { abstract execute({ rawSettings }: NormalizeTableSettingsCommand): T & NormalizedTableSettings } diff --git a/packages/core/src/tables/axioma/commands/prepare-form-to-create.ts b/packages/core/src/tables/axioma/commands/prepare-form-to-create.ts index fe07543..4b8f661 100644 --- a/packages/core/src/tables/axioma/commands/prepare-form-to-create.ts +++ b/packages/core/src/tables/axioma/commands/prepare-form-to-create.ts @@ -1,4 +1,4 @@ -import type { BaseCommand } from '@fancy-crud/bus' +import type { BaseCommand, BaseHandler } from '@fancy-crud/bus' import { meta } from '@fancy-crud/bus' export class PrepareFormToCreateCommand implements BaseCommand { @@ -10,6 +10,6 @@ export class PrepareFormToCreateCommand implements BaseCommand { ) {} } -export abstract class IPrepareFormToCreateHandler { +export abstract class IPrepareFormToCreateHandler implements BaseHandler { abstract execute({ formId, options }: PrepareFormToCreateCommand): void } diff --git a/packages/core/src/tables/axioma/commands/prepare-form-to-update.ts b/packages/core/src/tables/axioma/commands/prepare-form-to-update.ts index 2697c0c..7cf3a7b 100644 --- a/packages/core/src/tables/axioma/commands/prepare-form-to-update.ts +++ b/packages/core/src/tables/axioma/commands/prepare-form-to-update.ts @@ -1,5 +1,5 @@ import type { Row } from '@packages/core/tables/axioma' -import type { BaseCommand } from '@fancy-crud/bus' +import type { BaseCommand, BaseHandler } from '@fancy-crud/bus' import { meta } from '@fancy-crud/bus' export class PrepareFormToUpdateCommand implements BaseCommand { @@ -13,6 +13,6 @@ export class PrepareFormToUpdateCommand implements BaseCommand { ) {} } -export abstract class IPrepareFormToUpdateHandler { +export abstract class IPrepareFormToUpdateHandler implements BaseHandler { abstract execute({ formId, options, tableSettings, row }: PrepareFormToUpdateCommand): void } diff --git a/packages/core/src/tables/axioma/commands/reset-table-pagination.ts b/packages/core/src/tables/axioma/commands/reset-table-pagination.ts index 4bb7dc5..9a2fc0e 100644 --- a/packages/core/src/tables/axioma/commands/reset-table-pagination.ts +++ b/packages/core/src/tables/axioma/commands/reset-table-pagination.ts @@ -1,4 +1,4 @@ -import type { BaseCommand } from '@fancy-crud/bus' +import type { BaseCommand, BaseHandler } from '@fancy-crud/bus' import { meta } from '@fancy-crud/bus' export class ResetTablePaginationCommand implements BaseCommand { @@ -9,6 +9,6 @@ export class ResetTablePaginationCommand implements BaseCommand { ) {} } -export abstract class IResetTablePaginationHandler { +export abstract class IResetTablePaginationHandler implements BaseHandler { abstract execute(command: ResetTablePaginationCommand): void } diff --git a/packages/core/src/tables/axioma/commands/set-list-data.ts b/packages/core/src/tables/axioma/commands/set-list-data.ts index bb7f226..bb310ce 100644 --- a/packages/core/src/tables/axioma/commands/set-list-data.ts +++ b/packages/core/src/tables/axioma/commands/set-list-data.ts @@ -1,4 +1,4 @@ -import type { BaseCommand } from '@fancy-crud/bus' +import type { BaseCommand, BaseHandler } from '@fancy-crud/bus' import { meta } from '@fancy-crud/bus' export class SetListDataCommand implements BaseCommand { @@ -10,6 +10,6 @@ export class SetListDataCommand implements BaseCommand { ) {} } -export abstract class ISetListDataHandler { +export abstract class ISetListDataHandler implements BaseHandler { abstract execute(command: SetListDataCommand): void } diff --git a/packages/core/src/tables/axioma/commands/update-row-value.ts b/packages/core/src/tables/axioma/commands/update-row-value.ts index 3d80341..5bb708c 100644 --- a/packages/core/src/tables/axioma/commands/update-row-value.ts +++ b/packages/core/src/tables/axioma/commands/update-row-value.ts @@ -1,5 +1,5 @@ import type { NormalizedTableSettings, Row } from '@packages/core/tables/axioma' -import type { BaseCommand } from '@fancy-crud/bus' +import type { BaseCommand, BaseHandler } from '@fancy-crud/bus' import type { RetrieveRequestOptions } from '@packages/core/common/http/axioma' import { meta } from '@fancy-crud/bus' @@ -15,6 +15,6 @@ export class UpdateRowValueCommand implements BaseCommand { ) {} } -export abstract class IUpdateRowValueHandler { +export abstract class IUpdateRowValueHandler implements BaseHandler { abstract execute({ newValue, row, field, tableSettings, options }: UpdateRowValueCommand): void }