@okf/ootils 1.21.6 → 1.23.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.
@@ -749,4 +749,392 @@ interface MergeParams {
749
749
  */
750
750
  declare const mergeAnnoDataIntoAnnotationsTags: ({ prevObj, newLexValue, thisBlockValuePath, author, }: MergeParams) => any;
751
751
 
752
- export { BASE_BULLMQ_CONFIG, deleteVal, extractAllBlocksFromTpl, genTagId, getPlatformContextContent, getRollupPossibilities, getVal, mergeAnnoDataIntoAnnotationsTags, _recursExtractBlocks as recursivelyExtractBlocks, segrigateDocs, setVal, toArray };
752
+ declare const parseSpecialConfigSyntax: ({ config, content, returnUndefinedIfReplacementWordNotFound }: {
753
+ config: string | object;
754
+ content: Record<string, any>;
755
+ returnUndefinedIfReplacementWordNotFound?: boolean;
756
+ }) => any;
757
+
758
+ declare const getRoutePathToPublishedContent: ({ contentType, contentId, SELF_MANAGED_BASE_CONFIGS, scrollIntoViewElemId, }: {
759
+ contentType: string;
760
+ contentId: string;
761
+ SELF_MANAGED_BASE_CONFIGS?: {
762
+ enable?: boolean;
763
+ contentPageRelated?: {
764
+ linkToPublishedPage?: string;
765
+ [key: string]: any;
766
+ };
767
+ [key: string]: any;
768
+ };
769
+ scrollIntoViewElemId?: string;
770
+ }) => string;
771
+
772
+ declare const getRoutePathToEditContent: ({ contentType, contentId, SELF_MANAGED_BASE_CONFIGS, }: {
773
+ contentType: string;
774
+ contentId: string;
775
+ SELF_MANAGED_BASE_CONFIGS?: {
776
+ enable?: boolean;
777
+ contentPageRelated?: {
778
+ linkToEdit?: string;
779
+ [key: string]: any;
780
+ };
781
+ [key: string]: any;
782
+ };
783
+ }) => string;
784
+
785
+ declare const getRoutePathToModerateContent: ({ contentType, contentId, SELF_MANAGED_BASE_CONFIGS, }: {
786
+ contentType: string;
787
+ contentId: string;
788
+ SELF_MANAGED_BASE_CONFIGS?: {
789
+ enable?: boolean;
790
+ contentPageRelated?: {
791
+ linkToModerate?: string;
792
+ [key: string]: any;
793
+ };
794
+ [key: string]: any;
795
+ };
796
+ }) => string;
797
+
798
+ declare const buildFilterConfigurations: ({ groups, type, selectedTpls, allTpls, isRollup, isAnno }: {
799
+ groups: any[];
800
+ type: string;
801
+ selectedTpls: any[];
802
+ allTpls: any[];
803
+ isRollup?: boolean;
804
+ isAnno?: boolean;
805
+ }) => {
806
+ sectionId: string;
807
+ sectionTitle: string;
808
+ sectionSubtitle: string;
809
+ configs: any;
810
+ }[];
811
+
812
+ declare const compareAndGroupBlocks: (blocksPerTpl: any[]) => any[];
813
+
814
+ declare const extractAndOrganizeBlocks: (selectedTpls: any[], allTpls: any[]) => any;
815
+
816
+ declare const processAuthorAndCommonFilters: (allTpls: any[], filterScopes: string[], annoEnabledBlocks?: any[]) => {
817
+ authorTagConfigs: {
818
+ filterId: string;
819
+ blockId: string;
820
+ display: string;
821
+ value: any;
822
+ filterKey: string | undefined;
823
+ source: {
824
+ filterType: string;
825
+ tagType: any;
826
+ scope: string;
827
+ };
828
+ target: {
829
+ filterType: string;
830
+ tagType: any;
831
+ rollupResourceTypes: any;
832
+ relationshipValuePath: string;
833
+ };
834
+ }[];
835
+ commonAnnotationFilters: {
836
+ sectionId: string;
837
+ sectionTitle: string;
838
+ configs: ({
839
+ filterId: string;
840
+ blockId: string;
841
+ display: string;
842
+ value: string;
843
+ filterKey: string | undefined;
844
+ source: {
845
+ filterType: string;
846
+ profileTypes: any[];
847
+ options?: undefined;
848
+ };
849
+ target: {
850
+ filterType: string;
851
+ valuePath: string;
852
+ };
853
+ } | {
854
+ filterId: string;
855
+ blockId: string;
856
+ display: string;
857
+ value: string;
858
+ filterKey: string | undefined;
859
+ source: {
860
+ filterType: string;
861
+ options: {
862
+ display: any;
863
+ value: any;
864
+ }[];
865
+ profileTypes?: undefined;
866
+ };
867
+ target: {
868
+ filterType: string;
869
+ valuePath: string;
870
+ };
871
+ })[];
872
+ }[];
873
+ commonDocumentFilters: {
874
+ sectionId: string;
875
+ sectionTitle: string;
876
+ configs: ({
877
+ filterId: string;
878
+ blockId: string;
879
+ display: string;
880
+ value: any;
881
+ filterKey: string | undefined;
882
+ source: {
883
+ filterType: string;
884
+ tagType: any;
885
+ scope: string;
886
+ };
887
+ target: {
888
+ filterType: string;
889
+ tagType: any;
890
+ rollupResourceTypes: any;
891
+ relationshipValuePath: string;
892
+ };
893
+ } | {
894
+ filterId: string;
895
+ blockId: string;
896
+ display: string;
897
+ value: string;
898
+ filterKey: string | undefined;
899
+ source: {
900
+ filterType: string;
901
+ profileTypes: any[];
902
+ scope: string;
903
+ };
904
+ target: {
905
+ filterType: string;
906
+ valuePath: string;
907
+ };
908
+ } | {
909
+ filterId: string;
910
+ blockId: string;
911
+ display: string;
912
+ value: string;
913
+ filterKey: string | undefined;
914
+ source: {
915
+ filterType: string;
916
+ profileTypes?: undefined;
917
+ scope?: undefined;
918
+ };
919
+ target: {
920
+ filterType: string;
921
+ valuePath: string;
922
+ };
923
+ })[];
924
+ }[];
925
+ };
926
+
927
+ declare const _self_managed_getFixedAnnoTagBlock: (selectedTpls: any[], annotationTagsCount: any) => any[];
928
+
929
+ declare const _self_managed_getFixedAnnoRollupBlocks: ({ selectedTpls, allTpls, annotationTagsCount }: {
930
+ selectedTpls: any[];
931
+ allTpls: any[];
932
+ annotationTagsCount: any;
933
+ }) => any[];
934
+
935
+ declare const FILTER_IDS: {
936
+ themes: string;
937
+ subThemes: string;
938
+ tags: string;
939
+ };
940
+ /**
941
+ * Builds the single annoHierarchyType config for self-managed tenants.
942
+ * Replaces separate Themes, SubThemes, Tags filters with one consolidated hierarchy UI.
943
+ *
944
+ * Themes -> SubThemes -> Tags
945
+ */
946
+ declare const _self_managed_buildAnnoHierarchyConfig: ({ annotationTagsCount, }: {
947
+ annotationTagsCount: any;
948
+ }) => {
949
+ target: {
950
+ filterType: string;
951
+ };
952
+ filterId: string;
953
+ display: string;
954
+ filterKey: string;
955
+ source: {
956
+ filterType: string;
957
+ annotationTagsCount: {
958
+ themes: boolean;
959
+ subThemes: boolean;
960
+ tags: boolean;
961
+ };
962
+ levelLabels: {
963
+ themes: string;
964
+ subThemes: string;
965
+ tags: string;
966
+ };
967
+ folderSelectionMode: string;
968
+ hierarchyLevels: (false | {
969
+ level: string;
970
+ filterId: string;
971
+ tagType: string;
972
+ })[];
973
+ };
974
+ } | null;
975
+
976
+ /**
977
+ * TEMP_removeDuplicateFilters - Removes duplicate rollup and tag-type filters
978
+ *
979
+ * THIS IS A TEMPORARY SOLUTION TO ADDRESS REPETITIVE FILTERS.
980
+ *
981
+ * KEEPS THE FIRST OCCURRENCE of each filter type and removes subsequent duplicates:
982
+ * - FOR ROLLUPS: Deduplicates based on final target (last element in rollupPath)
983
+ * - FOR TAG TYPES: Deduplicates based on tagType value
984
+ * - FOR OTHER FILTER TYPES: Passes through unchanged (no deduplication)
985
+ */
986
+ declare const TEMP_removeDuplicateFilters: (filterGroups: any[]) => any[];
987
+
988
+ declare const generateFilterKey: ({ filterType, scope, tagType, valuePath, rollupPath, tagTypeCollectionToRollup, valuePathInRolledUpCollection, relationshipValuePath, rollupResourceTypes, }?: {
989
+ filterType: string;
990
+ scope?: string;
991
+ tagType?: string;
992
+ valuePath?: string;
993
+ rollupPath?: string[];
994
+ tagTypeCollectionToRollup?: string;
995
+ valuePathInRolledUpCollection?: string;
996
+ relationshipValuePath?: string;
997
+ rollupResourceTypes?: string[];
998
+ }) => string | undefined;
999
+
1000
+ declare const getFilterKeyForBlock: ({ block, scope }?: {
1001
+ block?: any;
1002
+ scope?: string;
1003
+ }) => string | undefined;
1004
+
1005
+ /**
1006
+ * Automatically generates filter configurations from template structures.
1007
+ *
1008
+ * This is a pure function (no UI/React dependencies) that can be used on both
1009
+ * frontend and backend.
1010
+ *
1011
+ * BEHAVIOR:
1012
+ * - DEFAULT TENANTS: Dynamically discovers rollups from template structure
1013
+ * - SELF-MANAGED TENANTS: Uses predefined hierarchy with conditional filters
1014
+ */
1015
+ declare const autoGenFilterConfigsFromTpl: ({ selectedTpls, allTpls, filterScopes, isSelfManagedTenant, annotationTagsCount, }: {
1016
+ selectedTpls: any[];
1017
+ allTpls: any[];
1018
+ filterScopes: string[];
1019
+ isSelfManagedTenant?: boolean;
1020
+ annotationTagsCount?: any;
1021
+ }) => ({
1022
+ sectionId: string;
1023
+ sectionTitle: string;
1024
+ configs: ({
1025
+ sectionId: string;
1026
+ sectionTitle: string;
1027
+ sectionSubtitle: string;
1028
+ configs: any;
1029
+ } | {
1030
+ sectionId: string;
1031
+ sectionTitle: string;
1032
+ configs: ({
1033
+ filterId: string;
1034
+ blockId: string;
1035
+ display: string;
1036
+ value: string;
1037
+ filterKey: string | undefined;
1038
+ source: {
1039
+ filterType: string;
1040
+ profileTypes: any[];
1041
+ options?: undefined;
1042
+ };
1043
+ target: {
1044
+ filterType: string;
1045
+ valuePath: string;
1046
+ };
1047
+ } | {
1048
+ filterId: string;
1049
+ blockId: string;
1050
+ display: string;
1051
+ value: string;
1052
+ filterKey: string | undefined;
1053
+ source: {
1054
+ filterType: string;
1055
+ options: {
1056
+ display: any;
1057
+ value: any;
1058
+ }[];
1059
+ profileTypes?: undefined;
1060
+ };
1061
+ target: {
1062
+ filterType: string;
1063
+ valuePath: string;
1064
+ };
1065
+ })[];
1066
+ })[] | {
1067
+ sectionId: string;
1068
+ configs: any[];
1069
+ }[];
1070
+ } | {
1071
+ sectionId: string;
1072
+ sectionTitle: string;
1073
+ configs: ({
1074
+ sectionId: string;
1075
+ sectionTitle: string;
1076
+ sectionSubtitle: string;
1077
+ configs: any;
1078
+ } | {
1079
+ sectionId: string;
1080
+ sectionTitle: string;
1081
+ configs: ({
1082
+ filterId: string;
1083
+ blockId: string;
1084
+ display: string;
1085
+ value: any;
1086
+ filterKey: string | undefined;
1087
+ source: {
1088
+ filterType: string;
1089
+ tagType: any;
1090
+ scope: string;
1091
+ };
1092
+ target: {
1093
+ filterType: string;
1094
+ tagType: any;
1095
+ rollupResourceTypes: any;
1096
+ relationshipValuePath: string;
1097
+ };
1098
+ } | {
1099
+ filterId: string;
1100
+ blockId: string;
1101
+ display: string;
1102
+ value: string;
1103
+ filterKey: string | undefined;
1104
+ source: {
1105
+ filterType: string;
1106
+ profileTypes: any[];
1107
+ scope: string;
1108
+ };
1109
+ target: {
1110
+ filterType: string;
1111
+ valuePath: string;
1112
+ };
1113
+ } | {
1114
+ filterId: string;
1115
+ blockId: string;
1116
+ display: string;
1117
+ value: string;
1118
+ filterKey: string | undefined;
1119
+ source: {
1120
+ filterType: string;
1121
+ profileTypes?: undefined;
1122
+ scope?: undefined;
1123
+ };
1124
+ target: {
1125
+ filterType: string;
1126
+ valuePath: string;
1127
+ };
1128
+ })[];
1129
+ })[];
1130
+ } | null)[];
1131
+
1132
+ declare const UI_CONTENT: {
1133
+ autoGenFilterConfigs: {
1134
+ annoTagsTitle: string;
1135
+ tagsTitle: string;
1136
+ tagsFilterTitle: string;
1137
+ };
1138
+ };
1139
+
1140
+ export { BASE_BULLMQ_CONFIG, FILTER_IDS, TEMP_removeDuplicateFilters, UI_CONTENT, _self_managed_buildAnnoHierarchyConfig, _self_managed_getFixedAnnoRollupBlocks, _self_managed_getFixedAnnoTagBlock, autoGenFilterConfigsFromTpl, buildFilterConfigurations, compareAndGroupBlocks, deleteVal, extractAllBlocksFromTpl, extractAndOrganizeBlocks, genTagId, generateFilterKey, getFilterKeyForBlock, getPlatformContextContent, getRollupPossibilities, getRoutePathToEditContent, getRoutePathToModerateContent, getRoutePathToPublishedContent, getVal, mergeAnnoDataIntoAnnotationsTags, parseSpecialConfigSyntax, processAuthorAndCommonFilters, _recursExtractBlocks as recursivelyExtractBlocks, segrigateDocs, setVal, toArray };