@fleox-agent-crm/agentcrm 0.3.0 → 0.3.2
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/README.md +16 -16
- package/changelog.json +30 -0
- package/dist/admin/admin-files.json +8 -8
- package/dist/admin/assets/{chartsImpl-CE2akJat.js → chartsImpl-qlHW3VOv.js} +30 -30
- package/dist/admin/assets/firebase-U38f5kc9.js +2 -0
- package/dist/admin/assets/{gitJson-BulGh2KV.js → gitJson-wy2Tytfd.js} +1 -1
- package/dist/admin/assets/{index-DidVVK7L.js → index-BpaxrJx9.js} +265 -265
- package/dist/admin/assets/{index-hMXwHSvN.css → index-TcjySLVg.css} +1 -1
- package/dist/admin/assets/{lucide-react.min-DEDlHCPj.js → lucide-react.min-Djrg16BH.js} +1 -1
- package/dist/admin/assets/{sdk-CnrLnlRo.js → sdk-mu08RFtk.js} +1 -1
- package/dist/admin/index.html +2 -2
- package/dist/agent/agentcrm.mjs +334 -151
- package/dist/agent/chunks/{api-B6OqNVWp.mjs → api-Cz0Ubj-B.mjs} +4 -3
- package/dist/agent/chunks/api-Dwb4xz1k.mjs +27 -0
- package/dist/agent/chunks/{appearance-BaShelzt.mjs → appearance-BloHbiLA.mjs} +1 -1
- package/dist/agent/chunks/{automations-BWrvLqP6.mjs → automations-DwWruxmu.mjs} +3 -3
- package/dist/agent/chunks/{backup-ClSmxmFZ.mjs → backup-W3CjgkAJ.mjs} +16 -3
- package/dist/agent/chunks/{compact-CsFPaAAq.mjs → compact-BGHI92tm.mjs} +2 -2
- package/dist/agent/chunks/{exportCsv-B5hRvkNm.mjs → exportCsv-C6e6XEmB.mjs} +38 -3
- package/dist/agent/chunks/{extCheck--7lmVvl7.mjs → extCheck-GgHG1dYB.mjs} +16 -9
- package/dist/agent/chunks/{extPackage-BGl5Oqs8.mjs → extPackage-DuZ6GZhp.mjs} +2 -2
- package/dist/agent/chunks/{extScaffold-DqxI7R1e.mjs → extScaffold-Aqyjf1nr.mjs} +3 -3
- package/dist/agent/chunks/{extensions-BP1k60md.mjs → extensions-Bp72uZ9a.mjs} +19 -6
- package/dist/agent/chunks/{featureRegistry-C9nbVShp.mjs → featureRegistry-DSsZbhrh.mjs} +3 -3
- package/dist/agent/chunks/{files-q8Xu5bft.mjs → files-D1daDgY0.mjs} +1 -1
- package/dist/agent/chunks/{firebase-DxGVQV9E.mjs → firebase-BciZWdc6.mjs} +41 -17
- package/dist/agent/chunks/{forms-BKU5F9WF.mjs → forms-BfuWaQjA.mjs} +1 -1
- package/dist/agent/chunks/{hosting-Bme7LxPc.mjs → hosting-Dnn1k3cV.mjs} +1 -1
- package/dist/agent/chunks/{importCsv-DmE_sBch.mjs → importCsv-LVmMTaWU.mjs} +2 -2
- package/dist/agent/chunks/{index-DUSdTBkz.mjs → index-CNXq2Yk_.mjs} +1 -24
- package/dist/agent/chunks/index-Dio0aBWA.mjs +6920 -0
- package/dist/agent/chunks/{index-CRkw3_iF.mjs → index-rut-KC39.mjs} +1 -1
- package/dist/agent/chunks/{install-CpHoUFtL.mjs → install-BBTA4nMm.mjs} +16 -7
- package/dist/agent/chunks/{loader-C9nm3iwx.mjs → loader-MPD9iAvh.mjs} +20 -20
- package/dist/agent/chunks/{modules-CqdVQVJb.mjs → modules-clWdE-K2.mjs} +27 -2
- package/dist/agent/chunks/{nodeImport-BPCt5uMu.mjs → nodeImport-ylfRDvqt.mjs} +2 -2
- package/dist/agent/chunks/{package-DWbn3t2R.mjs → package-B7mI6HGi.mjs} +1 -1
- package/dist/agent/chunks/{papaparse-DjBYnQM2.mjs → papaparse-Df7i1dHr.mjs} +31 -7
- package/dist/agent/chunks/{pipelines-DCdRBNBV.mjs → pipelines-BAKpPk1w.mjs} +1 -1
- package/dist/agent/chunks/{plan-C0TBrU92.mjs → plan-BmTat6-T.mjs} +1 -1
- package/dist/agent/chunks/{records-DoqiT9xR.mjs → records-DcHFelq5.mjs} +5 -1
- package/dist/agent/chunks/{registry-Ceexawxl.mjs → registry-COfJrSmg.mjs} +18 -18
- package/dist/agent/chunks/{reports-BB59N6ke.mjs → reports-BACHGccj.mjs} +3 -3
- package/dist/agent/chunks/{runtime-DHo7ZEEO.mjs → runtime-C0Xf0Axi.mjs} +53 -32
- package/dist/agent/chunks/{schema-DlHt2PxI.mjs → schema-C4lSslXv.mjs} +10 -4
- package/dist/agent/chunks/{schema-7-4-qtSS.mjs → schema-DnLj8dUO.mjs} +10 -0
- package/dist/agent/chunks/{sdk-whvfg786.mjs → sdk-CYgNyuoK.mjs} +132 -7005
- package/dist/agent/chunks/{seed-CugPGYZL.mjs → seed-6MRmQQBR.mjs} +26 -8
- package/dist/agent/chunks/{server-ISwlDRCN.mjs → server-DC3t8r30.mjs} +5 -5
- package/dist/agent/chunks/{settings-BtvR_jdm.mjs → settings-Di8nzNEL.mjs} +35 -0
- package/dist/agent/chunks/{stats-CfeJssSS.mjs → stats-BfuLWhVV.mjs} +2 -2
- package/dist/agent/chunks/{tools-Bew8lxKx.mjs → tools-iSH-yMpl.mjs} +59 -19
- package/dist/agent/chunks/{views-fO_BM5U_.mjs → views-DH1n9Lrt.mjs} +1 -1
- package/dist/version.json +1 -1
- package/package.json +1 -1
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/skills/agentcrm-admin/SKILL.md +67 -67
- package/plugin/skills/agentcrm-admin/references/appearance.md +1 -1
- package/plugin/skills/agentcrm-admin/references/records.md +5 -5
- package/plugin/skills/agentcrm-admin/references/schema.md +20 -20
- package/plugin/skills/agentcrm-extensions/SKILL.md +9 -9
- package/plugin/skills/agentcrm-extensions/references/module-recipes.md +2 -2
- package/plugin/skills/agentcrm-extensions/references/testing.md +16 -14
- package/plugin/skills/agentcrm-extensions/references/theme-recipes.md +3 -3
- package/plugin/skills/agentcrm-install/SKILL.md +13 -13
- package/plugin/skills/agentcrm-install/references/firebase.md +1 -1
- package/plugin/skills/agentcrm-install/references/github.md +1 -1
- package/plugin/skills/agentcrm-install/references/mcp.md +3 -3
- package/plugin/skills/agentcrm-install/references/plans.md +1 -1
- package/plugin/skills/agentcrm-install/references/s3.md +1 -1
- package/plugin/skills/agentcrm-manage/SKILL.md +15 -15
- package/plugin/skills/agentcrm-sales/SKILL.md +18 -18
- package/dist/admin/assets/firebase-BHSUggRo.js +0 -2
|
@@ -126,7 +126,7 @@ registerBackend("journal", (config, opts) => {
|
|
|
126
126
|
store.identity = async () => (await missingJournalAccess(cfg.connectorId, settings)).length ? null : identity();
|
|
127
127
|
return store;
|
|
128
128
|
});
|
|
129
|
-
registerBackend("firebase", async (config, opts) => (await import("./firebase-
|
|
129
|
+
registerBackend("firebase", async (config, opts) => (await import("./firebase-BciZWdc6.mjs")).createFirebaseStore(config, opts));
|
|
130
130
|
registerBackend("git-json", async (config, opts) => (await import("./gitJson-fjr8mcHe.mjs")).createGitJsonStore(config, opts));
|
|
131
131
|
async function createDataStore(config, opts = {}) {
|
|
132
132
|
const factory = getBackendFactory(config.backend);
|
|
@@ -8,8 +8,8 @@ import { generatePassphrase } from "./index-CWrrF1wl.mjs";
|
|
|
8
8
|
import { r as resolveGitPagesToken, c as createRemoteGitTransport } from "./s3-Dz50-NuA.mjs";
|
|
9
9
|
import { i as instantiateStorageConnector } from "./registry-DijAKZ24.mjs";
|
|
10
10
|
import { S as StorageError, s as subscribeToToasts } from "./http-Bk9ICb7I.mjs";
|
|
11
|
-
import { s as setCredential, h as openStore } from "../agentcrm.mjs";
|
|
12
|
-
import { adminOps, applyOps, buildConnector } from "./hosting-
|
|
11
|
+
import { s as setCredential, h as openStore, i as installBrowserEnv } from "../agentcrm.mjs";
|
|
12
|
+
import { adminOps, applyOps, buildConnector } from "./hosting-Dnn1k3cV.mjs";
|
|
13
13
|
import "./index-BM8qeGOb.mjs";
|
|
14
14
|
import "./runtimeConfig-CCOFg1RM.mjs";
|
|
15
15
|
import "./encoding-C9MzdP95.mjs";
|
|
@@ -124,14 +124,23 @@ async function checkPlan(plan) {
|
|
|
124
124
|
}
|
|
125
125
|
} catch (err) {
|
|
126
126
|
const e = err;
|
|
127
|
-
data = { ok: false, detail: e.name === "PassphraseError" ? `wrong passphrase in ${plan.passphraseAccount}` : e.message, existing:
|
|
127
|
+
data = { ok: false, detail: e.name === "PassphraseError" ? `wrong passphrase in ${plan.passphraseAccount}` : e.message, existing: e.name === "PassphraseError" };
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
} else if (plan.runtime.backend === "git-json") {
|
|
131
131
|
const access = await probeTarget({ connectorId: "git-pages", settings: { ...plan.runtime.git, ...plan.backendSecrets ?? {} } }, { requireSiteUrl: false, requirePrivate: true });
|
|
132
132
|
data = { ...access, existing: false };
|
|
133
|
+
} else if (plan.runtime.backend === "firebase") {
|
|
134
|
+
const runtime = plan.runtime;
|
|
135
|
+
try {
|
|
136
|
+
installBrowserEnv();
|
|
137
|
+
const { firebaseApiFor, checkFirebaseAccess } = await import("./firebase-BciZWdc6.mjs");
|
|
138
|
+
data = await checkFirebaseAccess(await firebaseApiFor(runtime), plan.backendSecrets, runtime.firebase.projectId ?? "");
|
|
139
|
+
} catch (err) {
|
|
140
|
+
data = { ok: false, detail: err.message, existing: false };
|
|
141
|
+
}
|
|
133
142
|
} else {
|
|
134
|
-
data = { ok: true, detail:
|
|
143
|
+
data = { ok: true, detail: "no data access to check", existing: false };
|
|
135
144
|
}
|
|
136
145
|
const hosting = plan.hostingTarget ? await probeTarget(plan.hostingTarget, { requireSiteUrl: plan.hostingTarget.connectorId !== "local-folder" }) : null;
|
|
137
146
|
return { data, hosting };
|
|
@@ -147,14 +156,14 @@ async function runInstall(plan, onStep) {
|
|
|
147
156
|
onStep(`Generated the dataset passphrase (stored as ${plan.passphraseAccount})`);
|
|
148
157
|
}
|
|
149
158
|
onStep("Opening the dataset");
|
|
150
|
-
const store = await openStore(plan.runtime, { dataTarget: plan.dataTarget, secrets: plan.backendSecrets, passphrase: plan.passphrase });
|
|
159
|
+
const store = await openStore(plan.runtime, { dataTarget: plan.dataTarget, secrets: plan.backendSecrets, passphrase: plan.passphrase, account: plan.credentials.data });
|
|
151
160
|
let seed;
|
|
152
161
|
try {
|
|
153
162
|
await store.ready();
|
|
154
163
|
const { createOpsContext } = await import("./context-CxFfqS4D.mjs");
|
|
155
164
|
const { createPluginRegistry } = await import("./pluginRegistry-DyHtlkcr.mjs");
|
|
156
|
-
const { seedCrm } = await import("./seed-
|
|
157
|
-
const { setConfigDoc } = await import("./settings-
|
|
165
|
+
const { seedCrm } = await import("./seed-6MRmQQBR.mjs");
|
|
166
|
+
const { setConfigDoc } = await import("./settings-Di8nzNEL.mjs");
|
|
158
167
|
const system = createOpsContext(store, null, { plugins: createPluginRegistry() });
|
|
159
168
|
onStep(`Seeding the CRM${plan.demo ? " (with demo data)" : ""}`);
|
|
160
169
|
const identity = plan.backend === "journal" ? null : await store.identity().catch(() => null);
|
|
@@ -4,25 +4,25 @@ import { dirname as __acrmDirname } from "node:path";
|
|
|
4
4
|
const require2 = __acrmRequire(import.meta.url);
|
|
5
5
|
const __filename = __acrmPath(import.meta.url);
|
|
6
6
|
const __dirname = __acrmDirname(__filename);
|
|
7
|
-
import {
|
|
8
|
-
import { rewriteRuntimeImports, fingerprint, bundleImports } from "./package-
|
|
9
|
-
import { listLoadedExtensions, deactivateExtension, getLoadedExtension, setExtensionStatus, activateExtension } from "./registry-
|
|
7
|
+
import { j as RUNTIME_DIR, h as RUNTIME_MODULES, i as isCompatibleApiVersion, k as RUNTIME_GLOBAL } from "./api-Cz0Ubj-B.mjs";
|
|
8
|
+
import { rewriteRuntimeImports, fingerprint, bundleImports } from "./package-B7mI6HGi.mjs";
|
|
9
|
+
import { listLoadedExtensions, deactivateExtension, getLoadedExtension, setExtensionStatus, activateExtension } from "./registry-COfJrSmg.mjs";
|
|
10
10
|
import "./index-w03ReRs4.mjs";
|
|
11
11
|
import "./_commonjsHelpers-ClciMIcB.mjs";
|
|
12
12
|
import "stream";
|
|
13
13
|
import "events";
|
|
14
14
|
import "buffer";
|
|
15
15
|
import "util";
|
|
16
|
-
import "./featureRegistry-
|
|
16
|
+
import "./featureRegistry-DSsZbhrh.mjs";
|
|
17
17
|
import "./index-Bnmav-Oh.mjs";
|
|
18
18
|
import "./index-BM8qeGOb.mjs";
|
|
19
|
-
import "./modules-
|
|
19
|
+
import "./modules-clWdE-K2.mjs";
|
|
20
20
|
import "./context-CxFfqS4D.mjs";
|
|
21
21
|
import "./pluginRegistry-DyHtlkcr.mjs";
|
|
22
|
-
import "./settings-
|
|
22
|
+
import "./settings-Di8nzNEL.mjs";
|
|
23
23
|
import "./store-5gqRSKXg.mjs";
|
|
24
24
|
import "./runtimeConfig-CCOFg1RM.mjs";
|
|
25
|
-
import "./tools-
|
|
25
|
+
import "./tools-iSH-yMpl.mjs";
|
|
26
26
|
import "./fields-B0bitgmr.mjs";
|
|
27
27
|
import "./query-C5nJB_3C.mjs";
|
|
28
28
|
import "../agentcrm.mjs";
|
|
@@ -38,23 +38,23 @@ import "./activities-Cj_SIOay.mjs";
|
|
|
38
38
|
import "./ids-CvnmrMJX.mjs";
|
|
39
39
|
import "./relations-B9TynBmA.mjs";
|
|
40
40
|
import "./dedupe-BepmsaHv.mjs";
|
|
41
|
-
import "./importCsv-
|
|
42
|
-
import "./papaparse-
|
|
41
|
+
import "./importCsv-LVmMTaWU.mjs";
|
|
42
|
+
import "./papaparse-Df7i1dHr.mjs";
|
|
43
43
|
import "./utils-DmI8FtXP.mjs";
|
|
44
|
-
import "./records-
|
|
44
|
+
import "./records-DcHFelq5.mjs";
|
|
45
45
|
import "./standardObjects-CheqfDqa.mjs";
|
|
46
|
-
import "./pipelines-
|
|
47
|
-
import "./reports-
|
|
48
|
-
import "./schema-
|
|
49
|
-
import "./automations-
|
|
46
|
+
import "./pipelines-BAKpPk1w.mjs";
|
|
47
|
+
import "./reports-BACHGccj.mjs";
|
|
48
|
+
import "./schema-C4lSslXv.mjs";
|
|
49
|
+
import "./automations-DwWruxmu.mjs";
|
|
50
50
|
import "./extensionActions-D2HtpQz4.mjs";
|
|
51
|
-
import "./forms-
|
|
52
|
-
import "./schema-
|
|
53
|
-
import "./appearance-
|
|
51
|
+
import "./forms-BfuWaQjA.mjs";
|
|
52
|
+
import "./schema-DnLj8dUO.mjs";
|
|
53
|
+
import "./appearance-BloHbiLA.mjs";
|
|
54
54
|
import "./themes-DPZFv3yc.mjs";
|
|
55
|
-
import "./extensions-
|
|
55
|
+
import "./extensions-Bp72uZ9a.mjs";
|
|
56
56
|
import "./files-CjsPJSR6.mjs";
|
|
57
|
-
import "./files-
|
|
57
|
+
import "./files-D1daDgY0.mjs";
|
|
58
58
|
import "./index-RCmo-uld.mjs";
|
|
59
59
|
import "./http-Bk9ICb7I.mjs";
|
|
60
60
|
async function prepareRuntime(specifiers) {
|
|
@@ -147,7 +147,7 @@ function syncExtensions(store, opts = {}) {
|
|
|
147
147
|
report.loaded.push(doc.id);
|
|
148
148
|
} catch (err) {
|
|
149
149
|
const error = err instanceof Error ? err : new Error(String(err));
|
|
150
|
-
console.error(`[extensions] ${doc.id} failed to load:`, error);
|
|
150
|
+
if (!opts.onError) console.error(`[extensions] ${doc.id} failed to load:`, error);
|
|
151
151
|
setExtensionStatus(doc, "error", error.message);
|
|
152
152
|
const st = getLoadedExtension(doc.id);
|
|
153
153
|
if (st) st.fingerprint = fp;
|
|
@@ -4,9 +4,9 @@ import { dirname as __acrmDirname } from "node:path";
|
|
|
4
4
|
const require2 = __acrmRequire(import.meta.url);
|
|
5
5
|
const __filename = __acrmPath(import.meta.url);
|
|
6
6
|
const __dirname = __acrmDirname(__filename);
|
|
7
|
-
import { c as REQUIRED_MODULES, d as disabledFromDoc, B as BUILTIN_MODULES, M as MODULES_CONFIG_ID, i as isCompatibleApiVersion, e as builtinModule } from "./api-
|
|
7
|
+
import { c as REQUIRED_MODULES, d as disabledFromDoc, B as BUILTIN_MODULES, M as MODULES_CONFIG_ID, i as isCompatibleApiVersion, e as builtinModule } from "./api-Cz0Ubj-B.mjs";
|
|
8
8
|
import { assertCan, OpsError } from "./context-CxFfqS4D.mjs";
|
|
9
|
-
import { assertNoSecrets } from "./settings-
|
|
9
|
+
import { assertNoSecrets } from "./settings-Di8nzNEL.mjs";
|
|
10
10
|
import { extensionDocsOf, extensionDocOf } from "./store-5gqRSKXg.mjs";
|
|
11
11
|
import "./pluginRegistry-DyHtlkcr.mjs";
|
|
12
12
|
import "./runtimeConfig-CCOFg1RM.mjs";
|
|
@@ -142,6 +142,30 @@ function getModuleConfig(ctx, id) {
|
|
|
142
142
|
return configDoc(ctx.store)?.config?.[id];
|
|
143
143
|
}
|
|
144
144
|
const MAX_MODULE_CONFIG = 256 * 1024;
|
|
145
|
+
const MODULE_SECRET_KEYS = /* @__PURE__ */ new Set([
|
|
146
|
+
"apikey",
|
|
147
|
+
"apisecret",
|
|
148
|
+
"secret",
|
|
149
|
+
"secretkey",
|
|
150
|
+
"clientsecret",
|
|
151
|
+
"privatekey",
|
|
152
|
+
"accesstoken",
|
|
153
|
+
"authtoken",
|
|
154
|
+
"bearertoken",
|
|
155
|
+
"refreshtoken",
|
|
156
|
+
"password",
|
|
157
|
+
"token",
|
|
158
|
+
"webhooksecret"
|
|
159
|
+
]);
|
|
160
|
+
function assertNoModuleSecrets(value, path = "") {
|
|
161
|
+
if (!value || typeof value !== "object") return;
|
|
162
|
+
for (const [k, v] of Object.entries(value)) {
|
|
163
|
+
if (MODULE_SECRET_KEYS.has(k.toLowerCase().replace(/[_-]/g, "")) && v !== "" && v != null) {
|
|
164
|
+
throw new OpsError("validation", `Refusing to store the secret "${path}${k}" in the module configuration: every CRM user can read it. Keep secrets out of the CRM data.`);
|
|
165
|
+
}
|
|
166
|
+
assertNoModuleSecrets(v, `${path}${k}.`);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
145
169
|
async function setModuleConfig(ctx, id, value) {
|
|
146
170
|
assertCan(ctx, "modules.write");
|
|
147
171
|
assertKnownModule(ctx.store, id);
|
|
@@ -155,6 +179,7 @@ async function setModuleConfig(ctx, id, value) {
|
|
|
155
179
|
if (json === void 0) throw new OpsError("validation", "Module configuration must be JSON-serialisable.");
|
|
156
180
|
if (json.length > MAX_MODULE_CONFIG) throw new OpsError("validation", `Module configuration is larger than ${MAX_MODULE_CONFIG / 1024} KB.`);
|
|
157
181
|
assertNoSecrets(value);
|
|
182
|
+
assertNoModuleSecrets(value);
|
|
158
183
|
}
|
|
159
184
|
const current = configDoc(ctx.store);
|
|
160
185
|
const next = value === null || value === void 0 ? void 0 : JSON.parse(JSON.stringify(value));
|
|
@@ -8,8 +8,8 @@ import { mkdtemp, writeFile, rm } from "node:fs/promises";
|
|
|
8
8
|
import { tmpdir } from "node:os";
|
|
9
9
|
import { resolve, join } from "node:path";
|
|
10
10
|
import { pathToFileURL } from "node:url";
|
|
11
|
-
import {
|
|
12
|
-
import { rewriteRuntimeImports } from "./package-
|
|
11
|
+
import { h as RUNTIME_MODULES } from "./api-Cz0Ubj-B.mjs";
|
|
12
|
+
import { rewriteRuntimeImports } from "./package-B7mI6HGi.mjs";
|
|
13
13
|
import "./index-w03ReRs4.mjs";
|
|
14
14
|
import "./_commonjsHelpers-ClciMIcB.mjs";
|
|
15
15
|
import "stream";
|
|
@@ -5,7 +5,7 @@ const require2 = __acrmRequire(import.meta.url);
|
|
|
5
5
|
const __filename = __acrmPath(import.meta.url);
|
|
6
6
|
const __dirname = __acrmDirname(__filename);
|
|
7
7
|
import { J as JSZip } from "./index-w03ReRs4.mjs";
|
|
8
|
-
import { a as EXTENSION_LIMITS, R as RUNTIME_SPECIFIERS, i as isCompatibleApiVersion, b as EXTENSION_MIN_API_VERSION, E as EXTENSION_API_VERSION, B as BUILTIN_MODULES, f as MODULE_CATEGORIES } from "./api-
|
|
8
|
+
import { a as EXTENSION_LIMITS, R as RUNTIME_SPECIFIERS, i as isCompatibleApiVersion, b as EXTENSION_MIN_API_VERSION, E as EXTENSION_API_VERSION, B as BUILTIN_MODULES, f as MODULE_CATEGORIES } from "./api-Cz0Ubj-B.mjs";
|
|
9
9
|
import "./_commonjsHelpers-ClciMIcB.mjs";
|
|
10
10
|
import "stream";
|
|
11
11
|
import "events";
|
|
@@ -6,24 +6,43 @@ const __filename = __acrmPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __acrmDirname(__filename);
|
|
7
7
|
import { g as getDefaultExportFromCjs } from "./_commonjsHelpers-ClciMIcB.mjs";
|
|
8
8
|
import require$$0 from "stream";
|
|
9
|
-
|
|
9
|
+
function _mergeNamespaces(n, m) {
|
|
10
|
+
for (var i = 0; i < m.length; i++) {
|
|
11
|
+
const e = m[i];
|
|
12
|
+
if (typeof e !== "string" && !Array.isArray(e)) {
|
|
13
|
+
for (const k in e) {
|
|
14
|
+
if (k !== "default" && !(k in n)) {
|
|
15
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
16
|
+
if (d) {
|
|
17
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: () => e[k]
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return Object.freeze(Object.defineProperty(n, Symbol.toStringTag, { value: "Module" }));
|
|
27
|
+
}
|
|
28
|
+
var papaparse$2 = { exports: {} };
|
|
10
29
|
/* @license
|
|
11
30
|
Papa Parse
|
|
12
31
|
v5.7.0
|
|
13
32
|
https://github.com/mholt/PapaParse
|
|
14
33
|
License: MIT
|
|
15
34
|
*/
|
|
16
|
-
var papaparse = papaparse$
|
|
35
|
+
var papaparse$1 = papaparse$2.exports;
|
|
17
36
|
var hasRequiredPapaparse;
|
|
18
37
|
function requirePapaparse() {
|
|
19
|
-
if (hasRequiredPapaparse) return papaparse$
|
|
38
|
+
if (hasRequiredPapaparse) return papaparse$2.exports;
|
|
20
39
|
hasRequiredPapaparse = 1;
|
|
21
40
|
(function(module, exports) {
|
|
22
41
|
(function(root, factory) {
|
|
23
42
|
{
|
|
24
43
|
module.exports = factory();
|
|
25
44
|
}
|
|
26
|
-
})(papaparse, function moduleFactory() {
|
|
45
|
+
})(papaparse$1, function moduleFactory() {
|
|
27
46
|
var global = (function() {
|
|
28
47
|
if (typeof self !== "undefined") {
|
|
29
48
|
return self;
|
|
@@ -1275,11 +1294,16 @@ function requirePapaparse() {
|
|
|
1275
1294
|
}
|
|
1276
1295
|
return Papa2;
|
|
1277
1296
|
});
|
|
1278
|
-
})(papaparse$
|
|
1279
|
-
return papaparse$
|
|
1297
|
+
})(papaparse$2);
|
|
1298
|
+
return papaparse$2.exports;
|
|
1280
1299
|
}
|
|
1281
1300
|
var papaparseExports = requirePapaparse();
|
|
1282
1301
|
const Papa = /* @__PURE__ */ getDefaultExportFromCjs(papaparseExports);
|
|
1302
|
+
const papaparse = /* @__PURE__ */ _mergeNamespaces({
|
|
1303
|
+
__proto__: null,
|
|
1304
|
+
default: Papa
|
|
1305
|
+
}, [papaparseExports]);
|
|
1283
1306
|
export {
|
|
1284
|
-
Papa as P
|
|
1307
|
+
Papa as P,
|
|
1308
|
+
papaparse as p
|
|
1285
1309
|
};
|
|
@@ -8,7 +8,7 @@ import { dateValueToMs, colorAt } from "./fields-B0bitgmr.mjs";
|
|
|
8
8
|
import { s as slugId } from "./ids-CvnmrMJX.mjs";
|
|
9
9
|
import { s as stageOptions, p as pipelineOptions } from "./standardObjects-CheqfDqa.mjs";
|
|
10
10
|
import { assertCan, OpsError } from "./context-CxFfqS4D.mjs";
|
|
11
|
-
import { updateRecord } from "./records-
|
|
11
|
+
import { updateRecord } from "./records-DcHFelq5.mjs";
|
|
12
12
|
import { requireRecord, pipelinesOf, requireObject, requirePipeline, recordsOf, asDoc, thaw } from "./store-5gqRSKXg.mjs";
|
|
13
13
|
import "./pluginRegistry-DyHtlkcr.mjs";
|
|
14
14
|
import "./query-C5nJB_3C.mjs";
|
|
@@ -6,7 +6,7 @@ const __filename = __acrmPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __acrmDirname(__filename);
|
|
7
7
|
import { isAbsolute, resolve } from "node:path";
|
|
8
8
|
import { splitSecretSettings } from "./runtimeConfig-CCOFg1RM.mjs";
|
|
9
|
-
import { v as validateAlias, f as findBackend,
|
|
9
|
+
import { v as validateAlias, f as findBackend, b as parseAccount, g as getCredential, c as requireCredential, C as CliError, d as findLocation, L as LOCATIONS, e as findHosting, H as HOSTINGS } from "../agentcrm.mjs";
|
|
10
10
|
import "node:util";
|
|
11
11
|
import "node:fs";
|
|
12
12
|
import "node:url";
|
|
@@ -6,7 +6,7 @@ const __filename = __acrmPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __acrmDirname(__filename);
|
|
7
7
|
import { normalizeDomain, recordLabel, validateRecordFields, defaultFieldValues, isEmptyFieldValue, FieldValidationError, normalizeEmail } from "./fields-B0bitgmr.mjs";
|
|
8
8
|
import { n as newId } from "./ids-CvnmrMJX.mjs";
|
|
9
|
-
import { b as applyFilters, a as applySorts, p as paginate } from "./query-C5nJB_3C.mjs";
|
|
9
|
+
import { r as resolveField, b as applyFilters, a as applySorts, p as paginate } from "./query-C5nJB_3C.mjs";
|
|
10
10
|
import { n as normalizeStandardFields } from "./standardObjects-CheqfDqa.mjs";
|
|
11
11
|
import { assertCan, OpsError, actorId, emit } from "./context-CxFfqS4D.mjs";
|
|
12
12
|
import { i as inverseRelations, j as expandRelations, l as labelOf, v as validateRelationValue, c as rewriteReferences, b as fileCleanupMutations } from "./relations-B9TynBmA.mjs";
|
|
@@ -1933,6 +1933,10 @@ function queryContext(ctx, object) {
|
|
|
1933
1933
|
function listRecords(ctx, objectId, opts = {}) {
|
|
1934
1934
|
assertCan(ctx, "records.read");
|
|
1935
1935
|
const object = requireObject(ctx.store, objectId);
|
|
1936
|
+
const unknown = [...opts.filters ?? [], ...opts.sorts ?? []].map((f) => f.field).filter((f) => !resolveField(object, f));
|
|
1937
|
+
if (unknown.length) {
|
|
1938
|
+
throw new OpsError("validation", `Unknown field${unknown.length > 1 ? "s" : ""} ${[...new Set(unknown)].map((f) => `"${f}"`).join(", ")} on ${object.labelPlural}. Fields: ${object.fields.map((f) => f.id).join(", ")}, id, ownerId, createdAt, updatedAt.`);
|
|
1939
|
+
}
|
|
1936
1940
|
let filters = opts.filters ?? [];
|
|
1937
1941
|
let sorts = opts.sorts ?? [];
|
|
1938
1942
|
if (opts.viewId) {
|
|
@@ -4,18 +4,18 @@ import { dirname as __acrmDirname } from "node:path";
|
|
|
4
4
|
const require2 = __acrmRequire(import.meta.url);
|
|
5
5
|
const __filename = __acrmPath(import.meta.url);
|
|
6
6
|
const __dirname = __acrmDirname(__filename);
|
|
7
|
-
import { i as isCompatibleApiVersion } from "./api-
|
|
8
|
-
import { registerExternalFeature } from "./featureRegistry-
|
|
9
|
-
import { registerAiTool } from "./tools-
|
|
7
|
+
import { i as isCompatibleApiVersion } from "./api-Cz0Ubj-B.mjs";
|
|
8
|
+
import { registerExternalFeature } from "./featureRegistry-DSsZbhrh.mjs";
|
|
9
|
+
import { registerAiTool } from "./tools-iSH-yMpl.mjs";
|
|
10
10
|
import { registerAutomationAction } from "./extensionActions-D2HtpQz4.mjs";
|
|
11
11
|
import { plugins } from "./pluginRegistry-DyHtlkcr.mjs";
|
|
12
12
|
import { registerExternalTheme } from "./themes-DPZFv3yc.mjs";
|
|
13
13
|
import "./index-Bnmav-Oh.mjs";
|
|
14
14
|
import "./_commonjsHelpers-ClciMIcB.mjs";
|
|
15
15
|
import "./index-BM8qeGOb.mjs";
|
|
16
|
-
import "./modules-
|
|
16
|
+
import "./modules-clWdE-K2.mjs";
|
|
17
17
|
import "./context-CxFfqS4D.mjs";
|
|
18
|
-
import "./settings-
|
|
18
|
+
import "./settings-Di8nzNEL.mjs";
|
|
19
19
|
import "./store-5gqRSKXg.mjs";
|
|
20
20
|
import "./runtimeConfig-CCOFg1RM.mjs";
|
|
21
21
|
import "./fields-B0bitgmr.mjs";
|
|
@@ -33,27 +33,27 @@ import "./activities-Cj_SIOay.mjs";
|
|
|
33
33
|
import "./ids-CvnmrMJX.mjs";
|
|
34
34
|
import "./relations-B9TynBmA.mjs";
|
|
35
35
|
import "./dedupe-BepmsaHv.mjs";
|
|
36
|
-
import "./importCsv-
|
|
37
|
-
import "./papaparse-
|
|
36
|
+
import "./importCsv-LVmMTaWU.mjs";
|
|
37
|
+
import "./papaparse-Df7i1dHr.mjs";
|
|
38
38
|
import "stream";
|
|
39
39
|
import "./utils-DmI8FtXP.mjs";
|
|
40
|
-
import "./records-
|
|
40
|
+
import "./records-DcHFelq5.mjs";
|
|
41
41
|
import "./standardObjects-CheqfDqa.mjs";
|
|
42
|
-
import "./pipelines-
|
|
43
|
-
import "./reports-
|
|
44
|
-
import "./schema-
|
|
45
|
-
import "./automations-
|
|
46
|
-
import "./forms-
|
|
47
|
-
import "./schema-
|
|
48
|
-
import "./appearance-
|
|
49
|
-
import "./extensions-
|
|
50
|
-
import "./package-
|
|
42
|
+
import "./pipelines-BAKpPk1w.mjs";
|
|
43
|
+
import "./reports-BACHGccj.mjs";
|
|
44
|
+
import "./schema-C4lSslXv.mjs";
|
|
45
|
+
import "./automations-DwWruxmu.mjs";
|
|
46
|
+
import "./forms-BfuWaQjA.mjs";
|
|
47
|
+
import "./schema-DnLj8dUO.mjs";
|
|
48
|
+
import "./appearance-BloHbiLA.mjs";
|
|
49
|
+
import "./extensions-Bp72uZ9a.mjs";
|
|
50
|
+
import "./package-B7mI6HGi.mjs";
|
|
51
51
|
import "./index-w03ReRs4.mjs";
|
|
52
52
|
import "events";
|
|
53
53
|
import "buffer";
|
|
54
54
|
import "util";
|
|
55
55
|
import "./files-CjsPJSR6.mjs";
|
|
56
|
-
import "./files-
|
|
56
|
+
import "./files-D1daDgY0.mjs";
|
|
57
57
|
import "./index-RCmo-uld.mjs";
|
|
58
58
|
import "./http-Bk9ICb7I.mjs";
|
|
59
59
|
const entries = /* @__PURE__ */ new Map();
|
|
@@ -9,8 +9,8 @@ import { L as LIFECYCLE_OPTIONS } from "./standardObjects-CheqfDqa.mjs";
|
|
|
9
9
|
import { A as ACTIVITY_TYPES } from "../agentcrm.mjs";
|
|
10
10
|
import { lastActivityAt } from "./activities-Cj_SIOay.mjs";
|
|
11
11
|
import { OpsError, assertCan } from "./context-CxFfqS4D.mjs";
|
|
12
|
-
import { forecast, pipelineOfRecord } from "./pipelines-
|
|
13
|
-
import { getSettings } from "./settings-
|
|
12
|
+
import { forecast, pipelineOfRecord } from "./pipelines-BAKpPk1w.mjs";
|
|
13
|
+
import { getSettings } from "./settings-Di8nzNEL.mjs";
|
|
14
14
|
import { objectOf, recordsOf, pipelinesOf, usersOf, activitiesOf, requirePipeline } from "./store-5gqRSKXg.mjs";
|
|
15
15
|
import "node:util";
|
|
16
16
|
import "node:fs";
|
|
@@ -24,7 +24,7 @@ import "./ids-CvnmrMJX.mjs";
|
|
|
24
24
|
import "./query-C5nJB_3C.mjs";
|
|
25
25
|
import "./relations-B9TynBmA.mjs";
|
|
26
26
|
import "./pluginRegistry-DyHtlkcr.mjs";
|
|
27
|
-
import "./records-
|
|
27
|
+
import "./records-DcHFelq5.mjs";
|
|
28
28
|
import "./runtimeConfig-CCOFg1RM.mjs";
|
|
29
29
|
const DAY = 864e5;
|
|
30
30
|
function defaultPipelineId(ctx, pipelineId) {
|
|
@@ -8,42 +8,42 @@ import { a as requireReact, r as reactExports, R as React } from "./index-Bnmav-
|
|
|
8
8
|
import { j as jsxRuntimeExports, R as ReactJsxRuntime } from "./jsx-runtime-Ca2uwGDr.mjs";
|
|
9
9
|
import { g as getDefaultExportFromCjs } from "./_commonjsHelpers-ClciMIcB.mjs";
|
|
10
10
|
import { OpsError, PERMISSIONS, actorId, assertCan, can, createOpsContext, emit } from "./context-CxFfqS4D.mjs";
|
|
11
|
-
import { bulkDelete, bulkUpdate, createRecord, deleteRecord, getRecord, getRecordDetails, hardDeleteMutations, listRecords, prepareRecordFields, queryContext, recordPatchMutation, restoreRecord, searchRecords, setRecordOwner, updateRecord } from "./records-
|
|
11
|
+
import { bulkDelete, bulkUpdate, createRecord, deleteRecord, getRecord, getRecordDetails, hardDeleteMutations, listRecords, prepareRecordFields, queryContext, recordPatchMutation, restoreRecord, searchRecords, setRecordOwner, updateRecord } from "./records-DcHFelq5.mjs";
|
|
12
12
|
import { j as expandRelations, b as fileCleanupMutations, e as fileFieldIds, g as fileIdsIn, d as fileMergeMutations, f as fileTargetPatch, i as inverseRelations, l as labelOf, k as linkRecords, h as referencedFileIds, m as relatedRecords, r as relationFields, a as relationIds, c as rewriteReferences, s as sameTarget, t as toRef, u as unlinkRecords, v as validateRelationValue } from "./relations-B9TynBmA.mjs";
|
|
13
13
|
import { addActivity, addNote, completeTask, createTask, deleteActivity, getActivity, lastActivityAt, listActivities, listTasks, timelineScope, updateActivity } from "./activities-Cj_SIOay.mjs";
|
|
14
|
-
import { createPipeline, deletePipeline, forecast, getPipeline, listPipelines, moveStage, pipelineOfRecord, syncPipelineOptions, updatePipeline } from "./pipelines-
|
|
15
|
-
import { addOption, changeFieldType, createField, createObject, deleteField, deleteObject, describeSchema, getObject, listObjects, removeOption, reorderFields, updateField, updateObject, updateOption } from "./schema-
|
|
16
|
-
import { createView, deleteView, duplicateView, getView, listViews, runView, updateView } from "./views-
|
|
14
|
+
import { createPipeline, deletePipeline, forecast, getPipeline, listPipelines, moveStage, pipelineOfRecord, syncPipelineOptions, updatePipeline } from "./pipelines-BAKpPk1w.mjs";
|
|
15
|
+
import { addOption, changeFieldType, createField, createObject, deleteField, deleteObject, describeSchema, getObject, listObjects, removeOption, reorderFields, updateField, updateObject, updateOption } from "./schema-C4lSslXv.mjs";
|
|
16
|
+
import { createView, deleteView, duplicateView, getView, listViews, runView, updateView } from "./views-DH1n9Lrt.mjs";
|
|
17
17
|
import { createUser, deleteUser, findUserByEmail, getUser, listUsers, setUserRole, updateUser } from "./users-DI1BvS0f.mjs";
|
|
18
|
-
import { DEFAULT_SETTINGS, assertNoSecrets, getConfigDoc, getSettings, setConfigDoc, updateSettings } from "./settings-
|
|
19
|
-
import { MAPPING_ID, MAPPING_OWNER, MAPPING_SKIP, importCsv, parseCsv, suggestMapping } from "./importCsv-
|
|
20
|
-
import { exportCsv, exportJson, importJson } from "./exportCsv-
|
|
18
|
+
import { DEFAULT_SETTINGS, SETTINGS_KEYS, assertNoSecrets, getConfigDoc, getSettings, setConfigDoc, updateSettings } from "./settings-Di8nzNEL.mjs";
|
|
19
|
+
import { MAPPING_ID, MAPPING_OWNER, MAPPING_SKIP, importCsv, parseCsv, suggestMapping } from "./importCsv-LVmMTaWU.mjs";
|
|
20
|
+
import { exportCsv, exportJson, importJson, planImportJson } from "./exportCsv-C6e6XEmB.mjs";
|
|
21
21
|
import { findDuplicates, mergeRecords } from "./dedupe-BepmsaHv.mjs";
|
|
22
|
-
import { REPORTS, activityByUser, conversion, leadSources, pipelineByStage, runReport, staleDeals, wonLost } from "./reports-
|
|
23
|
-
import { getStats } from "./stats-
|
|
24
|
-
import { DEFAULT_ADMIN_ID, seedCrm, seedDemoData } from "./seed-
|
|
25
|
-
import { compactData } from "./compact-
|
|
26
|
-
import { ACTION_TYPES, AUTOMATION_TEMPLATES, EVENT_TRIGGERS, MAX_AUTOMATION_DEPTH, MAX_AUTOMATION_RUNS, SCHEDULED_TRIGGERS, TRIGGER_TYPES, automationAssignees, clearAutomationRuns, createAutomation, createAutomationFromTemplate, deleteAutomation, duplicateAutomation, findAutomationTemplate, getAutomation, installAutomations, lastTouchedAt, listAutomationRuns, listAutomations, pruneAutomationRuns, renderTemplate, runAutomationEvent, runScheduled, scheduledCandidates, setAutomationEnabled, setAutomationFetch, templatePlaceholders, testAutomation, triggerMatches, updateAutomation, validateAutomation } from "./automations-
|
|
27
|
-
import { DEFAULT_FIREBASE_INBOX, DEFAULT_FORM_TEXTS, DEFAULT_INBOX_PREFIX, FORM_FIELD_TYPES, FREE_MAIL_DOMAINS, HONEYPOT_NAME, INBOX_KINDS, MIN_FILL_MS, buildFormArtifacts, buildFormHtml, companyDomainOfEmail, connectorInboxSource, createForm, defaultFormPath, deleteForm, escapeHtml, firestoreInboxSource, getForm, ingestInbox, ingestSubmissions, isFormFieldType, listForms, listInbox, memoryInboxSource, parseSubmission, publishForm, resolveInboxSource, setInboxSourceResolver, suggestFormFields, updateForm, validateForm } from "./forms-
|
|
28
|
-
import { disabledObjectIds, getModule, getModuleConfig, isModuleEnabled, listModules, moduleStates, setModuleConfig, setModuleEnabled } from "./modules-
|
|
29
|
-
import { getExtension, getExtensionPackage, installExtension, listExtensions, setExtensionEnabled, summarizeExtension, uninstallExtension } from "./extensions-
|
|
30
|
-
import { applyPreset, getAppearance, getAppearanceDoc, listPresets, resetAppearance, setAppearance, setLogo } from "./appearance-
|
|
31
|
-
import { ORPHAN_GRACE_MS, attachFile, clearRecordImage, deleteFile, detachFile, fileUsage, getFile, getFileBytes, listFiles, maxUploadBytes, purgeFiles, recordImageId, renameFile, restoreFile, setRecordImage, uploadFile } from "./files-
|
|
22
|
+
import { REPORTS, activityByUser, conversion, leadSources, pipelineByStage, runReport, staleDeals, wonLost } from "./reports-BACHGccj.mjs";
|
|
23
|
+
import { getStats } from "./stats-BfuLWhVV.mjs";
|
|
24
|
+
import { DEFAULT_ADMIN_ID, seedCrm, seedDemoData } from "./seed-6MRmQQBR.mjs";
|
|
25
|
+
import { compactData } from "./compact-BGHI92tm.mjs";
|
|
26
|
+
import { ACTION_TYPES, AUTOMATION_TEMPLATES, EVENT_TRIGGERS, MAX_AUTOMATION_DEPTH, MAX_AUTOMATION_RUNS, SCHEDULED_TRIGGERS, TRIGGER_TYPES, automationAssignees, clearAutomationRuns, createAutomation, createAutomationFromTemplate, deleteAutomation, duplicateAutomation, findAutomationTemplate, getAutomation, installAutomations, lastTouchedAt, listAutomationRuns, listAutomations, pruneAutomationRuns, renderTemplate, runAutomationEvent, runScheduled, scheduledCandidates, setAutomationEnabled, setAutomationFetch, templatePlaceholders, testAutomation, triggerMatches, updateAutomation, validateAutomation } from "./automations-DwWruxmu.mjs";
|
|
27
|
+
import { DEFAULT_FIREBASE_INBOX, DEFAULT_FORM_TEXTS, DEFAULT_INBOX_PREFIX, FORM_FIELD_TYPES, FREE_MAIL_DOMAINS, HONEYPOT_NAME, INBOX_KINDS, MIN_FILL_MS, buildFormArtifacts, buildFormHtml, companyDomainOfEmail, connectorInboxSource, createForm, defaultFormPath, deleteForm, escapeHtml, firestoreInboxSource, getForm, ingestInbox, ingestSubmissions, isFormFieldType, listForms, listInbox, memoryInboxSource, parseSubmission, publishForm, resolveInboxSource, setInboxSourceResolver, suggestFormFields, updateForm, validateForm } from "./forms-BfuWaQjA.mjs";
|
|
28
|
+
import { disabledObjectIds, getModule, getModuleConfig, isModuleEnabled, listModules, moduleStates, setModuleConfig, setModuleEnabled } from "./modules-clWdE-K2.mjs";
|
|
29
|
+
import { getExtension, getExtensionPackage, installExtension, listExtensions, setExtensionEnabled, summarizeExtension, uninstallExtension } from "./extensions-Bp72uZ9a.mjs";
|
|
30
|
+
import { applyPreset, getAppearance, getAppearanceDoc, listPresets, resetAppearance, setAppearance, setLogo } from "./appearance-BloHbiLA.mjs";
|
|
31
|
+
import { ORPHAN_GRACE_MS, attachFile, clearRecordImage, deleteFile, detachFile, fileUsage, getFile, getFileBytes, listFiles, maxUploadBytes, purgeFiles, recordImageId, renameFile, restoreFile, setRecordImage, uploadFile } from "./files-D1daDgY0.mjs";
|
|
32
32
|
import { S as SCHEMA_MIGRATIONS, m as migrateSchema, s as schemaMigrationMutations } from "./migrate-CsClnnN8.mjs";
|
|
33
|
-
import { BACKUP_DATA_FILE, BACKUP_FILES_DIR, exportBackupZip, importBackupZip, readBackupZipInfo } from "./backup-
|
|
33
|
+
import { BACKUP_DATA_FILE, BACKUP_FILES_DIR, exportBackupZip, importBackupZip, planBackupZip, readBackupZipInfo } from "./backup-W3CjgkAJ.mjs";
|
|
34
34
|
import { getAutomationAction, listAutomationActions, registerAutomationAction, subscribeAutomationActions } from "./extensionActions-D2HtpQz4.mjs";
|
|
35
35
|
import { a as intlLocale, b as activeLocale, i as instance, r as registerI18nNamespace } from "./index-BM8qeGOb.mjs";
|
|
36
36
|
import "./standardObjects-CheqfDqa.mjs";
|
|
37
|
-
import { useModuleStates, useModuleEnabled } from "./featureRegistry-
|
|
37
|
+
import { useModuleStates, useModuleEnabled } from "./featureRegistry-DSsZbhrh.mjs";
|
|
38
38
|
import { a as cn, i as initials, f as formatRelative, b as formatDateTime, d as formatDate } from "./utils-DmI8FtXP.mjs";
|
|
39
39
|
import { t as toast } from "./http-Bk9ICb7I.mjs";
|
|
40
40
|
import { isEmptyFieldValue, formatFieldValue, formatAddress, dateValueToMs, formatNumber, formatCurrency, toIsoDate, parseNumber, coerceFieldValue, recordLabel } from "./fields-B0bitgmr.mjs";
|
|
41
41
|
import { fileKind, isPreviewable, formatBytes } from "./files-CjsPJSR6.mjs";
|
|
42
42
|
import { plugins } from "./pluginRegistry-DyHtlkcr.mjs";
|
|
43
43
|
import { n as newId } from "./ids-CvnmrMJX.mjs";
|
|
44
|
-
import { registerAiTool } from "./tools-
|
|
45
|
-
import { a as DEFAULT_APPEARANCE } from "./schema-
|
|
46
|
-
import { b as EXTENSION_MIN_API_VERSION, E as EXTENSION_API_VERSION,
|
|
44
|
+
import { registerAiTool } from "./tools-iSH-yMpl.mjs";
|
|
45
|
+
import { a as DEFAULT_APPEARANCE } from "./schema-DnLj8dUO.mjs";
|
|
46
|
+
import { b as EXTENSION_MIN_API_VERSION, E as EXTENSION_API_VERSION, k as RUNTIME_GLOBAL } from "./api-Cz0Ubj-B.mjs";
|
|
47
47
|
import "./query-C5nJB_3C.mjs";
|
|
48
48
|
import "./store-5gqRSKXg.mjs";
|
|
49
49
|
import "../agentcrm.mjs";
|
|
@@ -56,11 +56,11 @@ import "node:os";
|
|
|
56
56
|
import "node:child_process";
|
|
57
57
|
import "node:http";
|
|
58
58
|
import "./runtimeConfig-CCOFg1RM.mjs";
|
|
59
|
-
import "./papaparse-
|
|
59
|
+
import "./papaparse-Df7i1dHr.mjs";
|
|
60
60
|
import "stream";
|
|
61
61
|
import "./types-BOy9PUl7.mjs";
|
|
62
62
|
import "./index-RCmo-uld.mjs";
|
|
63
|
-
import "./package-
|
|
63
|
+
import "./package-B7mI6HGi.mjs";
|
|
64
64
|
import "./index-w03ReRs4.mjs";
|
|
65
65
|
import "events";
|
|
66
66
|
import "buffer";
|
|
@@ -8396,6 +8396,7 @@ const opsModule = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePro
|
|
|
8396
8396
|
REPORTS,
|
|
8397
8397
|
SCHEDULED_TRIGGERS,
|
|
8398
8398
|
SCHEMA_MIGRATIONS,
|
|
8399
|
+
SETTINGS_KEYS,
|
|
8399
8400
|
TRIGGER_TYPES,
|
|
8400
8401
|
activityByUser,
|
|
8401
8402
|
actorId,
|
|
@@ -8527,6 +8528,8 @@ const opsModule = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePro
|
|
|
8527
8528
|
parseSubmission,
|
|
8528
8529
|
pipelineByStage,
|
|
8529
8530
|
pipelineOfRecord,
|
|
8531
|
+
planBackupZip,
|
|
8532
|
+
planImportJson,
|
|
8530
8533
|
prepareRecordFields,
|
|
8531
8534
|
pruneAutomationRuns,
|
|
8532
8535
|
publishForm,
|
|
@@ -9706,7 +9709,7 @@ const Button = reactExports.forwardRef(function Button2({ variant = "outline", s
|
|
|
9706
9709
|
),
|
|
9707
9710
|
...rest,
|
|
9708
9711
|
children: [
|
|
9709
|
-
hasIcon && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "inline-flex h-4 w-4 shrink-0 items-center justify-center [
|
|
9712
|
+
hasIcon && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "inline-flex h-4 w-4 shrink-0 items-center justify-center [&_svg]:h-4 [&_svg]:w-4", children: [
|
|
9710
9713
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: cn("inline-flex", loading && "hidden"), children: icon }),
|
|
9711
9714
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: cn("inline-flex", !loading && "hidden"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(LoaderCircle, { className: "h-4 w-4 animate-spin" }) })
|
|
9712
9715
|
] }),
|
|
@@ -9794,7 +9797,7 @@ const Checkbox = reactExports.forwardRef(function Checkbox2({ label, indetermina
|
|
|
9794
9797
|
}
|
|
9795
9798
|
);
|
|
9796
9799
|
if (!label) return input;
|
|
9797
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: cn("inline-flex cursor-pointer items-center gap-2 text-sm text-surface-700 dark:text-surface-200", className), children: [
|
|
9800
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: cn("relative inline-flex cursor-pointer items-center gap-2 text-sm text-surface-700 dark:text-surface-200", className), children: [
|
|
9798
9801
|
input,
|
|
9799
9802
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: label })
|
|
9800
9803
|
] });
|
|
@@ -9821,7 +9824,7 @@ function Switch({ checked, onChange, label, disabled, size = "md", className, id
|
|
|
9821
9824
|
}
|
|
9822
9825
|
);
|
|
9823
9826
|
if (!label) return /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className, children: button });
|
|
9824
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: cn("inline-flex cursor-pointer items-center gap-2 text-sm text-surface-700 dark:text-surface-200", className), children: [
|
|
9827
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: cn("relative inline-flex cursor-pointer items-center gap-2 text-sm text-surface-700 dark:text-surface-200", className), children: [
|
|
9825
9828
|
button,
|
|
9826
9829
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: label })
|
|
9827
9830
|
] });
|
|
@@ -9910,8 +9913,23 @@ function Drawer({ open, onClose, title, children, footer, width = "md", side = "
|
|
|
9910
9913
|
)
|
|
9911
9914
|
] }) });
|
|
9912
9915
|
}
|
|
9916
|
+
const PopoverParent = reactExports.createContext(null);
|
|
9917
|
+
function isInsidePopover(target, id) {
|
|
9918
|
+
let el = target instanceof Element ? target : target?.parentElement ?? null;
|
|
9919
|
+
let panel = el?.closest("[data-popover-id]") ?? null;
|
|
9920
|
+
while (panel) {
|
|
9921
|
+
if (panel.getAttribute("data-popover-id") === id) return true;
|
|
9922
|
+
const parent = panel.getAttribute("data-popover-parent");
|
|
9923
|
+
if (!parent) return false;
|
|
9924
|
+
el = document.querySelector(`[data-popover-id="${CSS.escape(parent)}"]`);
|
|
9925
|
+
panel = el;
|
|
9926
|
+
}
|
|
9927
|
+
return false;
|
|
9928
|
+
}
|
|
9913
9929
|
function Popover({ open, onClose, anchor, children, align = "start", matchWidth, className, offset = 4 }) {
|
|
9914
9930
|
const panel = reactExports.useRef(null);
|
|
9931
|
+
const id = reactExports.useId();
|
|
9932
|
+
const parentId = reactExports.useContext(PopoverParent);
|
|
9915
9933
|
const [pos, setPos] = reactExports.useState(null);
|
|
9916
9934
|
const place = reactExports.useCallback(() => {
|
|
9917
9935
|
if (!anchor) return;
|
|
@@ -9931,11 +9949,12 @@ function Popover({ open, onClose, anchor, children, align = "start", matchWidth,
|
|
|
9931
9949
|
if (!open) return;
|
|
9932
9950
|
const onDown = (e2) => {
|
|
9933
9951
|
const t2 = e2.target;
|
|
9934
|
-
if (panel.current?.contains(t2) || anchor?.contains(t2)) return;
|
|
9952
|
+
if (panel.current?.contains(t2) || anchor?.contains(t2) || isInsidePopover(t2, id)) return;
|
|
9935
9953
|
onClose();
|
|
9936
9954
|
};
|
|
9937
9955
|
const onKey = (e2) => {
|
|
9938
9956
|
if (e2.key === "Escape") {
|
|
9957
|
+
if (document.querySelector(`[data-popover-parent="${CSS.escape(id)}"]`)) return;
|
|
9939
9958
|
e2.stopPropagation();
|
|
9940
9959
|
onClose();
|
|
9941
9960
|
}
|
|
@@ -9953,18 +9972,20 @@ function Popover({ open, onClose, anchor, children, align = "start", matchWidth,
|
|
|
9953
9972
|
window.removeEventListener("resize", onMove);
|
|
9954
9973
|
window.removeEventListener("scroll", onMove, true);
|
|
9955
9974
|
};
|
|
9956
|
-
}, [open, onClose, anchor, place]);
|
|
9975
|
+
}, [open, onClose, anchor, place, id]);
|
|
9957
9976
|
if (!open || !anchor) return null;
|
|
9958
9977
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Portal, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9959
9978
|
"div",
|
|
9960
9979
|
{
|
|
9961
9980
|
ref: panel,
|
|
9981
|
+
"data-popover-id": id,
|
|
9982
|
+
"data-popover-parent": parentId ?? void 0,
|
|
9962
9983
|
style: { top: pos?.top ?? -9999, left: pos?.left ?? -9999, ...matchWidth && pos ? { minWidth: pos.width } : {} },
|
|
9963
9984
|
className: cn(
|
|
9964
9985
|
"fixed z-[60] animate-scale-in overflow-hidden rounded-lg border border-surface-200 bg-white shadow-pop dark:border-surface-700 dark:bg-surface-900",
|
|
9965
9986
|
className
|
|
9966
9987
|
),
|
|
9967
|
-
children
|
|
9988
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(PopoverParent.Provider, { value: id, children })
|
|
9968
9989
|
}
|
|
9969
9990
|
) });
|
|
9970
9991
|
}
|
|
@@ -13541,11 +13562,11 @@ function createDOMPurify() {
|
|
|
13541
13562
|
const originalDocument = document2;
|
|
13542
13563
|
const currentScript = originalDocument.currentScript;
|
|
13543
13564
|
window2.DocumentFragment;
|
|
13544
|
-
const HTMLTemplateElement = window2.HTMLTemplateElement, Node = window2.Node,
|
|
13565
|
+
const HTMLTemplateElement = window2.HTMLTemplateElement, Node = window2.Node, Element2 = window2.Element, NodeFilter = window2.NodeFilter;
|
|
13545
13566
|
window2.NamedNodeMap === void 0 && (window2.NamedNodeMap || window2.MozNamedAttrMap);
|
|
13546
13567
|
window2.HTMLFormElement;
|
|
13547
13568
|
const DOMParser = window2.DOMParser, trustedTypes = window2.trustedTypes;
|
|
13548
|
-
const ElementPrototype =
|
|
13569
|
+
const ElementPrototype = Element2.prototype;
|
|
13549
13570
|
const cloneNode = lookupGetter(ElementPrototype, "cloneNode");
|
|
13550
13571
|
const remove = lookupGetter(ElementPrototype, "remove");
|
|
13551
13572
|
const removeAttributeNode = lookupGetter(ElementPrototype, "removeAttributeNode");
|