fui-material 1.18.5 → 1.18.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 (2) hide show
  1. package/dist/f-ui-kit.es.js +46 -42
  2. package/package.json +1 -1
@@ -4248,49 +4248,53 @@ const bn = (i) => `<w:p><w:pPr><w:pStyle w:val="a4"/></w:pPr><w:r><w:t>${i}</w:t
4248
4248
  let e = "";
4249
4249
  return i !== void 0 && (e = `<w:r><w:rPr><w:rFonts w:cs="Times New Roman"/><w:color w:val="000000"/><w:szCs w:val="28"/></w:rPr><w:t>${i}</w:t></w:r>`), e;
4250
4250
  }, Mt = (i, e, t) => `<w:tc><w:tcPr><w:tcW w:w="1" w:type="dxa"/>${t !== void 0 ? `<w:gridSpan w:val="${t}"/>` : ""}${e !== void 0 ? `<w:vMerge ${e === "restart" ? 'w:val="restart"' : 'w:val="continue"'}/>` : ""}<w:vAlign w:val="center"/></w:tcPr><w:p><w:pPr><w:ind w:firstLine="0"/><w:jc w:val="center"/><w:rPr><w:rFonts w:cs="Times New Roman"/><w:b/><w:bCs/><w:color w:val="000000"/><w:szCs w:val="28"/></w:rPr></w:pPr>${Jr(i)}</w:p></w:tc>`, Nt = (i, e, t) => `<w:tc><w:tcPr><w:tcW w:w="1" w:type="dxa"/>${t !== void 0 ? `<w:gridSpan w:val="${t}"/>` : ""}${e !== void 0 ? `<w:vMerge ${e === "restart" ? 'w:val="restart"' : 'w:val="continue"'}/>` : ""}<w:vAlign w:val="center"/></w:tcPr><w:p><w:pPr><w:ind w:firstLine="0"/><w:rPr><w:rFonts w:cs="Times New Roman"/><w:color w:val="000000"/><w:szCs w:val="28"/></w:rPr></w:pPr>${qr(i)}</w:p></w:tc>`, Cn = (i) => {
4251
- const e = Array.from(i.querySelectorAll("tr")), t = {};
4252
- let r = 0;
4253
- const n = {};
4254
- Array.from(e[0].querySelectorAll("th, td")).forEach((l) => {
4255
- const { colspan: f } = Rt(l);
4256
- r += f;
4257
- });
4258
- for (let l = 0; l < r; l++)
4259
- n[l] = null;
4260
- for (let l = 0; l < e.length; l++)
4261
- t[l] = Object.assign({}, n);
4262
- const a = {};
4263
- e.forEach((l, f) => {
4264
- const m = [];
4265
- Object.values(t[f]).forEach((d, p) => {
4266
- d === null && m.push(p);
4267
- });
4268
- const v = Array.from(l.querySelectorAll("th, td"));
4269
- let b = 0;
4270
- v.forEach((d) => {
4271
- const { content: p, rowspan: u, colspan: h } = Rt(d), g = m.slice(b, b + h).reverse();
4272
- let y = 0;
4273
- if (g.map((A, S) => {
4274
- S === g.length - 1 ? y = A : delete t[f][A];
4275
- }), u > 1 && h < 2)
4276
- for (let A = 1; A < u; A++)
4277
- d.tagName === "TH" ? t[f + A][y] = Mt(void 0, "continue") : d.tagName === "TD" && (t[f + A][y] = Nt(void 0, "continue"));
4278
- else if (u > 1 && h > 1)
4279
- for (let A = 1; A < u; A++)
4280
- a[f + A] = [], g.map((S, R) => {
4281
- R === g.length - 1 ? d.tagName === "TH" ? t[f + A][S] = Mt(void 0, "continue", h) : d.tagName === "TD" && (t[f + A][S] = Nt(void 0, "continue", h)) : (a[A].push(S), t[f + A][S] = void 0);
4282
- });
4283
- d.tagName === "TH" ? t[f][y] = Mt(p, u > 1 ? "restart" : void 0, h > 1 ? h : void 0) : d.tagName === "TD" && (t[f][y] = Nt(p, u > 1 ? "restart" : void 0, h > 1 ? h : void 0)), b += h;
4251
+ const e = Array.from(i.querySelectorAll("tr"));
4252
+ if (e && e.length > 0) {
4253
+ const t = {};
4254
+ let r = 0;
4255
+ const n = {}, s = Array.from(e[0].querySelectorAll("th, td"));
4256
+ s && s.length > 0 && s.forEach((l) => {
4257
+ const { colspan: f } = Rt(l);
4258
+ r += f;
4284
4259
  });
4285
- }), Object.entries(a).map(([l, f]) => {
4286
- f.map((m) => {
4287
- delete t[+l][m];
4260
+ for (let l = 0; l < r; l++)
4261
+ n[l] = null;
4262
+ for (let l = 0; l < e.length; l++)
4263
+ t[l] = Object.assign({}, n);
4264
+ const a = {};
4265
+ e.forEach((l, f) => {
4266
+ const m = [];
4267
+ Object.values(t[f]).forEach((d, p) => {
4268
+ d === null && m.push(p);
4269
+ });
4270
+ const v = Array.from(l.querySelectorAll("th, td"));
4271
+ let b = 0;
4272
+ v && v.length > 0 && v.forEach((d) => {
4273
+ const { content: p, rowspan: u, colspan: h } = Rt(d), g = m.slice(b, b + h).reverse();
4274
+ let y = 0;
4275
+ if (g.map((A, S) => {
4276
+ S === g.length - 1 ? y = A : delete t[f][A];
4277
+ }), u > 1 && h < 2)
4278
+ for (let A = 1; A < u; A++)
4279
+ d.tagName === "TH" ? t[f + A][y] = Mt(void 0, "continue") : d.tagName === "TD" && (t[f + A][y] = Nt(void 0, "continue"));
4280
+ else if (u > 1 && h > 1)
4281
+ for (let A = 1; A < u; A++)
4282
+ a[f + A] = [], g.map((S, R) => {
4283
+ R === g.length - 1 ? d.tagName === "TH" ? t[f + A][S] = Mt(void 0, "continue", h) : d.tagName === "TD" && (t[f + A][S] = Nt(void 0, "continue", h)) : (a[A].push(S), t[f + A][S] = void 0);
4284
+ });
4285
+ d.tagName === "TH" ? t[f][y] = Mt(p, u > 1 ? "restart" : void 0, h > 1 ? h : void 0) : d.tagName === "TD" && (t[f][y] = Nt(p, u > 1 ? "restart" : void 0, h > 1 ? h : void 0)), b += h;
4286
+ });
4287
+ }), Object.entries(a).map(([l, f]) => {
4288
+ f.map((m) => {
4289
+ delete t[+l][m];
4290
+ });
4288
4291
  });
4289
- });
4290
- const o = [];
4291
- return Object.values(t).forEach((l) => {
4292
- o.push(Zr(Object.values(l).join("")));
4293
- }), o.join("");
4292
+ const o = [];
4293
+ return Object.values(t).forEach((l) => {
4294
+ o.push(Zr(Object.values(l).join("")));
4295
+ }), o.join("");
4296
+ } else
4297
+ return "";
4294
4298
  }, Xt = (i, e) => {
4295
4299
  const t = i.querySelector("thead"), r = i.querySelector("tbody");
4296
4300
  let n = "", s = "";
@@ -7297,7 +7301,7 @@ function oi(i) {
7297
7301
  const t = document.createElement("div");
7298
7302
  t.innerHTML = i;
7299
7303
  const r = Array.from(t.querySelectorAll("h1, h2, h3, h4, h5, h6, p, span, br, table"));
7300
- if (r) {
7304
+ if (r && r.length > 0) {
7301
7305
  const n = document.createElement("div");
7302
7306
  r.forEach((s) => {
7303
7307
  n.appendChild(s);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fui-material",
3
- "version": "1.18.5",
3
+ "version": "1.18.6",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org/"