includio-cms 0.34.1 → 0.36.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.
Files changed (52) hide show
  1. package/API.md +6 -2
  2. package/CHANGELOG.md +29 -0
  3. package/DOCS.md +1 -1
  4. package/dist/admin/client/shop/coupon-edit-page.svelte +1 -0
  5. package/dist/admin/client/shop/coupon-form.svelte +62 -2
  6. package/dist/admin/client/shop/coupon-schema.d.ts +5 -0
  7. package/dist/admin/client/shop/coupon-schema.js +2 -0
  8. package/dist/admin/client/shop/shop-order-detail-page.svelte +72 -2
  9. package/dist/admin/components/fields/date-field.svelte +81 -27
  10. package/dist/admin/components/fields/date-field.svelte.d.ts +3 -0
  11. package/dist/admin/components/fields/datetime-field.svelte +142 -29
  12. package/dist/admin/components/fields/datetime-field.svelte.d.ts +3 -0
  13. package/dist/admin/remote/shop.remote.d.ts +6 -0
  14. package/dist/admin/remote/shop.remote.js +4 -0
  15. package/dist/core/server/generator/generator.js +3 -2
  16. package/dist/db-postgres/schema/shop/coupons.d.ts +20 -0
  17. package/dist/db-postgres/schema/shop/coupons.js +3 -0
  18. package/dist/paraglide/messages/_index.d.ts +36 -3
  19. package/dist/paraglide/messages/_index.js +71 -3
  20. package/dist/paraglide/messages/en.d.ts +5 -0
  21. package/dist/paraglide/messages/en.js +14 -0
  22. package/dist/paraglide/messages/pl.d.ts +5 -0
  23. package/dist/paraglide/messages/pl.js +14 -0
  24. package/dist/shop/cart/types.d.ts +7 -0
  25. package/dist/shop/client/index.d.ts +1 -0
  26. package/dist/shop/http/order-handler.js +2 -1
  27. package/dist/shop/index.d.ts +2 -1
  28. package/dist/shop/index.js +4 -2
  29. package/dist/shop/pricing.d.ts +18 -6
  30. package/dist/shop/pricing.js +33 -8
  31. package/dist/shop/server/cart-hydrate.js +30 -3
  32. package/dist/shop/server/coupons.js +3 -2
  33. package/dist/shop/server/email.js +41 -7
  34. package/dist/shop/server/invoices.js +9 -3
  35. package/dist/shop/server/orders.js +2 -1
  36. package/dist/shop/template.d.ts +20 -0
  37. package/dist/shop/template.js +82 -5
  38. package/dist/shop/templates/_partials/items.en.html +10 -0
  39. package/dist/shop/templates/_partials/items.pl.html +10 -0
  40. package/dist/shop/types.d.ts +25 -1
  41. package/dist/updates/0.35.0/index.d.ts +2 -0
  42. package/dist/updates/0.35.0/index.js +16 -0
  43. package/dist/updates/0.36.0/index.d.ts +2 -0
  44. package/dist/updates/0.36.0/index.js +13 -0
  45. package/dist/updates/index.js +5 -1
  46. package/package.json +1 -1
  47. package/dist/paraglide/messages/hello_world.d.ts +0 -5
  48. package/dist/paraglide/messages/hello_world.js +0 -33
  49. package/dist/paraglide/messages/login_hello.d.ts +0 -16
  50. package/dist/paraglide/messages/login_hello.js +0 -34
  51. package/dist/paraglide/messages/login_please_login.d.ts +0 -16
  52. package/dist/paraglide/messages/login_please_login.js +0 -34
@@ -11,3 +11,23 @@
11
11
  * @public
12
12
  */
13
13
  export declare function interpolateTemplate(template: string, vars: Record<string, unknown>, locale: string): string;
14
+ /**
15
+ * Render a multilingual shop-name template (`invoiceName` / `cartName`)
16
+ * against an entry's data and a precomputed variant label. Returns `null`
17
+ * when the template is absent or yields an empty string after trimming —
18
+ * callers fall back to legacy behavior.
19
+ *
20
+ * Variables: `{<slug>}` resolves to any top-level (dot-path) field on the
21
+ * entry's published data. The reserved `{variant}` returns the rendered
22
+ * variant label. I18n fields stored as `{ pl: '…', en: '…' }` are auto
23
+ * unwrapped to the active language.
24
+ *
25
+ * @public
26
+ */
27
+ export declare function renderShopName(template: I18nTemplate | null | undefined, ctx: {
28
+ entryData: Record<string, unknown> | null | undefined;
29
+ variant: string;
30
+ language: string;
31
+ }, locale: string): string | null;
32
+ /** @public */
33
+ export type I18nTemplate = Record<string, string>;
@@ -17,18 +17,95 @@ export function interpolateTemplate(template, vars, locale) {
17
17
  }
18
18
  return template.replace(/\{([^}]+)\}/g, (_match, body) => {
19
19
  const { key, filter, arg } = parsePlaceholder(body);
20
- if (!(key in vars)) {
20
+ const lookup = resolveKey(vars, key, locale);
21
+ if (lookup === undefined) {
21
22
  console.warn(`[interpolateTemplate] Unknown key "${key}" in template: ${template}`);
22
23
  return '';
23
24
  }
24
- const raw = vars[key];
25
- if (raw === null || raw === undefined)
25
+ if (lookup === null)
26
26
  return '';
27
27
  if (!filter)
28
- return String(raw);
29
- return applyFilter(raw, filter, arg, locale);
28
+ return String(lookup);
29
+ return applyFilter(lookup, filter, arg, locale);
30
30
  });
31
31
  }
32
+ /**
33
+ * Resolve a placeholder key against `vars`. Supports dot-path (`hero.title`)
34
+ * and auto-unwraps an `I18nText`-shaped record (`{ pl: '…', en: '…' }`) to
35
+ * the active locale (falls back to the first key when the exact locale is
36
+ * missing). Returns `undefined` when the path does not exist — caller treats
37
+ * that as "unknown key" and warns. Returns `null` when the path exists but
38
+ * the value is nullish; caller emits empty string.
39
+ *
40
+ * @internal
41
+ */
42
+ function resolveKey(vars, key, locale) {
43
+ const parts = key.split('.');
44
+ let current = vars;
45
+ for (const part of parts) {
46
+ if (current === null || current === undefined)
47
+ return undefined;
48
+ if (typeof current !== 'object')
49
+ return undefined;
50
+ const obj = current;
51
+ if (!(part in obj))
52
+ return undefined;
53
+ current = obj[part];
54
+ }
55
+ return unwrapI18n(current, locale);
56
+ }
57
+ /** @internal */
58
+ function unwrapI18n(value, locale) {
59
+ if (value === null || value === undefined)
60
+ return value;
61
+ if (typeof value !== 'object' || Array.isArray(value))
62
+ return value;
63
+ const obj = value;
64
+ const keys = Object.keys(obj);
65
+ if (keys.length === 0)
66
+ return value;
67
+ const allStrings = keys.every((k) => typeof obj[k] === 'string');
68
+ if (!allStrings)
69
+ return value;
70
+ if (locale in obj)
71
+ return obj[locale];
72
+ const baseLocale = locale.split('-')[0];
73
+ if (baseLocale in obj)
74
+ return obj[baseLocale];
75
+ return obj[keys[0]];
76
+ }
77
+ /**
78
+ * Render a multilingual shop-name template (`invoiceName` / `cartName`)
79
+ * against an entry's data and a precomputed variant label. Returns `null`
80
+ * when the template is absent or yields an empty string after trimming —
81
+ * callers fall back to legacy behavior.
82
+ *
83
+ * Variables: `{<slug>}` resolves to any top-level (dot-path) field on the
84
+ * entry's published data. The reserved `{variant}` returns the rendered
85
+ * variant label. I18n fields stored as `{ pl: '…', en: '…' }` are auto
86
+ * unwrapped to the active language.
87
+ *
88
+ * @public
89
+ */
90
+ export function renderShopName(template, ctx, locale) {
91
+ if (!template)
92
+ return null;
93
+ const tpl = template[ctx.language] ?? template[ctx.language.split('-')[0]] ?? null;
94
+ if (!tpl)
95
+ return null;
96
+ const vars = {
97
+ ...(ctx.entryData ?? {}),
98
+ variant: ctx.variant
99
+ };
100
+ for (const match of tpl.matchAll(/\{([^}]+)\}/g)) {
101
+ const key = match[1].split('|')[0].trim();
102
+ const value = resolveKey(vars, key, locale);
103
+ if (value === undefined || value === null || value === '')
104
+ return null;
105
+ }
106
+ const rendered = interpolateTemplate(tpl, vars, locale).trim();
107
+ return rendered.length > 0 ? rendered : null;
108
+ }
32
109
  /** @internal */
33
110
  function parsePlaceholder(body) {
34
111
  const [keyPart, filterPart] = body.split('|', 2);
@@ -1,3 +1,13 @@
1
+ {{#if hasParticipants}}
2
+ <table style="width:100%;border-collapse:collapse;font-size:14px;margin-bottom:16px;">
3
+ <thead><tr style="background:#f4f2fa;"><th align="left" colspan="2" style="padding:8px;">Participants</th></tr></thead>
4
+ <tbody>
5
+ {{#each participants}}
6
+ <tr><td style="padding:6px 8px;border-bottom:1px solid #eee;width:24px;color:#5B4A9E;font-weight:700;text-align:right;">{{number}}.</td><td style="padding:6px 8px;border-bottom:1px solid #eee;font-weight:600;">{{firstName}} {{lastName}}</td></tr>
7
+ {{/each}}
8
+ </tbody>
9
+ </table>
10
+ {{/if}}
1
11
  <table style="width:100%;border-collapse:collapse;font-size:14px;">
2
12
  <thead><tr style="background:#f4f2fa;"><th align="left" style="padding:8px;">Item</th><th style="padding:8px;">Qty</th><th align="right" style="padding:8px;">Total</th></tr></thead>
3
13
  <tbody>
@@ -1,3 +1,13 @@
1
+ {{#if hasParticipants}}
2
+ <table style="width:100%;border-collapse:collapse;font-size:14px;margin-bottom:16px;">
3
+ <thead><tr style="background:#f4f2fa;"><th align="left" colspan="2" style="padding:8px;">Uczestnicy</th></tr></thead>
4
+ <tbody>
5
+ {{#each participants}}
6
+ <tr><td style="padding:6px 8px;border-bottom:1px solid #eee;width:24px;color:#5B4A9E;font-weight:700;text-align:right;">{{number}}.</td><td style="padding:6px 8px;border-bottom:1px solid #eee;font-weight:600;">{{firstName}} {{lastName}}</td></tr>
7
+ {{/each}}
8
+ </tbody>
9
+ </table>
10
+ {{/if}}
1
11
  <table style="width:100%;border-collapse:collapse;font-size:14px;">
2
12
  <thead><tr style="background:#f4f2fa;"><th align="left" style="padding:8px;">Pozycja</th><th style="padding:8px;">Ilość</th><th align="right" style="padding:8px;">Suma</th></tr></thead>
3
13
  <tbody>
@@ -394,6 +394,28 @@ export interface ShopConfig {
394
394
  * @public
395
395
  */
396
396
  variantLabel?: VariantLabelConfig;
397
+ /**
398
+ * Multilingual template overriding the product name shown on invoices
399
+ * (Fakturownia etc.) and — unless `cartName` is set — also in cart and
400
+ * order views. Keys are language codes (`pl`, `en`, …). Placeholders use
401
+ * the same engine as `variantLabel`: `{slug}` resolves to a top-level
402
+ * field on the entry (dot-path supported, i18n-aware); the reserved
403
+ * `{variant}` resolves to the rendered `variantLabel`. Filters from
404
+ * {@link interpolateTemplate} (`|date`, `|currency`, `|uppercase`) apply.
405
+ * Omitted = legacy behavior (`product — variant`).
406
+ * @public
407
+ */
408
+ invoiceName?: I18nText;
409
+ /**
410
+ * Multilingual template overriding the product name shown in cart and
411
+ * storefront order views ONLY (invoice still uses `invoiceName` or
412
+ * legacy). Set this in addition to `invoiceName` when the cart needs a
413
+ * shorter / different copy than the invoice line. Same syntax as
414
+ * {@link ShopConfig.invoiceName}. Omitted = falls back to `invoiceName`,
415
+ * then to legacy `productTitle`.
416
+ * @public
417
+ */
418
+ cartName?: I18nText;
397
419
  /**
398
420
  * Opt-in storefront filter for time-bound variants (events, courses).
399
421
  * Omitted = no filtering (legacy behavior — every variant always listed).
@@ -434,7 +456,7 @@ export interface ShopConfig {
434
456
  */
435
457
  onOrderPaid?: (order: Order) => Promise<void> | void;
436
458
  }
437
- export interface ResolvedShopConfig extends Omit<ShopConfig, 'variantLabel' | 'variantExpiry' | 'invoicing'> {
459
+ export interface ResolvedShopConfig extends Omit<ShopConfig, 'variantLabel' | 'variantExpiry' | 'invoicing' | 'invoiceName' | 'cartName'> {
438
460
  features: Required<ShopFeatures>;
439
461
  rateLimit: Required<ShopRateLimit>;
440
462
  carriers: CarrierAdapter[];
@@ -444,5 +466,7 @@ export interface ResolvedShopConfig extends Omit<ShopConfig, 'variantLabel' | 'v
444
466
  variantAttributes: Record<string, VariantAttribute>;
445
467
  variantLabel: VariantLabelConfig | null;
446
468
  variantExpiry: VariantExpiryConfig | null;
469
+ invoiceName: I18nText | null;
470
+ cartName: I18nText | null;
447
471
  }
448
472
  export {};
@@ -0,0 +1,2 @@
1
+ import type { CmsUpdate } from '../index.js';
2
+ export declare const update: CmsUpdate;
@@ -0,0 +1,16 @@
1
+ export const update = {
2
+ version: '0.35.0',
3
+ date: '2026-06-05',
4
+ description: 'Kupon `appliesTo` (netto/brutto), uczestnicy w `notes` (admin + email), Calendar+Popover w polach `date`/`datetime` (admin), `api.ts` bez `FormEntryMap` gdy projekt nie ma form. Additive only — domyślne zachowania bez zmian.',
5
+ features: [
6
+ '`shop_coupons` dostaje kolumnę `applies_to` (enum `net`/`gross`, default `net`). `calculateCouponDiscountNet()` (`$lib/shop/pricing.ts`) liczy zniżkę od brutto (konwersja do netto przez średnią ważoną VAT) gdy `appliesTo="gross"` — działa zarówno dla `percent`, jak i `fixed`. Storage rabatu w bazie nadal w netto (canonical). Domyślnie `net` — istniejące kupony zachowują obecne zachowanie.',
7
+ 'Admin coupon form (`coupon-form.svelte`) zyskuje toggle „Rabat dotyczy: netto / brutto" wzorowany na `inputMode` w `shop-field.svelte` — z helper textem objaśniającym wpływ na cenę zamówienia.',
8
+ '`order.notes` jest teraz traktowane jako opcjonalny JSON (`{ org?, orgName?, participants?: Array<{firstName, lastName}> }`) w admin order detail (`shop-order-detail-page.svelte`) oraz w kontekście emaila (`items.pl.html`/`items.en.html` przez `email.ts`). Plain-text notatki nadal renderują się raw — JSON wykrywany przez `try/catch` parse + shape guard.',
9
+ 'Admin pola `date` i `datetime` (`date-field.svelte`, `datetime-field.svelte`) używają `bits-ui` Calendar w `Popover` zamiast natywnych `<input type="date|datetime-local">` — kalendarz z dropdownem miesiąca/roku, dwa Selecty (godzina 00–23, minuta 00/15/30/45) dla datetime, locale `pl-PL`/`en-GB` z `interfaceLanguage`. Output bez zmian: ISO datetime (`datetime`) / `YYYY-MM-DDT00:00:00.000Z` (`date`).'
10
+ ],
11
+ fixes: [
12
+ '`generateAPI()` (`src/lib/core/server/generator/generator.ts`) nie wstrzykuje już importu `FormEntryMap` / `createFormSubmission` w wygenerowanym `api.ts`, gdy projekt nie ma zdefiniowanych form (`config.forms` puste). Wcześniej projekty bez form miały martwy import, który psuł type-check / build.'
13
+ ],
14
+ breakingChanges: [],
15
+ sql: `ALTER TABLE shop_coupons ADD COLUMN IF NOT EXISTS applies_to text NOT NULL DEFAULT 'net';`
16
+ };
@@ -0,0 +1,2 @@
1
+ import type { CmsUpdate } from '../index.js';
2
+ export declare const update: CmsUpdate;
@@ -0,0 +1,13 @@
1
+ export const update = {
2
+ version: '0.36.0',
3
+ date: '2026-06-05',
4
+ description: '`defineShop({ invoiceName, cartName })` — opcjonalne multilingual template overriding produktowej nazwy w koszyku, podsumowaniu zamówienia i na fakturze. Reusuje engine od `variantLabel.template` (`{slug}`, `{slug|filter}`), z nowymi możliwościami: dot-path (`{hero.title}`) i auto-unwrap pól i18n. Reserved `{variant}` = wyrenderowany variantLabel. Order item `nameSnapshot` zyskuje opcjonalne pole `invoice` (zamrażane przy checkout). Additive — brak zmian default behavior.',
5
+ features: [
6
+ '`ShopConfig.invoiceName?: I18nText` i `ShopConfig.cartName?: I18nText` — template (per język) renderowany przy hydracji koszyka i tworzeniu zamówienia. Fallback chain: `cartName` (koszyk) → `invoiceName` (koszyk + faktura) → legacy `productTitle` / `product — variant`. `invoiceName` jest **full override** na fakturze — wariant NIE jest doklejany automatycznie, użyj `{variant}` w template.',
7
+ '`interpolateTemplate()` (`$lib/shop/template.ts`) zyskuje dot-path resolver (`{hero.title}`) oraz auto-unwrap pól i18n `{ pl: …, en: … }` do aktualnego języka (z fallbackiem `lang.split("-")[0]` → pierwszy klucz). Backwards-compatible: istniejące `{key}` (płaskie) działają bez zmian.',
8
+ '`renderShopName(template, ctx, locale)` (`$lib/shop/template.ts`) — public helper łączący resolverę I18nText template + budowę vars `{ ...entryData, variant }`. Używany wewnętrznie przez cart-hydrate; eksportowany dla customowych use case (np. own checkout flows).',
9
+ '`CartLine` zyskuje pole `invoiceTitle: string | null` — frozen invoice copy obok `productTitle` (cart copy). `orders.createOrderFromCart` snapshot-uje to do `nameSnapshot.invoice`. `buildInvoicePayload()` honoruje `nameSnapshot.invoice` — fallback do `product — variant` gdy brak.'
10
+ ],
11
+ fixes: [],
12
+ breakingChanges: []
13
+ };
@@ -65,6 +65,8 @@ import { update as update0270 } from './0.27.0/index.js';
65
65
  import { update as update0280 } from './0.28.0/index.js';
66
66
  import { update as update0340 } from './0.34.0/index.js';
67
67
  import { update as update0341 } from './0.34.1/index.js';
68
+ import { update as update0350 } from './0.35.0/index.js';
69
+ import { update as update0360 } from './0.36.0/index.js';
68
70
  export const updates = [
69
71
  update0065,
70
72
  update0066,
@@ -132,7 +134,9 @@ export const updates = [
132
134
  update0270,
133
135
  update0280,
134
136
  update0340,
135
- update0341
137
+ update0341,
138
+ update0350,
139
+ update0360
136
140
  ];
137
141
  export const getUpdatesFrom = (fromVersion) => {
138
142
  const fromParts = fromVersion.split('.').map(Number);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "includio-cms",
3
- "version": "0.34.1",
3
+ "version": "0.36.0",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && npm run prepack",
@@ -1,5 +0,0 @@
1
- export function hello_world(inputs: {
2
- name: NonNullable<unknown>;
3
- }, options?: {
4
- locale?: "en" | "pl";
5
- }): string;
@@ -1,33 +0,0 @@
1
- /* eslint-disable */
2
- import { getLocale, trackMessageCall, experimentalMiddlewareLocaleSplitting, isServer } from '../runtime.js';
3
-
4
- const en_hello_world = /** @type {(inputs: { name: NonNullable<unknown> }) => string} */ (i) => {
5
- return `Hello, ${i.name} from en!`
6
- };
7
-
8
- const pl_hello_world = /** @type {(inputs: { name: NonNullable<unknown> }) => string} */ (i) => {
9
- return `Hello, ${i.name} from pl!`
10
- };
11
-
12
- /**
13
- * This function has been compiled by [Paraglide JS](https://inlang.com/m/gerre34r).
14
- *
15
- * - Changing this function will be over-written by the next build.
16
- *
17
- * - If you want to change the translations, you can either edit the source files e.g. `en.json`, or
18
- * use another inlang app like [Fink](https://inlang.com/m/tdozzpar) or the [VSCode extension Sherlock](https://inlang.com/m/r7kp499g).
19
- *
20
- * @param {{ name: NonNullable<unknown> }} inputs
21
- * @param {{ locale?: "en" | "pl" }} options
22
- * @returns {string}
23
- */
24
- /* @__NO_SIDE_EFFECTS__ */
25
- export const hello_world = (inputs, options = {}) => {
26
- if (experimentalMiddlewareLocaleSplitting && isServer === false) {
27
- return /** @type {any} */ (globalThis).__paraglide_ssr.hello_world(inputs)
28
- }
29
- const locale = options.locale ?? getLocale()
30
- trackMessageCall("hello_world", locale)
31
- if (locale === "en") return en_hello_world(inputs)
32
- return pl_hello_world(inputs)
33
- };
@@ -1,16 +0,0 @@
1
- export { login_hello as login.hello };
2
- /**
3
- * This function has been compiled by [Paraglide JS](https://inlang.com/m/gerre34r).
4
- *
5
- * - Changing this function will be over-written by the next build.
6
- *
7
- * - If you want to change the translations, you can either edit the source files e.g. `en.json`, or
8
- * use another inlang app like [Fink](https://inlang.com/m/tdozzpar) or the [VSCode extension Sherlock](https://inlang.com/m/r7kp499g).
9
- *
10
- * @param {{}} inputs
11
- * @param {{ locale?: "en" | "pl" }} options
12
- * @returns {string}
13
- */
14
- declare function login_hello(inputs?: {}, options?: {
15
- locale?: "en" | "pl";
16
- }): string;
@@ -1,34 +0,0 @@
1
- /* eslint-disable */
2
- import { getLocale, trackMessageCall, experimentalMiddlewareLocaleSplitting, isServer } from '../runtime.js';
3
-
4
- const en_login_hello = /** @type {(inputs: {}) => string} */ () => {
5
- return `Welcome back`
6
- };
7
-
8
- const pl_login_hello = /** @type {(inputs: {}) => string} */ () => {
9
- return `Witaj ponownie`
10
- };
11
-
12
- /**
13
- * This function has been compiled by [Paraglide JS](https://inlang.com/m/gerre34r).
14
- *
15
- * - Changing this function will be over-written by the next build.
16
- *
17
- * - If you want to change the translations, you can either edit the source files e.g. `en.json`, or
18
- * use another inlang app like [Fink](https://inlang.com/m/tdozzpar) or the [VSCode extension Sherlock](https://inlang.com/m/r7kp499g).
19
- *
20
- * @param {{}} inputs
21
- * @param {{ locale?: "en" | "pl" }} options
22
- * @returns {string}
23
- */
24
- /* @__NO_SIDE_EFFECTS__ */
25
- const login_hello = (inputs = {}, options = {}) => {
26
- if (experimentalMiddlewareLocaleSplitting && isServer === false) {
27
- return /** @type {any} */ (globalThis).__paraglide_ssr.login_hello(inputs)
28
- }
29
- const locale = options.locale ?? getLocale()
30
- trackMessageCall("login_hello", locale)
31
- if (locale === "en") return en_login_hello(inputs)
32
- return pl_login_hello(inputs)
33
- };
34
- export { login_hello as "login.hello" }
@@ -1,16 +0,0 @@
1
- export { login_please_login as login.please_login };
2
- /**
3
- * This function has been compiled by [Paraglide JS](https://inlang.com/m/gerre34r).
4
- *
5
- * - Changing this function will be over-written by the next build.
6
- *
7
- * - If you want to change the translations, you can either edit the source files e.g. `en.json`, or
8
- * use another inlang app like [Fink](https://inlang.com/m/tdozzpar) or the [VSCode extension Sherlock](https://inlang.com/m/r7kp499g).
9
- *
10
- * @param {{}} inputs
11
- * @param {{ locale?: "en" | "pl" }} options
12
- * @returns {string}
13
- */
14
- declare function login_please_login(inputs?: {}, options?: {
15
- locale?: "en" | "pl";
16
- }): string;
@@ -1,34 +0,0 @@
1
- /* eslint-disable */
2
- import { getLocale, trackMessageCall, experimentalMiddlewareLocaleSplitting, isServer } from '../runtime.js';
3
-
4
- const en_login_please_login = /** @type {(inputs: {}) => string} */ () => {
5
- return `Login to your account`
6
- };
7
-
8
- const pl_login_please_login = /** @type {(inputs: {}) => string} */ () => {
9
- return `Zaloguj się na swoje konto`
10
- };
11
-
12
- /**
13
- * This function has been compiled by [Paraglide JS](https://inlang.com/m/gerre34r).
14
- *
15
- * - Changing this function will be over-written by the next build.
16
- *
17
- * - If you want to change the translations, you can either edit the source files e.g. `en.json`, or
18
- * use another inlang app like [Fink](https://inlang.com/m/tdozzpar) or the [VSCode extension Sherlock](https://inlang.com/m/r7kp499g).
19
- *
20
- * @param {{}} inputs
21
- * @param {{ locale?: "en" | "pl" }} options
22
- * @returns {string}
23
- */
24
- /* @__NO_SIDE_EFFECTS__ */
25
- const login_please_login = (inputs = {}, options = {}) => {
26
- if (experimentalMiddlewareLocaleSplitting && isServer === false) {
27
- return /** @type {any} */ (globalThis).__paraglide_ssr.login_please_login(inputs)
28
- }
29
- const locale = options.locale ?? getLocale()
30
- trackMessageCall("login_please_login", locale)
31
- if (locale === "en") return en_login_please_login(inputs)
32
- return pl_login_please_login(inputs)
33
- };
34
- export { login_please_login as "login.please_login" }