@wener/common 1.0.1 → 1.0.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.
@@ -0,0 +1,10 @@
1
+ import { formatAdvanceSearch } from "./formatAdvanceSearch.js";
2
+ import { optimizeAdvanceSearch } from "./optimizeAdvanceSearch.js";
3
+ import { parseAdvanceSearch } from "./parseAdvanceSearch.js";
4
+ (function (AdvanceSearch) {
5
+ AdvanceSearch.parse = parseAdvanceSearch;
6
+ AdvanceSearch.format = formatAdvanceSearch;
7
+ AdvanceSearch.optimize = optimizeAdvanceSearch;
8
+ })(AdvanceSearch || (AdvanceSearch = {}));
9
+ export var AdvanceSearch;
10
+ //# sourceMappingURL=AdvanceSearch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/search/AdvanceSearch.ts"],"sourcesContent":["import { formatAdvanceSearch } from './formatAdvanceSearch';\nimport { optimizeAdvanceSearch } from './optimizeAdvanceSearch';\nimport { parseAdvanceSearch } from './parseAdvanceSearch';\nimport type * as types from './types';\n\nexport namespace AdvanceSearch {\n export type Exprs = types.Exprs;\n export type Expr = types.Expr;\n export type Value = types.Value;\n\n export const parse = parseAdvanceSearch;\n export const format = formatAdvanceSearch;\n export const optimize = optimizeAdvanceSearch;\n}\n"],"names":["formatAdvanceSearch","optimizeAdvanceSearch","parseAdvanceSearch","AdvanceSearch","parse","format","optimize"],"mappings":"AAAA,SAASA,mBAAmB,QAAQ,wBAAwB;AAC5D,SAASC,qBAAqB,QAAQ,0BAA0B;AAChE,SAASC,kBAAkB,QAAQ,uBAAuB;UAGzCC;kBAKFC,QAAQF;kBACRG,SAASL;kBACTM,WAAWL;AAC1B,GARiBE,kBAAAA"}
@@ -0,0 +1,64 @@
1
+ import { match } from "ts-pattern";
2
+ export function formatAdvanceSearch(input) {
3
+ const OP = {
4
+ has: ':',
5
+ eq: ':=',
6
+ ne: ':!=',
7
+ gt: ':>',
8
+ lt: ':<',
9
+ gte: ':>=',
10
+ lte: ':<=',
11
+ range: ':'
12
+ };
13
+ const _exprs = (s)=>{
14
+ return s.map(_expr).join(' ');
15
+ };
16
+ const _expr = (s)=>{
17
+ return match(s).with({
18
+ type: 'keyword'
19
+ }, ({ value, exact, negative })=>{
20
+ return `${negative ? '-' : ''}${exact ? `"${value}"` : value}`;
21
+ }).with({
22
+ type: 'logical'
23
+ }, ({ operator, value })=>value.map(_expr).join(` ${operator.toLocaleUpperCase()} `)).with({
24
+ type: 'not'
25
+ }, ({ value })=>`NOT ${_expr(value)}`).with({
26
+ type: 'compare'
27
+ }, ({ field, operator, value, negative, mention })=>{
28
+ return `${negative ? '-' : ''}${mention ? '@' : ''}${field}${OP[operator]}${_value(value)}`;
29
+ }).with({
30
+ type: 'comment'
31
+ }, ({ value })=>`/* ${value} */`).with({
32
+ type: 'parentheses'
33
+ }, ({ value })=>`(${_exprs(value)})`).exhaustive();
34
+ };
35
+ const _literal = (s)=>{
36
+ if (typeof s === 'string') {
37
+ return s.includes(' ') ? `"${s}"` : s;
38
+ }
39
+ return JSON.stringify(s);
40
+ };
41
+ const _value = (v)=>{
42
+ return match(v).with({
43
+ type: 'range'
44
+ }, ({ minimum, maximum, minimumExclusive, maximumExclusive })=>{
45
+ if (minimumExclusive === undefined && maximumExclusive === undefined) {
46
+ let min = minimum === undefined ? '*' : _value(minimum);
47
+ let max = maximum === undefined ? '*' : _value(maximum);
48
+ return `${min}..${max}`;
49
+ }
50
+ let min = minimum === undefined ? '' : _value(minimum);
51
+ let max = maximum === undefined ? '' : _value(maximum);
52
+ return `${minimumExclusive ? '(' : '['}${min},${max}${maximumExclusive ? ')' : ']'}`;
53
+ }).with({
54
+ format: 'mention'
55
+ }, ({ value })=>{
56
+ return `@${value}`;
57
+ }).otherwise((value)=>{
58
+ return _literal(value.value);
59
+ });
60
+ };
61
+ return _exprs(input);
62
+ }
63
+
64
+ //# sourceMappingURL=formatAdvanceSearch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/search/formatAdvanceSearch.ts"],"sourcesContent":["import { match } from 'ts-pattern';\nimport { AdvanceSearch } from './AdvanceSearch';\n\nexport function formatAdvanceSearch(input: AdvanceSearch.Expr[]) {\n const OP = {\n has: ':',\n eq: ':=',\n ne: ':!=',\n gt: ':>',\n lt: ':<',\n gte: ':>=',\n lte: ':<=',\n range: ':',\n } as const;\n\n const _exprs = (s: AdvanceSearch.Expr[]): string => {\n return s.map(_expr).join(' ');\n };\n const _expr = (s: AdvanceSearch.Expr): string => {\n return match(s)\n .with({ type: 'keyword' }, ({ value, exact, negative }) => {\n return `${negative ? '-' : ''}${exact ? `\"${value}\"` : value}`;\n })\n .with({ type: 'logical' }, ({ operator, value }) => value.map(_expr).join(` ${operator.toLocaleUpperCase()} `))\n .with({ type: 'not' }, ({ value }) => `NOT ${_expr(value)}`)\n .with({ type: 'compare' }, ({ field, operator, value, negative, mention }) => {\n return `${negative ? '-' : ''}${mention ? '@' : ''}${field}${OP[operator]}${_value(value)}`;\n })\n .with({ type: 'comment' }, ({ value }) => `/* ${value} */`)\n .with({ type: 'parentheses' }, ({ value }) => `(${_exprs(value)})`)\n .exhaustive();\n };\n\n const _literal = (s: string | null | number) => {\n if (typeof s === 'string') {\n return s.includes(' ') ? `\"${s}\"` : s;\n }\n return JSON.stringify(s);\n };\n const _value = (v: AdvanceSearch.Value): string => {\n return match(v)\n .with({ type: 'range' }, ({ minimum, maximum, minimumExclusive, maximumExclusive }) => {\n if (minimumExclusive === undefined && maximumExclusive === undefined) {\n let min = minimum === undefined ? '*' : _value(minimum);\n let max = maximum === undefined ? '*' : _value(maximum);\n return `${min}..${max}`;\n }\n let min = minimum === undefined ? '' : _value(minimum);\n let max = maximum === undefined ? '' : _value(maximum);\n return `${minimumExclusive ? '(' : '['}${min},${max}${maximumExclusive ? ')' : ']'}`;\n })\n .with({ format: 'mention' }, ({ value }) => {\n return `@${value}`;\n })\n .otherwise((value) => {\n return _literal(value.value);\n });\n };\n\n return _exprs(input);\n}\n"],"names":["match","formatAdvanceSearch","input","OP","has","eq","ne","gt","lt","gte","lte","range","_exprs","s","map","_expr","join","with","type","value","exact","negative","operator","toLocaleUpperCase","field","mention","_value","exhaustive","_literal","includes","JSON","stringify","v","minimum","maximum","minimumExclusive","maximumExclusive","undefined","min","max","format","otherwise"],"mappings":"AAAA,SAASA,KAAK,QAAQ,aAAa;AAGnC,OAAO,SAASC,oBAAoBC,KAA2B;IAC7D,MAAMC,KAAK;QACTC,KAAK;QACLC,IAAI;QACJC,IAAI;QACJC,IAAI;QACJC,IAAI;QACJC,KAAK;QACLC,KAAK;QACLC,OAAO;IACT;IAEA,MAAMC,SAAS,CAACC;QACd,OAAOA,EAAEC,GAAG,CAACC,OAAOC,IAAI,CAAC;IAC3B;IACA,MAAMD,QAAQ,CAACF;QACb,OAAOb,MAAMa,GACVI,IAAI,CAAC;YAAEC,MAAM;QAAU,GAAG,CAAC,EAAEC,KAAK,EAAEC,KAAK,EAAEC,QAAQ,EAAE;YACpD,OAAO,GAAGA,WAAW,MAAM,KAAKD,QAAQ,CAAC,CAAC,EAAED,MAAM,CAAC,CAAC,GAAGA,OAAO;QAChE,GACCF,IAAI,CAAC;YAAEC,MAAM;QAAU,GAAG,CAAC,EAAEI,QAAQ,EAAEH,KAAK,EAAE,GAAKA,MAAML,GAAG,CAACC,OAAOC,IAAI,CAAC,CAAC,CAAC,EAAEM,SAASC,iBAAiB,GAAG,CAAC,CAAC,GAC5GN,IAAI,CAAC;YAAEC,MAAM;QAAM,GAAG,CAAC,EAAEC,KAAK,EAAE,GAAK,CAAC,IAAI,EAAEJ,MAAMI,QAAQ,EAC1DF,IAAI,CAAC;YAAEC,MAAM;QAAU,GAAG,CAAC,EAAEM,KAAK,EAAEF,QAAQ,EAAEH,KAAK,EAAEE,QAAQ,EAAEI,OAAO,EAAE;YACvE,OAAO,GAAGJ,WAAW,MAAM,KAAKI,UAAU,MAAM,KAAKD,QAAQrB,EAAE,CAACmB,SAAS,GAAGI,OAAOP,QA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1
+ export { AdvanceSearch } from "./AdvanceSearch.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/search/index.ts"],"sourcesContent":["export { AdvanceSearch } from './AdvanceSearch';\n"],"names":["AdvanceSearch"],"mappings":"AAAA,SAASA,aAAa,QAAQ,kBAAkB"}
@@ -0,0 +1,89 @@
1
+ import { arrayOfMaybeArray, deepEqual } from "@wener/utils";
2
+ import { match } from "ts-pattern";
3
+ export function optimizeAdvanceSearch(expr) {
4
+ const NEG = {
5
+ eq: 'ne',
6
+ ne: 'eq',
7
+ gt: 'lte',
8
+ lt: 'gte',
9
+ gte: 'lt',
10
+ lte: 'gt'
11
+ };
12
+ const _expr = (e)=>{
13
+ // merge Exprs to AND ?
14
+ return match(e)// (EXPR) -> EXPR
15
+ // TODO (EXPR EXPR) -> EXPR AND EXPR
16
+ .with({
17
+ type: 'parentheses'
18
+ }, (expr)=>{
19
+ // unwrap
20
+ if (expr.value.length < 2) {
21
+ return expr.value[0];
22
+ }
23
+ expr.value = expr.value.flatMap(_expr);
24
+ return expr;
25
+ }).with({
26
+ type: 'comment'
27
+ }, (expr)=>{
28
+ // remove empty comment
29
+ if (!expr.value.length) {
30
+ return [];
31
+ }
32
+ return expr;
33
+ })// NOT
34
+ .with({
35
+ type: 'not'
36
+ }, (expr)=>{
37
+ let out = arrayOfMaybeArray(_expr(expr.value));
38
+ if (!out.length) {
39
+ return [];
40
+ } else if (out.length === 1) {
41
+ expr.value = out[0];
42
+ } else {
43
+ throw new Error('NOT should have only one value');
44
+ }
45
+ return match(expr.value)// NOT NOT EXPR -> EXPR
46
+ .with({
47
+ type: 'not'
48
+ }, (expr)=>expr.value)// NOT EXPR -> -EXPR
49
+ .with({
50
+ type: 'compare'
51
+ }, (expr)=>{
52
+ return {
53
+ ...expr,
54
+ negative: !expr.negative
55
+ };
56
+ }).with({
57
+ type: 'keyword'
58
+ }, (expr)=>{
59
+ return {
60
+ ...expr,
61
+ negative: !expr.negative
62
+ };
63
+ }).otherwise(()=>expr);
64
+ }).with({
65
+ type: 'compare'
66
+ }, (expr)=>{
67
+ // negative by swap operator
68
+ if (expr.negative) {
69
+ const ne = NEG[expr.operator];
70
+ if (ne) {
71
+ expr.operator = ne;
72
+ expr.negative = false;
73
+ }
74
+ }
75
+ if (expr.operator === 'range') {}
76
+ return expr;
77
+ }).otherwise((e)=>e);
78
+ };
79
+ let last = expr;
80
+ while(true){
81
+ let next = structuredClone(last).flatMap(_expr);
82
+ if (deepEqual(last, next)) {
83
+ return last;
84
+ }
85
+ last = next;
86
+ }
87
+ }
88
+
89
+ //# sourceMappingURL=optimizeAdvanceSearch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/search/optimizeAdvanceSearch.ts"],"sourcesContent":["import { arrayOfMaybeArray, deepEqual, type MaybeArray } from '@wener/utils';\nimport { match } from 'ts-pattern';\nimport { AdvanceSearch } from './AdvanceSearch';\n\nexport function optimizeAdvanceSearch(expr: AdvanceSearch.Exprs): AdvanceSearch.Exprs {\n const NEG = {\n eq: 'ne',\n ne: 'eq',\n gt: 'lte',\n lt: 'gte',\n gte: 'lt',\n lte: 'gt',\n } as const;\n const _expr = (e: AdvanceSearch.Expr): MaybeArray<AdvanceSearch.Expr> => {\n // merge Exprs to AND ?\n return (\n match(e)\n // (EXPR) -> EXPR\n // TODO (EXPR EXPR) -> EXPR AND EXPR\n .with({ type: 'parentheses' }, (expr) => {\n // unwrap\n if (expr.value.length < 2) {\n return expr.value[0];\n }\n expr.value = expr.value.flatMap(_expr);\n return expr;\n })\n .with({ type: 'comment' }, (expr) => {\n // remove empty comment\n if (!expr.value.length) {\n return [];\n }\n return expr;\n })\n // NOT\n .with({ type: 'not' }, (expr) => {\n let out = arrayOfMaybeArray(_expr(expr.value));\n if (!out.length) {\n return [];\n } else if (out.length === 1) {\n expr.value = out[0];\n } else {\n throw new Error('NOT should have only one value');\n }\n return (\n match(expr.value)\n // NOT NOT EXPR -> EXPR\n .with({ type: 'not' }, (expr) => expr.value)\n // NOT EXPR -> -EXPR\n .with({ type: 'compare' }, (expr) => {\n return {\n ...expr,\n negative: !expr.negative,\n };\n })\n .with({ type: 'keyword' }, (expr) => {\n return {\n ...expr,\n negative: !expr.negative,\n };\n })\n .otherwise(() => expr)\n );\n })\n .with({ type: 'compare' }, (expr) => {\n // negative by swap operator\n if (expr.negative) {\n const ne = NEG[expr.operator as keyof typeof NEG];\n if (ne) {\n expr.operator = ne;\n expr.negative = false;\n }\n }\n if (expr.operator === 'range') {\n }\n return expr;\n })\n .otherwise((e) => e)\n );\n };\n\n let last = expr;\n while (true) {\n let next = structuredClone(last).flatMap(_expr);\n if (deepEqual(last, next)) {\n return last;\n }\n last = next;\n }\n}\n"],"names":["arrayOfMaybeArray","deepEqual","match","optimizeAdvanceSearch","expr","NEG","eq","ne","gt","lt","gte","lte","_expr","e","with","type","value","length","flatMap","out","Error","negative","otherwise","operator","last","next","structuredClone"],"mappings":"AAAA,SAASA,iBAAiB,EAAEC,SAAS,QAAyB,eAAe;AAC7E,SAASC,KAAK,QAAQ,aAAa;AAGnC,OAAO,SAASC,sBAAsBC,IAAyB;IAC7D,MAAMC,MAAM;QACVC,IAAI;QACJC,IAAI;QACJC,IAAI;QACJC,IAAI;QACJC,KAAK;QACLC,KAAK;IACP;IACA,MAAMC,QAAQ,CAACC;QACb,uBAAuB;QACvB,OACEX,MAAMW,EACJ,iBAAiB;QACjB,oCAAoC;SACnCC,IAAI,CAAC;YAAEC,MAAM;QAAc,GAAG,CAACX;YAC9B,SAAS;YACT,IAAIA,KAAKY,KAAK,CAACC,MAAM,GAAG,GAAG;gBACzB,OAAOb,KAAKY,KAAK,CAAC,EAAE;YACtB;YACAZ,KAAKY,KAAK,GAAGZ,KAAKY,KAAK,CAACE,OAAO,CAACN;YAChC,OAAOR;QACT,GACCU,IAAI,CAAC;YAAEC,MAAM;QAAU,GAAG,CAACX;YAC1B,uBAAuB;YACvB,IAAI,CAACA,KAAKY,K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MN,OAAO,CAACN;QACzC,IAAIX,UAAUuB,MAAMC,OAAO;YACzB,OAAOD;QACT;QACAA,OAAOC;IACT;AACF"}
@@ -0,0 +1,20 @@
1
+ import { parse } from "./parser.js";
2
+ export function parseAdvanceSearch(s) {
3
+ s = s?.trim();
4
+ if (!s) {
5
+ return [];
6
+ }
7
+ // no Logical, no Compare, no Quote, no Comment
8
+ if (!/AND|OR|NOT|[-"():]|\/\*/.test(s)) {
9
+ // fast path
10
+ return s.split(/\s+/).map((v)=>v.trim()).filter(Boolean).map((v)=>{
11
+ return {
12
+ type: 'keyword',
13
+ value: v
14
+ };
15
+ });
16
+ }
17
+ return parse(s);
18
+ }
19
+
20
+ //# sourceMappingURL=parseAdvanceSearch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/search/parseAdvanceSearch.ts"],"sourcesContent":["import { AdvanceSearch } from './AdvanceSearch';\nimport { parse } from './parser';\n\nexport function parseAdvanceSearch(s: string | undefined | null): AdvanceSearch.Expr[] {\n s = s?.trim();\n if (!s) {\n return [];\n }\n\n // no Logical, no Compare, no Quote, no Comment\n if (!/AND|OR|NOT|[-\"():]|\\/\\*/.test(s)) {\n // fast path\n return s\n .split(/\\s+/)\n .map((v) => v.trim())\n .filter(Boolean)\n .map((v) => {\n return {\n type: 'keyword',\n value: v,\n };\n });\n }\n\n return parse(s);\n}\n"],"names":["parse","parseAdvanceSearch","s","trim","test","split","map","v","filter","Boolean","type","value"],"mappings":"AACA,SAASA,KAAK,QAAQ,cAAW;AAEjC,OAAO,SAASC,mBAAmBC,CAA4B;IAC7DA,IAAIA,GAAGC;IACP,IAAI,CAACD,GAAG;QACN,OAAO,EAAE;IACX;IAEA,+CAA+C;IAC/C,IAAI,CAAC,0BAA0BE,IAAI,CAACF,IAAI;QACtC,YAAY;QACZ,OAAOA,EACJG,KAAK,CAAC,OACNC,GAAG,CAAC,CAACC,IAAMA,EAAEJ,IAAI,IACjBK,MAAM,CAACC,SACPH,GAAG,CAAC,CAACC;YACJ,OAAO;gBACLG,MAAM;gBACNC,OAAOJ;YACT;QACF;IACJ;IAEA,OAAOP,MAAME;AACf"}
@@ -0,0 +1,3 @@
1
+ export { };
2
+
3
+ //# sourceMappingURL=parser.d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/search/parser.d.ts"],"sourcesContent":["export function parse(input: string, options?: ParseOptions): any;\n\nexport interface ParseOptions {\n grammarSource?: string;\n startRule?: string;\n\n [k: string]: any;\n}\n"],"names":[],"mappings":"AAEA,WAKC"}