@datarailsshared/datarailsshared 1.5.223 → 1.5.225

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.
Files changed (26) hide show
  1. package/datarailsshared-datarailsshared-1.5.225.tgz +0 -0
  2. package/esm2022/lib/dr-dialog/components/dialog-modal-wrapper/dialog-modal-wrapper.component.mjs +2 -2
  3. package/esm2022/lib/dr-dialog/components/dialog-wrapper/dialog-wrapper.component.mjs +2 -2
  4. package/esm2022/lib/dr-dialog/interfaces/dialog-data.mjs +2 -1
  5. package/esm2022/lib/dr-scenario/components/dr-scenario-configuration/dr-scenario-configuration.component.mjs +8 -36
  6. package/esm2022/lib/dr-scenario/consts/scenario-tags-config.mjs +2 -2
  7. package/esm2022/lib/dr-scenario/dr-scenario.module.mjs +8 -4
  8. package/esm2022/lib/dr-scenario/interfaces/scenario.mjs +1 -1
  9. package/esm2022/lib/dr-scenario/services/scenario.service.mjs +39 -14
  10. package/esm2022/lib/dr-tags-constructor/dr-tags-constructor.component.mjs +108 -0
  11. package/esm2022/lib/dr-tags-constructor/dr-tags-constructor.module.mjs +23 -0
  12. package/esm2022/lib/dr-tags-constructor/tags-constructor.service.mjs +70 -0
  13. package/esm2022/public-api.mjs +5 -2
  14. package/fesm2022/datarailsshared-datarailsshared.mjs +231 -52
  15. package/fesm2022/datarailsshared-datarailsshared.mjs.map +1 -1
  16. package/lib/dr-dialog/interfaces/dialog-data.d.ts +2 -1
  17. package/lib/dr-scenario/components/dr-scenario-configuration/dr-scenario-configuration.component.d.ts +0 -4
  18. package/lib/dr-scenario/dr-scenario.module.d.ts +2 -1
  19. package/lib/dr-scenario/interfaces/scenario.d.ts +1 -1
  20. package/lib/dr-scenario/services/scenario.service.d.ts +4 -2
  21. package/lib/dr-tags-constructor/dr-tags-constructor.component.d.ts +33 -0
  22. package/lib/dr-tags-constructor/dr-tags-constructor.module.d.ts +10 -0
  23. package/lib/dr-tags-constructor/tags-constructor.service.d.ts +12 -0
  24. package/package.json +1 -1
  25. package/public-api.d.ts +4 -1
  26. package/datarailsshared-datarailsshared-1.5.223.tgz +0 -0
@@ -98,7 +98,7 @@ export interface ModalFormField {
98
98
  datePickerFormat?: TimeframeOption;
99
99
  formGroupClass?: string;
100
100
  }
101
- export type SizeModal = 'small-modal' | 'medium-small-modal' | 'medium-modal' | 'medium-modal-max-height' | 'medium-large-modal' | 'large-modal' | 'xl-modal' | 'xl-custom-modal';
101
+ export type SizeModal = 'small-modal' | 'small-modal-max-height' | 'medium-small-modal' | 'medium-modal' | 'medium-modal-max-height' | 'medium-large-modal' | 'large-modal' | 'xl-modal' | 'xl-custom-modal';
102
102
  export type DataProp<T = any> = DialogData<T>['data'];
103
103
  export type DialogTheme = DataProp['theme'];
104
104
  export type DialogFooterButton = {
@@ -111,6 +111,7 @@ export type DialogFooterButton = {
111
111
  };
112
112
  export declare enum DIALOG_SIZE {
113
113
  SMALL = "small-modal",
114
+ SMALL_MAX_HEIGHT = "small-modal-max-height",
114
115
  MEDIUM = "medium-modal",
115
116
  MEDIUM_SMALL = "medium-small-modal",
116
117
  MEDIUM_MAX_HEIGHT = "medium-modal-max-height",
@@ -2,11 +2,9 @@ import { EventEmitter, OnInit } from '@angular/core';
2
2
  import { IScenarioTagUi, Scenario, TScenarioDataChanged } from '../../interfaces/scenario';
3
3
  import { ScenarioService } from '../../services/scenario.service';
4
4
  import { ITag } from '../../../models/serverTags';
5
- import { ToggleButtonMode } from '../../../dr-inputs/dr-toggle-button/toggle-button-mode';
6
5
  import * as i0 from "@angular/core";
7
6
  export declare class DrScenarioConfigurationComponent implements OnInit {
8
7
  private scenarioService;
9
- toggleButtonMode: typeof ToggleButtonMode;
10
8
  scenarios: Scenario[];
11
9
  private _scenarioTags;
12
10
  private _selectedScenario;
@@ -25,8 +23,6 @@ export declare class DrScenarioConfigurationComponent implements OnInit {
25
23
  onScenarioChange(scenario: Scenario): void;
26
24
  onScenarioTagToggle(tag: IScenarioTagUi): void;
27
25
  onScenarioDataChange(): void;
28
- private tagNotSupportingDatesHandler;
29
- private tagAcceptableDateHandler;
30
26
  static ɵfac: i0.ɵɵFactoryDeclaration<DrScenarioConfigurationComponent, never>;
31
27
  static ɵcmp: i0.ɵɵComponentDeclaration<DrScenarioConfigurationComponent, "dr-scenario-configuration", never, { "currentTagsConfig": { "alias": "currentTagsConfig"; "required": false; }; "wholeTagsConfig": { "alias": "wholeTagsConfig"; "required": false; }; "selectedScenario": { "alias": "selectedScenario"; "required": false; }; "isMultipleDimension": { "alias": "isMultipleDimension"; "required": false; }; }, { "scenarioDataChanged": "scenarioDataChanged"; }, never, never, false, never>;
32
28
  }
@@ -5,8 +5,9 @@ import * as i3 from "@angular/common";
5
5
  import * as i4 from "../dr-inputs/dr-inputs.module";
6
6
  import * as i5 from "@angular/forms";
7
7
  import * as i6 from "../dr-tags/dr-tag.module";
8
+ import * as i7 from "../dr-tags-constructor/dr-tags-constructor.module";
8
9
  export declare class DrScenarioModule {
9
10
  static ɵfac: i0.ɵɵFactoryDeclaration<DrScenarioModule, never>;
10
- static ɵmod: i0.ɵɵNgModuleDeclaration<DrScenarioModule, [typeof i1.DrScenarioConfigurationComponent, typeof i2.DrScenarioTagConfigurationComponent], [typeof i3.CommonModule, typeof i4.DrInputsModule, typeof i5.FormsModule, typeof i6.DrTagModule], [typeof i1.DrScenarioConfigurationComponent, typeof i2.DrScenarioTagConfigurationComponent]>;
11
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DrScenarioModule, [typeof i1.DrScenarioConfigurationComponent, typeof i2.DrScenarioTagConfigurationComponent], [typeof i3.CommonModule, typeof i4.DrInputsModule, typeof i5.FormsModule, typeof i6.DrTagModule, typeof i7.DrTagsConstructorModule], [typeof i1.DrScenarioConfigurationComponent, typeof i2.DrScenarioTagConfigurationComponent]>;
11
12
  static ɵinj: i0.ɵɵInjectorDeclaration<DrScenarioModule>;
12
13
  }
@@ -12,7 +12,7 @@ export interface IScenarioCommon {
12
12
  toggle: boolean;
13
13
  name: string;
14
14
  description: string;
15
- acceptableDateTags?: TagsConfigSubType[];
15
+ acceptableSubTags?: TagsConfigSubType[];
16
16
  turnOffDateTags?: boolean;
17
17
  }
18
18
  export interface IScenario extends Omit<IScenarioCommon, 'name' | 'description'> {
@@ -1,5 +1,5 @@
1
1
  import { ITag } from '../../models/serverTags';
2
- import { IScenarioTagUi, Scenario } from '../interfaces/scenario';
2
+ import { IScenarioSubTag, IScenarioTagUi, Scenario } from '../interfaces/scenario';
3
3
  import * as i0 from "@angular/core";
4
4
  export declare class ScenarioService {
5
5
  private DEFAULT_FORECAST_DATE_TAG;
@@ -11,10 +11,12 @@ export declare class ScenarioService {
11
11
  initScenarioTags(wholeTagsConfig: ITag[], currentTagsConfig: ITag[], isMultipleDimension: boolean): void;
12
12
  getTagsConfigByScenarioTags(scenarioTags: IScenarioTagUi[], tagsConfig: ITag[]): ITag[];
13
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;
14
16
  sortScenarioTags(scenarioTagsUi: any[]): any[];
17
+ static sortedSubTags(tag: IScenarioTagUi): IScenarioSubTag[];
15
18
  private initExistingTagsConfig;
16
19
  private prepareScenarioTag;
17
- private sortedScenarioSubTags;
18
20
  private updateScenarioSubTags;
19
21
  private turnOffDateTag;
20
22
  private hideNotAvailableTags;
@@ -0,0 +1,33 @@
1
+ import { EventEmitter, OnInit } from '@angular/core';
2
+ import { IScenarioTagUi } from '../dr-scenario/interfaces/scenario';
3
+ import { ToggleButtonMode } from '../dr-inputs/dr-toggle-button/toggle-button-mode';
4
+ import { ITag } from '../models/serverTags';
5
+ import { ScenarioService } from '../dr-scenario/services/scenario.service';
6
+ import { TagsConstructorService } from './tags-constructor.service';
7
+ import * as i0 from "@angular/core";
8
+ export declare class DrTagsConstructorComponent implements OnInit {
9
+ private scenarioService;
10
+ private tagsConstructor;
11
+ readonly toggleButtonMode: typeof ToggleButtonMode;
12
+ get currentTags(): IScenarioTagUi[];
13
+ get isScenarioFlow(): boolean;
14
+ scenarioTagsConfig: IScenarioTagUi[];
15
+ tagsConfigToDisplay: ITag[];
16
+ selectedTagsConfig: ITag[];
17
+ tagChange: EventEmitter<IScenarioTagUi | ITag>;
18
+ tagToggle: EventEmitter<IScenarioTagUi | ITag>;
19
+ stateChange: EventEmitter<ITag[]>;
20
+ private tagsUi;
21
+ private get tagsWithSubTags();
22
+ private get tagsNotSupportingDateTag();
23
+ constructor(scenarioService: ScenarioService, tagsConstructor: TagsConstructorService);
24
+ ngOnInit(): void;
25
+ onSubTagChange(tag: IScenarioTagUi): void;
26
+ onTagToggle(tag: IScenarioTagUi): void;
27
+ onStateChange(): void;
28
+ private buildTags;
29
+ private getTagsConfig;
30
+ private updateTagsState;
31
+ static ɵfac: i0.ɵɵFactoryDeclaration<DrTagsConstructorComponent, never>;
32
+ static ɵcmp: i0.ɵɵComponentDeclaration<DrTagsConstructorComponent, "dr-tags-constructor", never, { "scenarioTagsConfig": { "alias": "scenarioTagsConfig"; "required": false; }; "tagsConfigToDisplay": { "alias": "tagsConfigToDisplay"; "required": false; }; "selectedTagsConfig": { "alias": "selectedTagsConfig"; "required": false; }; }, { "tagChange": "tagChange"; "tagToggle": "tagToggle"; "stateChange": "stateChange"; }, never, never, false, never>;
33
+ }
@@ -0,0 +1,10 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./dr-tags-constructor.component";
3
+ import * as i2 from "@angular/common";
4
+ import * as i3 from "../dr-inputs/dr-inputs.module";
5
+ import * as i4 from "@angular/forms";
6
+ export declare class DrTagsConstructorModule {
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<DrTagsConstructorModule, never>;
8
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DrTagsConstructorModule, [typeof i1.DrTagsConstructorComponent], [typeof i2.CommonModule, typeof i3.DrInputsModule, typeof i4.FormsModule], [typeof i1.DrTagsConstructorComponent]>;
9
+ static ɵinj: i0.ɵɵInjectorDeclaration<DrTagsConstructorModule>;
10
+ }
@@ -0,0 +1,12 @@
1
+ import { ITag } from '../models/serverTags';
2
+ import { IScenarioTagUi } from '../dr-scenario/interfaces/scenario';
3
+ import * as i0 from "@angular/core";
4
+ export declare class TagsConstructorService {
5
+ private readonly tagsNotSupportingDatesTag;
6
+ private readonly tagsAcceptableSubTags;
7
+ buildTags(tagsConfigToDisplay: ITag[], selectedTagsConfig: ITag[]): IScenarioTagUi[];
8
+ private updateSubTags;
9
+ private prepareTag;
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<TagsConstructorService, never>;
11
+ static ɵprov: i0.ɵɵInjectableDeclaration<TagsConstructorService>;
12
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datarailsshared/datarailsshared",
3
- "version": "1.5.223",
3
+ "version": "1.5.225",
4
4
  "description": "DataRails shared components",
5
5
  "keywords": [
6
6
  "angular",
package/public-api.d.ts CHANGED
@@ -46,6 +46,7 @@ export * from './lib/dr-badge-status/dr-badge-status.component';
46
46
  export * from './lib/dr-alert/dr-alert.component';
47
47
  export * from './lib/dr-scenario/components/dr-scenario-tag-configuration/dr-scenario-tag-configuration.component';
48
48
  export * from './lib/dr-scenario/components/dr-scenario-configuration/dr-scenario-configuration.component';
49
+ export * from './lib/dr-tags-constructor/dr-tags-constructor.component';
49
50
  export * from './lib/dr-popover/dr-popover.directive';
50
51
  export * from './lib/dr-popover/dr-popover.component';
51
52
  export * from './lib/dr-popover/dr-popover.service';
@@ -87,7 +88,7 @@ export * from './lib/dr-dialog/interfaces/dialog-data';
87
88
  export * from './lib/dr-inputs/dr-model-debounce-change.directive';
88
89
  export * from './lib/directives/click-outside/click-outside.directive';
89
90
  export * from './lib/models/datePicker';
90
- export { TAG_TYPES, ITag, IDateTag, IListTag, ITagForServer, IDynamicTag, TDynamicTagValue, TDynamicTag, TagTypes, TConnectedTags } from './lib/models/serverTags';
91
+ export { TAG_TYPES, ITag, IDateTag, IListTag, ITagForServer, IDynamicTag, TDynamicTagValue, TDynamicTag, TagTypes, TagsConfigSubType, TConnectedTags } from './lib/models/serverTags';
91
92
  export { ISpinnerOptions, SpinnerType, SpinnerSize } from './lib/models/spinnerOptions';
92
93
  export { ElPosition, IDropdown, IDropdownItem, IDropdownActionIcon, IDropdownCoordinate, IDropdownCallEvent, IDropdownAction } from './lib/models/dropdown';
93
94
  export { DrPopoverRef, IDrPopoverComponentModel, Point, DrPopoverConfig, IPopoverManualClosing, DrPopoverAlignment, DrPopoverAlignmentDimension, } from './lib/models/popover';
@@ -96,6 +97,7 @@ export * from './lib/models/chat';
96
97
  export * from './lib/models/badgeStatus';
97
98
  export * from './lib/models/feedback';
98
99
  export { ScenarioService } from './lib/dr-scenario/services/scenario.service';
100
+ export { TagsConstructorService } from './lib/dr-tags-constructor/tags-constructor.service';
99
101
  export { DateTagModule } from './lib/date-tags/date-tag.module';
100
102
  export { ListTagModule } from './lib/list-tags/list-tag.module';
101
103
  export { DrTagModule } from './lib/dr-tags/dr-tag.module';
@@ -119,3 +121,4 @@ export { DrBadgeStatusModule } from './lib/dr-badge-status/dr-badge-status.modul
119
121
  export { TreeviewModule } from './lib/dr-treeview/dr-tree-view.module';
120
122
  export { ClickOutsideModule } from './lib/directives/click-outside/click-outside.module';
121
123
  export { DrAlertModule } from './lib/dr-alert/dr-alert.module';
124
+ export { DrTagsConstructorModule } from './lib/dr-tags-constructor/dr-tags-constructor.module';