navne-default-ad 1.3.2 → 1.4.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 +11 -0
- package/README.md +7 -0
- package/dist/index.cjs +154 -47
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +2 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +12 -2
- package/dist/index.d.ts +12 -2
- package/dist/index.js +150 -48
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.4.0
|
|
4
|
+
|
|
5
|
+
- Add semantic block ordering through `layoutOrder` without coupling the renderer to drag-and-drop, Zustand, Next.js, or Strapi.
|
|
6
|
+
- Export block types, type-specific defaults, and defensive order normalization.
|
|
7
|
+
- Add the optional `renderBlock` integration hook for consumer-owned sortable wrappers.
|
|
8
|
+
|
|
9
|
+
## 1.3.3
|
|
10
|
+
|
|
11
|
+
- Keep focused church and funeral-date placeholders intrinsic so their highlight never stretches across the ceremony row.
|
|
12
|
+
- Reuse the geometry-neutral inline highlight treatment across interactive name and ceremony placeholders.
|
|
13
|
+
|
|
3
14
|
## 1.3.2
|
|
4
15
|
|
|
5
16
|
- Keep both first-name and last-name values/placeholders visible while either name field is focused in builder mode.
|
package/README.md
CHANGED
|
@@ -44,6 +44,8 @@ Importing the component also references its CSS, but the explicit stylesheet imp
|
|
|
44
44
|
- `classicDefaultAdStyle`: shared layout plus the fixed AdBuilder typography.
|
|
45
45
|
- `publicationDefaultAdStyle`: shared layout plus the publication typography defaults.
|
|
46
46
|
- `styleFromLegacyTemplate`: converts existing Strapi font sizes, leading, tracking, and font families while retaining the shared layout.
|
|
47
|
+
- `DefaultAdBlock`, `DEFAULT_AD_LAYOUT_ORDER`, `defaultAdLayoutOrder`, and
|
|
48
|
+
`normalizeDefaultAdLayoutOrder`: the shared semantic layout-order contract.
|
|
47
49
|
|
|
48
50
|
`variant="classic"` and `variant="publication"` remain accepted for source compatibility and diagnostics, but both now use the same field order, whitespace, and spacing model.
|
|
49
51
|
|
|
@@ -51,6 +53,11 @@ Importing the component also references its CSS, but the explicit stylesheet imp
|
|
|
51
53
|
|
|
52
54
|
Pass `rootRef` to observe the exact ad element and `interaction.fields` for in-flow focused placeholders. The package owns their DOM position; the application continues to own focus state and callbacks.
|
|
53
55
|
|
|
56
|
+
Pass `layoutOrder` to render semantic blocks in a saved order. Invalid and duplicate
|
|
57
|
+
keys are removed, and newly introduced blocks are appended in the canonical order.
|
|
58
|
+
`renderBlock` can add consumer-owned controls (for example a sortable handle) without
|
|
59
|
+
moving drag-and-drop state or dependencies into this package.
|
|
60
|
+
|
|
54
61
|
```tsx
|
|
55
62
|
<DefaultAd
|
|
56
63
|
rootRef={adRef}
|
package/dist/index.cjs
CHANGED
|
@@ -20,14 +20,22 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
|
+
DEFAULT_AD_LAYOUT_ORDER: () => DEFAULT_AD_LAYOUT_ORDER,
|
|
24
|
+
DEFAULT_OBITUARY_LAYOUT_ORDER: () => DEFAULT_OBITUARY_LAYOUT_ORDER,
|
|
25
|
+
DEFAULT_THANK_YOU_LAYOUT_ORDER: () => DEFAULT_THANK_YOU_LAYOUT_ORDER,
|
|
23
26
|
DefaultAd: () => DefaultAd,
|
|
24
27
|
classicDefaultAdStyle: () => classicDefaultAdStyle,
|
|
28
|
+
defaultAdLayoutOrder: () => defaultAdLayoutOrder,
|
|
29
|
+
normalizeDefaultAdLayoutOrder: () => normalizeDefaultAdLayoutOrder,
|
|
25
30
|
publicationDefaultAdStyle: () => publicationDefaultAdStyle,
|
|
26
31
|
sharedDefaultAdLayout: () => sharedDefaultAdLayout,
|
|
27
32
|
styleFromLegacyTemplate: () => styleFromLegacyTemplate
|
|
28
33
|
});
|
|
29
34
|
module.exports = __toCommonJS(index_exports);
|
|
30
35
|
|
|
36
|
+
// src/DefaultAd.tsx
|
|
37
|
+
var import_react = require("react");
|
|
38
|
+
|
|
31
39
|
// src/presets.ts
|
|
32
40
|
var sharedDefaultAdLayout = {
|
|
33
41
|
columnsMm: 86,
|
|
@@ -149,6 +157,56 @@ function tracking(value) {
|
|
|
149
157
|
return amount ? { longDateLetterSpacing: amount } : {};
|
|
150
158
|
}
|
|
151
159
|
|
|
160
|
+
// src/layout.ts
|
|
161
|
+
var DEFAULT_OBITUARY_LAYOUT_ORDER = [
|
|
162
|
+
"icon",
|
|
163
|
+
"intro",
|
|
164
|
+
"title",
|
|
165
|
+
"name",
|
|
166
|
+
"dates",
|
|
167
|
+
"deceased",
|
|
168
|
+
"memorial",
|
|
169
|
+
"sender",
|
|
170
|
+
"church",
|
|
171
|
+
"thanks",
|
|
172
|
+
"donation"
|
|
173
|
+
];
|
|
174
|
+
var DEFAULT_THANK_YOU_LAYOUT_ORDER = [
|
|
175
|
+
"icon",
|
|
176
|
+
"intro",
|
|
177
|
+
"title",
|
|
178
|
+
"name",
|
|
179
|
+
"dates",
|
|
180
|
+
"ceremony",
|
|
181
|
+
"message",
|
|
182
|
+
"thanks",
|
|
183
|
+
"sender",
|
|
184
|
+
"donation"
|
|
185
|
+
];
|
|
186
|
+
var DEFAULT_AD_LAYOUT_ORDER = DEFAULT_OBITUARY_LAYOUT_ORDER;
|
|
187
|
+
var VALID_BLOCKS = /* @__PURE__ */ new Set([
|
|
188
|
+
...DEFAULT_OBITUARY_LAYOUT_ORDER,
|
|
189
|
+
...DEFAULT_THANK_YOU_LAYOUT_ORDER
|
|
190
|
+
]);
|
|
191
|
+
function defaultAdLayoutOrder(type) {
|
|
192
|
+
return type === "thanks" ? DEFAULT_THANK_YOU_LAYOUT_ORDER : DEFAULT_OBITUARY_LAYOUT_ORDER;
|
|
193
|
+
}
|
|
194
|
+
function normalizeDefaultAdLayoutOrder(order, type) {
|
|
195
|
+
const defaults = defaultAdLayoutOrder(type);
|
|
196
|
+
const applicable = new Set(defaults);
|
|
197
|
+
const seen = /* @__PURE__ */ new Set();
|
|
198
|
+
const normalized = [];
|
|
199
|
+
for (const value of order ?? []) {
|
|
200
|
+
if (typeof value !== "string" || !VALID_BLOCKS.has(value)) continue;
|
|
201
|
+
const block = value;
|
|
202
|
+
if (!applicable.has(block) || seen.has(block)) continue;
|
|
203
|
+
seen.add(block);
|
|
204
|
+
normalized.push(block);
|
|
205
|
+
}
|
|
206
|
+
for (const block of defaults) if (!seen.has(block)) normalized.push(block);
|
|
207
|
+
return normalized;
|
|
208
|
+
}
|
|
209
|
+
|
|
152
210
|
// src/utils.ts
|
|
153
211
|
var defaultFormatters = {
|
|
154
212
|
date(value) {
|
|
@@ -207,6 +265,8 @@ function DefaultAd({
|
|
|
207
265
|
emptyNamePlaceholder = "Fornavn Efternavn",
|
|
208
266
|
className = "",
|
|
209
267
|
rootStyle,
|
|
268
|
+
layoutOrder,
|
|
269
|
+
renderBlock,
|
|
210
270
|
...htmlProps
|
|
211
271
|
}) {
|
|
212
272
|
const typography = mergeDefined(
|
|
@@ -228,14 +288,6 @@ function DefaultAd({
|
|
|
228
288
|
const hasVisualFirst = Boolean(first || interaction?.fields?.[firstField]?.active);
|
|
229
289
|
const hasVisualSecond = Boolean(second || interaction?.fields?.[secondField]?.active);
|
|
230
290
|
const hasVisualName = hasName || Boolean(interaction?.fields?.firstName?.active || interaction?.fields?.lastName?.active);
|
|
231
|
-
const headerMargins = calculateHeaderMargins({
|
|
232
|
-
first: hasVisualFirst,
|
|
233
|
-
second: hasVisualSecond,
|
|
234
|
-
hasName: hasVisualName,
|
|
235
|
-
hasIcon: Boolean(icon),
|
|
236
|
-
spacing
|
|
237
|
-
});
|
|
238
|
-
const { firstMargin, secondMargin, nameMargin } = headerMargins;
|
|
239
291
|
const isSingleColumn = Number(layout.columnsMm) === 41;
|
|
240
292
|
const ceremonyCode = contact.ceremony?.code;
|
|
241
293
|
const ceremonyLabel = contact.ceremony?.label ?? ceremonyCode;
|
|
@@ -243,7 +295,32 @@ function DefaultAd({
|
|
|
243
295
|
const hasActiveNamePart = Boolean(
|
|
244
296
|
interaction?.fields?.firstName?.active || interaction?.fields?.lastName?.active
|
|
245
297
|
);
|
|
246
|
-
|
|
298
|
+
const orderedBlocks = normalizeDefaultAdLayoutOrder(layoutOrder, type);
|
|
299
|
+
const visibleBlocks = {
|
|
300
|
+
icon: Boolean(icon),
|
|
301
|
+
intro: hasVisualFirst,
|
|
302
|
+
title: hasVisualSecond,
|
|
303
|
+
name: hasVisualName || showEmptyNamePlaceholder,
|
|
304
|
+
dates: Boolean(contact.showBirthDate && (contact.birthDate || interaction?.fields?.birthDate?.active) || contact.showDeathDate && (contact.deathDate || interaction?.fields?.deathDate?.active)),
|
|
305
|
+
deceased: type === "obituaries" && Boolean(text.deceased || interaction?.fields?.deceased?.active),
|
|
306
|
+
memorial: type === "obituaries" && Boolean(text.memorial || interaction?.fields?.memorial?.active),
|
|
307
|
+
sender: Boolean(text.sender || interaction?.fields?.sender?.active),
|
|
308
|
+
church: type === "obituaries" && ceremonyCode !== "NoCeremony" && Boolean(
|
|
309
|
+
contact.showChurch && (contact.church || interaction?.fields?.church?.active) || contact.showFuneralDate && (contact.funeralDate || interaction?.fields?.funeralDate?.active)
|
|
310
|
+
),
|
|
311
|
+
ceremony: type === "thanks" && Boolean(text.ceremony || interaction?.fields?.ceremony?.active),
|
|
312
|
+
message: type === "thanks" && Boolean(text.message || interaction?.fields?.message?.active),
|
|
313
|
+
thanks: Boolean(text.thanks || interaction?.fields?.thanks?.active),
|
|
314
|
+
donation: Boolean(text.donation || interaction?.fields?.donation?.active)
|
|
315
|
+
};
|
|
316
|
+
const visibleOrder = orderedBlocks.filter((block) => visibleBlocks[block]);
|
|
317
|
+
const firstVisibleBlock = visibleOrder[0];
|
|
318
|
+
const previousVisibleBlock = (block) => visibleOrder[visibleOrder.indexOf(block) - 1];
|
|
319
|
+
const blockMargin = (block, margin) => firstVisibleBlock === block ? 0 : margin;
|
|
320
|
+
const firstMargin = previousVisibleBlock("intro") === "icon" ? spacing.iconToText : spacing.introToTitle;
|
|
321
|
+
const secondMargin = previousVisibleBlock("title") === "icon" ? spacing.iconToText : spacing.introToTitle;
|
|
322
|
+
const nameMargin = previousVisibleBlock("name") === "icon" ? spacing.iconToName : spacing.textToName;
|
|
323
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
247
324
|
"div",
|
|
248
325
|
{
|
|
249
326
|
...htmlProps,
|
|
@@ -264,8 +341,8 @@ function DefaultAd({
|
|
|
264
341
|
...typography.fontFamily != null ? { fontFamily: typography.fontFamily } : {},
|
|
265
342
|
...rootStyle
|
|
266
343
|
},
|
|
267
|
-
children: [
|
|
268
|
-
icon ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "gda-icon", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
344
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(OrderedBlocks, { order: orderedBlocks, renderBlock, children: [
|
|
345
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(AdBlock, { block: "icon", children: icon ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "gda-icon", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
269
346
|
"svg",
|
|
270
347
|
{
|
|
271
348
|
className: icon.className,
|
|
@@ -278,28 +355,28 @@ function DefaultAd({
|
|
|
278
355
|
"aria-hidden": icon.title ? void 0 : true,
|
|
279
356
|
dangerouslySetInnerHTML: { __html: decodeSvgMarkup(icon.svg) }
|
|
280
357
|
}
|
|
281
|
-
) }) : null,
|
|
282
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
358
|
+
) }) : null }),
|
|
359
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(AdBlock, { block: "intro", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
283
360
|
Text,
|
|
284
361
|
{
|
|
285
362
|
field: type === "thanks" ? "thanksIntro" : "intro",
|
|
286
363
|
interaction,
|
|
287
364
|
className: `${type === "thanks" ? "gda-bold" : ""} gda-break`,
|
|
288
|
-
style: textStyle(type === "thanks" ? 14 : typography.introSize, typography.introLeading, firstMargin),
|
|
365
|
+
style: textStyle(type === "thanks" ? 14 : typography.introSize, typography.introLeading, blockMargin("intro", firstMargin)),
|
|
289
366
|
children: type === "thanks" && first ? first : type === "obituaries" ? first : null
|
|
290
367
|
}
|
|
291
|
-
),
|
|
292
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { field: type === "thanks" ? "briefIntroduction" : "title", interaction, className: "gda-break", style: textStyle(typography.titleSize, typography.titleLeading, secondMargin), children: type === "thanks" && second ? fmt.lowercaseFirst(second) : type === "obituaries" ? second : null }),
|
|
293
|
-
hasName && !interaction?.fields?.firstName?.active && !interaction?.fields?.lastName?.active ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { className: "gda-name gda-bold gda-secondary-font", style: { ...textStyle(typography.nameSize, typography.nameLeading, nameMargin), ...secondaryFontStyle }, children: [contact.firstName, contact.lastName].filter(Boolean).join(" ") }) : hasName || hasActiveNamePart ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "gda-name gda-bold gda-secondary-font", style: { ...textStyle(typography.nameSize, typography.nameLeading, nameMargin), ...secondaryFontStyle }, children: [
|
|
368
|
+
) }),
|
|
369
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(AdBlock, { block: "title", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { field: type === "thanks" ? "briefIntroduction" : "title", interaction, className: "gda-break", style: textStyle(typography.titleSize, typography.titleLeading, blockMargin("title", secondMargin)), children: type === "thanks" && second ? fmt.lowercaseFirst(second) : type === "obituaries" ? second : null }) }),
|
|
370
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(AdBlock, { block: "name", children: hasName && !interaction?.fields?.firstName?.active && !interaction?.fields?.lastName?.active ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { className: "gda-name gda-bold gda-secondary-font", style: { ...textStyle(typography.nameSize, typography.nameLeading, blockMargin("name", nameMargin)), ...secondaryFontStyle }, children: [contact.firstName, contact.lastName].filter(Boolean).join(" ") }) : hasName || hasActiveNamePart ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "gda-name gda-bold gda-secondary-font", style: { ...textStyle(typography.nameSize, typography.nameLeading, blockMargin("name", nameMargin)), ...secondaryFontStyle }, children: [
|
|
294
371
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(NamePart, { field: "firstName", value: contact.firstName, interaction, showPlaceholder: hasActiveNamePart }),
|
|
295
372
|
" ",
|
|
296
373
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(NamePart, { field: "lastName", value: contact.lastName, interaction, showPlaceholder: hasActiveNamePart })
|
|
297
|
-
] }) : showEmptyNamePlaceholder ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "gda-placeholder gda-name gda-bold gda-secondary-font", style: { ...textStyle(typography.nameSize, typography.nameLeading, nameMargin), ...secondaryFontStyle }, children: emptyNamePlaceholder }) : null,
|
|
298
|
-
contact.showBirthDate && (contact.birthDate || interaction?.fields?.birthDate?.active) || contact.showDeathDate && (contact.deathDate || interaction?.fields?.deathDate?.active) ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
374
|
+
] }) : showEmptyNamePlaceholder ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "gda-placeholder gda-name gda-bold gda-secondary-font", style: { ...textStyle(typography.nameSize, typography.nameLeading, blockMargin("name", nameMargin)), ...secondaryFontStyle }, children: emptyNamePlaceholder }) : null }),
|
|
375
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(AdBlock, { block: "dates", children: contact.showBirthDate && (contact.birthDate || interaction?.fields?.birthDate?.active) || contact.showDeathDate && (contact.deathDate || interaction?.fields?.deathDate?.active) ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
299
376
|
"div",
|
|
300
377
|
{
|
|
301
378
|
className: `gda-dates ${isSingleColumn ? "gda-dates-single" : ""}`,
|
|
302
|
-
style: { marginTop: `${spacing.dateTop}pt`, lineHeight: `${typography.dateLeading}pt`, ...isSingleColumn ? { gap: `${spacing.dateTop}pt` } : {} },
|
|
379
|
+
style: { marginTop: `${blockMargin("dates", spacing.dateTop)}pt`, lineHeight: `${typography.dateLeading}pt`, ...isSingleColumn ? { gap: `${spacing.dateTop}pt` } : {} },
|
|
303
380
|
children: [
|
|
304
381
|
contact.showBirthDate && (contact.birthDate || interaction?.fields?.birthDate?.active) ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { "data-default-ad-field": "birthDate", ...fieldEvents("birthDate", interaction), className: interaction?.fields?.birthDate?.active ? interaction.fields.birthDate.className : void 0, style: { fontSize: `${contact.birthDate && fmt.date(contact.birthDate).length > 10 ? typography.longDateSize : typography.dateSize}pt`, ...contact.birthDate && fmt.date(contact.birthDate).length > 10 ? { letterSpacing: typography.longDateLetterSpacing } : {}, ...interaction?.fields?.birthDate?.active ? interaction.fields.birthDate.style : {} }, children: [
|
|
305
382
|
"\u273B ",
|
|
@@ -312,31 +389,29 @@ function DefaultAd({
|
|
|
312
389
|
] }) : null
|
|
313
390
|
]
|
|
314
391
|
}
|
|
315
|
-
) : null,
|
|
316
|
-
type === "obituaries" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { field: "deceased", interaction, className: "gda-balance", style: textStyle(typography.bodySize, typography.bodyLeading, spacing.deceasedTop), children: text.deceased }) : null,
|
|
317
|
-
type === "obituaries" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { field: "memorial", interaction, className: "gda-italic gda-break", style: textStyle(typography.memorialSize, typography.memorialLeading, spacing.memorialTop), children: text.memorial }) : null,
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
392
|
+
) : null }),
|
|
393
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(AdBlock, { block: "deceased", children: type === "obituaries" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { field: "deceased", interaction, className: "gda-balance", style: textStyle(typography.bodySize, typography.bodyLeading, blockMargin("deceased", spacing.deceasedTop)), children: text.deceased }) : null }),
|
|
394
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(AdBlock, { block: "memorial", children: type === "obituaries" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { field: "memorial", interaction, className: "gda-italic gda-break", style: textStyle(typography.memorialSize, typography.memorialLeading, blockMargin("memorial", spacing.memorialTop)), children: text.memorial }) : null }),
|
|
395
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(AdBlock, { block: "sender", children: [
|
|
396
|
+
type === "obituaries" && (text.sender || interaction?.fields?.sender?.active) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { field: "sender", interaction, className: "gda-bold gda-secondary-font", style: { ...textStyle(typography.senderSize, typography.senderLeading, blockMargin("sender", spacing.senderTop)), ...secondaryFontStyle }, children: text.sender }) : null,
|
|
397
|
+
type === "thanks" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { field: "sender", interaction, className: "gda-secondary-font", style: { ...textStyle(typography.senderSize, typography.senderLeading, blockMargin("sender", spacing.thanksTop)), ...secondaryFontStyle }, children: text.sender }) : null
|
|
398
|
+
] }),
|
|
399
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(AdBlock, { block: "church", children: type === "obituaries" && ceremonyCode !== "NoCeremony" && (contact.showChurch || contact.showFuneralDate) && (contact.church || contact.funeralDate || interaction?.fields?.church?.active || interaction?.fields?.funeralDate?.active) ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "gda-text", style: textStyle(typography.ceremonySize, typography.ceremonyLeading, blockMargin("church", spacing.ceremonyTop)), children: [
|
|
400
|
+
contact.showChurch && (contact.church || interaction?.fields?.church?.active) ? contact.church ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { "data-default-ad-field": "church", ...fieldEvents("church", interaction), className: "gda-whitespace-pre-line", children: contact.church.length > 15 ? `${ceremonyLabel ?? ""}
|
|
401
|
+
${contact.church}` : `${ceremonyLabel ?? ""} ${contact.church}`.trim() }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InlinePlaceholder, { field: "church", interaction }) : null,
|
|
402
|
+
contact.showFuneralDate && (contact.funeralDate || interaction?.fields?.funeralDate?.active) ? contact.funeralDate ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { "data-default-ad-field": "funeralDate", ...fieldEvents("funeralDate", interaction), children: fmt.funeralDate(contact.funeralDate, Boolean(contact.hideFuneralYear)) }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InlinePlaceholder, { field: "funeralDate", interaction }) : null
|
|
403
|
+
] }) : null }),
|
|
404
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(AdBlock, { block: "ceremony", children: type === "thanks" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { field: "ceremony", interaction, className: "gda-break", style: textStyle(typography.bodySize, typography.bodyLeading, blockMargin("ceremony", spacing.thanksTop)), children: text.ceremony ? fmt.lowercaseFirst(text.ceremony) : null }) : null }),
|
|
405
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(AdBlock, { block: "message", children: type === "thanks" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { field: "message", interaction, className: "gda-break", style: textStyle(typography.bodySize, typography.bodyLeading, blockMargin("message", spacing.thanksTop)), children: text.message }) : null }),
|
|
406
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(AdBlock, { block: "thanks", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { field: "thanks", interaction, className: "gda-break", style: textStyle(typography.thanksSize, typography.thanksLeading, blockMargin("thanks", spacing.thanksTop)), children: text.thanks }) }),
|
|
407
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(AdBlock, { block: "donation", children: [
|
|
408
|
+
text.donation ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "gda-divider", style: { marginTop: `${blockMargin("donation", spacing.donationTop)}pt` } }) : null,
|
|
409
|
+
text.donation || interaction?.fields?.donation?.active ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { field: "donation", interaction, className: "gda-donation gda-break", style: textStyle(typography.donationSize, typography.donationLeading, blockMargin("donation", spacing.donationTop)), children: text.donation }) : null
|
|
410
|
+
] })
|
|
411
|
+
] })
|
|
330
412
|
}
|
|
331
413
|
);
|
|
332
414
|
}
|
|
333
|
-
function calculateHeaderMargins({ first, second, hasName, hasIcon, spacing }) {
|
|
334
|
-
return {
|
|
335
|
-
firstMargin: first && hasIcon ? spacing.iconToText : 0,
|
|
336
|
-
secondMargin: second ? first ? spacing.introToTitle : hasIcon ? spacing.iconToText : 0 : 0,
|
|
337
|
-
nameMargin: hasName ? first || second ? spacing.textToName : hasIcon ? spacing.iconToName : 0 : 0
|
|
338
|
-
};
|
|
339
|
-
}
|
|
340
415
|
function NamePart({ field, value, interaction, showPlaceholder }) {
|
|
341
416
|
const state = interaction?.fields?.[field];
|
|
342
417
|
if (!value && !showPlaceholder) return null;
|
|
@@ -352,16 +427,48 @@ function NamePart({ field, value, interaction, showPlaceholder }) {
|
|
|
352
427
|
}
|
|
353
428
|
);
|
|
354
429
|
}
|
|
355
|
-
function
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
430
|
+
function InlinePlaceholder({ field, interaction }) {
|
|
431
|
+
const state = interaction?.fields?.[field];
|
|
432
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
433
|
+
"span",
|
|
434
|
+
{
|
|
435
|
+
"data-default-ad-field": field,
|
|
436
|
+
...fieldEvents(field, interaction),
|
|
437
|
+
className: `gda-field-active-inline ${state?.className ?? ""}`.trim(),
|
|
438
|
+
style: state?.style,
|
|
439
|
+
children: state?.placeholder
|
|
440
|
+
}
|
|
441
|
+
) });
|
|
442
|
+
}
|
|
443
|
+
function AdBlock({ block, children, renderBlock, index = 0 }) {
|
|
444
|
+
let node = children;
|
|
445
|
+
if (node === null || node === void 0 || node === false) return null;
|
|
446
|
+
if ((0, import_react.isValidElement)(children) && children.type !== import_react.Fragment) {
|
|
447
|
+
node = (0, import_react.cloneElement)(children, { "data-default-ad-block": block });
|
|
448
|
+
}
|
|
449
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: renderBlock ? renderBlock(block, node, index) : node });
|
|
450
|
+
}
|
|
451
|
+
function OrderedBlocks({ order, renderBlock, children }) {
|
|
452
|
+
const blocks = new Map(
|
|
453
|
+
import_react.Children.toArray(children).map((child) => {
|
|
454
|
+
const element = child;
|
|
455
|
+
return [element.props.block, element];
|
|
456
|
+
})
|
|
457
|
+
);
|
|
458
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: order.map((block, index) => {
|
|
459
|
+
const element = blocks.get(block);
|
|
460
|
+
return element ? (0, import_react.cloneElement)(element, { key: block, renderBlock, index }) : null;
|
|
461
|
+
}) });
|
|
360
462
|
}
|
|
361
463
|
// Annotate the CommonJS export names for ESM import in node:
|
|
362
464
|
0 && (module.exports = {
|
|
465
|
+
DEFAULT_AD_LAYOUT_ORDER,
|
|
466
|
+
DEFAULT_OBITUARY_LAYOUT_ORDER,
|
|
467
|
+
DEFAULT_THANK_YOU_LAYOUT_ORDER,
|
|
363
468
|
DefaultAd,
|
|
364
469
|
classicDefaultAdStyle,
|
|
470
|
+
defaultAdLayoutOrder,
|
|
471
|
+
normalizeDefaultAdLayoutOrder,
|
|
365
472
|
publicationDefaultAdStyle,
|
|
366
473
|
sharedDefaultAdLayout,
|
|
367
474
|
styleFromLegacyTemplate
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/presets.ts","../src/utils.ts","../src/DefaultAd.tsx"],"sourcesContent":["export { DefaultAd } from \"./DefaultAd\";\nexport { classicDefaultAdStyle, publicationDefaultAdStyle, sharedDefaultAdLayout, styleFromLegacyTemplate } from \"./presets\";\nexport type {\n DefaultAdContact,\n DefaultAdData,\n DefaultAdFormatters,\n DefaultAdField,\n DefaultAdFieldState,\n DefaultAdInteraction,\n DefaultAdIcon,\n DefaultAdMode,\n DefaultAdProps,\n DefaultAdSpacing,\n DefaultAdStyle,\n DefaultAdTextFields,\n DefaultAdType,\n DefaultAdVariant,\n DefaultAdTypography,\n LegacyAdTemplate,\n} from \"./types\";\n","import type { DefaultAdStyle, LegacyAdTemplate } from \"./types\";\n\n/**\n * Canonical layout shared by every consumer. Typography is deliberately kept\n * out of this object so applications can still select licensed/dynamic fonts.\n */\nexport const sharedDefaultAdLayout = {\n columnsMm: 86,\n heightMm: null,\n paddingMm: 4,\n horizontalPaddingMm: 2,\n border: false,\n borderWidthPt: 1.4,\n spacing: {\n iconToText: 11,\n introToTitle: 8,\n // These values originated as unitless React styles and therefore retain\n // their established numeric geometry.\n textToName: 4.2,\n iconToName: 4.95,\n dateTop: 5.6,\n deceasedTop: 6,\n memorialTop: 6,\n senderTop: 8,\n ceremonyTop: 8,\n thanksTop: 7,\n donationTop: 7,\n sectionGapMm: 0,\n },\n} as const satisfies Readonly<DefaultAdStyle>;\n\nexport const classicDefaultAdStyle: Readonly<DefaultAdStyle> = {\n ...sharedDefaultAdLayout,\n typography: {\n fontFamily: \"var(--default-ad-font-primary, Schoolbook, Georgia, serif)\",\n secondaryFontFamily: \"var(--default-ad-font-secondary, Schoolbook, Georgia, serif)\",\n introSize: 10,\n introLeading: 12,\n titleSize: 10,\n titleLeading: 12,\n nameSize: 14,\n nameLeading: 16.8,\n dateSize: 10,\n longDateSize: 10,\n longDateLetterSpacing: \"-0.01em\",\n dateLeading: 12,\n bodySize: 10,\n bodyLeading: 12,\n memorialSize: 10,\n memorialLeading: 12,\n senderSize: 10,\n senderLeading: 12,\n ceremonySize: 10,\n ceremonyLeading: 12,\n thanksSize: 10,\n thanksLeading: 12,\n donationSize: 10,\n donationLeading: 12,\n },\n};\n\nexport const publicationDefaultAdStyle: Readonly<DefaultAdStyle> = {\n ...sharedDefaultAdLayout,\n typography: {\n ...classicDefaultAdStyle.typography,\n fontFamily: \"var(--default-ad-font-primary, Raleway, Arial, sans-serif)\",\n secondaryFontFamily: \"var(--default-ad-font-secondary, Athelas, Georgia, serif)\",\n introSize: 11,\n introLeading: 13,\n titleSize: 11,\n titleLeading: 13,\n nameSize: 17,\n nameLeading: 15,\n dateSize: 11.5,\n longDateSize: 11,\n longDateLetterSpacing: \"-0.01em\",\n bodySize: 12,\n bodyLeading: 13,\n memorialSize: 12,\n memorialLeading: 13,\n senderSize: 13,\n senderLeading: 13,\n ceremonySize: 11,\n ceremonyLeading: 13,\n thanksSize: 11,\n thanksLeading: 13,\n donationSize: 11,\n donationLeading: 13,\n },\n};\n\nexport function styleFromLegacyTemplate(template?: LegacyAdTemplate | null): DefaultAdStyle {\n if (!template) return publicationDefaultAdStyle;\n return {\n ...publicationDefaultAdStyle,\n typography: {\n ...publicationDefaultAdStyle.typography,\n fontFamily: template.font1 || publicationDefaultAdStyle.typography?.fontFamily,\n secondaryFontFamily: template.font2 || publicationDefaultAdStyle.typography?.secondaryFontFamily,\n introSize: template.introSize,\n introLeading: template.introLeading,\n titleSize: template.titleSize,\n titleLeading: template.titleLeading,\n nameSize: template.fullnameSize,\n nameLeading: template.fullnameLeading,\n ...fontPair(template.deceasedText, \"bodySize\", \"bodyLeading\"),\n ...fontPair(template.memorialText, \"memorialSize\", \"memorialLeading\"),\n ...fontPair(template.senderText, \"senderSize\", \"senderLeading\"),\n ...fontPair(template.ceremonyText, \"ceremonySize\", \"ceremonyLeading\"),\n ...fontPair(template.thanksText, \"thanksSize\", \"thanksLeading\"),\n ...fontPair(template.donationText, \"donationSize\", \"donationLeading\"),\n ...tracking(template.longDatesText),\n },\n };\n}\n\nfunction fontPair(value: string | undefined, sizeKey: string, leadingKey: string): Record<string, number> {\n if (!value) return {};\n const size = value.match(/text-\\[(-?[\\d.]+)pt\\]/)?.[1];\n const leading = value.match(/leading-\\[(-?[\\d.]+)pt\\]/)?.[1];\n return {\n ...(size ? { [sizeKey]: Number(size) } : {}),\n ...(leading ? { [leadingKey]: Number(leading) } : {}),\n };\n}\n\nfunction tracking(value: string | undefined): { longDateLetterSpacing?: string } {\n const amount = value?.match(/tracking-\\[([^\\]]+)\\]/)?.[1];\n return amount ? { longDateLetterSpacing: amount } : {};\n}\n","import type { DefaultAdFormatters } from \"./types\";\n\nexport const defaultFormatters: Required<DefaultAdFormatters> = {\n date(value) {\n const match = value.match(/^(\\d{4})-(\\d{2})-(\\d{2})/);\n return match ? `${match[3]}.${match[2]}.${match[1]}` : value;\n },\n funeralDate(value, hideYear) {\n if (!hideYear) return value;\n return value.replace(/([.\\/-])\\d{4}(?=\\D|$)/, \"\");\n },\n lowercaseFirst(value) {\n return value ? value.charAt(0).toLocaleLowerCase() + value.slice(1) : value;\n },\n};\n\nexport function mergeDefined<T extends object>(base: T, overrides?: Partial<T>): T {\n if (!overrides) return { ...base };\n return Object.fromEntries(\n Object.entries({ ...base, ...overrides }).filter(([, value]) => value !== undefined),\n ) as T;\n}\n\nexport function decodeSvgMarkup(value: string): string {\n return value\n .replace(/</g, \"<\")\n .replace(/>/g, \">\")\n .replace(/"/g, '\"')\n .replace(/&#(?:0*39|x0*27);/gi, \"'\")\n .replace(/&/g, \"&\");\n}\n","import type { CSSProperties, ReactNode } from \"react\";\nimport { classicDefaultAdStyle } from \"./presets\";\nimport type { DefaultAdField, DefaultAdInteraction, DefaultAdProps, DefaultAdSpacing, DefaultAdTypography } from \"./types\";\nimport { decodeSvgMarkup, defaultFormatters, mergeDefined } from \"./utils\";\nimport \"./styles.css\";\n\nfunction textStyle(size: number, leading: number, marginTop: number): CSSProperties {\n return { fontSize: `${size}pt`, lineHeight: `${leading}pt`, marginTop: `${marginTop}pt` };\n}\n\nfunction Text({ children, className = \"\", style, field, interaction }: { children?: ReactNode; className?: string; style: CSSProperties; field?: DefaultAdField; interaction?: DefaultAdInteraction }) {\n const fieldState = field ? interaction?.fields?.[field] : undefined;\n const empty = children === null || children === undefined || children === \"\";\n if (empty && !fieldState?.active) return null;\n const events = field ? fieldEvents(field, interaction) : {};\n if (empty) {\n return <div className=\"gda-field-placeholder-container\"><div data-default-ad-field={field} className={`gda-text gda-field-empty ${className} ${fieldState?.className ?? \"\"}`.trim()} style={{ ...style, ...fieldState?.style }} {...events}>{fieldState?.placeholder}</div></div>;\n }\n return <div data-default-ad-field={field} className={`gda-text ${className} ${fieldState?.active ? fieldState.className ?? \"\" : \"\"}`.trim()} style={{ ...style, ...(fieldState?.active ? fieldState.style : undefined) }} {...events}>{children}</div>;\n}\n\nfunction fieldEvents(field: DefaultAdField, interaction?: DefaultAdInteraction) {\n return {\n onFocus: interaction?.onFieldFocus ? () => interaction.onFieldFocus?.(field) : undefined,\n onBlur: interaction?.onFieldBlur ? () => interaction.onFieldBlur?.(field) : undefined,\n onClick: interaction?.onFieldClick ? () => interaction.onFieldClick?.(field) : undefined,\n };\n}\n\nexport function DefaultAd({\n data,\n style,\n mode = \"published\",\n variant = \"classic\",\n rootRef,\n interaction,\n formatters,\n showEmptyNamePlaceholder = mode === \"builder\",\n emptyNamePlaceholder = \"Fornavn Efternavn\",\n className = \"\",\n rootStyle,\n ...htmlProps\n}: DefaultAdProps) {\n const typography = mergeDefined(\n classicDefaultAdStyle.typography as Required<DefaultAdTypography>,\n style?.typography,\n );\n const spacing = mergeDefined(\n classicDefaultAdStyle.spacing as Required<DefaultAdSpacing>,\n style?.spacing,\n );\n const layout = mergeDefined(classicDefaultAdStyle, style);\n const fmt = { ...defaultFormatters, ...formatters };\n const { contact, text, icon, type } = data;\n const hasName = Boolean(contact.firstName || contact.lastName);\n const first = type === \"thanks\" ? text.thanksIntro : text.intro;\n const second = type === \"thanks\" ? text.briefIntroduction : text.title;\n const firstField = type === \"thanks\" ? \"thanksIntro\" : \"intro\";\n const secondField = type === \"thanks\" ? \"briefIntroduction\" : \"title\";\n const hasVisualFirst = Boolean(first || interaction?.fields?.[firstField]?.active);\n const hasVisualSecond = Boolean(second || interaction?.fields?.[secondField]?.active);\n const hasVisualName = hasName || Boolean(interaction?.fields?.firstName?.active || interaction?.fields?.lastName?.active);\n const headerMargins = calculateHeaderMargins({\n first: hasVisualFirst, second: hasVisualSecond, hasName: hasVisualName, hasIcon: Boolean(icon), spacing,\n });\n const { firstMargin, secondMargin, nameMargin } = headerMargins;\n const isSingleColumn = Number(layout.columnsMm) === 41;\n const ceremonyCode = contact.ceremony?.code;\n const ceremonyLabel = contact.ceremony?.label ?? ceremonyCode;\n const secondaryFontStyle: CSSProperties = typography.secondaryFontFamily != null\n ? { fontFamily: typography.secondaryFontFamily }\n : {};\n const hasActiveNamePart = Boolean(\n interaction?.fields?.firstName?.active || interaction?.fields?.lastName?.active,\n );\n\n return (\n <div\n {...htmlProps}\n ref={rootRef}\n data-default-ad=\"\"\n data-ad-content=\"\"\n data-ad-ready=\"true\"\n data-mode={mode}\n data-variant={variant}\n className={`gda-root ${className}`.trim()}\n style={{\n width: `${layout.columnsMm}mm`,\n minWidth: `${layout.columnsMm}mm`,\n ...(layout.heightMm != null ? { height: `${layout.heightMm}mm` } : {}),\n padding: `${layout.paddingMm}mm ${layout.horizontalPaddingMm}mm`,\n border: layout.border ? `${layout.borderWidthPt}pt solid black` : 0,\n gap: `${spacing.sectionGapMm}mm`,\n ...(typography.fontFamily != null ? { fontFamily: typography.fontFamily } : {}),\n ...rootStyle,\n }}\n >\n {icon ? (\n <div className=\"gda-icon\">\n <svg className={icon.className} xmlns=\"http://www.w3.org/2000/svg\"\n width={Number(icon.width) + 16} height={Number(icon.height) + 16}\n viewBox={icon.viewBox} role={icon.title ? \"img\" : undefined} aria-label={icon.title} aria-hidden={icon.title ? undefined : true}\n dangerouslySetInnerHTML={{ __html: decodeSvgMarkup(icon.svg) }} />\n </div>\n ) : null}\n\n <Text field={type === \"thanks\" ? \"thanksIntro\" : \"intro\"} interaction={interaction} className={`${type === \"thanks\" ? \"gda-bold\" : \"\"} gda-break`}\n style={textStyle(type === \"thanks\" ? 14 : typography.introSize, typography.introLeading, firstMargin)}>\n {type === \"thanks\" && first ? first : type === \"obituaries\" ? first : null}\n </Text>\n <Text field={type === \"thanks\" ? \"briefIntroduction\" : \"title\"} interaction={interaction} className=\"gda-break\" style={textStyle(typography.titleSize, typography.titleLeading, secondMargin)}>\n {type === \"thanks\" && second ? fmt.lowercaseFirst(second) : type === \"obituaries\" ? second : null}\n </Text>\n\n {hasName && !interaction?.fields?.firstName?.active && !interaction?.fields?.lastName?.active ? (\n <Text className=\"gda-name gda-bold gda-secondary-font\" style={{ ...textStyle(typography.nameSize, typography.nameLeading, nameMargin), ...secondaryFontStyle }}>\n {[contact.firstName, contact.lastName].filter(Boolean).join(\" \")}\n </Text>\n ) : hasName || hasActiveNamePart ? (\n <div className=\"gda-name gda-bold gda-secondary-font\" style={{ ...textStyle(typography.nameSize, typography.nameLeading, nameMargin), ...secondaryFontStyle }}>\n <NamePart field=\"firstName\" value={contact.firstName} interaction={interaction} showPlaceholder={hasActiveNamePart} />{\" \"}\n <NamePart field=\"lastName\" value={contact.lastName} interaction={interaction} showPlaceholder={hasActiveNamePart} />\n </div>\n ) : showEmptyNamePlaceholder ? <div className=\"gda-placeholder gda-name gda-bold gda-secondary-font\" style={{ ...textStyle(typography.nameSize, typography.nameLeading, nameMargin), ...secondaryFontStyle }}>{emptyNamePlaceholder}</div> : null}\n\n {(contact.showBirthDate && (contact.birthDate || interaction?.fields?.birthDate?.active)) || (contact.showDeathDate && (contact.deathDate || interaction?.fields?.deathDate?.active)) ? (\n <div className={`gda-dates ${isSingleColumn ? \"gda-dates-single\" : \"\"}`}\n style={{ marginTop: `${spacing.dateTop}pt`, lineHeight: `${typography.dateLeading}pt`, ...(isSingleColumn ? { gap: `${spacing.dateTop}pt` } : {}) }}>\n {contact.showBirthDate && (contact.birthDate || interaction?.fields?.birthDate?.active) ? (\n <span data-default-ad-field=\"birthDate\" {...fieldEvents(\"birthDate\", interaction)} className={interaction?.fields?.birthDate?.active ? interaction.fields.birthDate.className : undefined} style={{ fontSize: `${contact.birthDate && fmt.date(contact.birthDate).length > 10 ? typography.longDateSize : typography.dateSize}pt`, ...(contact.birthDate && fmt.date(contact.birthDate).length > 10 ? { letterSpacing: typography.longDateLetterSpacing } : {}), ...(interaction?.fields?.birthDate?.active ? interaction.fields.birthDate.style : {}) }}>\n ✻ {contact.birthDate ? fmt.date(contact.birthDate) : interaction?.fields?.birthDate?.placeholder}\n </span>\n ) : null}\n {contact.showDeathDate && (contact.deathDate || interaction?.fields?.deathDate?.active) ? (\n <span data-default-ad-field=\"deathDate\" {...fieldEvents(\"deathDate\", interaction)} className={interaction?.fields?.deathDate?.active ? interaction.fields.deathDate.className : undefined} style={{ fontSize: `${contact.deathDate && fmt.date(contact.deathDate).length > 10 ? typography.longDateSize : typography.dateSize}pt`, ...(contact.deathDate && fmt.date(contact.deathDate).length > 10 ? { letterSpacing: typography.longDateLetterSpacing } : {}), ...(interaction?.fields?.deathDate?.active ? interaction.fields.deathDate.style : {}) }}>\n <span className=\"gda-death-cross\" aria-hidden=\"true\">✝︎</span> {contact.deathDate ? fmt.date(contact.deathDate) : interaction?.fields?.deathDate?.placeholder}\n </span>\n ) : null}\n </div>\n ) : null}\n\n {type === \"obituaries\" ? <Text field=\"deceased\" interaction={interaction} className=\"gda-balance\" style={textStyle(typography.bodySize, typography.bodyLeading, spacing.deceasedTop)}>{text.deceased}</Text> : null}\n {type === \"obituaries\" ? <Text field=\"memorial\" interaction={interaction} className=\"gda-italic gda-break\" style={textStyle(typography.memorialSize, typography.memorialLeading, spacing.memorialTop)}>{text.memorial}</Text> : null}\n {type === \"obituaries\" && (text.sender || interaction?.fields?.sender?.active) ? <Text field=\"sender\" interaction={interaction} className=\"gda-bold gda-secondary-font\" style={{ ...textStyle(typography.senderSize, typography.senderLeading, spacing.senderTop), ...secondaryFontStyle }}>{text.sender}</Text> : null}\n\n {type === \"obituaries\" && ceremonyCode !== \"NoCeremony\" && (contact.showChurch || contact.showFuneralDate) && (contact.church || contact.funeralDate || interaction?.fields?.church?.active || interaction?.fields?.funeralDate?.active) ? (\n <div className=\"gda-text\" style={textStyle(typography.ceremonySize, typography.ceremonyLeading, spacing.ceremonyTop)}>\n {contact.showChurch && (contact.church || interaction?.fields?.church?.active) ? <div data-default-ad-field=\"church\" {...fieldEvents(\"church\", interaction)} className={`gda-whitespace-pre-line ${interaction?.fields?.church?.active ? interaction.fields.church.className ?? \"\" : \"\"}`.trim()} style={interaction?.fields?.church?.active ? interaction.fields.church.style : undefined}>{contact.church ? (contact.church.length > 15 ? `${ceremonyLabel ?? \"\"} \\n ${contact.church}` : `${ceremonyLabel ?? \"\"} ${contact.church}`.trim()) : interaction?.fields?.church?.placeholder}</div> : null}\n {contact.showFuneralDate && (contact.funeralDate || interaction?.fields?.funeralDate?.active) ? <div data-default-ad-field=\"funeralDate\" {...fieldEvents(\"funeralDate\", interaction)} className={interaction?.fields?.funeralDate?.active ? interaction.fields.funeralDate.className : undefined} style={interaction?.fields?.funeralDate?.active ? interaction.fields.funeralDate.style : undefined}>{contact.funeralDate ? fmt.funeralDate(contact.funeralDate, Boolean(contact.hideFuneralYear)) : interaction?.fields?.funeralDate?.placeholder}</div> : null}\n </div>\n ) : null}\n\n {type === \"thanks\" ? <ThankYouFields text={text} fmt={fmt} typography={typography} spacing={spacing} interaction={interaction} /> : null}\n <Text field=\"thanks\" interaction={interaction} className=\"gda-break\" style={textStyle(typography.thanksSize, typography.thanksLeading, spacing.thanksTop)}>{text.thanks}</Text>\n {type === \"thanks\" ? <Text field=\"sender\" interaction={interaction} className=\"gda-secondary-font\" style={{ ...textStyle(typography.senderSize, typography.senderLeading, spacing.thanksTop), ...secondaryFontStyle }}>{text.sender}</Text> : null}\n {text.donation ? <div className=\"gda-divider\" style={{ marginTop: `${spacing.donationTop}pt` }} /> : null}\n {text.donation || interaction?.fields?.donation?.active ? <Text field=\"donation\" interaction={interaction} className=\"gda-donation gda-break\" style={textStyle(typography.donationSize, typography.donationLeading, spacing.donationTop)}>{text.donation}</Text> : null}\n </div>\n );\n}\n\nfunction calculateHeaderMargins({ first, second, hasName, hasIcon, spacing }: any) {\n return {\n firstMargin: first && hasIcon ? spacing.iconToText : 0,\n secondMargin: second ? (first ? spacing.introToTitle : hasIcon ? spacing.iconToText : 0) : 0,\n nameMargin: hasName ? (first || second ? spacing.textToName : hasIcon ? spacing.iconToName : 0) : 0,\n };\n}\n\nfunction NamePart({ field, value, interaction, showPlaceholder }: { field: \"firstName\" | \"lastName\"; value?: string | null; interaction?: DefaultAdInteraction; showPlaceholder: boolean }) {\n const state = interaction?.fields?.[field];\n if (!value && !showPlaceholder) return null;\n const isPlaceholder = !value;\n return <span\n data-default-ad-field={field}\n {...fieldEvents(field, interaction)}\n className={`${isPlaceholder && !state?.active ? \"gda-placeholder\" : \"\"} ${state?.active ? `gda-name-part-active ${state.className ?? \"\"}` : \"\"}`.trim()}\n style={state?.active ? state.style : undefined}\n >{value || state?.placeholder}</span>;\n}\n\nfunction ThankYouFields({ text, fmt, typography, spacing, interaction }: any) {\n return <>\n <Text field=\"ceremony\" interaction={interaction} className=\"gda-break\" style={textStyle(typography.bodySize, typography.bodyLeading, spacing.thanksTop)}>{text.ceremony ? fmt.lowercaseFirst(text.ceremony) : null}</Text>\n <Text field=\"message\" interaction={interaction} className=\"gda-break\" style={textStyle(typography.bodySize, typography.bodyLeading, spacing.th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AU,QAAQ,QAAQ,eAAe,UAAU,QAAQ,aAAa,IAAK;AAAA,IAC3F,YAAY,UAAW,SAAS,SAAS,QAAQ,aAAa,UAAU,QAAQ,aAAa,IAAK;AAAA,EACpG;AACF;AAEA,SAAS,SAAS,EAAE,OAAO,OAAO,aAAa,gBAAgB,GAA6H;AAC1L,QAAM,QAAQ,aAAa,SAAS,KAAK;AACzC,MAAI,CAAC,SAAS,CAAC,gBAAiB,QAAO;AACvC,QAAM,gBAAgB,CAAC;AACvB,SAAO;AAAA,IAAC;AAAA;AAAA,MACN,yBAAuB;AAAA,MACtB,GAAG,YAAY,OAAO,WAAW;AAAA,MAClC,WAAW,GAAG,iBAAiB,CAAC,OAAO,SAAS,oBAAoB,EAAE,IAAI,OAAO,SAAS,wBAAwB,MAAM,aAAa,EAAE,KAAK,EAAE,GAAG,KAAK;AAAA,MACtJ,OAAO,OAAO,SAAS,MAAM,QAAQ;AAAA,MACrC,mBAAS,OAAO;AAAA;AAAA,EAAY;AAChC;AAEA,SAAS,eAAe,EAAE,MAAM,KAAK,YAAY,SAAS,YAAY,GAAQ;AAC5E,SAAO,4EACL;AAAA,gDAAC,QAAK,OAAM,YAAW,aAA0B,WAAU,aAAY,OAAO,UAAU,WAAW,UAAU,WAAW,aAAa,QAAQ,SAAS,GAAI,eAAK,WAAW,IAAI,eAAe,KAAK,QAAQ,IAAI,MAAK;AAAA,IACnN,4CAAC,QAAK,OAAM,WAAU,aAA0B,WAAU,aAAY,OAAO,UAAU,WAAW,UAAU,WAAW,aAAa,QAAQ,SAAS,GAAI,eAAK,SAAQ;AAAA,KACxK;AACF;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/DefaultAd.tsx","../src/presets.ts","../src/layout.ts","../src/utils.ts"],"sourcesContent":["export { DefaultAd } from \"./DefaultAd\";\nexport { classicDefaultAdStyle, publicationDefaultAdStyle, sharedDefaultAdLayout, styleFromLegacyTemplate } from \"./presets\";\nexport { DEFAULT_AD_LAYOUT_ORDER, DEFAULT_OBITUARY_LAYOUT_ORDER, DEFAULT_THANK_YOU_LAYOUT_ORDER, defaultAdLayoutOrder, normalizeDefaultAdLayoutOrder } from \"./layout\";\nexport type {\n DefaultAdBlock,\n DefaultAdContact,\n DefaultAdData,\n DefaultAdFormatters,\n DefaultAdField,\n DefaultAdFieldState,\n DefaultAdInteraction,\n DefaultAdIcon,\n DefaultAdMode,\n DefaultAdProps,\n DefaultAdSpacing,\n DefaultAdStyle,\n DefaultAdTextFields,\n DefaultAdType,\n DefaultAdVariant,\n DefaultAdTypography,\n LegacyAdTemplate,\n} from \"./types\";\n","import { Children, cloneElement, Fragment, isValidElement } from \"react\";\nimport type { CSSProperties, ReactElement, ReactNode } from \"react\";\nimport { classicDefaultAdStyle } from \"./presets\";\nimport { normalizeDefaultAdLayoutOrder } from \"./layout\";\nimport type { DefaultAdBlock, DefaultAdField, DefaultAdInteraction, DefaultAdProps, DefaultAdSpacing, DefaultAdTypography } from \"./types\";\nimport { decodeSvgMarkup, defaultFormatters, mergeDefined } from \"./utils\";\nimport \"./styles.css\";\n\nfunction textStyle(size: number, leading: number, marginTop: number): CSSProperties {\n return { fontSize: `${size}pt`, lineHeight: `${leading}pt`, marginTop: `${marginTop}pt` };\n}\n\nfunction Text({ children, className = \"\", style, field, interaction }: { children?: ReactNode; className?: string; style: CSSProperties; field?: DefaultAdField; interaction?: DefaultAdInteraction }) {\n const fieldState = field ? interaction?.fields?.[field] : undefined;\n const empty = children === null || children === undefined || children === \"\";\n if (empty && !fieldState?.active) return null;\n const events = field ? fieldEvents(field, interaction) : {};\n if (empty) {\n return <div className=\"gda-field-placeholder-container\"><div data-default-ad-field={field} className={`gda-text gda-field-empty ${className} ${fieldState?.className ?? \"\"}`.trim()} style={{ ...style, ...fieldState?.style }} {...events}>{fieldState?.placeholder}</div></div>;\n }\n return <div data-default-ad-field={field} className={`gda-text ${className} ${fieldState?.active ? fieldState.className ?? \"\" : \"\"}`.trim()} style={{ ...style, ...(fieldState?.active ? fieldState.style : undefined) }} {...events}>{children}</div>;\n}\n\nfunction fieldEvents(field: DefaultAdField, interaction?: DefaultAdInteraction) {\n return {\n onFocus: interaction?.onFieldFocus ? () => interaction.onFieldFocus?.(field) : undefined,\n onBlur: interaction?.onFieldBlur ? () => interaction.onFieldBlur?.(field) : undefined,\n onClick: interaction?.onFieldClick ? () => interaction.onFieldClick?.(field) : undefined,\n };\n}\n\nexport function DefaultAd({\n data,\n style,\n mode = \"published\",\n variant = \"classic\",\n rootRef,\n interaction,\n formatters,\n showEmptyNamePlaceholder = mode === \"builder\",\n emptyNamePlaceholder = \"Fornavn Efternavn\",\n className = \"\",\n rootStyle,\n layoutOrder,\n renderBlock,\n ...htmlProps\n}: DefaultAdProps) {\n const typography = mergeDefined(\n classicDefaultAdStyle.typography as Required<DefaultAdTypography>,\n style?.typography,\n );\n const spacing = mergeDefined(\n classicDefaultAdStyle.spacing as Required<DefaultAdSpacing>,\n style?.spacing,\n );\n const layout = mergeDefined(classicDefaultAdStyle, style);\n const fmt = { ...defaultFormatters, ...formatters };\n const { contact, text, icon, type } = data;\n const hasName = Boolean(contact.firstName || contact.lastName);\n const first = type === \"thanks\" ? text.thanksIntro : text.intro;\n const second = type === \"thanks\" ? text.briefIntroduction : text.title;\n const firstField = type === \"thanks\" ? \"thanksIntro\" : \"intro\";\n const secondField = type === \"thanks\" ? \"briefIntroduction\" : \"title\";\n const hasVisualFirst = Boolean(first || interaction?.fields?.[firstField]?.active);\n const hasVisualSecond = Boolean(second || interaction?.fields?.[secondField]?.active);\n const hasVisualName = hasName || Boolean(interaction?.fields?.firstName?.active || interaction?.fields?.lastName?.active);\n const isSingleColumn = Number(layout.columnsMm) === 41;\n const ceremonyCode = contact.ceremony?.code;\n const ceremonyLabel = contact.ceremony?.label ?? ceremonyCode;\n const secondaryFontStyle: CSSProperties = typography.secondaryFontFamily != null\n ? { fontFamily: typography.secondaryFontFamily }\n : {};\n const hasActiveNamePart = Boolean(\n interaction?.fields?.firstName?.active || interaction?.fields?.lastName?.active,\n );\n const orderedBlocks = normalizeDefaultAdLayoutOrder(layoutOrder, type);\n const visibleBlocks: Partial<Record<DefaultAdBlock, boolean>> = {\n icon: Boolean(icon), intro: hasVisualFirst, title: hasVisualSecond,\n name: hasVisualName || showEmptyNamePlaceholder,\n dates: Boolean((contact.showBirthDate && (contact.birthDate || interaction?.fields?.birthDate?.active)) || (contact.showDeathDate && (contact.deathDate || interaction?.fields?.deathDate?.active))),\n deceased: type === \"obituaries\" && Boolean(text.deceased || interaction?.fields?.deceased?.active),\n memorial: type === \"obituaries\" && Boolean(text.memorial || interaction?.fields?.memorial?.active),\n sender: Boolean(text.sender || interaction?.fields?.sender?.active),\n church: type === \"obituaries\" && ceremonyCode !== \"NoCeremony\" && Boolean(\n (contact.showChurch && (contact.church || interaction?.fields?.church?.active))\n || (contact.showFuneralDate && (contact.funeralDate || interaction?.fields?.funeralDate?.active)),\n ),\n ceremony: type === \"thanks\" && Boolean(text.ceremony || interaction?.fields?.ceremony?.active),\n message: type === \"thanks\" && Boolean(text.message || interaction?.fields?.message?.active),\n thanks: Boolean(text.thanks || interaction?.fields?.thanks?.active),\n donation: Boolean(text.donation || interaction?.fields?.donation?.active),\n };\n const visibleOrder = orderedBlocks.filter((block) => visibleBlocks[block]);\n const firstVisibleBlock = visibleOrder[0];\n const previousVisibleBlock = (block: DefaultAdBlock) => visibleOrder[visibleOrder.indexOf(block) - 1];\n const blockMargin = (block: DefaultAdBlock, margin: number) => firstVisibleBlock === block ? 0 : margin;\n const firstMargin = previousVisibleBlock(\"intro\") === \"icon\" ? spacing.iconToText : spacing.introToTitle;\n const secondMargin = previousVisibleBlock(\"title\") === \"icon\" ? spacing.iconToText : spacing.introToTitle;\n const nameMargin = previousVisibleBlock(\"name\") === \"icon\" ? spacing.iconToName : spacing.textToName;\n\n return (\n <div\n {...htmlProps}\n ref={rootRef}\n data-default-ad=\"\"\n data-ad-content=\"\"\n data-ad-ready=\"true\"\n data-mode={mode}\n data-variant={variant}\n className={`gda-root ${className}`.trim()}\n style={{\n width: `${layout.columnsMm}mm`,\n minWidth: `${layout.columnsMm}mm`,\n ...(layout.heightMm != null ? { height: `${layout.heightMm}mm` } : {}),\n padding: `${layout.paddingMm}mm ${layout.horizontalPaddingMm}mm`,\n border: layout.border ? `${layout.borderWidthPt}pt solid black` : 0,\n gap: `${spacing.sectionGapMm}mm`,\n ...(typography.fontFamily != null ? { fontFamily: typography.fontFamily } : {}),\n ...rootStyle,\n }}\n >\n <OrderedBlocks order={orderedBlocks} renderBlock={renderBlock}>\n <AdBlock block=\"icon\">{icon ? (\n <div className=\"gda-icon\">\n <svg className={icon.className} xmlns=\"http://www.w3.org/2000/svg\"\n width={Number(icon.width) + 16} height={Number(icon.height) + 16}\n viewBox={icon.viewBox} role={icon.title ? \"img\" : undefined} aria-label={icon.title} aria-hidden={icon.title ? undefined : true}\n dangerouslySetInnerHTML={{ __html: decodeSvgMarkup(icon.svg) }} />\n </div>\n ) : null}</AdBlock>\n\n <AdBlock block=\"intro\">\n <Text field={type === \"thanks\" ? \"thanksIntro\" : \"intro\"} interaction={interaction} className={`${type === \"thanks\" ? \"gda-bold\" : \"\"} gda-break`}\n style={textStyle(type === \"thanks\" ? 14 : typography.introSize, typography.introLeading, blockMargin(\"intro\", firstMargin))}>\n {type === \"thanks\" && first ? first : type === \"obituaries\" ? first : null}\n </Text>\n </AdBlock>\n <AdBlock block=\"title\">\n <Text field={type === \"thanks\" ? \"briefIntroduction\" : \"title\"} interaction={interaction} className=\"gda-break\" style={textStyle(typography.titleSize, typography.titleLeading, blockMargin(\"title\", secondMargin))}>\n {type === \"thanks\" && second ? fmt.lowercaseFirst(second) : type === \"obituaries\" ? second : null}\n </Text>\n </AdBlock>\n\n <AdBlock block=\"name\">\n {hasName && !interaction?.fields?.firstName?.active && !interaction?.fields?.lastName?.active ? (\n <Text className=\"gda-name gda-bold gda-secondary-font\" style={{ ...textStyle(typography.nameSize, typography.nameLeading, blockMargin(\"name\", nameMargin)), ...secondaryFontStyle }}>\n {[contact.firstName, contact.lastName].filter(Boolean).join(\" \")}\n </Text>\n ) : hasName || hasActiveNamePart ? (\n <div className=\"gda-name gda-bold gda-secondary-font\" style={{ ...textStyle(typography.nameSize, typography.nameLeading, blockMargin(\"name\", nameMargin)), ...secondaryFontStyle }}>\n <NamePart field=\"firstName\" value={contact.firstName} interaction={interaction} showPlaceholder={hasActiveNamePart} />{\" \"}\n <NamePart field=\"lastName\" value={contact.lastName} interaction={interaction} showPlaceholder={hasActiveNamePart} />\n </div>\n ) : showEmptyNamePlaceholder ? <div className=\"gda-placeholder gda-name gda-bold gda-secondary-font\" style={{ ...textStyle(typography.nameSize, typography.nameLeading, blockMargin(\"name\", nameMargin)), ...secondaryFontStyle }}>{emptyNamePlaceholder}</div> : null}\n </AdBlock>\n\n <AdBlock block=\"dates\">\n {(contact.showBirthDate && (contact.birthDate || interaction?.fields?.birthDate?.active)) || (contact.showDeathDate && (contact.deathDate || interaction?.fields?.deathDate?.active)) ? (\n <div className={`gda-dates ${isSingleColumn ? \"gda-dates-single\" : \"\"}`}\n style={{ marginTop: `${blockMargin(\"dates\", spacing.dateTop)}pt`, lineHeight: `${typography.dateLeading}pt`, ...(isSingleColumn ? { gap: `${spacing.dateTop}pt` } : {}) }}>\n {contact.showBirthDate && (contact.birthDate || interaction?.fields?.birthDate?.active) ? (\n <span data-default-ad-field=\"birthDate\" {...fieldEvents(\"birthDate\", interaction)} className={interaction?.fields?.birthDate?.active ? interaction.fields.birthDate.className : undefined} style={{ fontSize: `${contact.birthDate && fmt.date(contact.birthDate).length > 10 ? typography.longDateSize : typography.dateSize}pt`, ...(contact.birthDate && fmt.date(contact.birthDate).length > 10 ? { letterSpacing: typography.longDateLetterSpacing } : {}), ...(interaction?.fields?.birthDate?.active ? interaction.fields.birthDate.style : {}) }}>\n ✻ {contact.birthDate ? fmt.date(contact.birthDate) : interaction?.fields?.birthDate?.placeholder}\n </span>\n ) : null}\n {contact.showDeathDate && (contact.deathDate || interaction?.fields?.deathDate?.active) ? (\n <span data-default-ad-field=\"deathDate\" {...fieldEvents(\"deathDate\", interaction)} className={interaction?.fields?.deathDate?.active ? interaction.fields.deathDate.className : undefined} style={{ fontSize: `${contact.deathDate && fmt.date(contact.deathDate).length > 10 ? typography.longDateSize : typography.dateSize}pt`, ...(contact.deathDate && fmt.date(contact.deathDate).length > 10 ? { letterSpacing: typography.longDateLetterSpacing } : {}), ...(interaction?.fields?.deathDate?.active ? interaction.fields.deathDate.style : {}) }}>\n <span className=\"gda-death-cross\" aria-hidden=\"true\">✝︎</span> {contact.deathDate ? fmt.date(contact.deathDate) : interaction?.fields?.deathDate?.placeholder}\n </span>\n ) : null}\n </div>\n ) : null}\n </AdBlock>\n\n <AdBlock block=\"deceased\">\n {type === \"obituaries\" ? <Text field=\"deceased\" interaction={interaction} className=\"gda-balance\" style={textStyle(typography.bodySize, typography.bodyLeading, blockMargin(\"deceased\", spacing.deceasedTop))}>{text.deceased}</Text> : null}\n </AdBlock>\n <AdBlock block=\"memorial\">\n {type === \"obituaries\" ? <Text field=\"memorial\" interaction={interaction} className=\"gda-italic gda-break\" style={textStyle(typography.memorialSize, typography.memorialLeading, blockMargin(\"memorial\", spacing.memorialTop))}>{text.memorial}</Text> : null}\n </AdBlock>\n <AdBlock block=\"sender\">\n {type === \"obituaries\" && (text.sender || interaction?.fields?.sender?.active) ? <Text field=\"sender\" interaction={interaction} className=\"gda-bold gda-secondary-font\" style={{ ...textStyle(typography.senderSize, typography.senderLeading, blockMargin(\"sender\", spacing.senderTop)), ...secondaryFontStyle }}>{text.sender}</Text> : null}\n\n {type === \"thanks\" ? <Text field=\"sender\" interaction={interaction} className=\"gda-secondary-font\" style={{ ...textStyle(typography.senderSize, typography.senderLeading, blockMargin(\"sender\", spacing.thanksTop)), ...secondaryFontStyle }}>{text.sender}</Text> : null}\n </AdBlock>\n\n <AdBlock block=\"church\">\n {type === \"obituaries\" && ceremonyCode !== \"NoCeremony\" && (contact.showChurch || contact.showFuneralDate) && (contact.church || contact.funeralDate || interaction?.fields?.church?.active || interaction?.fields?.funeralDate?.active) ? (\n <div className=\"gda-text\" style={textStyle(typography.ceremonySize, typography.ceremonyLeading, blockMargin(\"church\", spacing.ceremonyTop))}>\n {contact.showChurch && (contact.church || interaction?.fields?.church?.active) ? contact.church ? <div data-default-ad-field=\"church\" {...fieldEvents(\"church\", interaction)} className=\"gda-whitespace-pre-line\">{contact.church.length > 15 ? `${ceremonyLabel ?? \"\"} \\n ${contact.church}` : `${ceremonyLabel ?? \"\"} ${contact.church}`.trim()}</div> : <InlinePlaceholder field=\"church\" interaction={interaction} /> : null}\n {contact.showFuneralDate && (contact.funeralDate || interaction?.fields?.funeralDate?.active) ? contact.funeralDate ? <div data-default-ad-field=\"funeralDate\" {...fieldEvents(\"funeralDate\", interaction)}>{fmt.funeralDate(contact.funeralDate, Boolean(contact.hideFuneralYear))}</div> : <InlinePlaceholder field=\"funeralDate\" interaction={interaction} /> : null}\n </div>\n ) : null}\n </AdBlock>\n\n <AdBlock block=\"ceremony\">{type === \"thanks\" ? <Text field=\"ceremony\" interaction={interaction} className=\"gda-break\" style={textStyle(typography.bodySize, typography.bodyLeading, blockMargin(\"ceremony\", spacing.thanksTop))}>{text.ceremony ? fmt.lowercaseFirst(text.ceremony) : null}</Text> : null}</AdBlock>\n <AdBlock block=\"message\">{type === \"thanks\" ? <Text field=\"message\" interaction={interaction} className=\"gda-break\" style={textStyle(typography.bodySize, typography.bodyLeading, blockMargin(\"message\", spacing.thanksTop))}>{text.message}</Text> : null}</AdBlock>\n <AdBlock block=\"thanks\">\n <Text field=\"thanks\" interaction={interaction} className=\"gda-break\" style={textStyle(typography.thanksSize, typography.thanksLeading, blockMargin(\"thanks\", spacing.thanksTop))}>{text.thanks}</Text>\n </AdBlock>\n <AdBlock block=\"donation\">\n {text.donation ? <div className=\"gda-divider\" style={{ marginTop: `${blockMargin(\"donation\", spacing.donationTop)}pt` }} /> : null}\n {text.donation || interaction?.fields?.donation?.active ? <Text field=\"donation\" interaction={interaction} className=\"gda-donation gda-break\" style={textStyle(typography.donationSize, typography.donationLeading, blockMargin(\"donation\", spacing.donationTop))}>{text.donation}</Text> : null}\n </AdBlock>\n </OrderedBlocks>\n </div>\n );\n}\n\nfunction NamePart({ field, value, interaction, showPlaceholder }: { field: \"firstName\" | \"lastName\"; value?: string | null; interaction?: DefaultAdInteraction; showPlaceholder: boolean }) {\n const state = interaction?.fields?.[field];\n if (!value && !showPlaceholder) return null;\n const isPlaceholder = !value;\n return <span\n data-default-ad-field={field}\n {...fieldEvents(field, interaction)}\n className={`${isPlaceholder && !state?.active ? \"gda-placeholder\" : \"\"} ${state?.active ? `gda-name-part-active ${state.className ?? \"\"}` : \"\"}`.trim()}\n style={state?.active ? state.style : undefined}\n >{value || state?.placeholder}</span>;\n}\n\nfunction InlinePlaceholder({ field, interaction }: { field: DefaultAdField; interaction?: DefaultAdInteraction }) {\n const state = interaction?.fields?.[field];\n return <div><span\n data-default-ad-field={field}\n {...fieldEvents(field, interaction)}\n className={`gda-field-active-inline ${state?.className ?? \"\"}`.trim()}\n style={state?.style}\n >{state?.placeholder}</span></div>;\n}\n\ntype BlockRenderer = DefaultAdProps[\"renderBlock\"];\ntype AdBlockProps = { block: DefaultAdBlock; children: ReactNode; renderBlock?: BlockRenderer; index?: number };\n\nfunction AdBlock({ block, children, renderBlock, index = 0 }: AdBlockProps) {\n let node = children;\n if (node === null || node === undefined || node === false) return null;\n if (isValidElement<Record<string, unknown>>(children) && children.type !== Fragment) {\n node = cloneElement(children, { \"data-default-ad-block\": block });\n }\n return <>{renderBlock ? renderBlock(block, node, index) : node}</>;\n}\n\nfunction OrderedBlocks({ order, renderBlock, children }: { order: readonly DefaultAdBlock[]; renderBlock?: BlockRenderer; children: ReactNode }) {\n const blocks = new Map(\n Children.toArray(children).map((child) => {\n const element = child as ReactElement<AdBlockProps>;\n return [element.props.block, element] as const;\n }),\n );\n return <>{order.map((block, index) => {\n const element = blocks.get(block);\n return element ? cloneElement(element, { key: block, renderBlock, index }) : null;\n })}</>;\n}\n","import type { DefaultAdStyle, LegacyAdTemplate } from \"./types\";\n\n/**\n * Canonical layout shared by every consumer. Typography is deliberately kept\n * out of this object so applications can still select licensed/dynamic fonts.\n */\nexport const sharedDefaultAdLayout = {\n columnsMm: 86,\n heightMm: null,\n paddingMm: 4,\n horizontalPaddingMm: 2,\n border: false,\n borderWidthPt: 1.4,\n spacing: {\n iconToText: 11,\n introToTitle: 8,\n // These values originated as unitless React styles and therefore retain\n // their established numeric geometry.\n textToName: 4.2,\n iconToName: 4.95,\n dateTop: 5.6,\n deceasedTop: 6,\n memorialTop: 6,\n senderTop: 8,\n ceremonyTop: 8,\n thanksTop: 7,\n donationTop: 7,\n sectionGapMm: 0,\n },\n} as const satisfies Readonly<DefaultAdStyle>;\n\nexport const classicDefaultAdStyle: Readonly<DefaultAdStyle> = {\n ...sharedDefaultAdLayout,\n typography: {\n fontFamily: \"var(--default-ad-font-primary, Schoolbook, Georgia, serif)\",\n secondaryFontFamily: \"var(--default-ad-font-secondary, Schoolbook, Georgia, serif)\",\n introSize: 10,\n introLeading: 12,\n titleSize: 10,\n titleLeading: 12,\n nameSize: 14,\n nameLeading: 16.8,\n dateSize: 10,\n longDateSize: 10,\n longDateLetterSpacing: \"-0.01em\",\n dateLeading: 12,\n bodySize: 10,\n bodyLeading: 12,\n memorialSize: 10,\n memorialLeading: 12,\n senderSize: 10,\n senderLeading: 12,\n ceremonySize: 10,\n ceremonyLeading: 12,\n thanksSize: 10,\n thanksLeading: 12,\n donationSize: 10,\n donationLeading: 12,\n },\n};\n\nexport const publicationDefaultAdStyle: Readonly<DefaultAdStyle> = {\n ...sharedDefaultAdLayout,\n typography: {\n ...classicDefaultAdStyle.typography,\n fontFamily: \"var(--default-ad-font-primary, Raleway, Arial, sans-serif)\",\n secondaryFontFamily: \"var(--default-ad-font-secondary, Athelas, Georgia, serif)\",\n introSize: 11,\n introLeading: 13,\n titleSize: 11,\n titleLeading: 13,\n nameSize: 17,\n nameLeading: 15,\n dateSize: 11.5,\n longDateSize: 11,\n longDateLetterSpacing: \"-0.01em\",\n bodySize: 12,\n bodyLeading: 13,\n memorialSize: 12,\n memorialLeading: 13,\n senderSize: 13,\n senderLeading: 13,\n ceremonySize: 11,\n ceremonyLeading: 13,\n thanksSize: 11,\n thanksLeading: 13,\n donationSize: 11,\n donationLeading: 13,\n },\n};\n\nexport function styleFromLegacyTemplate(template?: LegacyAdTemplate | null): DefaultAdStyle {\n if (!template) return publicationDefaultAdStyle;\n return {\n ...publicationDefaultAdStyle,\n typography: {\n ...publicationDefaultAdStyle.typography,\n fontFamily: template.font1 || publicationDefaultAdStyle.typography?.fontFamily,\n secondaryFontFamily: template.font2 || publicationDefaultAdStyle.typography?.secondaryFontFamily,\n introSize: template.introSize,\n introLeading: template.introLeading,\n titleSize: template.titleSize,\n titleLeading: template.titleLeading,\n nameSize: template.fullnameSize,\n nameLeading: template.fullnameLeading,\n ...fontPair(template.deceasedText, \"bodySize\", \"bodyLeading\"),\n ...fontPair(template.memorialText, \"memorialSize\", \"memorialLeading\"),\n ...fontPair(template.senderText, \"senderSize\", \"senderLeading\"),\n ...fontPair(template.ceremonyText, \"ceremonySize\", \"ceremonyLeading\"),\n ...fontPair(template.thanksText, \"thanksSize\", \"thanksLeading\"),\n ...fontPair(template.donationText, \"donationSize\", \"donationLeading\"),\n ...tracking(template.longDatesText),\n },\n };\n}\n\nfunction fontPair(value: string | undefined, sizeKey: string, leadingKey: string): Record<string, number> {\n if (!value) return {};\n const size = value.match(/text-\\[(-?[\\d.]+)pt\\]/)?.[1];\n const leading = value.match(/leading-\\[(-?[\\d.]+)pt\\]/)?.[1];\n return {\n ...(size ? { [sizeKey]: Number(size) } : {}),\n ...(leading ? { [leadingKey]: Number(leading) } : {}),\n };\n}\n\nfunction tracking(value: string | undefined): { longDateLetterSpacing?: string } {\n const amount = value?.match(/tracking-\\[([^\\]]+)\\]/)?.[1];\n return amount ? { longDateLetterSpacing: amount } : {};\n}\n","import type { DefaultAdBlock, DefaultAdType } from \"./types\";\n\nexport const DEFAULT_OBITUARY_LAYOUT_ORDER = [\n \"icon\", \"intro\", \"title\", \"name\", \"dates\", \"deceased\", \"memorial\",\n \"sender\", \"church\", \"thanks\", \"donation\",\n] as const satisfies readonly DefaultAdBlock[];\n\nexport const DEFAULT_THANK_YOU_LAYOUT_ORDER = [\n \"icon\", \"intro\", \"title\", \"name\", \"dates\", \"ceremony\", \"message\",\n \"thanks\", \"sender\", \"donation\",\n] as const satisfies readonly DefaultAdBlock[];\n\nexport const DEFAULT_AD_LAYOUT_ORDER = DEFAULT_OBITUARY_LAYOUT_ORDER;\n\nconst VALID_BLOCKS = new Set<DefaultAdBlock>([\n ...DEFAULT_OBITUARY_LAYOUT_ORDER,\n ...DEFAULT_THANK_YOU_LAYOUT_ORDER,\n]);\n\nexport function defaultAdLayoutOrder(type: DefaultAdType): readonly DefaultAdBlock[] {\n return type === \"thanks\" ? DEFAULT_THANK_YOU_LAYOUT_ORDER : DEFAULT_OBITUARY_LAYOUT_ORDER;\n}\n\nexport function normalizeDefaultAdLayoutOrder(\n order: readonly unknown[] | null | undefined,\n type: DefaultAdType,\n): DefaultAdBlock[] {\n const defaults = defaultAdLayoutOrder(type);\n const applicable = new Set(defaults);\n const seen = new Set<DefaultAdBlock>();\n const normalized: DefaultAdBlock[] = [];\n for (const value of order ?? []) {\n if (typeof value !== \"string\" || !VALID_BLOCKS.has(value as DefaultAdBlock)) continue;\n const block = value as DefaultAdBlock;\n if (!applicable.has(block) || seen.has(block)) continue;\n seen.add(block);\n normalized.push(block);\n }\n for (const block of defaults) if (!seen.has(block)) normalized.push(block);\n return normalized;\n}\n","import type { DefaultAdFormatters } from \"./types\";\n\nexport const defaultFormatters: Required<DefaultAdFormatters> = {\n date(value) {\n const match = value.match(/^(\\d{4})-(\\d{2})-(\\d{2})/);\n return match ? `${match[3]}.${match[2]}.${match[1]}` : value;\n },\n funeralDate(value, hideYear) {\n if (!hideYear) return value;\n return value.replace(/([.\\/-])\\d{4}(?=\\D|$)/, \"\");\n },\n lowercaseFirst(value) {\n return value ? value.charAt(0).toLocaleLowerCase() + value.slice(1) : value;\n },\n};\n\nexport function mergeDefined<T extends object>(base: T, overrides?: Partial<T>): T {\n if (!overrides) return { ...base };\n return Object.fromEntries(\n Object.entries({ ...base, ...overrides }).filter(([, value]) => value !== undefined),\n ) as T;\n}\n\nexport function decodeSvgMarkup(value: string): string {\n return value\n .replace(/</g, \"<\")\n .replace(/>/g, \">\")\n .replace(/"/g, '\"')\n .replace(/&#(?:0*39|x0*27);/gi, \"'\")\n .replace(/&/g, \"&\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAAiE;;;ACM1D,IAAM,wBAAwB;AAAA,EACnC,WAAW;AAAA,EACX,UAAU;AAAA,EACV,WAAW;AAAA,EACX,qBAAqB;AAAA,EACrB,QAAQ;AAAA,EACR,eAAe;AAAA,EACf,SAAS;AAAA,IACP,YAAY;AAAA,IACZ,cAAc;AAAA;AAAA;AAAA,IAGd,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,SAAS;AAAA,IACT,aAAa;AAAA,IACb,aAAa;AAAA,IACb,WAAW;AAAA,IACX,aAAa;AAAA,IACb,WAAW;AAAA,IACX,aAAa;AAAA,IACb,cAAc;AAAA,EAChB;AACF;AAEO,IAAM,wBAAkD;AAAA,EAC7D,GAAG;AAAA,EACH,YAAY;AAAA,IACV,YAAY;AAAA,IACZ,qBAAqB;AAAA,IACrB,WAAW;AAAA,IACX,cAAc;AAAA,IACd,WAAW;AAAA,IACX,cAAc;AAAA,IACd,UAAU;AAAA,IACV,aAAa;AAAA,IACb,UAAU;AAAA,IACV,cAAc;AAAA,IACd,uBAAuB;AAAA,IACvB,aAAa;AAAA,IACb,UAAU;AAAA,IACV,aA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\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n flex-shrink: 0;\n overflow: hidden;\n color: #000;\n background: #fff;\n stroke: #000;\n text-align: center;\n box-shadow: 0 0 30px -10px rgb(0 0 0 / 30%);\n transition: all 700ms;\n}\n.gda-root *, .gda-root *::before, .gda-root *::after { box-sizing: border-box; }\n.gda-text { font-weight: 400; white-space: pre-line; }\n.gda-whitespace-pre-line { white-space: pre-line; }\n.gda-break { overflow-wrap: break-word; }\n.gda-name { white-space: normal; }\n.gda-balance { text-wrap: balance; }\n.gda-bold { font-weight: 700; }\n.gda-italic { font-style: italic; }\n.gda-secondary-font { font-family: var(--default-ad-font-secondary, inherit); }\n.gda-icon { display: flex; justify-content: center; }\n.gda-dates { display: flex; width: 100%; flex-flow: row nowrap; justify-content: center; gap: 4mm; font-weight: 400; white-space: nowrap; }\n.gda-dates-single { flex-direction: column; gap: 0; }\n.gda-death-cross { font-family: \"Times New Roman\", Times, serif; }\n.gda-divider { width: 3rem; margin-right: auto; margin-left: auto; border-top: 1.4pt solid #000; }\n.gda-donation { margin-right: 19pt; margin-left: 19pt; }\n.gda-placeholder { opacity: .25; }\n.gda-name-part-active {\n padding-inline: 2px;\n margin-inline: -2px;\n box-decoration-break: clone;\n -webkit-box-decoration-break: clone;\n}\n.gda-field-placeholder-container { display: flex; justify-content: center; }\n.gda-field-empty.gda-donation { margin-right: 0; margin-left: 0; }\n.gda-field-empty.gda-balance { text-wrap: initial; }\n"],"mappings":";AAAA,CAAC;AACC,cAAY;AACZ,WAAS;AACT,kBAAgB;AAChB,eAAa;AACb,YAAU;AACV,SAAO;AACP,cAAY;AACZ,UAAQ;AACR,cAAY;AACZ,cAAY,EAAE,EAAE,KAAK,MAAM,IAAI,EAAE,EAAE,EAAE,EAAE;AACvC,cAAY,IAAI;AAClB;AACA,CAbC,SAaS;AAAG,CAbZ,SAasB,CAAC;AAAU,CAbjC,SAa2C,CAAC;AAAU,cAAY;AAAY;AAC/E,CAAC;AAAW,eAAa;AAAK,eAAa;AAAU;AACrD,CAAC;AAA0B,eAAa;AAAU;AAClD,CAAC;AAAY,iBAAe;AAAY;AACxC,CAAC;AAAW,eAAa;AAAQ;AACjC,CAAC;AAAc,aAAW;AAAS;AACnC,CAAC;AAAW,eAAa;AAAK;AAC9B,CAAC;AAAa,cAAY;AAAQ;AAClC,CAAC;AAAqB,eAAa,IAAI,2BAA2B,EAAE;AAAU;AAC9E,CAAC;AAAW,WAAS;AAAM,mBAAiB;AAAQ;AACpD,CAAC;AAAY,WAAS;AAAM,SAAO;AAAM,aAAW,IAAI;AAAQ,mBAAiB;AAAQ,OAAK;AAAK,eAAa;AAAK,eAAa;AAAQ;AAC1I,CAAC;AAAmB,kBAAgB;AAAQ,OAAK;AAAG;AACpD,CAAC;AAAkB;AAAA,IAAa,iBAAiB;AAAA,IAAE,KAAK;AAAA,IAAE;AAAO;AACjE,CAAC;AAAc,SAAO;AAAM,gBAAc;AAAM,eAAa;AAAM,cAAY,MAAM,MAAM;AAAM;AACjG,CAAC;AAAe,gBAAc;AAAM,eAAa;AAAM;AACvD,CAAC;AAAkB,WAAS;AAAK;AACjC,CAAC;AACC,kBAAgB;AAChB,iBAAe;AACf,wBAAsB;AACtB,gCAA8B;AAChC;AACA,CAAC;AAAkC,WAAS;AAAM,mBAAiB;AAAQ;AAC3E,CAAC,eAAe,
|
|
1
|
+
{"version":3,"sources":["../src/styles.css"],"sourcesContent":[".gda-root {\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n flex-shrink: 0;\n overflow: hidden;\n color: #000;\n background: #fff;\n stroke: #000;\n text-align: center;\n box-shadow: 0 0 30px -10px rgb(0 0 0 / 30%);\n transition: all 700ms;\n}\n.gda-root *, .gda-root *::before, .gda-root *::after { box-sizing: border-box; }\n.gda-text { font-weight: 400; white-space: pre-line; }\n.gda-whitespace-pre-line { white-space: pre-line; }\n.gda-break { overflow-wrap: break-word; }\n.gda-name { white-space: normal; }\n.gda-balance { text-wrap: balance; }\n.gda-bold { font-weight: 700; }\n.gda-italic { font-style: italic; }\n.gda-secondary-font { font-family: var(--default-ad-font-secondary, inherit); }\n.gda-icon { display: flex; justify-content: center; }\n.gda-dates { display: flex; width: 100%; flex-flow: row nowrap; justify-content: center; gap: 4mm; font-weight: 400; white-space: nowrap; }\n.gda-dates-single { flex-direction: column; gap: 0; }\n.gda-death-cross { font-family: \"Times New Roman\", Times, serif; }\n.gda-divider { width: 3rem; margin-right: auto; margin-left: auto; border-top: 1.4pt solid #000; }\n.gda-donation { margin-right: 19pt; margin-left: 19pt; }\n.gda-placeholder { opacity: .25; }\n.gda-name-part-active,\n.gda-field-active-inline {\n padding-inline: 2px;\n margin-inline: -2px;\n box-decoration-break: clone;\n -webkit-box-decoration-break: clone;\n}\n.gda-field-placeholder-container { display: flex; justify-content: center; }\n.gda-field-empty.gda-donation { margin-right: 0; margin-left: 0; }\n.gda-field-empty.gda-balance { text-wrap: initial; }\n"],"mappings":";AAAA,CAAC;AACC,cAAY;AACZ,WAAS;AACT,kBAAgB;AAChB,eAAa;AACb,YAAU;AACV,SAAO;AACP,cAAY;AACZ,UAAQ;AACR,cAAY;AACZ,cAAY,EAAE,EAAE,KAAK,MAAM,IAAI,EAAE,EAAE,EAAE,EAAE;AACvC,cAAY,IAAI;AAClB;AACA,CAbC,SAaS;AAAG,CAbZ,SAasB,CAAC;AAAU,CAbjC,SAa2C,CAAC;AAAU,cAAY;AAAY;AAC/E,CAAC;AAAW,eAAa;AAAK,eAAa;AAAU;AACrD,CAAC;AAA0B,eAAa;AAAU;AAClD,CAAC;AAAY,iBAAe;AAAY;AACxC,CAAC;AAAW,eAAa;AAAQ;AACjC,CAAC;AAAc,aAAW;AAAS;AACnC,CAAC;AAAW,eAAa;AAAK;AAC9B,CAAC;AAAa,cAAY;AAAQ;AAClC,CAAC;AAAqB,eAAa,IAAI,2BAA2B,EAAE;AAAU;AAC9E,CAAC;AAAW,WAAS;AAAM,mBAAiB;AAAQ;AACpD,CAAC;AAAY,WAAS;AAAM,SAAO;AAAM,aAAW,IAAI;AAAQ,mBAAiB;AAAQ,OAAK;AAAK,eAAa;AAAK,eAAa;AAAQ;AAC1I,CAAC;AAAmB,kBAAgB;AAAQ,OAAK;AAAG;AACpD,CAAC;AAAkB;AAAA,IAAa,iBAAiB;AAAA,IAAE,KAAK;AAAA,IAAE;AAAO;AACjE,CAAC;AAAc,SAAO;AAAM,gBAAc;AAAM,eAAa;AAAM,cAAY,MAAM,MAAM;AAAM;AACjG,CAAC;AAAe,gBAAc;AAAM,eAAa;AAAM;AACvD,CAAC;AAAkB,WAAS;AAAK;AACjC,CAAC;AACD,CAAC;AACC,kBAAgB;AAChB,iBAAe;AACf,wBAAsB;AACtB,gCAA8B;AAChC;AACA,CAAC;AAAkC,WAAS;AAAM,mBAAiB;AAAQ;AAC3E,CAAC,eAAe,CAVf;AAU+B,gBAAc;AAAG,eAAa;AAAG;AACjE,CADC,eACe,CApBf;AAoB8B,aAAW;AAAS;","names":[]}
|
package/dist/index.d.mts
CHANGED
|
@@ -4,6 +4,7 @@ import { HTMLAttributes, Ref, ReactNode, CSSProperties } from 'react';
|
|
|
4
4
|
type DefaultAdType = "obituaries" | "thanks";
|
|
5
5
|
type DefaultAdMode = "builder" | "preview" | "published";
|
|
6
6
|
type DefaultAdVariant = "classic" | "publication";
|
|
7
|
+
type DefaultAdBlock = "icon" | "intro" | "title" | "name" | "dates" | "deceased" | "memorial" | "sender" | "church" | "ceremony" | "message" | "thanks" | "donation";
|
|
7
8
|
type DefaultAdField = "intro" | "title" | "thanksIntro" | "briefIntroduction" | "firstName" | "lastName" | "birthDate" | "deathDate" | "deceased" | "memorial" | "sender" | "church" | "funeralDate" | "ceremony" | "message" | "thanks" | "donation";
|
|
8
9
|
interface DefaultAdFieldState {
|
|
9
10
|
/** Render the placeholder when this field has no value. */
|
|
@@ -134,6 +135,9 @@ interface DefaultAdProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"
|
|
|
134
135
|
showEmptyNamePlaceholder?: boolean;
|
|
135
136
|
emptyNamePlaceholder?: string;
|
|
136
137
|
rootStyle?: CSSProperties;
|
|
138
|
+
layoutOrder?: readonly unknown[] | null;
|
|
139
|
+
/** Optional consumer-owned wrapper, e.g. a sortable block in builder mode. */
|
|
140
|
+
renderBlock?: (block: DefaultAdBlock, node: ReactNode, index: number) => ReactNode;
|
|
137
141
|
}
|
|
138
142
|
/** Shape accepted by the existing Strapi ad-template records. */
|
|
139
143
|
interface LegacyAdTemplate {
|
|
@@ -170,7 +174,7 @@ interface LegacyAdTemplate {
|
|
|
170
174
|
fullnameToText?: number;
|
|
171
175
|
}
|
|
172
176
|
|
|
173
|
-
declare function DefaultAd({ data, style, mode, variant, rootRef, interaction, formatters, showEmptyNamePlaceholder, emptyNamePlaceholder, className, rootStyle, ...htmlProps }: DefaultAdProps): react.JSX.Element;
|
|
177
|
+
declare function DefaultAd({ data, style, mode, variant, rootRef, interaction, formatters, showEmptyNamePlaceholder, emptyNamePlaceholder, className, rootStyle, layoutOrder, renderBlock, ...htmlProps }: DefaultAdProps): react.JSX.Element;
|
|
174
178
|
|
|
175
179
|
/**
|
|
176
180
|
* Canonical layout shared by every consumer. Typography is deliberately kept
|
|
@@ -202,4 +206,10 @@ declare const classicDefaultAdStyle: Readonly<DefaultAdStyle>;
|
|
|
202
206
|
declare const publicationDefaultAdStyle: Readonly<DefaultAdStyle>;
|
|
203
207
|
declare function styleFromLegacyTemplate(template?: LegacyAdTemplate | null): DefaultAdStyle;
|
|
204
208
|
|
|
205
|
-
|
|
209
|
+
declare const DEFAULT_OBITUARY_LAYOUT_ORDER: readonly ["icon", "intro", "title", "name", "dates", "deceased", "memorial", "sender", "church", "thanks", "donation"];
|
|
210
|
+
declare const DEFAULT_THANK_YOU_LAYOUT_ORDER: readonly ["icon", "intro", "title", "name", "dates", "ceremony", "message", "thanks", "sender", "donation"];
|
|
211
|
+
declare const DEFAULT_AD_LAYOUT_ORDER: readonly ["icon", "intro", "title", "name", "dates", "deceased", "memorial", "sender", "church", "thanks", "donation"];
|
|
212
|
+
declare function defaultAdLayoutOrder(type: DefaultAdType): readonly DefaultAdBlock[];
|
|
213
|
+
declare function normalizeDefaultAdLayoutOrder(order: readonly unknown[] | null | undefined, type: DefaultAdType): DefaultAdBlock[];
|
|
214
|
+
|
|
215
|
+
export { DEFAULT_AD_LAYOUT_ORDER, DEFAULT_OBITUARY_LAYOUT_ORDER, DEFAULT_THANK_YOU_LAYOUT_ORDER, DefaultAd, type DefaultAdBlock, type DefaultAdContact, type DefaultAdData, type DefaultAdField, type DefaultAdFieldState, type DefaultAdFormatters, type DefaultAdIcon, type DefaultAdInteraction, type DefaultAdMode, type DefaultAdProps, type DefaultAdSpacing, type DefaultAdStyle, type DefaultAdTextFields, type DefaultAdType, type DefaultAdTypography, type DefaultAdVariant, type LegacyAdTemplate, classicDefaultAdStyle, defaultAdLayoutOrder, normalizeDefaultAdLayoutOrder, publicationDefaultAdStyle, sharedDefaultAdLayout, styleFromLegacyTemplate };
|
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { HTMLAttributes, Ref, ReactNode, CSSProperties } from 'react';
|
|
|
4
4
|
type DefaultAdType = "obituaries" | "thanks";
|
|
5
5
|
type DefaultAdMode = "builder" | "preview" | "published";
|
|
6
6
|
type DefaultAdVariant = "classic" | "publication";
|
|
7
|
+
type DefaultAdBlock = "icon" | "intro" | "title" | "name" | "dates" | "deceased" | "memorial" | "sender" | "church" | "ceremony" | "message" | "thanks" | "donation";
|
|
7
8
|
type DefaultAdField = "intro" | "title" | "thanksIntro" | "briefIntroduction" | "firstName" | "lastName" | "birthDate" | "deathDate" | "deceased" | "memorial" | "sender" | "church" | "funeralDate" | "ceremony" | "message" | "thanks" | "donation";
|
|
8
9
|
interface DefaultAdFieldState {
|
|
9
10
|
/** Render the placeholder when this field has no value. */
|
|
@@ -134,6 +135,9 @@ interface DefaultAdProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"
|
|
|
134
135
|
showEmptyNamePlaceholder?: boolean;
|
|
135
136
|
emptyNamePlaceholder?: string;
|
|
136
137
|
rootStyle?: CSSProperties;
|
|
138
|
+
layoutOrder?: readonly unknown[] | null;
|
|
139
|
+
/** Optional consumer-owned wrapper, e.g. a sortable block in builder mode. */
|
|
140
|
+
renderBlock?: (block: DefaultAdBlock, node: ReactNode, index: number) => ReactNode;
|
|
137
141
|
}
|
|
138
142
|
/** Shape accepted by the existing Strapi ad-template records. */
|
|
139
143
|
interface LegacyAdTemplate {
|
|
@@ -170,7 +174,7 @@ interface LegacyAdTemplate {
|
|
|
170
174
|
fullnameToText?: number;
|
|
171
175
|
}
|
|
172
176
|
|
|
173
|
-
declare function DefaultAd({ data, style, mode, variant, rootRef, interaction, formatters, showEmptyNamePlaceholder, emptyNamePlaceholder, className, rootStyle, ...htmlProps }: DefaultAdProps): react.JSX.Element;
|
|
177
|
+
declare function DefaultAd({ data, style, mode, variant, rootRef, interaction, formatters, showEmptyNamePlaceholder, emptyNamePlaceholder, className, rootStyle, layoutOrder, renderBlock, ...htmlProps }: DefaultAdProps): react.JSX.Element;
|
|
174
178
|
|
|
175
179
|
/**
|
|
176
180
|
* Canonical layout shared by every consumer. Typography is deliberately kept
|
|
@@ -202,4 +206,10 @@ declare const classicDefaultAdStyle: Readonly<DefaultAdStyle>;
|
|
|
202
206
|
declare const publicationDefaultAdStyle: Readonly<DefaultAdStyle>;
|
|
203
207
|
declare function styleFromLegacyTemplate(template?: LegacyAdTemplate | null): DefaultAdStyle;
|
|
204
208
|
|
|
205
|
-
|
|
209
|
+
declare const DEFAULT_OBITUARY_LAYOUT_ORDER: readonly ["icon", "intro", "title", "name", "dates", "deceased", "memorial", "sender", "church", "thanks", "donation"];
|
|
210
|
+
declare const DEFAULT_THANK_YOU_LAYOUT_ORDER: readonly ["icon", "intro", "title", "name", "dates", "ceremony", "message", "thanks", "sender", "donation"];
|
|
211
|
+
declare const DEFAULT_AD_LAYOUT_ORDER: readonly ["icon", "intro", "title", "name", "dates", "deceased", "memorial", "sender", "church", "thanks", "donation"];
|
|
212
|
+
declare function defaultAdLayoutOrder(type: DefaultAdType): readonly DefaultAdBlock[];
|
|
213
|
+
declare function normalizeDefaultAdLayoutOrder(order: readonly unknown[] | null | undefined, type: DefaultAdType): DefaultAdBlock[];
|
|
214
|
+
|
|
215
|
+
export { DEFAULT_AD_LAYOUT_ORDER, DEFAULT_OBITUARY_LAYOUT_ORDER, DEFAULT_THANK_YOU_LAYOUT_ORDER, DefaultAd, type DefaultAdBlock, type DefaultAdContact, type DefaultAdData, type DefaultAdField, type DefaultAdFieldState, type DefaultAdFormatters, type DefaultAdIcon, type DefaultAdInteraction, type DefaultAdMode, type DefaultAdProps, type DefaultAdSpacing, type DefaultAdStyle, type DefaultAdTextFields, type DefaultAdType, type DefaultAdTypography, type DefaultAdVariant, type LegacyAdTemplate, classicDefaultAdStyle, defaultAdLayoutOrder, normalizeDefaultAdLayoutOrder, publicationDefaultAdStyle, sharedDefaultAdLayout, styleFromLegacyTemplate };
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
// src/DefaultAd.tsx
|
|
2
|
+
import { Children, cloneElement, Fragment, isValidElement } from "react";
|
|
3
|
+
|
|
1
4
|
// src/presets.ts
|
|
2
5
|
var sharedDefaultAdLayout = {
|
|
3
6
|
columnsMm: 86,
|
|
@@ -119,6 +122,56 @@ function tracking(value) {
|
|
|
119
122
|
return amount ? { longDateLetterSpacing: amount } : {};
|
|
120
123
|
}
|
|
121
124
|
|
|
125
|
+
// src/layout.ts
|
|
126
|
+
var DEFAULT_OBITUARY_LAYOUT_ORDER = [
|
|
127
|
+
"icon",
|
|
128
|
+
"intro",
|
|
129
|
+
"title",
|
|
130
|
+
"name",
|
|
131
|
+
"dates",
|
|
132
|
+
"deceased",
|
|
133
|
+
"memorial",
|
|
134
|
+
"sender",
|
|
135
|
+
"church",
|
|
136
|
+
"thanks",
|
|
137
|
+
"donation"
|
|
138
|
+
];
|
|
139
|
+
var DEFAULT_THANK_YOU_LAYOUT_ORDER = [
|
|
140
|
+
"icon",
|
|
141
|
+
"intro",
|
|
142
|
+
"title",
|
|
143
|
+
"name",
|
|
144
|
+
"dates",
|
|
145
|
+
"ceremony",
|
|
146
|
+
"message",
|
|
147
|
+
"thanks",
|
|
148
|
+
"sender",
|
|
149
|
+
"donation"
|
|
150
|
+
];
|
|
151
|
+
var DEFAULT_AD_LAYOUT_ORDER = DEFAULT_OBITUARY_LAYOUT_ORDER;
|
|
152
|
+
var VALID_BLOCKS = /* @__PURE__ */ new Set([
|
|
153
|
+
...DEFAULT_OBITUARY_LAYOUT_ORDER,
|
|
154
|
+
...DEFAULT_THANK_YOU_LAYOUT_ORDER
|
|
155
|
+
]);
|
|
156
|
+
function defaultAdLayoutOrder(type) {
|
|
157
|
+
return type === "thanks" ? DEFAULT_THANK_YOU_LAYOUT_ORDER : DEFAULT_OBITUARY_LAYOUT_ORDER;
|
|
158
|
+
}
|
|
159
|
+
function normalizeDefaultAdLayoutOrder(order, type) {
|
|
160
|
+
const defaults = defaultAdLayoutOrder(type);
|
|
161
|
+
const applicable = new Set(defaults);
|
|
162
|
+
const seen = /* @__PURE__ */ new Set();
|
|
163
|
+
const normalized = [];
|
|
164
|
+
for (const value of order ?? []) {
|
|
165
|
+
if (typeof value !== "string" || !VALID_BLOCKS.has(value)) continue;
|
|
166
|
+
const block = value;
|
|
167
|
+
if (!applicable.has(block) || seen.has(block)) continue;
|
|
168
|
+
seen.add(block);
|
|
169
|
+
normalized.push(block);
|
|
170
|
+
}
|
|
171
|
+
for (const block of defaults) if (!seen.has(block)) normalized.push(block);
|
|
172
|
+
return normalized;
|
|
173
|
+
}
|
|
174
|
+
|
|
122
175
|
// src/utils.ts
|
|
123
176
|
var defaultFormatters = {
|
|
124
177
|
date(value) {
|
|
@@ -144,7 +197,7 @@ function decodeSvgMarkup(value) {
|
|
|
144
197
|
}
|
|
145
198
|
|
|
146
199
|
// src/DefaultAd.tsx
|
|
147
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
200
|
+
import { Fragment as Fragment2, jsx, jsxs } from "react/jsx-runtime";
|
|
148
201
|
function textStyle(size, leading, marginTop) {
|
|
149
202
|
return { fontSize: `${size}pt`, lineHeight: `${leading}pt`, marginTop: `${marginTop}pt` };
|
|
150
203
|
}
|
|
@@ -177,6 +230,8 @@ function DefaultAd({
|
|
|
177
230
|
emptyNamePlaceholder = "Fornavn Efternavn",
|
|
178
231
|
className = "",
|
|
179
232
|
rootStyle,
|
|
233
|
+
layoutOrder,
|
|
234
|
+
renderBlock,
|
|
180
235
|
...htmlProps
|
|
181
236
|
}) {
|
|
182
237
|
const typography = mergeDefined(
|
|
@@ -198,14 +253,6 @@ function DefaultAd({
|
|
|
198
253
|
const hasVisualFirst = Boolean(first || interaction?.fields?.[firstField]?.active);
|
|
199
254
|
const hasVisualSecond = Boolean(second || interaction?.fields?.[secondField]?.active);
|
|
200
255
|
const hasVisualName = hasName || Boolean(interaction?.fields?.firstName?.active || interaction?.fields?.lastName?.active);
|
|
201
|
-
const headerMargins = calculateHeaderMargins({
|
|
202
|
-
first: hasVisualFirst,
|
|
203
|
-
second: hasVisualSecond,
|
|
204
|
-
hasName: hasVisualName,
|
|
205
|
-
hasIcon: Boolean(icon),
|
|
206
|
-
spacing
|
|
207
|
-
});
|
|
208
|
-
const { firstMargin, secondMargin, nameMargin } = headerMargins;
|
|
209
256
|
const isSingleColumn = Number(layout.columnsMm) === 41;
|
|
210
257
|
const ceremonyCode = contact.ceremony?.code;
|
|
211
258
|
const ceremonyLabel = contact.ceremony?.label ?? ceremonyCode;
|
|
@@ -213,7 +260,32 @@ function DefaultAd({
|
|
|
213
260
|
const hasActiveNamePart = Boolean(
|
|
214
261
|
interaction?.fields?.firstName?.active || interaction?.fields?.lastName?.active
|
|
215
262
|
);
|
|
216
|
-
|
|
263
|
+
const orderedBlocks = normalizeDefaultAdLayoutOrder(layoutOrder, type);
|
|
264
|
+
const visibleBlocks = {
|
|
265
|
+
icon: Boolean(icon),
|
|
266
|
+
intro: hasVisualFirst,
|
|
267
|
+
title: hasVisualSecond,
|
|
268
|
+
name: hasVisualName || showEmptyNamePlaceholder,
|
|
269
|
+
dates: Boolean(contact.showBirthDate && (contact.birthDate || interaction?.fields?.birthDate?.active) || contact.showDeathDate && (contact.deathDate || interaction?.fields?.deathDate?.active)),
|
|
270
|
+
deceased: type === "obituaries" && Boolean(text.deceased || interaction?.fields?.deceased?.active),
|
|
271
|
+
memorial: type === "obituaries" && Boolean(text.memorial || interaction?.fields?.memorial?.active),
|
|
272
|
+
sender: Boolean(text.sender || interaction?.fields?.sender?.active),
|
|
273
|
+
church: type === "obituaries" && ceremonyCode !== "NoCeremony" && Boolean(
|
|
274
|
+
contact.showChurch && (contact.church || interaction?.fields?.church?.active) || contact.showFuneralDate && (contact.funeralDate || interaction?.fields?.funeralDate?.active)
|
|
275
|
+
),
|
|
276
|
+
ceremony: type === "thanks" && Boolean(text.ceremony || interaction?.fields?.ceremony?.active),
|
|
277
|
+
message: type === "thanks" && Boolean(text.message || interaction?.fields?.message?.active),
|
|
278
|
+
thanks: Boolean(text.thanks || interaction?.fields?.thanks?.active),
|
|
279
|
+
donation: Boolean(text.donation || interaction?.fields?.donation?.active)
|
|
280
|
+
};
|
|
281
|
+
const visibleOrder = orderedBlocks.filter((block) => visibleBlocks[block]);
|
|
282
|
+
const firstVisibleBlock = visibleOrder[0];
|
|
283
|
+
const previousVisibleBlock = (block) => visibleOrder[visibleOrder.indexOf(block) - 1];
|
|
284
|
+
const blockMargin = (block, margin) => firstVisibleBlock === block ? 0 : margin;
|
|
285
|
+
const firstMargin = previousVisibleBlock("intro") === "icon" ? spacing.iconToText : spacing.introToTitle;
|
|
286
|
+
const secondMargin = previousVisibleBlock("title") === "icon" ? spacing.iconToText : spacing.introToTitle;
|
|
287
|
+
const nameMargin = previousVisibleBlock("name") === "icon" ? spacing.iconToName : spacing.textToName;
|
|
288
|
+
return /* @__PURE__ */ jsx(
|
|
217
289
|
"div",
|
|
218
290
|
{
|
|
219
291
|
...htmlProps,
|
|
@@ -234,8 +306,8 @@ function DefaultAd({
|
|
|
234
306
|
...typography.fontFamily != null ? { fontFamily: typography.fontFamily } : {},
|
|
235
307
|
...rootStyle
|
|
236
308
|
},
|
|
237
|
-
children: [
|
|
238
|
-
icon ? /* @__PURE__ */ jsx("div", { className: "gda-icon", children: /* @__PURE__ */ jsx(
|
|
309
|
+
children: /* @__PURE__ */ jsxs(OrderedBlocks, { order: orderedBlocks, renderBlock, children: [
|
|
310
|
+
/* @__PURE__ */ jsx(AdBlock, { block: "icon", children: icon ? /* @__PURE__ */ jsx("div", { className: "gda-icon", children: /* @__PURE__ */ jsx(
|
|
239
311
|
"svg",
|
|
240
312
|
{
|
|
241
313
|
className: icon.className,
|
|
@@ -248,28 +320,28 @@ function DefaultAd({
|
|
|
248
320
|
"aria-hidden": icon.title ? void 0 : true,
|
|
249
321
|
dangerouslySetInnerHTML: { __html: decodeSvgMarkup(icon.svg) }
|
|
250
322
|
}
|
|
251
|
-
) }) : null,
|
|
252
|
-
/* @__PURE__ */ jsx(
|
|
323
|
+
) }) : null }),
|
|
324
|
+
/* @__PURE__ */ jsx(AdBlock, { block: "intro", children: /* @__PURE__ */ jsx(
|
|
253
325
|
Text,
|
|
254
326
|
{
|
|
255
327
|
field: type === "thanks" ? "thanksIntro" : "intro",
|
|
256
328
|
interaction,
|
|
257
329
|
className: `${type === "thanks" ? "gda-bold" : ""} gda-break`,
|
|
258
|
-
style: textStyle(type === "thanks" ? 14 : typography.introSize, typography.introLeading, firstMargin),
|
|
330
|
+
style: textStyle(type === "thanks" ? 14 : typography.introSize, typography.introLeading, blockMargin("intro", firstMargin)),
|
|
259
331
|
children: type === "thanks" && first ? first : type === "obituaries" ? first : null
|
|
260
332
|
}
|
|
261
|
-
),
|
|
262
|
-
/* @__PURE__ */ jsx(Text, { field: type === "thanks" ? "briefIntroduction" : "title", interaction, className: "gda-break", style: textStyle(typography.titleSize, typography.titleLeading, secondMargin), children: type === "thanks" && second ? fmt.lowercaseFirst(second) : type === "obituaries" ? second : null }),
|
|
263
|
-
hasName && !interaction?.fields?.firstName?.active && !interaction?.fields?.lastName?.active ? /* @__PURE__ */ jsx(Text, { className: "gda-name gda-bold gda-secondary-font", style: { ...textStyle(typography.nameSize, typography.nameLeading, nameMargin), ...secondaryFontStyle }, children: [contact.firstName, contact.lastName].filter(Boolean).join(" ") }) : hasName || hasActiveNamePart ? /* @__PURE__ */ jsxs("div", { className: "gda-name gda-bold gda-secondary-font", style: { ...textStyle(typography.nameSize, typography.nameLeading, nameMargin), ...secondaryFontStyle }, children: [
|
|
333
|
+
) }),
|
|
334
|
+
/* @__PURE__ */ jsx(AdBlock, { block: "title", children: /* @__PURE__ */ jsx(Text, { field: type === "thanks" ? "briefIntroduction" : "title", interaction, className: "gda-break", style: textStyle(typography.titleSize, typography.titleLeading, blockMargin("title", secondMargin)), children: type === "thanks" && second ? fmt.lowercaseFirst(second) : type === "obituaries" ? second : null }) }),
|
|
335
|
+
/* @__PURE__ */ jsx(AdBlock, { block: "name", children: hasName && !interaction?.fields?.firstName?.active && !interaction?.fields?.lastName?.active ? /* @__PURE__ */ jsx(Text, { className: "gda-name gda-bold gda-secondary-font", style: { ...textStyle(typography.nameSize, typography.nameLeading, blockMargin("name", nameMargin)), ...secondaryFontStyle }, children: [contact.firstName, contact.lastName].filter(Boolean).join(" ") }) : hasName || hasActiveNamePart ? /* @__PURE__ */ jsxs("div", { className: "gda-name gda-bold gda-secondary-font", style: { ...textStyle(typography.nameSize, typography.nameLeading, blockMargin("name", nameMargin)), ...secondaryFontStyle }, children: [
|
|
264
336
|
/* @__PURE__ */ jsx(NamePart, { field: "firstName", value: contact.firstName, interaction, showPlaceholder: hasActiveNamePart }),
|
|
265
337
|
" ",
|
|
266
338
|
/* @__PURE__ */ jsx(NamePart, { field: "lastName", value: contact.lastName, interaction, showPlaceholder: hasActiveNamePart })
|
|
267
|
-
] }) : showEmptyNamePlaceholder ? /* @__PURE__ */ jsx("div", { className: "gda-placeholder gda-name gda-bold gda-secondary-font", style: { ...textStyle(typography.nameSize, typography.nameLeading, nameMargin), ...secondaryFontStyle }, children: emptyNamePlaceholder }) : null,
|
|
268
|
-
contact.showBirthDate && (contact.birthDate || interaction?.fields?.birthDate?.active) || contact.showDeathDate && (contact.deathDate || interaction?.fields?.deathDate?.active) ? /* @__PURE__ */ jsxs(
|
|
339
|
+
] }) : showEmptyNamePlaceholder ? /* @__PURE__ */ jsx("div", { className: "gda-placeholder gda-name gda-bold gda-secondary-font", style: { ...textStyle(typography.nameSize, typography.nameLeading, blockMargin("name", nameMargin)), ...secondaryFontStyle }, children: emptyNamePlaceholder }) : null }),
|
|
340
|
+
/* @__PURE__ */ jsx(AdBlock, { block: "dates", children: contact.showBirthDate && (contact.birthDate || interaction?.fields?.birthDate?.active) || contact.showDeathDate && (contact.deathDate || interaction?.fields?.deathDate?.active) ? /* @__PURE__ */ jsxs(
|
|
269
341
|
"div",
|
|
270
342
|
{
|
|
271
343
|
className: `gda-dates ${isSingleColumn ? "gda-dates-single" : ""}`,
|
|
272
|
-
style: { marginTop: `${spacing.dateTop}pt`, lineHeight: `${typography.dateLeading}pt`, ...isSingleColumn ? { gap: `${spacing.dateTop}pt` } : {} },
|
|
344
|
+
style: { marginTop: `${blockMargin("dates", spacing.dateTop)}pt`, lineHeight: `${typography.dateLeading}pt`, ...isSingleColumn ? { gap: `${spacing.dateTop}pt` } : {} },
|
|
273
345
|
children: [
|
|
274
346
|
contact.showBirthDate && (contact.birthDate || interaction?.fields?.birthDate?.active) ? /* @__PURE__ */ jsxs("span", { "data-default-ad-field": "birthDate", ...fieldEvents("birthDate", interaction), className: interaction?.fields?.birthDate?.active ? interaction.fields.birthDate.className : void 0, style: { fontSize: `${contact.birthDate && fmt.date(contact.birthDate).length > 10 ? typography.longDateSize : typography.dateSize}pt`, ...contact.birthDate && fmt.date(contact.birthDate).length > 10 ? { letterSpacing: typography.longDateLetterSpacing } : {}, ...interaction?.fields?.birthDate?.active ? interaction.fields.birthDate.style : {} }, children: [
|
|
275
347
|
"\u273B ",
|
|
@@ -282,31 +354,29 @@ function DefaultAd({
|
|
|
282
354
|
] }) : null
|
|
283
355
|
]
|
|
284
356
|
}
|
|
285
|
-
) : null,
|
|
286
|
-
type === "obituaries" ? /* @__PURE__ */ jsx(Text, { field: "deceased", interaction, className: "gda-balance", style: textStyle(typography.bodySize, typography.bodyLeading, spacing.deceasedTop), children: text.deceased }) : null,
|
|
287
|
-
type === "obituaries" ? /* @__PURE__ */ jsx(Text, { field: "memorial", interaction, className: "gda-italic gda-break", style: textStyle(typography.memorialSize, typography.memorialLeading, spacing.memorialTop), children: text.memorial }) : null,
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
357
|
+
) : null }),
|
|
358
|
+
/* @__PURE__ */ jsx(AdBlock, { block: "deceased", children: type === "obituaries" ? /* @__PURE__ */ jsx(Text, { field: "deceased", interaction, className: "gda-balance", style: textStyle(typography.bodySize, typography.bodyLeading, blockMargin("deceased", spacing.deceasedTop)), children: text.deceased }) : null }),
|
|
359
|
+
/* @__PURE__ */ jsx(AdBlock, { block: "memorial", children: type === "obituaries" ? /* @__PURE__ */ jsx(Text, { field: "memorial", interaction, className: "gda-italic gda-break", style: textStyle(typography.memorialSize, typography.memorialLeading, blockMargin("memorial", spacing.memorialTop)), children: text.memorial }) : null }),
|
|
360
|
+
/* @__PURE__ */ jsxs(AdBlock, { block: "sender", children: [
|
|
361
|
+
type === "obituaries" && (text.sender || interaction?.fields?.sender?.active) ? /* @__PURE__ */ jsx(Text, { field: "sender", interaction, className: "gda-bold gda-secondary-font", style: { ...textStyle(typography.senderSize, typography.senderLeading, blockMargin("sender", spacing.senderTop)), ...secondaryFontStyle }, children: text.sender }) : null,
|
|
362
|
+
type === "thanks" ? /* @__PURE__ */ jsx(Text, { field: "sender", interaction, className: "gda-secondary-font", style: { ...textStyle(typography.senderSize, typography.senderLeading, blockMargin("sender", spacing.thanksTop)), ...secondaryFontStyle }, children: text.sender }) : null
|
|
363
|
+
] }),
|
|
364
|
+
/* @__PURE__ */ jsx(AdBlock, { block: "church", children: type === "obituaries" && ceremonyCode !== "NoCeremony" && (contact.showChurch || contact.showFuneralDate) && (contact.church || contact.funeralDate || interaction?.fields?.church?.active || interaction?.fields?.funeralDate?.active) ? /* @__PURE__ */ jsxs("div", { className: "gda-text", style: textStyle(typography.ceremonySize, typography.ceremonyLeading, blockMargin("church", spacing.ceremonyTop)), children: [
|
|
365
|
+
contact.showChurch && (contact.church || interaction?.fields?.church?.active) ? contact.church ? /* @__PURE__ */ jsx("div", { "data-default-ad-field": "church", ...fieldEvents("church", interaction), className: "gda-whitespace-pre-line", children: contact.church.length > 15 ? `${ceremonyLabel ?? ""}
|
|
366
|
+
${contact.church}` : `${ceremonyLabel ?? ""} ${contact.church}`.trim() }) : /* @__PURE__ */ jsx(InlinePlaceholder, { field: "church", interaction }) : null,
|
|
367
|
+
contact.showFuneralDate && (contact.funeralDate || interaction?.fields?.funeralDate?.active) ? contact.funeralDate ? /* @__PURE__ */ jsx("div", { "data-default-ad-field": "funeralDate", ...fieldEvents("funeralDate", interaction), children: fmt.funeralDate(contact.funeralDate, Boolean(contact.hideFuneralYear)) }) : /* @__PURE__ */ jsx(InlinePlaceholder, { field: "funeralDate", interaction }) : null
|
|
368
|
+
] }) : null }),
|
|
369
|
+
/* @__PURE__ */ jsx(AdBlock, { block: "ceremony", children: type === "thanks" ? /* @__PURE__ */ jsx(Text, { field: "ceremony", interaction, className: "gda-break", style: textStyle(typography.bodySize, typography.bodyLeading, blockMargin("ceremony", spacing.thanksTop)), children: text.ceremony ? fmt.lowercaseFirst(text.ceremony) : null }) : null }),
|
|
370
|
+
/* @__PURE__ */ jsx(AdBlock, { block: "message", children: type === "thanks" ? /* @__PURE__ */ jsx(Text, { field: "message", interaction, className: "gda-break", style: textStyle(typography.bodySize, typography.bodyLeading, blockMargin("message", spacing.thanksTop)), children: text.message }) : null }),
|
|
371
|
+
/* @__PURE__ */ jsx(AdBlock, { block: "thanks", children: /* @__PURE__ */ jsx(Text, { field: "thanks", interaction, className: "gda-break", style: textStyle(typography.thanksSize, typography.thanksLeading, blockMargin("thanks", spacing.thanksTop)), children: text.thanks }) }),
|
|
372
|
+
/* @__PURE__ */ jsxs(AdBlock, { block: "donation", children: [
|
|
373
|
+
text.donation ? /* @__PURE__ */ jsx("div", { className: "gda-divider", style: { marginTop: `${blockMargin("donation", spacing.donationTop)}pt` } }) : null,
|
|
374
|
+
text.donation || interaction?.fields?.donation?.active ? /* @__PURE__ */ jsx(Text, { field: "donation", interaction, className: "gda-donation gda-break", style: textStyle(typography.donationSize, typography.donationLeading, blockMargin("donation", spacing.donationTop)), children: text.donation }) : null
|
|
375
|
+
] })
|
|
376
|
+
] })
|
|
300
377
|
}
|
|
301
378
|
);
|
|
302
379
|
}
|
|
303
|
-
function calculateHeaderMargins({ first, second, hasName, hasIcon, spacing }) {
|
|
304
|
-
return {
|
|
305
|
-
firstMargin: first && hasIcon ? spacing.iconToText : 0,
|
|
306
|
-
secondMargin: second ? first ? spacing.introToTitle : hasIcon ? spacing.iconToText : 0 : 0,
|
|
307
|
-
nameMargin: hasName ? first || second ? spacing.textToName : hasIcon ? spacing.iconToName : 0 : 0
|
|
308
|
-
};
|
|
309
|
-
}
|
|
310
380
|
function NamePart({ field, value, interaction, showPlaceholder }) {
|
|
311
381
|
const state = interaction?.fields?.[field];
|
|
312
382
|
if (!value && !showPlaceholder) return null;
|
|
@@ -322,15 +392,47 @@ function NamePart({ field, value, interaction, showPlaceholder }) {
|
|
|
322
392
|
}
|
|
323
393
|
);
|
|
324
394
|
}
|
|
325
|
-
function
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
395
|
+
function InlinePlaceholder({ field, interaction }) {
|
|
396
|
+
const state = interaction?.fields?.[field];
|
|
397
|
+
return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
398
|
+
"span",
|
|
399
|
+
{
|
|
400
|
+
"data-default-ad-field": field,
|
|
401
|
+
...fieldEvents(field, interaction),
|
|
402
|
+
className: `gda-field-active-inline ${state?.className ?? ""}`.trim(),
|
|
403
|
+
style: state?.style,
|
|
404
|
+
children: state?.placeholder
|
|
405
|
+
}
|
|
406
|
+
) });
|
|
407
|
+
}
|
|
408
|
+
function AdBlock({ block, children, renderBlock, index = 0 }) {
|
|
409
|
+
let node = children;
|
|
410
|
+
if (node === null || node === void 0 || node === false) return null;
|
|
411
|
+
if (isValidElement(children) && children.type !== Fragment) {
|
|
412
|
+
node = cloneElement(children, { "data-default-ad-block": block });
|
|
413
|
+
}
|
|
414
|
+
return /* @__PURE__ */ jsx(Fragment2, { children: renderBlock ? renderBlock(block, node, index) : node });
|
|
415
|
+
}
|
|
416
|
+
function OrderedBlocks({ order, renderBlock, children }) {
|
|
417
|
+
const blocks = new Map(
|
|
418
|
+
Children.toArray(children).map((child) => {
|
|
419
|
+
const element = child;
|
|
420
|
+
return [element.props.block, element];
|
|
421
|
+
})
|
|
422
|
+
);
|
|
423
|
+
return /* @__PURE__ */ jsx(Fragment2, { children: order.map((block, index) => {
|
|
424
|
+
const element = blocks.get(block);
|
|
425
|
+
return element ? cloneElement(element, { key: block, renderBlock, index }) : null;
|
|
426
|
+
}) });
|
|
330
427
|
}
|
|
331
428
|
export {
|
|
429
|
+
DEFAULT_AD_LAYOUT_ORDER,
|
|
430
|
+
DEFAULT_OBITUARY_LAYOUT_ORDER,
|
|
431
|
+
DEFAULT_THANK_YOU_LAYOUT_ORDER,
|
|
332
432
|
DefaultAd,
|
|
333
433
|
classicDefaultAdStyle,
|
|
434
|
+
defaultAdLayoutOrder,
|
|
435
|
+
normalizeDefaultAdLayoutOrder,
|
|
334
436
|
publicationDefaultAdStyle,
|
|
335
437
|
sharedDefaultAdLayout,
|
|
336
438
|
styleFromLegacyTemplate
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/presets.ts","../src/utils.ts","../src/DefaultAd.tsx"],"sourcesContent":["import type { DefaultAdStyle, LegacyAdTemplate } from \"./types\";\n\n/**\n * Canonical layout shared by every consumer. Typography is deliberately kept\n * out of this object so applications can still select licensed/dynamic fonts.\n */\nexport const sharedDefaultAdLayout = {\n columnsMm: 86,\n heightMm: null,\n paddingMm: 4,\n horizontalPaddingMm: 2,\n border: false,\n borderWidthPt: 1.4,\n spacing: {\n iconToText: 11,\n introToTitle: 8,\n // These values originated as unitless React styles and therefore retain\n // their established numeric geometry.\n textToName: 4.2,\n iconToName: 4.95,\n dateTop: 5.6,\n deceasedTop: 6,\n memorialTop: 6,\n senderTop: 8,\n ceremonyTop: 8,\n thanksTop: 7,\n donationTop: 7,\n sectionGapMm: 0,\n },\n} as const satisfies Readonly<DefaultAdStyle>;\n\nexport const classicDefaultAdStyle: Readonly<DefaultAdStyle> = {\n ...sharedDefaultAdLayout,\n typography: {\n fontFamily: \"var(--default-ad-font-primary, Schoolbook, Georgia, serif)\",\n secondaryFontFamily: \"var(--default-ad-font-secondary, Schoolbook, Georgia, serif)\",\n introSize: 10,\n introLeading: 12,\n titleSize: 10,\n titleLeading: 12,\n nameSize: 14,\n nameLeading: 16.8,\n dateSize: 10,\n longDateSize: 10,\n longDateLetterSpacing: \"-0.01em\",\n dateLeading: 12,\n bodySize: 10,\n bodyLeading: 12,\n memorialSize: 10,\n memorialLeading: 12,\n senderSize: 10,\n senderLeading: 12,\n ceremonySize: 10,\n ceremonyLeading: 12,\n thanksSize: 10,\n thanksLeading: 12,\n donationSize: 10,\n donationLeading: 12,\n },\n};\n\nexport const publicationDefaultAdStyle: Readonly<DefaultAdStyle> = {\n ...sharedDefaultAdLayout,\n typography: {\n ...classicDefaultAdStyle.typography,\n fontFamily: \"var(--default-ad-font-primary, Raleway, Arial, sans-serif)\",\n secondaryFontFamily: \"var(--default-ad-font-secondary, Athelas, Georgia, serif)\",\n introSize: 11,\n introLeading: 13,\n titleSize: 11,\n titleLeading: 13,\n nameSize: 17,\n nameLeading: 15,\n dateSize: 11.5,\n longDateSize: 11,\n longDateLetterSpacing: \"-0.01em\",\n bodySize: 12,\n bodyLeading: 13,\n memorialSize: 12,\n memorialLeading: 13,\n senderSize: 13,\n senderLeading: 13,\n ceremonySize: 11,\n ceremonyLeading: 13,\n thanksSize: 11,\n thanksLeading: 13,\n donationSize: 11,\n donationLeading: 13,\n },\n};\n\nexport function styleFromLegacyTemplate(template?: LegacyAdTemplate | null): DefaultAdStyle {\n if (!template) return publicationDefaultAdStyle;\n return {\n ...publicationDefaultAdStyle,\n typography: {\n ...publicationDefaultAdStyle.typography,\n fontFamily: template.font1 || publicationDefaultAdStyle.typography?.fontFamily,\n secondaryFontFamily: template.font2 || publicationDefaultAdStyle.typography?.secondaryFontFamily,\n introSize: template.introSize,\n introLeading: template.introLeading,\n titleSize: template.titleSize,\n titleLeading: template.titleLeading,\n nameSize: template.fullnameSize,\n nameLeading: template.fullnameLeading,\n ...fontPair(template.deceasedText, \"bodySize\", \"bodyLeading\"),\n ...fontPair(template.memorialText, \"memorialSize\", \"memorialLeading\"),\n ...fontPair(template.senderText, \"senderSize\", \"senderLeading\"),\n ...fontPair(template.ceremonyText, \"ceremonySize\", \"ceremonyLeading\"),\n ...fontPair(template.thanksText, \"thanksSize\", \"thanksLeading\"),\n ...fontPair(template.donationText, \"donationSize\", \"donationLeading\"),\n ...tracking(template.longDatesText),\n },\n };\n}\n\nfunction fontPair(value: string | undefined, sizeKey: string, leadingKey: string): Record<string, number> {\n if (!value) return {};\n const size = value.match(/text-\\[(-?[\\d.]+)pt\\]/)?.[1];\n const leading = value.match(/leading-\\[(-?[\\d.]+)pt\\]/)?.[1];\n return {\n ...(size ? { [sizeKey]: Number(size) } : {}),\n ...(leading ? { [leadingKey]: Number(leading) } : {}),\n };\n}\n\nfunction tracking(value: string | undefined): { longDateLetterSpacing?: string } {\n const amount = value?.match(/tracking-\\[([^\\]]+)\\]/)?.[1];\n return amount ? { longDateLetterSpacing: amount } : {};\n}\n","import type { DefaultAdFormatters } from \"./types\";\n\nexport const defaultFormatters: Required<DefaultAdFormatters> = {\n date(value) {\n const match = value.match(/^(\\d{4})-(\\d{2})-(\\d{2})/);\n return match ? `${match[3]}.${match[2]}.${match[1]}` : value;\n },\n funeralDate(value, hideYear) {\n if (!hideYear) return value;\n return value.replace(/([.\\/-])\\d{4}(?=\\D|$)/, \"\");\n },\n lowercaseFirst(value) {\n return value ? value.charAt(0).toLocaleLowerCase() + value.slice(1) : value;\n },\n};\n\nexport function mergeDefined<T extends object>(base: T, overrides?: Partial<T>): T {\n if (!overrides) return { ...base };\n return Object.fromEntries(\n Object.entries({ ...base, ...overrides }).filter(([, value]) => value !== undefined),\n ) as T;\n}\n\nexport function decodeSvgMarkup(value: string): string {\n return value\n .replace(/</g, \"<\")\n .replace(/>/g, \">\")\n .replace(/"/g, '\"')\n .replace(/&#(?:0*39|x0*27);/gi, \"'\")\n .replace(/&/g, \"&\");\n}\n","import type { CSSProperties, ReactNode } from \"react\";\nimport { classicDefaultAdStyle } from \"./presets\";\nimport type { DefaultAdField, DefaultAdInteraction, DefaultAdProps, DefaultAdSpacing, DefaultAdTypography } from \"./types\";\nimport { decodeSvgMarkup, defaultFormatters, mergeDefined } from \"./utils\";\nimport \"./styles.css\";\n\nfunction textStyle(size: number, leading: number, marginTop: number): CSSProperties {\n return { fontSize: `${size}pt`, lineHeight: `${leading}pt`, marginTop: `${marginTop}pt` };\n}\n\nfunction Text({ children, className = \"\", style, field, interaction }: { children?: ReactNode; className?: string; style: CSSProperties; field?: DefaultAdField; interaction?: DefaultAdInteraction }) {\n const fieldState = field ? interaction?.fields?.[field] : undefined;\n const empty = children === null || children === undefined || children === \"\";\n if (empty && !fieldState?.active) return null;\n const events = field ? fieldEvents(field, interaction) : {};\n if (empty) {\n return <div className=\"gda-field-placeholder-container\"><div data-default-ad-field={field} className={`gda-text gda-field-empty ${className} ${fieldState?.className ?? \"\"}`.trim()} style={{ ...style, ...fieldState?.style }} {...events}>{fieldState?.placeholder}</div></div>;\n }\n return <div data-default-ad-field={field} className={`gda-text ${className} ${fieldState?.active ? fieldState.className ?? \"\" : \"\"}`.trim()} style={{ ...style, ...(fieldState?.active ? fieldState.style : undefined) }} {...events}>{children}</div>;\n}\n\nfunction fieldEvents(field: DefaultAdField, interaction?: DefaultAdInteraction) {\n return {\n onFocus: interaction?.onFieldFocus ? () => interaction.onFieldFocus?.(field) : undefined,\n onBlur: interaction?.onFieldBlur ? () => interaction.onFieldBlur?.(field) : undefined,\n onClick: interaction?.onFieldClick ? () => interaction.onFieldClick?.(field) : undefined,\n };\n}\n\nexport function DefaultAd({\n data,\n style,\n mode = \"published\",\n variant = \"classic\",\n rootRef,\n interaction,\n formatters,\n showEmptyNamePlaceholder = mode === \"builder\",\n emptyNamePlaceholder = \"Fornavn Efternavn\",\n className = \"\",\n rootStyle,\n ...htmlProps\n}: DefaultAdProps) {\n const typography = mergeDefined(\n classicDefaultAdStyle.typography as Required<DefaultAdTypography>,\n style?.typography,\n );\n const spacing = mergeDefined(\n classicDefaultAdStyle.spacing as Required<DefaultAdSpacing>,\n style?.spacing,\n );\n const layout = mergeDefined(classicDefaultAdStyle, style);\n const fmt = { ...defaultFormatters, ...formatters };\n const { contact, text, icon, type } = data;\n const hasName = Boolean(contact.firstName || contact.lastName);\n const first = type === \"thanks\" ? text.thanksIntro : text.intro;\n const second = type === \"thanks\" ? text.briefIntroduction : text.title;\n const firstField = type === \"thanks\" ? \"thanksIntro\" : \"intro\";\n const secondField = type === \"thanks\" ? \"briefIntroduction\" : \"title\";\n const hasVisualFirst = Boolean(first || interaction?.fields?.[firstField]?.active);\n const hasVisualSecond = Boolean(second || interaction?.fields?.[secondField]?.active);\n const hasVisualName = hasName || Boolean(interaction?.fields?.firstName?.active || interaction?.fields?.lastName?.active);\n const headerMargins = calculateHeaderMargins({\n first: hasVisualFirst, second: hasVisualSecond, hasName: hasVisualName, hasIcon: Boolean(icon), spacing,\n });\n const { firstMargin, secondMargin, nameMargin } = headerMargins;\n const isSingleColumn = Number(layout.columnsMm) === 41;\n const ceremonyCode = contact.ceremony?.code;\n const ceremonyLabel = contact.ceremony?.label ?? ceremonyCode;\n const secondaryFontStyle: CSSProperties = typography.secondaryFontFamily != null\n ? { fontFamily: typography.secondaryFontFamily }\n : {};\n const hasActiveNamePart = Boolean(\n interaction?.fields?.firstName?.active || interaction?.fields?.lastName?.active,\n );\n\n return (\n <div\n {...htmlProps}\n ref={rootRef}\n data-default-ad=\"\"\n data-ad-content=\"\"\n data-ad-ready=\"true\"\n data-mode={mode}\n data-variant={variant}\n className={`gda-root ${className}`.trim()}\n style={{\n width: `${layout.columnsMm}mm`,\n minWidth: `${layout.columnsMm}mm`,\n ...(layout.heightMm != null ? { height: `${layout.heightMm}mm` } : {}),\n padding: `${layout.paddingMm}mm ${layout.horizontalPaddingMm}mm`,\n border: layout.border ? `${layout.borderWidthPt}pt solid black` : 0,\n gap: `${spacing.sectionGapMm}mm`,\n ...(typography.fontFamily != null ? { fontFamily: typography.fontFamily } : {}),\n ...rootStyle,\n }}\n >\n {icon ? (\n <div className=\"gda-icon\">\n <svg className={icon.className} xmlns=\"http://www.w3.org/2000/svg\"\n width={Number(icon.width) + 16} height={Number(icon.height) + 16}\n viewBox={icon.viewBox} role={icon.title ? \"img\" : undefined} aria-label={icon.title} aria-hidden={icon.title ? undefined : true}\n dangerouslySetInnerHTML={{ __html: decodeSvgMarkup(icon.svg) }} />\n </div>\n ) : null}\n\n <Text field={type === \"thanks\" ? \"thanksIntro\" : \"intro\"} interaction={interaction} className={`${type === \"thanks\" ? \"gda-bold\" : \"\"} gda-break`}\n style={textStyle(type === \"thanks\" ? 14 : typography.introSize, typography.introLeading, firstMargin)}>\n {type === \"thanks\" && first ? first : type === \"obituaries\" ? first : null}\n </Text>\n <Text field={type === \"thanks\" ? \"briefIntroduction\" : \"title\"} interaction={interaction} className=\"gda-break\" style={textStyle(typography.titleSize, typography.titleLeading, secondMargin)}>\n {type === \"thanks\" && second ? fmt.lowercaseFirst(second) : type === \"obituaries\" ? second : null}\n </Text>\n\n {hasName && !interaction?.fields?.firstName?.active && !interaction?.fields?.lastName?.active ? (\n <Text className=\"gda-name gda-bold gda-secondary-font\" style={{ ...textStyle(typography.nameSize, typography.nameLeading, nameMargin), ...secondaryFontStyle }}>\n {[contact.firstName, contact.lastName].filter(Boolean).join(\" \")}\n </Text>\n ) : hasName || hasActiveNamePart ? (\n <div className=\"gda-name gda-bold gda-secondary-font\" style={{ ...textStyle(typography.nameSize, typography.nameLeading, nameMargin), ...secondaryFontStyle }}>\n <NamePart field=\"firstName\" value={contact.firstName} interaction={interaction} showPlaceholder={hasActiveNamePart} />{\" \"}\n <NamePart field=\"lastName\" value={contact.lastName} interaction={interaction} showPlaceholder={hasActiveNamePart} />\n </div>\n ) : showEmptyNamePlaceholder ? <div className=\"gda-placeholder gda-name gda-bold gda-secondary-font\" style={{ ...textStyle(typography.nameSize, typography.nameLeading, nameMargin), ...secondaryFontStyle }}>{emptyNamePlaceholder}</div> : null}\n\n {(contact.showBirthDate && (contact.birthDate || interaction?.fields?.birthDate?.active)) || (contact.showDeathDate && (contact.deathDate || interaction?.fields?.deathDate?.active)) ? (\n <div className={`gda-dates ${isSingleColumn ? \"gda-dates-single\" : \"\"}`}\n style={{ marginTop: `${spacing.dateTop}pt`, lineHeight: `${typography.dateLeading}pt`, ...(isSingleColumn ? { gap: `${spacing.dateTop}pt` } : {}) }}>\n {contact.showBirthDate && (contact.birthDate || interaction?.fields?.birthDate?.active) ? (\n <span data-default-ad-field=\"birthDate\" {...fieldEvents(\"birthDate\", interaction)} className={interaction?.fields?.birthDate?.active ? interaction.fields.birthDate.className : undefined} style={{ fontSize: `${contact.birthDate && fmt.date(contact.birthDate).length > 10 ? typography.longDateSize : typography.dateSize}pt`, ...(contact.birthDate && fmt.date(contact.birthDate).length > 10 ? { letterSpacing: typography.longDateLetterSpacing } : {}), ...(interaction?.fields?.birthDate?.active ? interaction.fields.birthDate.style : {}) }}>\n ✻ {contact.birthDate ? fmt.date(contact.birthDate) : interaction?.fields?.birthDate?.placeholder}\n </span>\n ) : null}\n {contact.showDeathDate && (contact.deathDate || interaction?.fields?.deathDate?.active) ? (\n <span data-default-ad-field=\"deathDate\" {...fieldEvents(\"deathDate\", interaction)} className={interaction?.fields?.deathDate?.active ? interaction.fields.deathDate.className : undefined} style={{ fontSize: `${contact.deathDate && fmt.date(contact.deathDate).length > 10 ? typography.longDateSize : typography.dateSize}pt`, ...(contact.deathDate && fmt.date(contact.deathDate).length > 10 ? { letterSpacing: typography.longDateLetterSpacing } : {}), ...(interaction?.fields?.deathDate?.active ? interaction.fields.deathDate.style : {}) }}>\n <span className=\"gda-death-cross\" aria-hidden=\"true\">✝︎</span> {contact.deathDate ? fmt.date(contact.deathDate) : interaction?.fields?.deathDate?.placeholder}\n </span>\n ) : null}\n </div>\n ) : null}\n\n {type === \"obituaries\" ? <Text field=\"deceased\" interaction={interaction} className=\"gda-balance\" style={textStyle(typography.bodySize, typography.bodyLeading, spacing.deceasedTop)}>{text.deceased}</Text> : null}\n {type === \"obituaries\" ? <Text field=\"memorial\" interaction={interaction} className=\"gda-italic gda-break\" style={textStyle(typography.memorialSize, typography.memorialLeading, spacing.memorialTop)}>{text.memorial}</Text> : null}\n {type === \"obituaries\" && (text.sender || interaction?.fields?.sender?.active) ? <Text field=\"sender\" interaction={interaction} className=\"gda-bold gda-secondary-font\" style={{ ...textStyle(typography.senderSize, typography.senderLeading, spacing.senderTop), ...secondaryFontStyle }}>{text.sender}</Text> : null}\n\n {type === \"obituaries\" && ceremonyCode !== \"NoCeremony\" && (contact.showChurch || contact.showFuneralDate) && (contact.church || contact.funeralDate || interaction?.fields?.church?.active || interaction?.fields?.funeralDate?.active) ? (\n <div className=\"gda-text\" style={textStyle(typography.ceremonySize, typography.ceremonyLeading, spacing.ceremonyTop)}>\n {contact.showChurch && (contact.church || interaction?.fields?.church?.active) ? <div data-default-ad-field=\"church\" {...fieldEvents(\"church\", interaction)} className={`gda-whitespace-pre-line ${interaction?.fields?.church?.active ? interaction.fields.church.className ?? \"\" : \"\"}`.trim()} style={interaction?.fields?.church?.active ? interaction.fields.church.style : undefined}>{contact.church ? (contact.church.length > 15 ? `${ceremonyLabel ?? \"\"} \\n ${contact.church}` : `${ceremonyLabel ?? \"\"} ${contact.church}`.trim()) : interaction?.fields?.church?.placeholder}</div> : null}\n {contact.showFuneralDate && (contact.funeralDate || interaction?.fields?.funeralDate?.active) ? <div data-default-ad-field=\"funeralDate\" {...fieldEvents(\"funeralDate\", interaction)} className={interaction?.fields?.funeralDate?.active ? interaction.fields.funeralDate.className : undefined} style={interaction?.fields?.funeralDate?.active ? interaction.fields.funeralDate.style : undefined}>{contact.funeralDate ? fmt.funeralDate(contact.funeralDate, Boolean(contact.hideFuneralYear)) : interaction?.fields?.funeralDate?.placeholder}</div> : null}\n </div>\n ) : null}\n\n {type === \"thanks\" ? <ThankYouFields text={text} fmt={fmt} typography={typography} spacing={spacing} interaction={interaction} /> : null}\n <Text field=\"thanks\" interaction={interaction} className=\"gda-break\" style={textStyle(typography.thanksSize, typography.thanksLeading, spacing.thanksTop)}>{text.thanks}</Text>\n {type === \"thanks\" ? <Text field=\"sender\" interaction={interaction} className=\"gda-secondary-font\" style={{ ...textStyle(typography.senderSize, typography.senderLeading, spacing.thanksTop), ...secondaryFontStyle }}>{text.sender}</Text> : null}\n {text.donation ? <div className=\"gda-divider\" style={{ marginTop: `${spacing.donationTop}pt` }} /> : null}\n {text.donation || interaction?.fields?.donation?.active ? <Text field=\"donation\" interaction={interaction} className=\"gda-donation gda-break\" style={textStyle(typography.donationSize, typography.donationLeading, spacing.donationTop)}>{text.donation}</Text> : null}\n </div>\n );\n}\n\nfunction calculateHeaderMargins({ first, second, hasName, hasIcon, spacing }: any) {\n return {\n firstMargin: first && hasIcon ? spacing.iconToText : 0,\n secondMargin: second ? (first ? spacing.introToTitle : hasIcon ? spacing.iconToText : 0) : 0,\n nameMargin: hasName ? (first || second ? spacing.textToName : hasIcon ? spacing.iconToName : 0) : 0,\n };\n}\n\nfunction NamePart({ field, value, interaction, showPlaceholder }: { field: \"firstName\" | \"lastName\"; value?: string | null; interaction?: DefaultAdInteraction; showPlaceholder: boolean }) {\n const state = interaction?.fields?.[field];\n if (!value && !showPlaceholder) return null;\n const isPlaceholder = !value;\n return <span\n data-default-ad-field={field}\n {...fieldEvents(field, interaction)}\n className={`${isPlaceholder && !state?.active ? \"gda-placeholder\" : \"\"} ${state?.active ? `gda-name-part-active ${state.className ?? \"\"}` : \"\"}`.trim()}\n style={state?.active ? state.style : undefined}\n >{value || state?.placeholder}</span>;\n}\n\nfunction ThankYouFields({ text, fmt, typography, spacing, interaction }: any) {\n return <>\n <Text field=\"ceremony\" interaction={interaction} className=\"gda-break\" style={textStyle(typography.bodySize, typography.bodyLeading, spacing.thanksTop)}>{text.ceremony ? fmt.lowercaseFirst(text.ceremony) : null}</Text>\n <Text field=\"message\" interaction={interaction} className=\"gda-break\" style={textStyle(typography.bodySize, typography.bodyLeading, spacing.thanksTop)}>{text.message}</Text>\n </>;\n}\n"],"mappings":";AAMO,IAAM,wBAAwB;AAAA,EACnC,WAAW;AAAA,EACX,UAAU;AAAA,EACV,WAAW;AAAA,EACX,qBAAqB;AAAA,EACrB,QAAQ;AAAA,EACR,eAAe;AAAA,EACf,SAAS;AAAA,IACP,YAAY;AAAA,IACZ,cAAc;AAAA;AAAA;AAAA,IAGd,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,SAAS;AAAA,IACT,aAAa;AAAA,IACb,aAAa;AAAA,IACb,WAAW;AAAA,IACX,aAAa;AAAA,IACb,WAAW;AAAA,IACX,aAAa;AAAA,IACb,cAAc;AAAA,EAChB;AACF;AAEO,IAAM,wBAAkD;AAAA,EAC7D,GAAG;AAAA,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AE,GAAG,KAAK;AAAA,MACtJ,OAAO,OAAO,SAAS,MAAM,QAAQ;AAAA,MACrC,mBAAS,OAAO;AAAA;AAAA,EAAY;AAChC;AAEA,SAAS,eAAe,EAAE,MAAM,KAAK,YAAY,SAAS,YAAY,GAAQ;AAC5E,SAAO,iCACL;AAAA,wBAAC,QAAK,OAAM,YAAW,aAA0B,WAAU,aAAY,OAAO,UAAU,WAAW,UAAU,WAAW,aAAa,QAAQ,SAAS,GAAI,eAAK,WAAW,IAAI,eAAe,KAAK,QAAQ,IAAI,MAAK;AAAA,IACnN,oBAAC,QAAK,OAAM,WAAU,aAA0B,WAAU,aAAY,OAAO,UAAU,WAAW,UAAU,WAAW,aAAa,QAAQ,SAAS,GAAI,eAAK,SAAQ;AAAA,KACxK;AACF;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/DefaultAd.tsx","../src/presets.ts","../src/layout.ts","../src/utils.ts"],"sourcesContent":["import { Children, cloneElement, Fragment, isValidElement } from \"react\";\nimport type { CSSProperties, ReactElement, ReactNode } from \"react\";\nimport { classicDefaultAdStyle } from \"./presets\";\nimport { normalizeDefaultAdLayoutOrder } from \"./layout\";\nimport type { DefaultAdBlock, DefaultAdField, DefaultAdInteraction, DefaultAdProps, DefaultAdSpacing, DefaultAdTypography } from \"./types\";\nimport { decodeSvgMarkup, defaultFormatters, mergeDefined } from \"./utils\";\nimport \"./styles.css\";\n\nfunction textStyle(size: number, leading: number, marginTop: number): CSSProperties {\n return { fontSize: `${size}pt`, lineHeight: `${leading}pt`, marginTop: `${marginTop}pt` };\n}\n\nfunction Text({ children, className = \"\", style, field, interaction }: { children?: ReactNode; className?: string; style: CSSProperties; field?: DefaultAdField; interaction?: DefaultAdInteraction }) {\n const fieldState = field ? interaction?.fields?.[field] : undefined;\n const empty = children === null || children === undefined || children === \"\";\n if (empty && !fieldState?.active) return null;\n const events = field ? fieldEvents(field, interaction) : {};\n if (empty) {\n return <div className=\"gda-field-placeholder-container\"><div data-default-ad-field={field} className={`gda-text gda-field-empty ${className} ${fieldState?.className ?? \"\"}`.trim()} style={{ ...style, ...fieldState?.style }} {...events}>{fieldState?.placeholder}</div></div>;\n }\n return <div data-default-ad-field={field} className={`gda-text ${className} ${fieldState?.active ? fieldState.className ?? \"\" : \"\"}`.trim()} style={{ ...style, ...(fieldState?.active ? fieldState.style : undefined) }} {...events}>{children}</div>;\n}\n\nfunction fieldEvents(field: DefaultAdField, interaction?: DefaultAdInteraction) {\n return {\n onFocus: interaction?.onFieldFocus ? () => interaction.onFieldFocus?.(field) : undefined,\n onBlur: interaction?.onFieldBlur ? () => interaction.onFieldBlur?.(field) : undefined,\n onClick: interaction?.onFieldClick ? () => interaction.onFieldClick?.(field) : undefined,\n };\n}\n\nexport function DefaultAd({\n data,\n style,\n mode = \"published\",\n variant = \"classic\",\n rootRef,\n interaction,\n formatters,\n showEmptyNamePlaceholder = mode === \"builder\",\n emptyNamePlaceholder = \"Fornavn Efternavn\",\n className = \"\",\n rootStyle,\n layoutOrder,\n renderBlock,\n ...htmlProps\n}: DefaultAdProps) {\n const typography = mergeDefined(\n classicDefaultAdStyle.typography as Required<DefaultAdTypography>,\n style?.typography,\n );\n const spacing = mergeDefined(\n classicDefaultAdStyle.spacing as Required<DefaultAdSpacing>,\n style?.spacing,\n );\n const layout = mergeDefined(classicDefaultAdStyle, style);\n const fmt = { ...defaultFormatters, ...formatters };\n const { contact, text, icon, type } = data;\n const hasName = Boolean(contact.firstName || contact.lastName);\n const first = type === \"thanks\" ? text.thanksIntro : text.intro;\n const second = type === \"thanks\" ? text.briefIntroduction : text.title;\n const firstField = type === \"thanks\" ? \"thanksIntro\" : \"intro\";\n const secondField = type === \"thanks\" ? \"briefIntroduction\" : \"title\";\n const hasVisualFirst = Boolean(first || interaction?.fields?.[firstField]?.active);\n const hasVisualSecond = Boolean(second || interaction?.fields?.[secondField]?.active);\n const hasVisualName = hasName || Boolean(interaction?.fields?.firstName?.active || interaction?.fields?.lastName?.active);\n const isSingleColumn = Number(layout.columnsMm) === 41;\n const ceremonyCode = contact.ceremony?.code;\n const ceremonyLabel = contact.ceremony?.label ?? ceremonyCode;\n const secondaryFontStyle: CSSProperties = typography.secondaryFontFamily != null\n ? { fontFamily: typography.secondaryFontFamily }\n : {};\n const hasActiveNamePart = Boolean(\n interaction?.fields?.firstName?.active || interaction?.fields?.lastName?.active,\n );\n const orderedBlocks = normalizeDefaultAdLayoutOrder(layoutOrder, type);\n const visibleBlocks: Partial<Record<DefaultAdBlock, boolean>> = {\n icon: Boolean(icon), intro: hasVisualFirst, title: hasVisualSecond,\n name: hasVisualName || showEmptyNamePlaceholder,\n dates: Boolean((contact.showBirthDate && (contact.birthDate || interaction?.fields?.birthDate?.active)) || (contact.showDeathDate && (contact.deathDate || interaction?.fields?.deathDate?.active))),\n deceased: type === \"obituaries\" && Boolean(text.deceased || interaction?.fields?.deceased?.active),\n memorial: type === \"obituaries\" && Boolean(text.memorial || interaction?.fields?.memorial?.active),\n sender: Boolean(text.sender || interaction?.fields?.sender?.active),\n church: type === \"obituaries\" && ceremonyCode !== \"NoCeremony\" && Boolean(\n (contact.showChurch && (contact.church || interaction?.fields?.church?.active))\n || (contact.showFuneralDate && (contact.funeralDate || interaction?.fields?.funeralDate?.active)),\n ),\n ceremony: type === \"thanks\" && Boolean(text.ceremony || interaction?.fields?.ceremony?.active),\n message: type === \"thanks\" && Boolean(text.message || interaction?.fields?.message?.active),\n thanks: Boolean(text.thanks || interaction?.fields?.thanks?.active),\n donation: Boolean(text.donation || interaction?.fields?.donation?.active),\n };\n const visibleOrder = orderedBlocks.filter((block) => visibleBlocks[block]);\n const firstVisibleBlock = visibleOrder[0];\n const previousVisibleBlock = (block: DefaultAdBlock) => visibleOrder[visibleOrder.indexOf(block) - 1];\n const blockMargin = (block: DefaultAdBlock, margin: number) => firstVisibleBlock === block ? 0 : margin;\n const firstMargin = previousVisibleBlock(\"intro\") === \"icon\" ? spacing.iconToText : spacing.introToTitle;\n const secondMargin = previousVisibleBlock(\"title\") === \"icon\" ? spacing.iconToText : spacing.introToTitle;\n const nameMargin = previousVisibleBlock(\"name\") === \"icon\" ? spacing.iconToName : spacing.textToName;\n\n return (\n <div\n {...htmlProps}\n ref={rootRef}\n data-default-ad=\"\"\n data-ad-content=\"\"\n data-ad-ready=\"true\"\n data-mode={mode}\n data-variant={variant}\n className={`gda-root ${className}`.trim()}\n style={{\n width: `${layout.columnsMm}mm`,\n minWidth: `${layout.columnsMm}mm`,\n ...(layout.heightMm != null ? { height: `${layout.heightMm}mm` } : {}),\n padding: `${layout.paddingMm}mm ${layout.horizontalPaddingMm}mm`,\n border: layout.border ? `${layout.borderWidthPt}pt solid black` : 0,\n gap: `${spacing.sectionGapMm}mm`,\n ...(typography.fontFamily != null ? { fontFamily: typography.fontFamily } : {}),\n ...rootStyle,\n }}\n >\n <OrderedBlocks order={orderedBlocks} renderBlock={renderBlock}>\n <AdBlock block=\"icon\">{icon ? (\n <div className=\"gda-icon\">\n <svg className={icon.className} xmlns=\"http://www.w3.org/2000/svg\"\n width={Number(icon.width) + 16} height={Number(icon.height) + 16}\n viewBox={icon.viewBox} role={icon.title ? \"img\" : undefined} aria-label={icon.title} aria-hidden={icon.title ? undefined : true}\n dangerouslySetInnerHTML={{ __html: decodeSvgMarkup(icon.svg) }} />\n </div>\n ) : null}</AdBlock>\n\n <AdBlock block=\"intro\">\n <Text field={type === \"thanks\" ? \"thanksIntro\" : \"intro\"} interaction={interaction} className={`${type === \"thanks\" ? \"gda-bold\" : \"\"} gda-break`}\n style={textStyle(type === \"thanks\" ? 14 : typography.introSize, typography.introLeading, blockMargin(\"intro\", firstMargin))}>\n {type === \"thanks\" && first ? first : type === \"obituaries\" ? first : null}\n </Text>\n </AdBlock>\n <AdBlock block=\"title\">\n <Text field={type === \"thanks\" ? \"briefIntroduction\" : \"title\"} interaction={interaction} className=\"gda-break\" style={textStyle(typography.titleSize, typography.titleLeading, blockMargin(\"title\", secondMargin))}>\n {type === \"thanks\" && second ? fmt.lowercaseFirst(second) : type === \"obituaries\" ? second : null}\n </Text>\n </AdBlock>\n\n <AdBlock block=\"name\">\n {hasName && !interaction?.fields?.firstName?.active && !interaction?.fields?.lastName?.active ? (\n <Text className=\"gda-name gda-bold gda-secondary-font\" style={{ ...textStyle(typography.nameSize, typography.nameLeading, blockMargin(\"name\", nameMargin)), ...secondaryFontStyle }}>\n {[contact.firstName, contact.lastName].filter(Boolean).join(\" \")}\n </Text>\n ) : hasName || hasActiveNamePart ? (\n <div className=\"gda-name gda-bold gda-secondary-font\" style={{ ...textStyle(typography.nameSize, typography.nameLeading, blockMargin(\"name\", nameMargin)), ...secondaryFontStyle }}>\n <NamePart field=\"firstName\" value={contact.firstName} interaction={interaction} showPlaceholder={hasActiveNamePart} />{\" \"}\n <NamePart field=\"lastName\" value={contact.lastName} interaction={interaction} showPlaceholder={hasActiveNamePart} />\n </div>\n ) : showEmptyNamePlaceholder ? <div className=\"gda-placeholder gda-name gda-bold gda-secondary-font\" style={{ ...textStyle(typography.nameSize, typography.nameLeading, blockMargin(\"name\", nameMargin)), ...secondaryFontStyle }}>{emptyNamePlaceholder}</div> : null}\n </AdBlock>\n\n <AdBlock block=\"dates\">\n {(contact.showBirthDate && (contact.birthDate || interaction?.fields?.birthDate?.active)) || (contact.showDeathDate && (contact.deathDate || interaction?.fields?.deathDate?.active)) ? (\n <div className={`gda-dates ${isSingleColumn ? \"gda-dates-single\" : \"\"}`}\n style={{ marginTop: `${blockMargin(\"dates\", spacing.dateTop)}pt`, lineHeight: `${typography.dateLeading}pt`, ...(isSingleColumn ? { gap: `${spacing.dateTop}pt` } : {}) }}>\n {contact.showBirthDate && (contact.birthDate || interaction?.fields?.birthDate?.active) ? (\n <span data-default-ad-field=\"birthDate\" {...fieldEvents(\"birthDate\", interaction)} className={interaction?.fields?.birthDate?.active ? interaction.fields.birthDate.className : undefined} style={{ fontSize: `${contact.birthDate && fmt.date(contact.birthDate).length > 10 ? typography.longDateSize : typography.dateSize}pt`, ...(contact.birthDate && fmt.date(contact.birthDate).length > 10 ? { letterSpacing: typography.longDateLetterSpacing } : {}), ...(interaction?.fields?.birthDate?.active ? interaction.fields.birthDate.style : {}) }}>\n ✻ {contact.birthDate ? fmt.date(contact.birthDate) : interaction?.fields?.birthDate?.placeholder}\n </span>\n ) : null}\n {contact.showDeathDate && (contact.deathDate || interaction?.fields?.deathDate?.active) ? (\n <span data-default-ad-field=\"deathDate\" {...fieldEvents(\"deathDate\", interaction)} className={interaction?.fields?.deathDate?.active ? interaction.fields.deathDate.className : undefined} style={{ fontSize: `${contact.deathDate && fmt.date(contact.deathDate).length > 10 ? typography.longDateSize : typography.dateSize}pt`, ...(contact.deathDate && fmt.date(contact.deathDate).length > 10 ? { letterSpacing: typography.longDateLetterSpacing } : {}), ...(interaction?.fields?.deathDate?.active ? interaction.fields.deathDate.style : {}) }}>\n <span className=\"gda-death-cross\" aria-hidden=\"true\">✝︎</span> {contact.deathDate ? fmt.date(contact.deathDate) : interaction?.fields?.deathDate?.placeholder}\n </span>\n ) : null}\n </div>\n ) : null}\n </AdBlock>\n\n <AdBlock block=\"deceased\">\n {type === \"obituaries\" ? <Text field=\"deceased\" interaction={interaction} className=\"gda-balance\" style={textStyle(typography.bodySize, typography.bodyLeading, blockMargin(\"deceased\", spacing.deceasedTop))}>{text.deceased}</Text> : null}\n </AdBlock>\n <AdBlock block=\"memorial\">\n {type === \"obituaries\" ? <Text field=\"memorial\" interaction={interaction} className=\"gda-italic gda-break\" style={textStyle(typography.memorialSize, typography.memorialLeading, blockMargin(\"memorial\", spacing.memorialTop))}>{text.memorial}</Text> : null}\n </AdBlock>\n <AdBlock block=\"sender\">\n {type === \"obituaries\" && (text.sender || interaction?.fields?.sender?.active) ? <Text field=\"sender\" interaction={interaction} className=\"gda-bold gda-secondary-font\" style={{ ...textStyle(typography.senderSize, typography.senderLeading, blockMargin(\"sender\", spacing.senderTop)), ...secondaryFontStyle }}>{text.sender}</Text> : null}\n\n {type === \"thanks\" ? <Text field=\"sender\" interaction={interaction} className=\"gda-secondary-font\" style={{ ...textStyle(typography.senderSize, typography.senderLeading, blockMargin(\"sender\", spacing.thanksTop)), ...secondaryFontStyle }}>{text.sender}</Text> : null}\n </AdBlock>\n\n <AdBlock block=\"church\">\n {type === \"obituaries\" && ceremonyCode !== \"NoCeremony\" && (contact.showChurch || contact.showFuneralDate) && (contact.church || contact.funeralDate || interaction?.fields?.church?.active || interaction?.fields?.funeralDate?.active) ? (\n <div className=\"gda-text\" style={textStyle(typography.ceremonySize, typography.ceremonyLeading, blockMargin(\"church\", spacing.ceremonyTop))}>\n {contact.showChurch && (contact.church || interaction?.fields?.church?.active) ? contact.church ? <div data-default-ad-field=\"church\" {...fieldEvents(\"church\", interaction)} className=\"gda-whitespace-pre-line\">{contact.church.length > 15 ? `${ceremonyLabel ?? \"\"} \\n ${contact.church}` : `${ceremonyLabel ?? \"\"} ${contact.church}`.trim()}</div> : <InlinePlaceholder field=\"church\" interaction={interaction} /> : null}\n {contact.showFuneralDate && (contact.funeralDate || interaction?.fields?.funeralDate?.active) ? contact.funeralDate ? <div data-default-ad-field=\"funeralDate\" {...fieldEvents(\"funeralDate\", interaction)}>{fmt.funeralDate(contact.funeralDate, Boolean(contact.hideFuneralYear))}</div> : <InlinePlaceholder field=\"funeralDate\" interaction={interaction} /> : null}\n </div>\n ) : null}\n </AdBlock>\n\n <AdBlock block=\"ceremony\">{type === \"thanks\" ? <Text field=\"ceremony\" interaction={interaction} className=\"gda-break\" style={textStyle(typography.bodySize, typography.bodyLeading, blockMargin(\"ceremony\", spacing.thanksTop))}>{text.ceremony ? fmt.lowercaseFirst(text.ceremony) : null}</Text> : null}</AdBlock>\n <AdBlock block=\"message\">{type === \"thanks\" ? <Text field=\"message\" interaction={interaction} className=\"gda-break\" style={textStyle(typography.bodySize, typography.bodyLeading, blockMargin(\"message\", spacing.thanksTop))}>{text.message}</Text> : null}</AdBlock>\n <AdBlock block=\"thanks\">\n <Text field=\"thanks\" interaction={interaction} className=\"gda-break\" style={textStyle(typography.thanksSize, typography.thanksLeading, blockMargin(\"thanks\", spacing.thanksTop))}>{text.thanks}</Text>\n </AdBlock>\n <AdBlock block=\"donation\">\n {text.donation ? <div className=\"gda-divider\" style={{ marginTop: `${blockMargin(\"donation\", spacing.donationTop)}pt` }} /> : null}\n {text.donation || interaction?.fields?.donation?.active ? <Text field=\"donation\" interaction={interaction} className=\"gda-donation gda-break\" style={textStyle(typography.donationSize, typography.donationLeading, blockMargin(\"donation\", spacing.donationTop))}>{text.donation}</Text> : null}\n </AdBlock>\n </OrderedBlocks>\n </div>\n );\n}\n\nfunction NamePart({ field, value, interaction, showPlaceholder }: { field: \"firstName\" | \"lastName\"; value?: string | null; interaction?: DefaultAdInteraction; showPlaceholder: boolean }) {\n const state = interaction?.fields?.[field];\n if (!value && !showPlaceholder) return null;\n const isPlaceholder = !value;\n return <span\n data-default-ad-field={field}\n {...fieldEvents(field, interaction)}\n className={`${isPlaceholder && !state?.active ? \"gda-placeholder\" : \"\"} ${state?.active ? `gda-name-part-active ${state.className ?? \"\"}` : \"\"}`.trim()}\n style={state?.active ? state.style : undefined}\n >{value || state?.placeholder}</span>;\n}\n\nfunction InlinePlaceholder({ field, interaction }: { field: DefaultAdField; interaction?: DefaultAdInteraction }) {\n const state = interaction?.fields?.[field];\n return <div><span\n data-default-ad-field={field}\n {...fieldEvents(field, interaction)}\n className={`gda-field-active-inline ${state?.className ?? \"\"}`.trim()}\n style={state?.style}\n >{state?.placeholder}</span></div>;\n}\n\ntype BlockRenderer = DefaultAdProps[\"renderBlock\"];\ntype AdBlockProps = { block: DefaultAdBlock; children: ReactNode; renderBlock?: BlockRenderer; index?: number };\n\nfunction AdBlock({ block, children, renderBlock, index = 0 }: AdBlockProps) {\n let node = children;\n if (node === null || node === undefined || node === false) return null;\n if (isValidElement<Record<string, unknown>>(children) && children.type !== Fragment) {\n node = cloneElement(children, { \"data-default-ad-block\": block });\n }\n return <>{renderBlock ? renderBlock(block, node, index) : node}</>;\n}\n\nfunction OrderedBlocks({ order, renderBlock, children }: { order: readonly DefaultAdBlock[]; renderBlock?: BlockRenderer; children: ReactNode }) {\n const blocks = new Map(\n Children.toArray(children).map((child) => {\n const element = child as ReactElement<AdBlockProps>;\n return [element.props.block, element] as const;\n }),\n );\n return <>{order.map((block, index) => {\n const element = blocks.get(block);\n return element ? cloneElement(element, { key: block, renderBlock, index }) : null;\n })}</>;\n}\n","import type { DefaultAdStyle, LegacyAdTemplate } from \"./types\";\n\n/**\n * Canonical layout shared by every consumer. Typography is deliberately kept\n * out of this object so applications can still select licensed/dynamic fonts.\n */\nexport const sharedDefaultAdLayout = {\n columnsMm: 86,\n heightMm: null,\n paddingMm: 4,\n horizontalPaddingMm: 2,\n border: false,\n borderWidthPt: 1.4,\n spacing: {\n iconToText: 11,\n introToTitle: 8,\n // These values originated as unitless React styles and therefore retain\n // their established numeric geometry.\n textToName: 4.2,\n iconToName: 4.95,\n dateTop: 5.6,\n deceasedTop: 6,\n memorialTop: 6,\n senderTop: 8,\n ceremonyTop: 8,\n thanksTop: 7,\n donationTop: 7,\n sectionGapMm: 0,\n },\n} as const satisfies Readonly<DefaultAdStyle>;\n\nexport const classicDefaultAdStyle: Readonly<DefaultAdStyle> = {\n ...sharedDefaultAdLayout,\n typography: {\n fontFamily: \"var(--default-ad-font-primary, Schoolbook, Georgia, serif)\",\n secondaryFontFamily: \"var(--default-ad-font-secondary, Schoolbook, Georgia, serif)\",\n introSize: 10,\n introLeading: 12,\n titleSize: 10,\n titleLeading: 12,\n nameSize: 14,\n nameLeading: 16.8,\n dateSize: 10,\n longDateSize: 10,\n longDateLetterSpacing: \"-0.01em\",\n dateLeading: 12,\n bodySize: 10,\n bodyLeading: 12,\n memorialSize: 10,\n memorialLeading: 12,\n senderSize: 10,\n senderLeading: 12,\n ceremonySize: 10,\n ceremonyLeading: 12,\n thanksSize: 10,\n thanksLeading: 12,\n donationSize: 10,\n donationLeading: 12,\n },\n};\n\nexport const publicationDefaultAdStyle: Readonly<DefaultAdStyle> = {\n ...sharedDefaultAdLayout,\n typography: {\n ...classicDefaultAdStyle.typography,\n fontFamily: \"var(--default-ad-font-primary, Raleway, Arial, sans-serif)\",\n secondaryFontFamily: \"var(--default-ad-font-secondary, Athelas, Georgia, serif)\",\n introSize: 11,\n introLeading: 13,\n titleSize: 11,\n titleLeading: 13,\n nameSize: 17,\n nameLeading: 15,\n dateSize: 11.5,\n longDateSize: 11,\n longDateLetterSpacing: \"-0.01em\",\n bodySize: 12,\n bodyLeading: 13,\n memorialSize: 12,\n memorialLeading: 13,\n senderSize: 13,\n senderLeading: 13,\n ceremonySize: 11,\n ceremonyLeading: 13,\n thanksSize: 11,\n thanksLeading: 13,\n donationSize: 11,\n donationLeading: 13,\n },\n};\n\nexport function styleFromLegacyTemplate(template?: LegacyAdTemplate | null): DefaultAdStyle {\n if (!template) return publicationDefaultAdStyle;\n return {\n ...publicationDefaultAdStyle,\n typography: {\n ...publicationDefaultAdStyle.typography,\n fontFamily: template.font1 || publicationDefaultAdStyle.typography?.fontFamily,\n secondaryFontFamily: template.font2 || publicationDefaultAdStyle.typography?.secondaryFontFamily,\n introSize: template.introSize,\n introLeading: template.introLeading,\n titleSize: template.titleSize,\n titleLeading: template.titleLeading,\n nameSize: template.fullnameSize,\n nameLeading: template.fullnameLeading,\n ...fontPair(template.deceasedText, \"bodySize\", \"bodyLeading\"),\n ...fontPair(template.memorialText, \"memorialSize\", \"memorialLeading\"),\n ...fontPair(template.senderText, \"senderSize\", \"senderLeading\"),\n ...fontPair(template.ceremonyText, \"ceremonySize\", \"ceremonyLeading\"),\n ...fontPair(template.thanksText, \"thanksSize\", \"thanksLeading\"),\n ...fontPair(template.donationText, \"donationSize\", \"donationLeading\"),\n ...tracking(template.longDatesText),\n },\n };\n}\n\nfunction fontPair(value: string | undefined, sizeKey: string, leadingKey: string): Record<string, number> {\n if (!value) return {};\n const size = value.match(/text-\\[(-?[\\d.]+)pt\\]/)?.[1];\n const leading = value.match(/leading-\\[(-?[\\d.]+)pt\\]/)?.[1];\n return {\n ...(size ? { [sizeKey]: Number(size) } : {}),\n ...(leading ? { [leadingKey]: Number(leading) } : {}),\n };\n}\n\nfunction tracking(value: string | undefined): { longDateLetterSpacing?: string } {\n const amount = value?.match(/tracking-\\[([^\\]]+)\\]/)?.[1];\n return amount ? { longDateLetterSpacing: amount } : {};\n}\n","import type { DefaultAdBlock, DefaultAdType } from \"./types\";\n\nexport const DEFAULT_OBITUARY_LAYOUT_ORDER = [\n \"icon\", \"intro\", \"title\", \"name\", \"dates\", \"deceased\", \"memorial\",\n \"sender\", \"church\", \"thanks\", \"donation\",\n] as const satisfies readonly DefaultAdBlock[];\n\nexport const DEFAULT_THANK_YOU_LAYOUT_ORDER = [\n \"icon\", \"intro\", \"title\", \"name\", \"dates\", \"ceremony\", \"message\",\n \"thanks\", \"sender\", \"donation\",\n] as const satisfies readonly DefaultAdBlock[];\n\nexport const DEFAULT_AD_LAYOUT_ORDER = DEFAULT_OBITUARY_LAYOUT_ORDER;\n\nconst VALID_BLOCKS = new Set<DefaultAdBlock>([\n ...DEFAULT_OBITUARY_LAYOUT_ORDER,\n ...DEFAULT_THANK_YOU_LAYOUT_ORDER,\n]);\n\nexport function defaultAdLayoutOrder(type: DefaultAdType): readonly DefaultAdBlock[] {\n return type === \"thanks\" ? DEFAULT_THANK_YOU_LAYOUT_ORDER : DEFAULT_OBITUARY_LAYOUT_ORDER;\n}\n\nexport function normalizeDefaultAdLayoutOrder(\n order: readonly unknown[] | null | undefined,\n type: DefaultAdType,\n): DefaultAdBlock[] {\n const defaults = defaultAdLayoutOrder(type);\n const applicable = new Set(defaults);\n const seen = new Set<DefaultAdBlock>();\n const normalized: DefaultAdBlock[] = [];\n for (const value of order ?? []) {\n if (typeof value !== \"string\" || !VALID_BLOCKS.has(value as DefaultAdBlock)) continue;\n const block = value as DefaultAdBlock;\n if (!applicable.has(block) || seen.has(block)) continue;\n seen.add(block);\n normalized.push(block);\n }\n for (const block of defaults) if (!seen.has(block)) normalized.push(block);\n return normalized;\n}\n","import type { DefaultAdFormatters } from \"./types\";\n\nexport const defaultFormatters: Required<DefaultAdFormatters> = {\n date(value) {\n const match = value.match(/^(\\d{4})-(\\d{2})-(\\d{2})/);\n return match ? `${match[3]}.${match[2]}.${match[1]}` : value;\n },\n funeralDate(value, hideYear) {\n if (!hideYear) return value;\n return value.replace(/([.\\/-])\\d{4}(?=\\D|$)/, \"\");\n },\n lowercaseFirst(value) {\n return value ? value.charAt(0).toLocaleLowerCase() + value.slice(1) : value;\n },\n};\n\nexport function mergeDefined<T extends object>(base: T, overrides?: Partial<T>): T {\n if (!overrides) return { ...base };\n return Object.fromEntries(\n Object.entries({ ...base, ...overrides }).filter(([, value]) => value !== undefined),\n ) as T;\n}\n\nexport function decodeSvgMarkup(value: string): string {\n return value\n .replace(/</g, \"<\")\n .replace(/>/g, \">\")\n .replace(/"/g, '\"')\n .replace(/&#(?:0*39|x0*27);/gi, \"'\")\n .replace(/&/g, \"&\");\n}\n"],"mappings":";AAAA,SAAS,UAAU,cAAc,UAAU,sBAAsB;;;ACM1D,IAAM,wBAAwB;AAAA,EACnC,WAAW;AAAA,EACX,UAAU;AAAA,EACV,WAAW;AAAA,EACX,qBAAqB;AAAA,EACrB,QAAQ;AAAA,EACR,eAAe;AAAA,EACf,SAAS;AAAA,IACP,YAAY;AAAA,IACZ,cAAc;AAAA;AAAA;AAAA,IAGd,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,SAAS;AAAA,IACT,aAAa;AAAA,IACb,aAAa;AAAA,IACb,WAAW;AAAA,IACX,aAAa;AAAA,IACb,WAAW;AAAA,IACX,aAAa;AAAA,IACb,cAAc;AAAA,EAChB;AACF;AAEO,IAAM,wBAAkD;AAAA,EAC7D,GAAG;AAAA,EACH,YAAY;AAAA,IACV,YAAY;AAAA,IACZ,qBAAqB;AAAA,IACrB,WAAW;AAAA,IACX,cAAc;AAAA,IACd,WAAW;AAAA,IACX,cAAc;AAAA,IACd,UAAU;AAA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AAa,MAAM,CAAC,IAAI;AAAA,EAC/E,CAAC,GAAE;AACL;","names":["Fragment"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "navne-default-ad",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "Reusable obituary and thank-you advertisement renderer",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"sideEffects": ["**/*.css"],
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"typecheck": "tsc --noEmit",
|
|
24
24
|
"test": "vitest run",
|
|
25
25
|
"smoke": "node scripts/smoke.cjs",
|
|
26
|
+
"smoke:layout": "node scripts/layout-smoke.cjs",
|
|
26
27
|
"pack:check": "npm pack --dry-run"
|
|
27
28
|
},
|
|
28
29
|
"peerDependencies": {
|