All files / output zcl_abapgit_gui_hotkey_ctl.clas.mjs

3.93% Statements 10/254
66.66% Branches 2/3
20% Functions 1/5
3.93% Lines 10/254

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 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 2541x 1x 1x                                                             1x 1x                                                                                                                                                                                                                                                                                                                                                                                                                                             1x 1x 1x 1x 1x
const {zcl_abapgit_gui_component} = await import("./zcl_abapgit_gui_component.clas.mjs");
const {cx_root} = await import("./cx_root.clas.mjs");
// zcl_abapgit_gui_hotkey_ctl.clas.abap
class zcl_abapgit_gui_hotkey_ctl extends zcl_abapgit_gui_component {
  static INTERNAL_TYPE = 'CLAS';
  static INTERNAL_NAME = 'ZCL_ABAPGIT_GUI_HOTKEY_CTL';
  static IMPLEMENTED_INTERFACES = ["ZIF_ABAPGIT_GUI_HOTKEYS","ZIF_ABAPGIT_GUI_HOTKEY_CTL","ZIF_ABAPGIT_GUI_RENDERABLE"];
  static ATTRIBUTES = {"GV_HINT_WAS_SHOWN": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "visibility": "I", "is_constant": " ", "is_class": "X"},
  "MT_HOTKEYS": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Structure({
  "ui_component": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GUI_HOTKEYS=>TY_HOTKEY_WITH_DESCR-UI_COMPONENT"}),
  "action": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GUI_HOTKEYS=>TY_HOTKEY_WITH_DESCR-ACTION"}),
  "hotkey": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GUI_HOTKEYS=>TY_HOTKEY_WITH_DESCR-HOTKEY"}),
  "description": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GUI_HOTKEYS=>TY_HOTKEY_WITH_DESCR-DESCRIPTION"})}, "zif_abapgit_gui_hotkeys=>ty_hotkey_with_descr", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[{"name":"action","type":"SORTED","isUnique":true,"keyFields":["UI_COMPONENT","ACTION"]}]}, "zif_abapgit_gui_hotkeys=>ty_hotkeys_with_descr");}, "visibility": "I", "is_constant": " ", "is_class": " "},
  "MS_USER_SETTINGS": {"type": () => {return new abap.types.Structure({
  "max_lines": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_PERSIST_USER=>TY_S_USER_SETTINGS-MAX_LINES"}),
  "adt_jump_enabled": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
  "show_default_repo": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
  "link_hints_enabled": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
  "link_hint_key": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_persist_user=>ty_s_user_settings-link_hint_key"}),
  "parallel_proc_disabled": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
  "icon_scaling": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_persist_user=>ty_s_user_settings-icon_scaling"}),
  "ui_theme": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_PERSIST_USER=>TY_S_USER_SETTINGS-UI_THEME"}),
  "hide_sapgui_hint": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
  "activate_wo_popup": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
  "label_colors": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_PERSIST_USER=>TY_S_USER_SETTINGS-LABEL_COLORS"}),
  "default_git_uname": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_PERSIST_USER=>TY_S_USER_SETTINGS-DEFAULT_GIT_UNAME"}),
  "default_git_email": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_PERSIST_USER=>TY_S_USER_SETTINGS-DEFAULT_GIT_EMAIL"})}, "zif_abapgit_persist_user=>ty_s_user_settings", undefined, {}, {});}, "visibility": "I", "is_constant": " ", "is_class": " "},
  "MV_VISIBLE": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "visibility": "I", "is_constant": " ", "is_class": " "},
  "C_SHOWHOTKEYS_ACTION": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "visibility": "U", "is_constant": "X", "is_class": "X"}};
  static METHODS = {"RENDER_SCRIPTS": {"visibility": "I", "parameters": {"RI_HTML": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_HTML", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_HTML"});}, "is_optional": " "}, "IT_HOTKEYS": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Structure({
  "ui_component": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GUI_HOTKEYS=>TY_HOTKEY_WITH_DESCR-UI_COMPONENT"}),
  "action": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GUI_HOTKEYS=>TY_HOTKEY_WITH_DESCR-ACTION"}),
  "hotkey": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GUI_HOTKEYS=>TY_HOTKEY_WITH_DESCR-HOTKEY"}),
  "description": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GUI_HOTKEYS=>TY_HOTKEY_WITH_DESCR-DESCRIPTION"})}, "zif_abapgit_gui_hotkeys=>ty_hotkey_with_descr", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[{"name":"action","type":"SORTED","isUnique":true,"keyFields":["UI_COMPONENT","ACTION"]}]}, "zif_abapgit_gui_hotkeys=>ty_hotkeys_with_descr");}, "is_optional": " "}}},
  "SHOULD_SHOW_HINT": {"visibility": "U", "parameters": {"RV_YES": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " "}}},
  "CONSTRUCTOR": {"visibility": "U", "parameters": {}}};
  #gv_hint_was_shown;
  #mt_hotkeys;
  #ms_user_settings;
  #mv_visible;
  constructor() {
    const sup = super();
    this.me = new abap.types.ABAPObject();
    this.me.set(this);
    this.INTERNAL_ID = abap.internalIdCounter++;
    this.FRIENDS_ACCESS_INSTANCE = {
      "SUPER": sup.FRIENDS_ACCESS_INSTANCE,
      "render_scripts": this.#render_scripts.bind(this),
    };
    this.gv_hint_was_shown = zcl_abapgit_gui_hotkey_ctl.gv_hint_was_shown;
    this.#mt_hotkeys = abap.types.TableFactory.construct(new abap.types.Structure({
    "ui_component": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GUI_HOTKEYS=>TY_HOTKEY_WITH_DESCR-UI_COMPONENT"}),
    "action": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GUI_HOTKEYS=>TY_HOTKEY_WITH_DESCR-ACTION"}),
    "hotkey": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GUI_HOTKEYS=>TY_HOTKEY_WITH_DESCR-HOTKEY"}),
    "description": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GUI_HOTKEYS=>TY_HOTKEY_WITH_DESCR-DESCRIPTION"})}, "zif_abapgit_gui_hotkeys=>ty_hotkey_with_descr", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[{"name":"action","type":"SORTED","isUnique":true,"keyFields":["UI_COMPONENT","ACTION"]}]}, "zif_abapgit_gui_hotkeys=>ty_hotkeys_with_descr");
    this.FRIENDS_ACCESS_INSTANCE["mt_hotkeys"] = this.#mt_hotkeys;
    this.#ms_user_settings = new abap.types.Structure({
    "max_lines": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_PERSIST_USER=>TY_S_USER_SETTINGS-MAX_LINES"}),
    "adt_jump_enabled": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "show_default_repo": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "link_hints_enabled": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "link_hint_key": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_persist_user=>ty_s_user_settings-link_hint_key"}),
    "parallel_proc_disabled": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "icon_scaling": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_persist_user=>ty_s_user_settings-icon_scaling"}),
    "ui_theme": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_PERSIST_USER=>TY_S_USER_SETTINGS-UI_THEME"}),
    "hide_sapgui_hint": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "activate_wo_popup": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "label_colors": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_PERSIST_USER=>TY_S_USER_SETTINGS-LABEL_COLORS"}),
    "default_git_uname": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_PERSIST_USER=>TY_S_USER_SETTINGS-DEFAULT_GIT_UNAME"}),
    "default_git_email": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_PERSIST_USER=>TY_S_USER_SETTINGS-DEFAULT_GIT_EMAIL"})}, "zif_abapgit_persist_user=>ty_s_user_settings", undefined, {}, {});
    this.FRIENDS_ACCESS_INSTANCE["ms_user_settings"] = this.#ms_user_settings;
    this.#mv_visible = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
    this.FRIENDS_ACCESS_INSTANCE["mv_visible"] = this.#mv_visible;
    this.c_showhotkeys_action = zcl_abapgit_gui_hotkey_ctl.c_showhotkeys_action;
  }
  async constructor_(INPUT) {
    await super.constructor_();
    this.#ms_user_settings.set((await (await abap.Classes['ZCL_ABAPGIT_PERSIST_FACTORY'].get_user()).get().zif_abapgit_persist_user$get_settings()));
    return this;
  }
  async #render_scripts(INPUT) {
    let ri_html = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_HTML", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_HTML"});
    let it_hotkeys = INPUT?.it_hotkeys;
    if (it_hotkeys?.getQualifiedName === undefined || it_hotkeys.getQualifiedName() !== "ZIF_ABAPGIT_GUI_HOTKEYS=>TY_HOTKEYS_WITH_DESCR") { it_hotkeys = undefined; }
    if (it_hotkeys === undefined) { it_hotkeys = abap.types.TableFactory.construct(new abap.types.Structure({
    "ui_component": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GUI_HOTKEYS=>TY_HOTKEY_WITH_DESCR-UI_COMPONENT"}),
    "action": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GUI_HOTKEYS=>TY_HOTKEY_WITH_DESCR-ACTION"}),
    "hotkey": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GUI_HOTKEYS=>TY_HOTKEY_WITH_DESCR-HOTKEY"}),
    "description": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GUI_HOTKEYS=>TY_HOTKEY_WITH_DESCR-DESCRIPTION"})}, "zif_abapgit_gui_hotkeys=>ty_hotkey_with_descr", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[{"name":"action","type":"SORTED","isUnique":true,"keyFields":["UI_COMPONENT","ACTION"]}]}, "zif_abapgit_gui_hotkeys=>ty_hotkeys_with_descr").set(INPUT.it_hotkeys); }
    let lv_json = new abap.types.String({qualifiedName: "STRING"});
    let fs_ls_hotkey_ = new abap.types.FieldSymbol(new abap.types.Structure({
    "ui_component": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GUI_HOTKEYS=>TY_HOTKEY_WITH_DESCR-UI_COMPONENT"}),
    "action": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GUI_HOTKEYS=>TY_HOTKEY_WITH_DESCR-ACTION"}),
    "hotkey": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GUI_HOTKEYS=>TY_HOTKEY_WITH_DESCR-HOTKEY"}),
    "description": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GUI_HOTKEYS=>TY_HOTKEY_WITH_DESCR-DESCRIPTION"})}, "zif_abapgit_gui_hotkeys=>ty_hotkey_with_descr", undefined, {}, {}));
    lv_json.set(new abap.types.String().set(`{`));
    for await (const unique1034 of abap.statements.loop(it_hotkeys)) {
      fs_ls_hotkey_.assign(unique1034);
      if (abap.compare.gt(abap.builtin.sy.get().tabix, abap.IntegerFactory.get(1))) {
        lv_json.set(abap.operators.concat(lv_json,new abap.types.String().set(`,`)));
      }
      lv_json.set(abap.operators.concat(lv_json,new abap.types.String().set(`  "${abap.templateFormatting(fs_ls_hotkey_.get().hotkey)}" : "${abap.templateFormatting(fs_ls_hotkey_.get().action)}" `)));
    }
    lv_json.set(abap.operators.concat(lv_json,new abap.types.String().set(`}`)));
    ri_html.set(await (new abap.Classes['ZCL_ABAPGIT_HTML']()).constructor_());
    await ri_html.get().zif_abapgit_html$set_title({iv_title: (await (await abap.Classes['CL_ABAP_TYPEDESCR'].describe_by_object_ref({p_object_ref: this.me})).get().get_relative_name())});
    await ri_html.get().zif_abapgit_html$add({ig_chunk: new abap.types.String().set(`setKeyBindings(${abap.templateFormatting(lv_json)});`)});
    return ri_html;
  }
  async should_show_hint() {
    return zcl_abapgit_gui_hotkey_ctl.should_show_hint();
  }
  static async should_show_hint() {
    let rv_yes = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
    if (abap.compare.eq(zcl_abapgit_gui_hotkey_ctl.gv_hint_was_shown, abap.builtin.abap_false)) {
      rv_yes.set(abap.builtin.abap_true);
      zcl_abapgit_gui_hotkey_ctl.gv_hint_was_shown.set(abap.builtin.abap_true);
    }
    return rv_yes;
  }
  async zif_abapgit_gui_hotkeys$get_hotkey_actions() {
    let rt_hotkey_actions = abap.types.TableFactory.construct(new abap.types.Structure({
    "ui_component": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GUI_HOTKEYS=>TY_HOTKEY_WITH_DESCR-UI_COMPONENT"}),
    "action": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GUI_HOTKEYS=>TY_HOTKEY_WITH_DESCR-ACTION"}),
    "hotkey": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GUI_HOTKEYS=>TY_HOTKEY_WITH_DESCR-HOTKEY"}),
    "description": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GUI_HOTKEYS=>TY_HOTKEY_WITH_DESCR-DESCRIPTION"})}, "zif_abapgit_gui_hotkeys=>ty_hotkey_with_descr", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[{"name":"action","type":"SORTED","isUnique":true,"keyFields":["UI_COMPONENT","ACTION"]}]}, "zif_abapgit_gui_hotkeys=>ty_hotkeys_with_descr");
    let ls_hotkey = new abap.types.Structure({
    "ui_component": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GUI_HOTKEYS=>TY_HOTKEY_WITH_DESCR-UI_COMPONENT"}),
    "action": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GUI_HOTKEYS=>TY_HOTKEY_WITH_DESCR-ACTION"}),
    "hotkey": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GUI_HOTKEYS=>TY_HOTKEY_WITH_DESCR-HOTKEY"}),
    "description": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GUI_HOTKEYS=>TY_HOTKEY_WITH_DESCR-DESCRIPTION"})}, "zif_abapgit_gui_hotkeys=>ty_hotkey_with_descr", undefined, {}, {});
    ls_hotkey.get().ui_component.set(abap.CharacterFactory.get(7, 'Hotkeys'));
    ls_hotkey.get().action.set(zcl_abapgit_gui_hotkey_ctl.c_showhotkeys_action);
    ls_hotkey.get().description.set(abap.CharacterFactory.get(17, 'Show Hotkeys Help'));
    ls_hotkey.get().hotkey.set(abap.CharacterFactory.get(1, '?'));
    abap.statements.insertInternal({data: ls_hotkey, table: rt_hotkey_actions});
    return rt_hotkey_actions;
  }
  async zif_abapgit_gui_hotkey_ctl$get_registered_hotkeys() {
    let rt_registered_hotkeys = abap.types.TableFactory.construct(new abap.types.Structure({
    "ui_component": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GUI_HOTKEYS=>TY_HOTKEY_WITH_DESCR-UI_COMPONENT"}),
    "action": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GUI_HOTKEYS=>TY_HOTKEY_WITH_DESCR-ACTION"}),
    "hotkey": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GUI_HOTKEYS=>TY_HOTKEY_WITH_DESCR-HOTKEY"}),
    "description": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GUI_HOTKEYS=>TY_HOTKEY_WITH_DESCR-DESCRIPTION"})}, "zif_abapgit_gui_hotkeys=>ty_hotkey_with_descr", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[{"name":"action","type":"SORTED","isUnique":true,"keyFields":["UI_COMPONENT","ACTION"]}]}, "zif_abapgit_gui_hotkeys=>ty_hotkeys_with_descr");
    rt_registered_hotkeys.set(this.#mt_hotkeys);
    return rt_registered_hotkeys;
  }
  async zif_abapgit_gui_hotkey_ctl$register_hotkeys(INPUT) {
    let it_hotkeys = INPUT?.it_hotkeys;
    if (it_hotkeys?.getQualifiedName === undefined || it_hotkeys.getQualifiedName() !== "ZIF_ABAPGIT_GUI_HOTKEYS=>TY_HOTKEYS_WITH_DESCR") { it_hotkeys = undefined; }
    if (it_hotkeys === undefined) { it_hotkeys = abap.types.TableFactory.construct(new abap.types.Structure({
    "ui_component": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GUI_HOTKEYS=>TY_HOTKEY_WITH_DESCR-UI_COMPONENT"}),
    "action": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GUI_HOTKEYS=>TY_HOTKEY_WITH_DESCR-ACTION"}),
    "hotkey": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GUI_HOTKEYS=>TY_HOTKEY_WITH_DESCR-HOTKEY"}),
    "description": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GUI_HOTKEYS=>TY_HOTKEY_WITH_DESCR-DESCRIPTION"})}, "zif_abapgit_gui_hotkeys=>ty_hotkey_with_descr", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[{"name":"action","type":"SORTED","isUnique":true,"keyFields":["UI_COMPONENT","ACTION"]}]}, "zif_abapgit_gui_hotkeys=>ty_hotkeys_with_descr").set(INPUT.it_hotkeys); }
    let fs_ls_hotkey_ = new abap.types.FieldSymbol(new abap.types.Structure({
    "ui_component": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GUI_HOTKEYS=>TY_HOTKEY_WITH_DESCR-UI_COMPONENT"}),
    "action": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GUI_HOTKEYS=>TY_HOTKEY_WITH_DESCR-ACTION"}),
    "hotkey": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GUI_HOTKEYS=>TY_HOTKEY_WITH_DESCR-HOTKEY"}),
    "description": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GUI_HOTKEYS=>TY_HOTKEY_WITH_DESCR-DESCRIPTION"})}, "zif_abapgit_gui_hotkeys=>ty_hotkey_with_descr", undefined, {}, {}));
    for await (const unique1035 of abap.statements.loop(it_hotkeys)) {
      fs_ls_hotkey_.assign(unique1035);
      abap.statements.readTable(this.#mt_hotkeys,{withKey: (i) => {return abap.compare.eq(i.hotkey, fs_ls_hotkey_.get().hotkey);},
        withKeyValue: [{key: (i) => {return i.hotkey}, value: fs_ls_hotkey_.get().hotkey}],
        usesTableLine: false,
        withKeySimple: {"hotkey": fs_ls_hotkey_.get().hotkey}});
      if (abap.compare.eq(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(0))) {
        await abap.statements.deleteInternal(this.#mt_hotkeys,{index: abap.builtin.sy.get().tabix});
      }
      if (abap.compare.eq(this.#ms_user_settings.get().link_hints_enabled, abap.builtin.abap_true) && abap.compare.eq(this.#ms_user_settings.get().link_hint_key, fs_ls_hotkey_.get().hotkey)) {
        continue;
      }
      abap.statements.append({source: fs_ls_hotkey_, target: this.#mt_hotkeys});
    }
  }
  async zif_abapgit_gui_hotkey_ctl$reset() {
    this.#mt_hotkeys.clear();
  }
  async zif_abapgit_gui_hotkey_ctl$set_visible(INPUT) {
    let iv_visible = INPUT?.iv_visible;
    if (iv_visible?.getQualifiedName === undefined || iv_visible.getQualifiedName() !== "ABAP_BOOL") { iv_visible = undefined; }
    if (iv_visible === undefined) { iv_visible = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}).set(INPUT.iv_visible); }
    this.#mv_visible.set(iv_visible);
  }
  async zif_abapgit_gui_renderable$render() {
    let ri_html = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_HTML", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_HTML"});
    let lv_hint = new abap.types.String({qualifiedName: "STRING"});
    let lt_registered_hotkeys = abap.types.TableFactory.construct(new abap.types.Structure({
    "ui_component": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GUI_HOTKEYS=>TY_HOTKEY_WITH_DESCR-UI_COMPONENT"}),
    "action": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GUI_HOTKEYS=>TY_HOTKEY_WITH_DESCR-ACTION"}),
    "hotkey": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GUI_HOTKEYS=>TY_HOTKEY_WITH_DESCR-HOTKEY"}),
    "description": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GUI_HOTKEYS=>TY_HOTKEY_WITH_DESCR-DESCRIPTION"})}, "zif_abapgit_gui_hotkeys=>ty_hotkey_with_descr", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[{"name":"action","type":"SORTED","isUnique":true,"keyFields":["UI_COMPONENT","ACTION"]}]}, "zif_abapgit_gui_hotkeys=>ty_hotkeys_with_descr");
    let lv_hotkey = new abap.types.String({qualifiedName: "STRING"});
    let ls_user_settings = new abap.types.Structure({
    "max_lines": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_PERSIST_USER=>TY_S_USER_SETTINGS-MAX_LINES"}),
    "adt_jump_enabled": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "show_default_repo": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "link_hints_enabled": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "link_hint_key": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_persist_user=>ty_s_user_settings-link_hint_key"}),
    "parallel_proc_disabled": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "icon_scaling": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_persist_user=>ty_s_user_settings-icon_scaling"}),
    "ui_theme": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_PERSIST_USER=>TY_S_USER_SETTINGS-UI_THEME"}),
    "hide_sapgui_hint": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "activate_wo_popup": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "label_colors": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_PERSIST_USER=>TY_S_USER_SETTINGS-LABEL_COLORS"}),
    "default_git_uname": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_PERSIST_USER=>TY_S_USER_SETTINGS-DEFAULT_GIT_UNAME"}),
    "default_git_email": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_PERSIST_USER=>TY_S_USER_SETTINGS-DEFAULT_GIT_EMAIL"})}, "zif_abapgit_persist_user=>ty_s_user_settings", undefined, {}, {});
    let fs_ls_hotkey_ = new abap.types.FieldSymbol(new abap.types.Structure({
    "ui_component": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GUI_HOTKEYS=>TY_HOTKEY_WITH_DESCR-UI_COMPONENT"}),
    "action": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GUI_HOTKEYS=>TY_HOTKEY_WITH_DESCR-ACTION"}),
    "hotkey": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GUI_HOTKEYS=>TY_HOTKEY_WITH_DESCR-HOTKEY"}),
    "description": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GUI_HOTKEYS=>TY_HOTKEY_WITH_DESCR-DESCRIPTION"})}, "zif_abapgit_gui_hotkeys=>ty_hotkey_with_descr", undefined, {}, {}));
    await this.register_handlers();
    ri_html.set(await (new abap.Classes['ZCL_ABAPGIT_HTML']()).constructor_());
    lt_registered_hotkeys.set((await this.zif_abapgit_gui_hotkey_ctl$get_registered_hotkeys()));
    abap.statements.sort(lt_registered_hotkeys,{by: [{component: "ui_component"},{component: "description"}]});
    await this.register_deferred_script({ii_part: (await this.#render_scripts({it_hotkeys: lt_registered_hotkeys}))});
    await ri_html.get().zif_abapgit_html$add({ig_chunk: abap.CharacterFactory.get(20, '<ul class="hotkeys">')});
    for await (const unique1036 of abap.statements.loop(lt_registered_hotkeys)) {
      fs_ls_hotkey_.assign(unique1036);
      await ri_html.get().zif_abapgit_html$add({ig_chunk: abap.operators.concat(new abap.types.String().set(`<li>`),abap.operators.concat(new abap.types.String().set(`<span class="key-id">${abap.templateFormatting(fs_ls_hotkey_.get().hotkey)}</span>`),abap.operators.concat(new abap.types.String().set(`<span class="key-descr">${abap.templateFormatting(fs_ls_hotkey_.get().description)}</span>`),new abap.types.String().set(`</li>`))))});
    }
    ls_user_settings.set((await (await abap.Classes['ZCL_ABAPGIT_PERSIST_FACTORY'].get_user()).get().zif_abapgit_persist_user$get_settings()));
    if (abap.compare.eq(ls_user_settings.get().link_hints_enabled, abap.builtin.abap_true)) {
      await ri_html.get().zif_abapgit_html$add({ig_chunk: abap.operators.concat(new abap.types.String().set(`<li>`),abap.operators.concat(new abap.types.String().set(`<span class="key-id">${abap.templateFormatting(ls_user_settings.get().link_hint_key)}</span>`),abap.operators.concat(new abap.types.String().set(`<span class="key-descr">Link Hints</span>`),new abap.types.String().set(`</li>`))))});
      await ri_html.get().zif_abapgit_html$add({ig_chunk: abap.operators.concat(new abap.types.String().set(`<li>`),abap.operators.concat(new abap.types.String().set(`<span class="key-id">y${abap.templateFormatting(ls_user_settings.get().link_hint_key)}</span>`),abap.operators.concat(new abap.types.String().set(`<span class="key-descr">Copy Link Text</span>`),new abap.types.String().set(`</li>`))))});
    }
    await ri_html.get().zif_abapgit_html$add({ig_chunk: abap.CharacterFactory.get(5, '</ul>')});
    lv_hotkey.clear();
    abap.statements.readTable(lt_registered_hotkeys,{assigning: fs_ls_hotkey_,
      withKey: (i) => {return abap.compare.eq(i.action, zcl_abapgit_gui_hotkey_ctl.c_showhotkeys_action);},
      withKeyValue: [{key: (i) => {return i.action}, value: zcl_abapgit_gui_hotkey_ctl.c_showhotkeys_action}],
      usesTableLine: false,
      withKeySimple: {"action": zcl_abapgit_gui_hotkey_ctl.c_showhotkeys_action}});
    if (abap.compare.eq(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(0))) {
      lv_hotkey.set(fs_ls_hotkey_.get().hotkey);
    }
    lv_hint.set(new abap.types.String().set(`Close window with upper right corner 'X'`));
    if (abap.compare.initial(lv_hotkey) === false) {
      lv_hint.set(abap.operators.concat(lv_hint,new abap.types.String().set(` or press '${abap.templateFormatting(fs_ls_hotkey_.get().hotkey)}'`)));
    }
    ri_html.set((await abap.Classes['ZCL_ABAPGIT_GUI_CHUNK_LIB'].render_infopanel({iv_div_id: abap.CharacterFactory.get(7, 'hotkeys'), iv_title: abap.CharacterFactory.get(7, 'Hotkeys'), iv_hint: lv_hint, iv_hide: abap.builtin.boolc(abap.compare.eq(this.#mv_visible, abap.builtin.abap_false)), iv_scrollable: abap.builtin.abap_false, io_content: ri_html})));
    if (abap.compare.initial(lv_hotkey) === false && abap.compare.eq((await this.should_show_hint()), abap.builtin.abap_true)) {
      await ri_html.get().zif_abapgit_html$add({ig_chunk: abap.operators.concat(new abap.types.String().set(`<div id="hotkeys-hint" class="corner-hint">`),abap.operators.concat(new abap.types.String().set(`Press '${abap.templateFormatting(fs_ls_hotkey_.get().hotkey)}' to get keyboard shortcuts list`),new abap.types.String().set(`</div>`)))});
    }
    this.#mv_visible.set(abap.builtin.abap_false);
    return ri_html;
  }
}
abap.Classes['ZCL_ABAPGIT_GUI_HOTKEY_CTL'] = zcl_abapgit_gui_hotkey_ctl;
zcl_abapgit_gui_hotkey_ctl.gv_hint_was_shown = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
zcl_abapgit_gui_hotkey_ctl.c_showhotkeys_action = new abap.types.String({qualifiedName: "STRING"});
zcl_abapgit_gui_hotkey_ctl.c_showhotkeys_action.set(`showHotkeys`);
export {zcl_abapgit_gui_hotkey_ctl};