@homepages/concrete 6.1.0 → 7.0.0
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/CHANGELOG.md +166 -0
- package/codemods/manifest.json +17 -0
- package/codemods/object-form-only.mjs +39 -0
- package/codemods/steps/list-object-form.mjs +688 -0
- package/codemods/steps/select-object-form.mjs +210 -0
- package/dist/artifact/playground/client/assets/index-D8eepVr-.js +1101 -0
- package/dist/artifact/playground/client/index.html +1 -1
- package/dist/artifact/playground/host.mjs +14 -14
- package/dist/asset-modules.d.ts +2 -1
- package/dist/cli/check/stages/render.js +1 -1
- package/dist/cli/check/stages/sections.js +1 -1
- package/dist/fixtures/canonical.d.ts +2 -5
- package/dist/fixtures/media.js +11 -25
- package/dist/fixtures/property.js +28 -16
- package/dist/fixtures/resolve.js +75 -32
- package/dist/fixtures/rows.js +3 -83
- package/dist/fixtures.d.ts +17 -9
- package/dist/index.d.ts +9 -9
- package/dist/packages/external/concrete/package.js +1 -1
- package/dist/packages/internal/fill-bake/dist/bake-property-ref.js +31 -8
- package/dist/packages/internal/fill-bake/dist/derive-source.js +15 -4
- package/dist/packages/internal/fill-bake/dist/index.js +2 -2
- package/dist/packages/internal/fill-vocabulary/dist/origination.js +6 -1
- package/dist/packages/internal/fill-vocabulary/dist/row-reads.js +15 -0
- package/dist/packages/internal/property-facts/dist/index.js +1 -1
- package/dist/packages/internal/property-facts/dist/{property-facts-5pxZnlkh.js → property-facts-Cy7-O4p0.js} +2 -5
- package/dist/packages/internal/section-contracts/dist/catalog.js +0 -4
- package/dist/packages/internal/section-contracts/dist/choose-select-contract.js +4 -4
- package/dist/packages/internal/section-contracts/dist/display-evidence-contract.js +2 -1
- package/dist/packages/internal/section-contracts/dist/fill-spec-view.js +5 -1
- package/dist/packages/internal/section-contracts/dist/group-contract.js +1 -3
- package/dist/packages/internal/section-contracts/dist/index.js +0 -1
- package/dist/packages/internal/section-contracts/dist/list-fill-contract.js +3 -3
- package/dist/packages/internal/section-contracts/dist/list-scalar-contract.js +1 -5
- package/dist/packages/internal/section-contracts/dist/name-title-contract.js +2 -2
- package/dist/packages/internal/section-contracts/dist/pooling-field-contract.js +3 -1
- package/dist/packages/internal/section-contracts/dist/row-fill-contract.js +14 -0
- package/dist/packages/internal/section-contracts/dist/runners.js +0 -5
- package/dist/packages/internal/section-contracts/dist/source-contract.js +80 -4
- package/dist/packages/internal/section-contracts/dist/writer-reads-fact-contract.js +12 -6
- package/dist/packages/internal/source-resolution/dist/index.js +57 -20
- package/dist/packages/internal/template-contracts/dist/facts-view.d.ts +16 -17
- package/dist/packages/internal/template-contracts/dist/facts-view.js +6 -18
- package/dist/packages/internal/template-contracts/dist/row-sources.js +26 -0
- package/dist/packages/internal/template-contracts/dist/slot-catalog.d.ts +362 -380
- package/dist/packages/internal/template-contracts/dist/slot-catalog.js +289 -289
- package/dist/primitives/slot-bindings.d.ts +7 -40
- package/dist/primitives/slot-bindings.js +10 -12
- package/dist/schema/define-schema.d.ts +1 -1
- package/dist/schema/define-schema.js +32 -17
- package/dist/schema/extract-fill-spec.js +15 -13
- package/dist/schema/fact.d.ts +2 -19
- package/dist/schema/fill-builders.d.ts +4 -3
- package/dist/schema/fill-spec.js +9 -1
- package/dist/schema/layout.d.ts +6 -8
- package/dist/schema/layout.js +3 -9
- package/dist/schema/property-facts.d.ts +16 -47
- package/dist/schema/row-fields.js +88 -0
- package/dist/schema/row-ref.d.ts +59 -0
- package/dist/schema/row-ref.js +28 -0
- package/dist/schema/runtime-values.d.ts +8 -13
- package/dist/schema/section-props.d.ts +19 -26
- package/dist/schema/section-schema.d.ts +6 -6
- package/dist/schema/section-schema.js +2 -2
- package/dist/schema/slot-builders.d.ts +222 -117
- package/dist/schema/slot-builders.js +57 -28
- package/dist/schema/slot-ref.d.ts +18 -2
- package/dist/schema/slot-ref.js +11 -3
- package/dist/schema/slot-types.d.ts +7 -7
- package/dist/schema/slot-types.js +55 -19
- package/dist/section/declare.d.ts +1 -1
- package/dist/section/section.d.ts +3 -3
- package/dist/template/logic-shim.d.ts +1 -1
- package/guide/reference/cli/INDEX.md +2 -2
- package/guide/reference/cli/build.md +1 -1
- package/guide/reference/cli/check.md +1 -1
- package/guide/reference/cli/dev.md +1 -1
- package/guide/reference/cli/property-add.md +1 -1
- package/guide/reference/cli/property-list.md +1 -1
- package/guide/reference/cli/publish.md +1 -1
- package/guide/reference/cli/upgrade.md +1 -1
- package/guide/reference/rules/INDEX.md +1 -2
- package/package.json +1 -1
- package/tsconfig.base.json +1 -0
- package/dist/artifact/playground/client/assets/index-Cqz-jjVw.js +0 -1101
- package/dist/packages/internal/section-contracts/dist/row-contract.js +0 -37
- package/dist/packages/internal/template-contracts/dist/layout.js +0 -10
|
@@ -21,6 +21,21 @@ const SOURCE_FILTERS = ["floorplans"];
|
|
|
21
21
|
function isSourceFilter(value) {
|
|
22
22
|
return SOURCE_FILTERS.includes(value);
|
|
23
23
|
}
|
|
24
|
+
const REFERRAL_FIELDS = [
|
|
25
|
+
"name",
|
|
26
|
+
"title",
|
|
27
|
+
"org_name",
|
|
28
|
+
"email",
|
|
29
|
+
"phone",
|
|
30
|
+
"website",
|
|
31
|
+
"instagram",
|
|
32
|
+
"linkedin",
|
|
33
|
+
"x",
|
|
34
|
+
"facebook",
|
|
35
|
+
"headshot",
|
|
36
|
+
"logo_dark",
|
|
37
|
+
"logo_light"
|
|
38
|
+
];
|
|
24
39
|
const REFERRAL_IMAGE_FIELDS = [
|
|
25
40
|
"headshot",
|
|
26
41
|
"logo_dark",
|
|
@@ -47,7 +62,14 @@ const INPUT_GROUP_REQUIREMENT = {
|
|
|
47
62
|
contacts: "derived"
|
|
48
63
|
};
|
|
49
64
|
const ALWAYS_ASKED_INPUT_GROUPS = INPUT_GROUPS.filter((group) => INPUT_GROUP_REQUIREMENT[group] === "always");
|
|
50
|
-
const
|
|
65
|
+
const FACT_PROJECTIONS = {
|
|
66
|
+
property: {
|
|
67
|
+
latitude: "lat",
|
|
68
|
+
longitude: "lon"
|
|
69
|
+
},
|
|
70
|
+
contact: { address: "contact_address" }
|
|
71
|
+
};
|
|
72
|
+
const PROPERTY_ROOT_FACTS = {
|
|
51
73
|
address: {
|
|
52
74
|
role: "bindable",
|
|
53
75
|
path: "address",
|
|
@@ -140,67 +162,9 @@ const FACT_GRAPH = {
|
|
|
140
162
|
value_type: "number",
|
|
141
163
|
input_group: "address",
|
|
142
164
|
strength: "blocking"
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
path: "units[].unit_label",
|
|
147
|
-
container: "unit",
|
|
148
|
-
value_type: "text",
|
|
149
|
-
input_group: "units",
|
|
150
|
-
strength: "optional",
|
|
151
|
-
writeback: {
|
|
152
|
-
kind: "unit",
|
|
153
|
-
column: "unit_label"
|
|
154
|
-
}
|
|
155
|
-
},
|
|
156
|
-
beds: {
|
|
157
|
-
role: "bindable",
|
|
158
|
-
path: "units[].beds",
|
|
159
|
-
container: "unit",
|
|
160
|
-
value_type: "number",
|
|
161
|
-
input_group: "units",
|
|
162
|
-
strength: "blocking",
|
|
163
|
-
writeback: {
|
|
164
|
-
kind: "unit",
|
|
165
|
-
column: "beds"
|
|
166
|
-
}
|
|
167
|
-
},
|
|
168
|
-
baths: {
|
|
169
|
-
role: "bindable",
|
|
170
|
-
path: "units[].baths",
|
|
171
|
-
container: "unit",
|
|
172
|
-
value_type: "number",
|
|
173
|
-
input_group: "units",
|
|
174
|
-
strength: "blocking",
|
|
175
|
-
writeback: {
|
|
176
|
-
kind: "unit",
|
|
177
|
-
column: "baths"
|
|
178
|
-
}
|
|
179
|
-
},
|
|
180
|
-
sqft: {
|
|
181
|
-
role: "bindable",
|
|
182
|
-
path: "units[].sqft",
|
|
183
|
-
container: "unit",
|
|
184
|
-
value_type: "number",
|
|
185
|
-
input_group: "units",
|
|
186
|
-
strength: "blocking",
|
|
187
|
-
writeback: {
|
|
188
|
-
kind: "unit",
|
|
189
|
-
column: "sqft"
|
|
190
|
-
}
|
|
191
|
-
},
|
|
192
|
-
price: {
|
|
193
|
-
role: "bindable",
|
|
194
|
-
path: "units[].price",
|
|
195
|
-
container: "unit",
|
|
196
|
-
value_type: "text",
|
|
197
|
-
input_group: "units",
|
|
198
|
-
strength: "blocking",
|
|
199
|
-
writeback: {
|
|
200
|
-
kind: "unit",
|
|
201
|
-
column: "price"
|
|
202
|
-
}
|
|
203
|
-
},
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
const COLLECTION_FACTS = {
|
|
204
168
|
units: {
|
|
205
169
|
role: "bindable",
|
|
206
170
|
path: "units",
|
|
@@ -209,20 +173,53 @@ const FACT_GRAPH = {
|
|
|
209
173
|
input_group: "units",
|
|
210
174
|
strength: "blocking",
|
|
211
175
|
row: {
|
|
212
|
-
unit_id: {
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
176
|
+
unit_id: {
|
|
177
|
+
path: "unit_id",
|
|
178
|
+
value_type: "text"
|
|
179
|
+
},
|
|
180
|
+
position: {
|
|
181
|
+
path: "position",
|
|
182
|
+
value_type: "number"
|
|
183
|
+
},
|
|
219
184
|
floor_plans: {
|
|
220
|
-
|
|
185
|
+
path: "floor_plans",
|
|
186
|
+
value_type: "image_list",
|
|
187
|
+
pool: "floor_plans",
|
|
221
188
|
row: {
|
|
222
189
|
id: { value_type: "text" },
|
|
223
190
|
floor_label: { value_type: "text" },
|
|
224
191
|
position: { value_type: "number" }
|
|
225
192
|
}
|
|
193
|
+
},
|
|
194
|
+
unit_label: {
|
|
195
|
+
path: "unit_label",
|
|
196
|
+
value_type: "text",
|
|
197
|
+
strength: "optional",
|
|
198
|
+
writeback: { column: "unit_label" }
|
|
199
|
+
},
|
|
200
|
+
beds: {
|
|
201
|
+
path: "beds",
|
|
202
|
+
value_type: "number",
|
|
203
|
+
strength: "blocking",
|
|
204
|
+
writeback: { column: "beds" }
|
|
205
|
+
},
|
|
206
|
+
baths: {
|
|
207
|
+
path: "baths",
|
|
208
|
+
value_type: "number",
|
|
209
|
+
strength: "blocking",
|
|
210
|
+
writeback: { column: "baths" }
|
|
211
|
+
},
|
|
212
|
+
sqft: {
|
|
213
|
+
path: "sqft",
|
|
214
|
+
value_type: "number",
|
|
215
|
+
strength: "blocking",
|
|
216
|
+
writeback: { column: "sqft" }
|
|
217
|
+
},
|
|
218
|
+
price: {
|
|
219
|
+
path: "price",
|
|
220
|
+
value_type: "text",
|
|
221
|
+
strength: "blocking",
|
|
222
|
+
writeback: { column: "price" }
|
|
226
223
|
}
|
|
227
224
|
}
|
|
228
225
|
},
|
|
@@ -234,64 +231,126 @@ const FACT_GRAPH = {
|
|
|
234
231
|
input_group: "comparables",
|
|
235
232
|
strength: "blocking",
|
|
236
233
|
row: {
|
|
237
|
-
id: {
|
|
234
|
+
id: {
|
|
235
|
+
path: "id",
|
|
236
|
+
value_type: "text"
|
|
237
|
+
},
|
|
238
238
|
address_street: {
|
|
239
|
+
path: "address_street",
|
|
239
240
|
value_type: "text",
|
|
240
241
|
required: true
|
|
241
242
|
},
|
|
242
|
-
address_city: {
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
243
|
+
address_city: {
|
|
244
|
+
path: "address_city",
|
|
245
|
+
value_type: "text"
|
|
246
|
+
},
|
|
247
|
+
address_state: {
|
|
248
|
+
path: "address_state",
|
|
249
|
+
value_type: "text"
|
|
250
|
+
},
|
|
251
|
+
address_postal: {
|
|
252
|
+
path: "address_postal",
|
|
253
|
+
value_type: "text"
|
|
254
|
+
},
|
|
255
|
+
address: {
|
|
256
|
+
path: "address",
|
|
257
|
+
value_type: "text"
|
|
258
|
+
},
|
|
246
259
|
lat: {
|
|
260
|
+
path: "lat",
|
|
247
261
|
value_type: "number",
|
|
248
262
|
required: true
|
|
249
263
|
},
|
|
250
264
|
lng: {
|
|
265
|
+
path: "lng",
|
|
251
266
|
value_type: "number",
|
|
252
267
|
required: true
|
|
253
268
|
},
|
|
254
|
-
distance_m: {
|
|
255
|
-
|
|
269
|
+
distance_m: {
|
|
270
|
+
path: "distance_m",
|
|
271
|
+
value_type: "number"
|
|
272
|
+
},
|
|
273
|
+
status: {
|
|
274
|
+
path: "status",
|
|
275
|
+
value_type: "text"
|
|
276
|
+
},
|
|
256
277
|
price: {
|
|
278
|
+
path: "price",
|
|
257
279
|
value_type: "number",
|
|
258
280
|
required: true,
|
|
259
281
|
writeback: { column: "price" }
|
|
260
282
|
},
|
|
261
|
-
price_period: {
|
|
283
|
+
price_period: {
|
|
284
|
+
path: "price_period",
|
|
285
|
+
value_type: "text"
|
|
286
|
+
},
|
|
262
287
|
sale_date: {
|
|
288
|
+
path: "sale_date",
|
|
263
289
|
value_type: "text",
|
|
264
290
|
writeback: { column: "sale_date" }
|
|
265
291
|
},
|
|
266
292
|
beds: {
|
|
293
|
+
path: "beds",
|
|
267
294
|
value_type: "number",
|
|
268
295
|
required: true,
|
|
269
296
|
writeback: { column: "beds" }
|
|
270
297
|
},
|
|
271
298
|
baths: {
|
|
299
|
+
path: "baths",
|
|
272
300
|
value_type: "number",
|
|
273
301
|
required: true,
|
|
274
302
|
writeback: { column: "baths" }
|
|
275
303
|
},
|
|
276
304
|
sqft: {
|
|
305
|
+
path: "sqft",
|
|
277
306
|
value_type: "number",
|
|
278
307
|
required: true,
|
|
279
308
|
writeback: { column: "sqft" }
|
|
280
309
|
},
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
310
|
+
photo: {
|
|
311
|
+
path: "photo_upload_id",
|
|
312
|
+
value_type: "image"
|
|
313
|
+
},
|
|
314
|
+
year_built: {
|
|
315
|
+
path: "year_built",
|
|
316
|
+
value_type: "number"
|
|
317
|
+
},
|
|
318
|
+
lot_sqft: {
|
|
319
|
+
path: "lot_sqft",
|
|
320
|
+
value_type: "number"
|
|
321
|
+
},
|
|
322
|
+
stories: {
|
|
323
|
+
path: "stories",
|
|
324
|
+
value_type: "number"
|
|
325
|
+
},
|
|
326
|
+
units: {
|
|
327
|
+
path: "units",
|
|
328
|
+
value_type: "number"
|
|
329
|
+
},
|
|
330
|
+
hoa_monthly: {
|
|
331
|
+
path: "hoa_monthly",
|
|
332
|
+
value_type: "number"
|
|
333
|
+
},
|
|
334
|
+
list_price: {
|
|
335
|
+
path: "list_price",
|
|
336
|
+
value_type: "number"
|
|
337
|
+
},
|
|
338
|
+
listed_date: {
|
|
339
|
+
path: "listed_date",
|
|
340
|
+
value_type: "text"
|
|
341
|
+
},
|
|
342
|
+
mls_number: {
|
|
343
|
+
path: "mls_number",
|
|
344
|
+
value_type: "text"
|
|
345
|
+
},
|
|
346
|
+
description: {
|
|
347
|
+
path: "description",
|
|
348
|
+
value_type: "text"
|
|
349
|
+
},
|
|
350
|
+
property_type: {
|
|
351
|
+
path: "property_type",
|
|
352
|
+
value_type: "text"
|
|
353
|
+
}
|
|
295
354
|
}
|
|
296
355
|
},
|
|
297
356
|
contacts: {
|
|
@@ -302,196 +361,108 @@ const FACT_GRAPH = {
|
|
|
302
361
|
input_group: "contacts",
|
|
303
362
|
strength: "blocking",
|
|
304
363
|
row: {
|
|
305
|
-
id: {
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
writeback: {
|
|
404
|
-
kind: "contact",
|
|
405
|
-
field: "phone"
|
|
406
|
-
}
|
|
407
|
-
},
|
|
408
|
-
website: {
|
|
409
|
-
role: "bindable",
|
|
410
|
-
path: "contacts[].website_url",
|
|
411
|
-
container: "contact",
|
|
412
|
-
value_type: "text",
|
|
413
|
-
input_group: "contacts",
|
|
414
|
-
strength: "optional",
|
|
415
|
-
writeback: {
|
|
416
|
-
kind: "contact",
|
|
417
|
-
field: "website"
|
|
418
|
-
}
|
|
419
|
-
},
|
|
420
|
-
instagram: {
|
|
421
|
-
role: "bindable",
|
|
422
|
-
path: "contacts[].instagram_url",
|
|
423
|
-
container: "contact",
|
|
424
|
-
value_type: "text",
|
|
425
|
-
input_group: "contacts",
|
|
426
|
-
strength: "optional",
|
|
427
|
-
writeback: {
|
|
428
|
-
kind: "contact",
|
|
429
|
-
field: "socials.instagram"
|
|
430
|
-
}
|
|
431
|
-
},
|
|
432
|
-
linkedin: {
|
|
433
|
-
role: "bindable",
|
|
434
|
-
path: "contacts[].linkedin_url",
|
|
435
|
-
container: "contact",
|
|
436
|
-
value_type: "text",
|
|
437
|
-
input_group: "contacts",
|
|
438
|
-
strength: "optional",
|
|
439
|
-
writeback: {
|
|
440
|
-
kind: "contact",
|
|
441
|
-
field: "socials.linkedin"
|
|
442
|
-
}
|
|
443
|
-
},
|
|
444
|
-
x: {
|
|
445
|
-
role: "bindable",
|
|
446
|
-
path: "contacts[].x_url",
|
|
447
|
-
container: "contact",
|
|
448
|
-
value_type: "text",
|
|
449
|
-
input_group: "contacts",
|
|
450
|
-
strength: "optional",
|
|
451
|
-
writeback: {
|
|
452
|
-
kind: "contact",
|
|
453
|
-
field: "socials.x"
|
|
454
|
-
}
|
|
455
|
-
},
|
|
456
|
-
facebook: {
|
|
457
|
-
role: "bindable",
|
|
458
|
-
path: "contacts[].facebook_url",
|
|
459
|
-
container: "contact",
|
|
460
|
-
value_type: "text",
|
|
461
|
-
input_group: "contacts",
|
|
462
|
-
strength: "optional",
|
|
463
|
-
writeback: {
|
|
464
|
-
kind: "contact",
|
|
465
|
-
field: "socials.facebook"
|
|
364
|
+
id: {
|
|
365
|
+
path: "id",
|
|
366
|
+
value_type: "text"
|
|
367
|
+
},
|
|
368
|
+
primary: {
|
|
369
|
+
path: "primary",
|
|
370
|
+
value_type: "boolean"
|
|
371
|
+
},
|
|
372
|
+
name: {
|
|
373
|
+
path: "name",
|
|
374
|
+
value_type: "text",
|
|
375
|
+
strength: "optional",
|
|
376
|
+
writeback: { column: "name" }
|
|
377
|
+
},
|
|
378
|
+
title: {
|
|
379
|
+
path: "title",
|
|
380
|
+
value_type: "text",
|
|
381
|
+
strength: "optional",
|
|
382
|
+
writeback: { column: "title" }
|
|
383
|
+
},
|
|
384
|
+
org_name: {
|
|
385
|
+
path: "org_name",
|
|
386
|
+
value_type: "text",
|
|
387
|
+
strength: "optional",
|
|
388
|
+
writeback: { column: "org_name" }
|
|
389
|
+
},
|
|
390
|
+
bio: {
|
|
391
|
+
path: "bio",
|
|
392
|
+
value_type: "text",
|
|
393
|
+
strength: "optional",
|
|
394
|
+
writeback: { column: "bio" }
|
|
395
|
+
},
|
|
396
|
+
address: {
|
|
397
|
+
path: "address",
|
|
398
|
+
value_type: "text",
|
|
399
|
+
strength: "optional",
|
|
400
|
+
writeback: { column: "address" }
|
|
401
|
+
},
|
|
402
|
+
email: {
|
|
403
|
+
path: "email",
|
|
404
|
+
value_type: "text",
|
|
405
|
+
strength: "optional",
|
|
406
|
+
writeback: { column: "email" }
|
|
407
|
+
},
|
|
408
|
+
phone: {
|
|
409
|
+
path: "phone",
|
|
410
|
+
value_type: "text",
|
|
411
|
+
strength: "optional",
|
|
412
|
+
writeback: { column: "phone" }
|
|
413
|
+
},
|
|
414
|
+
website: {
|
|
415
|
+
path: "website_url",
|
|
416
|
+
value_type: "text",
|
|
417
|
+
strength: "optional",
|
|
418
|
+
writeback: { column: "website" }
|
|
419
|
+
},
|
|
420
|
+
instagram: {
|
|
421
|
+
path: "instagram_url",
|
|
422
|
+
value_type: "text",
|
|
423
|
+
strength: "optional",
|
|
424
|
+
writeback: { column: "socials.instagram" }
|
|
425
|
+
},
|
|
426
|
+
linkedin: {
|
|
427
|
+
path: "linkedin_url",
|
|
428
|
+
value_type: "text",
|
|
429
|
+
strength: "optional",
|
|
430
|
+
writeback: { column: "socials.linkedin" }
|
|
431
|
+
},
|
|
432
|
+
x: {
|
|
433
|
+
path: "x_url",
|
|
434
|
+
value_type: "text",
|
|
435
|
+
strength: "optional",
|
|
436
|
+
writeback: { column: "socials.x" }
|
|
437
|
+
},
|
|
438
|
+
facebook: {
|
|
439
|
+
path: "facebook_url",
|
|
440
|
+
value_type: "text",
|
|
441
|
+
strength: "optional",
|
|
442
|
+
writeback: { column: "socials.facebook" }
|
|
443
|
+
},
|
|
444
|
+
headshot: {
|
|
445
|
+
path: "avatar_upload_id",
|
|
446
|
+
value_type: "image",
|
|
447
|
+
strength: "optional",
|
|
448
|
+
pool: "library"
|
|
449
|
+
},
|
|
450
|
+
logo_dark: {
|
|
451
|
+
path: "logo_dark_upload_id",
|
|
452
|
+
value_type: "image",
|
|
453
|
+
strength: "optional",
|
|
454
|
+
pool: "library"
|
|
455
|
+
},
|
|
456
|
+
logo_light: {
|
|
457
|
+
path: "logo_light_upload_id",
|
|
458
|
+
value_type: "image",
|
|
459
|
+
strength: "optional",
|
|
460
|
+
pool: "library"
|
|
461
|
+
}
|
|
466
462
|
}
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
path: "contacts[].avatar_upload_id",
|
|
471
|
-
container: "contact",
|
|
472
|
-
value_type: "image",
|
|
473
|
-
input_group: "contacts",
|
|
474
|
-
strength: "optional",
|
|
475
|
-
image: true
|
|
476
|
-
},
|
|
477
|
-
logo_dark: {
|
|
478
|
-
role: "bindable",
|
|
479
|
-
path: "contacts[].logo_dark_upload_id",
|
|
480
|
-
container: "contact",
|
|
481
|
-
value_type: "image",
|
|
482
|
-
input_group: "contacts",
|
|
483
|
-
strength: "optional",
|
|
484
|
-
image: true
|
|
485
|
-
},
|
|
486
|
-
logo_light: {
|
|
487
|
-
role: "bindable",
|
|
488
|
-
path: "contacts[].logo_light_upload_id",
|
|
489
|
-
container: "contact",
|
|
490
|
-
value_type: "image",
|
|
491
|
-
input_group: "contacts",
|
|
492
|
-
strength: "optional",
|
|
493
|
-
image: true
|
|
494
|
-
},
|
|
463
|
+
}
|
|
464
|
+
};
|
|
465
|
+
const READABLE_FACTS = {
|
|
495
466
|
description: {
|
|
496
467
|
role: "readable",
|
|
497
468
|
path: "narrative.description",
|
|
@@ -595,13 +566,42 @@ const FACT_GRAPH = {
|
|
|
595
566
|
primary_of: "contacts"
|
|
596
567
|
}
|
|
597
568
|
};
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
569
|
+
function primaryRowFacts(container) {
|
|
570
|
+
const collection = COLLECTION_FACTS[READABLE_FACTS[container].primary_of];
|
|
571
|
+
const aliases = FACT_PROJECTIONS[container] ?? {};
|
|
572
|
+
const facts = {};
|
|
573
|
+
for (const [name, member] of Object.entries(collection.row)) {
|
|
574
|
+
if (member.strength === void 0) continue;
|
|
575
|
+
const fact = {
|
|
576
|
+
role: "bindable",
|
|
577
|
+
path: `${collection.path}[].${member.path}`,
|
|
578
|
+
container,
|
|
579
|
+
value_type: member.value_type,
|
|
580
|
+
input_group: collection.input_group,
|
|
581
|
+
strength: member.strength
|
|
582
|
+
};
|
|
583
|
+
if (member.value_type === "image") fact.image = true;
|
|
584
|
+
if (member.writeback !== void 0) fact.writeback = container === "unit" ? {
|
|
585
|
+
kind: "unit",
|
|
586
|
+
column: member.writeback.column
|
|
587
|
+
} : {
|
|
588
|
+
kind: "contact",
|
|
589
|
+
field: member.writeback.column
|
|
590
|
+
};
|
|
591
|
+
facts[aliases[name] ?? name] = fact;
|
|
592
|
+
}
|
|
593
|
+
return facts;
|
|
594
|
+
}
|
|
595
|
+
function composeFactGraph() {
|
|
596
|
+
return {
|
|
597
|
+
...PROPERTY_ROOT_FACTS,
|
|
598
|
+
...primaryRowFacts("unit"),
|
|
599
|
+
...COLLECTION_FACTS,
|
|
600
|
+
...primaryRowFacts("contact"),
|
|
601
|
+
...READABLE_FACTS
|
|
602
|
+
};
|
|
603
|
+
}
|
|
604
|
+
const FACT_GRAPH = /* @__PURE__ */ composeFactGraph();
|
|
605
605
|
function projectBindableFacts(graph) {
|
|
606
606
|
const projected = {};
|
|
607
607
|
for (const [name, entry] of Object.entries(graph)) {
|
|
@@ -781,4 +781,4 @@ function tourEmbedUrl(raw) {
|
|
|
781
781
|
}
|
|
782
782
|
|
|
783
783
|
//#endregion
|
|
784
|
-
export { COLLECTIONS, COLLECTION_SLOT_TYPES, CONTENT_SLOT_TYPES, DISPLAY_ENTRIES, FACT_GRAPH, FACT_PROJECTIONS, INPUT_GROUPS, INPUT_GROUP_REQUIREMENT, LINK_KINDS, LINK_PROVIDERS, OPTION_SOURCES, REFERRAL_IMAGE_FIELDS, REF_SLOT_TYPES, SLOT_TYPES, SOURCE_FIELDS, SOURCE_FILTERS, VIDEO_SOURCES, VISIBILITY_CASES, acceptsLink, collectionBounds, collectionForSlot, isCollectionSlotType, isLinkAccepts, isOptionSource, isSourceFilter, isWritableSourceField, matchLinkProvider, stampCollectionBounds, tourEmbedUrl, videoEmbedUrl };
|
|
784
|
+
export { COLLECTIONS, COLLECTION_SLOT_TYPES, CONTENT_SLOT_TYPES, DISPLAY_ENTRIES, FACT_GRAPH, FACT_PROJECTIONS, INPUT_GROUPS, INPUT_GROUP_REQUIREMENT, LINK_KINDS, LINK_PROVIDERS, OPTION_SOURCES, REFERRAL_FIELDS, REFERRAL_IMAGE_FIELDS, REF_SLOT_TYPES, SLOT_TYPES, SOURCE_FIELDS, SOURCE_FILTERS, VIDEO_SOURCES, VISIBILITY_CASES, acceptsLink, collectionBounds, collectionForSlot, isCollectionSlotType, isLinkAccepts, isOptionSource, isSourceFilter, isWritableSourceField, matchLinkProvider, stampCollectionBounds, tourEmbedUrl, videoEmbedUrl };
|