@datarailsshared/datarailsshared 1.4.164-rocket → 1.4.166
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 +36 -495
- package/bundles/datarailsshared-datarailsshared.umd.js.map +1 -1
- package/datarailsshared-datarailsshared-1.4.166.tgz +0 -0
- package/datarailsshared-datarailsshared.d.ts +0 -2
- package/datarailsshared-datarailsshared.metadata.json +1 -1
- package/esm2015/datarailsshared-datarailsshared.js +1 -3
- package/esm2015/lib/date-tags/day-tag/day-tag.component.js +8 -3
- package/esm2015/lib/date-tags/month-tag/month-tag.component.js +8 -3
- package/esm2015/lib/date-tags/year-tag/year-tag.component.js +8 -3
- package/esm2015/lib/dr-dialog/components/dialog-wrapper/dialog-wrapper.component.js +4 -1
- package/esm2015/lib/dr-dialog/services/dialog.service.js +4 -1
- package/esm2015/lib/dr-inputs/date-pickers/dr-date-picker/dr-date-picker.component.js +2 -2
- package/esm2015/lib/dr-inputs/dr-inputs.module.js +2 -3
- package/esm2015/lib/dr-inputs/dr-toggle-button/dr-toggle-button.component.js +3 -8
- package/esm2015/lib/dr-tags/dr-tag.component.js +5 -17
- package/esm2015/lib/models/serverTags.js +1 -13
- package/esm2015/public-api.js +1 -6
- package/fesm2015/datarailsshared-datarailsshared.js +37 -458
- package/fesm2015/datarailsshared-datarailsshared.js.map +1 -1
- package/lib/dr-dialog/components/dialog-wrapper/dialog-wrapper.component.d.ts +1 -0
- package/lib/dr-dialog/services/dialog.service.d.ts +1 -0
- package/lib/dr-inputs/dr-toggle-button/dr-toggle-button.component.d.ts +0 -3
- package/lib/dr-tags/dr-tag.component.d.ts +3 -7
- package/lib/models/serverTags.d.ts +1 -15
- package/package.json +1 -1
- package/public-api.d.ts +1 -5
- package/datarailsshared-datarailsshared-1.4.164-rocket.tgz +0 -0
- package/esm2015/lib/dr-inputs/dr-toggle-button/toggle-button-theme.js +0 -6
- package/esm2015/lib/dr-scenario/components/dr-scenario-configuration/dr-scenario-configuration.component.js +0 -87
- package/esm2015/lib/dr-scenario/components/dr-scenario-tag-configuration/dr-scenario-tag-configuration.component.js +0 -74
- package/esm2015/lib/dr-scenario/consts/scenario-tags-config.js +0 -73
- package/esm2015/lib/dr-scenario/dr-scenario.module.js +0 -28
- package/esm2015/lib/dr-scenario/interfaces/scenario.js +0 -8
- package/esm2015/lib/dr-scenario/services/scenario.service.js +0 -160
- package/lib/dr-inputs/dr-toggle-button/toggle-button-theme.d.ts +0 -4
- package/lib/dr-scenario/components/dr-scenario-configuration/dr-scenario-configuration.component.d.ts +0 -25
- package/lib/dr-scenario/components/dr-scenario-tag-configuration/dr-scenario-tag-configuration.component.d.ts +0 -26
- package/lib/dr-scenario/consts/scenario-tags-config.d.ts +0 -24
- package/lib/dr-scenario/dr-scenario.module.d.ts +0 -2
- package/lib/dr-scenario/interfaces/scenario.d.ts +0 -43
- package/lib/dr-scenario/services/scenario.service.d.ts +0 -21
|
@@ -612,8 +612,13 @@
|
|
|
612
612
|
configurable: true
|
|
613
613
|
});
|
|
614
614
|
MonthTagComponent.prototype.initDate = function () {
|
|
615
|
-
|
|
616
|
-
|
|
615
|
+
if (this.defaultValue) {
|
|
616
|
+
this.date = this.defaultValue;
|
|
617
|
+
this.dateObj.date = this.date;
|
|
618
|
+
}
|
|
619
|
+
else {
|
|
620
|
+
this.dateObj.date = moment$7().unix();
|
|
621
|
+
}
|
|
617
622
|
};
|
|
618
623
|
MonthTagComponent.prototype.initName = function () {
|
|
619
624
|
if (!this.name) {
|
|
@@ -902,8 +907,13 @@
|
|
|
902
907
|
configurable: true
|
|
903
908
|
});
|
|
904
909
|
YearTagComponent.prototype.initDate = function () {
|
|
905
|
-
|
|
906
|
-
|
|
910
|
+
if (this.defaultValue) {
|
|
911
|
+
this.date = this.defaultValue;
|
|
912
|
+
this.dateObj.date = this.date;
|
|
913
|
+
}
|
|
914
|
+
else {
|
|
915
|
+
this.dateObj.date = moment$4().unix();
|
|
916
|
+
}
|
|
907
917
|
};
|
|
908
918
|
YearTagComponent.prototype.initName = function () {
|
|
909
919
|
if (!this.name) {
|
|
@@ -960,52 +970,30 @@
|
|
|
960
970
|
TagTypes["LIST"] = "LIST";
|
|
961
971
|
TagTypes["DATE"] = "DATE";
|
|
962
972
|
})(exports.TagTypes || (exports.TagTypes = {}));
|
|
963
|
-
var TagsConfigSubType;
|
|
964
|
-
(function (TagsConfigSubType) {
|
|
965
|
-
TagsConfigSubType["YEAR"] = "year";
|
|
966
|
-
TagsConfigSubType["PLAN"] = "plan";
|
|
967
|
-
TagsConfigSubType["BUDGET_CYCLE"] = "budget cycle";
|
|
968
|
-
TagsConfigSubType["MONTH"] = "month";
|
|
969
|
-
TagsConfigSubType["WEEK"] = "week";
|
|
970
|
-
TagsConfigSubType["DAY"] = "day";
|
|
971
|
-
TagsConfigSubType["FORECAST_NEW"] = "forecast_new";
|
|
972
|
-
TagsConfigSubType["QUARTER"] = "quarter";
|
|
973
|
-
TagsConfigSubType["FILE_STATUS"] = "file_status";
|
|
974
|
-
})(TagsConfigSubType || (TagsConfigSubType = {}));
|
|
975
973
|
|
|
976
974
|
var DrTagComponent = /** @class */ (function () {
|
|
977
975
|
function DrTagComponent() {
|
|
978
976
|
this.lockedDate = [];
|
|
979
977
|
this.dynamicTagValues = {};
|
|
978
|
+
this.connectedTags = [];
|
|
980
979
|
this.tagChange = new i0.EventEmitter(); // Not emit value for dynamic tag
|
|
981
980
|
this.dynamicTagChange = new i0.EventEmitter();
|
|
982
981
|
this.dynamicTagAdd = new i0.EventEmitter();
|
|
983
982
|
this.currentTagConnectedToDynamic = false;
|
|
984
983
|
this.tagTypes = exports.TagTypes;
|
|
985
984
|
this.connectedTagsValues = [];
|
|
986
|
-
this._connectedTags = [];
|
|
987
985
|
this.selectedTag = {
|
|
988
986
|
id: 0,
|
|
989
987
|
value: undefined,
|
|
990
988
|
name: ''
|
|
991
989
|
};
|
|
992
990
|
}
|
|
993
|
-
Object.defineProperty(DrTagComponent.prototype, "connectedTags", {
|
|
994
|
-
get: function () {
|
|
995
|
-
return this._connectedTags;
|
|
996
|
-
},
|
|
997
|
-
set: function (tags) {
|
|
998
|
-
this._connectedTags = tags || [];
|
|
999
|
-
},
|
|
1000
|
-
enumerable: false,
|
|
1001
|
-
configurable: true
|
|
1002
|
-
});
|
|
1003
|
-
DrTagComponent.prototype.ngOnChanges = function () {
|
|
1004
|
-
this.calculateDynamicTag();
|
|
1005
|
-
};
|
|
1006
991
|
DrTagComponent.prototype.ngOnInit = function () {
|
|
992
|
+
var _this = this;
|
|
1007
993
|
var _a, _b;
|
|
1008
|
-
this.
|
|
994
|
+
this.currentTagDynamic = this.tagConfig.options.is_custom;
|
|
995
|
+
this.currentTagConnectedToDynamic = _.some(this.tagsConfig, function (tagConfig) { return tagConfig.options.is_custom
|
|
996
|
+
&& ['year'].includes(_this.tagConfig.options.sub_type); });
|
|
1009
997
|
this.dateTag = {
|
|
1010
998
|
type: this.tagConfig.type,
|
|
1011
999
|
sub_type: this.tagConfig.options.sub_type,
|
|
@@ -1120,12 +1108,6 @@
|
|
|
1120
1108
|
}
|
|
1121
1109
|
});
|
|
1122
1110
|
};
|
|
1123
|
-
DrTagComponent.prototype.calculateDynamicTag = function () {
|
|
1124
|
-
var _this = this;
|
|
1125
|
-
this.currentTagDynamic = this.tagConfig.options.is_custom;
|
|
1126
|
-
this.currentTagConnectedToDynamic = _.some(this.tagsConfig, function (tagConfig) { return tagConfig.options.is_custom
|
|
1127
|
-
&& ['year'].includes(_this.tagConfig.options.sub_type); });
|
|
1128
|
-
};
|
|
1129
1111
|
return DrTagComponent;
|
|
1130
1112
|
}());
|
|
1131
1113
|
DrTagComponent.decorators = [
|
|
@@ -1219,8 +1201,13 @@
|
|
|
1219
1201
|
configurable: true
|
|
1220
1202
|
});
|
|
1221
1203
|
DayTagComponent.prototype.initDate = function () {
|
|
1222
|
-
|
|
1223
|
-
|
|
1204
|
+
if (this.defaultValue) {
|
|
1205
|
+
this.date = this.defaultValue;
|
|
1206
|
+
this.dateObj.date = this.date;
|
|
1207
|
+
}
|
|
1208
|
+
else {
|
|
1209
|
+
this.dateObj.date = moment$3().unix();
|
|
1210
|
+
}
|
|
1224
1211
|
};
|
|
1225
1212
|
DayTagComponent.prototype.initName = function () {
|
|
1226
1213
|
if (!this.name) {
|
|
@@ -2456,20 +2443,12 @@
|
|
|
2456
2443
|
elementClass: [{ type: i0.HostBinding, args: ['class',] }]
|
|
2457
2444
|
};
|
|
2458
2445
|
|
|
2459
|
-
exports.ToggleButtonTheme = void 0;
|
|
2460
|
-
(function (ToggleButtonTheme) {
|
|
2461
|
-
ToggleButtonTheme["DEFAULT"] = "default";
|
|
2462
|
-
ToggleButtonTheme["DOTTED"] = "dotted";
|
|
2463
|
-
})(exports.ToggleButtonTheme || (exports.ToggleButtonTheme = {}));
|
|
2464
|
-
|
|
2465
2446
|
var DrToggleButtonComponent = /** @class */ (function () {
|
|
2466
2447
|
function DrToggleButtonComponent(cdr) {
|
|
2467
2448
|
this.cdr = cdr;
|
|
2468
2449
|
this._disabled = false;
|
|
2469
2450
|
this.bindLabel = null;
|
|
2470
2451
|
this.bindValue = null;
|
|
2471
|
-
this.bindHidden = null;
|
|
2472
|
-
this.theme = exports.ToggleButtonTheme.DEFAULT;
|
|
2473
2452
|
this.onChange = function () {
|
|
2474
2453
|
};
|
|
2475
2454
|
this.onTouched = function () {
|
|
@@ -2506,12 +2485,12 @@
|
|
|
2506
2485
|
DrToggleButtonComponent.decorators = [
|
|
2507
2486
|
{ type: i0.Component, args: [{
|
|
2508
2487
|
selector: 'dr-toggle-button',
|
|
2509
|
-
template: "<div class=\"toggle-container\"
|
|
2488
|
+
template: "<div class=\"toggle-container\" [class.disabled]=\"_disabled\">\n <div\n *ngFor=\"let item of items\"\n (click)=\"setValue(item)\"\n [class.selected]=\"item[bindValue] === selectedValue || item === selectedValue\"\n [class.disabled]=\"item.disabled\"\n class=\"toggle-container__item\"\n >\n {{ item[bindLabel] || item.name || item }}\n </div>\n</div>\n",
|
|
2510
2489
|
providers: [
|
|
2511
2490
|
{ provide: forms.NG_VALUE_ACCESSOR, useExisting: i0.forwardRef(function () { return DrToggleButtonComponent; }), multi: true }
|
|
2512
2491
|
],
|
|
2513
2492
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
2514
|
-
styles: [".toggle-container{display:flex;flex-wrap:nowrap;box-sizing:border-box;border-radius:20px;height:28px}.toggle-container.disabled{pointer-events:none}.toggle-container__item{height:28px;display:flex;align-items:center;justify-content:center;padding:4px 16px;border-radius:20px;margin:-1px;cursor:pointer;font-weight:400;font-size:12px;line-height:20px;white-space:nowrap;color:#4e566c}.toggle-container__item.selected{background:#f2f2fb
|
|
2493
|
+
styles: [".toggle-container{display:flex;flex-wrap:nowrap;background:#f6f7f8;border:1px solid #c3c4ce;box-sizing:border-box;border-radius:20px;height:28px}.toggle-container.disabled{pointer-events:none}.toggle-container__item{height:28px;display:flex;align-items:center;justify-content:center;padding:4px 16px;border-radius:20px;margin:-1px;cursor:pointer;font-weight:400;font-size:12px;line-height:20px;white-space:nowrap;color:#4e566c}.toggle-container__item.selected{font-weight:400;background:#f2f2fb;border:1px solid #7f7fdd;color:#25258c}.toggle-container__item.disabled{pointer-events:none;cursor:default;background:#f0f1f4;color:#9ea1aa;border:1px solid #c3c4ce}\n"]
|
|
2515
2494
|
},] }
|
|
2516
2495
|
];
|
|
2517
2496
|
DrToggleButtonComponent.ctorParameters = function () { return [
|
|
@@ -2521,8 +2500,6 @@
|
|
|
2521
2500
|
items: [{ type: i0.Input }],
|
|
2522
2501
|
bindLabel: [{ type: i0.Input }],
|
|
2523
2502
|
bindValue: [{ type: i0.Input }],
|
|
2524
|
-
bindHidden: [{ type: i0.Input }],
|
|
2525
|
-
theme: [{ type: i0.Input }],
|
|
2526
2503
|
selectedValue: [{ type: i0.Input }],
|
|
2527
2504
|
disabled: [{ type: i0.Input }]
|
|
2528
2505
|
};
|
|
@@ -3924,6 +3901,9 @@
|
|
|
3924
3901
|
DialogWrapperComponent.prototype.closeDialog = function (data) {
|
|
3925
3902
|
this.dialogRef.close(data || false);
|
|
3926
3903
|
};
|
|
3904
|
+
DialogWrapperComponent.prototype.enableAcceptButton = function () {
|
|
3905
|
+
this.dialogData.acceptButton.isDisabled = false;
|
|
3906
|
+
};
|
|
3927
3907
|
DialogWrapperComponent.prototype.onDecline = function () {
|
|
3928
3908
|
this.dialogRef.close(undefined);
|
|
3929
3909
|
};
|
|
@@ -4112,6 +4092,9 @@
|
|
|
4112
4092
|
DialogService.prototype.close = function (params) {
|
|
4113
4093
|
this.wrapperComponent.close(params);
|
|
4114
4094
|
};
|
|
4095
|
+
DialogService.prototype.enableAcceptButton = function () {
|
|
4096
|
+
this.wrapperComponent.componentInstance.enableAcceptButton();
|
|
4097
|
+
};
|
|
4115
4098
|
DialogService.prototype.changeDialogThemeSize = function (theme) {
|
|
4116
4099
|
this.wrapperComponent.componentInstance.class = theme;
|
|
4117
4100
|
};
|
|
@@ -4223,14 +4206,6 @@
|
|
|
4223
4206
|
TooltipPosition["LEFT_BOTTOM"] = "left-bottom";
|
|
4224
4207
|
})(exports.TooltipPosition || (exports.TooltipPosition = {}));
|
|
4225
4208
|
|
|
4226
|
-
exports.Scenario = void 0;
|
|
4227
|
-
(function (Scenario) {
|
|
4228
|
-
Scenario["ACTUALS"] = "Actuals";
|
|
4229
|
-
Scenario["FORECAST"] = "Forecast";
|
|
4230
|
-
Scenario["BUDGET"] = "Budget";
|
|
4231
|
-
Scenario["NONE"] = "None";
|
|
4232
|
-
})(exports.Scenario || (exports.Scenario = {}));
|
|
4233
|
-
|
|
4234
4209
|
var DrModelDebounceChangeDirective = /** @class */ (function () {
|
|
4235
4210
|
function DrModelDebounceChangeDirective(ngModel) {
|
|
4236
4211
|
this.ngModel = ngModel;
|
|
@@ -4296,248 +4271,6 @@
|
|
|
4296
4271
|
return ChatMessage;
|
|
4297
4272
|
}());
|
|
4298
4273
|
|
|
4299
|
-
var _a;
|
|
4300
|
-
var allDateTags = (_a = {},
|
|
4301
|
-
_a[TagsConfigSubType.YEAR] = {
|
|
4302
|
-
name: 'Date',
|
|
4303
|
-
toggle: false,
|
|
4304
|
-
},
|
|
4305
|
-
_a[TagsConfigSubType.QUARTER] = {
|
|
4306
|
-
name: 'Date',
|
|
4307
|
-
toggle: false,
|
|
4308
|
-
},
|
|
4309
|
-
_a[TagsConfigSubType.MONTH] = {
|
|
4310
|
-
name: 'Date',
|
|
4311
|
-
toggle: false,
|
|
4312
|
-
},
|
|
4313
|
-
_a[TagsConfigSubType.DAY] = {
|
|
4314
|
-
name: 'Date',
|
|
4315
|
-
toggle: false,
|
|
4316
|
-
},
|
|
4317
|
-
_a[TagsConfigSubType.WEEK] = {
|
|
4318
|
-
name: 'Date',
|
|
4319
|
-
toggle: false,
|
|
4320
|
-
},
|
|
4321
|
-
_a);
|
|
4322
|
-
function getScenarioTagDataConfig(isMultipleDimension) {
|
|
4323
|
-
var _a, _b, _c, _d, _e;
|
|
4324
|
-
return _a = {},
|
|
4325
|
-
_a[exports.Scenario.ACTUALS] = Object.assign(Object.assign({}, allDateTags), (_b = {}, _b[TagsConfigSubType.MONTH] = {
|
|
4326
|
-
name: 'Date',
|
|
4327
|
-
toggle: true,
|
|
4328
|
-
}, _b[TagsConfigSubType.FILE_STATUS] = {
|
|
4329
|
-
toggle: false,
|
|
4330
|
-
}, _b)),
|
|
4331
|
-
_a[exports.Scenario.BUDGET] = (_c = {},
|
|
4332
|
-
_c[TagsConfigSubType.BUDGET_CYCLE] = {
|
|
4333
|
-
toggle: true,
|
|
4334
|
-
acceptableDateTags: [TagsConfigSubType.YEAR],
|
|
4335
|
-
hidden: !isMultipleDimension,
|
|
4336
|
-
},
|
|
4337
|
-
_c[TagsConfigSubType.PLAN] = {
|
|
4338
|
-
toggle: false,
|
|
4339
|
-
turnOffDateTags: true,
|
|
4340
|
-
hidden: isMultipleDimension,
|
|
4341
|
-
},
|
|
4342
|
-
_c[TagsConfigSubType.YEAR] = {
|
|
4343
|
-
name: 'Date',
|
|
4344
|
-
toggle: true,
|
|
4345
|
-
},
|
|
4346
|
-
_c[TagsConfigSubType.QUARTER] = {
|
|
4347
|
-
name: 'Date',
|
|
4348
|
-
toggle: false,
|
|
4349
|
-
},
|
|
4350
|
-
_c[TagsConfigSubType.FILE_STATUS] = {
|
|
4351
|
-
toggle: false,
|
|
4352
|
-
},
|
|
4353
|
-
_c),
|
|
4354
|
-
_a[exports.Scenario.FORECAST] = (_d = {},
|
|
4355
|
-
_d[TagsConfigSubType.FORECAST_NEW] = {
|
|
4356
|
-
toggle: true,
|
|
4357
|
-
name: 'Date',
|
|
4358
|
-
},
|
|
4359
|
-
_d[TagsConfigSubType.FILE_STATUS] = {
|
|
4360
|
-
toggle: false,
|
|
4361
|
-
},
|
|
4362
|
-
_d),
|
|
4363
|
-
_a[exports.Scenario.NONE] = Object.assign(Object.assign({}, allDateTags), (_e = {}, _e[TagsConfigSubType.MONTH] = {
|
|
4364
|
-
name: 'Date',
|
|
4365
|
-
toggle: true,
|
|
4366
|
-
}, _e[TagsConfigSubType.FILE_STATUS] = {
|
|
4367
|
-
toggle: true,
|
|
4368
|
-
}, _e)),
|
|
4369
|
-
_a;
|
|
4370
|
-
}
|
|
4371
|
-
|
|
4372
|
-
var ScenarioService = /** @class */ (function () {
|
|
4373
|
-
function ScenarioService() {
|
|
4374
|
-
this.DEFAULT_FORECAST_DATE_TAG = 'Month';
|
|
4375
|
-
}
|
|
4376
|
-
Object.defineProperty(ScenarioService.prototype, "scenarios", {
|
|
4377
|
-
get: function () {
|
|
4378
|
-
return _.orderBy(Object.values(exports.Scenario), function (scenario) { return scenario === exports.Scenario.NONE ? 1 : 0; });
|
|
4379
|
-
},
|
|
4380
|
-
enumerable: false,
|
|
4381
|
-
configurable: true
|
|
4382
|
-
});
|
|
4383
|
-
Object.defineProperty(ScenarioService.prototype, "areExistingTagsConfig", {
|
|
4384
|
-
get: function () {
|
|
4385
|
-
return !!this.currentTagsConfig;
|
|
4386
|
-
},
|
|
4387
|
-
enumerable: false,
|
|
4388
|
-
configurable: true
|
|
4389
|
-
});
|
|
4390
|
-
ScenarioService.prototype.initScenarioTags = function (scenario, wholeTagsConfig, currentTagsConfig, isMultipleDimension) {
|
|
4391
|
-
if (isMultipleDimension === void 0) { isMultipleDimension = true; }
|
|
4392
|
-
if (!(wholeTagsConfig === null || wholeTagsConfig === void 0 ? void 0 : wholeTagsConfig.length) || !scenario)
|
|
4393
|
-
return;
|
|
4394
|
-
this.wholeTagsConfig = wholeTagsConfig;
|
|
4395
|
-
this.currentTagsConfig = currentTagsConfig;
|
|
4396
|
-
this.isMultipleDimension = isMultipleDimension;
|
|
4397
|
-
};
|
|
4398
|
-
ScenarioService.prototype.getTagsConfigByScenarioTags = function (scenarioTags, tagsConfig) {
|
|
4399
|
-
var scenarioTagsConfig = _.filter(tagsConfig, function (tagConfig) { return _.some(scenarioTags, function (scenarioTag) { return scenarioTag.toggle && scenarioTag.selectedTagSubType === tagConfig.options.sub_type; }); });
|
|
4400
|
-
return this.sortScenarioTags(scenarioTagsConfig);
|
|
4401
|
-
};
|
|
4402
|
-
ScenarioService.prototype.getScenarioTagsByScenario = function (scenario) {
|
|
4403
|
-
var _this = this;
|
|
4404
|
-
var scenarioTagsConfig = this.getScenarioTagsConfig(scenario, this.wholeTagsConfig);
|
|
4405
|
-
var scenarioTagsUi = [];
|
|
4406
|
-
_.forEach(scenarioTagsConfig, function (scenarioTag) {
|
|
4407
|
-
var isDateTag = scenarioTag.type === exports.TagTypes.DATE;
|
|
4408
|
-
var dateTag = isDateTag && _.find(scenarioTagsUi, { type: exports.TagTypes.DATE });
|
|
4409
|
-
var tag = dateTag || _this.prepareScenarioTag(scenarioTagsConfig, scenarioTag, scenario, isDateTag);
|
|
4410
|
-
if (isDateTag) {
|
|
4411
|
-
_this.updateScenarioDateTag(tag, scenarioTag);
|
|
4412
|
-
}
|
|
4413
|
-
if (dateTag)
|
|
4414
|
-
return;
|
|
4415
|
-
scenarioTagsUi.push(tag);
|
|
4416
|
-
});
|
|
4417
|
-
if (this.areExistingTagsConfig) {
|
|
4418
|
-
this.initExistingTagsConfig(scenario, scenarioTagsUi);
|
|
4419
|
-
}
|
|
4420
|
-
var isTagNotSupportingDates = _.some(scenarioTagsUi, { turnOffDateTags: true, toggle: true });
|
|
4421
|
-
if (isTagNotSupportingDates) {
|
|
4422
|
-
this.turnOffDateTag(scenarioTagsUi);
|
|
4423
|
-
}
|
|
4424
|
-
var tagWithSpecificDateTags = _.find(scenarioTagsUi, function (tag) { var _a; return tag.toggle && !!((_a = tag.acceptableDateTags) === null || _a === void 0 ? void 0 : _a.length); });
|
|
4425
|
-
if (tagWithSpecificDateTags) {
|
|
4426
|
-
this.hideNotAvailableTags(tagWithSpecificDateTags, scenarioTagsUi);
|
|
4427
|
-
}
|
|
4428
|
-
return this.sortScenarioTags(scenarioTagsUi);
|
|
4429
|
-
};
|
|
4430
|
-
ScenarioService.prototype.sortScenarioTags = function (scenarioTagsUi) {
|
|
4431
|
-
return _.orderBy(scenarioTagsUi, [
|
|
4432
|
-
function (tag) { return (tag.type === exports.TagTypes.DATE ? 0 : 1); },
|
|
4433
|
-
function (tag) { return (tag.name === 'File Status'); }
|
|
4434
|
-
]);
|
|
4435
|
-
};
|
|
4436
|
-
ScenarioService.prototype.initExistingTagsConfig = function (scenario, scenarioTagsUi) {
|
|
4437
|
-
var _this = this;
|
|
4438
|
-
_.forEach(this.currentTagsConfig, function (tagConfig) {
|
|
4439
|
-
var _a, _b;
|
|
4440
|
-
var tagSubType = (_a = tagConfig === null || tagConfig === void 0 ? void 0 : tagConfig.options) === null || _a === void 0 ? void 0 : _a.sub_type;
|
|
4441
|
-
var scenarioTagDataConfig = getScenarioTagDataConfig(_this.isMultipleDimension);
|
|
4442
|
-
if (!((_b = scenarioTagDataConfig === null || scenarioTagDataConfig === void 0 ? void 0 : scenarioTagDataConfig[scenario]) === null || _b === void 0 ? void 0 : _b[tagSubType]))
|
|
4443
|
-
return;
|
|
4444
|
-
var scenarioTagUi = tagConfig.type === exports.TagTypes.DATE
|
|
4445
|
-
? _.find(scenarioTagsUi, { type: tagConfig.type })
|
|
4446
|
-
: _.find(scenarioTagsUi, { selectedTagSubType: tagSubType });
|
|
4447
|
-
scenarioTagUi.toggle = true;
|
|
4448
|
-
scenarioTagUi.selectedTagSubType = tagSubType;
|
|
4449
|
-
});
|
|
4450
|
-
};
|
|
4451
|
-
ScenarioService.prototype.prepareScenarioTag = function (scenarioTagsConfig, scenarioTag, scenario, isDateTag) {
|
|
4452
|
-
var toggleStatus = isDateTag
|
|
4453
|
-
? _.some(scenarioTagsConfig, function (tag) { return tag.type === exports.TagTypes.DATE && tag.scenarioData.toggle; })
|
|
4454
|
-
: scenarioTag.scenarioData.toggle;
|
|
4455
|
-
var selectedTagSubType = isDateTag
|
|
4456
|
-
? this.getScenarioSelectedDateTag(scenario, scenarioTagsConfig)
|
|
4457
|
-
: scenarioTag.options.sub_type;
|
|
4458
|
-
var tag = {
|
|
4459
|
-
toggle: this.areExistingTagsConfig ? false : toggleStatus,
|
|
4460
|
-
name: scenarioTag.scenarioData.name || scenarioTag.name,
|
|
4461
|
-
description: scenarioTag.scenarioData.description || scenarioTag.description,
|
|
4462
|
-
type: scenarioTag.type,
|
|
4463
|
-
selectedTagSubType: selectedTagSubType,
|
|
4464
|
-
};
|
|
4465
|
-
if (scenarioTag.scenarioData.turnOffDateTags) {
|
|
4466
|
-
tag.turnOffDateTags = scenarioTag.scenarioData.turnOffDateTags;
|
|
4467
|
-
}
|
|
4468
|
-
if (scenarioTag.scenarioData.acceptableDateTags) {
|
|
4469
|
-
tag.acceptableDateTags = scenarioTag.scenarioData.acceptableDateTags;
|
|
4470
|
-
}
|
|
4471
|
-
return tag;
|
|
4472
|
-
};
|
|
4473
|
-
ScenarioService.prototype.updateScenarioDateTag = function (dateTag, scenarioTag) {
|
|
4474
|
-
if (!dateTag.subTags) {
|
|
4475
|
-
dateTag.subTags = [];
|
|
4476
|
-
}
|
|
4477
|
-
var tagSubType = scenarioTag.options.sub_type;
|
|
4478
|
-
dateTag.subTags.push({
|
|
4479
|
-
subType: tagSubType,
|
|
4480
|
-
name: tagSubType === TagsConfigSubType.FORECAST_NEW ? this.DEFAULT_FORECAST_DATE_TAG : scenarioTag.name,
|
|
4481
|
-
});
|
|
4482
|
-
};
|
|
4483
|
-
ScenarioService.prototype.turnOffDateTag = function (scenarioTags) {
|
|
4484
|
-
var dateTag = _.find(scenarioTags, { type: exports.TagTypes.DATE });
|
|
4485
|
-
if (!dateTag)
|
|
4486
|
-
return;
|
|
4487
|
-
dateTag.toggle = false;
|
|
4488
|
-
};
|
|
4489
|
-
ScenarioService.prototype.hideNotAvailableTags = function (tagWithSpecificDateTags, scenarioTags) {
|
|
4490
|
-
var _a;
|
|
4491
|
-
var subTags = (_a = _.find(scenarioTags, { type: exports.TagTypes.DATE })) === null || _a === void 0 ? void 0 : _a.subTags;
|
|
4492
|
-
if (!subTags.length)
|
|
4493
|
-
return;
|
|
4494
|
-
_.forEach(scenarioTags, function (tag) {
|
|
4495
|
-
var _a;
|
|
4496
|
-
if (!((_a = tag.acceptableDateTags) === null || _a === void 0 ? void 0 : _a.length))
|
|
4497
|
-
return;
|
|
4498
|
-
if (tag !== tagWithSpecificDateTags) {
|
|
4499
|
-
tag.toggle = false;
|
|
4500
|
-
}
|
|
4501
|
-
});
|
|
4502
|
-
_.forEach(subTags, function (subTag) {
|
|
4503
|
-
subTag.hidden = !tagWithSpecificDateTags.acceptableDateTags.includes(subTag.subType);
|
|
4504
|
-
});
|
|
4505
|
-
};
|
|
4506
|
-
ScenarioService.prototype.getScenarioSelectedDateTag = function (scenario, dateTags) {
|
|
4507
|
-
var _c;
|
|
4508
|
-
var _a, _b;
|
|
4509
|
-
var monthSubType = (_b = (_a = _.find(dateTags, function (tag) { return tag.options.sub_type === TagsConfigSubType.MONTH; })) === null || _a === void 0 ? void 0 : _a.options) === null || _b === void 0 ? void 0 : _b.sub_type;
|
|
4510
|
-
var scenarioSelectedDateTag = (_c = {},
|
|
4511
|
-
_c[exports.Scenario.ACTUALS] = function () { return monthSubType; },
|
|
4512
|
-
_c[exports.Scenario.BUDGET] = function () { var _a, _b; return (_b = (_a = _.find(dateTags, function (tag) { return tag.options.sub_type === TagsConfigSubType.YEAR; })) === null || _a === void 0 ? void 0 : _a.options) === null || _b === void 0 ? void 0 : _b.sub_type; },
|
|
4513
|
-
_c[exports.Scenario.FORECAST] = function () { var _a, _b; return (_b = (_a = _.find(dateTags, function (tag) { return tag.options.sub_type === TagsConfigSubType.FORECAST_NEW; })) === null || _a === void 0 ? void 0 : _a.options) === null || _b === void 0 ? void 0 : _b.sub_type; },
|
|
4514
|
-
_c[exports.Scenario.NONE] = function () { return monthSubType; },
|
|
4515
|
-
_c);
|
|
4516
|
-
if (!scenarioSelectedDateTag[scenario])
|
|
4517
|
-
return;
|
|
4518
|
-
return scenarioSelectedDateTag[scenario]();
|
|
4519
|
-
};
|
|
4520
|
-
ScenarioService.prototype.getScenarioTagsConfig = function (scenario, tagsConfig) {
|
|
4521
|
-
var _this = this;
|
|
4522
|
-
return _.reduce(tagsConfig, function (acc, tagConfig) {
|
|
4523
|
-
var _a, _b;
|
|
4524
|
-
var tagSubType = (_a = tagConfig === null || tagConfig === void 0 ? void 0 : tagConfig.options) === null || _a === void 0 ? void 0 : _a.sub_type;
|
|
4525
|
-
var scenarioTagDataConfig = getScenarioTagDataConfig(_this.isMultipleDimension);
|
|
4526
|
-
var scenarioTagConfig = (_b = scenarioTagDataConfig === null || scenarioTagDataConfig === void 0 ? void 0 : scenarioTagDataConfig[scenario]) === null || _b === void 0 ? void 0 : _b[tagSubType];
|
|
4527
|
-
if (!scenarioTagConfig || scenarioTagConfig.hidden)
|
|
4528
|
-
return acc;
|
|
4529
|
-
var clonedTagConfig = _.cloneDeep(tagConfig);
|
|
4530
|
-
var scenarioTag = Object.assign(Object.assign({}, clonedTagConfig), { scenarioData: scenarioTagConfig });
|
|
4531
|
-
acc.push(scenarioTag);
|
|
4532
|
-
return acc;
|
|
4533
|
-
}, []);
|
|
4534
|
-
};
|
|
4535
|
-
return ScenarioService;
|
|
4536
|
-
}());
|
|
4537
|
-
ScenarioService.decorators = [
|
|
4538
|
-
{ type: i0.Injectable }
|
|
4539
|
-
];
|
|
4540
|
-
|
|
4541
4274
|
var DrSharedUtils = /** @class */ (function () {
|
|
4542
4275
|
function DrSharedUtils() {
|
|
4543
4276
|
}
|
|
@@ -5163,7 +4896,7 @@
|
|
|
5163
4896
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
5164
4897
|
providers: [
|
|
5165
4898
|
{ provide: forms.NG_VALUE_ACCESSOR, useExisting: DrDatePickerComponent, multi: true },
|
|
5166
|
-
DrDatePickerService
|
|
4899
|
+
{ provide: DrDatePickerService }
|
|
5167
4900
|
],
|
|
5168
4901
|
styles: [":host{position:relative;width:100%;display:flex;flex-direction:row;min-height:32px;height:32px;font-size:14px;font-family:\"Poppins\",sans-serif;background-color:#fff;border:1px solid #c3c4ce;border-radius:6px;color:#85889c;overflow:hidden;outline:none;cursor:pointer}:host:hover{border-color:#85889c}:host:focus-within{border-color:#4646ce!important;color:#151b3f}:host.disabled{pointer-events:none;border:1px solid #aeabac;background:#f0f1f4}:host.disabled:after{color:#aeabac}:host.ng-valid.ng-dirty{border-color:#03a678}:host.ng-invalid.ng-dirty:not(:focus-within){border-color:#de2833!important}:host.ng-untouched.ng-valid{border-color:#c3c4ce}:host:after,:host:before{position:absolute;display:flex;border-color:#999999 transparent transparent;color:#999}:host:after{content:\"\\e9b6\";font-family:DataRails;font-size:24px;color:#6d6e6f;top:0;bottom:0;right:8px;position:absolute;display:flex;align-items:center;justify-content:center}:host i{position:absolute;color:#999;left:8px;top:3px}:host input{display:flex;flex-grow:1;height:100%;border:none;text-align:left;padding-left:35px;padding-right:25px;cursor:pointer!important;outline:none}:host input.when-quarter{position:absolute;visibility:hidden}:host input:disabled{border:none;color:#aeabac;background:transparent}:host input::-webkit-search-decoration,:host input::-webkit-search-cancel-button,:host input::-webkit-search-results-button,:host input::-webkit-search-results-decoration{-webkit-appearance:none}::ng-deep .mat-datepicker-content{margin:7px 0;box-shadow:0 4px 8px 1px #00000040;border-radius:12px!important}::ng-deep .mat-datepicker-content button[disabled]{border:inherit;color:inherit;background-color:inherit}::ng-deep .mat-datepicker-content button[disabled]:hover{border:inherit}::ng-deep .mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){background:#f2f2fb;color:#4646ce;font-weight:600}::ng-deep .mat-calendar-body-selected{background-color:#4646ce;color:#f2f2fb;font-weight:600}::ng-deep .mat-calendar-body-today.mat-calendar-body-selected{box-shadow:none}::ng-deep .mat-button-focus-overlay{background:#f3f7ff}::ng-deep .mat-calendar-controls .mat-icon-button:hover .mat-button-focus-overlay{opacity:1!important;background:#f3f7ff;transition:opacity .2s cubic-bezier(.35,0,.25,1)}::ng-deep .mat-calendar-controls .mat-calendar-period-button:hover{background:#f3f7ff;transition:background .2s cubic-bezier(.35,0,.25,1)}::ng-deep .mat-calendar-table-header th{font-size:14px;font-weight:600;color:#19181a}::ng-deep .mat-calendar-table-header-divider{display:none}::ng-deep .mat-calendar-body-label{color:#fff;padding:0}\n"]
|
|
5169
4902
|
},] }
|
|
@@ -5669,8 +5402,7 @@
|
|
|
5669
5402
|
datepicker.MatDatepickerModule,
|
|
5670
5403
|
tooltip.MatTooltipModule,
|
|
5671
5404
|
DrTooltipModule
|
|
5672
|
-
]
|
|
5673
|
-
entryComponents: [DrDatePickerCustomHeaderComponent]
|
|
5405
|
+
]
|
|
5674
5406
|
},] }
|
|
5675
5407
|
];
|
|
5676
5408
|
|
|
@@ -6752,193 +6484,6 @@
|
|
|
6752
6484
|
},] }
|
|
6753
6485
|
];
|
|
6754
6486
|
|
|
6755
|
-
var DrScenarioConfigurationComponent = /** @class */ (function () {
|
|
6756
|
-
function DrScenarioConfigurationComponent(scenarioService) {
|
|
6757
|
-
this.scenarioService = scenarioService;
|
|
6758
|
-
this.toggleButtonTheme = exports.ToggleButtonTheme;
|
|
6759
|
-
this._scenarioTags = [];
|
|
6760
|
-
this.wholeTagsConfig = [];
|
|
6761
|
-
this.selectedScenario = exports.Scenario.ACTUALS;
|
|
6762
|
-
this.scenarioDataChanged = new i0.EventEmitter();
|
|
6763
|
-
}
|
|
6764
|
-
Object.defineProperty(DrScenarioConfigurationComponent.prototype, "scenarioTags", {
|
|
6765
|
-
get: function () {
|
|
6766
|
-
return this._scenarioTags;
|
|
6767
|
-
},
|
|
6768
|
-
set: function (tags) {
|
|
6769
|
-
this._scenarioTags = tags;
|
|
6770
|
-
this.tagNotSupportingDates = _.find(tags, { turnOffDateTags: true });
|
|
6771
|
-
},
|
|
6772
|
-
enumerable: false,
|
|
6773
|
-
configurable: true
|
|
6774
|
-
});
|
|
6775
|
-
DrScenarioConfigurationComponent.prototype.ngOnInit = function () {
|
|
6776
|
-
this.scenarios = this.scenarioService.scenarios;
|
|
6777
|
-
this.scenarioService.initScenarioTags(this.selectedScenario, this.wholeTagsConfig, this.currentTagsConfig);
|
|
6778
|
-
this.scenarioTags = this.scenarioService.getScenarioTagsByScenario(this.selectedScenario);
|
|
6779
|
-
};
|
|
6780
|
-
DrScenarioConfigurationComponent.prototype.onScenarioChange = function (scenario) {
|
|
6781
|
-
this.scenarioTags = this.scenarioService.getScenarioTagsByScenario(scenario);
|
|
6782
|
-
this.onScenarioDataChange();
|
|
6783
|
-
};
|
|
6784
|
-
DrScenarioConfigurationComponent.prototype.onScenarioTagToggle = function (tag) {
|
|
6785
|
-
this.tagNotSupportingDatesHandler(tag);
|
|
6786
|
-
this.tagAcceptableDateHandler(tag);
|
|
6787
|
-
this.onScenarioDataChange();
|
|
6788
|
-
};
|
|
6789
|
-
DrScenarioConfigurationComponent.prototype.onScenarioDataChange = function () {
|
|
6790
|
-
this.scenarioDataChanged.emit({
|
|
6791
|
-
scenario: this.selectedScenario,
|
|
6792
|
-
tagsConfig: this.scenarioService.getTagsConfigByScenarioTags(this.scenarioTags, this.wholeTagsConfig),
|
|
6793
|
-
});
|
|
6794
|
-
};
|
|
6795
|
-
DrScenarioConfigurationComponent.prototype.tagNotSupportingDatesHandler = function (tag) {
|
|
6796
|
-
if (!this.tagNotSupportingDates || !tag.toggle)
|
|
6797
|
-
return;
|
|
6798
|
-
if (tag.type === exports.TagTypes.DATE) {
|
|
6799
|
-
this.tagNotSupportingDates.toggle = false;
|
|
6800
|
-
}
|
|
6801
|
-
if (tag === this.tagNotSupportingDates) {
|
|
6802
|
-
var dateTag = _.find(this.scenarioTags, { type: exports.TagTypes.DATE });
|
|
6803
|
-
if (dateTag) {
|
|
6804
|
-
dateTag.toggle = false;
|
|
6805
|
-
}
|
|
6806
|
-
}
|
|
6807
|
-
};
|
|
6808
|
-
DrScenarioConfigurationComponent.prototype.tagAcceptableDateHandler = function (tag) {
|
|
6809
|
-
var _a;
|
|
6810
|
-
if (!((_a = tag.acceptableDateTags) === null || _a === void 0 ? void 0 : _a.length))
|
|
6811
|
-
return;
|
|
6812
|
-
var dateTag = _.find(this.scenarioTags, { type: exports.TagTypes.DATE });
|
|
6813
|
-
if (!dateTag)
|
|
6814
|
-
return;
|
|
6815
|
-
dateTag.subTags = _.map(dateTag.subTags, function (subTag) {
|
|
6816
|
-
subTag.hidden = tag.toggle && !_.includes(tag.acceptableDateTags, subTag.subType);
|
|
6817
|
-
return subTag;
|
|
6818
|
-
});
|
|
6819
|
-
dateTag.selectedTagSubType = tag.acceptableDateTags[0];
|
|
6820
|
-
};
|
|
6821
|
-
return DrScenarioConfigurationComponent;
|
|
6822
|
-
}());
|
|
6823
|
-
DrScenarioConfigurationComponent.decorators = [
|
|
6824
|
-
{ type: i0.Component, args: [{
|
|
6825
|
-
selector: 'dr-scenario-configuration',
|
|
6826
|
-
template: "<div class=\"scenario\">\n <div class=\"scenario__list\">\n <p class=\"scenario__title scenario__title-list\">Scenario</p>\n <dr-select [(ngModel)]=\"selectedScenario\"\n placeholder=\"select\"\n [items]=\"scenarios\"\n (ngModelChange)=\"onScenarioChange($event)\"></dr-select>\n </div>\n <div class=\"scenario__tags\">\n <p class=\"scenario__title--extra scenario__tags__title\">Tags</p>\n <div class=\"scenario__tag\" *ngFor=\"let tag of scenarioTags\">\n <div class=\"scenario__tag__header\">\n <p class=\"scenario__title\">{{ tag.name }}</p>\n <dr-toggle [(ngModel)]=\"tag.toggle\"\n (ngModelChange)=\"onScenarioTagToggle(tag)\"></dr-toggle>\n </div>\n <div class=\"scenario__tag__description\">\n <p class=\"scenario__text\">{{ tag.description }}</p>\n </div>\n <div *ngIf=\"tag.toggle\" class=\"scenario__tag__body\">\n <div *ngIf=\"tag.subTags?.length\" class=\"scenario__sub-tag\">\n <dr-toggle-button [(ngModel)]=\"tag.selectedTagSubType\"\n bindHidden=\"hidden\"\n bindLabel=\"name\"\n bindValue=\"subType\"\n [items]=\"tag.subTags\"\n [theme]=\"toggleButtonTheme.DOTTED\"\n (ngModelChange)=\"onScenarioDataChange()\"></dr-toggle-button>\n </div>\n </div>\n </div>\n </div>\n</div>\n",
|
|
6827
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
6828
|
-
styles: [".scenario__text,.scenario__title,.scenario__title--extra{padding:0;margin:0;color:#0c142b;font-weight:400;font-size:14px;line-height:22px}.scenario__title{font-weight:600}.scenario__title--extra{font-weight:700}.scenario__tags{margin-top:24px}.scenario__tags__title{margin-bottom:16px}.scenario__title-list{margin-bottom:4px}.scenario__tag{margin-bottom:24px;padding-top:16px;border-top:1px solid #dfe0e3}.scenario__tag__description{margin-top:5px}.scenario__tag__header{display:flex;justify-content:space-between}.scenario__sub-tag{margin-top:8px}:host::ng-deep .toggle-container__item{padding:2px 8px!important}\n"]
|
|
6829
|
-
},] }
|
|
6830
|
-
];
|
|
6831
|
-
DrScenarioConfigurationComponent.ctorParameters = function () { return [
|
|
6832
|
-
{ type: ScenarioService }
|
|
6833
|
-
]; };
|
|
6834
|
-
DrScenarioConfigurationComponent.propDecorators = {
|
|
6835
|
-
currentTagsConfig: [{ type: i0.Input }],
|
|
6836
|
-
wholeTagsConfig: [{ type: i0.Input }],
|
|
6837
|
-
selectedScenario: [{ type: i0.Input }],
|
|
6838
|
-
scenarioDataChanged: [{ type: i0.Output }]
|
|
6839
|
-
};
|
|
6840
|
-
|
|
6841
|
-
var DrScenarioTagConfigurationComponent = /** @class */ (function () {
|
|
6842
|
-
function DrScenarioTagConfigurationComponent() {
|
|
6843
|
-
this.connectedTags = {};
|
|
6844
|
-
this.dynamicTagValues = {};
|
|
6845
|
-
this.lockedDates = [];
|
|
6846
|
-
this.scenarioTagDataChanged = new i0.EventEmitter();
|
|
6847
|
-
this.currentTagsMap = {};
|
|
6848
|
-
this._currentTags = [];
|
|
6849
|
-
this.dynamicTagsToSave = [];
|
|
6850
|
-
this.tagsToSave = [];
|
|
6851
|
-
}
|
|
6852
|
-
Object.defineProperty(DrScenarioTagConfigurationComponent.prototype, "currentTags", {
|
|
6853
|
-
get: function () {
|
|
6854
|
-
return this._currentTags;
|
|
6855
|
-
},
|
|
6856
|
-
set: function (tags) {
|
|
6857
|
-
var _this = this;
|
|
6858
|
-
this._currentTags = tags;
|
|
6859
|
-
this.currentTagsMap = _.reduce(tags, function (acc, curr) {
|
|
6860
|
-
var _a;
|
|
6861
|
-
var tagId = (_a = _.find(_this.tagsConfig, { name: curr.name })) === null || _a === void 0 ? void 0 : _a.id;
|
|
6862
|
-
if (isNaN(tagId))
|
|
6863
|
-
return acc;
|
|
6864
|
-
acc[tagId] = curr;
|
|
6865
|
-
return acc;
|
|
6866
|
-
}, {});
|
|
6867
|
-
},
|
|
6868
|
-
enumerable: false,
|
|
6869
|
-
configurable: true
|
|
6870
|
-
});
|
|
6871
|
-
DrScenarioTagConfigurationComponent.prototype.ngOnChanges = function (simpleChanges) {
|
|
6872
|
-
this.currentTags = this.currentTags;
|
|
6873
|
-
};
|
|
6874
|
-
DrScenarioTagConfigurationComponent.prototype.onTagChange = function ($event) {
|
|
6875
|
-
var savedTag = _.find(this.tagsToSave, { id: $event.id });
|
|
6876
|
-
if (savedTag) {
|
|
6877
|
-
_.merge(savedTag, $event);
|
|
6878
|
-
}
|
|
6879
|
-
else {
|
|
6880
|
-
this.tagsToSave.push($event);
|
|
6881
|
-
}
|
|
6882
|
-
this.onScenarioTagDataChanged();
|
|
6883
|
-
};
|
|
6884
|
-
DrScenarioTagConfigurationComponent.prototype.onDynamicTagsChange = function ($event) {
|
|
6885
|
-
this.dynamicTagsToSave = $event;
|
|
6886
|
-
this.onScenarioTagDataChanged();
|
|
6887
|
-
};
|
|
6888
|
-
DrScenarioTagConfigurationComponent.prototype.onScenarioTagDataChanged = function () {
|
|
6889
|
-
var tags = __spreadArray(__spreadArray([], __read(this.dynamicTagsToSave)), __read(this.tagsToSave));
|
|
6890
|
-
this.scenarioTagDataChanged.emit({
|
|
6891
|
-
scenario: this.scenario,
|
|
6892
|
-
tagsConfig: this.tagsConfig,
|
|
6893
|
-
tags: tags,
|
|
6894
|
-
});
|
|
6895
|
-
};
|
|
6896
|
-
return DrScenarioTagConfigurationComponent;
|
|
6897
|
-
}());
|
|
6898
|
-
DrScenarioTagConfigurationComponent.decorators = [
|
|
6899
|
-
{ type: i0.Component, args: [{
|
|
6900
|
-
selector: 'dr-scenario-tag-configuration',
|
|
6901
|
-
template: "<div class=\"scenario-tag-configuration\"\n *ngFor=\"let tagConfig of tagsConfig\">\n <dr-tag [tagConfig]=\"tagConfig\"\n [selectedTag]=\"currentTagsMap[tagConfig.id]\"\n [lockedDate]=\"lockedDates\"\n [fiscalYearStartsFrom]=\"fiscalYearStartsFrom\"\n [fiscalYearBack]=\"fiscalYearBack\"\n [tagsConfig]=\"tagsConfig\"\n [dynamicTagValues]=\"dynamicTagValues\"\n [connectedTags]=\"connectedTags[tagConfig.id]\"\n [isDynamicTagAddEnabled]=\"isDynamicAddEnabled\"\n (tagChange)=\"onTagChange($event)\"\n (dynamicTagChange)=\"onDynamicTagsChange($event)\"></dr-tag>\n</div>\n",
|
|
6902
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
6903
|
-
styles: [".scenario-tag-configuration{margin-bottom:24px}.scenario-tag-configuration:last-child{margin-bottom:0}:host::ng-deep .tag__label,:host::ng-deep .dynamic-tag__label{font-weight:600!important}\n"]
|
|
6904
|
-
},] }
|
|
6905
|
-
];
|
|
6906
|
-
DrScenarioTagConfigurationComponent.propDecorators = {
|
|
6907
|
-
tagsConfig: [{ type: i0.Input }],
|
|
6908
|
-
currentTags: [{ type: i0.Input }],
|
|
6909
|
-
scenario: [{ type: i0.Input }],
|
|
6910
|
-
connectedTags: [{ type: i0.Input }],
|
|
6911
|
-
dynamicTagValues: [{ type: i0.Input }],
|
|
6912
|
-
lockedDates: [{ type: i0.Input }],
|
|
6913
|
-
fiscalYearStartsFrom: [{ type: i0.Input }],
|
|
6914
|
-
fiscalYearBack: [{ type: i0.Input }],
|
|
6915
|
-
isDynamicAddEnabled: [{ type: i0.Input }],
|
|
6916
|
-
scenarioTagDataChanged: [{ type: i0.Output }]
|
|
6917
|
-
};
|
|
6918
|
-
|
|
6919
|
-
var COMPONENTS = [
|
|
6920
|
-
DrScenarioConfigurationComponent,
|
|
6921
|
-
DrScenarioTagConfigurationComponent,
|
|
6922
|
-
];
|
|
6923
|
-
var DrScenarioModule = /** @class */ (function () {
|
|
6924
|
-
function DrScenarioModule() {
|
|
6925
|
-
}
|
|
6926
|
-
return DrScenarioModule;
|
|
6927
|
-
}());
|
|
6928
|
-
DrScenarioModule.decorators = [
|
|
6929
|
-
{ type: i0.NgModule, args: [{
|
|
6930
|
-
declarations: __spreadArray([], __read(COMPONENTS)),
|
|
6931
|
-
providers: [ScenarioService],
|
|
6932
|
-
imports: [
|
|
6933
|
-
common.CommonModule,
|
|
6934
|
-
DrInputsModule,
|
|
6935
|
-
forms.FormsModule,
|
|
6936
|
-
DrTagModule
|
|
6937
|
-
],
|
|
6938
|
-
exports: __spreadArray([], __read(COMPONENTS)),
|
|
6939
|
-
},] }
|
|
6940
|
-
];
|
|
6941
|
-
|
|
6942
6487
|
/* components */
|
|
6943
6488
|
|
|
6944
6489
|
/**
|
|
@@ -6986,7 +6531,6 @@
|
|
|
6986
6531
|
exports.DrPopoverModule = DrPopoverModule;
|
|
6987
6532
|
exports.DrPopoverRef = DrPopoverRef;
|
|
6988
6533
|
exports.DrPopoverService = DrPopoverService;
|
|
6989
|
-
exports.DrScenarioModule = DrScenarioModule;
|
|
6990
6534
|
exports.DrSelectComponent = DrSelectComponent;
|
|
6991
6535
|
exports.DrSharedUtils = DrSharedUtils;
|
|
6992
6536
|
exports.DrSpinnerComponent = DrSpinnerComponent;
|
|
@@ -7010,14 +6554,11 @@
|
|
|
7010
6554
|
exports.QuarterTagComponent = QuarterTagComponent;
|
|
7011
6555
|
exports.RadioButtonComponent = RadioButtonComponent;
|
|
7012
6556
|
exports.RadioGroupComponent = RadioGroupComponent;
|
|
7013
|
-
exports.ScenarioService = ScenarioService;
|
|
7014
6557
|
exports.TooltipComponent = TooltipComponent;
|
|
7015
6558
|
exports.WeekTagComponent = WeekTagComponent;
|
|
7016
6559
|
exports.YearTagComponent = YearTagComponent;
|
|
7017
6560
|
exports["ɵa"] = components$2;
|
|
7018
6561
|
exports["ɵb"] = POPUP_ANIMATION;
|
|
7019
|
-
exports["ɵba"] = DrScenarioConfigurationComponent;
|
|
7020
|
-
exports["ɵbb"] = DrScenarioTagConfigurationComponent;
|
|
7021
6562
|
exports["ɵc"] = DrDatePickerComponent;
|
|
7022
6563
|
exports["ɵd"] = DrDatePickerService;
|
|
7023
6564
|
exports["ɵe"] = DrDatePickerWithTimeframeComponent;
|