@annalib/anna-core 3.3.0 → 3.3.1
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/annalib-anna-core.d.ts +5 -0
- package/esm2020/annalib-anna-core.mjs +5 -0
- package/esm2020/lib/anna-core-shared-lib/components/anna-buyer-approval-icon-template/anna-buyer-approval-icon-template.component.mjs +15 -0
- package/esm2020/lib/anna-core-shared-lib/components/anna-icon-column/anna-icon-column.component.mjs +35 -0
- package/esm2020/lib/anna-core-shared-lib/components/anna-live-icon-template/anna-live-icon-template.component.mjs +15 -0
- package/esm2020/lib/anna-core-shared-lib/components/anna-no-data/anna-no-data.component.mjs +22 -0
- package/esm2020/lib/anna-core-shared-lib/components/anna-notify-icon-template/anna-notify-icon-template.component.mjs +15 -0
- package/esm2020/lib/anna-core-shared-lib/components/anna-pay-for-performance-icon-template/anna-pay-for-performance-icon-template.component.mjs +21 -0
- package/esm2020/lib/anna-core-shared-lib/components/anna-rejected-icon-template/anna-rejected-icon-template.component.mjs +15 -0
- package/esm2020/lib/anna-core-shared-lib/constants/shared.constant.mjs +34 -0
- package/esm2020/lib/anna-core-shared-lib/directives/show-ellipsis-text/show-ellipsis-text.directive.mjs +27 -0
- package/esm2020/lib/anna-core-shared-lib/models/anna-generic-data-type.model.mjs +2 -0
- package/esm2020/lib/anna-core-shared-lib/models/anna-global-dropdown-config.model.mjs +2 -0
- package/esm2020/lib/anna-core-shared-lib/models/anna-non-editable-gt-models.mjs +3 -0
- package/esm2020/lib/anna-core-shared-lib/models/anna-sort.model.mjs +2 -0
- package/esm2020/lib/anna-core-shared-lib/models/anna-tooltip.model.mjs +30 -0
- package/esm2020/lib/anna-core-shared-lib/pipes/annaFilterSearchedText.pipe.mjs +31 -0
- package/esm2020/lib/anna-core-shared-lib/services/anna-date-time-format.service.mjs +184 -0
- package/esm2020/lib/anna-core-shared-lib/services/anna-filter.service.mjs +419 -0
- package/esm2020/lib/anna-core-shared-lib/services/anna-generic-table.service.mjs +48 -0
- package/esm2020/lib/anna-core-shared-lib/services/anna-global-config.service.mjs +133 -0
- package/esm2020/lib/anna-core-shared-lib/services/anna-sort.service.mjs +147 -0
- package/esm2020/lib/anna-core.module.mjs +156 -0
- package/esm2020/lib/anna-dropdown-lib/components/anna-calendar-filter/anna-calendar-filter.component.mjs +100 -0
- package/esm2020/lib/anna-dropdown-lib/components/anna-week-calendar-filter/anna-week-calendar-filter.component.mjs +362 -0
- package/esm2020/lib/anna-generic-table-lib/components/anna-non-editable-generic-table/anna-non-editable-generic-table.component.mjs +1684 -0
- package/esm2020/lib/anna-generic-table-lib/components/anna-sort/anna-sort.component.mjs +67 -0
- package/esm2020/lib/anna-generic-table-lib/components/anna-table-virtual-scroll-viewport/anna-table-virtual-scroll-viewport.component.mjs +357 -0
- package/esm2020/lib/anna-generic-table-lib/directives/anna-fixed-row-size-table-virtual-scroll-strategy/anna-fixed-row-size-table-virtual-scroll-strategy.directive.mjs +189 -0
- package/esm2020/lib/anna-generic-table-lib/directives/anna-fixed-row-size-table-virtual-scroll-strategy/index.mjs +2 -0
- package/esm2020/lib/anna-generic-table-lib/directives/anna-virtual-table/anna-virtual-table.directive.mjs +178 -0
- package/esm2020/lib/anna-generic-table-lib/directives/anna-virtual-table/index.mjs +2 -0
- package/esm2020/public-api.mjs +44 -0
- package/fesm2015/annalib-anna-core.mjs +4154 -0
- package/fesm2015/annalib-anna-core.mjs.map +1 -0
- package/fesm2020/annalib-anna-core.mjs +4151 -0
- package/fesm2020/annalib-anna-core.mjs.map +1 -0
- package/lib/anna-core-shared-lib/components/anna-buyer-approval-icon-template/anna-buyer-approval-icon-template.component.d.ts +8 -0
- package/lib/anna-core-shared-lib/components/anna-icon-column/anna-icon-column.component.d.ts +16 -0
- package/lib/anna-core-shared-lib/components/anna-live-icon-template/anna-live-icon-template.component.d.ts +8 -0
- package/lib/anna-core-shared-lib/components/anna-no-data/anna-no-data.component.d.ts +11 -0
- package/lib/anna-core-shared-lib/components/anna-notify-icon-template/anna-notify-icon-template.component.d.ts +8 -0
- package/lib/anna-core-shared-lib/components/anna-pay-for-performance-icon-template/anna-pay-for-performance-icon-template.component.d.ts +11 -0
- package/lib/anna-core-shared-lib/components/anna-rejected-icon-template/anna-rejected-icon-template.component.d.ts +8 -0
- package/lib/anna-core-shared-lib/constants/shared.constant.d.ts +32 -0
- package/lib/anna-core-shared-lib/directives/show-ellipsis-text/show-ellipsis-text.directive.d.ts +9 -0
- package/lib/anna-core-shared-lib/models/anna-generic-data-type.model.d.ts +12 -0
- package/{src/lib/anna-core-shared-lib/models/anna-global-dropdown-config.model.ts → lib/anna-core-shared-lib/models/anna-global-dropdown-config.model.d.ts} +9 -21
- package/{src/lib/anna-core-shared-lib/models/anna-non-editable-gt-models.ts → lib/anna-core-shared-lib/models/anna-non-editable-gt-models.d.ts} +17 -27
- package/lib/anna-core-shared-lib/models/anna-sort.model.d.ts +6 -0
- package/lib/anna-core-shared-lib/models/anna-tooltip.model.d.ts +25 -0
- package/lib/anna-core-shared-lib/pipes/annaFilterSearchedText.pipe.d.ts +9 -0
- package/lib/anna-core-shared-lib/services/anna-date-time-format.service.d.ts +25 -0
- package/lib/anna-core-shared-lib/services/anna-filter.service.d.ts +73 -0
- package/lib/anna-core-shared-lib/services/anna-generic-table.service.d.ts +14 -0
- package/lib/anna-core-shared-lib/services/anna-global-config.service.d.ts +21 -0
- package/lib/anna-core-shared-lib/services/anna-sort.service.d.ts +16 -0
- package/lib/anna-core.module.d.ts +32 -0
- package/lib/anna-dropdown-lib/components/anna-calendar-filter/anna-calendar-filter.component.d.ts +34 -0
- package/lib/anna-dropdown-lib/components/anna-week-calendar-filter/anna-week-calendar-filter.component.d.ts +70 -0
- package/lib/anna-generic-table-lib/components/anna-non-editable-generic-table/anna-non-editable-generic-table.component.d.ts +267 -0
- package/lib/anna-generic-table-lib/components/anna-sort/anna-sort.component.d.ts +17 -0
- package/lib/anna-generic-table-lib/components/anna-table-virtual-scroll-viewport/anna-table-virtual-scroll-viewport.component.d.ts +141 -0
- package/lib/anna-generic-table-lib/directives/anna-fixed-row-size-table-virtual-scroll-strategy/anna-fixed-row-size-table-virtual-scroll-strategy.directive.d.ts +89 -0
- package/{src/lib/anna-generic-table-lib/directives/anna-fixed-row-size-table-virtual-scroll-strategy/index.ts → lib/anna-generic-table-lib/directives/anna-fixed-row-size-table-virtual-scroll-strategy/index.d.ts} +0 -0
- package/lib/anna-generic-table-lib/directives/anna-virtual-table/anna-virtual-table.directive.d.ts +45 -0
- package/{src/lib/anna-generic-table-lib/directives/anna-virtual-table/index.ts → lib/anna-generic-table-lib/directives/anna-virtual-table/index.d.ts} +0 -0
- package/package.json +38 -18
- package/{src/public-api.ts → public-api.d.ts} +0 -28
- package/.browserslistrc +0 -16
- package/karma.conf.js +0 -44
- package/ng-package.json +0 -14
- package/src/lib/anna-core-shared-lib/components/anna-buyer-approval-icon-template/anna-buyer-approval-icon-template.component.html +0 -22
- package/src/lib/anna-core-shared-lib/components/anna-buyer-approval-icon-template/anna-buyer-approval-icon-template.component.scss +0 -0
- package/src/lib/anna-core-shared-lib/components/anna-buyer-approval-icon-template/anna-buyer-approval-icon-template.component.spec.ts +0 -25
- package/src/lib/anna-core-shared-lib/components/anna-buyer-approval-icon-template/anna-buyer-approval-icon-template.component.ts +0 -16
- package/src/lib/anna-core-shared-lib/components/anna-icon-column/anna-icon-column.component.html +0 -33
- package/src/lib/anna-core-shared-lib/components/anna-icon-column/anna-icon-column.component.scss +0 -0
- package/src/lib/anna-core-shared-lib/components/anna-icon-column/anna-icon-column.component.spec.ts +0 -25
- package/src/lib/anna-core-shared-lib/components/anna-icon-column/anna-icon-column.component.ts +0 -28
- package/src/lib/anna-core-shared-lib/components/anna-live-icon-template/anna-live-icon-template.component.html +0 -20
- package/src/lib/anna-core-shared-lib/components/anna-live-icon-template/anna-live-icon-template.component.scss +0 -0
- package/src/lib/anna-core-shared-lib/components/anna-live-icon-template/anna-live-icon-template.component.spec.ts +0 -25
- package/src/lib/anna-core-shared-lib/components/anna-live-icon-template/anna-live-icon-template.component.ts +0 -16
- package/src/lib/anna-core-shared-lib/components/anna-no-data/anna-no-data.component.html +0 -3
- package/src/lib/anna-core-shared-lib/components/anna-no-data/anna-no-data.component.scss +0 -17
- package/src/lib/anna-core-shared-lib/components/anna-no-data/anna-no-data.component.spec.ts +0 -24
- package/src/lib/anna-core-shared-lib/components/anna-no-data/anna-no-data.component.ts +0 -20
- package/src/lib/anna-core-shared-lib/components/anna-notify-icon-template/anna-notify-icon-template.component.html +0 -23
- package/src/lib/anna-core-shared-lib/components/anna-notify-icon-template/anna-notify-icon-template.component.scss +0 -0
- package/src/lib/anna-core-shared-lib/components/anna-notify-icon-template/anna-notify-icon-template.component.spec.ts +0 -25
- package/src/lib/anna-core-shared-lib/components/anna-notify-icon-template/anna-notify-icon-template.component.ts +0 -16
- package/src/lib/anna-core-shared-lib/components/anna-pay-for-performance-icon-template/anna-pay-for-performance-icon-template.component.html +0 -15
- package/src/lib/anna-core-shared-lib/components/anna-pay-for-performance-icon-template/anna-pay-for-performance-icon-template.component.scss +0 -0
- package/src/lib/anna-core-shared-lib/components/anna-pay-for-performance-icon-template/anna-pay-for-performance-icon-template.component.spec.ts +0 -25
- package/src/lib/anna-core-shared-lib/components/anna-pay-for-performance-icon-template/anna-pay-for-performance-icon-template.component.ts +0 -19
- package/src/lib/anna-core-shared-lib/components/anna-rejected-icon-template/anna-rejected-icon-template.component.html +0 -14
- package/src/lib/anna-core-shared-lib/components/anna-rejected-icon-template/anna-rejected-icon-template.component.scss +0 -0
- package/src/lib/anna-core-shared-lib/components/anna-rejected-icon-template/anna-rejected-icon-template.component.spec.ts +0 -25
- package/src/lib/anna-core-shared-lib/components/anna-rejected-icon-template/anna-rejected-icon-template.component.ts +0 -16
- package/src/lib/anna-core-shared-lib/constants/shared.constant.ts +0 -34
- package/src/lib/anna-core-shared-lib/directives/show-ellipsis-text/show-ellipsis-text.directive.ts +0 -19
- package/src/lib/anna-core-shared-lib/models/anna-generic-data-type.model.ts +0 -15
- package/src/lib/anna-core-shared-lib/models/anna-sort.model.ts +0 -7
- package/src/lib/anna-core-shared-lib/models/anna-tooltip.model.ts +0 -44
- package/src/lib/anna-core-shared-lib/pipes/annaFilterSearchedText.pipe.ts +0 -26
- package/src/lib/anna-core-shared-lib/services/anna-date-time-format.service.ts +0 -202
- package/src/lib/anna-core-shared-lib/services/anna-filter.service.ts +0 -507
- package/src/lib/anna-core-shared-lib/services/anna-generic-table.service.ts +0 -44
- package/src/lib/anna-core-shared-lib/services/anna-global-config.service.ts +0 -170
- package/src/lib/anna-core-shared-lib/services/anna-sort.service.ts +0 -179
- package/src/lib/anna-core.module.ts +0 -99
- package/src/lib/anna-dropdown-lib/components/anna-calendar-filter/anna-calendar-filter.component.html +0 -46
- package/src/lib/anna-dropdown-lib/components/anna-calendar-filter/anna-calendar-filter.component.scss +0 -153
- package/src/lib/anna-dropdown-lib/components/anna-calendar-filter/anna-calendar-filter.component.spec.ts +0 -24
- package/src/lib/anna-dropdown-lib/components/anna-calendar-filter/anna-calendar-filter.component.ts +0 -106
- package/src/lib/anna-dropdown-lib/components/anna-week-calendar-filter/anna-week-calendar-filter.component.html +0 -129
- package/src/lib/anna-dropdown-lib/components/anna-week-calendar-filter/anna-week-calendar-filter.component.scss +0 -275
- package/src/lib/anna-dropdown-lib/components/anna-week-calendar-filter/anna-week-calendar-filter.component.spec.ts +0 -24
- package/src/lib/anna-dropdown-lib/components/anna-week-calendar-filter/anna-week-calendar-filter.component.ts +0 -412
- package/src/lib/anna-generic-table-lib/components/anna-non-editable-generic-table/anna-non-editable-generic-table.component.html +0 -920
- package/src/lib/anna-generic-table-lib/components/anna-non-editable-generic-table/anna-non-editable-generic-table.component.scss +0 -596
- package/src/lib/anna-generic-table-lib/components/anna-non-editable-generic-table/anna-non-editable-generic-table.component.spec.ts +0 -25
- package/src/lib/anna-generic-table-lib/components/anna-non-editable-generic-table/anna-non-editable-generic-table.component.ts +0 -2012
- package/src/lib/anna-generic-table-lib/components/anna-sort/anna-sort.component.html +0 -10
- package/src/lib/anna-generic-table-lib/components/anna-sort/anna-sort.component.scss +0 -1
- package/src/lib/anna-generic-table-lib/components/anna-sort/anna-sort.component.spec.ts +0 -24
- package/src/lib/anna-generic-table-lib/components/anna-sort/anna-sort.component.ts +0 -70
- package/src/lib/anna-generic-table-lib/components/anna-table-virtual-scroll-viewport/anna-table-virtual-scroll-viewport.component.html +0 -13
- package/src/lib/anna-generic-table-lib/components/anna-table-virtual-scroll-viewport/anna-table-virtual-scroll-viewport.component.scss +0 -88
- package/src/lib/anna-generic-table-lib/components/anna-table-virtual-scroll-viewport/anna-table-virtual-scroll-viewport.component.spec.ts +0 -25
- package/src/lib/anna-generic-table-lib/components/anna-table-virtual-scroll-viewport/anna-table-virtual-scroll-viewport.component.ts +0 -460
- package/src/lib/anna-generic-table-lib/directives/anna-fixed-row-size-table-virtual-scroll-strategy/anna-fixed-row-size-table-virtual-scroll-strategy.directive.ts +0 -237
- package/src/lib/anna-generic-table-lib/directives/anna-virtual-table/anna-virtual-table.directive.ts +0 -204
- package/src/test.ts +0 -27
- package/tsconfig.lib.json +0 -19
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -17
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
@Component({
|
|
4
|
-
selector: 'anna-pay-for-performance-icon-template',
|
|
5
|
-
templateUrl: './anna-pay-for-performance-icon-template.component.html',
|
|
6
|
-
styleUrls: ['./anna-pay-for-performance-icon-template.component.scss'],
|
|
7
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
8
|
-
})
|
|
9
|
-
export class AnnaPayForPerformanceIconTemplateComponent implements OnInit {
|
|
10
|
-
|
|
11
|
-
@Input() color: string;
|
|
12
|
-
@Input() width: string;
|
|
13
|
-
@Input() height: string;
|
|
14
|
-
constructor() { }
|
|
15
|
-
|
|
16
|
-
ngOnInit() {
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
<ng-container [ngTemplateOutlet]="rejectedIcon"></ng-container>
|
|
2
|
-
|
|
3
|
-
<ng-template #rejectedIcon>
|
|
4
|
-
<svg width="15px" height="15px" viewBox="0 0 20 20">
|
|
5
|
-
<g id="Buyer-rejected-icon" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
6
|
-
<path
|
|
7
|
-
d="M15.7822266,4.21777344 C14.3671875,2.80276367 12.4951465,2 10.5,2 C6.37918945,2 3,5.37253906 3,9.5 C3,13.6296289 6.37133789,17 10.5,17 C14.6105273,17 18,13.6429004 18,9.5 C18,7.50485352 17.1972656,5.6327832 15.7822266,4.21777344 Z M10.5,15.2128906 C7.34220703,15.2128906 4.78710938,12.664502 4.78710938,9.5 C4.78710938,8.26950195 5.17382812,7.10055664 5.88574219,6.13375977 L13.8662402,14.1054395 C12.8993848,14.8261719 11.730498,15.2128906 10.5,15.2128906 Z M15.1054688,12.8661816 L7.13375977,4.88574219 C8.10061523,4.17382813 9.26950195,3.78710938 10.5,3.78710938 C13.6578809,3.78710938 16.2128906,6.33549805 16.2128906,9.5 C16.2128906,10.7304395 15.8261719,11.8993848 15.1054688,12.8661816 Z"
|
|
8
|
-
id="Shape"
|
|
9
|
-
fill="#4A4A4A"
|
|
10
|
-
fill-rule="nonzero"
|
|
11
|
-
></path>
|
|
12
|
-
</g>
|
|
13
|
-
</svg>
|
|
14
|
-
</ng-template>
|
|
File without changes
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
import { AnnaRejectedIconTemplateComponent } from './anna-rejected-icon-template.component';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
describe('RejectedIconTemplateComponent', () => {
|
|
6
|
-
let component: AnnaRejectedIconTemplateComponent;
|
|
7
|
-
let fixture: ComponentFixture<AnnaRejectedIconTemplateComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
await TestBed.configureTestingModule({
|
|
11
|
-
declarations: [ AnnaRejectedIconTemplateComponent ]
|
|
12
|
-
})
|
|
13
|
-
.compileComponents();
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
beforeEach(() => {
|
|
17
|
-
fixture = TestBed.createComponent(AnnaRejectedIconTemplateComponent);
|
|
18
|
-
component = fixture.componentInstance;
|
|
19
|
-
fixture.detectChanges();
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
it('should create', () => {
|
|
23
|
-
expect(component).toBeTruthy();
|
|
24
|
-
});
|
|
25
|
-
});
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
@Component({
|
|
4
|
-
selector: 'anna-rejected-icon-template',
|
|
5
|
-
templateUrl: './anna-rejected-icon-template.component.html',
|
|
6
|
-
styleUrls: ['./anna-rejected-icon-template.component.scss'],
|
|
7
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
8
|
-
})
|
|
9
|
-
export class AnnaRejectedIconTemplateComponent implements OnInit {
|
|
10
|
-
|
|
11
|
-
constructor() { }
|
|
12
|
-
|
|
13
|
-
ngOnInit(): void {
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
export class Constants {
|
|
2
|
-
static readonly SUCCESS_STRING = "success";
|
|
3
|
-
static readonly BACKEND_SERVER_URL = "/server/public/index.php/api";
|
|
4
|
-
static readonly ERROR_MSG = "Error occurred please try again.";
|
|
5
|
-
static readonly NO_DATA_MSG = "No Data to display";
|
|
6
|
-
static readonly SERVER_ERROR = "Server error. Please try Again";
|
|
7
|
-
static readonly USER_ORIGIN = "ANNA";
|
|
8
|
-
static readonly ACTIVE_USER_STATUS = "active";
|
|
9
|
-
static readonly DELETED_USER_STATUS = "deleted";
|
|
10
|
-
static readonly INACTIVE_USER_STATUS = "inactive";
|
|
11
|
-
static readonly OGAdminRole = "OG-admin";
|
|
12
|
-
static readonly dollars = "$";
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export class ErrorCodes {
|
|
16
|
-
static readonly BAD_REQUEST = 400;
|
|
17
|
-
static readonly SERVER_ERROR = 500;
|
|
18
|
-
static readonly SUCCESS_CODE = 200;
|
|
19
|
-
static readonly SUCCESS_CODE_GET = 200;
|
|
20
|
-
static readonly SUCCESS_CODE_POST = 201;
|
|
21
|
-
static readonly SUCCESS_CODE_PATCH = 204;
|
|
22
|
-
static readonly NO_CONTENT = 204;
|
|
23
|
-
static readonly under_review = 409;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export enum Days {
|
|
27
|
-
M = 1,
|
|
28
|
-
Tu = 2,
|
|
29
|
-
We = 3,
|
|
30
|
-
Th = 4,
|
|
31
|
-
F = 5,
|
|
32
|
-
Sa = 6,
|
|
33
|
-
Su = 7,
|
|
34
|
-
}
|
package/src/lib/anna-core-shared-lib/directives/show-ellipsis-text/show-ellipsis-text.directive.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Directive, ElementRef, HostListener } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
@Directive({
|
|
4
|
-
selector: '[showEllipsisTextOnHover]'
|
|
5
|
-
})
|
|
6
|
-
|
|
7
|
-
export class showEllipsisTextOnHoverDirective {
|
|
8
|
-
|
|
9
|
-
constructor(private elementRef: ElementRef) {}
|
|
10
|
-
|
|
11
|
-
@HostListener('mouseenter')
|
|
12
|
-
onMouseEnter(): void {
|
|
13
|
-
const element = this.elementRef.nativeElement;
|
|
14
|
-
if (element.offsetWidth < element.scrollWidth) {
|
|
15
|
-
element.title = element.textContent;
|
|
16
|
-
}
|
|
17
|
-
else if (element.title) element.removeAttribute('title');
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export interface WeekObject {
|
|
2
|
-
startDate: string;
|
|
3
|
-
endDate: string;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
export interface SellerGroupHierarchy {
|
|
7
|
-
inventoryCode: string;
|
|
8
|
-
program: string;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export interface GtColumnIconEmittedData{
|
|
12
|
-
data: any;
|
|
13
|
-
key: string;
|
|
14
|
-
}
|
|
15
|
-
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
export class TooltipModel {
|
|
2
|
-
isSelected: boolean;
|
|
3
|
-
label: string;
|
|
4
|
-
id: number;
|
|
5
|
-
value: string;
|
|
6
|
-
|
|
7
|
-
constructor(obj: string,id: number) {
|
|
8
|
-
this.label = obj ? obj.toString() : null;
|
|
9
|
-
this.value = obj;
|
|
10
|
-
this.isSelected = false;
|
|
11
|
-
this.id = id;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export class tooltipModelForColumnLevelFiltering {
|
|
16
|
-
isHidden;
|
|
17
|
-
isSelected: boolean;
|
|
18
|
-
data: string;
|
|
19
|
-
constructor(data: string) {
|
|
20
|
-
this.data = data;
|
|
21
|
-
this.isSelected = true;
|
|
22
|
-
this.isHidden = false;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export class radioButtonModel {
|
|
27
|
-
key: string;
|
|
28
|
-
label: string;
|
|
29
|
-
isSortRequired: boolean;
|
|
30
|
-
isFilterRequired: boolean;
|
|
31
|
-
|
|
32
|
-
constructor(key: string, value: string,sort: boolean, filter: boolean) {
|
|
33
|
-
this.key = key;
|
|
34
|
-
this.label = value;
|
|
35
|
-
this.isSortRequired = sort;
|
|
36
|
-
this.isFilterRequired = filter;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export enum AllSelectedStatus {
|
|
41
|
-
none = 0,
|
|
42
|
-
allSelected = 1,
|
|
43
|
-
fewSelected = 2,
|
|
44
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Pipe, PipeTransform } from "@angular/core";
|
|
2
|
-
import { memoize } from "lodash-es";
|
|
3
|
-
|
|
4
|
-
@Pipe({
|
|
5
|
-
name: "AnnafilterSearchedText",
|
|
6
|
-
})
|
|
7
|
-
export class AnnaFilterSearchedTextPipe implements PipeTransform {
|
|
8
|
-
callFilter = memoize(this.filter, (...args) => this.filter(args[0], args[1], args[2]));
|
|
9
|
-
|
|
10
|
-
transform(items: any[], searchText: any, keyName?: any): any[] {
|
|
11
|
-
return this.callFilter(items, searchText, keyName);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
filter(items: any[], searchText: string, keyName?: any): any[] {
|
|
15
|
-
if (!items) return [];
|
|
16
|
-
if (!searchText) return items;
|
|
17
|
-
searchText = searchText.toString().toLowerCase();
|
|
18
|
-
|
|
19
|
-
//if keyName is undefined every key will be considered for filtering.
|
|
20
|
-
if (!keyName)
|
|
21
|
-
return items.filter(
|
|
22
|
-
(item) => Object.values(item).filter((n) => n.toString().toLowerCase().includes(searchText)).length > 0
|
|
23
|
-
);
|
|
24
|
-
return items.filter((item) => item[keyName].toString().toLowerCase().startsWith(searchText));
|
|
25
|
-
}
|
|
26
|
-
}
|
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
// Angular import statements
|
|
2
|
-
import { Injectable } from '@angular/core';
|
|
3
|
-
import { NgbDate } from '@ng-bootstrap/ng-bootstrap';
|
|
4
|
-
|
|
5
|
-
// Third party import statements
|
|
6
|
-
import moment from "moment";
|
|
7
|
-
|
|
8
|
-
// User defined import statements
|
|
9
|
-
export type NgbDateType = { year: number, month: number, day: number };
|
|
10
|
-
|
|
11
|
-
@Injectable({
|
|
12
|
-
providedIn: 'root'
|
|
13
|
-
})
|
|
14
|
-
export class AnnaDateTimeFormatService {
|
|
15
|
-
|
|
16
|
-
constructor() {
|
|
17
|
-
console.log("AnnaDateTimeFormatService service created.")
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
convertToNgbDateStandardFormat(date: any): NgbDateType | NgbDate {
|
|
21
|
-
return {
|
|
22
|
-
year: parseInt(moment(date, "MM/DD/YYYY").format("YYYY")),
|
|
23
|
-
month: parseInt(moment(date, "MM/DD/YYYY").format("M")),
|
|
24
|
-
day: parseInt(moment(date, "MM/DD/YYYY").format("D")),
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
convertToNgbDate(date: any, parseFormat: any): NgbDateType | NgbDate {
|
|
29
|
-
return {
|
|
30
|
-
year: parseInt(moment(date, parseFormat).format("YYYY")),
|
|
31
|
-
month: parseInt(moment(date, parseFormat).format("M")),
|
|
32
|
-
day: parseInt(moment(date, parseFormat).format("D")),
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
formatToTwelveHrs(time: any, callRemoveZero: boolean) {
|
|
37
|
-
if (time.endsWith('A') || time.endsWith('P')) {
|
|
38
|
-
time = time.substring(0, time.length - 1);
|
|
39
|
-
}
|
|
40
|
-
let tmp = time.split(":");
|
|
41
|
-
let formattedTime = [];
|
|
42
|
-
if (+tmp[0] > 12) {
|
|
43
|
-
formattedTime[0] = (+tmp[0] - 12).toString();
|
|
44
|
-
if (+tmp[0] == 24) formattedTime[2] = "AM";
|
|
45
|
-
else formattedTime[2] = "PM";
|
|
46
|
-
} else if (tmp[0] == "12") {
|
|
47
|
-
formattedTime[0] = tmp[0];
|
|
48
|
-
formattedTime[2] = "PM";
|
|
49
|
-
} else if (tmp[0] == "00") {
|
|
50
|
-
formattedTime[0] = "12"
|
|
51
|
-
formattedTime[2] = "AM";
|
|
52
|
-
} else {
|
|
53
|
-
formattedTime[0] = tmp[0];
|
|
54
|
-
formattedTime[2] = "AM";
|
|
55
|
-
}
|
|
56
|
-
formattedTime[1] = tmp[1];
|
|
57
|
-
if (callRemoveZero) formattedTime = this.removeZero(formattedTime);
|
|
58
|
-
return formattedTime;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
convertTotwentyFourHrsFormat(time: any, callAddZero: any) {
|
|
62
|
-
let tmp = time.split(/[ :]+/);
|
|
63
|
-
let formattedTime = [];
|
|
64
|
-
if (tmp[0] != "12" && tmp[2] == "PM") {
|
|
65
|
-
formattedTime[0] = (+tmp[0] + 12).toString();
|
|
66
|
-
} else if (tmp[0] == "12" && tmp[2] == "AM") {
|
|
67
|
-
formattedTime[0] = "00";
|
|
68
|
-
} else formattedTime[0] = tmp[0].toString();
|
|
69
|
-
formattedTime[1] = tmp[1].toString();
|
|
70
|
-
if (callAddZero) formattedTime = this.addZero(formattedTime);
|
|
71
|
-
return formattedTime;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
removeZero(time: any) {
|
|
75
|
-
let removedZero;
|
|
76
|
-
let formattedTime = time;
|
|
77
|
-
if (
|
|
78
|
-
time[0] == "01" ||
|
|
79
|
-
time[0] == "02" ||
|
|
80
|
-
time[0] == "03" ||
|
|
81
|
-
time[0] == "04" ||
|
|
82
|
-
time[0] == "05" ||
|
|
83
|
-
time[0] == "06" ||
|
|
84
|
-
time[0] == "07" ||
|
|
85
|
-
time[0] == "08" ||
|
|
86
|
-
time[0] == "09"
|
|
87
|
-
) {
|
|
88
|
-
removedZero = time[0].toString();
|
|
89
|
-
formattedTime[0] = removedZero.charAt(1);
|
|
90
|
-
formattedTime[1] = time[1];
|
|
91
|
-
formattedTime[2] = time[2];
|
|
92
|
-
}
|
|
93
|
-
return formattedTime;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
addZero(time: any) {
|
|
97
|
-
let addedZero;
|
|
98
|
-
let formattedTime = time;
|
|
99
|
-
if (time[1] == "0") time[1] = "0" + time[1];
|
|
100
|
-
if (
|
|
101
|
-
time[0] == "0" ||
|
|
102
|
-
time[0] == "1" ||
|
|
103
|
-
time[0] == "2" ||
|
|
104
|
-
time[0] == "3" ||
|
|
105
|
-
time[0] == "4" ||
|
|
106
|
-
time[0] == "5" ||
|
|
107
|
-
time[0] == "6" ||
|
|
108
|
-
time[0] == "7" ||
|
|
109
|
-
time[0] == "8" ||
|
|
110
|
-
time[0] == "9"
|
|
111
|
-
) {
|
|
112
|
-
addedZero = "0" + time[0];
|
|
113
|
-
formattedTime[0] = addedZero;
|
|
114
|
-
formattedTime[1] = time[1];
|
|
115
|
-
}
|
|
116
|
-
return formattedTime;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
sortByTimeAscending(a: any, b: any) {
|
|
120
|
-
let format = "HH:mm:ss";
|
|
121
|
-
a = moment(a, format);
|
|
122
|
-
b = moment(b, format);
|
|
123
|
-
|
|
124
|
-
let results;
|
|
125
|
-
|
|
126
|
-
results = a.hours() > b.hours() ? 1 : a.hours() < b.hours() ? -1 : 0;
|
|
127
|
-
|
|
128
|
-
if (results === 0) results = a.minutes() > b.minutes() ? 1 : a.minutes() < b.minutes() ? -1 : 0;
|
|
129
|
-
|
|
130
|
-
if (results === 0) results = a.seconds() > b.seconds() ? 1 : a.seconds() < b.seconds() ? -1 : 0;
|
|
131
|
-
|
|
132
|
-
return results;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
sortByTimeDescending(a: any, b: any) {
|
|
136
|
-
let format = "HH:mm:ss";
|
|
137
|
-
a = moment(a, format);
|
|
138
|
-
b = moment(b, format);
|
|
139
|
-
|
|
140
|
-
let results;
|
|
141
|
-
|
|
142
|
-
results = a.hours() < b.hours() ? 1 : a.hours() > b.hours() ? -1 : 0;
|
|
143
|
-
|
|
144
|
-
if (results === 0) results = a.minutes() < b.minutes() ? 1 : a.minutes() > b.minutes() ? -1 : 0;
|
|
145
|
-
|
|
146
|
-
if (results === 0) results = a.seconds() < b.seconds() ? 1 : a.seconds() > b.seconds() ? -1 : 0;
|
|
147
|
-
return results;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
convertNgbDateToMoment(ngbDate: NgbDate | NgbDateType): string {
|
|
151
|
-
let converted = moment();
|
|
152
|
-
converted.month(ngbDate.month - 1);
|
|
153
|
-
converted.date(ngbDate.day);
|
|
154
|
-
converted.year(ngbDate.year);
|
|
155
|
-
return converted.format("MM/DD/YYYY");
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
compareDate(a: string, b: string, isAsc: boolean) {
|
|
159
|
-
return isAsc ? moment(a).diff(b) : moment(b).diff(a);
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
formatDateAndHHMMATimeToStandardFormat(dateAndTime: any) {
|
|
163
|
-
let standardFormat, date, time;
|
|
164
|
-
if (dateAndTime.includes("|")) {
|
|
165
|
-
date = dateAndTime.slice(0, dateAndTime.indexOf("|"));
|
|
166
|
-
time = dateAndTime.slice(dateAndTime.indexOf('|') + 1, dateAndTime.length).trim();
|
|
167
|
-
|
|
168
|
-
time = time.slice(0, 2) + ":" + time.slice(2, 4) + " " + time.slice(4, 5);
|
|
169
|
-
time = time + "M";
|
|
170
|
-
standardFormat = date + time;
|
|
171
|
-
}
|
|
172
|
-
else {
|
|
173
|
-
standardFormat = dateAndTime + " 00:00 AM"
|
|
174
|
-
}
|
|
175
|
-
return moment(standardFormat).format("MM/DD/YYYY hh:mm A");
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
compare(a: number | string, b: number | string, isAsc: boolean) {
|
|
179
|
-
if(typeof a == 'string' && typeof b == 'string'){
|
|
180
|
-
a = a.toLowerCase();
|
|
181
|
-
b = b.toLowerCase();
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
return (a < b ? -1 : 1) * (isAsc ? 1 : -1);
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
sortDataByBroadcastTimeAsc(firstParamTime: string, secondParamTime: string, broadcastTime: string) {
|
|
188
|
-
let format = "HH:mm:ss";
|
|
189
|
-
|
|
190
|
-
let a = moment(firstParamTime, format);
|
|
191
|
-
let b = moment(secondParamTime, format);
|
|
192
|
-
|
|
193
|
-
let broadcastMomentDateTime = moment(broadcastTime, "HH:mm:ss");
|
|
194
|
-
|
|
195
|
-
a = a.isBefore(broadcastMomentDateTime) ? a.add(1, "d") : a;
|
|
196
|
-
b = b.isBefore(broadcastMomentDateTime) ? b.add(1, "d") : b;
|
|
197
|
-
|
|
198
|
-
let result = a.isBefore(b) ? -1 : a.isAfter(b) ? 1 : 0;
|
|
199
|
-
return result;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
}
|