@qrvey/utils 1.12.0-8 → 1.12.0-9
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/cjs/filters/interfaces/builder/IFilterBuilderDisplayEvent.d.ts +4 -0
- package/dist/cjs/filters/interfaces/builder/IFilterBuilderDisplayEvent.js +2 -0
- package/dist/cjs/filters/interfaces/builder/index.d.ts +1 -0
- package/dist/cjs/filters/interfaces/builder/index.js +1 -0
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderThreshold.d.ts +2 -0
- package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_THRESHOLD.js +2 -0
- package/dist/cjs/interfaces/CustomTokens.interface.d.ts +7 -0
- package/dist/cjs/tokens/getCustomTokenBoxParse.d.ts +2 -2
- package/dist/cjs/tokens/getCustomtonTokensWithKeys.test.d.ts +1 -0
- package/dist/cjs/tokens/getCustomtonTokensWithKeys.test.js +23 -0
- package/dist/filters/interfaces/builder/IFilterBuilderDisplayEvent.d.ts +4 -0
- package/dist/filters/interfaces/builder/IFilterBuilderDisplayEvent.js +1 -0
- package/dist/filters/interfaces/builder/index.d.ts +1 -0
- package/dist/filters/interfaces/builder/index.js +1 -0
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderThreshold.d.ts +2 -0
- package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_THRESHOLD.js +2 -0
- package/dist/interfaces/CustomTokens.interface.d.ts +7 -0
- package/dist/tokens/getCustomTokenBoxParse.d.ts +2 -2
- package/dist/tokens/getCustomtonTokensWithKeys.test.d.ts +1 -0
- package/dist/tokens/getCustomtonTokensWithKeys.test.js +21 -0
- package/package.json +1 -1
|
@@ -29,4 +29,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
29
29
|
};
|
|
30
30
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
31
|
__exportStar(require("./IFilterBuilderConfig"), exports);
|
|
32
|
+
__exportStar(require("./IFilterBuilderDisplayEvent"), exports);
|
|
32
33
|
__exportStar(require("./IFilterBuilderSettings"), exports);
|
|
@@ -9,3 +9,10 @@ export interface ICustomTokensSimple {
|
|
|
9
9
|
export interface ICustomTokensComplex {
|
|
10
10
|
[key: string]: CustomTokens[];
|
|
11
11
|
}
|
|
12
|
+
export interface ICustomTokensBoxDetail {
|
|
13
|
+
alias: string;
|
|
14
|
+
label: string;
|
|
15
|
+
}
|
|
16
|
+
export interface ICustomTokensBox {
|
|
17
|
+
[key: string]: ICustomTokensBoxDetail[];
|
|
18
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ICustomTokensComplex } from "../interfaces";
|
|
1
|
+
import { ICustomTokensBox, ICustomTokensComplex } from "../interfaces";
|
|
2
2
|
/**
|
|
3
3
|
* The function `getCustomTokenBoxParse` takes in an object of custom tokens and returns a formatted
|
|
4
4
|
* list of tokens with aliases and labels.
|
|
@@ -7,4 +7,4 @@ import { ICustomTokensComplex } from "../interfaces";
|
|
|
7
7
|
* in the object, and the value is an array of tokens within that group.
|
|
8
8
|
* @returns an object called `tokensList`.
|
|
9
9
|
*/
|
|
10
|
-
export declare function getCustomTokenBoxParse(customTokens: ICustomTokensComplex):
|
|
10
|
+
export declare function getCustomTokenBoxParse(customTokens: ICustomTokensComplex): ICustomTokensBox;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const getCustomtonTokensWithKeys_1 = require("../../src/tokens/getCustomtonTokensWithKeys");
|
|
4
|
+
describe("getCustomtonTokensWithKeys", () => {
|
|
5
|
+
test("should add camelized key to custom tokens", () => {
|
|
6
|
+
const customTokens = [
|
|
7
|
+
{ label: "token one", value: "value1" },
|
|
8
|
+
{ label: "Token 2", value: "value2", key: "{{token dos}}" },
|
|
9
|
+
{ label: "3rd token", value: "value3" },
|
|
10
|
+
];
|
|
11
|
+
const result = (0, getCustomtonTokensWithKeys_1.getCustomtonTokensWithKeys)(customTokens);
|
|
12
|
+
expect(result).toEqual([
|
|
13
|
+
{ label: "token one", value: "value1", key: "tokenOne" },
|
|
14
|
+
{ label: "Token 2", value: "value2", key: "tokenDos" },
|
|
15
|
+
{ label: "3rd token", value: "value3", key: "3rdToken" },
|
|
16
|
+
]);
|
|
17
|
+
});
|
|
18
|
+
test("should handle empty array", () => {
|
|
19
|
+
const emptyTokens = [];
|
|
20
|
+
const result = (0, getCustomtonTokensWithKeys_1.getCustomtonTokensWithKeys)(emptyTokens);
|
|
21
|
+
expect(result).toEqual([]);
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -9,3 +9,10 @@ export interface ICustomTokensSimple {
|
|
|
9
9
|
export interface ICustomTokensComplex {
|
|
10
10
|
[key: string]: CustomTokens[];
|
|
11
11
|
}
|
|
12
|
+
export interface ICustomTokensBoxDetail {
|
|
13
|
+
alias: string;
|
|
14
|
+
label: string;
|
|
15
|
+
}
|
|
16
|
+
export interface ICustomTokensBox {
|
|
17
|
+
[key: string]: ICustomTokensBoxDetail[];
|
|
18
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ICustomTokensComplex } from "../interfaces";
|
|
1
|
+
import { ICustomTokensBox, ICustomTokensComplex } from "../interfaces";
|
|
2
2
|
/**
|
|
3
3
|
* The function `getCustomTokenBoxParse` takes in an object of custom tokens and returns a formatted
|
|
4
4
|
* list of tokens with aliases and labels.
|
|
@@ -7,4 +7,4 @@ import { ICustomTokensComplex } from "../interfaces";
|
|
|
7
7
|
* in the object, and the value is an array of tokens within that group.
|
|
8
8
|
* @returns an object called `tokensList`.
|
|
9
9
|
*/
|
|
10
|
-
export declare function getCustomTokenBoxParse(customTokens: ICustomTokensComplex):
|
|
10
|
+
export declare function getCustomTokenBoxParse(customTokens: ICustomTokensComplex): ICustomTokensBox;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { getCustomtonTokensWithKeys } from "../../src/tokens/getCustomtonTokensWithKeys";
|
|
2
|
+
describe("getCustomtonTokensWithKeys", () => {
|
|
3
|
+
test("should add camelized key to custom tokens", () => {
|
|
4
|
+
const customTokens = [
|
|
5
|
+
{ label: "token one", value: "value1" },
|
|
6
|
+
{ label: "Token 2", value: "value2", key: "{{token dos}}" },
|
|
7
|
+
{ label: "3rd token", value: "value3" },
|
|
8
|
+
];
|
|
9
|
+
const result = getCustomtonTokensWithKeys(customTokens);
|
|
10
|
+
expect(result).toEqual([
|
|
11
|
+
{ label: "token one", value: "value1", key: "tokenOne" },
|
|
12
|
+
{ label: "Token 2", value: "value2", key: "tokenDos" },
|
|
13
|
+
{ label: "3rd token", value: "value3", key: "3rdToken" },
|
|
14
|
+
]);
|
|
15
|
+
});
|
|
16
|
+
test("should handle empty array", () => {
|
|
17
|
+
const emptyTokens = [];
|
|
18
|
+
const result = getCustomtonTokensWithKeys(emptyTokens);
|
|
19
|
+
expect(result).toEqual([]);
|
|
20
|
+
});
|
|
21
|
+
});
|