bt-core-app 1.4.354 → 1.4.355

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.
@@ -33638,11 +33638,11 @@ function hP(e) {
33638
33638
  });
33639
33639
  async function l(r) {
33640
33640
  try {
33641
- let i = r.iterationCount ?? t, o = 0, s = r.listToIterate, d = s.length, f = 0, c = 0;
33642
- for (; c < d; ) {
33643
- c += i;
33644
- let v = s.slice(f, c);
33645
- o += v.length, n.value = `${o} of ${d} ${r.msg}`, f += v.length, await r.eachIteration(v);
33641
+ let i = r.getLoadingMsg ?? ((m, h) => `${m} of ${h}`), o = r.iterationCount ?? t, s = 0, d = r.listToIterate, f = d.length, c = 0, v = 0;
33642
+ for (; v < f; ) {
33643
+ v += o;
33644
+ let m = d.slice(c, v);
33645
+ s += m.length, n.value = i(s, f), c += m.length, await r.eachIteration(m);
33646
33646
  }
33647
33647
  } catch (i) {
33648
33648
  a(i);
package/dist/index.d.ts CHANGED
@@ -738,9 +738,9 @@ export declare interface ItemRefreshOptions {
738
738
 
739
739
  declare interface IterateThroughOptions<T> {
740
740
  eachIteration: (list: T[]) => Promise<any>;
741
+ getLoadingMsg?: (ind: number, total: number) => string;
741
742
  iterationCount?: number;
742
743
  listToIterate: T[];
743
- msg: string;
744
744
  }
745
745
 
746
746
  export declare interface ListEvents {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bt-core-app",
3
- "version": "1.4.354",
3
+ "version": "1.4.355",
4
4
  "description": "Core app tools for some basic features like navigation, authentication, server apis, and cosmetics",
5
5
  "homepage": "https://github.com/BlitzItTech/bt-core",
6
6
  "bugs": {