g-ui-web 1.0.24 → 1.0.25

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.
package/lib/g-ui-web.js CHANGED
@@ -115167,32 +115167,32 @@ const b6t = { class: "g-datatable" }, _6t = H({
115167
115167
  }
115168
115168
  ]
115169
115169
  };
115170
- const h = (C) => {
115171
- let x = o.dbOptions.axisFields;
115172
- const S = o.dbOptions.dataField, E = C.reduce((A, M) => {
115173
- const k = M[x[0]];
115174
- return A[k] || (A[k] = []), A[k].push(M), A;
115170
+ const h = (w) => {
115171
+ let C = o.dbOptions.axisFields;
115172
+ const x = o.dbOptions.dataField, S = w.reduce((T, A) => {
115173
+ const M = A[C[0]];
115174
+ return T[M] || (T[M] = []), T[M].push(A), T;
115175
115175
  }, {});
115176
- return Object.entries(E).map(([A, M]) => {
115177
- const k = M.reduce((F, R) => F + Number(R[S]), 0), O = M.map((F) => ({
115178
- [x[1]]: F[x[1]],
115179
- [S]: F[S]
115176
+ return Object.entries(S).map(([T, A]) => {
115177
+ const M = A.reduce((O, F) => O + Number(F[x]), 0), k = A.map((O) => ({
115178
+ [C[1]]: O[C[1]],
115179
+ [x]: O[x]
115180
115180
  }));
115181
115181
  return {
115182
- [x[0]]: A,
115183
- [S]: k,
115184
- children: O
115182
+ [C[0]]: T,
115183
+ [x]: M,
115184
+ children: k
115185
115185
  };
115186
115186
  });
115187
- }, v = B({}), g = o.dbOptions.columns.find((C) => C.field === o.dbOptions.dataField), m = async (C) => {
115188
- if (C = h(C), ya(C)) {
115187
+ }, v = B({}), g = async (w) => {
115188
+ if (w = h(w), ya(w)) {
115189
115189
  s.value = !0;
115190
115190
  return;
115191
115191
  } else
115192
115192
  s.value = !1;
115193
115193
  p = {
115194
115194
  series: [{}]
115195
- }, f = [], d.value = C, d.value && o.dbOptions && (d.value.map((x, S) => {
115195
+ }, f = [], d.value = w, d.value && o.dbOptions && (d.value.map((x, S) => {
115196
115196
  let E = {
115197
115197
  name: x[o.dbOptions.axisFields[0]],
115198
115198
  value: x[o.dbOptions.dataField],
@@ -115202,28 +115202,30 @@ const b6t = { class: "g-datatable" }, _6t = H({
115202
115202
  }))
115203
115203
  };
115204
115204
  f.push(E);
115205
- }), o.options ? o.options.series ? o.options.series[0].data = f : o.options.series = [{ data: f }] : p.series[0].data = f), o.options ? c.value = CW(o.options, {
115205
+ }), o.options ? o.options.series ? o.options.series[0].data = f : o.options.series = [{ data: f }] : p.series[0].data = f);
115206
+ const C = o.dbOptions.columns.find((x) => x.field === o.dbOptions.dataField);
115207
+ o.options ? c.value = CW(o.options, {
115206
115208
  type: o.type,
115207
115209
  size: o.size,
115208
115210
  isMarkLine: o.isMarkLine,
115209
115211
  markLineData: o.markLineData,
115210
115212
  title: "",
115211
- unit: g.unit
115213
+ unit: C.unit
115212
115214
  }) : c.value = CW(p, {
115213
115215
  type: o.type,
115214
115216
  size: o.size,
115215
115217
  isMarkLine: o.isMarkLine,
115216
115218
  markLineData: o.markLineData,
115217
115219
  title: "",
115218
- unit: g.unit
115219
- }), _(1);
115220
+ unit: C.unit
115221
+ }), y(1);
115220
115222
  };
115221
- let y = B(null);
115222
- const _ = (C) => {
115223
+ let m = B(null);
115224
+ const y = (w) => {
115223
115225
  xe(() => {
115224
115226
  if (!u.value) return;
115225
- const x = u.value.myChart;
115226
- C ? (y.value = C, c.value = q8(
115227
+ const C = u.value.myChart, x = o.dbOptions.columns.find((S) => S.field === o.dbOptions.dataField);
115228
+ w ? (m.value = w, c.value = q8(
115227
115229
  c.value,
115228
115230
  {
115229
115231
  type: o.type,
@@ -115231,24 +115233,24 @@ const b6t = { class: "g-datatable" }, _6t = H({
115231
115233
  isMarkLine: o.isMarkLine,
115232
115234
  markLineData: o.markLineData,
115233
115235
  title: "",
115234
- unit: g.unit
115236
+ unit: x.unit
115235
115237
  },
115236
- y.value
115237
- ), x.on("finished", function() {
115238
- y.value !== null && x.dispatchAction({
115238
+ m.value
115239
+ ), C.on("finished", function() {
115240
+ m.value !== null && C.dispatchAction({
115239
115241
  type: "highlight",
115240
115242
  seriesIndex: 0,
115241
- dataIndex: y.value
115243
+ dataIndex: m.value
115242
115244
  });
115243
- })) : (x.on("click", (S) => {
115244
- c.value && S.seriesIndex === 0 && (y.value === S.dataIndex ? (y.value = null, c.value = q8(c.value, {
115245
+ })) : (C.on("click", (S) => {
115246
+ c.value && S.seriesIndex === 0 && (m.value === S.dataIndex ? (m.value = null, c.value = q8(c.value, {
115245
115247
  type: o.type,
115246
115248
  size: o.size,
115247
115249
  isMarkLine: o.isMarkLine,
115248
115250
  markLineData: o.markLineData,
115249
115251
  title: "",
115250
- unit: g == null ? void 0 : g.unit
115251
- })) : (y.value = S.dataIndex, c.value = q8(
115252
+ unit: x == null ? void 0 : x.unit
115253
+ })) : (m.value = S.dataIndex, c.value = q8(
115252
115254
  c.value,
115253
115255
  {
115254
115256
  type: o.type,
@@ -115256,78 +115258,78 @@ const b6t = { class: "g-datatable" }, _6t = H({
115256
115258
  isMarkLine: o.isMarkLine,
115257
115259
  markLineData: o.markLineData,
115258
115260
  title: "",
115259
- unit: g == null ? void 0 : g.unit
115261
+ unit: x == null ? void 0 : x.unit
115260
115262
  },
115261
115263
  S.dataIndex
115262
115264
  )));
115263
- }), x.on("finished", function() {
115264
- y.value !== null && x.dispatchAction({
115265
+ }), C.on("finished", function() {
115266
+ m.value !== null && C.dispatchAction({
115265
115267
  type: "highlight",
115266
115268
  seriesIndex: 0,
115267
- dataIndex: y.value
115269
+ dataIndex: m.value
115268
115270
  });
115269
115271
  }));
115270
115272
  });
115271
115273
  };
115272
115274
  qt(async () => {
115273
- await _();
115275
+ await y();
115274
115276
  }), ke(
115275
115277
  () => o.dbOptions.data,
115276
- (C) => {
115277
- v.value = Kt(C);
115278
- const x = ["http://", "https://", void 0];
115279
- !C.path && !C.dsKey && !v.value.dataUrl && !(typeof C == "string" && x.some((S) => C.includes(S))) && v.value.loadStaticData(C), (typeof C == "string" || C.path) && v.value.reload(C.data);
115278
+ (w) => {
115279
+ v.value = Kt(w);
115280
+ const C = ["http://", "https://", void 0];
115281
+ !w.path && !w.dsKey && !v.value.dataUrl && !(typeof w == "string" && C.some((x) => w.includes(x))) && v.value.loadStaticData(w), (typeof w == "string" || w.path) && v.value.reload(w.data);
115280
115282
  },
115281
115283
  {
115282
115284
  deep: !0
115283
115285
  }
115284
115286
  ), ke(
115285
115287
  () => o.dbOptions,
115286
- (C) => {
115287
- v.value = Kt(C.data);
115288
- const x = ["http://", "https://", void 0];
115289
- !C.data.path && !C.data.dsKey && !v.value.dataUrl && !(typeof C.data == "string" && x.some((S) => C.data.includes(S))) && v.value.loadStaticData(C.data), (typeof C.data == "string" || C.data.path) && v.value.reload(C.data.data);
115288
+ (w) => {
115289
+ v.value = Kt(w.data);
115290
+ const C = ["http://", "https://", void 0];
115291
+ !w.data.path && !w.data.dsKey && !v.value.dataUrl && !(typeof w.data == "string" && C.some((x) => w.data.includes(x))) && v.value.loadStaticData(w.data), (typeof w.data == "string" || w.data.path) && v.value.reload(w.data.data);
115290
115292
  },
115291
115293
  {
115292
115294
  deep: !0
115293
115295
  }
115294
115296
  ), ke(
115295
115297
  () => n["gui-theme"],
115296
- async (C) => {
115298
+ async (w) => {
115297
115299
  v.value = null, xe(async () => {
115298
- i++, v.value = Kt(o.dbOptions.data), m(v.value.data), v.value.on("load", (x) => {
115299
- m(x);
115300
+ i++, v.value = Kt(o.dbOptions.data), g(v.value.data), v.value.on("load", (C) => {
115301
+ g(C);
115300
115302
  });
115301
115303
  });
115302
115304
  },
115303
115305
  { deep: !0 }
115304
115306
  ), xe(async () => {
115305
- v.value = Kt(o.dbOptions.data), v.value.on("load", (C) => {
115306
- m(C);
115307
+ v.value = Kt(o.dbOptions.data), v.value.on("load", (w) => {
115308
+ g(w);
115307
115309
  });
115308
115310
  }), t({
115309
115311
  props: o
115310
115312
  });
115311
- const w = (C) => {
115312
- a("chart-click", C);
115313
+ const _ = (w) => {
115314
+ a("chart-click", w);
115313
115315
  };
115314
- return (C, x) => {
115315
- const S = vt("g-chart");
115316
+ return (w, C) => {
115317
+ const x = vt("g-chart");
115316
115318
  return D(), V("div", {
115317
115319
  class: K(["g-pie-level", l.value])
115318
115320
  }, [
115319
- (D(), Te(S, Pt({ options: c.value }, C.$attrs, {
115321
+ (D(), Te(x, Pt({ options: c.value }, w.$attrs, {
115320
115322
  ref_key: "pieChartRef",
115321
115323
  ref: u,
115322
115324
  isEmpty: s.value,
115323
115325
  description: e.description,
115324
- onClick: w,
115326
+ onClick: _,
115325
115327
  key: b(i)
115326
115328
  }), null, 16, ["options", "isEmpty", "description"]))
115327
115329
  ], 2);
115328
115330
  };
115329
115331
  }
115330
- }), M8t = /* @__PURE__ */ Qn(A8t, [["__scopeId", "data-v-9326e0e9"]]), k8t = tr(M8t), D8t = { class: "g-calendar" }, O8t = { class: "g-calendar-header" }, I8t = { class: "switch-box" }, L8t = { class: "switch-box1" }, R8t = { class: "switch-box2" }, P8t = {
115332
+ }), M8t = /* @__PURE__ */ Qn(A8t, [["__scopeId", "data-v-4a759984"]]), k8t = tr(M8t), D8t = { class: "g-calendar" }, O8t = { class: "g-calendar-header" }, I8t = { class: "switch-box" }, L8t = { class: "switch-box1" }, R8t = { class: "switch-box2" }, P8t = {
115331
115333
  key: 0,
115332
115334
  class: "todoList"
115333
115335
  }, N8t = { class: "popover-inbox" }, $8t = ["onClick"], V8t = {
Binary file