All files / output zcl_abapgit_html_toolbar_lib.clas.mjs

33.92% Statements 19/56
100% Branches 2/2
6.66% Functions 1/15
33.92% Lines 19/56

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 561x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x             1x       1x     1x                             1x     1x                     1x 1x 1x
const {cx_root} = await import("./cx_root.clas.mjs");
// zcl_abapgit_html_toolbar_lib.clas.abap
class zcl_abapgit_html_toolbar_lib {
  static STATIC_SUPER = undefined;
  static INTERNAL_TYPE = 'CLAS';
  static INTERNAL_NAME = 'ZCL_ABAPGIT_HTML_TOOLBAR_LIB';
  static IMPLEMENTED_INTERFACES = [];
  static ATTRIBUTES = {};
  static METHODS = {"BUILD_REPO_SETTINGS_DROPDOWN": {"visibility": "I", "parameters": {"RO_TOOLBAR": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_HTML_TOOLBAR", RTTIName: "\\CLASS=ZCL_ABAPGIT_HTML_TOOLBAR"});}, "is_optional": " ", "parm_kind": "R", "type_name": "ObjectReferenceType"}, "IV_KEY": {"type": () => {return new abap.types.Character(12, {"qualifiedName":"zif_abapgit_persistence=>ty_value"});}, "is_optional": " ", "parm_kind": "I", "type_name": "CharacterType"}, "IV_CLASS": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " ", "parm_kind": "I", "type_name": "StringType"}}},
  "RENDER_REPO_SETTINGS_DROPDOWN": {"visibility": "U", "parameters": {"IO_TOOLBAR": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_HTML_TOOLBAR", RTTIName: "\\CLASS=ZCL_ABAPGIT_HTML_TOOLBAR"});}, "is_optional": " ", "parm_kind": "I", "type_name": "ObjectReferenceType"}, "IV_KEY": {"type": () => {return new abap.types.Character(12, {"qualifiedName":"zif_abapgit_persistence=>ty_value"});}, "is_optional": " ", "parm_kind": "I", "type_name": "CharacterType"}, "IV_OPT": {"type": () => {return new abap.types.Character();}, "is_optional": " ", "parm_kind": "I", "type_name": "CGenericType"}, "IV_CLASS": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " ", "parm_kind": "I", "type_name": "StringType"}, "IV_LI_CLASS": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " ", "parm_kind": "I", "type_name": "StringType"}}}};
  constructor() {
    this.me = new abap.types.ABAPObject();
    this.me.set(this);
    this.INTERNAL_ID = abap.internalIdCounter++;
    this.FRIENDS_ACCESS_INSTANCE = {
    };
  }
  async constructor_(INPUT) {
    if (super.constructor_) { await super.constructor_(INPUT); }
    return this;
  }
  async render_repo_settings_dropdown(INPUT) {
    return zcl_abapgit_html_toolbar_lib.render_repo_settings_dropdown(INPUT);
  }
  static async render_repo_settings_dropdown(INPUT) {
    let io_toolbar = INPUT?.io_toolbar;
    if (io_toolbar?.getQualifiedName === undefined || io_toolbar.getQualifiedName() !== "ZCL_ABAPGIT_HTML_TOOLBAR") { io_toolbar = undefined; }
    if (io_toolbar === undefined) { io_toolbar = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_HTML_TOOLBAR", RTTIName: "\\CLASS=ZCL_ABAPGIT_HTML_TOOLBAR"}).set(INPUT.io_toolbar); }
    let iv_key = INPUT?.iv_key;
    if (iv_key?.getQualifiedName === undefined || iv_key.getQualifiedName() !== "ZIF_ABAPGIT_PERSISTENCE=>TY_VALUE") { iv_key = undefined; }
    if (iv_key === undefined) { iv_key = new abap.types.Character(12, {"qualifiedName":"zif_abapgit_persistence=>ty_value"}).set(INPUT.iv_key); }
    let iv_opt = INPUT?.iv_opt || new abap.types.Character();
    let iv_class = new abap.types.String({qualifiedName: "STRING"});
    if (INPUT && INPUT.iv_class) {iv_class.set(INPUT.iv_class);}
    let iv_li_class = new abap.types.String({qualifiedName: "STRING"});
    if (INPUT && INPUT.iv_li_class) {iv_li_class.set(INPUT.iv_li_class);}
    abap.statements.assert(abap.compare.initial(io_toolbar) === false);
    await io_toolbar.get().add({iv_txt: abap.CharacterFactory.get(13, 'Repo Settings'), io_sub: (await this.build_repo_settings_dropdown({iv_key: iv_key, iv_class: iv_class})), iv_opt: iv_opt, iv_title: new abap.types.String().set(`Repository Settings`), iv_class: iv_class, iv_li_class: iv_li_class});
  }
  async build_repo_settings_dropdown(INPUT) {
    return zcl_abapgit_html_toolbar_lib.build_repo_settings_dropdown(INPUT);
  }
  static async build_repo_settings_dropdown(INPUT) {
    let ro_toolbar = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_HTML_TOOLBAR", RTTIName: "\\CLASS=ZCL_ABAPGIT_HTML_TOOLBAR"});
    let iv_key = INPUT?.iv_key;
    if (iv_key?.getQualifiedName === undefined || iv_key.getQualifiedName() !== "ZIF_ABAPGIT_PERSISTENCE=>TY_VALUE") { iv_key = undefined; }
    if (iv_key === undefined) { iv_key = new abap.types.Character(12, {"qualifiedName":"zif_abapgit_persistence=>ty_value"}).set(INPUT.iv_key); }
    let iv_class = new abap.types.String({qualifiedName: "STRING"});
    if (INPUT && INPUT.iv_class) {iv_class.set(INPUT.iv_class);}
    ro_toolbar.set(await (new abap.Classes['ZCL_ABAPGIT_HTML_TOOLBAR']()).constructor_());
    await (await (await (await (await ro_toolbar.get().add({iv_txt: abap.CharacterFactory.get(10, 'Repository'), iv_act: new abap.types.String().set(`${abap.templateFormatting(abap.Classes['ZIF_ABAPGIT_DEFINITIONS'].zif_abapgit_definitions$c_action.get().repo_settings)}?key=${abap.templateFormatting(iv_key)}`), iv_class: iv_class, iv_title: new abap.types.String().set(`Repository Settings`)})).get().add({iv_txt: abap.CharacterFactory.get(5, 'Local'), iv_act: new abap.types.String().set(`${abap.templateFormatting(abap.Classes['ZIF_ABAPGIT_DEFINITIONS'].zif_abapgit_definitions$c_action.get().repo_local_settings)}?key=${abap.templateFormatting(iv_key)}`), iv_class: iv_class, iv_title: new abap.types.String().set(`Local Settings`)})).get().add({iv_txt: abap.CharacterFactory.get(6, 'Remote'), iv_act: new abap.types.String().set(`${abap.templateFormatting(abap.Classes['ZIF_ABAPGIT_DEFINITIONS'].zif_abapgit_definitions$c_action.get().repo_remote_settings)}?key=${abap.templateFormatting(iv_key)}`), iv_class: iv_class, iv_title: new abap.types.String().set(`Remote Settings`)})).get().add({iv_txt: abap.CharacterFactory.get(10, 'Background'), iv_act: new abap.types.String().set(`${abap.templateFormatting(abap.Classes['ZIF_ABAPGIT_DEFINITIONS'].zif_abapgit_definitions$c_action.get().repo_background)}?key=${abap.templateFormatting(iv_key)}`), iv_class: iv_class, iv_title: new abap.types.String().set(`Background Settings`)})).get().add({iv_txt: abap.CharacterFactory.get(5, 'Stats'), iv_act: new abap.types.String().set(`${abap.templateFormatting(abap.Classes['ZIF_ABAPGIT_DEFINITIONS'].zif_abapgit_definitions$c_action.get().repo_infos)}?key=${abap.templateFormatting(iv_key)}`), iv_class: iv_class, iv_title: new abap.types.String().set(`Statistics`)});
    return ro_toolbar;
  }
}
abap.Classes['ZCL_ABAPGIT_HTML_TOOLBAR_LIB'] = zcl_abapgit_html_toolbar_lib;
export {zcl_abapgit_html_toolbar_lib};