Skip to content

Commit c2e6dfa

Browse files
committed
apply patch to @ng-formworks/core to fix condition issue
1 parent ed49d41 commit c2e6dfa

2 files changed

Lines changed: 28 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22

33
All notable changes to `homebridge-config-ui-x` will be documented in this file. This project tries to adhere to [Semantic Versioning](http://semver.org/).
44

5+
## v5.13.1 (Unreleased)
6+
7+
### UI Changes
8+
9+
- apply patch to `@ng-formworks/core` to fix condition issue
10+
11+
### Homebridge Dependencies
12+
13+
- `@homebridge/hap-client` @ `v3.1.2`
14+
- `@homebridge/node-pty-prebuilt-multiarch` @ `v0.13.1`
15+
- `@homebridge/plugin-ui-utils` @ `v2.1.2`
16+
517
## v5.13.0 (2025-12-27)
618

719
### UI Changes

ui/patches/@ng-formworks+core+20.7.0.patch

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/node_modules/@ng-formworks/core/fesm2022/ng-formworks-core.mjs b/node_modules/@ng-formworks/core/fesm2022/ng-formworks-core.mjs
2-
index 9f1a428..52ad640 100644
2+
index 9f1a428..2d0384a 100644
33
--- a/node_modules/@ng-formworks/core/fesm2022/ng-formworks-core.mjs
44
+++ b/node_modules/@ng-formworks/core/fesm2022/ng-formworks-core.mjs
55
@@ -23,6 +23,11 @@ import { Eta } from 'eta/core';
@@ -33,6 +33,21 @@ index 9f1a428..52ad640 100644
3333
const parentValues = this.getFormControlValue(parentCtxAsSignals);
3434
const isArrayItem = (parentNode.type || '').slice(-5) === 'array' && isArray(parentValues);
3535
const text = JsonPointer.getFirst(isArrayItem && childNode.type !== '$ref'
36+
@@ -7890,10 +7898,10 @@ class JsonSchemaFormService {
37+
const condition_nullChecks = {
38+
functionBody: condition.functionBodyRaw ||
39+
condition.functionBody
40+
- .replace(/\[/g, ".[").split('.')
41+
- .join("?.")
42+
- .replace(/\?\?\./g, "?")
43+
- .replace(/(\?)(\.\[)/g, '[')
44+
+ // Add ?. before [ when preceded by letter/underscore/$ (not digits)
45+
+ .replace(/([a-zA-Z_$])(\[)/g, '$1?.[')
46+
+ // Add ?. before . when preceded by letter/underscore/$/] and followed by valid identifier start
47+
+ .replace(/([a-zA-Z_$\]])(\.)(?=[a-zA-Z_$])/g, '$1?.')
48+
};
49+
return this.evaluateFunctionBodyCondition(condition_nullChecks, dataIndex);
50+
}
3651
@@ -8683,7 +8691,7 @@ class CheckboxComponent {
3752
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.13", type: CheckboxComponent, isStandalone: false, selector: "checkbox-widget", inputs: { layoutNode: { classPropertyName: "layoutNode", publicName: "layoutNode", isSignal: true, isRequired: false, transformFunction: null }, layoutIndex: { classPropertyName: "layoutIndex", publicName: "layoutIndex", isSignal: true, isRequired: false, transformFunction: null }, dataIndex: { classPropertyName: "dataIndex", publicName: "dataIndex", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
3853
<label

0 commit comments

Comments
 (0)