dattatable 2.10.93 → 2.10.95

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 (72) hide show
  1. package/build/dashboard/accordion.d.ts +3 -3
  2. package/build/dashboard/accordion.js +14 -2
  3. package/build/dashboard/index.d.ts +2 -2
  4. package/build/dashboard/index.js +8 -6
  5. package/build/dashboard/tiles.d.ts +3 -2
  6. package/build/dashboard/tiles.js +14 -2
  7. package/dist/dattatable.js +569 -569
  8. package/dist/dattatable.min.js +1 -1
  9. package/docs/assets/search.js +1 -1
  10. package/docs/classes/Accordion.html +3 -2
  11. package/docs/classes/AuditLog.html +2 -2
  12. package/docs/classes/CanvasForm.html +2 -2
  13. package/docs/classes/Comments.html +2 -2
  14. package/docs/classes/Dashboard.html +4 -4
  15. package/docs/classes/DataTable.html +3 -3
  16. package/docs/classes/Documents.html +6 -6
  17. package/docs/classes/FilterSlideout.html +2 -2
  18. package/docs/classes/Footer.html +2 -2
  19. package/docs/classes/Header.html +2 -2
  20. package/docs/classes/InstallationRequired.html +2 -2
  21. package/docs/classes/ItemForm.html +4 -4
  22. package/docs/classes/List.html +4 -4
  23. package/docs/classes/ListConfig.html +2 -2
  24. package/docs/classes/ListSecurity.html +2 -2
  25. package/docs/classes/LoadingDialog.html +2 -2
  26. package/docs/classes/Modal.html +2 -2
  27. package/docs/classes/Navigation.html +3 -3
  28. package/docs/classes/Tiles.html +3 -2
  29. package/docs/classes/Timeout.html +2 -2
  30. package/docs/enums/ActionButtonTypes.html +2 -2
  31. package/docs/functions/formatBytes.html +1 -1
  32. package/docs/functions/formatDateValue.html +1 -1
  33. package/docs/functions/formatTimeValue.html +1 -1
  34. package/docs/functions/getContextInfo.html +1 -1
  35. package/docs/functions/getFileExt.html +1 -1
  36. package/docs/functions/waitForTheme.html +1 -1
  37. package/docs/interfaces/IAccordion.html +2 -2
  38. package/docs/interfaces/IAccordionProps.html +2 -2
  39. package/docs/interfaces/IAuditLogItem.html +2 -2
  40. package/docs/interfaces/IAuditLogItemCreation.html +2 -2
  41. package/docs/interfaces/IAuditLogProps.html +2 -2
  42. package/docs/interfaces/IAuditLogViewProps.html +2 -2
  43. package/docs/interfaces/ICommentsItem.html +2 -2
  44. package/docs/interfaces/ICreateLookupData.html +2 -2
  45. package/docs/interfaces/IDashboardProps.html +2 -2
  46. package/docs/interfaces/IDataTable.html +2 -2
  47. package/docs/interfaces/IDataTableProps.html +2 -2
  48. package/docs/interfaces/IDocumentsProps.html +2 -2
  49. package/docs/interfaces/IFilterItem.html +2 -2
  50. package/docs/interfaces/IFilterProps.html +2 -2
  51. package/docs/interfaces/IFooterProps.html +2 -2
  52. package/docs/interfaces/IGenerateLookupDataProps.html +2 -2
  53. package/docs/interfaces/IHeaderProps.html +2 -2
  54. package/docs/interfaces/IInstallProps.html +2 -2
  55. package/docs/interfaces/IItemFormCreateProps.html +2 -2
  56. package/docs/interfaces/IItemFormEditProps.html +2 -2
  57. package/docs/interfaces/IItemFormTab.html +2 -2
  58. package/docs/interfaces/IItemFormTabInfo.html +2 -2
  59. package/docs/interfaces/IItemFormViewProps.html +2 -2
  60. package/docs/interfaces/IListConfig.html +2 -2
  61. package/docs/interfaces/IListConfigProps.html +2 -2
  62. package/docs/interfaces/IListProps.html +2 -2
  63. package/docs/interfaces/IListSecurity.html +2 -2
  64. package/docs/interfaces/IListSecurityItem.html +2 -2
  65. package/docs/interfaces/ILookupData.html +2 -2
  66. package/docs/interfaces/IShowDialogProps.html +2 -2
  67. package/docs/interfaces/ITiles.html +2 -2
  68. package/docs/interfaces/ITilesProps.html +2 -2
  69. package/docs/interfaces/IValidateLookupsProps.html +2 -2
  70. package/docs/variables/DattaTable.html +1 -1
  71. package/docs/variables/ListSecurityDefaultGroups.html +1 -1
  72. package/package.json +2 -2
@@ -1,6 +1,5 @@
1
- import { Components } from "gd-sprest-bs";
2
1
  export interface IAccordion {
3
- filter?: (value: string | string[], item?: Components.ICheckboxGroupItem) => void;
2
+ filter?: (value: string | string[], useAndOperator?: boolean) => void;
4
3
  refresh?: (items: any[]) => void;
5
4
  search?: (value: string) => void;
6
5
  }
@@ -31,9 +30,10 @@ export declare class Accordion implements IAccordion {
31
30
  private _activeSearchValue;
32
31
  private _pagination;
33
32
  private _props;
33
+ private _useAndOperator;
34
34
  constructor(props: IAccordionProps);
35
35
  private clearItem;
36
- filter(values: string[]): void;
36
+ filter(values: string[], useAndOperator?: boolean): void;
37
37
  private generateItem;
38
38
  refresh(items?: any[]): void;
39
39
  private render;
@@ -12,6 +12,7 @@ var Accordion = /** @class */ (function () {
12
12
  this._activeFilterValue = null;
13
13
  this._activeSearchValue = null;
14
14
  this._pagination = null;
15
+ this._useAndOperator = false;
15
16
  // Save the properties
16
17
  this._props = props;
17
18
  // Render the accordion
@@ -26,8 +27,10 @@ var Accordion = /** @class */ (function () {
26
27
  elItem.classList.remove("last-item");
27
28
  };
28
29
  // Filters the accordion
29
- Accordion.prototype.filter = function (values) {
30
+ Accordion.prototype.filter = function (values, useAndOperator) {
31
+ if (useAndOperator === void 0) { useAndOperator = false; }
30
32
  this._activeFilterValue = values ? values.join('|') : "";
33
+ this._useAndOperator = useAndOperator;
31
34
  // Parse all accordion items
32
35
  var items = this._props.el.querySelectorAll(".accordion-item");
33
36
  for (var i = 0; i < items.length; i++) {
@@ -182,8 +185,17 @@ var Accordion = /** @class */ (function () {
182
185
  for (var j = 0; j < activeFilters.length; j++) {
183
186
  // See if the item contains the filter value
184
187
  if (filterValues.indexOf(activeFilters[j]) >= 0) {
185
- // Set the flag and break from the loop
188
+ // Set the flag
186
189
  showItem = true;
190
+ // Break from the loop if we aren't using the and operator
191
+ if (!this._useAndOperator) {
192
+ break;
193
+ }
194
+ }
195
+ // Else, see if we are using the and operator
196
+ else if (this._useAndOperator) {
197
+ // Set the flag and break from the loop
198
+ showItem = false;
187
199
  break;
188
200
  }
189
201
  }
@@ -142,9 +142,9 @@ export declare class Dashboard {
142
142
  */
143
143
  clearFilter(): void;
144
144
  filter(idx: number, value?: string, exactMatchFl?: boolean): void;
145
- filterAccordion(values?: string | string[]): void;
145
+ filterAccordion(values?: string | string[], useAndOperator?: boolean): void;
146
146
  filterMulti(idx: number, values?: string[]): void;
147
- filterTiles(values?: string | string[]): void;
147
+ filterTiles(values?: string | string[], useAndOperator?: boolean): void;
148
148
  getFilter(key: string): Components.ICheckboxGroup;
149
149
  getSearchValue(): string;
150
150
  hideFilter(): void;
@@ -126,11 +126,11 @@ var Dashboard = /** @class */ (function () {
126
126
  // See if this is an accordion
127
127
  if (_this.IsAccordion) {
128
128
  // Filter the accordion
129
- _this._accordion.filter(values, item);
129
+ _this._accordion.filter(values);
130
130
  }
131
131
  else {
132
132
  // Filter the tiles
133
- _this._tiles.filter(values, item);
133
+ _this._tiles.filter(values);
134
134
  }
135
135
  } : null
136
136
  });
@@ -352,11 +352,12 @@ var Dashboard = /** @class */ (function () {
352
352
  }
353
353
  };
354
354
  // Filter the accordion
355
- Dashboard.prototype.filterAccordion = function (values) {
355
+ Dashboard.prototype.filterAccordion = function (values, useAndOperator) {
356
+ if (useAndOperator === void 0) { useAndOperator = false; }
356
357
  // See if we have an accordion
357
358
  if (this.IsAccordion) {
358
359
  // Filter the accordion
359
- this._accordion.filter(typeof (values) === "string" ? [values] : values);
360
+ this._accordion.filter(typeof (values) === "string" ? [values] : values, useAndOperator);
360
361
  }
361
362
  };
362
363
  // Filter the table by multiple values
@@ -377,11 +378,12 @@ var Dashboard = /** @class */ (function () {
377
378
  }
378
379
  };
379
380
  // Filter the tiles
380
- Dashboard.prototype.filterTiles = function (values) {
381
+ Dashboard.prototype.filterTiles = function (values, useAndOperator) {
382
+ if (useAndOperator === void 0) { useAndOperator = false; }
381
383
  // See if we have tiles
382
384
  if (this.IsTiles) {
383
385
  // Filter the tiles
384
- this._tiles.filter(typeof (values) === "string" ? [values] : values);
386
+ this._tiles.filter(typeof (values) === "string" ? [values] : values, useAndOperator);
385
387
  }
386
388
  };
387
389
  // Returns a filter checkbox group by its key
@@ -1,6 +1,6 @@
1
1
  import { Components } from "gd-sprest-bs";
2
2
  export interface ITiles {
3
- filter?: (value: string | string[], item?: Components.ICheckboxGroupItem) => void;
3
+ filter?: (value: string | string[], useAndOperator?: boolean) => void;
4
4
  refresh?: (items: any[]) => void;
5
5
  search?: (value: string) => void;
6
6
  }
@@ -41,8 +41,9 @@ export declare class Tiles implements ITiles {
41
41
  private _activeSearchValue;
42
42
  private _pagination;
43
43
  private _props;
44
+ private _useAndOperator;
44
45
  constructor(props: ITilesProps);
45
- filter(values: string[]): void;
46
+ filter(values: string[], useAndOperator?: boolean): void;
46
47
  private generateCard;
47
48
  refresh(items?: any[]): void;
48
49
  private render;
@@ -12,14 +12,17 @@ var Tiles = /** @class */ (function () {
12
12
  this._activeFilterValue = null;
13
13
  this._activeSearchValue = null;
14
14
  this._pagination = null;
15
+ this._useAndOperator = false;
15
16
  // Save the properties
16
17
  this._props = props;
17
18
  // Render the tile
18
19
  this.render(this._props.items);
19
20
  }
20
21
  // Filters the tile
21
- Tiles.prototype.filter = function (values) {
22
+ Tiles.prototype.filter = function (values, useAndOperator) {
23
+ if (useAndOperator === void 0) { useAndOperator = false; }
22
24
  this._activeFilterValue = values ? values.join('|') : "";
25
+ this._useAndOperator = useAndOperator;
23
26
  // Parse all tile
24
27
  var tiles = this._props.el.querySelectorAll(".card");
25
28
  for (var i = 0; i < tiles.length; i++) {
@@ -221,8 +224,17 @@ var Tiles = /** @class */ (function () {
221
224
  for (var j = 0; j < activeFilters.length; j++) {
222
225
  // See if the item contains the filter value
223
226
  if (filterValues.indexOf(activeFilters[j]) >= 0) {
224
- // Set the flag and break from the loop
227
+ // Set the flag
225
228
  showItem = true;
229
+ // Break from the loop if we aren't using the and operator
230
+ if (!this._useAndOperator) {
231
+ break;
232
+ }
233
+ }
234
+ // Else, see if we are using the and operator
235
+ else if (this._useAndOperator) {
236
+ // Set the flag and break from the loop
237
+ showItem = false;
226
238
  break;
227
239
  }
228
240
  }