monkey-style-guide 21.0.4 → 21.0.5

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "monkey-style-guide",
3
- "version": "21.0.4",
3
+ "version": "21.0.5",
4
4
  "peerDependencies": {
5
5
  "@angular/animations": "^21.1.0",
6
6
  "@angular/cdk": "^21.1.0",
@@ -268,9 +268,8 @@ declare class MonkeyFormFieldComponent implements AfterContentInit, AfterContent
268
268
  static ngAcceptInputType_noFooterSpace: unknown;
269
269
  }
270
270
 
271
- type IconName = 'clear' | 'calendar' | 'arrowDown' | 'arrowRight' | 'check' | 'minus' | 'loading' | 'searchFail' | 'search' | 'addPlus' | 'googleMaps' | 'location' | 'edit';
272
271
  declare class UtilIconComponent {
273
- name: i0.InputSignal<IconName>;
272
+ name: i0.InputSignal<string>;
274
273
  static ɵfac: i0.ɵɵFactoryDeclaration<UtilIconComponent, never>;
275
274
  static ɵcmp: i0.ɵɵComponentDeclaration<UtilIconComponent, "util-icon", never, { "name": { "alias": "name"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
276
275
  }
@@ -652,18 +651,290 @@ declare class MonkeyDownloadButtonComponent {
652
651
  * This style guide was developed by Monkey Exchange Team
653
652
  * MIT Licence
654
653
  ************************* */
654
+ /**
655
+ * Filter types supported by the filter bar
656
+ */
657
+ type FilterType = 'text' | 'date' | 'currency' | 'status';
658
+ /**
659
+ * Status option for status filter checkboxes
660
+ */
661
+ interface StatusOption {
662
+ /** Value of the checkbox option */
663
+ value: string;
664
+ /** Description/label for the checkbox option */
665
+ description: string;
666
+ }
667
+ /**
668
+ * Configuration for a filter option
669
+ */
670
+ interface FilterOption {
671
+ /** Unique identifier for the filter */
672
+ key: string;
673
+ /** Display label for the filter */
674
+ label: string;
675
+ /** Icon name to display (optional) */
676
+ icon?: string;
677
+ /** Type of filter input */
678
+ type: FilterType;
679
+ /** Placeholder text for the filter input (optional) */
680
+ placeholder?: string;
681
+ /** Minimum date for date filters (optional) */
682
+ minDate?: Date | string;
683
+ /** Maximum date for date filters (optional) */
684
+ maxDate?: Date | string;
685
+ /** Currency code for currency filters (optional) */
686
+ currency?: string;
687
+ /** Status options for status filters (required when type is 'status') */
688
+ statusOptions?: StatusOption[];
689
+ }
690
+ /**
691
+ * Active filter value
692
+ */
693
+ interface ActiveFilter {
694
+ /** Filter key */
695
+ key: string;
696
+ /** Filter label */
697
+ label: string;
698
+ /** Filter type */
699
+ type: FilterType;
700
+ /** Filter value (format depends on type: string for text, object for date/currency, string[] for status) */
701
+ value: string | {
702
+ startDate: string;
703
+ endDate: string;
704
+ } | {
705
+ min?: number;
706
+ max?: number;
707
+ } | string[];
708
+ /** Display text for the filter tag */
709
+ displayText: string;
710
+ /** Icon name (optional) */
711
+ icon?: string;
712
+ }
713
+ /**
714
+ * Filter bar configuration
715
+ */
716
+ interface FilterBarConfig {
717
+ /** Available filter options */
718
+ filterOptions: FilterOption[];
719
+ /** Placeholder text for search input */
720
+ searchPlaceholder?: string;
721
+ }
655
722
 
656
- declare class MonkeyFilterBarComponent implements AfterContentInit, OnDestroy, OnChanges {
723
+ declare class MonkeyFilterBarComponent implements OnInit, AfterContentInit, OnDestroy, OnChanges {
657
724
  protected _elementRef: ElementRef<HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement>;
725
+ private _filterBarService;
726
+ /** Unique key for this filter bar instance */
727
+ key: i0.InputSignal<string>;
728
+ /** Filter bar configuration */
729
+ config: i0.InputSignal<FilterBarConfig | undefined>;
730
+ /** Output event when filters change */
731
+ filtersChange: EventEmitter<{
732
+ search?: string;
733
+ filters: ActiveFilter[];
734
+ }>;
735
+ /** Output event when search value changes */
736
+ searchChange: EventEmitter<string>;
658
737
  showPopOver: boolean;
738
+ showSubmenuPopover: boolean;
739
+ showFilterInputPopover: boolean;
659
740
  elementTarget: HTMLElement | null;
660
- closePopOver: () => void;
741
+ submenuTarget: HTMLElement | null;
742
+ filterInputTarget: HTMLElement | null;
743
+ filterInputValue: string;
744
+ selectedFilterOption: i0.WritableSignal<FilterOption | null>;
745
+ showCustomDatePicker: boolean;
746
+ filterDateRange: {
747
+ startDate: string;
748
+ endDate: string;
749
+ };
750
+ filterCurrencyRange: {
751
+ min: number;
752
+ max: number;
753
+ };
754
+ currencyRangeType: 'from' | 'until';
755
+ selectedStatusValues: string[];
756
+ isEditingActiveFilter: boolean;
757
+ handledFilterOptionLabel: i0.Signal<string | undefined>;
758
+ handledFilterOptionIcon: i0.Signal<string | undefined>;
759
+ serviceConfig: i0.Signal<FilterBarConfig | undefined>;
760
+ activeFilters: i0.Signal<ActiveFilter[]>;
761
+ searchValue: i0.Signal<string>;
762
+ constructor();
763
+ ngOnInit(): void;
661
764
  ngAfterContentInit(): void;
662
765
  ngOnChanges(changes: SimpleChanges): void;
663
766
  ngOnDestroy(): void;
767
+ /**
768
+ * Get available filter options (excluding already active filters)
769
+ */
770
+ availableFilterOptions(): FilterOption[];
771
+ /**
772
+ * Check if a filter is already active
773
+ */
774
+ isFilterActive(filterKey: string): boolean;
775
+ /**
776
+ * Handle showing the popover
777
+ */
664
778
  onShowPopOver(el: MonkeyButtonComponent): void;
779
+ /**
780
+ * Get unique ID for a filter option
781
+ */
782
+ getFilterOptionId(optionKey: string): string;
783
+ /**
784
+ * Get unique ID for an active filter tag
785
+ */
786
+ getActiveFilterId(filterKey: string): string;
787
+ /**
788
+ * Handle filter option selection - opens submenu for date filters, direct input for others
789
+ */
790
+ onSelectFilterOption(option: FilterOption): void;
791
+ /**
792
+ * Handle quick date selection from submenu
793
+ */
794
+ onSelectQuickDate(option: string): void;
795
+ /**
796
+ * Show filter input popover (for non-date filters or custom date picker)
797
+ */
798
+ onShowFilterInput(): void;
799
+ /**
800
+ * Handle date range change
801
+ */
802
+ onDateRangeChange(event: {
803
+ startDate: string;
804
+ endDate: string;
805
+ }): void;
806
+ /**
807
+ * Handle status checkbox change
808
+ */
809
+ onStatusCheckboxChange(statusValue: string, checked: boolean): void;
810
+ /**
811
+ * Apply the selected filter
812
+ */
813
+ onApplyFilter(): void;
814
+ /**
815
+ * Edit an active filter - opens the input popover with current values
816
+ */
817
+ onEditActiveFilter(activeFilter: ActiveFilter): void;
818
+ /**
819
+ * Remove a filter
820
+ */
821
+ onRemoveFilter(filterKey: string, event?: Event): void;
822
+ /**
823
+ * Clear all filters
824
+ */
825
+ onClearAllFilters(): void;
826
+ /**
827
+ * Handle search input change
828
+ */
829
+ onSearchChange(value: string): void;
830
+ /**
831
+ * Emit filters change event
832
+ */
833
+ private emitFiltersChange;
834
+ closePopOver: () => void;
835
+ closeSubmenuPopover: () => void;
836
+ closeFilterInputPopover: () => void;
665
837
  static ɵfac: i0.ɵɵFactoryDeclaration<MonkeyFilterBarComponent, never>;
666
- static ɵcmp: i0.ɵɵComponentDeclaration<MonkeyFilterBarComponent, "monkey-filter-bar", never, {}, {}, never, never, true, never>;
838
+ static ɵcmp: i0.ɵɵComponentDeclaration<MonkeyFilterBarComponent, "monkey-filter-bar", never, { "key": { "alias": "key"; "required": true; "isSignal": true; }; "config": { "alias": "config"; "required": false; "isSignal": true; }; }, { "filtersChange": "filtersChange"; "searchChange": "searchChange"; }, never, never, true, never>;
839
+ }
840
+
841
+ interface FilterBarState {
842
+ search: string;
843
+ filters: ActiveFilter[];
844
+ }
845
+ declare class MonkeyFilterBarService {
846
+ private _configs;
847
+ private _activeFilters;
848
+ private _searchValues;
849
+ /**
850
+ * Initialize or update configuration for a filter bar instance
851
+ */
852
+ setConfig(storageKey: string, config: FilterBarConfig): void;
853
+ /**
854
+ * Get configuration for a filter bar instance
855
+ */
856
+ getConfig(storageKey: string): FilterBarConfig | undefined;
857
+ /**
858
+ * Get configuration as a computed signal
859
+ */
860
+ config(storageKey: string): i0.Signal<FilterBarConfig | undefined>;
861
+ /**
862
+ * Get available filter options (excluding already active filters)
863
+ */
864
+ availableFilterOptions(storageKey: string): FilterOption[];
865
+ /**
866
+ * Get active filters for a filter bar instance
867
+ */
868
+ getActiveFilters(storageKey: string): ActiveFilter[];
869
+ /**
870
+ * Get active filters as a computed signal
871
+ */
872
+ activeFilters(storageKey: string): i0.Signal<ActiveFilter[]>;
873
+ /**
874
+ * Check if a filter is already active
875
+ */
876
+ isFilterActive(storageKey: string, filterKey: string): boolean;
877
+ /**
878
+ * Set active filters for a filter bar instance (overwrites existing)
879
+ */
880
+ setActiveFilters(storageKey: string, filters: ActiveFilter[]): void;
881
+ /**
882
+ * Add a filter
883
+ */
884
+ addFilter(storageKey: string, option: FilterOption, value: string | {
885
+ startDate: string;
886
+ endDate: string;
887
+ } | {
888
+ min?: number;
889
+ max?: number;
890
+ } | string[]): void;
891
+ /**
892
+ * Update an existing filter (preserves position in array)
893
+ */
894
+ updateFilter(storageKey: string, filterKey: string, option: FilterOption, value: string | {
895
+ startDate: string;
896
+ endDate: string;
897
+ } | {
898
+ min?: number;
899
+ max?: number;
900
+ } | string[]): void;
901
+ /**
902
+ * Remove a filter
903
+ */
904
+ removeFilter(storageKey: string, filterKey: string): void;
905
+ /**
906
+ * Clear all filters for a filter bar instance
907
+ */
908
+ clearAllFilters(storageKey: string): void;
909
+ /**
910
+ * Get search value for a filter bar instance
911
+ */
912
+ getSearchValue(storageKey: string): string;
913
+ /**
914
+ * Get search value as a computed signal
915
+ */
916
+ searchValue(storageKey: string): i0.Signal<string>;
917
+ /**
918
+ * Set search value
919
+ */
920
+ setSearchValue(storageKey: string, value: string): void;
921
+ /**
922
+ * Get complete state (search + filters)
923
+ */
924
+ getState(storageKey: string): FilterBarState;
925
+ /**
926
+ * Get state as a computed signal
927
+ */
928
+ state(storageKey: string): i0.Signal<{
929
+ search: string;
930
+ filters: ActiveFilter[];
931
+ }>;
932
+ /**
933
+ * Format filter value for display (plain text, no formatting)
934
+ */
935
+ private formatFilterValuePlain;
936
+ static ɵfac: i0.ɵɵFactoryDeclaration<MonkeyFilterBarService, never>;
937
+ static ɵprov: i0.ɵɵInjectableDeclaration<MonkeyFilterBarService>;
667
938
  }
668
939
 
669
940
  declare class MonkeyIconButtonComponent {
@@ -672,6 +943,7 @@ declare class MonkeyIconButtonComponent {
672
943
  disabled: boolean;
673
944
  icon: string;
674
945
  loading: boolean;
946
+ color: MonkeyButtonColor;
675
947
  protected _uid: string;
676
948
  protected _id: string;
677
949
  get id(): string;
@@ -679,7 +951,7 @@ declare class MonkeyIconButtonComponent {
679
951
  constructor();
680
952
  onClick(event: any): void;
681
953
  static ɵfac: i0.ɵɵFactoryDeclaration<MonkeyIconButtonComponent, never>;
682
- static ɵcmp: i0.ɵɵComponentDeclaration<MonkeyIconButtonComponent, "monkey-icon-button", never, { "type": { "alias": "type"; "required": false; }; "size": { "alias": "size"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "id": { "alias": "id"; "required": false; }; }, {}, never, never, true, never>;
954
+ static ɵcmp: i0.ɵɵComponentDeclaration<MonkeyIconButtonComponent, "monkey-icon-button", never, { "type": { "alias": "type"; "required": false; }; "size": { "alias": "size"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "color": { "alias": "color"; "required": false; }; "id": { "alias": "id"; "required": false; }; }, {}, never, never, true, never>;
683
955
  }
684
956
 
685
957
  /** ************************
@@ -2083,5 +2355,5 @@ declare const MECX_COUNTRY_ISO_CODE: InjectionToken<string>;
2083
2355
  declare const MECX_GOOGLE_API_KEY: InjectionToken<string>;
2084
2356
  declare function injectTokenWithWarning<T>(token: InjectionToken<T>, name?: string): T | null;
2085
2357
 
2086
- export { MECX_COUNTRY_ISO_CODE, MECX_GOOGLE_API_KEY, MECX_I18N_WRAPPER, MECX_MODAL_DATA, MECX_MODAL_DEFAULT_CONFIG, MECX_POPOVER_OPTIONS, MonkeyAccordionComponent, MonkeyActionBarComponent, MonkeyAlertComponent, MonkeyAutocompleteAddressComponent, MonkeyAutocompleteComponent, MonkeyAvatarComponent, MonkeyBadgeComponent, MonkeyBadgeDirective, MonkeyBreadcrumbComponent, MonkeyButtonComponent, MonkeyCheckboxComponent, MonkeyColumnChecked, MonkeyColumnExpansible, MonkeyColumnSortable, MonkeyColumnStick, MonkeyDateRangeComponent, MonkeyDictionaryService, MonkeyDisplayDirective, MonkeyDividerComponent, MonkeyDownloadButtonComponent, MonkeyEcxAddressService, MonkeyErrorDirective, MonkeyFilterBarComponent, 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, MonkeySecurityLevelComponent, MonkeySelectComponent, MonkeyStatusComponent, MonkeyStepComponent, MonkeyStepperComponent, MonkeyStepperModule, MonkeyStepperService, MonkeySuffixDirective, MonkeyTabComponent, MonkeyTabLinkDirective, MonkeyTableComponent, MonkeyTableModule, MonkeyTabsComponent, MonkeyTabsModule, MonkeyToastComponent, MonkeyToastRef, MonkeyToastService, MonkeyToggleComponent, MonkeyToggleLineButtonComponent, MonkeyToggleLineComponent, MonkeyTooltipComponent, MonkeyTooltipDirective, MonkeyUserProfileButtonComponent, MonkeyUserProfileComponent, getCurrencySymbol, injectTokenWithWarning };
2087
- export type { GoogleApiPlaces, GoogleApiPlacesAddressComponents, GoogleApiPlacesResponse, MonkeyAlertType, MonkeyAutocompleteData, MonkeyAutocompleteResponse, MonkeyBreadcrumb, MonkeyButtonColor, MonkeyButtonType, MonkeyDownloadButtonChangeEvent, MonkeyInputUploadChangeEvent, MonkeyModalConfirmationConfig, MonkeyModalDefaultConfig, MonkeyPopoverDir, MonkeyPopoverOptions, MonkeySize, MonkeyTableScrollConfig, MonkeyToastPosition, MonkeyToastType, ToastConfig };
2358
+ export { MECX_COUNTRY_ISO_CODE, MECX_GOOGLE_API_KEY, MECX_I18N_WRAPPER, MECX_MODAL_DATA, MECX_MODAL_DEFAULT_CONFIG, MECX_POPOVER_OPTIONS, MonkeyAccordionComponent, MonkeyActionBarComponent, MonkeyAlertComponent, MonkeyAutocompleteAddressComponent, MonkeyAutocompleteComponent, MonkeyAvatarComponent, MonkeyBadgeComponent, MonkeyBadgeDirective, MonkeyBreadcrumbComponent, MonkeyButtonComponent, MonkeyCheckboxComponent, MonkeyColumnChecked, MonkeyColumnExpansible, MonkeyColumnSortable, MonkeyColumnStick, MonkeyDateRangeComponent, MonkeyDictionaryService, MonkeyDisplayDirective, MonkeyDividerComponent, MonkeyDownloadButtonComponent, MonkeyEcxAddressService, MonkeyErrorDirective, MonkeyFilterBarComponent, MonkeyFilterBarService, 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, MonkeySecurityLevelComponent, MonkeySelectComponent, MonkeyStatusComponent, MonkeyStepComponent, MonkeyStepperComponent, MonkeyStepperModule, MonkeyStepperService, MonkeySuffixDirective, MonkeyTabComponent, MonkeyTabLinkDirective, MonkeyTableComponent, MonkeyTableModule, MonkeyTabsComponent, MonkeyTabsModule, MonkeyToastComponent, MonkeyToastRef, MonkeyToastService, MonkeyToggleComponent, MonkeyToggleLineButtonComponent, MonkeyToggleLineComponent, MonkeyTooltipComponent, MonkeyTooltipDirective, MonkeyUserProfileButtonComponent, MonkeyUserProfileComponent, getCurrencySymbol, injectTokenWithWarning };
2359
+ export type { ActiveFilter, FilterBarConfig, FilterBarState, FilterOption, FilterType, GoogleApiPlaces, GoogleApiPlacesAddressComponents, GoogleApiPlacesResponse, MonkeyAlertType, MonkeyAutocompleteData, MonkeyAutocompleteResponse, MonkeyBreadcrumb, MonkeyButtonColor, MonkeyButtonType, MonkeyDownloadButtonChangeEvent, MonkeyInputUploadChangeEvent, MonkeyModalConfirmationConfig, MonkeyModalDefaultConfig, MonkeyPopoverDir, MonkeyPopoverOptions, MonkeySize, MonkeyTableScrollConfig, MonkeyToastPosition, MonkeyToastType, StatusOption, ToastConfig };
Binary file