@odla-ai/chapter 0.27.1 → 0.28.1
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 +22 -0
- package/dist/{chunk-L2SA47IO.js → chunk-VJLXHBIP.js} +9 -4
- package/dist/{chunk-L2SA47IO.js.map → chunk-VJLXHBIP.js.map} +1 -1
- package/dist/index.cjs +53 -31
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +53 -31
- package/dist/index.js.map +1 -1
- package/dist/ui/admin/index.js +1 -1
- package/dist/ui/index.js +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1246,39 +1246,61 @@ function defineChapter(config) {
|
|
|
1246
1246
|
var import_crm2 = require("@odla-ai/crm");
|
|
1247
1247
|
function leaderCrmConfig(options = {}) {
|
|
1248
1248
|
const base = options.base ?? defaultCrm("hub");
|
|
1249
|
+
const defaultChapter = {
|
|
1250
|
+
label: "Chapter",
|
|
1251
|
+
labelPlural: "Chapters",
|
|
1252
|
+
workspace: "portfolio",
|
|
1253
|
+
nameField: "name",
|
|
1254
|
+
fields: {
|
|
1255
|
+
name: { type: "string", label: "Name", required: true },
|
|
1256
|
+
slug: { type: "string", label: "Slug", slot: "s1" },
|
|
1257
|
+
region: { type: "string", label: "Region", slot: "s2" },
|
|
1258
|
+
url: { type: "url", label: "Website" },
|
|
1259
|
+
thesis: { type: "string", label: "Investment thesis" },
|
|
1260
|
+
launchedAt: { type: "date", label: "Launch date", slot: "d1" },
|
|
1261
|
+
notes: { type: "string", label: "Notes" }
|
|
1262
|
+
},
|
|
1263
|
+
pipeline: {
|
|
1264
|
+
stages: [
|
|
1265
|
+
{ id: "proposed", label: "Proposed" },
|
|
1266
|
+
{ id: "forming", label: "Forming" },
|
|
1267
|
+
{ id: "active", label: "Active" },
|
|
1268
|
+
{ id: "paused", label: "Paused" },
|
|
1269
|
+
{ id: "closed", label: "Closed", terminal: true }
|
|
1270
|
+
],
|
|
1271
|
+
transitions: {
|
|
1272
|
+
proposed: ["forming", "closed"],
|
|
1273
|
+
forming: ["active", "paused", "closed"],
|
|
1274
|
+
active: ["paused", "closed"],
|
|
1275
|
+
paused: ["forming", "active", "closed"]
|
|
1276
|
+
}
|
|
1277
|
+
},
|
|
1278
|
+
facets: { rank: "manual" }
|
|
1279
|
+
};
|
|
1280
|
+
const chapterOverride = options.chapter ?? {};
|
|
1281
|
+
const chapterType = {
|
|
1282
|
+
...defaultChapter,
|
|
1283
|
+
...chapterOverride,
|
|
1284
|
+
fields: {
|
|
1285
|
+
...defaultChapter.fields,
|
|
1286
|
+
...chapterOverride.fields ?? {},
|
|
1287
|
+
// The preset's natural identity is not optional even when the host adds
|
|
1288
|
+
// its own fields or relabels the name input.
|
|
1289
|
+
name: {
|
|
1290
|
+
...defaultChapter.fields.name,
|
|
1291
|
+
...chapterOverride.fields?.name ?? {},
|
|
1292
|
+
type: "string",
|
|
1293
|
+
required: true
|
|
1294
|
+
}
|
|
1295
|
+
},
|
|
1296
|
+
facets: {
|
|
1297
|
+
...defaultChapter.facets,
|
|
1298
|
+
...chapterOverride.facets ?? {}
|
|
1299
|
+
}
|
|
1300
|
+
};
|
|
1249
1301
|
const portfolio = {
|
|
1250
1302
|
types: {
|
|
1251
|
-
chapter:
|
|
1252
|
-
label: "Chapter",
|
|
1253
|
-
labelPlural: "Chapters",
|
|
1254
|
-
workspace: "portfolio",
|
|
1255
|
-
nameField: "name",
|
|
1256
|
-
fields: {
|
|
1257
|
-
name: { type: "string", label: "Name", required: true },
|
|
1258
|
-
slug: { type: "string", label: "Slug", slot: "s1" },
|
|
1259
|
-
region: { type: "string", label: "Region", slot: "s2" },
|
|
1260
|
-
url: { type: "url", label: "Website" },
|
|
1261
|
-
thesis: { type: "string", label: "Investment thesis" },
|
|
1262
|
-
launchedAt: { type: "date", label: "Launch date", slot: "d1" },
|
|
1263
|
-
notes: { type: "string", label: "Notes" }
|
|
1264
|
-
},
|
|
1265
|
-
pipeline: {
|
|
1266
|
-
stages: [
|
|
1267
|
-
{ id: "proposed", label: "Proposed" },
|
|
1268
|
-
{ id: "forming", label: "Forming" },
|
|
1269
|
-
{ id: "active", label: "Active" },
|
|
1270
|
-
{ id: "paused", label: "Paused" },
|
|
1271
|
-
{ id: "closed", label: "Closed", terminal: true }
|
|
1272
|
-
],
|
|
1273
|
-
transitions: {
|
|
1274
|
-
proposed: ["forming", "closed"],
|
|
1275
|
-
forming: ["active", "paused", "closed"],
|
|
1276
|
-
active: ["paused", "closed"],
|
|
1277
|
-
paused: ["forming", "active", "closed"]
|
|
1278
|
-
}
|
|
1279
|
-
},
|
|
1280
|
-
facets: { rank: "manual" }
|
|
1281
|
-
},
|
|
1303
|
+
chapter: chapterType,
|
|
1282
1304
|
chapter_application: {
|
|
1283
1305
|
label: "Chapter application",
|
|
1284
1306
|
labelPlural: "Formation applications",
|