namirasoft-core
Advanced tools
Comparing version 1.3.75 to 1.3.76
@@ -14,2 +14,4 @@ import { FilterItemOperator } from "./FilterItemOperator"; | ||
values: string[]; | ||
static encode(filters: FilterItem[] | null): string; | ||
static decode(value: string): FilterItem[] | null; | ||
static stringify(filters: FilterItem[] | null): string; | ||
@@ -16,0 +18,0 @@ static parse(item: string | null): FilterItem[]; |
@@ -6,5 +6,14 @@ "use strict"; | ||
const BaseMetaTable_1 = require("./BaseMetaTable"); | ||
const EncodingOperation_1 = require("./EncodingOperation"); | ||
const ErrorOperation_1 = require("./ErrorOperation"); | ||
const FilterItemOperator_1 = require("./FilterItemOperator"); | ||
class FilterItem { | ||
static encode(filters) { | ||
let value = this.stringify(filters); | ||
return EncodingOperation_1.EncodingOperation.Base64Encode(value); | ||
} | ||
static decode(value) { | ||
let encoded = EncodingOperation_1.EncodingOperation.Base64Decode(value); | ||
return this.parse(encoded); | ||
} | ||
static stringify(filters) { | ||
@@ -11,0 +20,0 @@ if (filters) |
@@ -11,3 +11,3 @@ { | ||
"private": false, | ||
"version": "1.3.75", | ||
"version": "1.3.76", | ||
"author": "Amir Abolhasani", | ||
@@ -14,0 +14,0 @@ "license": "MIT", |
import { BaseMetaColumn } from "./BaseMetaColumn"; | ||
import { BaseMetaTable } from "./BaseMetaTable"; | ||
import { EncodingOperation } from "./EncodingOperation"; | ||
import { ErrorOperation } from "./ErrorOperation"; | ||
@@ -13,2 +14,12 @@ import { FilterItemOperator } from "./FilterItemOperator"; | ||
public values: string[]; | ||
public static encode(filters: FilterItem[] | null): string | ||
{ | ||
let value = this.stringify(filters); | ||
return EncodingOperation.Base64Encode(value); | ||
} | ||
public static decode(value: string): FilterItem[] | null | ||
{ | ||
let encoded = EncodingOperation.Base64Decode(value); | ||
return this.parse(encoded); | ||
} | ||
public static stringify(filters: FilterItem[] | null): string | ||
@@ -15,0 +26,0 @@ { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
382103
4826