dattatable 2.2.5 → 2.2.6

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 (42) hide show
  1. package/build/dashboard/index.d.ts +1 -0
  2. package/build/dashboard/index.js +8 -1
  3. package/build/dashboard/navigation.d.ts +5 -0
  4. package/build/dashboard/navigation.js +7 -2
  5. package/dist/dattatable.js +796 -796
  6. package/dist/dattatable.min.js +1 -1
  7. package/docs/assets/search.js +1 -1
  8. package/docs/classes/CanvasForm.html +17 -17
  9. package/docs/classes/Comments.html +12 -12
  10. package/docs/classes/Dashboard.html +22 -15
  11. package/docs/classes/DataTable.html +11 -11
  12. package/docs/classes/Documents.html +45 -45
  13. package/docs/classes/FilterSlideout.html +14 -14
  14. package/docs/classes/Footer.html +4 -4
  15. package/docs/classes/Header.html +4 -4
  16. package/docs/classes/InstallationRequired.html +12 -12
  17. package/docs/classes/ItemForm.html +47 -47
  18. package/docs/classes/LoadingDialog.html +12 -12
  19. package/docs/classes/Modal.html +26 -26
  20. package/docs/classes/Navigation.html +25 -6
  21. package/docs/enums/ActionButtonTypes.html +6 -6
  22. package/docs/functions/formatBytes.html +1 -1
  23. package/docs/functions/formatDateValue.html +1 -1
  24. package/docs/functions/formatTimeValue.html +1 -1
  25. package/docs/functions/getFileExt.html +1 -1
  26. package/docs/interfaces/ICommentsItem.html +6 -6
  27. package/docs/interfaces/IDashboardProps.html +14 -14
  28. package/docs/interfaces/IDataTable.html +7 -7
  29. package/docs/interfaces/IDataTableProps.html +6 -6
  30. package/docs/interfaces/IDocumentsProps.html +25 -25
  31. package/docs/interfaces/IFilterItem.html +5 -5
  32. package/docs/interfaces/IFilterProps.html +4 -4
  33. package/docs/interfaces/IFooterProps.html +6 -6
  34. package/docs/interfaces/IHeaderProps.html +5 -5
  35. package/docs/interfaces/IItemFormCreateProps.html +14 -14
  36. package/docs/interfaces/IItemFormEditProps.html +15 -15
  37. package/docs/interfaces/IItemFormTab.html +7 -7
  38. package/docs/interfaces/IItemFormTabInfo.html +3 -3
  39. package/docs/interfaces/IItemFormViewProps.html +12 -12
  40. package/docs/interfaces/IShowDialogProps.html +5 -5
  41. package/package.json +2 -2
  42. package/pnpm-lock.yaml +16 -16
@@ -66,6 +66,7 @@ export interface IDashboardProps {
66
66
  export declare class Dashboard {
67
67
  private _dt;
68
68
  private _filters;
69
+ private _navigation;
69
70
  private _props;
70
71
  constructor(props: IDashboardProps);
71
72
  private render;
@@ -37,6 +37,7 @@ var Dashboard = /** @class */ (function () {
37
37
  var _this = this;
38
38
  this._dt = null;
39
39
  this._filters = null;
40
+ this._navigation = null;
40
41
  this._props = null;
41
42
  // Set the properties
42
43
  this._props = props;
@@ -76,7 +77,7 @@ var Dashboard = /** @class */ (function () {
76
77
  else {
77
78
  // Render the navigation
78
79
  var navProps_1 = this._props.navigation || {};
79
- new navigation_1.Navigation({
80
+ this._navigation = new navigation_1.Navigation({
80
81
  el: this._props.el.querySelector("#navigation"),
81
82
  hideFilter: navProps_1.showFilter != null ? !navProps_1.showFilter : false,
82
83
  hideSearch: navProps_1.showSearch != null ? !navProps_1.showSearch : false,
@@ -222,6 +223,12 @@ var Dashboard = /** @class */ (function () {
222
223
  Dashboard.prototype.refresh = function (rows) {
223
224
  // Refresh the table
224
225
  this._dt.refresh(rows);
226
+ // See if a search value exists
227
+ var searchValue = this._navigation ? this._navigation.getSearchValue() : "";
228
+ if (searchValue) {
229
+ // Apply the search value
230
+ this.search(searchValue);
231
+ }
225
232
  };
226
233
  // Search the table
227
234
  Dashboard.prototype.search = function (value) {
@@ -20,8 +20,13 @@ interface INavProps {
20
20
  * Navigation
21
21
  */
22
22
  export declare class Navigation {
23
+ private _nav;
23
24
  private _props;
24
25
  constructor(props: INavProps);
25
26
  private render;
27
+ /**
28
+ * Public Interface
29
+ */
30
+ getSearchValue(): string;
26
31
  }
27
32
  export {};
@@ -36,14 +36,14 @@ var Navigation = /** @class */ (function () {
36
36
  // Call the rendering event
37
37
  this._props.onRendering ? this._props.onRendering(props) : null;
38
38
  // Render a navbar
39
- var nav = gd_sprest_bs_1.Components.Navbar(props);
39
+ this._nav = gd_sprest_bs_1.Components.Navbar(props);
40
40
  // See if we are showing the filter
41
41
  if (this._props.hideFilter != true) {
42
42
  // Render the filter icon
43
43
  // Create a span to wrap the icon in
44
44
  var span = document.createElement("span");
45
45
  span.className = "bg-white d-inline-flex filter-icon ms-2 rounded";
46
- nav.el.firstElementChild.appendChild(span);
46
+ this._nav.el.firstElementChild.appendChild(span);
47
47
  // Render a tooltip
48
48
  var ttp = gd_sprest_bs_1.Components.Tooltip({
49
49
  el: span,
@@ -63,6 +63,11 @@ var Navigation = /** @class */ (function () {
63
63
  // Call the event
64
64
  this._props.onSearchRendered ? this._props.onSearchRendered(this._props.el.querySelector("input[type='search']")) : null;
65
65
  };
66
+ /**
67
+ * Public Interface
68
+ */
69
+ // Returns the current search value
70
+ Navigation.prototype.getSearchValue = function () { return this._nav.getSearchValue(); };
66
71
  return Navigation;
67
72
  }());
68
73
  exports.Navigation = Navigation;