web-mojo 2.1.498 → 2.1.527

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 (59) 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 +11 -11
  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.css +264 -0
  11. package/dist/charts.es.js +2 -2
  12. package/dist/chunks/{ChatView-DkK2PBny.js → ChatView-B57YxUKj.js} +38 -16
  13. package/dist/chunks/{ChatView-DkK2PBny.js.map → ChatView-B57YxUKj.js.map} +1 -1
  14. package/dist/chunks/{ChatView-D4ZiYBzL.js → ChatView-BrVd1y6Y.js} +2 -2
  15. package/dist/chunks/{ChatView-D4ZiYBzL.js.map → ChatView-BrVd1y6Y.js.map} +1 -1
  16. package/dist/chunks/{ContextMenu-B4LTfsNs.js → ContextMenu-Ced9TnyF.js} +2 -2
  17. package/dist/chunks/{ContextMenu-B4LTfsNs.js.map → ContextMenu-Ced9TnyF.js.map} +1 -1
  18. package/dist/chunks/{ContextMenu-A1PxR6Zt.js → ContextMenu-CjPlCuJl.js} +2 -2
  19. package/dist/chunks/{ContextMenu-A1PxR6Zt.js.map → ContextMenu-CjPlCuJl.js.map} +1 -1
  20. package/dist/chunks/{DataView-BIfnT2oG.js → DataView-C0sfssWn.js} +2 -2
  21. package/dist/chunks/{DataView-BIfnT2oG.js.map → DataView-C0sfssWn.js.map} +1 -1
  22. package/dist/chunks/{DataView-DGEl3x72.js → DataView-CtzsJJ5W.js} +2 -2
  23. package/dist/chunks/{DataView-DGEl3x72.js.map → DataView-CtzsJJ5W.js.map} +1 -1
  24. package/dist/chunks/{Dialog-DtSluuiz.js → Dialog-Bu4kE-6z.js} +5 -5
  25. package/dist/chunks/{Dialog-DtSluuiz.js.map → Dialog-Bu4kE-6z.js.map} +1 -1
  26. package/dist/chunks/{Dialog-pH-ua3tF.js → Dialog-ms9f-96b.js} +2 -2
  27. package/dist/chunks/{Dialog-pH-ua3tF.js.map → Dialog-ms9f-96b.js.map} +1 -1
  28. package/dist/chunks/{FormView-DrvkHPA-.js → FormView-D2RN_VDh.js} +2 -2
  29. package/dist/chunks/{FormView-DrvkHPA-.js.map → FormView-D2RN_VDh.js.map} +1 -1
  30. package/dist/chunks/{FormView-CDG8qMdU.js → FormView-tRzDzz1X.js} +2 -2
  31. package/dist/chunks/{FormView-CDG8qMdU.js.map → FormView-tRzDzz1X.js.map} +1 -1
  32. package/dist/chunks/{MetricsChart-DJU0UetE.js → MetricsChart-CDX8JKp-.js} +3 -3
  33. package/dist/chunks/{MetricsChart-DJU0UetE.js.map → MetricsChart-CDX8JKp-.js.map} +1 -1
  34. package/dist/chunks/{MetricsChart-Bo0ky0UE.js → MetricsChart-Cssnc0Gg.js} +2 -2
  35. package/dist/chunks/{MetricsChart-Bo0ky0UE.js.map → MetricsChart-Cssnc0Gg.js.map} +1 -1
  36. package/dist/chunks/{PDFViewer-CydWqbUF.js → PDFViewer-gbGWhRZD.js} +3 -3
  37. package/dist/chunks/{PDFViewer-CydWqbUF.js.map → PDFViewer-gbGWhRZD.js.map} +1 -1
  38. package/dist/chunks/{PDFViewer-8HA3oUBX.js → PDFViewer-xyB0U9sL.js} +2 -2
  39. package/dist/chunks/{PDFViewer-8HA3oUBX.js.map → PDFViewer-xyB0U9sL.js.map} +1 -1
  40. package/dist/chunks/{Page-dP8b4UdB.js → Page-C7F-OstP.js} +2 -2
  41. package/dist/chunks/{Page-dP8b4UdB.js.map → Page-C7F-OstP.js.map} +1 -1
  42. package/dist/chunks/{Page-nrJqRb7x.js → Page-DJA--Pwm.js} +2 -2
  43. package/dist/chunks/{Page-nrJqRb7x.js.map → Page-DJA--Pwm.js.map} +1 -1
  44. package/dist/chunks/{TopNav-jh5jqV3e.js → TopNav-BusOFMOX.js} +2 -2
  45. package/dist/chunks/{TopNav-jh5jqV3e.js.map → TopNav-BusOFMOX.js.map} +1 -1
  46. package/dist/chunks/{TopNav-DfikMNXj.js → TopNav-dgXgzEIz.js} +2 -2
  47. package/dist/chunks/{TopNav-DfikMNXj.js.map → TopNav-dgXgzEIz.js.map} +1 -1
  48. package/dist/chunks/{WebApp-BdmNWAj2.js → WebApp-CDxq9aWO.js} +13 -13
  49. package/dist/chunks/{WebApp-BdmNWAj2.js.map → WebApp-CDxq9aWO.js.map} +1 -1
  50. package/dist/chunks/{WebApp-D801tYpF.js → WebApp-DbS9A-y6.js} +2 -2
  51. package/dist/chunks/{WebApp-D801tYpF.js.map → WebApp-DbS9A-y6.js.map} +1 -1
  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
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/MetricsChart-Bo0ky0UE.js"),r=require("./chunks/WebApp-D801tYpF.js");exports.BaseChart=e.BaseChart,exports.MetricsChart=e.MetricsChart,exports.PieChart=e.PieChart,exports.SeriesChart=e.SeriesChart,exports.BUILD_TIME=r.BUILD_TIME,exports.VERSION=r.VERSION,exports.VERSION_INFO=r.VERSION_INFO,exports.VERSION_MAJOR=r.VERSION_MAJOR,exports.VERSION_MINOR=r.VERSION_MINOR,exports.VERSION_REVISION=r.VERSION_REVISION,exports.WebApp=r.WebApp;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/MetricsChart-Cssnc0Gg.js"),r=require("./chunks/WebApp-DbS9A-y6.js");exports.BaseChart=e.BaseChart,exports.MetricsChart=e.MetricsChart,exports.PieChart=e.PieChart,exports.SeriesChart=e.SeriesChart,exports.BUILD_TIME=r.BUILD_TIME,exports.VERSION=r.VERSION,exports.VERSION_INFO=r.VERSION_INFO,exports.VERSION_MAJOR=r.VERSION_MAJOR,exports.VERSION_MINOR=r.VERSION_MINOR,exports.VERSION_REVISION=r.VERSION_REVISION,exports.WebApp=r.WebApp;
2
2
  //# sourceMappingURL=charts.cjs.js.map
package/dist/charts.css CHANGED
@@ -1000,3 +1000,267 @@
1000
1000
  min-width: 0;
1001
1001
  }
1002
1002
  }
1003
+
1004
+ /* ==========================================================================
1005
+ Mini Chart Components
1006
+ ========================================================================== */
1007
+
1008
+ /* Mini Chart Base */
1009
+ .mini-chart {
1010
+ display: block;
1011
+ width: 100%;
1012
+ }
1013
+
1014
+ .mini-chart-wrapper {
1015
+ position: relative;
1016
+ display: block;
1017
+ width: 100%;
1018
+ }
1019
+
1020
+ .mini-chart-svg {
1021
+ display: block;
1022
+ width: 100%;
1023
+ height: 100%;
1024
+ }
1025
+
1026
+ /* Animation keyframes for mini charts */
1027
+ @keyframes mini-chart-draw {
1028
+ to {
1029
+ stroke-dashoffset: 0;
1030
+ }
1031
+ }
1032
+
1033
+ @keyframes mini-chart-bar-grow {
1034
+ to {
1035
+ transform: scaleY(1);
1036
+ }
1037
+ }
1038
+
1039
+ /* ==========================================================================
1040
+ Metrics Mini Chart Component
1041
+ ========================================================================== */
1042
+
1043
+ .metrics-mini-chart-container {
1044
+ display: flex;
1045
+ align-items: center;
1046
+ gap: 1rem;
1047
+ padding: 1rem;
1048
+ background: var(--chart-bg);
1049
+ border: 1px solid var(--chart-border);
1050
+ border-radius: 0.5rem;
1051
+ transition: all 0.2s ease;
1052
+ }
1053
+
1054
+ .metrics-mini-chart-container:hover {
1055
+ box-shadow: var(--chart-shadow);
1056
+ border-color: var(--bs-primary);
1057
+ }
1058
+
1059
+ /* Vertical layout */
1060
+ .metrics-mini-chart-vertical {
1061
+ flex-direction: column;
1062
+ align-items: stretch;
1063
+ text-align: center;
1064
+ }
1065
+
1066
+ .metrics-mini-chart-vertical .metrics-chart {
1067
+ margin-top: 0.5rem;
1068
+ }
1069
+
1070
+ /* Horizontal layout (default) */
1071
+ .metrics-mini-chart-horizontal {
1072
+ flex-direction: row;
1073
+ justify-content: space-between;
1074
+ }
1075
+
1076
+ /* Metrics Info Section */
1077
+ .metrics-info {
1078
+ flex: 1;
1079
+ min-width: 0;
1080
+ }
1081
+
1082
+ .metrics-label {
1083
+ font-size: 0.875rem;
1084
+ color: var(--chart-text-muted);
1085
+ font-weight: 500;
1086
+ margin-bottom: 0.25rem;
1087
+ white-space: nowrap;
1088
+ overflow: hidden;
1089
+ text-overflow: ellipsis;
1090
+ }
1091
+
1092
+ .metrics-value-row {
1093
+ display: flex;
1094
+ align-items: baseline;
1095
+ gap: 0.5rem;
1096
+ flex-wrap: wrap;
1097
+ }
1098
+
1099
+ .metrics-value {
1100
+ font-size: 1.5rem;
1101
+ font-weight: 700;
1102
+ color: var(--chart-text);
1103
+ line-height: 1.2;
1104
+ }
1105
+
1106
+ /* Trend Badge */
1107
+ .metrics-trend {
1108
+ display: inline-flex;
1109
+ align-items: center;
1110
+ gap: 0.25rem;
1111
+ padding: 0.125rem 0.5rem;
1112
+ font-size: 0.75rem;
1113
+ font-weight: 600;
1114
+ border-radius: 0.25rem;
1115
+ line-height: 1.5;
1116
+ }
1117
+
1118
+ .metrics-trend.trend-up {
1119
+ color: #198754;
1120
+ background-color: rgba(25, 135, 84, 0.1);
1121
+ }
1122
+
1123
+ .metrics-trend.trend-down {
1124
+ color: #dc3545;
1125
+ background-color: rgba(220, 53, 69, 0.1);
1126
+ }
1127
+
1128
+ .metrics-trend i {
1129
+ font-size: 0.875rem;
1130
+ }
1131
+
1132
+ /* Metrics Chart Section */
1133
+ .metrics-chart {
1134
+ flex-shrink: 0;
1135
+ display: flex;
1136
+ align-items: center;
1137
+ }
1138
+
1139
+ /* Size Variants */
1140
+ .metrics-mini-chart-sm .metrics-value {
1141
+ font-size: 1.25rem;
1142
+ }
1143
+
1144
+ .metrics-mini-chart-sm .metrics-label {
1145
+ font-size: 0.75rem;
1146
+ }
1147
+
1148
+ .metrics-mini-chart-sm .metrics-chart {
1149
+ width: 80px;
1150
+ height: 30px;
1151
+ }
1152
+
1153
+ .metrics-mini-chart-md .metrics-chart {
1154
+ width: 100px;
1155
+ height: 40px;
1156
+ }
1157
+
1158
+ .metrics-mini-chart-lg .metrics-value {
1159
+ font-size: 2rem;
1160
+ }
1161
+
1162
+ .metrics-mini-chart-lg .metrics-label {
1163
+ font-size: 1rem;
1164
+ }
1165
+
1166
+ .metrics-mini-chart-lg .metrics-chart {
1167
+ width: 120px;
1168
+ height: 50px;
1169
+ }
1170
+
1171
+ /* Variant Colors */
1172
+ .metrics-mini-chart-success {
1173
+ border-left: 4px solid #198754;
1174
+ }
1175
+
1176
+ .metrics-mini-chart-success .metrics-value {
1177
+ color: #198754;
1178
+ }
1179
+
1180
+ .metrics-mini-chart-danger {
1181
+ border-left: 4px solid #dc3545;
1182
+ }
1183
+
1184
+ .metrics-mini-chart-danger .metrics-value {
1185
+ color: #dc3545;
1186
+ }
1187
+
1188
+ .metrics-mini-chart-warning {
1189
+ border-left: 4px solid #ffc107;
1190
+ }
1191
+
1192
+ .metrics-mini-chart-warning .metrics-value {
1193
+ color: #ffc107;
1194
+ }
1195
+
1196
+ .metrics-mini-chart-info {
1197
+ border-left: 4px solid #0dcaf0;
1198
+ }
1199
+
1200
+ .metrics-mini-chart-info .metrics-value {
1201
+ color: #0dcaf0;
1202
+ }
1203
+
1204
+ /* Dark Theme Adjustments */
1205
+ [data-theme="dark"] .metrics-trend.trend-up {
1206
+ color: #75b798;
1207
+ background-color: rgba(117, 183, 152, 0.15);
1208
+ }
1209
+
1210
+ [data-theme="dark"] .metrics-trend.trend-down {
1211
+ color: #ea868f;
1212
+ background-color: rgba(234, 134, 143, 0.15);
1213
+ }
1214
+
1215
+ /* Responsive Adjustments */
1216
+ @media (max-width: 575.98px) {
1217
+ .metrics-mini-chart-container {
1218
+ flex-direction: column;
1219
+ align-items: flex-start;
1220
+ }
1221
+
1222
+ .metrics-mini-chart-horizontal .metrics-chart {
1223
+ align-self: stretch;
1224
+ }
1225
+
1226
+ .metrics-mini-chart-horizontal .mini-chart-svg {
1227
+ width: 100%;
1228
+ height: 40px;
1229
+ }
1230
+ }
1231
+
1232
+ /* Reduced Motion */
1233
+ @media (prefers-reduced-motion: reduce) {
1234
+ .mini-chart-svg path,
1235
+ .mini-chart-svg rect {
1236
+ animation: none !important;
1237
+ }
1238
+
1239
+ .metrics-mini-chart-container {
1240
+ transition: none;
1241
+ }
1242
+ }
1243
+
1244
+ /* Mini Chart Tooltip */
1245
+ .mini-chart-tooltip {
1246
+ position: absolute;
1247
+ background: rgba(0, 0, 0, 0.85);
1248
+ color: white;
1249
+ padding: 0.375rem 0.625rem;
1250
+ border-radius: 0.375rem;
1251
+ font-size: 0.75rem;
1252
+ line-height: 1.4;
1253
+ pointer-events: none;
1254
+ white-space: nowrap;
1255
+ z-index: 1000;
1256
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
1257
+ }
1258
+
1259
+ .mini-chart-tooltip strong {
1260
+ font-weight: 600;
1261
+ }
1262
+
1263
+ [data-theme="dark"] .mini-chart-tooltip {
1264
+ background: rgba(255, 255, 255, 0.9);
1265
+ color: #212529;
1266
+ }
package/dist/charts.es.js CHANGED
@@ -1,5 +1,5 @@
1
- import { B, M, P, S } from "./chunks/MetricsChart-DJU0UetE.js";
2
- import { B as B2, b, a, c, e, f, W } from "./chunks/WebApp-BdmNWAj2.js";
1
+ import { B, M, P, S } from "./chunks/MetricsChart-CDX8JKp-.js";
2
+ import { B as B2, b, a, c, e, f, W } from "./chunks/WebApp-CDxq9aWO.js";
3
3
  export {
4
4
  B2 as BUILD_TIME,
5
5
  B as BaseChart,
@@ -1,8 +1,8 @@
1
- import { M as Model, C as Collection, T as ToastService, G as GroupList, d as UserList } from "./ContextMenu-A1PxR6Zt.js";
2
- import { r as rest, V as View, d as dataFormatter, M as Mustache } from "./WebApp-BdmNWAj2.js";
3
- import { P as Page } from "./Page-dP8b4UdB.js";
4
- import Dialog from "./Dialog-DtSluuiz.js";
5
- import { F as FormView, a as applyFileDropMixin } from "./FormView-DrvkHPA-.js";
1
+ import { M as Model, C as Collection, T as ToastService, G as GroupList, d as UserList } from "./ContextMenu-CjPlCuJl.js";
2
+ import { r as rest, V as View, d as dataFormatter, M as Mustache } from "./WebApp-CDxq9aWO.js";
3
+ import { P as Page } from "./Page-C7F-OstP.js";
4
+ import Dialog from "./Dialog-Bu4kE-6z.js";
5
+ import { F as FormView, a as applyFileDropMixin } from "./FormView-D2RN_VDh.js";
6
6
  class S3Bucket extends Model {
7
7
  constructor(data = {}) {
8
8
  super(data, {
@@ -6804,10 +6804,14 @@ class ChatInputView extends View {
6804
6804
  /**
6805
6805
  * Handle upload completion
6806
6806
  * @param {string} uploadId - Upload ID
6807
- * @param {Object} result - Upload result data
6807
+ * @param {Object} result - Upload result data (contains file.id)
6808
6808
  */
6809
6809
  handleUploadComplete(uploadId, result) {
6810
- this.attachments.push(result);
6810
+ this.attachments.push({
6811
+ id: result.id || result.file?.id || result,
6812
+ name: result.name || this.pendingUploads.get(uploadId)?.file.name,
6813
+ uploadId
6814
+ });
6811
6815
  this.pendingUploads.delete(uploadId);
6812
6816
  const preview = this.element.querySelector(`[data-upload-id="${uploadId}"]`);
6813
6817
  if (preview) {
@@ -7016,16 +7020,34 @@ class ChatView extends View {
7016
7020
  */
7017
7021
  async handleSendMessage(data) {
7018
7022
  try {
7019
- const result = await this.adapter.addNote(data);
7020
- if (result.success) {
7021
- this.messages = await this.adapter.fetch();
7022
- this.messages.forEach((message) => {
7023
- if (!this.messageViews.has(message.id)) {
7024
- this.addMessage(message, true);
7025
- }
7023
+ if (data.text && data.text.trim()) {
7024
+ const result = await this.adapter.addNote({
7025
+ text: data.text,
7026
+ files: data.files && data.files.length > 0 ? [data.files[0]] : []
7027
+ });
7028
+ if (!result.success) {
7029
+ throw new Error("Failed to send message");
7030
+ }
7031
+ }
7032
+ const startIndex = data.text && data.text.trim() && data.files.length > 0 ? 1 : 0;
7033
+ for (let i = startIndex; i < (data.files?.length || 0); i++) {
7034
+ const file = data.files[i];
7035
+ const result = await this.adapter.addNote({
7036
+ text: "",
7037
+ // Empty text, just the file
7038
+ files: [file]
7026
7039
  });
7027
- this.inputView.clearInput();
7040
+ if (!result.success) {
7041
+ console.error("Failed to upload file:", file);
7042
+ }
7028
7043
  }
7044
+ this.messages = await this.adapter.fetch();
7045
+ this.messages.forEach((message) => {
7046
+ if (!this.messageViews.has(message.id)) {
7047
+ this.addMessage(message, true);
7048
+ }
7049
+ });
7050
+ this.inputView.clearInput();
7029
7051
  } catch (error) {
7030
7052
  console.error("Failed to send message:", error);
7031
7053
  }
@@ -7155,4 +7177,4 @@ export {
7155
7177
  FileList as y,
7156
7178
  FileForms as z
7157
7179
  };
7158
- //# sourceMappingURL=ChatView-DkK2PBny.js.map
7180
+ //# sourceMappingURL=ChatView-B57YxUKj.js.map