pywebexec 2.4.18__py3-none-any.whl → 2.4.19__py3-none-any.whl

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.
@@ -2395,7 +2395,26 @@ formNode.prototype.computeInitialValues = function (values, ignoreDefaultValues)
2395
2395
  });
2396
2396
  }
2397
2397
  }
2398
+ // fjo
2399
+ function setNestedValue(obj, keyPath, value) {
2400
+ // Split the keyPath into individual keys
2401
+ const keys = keyPath.split('.');
2402
+ // Store the reference to the current level of the object
2403
+ let current = obj;
2404
+
2405
+ // Traverse the object until the second to last key
2406
+ for (let i = 0; i < keys.length - 1; i++) {
2407
+ // If the key doesn't exist, create a new object
2408
+ if (current[keys[i]] === undefined) {
2409
+ current[keys[i]] = {};
2410
+ }
2411
+ // Move to the next level
2412
+ current = current[keys[i]];
2413
+ }
2398
2414
 
2415
+ // Assign the value to the final key
2416
+ current[keys[keys.length - 1]] = value;
2417
+ }
2399
2418
  if (this.view && this.view.inputfield && this.schemaElement) {
2400
2419
  // Case 1: simple input field
2401
2420
  if (values) {
@@ -2460,7 +2479,8 @@ formNode.prototype.computeInitialValues = function (values, ignoreDefaultValues)
2460
2479
  // fjo start: TODO convert this.key to be used in values
2461
2480
  else if (this.schemaElement['default']) {
2462
2481
  values = {};
2463
- values[this.key] = this.schemaElement['default'];
2482
+ setNestedValue(values, this.key, this.schemaElement['default']);
2483
+ // values[this.key] = this.schemaElement['default'];
2464
2484
  nbChildren = this.schemaElement['default'].length;
2465
2485
  }
2466
2486
  // fjo end
pywebexec/version.py CHANGED
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '2.4.18'
21
- __version_tuple__ = version_tuple = (2, 4, 18)
20
+ __version__ = version = '2.4.19'
21
+ __version_tuple__ = version_tuple = (2, 4, 19)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pywebexec
3
- Version: 2.4.18
3
+ Version: 2.4.19
4
4
  Summary: Simple Python HTTP Exec Server
5
5
  Home-page: https://github.com/joknarf/pywebexec
6
6
  Author: Franck Jouvanceau
@@ -2,7 +2,7 @@ pywebexec/__init__.py,sha256=197fHJy0UDBwTTpGCGortZRr-w2kTaD7MxqdbVmTEi0,61
2
2
  pywebexec/host_ip.py,sha256=oiCMlo2o3AkkgXDarUSx8T3FWXKI0vk1-EPnx5FGBd8,1332
3
3
  pywebexec/pywebexec.py,sha256=avBfvbhLbjvrJ168bBmQVrm-DjbjGJoAapHHIEAD6V4,48515
4
4
  pywebexec/swagger.yaml,sha256=I_oLpp7Hqel8SDEEykvpmCT-Gv3ytGlziq9bvQOrtZY,7598
5
- pywebexec/version.py,sha256=tklCNhruYVYrAzUgM2IxG6oUw5E6t_A3tDtn6RUMsSk,513
5
+ pywebexec/version.py,sha256=RG2wRk5re9j83NrpBrwB9_-yiVfz-BBwgqrM7DZypPQ,513
6
6
  pywebexec/static/css/form.css,sha256=pLM_llJw-arBEgxcKSte_SYVRwDSsLWCOMUYabXWQZU,8658
7
7
  pywebexec/static/css/markdown.css,sha256=br4-iK9wigTs54N2KHtjgZ4KLH0THVSvJo-XZAdMHiE,1970
8
8
  pywebexec/static/css/style.css,sha256=TX60M-mzIPTGVDmaypRCOcyxc8A7dOjx-p1_bpJ6t9M,11772
@@ -71,14 +71,14 @@ pywebexec/static/jsonform/deps/ace/theme-github_light_default.js,sha256=4-_JXMA3
71
71
  pywebexec/static/jsonform/deps/ace/theme-twilight.js,sha256=3FCPUePtyW8RjnVAC51dgwKyNVpB7liV9AjEy4uEP8c,3474
72
72
  pywebexec/static/jsonform/deps/ace/worker-json.js,sha256=FalZfSbOglLQIOUYUprFqETrljooqsGwM5Tey7vhbxs,24390
73
73
  pywebexec/static/jsonform/deps/img/glyphicons-halflings.png,sha256=hpJM0AbbMLnU8UGOBs172D7vK-dooQ8n0s_ybml3zO0,13826
74
- pywebexec/static/jsonform/lib/jsonform.js,sha256=X1pR8KATWk2JOFcYABbHCDQpfgPlELKSq5sdGDgkd0Q,139254
74
+ pywebexec/static/jsonform/lib/jsonform.js,sha256=ybg60zKhoNQ9u0ZnegoUZiIHerMSZ34nl8jnPZ6BTEs,139972
75
75
  pywebexec/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
76
76
  pywebexec/templates/index.html,sha256=sTytur1jHuEAMTvuNqMEB3i3NNFoJRbYQgfmvDrAuJQ,4286
77
77
  pywebexec/templates/popup.html,sha256=3kpMccKD_OLLhJ4Y9KRw6Ny8wQWjVaRrUfV9y5-bDiQ,1580
78
78
  pywebexec/templates/swagger_ui.html,sha256=MAPr-z96VERAecDvX37V8q2Nxph-O0fNDBul1x2w9SI,1147
79
- pywebexec-2.4.18.dist-info/licenses/LICENSE,sha256=gRJf0JPT_wsZJsUGlWPTS8Vypfl9vQ1qjp6sNbKykuA,1064
80
- pywebexec-2.4.18.dist-info/METADATA,sha256=XWDHCOENOpiWFxN2oXSKfjjnWNXFpMEPqGFYuP-k0F8,13016
81
- pywebexec-2.4.18.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
82
- pywebexec-2.4.18.dist-info/entry_points.txt,sha256=l52GBkPCXRkmlHfEyoVauyfBdg8o-CAtC8qQpOIjJK0,55
83
- pywebexec-2.4.18.dist-info/top_level.txt,sha256=vHoHyzngrfGdm_nM7Xn_5iLmaCrf10XO1EhldgNLEQ8,10
84
- pywebexec-2.4.18.dist-info/RECORD,,
79
+ pywebexec-2.4.19.dist-info/licenses/LICENSE,sha256=gRJf0JPT_wsZJsUGlWPTS8Vypfl9vQ1qjp6sNbKykuA,1064
80
+ pywebexec-2.4.19.dist-info/METADATA,sha256=WNhNof34pnrDNmcsgPA-TIMGwb32iBtdqkPHClbXAwk,13016
81
+ pywebexec-2.4.19.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
82
+ pywebexec-2.4.19.dist-info/entry_points.txt,sha256=l52GBkPCXRkmlHfEyoVauyfBdg8o-CAtC8qQpOIjJK0,55
83
+ pywebexec-2.4.19.dist-info/top_level.txt,sha256=vHoHyzngrfGdm_nM7Xn_5iLmaCrf10XO1EhldgNLEQ8,10
84
+ pywebexec-2.4.19.dist-info/RECORD,,