gt-react 2.0.199 → 2.0.200

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"getValueBranch.d.ts","sourceRoot":"","sources":["../../../src/primitives/value/getValueBranch.ts"],"names":[],"mappings":"AAuBA;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,CA8BtG"}
1
+ {"version":3,"file":"getValueBranch.d.ts","sourceRoot":"","sources":["../../../src/primitives/value/getValueBranch.ts"],"names":[],"mappings":"AAuBA;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,CAiCtG"}
@@ -33,14 +33,16 @@ const isValidReactNode_1 = __importDefault(require("./isValidReactNode"));
33
33
  * @returns {any} - Returns the matched React node or undefined if no match is found.
34
34
  */
35
35
  function getValueBranch(values, branches) {
36
+ let currentDefault = null;
36
37
  /**
37
38
  * Handles the navigation through a given branch object.
38
39
  *
39
40
  * @param {any} branch - The current branch object to navigate.
40
- * @returns {any} - Returns the matched React node or null if no match is found.
41
+ * @returns {any} - Returns the matched React node, the default value, or null if no match is found.
41
42
  */
42
43
  const handleBranch = (branch) => {
43
44
  var _a, _b;
45
+ currentDefault = (branch === null || branch === void 0 ? void 0 : branch["*"]) || currentDefault;
44
46
  for (const key of Object.keys(branch)) {
45
47
  let value = values[key];
46
48
  if (value) {
@@ -57,7 +59,7 @@ function getValueBranch(values, branches) {
57
59
  }
58
60
  }
59
61
  }
60
- return (branch === null || branch === void 0 ? void 0 : branch["*"]) || null;
62
+ return currentDefault;
61
63
  };
62
64
  // Start the recursive navigation from the root branches
63
65
  return handleBranch(branches);
@@ -1 +1 @@
1
- {"version":3,"file":"getValueBranch.js","sourceRoot":"","sources":["../../../src/primitives/value/getValueBranch.ts"],"names":[],"mappings":";;;;;AA8BA,iCA8BC;AA5DD,kDAA0B;AAC1B,0EAAkD;AAElD;;;;;;;;;;;;;;;;;;EAkBE;AAEF;;;;;;GAMG;AACH,SAAwB,cAAc,CAAC,MAA2B,EAAE,QAA6B;IAE7F;;;;;OAKG;IACH,MAAM,YAAY,GAAG,CAAC,MAAW,EAAO,EAAE;;QACtC,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;YACpC,IAAI,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;YACxB,IAAI,KAAK,EAAE,CAAC;gBACR,qCAAqC;gBACrC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC;oBACrB,IAAI,OAAO,CAAA,MAAA,MAAA,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,0CAAG,yBAAyB,CAAC,0CAAE,EAAE,CAAA,KAAK,QAAQ,EAAE,CAAC;wBAChF,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC;oBAC9B,CAAC;oBACD,oEAAoE;oBACpE,IAAI,IAAA,0BAAgB,EAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,QAAQ,KAAK,eAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;wBACxG,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC;oBAC9B,CAAC;oBACD,OAAO,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC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AC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,QAAQ,KAAK,eAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;wBACxG,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC;oBAC9B,CAAC;oBACD,OAAO,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAA;gBAC3C,CAAC;YACL,CAAC;QACL,CAAC;QACD,OAAO,cAAc,CAAC;IAC1B,CAAC,CAAA;IAED,wDAAwD;IACxD,OAAO,YAAY,CAAC,QAAQ,CAAC,CAAC;AAClC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gt-react",
3
- "version": "2.0.199",
3
+ "version": "2.0.200",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",