All files / output zcl_abapgit_gui_page_sett_pers.clas.mjs

16.82% Statements 52/309
66.66% Branches 2/3
12.5% Functions 1/8
16.82% Lines 52/309

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 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 3091x 1x 1x                                                                                           1x 1x 1x 1x 1x                                                                                                                                                                                                                                                                                                                                                                                                                                         1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 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_page_sett_pers.clas.abap
class zcl_abapgit_gui_page_sett_pers extends zcl_abapgit_gui_component {
  static INTERNAL_TYPE = 'CLAS';
  static INTERNAL_NAME = 'ZCL_ABAPGIT_GUI_PAGE_SETT_PERS';
  static IMPLEMENTED_INTERFACES = ["ZIF_ABAPGIT_GUI_EVENT_HANDLER","ZIF_ABAPGIT_GUI_RENDERABLE"];
  static ATTRIBUTES = {"MO_FORM": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_HTML_FORM", RTTIName: "\\CLASS=ZCL_ABAPGIT_HTML_FORM"});}, "visibility": "I", "is_constant": " ", "is_class": " "},
  "MO_FORM_DATA": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_STRING_MAP", RTTIName: "\\CLASS=ZCL_ABAPGIT_STRING_MAP"});}, "visibility": "I", "is_constant": " ", "is_class": " "},
  "MO_VALIDATION_LOG": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_STRING_MAP", RTTIName: "\\CLASS=ZCL_ABAPGIT_STRING_MAP"});}, "visibility": "I", "is_constant": " ", "is_class": " "},
  "MO_SETTINGS": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_SETTINGS", RTTIName: "\\CLASS=ZCL_ABAPGIT_SETTINGS"});}, "visibility": "I", "is_constant": " ", "is_class": " "},
  "MS_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": " "},
  "C_ID": {"type": () => {return new abap.types.Structure({
  "startup": new abap.types.String({qualifiedName: "STRING"}),
  "show_default_repo": new abap.types.String({qualifiedName: "STRING"}),
  "ui": new abap.types.String({qualifiedName: "STRING"}),
  "ui_theme": new abap.types.String({qualifiedName: "STRING"}),
  "icon_scaling": new abap.types.String({qualifiedName: "STRING"}),
  "max_lines": new abap.types.String({qualifiedName: "STRING"}),
  "interaction": new abap.types.String({qualifiedName: "STRING"}),
  "adt_jump_enabled": new abap.types.String({qualifiedName: "STRING"}),
  "link_hints_enabled": new abap.types.String({qualifiedName: "STRING"}),
  "link_hint_key": new abap.types.String({qualifiedName: "STRING"}),
  "hotkeys": new abap.types.String({qualifiedName: "STRING"}),
  "resources": new abap.types.String({qualifiedName: "STRING"}),
  "parallel_proc_disabled": new abap.types.String({qualifiedName: "STRING"}),
  "hide_sapgui_hint": new abap.types.String({qualifiedName: "STRING"}),
  "activate_wo_popup": new abap.types.String({qualifiedName: "STRING"}),
  "label_colors": new abap.types.String({qualifiedName: "STRING"}),
  "git_default_values": new abap.types.String({qualifiedName: "STRING"}),
  "default_git_uname": new abap.types.String({qualifiedName: "STRING"}),
  "default_git_email": new abap.types.String({qualifiedName: "STRING"})}, undefined, undefined, {}, {});}, "visibility": "I", "is_constant": "X", "is_class": "X"},
  "C_EVENT": {"type": () => {return new abap.types.Structure({
  "save": new abap.types.String({qualifiedName: "STRING"})}, undefined, undefined, {}, {});}, "visibility": "I", "is_constant": "X", "is_class": "X"}};
  static METHODS = {"VALIDATE_FORM": {"visibility": "I", "parameters": {"RO_VALIDATION_LOG": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_STRING_MAP", RTTIName: "\\CLASS=ZCL_ABAPGIT_STRING_MAP"});}, "is_optional": " "}, "IO_FORM_DATA": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_STRING_MAP", RTTIName: "\\CLASS=ZCL_ABAPGIT_STRING_MAP"});}, "is_optional": " "}}},
  "GET_FORM_SCHEMA": {"visibility": "I", "parameters": {"RO_FORM": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_HTML_FORM", RTTIName: "\\CLASS=ZCL_ABAPGIT_HTML_FORM"});}, "is_optional": " "}}},
  "READ_SETTINGS": {"visibility": "I", "parameters": {"RO_FORM_DATA": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_STRING_MAP", RTTIName: "\\CLASS=ZCL_ABAPGIT_STRING_MAP"});}, "is_optional": " "}}},
  "SAVE_SETTINGS": {"visibility": "I", "parameters": {}},
  "RENDER_REPO_LABELS_HELP_HINT": {"visibility": "I", "parameters": {"RV_HTML": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}}},
  "CREATE": {"visibility": "U", "parameters": {"RI_PAGE": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_GUI_RENDERABLE", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_GUI_RENDERABLE"});}, "is_optional": " "}}},
  "CONSTRUCTOR": {"visibility": "U", "parameters": {}}};
  #mo_form;
  #mo_form_data;
  #mo_validation_log;
  #mo_settings;
  #ms_settings;
  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,
      "validate_form": this.#validate_form.bind(this),
      "get_form_schema": this.#get_form_schema.bind(this),
      "read_settings": this.#read_settings.bind(this),
      "save_settings": this.#save_settings.bind(this),
      "render_repo_labels_help_hint": this.#render_repo_labels_help_hint.bind(this),
    };
    this.#mo_form = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_HTML_FORM", RTTIName: "\\CLASS=ZCL_ABAPGIT_HTML_FORM"});
    this.FRIENDS_ACCESS_INSTANCE["mo_form"] = this.#mo_form;
    this.#mo_form_data = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_STRING_MAP", RTTIName: "\\CLASS=ZCL_ABAPGIT_STRING_MAP"});
    this.FRIENDS_ACCESS_INSTANCE["mo_form_data"] = this.#mo_form_data;
    this.#mo_validation_log = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_STRING_MAP", RTTIName: "\\CLASS=ZCL_ABAPGIT_STRING_MAP"});
    this.FRIENDS_ACCESS_INSTANCE["mo_validation_log"] = this.#mo_validation_log;
    this.#mo_settings = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_SETTINGS", RTTIName: "\\CLASS=ZCL_ABAPGIT_SETTINGS"});
    this.FRIENDS_ACCESS_INSTANCE["mo_settings"] = this.#mo_settings;
    this.#ms_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_settings"] = this.#ms_settings;
    this.c_id = zcl_abapgit_gui_page_sett_pers.c_id;
    this.c_event = zcl_abapgit_gui_page_sett_pers.c_event;
  }
  async constructor_(INPUT) {
    await super.constructor_();
    this.#mo_validation_log.set(await (new abap.Classes['ZCL_ABAPGIT_STRING_MAP']()).constructor_());
    this.#mo_form_data.set(await (new abap.Classes['ZCL_ABAPGIT_STRING_MAP']()).constructor_());
    this.#mo_form.set((await this.#get_form_schema()));
    this.#mo_form_data.set((await this.#read_settings()));
    return this;
  }
  async create() {
    return zcl_abapgit_gui_page_sett_pers.create();
  }
  static async create() {
    let ri_page = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_GUI_RENDERABLE", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_GUI_RENDERABLE"});
    let lo_component = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_GUI_PAGE_SETT_PERS", RTTIName: "\\CLASS=ZCL_ABAPGIT_GUI_PAGE_SETT_PERS"});
    lo_component.set(await (new abap.Classes['ZCL_ABAPGIT_GUI_PAGE_SETT_PERS']()).constructor_());
    ri_page.set((await abap.Classes['ZCL_ABAPGIT_GUI_PAGE_HOC'].create({iv_page_title: abap.CharacterFactory.get(17, 'Personal Settings'), io_page_menu: (await abap.Classes['ZCL_ABAPGIT_GUI_MENUS'].settings({iv_act: abap.Classes['ZIF_ABAPGIT_DEFINITIONS'].zif_abapgit_definitions$c_action.get().go_settings_personal})), ii_child_component: lo_component})));
    return ri_page;
  }
  async #get_form_schema() {
    let ro_form = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_HTML_FORM", RTTIName: "\\CLASS=ZCL_ABAPGIT_HTML_FORM"});
    ro_form.set((await abap.Classes['ZCL_ABAPGIT_HTML_FORM'].create({iv_form_id: abap.CharacterFactory.get(21, 'personal-setting-form'), iv_help_page: abap.CharacterFactory.get(53, 'https://docs.abapgit.org/guide-settings-personal.html')})));
    await (await (await (await (await (await (await (await (await (await (await (await (await (await (await (await (await (await (await (await (await (await (await (await (await (await ro_form.get().start_group({iv_name: zcl_abapgit_gui_page_sett_pers.c_id.get().startup, iv_label: abap.CharacterFactory.get(7, 'Startup')})).get().checkbox({iv_name: zcl_abapgit_gui_page_sett_pers.c_id.get().show_default_repo, iv_label: abap.CharacterFactory.get(27, 'Show Last Opened Repository'), iv_hint: abap.CharacterFactory.get(42, 'Recommended to check, if you are using ADT')})).get().start_group({iv_name: zcl_abapgit_gui_page_sett_pers.c_id.get().ui, iv_label: abap.CharacterFactory.get(14, 'User Interface')})).get().radio({iv_name: zcl_abapgit_gui_page_sett_pers.c_id.get().ui_theme, iv_default_value: abap.Classes['ZCL_ABAPGIT_SETTINGS'].c_ui_theme.get().default, iv_label: abap.CharacterFactory.get(5, 'Theme')})).get().option({iv_label: abap.CharacterFactory.get(7, 'Default'), iv_value: abap.Classes['ZCL_ABAPGIT_SETTINGS'].c_ui_theme.get().default})).get().option({iv_label: abap.CharacterFactory.get(4, 'Dark'), iv_value: abap.Classes['ZCL_ABAPGIT_SETTINGS'].c_ui_theme.get().dark})).get().option({iv_label: abap.CharacterFactory.get(6, 'Belize'), iv_value: abap.Classes['ZCL_ABAPGIT_SETTINGS'].c_ui_theme.get().belize})).get().option({iv_label: abap.CharacterFactory.get(19, 'Synced with SAP GUI'), iv_value: abap.Classes['ZCL_ABAPGIT_SETTINGS'].c_ui_theme.get().synced_with_gui})).get().radio({iv_name: zcl_abapgit_gui_page_sett_pers.c_id.get().icon_scaling, iv_default_value: abap.CharacterFactory.get(1, ''), iv_label: abap.CharacterFactory.get(19, 'Icon Scaling (HDPI)'), iv_hint: abap.CharacterFactory.get(42, 'Adjust size of icons for High DPI displays')})).get().option({iv_label: abap.CharacterFactory.get(10, 'No scaling'), iv_value: abap.CharacterFactory.get(1, '')})).get().option({iv_label: abap.CharacterFactory.get(5, 'Small'), iv_value: abap.Classes['ZCL_ABAPGIT_SETTINGS'].c_icon_scaling.get().small})).get().option({iv_label: abap.CharacterFactory.get(5, 'Large'), iv_value: abap.Classes['ZCL_ABAPGIT_SETTINGS'].c_icon_scaling.get().large})).get().number({iv_name: zcl_abapgit_gui_page_sett_pers.c_id.get().max_lines, iv_label: abap.CharacterFactory.get(9, 'List Size'), iv_hint: abap.CharacterFactory.get(42, 'Maximum number of objects listed (0 = All)'), iv_min: abap.IntegerFactory.get(0), iv_max: new abap.types.Integer().set(10000)})).get().textarea({iv_name: zcl_abapgit_gui_page_sett_pers.c_id.get().label_colors, iv_rows: abap.IntegerFactory.get(3), iv_label: abap.operators.concat(new abap.types.String().set(`Repo label colors `),(await this.#render_repo_labels_help_hint()))})).get().start_group({iv_name: zcl_abapgit_gui_page_sett_pers.c_id.get().interaction, iv_label: abap.CharacterFactory.get(11, 'Interaction')})).get().checkbox({iv_name: zcl_abapgit_gui_page_sett_pers.c_id.get().activate_wo_popup, iv_label: abap.CharacterFactory.get(30, 'Activate Objects Without Popup'), iv_hint: abap.CharacterFactory.get(53, 'Activates objects automatically without showing popup')})).get().checkbox({iv_name: zcl_abapgit_gui_page_sett_pers.c_id.get().adt_jump_enabled, iv_label: abap.CharacterFactory.get(52, 'Enable Jump to ABAP Development Tools (If Available)'), iv_hint: abap.CharacterFactory.get(42, 'Recommended to check, if you are using ADT')})).get().checkbox({iv_name: zcl_abapgit_gui_page_sett_pers.c_id.get().link_hints_enabled, iv_label: abap.CharacterFactory.get(29, 'Enable Vimium-like Link Hints'), iv_hint: abap.CharacterFactory.get(86, 'When you hit the key, abapGit will identify clickable things and put a label beside it')})).get().text({iv_name: zcl_abapgit_gui_page_sett_pers.c_id.get().link_hint_key, iv_label: abap.CharacterFactory.get(26, 'Key to Activate Link Hints'), iv_min: abap.IntegerFactory.get(0), iv_max: abap.IntegerFactory.get(1)})).get().start_group({iv_name: zcl_abapgit_gui_page_sett_pers.c_id.get().resources, iv_label: abap.CharacterFactory.get(16, 'System Resources')})).get().checkbox({iv_name: zcl_abapgit_gui_page_sett_pers.c_id.get().parallel_proc_disabled, iv_label: abap.CharacterFactory.get(27, 'Disable Parallel Processing'), iv_hint: abap.CharacterFactory.get(71, 'If disabled, abapGit will use only a single thread to serialize objects')})).get().start_group({iv_name: zcl_abapgit_gui_page_sett_pers.c_id.get().git_default_values, iv_label: abap.CharacterFactory.get(18, 'Git Default Values')})).get().text({iv_name: zcl_abapgit_gui_page_sett_pers.c_id.get().default_git_uname, iv_label: abap.CharacterFactory.get(12, 'Default User')})).get().text({iv_name: zcl_abapgit_gui_page_sett_pers.c_id.get().default_git_email, iv_label: abap.CharacterFactory.get(13, 'Default Email')})).get().command({iv_label: abap.CharacterFactory.get(13, 'Save Settings'), iv_cmd_type: abap.Classes['ZIF_ABAPGIT_HTML_FORM'].zif_abapgit_html_form$c_cmd_type.get().input_main, iv_action: zcl_abapgit_gui_page_sett_pers.c_event.get().save})).get().command({iv_label: abap.CharacterFactory.get(4, 'Back'), iv_action: abap.Classes['ZIF_ABAPGIT_DEFINITIONS'].zif_abapgit_definitions$c_action.get().go_back});
    return ro_form;
  }
  async #read_settings() {
    let ro_form_data = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_STRING_MAP", RTTIName: "\\CLASS=ZCL_ABAPGIT_STRING_MAP"});
    this.#mo_settings.set((await (await abap.Classes['ZCL_ABAPGIT_PERSIST_FACTORY'].get_settings()).get().zif_abapgit_persist_settings$read()));
    this.#ms_settings.set((await this.#mo_settings.get().get_user_settings()));
    ro_form_data.set(await (new abap.Classes['ZCL_ABAPGIT_STRING_MAP']()).constructor_());
    await ro_form_data.get().set({iv_key: zcl_abapgit_gui_page_sett_pers.c_id.get().show_default_repo, iv_val: abap.builtin.boolc(abap.compare.eq(this.#ms_settings.get().show_default_repo, abap.builtin.abap_true))});
    await ro_form_data.get().set({iv_key: zcl_abapgit_gui_page_sett_pers.c_id.get().ui_theme, iv_val: this.#ms_settings.get().ui_theme});
    await ro_form_data.get().set({iv_key: zcl_abapgit_gui_page_sett_pers.c_id.get().icon_scaling, iv_val: new abap.types.String().set(`${abap.templateFormatting(this.#ms_settings.get().icon_scaling)}`)});
    await ro_form_data.get().set({iv_key: zcl_abapgit_gui_page_sett_pers.c_id.get().max_lines, iv_val: new abap.types.String().set(`${abap.templateFormatting(this.#ms_settings.get().max_lines)}`)});
    await ro_form_data.get().set({iv_key: zcl_abapgit_gui_page_sett_pers.c_id.get().label_colors, iv_val: this.#ms_settings.get().label_colors});
    await ro_form_data.get().set({iv_key: zcl_abapgit_gui_page_sett_pers.c_id.get().activate_wo_popup, iv_val: abap.builtin.boolc(abap.compare.eq(this.#ms_settings.get().activate_wo_popup, abap.builtin.abap_true))});
    await ro_form_data.get().set({iv_key: zcl_abapgit_gui_page_sett_pers.c_id.get().adt_jump_enabled, iv_val: abap.builtin.boolc(abap.compare.eq(this.#ms_settings.get().adt_jump_enabled, abap.builtin.abap_true))});
    await ro_form_data.get().set({iv_key: zcl_abapgit_gui_page_sett_pers.c_id.get().link_hints_enabled, iv_val: abap.builtin.boolc(abap.compare.eq(this.#ms_settings.get().link_hints_enabled, abap.builtin.abap_true))});
    await ro_form_data.get().set({iv_key: zcl_abapgit_gui_page_sett_pers.c_id.get().link_hint_key, iv_val: new abap.types.String().set(`${abap.templateFormatting(this.#ms_settings.get().link_hint_key)}`)});
    await ro_form_data.get().set({iv_key: zcl_abapgit_gui_page_sett_pers.c_id.get().parallel_proc_disabled, iv_val: abap.builtin.boolc(abap.compare.eq(this.#ms_settings.get().parallel_proc_disabled, abap.builtin.abap_true))});
    await ro_form_data.get().set({iv_key: zcl_abapgit_gui_page_sett_pers.c_id.get().default_git_uname, iv_val: new abap.types.String().set(`${abap.templateFormatting(this.#ms_settings.get().default_git_uname)}`)});
    await ro_form_data.get().set({iv_key: zcl_abapgit_gui_page_sett_pers.c_id.get().default_git_email, iv_val: new abap.types.String().set(`${abap.templateFormatting(this.#ms_settings.get().default_git_email)}`)});
    return ro_form_data;
  }
  async #render_repo_labels_help_hint() {
    let rv_html = new abap.types.String({qualifiedName: "STRING"});
    let lt_fragments = abap.types.TableFactory.construct(new abap.types.String({qualifiedName: "STRING"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"isUnique":false,"type":"STANDARD","keyFields":[],"name":"primary_key"},"secondary":[]}, "STRING_TABLE");
    let lt_labels = abap.types.TableFactory.construct(new abap.types.String({qualifiedName: "STRING"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"isUnique":false,"type":"STANDARD","keyFields":[],"name":"primary_key"},"secondary":[]}, "STRING_TABLE");
    let lv_l = new abap.types.String({qualifiedName: "STRING"});
    let lo_colors = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_STRING_MAP", RTTIName: "\\CLASS=ZCL_ABAPGIT_STRING_MAP"});
    abap.statements.append({source: new abap.types.String().set(`<p style="margin-bottom: 0.3em">`), target: lt_fragments});
    abap.statements.append({source: new abap.types.String().set(`Comma-separated list of <code>label:color</code> pairs.`), target: lt_fragments});
    abap.statements.append({source: new abap.types.String().set(` <code>color</code> part can be either a pre-defined style (see below), or`), target: lt_fragments});
    abap.statements.append({source: new abap.types.String().set(` <code>#fg/bg/border</code> styles, where <code>fg</code>, `), target: lt_fragments});
    abap.statements.append({source: new abap.types.String().set(` <code>bg</code>, and <code>border</code> are RGB color codes (3 or 6 long).`), target: lt_fragments});
    abap.statements.append({source: new abap.types.String().set(` You can also specify just <code>fg</code>, <code>bg</code>, or`), target: lt_fragments});
    abap.statements.append({source: new abap.types.String().set(` <code>border</code> (defaults will be used for missing parts).`), target: lt_fragments});
    abap.statements.append({source: new abap.types.String().set(` E.g. <code>utils:brown, work:#ff0000/880000, client X:#ddd, client Y:#/333</code>`), target: lt_fragments});
    abap.statements.append({source: new abap.types.String().set(`<br>Available styles:`), target: lt_fragments});
    abap.statements.append({source: new abap.types.String().set(`</p>`), target: lt_fragments});
    abap.statements.append({source: new abap.types.String().set(`white`), target: lt_labels});
    abap.statements.append({source: new abap.types.String().set(`white-b`), target: lt_labels});
    abap.statements.append({source: new abap.types.String().set(`white-r`), target: lt_labels});
    abap.statements.append({source: new abap.types.String().set(`grey`), target: lt_labels});
    abap.statements.append({source: new abap.types.String().set(`dark-w`), target: lt_labels});
    abap.statements.append({source: new abap.types.String().set(`dark-y`), target: lt_labels});
    abap.statements.append({source: new abap.types.String().set(`dark-r`), target: lt_labels});
    abap.statements.append({source: new abap.types.String().set(`dark-b`), target: lt_labels});
    abap.statements.append({source: new abap.types.String().set(`lightblue`), target: lt_labels});
    abap.statements.append({source: new abap.types.String().set(`darkblue`), target: lt_labels});
    abap.statements.append({source: new abap.types.String().set(`lightgreen`), target: lt_labels});
    abap.statements.append({source: new abap.types.String().set(`darkgreen`), target: lt_labels});
    abap.statements.append({source: new abap.types.String().set(`lightred`), target: lt_labels});
    abap.statements.append({source: new abap.types.String().set(`darkred`), target: lt_labels});
    abap.statements.append({source: new abap.types.String().set(`yellow`), target: lt_labels});
    abap.statements.append({source: new abap.types.String().set(`darkyellow`), target: lt_labels});
    abap.statements.append({source: new abap.types.String().set(`orange`), target: lt_labels});
    abap.statements.append({source: new abap.types.String().set(`brown`), target: lt_labels});
    abap.statements.append({source: new abap.types.String().set(`pink`), target: lt_labels});
    abap.statements.append({source: new abap.types.String().set(`teal`), target: lt_labels});
    abap.statements.append({source: new abap.types.String().set(`darkviolet`), target: lt_labels});
    lo_colors.set((await abap.Classes['ZCL_ABAPGIT_STRING_MAP'].create()));
    for await (const unique908 of abap.statements.loop(lt_labels)) {
      lv_l.set(unique908);
      try {
        await lo_colors.get().set({iv_key: lv_l, iv_val: lv_l});
      } catch (e) {
        if ((abap.Classes['ZCX_ABAPGIT_EXCEPTION'] && e instanceof abap.Classes['ZCX_ABAPGIT_EXCEPTION'])) {
        } else {
          throw e;
        }
      }
    }
    abap.statements.append({source: (await abap.Classes['ZCL_ABAPGIT_GUI_CHUNK_LIB'].render_label_list({it_labels: lt_labels, io_label_colors: lo_colors})), target: lt_fragments});
    abap.statements.append({source: new abap.types.String().set(`<p style="margin-top: 0.3em">see also <code>rl-*</code> styles in common.css</p>`), target: lt_fragments});
    rv_html.set((await abap.Classes['ZCL_ABAPGIT_GUI_CHUNK_LIB'].render_help_hint({iv_text_to_wrap: abap.builtin.concat_lines_of({table: lt_fragments})})));
    return rv_html;
  }
  async #save_settings() {
    let li_persistence = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_PERSIST_SETTINGS", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_PERSIST_SETTINGS"});
    this.#ms_settings.get().show_default_repo.set((await this.#mo_form_data.get().get({iv_key: zcl_abapgit_gui_page_sett_pers.c_id.get().show_default_repo})));
    this.#ms_settings.get().ui_theme.set((await this.#mo_form_data.get().get({iv_key: zcl_abapgit_gui_page_sett_pers.c_id.get().ui_theme})));
    this.#ms_settings.get().icon_scaling.set((await this.#mo_form_data.get().get({iv_key: zcl_abapgit_gui_page_sett_pers.c_id.get().icon_scaling})));
    this.#ms_settings.get().max_lines.set((await this.#mo_form_data.get().get({iv_key: zcl_abapgit_gui_page_sett_pers.c_id.get().max_lines})));
    this.#ms_settings.get().label_colors.set((await abap.Classes['ZCL_ABAPGIT_REPO_LABELS'].normalize_colors({iv_config: (await this.#mo_form_data.get().get({iv_key: zcl_abapgit_gui_page_sett_pers.c_id.get().label_colors}))})));
    this.#ms_settings.get().activate_wo_popup.set((await this.#mo_form_data.get().get({iv_key: zcl_abapgit_gui_page_sett_pers.c_id.get().activate_wo_popup})));
    this.#ms_settings.get().adt_jump_enabled.set((await this.#mo_form_data.get().get({iv_key: zcl_abapgit_gui_page_sett_pers.c_id.get().adt_jump_enabled})));
    this.#ms_settings.get().link_hints_enabled.set((await this.#mo_form_data.get().get({iv_key: zcl_abapgit_gui_page_sett_pers.c_id.get().link_hints_enabled})));
    this.#ms_settings.get().link_hint_key.set((await this.#mo_form_data.get().get({iv_key: zcl_abapgit_gui_page_sett_pers.c_id.get().link_hint_key})));
    this.#ms_settings.get().parallel_proc_disabled.set((await this.#mo_form_data.get().get({iv_key: zcl_abapgit_gui_page_sett_pers.c_id.get().parallel_proc_disabled})));
    this.#ms_settings.get().default_git_uname.set((await this.#mo_form_data.get().get({iv_key: zcl_abapgit_gui_page_sett_pers.c_id.get().default_git_uname})));
    this.#ms_settings.get().default_git_email.set((await this.#mo_form_data.get().get({iv_key: zcl_abapgit_gui_page_sett_pers.c_id.get().default_git_email})));
    await this.#mo_settings.get().set_user_settings({is_user_settings: this.#ms_settings});
    li_persistence.set((await abap.Classes['ZCL_ABAPGIT_PERSIST_FACTORY'].get_settings()));
    await li_persistence.get().zif_abapgit_persist_settings$modify({io_settings: this.#mo_settings});
    abap.statements.commit();
    await abap.statements.message({text: abap.CharacterFactory.get(27, 'Settings successfully saved'), type: abap.CharacterFactory.get(1, 'S')});
    this.#mo_form_data.set((await this.#read_settings()));
  }
  async #validate_form(INPUT) {
    let ro_validation_log = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_STRING_MAP", RTTIName: "\\CLASS=ZCL_ABAPGIT_STRING_MAP"});
    let io_form_data = INPUT?.io_form_data;
    if (io_form_data?.getQualifiedName === undefined || io_form_data.getQualifiedName() !== "ZCL_ABAPGIT_STRING_MAP") { io_form_data = undefined; }
    if (io_form_data === undefined) { io_form_data = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_STRING_MAP", RTTIName: "\\CLASS=ZCL_ABAPGIT_STRING_MAP"}).set(INPUT.io_form_data); }
    let lx_error = new abap.types.ABAPObject({qualifiedName: "ZCX_ABAPGIT_EXCEPTION", RTTIName: "\\CLASS=ZCX_ABAPGIT_EXCEPTION"});
    ro_validation_log.set((await (await abap.Classes['ZCL_ABAPGIT_HTML_FORM_UTILS'].create({io_form: this.#mo_form})).get().validate({io_form_data: io_form_data})));
    try {
      await abap.Classes['ZCL_ABAPGIT_REPO_LABELS'].validate_colors({iv_config: (await io_form_data.get().get({iv_key: zcl_abapgit_gui_page_sett_pers.c_id.get().label_colors}))});
    } catch (e) {
      if ((abap.Classes['ZCX_ABAPGIT_EXCEPTION'] && e instanceof abap.Classes['ZCX_ABAPGIT_EXCEPTION'])) {
        lx_error.set(e);
        await ro_validation_log.get().set({iv_key: zcl_abapgit_gui_page_sett_pers.c_id.get().label_colors, iv_val: (await lx_error.get().if_message$get_text())});
      } else {
        throw e;
      }
    }
    return ro_validation_log;
  }
  async zif_abapgit_gui_event_handler$on_event(INPUT) {
    let rs_handled = new abap.types.Structure({
    "page": new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_GUI_RENDERABLE", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_GUI_RENDERABLE"}),
    "state": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_GUI_EVENT_HANDLER=>TY_HANDLING_RESULT-STATE"})}, "zif_abapgit_gui_event_handler=>ty_handling_result", undefined, {}, {});
    let ii_event = INPUT?.ii_event;
    if (ii_event?.getQualifiedName === undefined || ii_event.getQualifiedName() !== "ZIF_ABAPGIT_GUI_EVENT") { ii_event = undefined; }
    if (ii_event === undefined) { ii_event = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_GUI_EVENT", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_GUI_EVENT"}).set(INPUT.ii_event); }
    await this.#mo_form_data.get().merge({io_string_map: (await (await abap.Classes['ZCL_ABAPGIT_HTML_FORM_UTILS'].create({io_form: this.#mo_form})).get().normalize({io_form_data: (await ii_event.get().zif_abapgit_gui_event$form_data())}))});
    let unique909 = ii_event.get().zif_abapgit_gui_event$mv_action;
    if (abap.compare.eq(unique909, abap.Classes['ZIF_ABAPGIT_DEFINITIONS'].zif_abapgit_definitions$c_action.get().go_back)) {
      rs_handled.get().state.set((await (await abap.Classes['ZCL_ABAPGIT_HTML_FORM_UTILS'].create({io_form: this.#mo_form})).get().exit({io_form_data: this.#mo_form_data, io_compare_with: (await this.#read_settings())})));
    } else if (abap.compare.eq(unique909, zcl_abapgit_gui_page_sett_pers.c_event.get().save)) {
      this.#mo_validation_log.set((await this.#validate_form({io_form_data: this.#mo_form_data})));
      if (abap.compare.eq((await this.#mo_validation_log.get().is_empty()), abap.builtin.abap_true)) {
        await this.#save_settings();
      }
      rs_handled.get().state.set(abap.Classes['ZCL_ABAPGIT_GUI'].c_event_state.get().re_render);
    }
    return rs_handled;
  }
  async zif_abapgit_gui_renderable$render() {
    let ri_html = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_HTML", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_HTML"});
    await this.register_handlers();
    ri_html.set(await (new abap.Classes['ZCL_ABAPGIT_HTML']()).constructor_());
    await ri_html.get().zif_abapgit_html$add({ig_chunk: abap.CharacterFactory.get(28, '<div class="form-container">')});
    await ri_html.get().zif_abapgit_html$add({ig_chunk: (await this.#mo_form.get().render({io_values: this.#mo_form_data, io_validation_log: this.#mo_validation_log}))});
    await ri_html.get().zif_abapgit_html$add({ig_chunk: abap.CharacterFactory.get(6, '</div>')});
    return ri_html;
  }
}
abap.Classes['ZCL_ABAPGIT_GUI_PAGE_SETT_PERS'] = zcl_abapgit_gui_page_sett_pers;
zcl_abapgit_gui_page_sett_pers.c_id = new abap.types.Structure({
"startup": new abap.types.String({qualifiedName: "STRING"}),
"show_default_repo": new abap.types.String({qualifiedName: "STRING"}),
"ui": new abap.types.String({qualifiedName: "STRING"}),
"ui_theme": new abap.types.String({qualifiedName: "STRING"}),
"icon_scaling": new abap.types.String({qualifiedName: "STRING"}),
"max_lines": new abap.types.String({qualifiedName: "STRING"}),
"interaction": new abap.types.String({qualifiedName: "STRING"}),
"adt_jump_enabled": new abap.types.String({qualifiedName: "STRING"}),
"link_hints_enabled": new abap.types.String({qualifiedName: "STRING"}),
"link_hint_key": new abap.types.String({qualifiedName: "STRING"}),
"hotkeys": new abap.types.String({qualifiedName: "STRING"}),
"resources": new abap.types.String({qualifiedName: "STRING"}),
"parallel_proc_disabled": new abap.types.String({qualifiedName: "STRING"}),
"hide_sapgui_hint": new abap.types.String({qualifiedName: "STRING"}),
"activate_wo_popup": new abap.types.String({qualifiedName: "STRING"}),
"label_colors": new abap.types.String({qualifiedName: "STRING"}),
"git_default_values": new abap.types.String({qualifiedName: "STRING"}),
"default_git_uname": new abap.types.String({qualifiedName: "STRING"}),
"default_git_email": new abap.types.String({qualifiedName: "STRING"})}, undefined, undefined, {}, {});
zcl_abapgit_gui_page_sett_pers.c_id.get().startup.set('startup');
zcl_abapgit_gui_page_sett_pers.c_id.get().show_default_repo.set('show_default_repo');
zcl_abapgit_gui_page_sett_pers.c_id.get().ui.set('ui');
zcl_abapgit_gui_page_sett_pers.c_id.get().ui_theme.set('ui_theme');
zcl_abapgit_gui_page_sett_pers.c_id.get().icon_scaling.set('icon_scaling');
zcl_abapgit_gui_page_sett_pers.c_id.get().max_lines.set('max_lines');
zcl_abapgit_gui_page_sett_pers.c_id.get().interaction.set('interaction');
zcl_abapgit_gui_page_sett_pers.c_id.get().adt_jump_enabled.set('adt_jump_enabled');
zcl_abapgit_gui_page_sett_pers.c_id.get().link_hints_enabled.set('link_hints_enabled');
zcl_abapgit_gui_page_sett_pers.c_id.get().link_hint_key.set('link_hint_key');
zcl_abapgit_gui_page_sett_pers.c_id.get().hotkeys.set('hotkeys');
zcl_abapgit_gui_page_sett_pers.c_id.get().resources.set('resources');
zcl_abapgit_gui_page_sett_pers.c_id.get().parallel_proc_disabled.set('parallel_proc_disabled');
zcl_abapgit_gui_page_sett_pers.c_id.get().hide_sapgui_hint.set('hide_sapgui_hint');
zcl_abapgit_gui_page_sett_pers.c_id.get().activate_wo_popup.set('activate_wo_popup');
zcl_abapgit_gui_page_sett_pers.c_id.get().label_colors.set('label_colors');
zcl_abapgit_gui_page_sett_pers.c_id.get().git_default_values.set('git_default_values');
zcl_abapgit_gui_page_sett_pers.c_id.get().default_git_uname.set('default_git_uname');
zcl_abapgit_gui_page_sett_pers.c_id.get().default_git_email.set('default_git_email');
zcl_abapgit_gui_page_sett_pers.c_event = new abap.types.Structure({
"save": new abap.types.String({qualifiedName: "STRING"})}, undefined, undefined, {}, {});
zcl_abapgit_gui_page_sett_pers.c_event.get().save.set('save');
export {zcl_abapgit_gui_page_sett_pers};