All files / output zcl_abapgit_gui_event.clas.mjs

85.3% Statements 238/279
78.04% Branches 32/41
29.09% Functions 16/55
85.3% Lines 238/279

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 2791x 1x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x   1x 1x   1x 1x   1x 1x   1x 1x 1x   1x 1x 1x 1x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x     5x 1x 1x 1x 1x 1x                     1x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x     5x 5x 5x 8x 8x 8x 8x     8x 8x 8x 8x 8x 6x 6x 6x 8x 8x 5x     5x 7x 7x 7x 7x 7x 7x 7x 7x 17x 17x 17x 7x 5x     5x                     5x 4x 4x 5x 19x 19x 19x 19x 19x 19x 19x 19x 19x 19x 19x 19x 19x 19x 34x 34x 34x 34x 34x 3x 3x 31x 31x 19x 7x 7x 19x 19x 5x     5x 7x 7x 7x 7x 7x 7x 7x 5x 4x 4x 5x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 1x 6x 5x 5x 6x 6x 5x     5x 6x 6x 6x 6x 6x 6x 6x 6x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 6x 5x     5x 68x 68x 68x 68x 68x 68x 68x 68x 68x 68x 68x 68x 68x 68x 5x 4x 4x 4x 4x 4x 4x 4x 4x 5x 4x 4x 4x 4x 4x 4x 4x 4x 5x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x
const {cx_root} = await import("./cx_root.clas.mjs");
// zcl_abapgit_gui_event.clas.abap
class zcl_abapgit_gui_event {
  static INTERNAL_TYPE = 'CLAS';
  static INTERNAL_NAME = 'ZCL_ABAPGIT_GUI_EVENT';
  static IMPLEMENTED_INTERFACES = ["ZIF_ABAPGIT_GUI_EVENT"];
  static ATTRIBUTES = {"GV_NON_BREAKING_SPACE": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "visibility": "I", "is_constant": " ", "is_class": "X"},
  "MO_QUERY": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_STRING_MAP", RTTIName: "\\CLASS=ZCL_ABAPGIT_STRING_MAP"});}, "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": " "},
  "ZIF_ABAPGIT_GUI_EVENT~MV_ACTION": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "visibility": "U", "is_constant": " ", "is_class": " "},
  "ZIF_ABAPGIT_GUI_EVENT~MV_GETDATA": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "visibility": "U", "is_constant": " ", "is_class": " "},
  "ZIF_ABAPGIT_GUI_EVENT~MT_POSTDATA": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Character(256, {"qualifiedName":"zif_abapgit_html_viewer=>ty_char256"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_html_viewer=>ty_post_data");}, "visibility": "U", "is_constant": " ", "is_class": " "},
  "ZIF_ABAPGIT_GUI_EVENT~MI_GUI_SERVICES": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_GUI_SERVICES", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_GUI_SERVICES"});}, "visibility": "U", "is_constant": " ", "is_class": " "},
  "ZIF_ABAPGIT_GUI_EVENT~MV_CURRENT_PAGE_NAME": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "visibility": "U", "is_constant": " ", "is_class": " "}};
  static METHODS = {"FIELDS_TO_MAP": {"visibility": "I", "parameters": {"RO_STRING_MAP": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_STRING_MAP", RTTIName: "\\CLASS=ZCL_ABAPGIT_STRING_MAP"});}, "is_optional": " "}, "IT_FIELDS": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Structure({
  "name": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GUI_EVENT=>TY_NAME_VALUE-NAME"}),
  "value": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GUI_EVENT=>TY_NAME_VALUE-VALUE"})}, "zcl_abapgit_gui_event=>ty_name_value", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zcl_abapgit_gui_event=>ty_name_value_tt");}, "is_optional": " "}}},
  "PARSE_POST_FORM_DATA": {"visibility": "I", "parameters": {"RT_FIELDS": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Structure({
  "name": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GUI_EVENT=>TY_NAME_VALUE-NAME"}),
  "value": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GUI_EVENT=>TY_NAME_VALUE-VALUE"})}, "zcl_abapgit_gui_event=>ty_name_value", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zcl_abapgit_gui_event=>ty_name_value_tt");}, "is_optional": " "}, "IT_POST_DATA": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Character(256, {"qualifiedName":"zif_abapgit_html_viewer=>ty_char256"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_html_viewer=>ty_post_data");}, "is_optional": " "}, "IV_UPPER_CASED": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " "}}},
  "PARSE_FIELDS": {"visibility": "I", "parameters": {"RT_FIELDS": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Structure({
  "name": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GUI_EVENT=>TY_NAME_VALUE-NAME"}),
  "value": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GUI_EVENT=>TY_NAME_VALUE-VALUE"})}, "zcl_abapgit_gui_event=>ty_name_value", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zcl_abapgit_gui_event=>ty_name_value_tt");}, "is_optional": " "}, "IV_STRING": {"type": () => {return new abap.types.Character();}, "is_optional": " "}, "IV_UPPER_CASED": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " "}}},
  "PARSE_FIELDS_UPPER_CASE_NAME": {"visibility": "I", "parameters": {"RT_FIELDS": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Structure({
  "name": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GUI_EVENT=>TY_NAME_VALUE-NAME"}),
  "value": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GUI_EVENT=>TY_NAME_VALUE-VALUE"})}, "zcl_abapgit_gui_event=>ty_name_value", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zcl_abapgit_gui_event=>ty_name_value_tt");}, "is_optional": " "}, "IV_STRING": {"type": () => {return new abap.types.Character();}, "is_optional": " "}}},
  "TRANSLATE_POSTDATA": {"visibility": "I", "parameters": {"RV_STRING": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}, "IT_POSTDATA": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Character(256, {"qualifiedName":"zif_abapgit_html_viewer=>ty_char256"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_html_viewer=>ty_post_data");}, "is_optional": " "}}},
  "FIELD_KEYS_TO_UPPER": {"visibility": "I", "parameters": {"CT_FIELDS": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Structure({
  "name": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GUI_EVENT=>TY_NAME_VALUE-NAME"}),
  "value": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GUI_EVENT=>TY_NAME_VALUE-VALUE"})}, "zcl_abapgit_gui_event=>ty_name_value", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zcl_abapgit_gui_event=>ty_name_value_tt");}, "is_optional": " "}}},
  "UNESCAPE": {"visibility": "I", "parameters": {"RV_STRING": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}, "IV_STRING": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}}},
  "CLASS_CONSTRUCTOR": {"visibility": "U", "parameters": {}},
  "NEW": {"visibility": "U", "parameters": {"RO_INSTANCE": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_GUI_EVENT", RTTIName: "\\CLASS=ZCL_ABAPGIT_GUI_EVENT"});}, "is_optional": " "}, "II_GUI_SERVICES": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_GUI_SERVICES", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_GUI_SERVICES"});}, "is_optional": " "}, "IV_ACTION": {"type": () => {return new abap.types.Character();}, "is_optional": " "}, "IV_GETDATA": {"type": () => {return new abap.types.Character();}, "is_optional": " "}, "IT_POSTDATA": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Character(256, {"qualifiedName":"zif_abapgit_html_viewer=>ty_char256"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_html_viewer=>ty_post_data");}, "is_optional": " "}}},
  "CONSTRUCTOR": {"visibility": "U", "parameters": {"II_GUI_SERVICES": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_GUI_SERVICES", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_GUI_SERVICES"});}, "is_optional": " "}, "IV_ACTION": {"type": () => {return new abap.types.Character();}, "is_optional": " "}, "IV_GETDATA": {"type": () => {return new abap.types.Character();}, "is_optional": " "}, "IT_POSTDATA": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Character(256, {"qualifiedName":"zif_abapgit_html_viewer=>ty_char256"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_html_viewer=>ty_post_data");}, "is_optional": " "}}}};
  #gv_non_breaking_space;
  #mo_query;
  #mo_form_data;
  constructor() {
    this.me = new abap.types.ABAPObject();
    this.me.set(this);
    this.INTERNAL_ID = abap.internalIdCounter++;
    this.FRIENDS_ACCESS_INSTANCE = {
      "fields_to_map": this.#fields_to_map.bind(this),
    };
    this.gv_non_breaking_space = zcl_abapgit_gui_event.gv_non_breaking_space;
    this.#mo_query = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_STRING_MAP", RTTIName: "\\CLASS=ZCL_ABAPGIT_STRING_MAP"});
    this.FRIENDS_ACCESS_INSTANCE["mo_query"] = this.#mo_query;
    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;
    if (this.zif_abapgit_gui_event$mv_action === undefined) this.zif_abapgit_gui_event$mv_action = new abap.types.String({qualifiedName: "STRING"});
    if (this.zif_abapgit_gui_event$mv_getdata === undefined) this.zif_abapgit_gui_event$mv_getdata = new abap.types.String({qualifiedName: "STRING"});
    if (this.zif_abapgit_gui_event$mt_postdata === undefined) this.zif_abapgit_gui_event$mt_postdata = abap.types.TableFactory.construct(new abap.types.Character(256, {"qualifiedName":"zif_abapgit_html_viewer=>ty_char256"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_html_viewer=>ty_post_data");
    if (this.zif_abapgit_gui_event$mi_gui_services === undefined) this.zif_abapgit_gui_event$mi_gui_services = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_GUI_SERVICES", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_GUI_SERVICES"});
    if (this.zif_abapgit_gui_event$mv_current_page_name === undefined) this.zif_abapgit_gui_event$mv_current_page_name = new abap.types.String({qualifiedName: "STRING"});
  }
  async class_constructor() {
    return zcl_abapgit_gui_event.class_constructor();
  }
  static async class_constructor() {
    let lc_nbsp = new abap.types.XString({qualifiedName: "XSTRING"});
    lc_nbsp.set('C2A0');
    try {
      zcl_abapgit_gui_event.gv_non_breaking_space.set((await abap.Classes['ZCL_ABAPGIT_CONVERT'].xstring_to_string_utf8({iv_data: lc_nbsp})));
    } catch (e) {
      if ((abap.Classes['ZCX_ABAPGIT_EXCEPTION'] && e instanceof abap.Classes['ZCX_ABAPGIT_EXCEPTION'])) {
        if (abap.compare.lt(abap.Classes['CL_ABAP_CHAR_UTILITIES'].charsize, abap.IntegerFactory.get(2))) {
          zcl_abapgit_gui_event.gv_non_breaking_space.set(new abap.types.String().set(`X'A0'`));
        } else {
          abap.statements.assert(abap.compare.eq(abap.IntegerFactory.get(0), abap.IntegerFactory.get(1)));
        }
      } else {
        throw e;
      }
    }
  }
  async constructor_(INPUT) {
    let ii_gui_services = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_GUI_SERVICES", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_GUI_SERVICES"});
    if (INPUT && INPUT.ii_gui_services) {ii_gui_services.set(INPUT.ii_gui_services);}
    let iv_action = INPUT?.iv_action;
    let iv_getdata = INPUT?.iv_getdata || new abap.types.Character();
    let it_postdata = abap.types.TableFactory.construct(new abap.types.Character(256, {"qualifiedName":"zif_abapgit_html_viewer=>ty_char256"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_html_viewer=>ty_post_data");
    if (INPUT && INPUT.it_postdata) {it_postdata.set(INPUT.it_postdata);}
    this.zif_abapgit_gui_event$mi_gui_services.set(ii_gui_services);
    this.zif_abapgit_gui_event$mv_action.set(abap.builtin.to_lower({val: iv_action}));
    this.zif_abapgit_gui_event$mv_getdata.set(iv_getdata);
    this.zif_abapgit_gui_event$mt_postdata.set(it_postdata);
    if (abap.compare.initial(ii_gui_services) === false) {
      this.zif_abapgit_gui_event$mv_current_page_name.set((await ii_gui_services.get().zif_abapgit_gui_services$get_current_page_name()));
    }
    return this;
  }
  async #fields_to_map(INPUT) {
    let ro_string_map = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_STRING_MAP", RTTIName: "\\CLASS=ZCL_ABAPGIT_STRING_MAP"});
    let it_fields = INPUT?.it_fields;
    if (it_fields?.getQualifiedName === undefined || it_fields.getQualifiedName() !== "ZCL_ABAPGIT_GUI_EVENT=>TY_NAME_VALUE_TT") { it_fields = undefined; }
    if (it_fields === undefined) { it_fields = abap.types.TableFactory.construct(new abap.types.Structure({
    "name": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GUI_EVENT=>TY_NAME_VALUE-NAME"}),
    "value": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GUI_EVENT=>TY_NAME_VALUE-VALUE"})}, "zcl_abapgit_gui_event=>ty_name_value", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zcl_abapgit_gui_event=>ty_name_value_tt").set(INPUT.it_fields); }
    let fs_ls_field_ = new abap.types.FieldSymbol(new abap.types.Structure({
    "name": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GUI_EVENT=>TY_NAME_VALUE-NAME"}),
    "value": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GUI_EVENT=>TY_NAME_VALUE-VALUE"})}, "zcl_abapgit_gui_event=>ty_name_value", undefined, {}, {}));
    ro_string_map.set(await (new abap.Classes['ZCL_ABAPGIT_STRING_MAP']()).constructor_({iv_case_insensitive: abap.builtin.abap_true}));
    for await (const unique679 of abap.statements.loop(it_fields)) {
      fs_ls_field_.assign(unique679);
      await ro_string_map.get().set({iv_key: fs_ls_field_.get().name, iv_val: fs_ls_field_.get().value});
    }
    return ro_string_map;
  }
  async field_keys_to_upper(INPUT) {
    return zcl_abapgit_gui_event.field_keys_to_upper(INPUT);
  }
  static async field_keys_to_upper(INPUT) {
    let ct_fields = abap.types.TableFactory.construct(new abap.types.Structure({
    "name": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GUI_EVENT=>TY_NAME_VALUE-NAME"}),
    "value": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GUI_EVENT=>TY_NAME_VALUE-VALUE"})}, "zcl_abapgit_gui_event=>ty_name_value", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zcl_abapgit_gui_event=>ty_name_value_tt");
    if (INPUT && INPUT.ct_fields) {ct_fields = INPUT.ct_fields;}
    let fs_ls_field_ = new abap.types.FieldSymbol(new abap.types.Structure({
    "name": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GUI_EVENT=>TY_NAME_VALUE-NAME"}),
    "value": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GUI_EVENT=>TY_NAME_VALUE-VALUE"})}, "zcl_abapgit_gui_event=>ty_name_value", undefined, {}, {}));
    for await (const unique680 of abap.statements.loop(ct_fields)) {
      fs_ls_field_.assign(unique680);
      fs_ls_field_.get().name.set(abap.builtin.to_upper({val: fs_ls_field_.get().name}));
    }
  }
  async new(INPUT) {
    return zcl_abapgit_gui_event.new(INPUT);
  }
  static async new(INPUT) {
    let ro_instance = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_GUI_EVENT", RTTIName: "\\CLASS=ZCL_ABAPGIT_GUI_EVENT"});
    let ii_gui_services = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_GUI_SERVICES", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_GUI_SERVICES"});
    if (INPUT && INPUT.ii_gui_services) {ii_gui_services.set(INPUT.ii_gui_services);}
    let iv_action = INPUT?.iv_action;
    let iv_getdata = INPUT?.iv_getdata || new abap.types.Character();
    let it_postdata = abap.types.TableFactory.construct(new abap.types.Character(256, {"qualifiedName":"zif_abapgit_html_viewer=>ty_char256"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_html_viewer=>ty_post_data");
    if (INPUT && INPUT.it_postdata) {it_postdata.set(INPUT.it_postdata);}
    ro_instance.set(await (new abap.Classes['ZCL_ABAPGIT_GUI_EVENT']()).constructor_({ii_gui_services: ii_gui_services, iv_action: iv_action, iv_getdata: iv_getdata, it_postdata: it_postdata}));
    return ro_instance;
  }
  async parse_fields(INPUT) {
    return zcl_abapgit_gui_event.parse_fields(INPUT);
  }
  static async parse_fields(INPUT) {
    let rt_fields = abap.types.TableFactory.construct(new abap.types.Structure({
    "name": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GUI_EVENT=>TY_NAME_VALUE-NAME"}),
    "value": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GUI_EVENT=>TY_NAME_VALUE-VALUE"})}, "zcl_abapgit_gui_event=>ty_name_value", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zcl_abapgit_gui_event=>ty_name_value_tt");
    let iv_string = INPUT?.iv_string;
    let iv_upper_cased = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
    if (INPUT && INPUT.iv_upper_cased) {iv_upper_cased.set(INPUT.iv_upper_cased);}
    if (INPUT === undefined || INPUT.iv_upper_cased === undefined) {iv_upper_cased = abap.builtin.abap_false;}
    let lt_substrings = 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 ls_field = new abap.types.Structure({
    "name": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GUI_EVENT=>TY_NAME_VALUE-NAME"}),
    "value": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GUI_EVENT=>TY_NAME_VALUE-VALUE"})}, "zcl_abapgit_gui_event=>ty_name_value", undefined, {}, {});
    let fs_lv_substring_ = new abap.types.FieldSymbol(new abap.types.String({qualifiedName: "STRING"}));
    abap.statements.split({source: iv_string, at: abap.CharacterFactory.get(1, '&'), table: lt_substrings});
    for await (const unique681 of abap.statements.loop(lt_substrings)) {
      fs_lv_substring_.assign(unique681);
      ls_field.clear();
      ls_field.get().name.set((await this.unescape({iv_string: abap.builtin.substring_before({val: fs_lv_substring_, sub: abap.CharacterFactory.get(1, '=')})})));
      ls_field.get().value.set((await this.unescape({iv_string: abap.builtin.substring_after({val: fs_lv_substring_, sub: abap.CharacterFactory.get(1, '=')})})));
      if (abap.compare.initial(ls_field)) {
        continue;
      }
      abap.statements.append({source: ls_field, target: rt_fields});
    }
    if (abap.compare.eq(iv_upper_cased, abap.builtin.abap_true)) {
      await this.field_keys_to_upper({ct_fields: rt_fields});
    }
    return rt_fields;
  }
  async parse_fields_upper_case_name(INPUT) {
    return zcl_abapgit_gui_event.parse_fields_upper_case_name(INPUT);
  }
  static async parse_fields_upper_case_name(INPUT) {
    let rt_fields = abap.types.TableFactory.construct(new abap.types.Structure({
    "name": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GUI_EVENT=>TY_NAME_VALUE-NAME"}),
    "value": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GUI_EVENT=>TY_NAME_VALUE-VALUE"})}, "zcl_abapgit_gui_event=>ty_name_value", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zcl_abapgit_gui_event=>ty_name_value_tt");
    let iv_string = INPUT?.iv_string;
    rt_fields.set((await this.parse_fields({iv_string: iv_string, iv_upper_cased: abap.builtin.abap_true})));
    return rt_fields;
  }
  async parse_post_form_data(INPUT) {
    return zcl_abapgit_gui_event.parse_post_form_data(INPUT);
  }
  static async parse_post_form_data(INPUT) {
    let rt_fields = abap.types.TableFactory.construct(new abap.types.Structure({
    "name": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GUI_EVENT=>TY_NAME_VALUE-NAME"}),
    "value": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GUI_EVENT=>TY_NAME_VALUE-VALUE"})}, "zcl_abapgit_gui_event=>ty_name_value", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zcl_abapgit_gui_event=>ty_name_value_tt");
    let it_post_data = INPUT?.it_post_data;
    if (it_post_data?.getQualifiedName === undefined || it_post_data.getQualifiedName() !== "ZIF_ABAPGIT_HTML_VIEWER=>TY_POST_DATA") { it_post_data = undefined; }
    if (it_post_data === undefined) { it_post_data = abap.types.TableFactory.construct(new abap.types.Character(256, {"qualifiedName":"zif_abapgit_html_viewer=>ty_char256"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_html_viewer=>ty_post_data").set(INPUT.it_post_data); }
    let iv_upper_cased = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
    if (INPUT && INPUT.iv_upper_cased) {iv_upper_cased.set(INPUT.iv_upper_cased);}
    if (INPUT === undefined || INPUT.iv_upper_cased === undefined) {iv_upper_cased = abap.builtin.abap_false;}
    let lv_serialized_post_data = new abap.types.String({qualifiedName: "STRING"});
    lv_serialized_post_data.set((await this.translate_postdata({it_postdata: it_post_data})));
    if (abap.compare.eq(iv_upper_cased, abap.builtin.abap_true)) {
      rt_fields.set((await this.parse_fields_upper_case_name({iv_string: lv_serialized_post_data})));
    } else {
      rt_fields.set((await this.parse_fields({iv_string: lv_serialized_post_data})));
    }
    return rt_fields;
  }
  async translate_postdata(INPUT) {
    return zcl_abapgit_gui_event.translate_postdata(INPUT);
  }
  static async translate_postdata(INPUT) {
    let rv_string = new abap.types.String({qualifiedName: "STRING"});
    let it_postdata = INPUT?.it_postdata;
    if (it_postdata?.getQualifiedName === undefined || it_postdata.getQualifiedName() !== "ZIF_ABAPGIT_HTML_VIEWER=>TY_POST_DATA") { it_postdata = undefined; }
    if (it_postdata === undefined) { it_postdata = abap.types.TableFactory.construct(new abap.types.Character(256, {"qualifiedName":"zif_abapgit_html_viewer=>ty_char256"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_html_viewer=>ty_post_data").set(INPUT.it_postdata); }
    let lt_post_data = abap.types.TableFactory.construct(new abap.types.Character(256, {"qualifiedName":"zif_abapgit_html_viewer=>ty_char256"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_html_viewer=>ty_post_data");
    let ls_last_line = new abap.types.Character(256, {"qualifiedName":"zif_abapgit_html_viewer=>ty_char256"});
    let lv_last_line_index = new abap.types.Integer({qualifiedName: "I"});
    if (abap.compare.initial(it_postdata)) {
      return rv_string;
    }
    lt_post_data.set(it_postdata);
    const indexBackup1 = abap.builtin.sy.get().index.get();
    let unique682 = 1;
    while (abap.compare.initial(ls_last_line)) {
      abap.builtin.sy.get().index.set(unique682++);
      lv_last_line_index.set(abap.builtin.lines({val: lt_post_data}));
      abap.statements.readTable(lt_post_data,{index: lv_last_line_index,
        into: ls_last_line});
      await abap.statements.deleteInternal(lt_post_data,{index: lv_last_line_index});
    }
    abap.builtin.sy.get().index.set(indexBackup1);
    abap.statements.concatenate({source: [lt_post_data], target: rv_string, lines: true, respectingBlanks: true});
    abap.statements.concatenate({source: [rv_string, ls_last_line], target: rv_string});
    return rv_string;
  }
  async unescape(INPUT) {
    return zcl_abapgit_gui_event.unescape(INPUT);
  }
  static async unescape(INPUT) {
    let rv_string = new abap.types.String({qualifiedName: "STRING"});
    let iv_string = INPUT?.iv_string;
    if (iv_string?.getQualifiedName === undefined || iv_string.getQualifiedName() !== "STRING") { iv_string = undefined; }
    if (iv_string === undefined) { iv_string = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.iv_string); }
    rv_string.set(iv_string);
    abap.statements.replace({target: rv_string, all: true, with: abap.CharacterFactory.get(1, ':'), of: abap.CharacterFactory.get(3, '%3A'), ignoringCase: true});
    abap.statements.replace({target: rv_string, all: true, with: abap.CharacterFactory.get(1, '?'), of: abap.CharacterFactory.get(3, '%3F'), ignoringCase: true});
    abap.statements.replace({target: rv_string, all: true, with: abap.CharacterFactory.get(1, '='), of: abap.CharacterFactory.get(3, '%3D'), ignoringCase: true});
    abap.statements.replace({target: rv_string, all: true, with: abap.CharacterFactory.get(1, '/'), of: abap.CharacterFactory.get(3, '%2F'), ignoringCase: true});
    abap.statements.replace({target: rv_string, all: true, with: abap.CharacterFactory.get(1, '%'), of: abap.CharacterFactory.get(3, '%25'), ignoringCase: true});
    abap.statements.replace({target: rv_string, all: true, with: abap.CharacterFactory.get(1, '&'), of: abap.CharacterFactory.get(3, '%26'), ignoringCase: true});
    abap.statements.replace({target: rv_string, all: true, with: new abap.types.String().set(` `), of: zcl_abapgit_gui_event.gv_non_breaking_space});
    return rv_string;
  }
  async zif_abapgit_gui_event$form_data() {
    let ro_string_map = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_STRING_MAP", RTTIName: "\\CLASS=ZCL_ABAPGIT_STRING_MAP"});
    if (abap.compare.initial(this.#mo_form_data)) {
      this.#mo_form_data.set((await this.#fields_to_map({it_fields: (await this.parse_post_form_data({it_post_data: this.zif_abapgit_gui_event$mt_postdata}))})));
      await this.#mo_form_data.get().freeze();
    }
    ro_string_map.set(this.#mo_form_data);
    return ro_string_map;
  }
  async zif_abapgit_gui_event$query() {
    let ro_string_map = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_STRING_MAP", RTTIName: "\\CLASS=ZCL_ABAPGIT_STRING_MAP"});
    if (abap.compare.initial(this.#mo_query)) {
      this.#mo_query.set((await this.#fields_to_map({it_fields: (await this.parse_fields({iv_string: this.zif_abapgit_gui_event$mv_getdata}))})));
      await this.#mo_query.get().freeze();
    }
    ro_string_map.set(this.#mo_query);
    return ro_string_map;
  }
}
abap.Classes['ZCL_ABAPGIT_GUI_EVENT'] = zcl_abapgit_gui_event;
zcl_abapgit_gui_event.gv_non_breaking_space = new abap.types.String({qualifiedName: "STRING"});
await abap.Classes['ZCL_ABAPGIT_GUI_EVENT'].class_constructor();
zcl_abapgit_gui_event.ty_name_value = new abap.types.Structure({
"name": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GUI_EVENT=>TY_NAME_VALUE-NAME"}),
"value": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GUI_EVENT=>TY_NAME_VALUE-VALUE"})}, "zcl_abapgit_gui_event=>ty_name_value", undefined, {}, {});
zcl_abapgit_gui_event.ty_name_value_tt = abap.types.TableFactory.construct(new abap.types.Structure({
"name": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GUI_EVENT=>TY_NAME_VALUE-NAME"}),
"value": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GUI_EVENT=>TY_NAME_VALUE-VALUE"})}, "zcl_abapgit_gui_event=>ty_name_value", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zcl_abapgit_gui_event=>ty_name_value_tt");
export {zcl_abapgit_gui_event};