@datarailsshared/datarailsshared 1.4.163-rocket → 1.4.164-rocket
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 +492 -28
- package/bundles/datarailsshared-datarailsshared.umd.js.map +1 -1
- package/datarailsshared-datarailsshared-1.4.164-rocket.tgz +0 -0
- package/datarailsshared-datarailsshared.d.ts +2 -0
- package/datarailsshared-datarailsshared.metadata.json +1 -1
- package/esm2015/datarailsshared-datarailsshared.js +3 -1
- package/esm2015/lib/date-tags/day-tag/day-tag.component.js +3 -8
- package/esm2015/lib/date-tags/month-tag/month-tag.component.js +3 -8
- package/esm2015/lib/date-tags/year-tag/year-tag.component.js +3 -8
- package/esm2015/lib/dr-inputs/dr-toggle-button/dr-toggle-button.component.js +8 -3
- package/esm2015/lib/dr-inputs/dr-toggle-button/toggle-button-theme.js +6 -0
- package/esm2015/lib/dr-scenario/components/dr-scenario-configuration/dr-scenario-configuration.component.js +87 -0
- package/esm2015/lib/dr-scenario/components/dr-scenario-tag-configuration/dr-scenario-tag-configuration.component.js +74 -0
- package/esm2015/lib/dr-scenario/consts/scenario-tags-config.js +73 -0
- package/esm2015/lib/dr-scenario/dr-scenario.module.js +28 -0
- package/esm2015/lib/dr-scenario/interfaces/scenario.js +8 -0
- package/esm2015/lib/dr-scenario/services/scenario.service.js +160 -0
- package/esm2015/lib/dr-tags/dr-tag.component.js +17 -5
- package/esm2015/lib/models/serverTags.js +13 -1
- package/esm2015/public-api.js +6 -1
- package/fesm2015/datarailsshared-datarailsshared.js +455 -29
- package/fesm2015/datarailsshared-datarailsshared.js.map +1 -1
- package/lib/dr-inputs/dr-toggle-button/dr-toggle-button.component.d.ts +3 -0
- package/lib/dr-inputs/dr-toggle-button/toggle-button-theme.d.ts +4 -0
- package/lib/dr-scenario/components/dr-scenario-configuration/dr-scenario-configuration.component.d.ts +25 -0
- package/lib/dr-scenario/components/dr-scenario-tag-configuration/dr-scenario-tag-configuration.component.d.ts +26 -0
- package/lib/dr-scenario/consts/scenario-tags-config.d.ts +24 -0
- package/lib/dr-scenario/dr-scenario.module.d.ts +2 -0
- package/lib/dr-scenario/interfaces/scenario.d.ts +43 -0
- package/lib/dr-scenario/services/scenario.service.d.ts +21 -0
- package/lib/dr-tags/dr-tag.component.d.ts +7 -3
- package/lib/models/serverTags.d.ts +15 -1
- package/package.json +1 -1
- package/public-api.d.ts +5 -1
- package/datarailsshared-datarailsshared-1.4.163-rocket.tgz +0 -0
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { ChangeDetectorRef } from '@angular/core';
|
|
2
2
|
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
+
import { ToggleButtonTheme } from './toggle-button-theme';
|
|
3
4
|
export declare class DrToggleButtonComponent implements ControlValueAccessor {
|
|
4
5
|
private cdr;
|
|
5
6
|
_disabled: boolean;
|
|
6
7
|
items: string[] | any[];
|
|
7
8
|
bindLabel: string | null;
|
|
8
9
|
bindValue: string | null;
|
|
10
|
+
bindHidden: string | null;
|
|
11
|
+
theme: ToggleButtonTheme;
|
|
9
12
|
selectedValue: boolean;
|
|
10
13
|
set disabled(value: boolean);
|
|
11
14
|
constructor(cdr: ChangeDetectorRef);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { IScenarioTagUi, Scenario, TScenarioDataChanged } from '../../interfaces/scenario';
|
|
3
|
+
import { ScenarioService } from '../../services/scenario.service';
|
|
4
|
+
import { ITag } from '../../../models/serverTags';
|
|
5
|
+
import { ToggleButtonTheme } from '../../../dr-inputs/dr-toggle-button/toggle-button-theme';
|
|
6
|
+
export declare class DrScenarioConfigurationComponent implements OnInit {
|
|
7
|
+
private scenarioService;
|
|
8
|
+
toggleButtonTheme: typeof ToggleButtonTheme;
|
|
9
|
+
scenarios: Scenario[];
|
|
10
|
+
private _scenarioTags;
|
|
11
|
+
private tagNotSupportingDates;
|
|
12
|
+
currentTagsConfig: ITag[];
|
|
13
|
+
wholeTagsConfig: ITag[];
|
|
14
|
+
selectedScenario: Scenario;
|
|
15
|
+
scenarioDataChanged: EventEmitter<TScenarioDataChanged>;
|
|
16
|
+
get scenarioTags(): IScenarioTagUi[];
|
|
17
|
+
set scenarioTags(tags: IScenarioTagUi[]);
|
|
18
|
+
constructor(scenarioService: ScenarioService);
|
|
19
|
+
ngOnInit(): void;
|
|
20
|
+
onScenarioChange(scenario: Scenario): void;
|
|
21
|
+
onScenarioTagToggle(tag: IScenarioTagUi): void;
|
|
22
|
+
onScenarioDataChange(): void;
|
|
23
|
+
private tagNotSupportingDatesHandler;
|
|
24
|
+
private tagAcceptableDateHandler;
|
|
25
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { ITag, ITagForServer, TConnectedTags, TDynamicTag } from '../../../models/serverTags';
|
|
3
|
+
import { Scenario, TScenarioDataChanged } from '../../interfaces/scenario';
|
|
4
|
+
export declare class DrScenarioTagConfigurationComponent implements OnChanges {
|
|
5
|
+
tagsConfig: ITag[];
|
|
6
|
+
set currentTags(tags: ITagForServer[]);
|
|
7
|
+
scenario: Scenario;
|
|
8
|
+
connectedTags: TConnectedTags;
|
|
9
|
+
dynamicTagValues: TDynamicTag;
|
|
10
|
+
lockedDates: string[] | number[];
|
|
11
|
+
fiscalYearStartsFrom: number;
|
|
12
|
+
fiscalYearBack: boolean;
|
|
13
|
+
isDynamicAddEnabled: boolean;
|
|
14
|
+
scenarioTagDataChanged: EventEmitter<TScenarioDataChanged>;
|
|
15
|
+
currentTagsMap: {
|
|
16
|
+
[tagId: number]: ITagForServer;
|
|
17
|
+
};
|
|
18
|
+
private _currentTags;
|
|
19
|
+
private dynamicTagsToSave;
|
|
20
|
+
private tagsToSave;
|
|
21
|
+
get currentTags(): ITagForServer[];
|
|
22
|
+
ngOnChanges(simpleChanges: SimpleChanges): void;
|
|
23
|
+
onTagChange($event: ITagForServer): void;
|
|
24
|
+
onDynamicTagsChange($event: ITagForServer[]): void;
|
|
25
|
+
onScenarioTagDataChanged(): void;
|
|
26
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { TScenarioTagConfigData, TScenarioTagData } from '../interfaces/scenario';
|
|
2
|
+
export declare const allDateTags: {
|
|
3
|
+
year: {
|
|
4
|
+
name: string;
|
|
5
|
+
toggle: boolean;
|
|
6
|
+
};
|
|
7
|
+
quarter: {
|
|
8
|
+
name: string;
|
|
9
|
+
toggle: boolean;
|
|
10
|
+
};
|
|
11
|
+
month: {
|
|
12
|
+
name: string;
|
|
13
|
+
toggle: boolean;
|
|
14
|
+
};
|
|
15
|
+
day: {
|
|
16
|
+
name: string;
|
|
17
|
+
toggle: boolean;
|
|
18
|
+
};
|
|
19
|
+
week: {
|
|
20
|
+
name: string;
|
|
21
|
+
toggle: boolean;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export declare function getScenarioTagDataConfig(isMultipleDimension: boolean): TScenarioTagData<TScenarioTagConfigData>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ITag, ITagForServer, TagsConfigSubType, TagTypes } from '../../models/serverTags';
|
|
2
|
+
export declare enum Scenario {
|
|
3
|
+
ACTUALS = "Actuals",
|
|
4
|
+
FORECAST = "Forecast",
|
|
5
|
+
BUDGET = "Budget",
|
|
6
|
+
NONE = "None"
|
|
7
|
+
}
|
|
8
|
+
export interface IScenarioTag extends ITag {
|
|
9
|
+
scenarioData: IScenario;
|
|
10
|
+
}
|
|
11
|
+
export interface IScenarioCommon {
|
|
12
|
+
toggle: boolean;
|
|
13
|
+
name: string;
|
|
14
|
+
description: string;
|
|
15
|
+
acceptableDateTags?: TagsConfigSubType[];
|
|
16
|
+
turnOffDateTags?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface IScenario extends Omit<IScenarioCommon, 'name' | 'description'> {
|
|
19
|
+
name?: string;
|
|
20
|
+
description?: string;
|
|
21
|
+
hidden?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface IScenarioTagUi extends IScenarioCommon {
|
|
24
|
+
selectedTagSubType: TagsConfigSubType;
|
|
25
|
+
type: TagTypes;
|
|
26
|
+
subTags?: IScenarioSubTag[];
|
|
27
|
+
}
|
|
28
|
+
export interface IScenarioSubTag {
|
|
29
|
+
name: string;
|
|
30
|
+
subType: TagsConfigSubType;
|
|
31
|
+
hidden?: boolean;
|
|
32
|
+
}
|
|
33
|
+
export declare type TScenarioTagConfigData = {
|
|
34
|
+
[key in TagsConfigSubType]?: IScenario;
|
|
35
|
+
};
|
|
36
|
+
export declare type TScenarioTagData<T> = {
|
|
37
|
+
[key in Scenario]?: T;
|
|
38
|
+
};
|
|
39
|
+
export declare type TScenarioDataChanged = {
|
|
40
|
+
scenario: Scenario;
|
|
41
|
+
tags?: ITagForServer[];
|
|
42
|
+
tagsConfig?: ITag[];
|
|
43
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ITag } from '../../models/serverTags';
|
|
2
|
+
import { IScenarioTagUi, Scenario } from '../interfaces/scenario';
|
|
3
|
+
export declare class ScenarioService {
|
|
4
|
+
private DEFAULT_FORECAST_DATE_TAG;
|
|
5
|
+
private wholeTagsConfig;
|
|
6
|
+
private currentTagsConfig;
|
|
7
|
+
private isMultipleDimension;
|
|
8
|
+
get scenarios(): Scenario[];
|
|
9
|
+
private get areExistingTagsConfig();
|
|
10
|
+
initScenarioTags(scenario: Scenario, wholeTagsConfig: ITag[], currentTagsConfig: ITag[], isMultipleDimension?: boolean): void;
|
|
11
|
+
getTagsConfigByScenarioTags(scenarioTags: IScenarioTagUi[], tagsConfig: ITag[]): ITag[];
|
|
12
|
+
getScenarioTagsByScenario(scenario: Scenario): any[];
|
|
13
|
+
sortScenarioTags(scenarioTagsUi: any[]): any[];
|
|
14
|
+
private initExistingTagsConfig;
|
|
15
|
+
private prepareScenarioTag;
|
|
16
|
+
private updateScenarioDateTag;
|
|
17
|
+
private turnOffDateTag;
|
|
18
|
+
private hideNotAvailableTags;
|
|
19
|
+
private getScenarioSelectedDateTag;
|
|
20
|
+
private getScenarioTagsConfig;
|
|
21
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { EventEmitter, OnInit } from '@angular/core';
|
|
1
|
+
import { EventEmitter, OnChanges, OnInit } from '@angular/core';
|
|
2
2
|
import { IDateTag, IListTag, ITag, ITagForServer, TagTypes, TDynamicTag, TDynamicTagValue } from '../models/serverTags';
|
|
3
|
-
export declare class DrTagComponent implements OnInit {
|
|
3
|
+
export declare class DrTagComponent implements OnInit, OnChanges {
|
|
4
4
|
tagConfig: ITag;
|
|
5
5
|
selectedTag: ITagForServer;
|
|
6
6
|
lockedDate: any[];
|
|
@@ -8,7 +8,7 @@ export declare class DrTagComponent implements OnInit {
|
|
|
8
8
|
fiscalYearBack?: boolean;
|
|
9
9
|
tagsConfig: ITag[];
|
|
10
10
|
dynamicTagValues: TDynamicTag;
|
|
11
|
-
connectedTags: ITagForServer[];
|
|
11
|
+
set connectedTags(tags: ITagForServer[]);
|
|
12
12
|
isDynamicTagAddEnabled: boolean;
|
|
13
13
|
disabled: boolean;
|
|
14
14
|
tagChange: EventEmitter<ITagForServer>;
|
|
@@ -22,11 +22,15 @@ export declare class DrTagComponent implements OnInit {
|
|
|
22
22
|
listTag: any;
|
|
23
23
|
private connectedTagsValues;
|
|
24
24
|
private dynamicTagValue;
|
|
25
|
+
private _connectedTags;
|
|
26
|
+
get connectedTags(): ITagForServer[];
|
|
25
27
|
constructor();
|
|
28
|
+
ngOnChanges(): void;
|
|
26
29
|
ngOnInit(): void;
|
|
27
30
|
onDateHandler(event: IDateTag): void;
|
|
28
31
|
onListHandler(event: IListTag): void;
|
|
29
32
|
onDynamicTagChange(tag?: ITagForServer): void;
|
|
30
33
|
private onDynamicHandler;
|
|
31
34
|
private configureTagItems;
|
|
35
|
+
private calculateDynamicTag;
|
|
32
36
|
}
|
|
@@ -2,7 +2,17 @@ export declare enum TagTypes {
|
|
|
2
2
|
LIST = "LIST",
|
|
3
3
|
DATE = "DATE"
|
|
4
4
|
}
|
|
5
|
-
export declare
|
|
5
|
+
export declare enum TagsConfigSubType {
|
|
6
|
+
YEAR = "year",
|
|
7
|
+
PLAN = "plan",
|
|
8
|
+
BUDGET_CYCLE = "budget cycle",
|
|
9
|
+
MONTH = "month",
|
|
10
|
+
WEEK = "week",
|
|
11
|
+
DAY = "day",
|
|
12
|
+
FORECAST_NEW = "forecast_new",
|
|
13
|
+
QUARTER = "quarter",
|
|
14
|
+
FILE_STATUS = "file_status"
|
|
15
|
+
}
|
|
6
16
|
export interface ITag {
|
|
7
17
|
id: number;
|
|
8
18
|
name: string;
|
|
@@ -38,3 +48,7 @@ export declare type TDynamicTagValue = IDynamicTag | string | number;
|
|
|
38
48
|
export declare type TDynamicTag = {
|
|
39
49
|
[parentValue: string]: TDynamicTagValue[];
|
|
40
50
|
};
|
|
51
|
+
export declare type TConnectedTags = {
|
|
52
|
+
[tagId: number]: ITagForServer[];
|
|
53
|
+
};
|
|
54
|
+
export declare type TAG_TYPES = TagTypes;
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -43,17 +43,20 @@ export * from './lib/dr-error/dr-error.component';
|
|
|
43
43
|
export * from './lib/dr-dialog/services/dialog.service';
|
|
44
44
|
export * from './lib/dr-details-list/dr-details-list.component';
|
|
45
45
|
export { TooltipPosition } from './lib/dr-tooltip/enums/tooltip-position.enum';
|
|
46
|
+
export { Scenario } from './lib/dr-scenario/interfaces/scenario';
|
|
47
|
+
export { ToggleButtonTheme } from './lib/dr-inputs/dr-toggle-button/toggle-button-theme';
|
|
46
48
|
export { TooltipInfoContext } from './lib/dr-tooltip/interfaces/tooltip-component-context';
|
|
47
49
|
export { Step } from './lib/stepper/interfaces/stepper';
|
|
48
50
|
export * from './lib/dr-dialog/interfaces/dialog-data';
|
|
49
51
|
export * from './lib/dr-inputs/dr-model-debounce-change.directive';
|
|
50
52
|
export * from './lib/models/datePicker';
|
|
51
|
-
export { TAG_TYPES, ITag, IDateTag, IListTag, ITagForServer, IDynamicTag, TDynamicTagValue, TDynamicTag, TagTypes } from './lib/models/serverTags';
|
|
53
|
+
export { TAG_TYPES, ITag, IDateTag, IListTag, ITagForServer, IDynamicTag, TDynamicTagValue, TDynamicTag, TagTypes, TConnectedTags } from './lib/models/serverTags';
|
|
52
54
|
export { ISpinnerOptions, SpinnerType, SpinnerSize } from './lib/models/spinnerOptions';
|
|
53
55
|
export { ElPosition, IDropdown, IDropdownItem, IDropdownActionIcon, IDropdownCoordinate, IDropdownCallEvent, IDropdownAction } from './lib/models/dropdown';
|
|
54
56
|
export { DrPopoverRef, IDrPopoverComponentModel, Point, DrPopoverConfig, IPopoverManualClosing, DrPopoverAlignment, DrPopoverAlignmentDimension, } from './lib/models/popover';
|
|
55
57
|
export { IValidationError } from './lib/models/validationError';
|
|
56
58
|
export * from './lib/models/chat';
|
|
59
|
+
export { ScenarioService } from './lib/dr-scenario/services/scenario.service';
|
|
57
60
|
export { DateTagModule } from './lib/date-tags/date-tag.module';
|
|
58
61
|
export { ListTagModule } from './lib/list-tags/list-tag.module';
|
|
59
62
|
export { DrTagModule } from './lib/dr-tags/dr-tag.module';
|
|
@@ -72,3 +75,4 @@ export { DrStepperModule } from './lib/stepper/stepper.module';
|
|
|
72
75
|
export { DrDialogModule } from './lib/dr-dialog/dialog.module';
|
|
73
76
|
export { DrChatModule } from './lib/dr-chat/chat.module';
|
|
74
77
|
export { DrDetailsListModule } from './lib/dr-details-list/dr-details-list.module';
|
|
78
|
+
export { DrScenarioModule } from './lib/dr-scenario/dr-scenario.module';
|
|
Binary file
|