first commit

This commit is contained in:
Stefan Hacker
2026-04-03 09:38:48 +02:00
commit 37ad745546
47450 changed files with 3120798 additions and 0 deletions
@@ -0,0 +1,6 @@
import type { IGroup } from '../../components/GroupedList/GroupedList.types';
/**
* Takes an array of groups and returns a count of the groups and all descendant groups.
* @param groups - The array of groups to count.
*/
export declare const GetGroupCount: (groups: IGroup[] | undefined) => number;
@@ -0,0 +1,26 @@
define(["require", "exports", "tslib"], function (require, exports, tslib_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GetGroupCount = void 0;
/**
* Takes an array of groups and returns a count of the groups and all descendant groups.
* @param groups - The array of groups to count.
*/
var GetGroupCount = function (groups) {
var total = 0;
if (groups) {
var remainingGroups = tslib_1.__spreadArray([], groups, true);
var currentGroup = void 0;
while (remainingGroups && remainingGroups.length > 0) {
++total;
currentGroup = remainingGroups.pop();
if (currentGroup && currentGroup.children) {
remainingGroups.push.apply(remainingGroups, currentGroup.children);
}
}
}
return total;
};
exports.GetGroupCount = GetGroupCount;
});
//# sourceMappingURL=GroupedListUtility.js.map
@@ -0,0 +1 @@
{"version":3,"file":"GroupedListUtility.js","sourceRoot":"../src/","sources":["utilities/groupedList/GroupedListUtility.tsx"],"names":[],"mappings":";;;;IAEA;;;OAGG;IACI,IAAM,aAAa,GAAG,UAAC,MAA4B;QACxD,IAAI,KAAK,GAAG,CAAC,CAAC;QAEd,IAAI,MAAM,EAAE,CAAC;YACX,IAAM,eAAe,6BAAO,MAAM,OAAC,CAAC;YACpC,IAAI,YAAY,SAAQ,CAAC;YAEzB,OAAO,eAAe,IAAI,eAAe,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACrD,EAAE,KAAK,CAAC;gBAER,YAAY,GAAG,eAAe,CAAC,GAAG,EAAY,CAAC;gBAE/C,IAAI,YAAY,IAAI,YAAY,CAAC,QAAQ,EAAE,CAAC;oBAC1C,eAAe,CAAC,IAAI,OAApB,eAAe,EAAS,YAAY,CAAC,QAAQ,EAAE;gBACjD,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;IAnBW,QAAA,aAAa,iBAmBxB","sourcesContent":["import type { IGroup } from '../../components/GroupedList/GroupedList.types';\n\n/**\n * Takes an array of groups and returns a count of the groups and all descendant groups.\n * @param groups - The array of groups to count.\n */\nexport const GetGroupCount = (groups: IGroup[] | undefined): number => {\n let total = 0;\n\n if (groups) {\n const remainingGroups = [...groups];\n let currentGroup: IGroup;\n\n while (remainingGroups && remainingGroups.length > 0) {\n ++total;\n\n currentGroup = remainingGroups.pop() as IGroup;\n\n if (currentGroup && currentGroup.children) {\n remainingGroups.push(...currentGroup.children);\n }\n }\n }\n\n return total;\n};\n"]}