@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.
@@ -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?.[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",
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, _b;
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 (!((_b = scenarioTagDataConfig === null || scenarioTagDataConfig === void 0 ? void 0 : scenarioTagDataConfig[scenario]) === null || _b === void 0 ? void 0 : _b[tagSubType]))
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, _b;
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 = (_b = scenarioTagDataConfig === null || scenarioTagDataConfig === void 0 ? void 0 : scenarioTagDataConfig[scenario]) === null || _b === void 0 ? void 0 : _b[tagSubType];
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 _a;
5742
- return !_.isObject((_a = Object.values(this.values)) === null || _a === void 0 ? void 0 : _a[0]);
5743
+ var values = Object.values(this.values) || [];
5744
+ return !_.isObject(values[0]);
5743
5745
  },
5744
5746
  enumerable: false,
5745
5747
  configurable: true