@annalib/anna-core 31.1.5 → 31.1.7

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.
@@ -1,4 +1,5 @@
1
- import { IWeekCalendar } from "./anna-global-dropdown-config.model";
1
+ import { SingleSelectIdText } from "../../anna-dropdown-lib/components/anna-single-select/models/anna-single-select.model";
2
+ import { ICustomSingleSelect, IWeekCalendar } from "./anna-global-dropdown-config.model";
2
3
  export interface IGtTableHeader {
3
4
  headerInfo: IHeaderInfo[];
4
5
  visible: boolean;
@@ -23,7 +24,7 @@ export interface IHeaderInfo {
23
24
  showSplitedOptionsInFilter?: boolean[];
24
25
  splitDelimiter?: string[];
25
26
  }
26
- type DATATYPE = "CHECKBOX" | "ICON" | "STRING" | "RADIO" | "" | "SVG_ICON" | "TEXT_ACTIONS" | "CLICKABLE_DATA" | "STRING__TEXT_ACTION" | "STRING__ICON_ACTION" | "STRING___ICON_OR_TEXT_ACTION" | "HTML" | "HTML_STRING" | "ICON_CELL" | "STRING_OR_INPUT" | "SINGLE_RADIO" | "STRING_WITH_TOOLTIP" | "STRING_WITH_ELLIPSIS_AND_READ_MORE_TOOLTIP" | "STRING_ELLIPSIS_WITH_TABLE_TOOLTIP" | "STRING_WITH_TOOLTIP_INNER_HTML" | "ICON_CELL_AND_STRING_WITH_ELLIPSIS_AND_READ_MORE_TOOLTIP";
27
+ type DATATYPE = "CHECKBOX" | "ICON" | "STRING" | "RADIO" | "" | "SVG_ICON" | "TEXT_ACTIONS" | "CLICKABLE_DATA" | "STRING__TEXT_ACTION" | "STRING__ICON_ACTION" | "STRING___ICON_OR_TEXT_ACTION" | "HTML" | "HTML_STRING" | "ICON_CELL" | "STRING_OR_INPUT" | "SINGLE_RADIO" | "STRING_WITH_TOOLTIP" | "STRING_WITH_ELLIPSIS_AND_READ_MORE_TOOLTIP" | "STRING_ELLIPSIS_WITH_TABLE_TOOLTIP" | "STRING_WITH_TOOLTIP_INNER_HTML" | "ICON_CELL_AND_STRING_WITH_ELLIPSIS_AND_READ_MORE_TOOLTIP" | "SINGLE_SELECT_DROPDOWN";
27
28
  type FILTERTYPE = "CHECKBOX" | "SLIDER" | "DATE" | "TIME" | "WEEK";
28
29
  export interface ISvgOrIconTypeInGTTable {
29
30
  showObjectKey: boolean;
@@ -207,4 +208,9 @@ export interface ITooltipTableHeader {
207
208
  export interface ITooltipTableRowData {
208
209
  [key: string]: any;
209
210
  }
211
+ export interface IDropdownConfigForGT {
212
+ itemList: SingleSelectIdText[];
213
+ selectedItem: SingleSelectIdText;
214
+ dropdownConfig: ICustomSingleSelect;
215
+ }
210
216
  export {};
@@ -16,14 +16,14 @@ export declare class AnnaDateTimeFormatService {
16
16
  addZero(time: any): any;
17
17
  sortByTimeAscending(a: any, b: any): number;
18
18
  sortByTimeDescending(a: any, b: any): number;
19
- compareTime(a: dayjs.Dayjs, b: dayjs.Dayjs, unit: UnitType, isAsc: boolean): 1 | -1 | 0;
19
+ compareTime(a: dayjs.Dayjs, b: dayjs.Dayjs, unit: UnitType, isAsc: boolean): 0 | 1 | -1;
20
20
  convertNgbDateToMoment(ngbDate: NgbDate | NgbDateType): string;
21
21
  compareDate(a: string, b: string, isAsc: boolean): number;
22
22
  static formatTwentyFourHourTimeToHHMMAFormat(value: any, date?: string): string;
23
23
  static formatTwelveHourTimeToHHMMAFormat(timeValue: any, date?: string): string;
24
24
  formatDateAndHHMMATimeToStandardFormat(dateAndTime: any): string;
25
25
  compare(a: number | string, b: number | string, isAsc: boolean): number;
26
- sortDataByBroadcastTimeAsc(firstParamTime: string, secondParamTime: string, broadcastTime: string): 1 | -1 | 0;
26
+ sortDataByBroadcastTimeAsc(firstParamTime: string, secondParamTime: string, broadcastTime: string): 0 | 1 | -1;
27
27
  convertNgbDateToMomentInSpecificFormat(ngbDate: NgbDateType, format: string): string;
28
28
  getBroadcastWeek(startDate: any, format?: string): {
29
29
  start: dayjs.Dayjs;
@@ -59,6 +59,8 @@ export declare class AnnaFilterService {
59
59
  removeOrChangeLatestFilterIndex(isFiltered: boolean): void;
60
60
  checkIfSortingIsAppliedThenSortTheData(originalData: any[]): any[];
61
61
  filterData(originalData: any[], keyToSkip: string, isLurCsrPage?: boolean): any[];
62
+ getValueFromObject(obj: any, key: string): any;
63
+ nestedKeyExists(obj: any, key: string): boolean;
62
64
  returnOrdersInTheRange(order: any, range: any, key: any): boolean;
63
65
  returnDataForTimeRange(obj: any, selectedData: any): boolean;
64
66
  returnDataForFromAndToTimeRange(obj: any, selectedData: any, key: any): boolean;
@@ -0,0 +1,44 @@
1
+ import { ElementRef, EventEmitter, OnChanges, OnInit, SimpleChanges } from "@angular/core";
2
+ import { ICustomSingleSelect } from "../../../anna-core-shared-lib/models/anna-global-dropdown-config.model";
3
+ import { AnnaFilterSearchedTextPipe } from "../../../anna-core-shared-lib/pipes/annaFilterSearchedText.pipe";
4
+ import { AnnaGlobalConfigService } from "../../../anna-core-shared-lib/services/anna-global-config.service";
5
+ import { SingleSelectIdText } from "./models/anna-single-select.model";
6
+ import * as i0 from "@angular/core";
7
+ export declare class AnnaSingleSelectComponent implements OnInit, OnChanges {
8
+ private annaGlobalConfig;
9
+ private searchFilterPipe;
10
+ config: ICustomSingleSelect;
11
+ loading: boolean;
12
+ showAdditionalDataInSelectedText: boolean;
13
+ disabled: boolean;
14
+ items: SingleSelectIdText[] | string[] | any;
15
+ selectedItem: SingleSelectIdText | string | any;
16
+ keyToUseForDisplay: string;
17
+ keyToUseForCheckingSelectedItem: string;
18
+ hideDropdownArrow: boolean;
19
+ borderbottomObject: any;
20
+ defaultDropdownHeight: number;
21
+ itemsToHideInDropdownIds: number[];
22
+ showClearSelection: boolean;
23
+ valueChanged: EventEmitter<SingleSelectIdText>;
24
+ dropdownClosedEvent: EventEmitter<any>;
25
+ dropdownOpenedEvent: EventEmitter<any>;
26
+ clearSelectionClickedEvent: EventEmitter<any>;
27
+ searchFor: string;
28
+ yPosition: any;
29
+ width: number;
30
+ heightOfCheckboxTooltipFilter: number;
31
+ buttonElement: ElementRef;
32
+ constructor(annaGlobalConfig: AnnaGlobalConfigService, searchFilterPipe: AnnaFilterSearchedTextPipe);
33
+ ngOnChanges(changes: SimpleChanges): void;
34
+ ngOnInit(): void;
35
+ trackByFn(index: number): number;
36
+ itemSelected(item: SingleSelectIdText, event: MouseEvent): void;
37
+ dropdownOpened(): void;
38
+ dropdownClosed(): void;
39
+ clearSelectionClicked(): void;
40
+ setPostion(): void;
41
+ updateHeight(): void;
42
+ static ɵfac: i0.ɵɵFactoryDeclaration<AnnaSingleSelectComponent, never>;
43
+ static ɵcmp: i0.ɵɵComponentDeclaration<AnnaSingleSelectComponent, "anna-core-single-select", never, { "config": { "alias": "config"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "showAdditionalDataInSelectedText": { "alias": "showAdditionalDataInSelectedText"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "items": { "alias": "items"; "required": false; }; "selectedItem": { "alias": "selectedItem"; "required": false; }; "keyToUseForDisplay": { "alias": "keyToUseForDisplay"; "required": false; }; "keyToUseForCheckingSelectedItem": { "alias": "keyToUseForCheckingSelectedItem"; "required": false; }; "hideDropdownArrow": { "alias": "hideDropdownArrow"; "required": false; }; "borderbottomObject": { "alias": "borderbottomObject"; "required": false; }; "defaultDropdownHeight": { "alias": "defaultDropdownHeight"; "required": false; }; "itemsToHideInDropdownIds": { "alias": "itemsToHideInDropdownIds"; "required": false; }; "showClearSelection": { "alias": "showClearSelection"; "required": false; }; }, { "valueChanged": "valueChanged"; "dropdownClosedEvent": "dropdownClosedEvent"; "dropdownOpenedEvent": "dropdownOpenedEvent"; "clearSelectionClickedEvent": "clearSelectionClickedEvent"; }, never, [".role-tooltip-icon"], true, never>;
44
+ }
@@ -0,0 +1,10 @@
1
+ export declare class SingleSelectIdText {
2
+ id: any;
3
+ text: string;
4
+ class?: string;
5
+ additionalClass?: string;
6
+ additionalData?: string;
7
+ isSelected?: boolean;
8
+ isDisabled?: boolean;
9
+ constructor(id: any, text: string, className?: string, additionalClass?: string, additionalData?: string, isSelected?: boolean, isDisabled?: boolean);
10
+ }
@@ -70,6 +70,11 @@ export declare class AnnaNonEditableGenericTableComponent implements OnInit, OnC
70
70
  editableInputEdited: EventEmitter<any>;
71
71
  radioButtonMessageIconClicked: EventEmitter<any>;
72
72
  statusNotePopupOpened: EventEmitter<string>;
73
+ singleSelectDropdownValueEmit: EventEmitter<{
74
+ selectedItem: any;
75
+ row: any;
76
+ dropdownIndex: number;
77
+ }>;
73
78
  numberOfSkeletonRows: number[][];
74
79
  tableDataWrapper: any[];
75
80
  rowChecked: boolean;
@@ -155,9 +160,7 @@ export declare class AnnaNonEditableGenericTableComponent implements OnInit, OnC
155
160
  closeTooltip(): void;
156
161
  isTooltipActive(header: any[]): boolean;
157
162
  bindTheValueToToolTip(tooltip: any, header: IHeaderInfo): void;
158
- checkIfUniqueValuePresentForTheHeader(header: IHeaderInfo, enabledHeaders: any[]): void;
159
163
  openTooltip(tooltip: any, header: any, columnHeader: IHeaderInfo): void;
160
- disableEnableEachColumnTooltipIcon(): void;
161
164
  dataRowClicked(rowData: any): void;
162
165
  radioButtonClicked(data: any, action: string, isDisabled: boolean): void;
163
166
  bindTheValueToSellerGroupTooltip(sellerGroupHierarchy: RatingSellerGroupHierarchy[], tooltip: any): void;
@@ -185,6 +188,7 @@ export declare class AnnaNonEditableGenericTableComponent implements OnInit, OnC
185
188
  onClickableDataClicked(Rowdata: any, id: number): void;
186
189
  removeTooltipOnScroll(): void;
187
190
  iconClickedInTotalRow(colName: string): void;
191
+ onDropdownChanged(selectedItem: any, row: any, dropdownIndex: number): void;
188
192
  changesMadeInEditableInputBox(event: any, editedObject: any, pasteEvent: boolean): void;
189
193
  editableInputValueChanged(value: any, row: any, keyEdited: string): void;
190
194
  radioButtonIconClicked(data: any): void;
@@ -196,6 +200,6 @@ export declare class AnnaNonEditableGenericTableComponent implements OnInit, OnC
196
200
  showEntireStatusNote(): void;
197
201
  closeStatusNoteTooltip(): void;
198
202
  static ɵfac: i0.ɵɵFactoryDeclaration<AnnaNonEditableGenericTableComponent, never>;
199
- static ɵcmp: i0.ɵɵComponentDeclaration<AnnaNonEditableGenericTableComponent, "anna-core-non-editable-generic-table-lib", never, { "showSkeletonLoading": { "alias": "showSkeletonLoading"; "required": false; }; "tableHeaders": { "alias": "tableHeaders"; "required": true; }; "tableData": { "alias": "tableData"; "required": true; }; "clonedTableData": { "alias": "clonedTableData"; "required": true; }; "gtGeneralConfig": { "alias": "gtGeneralConfig"; "required": true; }; "totalRowInfo": { "alias": "totalRowInfo"; "required": false; }; "gtDimension": { "alias": "gtDimension"; "required": true; }; "tableClass": { "alias": "tableClass"; "required": false; }; "maximumRowsWhichCanBeRenderedWithoutScroll": { "alias": "maximumRowsWhichCanBeRenderedWithoutScroll"; "required": false; }; "fixNumberOfRowsForPopup": { "alias": "fixNumberOfRowsForPopup"; "required": false; }; "limit": { "alias": "limit"; "required": false; }; "includeBorderInTableHeight": { "alias": "includeBorderInTableHeight"; "required": false; }; "downloadInProgress": { "alias": "downloadInProgress"; "required": false; }; "percentDone": { "alias": "percentDone"; "required": false; }; "starredInProgress": { "alias": "starredInProgress"; "required": false; }; "clickableRow": { "alias": "clickableRow"; "required": false; }; "setTableHeightWhenRowSizeIsFixed": { "alias": "setTableHeightWhenRowSizeIsFixed"; "required": false; }; "tableBorderBottomClassRequired": { "alias": "tableBorderBottomClassRequired"; "required": false; }; "hideSomeTds": { "alias": "hideSomeTds"; "required": false; }; "tdsHaveRowSpan": { "alias": "tdsHaveRowSpan"; "required": false; }; "multipleTablesPresent": { "alias": "multipleTablesPresent"; "required": false; }; "showOrHideToggleForTotalRow": { "alias": "showOrHideToggleForTotalRow"; "required": false; }; }, { "toggleCheckbox": "toggleCheckbox"; "toggleRowCheckbox": "toggleRowCheckbox"; "toggleHeaderCheckbox": "toggleHeaderCheckbox"; "undoIconClicked": "undoIconClicked"; "filterAppliedToTable": "filterAppliedToTable"; "sortingAppliedToTable": "sortingAppliedToTable"; "rowClicked": "rowClicked"; "radioButtonSelected": "radioButtonSelected"; "columnFilterOpened": "columnFilterOpened"; "columnFilterClosed": "columnFilterClosed"; "gtIconClicked": "gtIconClicked"; "gtSVGIconClicked": "gtSVGIconClicked"; "gtTextActionClicked": "gtTextActionClicked"; "gtViewDetailClicked": "gtViewDetailClicked"; "gtInnerHTMLClicked": "gtInnerHTMLClicked"; "downloadSpotDetails": "downloadSpotDetails"; "clickableDataClicked": "clickableDataClicked"; "totalRowIconClicked": "totalRowIconClicked"; "notificationIconHover": "notificationIconHover"; "notificationIconHoverLeave": "notificationIconHoverLeave"; "editableInputEdited": "editableInputEdited"; "radioButtonMessageIconClicked": "radioButtonMessageIconClicked"; "statusNotePopupOpened": "statusNotePopupOpened"; }, never, never, true, never>;
203
+ static ɵcmp: i0.ɵɵComponentDeclaration<AnnaNonEditableGenericTableComponent, "anna-core-non-editable-generic-table-lib", never, { "showSkeletonLoading": { "alias": "showSkeletonLoading"; "required": false; }; "tableHeaders": { "alias": "tableHeaders"; "required": true; }; "tableData": { "alias": "tableData"; "required": true; }; "clonedTableData": { "alias": "clonedTableData"; "required": true; }; "gtGeneralConfig": { "alias": "gtGeneralConfig"; "required": true; }; "totalRowInfo": { "alias": "totalRowInfo"; "required": false; }; "gtDimension": { "alias": "gtDimension"; "required": true; }; "tableClass": { "alias": "tableClass"; "required": false; }; "maximumRowsWhichCanBeRenderedWithoutScroll": { "alias": "maximumRowsWhichCanBeRenderedWithoutScroll"; "required": false; }; "fixNumberOfRowsForPopup": { "alias": "fixNumberOfRowsForPopup"; "required": false; }; "limit": { "alias": "limit"; "required": false; }; "includeBorderInTableHeight": { "alias": "includeBorderInTableHeight"; "required": false; }; "downloadInProgress": { "alias": "downloadInProgress"; "required": false; }; "percentDone": { "alias": "percentDone"; "required": false; }; "starredInProgress": { "alias": "starredInProgress"; "required": false; }; "clickableRow": { "alias": "clickableRow"; "required": false; }; "setTableHeightWhenRowSizeIsFixed": { "alias": "setTableHeightWhenRowSizeIsFixed"; "required": false; }; "tableBorderBottomClassRequired": { "alias": "tableBorderBottomClassRequired"; "required": false; }; "hideSomeTds": { "alias": "hideSomeTds"; "required": false; }; "tdsHaveRowSpan": { "alias": "tdsHaveRowSpan"; "required": false; }; "multipleTablesPresent": { "alias": "multipleTablesPresent"; "required": false; }; "showOrHideToggleForTotalRow": { "alias": "showOrHideToggleForTotalRow"; "required": false; }; }, { "toggleCheckbox": "toggleCheckbox"; "toggleRowCheckbox": "toggleRowCheckbox"; "toggleHeaderCheckbox": "toggleHeaderCheckbox"; "undoIconClicked": "undoIconClicked"; "filterAppliedToTable": "filterAppliedToTable"; "sortingAppliedToTable": "sortingAppliedToTable"; "rowClicked": "rowClicked"; "radioButtonSelected": "radioButtonSelected"; "columnFilterOpened": "columnFilterOpened"; "columnFilterClosed": "columnFilterClosed"; "gtIconClicked": "gtIconClicked"; "gtSVGIconClicked": "gtSVGIconClicked"; "gtTextActionClicked": "gtTextActionClicked"; "gtViewDetailClicked": "gtViewDetailClicked"; "gtInnerHTMLClicked": "gtInnerHTMLClicked"; "downloadSpotDetails": "downloadSpotDetails"; "clickableDataClicked": "clickableDataClicked"; "totalRowIconClicked": "totalRowIconClicked"; "notificationIconHover": "notificationIconHover"; "notificationIconHoverLeave": "notificationIconHoverLeave"; "editableInputEdited": "editableInputEdited"; "radioButtonMessageIconClicked": "radioButtonMessageIconClicked"; "statusNotePopupOpened": "statusNotePopupOpened"; "singleSelectDropdownValueEmit": "singleSelectDropdownValueEmit"; }, never, never, true, never>;
200
204
  }
201
205
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@annalib/anna-core",
3
- "version": "31.1.5",
3
+ "version": "31.1.7",
4
4
  "peerDependencies": {
5
5
  "@angular-slider/ngx-slider": "^17.0.2",
6
6
  "@angular/common": "^17.3.12",