@datarailsshared/datarailsshared 1.4.506 → 1.4.518
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/bundles/datarailsshared-datarailsshared.umd.js +248 -104
- package/bundles/datarailsshared-datarailsshared.umd.js.map +1 -1
- package/datarailsshared-datarailsshared-1.4.518.tgz +0 -0
- package/datarailsshared-datarailsshared.metadata.json +1 -1
- package/esm2015/lib/date-tags/date-tag.component.js +4 -3
- package/esm2015/lib/date-tags/forecast-tag/forecast-tag.component.js +11 -11
- package/esm2015/lib/date-tags/forecast-tag/forecast-tag.service.js +83 -0
- package/esm2015/lib/dr-dynamic-tag/dr-dynamic-tag.component.js +28 -14
- package/esm2015/lib/dr-inputs/checkbox/checkbox.component.js +2 -1
- package/esm2015/lib/dr-inputs/dr-select/dr-select.component.js +1 -1
- package/esm2015/lib/dr-scenario/components/dr-scenario-configuration/dr-scenario-configuration.component.js +7 -5
- package/esm2015/lib/dr-scenario/consts/scenario-tags-config.js +8 -3
- package/esm2015/lib/dr-scenario/interfaces/scenario.js +1 -1
- package/esm2015/lib/dr-scenario/services/scenario.service.js +52 -23
- package/esm2015/lib/dr-tags/dr-tag.component.js +13 -9
- package/esm2015/lib/dr-tags/dr-tag.types.js +2 -0
- package/esm2015/lib/models/serverTags.js +2 -1
- package/esm2015/public-api.js +2 -1
- package/fesm2015/datarailsshared-datarailsshared.js +243 -106
- package/fesm2015/datarailsshared-datarailsshared.js.map +1 -1
- package/lib/date-tags/date-tag.component.d.ts +2 -0
- package/lib/date-tags/forecast-tag/forecast-tag.component.d.ts +4 -4
- package/lib/date-tags/forecast-tag/forecast-tag.service.d.ts +12 -0
- package/lib/dr-dynamic-tag/dr-dynamic-tag.component.d.ts +5 -1
- package/lib/dr-scenario/components/dr-scenario-configuration/dr-scenario-configuration.component.d.ts +1 -0
- package/lib/dr-scenario/consts/scenario-tags-config.d.ts +1 -1
- package/lib/dr-scenario/interfaces/scenario.d.ts +1 -1
- package/lib/dr-scenario/services/scenario.service.d.ts +6 -3
- package/lib/dr-tags/dr-tag.component.d.ts +4 -0
- package/lib/dr-tags/dr-tag.types.d.ts +4 -0
- package/lib/models/serverTags.d.ts +1 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/datarailsshared-datarailsshared-1.4.506.tgz +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
2
|
import { IDateTag } from '../models/serverTags';
|
|
3
|
+
import { ITagAdditionalSettings } from '../dr-tags/dr-tag.types';
|
|
3
4
|
export declare class DateTagComponent {
|
|
4
5
|
name: string | undefined;
|
|
5
6
|
lockedDate: any[];
|
|
@@ -8,6 +9,7 @@ export declare class DateTagComponent {
|
|
|
8
9
|
disabled: boolean;
|
|
9
10
|
fiscalYearStartsFrom?: number;
|
|
10
11
|
fiscalYearBack?: boolean;
|
|
12
|
+
tagAdditionalSettings: ITagAdditionalSettings;
|
|
11
13
|
selectedDate: EventEmitter<IDateTag>;
|
|
12
14
|
changeSelectedDate(date: any): void;
|
|
13
15
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { OnChanges, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { AnyTagComponent } from '../date-tag.component';
|
|
3
|
-
import {
|
|
4
|
-
import { MatButtonToggleChange } from '@angular/material/button-toggle';
|
|
3
|
+
import { ITagAdditionalSettings } from '../../dr-tags/dr-tag.types';
|
|
5
4
|
export declare class ForecastTagComponent extends AnyTagComponent implements OnChanges {
|
|
6
5
|
fiscalYearStartsFrom?: number;
|
|
7
6
|
fiscalYearBack?: boolean;
|
|
8
7
|
lockedDate: any[];
|
|
8
|
+
tagAdditionalSettings: ITagAdditionalSettings;
|
|
9
9
|
forecastValue: number | undefined;
|
|
10
10
|
isDateEventHappened: boolean;
|
|
11
11
|
forecastTags: any[];
|
|
@@ -18,8 +18,8 @@ export declare class ForecastTagComponent extends AnyTagComponent implements OnC
|
|
|
18
18
|
initName(): void;
|
|
19
19
|
getFiscalMonthFromDate(dateObj: any, fiscal_year_starts_from: any): number;
|
|
20
20
|
getFiscalYearFromDate(dateObj: any, fiscal_year_starts_from: any, fiscal_year_back: any): any;
|
|
21
|
-
changeTagInputHandler(
|
|
22
|
-
changeYearInputHandler(
|
|
21
|
+
changeTagInputHandler(): void;
|
|
22
|
+
changeYearInputHandler(): void;
|
|
23
23
|
chosenTagHandler(): void;
|
|
24
24
|
dateFilter(date: any): boolean;
|
|
25
25
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Moment } from 'moment';
|
|
2
|
+
export declare class ForecastTagService {
|
|
3
|
+
private static readonly MONTH_DIFF;
|
|
4
|
+
private static forecastByMonth;
|
|
5
|
+
constructor();
|
|
6
|
+
static getFiscalMonthFromDate(date: Moment, fiscalYearStartsFrom: number): number;
|
|
7
|
+
static getFiscalYearFromDate(date: Moment, fiscalYearStartsFrom: number, fiscalYearBack: boolean): number;
|
|
8
|
+
static getForecastLabel(month: number): string;
|
|
9
|
+
static getCalendarDateFromMonthAndFiscalYear(chosenMoment: Moment, monthLabel: string, fiscalYearStartsFrom: number, fiscalYearBack: boolean): number;
|
|
10
|
+
static addMonthsWithoutYearChange(date: Moment, monthLabel: string, fiscalYearStartsFrom: number): Moment;
|
|
11
|
+
static transformYearFromFiscal(fiscalYearWithMonth: Moment, fiscalYearStartsFrom: number, fiscalYearBack: boolean): number;
|
|
12
|
+
}
|
|
@@ -8,6 +8,10 @@ export declare class DrDynamicTagComponent implements OnChanges {
|
|
|
8
8
|
connectedTags: ITagForServer[];
|
|
9
9
|
isDynamicTagAddEnabled: boolean;
|
|
10
10
|
disabled: boolean;
|
|
11
|
+
fiscalYearStartsFrom: number;
|
|
12
|
+
fiscalYearBack: boolean;
|
|
13
|
+
hideFavoriteStar: boolean;
|
|
14
|
+
showSplitInputs: boolean;
|
|
11
15
|
tagChange: EventEmitter<ITagForServer>;
|
|
12
16
|
tagAdd: EventEmitter<TDynamicTagValue>;
|
|
13
17
|
selectedDynamicTag: TDynamicTagValue;
|
|
@@ -21,5 +25,5 @@ export declare class DrDynamicTagComponent implements OnChanges {
|
|
|
21
25
|
private updateDynamicTagValues;
|
|
22
26
|
private getSelectedDynamicTag;
|
|
23
27
|
private getParentValueKey;
|
|
24
|
-
private
|
|
28
|
+
private getConvertedForecastPeriodValue;
|
|
25
29
|
}
|
|
@@ -14,6 +14,7 @@ export declare class DrScenarioConfigurationComponent implements OnInit {
|
|
|
14
14
|
wholeTagsConfig: ITag[];
|
|
15
15
|
set selectedScenario(scenario: Scenario);
|
|
16
16
|
isMultipleDimension: boolean;
|
|
17
|
+
isForecastMultipleDimension: boolean;
|
|
17
18
|
scenarioDataChanged: EventEmitter<TScenarioDataChanged>;
|
|
18
19
|
get selectedScenario(): Scenario;
|
|
19
20
|
get scenarioTags(): IScenarioTagUi[];
|
|
@@ -21,4 +21,4 @@ export declare const allDateTags: {
|
|
|
21
21
|
toggle: boolean;
|
|
22
22
|
};
|
|
23
23
|
};
|
|
24
|
-
export declare function getScenarioTagDataConfig(isMultipleDimension: boolean): TScenarioTagData<TScenarioTagConfigData>;
|
|
24
|
+
export declare function getScenarioTagDataConfig(isMultipleDimension: boolean, isForecastMultipleDimension: boolean): TScenarioTagData<TScenarioTagConfigData>;
|
|
@@ -12,7 +12,7 @@ export interface IScenarioCommon {
|
|
|
12
12
|
toggle: boolean;
|
|
13
13
|
name: string;
|
|
14
14
|
description: string;
|
|
15
|
-
|
|
15
|
+
acceptableSubTags?: TagsConfigSubType[];
|
|
16
16
|
turnOffDateTags?: boolean;
|
|
17
17
|
}
|
|
18
18
|
export interface IScenario extends Omit<IScenarioCommon, 'name' | 'description'> {
|
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
import { ITag } from '../../models/serverTags';
|
|
2
|
-
import { IScenarioTagUi, Scenario } from '../interfaces/scenario';
|
|
2
|
+
import { IScenarioSubTag, IScenarioTagUi, Scenario } from '../interfaces/scenario';
|
|
3
3
|
export declare class ScenarioService {
|
|
4
4
|
private DEFAULT_FORECAST_DATE_TAG;
|
|
5
5
|
private wholeTagsConfig;
|
|
6
6
|
private currentTagsConfig;
|
|
7
7
|
private isMultipleDimension;
|
|
8
|
+
private isForecastMultipleDimension;
|
|
8
9
|
get scenarios(): Scenario[];
|
|
9
10
|
private get areExistingTagsConfig();
|
|
10
|
-
initScenarioTags(wholeTagsConfig: ITag[], currentTagsConfig: ITag[], isMultipleDimension: boolean): void;
|
|
11
|
+
initScenarioTags(wholeTagsConfig: ITag[], currentTagsConfig: ITag[], isMultipleDimension: boolean, isForecastMultipleDimension: boolean): void;
|
|
11
12
|
getTagsConfigByScenarioTags(scenarioTags: IScenarioTagUi[], tagsConfig: ITag[]): ITag[];
|
|
12
13
|
getScenarioTagsByScenario(scenario: Scenario): any[];
|
|
14
|
+
tagNotSupportingDatesHandler<T extends IScenarioTagUi>(tag: T, tagNotSupportingDates: T, dateTag: T): void;
|
|
15
|
+
tagAcceptableSubTagsHandler<T extends IScenarioTagUi>(tag: T, dateTag: T): void;
|
|
13
16
|
sortScenarioTags(scenarioTagsUi: any[]): any[];
|
|
17
|
+
static sortedSubTags(tag: IScenarioTagUi): IScenarioSubTag[];
|
|
14
18
|
private initExistingTagsConfig;
|
|
15
19
|
private prepareScenarioTag;
|
|
16
|
-
private sortedScenarioSubTags;
|
|
17
20
|
private updateScenarioSubTags;
|
|
18
21
|
private turnOffDateTag;
|
|
19
22
|
private hideNotAvailableTags;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { IDateTag, IListTag, ITag, ITagForServer, TagTypes, TDynamicTag, TDynamicTagValue } from '../models/serverTags';
|
|
3
|
+
import { ITagAdditionalSettings } from './dr-tag.types';
|
|
3
4
|
export declare class DrTagComponent implements OnInit, OnChanges {
|
|
4
5
|
tagConfig: ITag;
|
|
5
6
|
selectedTag: ITagForServer;
|
|
@@ -11,6 +12,7 @@ export declare class DrTagComponent implements OnInit, OnChanges {
|
|
|
11
12
|
set connectedTags(tags: ITagForServer[]);
|
|
12
13
|
isDynamicTagAddEnabled: boolean;
|
|
13
14
|
disabled: boolean;
|
|
15
|
+
tagAdditionalSettings: ITagAdditionalSettings;
|
|
14
16
|
tagChange: EventEmitter<ITagForServer>;
|
|
15
17
|
dynamicTagChange: EventEmitter<ITagForServer[]>;
|
|
16
18
|
dynamicTagAdd: EventEmitter<TDynamicTagValue>;
|
|
@@ -20,10 +22,12 @@ export declare class DrTagComponent implements OnInit, OnChanges {
|
|
|
20
22
|
tagTypes: typeof TagTypes;
|
|
21
23
|
dateTag: any;
|
|
22
24
|
listTag: any;
|
|
25
|
+
private readonly connectableTags;
|
|
23
26
|
private connectedTagsValues;
|
|
24
27
|
private dynamicTagValue;
|
|
25
28
|
private _connectedTags;
|
|
26
29
|
get connectedTags(): ITagForServer[];
|
|
30
|
+
get isDynamicTagMultipleLine(): boolean;
|
|
27
31
|
constructor();
|
|
28
32
|
ngOnChanges(simpleChanges: SimpleChanges): void;
|
|
29
33
|
ngOnInit(): void;
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from './lib/date-tags/date-tag.component';
|
|
2
2
|
export * from './lib/date-tags/forecast-tag/forecast-tag.component';
|
|
3
|
+
export * from './lib/date-tags/forecast-tag/forecast-tag.service';
|
|
3
4
|
export * from './lib/date-tags/month-tag/month-tag.component';
|
|
4
5
|
export * from './lib/date-tags/quarter-tag/quarter-tag.component';
|
|
5
6
|
export * from './lib/date-tags/week-tag/week-tag.component';
|
|
Binary file
|