@helpai/elements 0.30.1 → 0.32.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/configurator.mjs +24 -1
- package/elements-web-component.esm.js +27 -27
- package/elements-web-component.esm.js.map +4 -4
- package/elements.cjs.js +27 -27
- package/elements.cjs.js.map +4 -4
- package/elements.esm.js +27 -27
- package/elements.esm.js.map +4 -4
- package/elements.js +27 -27
- package/elements.js.map +4 -4
- package/index.d.ts +41 -1
- package/index.mjs +181 -43
- package/package.json +1 -1
- package/schema.d.ts +80 -2
- package/schema.json +100 -2
- package/schema.mjs +27 -1
- package/style.css +1 -1
- package/web-component.mjs +181 -43
package/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as Asset, B as BlocksConfig, C as ConnectionConfig, a as ConnectionConfigPartial, H as HandshakeResponse, L as Link, S as ServerConfig, b as SiteConfig, W as WidgetConfig, c as WidgetConfigPartial, d as WidgetSettings, e as WidgetSettingsPartial } from './deployment-
|
|
1
|
+
export { A as Asset, B as BlocksConfig, C as ConnectionConfig, a as ConnectionConfigPartial, H as HandshakeResponse, L as Link, S as ServerConfig, b as SiteConfig, W as WidgetConfig, c as WidgetConfigPartial, d as WidgetSettings, e as WidgetSettingsPartial } from './deployment-By1iOOzQ.js';
|
|
2
2
|
import 'zod';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -505,6 +505,46 @@ interface FormDef {
|
|
|
505
505
|
* `/activity` records for such forms).
|
|
506
506
|
*/
|
|
507
507
|
reviewable?: boolean;
|
|
508
|
+
/** BCP-47 locale the top-level strings (title / fields copy) are authored in. */
|
|
509
|
+
defaultLocale?: string;
|
|
510
|
+
/**
|
|
511
|
+
* Per-locale string overrides. The data module trims this to the requested
|
|
512
|
+
* `?locale=` (≤1 entry); the widget overlays it onto the default copy at
|
|
513
|
+
* resolve time (`overlayFormDef`). Absent strings fall back to the default.
|
|
514
|
+
*/
|
|
515
|
+
translations?: FormTranslation[];
|
|
516
|
+
}
|
|
517
|
+
/**
|
|
518
|
+
* Per-locale overrides of a form's HUMAN-FACING strings only. Structure (field
|
|
519
|
+
* `name` / `type` / `validation`, option `value`) is shared across locales and
|
|
520
|
+
* stays canonical, so submissions + validation are locale-independent — a
|
|
521
|
+
* translation matches the canonical form by the stable `name` (field) / `value`
|
|
522
|
+
* (option) keys. Absent strings fall back to the top-level (defaultLocale) copy.
|
|
523
|
+
*
|
|
524
|
+
* The data module trims `FormDef.translations` to the requested `?locale=` (≤1
|
|
525
|
+
* entry) on read; the widget overlays that entry onto the default fields. Mirror
|
|
526
|
+
* of `module-help-ai-data-api` `DynamicFormTranslation`.
|
|
527
|
+
*/
|
|
528
|
+
interface FieldOptionTranslation {
|
|
529
|
+
/** The canonical option `value` this localizes. */
|
|
530
|
+
value: string;
|
|
531
|
+
label?: string;
|
|
532
|
+
description?: string;
|
|
533
|
+
}
|
|
534
|
+
interface FormFieldTranslation {
|
|
535
|
+
/** The canonical field `name` this localizes. */
|
|
536
|
+
name: string;
|
|
537
|
+
label?: string;
|
|
538
|
+
placeholder?: string;
|
|
539
|
+
validationHint?: string;
|
|
540
|
+
options?: FieldOptionTranslation[];
|
|
541
|
+
}
|
|
542
|
+
interface FormTranslation {
|
|
543
|
+
locale: string;
|
|
544
|
+
title?: string;
|
|
545
|
+
description?: string;
|
|
546
|
+
submitLabel?: string;
|
|
547
|
+
fields?: FormFieldTranslation[];
|
|
508
548
|
}
|
|
509
549
|
/** The `forms` block is an ordered list (max 20); order = priority. */
|
|
510
550
|
type FormsOptions = FormDef[];
|