catchup-library-web 1.2.16 → 1.3.0
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/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +16 -1
- package/dist/index.mjs +16 -1
- package/package.json +1 -1
- package/src/utilization/CategoryUtilization.ts +23 -1
package/dist/index.d.mts
CHANGED
|
@@ -470,7 +470,7 @@ declare const retrieveCategoryVersionCodeOptionList: () => {
|
|
|
470
470
|
declare const filterCategoryVersionCodeOptionList: (categoryVersionCodeOptionList: any, coterieType: string, level: any) => any;
|
|
471
471
|
declare const filterCategoryVersionCodeOptionListByGradeDTO: (categoryVersionCodeOptionList: any, coterieType: string, gradeDTO: any) => any;
|
|
472
472
|
declare const filterCategoryVersionCodeOptionListByInstitutionDTO: (categoryVersionCodeOptionList: any, coterieType: string, institutionDTO: any) => any;
|
|
473
|
-
declare const constructCategoryTreeFromParentCode: (categorySet: any[]) => any;
|
|
473
|
+
declare const constructCategoryTreeFromParentCode: (categorySet: any[]) => any[];
|
|
474
474
|
|
|
475
475
|
declare const ONE_HOUR = 3600000;
|
|
476
476
|
declare const ONE_DAY = 86400000;
|
package/dist/index.d.ts
CHANGED
|
@@ -470,7 +470,7 @@ declare const retrieveCategoryVersionCodeOptionList: () => {
|
|
|
470
470
|
declare const filterCategoryVersionCodeOptionList: (categoryVersionCodeOptionList: any, coterieType: string, level: any) => any;
|
|
471
471
|
declare const filterCategoryVersionCodeOptionListByGradeDTO: (categoryVersionCodeOptionList: any, coterieType: string, gradeDTO: any) => any;
|
|
472
472
|
declare const filterCategoryVersionCodeOptionListByInstitutionDTO: (categoryVersionCodeOptionList: any, coterieType: string, institutionDTO: any) => any;
|
|
473
|
-
declare const constructCategoryTreeFromParentCode: (categorySet: any[]) => any;
|
|
473
|
+
declare const constructCategoryTreeFromParentCode: (categorySet: any[]) => any[];
|
|
474
474
|
|
|
475
475
|
declare const ONE_HOUR = 3600000;
|
|
476
476
|
declare const ONE_DAY = 86400000;
|
package/dist/index.js
CHANGED
|
@@ -7947,6 +7947,12 @@ var retrieveCategoryVersionCodeOptionList = () => {
|
|
|
7947
7947
|
type: "CULTURE_AND_RELIGION_KNOWLEDGE",
|
|
7948
7948
|
availableLevelList: [9, 10, 11, 12]
|
|
7949
7949
|
},
|
|
7950
|
+
{
|
|
7951
|
+
value: "MEB-AL-FEL-2024",
|
|
7952
|
+
text: i18n_default.t("MEB-AL-FEL-2024"),
|
|
7953
|
+
type: "PHILOSOPHY",
|
|
7954
|
+
availableLevelList: [9]
|
|
7955
|
+
},
|
|
7950
7956
|
{
|
|
7951
7957
|
value: "MEB-AL-FEL-2018",
|
|
7952
7958
|
text: i18n_default.t("MEB-AL-FEL-2018"),
|
|
@@ -8080,7 +8086,16 @@ var constructCategoryTreeFromParentCode = (categorySet) => {
|
|
|
8080
8086
|
rootNodes.push(node);
|
|
8081
8087
|
}
|
|
8082
8088
|
});
|
|
8083
|
-
|
|
8089
|
+
const sortNodesByCode = (nodes) => {
|
|
8090
|
+
nodes.sort((a, b) => a.code.localeCompare(b.code));
|
|
8091
|
+
nodes.forEach((node) => {
|
|
8092
|
+
if (node.subCategoryDTOList && node.subCategoryDTOList.length > 0) {
|
|
8093
|
+
sortNodesByCode(node.subCategoryDTOList);
|
|
8094
|
+
}
|
|
8095
|
+
});
|
|
8096
|
+
return nodes;
|
|
8097
|
+
};
|
|
8098
|
+
return sortNodesByCode(rootNodes);
|
|
8084
8099
|
};
|
|
8085
8100
|
|
|
8086
8101
|
// src/utilization/DateUtilization.ts
|
package/dist/index.mjs
CHANGED
|
@@ -7761,6 +7761,12 @@ var retrieveCategoryVersionCodeOptionList = () => {
|
|
|
7761
7761
|
type: "CULTURE_AND_RELIGION_KNOWLEDGE",
|
|
7762
7762
|
availableLevelList: [9, 10, 11, 12]
|
|
7763
7763
|
},
|
|
7764
|
+
{
|
|
7765
|
+
value: "MEB-AL-FEL-2024",
|
|
7766
|
+
text: i18n_default.t("MEB-AL-FEL-2024"),
|
|
7767
|
+
type: "PHILOSOPHY",
|
|
7768
|
+
availableLevelList: [9]
|
|
7769
|
+
},
|
|
7764
7770
|
{
|
|
7765
7771
|
value: "MEB-AL-FEL-2018",
|
|
7766
7772
|
text: i18n_default.t("MEB-AL-FEL-2018"),
|
|
@@ -7894,7 +7900,16 @@ var constructCategoryTreeFromParentCode = (categorySet) => {
|
|
|
7894
7900
|
rootNodes.push(node);
|
|
7895
7901
|
}
|
|
7896
7902
|
});
|
|
7897
|
-
|
|
7903
|
+
const sortNodesByCode = (nodes) => {
|
|
7904
|
+
nodes.sort((a, b) => a.code.localeCompare(b.code));
|
|
7905
|
+
nodes.forEach((node) => {
|
|
7906
|
+
if (node.subCategoryDTOList && node.subCategoryDTOList.length > 0) {
|
|
7907
|
+
sortNodesByCode(node.subCategoryDTOList);
|
|
7908
|
+
}
|
|
7909
|
+
});
|
|
7910
|
+
return nodes;
|
|
7911
|
+
};
|
|
7912
|
+
return sortNodesByCode(rootNodes);
|
|
7898
7913
|
};
|
|
7899
7914
|
|
|
7900
7915
|
// src/utilization/DateUtilization.ts
|
package/package.json
CHANGED
|
@@ -165,6 +165,12 @@ export const retrieveCategoryVersionCodeOptionList = () => {
|
|
|
165
165
|
type: "CULTURE_AND_RELIGION_KNOWLEDGE",
|
|
166
166
|
availableLevelList: [9, 10, 11, 12],
|
|
167
167
|
},
|
|
168
|
+
{
|
|
169
|
+
value: "MEB-AL-FEL-2024",
|
|
170
|
+
text: i18n.t("MEB-AL-FEL-2024"),
|
|
171
|
+
type: "PHILOSOPHY",
|
|
172
|
+
availableLevelList: [9],
|
|
173
|
+
},
|
|
168
174
|
{
|
|
169
175
|
value: "MEB-AL-FEL-2018",
|
|
170
176
|
text: i18n.t("MEB-AL-FEL-2018"),
|
|
@@ -336,5 +342,21 @@ export const constructCategoryTreeFromParentCode = (categorySet: any[]) => {
|
|
|
336
342
|
}
|
|
337
343
|
});
|
|
338
344
|
|
|
339
|
-
|
|
345
|
+
// Sort function that can be applied recursively
|
|
346
|
+
const sortNodesByCode = (nodes: any[]) => {
|
|
347
|
+
// Sort the current level
|
|
348
|
+
nodes.sort((a, b) => a.code.localeCompare(b.code));
|
|
349
|
+
|
|
350
|
+
// Sort each node's children
|
|
351
|
+
nodes.forEach((node) => {
|
|
352
|
+
if (node.subCategoryDTOList && node.subCategoryDTOList.length > 0) {
|
|
353
|
+
sortNodesByCode(node.subCategoryDTOList);
|
|
354
|
+
}
|
|
355
|
+
});
|
|
356
|
+
|
|
357
|
+
return nodes;
|
|
358
|
+
};
|
|
359
|
+
|
|
360
|
+
// Apply sorting to the root nodes and all descendants
|
|
361
|
+
return sortNodesByCode(rootNodes);
|
|
340
362
|
};
|