@singularsystems/neo-react 0.10.51 → 0.10.52

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.
@@ -62,7 +62,7 @@ var Row = /** @class */ (function (_super) {
62
62
  var expandButtonOptions = __assign({}, Misc.Settings.grid.expandButton);
63
63
  if (inBody && this.expandProperty) {
64
64
  expandButtonOptions.onClick = this.onExpandClick;
65
- expandButtonOptions.icon = expandButtonOptions.icon.replace("plus", "$").replace("minus", "$").replace("$", (this.expandProperty.value ? "minus" : "plus"));
65
+ expandButtonOptions.icon = this.expandProperty.value ? Misc.Settings.icons.expanded : Misc.Settings.icons.collapsed;
66
66
  }
67
67
  if (!inBody) {
68
68
  if (onHeaderClick) {
@@ -46,7 +46,9 @@ export declare class ViewParameter implements IViewParameter {
46
46
  get value(): number | string | null;
47
47
  set value(value: number | string | null);
48
48
  reset(): void;
49
- description: string;
49
+ _description: string;
50
+ get description(): string;
51
+ set description(value: string);
50
52
  asNullableInt(): number | null;
51
53
  asString(): string;
52
54
  /** Updates the current value, and returns true if the value changed. */
@@ -8,7 +8,7 @@ var ViewParameter = /** @class */ (function () {
8
8
  this.hasPendingValue = false;
9
9
  this.pendingValue = null;
10
10
  this._value = null;
11
- this.description = "";
11
+ this._description = "";
12
12
  }
13
13
  ViewParameter.prototype.bindTo = function (propertyOrCallback) {
14
14
  var _this = this;
@@ -28,7 +28,7 @@ var ViewParameter = /** @class */ (function () {
28
28
  if (stringValue !== this._value) {
29
29
  this.hasPendingValue = true;
30
30
  this.pendingValue = stringValue;
31
- this.description = "";
31
+ this._description = "";
32
32
  this.parent.setUrl(this);
33
33
  }
34
34
  },
@@ -42,6 +42,19 @@ var ViewParameter = /** @class */ (function () {
42
42
  this.parent.setUrl(this, true);
43
43
  }
44
44
  };
45
+ Object.defineProperty(ViewParameter.prototype, "description", {
46
+ get: function () {
47
+ return this._description;
48
+ },
49
+ set: function (value) {
50
+ if (this.hasPendingValue) {
51
+ console.warn("Do not set view parameter description directly after setting value. Description should be set in the viewParamsUpdated() method.");
52
+ }
53
+ this._description = value;
54
+ },
55
+ enumerable: true,
56
+ configurable: true
57
+ });
45
58
  ViewParameter.prototype.asNullableInt = function () {
46
59
  if (this._value) {
47
60
  return parseInt(this._value, 10);
@@ -58,6 +71,7 @@ var ViewParameter = /** @class */ (function () {
58
71
  if (value != this._value) {
59
72
  this.hasPendingValue = false;
60
73
  this.pendingValue = value;
74
+ this._description = "";
61
75
  this._value = value;
62
76
  return true;
63
77
  }
@@ -88,7 +102,7 @@ var ViewParameter = /** @class */ (function () {
88
102
  __decorate([
89
103
  observable.ref,
90
104
  __metadata("design:type", String)
91
- ], ViewParameter.prototype, "description", void 0);
105
+ ], ViewParameter.prototype, "_description", void 0);
92
106
  return ViewParameter;
93
107
  }());
94
108
  export { ViewParameter };
@@ -27,12 +27,14 @@ var ViewParameterList = /** @class */ (function () {
27
27
  var selectablePath = basePath;
28
28
  for (var _i = 0, _b = this.params; _i < _b.length; _i++) {
29
29
  var viewParam = _b[_i];
30
- if (!viewParam.routeParameter.isQuery && (viewParam.description || upTo) && viewParam.latestValue !== null) {
30
+ if (!viewParam.routeParameter.isQuery) {
31
31
  paramPath += viewParam.getParamString(state);
32
32
  if ((_a = viewParam.routeParameter.selection, (_a !== null && _a !== void 0 ? _a : BreadCrumbSelectMode.Default)) === BreadCrumbSelectMode.Default) {
33
33
  selectablePath = paramPath;
34
34
  }
35
- breadCrumbs.push(new BreadCrumbItem(viewParam.description, (!upTo && viewParam.routeParameter.selection === BreadCrumbSelectMode.None) ? "" : (selectablePath + queryPath)));
35
+ if (viewParam.description || (upTo && viewParam.latestValue !== null)) {
36
+ breadCrumbs.push(new BreadCrumbItem(viewParam.description, (!upTo && viewParam.routeParameter.selection === BreadCrumbSelectMode.None) ? "" : (selectablePath + queryPath)));
37
+ }
36
38
  }
37
39
  if (upTo && upTo === viewParam) {
38
40
  break;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@singularsystems/neo-react",
3
- "version": "0.10.51",
3
+ "version": "0.10.52",
4
4
  "description": "React application logic and components for the Neo client library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",