web-mojo 2.1.381 → 2.1.443

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 (71) hide show
  1. package/dist/admin.cjs.js +1 -1
  2. package/dist/admin.cjs.js.map +1 -1
  3. package/dist/admin.es.js +32 -43
  4. package/dist/admin.es.js.map +1 -1
  5. package/dist/auth.cjs.js +1 -1
  6. package/dist/auth.cjs.js.map +1 -1
  7. package/dist/auth.es.js +3 -3
  8. package/dist/auth.es.js.map +1 -1
  9. package/dist/charts.cjs.js +1 -1
  10. package/dist/charts.es.js +2 -2
  11. package/dist/chunks/{ContextMenu-D7MrKGO7.js → ContextMenu-Cao6A-Lu.js} +4 -2
  12. package/dist/chunks/{ContextMenu-D7MrKGO7.js.map → ContextMenu-Cao6A-Lu.js.map} +1 -1
  13. package/dist/chunks/ContextMenu-TK4-wzDb.js +3 -0
  14. package/dist/chunks/ContextMenu-TK4-wzDb.js.map +1 -0
  15. package/dist/chunks/DataView-CHoPxbYT.js +2 -0
  16. package/dist/chunks/DataView-CHoPxbYT.js.map +1 -0
  17. package/dist/chunks/{DataView-CBdDVkrM.js → DataView-Qnk-TnHd.js} +17 -3
  18. package/dist/chunks/DataView-Qnk-TnHd.js.map +1 -0
  19. package/dist/chunks/{Dialog-C2ku3o7e.js → Dialog-B_ZJYlVS.js} +2 -2
  20. package/dist/chunks/{Dialog-C2ku3o7e.js.map → Dialog-B_ZJYlVS.js.map} +1 -1
  21. package/dist/chunks/{Dialog-CL5v9LoA.js → Dialog-DbZ2jB_m.js} +5 -5
  22. package/dist/chunks/{Dialog-CL5v9LoA.js.map → Dialog-DbZ2jB_m.js.map} +1 -1
  23. package/dist/chunks/FilePreviewView-DeGgRRbW.js +2 -0
  24. package/dist/chunks/FilePreviewView-DeGgRRbW.js.map +1 -0
  25. package/dist/chunks/{FilePreviewView-JVRNaQew.js → FilePreviewView-nuZku1yG.js} +68 -19
  26. package/dist/chunks/FilePreviewView-nuZku1yG.js.map +1 -0
  27. package/dist/chunks/{FormView-BoxBaXnl.js → FormView-BDKrUX1-.js} +25 -12
  28. package/dist/chunks/FormView-BDKrUX1-.js.map +1 -0
  29. package/dist/chunks/FormView-BZInlDfZ.js +2 -0
  30. package/dist/chunks/FormView-BZInlDfZ.js.map +1 -0
  31. package/dist/chunks/{MetricsChart-cZ4Dx3bJ.js → MetricsChart-Aqum5Znr.js} +3 -3
  32. package/dist/chunks/{MetricsChart-cZ4Dx3bJ.js.map → MetricsChart-Aqum5Znr.js.map} +1 -1
  33. package/dist/chunks/{MetricsChart-Dzkzbf7f.js → MetricsChart-BbaBczOZ.js} +2 -2
  34. package/dist/chunks/{MetricsChart-Dzkzbf7f.js.map → MetricsChart-BbaBczOZ.js.map} +1 -1
  35. package/dist/chunks/{PDFViewer-CeW32Luz.js → PDFViewer-Bq-NM6JH.js} +2 -2
  36. package/dist/chunks/{PDFViewer-CeW32Luz.js.map → PDFViewer-Bq-NM6JH.js.map} +1 -1
  37. package/dist/chunks/{PDFViewer-C3CBpSEM.js → PDFViewer-CGj7cZut.js} +3 -3
  38. package/dist/chunks/{PDFViewer-C3CBpSEM.js.map → PDFViewer-CGj7cZut.js.map} +1 -1
  39. package/dist/chunks/{Page-Dv1wCWd3.js → Page-BkkXMFuP.js} +2 -2
  40. package/dist/chunks/{Page-Dv1wCWd3.js.map → Page-BkkXMFuP.js.map} +1 -1
  41. package/dist/chunks/{Page-CySYnXIy.js → Page-QhPYRY-q.js} +2 -2
  42. package/dist/chunks/{Page-CySYnXIy.js.map → Page-QhPYRY-q.js.map} +1 -1
  43. package/dist/chunks/{TopNav-60lav94N.js → TopNav-D6c7gsox.js} +2 -2
  44. package/dist/chunks/{TopNav-60lav94N.js.map → TopNav-D6c7gsox.js.map} +1 -1
  45. package/dist/chunks/{TopNav-0VwJTJYX.js → TopNav-DUwNnOuM.js} +2 -2
  46. package/dist/chunks/{TopNav-0VwJTJYX.js.map → TopNav-DUwNnOuM.js.map} +1 -1
  47. package/dist/chunks/{WebApp-DoFA_eUd.js → WebApp-BPWJVv80.js} +19 -13
  48. package/dist/chunks/{WebApp-DoFA_eUd.js.map → WebApp-BPWJVv80.js.map} +1 -1
  49. package/dist/chunks/WebApp-CYqazUo5.js +2 -0
  50. package/dist/chunks/{WebApp-DOjTfhdO.js.map → WebApp-CYqazUo5.js.map} +1 -1
  51. package/dist/core.css +10 -0
  52. package/dist/css/web-mojo.css +1 -1
  53. package/dist/docit.cjs.js +1 -1
  54. package/dist/docit.es.js +5 -5
  55. package/dist/index.cjs.js +1 -1
  56. package/dist/index.es.js +11 -11
  57. package/dist/lightbox.cjs.js +1 -1
  58. package/dist/lightbox.es.js +4 -4
  59. package/package.json +1 -1
  60. package/dist/chunks/ContextMenu-DoiC5aBP.js +0 -3
  61. package/dist/chunks/ContextMenu-DoiC5aBP.js.map +0 -1
  62. package/dist/chunks/DataView-BkYIt0kh.js +0 -2
  63. package/dist/chunks/DataView-BkYIt0kh.js.map +0 -1
  64. package/dist/chunks/DataView-CBdDVkrM.js.map +0 -1
  65. package/dist/chunks/FilePreviewView-JVRNaQew.js.map +0 -1
  66. package/dist/chunks/FilePreviewView-PBLBpsc2.js +0 -2
  67. package/dist/chunks/FilePreviewView-PBLBpsc2.js.map +0 -1
  68. package/dist/chunks/FormView-B7UZBs0x.js +0 -2
  69. package/dist/chunks/FormView-B7UZBs0x.js.map +0 -1
  70. package/dist/chunks/FormView-BoxBaXnl.js.map +0 -1
  71. package/dist/chunks/WebApp-DOjTfhdO.js +0 -2
@@ -1,8 +1,8 @@
1
- import { M as Model, C as Collection, T as ToastService, G as GroupList, d as UserList } from "./ContextMenu-D7MrKGO7.js";
2
- import { r as rest, V as View, d as dataFormatter, M as Mustache } from "./WebApp-DoFA_eUd.js";
3
- import { P as Page } from "./Page-CySYnXIy.js";
4
- import Dialog from "./Dialog-CL5v9LoA.js";
5
- import { F as FormView } from "./FormView-BoxBaXnl.js";
1
+ import { M as Model, C as Collection, T as ToastService, G as GroupList, d as UserList } from "./ContextMenu-Cao6A-Lu.js";
2
+ import { r as rest, V as View, d as dataFormatter, M as Mustache } from "./WebApp-BPWJVv80.js";
3
+ import { P as Page } from "./Page-QhPYRY-q.js";
4
+ import Dialog from "./Dialog-DbZ2jB_m.js";
5
+ import { F as FormView } from "./FormView-BDKrUX1-.js";
6
6
  class S3Bucket extends Model {
7
7
  constructor(data = {}) {
8
8
  super(data, {
@@ -2393,7 +2393,6 @@ const MemberForms = {
2393
2393
  name: "metadata.role",
2394
2394
  type: "text",
2395
2395
  label: "Role",
2396
- required: true,
2397
2396
  placeholder: "Enter role"
2398
2397
  },
2399
2398
  {
@@ -2571,7 +2570,7 @@ const TicketForms = {
2571
2570
  { name: "description", type: "textarea", label: "Description", required: false, cols: 12 },
2572
2571
  { name: "category", type: "select", label: "Category", options: TicketCategoriesOptions, cols: 12 },
2573
2572
  { name: "priority", type: "number", label: "Priority", value: 5, cols: 6 },
2574
- { name: "status", type: "select", label: "Status", value: "open", options: ["open", "in_progress", "resolved", "closed"], cols: 6 },
2573
+ { name: "status", type: "select", label: "Status", value: "open", options: ["new", "open", "paused", "resolved", "qa", "ignored"], cols: 6 },
2575
2574
  { type: "collection", name: "assignee", label: "Assignee", Collection: UserList, labelField: "display_name", valueField: "id", cols: 12 },
2576
2575
  { type: "collection", name: "incident", label: "Incident", Collection: IncidentList, labelField: "title", valueField: "id", cols: 12 }
2577
2576
  ]
@@ -2583,7 +2582,7 @@ const TicketForms = {
2583
2582
  { name: "description", type: "textarea", label: "Description", required: false, cols: 12 },
2584
2583
  { name: "category", type: "select", label: "Category", options: TicketCategoriesOptions, cols: 12 },
2585
2584
  { name: "priority", type: "number", label: "Priority", cols: 6 },
2586
- { name: "status", type: "select", label: "Status", options: ["open", "in_progress", "resolved", "closed"], cols: 6 },
2585
+ { name: "status", type: "select", label: "Status", options: ["new", "open", "paused", "resolved", "qa", "ignored"], cols: 6 },
2587
2586
  { type: "collection", name: "assignee", label: "Assignee", Collection: UserList, labelField: "display_name", valueField: "id", cols: 12 },
2588
2587
  { type: "collection", name: "incident", label: "Incident", Collection: IncidentList, labelField: "title", valueField: "id", cols: 12 }
2589
2588
  ]
@@ -3859,7 +3858,8 @@ class TableView extends ListView {
3859
3858
  this.filters = {};
3860
3859
  this.columns.forEach((column) => {
3861
3860
  if (column.filter) {
3862
- this.filters[column.key] = column.filter;
3861
+ const { fieldKey } = this.parseColumnKey(column.key);
3862
+ this.filters[fieldKey] = column.filter;
3863
3863
  }
3864
3864
  });
3865
3865
  }
@@ -4141,14 +4141,13 @@ class TableView extends ListView {
4141
4141
  return `
4142
4142
  <span class="badge bg-primary me-1 mb-1 py-1 px-2 position-relative" style="font-size: 0.75rem;">
4143
4143
  <i class="bi bi-${icon} me-1" style="font-size: 0.65rem;"></i>
4144
- <small>${label}: ${displayValue}</small>
4145
4144
 
4146
4145
  <button type="button" class="btn btn-link text-white p-0 ms-1"
4147
4146
  style="font-size: 0.65rem; line-height: 1;"
4148
4147
  data-action="edit-filter"
4149
4148
  data-filter="${key}"
4150
4149
  title="Edit filter">
4151
- <i class="bi bi-pencil"></i>
4150
+ ${label}: ${displayValue}
4152
4151
  </button>
4153
4152
 
4154
4153
  <button type="button" class="btn-close btn-close-white ms-1"
@@ -5128,7 +5127,32 @@ class TableView extends ListView {
5128
5127
  if (!this.collection?.params) {
5129
5128
  return {};
5130
5129
  }
5131
- const { start, size, sort, ...filters } = this.collection.params;
5130
+ const { start, size, sort, ...allParams } = this.collection.params;
5131
+ const filters = {};
5132
+ const processedKeys = /* @__PURE__ */ new Set();
5133
+ const allFilterConfigs = this.getAllAvailableFilters();
5134
+ allFilterConfigs.forEach((filterDef) => {
5135
+ if (filterDef.config.type === "daterange") {
5136
+ const key = filterDef.key;
5137
+ const startName = filterDef.config.startName || `${key}_start`;
5138
+ const endName = filterDef.config.endName || `${key}_end`;
5139
+ const fieldName = filterDef.config.fieldName || key;
5140
+ if (allParams[startName] || allParams[endName]) {
5141
+ filters[key] = {
5142
+ start: allParams[startName] || "",
5143
+ end: allParams[endName] || ""
5144
+ };
5145
+ processedKeys.add(startName);
5146
+ processedKeys.add(endName);
5147
+ processedKeys.add(fieldName);
5148
+ }
5149
+ }
5150
+ });
5151
+ Object.keys(allParams).forEach((paramKey) => {
5152
+ if (!processedKeys.has(paramKey)) {
5153
+ filters[paramKey] = allParams[paramKey];
5154
+ }
5155
+ });
5132
5156
  return filters;
5133
5157
  }
5134
5158
  /**
@@ -5136,10 +5160,25 @@ class TableView extends ListView {
5136
5160
  */
5137
5161
  setFilter(key, value) {
5138
5162
  if (!this.collection) return;
5139
- if (value === null || value === void 0 || value === "") {
5140
- delete this.collection.params[key];
5163
+ const filterConfig = this.getFilterConfig(key);
5164
+ if (filterConfig && filterConfig.type === "daterange") {
5165
+ const startName = filterConfig.startName || `${key}_start`;
5166
+ const endName = filterConfig.endName || `${key}_end`;
5167
+ const fieldName = filterConfig.fieldName || key;
5168
+ delete this.collection.params[startName];
5169
+ delete this.collection.params[endName];
5170
+ delete this.collection.params[fieldName];
5171
+ if (value && typeof value === "object" && (value.start || value.end)) {
5172
+ if (value.start) this.collection.params[startName] = value.start;
5173
+ if (value.end) this.collection.params[endName] = value.end;
5174
+ this.collection.params[fieldName] = key;
5175
+ }
5141
5176
  } else {
5142
- this.collection.params[key] = value;
5177
+ if (value === null || value === void 0 || value === "") {
5178
+ delete this.collection.params[key];
5179
+ } else {
5180
+ this.collection.params[key] = value;
5181
+ }
5143
5182
  }
5144
5183
  }
5145
5184
  /**
@@ -5149,9 +5188,10 @@ class TableView extends ListView {
5149
5188
  const filters = [];
5150
5189
  this.columns.forEach((column) => {
5151
5190
  if (column.filter) {
5191
+ const { fieldKey } = this.parseColumnKey(column.key);
5152
5192
  filters.push({
5153
- key: column.key,
5154
- label: column.filter.label || column.label || column.key,
5193
+ key: fieldKey,
5194
+ label: column.filter.label || column.label || fieldKey,
5155
5195
  type: column.filter.type,
5156
5196
  config: column.filter
5157
5197
  });
@@ -5173,7 +5213,10 @@ class TableView extends ListView {
5173
5213
  * Get filter configuration for a key
5174
5214
  */
5175
5215
  getFilterConfig(filterKey) {
5176
- const column = this.columns.find((col) => col.key === filterKey);
5216
+ const column = this.columns.find((col) => {
5217
+ const { fieldKey } = this.parseColumnKey(col.key);
5218
+ return fieldKey === filterKey;
5219
+ });
5177
5220
  if (column && column.filter) {
5178
5221
  return column.filter;
5179
5222
  }
@@ -5204,6 +5247,11 @@ class TableView extends ListView {
5204
5247
  getFilterDisplayValue(key, value) {
5205
5248
  if (key === "search") return `"${value}"`;
5206
5249
  const filter = this.filters[key] || this.additionalFilters.find((f) => (f.name || f.key) === key);
5250
+ if (filter && filter.type === "daterange" && typeof value === "object") {
5251
+ const start = value.start || "";
5252
+ const end = value.end || "";
5253
+ return `${start} to ${end}`;
5254
+ }
5207
5255
  if (filter && filter.type === "select" && filter.options) {
5208
5256
  if (typeof filter.options[0] === "object") {
5209
5257
  const option = filter.options.find((opt) => opt.value === value);
@@ -5317,6 +5365,7 @@ class TableView extends ListView {
5317
5365
  const result = await Dialog.showForm({
5318
5366
  title: `Edit ${this.getFilterLabel(filterKey)} Filter`,
5319
5367
  size: "md",
5368
+ data: { filter_value: currentValue },
5320
5369
  fields: [this.buildFilterDialogField(filterConfig, currentValue)]
5321
5370
  });
5322
5371
  if (result) {
@@ -6563,4 +6612,4 @@ export {
6563
6612
  IncidentEventList as y,
6564
6613
  IncidentEventForms as z
6565
6614
  };
6566
- //# sourceMappingURL=FilePreviewView-JVRNaQew.js.map
6615
+ //# sourceMappingURL=FilePreviewView-nuZku1yG.js.map