react-semaphor 0.1.540 → 0.1.542

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 (118) hide show
  1. package/dist/analytics-protocol/index.js +75 -75
  2. package/dist/assistant-context/index.js +1 -1
  3. package/dist/brand-studio/index.js +3 -3
  4. package/dist/briefings/index.js +50 -45
  5. package/dist/chunks/apply-dashboard-operations-Btbp2-6v.js +2260 -0
  6. package/dist/chunks/{assistant-chat-ya7xopaC.js → assistant-chat-oHF5lTjA.js} +12 -12
  7. package/dist/chunks/bookmark-state-CXw7lZ50.js +118 -0
  8. package/dist/chunks/{calendar-day-equality-Bpl15IBo.js → calendar-day-equality-BmJAWduY.js} +180 -207
  9. package/dist/chunks/comparison-window-caption-ChIyd_-L.js +1618 -0
  10. package/dist/chunks/custom-visual-inputs-DUtpYZOk.js +323 -0
  11. package/dist/chunks/{dashboard-briefing-launcher-DJI-zfEq.js → dashboard-briefing-launcher-B-cm719R.js} +18 -18
  12. package/dist/chunks/{dashboard-controls-Dh7HqoKy.js → dashboard-controls-CIn22Qgp.js} +69 -70
  13. package/dist/chunks/{dashboard-filter-value-compatibility-D95O4nd7.js → dashboard-filter-value-compatibility-CwQ_iSNb.js} +2 -2
  14. package/dist/chunks/{dashboard-json-BnmlB71h.js → dashboard-json-ZUYsIExq.js} +4 -4
  15. package/dist/chunks/{dashboard-B6Bithfl.js → dashboard-s5WJBcK8.js} +1 -1
  16. package/dist/chunks/{document-dashboard-inputs-BrYYlRVo.js → document-dashboard-inputs-C6MJVyoI.js} +2357 -4948
  17. package/dist/chunks/document-sheet-utils-BsZUnHRl.js +3619 -0
  18. package/dist/chunks/{edit-dashboard-visual-CydOkSko.js → edit-dashboard-visual-DLdereA7.js} +728 -728
  19. package/dist/chunks/{filter-value-text-BhWugPWE.js → filter-value-text-CYsVYPuD.js} +18 -19
  20. package/dist/chunks/index-CV5rHq5D.js +2673 -0
  21. package/dist/chunks/{matrix-analytical-definition-bcprSe4u.js → matrix-analytical-definition-C7Gb0e12.js} +1 -1
  22. package/dist/chunks/{matrix-card-CJn1hB5V.js → matrix-card-DjwWcCo8.js} +2 -2
  23. package/dist/chunks/{matrix-formatter-DQ8avoIQ.js → matrix-formatter-BnsTX90d.js} +430 -417
  24. package/dist/chunks/{matrix-member-presentation-BNPSDKBG.js → matrix-member-presentation-CQGdVks6.js} +1 -1
  25. package/dist/chunks/{matrix-operation-contract-B8PBF1Gd.js → matrix-operation-contract-8OIO4gob.js} +65 -65
  26. package/dist/chunks/metric-comparison-DEwi9uc2.js +498 -0
  27. package/dist/chunks/numeric-presentation-BSAqPpHt.js +5227 -0
  28. package/dist/chunks/{pivot-header-presentation-MkcKnjn3.js → pivot-header-presentation-DHcx1XGQ.js} +1 -1
  29. package/dist/chunks/{pivot-result-identity-D6hhcRXi.js → pivot-result-identity-DJhXXcns.js} +1 -1
  30. package/dist/chunks/pivot-result-lifecycle-BBlAfBA0.js +1155 -0
  31. package/dist/chunks/raw-temporal-presentation-CZ2r0Vb_.js +585 -0
  32. package/dist/chunks/{report-preferences-dialog-neMDolLg.js → report-preferences-dialog-MRUWpMcJ.js} +75 -75
  33. package/dist/chunks/{report-runtime-context-B984Nq1E.js → report-runtime-context-Dq8XyODK.js} +1 -1
  34. package/dist/chunks/{saved-dashboard-context-CCrLpfSQ.js → saved-dashboard-context-DjPqgFly.js} +233 -206
  35. package/dist/chunks/{selection-reducer-vKIb_jS6.js → selection-reducer-Dj_8xD69.js} +1 -1
  36. package/dist/chunks/{semaphor-ready-indicator--4DWtVBu.js → semaphor-ready-indicator-BWSpRsPj.js} +38555 -40449
  37. package/dist/chunks/{shelf-drop-preview-context-CpdB5ois.js → shelf-drop-preview-context-CQbFLm3q.js} +6 -6
  38. package/dist/chunks/sort-target-MT1WK1vX.js +29 -0
  39. package/dist/chunks/{source-entity-resolution-CVA1a85c.js → source-entity-resolution-BYn9giz3.js} +1 -1
  40. package/dist/chunks/{switch-DWEWiv1J.js → switch-C3jLxlG0.js} +2 -2
  41. package/dist/chunks/table-export-sheet-BHSnuZHd.js +949 -0
  42. package/dist/chunks/table-settings-CLZocegs.js +501 -0
  43. package/dist/chunks/temporal-bucket-D7NBrrtL.js +2071 -0
  44. package/dist/chunks/{token-types-bxUxXDX2.js → token-types-DBbZVQsm.js} +1 -1
  45. package/dist/chunks/{use-create-flow-overlay-state-8g6Zhphh.js → use-create-flow-overlay-state-BJDNqdOh.js} +151 -151
  46. package/dist/chunks/{validators-Ej1DdCXa.js → validators-DMHTpf7a.js} +73 -73
  47. package/dist/dashboard/index.js +2 -2
  48. package/dist/dashboard-authoring/index.js +399 -380
  49. package/dist/data-app-sdk/index.js +5 -5
  50. package/dist/data-app-sdk-adapters/index.js +2 -2
  51. package/dist/data-app-sdk-validation/index.js +9 -9
  52. package/dist/format-utils/index.js +346 -238
  53. package/dist/index.js +174 -175
  54. package/dist/pdf-export-policy/index.js +20 -10
  55. package/dist/report-runtime-context/index.js +1 -1
  56. package/dist/surfboard/index.js +2 -2
  57. package/dist/types/briefings/attachment-outcomes.d.ts +23 -0
  58. package/dist/types/briefings/attachments.d.ts +17 -1
  59. package/dist/types/briefings/index.d.ts +6 -3
  60. package/dist/types/index.js +48 -48
  61. package/dist/types/lib/api/exports-api.d.ts +11 -65
  62. package/dist/types/lib/dashboard-inputs/control-contract-overrides.d.ts +17 -0
  63. package/dist/types/lib/dashboard-viewer/export-table-view.d.ts +2 -0
  64. package/dist/types/lib/hooks/use-dashboard-card.d.ts +2 -0
  65. package/dist/types/lib/hooks/use-dashboard.d.ts +3 -6
  66. package/dist/types/lib/matrix-table/matrix-delivery-policy.d.ts +8 -2
  67. package/dist/types/lib/matrix-table/matrix-delivery.d.ts +8 -6
  68. package/dist/types/lib/query-context/build-dashboard-card-query-contract.d.ts +50 -0
  69. package/dist/types/lib/query-context/card-server-request.d.ts +5 -1
  70. package/dist/types/lib/types/common-types.d.ts +7 -0
  71. package/dist/types/lib/types/explorer-types.d.ts +8 -2
  72. package/dist/types/shared/analytics-protocol/matrix-definition-contract.d.ts +3 -3
  73. package/dist/types/shared/assistant-context/index.d.ts +1 -1
  74. package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +23 -6
  75. package/dist/types/shared/dashboard-authoring/card-export-request.d.ts +173 -0
  76. package/dist/types/shared/dashboard-authoring/card-query-request.d.ts +20 -0
  77. package/dist/types/shared/dashboard-authoring/index.d.ts +1 -0
  78. package/dist/types/shared/dashboard-authoring/matrix-delivery.d.ts +4 -3
  79. package/dist/types/shared/format-utils/attachment-filter-line.d.ts +14 -0
  80. package/dist/types/shared/format-utils/exporters/export-cells.d.ts +90 -0
  81. package/dist/types/shared/format-utils/exporters/export-file-format.d.ts +44 -0
  82. package/dist/types/shared/format-utils/exporters/index.d.ts +6 -0
  83. package/dist/types/shared/format-utils/exporters/xlsx-file.d.ts +90 -0
  84. package/dist/types/shared/format-utils/filter-line.d.ts +7 -0
  85. package/dist/types/shared/format-utils/formatters/date-formatter.d.ts +8 -12
  86. package/dist/types/shared/format-utils/formatters/index.d.ts +1 -1
  87. package/dist/types/shared/format-utils/formatters/matrix-formatter.d.ts +2 -0
  88. package/dist/types/shared/format-utils/index.d.ts +3 -0
  89. package/dist/types/shared/format-utils/matrix-continuation.d.ts +55 -9
  90. package/dist/types/shared/format-utils/matrix-export-presentation.d.ts +21 -1
  91. package/dist/types/shared/format-utils/matrix-export-xlsx.d.ts +27 -0
  92. package/dist/types/shared/format-utils/pdf-export-policy.d.ts +9 -0
  93. package/dist/types/shared/format-utils/presentation-execution.d.ts +27 -2
  94. package/dist/types/shared/format-utils/raw-temporal.d.ts +8 -0
  95. package/dist/types/shared/format-utils/table-export/index.d.ts +8 -0
  96. package/dist/types/shared/format-utils/table-export/prepare-table-export.d.ts +50 -0
  97. package/dist/types/shared/format-utils/table-export/table-export-formatting.d.ts +47 -0
  98. package/dist/types/shared/format-utils/table-export/table-export-raw-temporal.d.ts +40 -0
  99. package/dist/types/shared/format-utils/table-export/table-export-result.d.ts +31 -0
  100. package/dist/types/shared/format-utils/table-export/table-export-sheet.d.ts +38 -0
  101. package/dist/types/shared/format-utils/temporal-bucket.d.ts +9 -0
  102. package/package.json +2 -1
  103. package/dist/chunks/aggregate-table-row-presentation-BjK9YfMI.js +0 -979
  104. package/dist/chunks/apply-dashboard-operations-C-iahGka.js +0 -402
  105. package/dist/chunks/bookmark-state-k7y5SNGf.js +0 -331
  106. package/dist/chunks/calculated-field-identity-DcBS2NPP.js +0 -2161
  107. package/dist/chunks/canonical-result-keys-CEQefvdO.js +0 -33
  108. package/dist/chunks/common-types-CUf03Htv.js +0 -288
  109. package/dist/chunks/csv-utils-GUfKyT1J.js +0 -56
  110. package/dist/chunks/custom-visual-inputs-BrUOIwln.js +0 -3288
  111. package/dist/chunks/document-sheet-utils-C1eEldxs.js +0 -1076
  112. package/dist/chunks/index-CqMiAkay.js +0 -3164
  113. package/dist/chunks/matrix-definition-DQDI2okF.js +0 -206
  114. package/dist/chunks/metric-comparison-CojWeLqx.js +0 -392
  115. package/dist/chunks/pivot-result-lifecycle-8qCDmpKc.js +0 -804
  116. package/dist/chunks/raw-temporal-D61lr48Y.js +0 -1464
  117. package/dist/chunks/temporal-bucket-D8JF7zKz.js +0 -575
  118. package/dist/chunks/temporal-bucket-contract-DaOajRC7.js +0 -108
@@ -1,33 +0,0 @@
1
- const o = "SEMAPHOR_CALCULATED_FIELD";
2
- function c(a, e, r) {
3
- if (r && (e === "groupby" || e === "pivotby"))
4
- return r;
5
- if (e === "metric" && a.name === "*" && !a.expression)
6
- return a.alias || "count";
7
- if (a.alias) return a.alias;
8
- const t = a.entityName && a.entityName !== o ? a.entityName : void 0;
9
- if (a.role === "metric") {
10
- let n = a.aggregate || "metric";
11
- if (a.expression) {
12
- const s = a.expression.match(
13
- /^(COUNT|SUM|AVG|MIN|MAX|MEDIAN|DISTINCT)\s*\(/i
14
- );
15
- n = s ? s[1].toLowerCase() : "expr";
16
- } else
17
- n = n.toLowerCase();
18
- return t && t !== a.name ? `${t}_${a.name}_${n}` : `${a.name}_${n}`;
19
- }
20
- return t && t !== a.name ? `${t}_${a.name}` : a.name;
21
- }
22
- function m(a) {
23
- return c(a, "detail");
24
- }
25
- function u(a) {
26
- const e = a.label;
27
- return e && a.labelCount === 1 && (e === a.rawKey || !a.rawKeys.has(e)) ? e : a.rawKey;
28
- }
29
- export {
30
- m as a,
31
- u as b,
32
- c as r
33
- };
@@ -1,288 +0,0 @@
1
- import { k as _ } from "./validators-Ej1DdCXa.js";
2
- const S = 8, v = 6, p = Object.freeze([]);
3
- function w(e) {
4
- switch (e.type) {
5
- case "table":
6
- case "chart":
7
- return e.card ? [e.card] : p;
8
- case "kpi":
9
- return Array.isArray(e.cards) ? e.cards : p;
10
- default:
11
- return p;
12
- }
13
- }
14
- function $(e, t) {
15
- switch (e.type) {
16
- case "table":
17
- case "chart": {
18
- if (!e.card) return e;
19
- const a = t(e.card);
20
- return a === e.card ? e : { ...e, card: a };
21
- }
22
- case "kpi": {
23
- if (!Array.isArray(e.cards)) return e;
24
- const a = e.cards.map(t);
25
- return a.every((i, s) => i === e.cards[s]) ? e : { ...e, cards: a };
26
- }
27
- default:
28
- return e;
29
- }
30
- }
31
- function K(e) {
32
- var a;
33
- const t = [];
34
- for (const i of e.sheets || []) {
35
- const s = i.id;
36
- for (const n of i.cards || [])
37
- t.push({ kind: "sheetCard", sheetId: s, cardId: n.id, card: n });
38
- for (const n of i.frames || [])
39
- for (const r of n.cards || [])
40
- t.push({
41
- kind: "frameCard",
42
- sheetId: s,
43
- frameId: n.id,
44
- cardId: r.id,
45
- card: r
46
- });
47
- for (const n of ((a = i.document) == null ? void 0 : a.sections) || [])
48
- for (const r of w(n))
49
- t.push({
50
- kind: "documentSectionCard",
51
- sheetId: s,
52
- sectionId: n.id,
53
- cardId: r.id,
54
- card: r
55
- });
56
- }
57
- return t;
58
- }
59
- function y(e) {
60
- return !!e && typeof e == "object" && !Array.isArray(e);
61
- }
62
- function L(e) {
63
- if (!y(e))
64
- return [{ path: "", message: "must be an object." }];
65
- const t = [];
66
- e.title !== void 0 && typeof e.title != "string" && t.push({ path: "title", message: "must be a string." });
67
- const a = e.cards;
68
- if (!Array.isArray(a))
69
- t.push({ path: "cards", message: "must be an array of KPI cards." });
70
- else {
71
- (a.length < 1 || a.length > S) && t.push({
72
- path: "cards",
73
- message: `must hold 1 to ${S} KPI cards.`
74
- });
75
- const s = /* @__PURE__ */ new Set();
76
- a.forEach((n, r) => {
77
- if (!y(n)) {
78
- t.push({ path: `cards[${r}]`, message: "must be a card." });
79
- return;
80
- }
81
- typeof n.id != "string" || !n.id ? t.push({
82
- path: `cards[${r}].id`,
83
- message: "must be a non-empty string."
84
- }) : s.has(n.id) ? t.push({
85
- path: `cards[${r}].id`,
86
- message: `duplicates card id '${n.id}'.`
87
- }) : s.add(n.id), n.type !== "kpi" && t.push({ path: `cards[${r}].type`, message: "must be 'kpi'." });
88
- });
89
- }
90
- const i = e.kpi;
91
- return y(i) ? (i.layout !== "tiles" && i.layout !== "lines" ? t.push({
92
- path: "kpi.layout",
93
- message: "must be 'tiles' or 'lines'."
94
- }) : i.layout === "tiles" && Array.isArray(a) && a.length > v && t.push({
95
- path: "kpi.layout",
96
- message: `must be 'lines' for more than ${v} KPI cards.`
97
- }), i.columns !== void 0 && i.columns !== 1 && i.columns !== 2 && t.push({ path: "kpi.columns", message: "must be 1 or 2." })) : t.push({ path: "kpi", message: "must be an object." }), t;
98
- }
99
- const f = {
100
- includeMetricFilterDatasets: !0,
101
- preferQualifiedIdentity: !1
102
- };
103
- function k(e) {
104
- if (!e) return;
105
- if (e.kind === "semantic")
106
- return { entityName: e.datasetName, entityId: e.datasetId, label: e.label };
107
- const t = [e.databaseName, e.schemaName, e.tableName].filter((a) => !!(a && a.trim())).join(".");
108
- return {
109
- entityName: e.tableName,
110
- qualifiedEntityName: t.includes(".") ? t : void 0,
111
- label: e.label
112
- };
113
- }
114
- function C(e) {
115
- var a;
116
- const t = k(e.source);
117
- return t ? `${(a = e.source) == null ? void 0 : a.kind}:${t.qualifiedEntityName || t.entityName}` : "";
118
- }
119
- function O(e) {
120
- return [
121
- e.id,
122
- e.qualifiedEntityName,
123
- e.entityId,
124
- e.entityName,
125
- e.qualifiedFieldName,
126
- e.name,
127
- // Source-only fields from different datasets can otherwise share a key
128
- // and the second dataset would be silently dropped.
129
- C(e)
130
- ].join("|");
131
- }
132
- function q(e) {
133
- return [e.entityName, e.qualifiedEntityName || "", e.entityId || ""].join("|");
134
- }
135
- function P(e) {
136
- return e.entityName || e.qualifiedEntityName || "";
137
- }
138
- function T(e) {
139
- var t, a;
140
- return !!(e.expression || e.derivedField || (a = (t = e.calculatedFormula) == null ? void 0 : t.inputFields) != null && a.length);
141
- }
142
- function j(e) {
143
- return _(e) ? !0 : e.entityName || e.qualifiedEntityName ? !1 : !e.source || T(e);
144
- }
145
- function h(e, t) {
146
- const a = q(t);
147
- e.found.has(a) || e.found.set(a, t);
148
- }
149
- function l(e, t) {
150
- var I, b, F;
151
- if (!e) return;
152
- const a = O(e);
153
- if (t.visitedFields.has(a)) return;
154
- t.visitedFields.add(a);
155
- const i = j(e);
156
- if (!i) {
157
- const d = !e.entityName && !e.qualifiedEntityName ? k(e.source) : void 0;
158
- h(
159
- t,
160
- d || {
161
- // May be empty for qualified-only metadata; identity then comes from
162
- // `qualifiedEntityName` (see `identityFor` and the calculator).
163
- entityName: e.entityName || "",
164
- entityId: e.entityId,
165
- qualifiedEntityName: e.qualifiedEntityName,
166
- label: e.source && e.source.kind === "semantic" ? e.source.label : void 0
167
- }
168
- );
169
- }
170
- t.includeMetricFilterDatasets && "parameters" in e && ((I = e.parameters) != null && I.filters) && N(e.parameters.filters, t);
171
- const s = (b = e.calculatedFormula) == null ? void 0 : b.inputFields, n = !!(s && s.length > 0);
172
- n && s.forEach((d) => l(d, t));
173
- let r = !1, c = !1;
174
- const u = n || (F = e.derivedField) == null ? void 0 : F.inputs;
175
- if (u && Object.keys(u).length > 0)
176
- for (const d of Object.values(u)) {
177
- const o = d.field.source;
178
- if (!o) {
179
- n || (c = !0);
180
- continue;
181
- }
182
- if (o.kind === "sql") {
183
- c = !0;
184
- continue;
185
- }
186
- if (o.kind === "semantic")
187
- h(t, {
188
- entityName: o.datasetName,
189
- entityId: o.datasetId,
190
- label: o.label
191
- });
192
- else {
193
- const g = [o.databaseName, o.schemaName, o.tableName].filter((D) => !!(D && D.trim())).join(".");
194
- h(t, {
195
- entityName: o.tableName,
196
- qualifiedEntityName: g.includes(".") ? g : void 0,
197
- label: o.label
198
- });
199
- }
200
- r = !0;
201
- }
202
- c && (t.complete = !1), i && !n && !r && (t.complete = !1);
203
- }
204
- function N(e, t) {
205
- if (e && !t.visitedGroups.has(e.id)) {
206
- t.visitedGroups.add(e.id);
207
- for (const a of e.conditions || [])
208
- l(a.field, t);
209
- for (const a of e.groups || [])
210
- N(a, t);
211
- }
212
- }
213
- function m(e, t = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set()) {
214
- return {
215
- found: /* @__PURE__ */ new Map(),
216
- complete: !0,
217
- visitedFields: t,
218
- visitedGroups: a,
219
- includeMetricFilterDatasets: e
220
- };
221
- }
222
- function E(e, t) {
223
- var i;
224
- const a = (i = e.qualifiedEntityName) != null && i.includes(".") ? e.qualifiedEntityName : void 0;
225
- return t === "qualifiedOnly" ? a : t === "preferQualified" ? a || e.entityName || void 0 : e.entityName || void 0;
226
- }
227
- function Q(e) {
228
- const t = m(!1);
229
- return l(e, t), { datasets: Array.from(t.found.values()), complete: t.complete };
230
- }
231
- function A(e, t, a = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), s = f) {
232
- const n = { ...f, ...s }, r = m(n.includeMetricFilterDatasets, a, i);
233
- l(e, r), r.found.forEach((c) => {
234
- const u = E(c, n.preferQualifiedIdentity ? "preferQualified" : "name");
235
- u && t.add(u);
236
- });
237
- }
238
- function R(e, t) {
239
- A(e, t, /* @__PURE__ */ new Set(), /* @__PURE__ */ new Set(), {
240
- preferQualifiedIdentity: !0
241
- });
242
- }
243
- function U(e, t, a = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set()) {
244
- const s = m(!0, a, i);
245
- l(e, s), s.found.forEach((n) => {
246
- const r = E(n, "qualifiedOnly");
247
- r && t.add(r);
248
- });
249
- }
250
- function x(e, t, a = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set()) {
251
- A(e, t, a, i, {
252
- includeMetricFilterDatasets: !1
253
- });
254
- }
255
- function B(e, t, a = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), s = f) {
256
- const n = { ...f, ...s }, r = m(n.includeMetricFilterDatasets, a, i);
257
- N(e, r), r.found.forEach((c) => {
258
- const u = E(c, n.preferQualifiedIdentity ? "preferQualified" : "name");
259
- u && t.add(u);
260
- });
261
- }
262
- function G(e, t) {
263
- return t != null && t[e] ? t[e] : (e.includes(".") ? e.slice(e.lastIndexOf(".") + 1) : e).replace(/[_-]+/g, " ").replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\s+/g, " ").trim().replace(/\b\w/g, (i) => i.toUpperCase());
264
- }
265
- const z = {
266
- database: null,
267
- schema: null,
268
- table: null
269
- }, V = "__card_default__";
270
- export {
271
- V as C,
272
- S as D,
273
- z as E,
274
- P as a,
275
- R as b,
276
- A as c,
277
- k as d,
278
- U as e,
279
- x as f,
280
- B as g,
281
- G as h,
282
- v as i,
283
- w as j,
284
- L as k,
285
- K as l,
286
- $ as m,
287
- Q as r
288
- };
@@ -1,56 +0,0 @@
1
- const c = ["utf-8-bom", "utf-8"], o = "utf-8-bom", i = [",", ";", " "], f = `\r
2
- `, g = "text/csv; charset=utf-8";
3
- function m(n) {
4
- return n == null || typeof n == "string" || typeof n == "number" ? n : typeof n == "object" ? JSON.stringify(n) : String(n);
5
- }
6
- const d = "\uFEFF";
7
- function e(n) {
8
- return c.find((r) => r === n);
9
- }
10
- function p(n) {
11
- return i.find((r) => r === n);
12
- }
13
- function R(n) {
14
- return e(n.requested) ?? e(n.dashboardDefault) ?? o;
15
- }
16
- function a(n) {
17
- return n === "utf-8-bom" ? d : "";
18
- }
19
- function _(n) {
20
- const r = n.trimStart().charAt(0);
21
- return ["=", "+", "-", "@"].includes(r) || [" ", "\r", `
22
- `].includes(n.charAt(0)) ? `'${n}` : n;
23
- }
24
- function u(n, r = ",") {
25
- if (n == null)
26
- return "";
27
- const t = String(n);
28
- return t.includes(r) || t.includes('"') || t.includes(`
29
- `) || t.includes("\r") ? `"${t.replace(/"/g, '""')}"` : t;
30
- }
31
- function s(n, r) {
32
- return n.map((t) => u(t, r)).join(r) + f;
33
- }
34
- function C(n, r) {
35
- return n.map((t) => s(t, r)).join("");
36
- }
37
- function l(n) {
38
- return a(n.encoding) + (n.header ? s(n.header, n.delimiter) : "") + C(n.rows, n.delimiter);
39
- }
40
- export {
41
- c as C,
42
- o as D,
43
- i as a,
44
- f as b,
45
- s as c,
46
- g as d,
47
- p as e,
48
- a as f,
49
- u as g,
50
- _ as h,
51
- C as i,
52
- l as j,
53
- e as p,
54
- R as r,
55
- m as t
56
- };