@wandzai/utils 1.0.74-benchmark-classifications-5 → 1.0.74-benchmark-classifications-6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wandzai/utils",
3
- "version": "1.0.74-benchmark-classifications-5",
3
+ "version": "1.0.74-benchmark-classifications-6",
4
4
  "description": "Common used utilities library",
5
5
  "main": "src/index",
6
6
  "scripts": {
@@ -0,0 +1 @@
1
+ export declare const extractAllTextFromEntityJson: (json: any) => string[];
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.extractAllTextFromEntityJson = void 0;
4
+ const extractAllTextFromEntityJson = (json) => {
5
+ const values = [];
6
+ for (const row of json.page.rows) {
7
+ for (const column of row.columns) {
8
+ for (const module of column.modules) {
9
+ const descriptor = module.descriptor;
10
+ for (const key in descriptor) {
11
+ const value = descriptor[key];
12
+ if (value?.text) {
13
+ const div = document.createElement('div');
14
+ div.innerHTML = value?.text;
15
+ values.push(div.textContent?.trim() || '');
16
+ }
17
+ }
18
+ }
19
+ }
20
+ }
21
+ return values;
22
+ };
23
+ exports.extractAllTextFromEntityJson = extractAllTextFromEntityJson;
24
+ //# sourceMappingURL=bee-free.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bee-free.js","sourceRoot":"","sources":["../../../../libs/utils/src/bee-free.ts"],"names":[],"mappings":";;;AAEO,MAAM,4BAA4B,GAAG,CAAC,IAAI,EAAqC,EAAE;IACtF,MAAM,MAAM,GAAa,EAAE,CAAC;IAE5B,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;QACjC,KAAK,MAAM,MAAM,IAAI,GAAG,CAAC,OAAO,EAAE,CAAC;YACjC,KAAK,MAAM,MAAM,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;gBACpC,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;gBAErC,KAAK,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;oBAC7B,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC;oBAG9B,IAAI,KAAK,EAAE,IAAI,EAAE,CAAC;wBAChB,MAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;wBAC1C,GAAG,CAAC,SAAS,GAAG,KAAK,EAAE,IAAI,CAAC;wBAC5B,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;oBAC7C,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAvBW,QAAA,4BAA4B,gCAuBvC"}
package/src/index.d.ts CHANGED
@@ -14,3 +14,4 @@ export * from './interactions';
14
14
  export * from './slack';
15
15
  export * from './sentry';
16
16
  export * from './activations';
17
+ export * from './bee-free';
package/src/index.js CHANGED
@@ -30,4 +30,5 @@ __exportStar(require("./interactions"), exports);
30
30
  __exportStar(require("./slack"), exports);
31
31
  __exportStar(require("./sentry"), exports);
32
32
  __exportStar(require("./activations"), exports);
33
+ __exportStar(require("./bee-free"), exports);
33
34
  //# sourceMappingURL=index.js.map
package/src/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/utils/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,yCAAuB;AACvB,yCAAuB;AACvB,yCAAuB;AACvB,4CAA0B;AAC1B,2CAAyB;AACzB,0CAAwB;AACxB,oDAAkC;AAClC,0CAAwB;AACxB,8CAA4B;AAC5B,6CAA2B;AAC3B,0CAAwB;AACxB,iDAA+B;AAC/B,0CAAwB;AACxB,2CAAyB;AACzB,gDAA8B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/utils/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,yCAAuB;AACvB,yCAAuB;AACvB,yCAAuB;AACvB,4CAA0B;AAC1B,2CAAyB;AACzB,0CAAwB;AACxB,oDAAkC;AAClC,0CAAwB;AACxB,8CAA4B;AAC5B,6CAA2B;AAC3B,0CAAwB;AACxB,iDAA+B;AAC/B,0CAAwB;AACxB,2CAAyB;AACzB,gDAA8B;AAC9B,6CAA2B"}