@nomalism-com/types 0.45.40 → 0.45.41
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/index.cjs
CHANGED
|
@@ -5249,16 +5249,18 @@ var interface_exports56 = {};
|
|
|
5249
5249
|
__export(interface_exports56, {
|
|
5250
5250
|
Route: () => Route107,
|
|
5251
5251
|
buildHighlightValue: () => buildHighlightValue,
|
|
5252
|
+
highlightValueSeparator: () => highlightValueSeparator,
|
|
5252
5253
|
parseHighlightValue: () => parseHighlightValue
|
|
5253
5254
|
});
|
|
5254
5255
|
var Route107 = "sidemenu_highlight";
|
|
5255
|
-
var
|
|
5256
|
+
var highlightValueSeparator = "|:|";
|
|
5257
|
+
var buildHighlightValue = (item) => `${item.user_type}${highlightValueSeparator}${item.state}`;
|
|
5256
5258
|
var parseHighlightValue = (value) => {
|
|
5257
|
-
const idx = value.indexOf(
|
|
5259
|
+
const idx = value.indexOf(highlightValueSeparator);
|
|
5258
5260
|
if (idx < 0) return null;
|
|
5259
5261
|
return {
|
|
5260
5262
|
user_type: value.slice(0, idx),
|
|
5261
|
-
state: value.slice(idx +
|
|
5263
|
+
state: value.slice(idx + highlightValueSeparator.length)
|
|
5262
5264
|
};
|
|
5263
5265
|
};
|
|
5264
5266
|
|
package/dist/index.js
CHANGED
|
@@ -5249,16 +5249,18 @@ var interface_exports56 = {};
|
|
|
5249
5249
|
__export(interface_exports56, {
|
|
5250
5250
|
Route: () => Route107,
|
|
5251
5251
|
buildHighlightValue: () => buildHighlightValue,
|
|
5252
|
+
highlightValueSeparator: () => highlightValueSeparator,
|
|
5252
5253
|
parseHighlightValue: () => parseHighlightValue
|
|
5253
5254
|
});
|
|
5254
5255
|
var Route107 = "sidemenu_highlight";
|
|
5255
|
-
var
|
|
5256
|
+
var highlightValueSeparator = "|:|";
|
|
5257
|
+
var buildHighlightValue = (item) => `${item.user_type}${highlightValueSeparator}${item.state}`;
|
|
5256
5258
|
var parseHighlightValue = (value) => {
|
|
5257
|
-
const idx = value.indexOf(
|
|
5259
|
+
const idx = value.indexOf(highlightValueSeparator);
|
|
5258
5260
|
if (idx < 0) return null;
|
|
5259
5261
|
return {
|
|
5260
5262
|
user_type: value.slice(0, idx),
|
|
5261
|
-
state: value.slice(idx +
|
|
5263
|
+
state: value.slice(idx + highlightValueSeparator.length)
|
|
5262
5264
|
};
|
|
5263
5265
|
};
|
|
5264
5266
|
|
|
@@ -7,6 +7,7 @@ export interface IHighlightItem {
|
|
|
7
7
|
user_type: IDocumentTypeUserType;
|
|
8
8
|
state: string;
|
|
9
9
|
}
|
|
10
|
+
export declare const highlightValueSeparator = "|:|";
|
|
10
11
|
/** Serialize / parse helpers for the composite "user_type|:|state" value. */
|
|
11
12
|
export declare const buildHighlightValue: (item: IHighlightItem) => string;
|
|
12
13
|
export declare const parseHighlightValue: (value: string) => IHighlightItem | null;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nomalism-com/types",
|
|
3
3
|
"description": "A nomalism package with all necessary types and validations for developing APIs",
|
|
4
|
-
"version": "0.45.
|
|
4
|
+
"version": "0.45.41",
|
|
5
5
|
"author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|