UNPKG

@launchmenu/applet-dictionary

Version:
48 lines 2.81 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.WiktionarySection = void 0; const WikiSection_1 = require("../../wiki/WikiSection"); const WiktionaryReferences_1 = require("./WiktionaryReferences"); const WiktionarySeeAlso_1 = require("./WiktionarySeeAlso"); const WiktionaryUsageNotes_1 = require("./WiktionaryUsageNotes"); /** * The standard class for sections in the wiktionary */ class WiktionarySection extends WikiSection_1.WikiSection { /** * Creates a new local model of a wikipage section * @param page The page that this section is a part of * @param info The section info * @param subsections The ids of child sections */ constructor(page, info, subsections) { super(page, info, subsections); this.setSubsectionsContents(); } /** * Retrieves the references for this section * @returns The references if present */ getReferences() { var _a; return (_a = this.findSubsections(WiktionaryReferences_1.WiktionaryReferences)[0]) !== null && _a !== void 0 ? _a : null; } /** * Retrieves the usage notes for this section * @returns The usage notes if present */ getUsageNotes() { var _a; return (_a = this.findSubsections(WiktionaryUsageNotes_1.WiktionaryUsageNotes)[0]) !== null && _a !== void 0 ? _a : null; } /** * Retrieves the 'see also' for this section * @returns The 'see also' if present */ getSeeAlso() { var _a; return (_a = this.findSubsections(WiktionarySeeAlso_1.WiktionarySeeAlso)[0]) !== null && _a !== void 0 ? _a : null; } } exports.WiktionarySection = WiktionarySection; //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiV2lrdGlvbmFyeVNlY3Rpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvc2NyYXBlci93aWt0aW9uYXJ5L2Jhc2VTZWN0aW9ucy9XaWt0aW9uYXJ5U2VjdGlvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFDQSx3REFBbUQ7QUFFbkQsaUVBQTREO0FBQzVELDJEQUFzRDtBQUN0RCxpRUFBNEQ7QUFFNUQ7O0dBRUc7QUFDSCxNQUFhLGlCQUFrQixTQUFRLHlCQUFXO0lBQzlD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