monkey-style-guide 21.2.24 → 21.2.26
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.
|
Binary file
|
package/package.json
CHANGED
|
@@ -978,6 +978,9 @@ interface MonkeyFilterBarStatusOption {
|
|
|
978
978
|
readonly value: string;
|
|
979
979
|
readonly description: string;
|
|
980
980
|
}
|
|
981
|
+
type MonkeyFilterOperator = 'EQ' | 'NEQ' | 'LIKE' | 'NOT_LIKE' | 'STARTS_WITH' | 'ENDS_WITH' | 'IS_EMPTY' | 'BETWEEN' | 'GT' | 'LT' | 'BEFORE' | 'AFTER';
|
|
982
|
+
type MonkeyFilterCondition = MonkeyFilterOperator | '';
|
|
983
|
+
type MonkeyFilterConditionsByType = Partial<Record<MonkeyFilterBarType, readonly MonkeyFilterOperator[]>>;
|
|
981
984
|
interface MonkeyFilterBarOption {
|
|
982
985
|
readonly key: string;
|
|
983
986
|
readonly label: string;
|
|
@@ -988,12 +991,12 @@ interface MonkeyFilterBarOption {
|
|
|
988
991
|
readonly maxDate?: Date | string;
|
|
989
992
|
readonly currency?: string;
|
|
990
993
|
readonly statusOptions?: readonly MonkeyFilterBarStatusOption[];
|
|
994
|
+
readonly conditions?: readonly MonkeyFilterOperator[];
|
|
991
995
|
}
|
|
992
996
|
interface MonkeyFilterBarConfig {
|
|
993
997
|
readonly filterOptions: readonly MonkeyFilterBarOption[];
|
|
998
|
+
readonly conditions?: MonkeyFilterConditionsByType;
|
|
994
999
|
}
|
|
995
|
-
type MonkeyFilterOperator = 'EQ' | 'NEQ' | 'LIKE' | 'NOT_LIKE' | 'STARTS_WITH' | 'ENDS_WITH' | 'IS_EMPTY' | 'BETWEEN' | 'GT' | 'LT' | 'BEFORE' | 'AFTER';
|
|
996
|
-
type MonkeyFilterCondition = MonkeyFilterOperator | '';
|
|
997
1000
|
type MonkeyFilterArity = 0 | 1 | 2;
|
|
998
1001
|
type MonkeyFilterPanel = 'none' | 'status' | 'field' | 'date-day' | 'date-range';
|
|
999
1002
|
type MonkeyFilterOperand = {
|
|
@@ -1024,7 +1027,9 @@ interface MonkeyFilterRow {
|
|
|
1024
1027
|
readonly condition: MonkeyFilterCondition;
|
|
1025
1028
|
readonly operands: readonly MonkeyFilterOperand[];
|
|
1026
1029
|
}
|
|
1027
|
-
declare function
|
|
1030
|
+
declare function supportedConditionsOf(type: MonkeyFilterBarType): readonly MonkeyFilterOperator[];
|
|
1031
|
+
declare function conditionsOf(type: MonkeyFilterBarType, requested?: readonly MonkeyFilterOperator[]): readonly MonkeyFilterOperator[];
|
|
1032
|
+
declare function conditionsForOption(option: Pick<MonkeyFilterBarOption, 'type' | 'conditions'> | undefined, byType?: MonkeyFilterConditionsByType): readonly MonkeyFilterOperator[];
|
|
1028
1033
|
declare function arityOf(condition: MonkeyFilterCondition): MonkeyFilterArity;
|
|
1029
1034
|
declare function panelOf(type: MonkeyFilterBarType, condition: MonkeyFilterCondition): MonkeyFilterPanel;
|
|
1030
1035
|
declare function isComplete(row: MonkeyFilterRow): boolean;
|
|
@@ -1035,7 +1040,7 @@ declare function withType(row: MonkeyFilterRow, next: {
|
|
|
1035
1040
|
label: string;
|
|
1036
1041
|
icon?: string;
|
|
1037
1042
|
type: MonkeyFilterBarType;
|
|
1038
|
-
}): MonkeyFilterRow;
|
|
1043
|
+
}, allowed?: readonly MonkeyFilterOperator[]): MonkeyFilterRow;
|
|
1039
1044
|
|
|
1040
1045
|
/** ************************
|
|
1041
1046
|
* Copyright Monkey Exchange. All Rights Reserved
|
|
@@ -1084,6 +1089,7 @@ declare class MonkeyFilterBarComponent {
|
|
|
1084
1089
|
};
|
|
1085
1090
|
protected dayValue: string;
|
|
1086
1091
|
protected readonly options: i0.Signal<readonly MonkeyFilterBarOption[]>;
|
|
1092
|
+
protected readonly conditionsByKey: i0.Signal<Map<string, readonly MonkeyFilterOperator[]>>;
|
|
1087
1093
|
protected readonly labels: i0.Signal<{
|
|
1088
1094
|
add: string;
|
|
1089
1095
|
addAria: string;
|
|
@@ -1103,10 +1109,15 @@ declare class MonkeyFilterBarComponent {
|
|
|
1103
1109
|
protected readonly addOptions: i0.Signal<MonkeyFilterBarOption[]>;
|
|
1104
1110
|
protected readonly canAddFilter: i0.Signal<boolean>;
|
|
1105
1111
|
protected readonly changeOptions: i0.Signal<MonkeyFilterBarOption[]>;
|
|
1106
|
-
protected readonly triggerVariant: i0.Signal<"
|
|
1112
|
+
protected readonly triggerVariant: i0.Signal<"text" | "icon">;
|
|
1107
1113
|
protected readonly triggerIcon: i0.Signal<"filter" | "add-plus">;
|
|
1108
1114
|
protected readonly triggerFlipId: i0.Signal<"trigger-text" | "trigger-icon">;
|
|
1109
1115
|
constructor();
|
|
1116
|
+
/**
|
|
1117
|
+
* A field with a single condition has nothing to ask: the answer to "which
|
|
1118
|
+
* condition" is already known, so it is taken rather than put to the user.
|
|
1119
|
+
*/
|
|
1120
|
+
private autoCondition;
|
|
1110
1121
|
private askForAnswer;
|
|
1111
1122
|
private seedDraft;
|
|
1112
1123
|
private readDraft;
|
|
@@ -2980,5 +2991,5 @@ declare const MECX_GOOGLE_API_KEY: InjectionToken<string>;
|
|
|
2980
2991
|
declare const MECX_I18N_LANG: InjectionToken<BehaviorSubject<string>>;
|
|
2981
2992
|
declare function injectTokenWithWarning<T>(token: InjectionToken<T>, name?: string): T | null;
|
|
2982
2993
|
|
|
2983
|
-
export { DOWNLOAD_TOAST_EXIT_MS, MECX_COUNTRY_ISO_CODE, MECX_GOOGLE_API_KEY, MECX_I18N_LANG, MECX_I18N_WRAPPER, MECX_MODAL_DATA, MECX_MODAL_DEFAULT_CONFIG, MECX_POPOVER_OPTIONS, MonkeyAccordionComponent, MonkeyActionBarComponent, MonkeyAlertComponent, MonkeyAutocompleteAddressComponent, MonkeyAutocompleteComponent, MonkeyAvatarComponent, MonkeyBadgeComponent, MonkeyBadgeDirective, MonkeyBreadcrumbComponent, MonkeyButtonComponent, MonkeyCheckboxComponent, MonkeyComplexFilterBarComponent, MonkeyDateRangeComponent, MonkeyDictionaryService, MonkeyDisplayDirective, MonkeyDividerComponent, MonkeyDownloadButtonComponent, MonkeyDownloadToastComponent, MonkeyDownloadToastService, MonkeyDownloadToastStackComponent, MonkeyEcxAddressService, MonkeyErrorDirective, MonkeyFilterBarComponent, MonkeyFilterBarService, MonkeyFilterChipComponent, MonkeyFilterMenuComponent, MonkeyFilterMenuItemComponent, MonkeyFilterSegmentComponent, MonkeyFilterTriggerComponent, MonkeyFormDirective, MonkeyFormFieldComponent, MonkeyFormFieldControl, MonkeyFormFieldModule, MonkeyHelperDirective, MonkeyIconButtonComponent, MonkeyInfoDirective, MonkeyInputCodeComponent, MonkeyInputCurrencyDirective, MonkeyInputDateRangeComponent, MonkeyInputDirective, MonkeyInputModule, MonkeyInputPhoneComponent, MonkeyInputUploadComponent, MonkeyLabelDirective, MonkeyModalActionsDirective, MonkeyModalComponent, MonkeyModalConfig, MonkeyModalContentDirective, MonkeyModalModule, MonkeyModalRef, MonkeyModalService, MonkeyModalSubtitleDirective, MonkeyModalTitleDirective, MonkeyOptionComponent, MonkeyPaginationActionComponent, MonkeyPaginationLabelComponent, MonkeyPaginationSizeComponent, MonkeyPassNumberComponent, MonkeyPassSecretNumberComponent, MonkeyPopoverContentComponent, MonkeyPopoverDirective, MonkeyPrefixDirective, MonkeyRadioButtonComponent, MonkeyScrollbarComponent, MonkeySecurityLevelComponent, MonkeySelectComponent, MonkeyStatusComponent, MonkeyStepComponent, MonkeyStepperComponent, MonkeyStepperModule, MonkeyStepperService, MonkeySuffixDirective, MonkeyTabComponent, MonkeyTabLinkDirective, MonkeyTableCellDirective, MonkeyTableColumnDirective, MonkeyTableComponent, MonkeyTableEmptyDirective, MonkeyTableHeaderCellDirective, MonkeyTableLoadingDirective, MonkeyTableRowDetailDirective, MonkeyTabsComponent, MonkeyTabsModule, MonkeyToastComponent, MonkeyToastRef, MonkeyToastService, MonkeyToggleComponent, MonkeyToggleLineButtonComponent, MonkeyToggleLineComponent, MonkeyTooltipComponent, MonkeyTooltipDirective, MonkeyUserProfileButtonComponent, MonkeyUserProfileComponent, addKeys, appliedFrom, ariaSortOf, arityOf, closeOnClickAttribute, conditionsOf, getCurrencySymbol, indexAtOffset, injectTokenWithWarning, interpolate, isComplete, mergeOrder, offsetOfIndex, panelOf, removeKeys, sameColumnState, selectionState, sortByOrder, toPx, toggleKey, totalHeight, withCondition, withType };
|
|
2984
|
-
export type { ActiveFilter, AutocompleteSuggestion, AutocompleteSuggestionType, ColumnAlign, ColumnPinned, ComplexFilterCondition, ComplexFilterGroup, ComplexFilterOperator, ComplexFilterResult, DownloadStackItem, DownloadStackItemUpdate, DownloadToastConfig, DownloadToastDictionary, FilterBarConfig, FilterBarState, FilterOption, FilterType, GoogleApiPlaces, GoogleApiPlacesAddressComponents, GoogleApiPlacesResponse, MonkeyAlertType, MonkeyAppliedFilter, MonkeyAutocompleteData, MonkeyAutocompleteResponse, MonkeyBreadcrumb, MonkeyButtonColor, MonkeyButtonType, MonkeyDownloadButtonChangeEvent, MonkeyFilterArity, MonkeyFilterBarConfig, MonkeyFilterBarOption, MonkeyFilterBarStatusOption, MonkeyFilterBarType, MonkeyFilterCondition, MonkeyFilterMenuItemProperty, MonkeyFilterOperand, MonkeyFilterOperator, MonkeyFilterPanel, MonkeyFilterRow, MonkeyFilterTriggerVariant, MonkeyInputUploadChangeEvent, MonkeyModalConfirmationConfig, MonkeyModalDefaultConfig, MonkeyPopoverDir, MonkeyPopoverItemClick, MonkeyPopoverOptions, MonkeyScrollbarOrientation, MonkeyScrollbarSize, MonkeySize, MonkeyTableCellContext, MonkeyTableColumnState, MonkeyTableScrollConfig, MonkeyTableSortKind, MonkeyToastPosition, MonkeyToastType, RowMetrics, SelectionState, SortDirection, SortState, StatusOption, ToastConfig };
|
|
2994
|
+
export { DOWNLOAD_TOAST_EXIT_MS, MECX_COUNTRY_ISO_CODE, MECX_GOOGLE_API_KEY, MECX_I18N_LANG, MECX_I18N_WRAPPER, MECX_MODAL_DATA, MECX_MODAL_DEFAULT_CONFIG, MECX_POPOVER_OPTIONS, MonkeyAccordionComponent, MonkeyActionBarComponent, MonkeyAlertComponent, MonkeyAutocompleteAddressComponent, MonkeyAutocompleteComponent, MonkeyAvatarComponent, MonkeyBadgeComponent, MonkeyBadgeDirective, MonkeyBreadcrumbComponent, MonkeyButtonComponent, MonkeyCheckboxComponent, MonkeyComplexFilterBarComponent, MonkeyDateRangeComponent, MonkeyDictionaryService, MonkeyDisplayDirective, MonkeyDividerComponent, MonkeyDownloadButtonComponent, MonkeyDownloadToastComponent, MonkeyDownloadToastService, MonkeyDownloadToastStackComponent, MonkeyEcxAddressService, MonkeyErrorDirective, MonkeyFilterBarComponent, MonkeyFilterBarService, MonkeyFilterChipComponent, MonkeyFilterMenuComponent, MonkeyFilterMenuItemComponent, MonkeyFilterSegmentComponent, MonkeyFilterTriggerComponent, MonkeyFormDirective, MonkeyFormFieldComponent, MonkeyFormFieldControl, MonkeyFormFieldModule, MonkeyHelperDirective, MonkeyIconButtonComponent, MonkeyInfoDirective, MonkeyInputCodeComponent, MonkeyInputCurrencyDirective, MonkeyInputDateRangeComponent, MonkeyInputDirective, MonkeyInputModule, MonkeyInputPhoneComponent, MonkeyInputUploadComponent, MonkeyLabelDirective, MonkeyModalActionsDirective, MonkeyModalComponent, MonkeyModalConfig, MonkeyModalContentDirective, MonkeyModalModule, MonkeyModalRef, MonkeyModalService, MonkeyModalSubtitleDirective, MonkeyModalTitleDirective, MonkeyOptionComponent, MonkeyPaginationActionComponent, MonkeyPaginationLabelComponent, MonkeyPaginationSizeComponent, MonkeyPassNumberComponent, MonkeyPassSecretNumberComponent, MonkeyPopoverContentComponent, MonkeyPopoverDirective, MonkeyPrefixDirective, MonkeyRadioButtonComponent, MonkeyScrollbarComponent, MonkeySecurityLevelComponent, MonkeySelectComponent, MonkeyStatusComponent, MonkeyStepComponent, MonkeyStepperComponent, MonkeyStepperModule, MonkeyStepperService, MonkeySuffixDirective, MonkeyTabComponent, MonkeyTabLinkDirective, MonkeyTableCellDirective, MonkeyTableColumnDirective, MonkeyTableComponent, MonkeyTableEmptyDirective, MonkeyTableHeaderCellDirective, MonkeyTableLoadingDirective, MonkeyTableRowDetailDirective, MonkeyTabsComponent, MonkeyTabsModule, MonkeyToastComponent, MonkeyToastRef, MonkeyToastService, MonkeyToggleComponent, MonkeyToggleLineButtonComponent, MonkeyToggleLineComponent, MonkeyTooltipComponent, MonkeyTooltipDirective, MonkeyUserProfileButtonComponent, MonkeyUserProfileComponent, addKeys, appliedFrom, ariaSortOf, arityOf, closeOnClickAttribute, conditionsForOption, conditionsOf, getCurrencySymbol, indexAtOffset, injectTokenWithWarning, interpolate, isComplete, mergeOrder, offsetOfIndex, panelOf, removeKeys, sameColumnState, selectionState, sortByOrder, supportedConditionsOf, toPx, toggleKey, totalHeight, withCondition, withType };
|
|
2995
|
+
export type { ActiveFilter, AutocompleteSuggestion, AutocompleteSuggestionType, ColumnAlign, ColumnPinned, ComplexFilterCondition, ComplexFilterGroup, ComplexFilterOperator, ComplexFilterResult, DownloadStackItem, DownloadStackItemUpdate, DownloadToastConfig, DownloadToastDictionary, FilterBarConfig, FilterBarState, FilterOption, FilterType, GoogleApiPlaces, GoogleApiPlacesAddressComponents, GoogleApiPlacesResponse, MonkeyAlertType, MonkeyAppliedFilter, MonkeyAutocompleteData, MonkeyAutocompleteResponse, MonkeyBreadcrumb, MonkeyButtonColor, MonkeyButtonType, MonkeyDownloadButtonChangeEvent, MonkeyFilterArity, MonkeyFilterBarConfig, MonkeyFilterBarOption, MonkeyFilterBarStatusOption, MonkeyFilterBarType, MonkeyFilterCondition, MonkeyFilterConditionsByType, MonkeyFilterMenuItemProperty, MonkeyFilterOperand, MonkeyFilterOperator, MonkeyFilterPanel, MonkeyFilterRow, MonkeyFilterTriggerVariant, MonkeyInputUploadChangeEvent, MonkeyModalConfirmationConfig, MonkeyModalDefaultConfig, MonkeyPopoverDir, MonkeyPopoverItemClick, MonkeyPopoverOptions, MonkeyScrollbarOrientation, MonkeyScrollbarSize, MonkeySize, MonkeyTableCellContext, MonkeyTableColumnState, MonkeyTableScrollConfig, MonkeyTableSortKind, MonkeyToastPosition, MonkeyToastType, RowMetrics, SelectionState, SortDirection, SortState, StatusOption, ToastConfig };
|
|
Binary file
|