@budibase/string-templates 2.22.0 → 2.22.2
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/dist/bundle.cjs +1 -0
- package/dist/bundle.mjs +1 -1
- package/dist/conversion/index.d.ts +2 -2
- package/dist/errors.d.ts +1 -2
- package/dist/helpers/Helper.d.ts +9 -8
- package/dist/helpers/constants.d.ts +8 -8
- package/dist/helpers/date.d.ts +2 -2
- package/dist/helpers/external.d.ts +8 -15
- package/dist/helpers/index.d.ts +5 -6
- package/dist/helpers/javascript.d.ts +7 -4
- package/dist/helpers/list.d.ts +2 -2
- package/dist/iife.d.ts +1 -1
- package/dist/index.d.ts +1078 -20
- package/dist/processors/index.d.ts +3 -2
- package/dist/processors/postprocessor.d.ts +7 -7
- package/dist/processors/preprocessor.d.ts +10 -10
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types.d.ts +8 -0
- package/dist/utilities.d.ts +11 -11
- package/package.json +13 -13
- package/src/conversion/{index.js → index.ts} +13 -11
- package/src/errors.ts +3 -0
- package/src/helpers/Helper.ts +34 -0
- package/src/helpers/{constants.js → constants.ts} +3 -3
- package/src/helpers/{date.js → date.ts} +26 -16
- package/src/helpers/{external.js → external.ts} +13 -11
- package/src/helpers/index.ts +103 -0
- package/src/helpers/{javascript.js → javascript.ts} +20 -18
- package/src/helpers/{list.js → list.ts} +11 -11
- package/src/iife.ts +3 -0
- package/src/{index.js → index.ts} +100 -85
- package/src/processors/{index.js → index.ts} +7 -6
- package/src/processors/postprocessor.ts +56 -0
- package/src/processors/preprocessor.ts +82 -0
- package/src/types.ts +8 -0
- package/src/{utilities.js → utilities.ts} +22 -17
- package/dist/index.d.mts +0 -23
- package/src/errors.js +0 -11
- package/src/helpers/Helper.js +0 -29
- package/src/helpers/index.js +0 -100
- package/src/iife.js +0 -3
- package/src/index.mjs +0 -26
- package/src/processors/postprocessor.js +0 -49
- package/src/processors/preprocessor.js +0 -78
- /package/{manifest.json → src/manifest.json} +0 -0
package/dist/errors.d.ts
CHANGED
package/dist/helpers/Helper.d.ts
CHANGED
@@ -1,9 +1,10 @@
|
|
1
|
-
export
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
fn: any;
|
6
|
-
|
7
|
-
|
8
|
-
|
1
|
+
export default class Helper {
|
2
|
+
private name;
|
3
|
+
private fn;
|
4
|
+
private useValueFallback;
|
5
|
+
constructor(name: string, fn: any, useValueFallback?: boolean);
|
6
|
+
register(handlebars: typeof Handlebars): void;
|
7
|
+
unregister(handlebars: {
|
8
|
+
unregisterHelper: any;
|
9
|
+
}): void;
|
9
10
|
}
|
@@ -1,8 +1,8 @@
|
|
1
|
-
export const HelperFunctionBuiltin: string[];
|
2
|
-
export
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
}
|
8
|
-
export const LITERAL_MARKER
|
1
|
+
export declare const HelperFunctionBuiltin: string[];
|
2
|
+
export declare const HelperFunctionNames: {
|
3
|
+
OBJECT: string;
|
4
|
+
ALL: string;
|
5
|
+
LITERAL: string;
|
6
|
+
JS: string;
|
7
|
+
};
|
8
|
+
export declare const LITERAL_MARKER = "%LITERAL%";
|
package/dist/helpers/date.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
export
|
2
|
-
export
|
1
|
+
export declare const date: (str: any, pattern: any, options: any) => string;
|
2
|
+
export declare const duration: (str: any, pattern: any, format: any) => string;
|
@@ -1,15 +1,8 @@
|
|
1
|
-
export
|
2
|
-
export const
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
declare
|
9
|
-
declare namespace ADDED_HELPERS {
|
10
|
-
export { date };
|
11
|
-
export { duration };
|
12
|
-
}
|
13
|
-
import { date } from "./date";
|
14
|
-
import { duration } from "./date";
|
15
|
-
export { EXTERNAL_FUNCTION_COLLECTIONS as externalCollections, ADDED_HELPERS as addedHelpers };
|
1
|
+
export declare const externalCollections: string[];
|
2
|
+
export declare const addedHelpers: {
|
3
|
+
date: (str: any, pattern: any, options: any) => string;
|
4
|
+
duration: (str: any, pattern: any, format: any) => string;
|
5
|
+
};
|
6
|
+
export declare function registerAll(handlebars: typeof Handlebars): void;
|
7
|
+
export declare function unregisterAll(handlebars: typeof Handlebars): void;
|
8
|
+
export declare let externalHelperNames: any[];
|
package/dist/helpers/index.d.ts
CHANGED
@@ -1,6 +1,5 @@
|
|
1
|
-
export
|
2
|
-
export function
|
3
|
-
export function
|
4
|
-
export function
|
5
|
-
export
|
6
|
-
import { getJsHelperList } from "./list";
|
1
|
+
export { getJsHelperList } from "./list";
|
2
|
+
export declare function HelperNames(): string[];
|
3
|
+
export declare function registerMinimum(handlebars: typeof Handlebars): void;
|
4
|
+
export declare function registerAll(handlebars: typeof Handlebars): void;
|
5
|
+
export declare function unregisterAll(handlebars: any): void;
|
@@ -1,4 +1,7 @@
|
|
1
|
-
|
2
|
-
export
|
3
|
-
export
|
4
|
-
|
1
|
+
declare let runJS: ((js: string, context: any) => any) | undefined;
|
2
|
+
export declare const setJSRunner: (runner: typeof runJS) => (js: string, context: any) => any;
|
3
|
+
export declare const removeJSRunner: () => void;
|
4
|
+
declare let onErrorLog: (message: Error) => void;
|
5
|
+
export declare const setOnErrorLog: (delegate: typeof onErrorLog) => (message: Error) => void;
|
6
|
+
export declare function processJS(handlebars: string, context: any): string;
|
7
|
+
export {};
|
package/dist/helpers/list.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
export
|
2
|
-
export
|
1
|
+
export declare const helpersToRemoveForJs: string[];
|
2
|
+
export declare function getJsHelperList(): Record<string, any>;
|
package/dist/iife.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export
|
1
|
+
export declare const iifeWrapper: (script: string) => string;
|