@bbn/bbn 1.0.386 → 1.0.388
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/bbn.js +1 -1
- package/dist/bbn.js.map +1 -1
- package/dist/fn/browser/copy.d.ts +1 -1
- package/dist/fn/browser/copy.js +4 -4
- package/dist/fn/object/search.js +14 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function copy(st: any,
|
|
1
|
+
export default function copy(st: any, noDispatch: any): Promise<unknown>;
|
package/dist/fn/browser/copy.js
CHANGED
|
@@ -23,7 +23,7 @@ var fire = function (st) {
|
|
|
23
23
|
});
|
|
24
24
|
document.dispatchEvent(copyEvent);
|
|
25
25
|
};
|
|
26
|
-
export default function copy(st,
|
|
26
|
+
export default function copy(st, noDispatch) {
|
|
27
27
|
return new Promise(function (resolve) {
|
|
28
28
|
var _a;
|
|
29
29
|
if (st) {
|
|
@@ -38,7 +38,7 @@ export default function copy(st, dispatch) {
|
|
|
38
38
|
var _a;
|
|
39
39
|
var item = new ClipboardItem((_a = {}, _a[blob.type.toString()] = blob, _a));
|
|
40
40
|
navigator.clipboard.write([item]).then(function () {
|
|
41
|
-
if (
|
|
41
|
+
if (!noDispatch) {
|
|
42
42
|
fire(st);
|
|
43
43
|
}
|
|
44
44
|
resolve(true);
|
|
@@ -47,7 +47,7 @@ export default function copy(st, dispatch) {
|
|
|
47
47
|
}
|
|
48
48
|
else {
|
|
49
49
|
navigator.clipboard.writeText(st);
|
|
50
|
-
if (
|
|
50
|
+
if (!noDispatch) {
|
|
51
51
|
fire(st);
|
|
52
52
|
}
|
|
53
53
|
resolve(true);
|
|
@@ -61,7 +61,7 @@ export default function copy(st, dispatch) {
|
|
|
61
61
|
input.select();
|
|
62
62
|
document.execCommand('copy');
|
|
63
63
|
document.body.removeChild(input);
|
|
64
|
-
if (
|
|
64
|
+
if (!noDispatch) {
|
|
65
65
|
fire(st);
|
|
66
66
|
}
|
|
67
67
|
resolve(true);
|
package/dist/fn/object/search.js
CHANGED
|
@@ -115,9 +115,21 @@ export default function search(arr, prop, val, operator, startFrom, backward) {
|
|
|
115
115
|
var filter;
|
|
116
116
|
var isFn = false;
|
|
117
117
|
if (!prop) {
|
|
118
|
-
|
|
118
|
+
isFn = true;
|
|
119
|
+
filter = function (a) {
|
|
120
|
+
return compareConditions({ value: a }, filterToConditions({
|
|
121
|
+
logic: 'AND',
|
|
122
|
+
conditions: [
|
|
123
|
+
{
|
|
124
|
+
field: 'value',
|
|
125
|
+
operator: operator || '=',
|
|
126
|
+
value: val,
|
|
127
|
+
},
|
|
128
|
+
],
|
|
129
|
+
}));
|
|
130
|
+
};
|
|
119
131
|
}
|
|
120
|
-
if (typeof prop === 'string') {
|
|
132
|
+
else if (typeof prop === 'string') {
|
|
121
133
|
filter = {
|
|
122
134
|
conditions: [
|
|
123
135
|
{
|