@singularsystems/neo-react 0.10.64 → 0.10.65

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 (67) hide show
  1. package/dist/React/AutoRunner.js +5 -5
  2. package/dist/ReactComponents/Button.js +7 -7
  3. package/dist/ReactComponents/Card.js +2 -2
  4. package/dist/ReactComponents/DropDown/AutoCompleteDropDown.js +17 -17
  5. package/dist/ReactComponents/DropDown/DropDown.js +3 -3
  6. package/dist/ReactComponents/ErrorHandler.js +1 -1
  7. package/dist/ReactComponents/FileManager/FileBasicInput.js +1 -1
  8. package/dist/ReactComponents/FileManager/FileInput.js +2 -2
  9. package/dist/ReactComponents/Form.js +1 -1
  10. package/dist/ReactComponents/FormGroup/FormGroup.js +1 -1
  11. package/dist/ReactComponents/Grid/ButtonColumn.js +1 -1
  12. package/dist/ReactComponents/Grid/Column.js +2 -3
  13. package/dist/ReactComponents/Grid/ColumnHelper.d.ts +1 -1
  14. package/dist/ReactComponents/Grid/ColumnHelper.js +3 -3
  15. package/dist/ReactComponents/Grid/Grid.js +9 -9
  16. package/dist/ReactComponents/Grid/Row.js +2 -2
  17. package/dist/ReactComponents/Icons/FontAwesomeIconFactory.js +4 -5
  18. package/dist/ReactComponents/Icons/IIconFactory.d.ts +6 -0
  19. package/dist/ReactComponents/Icons/IIconFactory.js +1 -0
  20. package/dist/ReactComponents/Icons/Icon.d.ts +13 -0
  21. package/dist/ReactComponents/Icons/Icon.js +27 -0
  22. package/dist/ReactComponents/Icons/IconFactory.d.ts +2 -2
  23. package/dist/ReactComponents/Icons/IconFactory.js +9 -4
  24. package/dist/ReactComponents/Icons/MaterialSymbolsFontFactory.d.ts +21 -0
  25. package/dist/ReactComponents/Icons/MaterialSymbolsFontFactory.js +113 -0
  26. package/dist/ReactComponents/Icons/index.d.ts +2 -1
  27. package/dist/ReactComponents/Icons/index.js +1 -0
  28. package/dist/ReactComponents/Input.js +4 -4
  29. package/dist/ReactComponents/InputHelpers.js +2 -2
  30. package/dist/ReactComponents/Link.js +1 -1
  31. package/dist/ReactComponents/Modal/Modal.js +1 -1
  32. package/dist/ReactComponents/Modal/ModalContainer.js +1 -1
  33. package/dist/ReactComponents/NumberInput.js +6 -7
  34. package/dist/ReactComponents/Paging/PageSizeControl.js +1 -1
  35. package/dist/ReactComponents/Paging/Pager.d.ts +1 -0
  36. package/dist/ReactComponents/Paging/Pager.js +3 -0
  37. package/dist/ReactComponents/PropTypes.d.ts +2 -2
  38. package/dist/ReactComponents/PropTypes.js +18 -13
  39. package/dist/ReactComponents/RadioList.js +3 -3
  40. package/dist/ReactComponents/Slider.js +3 -3
  41. package/dist/ReactComponents/Tabs/Tab.js +1 -1
  42. package/dist/ReactComponents/Tabs/TabContainer.js +1 -1
  43. package/dist/ReactComponents/Tabs/TabManager.js +2 -3
  44. package/dist/ReactComponents/TooltipProvider.js +2 -1
  45. package/dist/ReactComponents/_Exports.d.ts +2 -1
  46. package/dist/ReactComponents/_Exports.js +2 -1
  47. package/dist/Routing/IRouteChangedProps.js +1 -0
  48. package/dist/Routing/NavigationHelper.d.ts +1 -1
  49. package/dist/Routing/NavigationHelper.js +1 -1
  50. package/dist/Routing/RouteProvider.js +2 -2
  51. package/dist/Routing/RouteView.js +6 -6
  52. package/dist/Routing/RoutingState.d.ts +4 -0
  53. package/dist/Routing/RoutingState.js +37 -7
  54. package/dist/Routing/ViewParameter.js +3 -3
  55. package/dist/Routing/ViewParameterList.d.ts +9 -3
  56. package/dist/Routing/ViewParameterList.js +9 -6
  57. package/dist/Services/IDisposeHelper.js +1 -0
  58. package/dist/Views/IViewModel.js +1 -0
  59. package/dist/Views/ViewBase.d.ts +4 -2
  60. package/dist/Views/ViewBase.js +17 -10
  61. package/dist/Views/ViewModelBase.d.ts +1 -1
  62. package/dist/Views/ViewModelBase.js +1 -2
  63. package/package.json +19 -10
  64. package/dist/ReactComponents/IconFactory.d.ts +0 -27
  65. package/dist/ReactComponents/IconFactory.js +0 -46
  66. package/dist/ReactComponents/ReactHelpers.d.ts +0 -5
  67. package/dist/ReactComponents/ReactHelpers.js +0 -17
@@ -0,0 +1,113 @@
1
+ import { __extends } from "tslib";
2
+ import { Utils } from "@singularsystems/neo-core";
3
+ import React from "react";
4
+ import { IconFactory } from ".";
5
+ /**
6
+ * Font factory that renders google material symbols icons.
7
+ */
8
+ var MaterialSymbolsFontFactory = /** @class */ (function (_super) {
9
+ __extends(MaterialSymbolsFontFactory, _super);
10
+ function MaterialSymbolsFontFactory(options) {
11
+ var _a;
12
+ var _this = _super.call(this) || this;
13
+ _this.filledByDefault = (_a = options === null || options === void 0 ? void 0 : options.fillDefault) !== null && _a !== void 0 ? _a : false;
14
+ if ((options === null || options === void 0 ? void 0 : options.fontAwesomeMappings) && (options === null || options === void 0 ? void 0 : options.replaceNeoMappings)) {
15
+ _this.fontAwesomeMap = new Map(options.fontAwesomeMappings);
16
+ }
17
+ else {
18
+ _this.fontAwesomeMap = new Map(neoFontAwesomeMappings);
19
+ if (options === null || options === void 0 ? void 0 : options.fontAwesomeMappings) {
20
+ for (var _i = 0, _b = options.fontAwesomeMappings; _i < _b.length; _i++) {
21
+ var mapping = _b[_i];
22
+ _this.fontAwesomeMap.set(mapping[0], mapping[1]);
23
+ }
24
+ }
25
+ }
26
+ return _this;
27
+ }
28
+ MaterialSymbolsFontFactory.prototype.mapStringToIcon = function (iconName, style) {
29
+ var _a;
30
+ var className = "material-symbols-outlined";
31
+ var isFilled = (_a = style === null || style === void 0 ? void 0 : style.solid) !== null && _a !== void 0 ? _a : this.filledByDefault;
32
+ // TODO: copy spin animation from font-awesome
33
+ if (style === null || style === void 0 ? void 0 : style.spin) {
34
+ className += " fa fa-spin";
35
+ }
36
+ // remove and extract convention styling
37
+ iconName = iconName.replace("fa-fw", "");
38
+ var faProps = Utils.getFontAwesomeIconProps(iconName);
39
+ iconName = faProps.name.trim();
40
+ if (faProps.isSolid !== undefined) {
41
+ isFilled = faProps.isSolid;
42
+ }
43
+ var mappedName = this.mapFontAwesomeToMaterial(iconName);
44
+ if (mappedName === undefined) {
45
+ // replace common differences.
46
+ mappedName = iconName.replace(/-/g, "_")
47
+ .replace("plus", "add")
48
+ .replace("square", "box");
49
+ }
50
+ if (mappedName === "") {
51
+ mappedName = '\u00A0';
52
+ }
53
+ var cssStyle;
54
+ if (isFilled || (style === null || style === void 0 ? void 0 : style.weight)) {
55
+ var styleText = "";
56
+ if (isFilled) {
57
+ styleText += "'FILL' 1";
58
+ }
59
+ if (style === null || style === void 0 ? void 0 : style.weight) {
60
+ styleText += " 'wght' " + style.weight;
61
+ }
62
+ cssStyle = { fontVariationSettings: styleText.trim() };
63
+ }
64
+ return React.createElement("span", { className: className, style: cssStyle }, mappedName);
65
+ };
66
+ MaterialSymbolsFontFactory.prototype.mapFontAwesomeToMaterial = function (faName) {
67
+ return this.fontAwesomeMap.get(faName.trim());
68
+ };
69
+ return MaterialSymbolsFontFactory;
70
+ }(IconFactory));
71
+ export { MaterialSymbolsFontFactory };
72
+ var neoFontAwesomeMappings = [
73
+ ["plus", "add"],
74
+ ["plus-square", "add_box"],
75
+ ["minus", "remove"],
76
+ ["minus-square", "indeterminate_check_box"],
77
+ ["arrow-left", "arrow_back"],
78
+ ["angle-left", "chevron_left"],
79
+ ["caret-left", "arrow_left"],
80
+ ["trash", "delete"],
81
+ ["user", "person"],
82
+ ["users", "groups"],
83
+ ["user-shield", "admin_panel_settings"],
84
+ ["user-plus", "person_add"],
85
+ ["user-times", "person_remove"],
86
+ ["user-lock", "manage_accounts"],
87
+ ["unlock", "lock_open"],
88
+ ["cogs", "settings"],
89
+ ["file-excel", "text_snippet"],
90
+ ["file-code", "code_blocks"],
91
+ ["feather-alt", "filter_alt"],
92
+ ["filter", "filter_alt"],
93
+ ["eye", "visibility"],
94
+ ["envelope", "mail"],
95
+ ["address-book", "contact_mail"],
96
+ ["at", "alternate_email"],
97
+ ["bell", "notifications"],
98
+ ["times", "close"],
99
+ ["eraser", "ink_eraser"],
100
+ ["align-left", "format_align_left"],
101
+ ["align-center", "format_align_center"],
102
+ ["align-right", "format_align_right"],
103
+ ["equals", "equal"],
104
+ ["not-equal", "block"],
105
+ ["copy", "content_copy"],
106
+ ["chart-bar", "bar_chart"],
107
+ ["less-than", ""],
108
+ ["less-than-equal", ""],
109
+ ["greater-than", ""],
110
+ ["greater-than-equal", ""],
111
+ ["stamp", "approval"],
112
+ ["circle-notch", "progress_activity"]
113
+ ];
@@ -1,3 +1,4 @@
1
- export { IIconFactory, IconStyle } from './IIconFactory';
1
+ export type { IIconFactory, IconStyle } from './IIconFactory';
2
2
  export { IconFactory } from './IconFactory';
3
3
  export { FontAwesomeIconFactory } from './FontAwesomeIconFactory';
4
+ export { MaterialSymbolsFontFactory } from './MaterialSymbolsFontFactory';
@@ -1,2 +1,3 @@
1
1
  export { IconFactory } from './IconFactory';
2
2
  export { FontAwesomeIconFactory } from './FontAwesomeIconFactory';
3
+ export { MaterialSymbolsFontFactory } from './MaterialSymbolsFontFactory';
@@ -56,12 +56,12 @@ var Input = /** @class */ (function (_super) {
56
56
  };
57
57
  Input.prototype.render = function () {
58
58
  var _this = this;
59
- var _a, _b, _c;
59
+ var _a;
60
60
  this.type = this.determineType();
61
61
  var splitProps = BindPropsHelper.normaliseEditorProps(this, this.props);
62
62
  var domProps = BindPropsHelper.autoSetDomProperties(splitProps, this.context);
63
- var inputProps = (_a = splitProps.input, (_a !== null && _a !== void 0 ? _a : {}));
64
- var showPasswordButton = (_b = inputProps) === null || _b === void 0 ? void 0 : _b.showPasswordButton;
63
+ var inputProps = (_a = splitProps.input) !== null && _a !== void 0 ? _a : {};
64
+ var showPasswordButton = inputProps === null || inputProps === void 0 ? void 0 : inputProps.showPasswordButton;
65
65
  var displayInfo = this.props.bind.validator.getDisplayState(this.context.validationDisplayMode);
66
66
  displayInfo.applyToDom(domProps, !splitProps.inGroup);
67
67
  var bindValue = this.props.bind.value;
@@ -93,7 +93,7 @@ var Input = /** @class */ (function (_super) {
93
93
  inputElement = React.createElement("textarea", __assign({}, domProps, { ref: this.domRef, rows: inputProps.rows }));
94
94
  }
95
95
  if (this.type === "checkbox") {
96
- inputElement = React.createElement("div", { className: "custom-control custom-" + (((_c = inputProps) === null || _c === void 0 ? void 0 : _c.type) === "switch" ? "switch" : "checkbox") },
96
+ inputElement = React.createElement("div", { className: "custom-control custom-" + ((inputProps === null || inputProps === void 0 ? void 0 : inputProps.type) === "switch" ? "switch" : "checkbox") },
97
97
  inputElement,
98
98
  React.createElement("label", { htmlFor: domProps.id, className: "custom-control-label" }, (inputProps.label ? inputProps.label : "")));
99
99
  }
@@ -13,12 +13,12 @@ var InputHelpers = /** @class */ (function () {
13
13
  (props.prependText || props.prepend) &&
14
14
  React.createElement("div", { className: "input-group-prepend" },
15
15
  props.prepend && (props.prepend instanceof Function ? props.prepend() : props.prepend),
16
- props.prependText && React.createElement("span", { className: "input-group-text", onClick: function () { var _a, _b; return (_b = (_a = inputRef) === null || _a === void 0 ? void 0 : _a.current) === null || _b === void 0 ? void 0 : _b.focus(); } }, this.iconFactory.textOrIcon(props.prependText))),
16
+ props.prependText && React.createElement("span", { className: "input-group-text", onClick: function () { var _a; return (_a = inputRef === null || inputRef === void 0 ? void 0 : inputRef.current) === null || _a === void 0 ? void 0 : _a.focus(); } }, this.iconFactory.textOrIcon(props.prependText))),
17
17
  element,
18
18
  (props.appendText || props.append) &&
19
19
  React.createElement("div", { className: "input-group-append" },
20
20
  props.append && (props.append instanceof Function ? props.append() : props.append),
21
- props.appendText && React.createElement("span", { className: "input-group-text", onClick: function () { var _a, _b; return (_b = (_a = inputRef) === null || _a === void 0 ? void 0 : _a.current) === null || _b === void 0 ? void 0 : _b.focus(); } }, this.iconFactory.textOrIcon(props.appendText)))));
21
+ props.appendText && React.createElement("span", { className: "input-group-text", onClick: function () { var _a; return (_a = inputRef === null || inputRef === void 0 ? void 0 : inputRef.current) === null || _a === void 0 ? void 0 : _a.focus(); } }, this.iconFactory.textOrIcon(props.appendText)))));
22
22
  }
23
23
  else {
24
24
  return element;
@@ -20,7 +20,7 @@ var Link = /** @class */ (function (_super) {
20
20
  Link.prototype.render = function () {
21
21
  var _a;
22
22
  var props = this.props;
23
- var href = (_a = props.href, (_a !== null && _a !== void 0 ? _a : "/"));
23
+ var href = (_a = props.href) !== null && _a !== void 0 ? _a : "/";
24
24
  return React.createElement("a", __assign({}, props, { href: href, onClick: this.onClick }), this.props.children);
25
25
  };
26
26
  return Link;
@@ -35,7 +35,7 @@ var Modal = /** @class */ (function (_super) {
35
35
  this.lastBindValue = propertyInstance.value;
36
36
  }
37
37
  if (typeof propertyInstance.value === "object") {
38
- formProps = (formProps !== null && formProps !== void 0 ? formProps : {});
38
+ formProps = formProps !== null && formProps !== void 0 ? formProps : {};
39
39
  if (!formProps.model) {
40
40
  formProps.model = propertyInstance.value;
41
41
  }
@@ -14,7 +14,7 @@ var ModalContainer = /** @class */ (function (_super) {
14
14
  }
15
15
  ModalContainer.prototype.componentDidMount = function () {
16
16
  var _a;
17
- ModalHelper.initialise(this.props, (_a = this.containerRef.current, (_a !== null && _a !== void 0 ? _a : undefined)));
17
+ ModalHelper.initialise(this.props, (_a = this.containerRef.current) !== null && _a !== void 0 ? _a : undefined);
18
18
  };
19
19
  ModalContainer.prototype.componentDidUpdate = function () {
20
20
  ModalHelper.appInstance.updateProps(this.props);
@@ -20,20 +20,19 @@ var FormatState = /** @class */ (function () {
20
20
  this.useNative = useNative;
21
21
  }
22
22
  FormatState.create = function (propertyInfo, numericType, numProps, appendText) {
23
- var _a, _b, _c, _d, _e, _f, _g;
24
23
  var isPercent = false;
25
24
  var hasExternalPercentSymbol = false;
26
25
  var formatString = numProps ? numProps.formatString : "";
27
26
  var displayDecimals = 2;
28
27
  if ((formatString && formatString.indexOf("%") >= 0)
29
28
  || appendText === "%"
30
- || ((_a = numProps) === null || _a === void 0 ? void 0 : _a.format) === Misc.NumberFormat.PercentDecimals || ((_b = numProps) === null || _b === void 0 ? void 0 : _b.format) === Misc.NumberFormat.PercentNoDecimals) {
29
+ || (numProps === null || numProps === void 0 ? void 0 : numProps.format) === Misc.NumberFormat.PercentDecimals || (numProps === null || numProps === void 0 ? void 0 : numProps.format) === Misc.NumberFormat.PercentNoDecimals) {
31
30
  isPercent = true;
32
31
  }
33
32
  if (propertyInfo.allowedDecimals !== undefined) {
34
33
  displayDecimals = propertyInfo.allowedDecimals - (isPercent ? 2 : 0);
35
34
  }
36
- else if ((_c = numProps) === null || _c === void 0 ? void 0 : _c.formatString) {
35
+ else if (numProps === null || numProps === void 0 ? void 0 : numProps.formatString) {
37
36
  displayDecimals = NumberUtils.getDecimalPlaces(numProps.formatString);
38
37
  }
39
38
  if (!formatString) {
@@ -42,16 +41,16 @@ var FormatState = /** @class */ (function () {
42
41
  }
43
42
  else {
44
43
  var hasDecimals = numericType === Misc.DataType.Float || numericType === Misc.DataType.Decimal;
45
- var format = ((_d = numProps) === null || _d === void 0 ? void 0 : _d.currencySymbol) ?
44
+ var format = (numProps === null || numProps === void 0 ? void 0 : numProps.currencySymbol) ?
46
45
  (hasDecimals ? Misc.NumberFormat.CurrencyDecimals : Misc.NumberFormat.CurrencyNoDecimals) :
47
46
  (hasDecimals ? Misc.NumberFormat.Decimals : Misc.NumberFormat.NoDecimals);
48
- formatString = NumberUtils.getFormatString(format, (_e = numProps) === null || _e === void 0 ? void 0 : _e.currencySymbol, displayDecimals);
47
+ formatString = NumberUtils.getFormatString(format, numProps === null || numProps === void 0 ? void 0 : numProps.currencySymbol, displayDecimals);
49
48
  }
50
49
  }
51
50
  if (formatString.indexOf("%") < 0 && appendText === "%") {
52
51
  hasExternalPercentSymbol = true;
53
52
  }
54
- return new FormatState(isPercent, hasExternalPercentSymbol, formatString, displayDecimals + (isPercent ? 2 : 0), (_f = numProps) === null || _f === void 0 ? void 0 : _f.zeroText, (_g = numProps) === null || _g === void 0 ? void 0 : _g.native);
53
+ return new FormatState(isPercent, hasExternalPercentSymbol, formatString, displayDecimals + (isPercent ? 2 : 0), numProps === null || numProps === void 0 ? void 0 : numProps.zeroText, numProps === null || numProps === void 0 ? void 0 : numProps.native);
55
54
  };
56
55
  FormatState.prototype.getFormattedValue = function (value) {
57
56
  if (!value && this.zeroText !== undefined) {
@@ -254,7 +253,7 @@ var NumberInput = /** @class */ (function (_super) {
254
253
  }
255
254
  if (useNative && !domProps.step) {
256
255
  var decimals = NumberUtils.getDecimalPlaces(this.formatState.formatString);
257
- domProps.step = decimals === 0 ? "1" : "0." + "0".repeat(decimals - 1) + "1";
256
+ domProps.step = decimals === 0 ? "1" : "0.".concat("0".repeat(decimals - 1), "1");
258
257
  }
259
258
  return (InputHelpers.surroundWithInputGroup(React.createElement("input", __assign({}, domProps, { defaultValue: this.formatState.getFormattedValue(editorProps.bind.value), type: useNative ? "number" : "text", onChange: this.onChanged, ref: this.inputElement })), editorProps, this.inputElement));
260
259
  };
@@ -12,7 +12,7 @@ var PageSizeControl = /** @class */ (function (_super) {
12
12
  PageSizeControl.prototype.render = function () {
13
13
  var _a;
14
14
  return (React.createElement("div", { className: "neo-pager-page-size" },
15
- React.createElement("span", null, (_a = this.props.label, (_a !== null && _a !== void 0 ? _a : "Show: ")),
15
+ React.createElement("span", null, (_a = this.props.label) !== null && _a !== void 0 ? _a : "Show: ",
16
16
  " "),
17
17
  React.createElement(DropDown, { select: { items: this.props.pageManager.pageSizeOptions.map(function (i) { return ({ id: i, name: i.toString() }); }) }, bind: this.pageSize })));
18
18
  };
@@ -20,5 +20,6 @@ export default class Pager<TCriteria extends ValueObject, TModel extends Model.I
20
20
  dataViewContext: DataViewContextParams<TModel>;
21
21
  constructor(props: IPagerBaseProps<TCriteria, TModel>);
22
22
  componentDidMount(): void;
23
+ componentDidUpdate(): void;
23
24
  render(): JSX.Element | null;
24
25
  }
@@ -16,6 +16,9 @@ var Pager = /** @class */ (function (_super) {
16
16
  Pager.prototype.componentDidMount = function () {
17
17
  this.props.pageManager.initialise();
18
18
  };
19
+ Pager.prototype.componentDidUpdate = function () {
20
+ this.props.pageManager.afterRender();
21
+ };
19
22
  Pager.prototype.render = function () {
20
23
  var _a = this.props, pageManager = _a.pageManager, pageControls = _a.pageControls, pageControlProps = _a.pageControlProps, suppressLoader = _a.suppressLoader, hideBeforeLoad = _a.hideBeforeLoad, domProps = __rest(_a, ["pageManager", "pageControls", "pageControlProps", "suppressLoader", "hideBeforeLoad"]);
21
24
  if (!pageManager.hasFetched && !pageManager.taskRunner.isBusy && hideBeforeLoad !== false) {
@@ -136,9 +136,9 @@ export declare class BindPropsHelper {
136
136
  static getBindProperty<T>(allProps: IEditorContainerProps<T, any>): Model.IPropertyInstance;
137
137
  static splitCommonEditorProps<T extends ICommonEditorProps>(props: T): {
138
138
  editor: ICommonEditorProps;
139
- rest: Pick<T, Exclude<keyof T, "disabled" | "readOnly" | "isReadOnly" | "isDisabled" | "prependText" | "appendText" | "prepend" | "append" | "inputElement">>;
139
+ rest: Omit<T, "disabled" | "readOnly" | "isReadOnly" | "isDisabled" | "prependText" | "appendText" | "prepend" | "append" | "inputElement">;
140
140
  };
141
- static normaliseContainerProps<T, TContainerDom = React.HTMLProps<T>>(component: IComponentBase, props: IEditorContainerProps<T, any> & TContainerDom, inGroup: boolean, isBootstrap?: boolean): IEditorContainerNormalisedProps<TContainerDom, any>;
141
+ static normaliseContainerProps<T, TContainerDom = React.HTMLProps<T>, TData = any>(component: IComponentBase, props: IEditorContainerProps<T, TData>, inGroup: boolean, isBootstrap?: boolean): IEditorContainerNormalisedProps<TContainerDom, TData>;
142
142
  static normaliseEditorProps<T, TDom = React.HTMLProps<T>>(component: IComponentBase, props: (IEditorAndSelectorProps<T, any> & TDom) | IEditorNormalisedProps<TDom, any>): IEditorNormalisedProps<TDom, any>;
143
143
  static getPlaceholderText(placeholder: string | boolean | undefined, property: PropertyInfo): string | undefined;
144
144
  static autoSetDomProperties<TDom extends React.HTMLProps<HTMLElement>>(props: IEditorNormalisedProps<TDom, any>, formContext: FormContextParams, componentBlurFn?: (e: React.FocusEvent<HTMLElement>) => void, componentFocusFn?: (e: React.FocusEvent<HTMLElement>) => void): TDom;
@@ -34,7 +34,7 @@ var BindPropsHelper = /** @class */ (function () {
34
34
  }
35
35
  return this._config;
36
36
  },
37
- enumerable: true,
37
+ enumerable: false,
38
38
  configurable: true
39
39
  });
40
40
  /**
@@ -105,7 +105,12 @@ var BindPropsHelper = /** @class */ (function () {
105
105
  var isReadOnly = props.isReadOnly, readOnly = props.readOnly, isDisabled = props.isDisabled, disabled = props.disabled, prependText = props.prependText, prepend = props.prepend, appendText = props.appendText, append = props.append, inputElement = props.inputElement, rest = __rest(props, ["isReadOnly", "readOnly", "isDisabled", "disabled", "prependText", "prepend", "appendText", "append", "inputElement"]);
106
106
  return {
107
107
  editor: {
108
- isReadOnly: ((isReadOnly !== null && isReadOnly !== void 0 ? isReadOnly : readOnly)), isDisabled: ((isDisabled !== null && isDisabled !== void 0 ? isDisabled : disabled)), prependText: prependText, prepend: prepend, appendText: appendText, append: append, inputElement: inputElement,
108
+ isReadOnly: (isReadOnly !== null && isReadOnly !== void 0 ? isReadOnly : readOnly), isDisabled: (isDisabled !== null && isDisabled !== void 0 ? isDisabled : disabled),
109
+ prependText: prependText,
110
+ prepend: prepend,
111
+ appendText: appendText,
112
+ append: append,
113
+ inputElement: inputElement,
109
114
  requiresGroup: prependText !== undefined || prepend !== undefined || appendText !== undefined || append !== undefined
110
115
  },
111
116
  rest: rest
@@ -113,18 +118,18 @@ var BindPropsHelper = /** @class */ (function () {
113
118
  };
114
119
  BindPropsHelper.normaliseContainerProps = function (component, props, inGroup, isBootstrap) {
115
120
  // Split flattened props into components.
121
+ var _a, _b, _c;
116
122
  if (isBootstrap === void 0) { isBootstrap = true; }
117
- var _a, _b, _c, _d, _e;
118
123
  var splitProps = this.splitCommonEditorProps(props);
119
- var _f = splitProps.rest,
124
+ var _d = splitProps.rest,
120
125
  // Bindable editor props
121
- bind = _f.bind, display = _f.display, placeholder = _f.placeholder,
126
+ bind = _d.bind, display = _d.display, placeholder = _d.placeholder,
122
127
  // Editor selector props
123
- select = _f.select, input = _f.input, dateProps = _f.dateProps, numProps = _f.numProps, fileProps = _f.fileProps, radioList = _f.radioList,
128
+ select = _d.select, input = _d.input, dateProps = _d.dateProps, numProps = _d.numProps, fileProps = _d.fileProps, radioList = _d.radioList,
124
129
  // Common container props
125
- label = _f.label, editorProps = _f.editorProps, editorTooltip = _f.editorTooltip, editorClassName = _f.editorClassName, editorStyle = _f.editorStyle, suppressDefaultContent = _f.suppressDefaultContent, bindContext = _f.bindContext,
130
+ label = _d.label, editorProps = _d.editorProps, editorTooltip = _d.editorTooltip, editorClassName = _d.editorClassName, editorStyle = _d.editorStyle, suppressDefaultContent = _d.suppressDefaultContent, bindContext = _d.bindContext,
126
131
  // Container dom
127
- containerDom = __rest(_f, ["bind", "display", "placeholder", "select", "input", "dateProps", "numProps", "fileProps", "radioList", "label", "editorProps", "editorTooltip", "editorClassName", "editorStyle", "suppressDefaultContent", "bindContext"]);
132
+ containerDom = __rest(_d, ["bind", "display", "placeholder", "select", "input", "dateProps", "numProps", "fileProps", "radioList", "label", "editorProps", "editorTooltip", "editorClassName", "editorStyle", "suppressDefaultContent", "bindContext"]);
128
133
  var bindOrDisplay = BindPropsHelper.getBindProperty(props);
129
134
  if (!bindOrDisplay) {
130
135
  var child = containerDom.children;
@@ -162,7 +167,7 @@ var BindPropsHelper = /** @class */ (function () {
162
167
  }
163
168
  return {
164
169
  bind: bindOrDisplay,
165
- editor: __assign({ bind: bindOrDisplay, placeholder: this.getPlaceholderText(placeholder, (_d = bindOrDisplay) === null || _d === void 0 ? void 0 : _d.propertyInfo) }, splitProps.editor),
170
+ editor: __assign({ bind: bindOrDisplay, placeholder: this.getPlaceholderText(placeholder, bindOrDisplay === null || bindOrDisplay === void 0 ? void 0 : bindOrDisplay.propertyInfo) }, splitProps.editor),
166
171
  editorDom: editorProps,
167
172
  container: { label: label, editorTooltip: editorTooltip, editorClassName: editorClassName, editorStyle: editorStyle, bindContext: bindContext, suppressDefaultContent: suppressDefaultContent },
168
173
  select: select,
@@ -172,7 +177,7 @@ var BindPropsHelper = /** @class */ (function () {
172
177
  fileProps: fileProps,
173
178
  radioList: radioList,
174
179
  inGroup: inGroup,
175
- uniqueID: ((_e = bindOrDisplay) === null || _e === void 0 ? void 0 : _e.uniqueID) + "!" + component.uniqueId,
180
+ uniqueID: (bindOrDisplay === null || bindOrDisplay === void 0 ? void 0 : bindOrDisplay.uniqueID) + "!" + component.uniqueId,
176
181
  containerDom: containerDom,
177
182
  isBootstrap: isBootstrap
178
183
  };
@@ -199,7 +204,7 @@ var BindPropsHelper = /** @class */ (function () {
199
204
  var _a;
200
205
  var domProps = __assign({}, props.editorDom);
201
206
  if (props.uniqueID) {
202
- domProps.id = (_a = formContext.uniqueId, (_a !== null && _a !== void 0 ? _a : props.uniqueID));
207
+ domProps.id = (_a = formContext.uniqueId) !== null && _a !== void 0 ? _a : props.uniqueID;
203
208
  }
204
209
  if (this.config.isTestOrDevelopment) {
205
210
  domProps[BindPropsHelper.DataFieldName] = props.bind.propertyInfo.propertyName;
@@ -228,12 +233,12 @@ var BindPropsHelper = /** @class */ (function () {
228
233
  };
229
234
  BindPropsHelper.isReadOnly = function (editorProps, formContext) {
230
235
  var _a;
231
- var propsReadOnly = (_a = editorProps.isReadOnly, (_a !== null && _a !== void 0 ? _a : editorProps.readOnly));
236
+ var propsReadOnly = (_a = editorProps.isReadOnly) !== null && _a !== void 0 ? _a : editorProps.readOnly;
232
237
  return propsReadOnly || (formContext.allReadOnly && propsReadOnly === undefined);
233
238
  };
234
239
  BindPropsHelper.isDisabled = function (editorProps, formContext) {
235
240
  var _a;
236
- var propsDisabled = (_a = editorProps.isDisabled, (_a !== null && _a !== void 0 ? _a : editorProps.disabled));
241
+ var propsDisabled = (_a = editorProps.isDisabled) !== null && _a !== void 0 ? _a : editorProps.disabled;
237
242
  return propsDisabled || (formContext.allDisabled && propsDisabled === undefined);
238
243
  };
239
244
  /**
@@ -26,7 +26,7 @@ var RadioList = /** @class */ (function (_super) {
26
26
  RadioList.prototype.createEnumList = function (list) {
27
27
  var _a, _b;
28
28
  if (list.length) {
29
- var _c = LookupHelper.findMembers(list[0], (_a = this.props.radioList.valueMember, (_a !== null && _a !== void 0 ? _a : "")), (_b = this.props.radioList.displayMember, (_b !== null && _b !== void 0 ? _b : "")), true), valueMember_1 = _c.valueMember, displayMember_1 = _c.displayMember;
29
+ var _c = LookupHelper.findMembers(list[0], (_a = this.props.radioList.valueMember) !== null && _a !== void 0 ? _a : "", (_b = this.props.radioList.displayMember) !== null && _b !== void 0 ? _b : "", true), valueMember_1 = _c.valueMember, displayMember_1 = _c.displayMember;
30
30
  if (valueMember_1 && displayMember_1) {
31
31
  this.items = list.map(function (item) { return ({ id: item[valueMember_1], name: item[displayMember_1] }); });
32
32
  }
@@ -46,8 +46,8 @@ var RadioList = /** @class */ (function (_super) {
46
46
  return React.createElement("div", { className: className }, this.items.map(function (item) {
47
47
  var _a, _b;
48
48
  return React.createElement("div", { className: "custom-control custom-radio " + (_this.props.radioList.inline ? "custom-control-inline" : "custom-control"), key: item.id },
49
- React.createElement("input", { type: "radio", id: splitProps.uniqueID + (_a = item.id, (_a !== null && _a !== void 0 ? _a : "")), name: splitProps.uniqueID, checked: bindValue === item.id, disabled: domProps.disabled || domProps.readOnly, onChange: function () { return _this.props.bind.value = item.id; }, className: "custom-control-input" }),
50
- React.createElement("label", { className: "custom-control-label", htmlFor: splitProps.uniqueID + (_b = item.id, (_b !== null && _b !== void 0 ? _b : "")) }, item.name));
49
+ React.createElement("input", { type: "radio", id: splitProps.uniqueID + ((_a = item.id) !== null && _a !== void 0 ? _a : ""), name: splitProps.uniqueID, checked: bindValue === item.id, disabled: domProps.disabled || domProps.readOnly, onChange: function () { return _this.props.bind.value = item.id; }, className: "custom-control-input" }),
50
+ React.createElement("label", { className: "custom-control-label", htmlFor: splitProps.uniqueID + ((_b = item.id) !== null && _b !== void 0 ? _b : "") }, item.name));
51
51
  }));
52
52
  };
53
53
  RadioList.contextType = FormContext;
@@ -34,21 +34,21 @@ var Slider = /** @class */ (function (_super) {
34
34
  get: function () {
35
35
  return this.props.bindEnd !== undefined;
36
36
  },
37
- enumerable: true,
37
+ enumerable: false,
38
38
  configurable: true
39
39
  });
40
40
  Object.defineProperty(Slider.prototype, "rangeProps", {
41
41
  get: function () {
42
42
  return this.props;
43
43
  },
44
- enumerable: true,
44
+ enumerable: false,
45
45
  configurable: true
46
46
  });
47
47
  Object.defineProperty(Slider.prototype, "sliderProps", {
48
48
  get: function () {
49
49
  return this.props;
50
50
  },
51
- enumerable: true,
51
+ enumerable: false,
52
52
  configurable: true
53
53
  });
54
54
  Slider.prototype.getSlider = function () {
@@ -12,7 +12,7 @@ var Tab = /** @class */ (function (_super) {
12
12
  _this.hasRenderedContents = false;
13
13
  _this.iconFactory = Misc.Globals.appService.get(NeoReactTypes.Components.IconFactory);
14
14
  _this.onClick = _this.onClick.bind(_this);
15
- var tabKey = (_a = _this.props.id, (_a !== null && _a !== void 0 ? _a : _this.props.name));
15
+ var tabKey = (_a = _this.props.id) !== null && _a !== void 0 ? _a : _this.props.name;
16
16
  if (!tabKey) {
17
17
  if (typeof _this.props.header === "string") {
18
18
  tabKey = _this.props.header;
@@ -28,7 +28,7 @@ var TabContainer = /** @class */ (function (_super) {
28
28
  }
29
29
  else {
30
30
  tabManager = new TabManager("", true);
31
- tabManager.observable = (_a = _this.props.selectedTab, (_a !== null && _a !== void 0 ? _a : new ObservableValue("")));
31
+ tabManager.observable = (_a = _this.props.selectedTab) !== null && _a !== void 0 ? _a : new ObservableValue("");
32
32
  }
33
33
  _this.tabManager = tabManager;
34
34
  _this.tabContext.tabManager = _this.tabManager;
@@ -34,7 +34,6 @@ var TabManager = /** @class */ (function () {
34
34
  },
35
35
  set: function (value) {
36
36
  var _this = this;
37
- var _a;
38
37
  if (!this.tabs[value]) {
39
38
  // Probably different case, find the actual tab key.
40
39
  var foundValue = Object.keys(this.tabs).find(function (t) { return t.toLowerCase() === value.toLowerCase(); });
@@ -46,7 +45,7 @@ var TabManager = /** @class */ (function () {
46
45
  if (value !== currentTabKey) {
47
46
  var cancellableEvent = new CancellableEvent(function () { return currentTabKey === _this.observable.peek; });
48
47
  var currentTab = this.tabs[currentTabKey];
49
- if (((_a = currentTab) === null || _a === void 0 ? void 0 : _a.onLeave) !== undefined) {
48
+ if ((currentTab === null || currentTab === void 0 ? void 0 : currentTab.onLeave) !== undefined) {
50
49
  currentTab.onLeave(cancellableEvent);
51
50
  }
52
51
  cancellableEvent.tryRunAction(function () {
@@ -55,7 +54,7 @@ var TabManager = /** @class */ (function () {
55
54
  });
56
55
  }
57
56
  },
58
- enumerable: true,
57
+ enumerable: false,
59
58
  configurable: true
60
59
  });
61
60
  /**
@@ -57,9 +57,10 @@ var TooltipProvider = /** @class */ (function (_super) {
57
57
  var anchor = element;
58
58
  var toolTip = anchor.dataset["tip"];
59
59
  var tryCount = 0;
60
- while (!toolTip && tryCount < 3 && anchor) {
60
+ while (!toolTip && tryCount < 8 && anchor) {
61
61
  anchor = anchor.parentElement;
62
62
  toolTip = anchor && anchor.dataset["tip"];
63
+ tryCount++;
63
64
  }
64
65
  if (toolTip && anchor) {
65
66
  if (!this.currentInfo || this.currentInfo.anchor !== anchor || this.currentInfo.text !== toolTip) {
@@ -7,6 +7,7 @@ import ColorPicker from './ColorPicker';
7
7
  import ContextMenuContainer from './ContextMenu/ContextMenuContainer';
8
8
  import DatePicker from './DatePicker';
9
9
  import DropDown from './DropDown/DropDown';
10
+ import Icon from './Icons/Icon';
10
11
  import Input, { Textbox, Passwordbox, Checkbox } from './Input';
11
12
  import FileBasicInput from './FileManager/FileBasicInput';
12
13
  import FileContext from './FileManager/FileContext';
@@ -38,4 +39,4 @@ import ToastContainer from './Notifications/ToastContainer';
38
39
  import Tooltip from './Tooltip';
39
40
  import TooltipProvider from './TooltipProvider';
40
41
  import ValidationSummary from './ValidationSummary';
41
- export { Alert, AutoCompleteDropDown, Button, Card, Checkbox, Collapsable, ColorPicker, ContextMenuContainer, DatePicker, DropDown, FileBasicInput, FileContext, FileDropArea, FileInput, FileUploadButton, FileUploadProgress, Form, FormContext, FormGroup, FormGroupFloating, FormGroupInline, GridLayout, Input, Link, Loader, Modal, ModalContainer, NumberInput, Pager, PagerControlsBasic, PageSizeControl, Passwordbox, ProgressBar, RadioList, Slider, TabContainer, Tab, Textbox, Toast, ToastContainer, Tooltip, TooltipProvider, ValidationSummary };
42
+ export { Alert, AutoCompleteDropDown, Button, Card, Checkbox, Collapsable, ColorPicker, ContextMenuContainer, DatePicker, DropDown, FileBasicInput, FileContext, FileDropArea, FileInput, FileUploadButton, FileUploadProgress, Form, FormContext, FormGroup, FormGroupFloating, FormGroupInline, GridLayout, Icon, Input, Link, Loader, Modal, ModalContainer, NumberInput, Pager, PagerControlsBasic, PageSizeControl, Passwordbox, ProgressBar, RadioList, Slider, TabContainer, Tab, Textbox, Toast, ToastContainer, Tooltip, TooltipProvider, ValidationSummary };
@@ -7,6 +7,7 @@ import ColorPicker from './ColorPicker';
7
7
  import ContextMenuContainer from './ContextMenu/ContextMenuContainer';
8
8
  import DatePicker from './DatePicker';
9
9
  import DropDown from './DropDown/DropDown';
10
+ import Icon from './Icons/Icon';
10
11
  import Input, { Textbox, Passwordbox, Checkbox } from './Input';
11
12
  import FileBasicInput from './FileManager/FileBasicInput';
12
13
  import FileContext from './FileManager/FileContext';
@@ -38,4 +39,4 @@ import ToastContainer from './Notifications/ToastContainer';
38
39
  import Tooltip from './Tooltip';
39
40
  import TooltipProvider from './TooltipProvider';
40
41
  import ValidationSummary from './ValidationSummary';
41
- export { Alert, AutoCompleteDropDown, Button, Card, Checkbox, Collapsable, ColorPicker, ContextMenuContainer, DatePicker, DropDown, FileBasicInput, FileContext, FileDropArea, FileInput, FileUploadButton, FileUploadProgress, Form, FormContext, FormGroup, FormGroupFloating, FormGroupInline, GridLayout, Input, Link, Loader, Modal, ModalContainer, NumberInput, Pager, PagerControlsBasic, PageSizeControl, Passwordbox, ProgressBar, RadioList, Slider, TabContainer, Tab, Textbox, Toast, ToastContainer, Tooltip, TooltipProvider, ValidationSummary };
42
+ export { Alert, AutoCompleteDropDown, Button, Card, Checkbox, Collapsable, ColorPicker, ContextMenuContainer, DatePicker, DropDown, FileBasicInput, FileContext, FileDropArea, FileInput, FileUploadButton, FileUploadProgress, Form, FormContext, FormGroup, FormGroupFloating, FormGroupInline, GridLayout, Icon, Input, Link, Loader, Modal, ModalContainer, NumberInput, Pager, PagerControlsBasic, PageSizeControl, Passwordbox, ProgressBar, RadioList, Slider, TabContainer, Tab, Textbox, Toast, ToastContainer, Tooltip, TooltipProvider, ValidationSummary };
@@ -0,0 +1 @@
1
+ export {};
@@ -37,5 +37,5 @@ export default class NavigationHelper implements INavigationHelper {
37
37
  navigateToView<TParams extends RouteParameterObject<TParams>>(view: ViewConstructor<TParams>, paramValues?: ParamValues<TParams>): void;
38
38
  getPathForView<TParams extends RouteParameterObject<TParams>>(view: ViewConstructor<TParams>, paramValues?: ParamValues<TParams>): string;
39
39
  getCurrentViewPath(): string;
40
- get currentRouteProps(): RouteComponentProps<{}, import("react-router").StaticContext, import("history").History.PoorMansUnknown>;
40
+ get currentRouteProps(): RouteComponentProps<{}, import("react-router").StaticContext, unknown>;
41
41
  }
@@ -48,7 +48,7 @@ var NavigationHelper = /** @class */ (function () {
48
48
  get: function () {
49
49
  return this.routingState.currentRouteProps;
50
50
  },
51
- enumerable: true,
51
+ enumerable: false,
52
52
  configurable: true
53
53
  });
54
54
  NavigationHelper = __decorate([
@@ -1,4 +1,4 @@
1
- import { __assign, __spreadArrays } from "tslib";
1
+ import { __assign, __spreadArray } from "tslib";
2
2
  import { MenuRoute } from './MenuRoute';
3
3
  var RouteProvider = /** @class */ (function () {
4
4
  /**
@@ -49,7 +49,7 @@ var RouteProvider = /** @class */ (function () {
49
49
  this.processRoute(route);
50
50
  }
51
51
  var menuRoute = route;
52
- var children = __spreadArrays((_a = route.routeChildren, (_a !== null && _a !== void 0 ? _a : [])), (_b = menuRoute.children, (_b !== null && _b !== void 0 ? _b : [])));
52
+ var children = __spreadArray(__spreadArray([], ((_a = route.routeChildren) !== null && _a !== void 0 ? _a : []), true), ((_b = menuRoute.children) !== null && _b !== void 0 ? _b : []), true);
53
53
  this.flatten(children, (hasComponent && menuRoute.showInBreadCrumb !== false) ? menuRoute : undefined);
54
54
  }
55
55
  };
@@ -24,7 +24,7 @@ var RouteView = /** @class */ (function (_super) {
24
24
  this._routes = value;
25
25
  this.routingState.appRouteProvider = value;
26
26
  },
27
- enumerable: true,
27
+ enumerable: false,
28
28
  configurable: true
29
29
  });
30
30
  RouteView.prototype.componentDidMount = function () {
@@ -43,15 +43,15 @@ var RouteView = /** @class */ (function (_super) {
43
43
  }
44
44
  };
45
45
  RouteView.prototype.beforeLocationChanged = function (location, action, isUnload) {
46
- var _a, _b, _c;
46
+ var _a;
47
47
  var currentRoute = this.routingState.currentRoute;
48
48
  var match = location ? this.getMatch(location) : undefined;
49
49
  var changeProps = {
50
50
  isNewView: !currentRoute || !match || match.route !== currentRoute,
51
- isUnload: (isUnload !== null && isUnload !== void 0 ? isUnload : false),
52
- currentView: (_a = ViewBase.currentView, (_a !== null && _a !== void 0 ? _a : undefined)),
53
- newRoute: (_b = match) === null || _b === void 0 ? void 0 : _b.route,
54
- match: (_c = match) === null || _c === void 0 ? void 0 : _c.match
51
+ isUnload: isUnload !== null && isUnload !== void 0 ? isUnload : false,
52
+ currentView: (_a = ViewBase.currentView) !== null && _a !== void 0 ? _a : undefined,
53
+ newRoute: match === null || match === void 0 ? void 0 : match.route,
54
+ match: match === null || match === void 0 ? void 0 : match.match
55
55
  };
56
56
  if (ViewBase.currentView) {
57
57
  ViewBase.currentView.beforeRouteChanged(changeProps);
@@ -1,5 +1,6 @@
1
1
  import { Misc } from '@singularsystems/neo-core';
2
2
  import { RouteComponentProps } from 'react-router-dom';
3
+ import { IViewBase } from '../Views/ViewBase';
3
4
  import RouteProvider, { IProcessedRoute } from './RouteProvider';
4
5
  import RouteView from './RouteView';
5
6
  export declare class RoutingState {
@@ -9,6 +10,9 @@ export declare class RoutingState {
9
10
  currentRouteView?: RouteView;
10
11
  leavePromise?: Promise<boolean> | Promise<Misc.ModalResult> | Promise<void>;
11
12
  observableRoute: IProcessedRoute | null;
13
+ currentView: IViewBase | null;
14
+ get currentViewFullScreen(): boolean;
15
+ get taskRunner(): import("@singularsystems/neo-core").ITaskRunner | undefined;
12
16
  setCurrentRoute(routeProps: RouteComponentProps, route: IProcessedRoute): void;
13
17
  private previousRoute?;
14
18
  onRouteChanged(): void;