<commit_before>// extensions initialisation

import {registerComponents} from '../common/module-utils';
import {dynamicSections, dynamicSectionsByKind} from "../dynamic-section/dynamic-section-definitions";

import dbChangeInitiativeBrowser from './components/change-initiative/change-initiative-browser/db-change-initiative-browser';
import dbChangeInitiativeSection from './components/change-initiative/change-initiative-section/db-change-initiative-section';

export const init = (module) => {

    registerComponents(module, [
        dbChangeInitiativeBrowser,
        dbChangeInitiativeSection
    ]);

    _overrideChangeInitiativeSection();
};


function _overrideChangeInitiativeSection() {
    dynamicSections.dbChangeInitiativesSection = {
        componentId: 'db-change-initiative-section',
        name: 'Change Initiatives',
        icon: 'paper-plane-o',
        id: 10000
    };

    dynamicSectionsByKind["APPLICATION"] = [
        dynamicSections.measurableRatingAppSection,
        dynamicSections.entityNamedNotesSection,
        dynamicSections.bookmarksSection,
        dynamicSections.involvedPeopleSection,
        dynamicSections.dbChangeInitiativesSection, //overridden
        dynamicSections.flowDiagramsSection,
        dynamicSections.dataFlowSection,
        dynamicSections.technologySection,
        dynamicSections.appCostsSection,
        dynamicSections.entityStatisticSection,
        dynamicSections.surveySection,
        dynamicSections.changeLogSection
    ];
}<commit_msg>Fix change initiative section - Override GH section with DB specific one<commit_after>// extensions initialisation

import _ from "lodash";
import {registerComponents} from '../common/module-utils';
import {dynamicSections, dynamicSectionsByKind} from "../dynamic-section/dynamic-section-definitions";

import dbChangeInitiativeBrowser from './components/change-initiative/change-initiative-browser/db-change-initiative-browser';
import dbChangeInitiativeSection from './components/change-initiative/change-initiative-section/db-change-initiative-section';

export const init = (module) => {

    registerComponents(module, [
        dbChangeInitiativeBrowser,
        dbChangeInitiativeSection
    ]);

    overrideApplicationDynamicSections();
};


function overrideApplicationDynamicSections() {
    dynamicSections.dbChangeInitiativesSection = {
        componentId: 'db-change-initiative-section',
        name: 'Change Initiatives',
        icon: 'paper-plane-o',
        id: 10000
    };

    dynamicSectionsByKind["APPLICATION"] = _.map(
        dynamicSectionsByKind["APPLICATION"],
        ds => ds.id === dynamicSections.changeInitiativeSection.id
                ? dynamicSections.dbChangeInitiativesSection
                : ds
    );
}
{'fraction_non_alphanumeric': 0.0955137481910275, 'fraction_numerical': 0.00361794500723589, 'mean_word_length': 3.911190053285968, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5095249', 'n_tokens_mistral': 736, 'n_tokens_neox': 704, 'n_words': 115}