@pitcher/canvas-ui 2025.12.10-71132 → 2025.12.10-74659
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/canvas-ui.js +50 -1
- package/canvas-ui.js.map +1 -1
- package/lib/main.lib.d.ts +1 -0
- package/lib/util/handlebars.d.ts +35 -0
- package/package.json +1 -1
package/lib/main.lib.d.ts
CHANGED
|
@@ -191,6 +191,7 @@ export * from './util/userAgents';
|
|
|
191
191
|
export * from './util/pitcher-settings.util';
|
|
192
192
|
export * from './util/eval';
|
|
193
193
|
export * from './util/storage.util';
|
|
194
|
+
export * from './util/handlebars';
|
|
194
195
|
export * from './apps/collection-selector/utils/content-selector-adapter.util';
|
|
195
196
|
export * from './util/soql.util.ts';
|
|
196
197
|
export * from './utils/iframeInitialize';
|
package/lib/util/handlebars.d.ts
CHANGED
|
@@ -1 +1,36 @@
|
|
|
1
1
|
export declare function renderTemplate(template: string, context?: Record<string, any>): string;
|
|
2
|
+
export interface CustomHandlebarsHelper {
|
|
3
|
+
name: string;
|
|
4
|
+
code: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Register a single custom Handlebars helper from code string
|
|
9
|
+
* @param helper - The helper definition with name and code
|
|
10
|
+
* @returns true if registration succeeded, false otherwise
|
|
11
|
+
*/
|
|
12
|
+
export declare function registerCustomHelper(helper: CustomHandlebarsHelper): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Register multiple custom Handlebars helpers
|
|
15
|
+
* @param helpers - Array of helper definitions
|
|
16
|
+
* @returns Object with counts of successful and failed registrations
|
|
17
|
+
*/
|
|
18
|
+
export declare function registerCustomHelpers(helpers: CustomHandlebarsHelper[]): {
|
|
19
|
+
registered: number;
|
|
20
|
+
failed: number;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Load and register custom Handlebars helpers from installed apps
|
|
24
|
+
* Looks for the "handlebars-helpers" app and registers helpers from its metadata
|
|
25
|
+
* @param installedApps - Array of installed app files
|
|
26
|
+
* @returns Object with counts of successful and failed registrations
|
|
27
|
+
*/
|
|
28
|
+
export declare function loadCustomHelpersFromApps(installedApps: Array<{
|
|
29
|
+
app_metadata?: {
|
|
30
|
+
name?: string;
|
|
31
|
+
};
|
|
32
|
+
metadata?: Record<string, any>;
|
|
33
|
+
}>): {
|
|
34
|
+
registered: number;
|
|
35
|
+
failed: number;
|
|
36
|
+
};
|