@datarailsshared/datarailsshared 1.4.167 → 1.4.168
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 +9 -7
- package/bundles/datarailsshared-datarailsshared.umd.js.map +1 -1
- package/datarailsshared-datarailsshared-1.4.168.tgz +0 -0
- package/datarailsshared-datarailsshared.metadata.json +1 -1
- package/esm2015/lib/dr-dynamic-tag/dr-dynamic-tag.component.js +3 -3
- package/esm2015/lib/dr-inputs/dr-toggle-button/dr-toggle-button.component.js +2 -2
- package/esm2015/lib/dr-scenario/services/scenario.service.js +7 -5
- package/fesm2015/datarailsshared-datarailsshared.js +9 -7
- package/fesm2015/datarailsshared-datarailsshared.js.map +1 -1
- package/package.json +1 -1
- package/datarailsshared-datarailsshared-1.4.167.tgz +0 -0
|
@@ -2507,7 +2507,7 @@
|
|
|
2507
2507
|
DrToggleButtonComponent.decorators = [
|
|
2508
2508
|
{ type: i0.Component, args: [{
|
|
2509
2509
|
selector: 'dr-toggle-button',
|
|
2510
|
-
template: "<div class=\"toggle-container\"\n [class.disabled]=\"_disabled\"\n [attr.mode]=\"mode\">\n <ng-container *ngFor=\"let item of items\">\n <div *ngIf=\"!item
|
|
2510
|
+
template: "<div class=\"toggle-container\"\n [class.disabled]=\"_disabled\"\n [attr.mode]=\"mode\">\n <ng-container *ngFor=\"let item of items\">\n <div *ngIf=\"item && !item[bindHidden]\"\n class=\"toggle-container__item\"\n [class.selected]=\"item[bindValue] === selectedValue || item === selectedValue\"\n [class.disabled]=\"item.disabled\"\n (click)=\"setValue(item)\">{{ item[bindLabel] || item.name || item }}</div>\n </ng-container>\n</div>\n",
|
|
2511
2511
|
providers: [
|
|
2512
2512
|
{ provide: forms.NG_VALUE_ACCESSOR, useExisting: i0.forwardRef(function () { return DrToggleButtonComponent; }), multi: true }
|
|
2513
2513
|
],
|
|
@@ -4442,11 +4442,12 @@
|
|
|
4442
4442
|
ScenarioService.prototype.initExistingTagsConfig = function (scenario, scenarioTagsUi) {
|
|
4443
4443
|
var _this = this;
|
|
4444
4444
|
_.forEach(this.currentTagsConfig, function (tagConfig) {
|
|
4445
|
-
var _a
|
|
4445
|
+
var _a;
|
|
4446
4446
|
var tagSubType = (_a = tagConfig === null || tagConfig === void 0 ? void 0 : tagConfig.options) === null || _a === void 0 ? void 0 : _a.sub_type;
|
|
4447
4447
|
var scenarioTagDataConfig = getScenarioTagDataConfig(_this.isMultipleDimension);
|
|
4448
|
-
if (!
|
|
4448
|
+
if (!scenarioTagDataConfig || !scenarioTagDataConfig[scenario] || !scenarioTagDataConfig[scenario][tagSubType]) {
|
|
4449
4449
|
return;
|
|
4450
|
+
}
|
|
4450
4451
|
var scenarioTagUi = tagConfig.type === exports.TagTypes.DATE
|
|
4451
4452
|
? _.find(scenarioTagsUi, { type: tagConfig.type })
|
|
4452
4453
|
: _.find(scenarioTagsUi, { selectedTagSubType: tagSubType });
|
|
@@ -4526,10 +4527,11 @@
|
|
|
4526
4527
|
ScenarioService.prototype.getScenarioTagsConfig = function (scenario, tagsConfig) {
|
|
4527
4528
|
var _this = this;
|
|
4528
4529
|
return _.reduce(tagsConfig, function (acc, tagConfig) {
|
|
4529
|
-
var _a
|
|
4530
|
+
var _a;
|
|
4530
4531
|
var tagSubType = (_a = tagConfig === null || tagConfig === void 0 ? void 0 : tagConfig.options) === null || _a === void 0 ? void 0 : _a.sub_type;
|
|
4531
4532
|
var scenarioTagDataConfig = getScenarioTagDataConfig(_this.isMultipleDimension);
|
|
4532
|
-
var scenarioTagConfig =
|
|
4533
|
+
var scenarioTagConfig = scenarioTagDataConfig && scenarioTagDataConfig[scenario] ?
|
|
4534
|
+
scenarioTagDataConfig[scenario][tagSubType] : null;
|
|
4533
4535
|
if (!scenarioTagConfig || scenarioTagConfig.hidden)
|
|
4534
4536
|
return acc;
|
|
4535
4537
|
var clonedTagConfig = _.cloneDeep(tagConfig);
|
|
@@ -5738,8 +5740,8 @@
|
|
|
5738
5740
|
}
|
|
5739
5741
|
Object.defineProperty(DrDynamicTagComponent.prototype, "isPrimitiveDataSource", {
|
|
5740
5742
|
get: function () {
|
|
5741
|
-
var
|
|
5742
|
-
return !_.isObject(
|
|
5743
|
+
var values = Object.values(this.values) || [];
|
|
5744
|
+
return !_.isObject(values[0]);
|
|
5743
5745
|
},
|
|
5744
5746
|
enumerable: false,
|
|
5745
5747
|
configurable: true
|