@kodaris/krubble-app-components 1.0.75 → 1.0.76
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/chatbot.d.ts.map +1 -1
- package/dist/chatbot.js +17 -6
- package/dist/chatbot.js.map +1 -1
- package/dist/krubble-app.bundled.js +17 -6
- package/dist/krubble-app.bundled.js.map +1 -1
- package/dist/krubble-app.bundled.min.js +1 -1
- package/dist/krubble-app.bundled.min.js.map +1 -1
- package/dist/krubble-app.umd.js +17 -6
- package/dist/krubble-app.umd.js.map +1 -1
- package/dist/krubble-app.umd.min.js +1 -1
- package/dist/krubble-app.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/krubble-app.umd.js
CHANGED
|
@@ -6121,15 +6121,26 @@
|
|
|
6121
6121
|
this._skillRequestId++;
|
|
6122
6122
|
const requestId = this._skillRequestId;
|
|
6123
6123
|
const trimmed = query.trim();
|
|
6124
|
-
//
|
|
6125
|
-
//
|
|
6124
|
+
// An empty query matches everything; otherwise substring-match the query
|
|
6125
|
+
// against name/code/description. We use case-insensitive wildcard queries on
|
|
6126
|
+
// the `.raw` keyword subfields so "ord" matches anywhere in "Create Order"
|
|
6127
|
+
// (a plain match/multi_match only matches whole tokens). Escape the wildcard
|
|
6128
|
+
// specials so user input is treated literally, then wrap with `*...*`.
|
|
6126
6129
|
let must = { match_all: {} };
|
|
6127
6130
|
if (trimmed) {
|
|
6131
|
+
const pattern = `*${trimmed.replace(/([*?\\])/g, '\\$1')}*`;
|
|
6132
|
+
const value = {
|
|
6133
|
+
value: pattern,
|
|
6134
|
+
case_insensitive: true,
|
|
6135
|
+
};
|
|
6128
6136
|
must = {
|
|
6129
|
-
|
|
6130
|
-
|
|
6131
|
-
|
|
6132
|
-
|
|
6137
|
+
bool: {
|
|
6138
|
+
should: [
|
|
6139
|
+
{ wildcard: { 'name.raw': value } },
|
|
6140
|
+
{ wildcard: { 'code.raw': value } },
|
|
6141
|
+
{ wildcard: { 'description.raw': value } },
|
|
6142
|
+
],
|
|
6143
|
+
minimum_should_match: 1,
|
|
6133
6144
|
},
|
|
6134
6145
|
};
|
|
6135
6146
|
}
|