@messaia/cdk 20.0.7 → 20.0.8
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/fesm2022/messaia-cdk.mjs +39 -2
- package/fesm2022/messaia-cdk.mjs.map +1 -1
- package/index.d.ts +54 -2
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -742,6 +742,40 @@ declare enum MessageType {
|
|
|
742
742
|
Error = 2
|
|
743
743
|
}
|
|
744
744
|
|
|
745
|
+
interface DialogButtonConfig<TResult = any> {
|
|
746
|
+
/**
|
|
747
|
+
* Label text displayed on the button
|
|
748
|
+
* @type {string}
|
|
749
|
+
*/
|
|
750
|
+
text: string;
|
|
751
|
+
/**
|
|
752
|
+
* Button color (primary, accent, warn, etc.)
|
|
753
|
+
* @type {'primary' | 'accent' | 'warn' | undefined}
|
|
754
|
+
*/
|
|
755
|
+
color?: 'primary' | 'accent' | 'warn' | undefined;
|
|
756
|
+
/**
|
|
757
|
+
* Button type (flat, stroked, raised, basic)
|
|
758
|
+
* @type {'flat' | 'stroked' | 'raised' | 'basic' | undefined}
|
|
759
|
+
*/
|
|
760
|
+
type?: 'flat' | 'stroked' | 'raised' | 'basic';
|
|
761
|
+
/**
|
|
762
|
+
* Determines when the button should be displayed
|
|
763
|
+
* @type {'always' | 'inProgress' | 'succeeded' | 'failed'}
|
|
764
|
+
*/
|
|
765
|
+
showWhen?: 'always' | 'inProgress' | 'succeeded' | 'failed';
|
|
766
|
+
/**
|
|
767
|
+
* Callback executed when the button is clicked
|
|
768
|
+
* @param result - The task result if available
|
|
769
|
+
* @param dialogRef - Reference to the dialog instance
|
|
770
|
+
*/
|
|
771
|
+
callback?: (result: TResult, dialogRef: MatDialogRef<any, TResult>) => void;
|
|
772
|
+
/**
|
|
773
|
+
* Indicates whether the dialog should close after the button is clicked
|
|
774
|
+
* @type {boolean}
|
|
775
|
+
*/
|
|
776
|
+
closeOnClick?: boolean;
|
|
777
|
+
}
|
|
778
|
+
|
|
745
779
|
/**
|
|
746
780
|
* Represents a function that shows a confirmation dialog before executing an Observable operation.
|
|
747
781
|
*
|
|
@@ -765,6 +799,7 @@ type ShowConfirmationDialog = (message: string, observable: Observable<any>, suc
|
|
|
765
799
|
* @param options.errorMessage - Message displayed if the task fails.
|
|
766
800
|
* @param options.successButtonText - Text for the success action button (e.g., "Download").
|
|
767
801
|
* @param options.task - An Observable representing the asynchronous task to execute.
|
|
802
|
+
* @param options.buttons - Optional array of dynamic buttons to display in the dialog.
|
|
768
803
|
* @param options.successButtonClick - Callback triggered when the success button is clicked; receives the task result and dialog reference.
|
|
769
804
|
* @param options.successCallback - Optional callback triggered after successful completion of the task.
|
|
770
805
|
*/
|
|
@@ -775,7 +810,8 @@ type ShowTaskDialog = <T>(options: {
|
|
|
775
810
|
errorMessage: string;
|
|
776
811
|
successButtonText: string;
|
|
777
812
|
task: Observable<T>;
|
|
778
|
-
|
|
813
|
+
buttons?: DialogButtonConfig<T>[];
|
|
814
|
+
successButtonClick?: (result: T, dialogRef: any) => void;
|
|
779
815
|
successCallback?: () => void;
|
|
780
816
|
}) => void;
|
|
781
817
|
|
|
@@ -7777,6 +7813,11 @@ declare class TaskDialogData<TResult> {
|
|
|
7777
7813
|
* @type {Function}
|
|
7778
7814
|
*/
|
|
7779
7815
|
successButtonClick?: (result: TResult, dialogRef: MatDialogRef<any, TResult>) => void;
|
|
7816
|
+
/**
|
|
7817
|
+
* Optional dynamic button configurations for the dialog
|
|
7818
|
+
* @type {DialogButtonConfig<TResult>[]}
|
|
7819
|
+
*/
|
|
7820
|
+
buttons?: DialogButtonConfig<TResult>[];
|
|
7780
7821
|
/**
|
|
7781
7822
|
* Initializes a new instance of the TaskDialogData class.
|
|
7782
7823
|
* @param {Partial<TaskDialogData>} init - Optional initialization values for setting properties.
|
|
@@ -7835,6 +7876,17 @@ declare class VdTaskDialogComponent implements AfterViewInit, OnDestroy {
|
|
|
7835
7876
|
* Closes the dialog and returns the task result on success.
|
|
7836
7877
|
*/
|
|
7837
7878
|
success(): void;
|
|
7879
|
+
/**
|
|
7880
|
+
* Determines whether a button should be visible based on its showWhen rule.
|
|
7881
|
+
* @param showWhen The condition that specifies when the button is displayed.
|
|
7882
|
+
*/
|
|
7883
|
+
shouldShow(showWhen: DialogButtonConfig['showWhen']): boolean;
|
|
7884
|
+
/**
|
|
7885
|
+
* Handles the click event of a dynamic button.
|
|
7886
|
+
* Executes its callback if provided and closes the dialog if required.
|
|
7887
|
+
* @param btn The button configuration object.
|
|
7888
|
+
*/
|
|
7889
|
+
onButtonClick(btn: DialogButtonConfig): void;
|
|
7838
7890
|
/**
|
|
7839
7891
|
* Lifecycle hook for component cleanup on destruction.
|
|
7840
7892
|
* Ensures that any ongoing task is cancelled.
|
|
@@ -13365,4 +13417,4 @@ declare class TableStaticDataSource<TEntity> extends MatTableDataSource<TEntity>
|
|
|
13365
13417
|
}
|
|
13366
13418
|
|
|
13367
13419
|
export { AbstractMatFormField, AbstractSelectFormField, ActionItem, Api, ApiResponse, AppEvent, AppEventType, AppSetting, AppStorage, AsyncValidationDirective, AuditEntity, AuditUser, AuthHelper, AuthUser, AutofocusDirective, BaseComponent, BaseDirective, BaseEntity, BaseInterceptor, BaseService, BindPipe, CachingInterceptor, Column, ColumnObject, Common, CommonError, CommonHandlerContext, ConfirmExitGuard, ContextHelper, DIALOG_PROVIDER, DIALOG_PROVIDER_FACTORY, DataSourceFilterDirective, DataSourcePipe, DatePickerHeaderComponent, DisableControlDirective, Display, DisplayNameNumberProjection, DisplayNameProjection, DynamicBuilder, DynamicComponentCompiler, EXPORT_DIALOG_COMPONENT, EmptyStringResetDirective, EnumMetadata, EnumPipe, EnumService, EqualValidator, ErrorMessageBindingStrategy, EventQueueService, Facet, FacetValue, FieldFuncPipe, FileControlDirective, FileService, FileSizePipe, FilterClearComponent, FilterDateComponent, FilterGlue, FilterInputComponent, FilterOperator, FilterPipe, FilterSelectComponent, FirstLetterPipe, Form, FormArrayPipe, FormBuilderConfiguration, FormControlPipe, FormDefinition, FormField, FormFieldDefinition, FormFieldGroup, FormFieldGroupDefinition, FormFieldType, FormGroupPipe, FuncPipe, GenericEmbeddedListComponent, GenericFormBaseComponent, GenericFormComponent, GenericListComponent, GenericReactiveFormComponent, GenericService, GlobalRoles, Grid, GroupFilterPipe, HtmlControlTemplateDirective, IAbstractControl, Icon, ImageFileControlDirective, IpVersion, KeyValue, KeysPipe, LayoutToggle, LoadingScreenInterceptor, LoadingScreenService, MEDIA_PROVIDER, MEDIA_PROVIDER_FACTORY, MatFormFieldEditorDirective, MatFormFieldReadonlyDirective, Menu, MenuClient, MenuDepartment, MenuFormIncludesResolve, MenuItem, MenuItemClient, MenuItemDepartment, MenuItemFormIncludesResolve, MenuItemService, MenuItemTarget, MenuListProjectionResolve, MenuResolve, MenuScope, MenuSettings, MenuSettingsResolve, MessageType, ModifiableEntity, MonthNamePipe, NameNumberProjection, NameProjection, NativeElementInjectorDirective, NumericValueType, OnlyNumberDirective, OrderPipe, Pagination, PaginatorIntl, ParseDecimalDirective, Permission, PlaceholderPipe, PrintService, PropertyJoinPipe, ReactiveFormConfig, ReactiveTypedFormsModule, ResetFormType, RxFormArray, RxFormBuilder, RxFormControl, RxFormControlDirective, RxFormGroup, RxReactiveFormsModule, RxwebFormDirective, RxwebValidators, SafeHtmlPipe, Salutation, SaveAction, SplitPipe, SubMenuResolve, SuffixButton, Table, TableColumn, TableColumnConfig, TableColumnType, TableConfig, TableDataSource, TableDefinition, TableQueryConfig, TableStaticDataSource, TaskDialogData, Templates, TimePipe, TitleCase, TitleProjection, TruncatePipe, TypedForm, TypedFormBuilder, UniqueValidatorDirective, UrlValidationType, Utils, ValidationAlphabetLocale, ValueAccessorBase, ValuesPipe, VdAlertDialogComponent, VdChipsComponent, VdCodeDirective, VdConfirmDialogComponent, VdCustomDirective, VdDelayedHoverDirective, VdDialogActionsDirective, VdDialogComponent, VdDialogContentDirective, VdDialogService, VdDialogTitleDirective, VdDynamicMenuComponent, VdDynamicTableComponent, VdDynamicTableConfigDialogComponent, VdEditorDirective, VdFileDirective, VdFileInputComponent, VdFileModule, VdFilterOptionDirective, VdGenericFormComponent, VdGenericFormCustomFieldDirective, VdLayoutCardOverComponent, VdLayoutCloseDirective, VdLayoutCompactComponent, VdLayoutComponent, VdLayoutFooterComponent, VdLayoutManageListCloseDirective, VdLayoutManageListComponent, VdLayoutManageListOpenDirective, VdLayoutManageListToggleDirective, VdLayoutNavComponent, VdLayoutNavListCloseDirective, VdLayoutNavListComponent, VdLayoutNavListOpenDirective, VdLayoutNavListToggleDirective, VdLayoutOpenDirective, VdLayoutToggleDirective, VdListOptionDirective, VdListToolbarComponent, VdMediaService, VdMediaToggleDirective, VdMenuComponent, VdNavigationDrawerComponent, VdNavigationDrawerMenuDirective, VdNavigationDrawerToolbarDirective, VdPromptDialogComponent, VdSelectComponent, VdSelectOptionDirective, VdSelectTriggerDirective, VdTableFieldDirective, VdTaskDialogComponent, allOf, allOfAsync, alpha, alphaAsync, alphaNumeric, alphaNumericAsync, and, ascii, async, blacklist, choice, choiceAsync, compare, compose, contains, containsAsync, creditCard, creditCardAsync, cusip, custom, customAsync, dataUri, date, dateAsync, different, digit, disable, elementClass, email, endpointMetadataKey, endsWith, endsWithAsync, error, escape, even, extension, extensionAsync, factor, factorAsync, file, fileAsync, fileSize, fileSizeAsync, formDefinitionMetadataKey, formFieldGroupsMetadataKey, formFieldsMetadataKey, getDisplay, getEndpoint, getFormDefinition, getFormGroups, getTableDefinition, greaterThan, greaterThanAsync, greaterThanEqualTo, greaterThanEqualToAsync, grid, headerMetadataKey, hexColor, image, imageAsync, json, latLong, latitude, leapYear, lessThan, lessThanAsync, lessThanEqualTo, lessThanEqualToAsync, longitude, lowerCase, ltrim, mac, mask, maxDate, maxDateAsync, maxLength, maxLengthAsync, maxNumber, maxNumberAsync, maxTime, maxTimeAsync, minDate, minDateAsync, minLength, minLengthAsync, minNumber, minNumberAsync, minTime, minTimeAsync, mixinDisableRipple, mixinDisabled, model, noneOf, noneOfAsync, not, notEmpty, numeric, numericAsync, odd, oneOf, oneOfAsync, or, password, passwordAsync, pattern, patternAsync, port, prefix, primeNumber, prop, propArray, propObject, range, rangeAsync, required, requiredTrue, rtrim, rule, sanitize, startsWith, startsWithAsync, stripLow, suffix, tableColumnsMetadataKey, tableDefinitionMetadataKey, time, timeAsync, toBoolean, toDate, toDouble, toFloat, toInt, toString, trim, unique, updateOn, upperCase, url, urlAsync, vdCollapseAnimation, whitelist };
|
|
13368
|
-
export type { AppFormGroup, CanComponentDeactivate, Constructor$1 as Constructor, Delegate, EditorChange, EnumItem, Filter, FilterField, FormGroupExtension, IAlertConfig, IBaseComponent, ICanDisable, ICanDisableRipple, ICollapseAnimation, ICommonHandlerContext, IConfirmConfig, IDialogConfig, IEntity, IFormGroup, IGenericFormBaseComponent, IGenericListComponent, IGenericReactiveFormBaseComponent, ILayoutTogglable, IPromptConfig, Options, ShowConfirmationDialog, ShowTaskDialog };
|
|
13420
|
+
export type { AppFormGroup, CanComponentDeactivate, Constructor$1 as Constructor, Delegate, DialogButtonConfig, EditorChange, EnumItem, Filter, FilterField, FormGroupExtension, IAlertConfig, IBaseComponent, ICanDisable, ICanDisableRipple, ICollapseAnimation, ICommonHandlerContext, IConfirmConfig, IDialogConfig, IEntity, IFormGroup, IGenericFormBaseComponent, IGenericListComponent, IGenericReactiveFormBaseComponent, ILayoutTogglable, IPromptConfig, Options, ShowConfirmationDialog, ShowTaskDialog };
|