@ng-forge/dynamic-form-mcp 1.3.0-next.4 → 1.3.0

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.
@@ -86,7 +86,7 @@ var FIELD_TYPES = [
86
86
  multiple: {
87
87
  name: "multiple",
88
88
  type: "boolean",
89
- description: "Allow multiple selections",
89
+ description: "Allow multiple selections. The value becomes an array of the selected values",
90
90
  required: false,
91
91
  default: false
92
92
  }
@@ -3218,6 +3218,8 @@ Evaluates a JavaScript expression with access to \`formValue\`, \`fieldValue\`,
3218
3218
  }
3219
3219
  \`\`\`
3220
3220
 
3221
+ **Expression syntax** (javascript conditions and derivations): property access with \`?.\`, arithmetic, comparisons, \`&&\`, \`||\`, \`!\`, \`??\`, ternaries, array and object literals, and arrow functions as method arguments (\`formValue.items.some(i => i.done)\`). Mixing \`??\` with \`&&\` or \`||\` needs parentheses, as in JavaScript. Methods are limited to safe string, number, array and date methods (\`toFixed\`, \`includes\`, \`map\`, \`getFullYear\`, ...). There are no statements, no \`new\`, no direct function calls (\`parseInt(x)\`, \`String(x)\`) and no globals (\`Math\`, \`Date\`, \`JSON\`): an unknown name reads as \`undefined\`. Use a number input (\`props: { type: 'number' }\`) instead of parsing, and a custom function for anything else. The validator (MCP or CLI) reports an expression that breaks these rules, with its path, under \`core/expression-syntax\`, and in dev mode the library warns about it at startup.
3222
+
3221
3223
  **Condition scoping:** in logic conditions, \`formValue\` is the whole form value regardless of where the field sits, except inside array items where it is scoped to the current item (use \`rootFormValue\` for the rest of the form). Reference group-nested fields by their full path, e.g. \`formValue.person.firstName\`. Note that \`derivation\` expressions scope differently: there \`formValue\` is also scoped to the parent group for group-nested fields.
3222
3224
 
3223
3225
  #### Custom Condition
@@ -3288,6 +3290,8 @@ Combine conditions with \`and\` (all must be true) or \`or\` (at least one must
3288
3290
  }
3289
3291
  \`\`\`
3290
3292
 
3293
+ An empty \`conditions\` array evaluates to false, so an empty group never fires. Dev mode warns about it at startup.
3294
+
3291
3295
  ## UI Library Integration
3292
3296
 
3293
3297
  ng-forge supports multiple UI libraries. Configure in \`app.config.ts\`:
@@ -5408,7 +5412,7 @@ var BaseFormConfigSchema = z19.object({
5408
5412
  });
5409
5413
 
5410
5414
  // internal/dynamic-forms-validation/validate/src/json-schema/form-config-json-schema.ts
5411
- import { z as z57 } from "zod";
5415
+ import { z as z59 } from "zod";
5412
5416
 
5413
5417
  // internal/dynamic-forms-validation/material/src/props/mat-common-props.schema.ts
5414
5418
  import { z as z20 } from "zod";
@@ -5731,17 +5735,43 @@ var MatButtonPropsSchema = z30.object({
5731
5735
  });
5732
5736
 
5733
5737
  // internal/dynamic-forms-validation/material/src/fields/mat-input-field.schema.ts
5738
+ import { z as z32 } from "zod";
5739
+
5740
+ // internal/dynamic-forms-validation/src/lib/schemas/field/input-value.schema.ts
5734
5741
  import { z as z31 } from "zod";
5742
+ var InputValueSchema = z31.union([z31.string(), z31.number()]).nullable().optional();
5743
+ var inputValueTypeRefine = (data, ctx) => {
5744
+ if (!data || typeof data !== "object") return;
5745
+ const field = data;
5746
+ if (field.type !== "input") return;
5747
+ const numeric = field.props?.type === "number";
5748
+ if (typeof field.value === "number" && !numeric) {
5749
+ ctx.addIssue({
5750
+ code: z31.ZodIssueCode.custom,
5751
+ path: ["value"],
5752
+ message: "A number value needs `props: { type: 'number' }`. Other input types hold strings."
5753
+ });
5754
+ }
5755
+ if (typeof field.value === "string" && numeric) {
5756
+ ctx.addIssue({
5757
+ code: z31.ZodIssueCode.custom,
5758
+ path: ["value"],
5759
+ message: "An input with `props: { type: 'number' }` holds a number, not a string."
5760
+ });
5761
+ }
5762
+ };
5763
+
5764
+ // internal/dynamic-forms-validation/material/src/fields/mat-input-field.schema.ts
5735
5765
  var MatInputFieldSchemaObject = BaseFieldDefSchema.merge(FieldWithValidationSchema).extend({
5736
5766
  /**
5737
5767
  * Field type discriminant.
5738
5768
  */
5739
- type: z31.literal("input"),
5740
- nullable: z31.boolean().optional(),
5769
+ type: z32.literal("input"),
5770
+ nullable: z32.boolean().optional(),
5741
5771
  /**
5742
5772
  * Initial value for the input.
5743
5773
  */
5744
- value: z31.string().nullable().optional(),
5774
+ value: InputValueSchema,
5745
5775
  /**
5746
5776
  * Placeholder text (can also be in props).
5747
5777
  */
@@ -5751,20 +5781,20 @@ var MatInputFieldSchemaObject = BaseFieldDefSchema.merge(FieldWithValidationSche
5751
5781
  */
5752
5782
  props: MatInputPropsSchema.optional()
5753
5783
  });
5754
- var MatInputFieldSchema = MatInputFieldSchemaObject.superRefine(nullableValueRefine);
5784
+ var MatInputFieldSchema = MatInputFieldSchemaObject.superRefine(nullableValueRefine).superRefine(inputValueTypeRefine);
5755
5785
 
5756
5786
  // internal/dynamic-forms-validation/material/src/fields/mat-textarea-field.schema.ts
5757
- import { z as z32 } from "zod";
5787
+ import { z as z33 } from "zod";
5758
5788
  var MatTextareaFieldSchemaObject = BaseFieldDefSchema.merge(FieldWithValidationSchema).extend({
5759
5789
  /**
5760
5790
  * Field type discriminant.
5761
5791
  */
5762
- type: z32.literal("textarea"),
5763
- nullable: z32.boolean().optional(),
5792
+ type: z33.literal("textarea"),
5793
+ nullable: z33.boolean().optional(),
5764
5794
  /**
5765
5795
  * Initial value for the textarea.
5766
5796
  */
5767
- value: z32.string().nullable().optional(),
5797
+ value: z33.string().nullable().optional(),
5768
5798
  /**
5769
5799
  * Placeholder text (can also be in props).
5770
5800
  */
@@ -5777,18 +5807,18 @@ var MatTextareaFieldSchemaObject = BaseFieldDefSchema.merge(FieldWithValidationS
5777
5807
  var MatTextareaFieldSchema = MatTextareaFieldSchemaObject.superRefine(nullableValueRefine);
5778
5808
 
5779
5809
  // internal/dynamic-forms-validation/material/src/fields/mat-select-field.schema.ts
5780
- import { z as z33 } from "zod";
5810
+ import { z as z34 } from "zod";
5781
5811
  var MatSelectFieldSchemaObject = BaseFieldDefSchema.merge(FieldWithValidationSchema).extend({
5782
5812
  /**
5783
5813
  * Field type discriminant.
5784
5814
  */
5785
- type: z33.literal("select"),
5786
- nullable: z33.boolean().optional(),
5815
+ type: z34.literal("select"),
5816
+ nullable: z34.boolean().optional(),
5787
5817
  /**
5788
5818
  * Initial value for the select.
5789
5819
  * Can be single value or array if multiple is enabled.
5790
5820
  */
5791
- value: z33.unknown().nullable().optional(),
5821
+ value: z34.unknown().nullable().optional(),
5792
5822
  /**
5793
5823
  * Placeholder text (can also be in props).
5794
5824
  */
@@ -5805,16 +5835,16 @@ var MatSelectFieldSchemaObject = BaseFieldDefSchema.merge(FieldWithValidationSch
5805
5835
  var MatSelectFieldSchema = MatSelectFieldSchemaObject.superRefine(nullableValueRefine);
5806
5836
 
5807
5837
  // internal/dynamic-forms-validation/material/src/fields/mat-checkbox-field.schema.ts
5808
- import { z as z34 } from "zod";
5838
+ import { z as z35 } from "zod";
5809
5839
  var MatCheckboxFieldSchema = BaseFieldDefSchema.merge(FieldWithValidationSchema).extend({
5810
5840
  /**
5811
5841
  * Field type discriminant.
5812
5842
  */
5813
- type: z34.literal("checkbox"),
5843
+ type: z35.literal("checkbox"),
5814
5844
  /**
5815
5845
  * Initial checked state.
5816
5846
  */
5817
- value: z34.boolean().optional(),
5847
+ value: z35.boolean().optional(),
5818
5848
  /**
5819
5849
  * Placeholder/helper text.
5820
5850
  */
@@ -5826,17 +5856,17 @@ var MatCheckboxFieldSchema = BaseFieldDefSchema.merge(FieldWithValidationSchema)
5826
5856
  });
5827
5857
 
5828
5858
  // internal/dynamic-forms-validation/material/src/fields/mat-radio-field.schema.ts
5829
- import { z as z35 } from "zod";
5859
+ import { z as z36 } from "zod";
5830
5860
  var MatRadioFieldSchemaObject = BaseFieldDefSchema.merge(FieldWithValidationSchema).extend({
5831
5861
  /**
5832
5862
  * Field type discriminant.
5833
5863
  */
5834
- type: z35.literal("radio"),
5835
- nullable: z35.boolean().optional(),
5864
+ type: z36.literal("radio"),
5865
+ nullable: z36.boolean().optional(),
5836
5866
  /**
5837
5867
  * Initial selected value.
5838
5868
  */
5839
- value: z35.unknown().nullable().optional(),
5869
+ value: z36.unknown().nullable().optional(),
5840
5870
  /**
5841
5871
  * Placeholder/helper text.
5842
5872
  */
@@ -5853,17 +5883,17 @@ var MatRadioFieldSchemaObject = BaseFieldDefSchema.merge(FieldWithValidationSche
5853
5883
  var MatRadioFieldSchema = MatRadioFieldSchemaObject.superRefine(nullableValueRefine);
5854
5884
 
5855
5885
  // internal/dynamic-forms-validation/material/src/fields/mat-multi-checkbox-field.schema.ts
5856
- import { z as z36 } from "zod";
5886
+ import { z as z37 } from "zod";
5857
5887
  var MatMultiCheckboxFieldSchemaObject = BaseFieldDefSchema.merge(FieldWithValidationSchema).extend({
5858
5888
  /**
5859
5889
  * Field type discriminant.
5860
5890
  */
5861
- type: z36.literal("multi-checkbox"),
5862
- nullable: z36.boolean().optional(),
5891
+ type: z37.literal("multi-checkbox"),
5892
+ nullable: z37.boolean().optional(),
5863
5893
  /**
5864
5894
  * Initial selected values (array).
5865
5895
  */
5866
- value: z36.array(z36.unknown()).nullable().optional(),
5896
+ value: z37.array(z37.unknown()).nullable().optional(),
5867
5897
  /**
5868
5898
  * Placeholder/helper text.
5869
5899
  */
@@ -5880,16 +5910,16 @@ var MatMultiCheckboxFieldSchemaObject = BaseFieldDefSchema.merge(FieldWithValida
5880
5910
  var MatMultiCheckboxFieldSchema = MatMultiCheckboxFieldSchemaObject.superRefine(nullableValueRefine);
5881
5911
 
5882
5912
  // internal/dynamic-forms-validation/material/src/fields/mat-toggle-field.schema.ts
5883
- import { z as z37 } from "zod";
5913
+ import { z as z38 } from "zod";
5884
5914
  var MatToggleFieldSchema = BaseFieldDefSchema.merge(FieldWithValidationSchema).extend({
5885
5915
  /**
5886
5916
  * Field type discriminant.
5887
5917
  */
5888
- type: z37.literal("toggle"),
5918
+ type: z38.literal("toggle"),
5889
5919
  /**
5890
5920
  * Initial toggle state.
5891
5921
  */
5892
- value: z37.boolean().optional(),
5922
+ value: z38.boolean().optional(),
5893
5923
  /**
5894
5924
  * Placeholder/helper text.
5895
5925
  */
@@ -5901,29 +5931,36 @@ var MatToggleFieldSchema = BaseFieldDefSchema.merge(FieldWithValidationSchema).e
5901
5931
  });
5902
5932
 
5903
5933
  // internal/dynamic-forms-validation/material/src/fields/mat-slider-field.schema.ts
5904
- import { z as z38 } from "zod";
5934
+ import { z as z40 } from "zod";
5935
+
5936
+ // internal/dynamic-forms-validation/src/lib/schemas/field/multi-value.schema.ts
5937
+ import { z as z39 } from "zod";
5938
+ var SliderValueSchema = z39.union([z39.number(), z39.array(z39.number()), z39.object({ lower: z39.number(), upper: z39.number() })]).nullable().optional();
5939
+ var DatepickerValueSchema = z39.union([z39.string(), z39.array(z39.string())]).nullable().optional();
5940
+
5941
+ // internal/dynamic-forms-validation/material/src/fields/mat-slider-field.schema.ts
5905
5942
  var MatSliderFieldSchemaObject = BaseFieldDefSchema.merge(FieldWithValidationSchema).extend({
5906
5943
  /**
5907
5944
  * Field type discriminant.
5908
5945
  */
5909
- type: z38.literal("slider"),
5910
- nullable: z38.boolean().optional(),
5946
+ type: z40.literal("slider"),
5947
+ nullable: z40.boolean().optional(),
5911
5948
  /**
5912
5949
  * Initial slider value.
5913
5950
  */
5914
- value: z38.number().nullable().optional(),
5951
+ value: SliderValueSchema,
5915
5952
  /**
5916
5953
  * Minimum slider value.
5917
5954
  */
5918
- minValue: z38.number().optional(),
5955
+ minValue: z40.number().optional(),
5919
5956
  /**
5920
5957
  * Maximum slider value.
5921
5958
  */
5922
- maxValue: z38.number().optional(),
5959
+ maxValue: z40.number().optional(),
5923
5960
  /**
5924
5961
  * Step increment.
5925
5962
  */
5926
- step: z38.number().positive().optional(),
5963
+ step: z40.number().positive().optional(),
5927
5964
  /**
5928
5965
  * Placeholder/helper text.
5929
5966
  */
@@ -5936,18 +5973,18 @@ var MatSliderFieldSchemaObject = BaseFieldDefSchema.merge(FieldWithValidationSch
5936
5973
  var MatSliderFieldSchema = MatSliderFieldSchemaObject.superRefine(nullableValueRefine);
5937
5974
 
5938
5975
  // internal/dynamic-forms-validation/material/src/fields/mat-datepicker-field.schema.ts
5939
- import { z as z39 } from "zod";
5940
- var DateValueSchema = z39.union([z39.string(), z39.null()]);
5976
+ import { z as z41 } from "zod";
5977
+ var DateValueSchema = z41.union([z41.string(), z41.null()]);
5941
5978
  var MatDatepickerFieldSchemaObject = BaseFieldDefSchema.merge(FieldWithValidationSchema).extend({
5942
5979
  /**
5943
5980
  * Field type discriminant.
5944
5981
  */
5945
- type: z39.literal("datepicker"),
5946
- nullable: z39.boolean().optional(),
5982
+ type: z41.literal("datepicker"),
5983
+ nullable: z41.boolean().optional(),
5947
5984
  /**
5948
5985
  * Initial date value (ISO string in JSON configs).
5949
5986
  */
5950
- value: DateValueSchema.nullable().optional(),
5987
+ value: DatepickerValueSchema,
5951
5988
  /**
5952
5989
  * Minimum selectable date.
5953
5990
  */
@@ -5972,29 +6009,29 @@ var MatDatepickerFieldSchemaObject = BaseFieldDefSchema.merge(FieldWithValidatio
5972
6009
  var MatDatepickerFieldSchema = MatDatepickerFieldSchemaObject.superRefine(nullableValueRefine);
5973
6010
 
5974
6011
  // internal/dynamic-forms-validation/material/src/fields/mat-button-field.schema.ts
5975
- import { z as z41 } from "zod";
6012
+ import { z as z43 } from "zod";
5976
6013
 
5977
6014
  // internal/dynamic-forms-validation/src/lib/schemas/field/array-item-template.schema.ts
5978
- import { z as z40 } from "zod";
5979
- var FieldLikeSchema = z40.object({ type: z40.string() }).passthrough();
5980
- var ArrayItemTemplateSchema = z40.union([FieldLikeSchema, z40.array(FieldLikeSchema)]);
6015
+ import { z as z42 } from "zod";
6016
+ var FieldLikeSchema = z42.object({ type: z42.string() }).passthrough();
6017
+ var ArrayItemTemplateSchema = z42.union([FieldLikeSchema, z42.array(FieldLikeSchema)]);
5981
6018
 
5982
6019
  // internal/dynamic-forms-validation/material/src/fields/mat-button-field.schema.ts
5983
- var EventArgSchema = z41.union([z41.string(), z41.number(), z41.boolean(), z41.null(), z41.undefined()]);
6020
+ var EventArgSchema = z43.union([z43.string(), z43.number(), z43.boolean(), z43.null(), z43.undefined()]);
5984
6021
  var MatButtonFieldSchema = BaseFieldDefSchema.extend({
5985
6022
  /**
5986
6023
  * Field type discriminant.
5987
6024
  */
5988
- type: z41.literal("button"),
6025
+ type: z43.literal("button"),
5989
6026
  /**
5990
6027
  * Event type name (string reference to registered event).
5991
6028
  * Note: Full event configuration requires runtime setup.
5992
6029
  */
5993
- event: z41.string().optional(),
6030
+ event: z43.string().optional(),
5994
6031
  /**
5995
6032
  * Arguments passed to the event constructor.
5996
6033
  */
5997
- eventArgs: z41.array(EventArgSchema).optional(),
6034
+ eventArgs: z43.array(EventArgSchema).optional(),
5998
6035
  /**
5999
6036
  * Material-specific button properties.
6000
6037
  */
@@ -6005,17 +6042,17 @@ var MatButtonFieldSchema = BaseFieldDefSchema.extend({
6005
6042
  logic: LogicArraySchema.optional()
6006
6043
  });
6007
6044
  var MatSubmitButtonFieldSchema = BaseFieldDefSchema.extend({
6008
- type: z41.literal("submit"),
6045
+ type: z43.literal("submit"),
6009
6046
  props: MatButtonPropsSchema.optional(),
6010
6047
  logic: LogicArraySchema.optional()
6011
6048
  });
6012
6049
  var MatNextButtonFieldSchema = BaseFieldDefSchema.extend({
6013
- type: z41.literal("next"),
6050
+ type: z43.literal("next"),
6014
6051
  props: MatButtonPropsSchema.optional(),
6015
6052
  logic: LogicArraySchema.optional()
6016
6053
  });
6017
6054
  var MatPreviousButtonFieldSchema = BaseFieldDefSchema.extend({
6018
- type: z41.literal("previous"),
6055
+ type: z43.literal("previous"),
6019
6056
  props: MatButtonPropsSchema.optional()
6020
6057
  });
6021
6058
  var MatAddArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
@@ -6024,21 +6061,21 @@ var MatAddArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6024
6061
  * item, or a list of them for an object item.
6025
6062
  */
6026
6063
  template: ArrayItemTemplateSchema,
6027
- type: z41.literal("add-array-item"),
6064
+ type: z43.literal("add-array-item"),
6028
6065
  /**
6029
6066
  * Key of the array field to add items to.
6030
6067
  * If omitted, uses the parent array context.
6031
6068
  */
6032
- arrayKey: z41.string().optional(),
6069
+ arrayKey: z43.string().optional(),
6033
6070
  props: MatButtonPropsSchema.optional()
6034
6071
  });
6035
6072
  var MatRemoveArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6036
- type: z41.literal("remove-array-item"),
6073
+ type: z43.literal("remove-array-item"),
6037
6074
  /**
6038
6075
  * Key of the array field to remove items from.
6039
6076
  * If omitted, uses the parent array context.
6040
6077
  */
6041
- arrayKey: z41.string().optional(),
6078
+ arrayKey: z43.string().optional(),
6042
6079
  props: MatButtonPropsSchema.optional()
6043
6080
  });
6044
6081
  var MatPrependArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
@@ -6047,12 +6084,12 @@ var MatPrependArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6047
6084
  * item, or a list of them for an object item.
6048
6085
  */
6049
6086
  template: ArrayItemTemplateSchema,
6050
- type: z41.literal("prepend-array-item"),
6087
+ type: z43.literal("prepend-array-item"),
6051
6088
  /**
6052
6089
  * Key of the array field to prepend items to.
6053
6090
  * If omitted, uses the parent array context.
6054
6091
  */
6055
- arrayKey: z41.string().optional(),
6092
+ arrayKey: z43.string().optional(),
6056
6093
  props: MatButtonPropsSchema.optional()
6057
6094
  });
6058
6095
  var MatInsertArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
@@ -6061,38 +6098,38 @@ var MatInsertArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6061
6098
  * item, or a list of them for an object item.
6062
6099
  */
6063
6100
  template: ArrayItemTemplateSchema,
6064
- type: z41.literal("insert-array-item"),
6101
+ type: z43.literal("insert-array-item"),
6065
6102
  /**
6066
6103
  * Key of the array field to insert items into.
6067
6104
  * If omitted, uses the parent array context.
6068
6105
  */
6069
- arrayKey: z41.string().optional(),
6106
+ arrayKey: z43.string().optional(),
6070
6107
  /**
6071
6108
  * Index at which to insert the new item.
6072
6109
  */
6073
- index: z41.number(),
6110
+ index: z43.number(),
6074
6111
  props: MatButtonPropsSchema.optional()
6075
6112
  });
6076
6113
  var MatPopArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6077
- type: z41.literal("pop-array-item"),
6114
+ type: z43.literal("pop-array-item"),
6078
6115
  /**
6079
6116
  * Key of the array field to pop items from.
6080
6117
  */
6081
- arrayKey: z41.string(),
6118
+ arrayKey: z43.string(),
6082
6119
  props: MatButtonPropsSchema.optional()
6083
6120
  });
6084
6121
  var MatShiftArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6085
- type: z41.literal("shift-array-item"),
6122
+ type: z43.literal("shift-array-item"),
6086
6123
  /**
6087
6124
  * Key of the array field to shift items from.
6088
6125
  */
6089
- arrayKey: z41.string(),
6126
+ arrayKey: z43.string(),
6090
6127
  props: MatButtonPropsSchema.optional()
6091
6128
  });
6092
6129
 
6093
6130
  // internal/dynamic-forms-validation/material/src/mat-leaf-field.schema.ts
6094
- import { z as z42 } from "zod";
6095
- var MatLeafFieldSchema = z42.discriminatedUnion("type", [
6131
+ import { z as z44 } from "zod";
6132
+ var MatLeafFieldSchema = z44.discriminatedUnion("type", [
6096
6133
  // Default fields
6097
6134
  TextFieldSchema,
6098
6135
  HiddenFieldSchema,
@@ -6117,7 +6154,7 @@ var MatLeafFieldSchema = z42.discriminatedUnion("type", [
6117
6154
  MatInsertArrayItemButtonFieldSchema,
6118
6155
  MatPopArrayItemButtonFieldSchema,
6119
6156
  MatShiftArrayItemButtonFieldSchema
6120
- ]).superRefine(nullableValueRefine);
6157
+ ]).superRefine(nullableValueRefine).superRefine(inputValueTypeRefine);
6121
6158
 
6122
6159
  // internal/dynamic-forms-validation/material/src/mat-field.schema.ts
6123
6160
  var containerSchemas = createContainerSchemas({
@@ -6130,8 +6167,8 @@ var MatArrayFieldSchema = containerSchemas.ArrayFieldSchema;
6130
6167
  var MatFieldSchema = containerSchemas.AllFieldsSchema;
6131
6168
 
6132
6169
  // internal/dynamic-forms-validation/material/src/mat-form-config.schema.ts
6133
- import { z as z43 } from "zod";
6134
- var MatFormDefaultPropsSchema = z43.object({
6170
+ import { z as z45 } from "zod";
6171
+ var MatFormDefaultPropsSchema = z45.object({
6135
6172
  /**
6136
6173
  * Default form field appearance for all fields.
6137
6174
  */
@@ -6148,15 +6185,15 @@ var MatFormDefaultPropsSchema = z43.object({
6148
6185
  var MatFormConfigSchema = createFormConfigSchema(MatFieldSchema, MatFormDefaultPropsSchema);
6149
6186
 
6150
6187
  // internal/dynamic-forms-validation/bootstrap/src/props/index.ts
6151
- import { z as z45 } from "zod";
6188
+ import { z as z47 } from "zod";
6152
6189
 
6153
6190
  // internal/dynamic-forms-validation/bootstrap/src/props/bs-common-props.schema.ts
6154
- import { z as z44 } from "zod";
6155
- var BsSizeSchema = z44.enum(["sm", "lg"]);
6156
- var BsButtonVariantSchema = z44.enum(["primary", "secondary", "success", "danger", "warning", "info", "light", "dark", "link"]);
6157
- var BsFormFieldPropsSchema = z44.object({
6191
+ import { z as z46 } from "zod";
6192
+ var BsSizeSchema = z46.enum(["sm", "lg"]);
6193
+ var BsButtonVariantSchema = z46.enum(["primary", "secondary", "success", "danger", "warning", "info", "light", "dark", "link"]);
6194
+ var BsFormFieldPropsSchema = z46.object({
6158
6195
  size: BsSizeSchema.optional(),
6159
- floatingLabel: z44.boolean().optional(),
6196
+ floatingLabel: z46.boolean().optional(),
6160
6197
  hint: DynamicTextSchema.optional(),
6161
6198
  validFeedback: DynamicTextSchema.optional(),
6162
6199
  invalidFeedback: DynamicTextSchema.optional()
@@ -6164,94 +6201,94 @@ var BsFormFieldPropsSchema = z44.object({
6164
6201
 
6165
6202
  // internal/dynamic-forms-validation/bootstrap/src/props/index.ts
6166
6203
  var BsInputPropsSchema = BsFormFieldPropsSchema.extend({
6167
- type: z45.enum(["text", "email", "password", "number", "tel", "url"]).optional(),
6204
+ type: z47.enum(["text", "email", "password", "number", "tel", "url"]).optional(),
6168
6205
  placeholder: DynamicTextSchema.optional(),
6169
- plaintext: z45.boolean().optional()
6206
+ plaintext: z47.boolean().optional()
6170
6207
  });
6171
6208
  var BsTextareaPropsSchema = BsFormFieldPropsSchema.extend({
6172
- rows: z45.number().positive().optional(),
6209
+ rows: z47.number().positive().optional(),
6173
6210
  placeholder: DynamicTextSchema.optional()
6174
6211
  });
6175
6212
  var BsSelectPropsSchema = BsFormFieldPropsSchema.extend({
6176
- multiple: z45.boolean().optional(),
6177
- htmlSize: z45.number().positive().optional(),
6213
+ multiple: z47.boolean().optional(),
6214
+ htmlSize: z47.number().positive().optional(),
6178
6215
  placeholder: DynamicTextSchema.optional()
6179
6216
  });
6180
- var BsCheckboxPropsSchema = z45.object({
6181
- switch: z45.boolean().optional(),
6182
- inline: z45.boolean().optional(),
6183
- reverse: z45.boolean().optional(),
6184
- indeterminate: z45.boolean().optional(),
6217
+ var BsCheckboxPropsSchema = z47.object({
6218
+ switch: z47.boolean().optional(),
6219
+ inline: z47.boolean().optional(),
6220
+ reverse: z47.boolean().optional(),
6221
+ indeterminate: z47.boolean().optional(),
6185
6222
  hint: DynamicTextSchema.optional()
6186
6223
  });
6187
- var BsRadioPropsSchema = z45.object({
6188
- inline: z45.boolean().optional(),
6189
- reverse: z45.boolean().optional(),
6190
- buttonGroup: z45.boolean().optional(),
6224
+ var BsRadioPropsSchema = z47.object({
6225
+ inline: z47.boolean().optional(),
6226
+ reverse: z47.boolean().optional(),
6227
+ buttonGroup: z47.boolean().optional(),
6191
6228
  buttonSize: BsSizeSchema.optional(),
6192
6229
  hint: DynamicTextSchema.optional()
6193
6230
  });
6194
- var BsMultiCheckboxPropsSchema = z45.object({
6195
- switch: z45.boolean().optional(),
6196
- inline: z45.boolean().optional(),
6197
- reverse: z45.boolean().optional(),
6231
+ var BsMultiCheckboxPropsSchema = z47.object({
6232
+ switch: z47.boolean().optional(),
6233
+ inline: z47.boolean().optional(),
6234
+ reverse: z47.boolean().optional(),
6198
6235
  hint: DynamicTextSchema.optional()
6199
6236
  });
6200
- var BsTogglePropsSchema = z45.object({
6237
+ var BsTogglePropsSchema = z47.object({
6201
6238
  size: BsSizeSchema.optional(),
6202
- reverse: z45.boolean().optional(),
6203
- inline: z45.boolean().optional(),
6239
+ reverse: z47.boolean().optional(),
6240
+ inline: z47.boolean().optional(),
6204
6241
  hint: DynamicTextSchema.optional()
6205
6242
  });
6206
6243
  var BsDatepickerPropsSchema = BsFormFieldPropsSchema.extend({
6207
- useNgBootstrap: z45.boolean().optional(),
6208
- displayMonths: z45.number().positive().optional(),
6209
- navigation: z45.enum(["select", "arrows", "none"]).optional(),
6210
- outsideDays: z45.enum(["visible", "collapsed", "hidden"]).optional(),
6211
- showWeekNumbers: z45.boolean().optional(),
6244
+ useNgBootstrap: z47.boolean().optional(),
6245
+ displayMonths: z47.number().positive().optional(),
6246
+ navigation: z47.enum(["select", "arrows", "none"]).optional(),
6247
+ outsideDays: z47.enum(["visible", "collapsed", "hidden"]).optional(),
6248
+ showWeekNumbers: z47.boolean().optional(),
6212
6249
  placeholder: DynamicTextSchema.optional()
6213
6250
  });
6214
- var BsSliderPropsSchema = z45.object({
6215
- showValue: z45.boolean().optional(),
6216
- valuePrefix: z45.string().optional(),
6217
- valueSuffix: z45.string().optional(),
6251
+ var BsSliderPropsSchema = z47.object({
6252
+ showValue: z47.boolean().optional(),
6253
+ valuePrefix: z47.string().optional(),
6254
+ valueSuffix: z47.string().optional(),
6218
6255
  hint: DynamicTextSchema.optional(),
6219
- min: z45.number().optional(),
6220
- max: z45.number().optional(),
6221
- step: z45.number().positive().optional()
6256
+ min: z47.number().optional(),
6257
+ max: z47.number().optional(),
6258
+ step: z47.number().positive().optional()
6222
6259
  });
6223
- var BsButtonPropsSchema = z45.object({
6260
+ var BsButtonPropsSchema = z47.object({
6224
6261
  variant: BsButtonVariantSchema.optional(),
6225
- outline: z45.boolean().optional(),
6262
+ outline: z47.boolean().optional(),
6226
6263
  size: BsSizeSchema.optional(),
6227
- block: z45.boolean().optional(),
6228
- active: z45.boolean().optional(),
6229
- type: z45.enum(["button", "submit", "reset"]).optional()
6264
+ block: z47.boolean().optional(),
6265
+ active: z47.boolean().optional(),
6266
+ type: z47.enum(["button", "submit", "reset"]).optional()
6230
6267
  });
6231
6268
 
6232
6269
  // internal/dynamic-forms-validation/bootstrap/src/fields/index.ts
6233
- import { z as z46 } from "zod";
6270
+ import { z as z48 } from "zod";
6234
6271
  var BsValueFieldBase = BaseFieldDefSchema.merge(FieldWithValidationSchema);
6235
6272
  var BsInputFieldSchemaObject = BsValueFieldBase.extend({
6236
- type: z46.literal("input"),
6237
- nullable: z46.boolean().optional(),
6238
- value: z46.string().nullable().optional(),
6273
+ type: z48.literal("input"),
6274
+ nullable: z48.boolean().optional(),
6275
+ value: InputValueSchema,
6239
6276
  placeholder: DynamicTextSchema.optional(),
6240
6277
  props: BsInputPropsSchema.optional()
6241
6278
  });
6242
- var BsInputFieldSchema = BsInputFieldSchemaObject.superRefine(nullableValueRefine);
6279
+ var BsInputFieldSchema = BsInputFieldSchemaObject.superRefine(nullableValueRefine).superRefine(inputValueTypeRefine);
6243
6280
  var BsTextareaFieldSchemaObject = BsValueFieldBase.extend({
6244
- type: z46.literal("textarea"),
6245
- nullable: z46.boolean().optional(),
6246
- value: z46.string().nullable().optional(),
6281
+ type: z48.literal("textarea"),
6282
+ nullable: z48.boolean().optional(),
6283
+ value: z48.string().nullable().optional(),
6247
6284
  placeholder: DynamicTextSchema.optional(),
6248
6285
  props: BsTextareaPropsSchema.optional()
6249
6286
  });
6250
6287
  var BsTextareaFieldSchema = BsTextareaFieldSchemaObject.superRefine(nullableValueRefine);
6251
6288
  var BsSelectFieldSchemaObject = BsValueFieldBase.extend({
6252
- type: z46.literal("select"),
6253
- nullable: z46.boolean().optional(),
6254
- value: z46.string().nullable().optional(),
6289
+ type: z48.literal("select"),
6290
+ nullable: z48.boolean().optional(),
6291
+ value: z48.string().nullable().optional(),
6255
6292
  // Bootstrap select only supports strings
6256
6293
  placeholder: DynamicTextSchema.optional(),
6257
6294
  options: FieldOptionsSchema,
@@ -6259,76 +6296,76 @@ var BsSelectFieldSchemaObject = BsValueFieldBase.extend({
6259
6296
  });
6260
6297
  var BsSelectFieldSchema = BsSelectFieldSchemaObject.superRefine(nullableValueRefine);
6261
6298
  var BsCheckboxFieldSchema = BsValueFieldBase.extend({
6262
- type: z46.literal("checkbox"),
6263
- value: z46.boolean().optional(),
6299
+ type: z48.literal("checkbox"),
6300
+ value: z48.boolean().optional(),
6264
6301
  placeholder: DynamicTextSchema.optional(),
6265
6302
  props: BsCheckboxPropsSchema.optional()
6266
6303
  });
6267
6304
  var BsRadioFieldSchemaObject = BsValueFieldBase.extend({
6268
- type: z46.literal("radio"),
6269
- nullable: z46.boolean().optional(),
6270
- value: z46.unknown().nullable().optional(),
6305
+ type: z48.literal("radio"),
6306
+ nullable: z48.boolean().optional(),
6307
+ value: z48.unknown().nullable().optional(),
6271
6308
  placeholder: DynamicTextSchema.optional(),
6272
6309
  options: FieldOptionsSchema,
6273
6310
  props: BsRadioPropsSchema.optional()
6274
6311
  });
6275
6312
  var BsRadioFieldSchema = BsRadioFieldSchemaObject.superRefine(nullableValueRefine);
6276
6313
  var BsMultiCheckboxFieldSchemaObject = BsValueFieldBase.extend({
6277
- type: z46.literal("multi-checkbox"),
6278
- nullable: z46.boolean().optional(),
6279
- value: z46.array(z46.unknown()).nullable().optional(),
6314
+ type: z48.literal("multi-checkbox"),
6315
+ nullable: z48.boolean().optional(),
6316
+ value: z48.array(z48.unknown()).nullable().optional(),
6280
6317
  placeholder: DynamicTextSchema.optional(),
6281
6318
  options: FieldOptionsSchema,
6282
6319
  props: BsMultiCheckboxPropsSchema.optional()
6283
6320
  });
6284
6321
  var BsMultiCheckboxFieldSchema = BsMultiCheckboxFieldSchemaObject.superRefine(nullableValueRefine);
6285
6322
  var BsToggleFieldSchema = BsValueFieldBase.extend({
6286
- type: z46.literal("toggle"),
6287
- value: z46.boolean().optional(),
6323
+ type: z48.literal("toggle"),
6324
+ value: z48.boolean().optional(),
6288
6325
  placeholder: DynamicTextSchema.optional(),
6289
6326
  props: BsTogglePropsSchema.optional()
6290
6327
  });
6291
6328
  var BsDatepickerFieldSchemaObject = BsValueFieldBase.extend({
6292
- type: z46.literal("datepicker"),
6293
- nullable: z46.boolean().optional(),
6294
- value: z46.union([z46.string(), z46.null()]).optional(),
6295
- minDate: z46.union([z46.string(), z46.null()]).optional(),
6296
- maxDate: z46.union([z46.string(), z46.null()]).optional(),
6297
- startAt: z46.union([z46.string(), z46.null()]).optional(),
6329
+ type: z48.literal("datepicker"),
6330
+ nullable: z48.boolean().optional(),
6331
+ value: DatepickerValueSchema,
6332
+ minDate: z48.union([z48.string(), z48.null()]).optional(),
6333
+ maxDate: z48.union([z48.string(), z48.null()]).optional(),
6334
+ startAt: z48.union([z48.string(), z48.null()]).optional(),
6298
6335
  placeholder: DynamicTextSchema.optional(),
6299
6336
  props: BsDatepickerPropsSchema.optional()
6300
6337
  });
6301
6338
  var BsDatepickerFieldSchema = BsDatepickerFieldSchemaObject.superRefine(nullableValueRefine);
6302
6339
  var BsSliderFieldSchemaObject = BsValueFieldBase.extend({
6303
- type: z46.literal("slider"),
6304
- nullable: z46.boolean().optional(),
6305
- value: z46.number().nullable().optional(),
6306
- minValue: z46.number().optional(),
6307
- maxValue: z46.number().optional(),
6308
- step: z46.number().positive().optional(),
6340
+ type: z48.literal("slider"),
6341
+ nullable: z48.boolean().optional(),
6342
+ value: SliderValueSchema,
6343
+ minValue: z48.number().optional(),
6344
+ maxValue: z48.number().optional(),
6345
+ step: z48.number().positive().optional(),
6309
6346
  placeholder: DynamicTextSchema.optional(),
6310
6347
  props: BsSliderPropsSchema.optional()
6311
6348
  });
6312
6349
  var BsSliderFieldSchema = BsSliderFieldSchemaObject.superRefine(nullableValueRefine);
6313
6350
  var BsButtonFieldSchema = BaseFieldDefSchema.extend({
6314
- type: z46.literal("button"),
6315
- event: z46.string().optional(),
6316
- eventArgs: z46.array(z46.union([z46.string(), z46.number(), z46.boolean(), z46.null(), z46.undefined()])).optional(),
6351
+ type: z48.literal("button"),
6352
+ event: z48.string().optional(),
6353
+ eventArgs: z48.array(z48.union([z48.string(), z48.number(), z48.boolean(), z48.null(), z48.undefined()])).optional(),
6317
6354
  props: BsButtonPropsSchema.optional(),
6318
6355
  logic: LogicArraySchema.optional()
6319
6356
  });
6320
6357
  var BsSubmitButtonFieldSchema = BaseFieldDefSchema.extend({
6321
- type: z46.literal("submit"),
6358
+ type: z48.literal("submit"),
6322
6359
  props: BsButtonPropsSchema.optional(),
6323
6360
  logic: LogicArraySchema.optional()
6324
6361
  });
6325
6362
  var BsNextButtonFieldSchema = BaseFieldDefSchema.extend({
6326
- type: z46.literal("next"),
6363
+ type: z48.literal("next"),
6327
6364
  props: BsButtonPropsSchema.optional(),
6328
6365
  logic: LogicArraySchema.optional()
6329
6366
  });
6330
6367
  var BsPreviousButtonFieldSchema = BaseFieldDefSchema.extend({
6331
- type: z46.literal("previous"),
6368
+ type: z48.literal("previous"),
6332
6369
  props: BsButtonPropsSchema.optional()
6333
6370
  });
6334
6371
  var BsAddArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
@@ -6337,13 +6374,13 @@ var BsAddArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6337
6374
  * item, or a list of them for an object item.
6338
6375
  */
6339
6376
  template: ArrayItemTemplateSchema,
6340
- type: z46.literal("add-array-item"),
6341
- arrayKey: z46.string().optional(),
6377
+ type: z48.literal("add-array-item"),
6378
+ arrayKey: z48.string().optional(),
6342
6379
  props: BsButtonPropsSchema.optional()
6343
6380
  });
6344
6381
  var BsRemoveArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6345
- type: z46.literal("remove-array-item"),
6346
- arrayKey: z46.string().optional(),
6382
+ type: z48.literal("remove-array-item"),
6383
+ arrayKey: z48.string().optional(),
6347
6384
  props: BsButtonPropsSchema.optional()
6348
6385
  });
6349
6386
  var BsPrependArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
@@ -6352,8 +6389,8 @@ var BsPrependArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6352
6389
  * item, or a list of them for an object item.
6353
6390
  */
6354
6391
  template: ArrayItemTemplateSchema,
6355
- type: z46.literal("prepend-array-item"),
6356
- arrayKey: z46.string().optional(),
6392
+ type: z48.literal("prepend-array-item"),
6393
+ arrayKey: z48.string().optional(),
6357
6394
  props: BsButtonPropsSchema.optional()
6358
6395
  });
6359
6396
  var BsInsertArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
@@ -6362,25 +6399,25 @@ var BsInsertArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6362
6399
  * item, or a list of them for an object item.
6363
6400
  */
6364
6401
  template: ArrayItemTemplateSchema,
6365
- type: z46.literal("insert-array-item"),
6366
- arrayKey: z46.string().optional(),
6367
- index: z46.number(),
6402
+ type: z48.literal("insert-array-item"),
6403
+ arrayKey: z48.string().optional(),
6404
+ index: z48.number(),
6368
6405
  props: BsButtonPropsSchema.optional()
6369
6406
  });
6370
6407
  var BsPopArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6371
- type: z46.literal("pop-array-item"),
6372
- arrayKey: z46.string(),
6408
+ type: z48.literal("pop-array-item"),
6409
+ arrayKey: z48.string(),
6373
6410
  props: BsButtonPropsSchema.optional()
6374
6411
  });
6375
6412
  var BsShiftArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6376
- type: z46.literal("shift-array-item"),
6377
- arrayKey: z46.string(),
6413
+ type: z48.literal("shift-array-item"),
6414
+ arrayKey: z48.string(),
6378
6415
  props: BsButtonPropsSchema.optional()
6379
6416
  });
6380
6417
 
6381
6418
  // internal/dynamic-forms-validation/bootstrap/src/bs-leaf-field.schema.ts
6382
- import { z as z47 } from "zod";
6383
- var BsLeafFieldSchema = z47.discriminatedUnion("type", [
6419
+ import { z as z49 } from "zod";
6420
+ var BsLeafFieldSchema = z49.discriminatedUnion("type", [
6384
6421
  TextFieldSchema,
6385
6422
  HiddenFieldSchema,
6386
6423
  BsInputFieldSchemaObject,
@@ -6402,10 +6439,10 @@ var BsLeafFieldSchema = z47.discriminatedUnion("type", [
6402
6439
  BsInsertArrayItemButtonFieldSchema,
6403
6440
  BsPopArrayItemButtonFieldSchema,
6404
6441
  BsShiftArrayItemButtonFieldSchema
6405
- ]).superRefine(nullableValueRefine);
6442
+ ]).superRefine(nullableValueRefine).superRefine(inputValueTypeRefine);
6406
6443
 
6407
6444
  // internal/dynamic-forms-validation/bootstrap/src/bs-form-config.schema.ts
6408
- import { z as z48 } from "zod";
6445
+ import { z as z50 } from "zod";
6409
6446
  var containerSchemas2 = createContainerSchemas({
6410
6447
  leafFieldSchema: BsLeafFieldSchema
6411
6448
  });
@@ -6414,173 +6451,173 @@ var BsRowFieldSchema = containerSchemas2.RowFieldSchema;
6414
6451
  var BsGroupFieldSchema = containerSchemas2.GroupFieldSchema;
6415
6452
  var BsArrayFieldSchema = containerSchemas2.ArrayFieldSchema;
6416
6453
  var BsFieldSchema = containerSchemas2.AllFieldsSchema;
6417
- var BsFormDefaultPropsSchema = z48.object({
6454
+ var BsFormDefaultPropsSchema = z50.object({
6418
6455
  size: BsSizeSchema.optional(),
6419
- floatingLabel: z48.boolean().optional()
6456
+ floatingLabel: z50.boolean().optional()
6420
6457
  });
6421
6458
  var BsFormConfigSchema = createFormConfigSchema(BsFieldSchema, BsFormDefaultPropsSchema);
6422
6459
 
6423
6460
  // internal/dynamic-forms-validation/primeng/src/props/index.ts
6424
- import { z as z49 } from "zod";
6425
- var PrimeSeveritySchema = z49.enum(["primary", "secondary", "success", "info", "warn", "danger", "help", "contrast"]);
6426
- var PrimeCommonPropsSchema = z49.object({
6427
- styleClass: z49.string().optional(),
6461
+ import { z as z51 } from "zod";
6462
+ var PrimeSeveritySchema = z51.enum(["primary", "secondary", "success", "info", "warn", "danger", "help", "contrast"]);
6463
+ var PrimeCommonPropsSchema = z51.object({
6464
+ styleClass: z51.string().optional(),
6428
6465
  hint: DynamicTextSchema.optional()
6429
6466
  });
6430
6467
  var PrimeInputPropsSchema = PrimeCommonPropsSchema.extend({
6431
- type: z49.enum(["text", "email", "password", "number", "tel", "url"]).optional(),
6468
+ type: z51.enum(["text", "email", "password", "number", "tel", "url"]).optional(),
6432
6469
  placeholder: DynamicTextSchema.optional(),
6433
- size: z49.enum(["small", "large"]).optional(),
6434
- variant: z49.enum(["outlined", "filled"]).optional()
6470
+ size: z51.enum(["small", "large"]).optional(),
6471
+ variant: z51.enum(["outlined", "filled"]).optional()
6435
6472
  });
6436
6473
  var PrimeCheckboxPropsSchema = PrimeCommonPropsSchema.extend({
6437
- binary: z49.boolean().optional(),
6438
- trueValue: z49.unknown().optional(),
6439
- falseValue: z49.unknown().optional()
6474
+ binary: z51.boolean().optional(),
6475
+ trueValue: z51.unknown().optional(),
6476
+ falseValue: z51.unknown().optional()
6440
6477
  });
6441
6478
  var PrimeRadioPropsSchema = PrimeCommonPropsSchema.extend({
6442
- name: z49.string().optional()
6479
+ name: z51.string().optional()
6443
6480
  });
6444
6481
  var PrimeSelectPropsSchema = PrimeCommonPropsSchema.extend({
6445
- multiple: z49.boolean().optional(),
6446
- filter: z49.boolean().optional(),
6482
+ multiple: z51.boolean().optional(),
6483
+ filter: z51.boolean().optional(),
6447
6484
  placeholder: DynamicTextSchema.optional(),
6448
- showClear: z49.boolean().optional()
6485
+ showClear: z51.boolean().optional()
6449
6486
  });
6450
6487
  var PrimeMultiCheckboxPropsSchema = PrimeCommonPropsSchema;
6451
6488
  var PrimeDatepickerPropsSchema = PrimeCommonPropsSchema.extend({
6452
- dateFormat: z49.string().optional(),
6453
- inline: z49.boolean().optional(),
6454
- showIcon: z49.boolean().optional(),
6455
- showButtonBar: z49.boolean().optional(),
6456
- selectionMode: z49.enum(["single", "multiple", "range"]).optional(),
6457
- touchUI: z49.boolean().optional(),
6458
- view: z49.enum(["date", "month", "year"]).optional(),
6489
+ dateFormat: z51.string().optional(),
6490
+ inline: z51.boolean().optional(),
6491
+ showIcon: z51.boolean().optional(),
6492
+ showButtonBar: z51.boolean().optional(),
6493
+ selectionMode: z51.enum(["single", "multiple", "range"]).optional(),
6494
+ touchUI: z51.boolean().optional(),
6495
+ view: z51.enum(["date", "month", "year"]).optional(),
6459
6496
  placeholder: DynamicTextSchema.optional()
6460
6497
  });
6461
6498
  var PrimeTextareaPropsSchema = PrimeCommonPropsSchema.extend({
6462
- rows: z49.number().positive().optional(),
6463
- autoResize: z49.boolean().optional(),
6499
+ rows: z51.number().positive().optional(),
6500
+ autoResize: z51.boolean().optional(),
6464
6501
  placeholder: DynamicTextSchema.optional()
6465
6502
  });
6466
6503
  var PrimeSliderPropsSchema = PrimeCommonPropsSchema.extend({
6467
- min: z49.number().optional(),
6468
- max: z49.number().optional(),
6469
- step: z49.number().positive().optional(),
6470
- range: z49.boolean().optional(),
6471
- orientation: z49.enum(["horizontal", "vertical"]).optional()
6504
+ min: z51.number().optional(),
6505
+ max: z51.number().optional(),
6506
+ step: z51.number().positive().optional(),
6507
+ range: z51.boolean().optional(),
6508
+ orientation: z51.enum(["horizontal", "vertical"]).optional()
6472
6509
  });
6473
6510
  var PrimeTogglePropsSchema = PrimeCommonPropsSchema;
6474
- var PrimeButtonPropsSchema = z49.object({
6511
+ var PrimeButtonPropsSchema = z51.object({
6475
6512
  severity: PrimeSeveritySchema.optional(),
6476
- text: z49.boolean().optional(),
6477
- outlined: z49.boolean().optional(),
6478
- raised: z49.boolean().optional(),
6479
- rounded: z49.boolean().optional(),
6480
- icon: z49.string().optional(),
6481
- iconPos: z49.enum(["left", "right", "top", "bottom"]).optional(),
6482
- type: z49.enum(["button", "submit", "reset"]).optional()
6513
+ text: z51.boolean().optional(),
6514
+ outlined: z51.boolean().optional(),
6515
+ raised: z51.boolean().optional(),
6516
+ rounded: z51.boolean().optional(),
6517
+ icon: z51.string().optional(),
6518
+ iconPos: z51.enum(["left", "right", "top", "bottom"]).optional(),
6519
+ type: z51.enum(["button", "submit", "reset"]).optional()
6483
6520
  });
6484
6521
 
6485
6522
  // internal/dynamic-forms-validation/primeng/src/fields/index.ts
6486
- import { z as z50 } from "zod";
6523
+ import { z as z52 } from "zod";
6487
6524
  var PrimeValueFieldBase = BaseFieldDefSchema.merge(FieldWithValidationSchema);
6488
6525
  var PrimeInputFieldSchemaObject = PrimeValueFieldBase.extend({
6489
- type: z50.literal("input"),
6490
- nullable: z50.boolean().optional(),
6491
- value: z50.string().nullable().optional(),
6526
+ type: z52.literal("input"),
6527
+ nullable: z52.boolean().optional(),
6528
+ value: InputValueSchema,
6492
6529
  placeholder: DynamicTextSchema.optional(),
6493
6530
  props: PrimeInputPropsSchema.optional()
6494
6531
  });
6495
- var PrimeInputFieldSchema = PrimeInputFieldSchemaObject.superRefine(nullableValueRefine);
6532
+ var PrimeInputFieldSchema = PrimeInputFieldSchemaObject.superRefine(nullableValueRefine).superRefine(inputValueTypeRefine);
6496
6533
  var PrimeCheckboxFieldSchema = PrimeValueFieldBase.extend({
6497
- type: z50.literal("checkbox"),
6498
- value: z50.boolean().optional(),
6534
+ type: z52.literal("checkbox"),
6535
+ value: z52.boolean().optional(),
6499
6536
  placeholder: DynamicTextSchema.optional(),
6500
6537
  props: PrimeCheckboxPropsSchema.optional()
6501
6538
  });
6502
6539
  var PrimeRadioFieldSchemaObject = PrimeValueFieldBase.extend({
6503
- type: z50.literal("radio"),
6504
- nullable: z50.boolean().optional(),
6505
- value: z50.unknown().nullable().optional(),
6540
+ type: z52.literal("radio"),
6541
+ nullable: z52.boolean().optional(),
6542
+ value: z52.unknown().nullable().optional(),
6506
6543
  placeholder: DynamicTextSchema.optional(),
6507
6544
  options: FieldOptionsSchema,
6508
6545
  props: PrimeRadioPropsSchema.optional()
6509
6546
  });
6510
6547
  var PrimeRadioFieldSchema = PrimeRadioFieldSchemaObject.superRefine(nullableValueRefine);
6511
6548
  var PrimeSelectFieldSchemaObject = PrimeValueFieldBase.extend({
6512
- type: z50.literal("select"),
6513
- nullable: z50.boolean().optional(),
6514
- value: z50.unknown().nullable().optional(),
6549
+ type: z52.literal("select"),
6550
+ nullable: z52.boolean().optional(),
6551
+ value: z52.unknown().nullable().optional(),
6515
6552
  placeholder: DynamicTextSchema.optional(),
6516
6553
  options: FieldOptionsSchema,
6517
6554
  props: PrimeSelectPropsSchema.optional()
6518
6555
  });
6519
6556
  var PrimeSelectFieldSchema = PrimeSelectFieldSchemaObject.superRefine(nullableValueRefine);
6520
6557
  var PrimeMultiCheckboxFieldSchemaObject = PrimeValueFieldBase.extend({
6521
- type: z50.literal("multi-checkbox"),
6522
- nullable: z50.boolean().optional(),
6523
- value: z50.array(z50.unknown()).nullable().optional(),
6558
+ type: z52.literal("multi-checkbox"),
6559
+ nullable: z52.boolean().optional(),
6560
+ value: z52.array(z52.unknown()).nullable().optional(),
6524
6561
  placeholder: DynamicTextSchema.optional(),
6525
6562
  options: FieldOptionsSchema,
6526
6563
  props: PrimeMultiCheckboxPropsSchema.optional()
6527
6564
  });
6528
6565
  var PrimeMultiCheckboxFieldSchema = PrimeMultiCheckboxFieldSchemaObject.superRefine(nullableValueRefine);
6529
6566
  var PrimeDatepickerFieldSchemaObject = PrimeValueFieldBase.extend({
6530
- type: z50.literal("datepicker"),
6531
- nullable: z50.boolean().optional(),
6532
- value: z50.union([z50.string(), z50.null()]).optional(),
6533
- minDate: z50.union([z50.string(), z50.null()]).optional(),
6534
- maxDate: z50.union([z50.string(), z50.null()]).optional(),
6535
- startAt: z50.union([z50.string(), z50.null()]).optional(),
6567
+ type: z52.literal("datepicker"),
6568
+ nullable: z52.boolean().optional(),
6569
+ value: DatepickerValueSchema,
6570
+ minDate: z52.union([z52.string(), z52.null()]).optional(),
6571
+ maxDate: z52.union([z52.string(), z52.null()]).optional(),
6572
+ startAt: z52.union([z52.string(), z52.null()]).optional(),
6536
6573
  placeholder: DynamicTextSchema.optional(),
6537
6574
  props: PrimeDatepickerPropsSchema.optional()
6538
6575
  });
6539
6576
  var PrimeDatepickerFieldSchema = PrimeDatepickerFieldSchemaObject.superRefine(nullableValueRefine);
6540
6577
  var PrimeTextareaFieldSchemaObject = PrimeValueFieldBase.extend({
6541
- type: z50.literal("textarea"),
6542
- nullable: z50.boolean().optional(),
6543
- value: z50.string().nullable().optional(),
6578
+ type: z52.literal("textarea"),
6579
+ nullable: z52.boolean().optional(),
6580
+ value: z52.string().nullable().optional(),
6544
6581
  placeholder: DynamicTextSchema.optional(),
6545
6582
  props: PrimeTextareaPropsSchema.optional()
6546
6583
  });
6547
6584
  var PrimeTextareaFieldSchema = PrimeTextareaFieldSchemaObject.superRefine(nullableValueRefine);
6548
6585
  var PrimeSliderFieldSchemaObject = PrimeValueFieldBase.extend({
6549
- type: z50.literal("slider"),
6550
- nullable: z50.boolean().optional(),
6551
- value: z50.number().nullable().optional(),
6552
- minValue: z50.number().optional(),
6553
- maxValue: z50.number().optional(),
6554
- step: z50.number().positive().optional(),
6586
+ type: z52.literal("slider"),
6587
+ nullable: z52.boolean().optional(),
6588
+ value: SliderValueSchema,
6589
+ minValue: z52.number().optional(),
6590
+ maxValue: z52.number().optional(),
6591
+ step: z52.number().positive().optional(),
6555
6592
  placeholder: DynamicTextSchema.optional(),
6556
6593
  props: PrimeSliderPropsSchema.optional()
6557
6594
  });
6558
6595
  var PrimeSliderFieldSchema = PrimeSliderFieldSchemaObject.superRefine(nullableValueRefine);
6559
6596
  var PrimeToggleFieldSchema = PrimeValueFieldBase.extend({
6560
- type: z50.literal("toggle"),
6561
- value: z50.boolean().optional(),
6597
+ type: z52.literal("toggle"),
6598
+ value: z52.boolean().optional(),
6562
6599
  placeholder: DynamicTextSchema.optional(),
6563
6600
  props: PrimeTogglePropsSchema.optional()
6564
6601
  });
6565
6602
  var PrimeButtonFieldSchema = BaseFieldDefSchema.extend({
6566
- type: z50.literal("button"),
6567
- event: z50.string().optional(),
6568
- eventArgs: z50.array(z50.union([z50.string(), z50.number(), z50.boolean(), z50.null(), z50.undefined()])).optional(),
6603
+ type: z52.literal("button"),
6604
+ event: z52.string().optional(),
6605
+ eventArgs: z52.array(z52.union([z52.string(), z52.number(), z52.boolean(), z52.null(), z52.undefined()])).optional(),
6569
6606
  props: PrimeButtonPropsSchema.optional(),
6570
6607
  logic: LogicArraySchema.optional()
6571
6608
  });
6572
6609
  var PrimeSubmitButtonFieldSchema = BaseFieldDefSchema.extend({
6573
- type: z50.literal("submit"),
6610
+ type: z52.literal("submit"),
6574
6611
  props: PrimeButtonPropsSchema.optional(),
6575
6612
  logic: LogicArraySchema.optional()
6576
6613
  });
6577
6614
  var PrimeNextButtonFieldSchema = BaseFieldDefSchema.extend({
6578
- type: z50.literal("next"),
6615
+ type: z52.literal("next"),
6579
6616
  props: PrimeButtonPropsSchema.optional(),
6580
6617
  logic: LogicArraySchema.optional()
6581
6618
  });
6582
6619
  var PrimePreviousButtonFieldSchema = BaseFieldDefSchema.extend({
6583
- type: z50.literal("previous"),
6620
+ type: z52.literal("previous"),
6584
6621
  props: PrimeButtonPropsSchema.optional()
6585
6622
  });
6586
6623
  var PrimeAddArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
@@ -6589,13 +6626,13 @@ var PrimeAddArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6589
6626
  * item, or a list of them for an object item.
6590
6627
  */
6591
6628
  template: ArrayItemTemplateSchema,
6592
- type: z50.literal("add-array-item"),
6593
- arrayKey: z50.string().optional(),
6629
+ type: z52.literal("add-array-item"),
6630
+ arrayKey: z52.string().optional(),
6594
6631
  props: PrimeButtonPropsSchema.optional()
6595
6632
  });
6596
6633
  var PrimeRemoveArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6597
- type: z50.literal("remove-array-item"),
6598
- arrayKey: z50.string().optional(),
6634
+ type: z52.literal("remove-array-item"),
6635
+ arrayKey: z52.string().optional(),
6599
6636
  props: PrimeButtonPropsSchema.optional()
6600
6637
  });
6601
6638
  var PrimePrependArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
@@ -6604,8 +6641,8 @@ var PrimePrependArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6604
6641
  * item, or a list of them for an object item.
6605
6642
  */
6606
6643
  template: ArrayItemTemplateSchema,
6607
- type: z50.literal("prepend-array-item"),
6608
- arrayKey: z50.string().optional(),
6644
+ type: z52.literal("prepend-array-item"),
6645
+ arrayKey: z52.string().optional(),
6609
6646
  props: PrimeButtonPropsSchema.optional()
6610
6647
  });
6611
6648
  var PrimeInsertArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
@@ -6614,25 +6651,25 @@ var PrimeInsertArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6614
6651
  * item, or a list of them for an object item.
6615
6652
  */
6616
6653
  template: ArrayItemTemplateSchema,
6617
- type: z50.literal("insert-array-item"),
6618
- arrayKey: z50.string().optional(),
6619
- index: z50.number(),
6654
+ type: z52.literal("insert-array-item"),
6655
+ arrayKey: z52.string().optional(),
6656
+ index: z52.number(),
6620
6657
  props: PrimeButtonPropsSchema.optional()
6621
6658
  });
6622
6659
  var PrimePopArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6623
- type: z50.literal("pop-array-item"),
6624
- arrayKey: z50.string(),
6660
+ type: z52.literal("pop-array-item"),
6661
+ arrayKey: z52.string(),
6625
6662
  props: PrimeButtonPropsSchema.optional()
6626
6663
  });
6627
6664
  var PrimeShiftArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6628
- type: z50.literal("shift-array-item"),
6629
- arrayKey: z50.string(),
6665
+ type: z52.literal("shift-array-item"),
6666
+ arrayKey: z52.string(),
6630
6667
  props: PrimeButtonPropsSchema.optional()
6631
6668
  });
6632
6669
 
6633
6670
  // internal/dynamic-forms-validation/primeng/src/prime-leaf-field.schema.ts
6634
- import { z as z51 } from "zod";
6635
- var PrimeLeafFieldSchema = z51.discriminatedUnion("type", [
6671
+ import { z as z53 } from "zod";
6672
+ var PrimeLeafFieldSchema = z53.discriminatedUnion("type", [
6636
6673
  TextFieldSchema,
6637
6674
  HiddenFieldSchema,
6638
6675
  PrimeInputFieldSchemaObject,
@@ -6654,10 +6691,10 @@ var PrimeLeafFieldSchema = z51.discriminatedUnion("type", [
6654
6691
  PrimeInsertArrayItemButtonFieldSchema,
6655
6692
  PrimePopArrayItemButtonFieldSchema,
6656
6693
  PrimeShiftArrayItemButtonFieldSchema
6657
- ]).superRefine(nullableValueRefine);
6694
+ ]).superRefine(nullableValueRefine).superRefine(inputValueTypeRefine);
6658
6695
 
6659
6696
  // internal/dynamic-forms-validation/primeng/src/prime-form-config.schema.ts
6660
- import { z as z52 } from "zod";
6697
+ import { z as z54 } from "zod";
6661
6698
  var containerSchemas3 = createContainerSchemas({
6662
6699
  leafFieldSchema: PrimeLeafFieldSchema
6663
6700
  });
@@ -6666,13 +6703,13 @@ var PrimeRowFieldSchema = containerSchemas3.RowFieldSchema;
6666
6703
  var PrimeGroupFieldSchema = containerSchemas3.GroupFieldSchema;
6667
6704
  var PrimeArrayFieldSchema = containerSchemas3.ArrayFieldSchema;
6668
6705
  var PrimeFieldSchema = containerSchemas3.AllFieldsSchema;
6669
- var PrimeFormDefaultPropsSchema = z52.object({
6670
- styleClass: z52.string().optional()
6706
+ var PrimeFormDefaultPropsSchema = z54.object({
6707
+ styleClass: z54.string().optional()
6671
6708
  });
6672
6709
  var PrimeFormConfigSchema = createFormConfigSchema(PrimeFieldSchema, PrimeFormDefaultPropsSchema);
6673
6710
 
6674
6711
  // internal/dynamic-forms-validation/ionic/src/props/index.ts
6675
- import { z as z53 } from "zod";
6712
+ import { z as z55 } from "zod";
6676
6713
  function isLocaleTag(value) {
6677
6714
  try {
6678
6715
  return Intl.getCanonicalLocales(value).length > 0;
@@ -6680,209 +6717,209 @@ function isLocaleTag(value) {
6680
6717
  return false;
6681
6718
  }
6682
6719
  }
6683
- var IonicColorSchema = z53.enum(["primary", "secondary", "tertiary", "success", "warning", "danger", "light", "medium", "dark"]);
6684
- var IonicLabelPlacementSchema = z53.enum(["start", "end", "fixed", "stacked", "floating"]);
6685
- var IonicJustifySchema = z53.enum(["start", "end", "space-between"]);
6686
- var IonicFillSchema = z53.enum(["solid", "outline", "clear", "default"]);
6687
- var IonicInputPropsSchema = z53.object({
6688
- fill: z53.enum(["solid", "outline"]).optional(),
6689
- shape: z53.literal("round").optional(),
6720
+ var IonicColorSchema = z55.enum(["primary", "secondary", "tertiary", "success", "warning", "danger", "light", "medium", "dark"]);
6721
+ var IonicLabelPlacementSchema = z55.enum(["start", "end", "fixed", "stacked", "floating"]);
6722
+ var IonicJustifySchema = z55.enum(["start", "end", "space-between"]);
6723
+ var IonicFillSchema = z55.enum(["solid", "outline", "clear", "default"]);
6724
+ var IonicInputPropsSchema = z55.object({
6725
+ fill: z55.enum(["solid", "outline"]).optional(),
6726
+ shape: z55.literal("round").optional(),
6690
6727
  labelPlacement: IonicLabelPlacementSchema.optional(),
6691
6728
  color: IonicColorSchema.optional(),
6692
6729
  hint: DynamicTextSchema.optional(),
6693
6730
  errorText: DynamicTextSchema.optional(),
6694
- counter: z53.boolean().optional(),
6695
- clearInput: z53.boolean().optional(),
6696
- type: z53.enum(["text", "email", "password", "number", "tel", "url", "search"]).optional(),
6731
+ counter: z55.boolean().optional(),
6732
+ clearInput: z55.boolean().optional(),
6733
+ type: z55.enum(["text", "email", "password", "number", "tel", "url", "search"]).optional(),
6697
6734
  placeholder: DynamicTextSchema.optional()
6698
6735
  });
6699
- var IonicCheckboxPropsSchema = z53.object({
6700
- labelPlacement: z53.enum(["start", "end", "fixed", "stacked"]).optional(),
6736
+ var IonicCheckboxPropsSchema = z55.object({
6737
+ labelPlacement: z55.enum(["start", "end", "fixed", "stacked"]).optional(),
6701
6738
  justify: IonicJustifySchema.optional(),
6702
- color: z53.enum(["primary", "secondary", "tertiary", "success", "warning", "danger"]).optional(),
6703
- indeterminate: z53.boolean().optional(),
6739
+ color: IonicColorSchema.optional(),
6740
+ indeterminate: z55.boolean().optional(),
6704
6741
  hint: DynamicTextSchema.optional()
6705
6742
  });
6706
- var IonicRadioPropsSchema = z53.object({
6707
- labelPlacement: z53.enum(["start", "end", "fixed", "stacked"]).optional(),
6743
+ var IonicRadioPropsSchema = z55.object({
6744
+ labelPlacement: z55.enum(["start", "end", "fixed", "stacked"]).optional(),
6708
6745
  justify: IonicJustifySchema.optional(),
6709
- color: z53.enum(["primary", "secondary", "tertiary", "success", "warning", "danger"]).optional(),
6746
+ color: IonicColorSchema.optional(),
6710
6747
  hint: DynamicTextSchema.optional()
6711
6748
  });
6712
- var IonicTogglePropsSchema = z53.object({
6713
- labelPlacement: z53.enum(["start", "end", "fixed", "stacked"]).optional(),
6749
+ var IonicTogglePropsSchema = z55.object({
6750
+ labelPlacement: z55.enum(["start", "end", "fixed", "stacked"]).optional(),
6714
6751
  justify: IonicJustifySchema.optional(),
6715
- color: z53.enum(["primary", "secondary", "tertiary", "success", "warning", "danger"]).optional(),
6716
- enableOnOffLabels: z53.boolean().optional(),
6752
+ color: IonicColorSchema.optional(),
6753
+ enableOnOffLabels: z55.boolean().optional(),
6717
6754
  hint: DynamicTextSchema.optional()
6718
6755
  });
6719
- var IonicSliderPropsSchema = z53.object({
6720
- min: z53.number().optional(),
6721
- max: z53.number().optional(),
6722
- step: z53.number().positive().optional(),
6723
- dualKnobs: z53.boolean().optional(),
6724
- pin: z53.boolean().optional(),
6725
- ticks: z53.boolean().optional(),
6726
- snaps: z53.boolean().optional(),
6727
- color: z53.enum(["primary", "secondary", "tertiary", "success", "warning", "danger"]).optional(),
6728
- labelPlacement: z53.enum(["start", "end", "fixed", "stacked"]).optional(),
6756
+ var IonicSliderPropsSchema = z55.object({
6757
+ min: z55.number().optional(),
6758
+ max: z55.number().optional(),
6759
+ step: z55.number().positive().optional(),
6760
+ dualKnobs: z55.boolean().optional(),
6761
+ pin: z55.boolean().optional(),
6762
+ ticks: z55.boolean().optional(),
6763
+ snaps: z55.boolean().optional(),
6764
+ color: IonicColorSchema.optional(),
6765
+ labelPlacement: z55.enum(["start", "end", "fixed", "stacked"]).optional(),
6729
6766
  hint: DynamicTextSchema.optional()
6730
6767
  });
6731
- var IonicDatepickerPropsSchema = z53.object({
6732
- presentation: z53.enum(["date", "date-time", "time", "time-date", "month", "month-year", "year"]).optional(),
6733
- multiple: z53.boolean().optional(),
6734
- preferWheel: z53.boolean().optional(),
6735
- showDefaultButtons: z53.boolean().optional(),
6736
- showDefaultTitle: z53.boolean().optional(),
6737
- showDefaultTimeLabel: z53.boolean().optional(),
6738
- showClearButton: z53.boolean().optional(),
6739
- doneText: z53.string().optional(),
6740
- cancelText: z53.string().optional(),
6741
- size: z53.enum(["cover", "fixed"]).optional(),
6742
- color: z53.enum(["primary", "secondary", "tertiary", "success", "warning", "danger"]).optional(),
6768
+ var IonicDatepickerPropsSchema = z55.object({
6769
+ presentation: z55.enum(["date", "date-time", "time", "time-date", "month", "month-year", "year"]).optional(),
6770
+ multiple: z55.boolean().optional(),
6771
+ preferWheel: z55.boolean().optional(),
6772
+ showDefaultButtons: z55.boolean().optional(),
6773
+ showDefaultTitle: z55.boolean().optional(),
6774
+ showDefaultTimeLabel: z55.boolean().optional(),
6775
+ showClearButton: z55.boolean().optional(),
6776
+ doneText: DynamicTextSchema.optional(),
6777
+ cancelText: DynamicTextSchema.optional(),
6778
+ size: z55.enum(["cover", "fixed"]).optional(),
6779
+ color: IonicColorSchema.optional(),
6743
6780
  hint: DynamicTextSchema.optional(),
6744
- locale: z53.string().refine(isLocaleTag, { message: 'Expected a BCP 47 locale tag such as "de-DE"' }).optional(),
6781
+ locale: z55.string().refine(isLocaleTag, { message: 'Expected a BCP 47 locale tag such as "de-DE"' }).optional(),
6745
6782
  placeholder: DynamicTextSchema.optional()
6746
6783
  });
6747
- var IonicSelectPropsSchema = z53.object({
6748
- multiple: z53.boolean().optional(),
6749
- interface: z53.enum(["action-sheet", "popover", "alert"]).optional(),
6750
- cancelText: z53.string().optional(),
6751
- okText: z53.string().optional(),
6784
+ var IonicSelectPropsSchema = z55.object({
6785
+ multiple: z55.boolean().optional(),
6786
+ interface: z55.enum(["action-sheet", "popover", "alert"]).optional(),
6787
+ cancelText: DynamicTextSchema.optional(),
6788
+ okText: DynamicTextSchema.optional(),
6752
6789
  placeholder: DynamicTextSchema.optional(),
6753
- fill: z53.enum(["solid", "outline"]).optional(),
6754
- shape: z53.literal("round").optional(),
6790
+ fill: z55.enum(["solid", "outline"]).optional(),
6791
+ shape: z55.literal("round").optional(),
6755
6792
  labelPlacement: IonicLabelPlacementSchema.optional(),
6756
- color: z53.enum(["primary", "secondary", "tertiary", "success", "warning", "danger"]).optional(),
6793
+ color: IonicColorSchema.optional(),
6757
6794
  hint: DynamicTextSchema.optional()
6758
6795
  });
6759
- var IonicTextareaPropsSchema = z53.object({
6760
- rows: z53.number().positive().optional(),
6761
- autoGrow: z53.boolean().optional(),
6762
- counter: z53.boolean().optional(),
6763
- fill: z53.enum(["solid", "outline"]).optional(),
6764
- shape: z53.literal("round").optional(),
6796
+ var IonicTextareaPropsSchema = z55.object({
6797
+ rows: z55.number().positive().optional(),
6798
+ autoGrow: z55.boolean().optional(),
6799
+ counter: z55.boolean().optional(),
6800
+ fill: z55.enum(["solid", "outline"]).optional(),
6801
+ shape: z55.literal("round").optional(),
6765
6802
  labelPlacement: IonicLabelPlacementSchema.optional(),
6766
6803
  hint: DynamicTextSchema.optional(),
6767
6804
  errorText: DynamicTextSchema.optional(),
6768
6805
  color: IonicColorSchema.optional(),
6769
6806
  placeholder: DynamicTextSchema.optional()
6770
6807
  });
6771
- var IonicMultiCheckboxPropsSchema = z53.object({
6772
- labelPlacement: z53.enum(["start", "end", "fixed", "stacked"]).optional(),
6808
+ var IonicMultiCheckboxPropsSchema = z55.object({
6809
+ labelPlacement: z55.enum(["start", "end", "fixed", "stacked"]).optional(),
6773
6810
  justify: IonicJustifySchema.optional(),
6774
- color: z53.enum(["primary", "secondary", "tertiary", "success", "warning", "danger"]).optional(),
6811
+ color: IonicColorSchema.optional(),
6775
6812
  hint: DynamicTextSchema.optional()
6776
6813
  });
6777
- var IonicButtonPropsSchema = z53.object({
6778
- expand: z53.enum(["full", "block"]).optional(),
6814
+ var IonicButtonPropsSchema = z55.object({
6815
+ expand: z55.enum(["full", "block"]).optional(),
6779
6816
  fill: IonicFillSchema.optional(),
6780
- shape: z53.literal("round").optional(),
6781
- size: z53.enum(["small", "default", "large"]).optional(),
6817
+ shape: z55.literal("round").optional(),
6818
+ size: z55.enum(["small", "default", "large"]).optional(),
6782
6819
  color: IonicColorSchema.optional(),
6783
- strong: z53.boolean().optional(),
6784
- type: z53.enum(["button", "submit", "reset"]).optional()
6820
+ strong: z55.boolean().optional(),
6821
+ type: z55.enum(["button", "submit", "reset"]).optional()
6785
6822
  });
6786
6823
 
6787
6824
  // internal/dynamic-forms-validation/ionic/src/fields/index.ts
6788
- import { z as z54 } from "zod";
6825
+ import { z as z56 } from "zod";
6789
6826
  var IonicValueFieldBase = BaseFieldDefSchema.merge(FieldWithValidationSchema);
6790
6827
  var IonicInputFieldSchemaObject = IonicValueFieldBase.extend({
6791
- type: z54.literal("input"),
6792
- nullable: z54.boolean().optional(),
6793
- value: z54.string().nullable().optional(),
6828
+ type: z56.literal("input"),
6829
+ nullable: z56.boolean().optional(),
6830
+ value: InputValueSchema,
6794
6831
  placeholder: DynamicTextSchema.optional(),
6795
6832
  props: IonicInputPropsSchema.optional()
6796
6833
  });
6797
- var IonicInputFieldSchema = IonicInputFieldSchemaObject.superRefine(nullableValueRefine);
6834
+ var IonicInputFieldSchema = IonicInputFieldSchemaObject.superRefine(nullableValueRefine).superRefine(inputValueTypeRefine);
6798
6835
  var IonicCheckboxFieldSchema = IonicValueFieldBase.extend({
6799
- type: z54.literal("checkbox"),
6800
- value: z54.boolean().optional(),
6836
+ type: z56.literal("checkbox"),
6837
+ value: z56.boolean().optional(),
6801
6838
  placeholder: DynamicTextSchema.optional(),
6802
6839
  props: IonicCheckboxPropsSchema.optional()
6803
6840
  });
6804
6841
  var IonicRadioFieldSchemaObject = IonicValueFieldBase.extend({
6805
- type: z54.literal("radio"),
6806
- nullable: z54.boolean().optional(),
6807
- value: z54.unknown().nullable().optional(),
6842
+ type: z56.literal("radio"),
6843
+ nullable: z56.boolean().optional(),
6844
+ value: z56.unknown().nullable().optional(),
6808
6845
  placeholder: DynamicTextSchema.optional(),
6809
6846
  options: FieldOptionsSchema,
6810
6847
  props: IonicRadioPropsSchema.optional()
6811
6848
  });
6812
6849
  var IonicRadioFieldSchema = IonicRadioFieldSchemaObject.superRefine(nullableValueRefine);
6813
6850
  var IonicToggleFieldSchema = IonicValueFieldBase.extend({
6814
- type: z54.literal("toggle"),
6815
- value: z54.boolean().optional(),
6851
+ type: z56.literal("toggle"),
6852
+ value: z56.boolean().optional(),
6816
6853
  placeholder: DynamicTextSchema.optional(),
6817
6854
  props: IonicTogglePropsSchema.optional()
6818
6855
  });
6819
6856
  var IonicSliderFieldSchemaObject = IonicValueFieldBase.extend({
6820
- type: z54.literal("slider"),
6821
- nullable: z54.boolean().optional(),
6822
- value: z54.number().nullable().optional(),
6823
- minValue: z54.number().optional(),
6824
- maxValue: z54.number().optional(),
6825
- step: z54.number().positive().optional(),
6857
+ type: z56.literal("slider"),
6858
+ nullable: z56.boolean().optional(),
6859
+ value: SliderValueSchema,
6860
+ minValue: z56.number().optional(),
6861
+ maxValue: z56.number().optional(),
6862
+ step: z56.number().positive().optional(),
6826
6863
  placeholder: DynamicTextSchema.optional(),
6827
6864
  props: IonicSliderPropsSchema.optional()
6828
6865
  });
6829
6866
  var IonicSliderFieldSchema = IonicSliderFieldSchemaObject.superRefine(nullableValueRefine);
6830
6867
  var IonicDatepickerFieldSchemaObject = IonicValueFieldBase.extend({
6831
- type: z54.literal("datepicker"),
6832
- nullable: z54.boolean().optional(),
6833
- value: z54.union([z54.string(), z54.null()]).optional(),
6834
- minDate: z54.union([z54.string(), z54.null()]).optional(),
6835
- maxDate: z54.union([z54.string(), z54.null()]).optional(),
6836
- startAt: z54.union([z54.string(), z54.null()]).optional(),
6868
+ type: z56.literal("datepicker"),
6869
+ nullable: z56.boolean().optional(),
6870
+ value: DatepickerValueSchema,
6871
+ minDate: z56.union([z56.string(), z56.null()]).optional(),
6872
+ maxDate: z56.union([z56.string(), z56.null()]).optional(),
6873
+ startAt: z56.union([z56.string(), z56.null()]).optional(),
6837
6874
  placeholder: DynamicTextSchema.optional(),
6838
6875
  props: IonicDatepickerPropsSchema.optional()
6839
6876
  });
6840
6877
  var IonicDatepickerFieldSchema = IonicDatepickerFieldSchemaObject.superRefine(nullableValueRefine);
6841
6878
  var IonicSelectFieldSchemaObject = IonicValueFieldBase.extend({
6842
- type: z54.literal("select"),
6843
- nullable: z54.boolean().optional(),
6844
- value: z54.unknown().nullable().optional(),
6879
+ type: z56.literal("select"),
6880
+ nullable: z56.boolean().optional(),
6881
+ value: z56.unknown().nullable().optional(),
6845
6882
  placeholder: DynamicTextSchema.optional(),
6846
6883
  options: FieldOptionsSchema,
6847
6884
  props: IonicSelectPropsSchema.optional()
6848
6885
  });
6849
6886
  var IonicSelectFieldSchema = IonicSelectFieldSchemaObject.superRefine(nullableValueRefine);
6850
6887
  var IonicTextareaFieldSchemaObject = IonicValueFieldBase.extend({
6851
- type: z54.literal("textarea"),
6852
- nullable: z54.boolean().optional(),
6853
- value: z54.string().nullable().optional(),
6888
+ type: z56.literal("textarea"),
6889
+ nullable: z56.boolean().optional(),
6890
+ value: z56.string().nullable().optional(),
6854
6891
  placeholder: DynamicTextSchema.optional(),
6855
6892
  props: IonicTextareaPropsSchema.optional()
6856
6893
  });
6857
6894
  var IonicTextareaFieldSchema = IonicTextareaFieldSchemaObject.superRefine(nullableValueRefine);
6858
6895
  var IonicMultiCheckboxFieldSchemaObject = IonicValueFieldBase.extend({
6859
- type: z54.literal("multi-checkbox"),
6860
- nullable: z54.boolean().optional(),
6861
- value: z54.array(z54.unknown()).nullable().optional(),
6896
+ type: z56.literal("multi-checkbox"),
6897
+ nullable: z56.boolean().optional(),
6898
+ value: z56.array(z56.unknown()).nullable().optional(),
6862
6899
  placeholder: DynamicTextSchema.optional(),
6863
6900
  options: FieldOptionsSchema,
6864
6901
  props: IonicMultiCheckboxPropsSchema.optional()
6865
6902
  });
6866
6903
  var IonicMultiCheckboxFieldSchema = IonicMultiCheckboxFieldSchemaObject.superRefine(nullableValueRefine);
6867
6904
  var IonicButtonFieldSchema = BaseFieldDefSchema.extend({
6868
- type: z54.literal("button"),
6869
- event: z54.string().optional(),
6870
- eventArgs: z54.array(z54.union([z54.string(), z54.number(), z54.boolean(), z54.null(), z54.undefined()])).optional(),
6905
+ type: z56.literal("button"),
6906
+ event: z56.string().optional(),
6907
+ eventArgs: z56.array(z56.union([z56.string(), z56.number(), z56.boolean(), z56.null(), z56.undefined()])).optional(),
6871
6908
  props: IonicButtonPropsSchema.optional(),
6872
6909
  logic: LogicArraySchema.optional()
6873
6910
  });
6874
6911
  var IonicSubmitButtonFieldSchema = BaseFieldDefSchema.extend({
6875
- type: z54.literal("submit"),
6912
+ type: z56.literal("submit"),
6876
6913
  props: IonicButtonPropsSchema.optional(),
6877
6914
  logic: LogicArraySchema.optional()
6878
6915
  });
6879
6916
  var IonicNextButtonFieldSchema = BaseFieldDefSchema.extend({
6880
- type: z54.literal("next"),
6917
+ type: z56.literal("next"),
6881
6918
  props: IonicButtonPropsSchema.optional(),
6882
6919
  logic: LogicArraySchema.optional()
6883
6920
  });
6884
6921
  var IonicPreviousButtonFieldSchema = BaseFieldDefSchema.extend({
6885
- type: z54.literal("previous"),
6922
+ type: z56.literal("previous"),
6886
6923
  props: IonicButtonPropsSchema.optional()
6887
6924
  });
6888
6925
  var IonicAddArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
@@ -6891,13 +6928,13 @@ var IonicAddArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6891
6928
  * item, or a list of them for an object item.
6892
6929
  */
6893
6930
  template: ArrayItemTemplateSchema,
6894
- type: z54.literal("add-array-item"),
6895
- arrayKey: z54.string().optional(),
6931
+ type: z56.literal("add-array-item"),
6932
+ arrayKey: z56.string().optional(),
6896
6933
  props: IonicButtonPropsSchema.optional()
6897
6934
  });
6898
6935
  var IonicRemoveArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6899
- type: z54.literal("remove-array-item"),
6900
- arrayKey: z54.string().optional(),
6936
+ type: z56.literal("remove-array-item"),
6937
+ arrayKey: z56.string().optional(),
6901
6938
  props: IonicButtonPropsSchema.optional()
6902
6939
  });
6903
6940
  var IonicPrependArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
@@ -6906,8 +6943,8 @@ var IonicPrependArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6906
6943
  * item, or a list of them for an object item.
6907
6944
  */
6908
6945
  template: ArrayItemTemplateSchema,
6909
- type: z54.literal("prepend-array-item"),
6910
- arrayKey: z54.string().optional(),
6946
+ type: z56.literal("prepend-array-item"),
6947
+ arrayKey: z56.string().optional(),
6911
6948
  props: IonicButtonPropsSchema.optional()
6912
6949
  });
6913
6950
  var IonicInsertArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
@@ -6916,25 +6953,25 @@ var IonicInsertArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6916
6953
  * item, or a list of them for an object item.
6917
6954
  */
6918
6955
  template: ArrayItemTemplateSchema,
6919
- type: z54.literal("insert-array-item"),
6920
- arrayKey: z54.string().optional(),
6921
- index: z54.number(),
6956
+ type: z56.literal("insert-array-item"),
6957
+ arrayKey: z56.string().optional(),
6958
+ index: z56.number(),
6922
6959
  props: IonicButtonPropsSchema.optional()
6923
6960
  });
6924
6961
  var IonicPopArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6925
- type: z54.literal("pop-array-item"),
6926
- arrayKey: z54.string(),
6962
+ type: z56.literal("pop-array-item"),
6963
+ arrayKey: z56.string(),
6927
6964
  props: IonicButtonPropsSchema.optional()
6928
6965
  });
6929
6966
  var IonicShiftArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6930
- type: z54.literal("shift-array-item"),
6931
- arrayKey: z54.string(),
6967
+ type: z56.literal("shift-array-item"),
6968
+ arrayKey: z56.string(),
6932
6969
  props: IonicButtonPropsSchema.optional()
6933
6970
  });
6934
6971
 
6935
6972
  // internal/dynamic-forms-validation/ionic/src/ionic-leaf-field.schema.ts
6936
- import { z as z55 } from "zod";
6937
- var IonicLeafFieldSchema = z55.discriminatedUnion("type", [
6973
+ import { z as z57 } from "zod";
6974
+ var IonicLeafFieldSchema = z57.discriminatedUnion("type", [
6938
6975
  TextFieldSchema,
6939
6976
  HiddenFieldSchema,
6940
6977
  IonicInputFieldSchemaObject,
@@ -6956,10 +6993,10 @@ var IonicLeafFieldSchema = z55.discriminatedUnion("type", [
6956
6993
  IonicInsertArrayItemButtonFieldSchema,
6957
6994
  IonicPopArrayItemButtonFieldSchema,
6958
6995
  IonicShiftArrayItemButtonFieldSchema
6959
- ]).superRefine(nullableValueRefine);
6996
+ ]).superRefine(nullableValueRefine).superRefine(inputValueTypeRefine);
6960
6997
 
6961
6998
  // internal/dynamic-forms-validation/ionic/src/ionic-form-config.schema.ts
6962
- import { z as z56 } from "zod";
6999
+ import { z as z58 } from "zod";
6963
7000
  var containerSchemas4 = createContainerSchemas({
6964
7001
  leafFieldSchema: IonicLeafFieldSchema
6965
7002
  });
@@ -6968,7 +7005,7 @@ var IonicRowFieldSchema = containerSchemas4.RowFieldSchema;
6968
7005
  var IonicGroupFieldSchema = containerSchemas4.GroupFieldSchema;
6969
7006
  var IonicArrayFieldSchema = containerSchemas4.ArrayFieldSchema;
6970
7007
  var IonicFieldSchema = containerSchemas4.AllFieldsSchema;
6971
- var IonicFormDefaultPropsSchema = z56.object({
7008
+ var IonicFormDefaultPropsSchema = z58.object({
6972
7009
  color: IonicColorSchema.optional(),
6973
7010
  labelPlacement: IonicLabelPlacementSchema.optional()
6974
7011
  });
@@ -6976,7 +7013,7 @@ var IonicFormConfigSchema = createFormConfigSchema(IonicFieldSchema, IonicFormDe
6976
7013
 
6977
7014
  // internal/dynamic-forms-validation/validate/src/json-schema/form-config-json-schema.ts
6978
7015
  function toJsonSchema(schema, name, basePath) {
6979
- const jsonSchema = z57.toJSONSchema(schema, { target: "draft-7", io: "input", unrepresentable: "any" });
7016
+ const jsonSchema = z59.toJSONSchema(schema, { target: "draft-7", io: "input", unrepresentable: "any" });
6980
7017
  jsonSchema["$id"] = basePath ? `${basePath.replace(/\/$/, "")}/${name}` : name;
6981
7018
  return jsonSchema;
6982
7019
  }
@@ -7074,30 +7111,30 @@ function getFieldTypeJsonSchema(uiIntegration, fieldType) {
7074
7111
  }
7075
7112
 
7076
7113
  // internal/dynamic-forms-validation/src/lib/schemas/field-type-names.ts
7077
- import { z as z58 } from "zod";
7114
+ import { z as z60 } from "zod";
7078
7115
  var MAX_DEPTH = 20;
7079
7116
  function collectDiscriminator(schema, into) {
7080
- if (schema instanceof z58.ZodLiteral) {
7117
+ if (schema instanceof z60.ZodLiteral) {
7081
7118
  for (const value of schema.def.values) {
7082
7119
  if (typeof value === "string") into.add(value);
7083
7120
  }
7084
7121
  return;
7085
7122
  }
7086
- if (schema instanceof z58.ZodEnum) {
7123
+ if (schema instanceof z60.ZodEnum) {
7087
7124
  for (const value of schema.options) into.add(value);
7088
7125
  }
7089
7126
  }
7090
7127
  function visit(schema, into, depth) {
7091
7128
  if (depth > MAX_DEPTH) return;
7092
- if (schema instanceof z58.ZodLazy) {
7129
+ if (schema instanceof z60.ZodLazy) {
7093
7130
  visit(schema.unwrap(), into, depth + 1);
7094
7131
  return;
7095
7132
  }
7096
- if (schema instanceof z58.ZodUnion) {
7133
+ if (schema instanceof z60.ZodUnion) {
7097
7134
  for (const option of schema.options) visit(option, into, depth + 1);
7098
7135
  return;
7099
7136
  }
7100
- if (schema instanceof z58.ZodObject) {
7137
+ if (schema instanceof z60.ZodObject) {
7101
7138
  collectDiscriminator(schema.shape["type"], into);
7102
7139
  return;
7103
7140
  }
@@ -7108,6 +7145,1040 @@ function collectFieldTypeNames(schema) {
7108
7145
  return [...names];
7109
7146
  }
7110
7147
 
7148
+ // packages/dynamic-forms/internal/src/lib/errors/dynamic-form-error.ts
7149
+ var DynamicFormError = class _DynamicFormError extends Error {
7150
+ static PREFIX = "[Dynamic Forms]";
7151
+ constructor(message) {
7152
+ super(`${_DynamicFormError.PREFIX} ${message}`);
7153
+ this.name = "DynamicFormError";
7154
+ }
7155
+ };
7156
+
7157
+ // packages/dynamic-forms/internal/src/lib/core/expressions/parser/types.ts
7158
+ var ExpressionParserError = class extends DynamicFormError {
7159
+ constructor(message, position, expression) {
7160
+ super(`${message} at position ${position} in expression: ${expression}`);
7161
+ this.position = position;
7162
+ this.expression = expression;
7163
+ this.name = "ExpressionParserError";
7164
+ }
7165
+ position;
7166
+ expression;
7167
+ };
7168
+
7169
+ // packages/dynamic-forms/internal/src/lib/core/expressions/parser/evaluator.ts
7170
+ var STRING_SAFE_METHODS = [
7171
+ "charAt",
7172
+ "charCodeAt",
7173
+ "concat",
7174
+ "endsWith",
7175
+ "includes",
7176
+ "indexOf",
7177
+ "lastIndexOf",
7178
+ "match",
7179
+ "padEnd",
7180
+ "padStart",
7181
+ "repeat",
7182
+ "replace",
7183
+ "search",
7184
+ "slice",
7185
+ "split",
7186
+ "startsWith",
7187
+ "substring",
7188
+ "toLowerCase",
7189
+ "toUpperCase",
7190
+ "trim",
7191
+ "trimEnd",
7192
+ "trimStart",
7193
+ "toString"
7194
+ ];
7195
+ var NUMBER_SAFE_METHODS = ["toExponential", "toFixed", "toPrecision", "toString"];
7196
+ var ARRAY_SAFE_METHODS = [
7197
+ "concat",
7198
+ "every",
7199
+ "filter",
7200
+ "find",
7201
+ "findIndex",
7202
+ "flat",
7203
+ "flatMap",
7204
+ "includes",
7205
+ "indexOf",
7206
+ "join",
7207
+ "lastIndexOf",
7208
+ "map",
7209
+ "reduce",
7210
+ "reduceRight",
7211
+ "slice",
7212
+ "some",
7213
+ "toString",
7214
+ "entries",
7215
+ "keys",
7216
+ "values"
7217
+ ];
7218
+ var DATE_SAFE_METHODS = [
7219
+ "getDate",
7220
+ "getDay",
7221
+ "getFullYear",
7222
+ "getHours",
7223
+ "getMilliseconds",
7224
+ "getMinutes",
7225
+ "getMonth",
7226
+ "getSeconds",
7227
+ "getTime",
7228
+ "getTimezoneOffset",
7229
+ "getUTCDate",
7230
+ "getUTCDay",
7231
+ "getUTCFullYear",
7232
+ "getUTCHours",
7233
+ "getUTCMilliseconds",
7234
+ "getUTCMinutes",
7235
+ "getUTCMonth",
7236
+ "getUTCSeconds",
7237
+ "toDateString",
7238
+ "toISOString",
7239
+ "toJSON",
7240
+ "toString",
7241
+ "toTimeString",
7242
+ "toUTCString"
7243
+ ];
7244
+ var SAFE_METHODS = {
7245
+ string: new Set(STRING_SAFE_METHODS),
7246
+ number: new Set(NUMBER_SAFE_METHODS),
7247
+ array: new Set(ARRAY_SAFE_METHODS),
7248
+ date: new Set(DATE_SAFE_METHODS)
7249
+ };
7250
+ var ALLOWED_METHOD_NAMES = new Set(Object.values(SAFE_METHODS).flatMap((methods) => [...methods]));
7251
+ var BLOCKED_PROPERTIES = /* @__PURE__ */ new Set([
7252
+ "constructor",
7253
+ "__proto__",
7254
+ "prototype",
7255
+ "__defineGetter__",
7256
+ "__defineSetter__",
7257
+ "__lookupGetter__",
7258
+ "__lookupSetter__"
7259
+ ]);
7260
+ var Evaluator = class _Evaluator {
7261
+ scope;
7262
+ expression;
7263
+ constructor(scope, expression) {
7264
+ this.scope = scope;
7265
+ this.expression = expression;
7266
+ }
7267
+ /** Evaluate an AST node */
7268
+ evaluate(node) {
7269
+ switch (node.type) {
7270
+ case "Literal":
7271
+ return node.value;
7272
+ case "Identifier":
7273
+ return this.evaluateIdentifier(node.name);
7274
+ case "MemberAccess":
7275
+ return this.evaluateMemberAccess(node);
7276
+ case "ComputedMemberAccess":
7277
+ return this.evaluateComputedMemberAccess(node);
7278
+ case "BinaryOp":
7279
+ return this.evaluateBinaryOp(node);
7280
+ case "UnaryOp":
7281
+ return this.evaluateUnaryOp(node);
7282
+ case "CallExpression":
7283
+ return this.evaluateCallExpression(node);
7284
+ case "Conditional":
7285
+ return this.evaluate(node.test) ? this.evaluate(node.consequent) : this.evaluate(node.alternate);
7286
+ case "ArrayLiteral":
7287
+ return this.evaluateArrayLiteral(node);
7288
+ case "ObjectLiteral":
7289
+ return this.evaluateObjectLiteral(node);
7290
+ case "ArrowFunction":
7291
+ return this.evaluateArrowFunction(node);
7292
+ default:
7293
+ throw new ExpressionParserError(`Unknown node type: ${node.type}`, 0, this.expression);
7294
+ }
7295
+ }
7296
+ evaluateIdentifier(name) {
7297
+ if (name in this.scope) {
7298
+ return this.scope[name];
7299
+ }
7300
+ return void 0;
7301
+ }
7302
+ evaluateMemberAccess(node) {
7303
+ const obj = this.evaluate(node.object);
7304
+ if (obj === null || obj === void 0) {
7305
+ return void 0;
7306
+ }
7307
+ if (BLOCKED_PROPERTIES.has(node.property)) {
7308
+ throw new ExpressionParserError(`Property "${node.property}" is not accessible for security reasons`, 0, this.expression);
7309
+ }
7310
+ if (typeof obj === "object" || typeof obj === "string" || typeof obj === "number") {
7311
+ return obj[node.property];
7312
+ }
7313
+ return void 0;
7314
+ }
7315
+ evaluateComputedMemberAccess(node) {
7316
+ const obj = this.evaluate(node.object);
7317
+ if (obj === null || obj === void 0) {
7318
+ return void 0;
7319
+ }
7320
+ const rawKey = this.evaluate(node.property);
7321
+ if (rawKey === null || rawKey === void 0) return void 0;
7322
+ const key = String(rawKey);
7323
+ if (BLOCKED_PROPERTIES.has(key)) {
7324
+ throw new ExpressionParserError(`Property "${key}" is not accessible for security reasons`, 0, this.expression);
7325
+ }
7326
+ if (typeof obj === "object" || typeof obj === "string" || typeof obj === "number") {
7327
+ return obj[key];
7328
+ }
7329
+ return void 0;
7330
+ }
7331
+ evaluateBinaryOp(node) {
7332
+ if (node.operator === "&&") {
7333
+ const left2 = this.evaluate(node.left);
7334
+ return left2 ? this.evaluate(node.right) : left2;
7335
+ }
7336
+ if (node.operator === "||") {
7337
+ const left2 = this.evaluate(node.left);
7338
+ return left2 ? left2 : this.evaluate(node.right);
7339
+ }
7340
+ if (node.operator === "??") {
7341
+ const left2 = this.evaluate(node.left);
7342
+ return left2 ?? this.evaluate(node.right);
7343
+ }
7344
+ const left = this.evaluate(node.left);
7345
+ const right = this.evaluate(node.right);
7346
+ switch (node.operator) {
7347
+ // Arithmetic
7348
+ case "+":
7349
+ return left + right;
7350
+ case "-":
7351
+ return left - right;
7352
+ case "*":
7353
+ return left * right;
7354
+ case "/":
7355
+ if (right === 0) return null;
7356
+ return left / right;
7357
+ case "%":
7358
+ if (right === 0) return null;
7359
+ return left % right;
7360
+ // Comparison - using == and != intentionally for loose equality
7361
+ case "==":
7362
+ return left == right;
7363
+ case "===":
7364
+ return left === right;
7365
+ case "!=":
7366
+ return left != right;
7367
+ case "!==":
7368
+ return left !== right;
7369
+ case ">":
7370
+ return left > right;
7371
+ case "<":
7372
+ return left < right;
7373
+ case ">=":
7374
+ return left >= right;
7375
+ case "<=":
7376
+ return left <= right;
7377
+ default:
7378
+ throw new ExpressionParserError(`Unknown binary operator: ${node.operator}`, 0, this.expression);
7379
+ }
7380
+ }
7381
+ evaluateUnaryOp(node) {
7382
+ const operand = this.evaluate(node.operand);
7383
+ switch (node.operator) {
7384
+ case "!":
7385
+ return !operand;
7386
+ case "-":
7387
+ return -operand;
7388
+ case "+":
7389
+ return +operand;
7390
+ default:
7391
+ throw new ExpressionParserError(`Unknown unary operator: ${node.operator}`, 0, this.expression);
7392
+ }
7393
+ }
7394
+ evaluateCallExpression(node) {
7395
+ if (node.callee.type !== "MemberAccess") {
7396
+ throw new ExpressionParserError("Only method calls are allowed, not arbitrary function calls", 0, this.expression);
7397
+ }
7398
+ const obj = this.evaluate(node.callee.object);
7399
+ if (obj === null || obj === void 0) {
7400
+ return void 0;
7401
+ }
7402
+ const methodName = node.callee.property;
7403
+ if (BLOCKED_PROPERTIES.has(methodName)) {
7404
+ throw new ExpressionParserError(`Property "${methodName}" is not accessible for security reasons`, 0, this.expression);
7405
+ }
7406
+ if (!this.isMethodSafe(obj, methodName)) {
7407
+ throw new ExpressionParserError(`Method "${methodName}" is not allowed for security reasons`, 0, this.expression);
7408
+ }
7409
+ const args = node.arguments.map((arg) => this.evaluate(arg));
7410
+ const method = obj[methodName];
7411
+ if (typeof method === "function") {
7412
+ return method.call(obj, ...args);
7413
+ }
7414
+ return void 0;
7415
+ }
7416
+ evaluateArrayLiteral(node) {
7417
+ return node.elements.map((element) => this.evaluate(element));
7418
+ }
7419
+ evaluateObjectLiteral(node) {
7420
+ const result = {};
7421
+ for (const { key, value } of node.properties) {
7422
+ if (BLOCKED_PROPERTIES.has(key)) {
7423
+ throw new ExpressionParserError(`Property "${key}" is not allowed in object literals for security reasons`, 0, this.expression);
7424
+ }
7425
+ result[key] = this.evaluate(value);
7426
+ }
7427
+ return result;
7428
+ }
7429
+ evaluateArrowFunction(node) {
7430
+ const parentScope = this.scope;
7431
+ const expression = this.expression;
7432
+ return (...args) => {
7433
+ const childScope = { ...parentScope };
7434
+ for (let i = 0; i < node.params.length; i++) {
7435
+ childScope[node.params[i]] = args[i];
7436
+ }
7437
+ const childEvaluator = new _Evaluator(childScope, expression);
7438
+ return childEvaluator.evaluate(node.body);
7439
+ };
7440
+ }
7441
+ isMethodSafe(obj, methodName) {
7442
+ if (obj === null || obj === void 0) {
7443
+ return false;
7444
+ }
7445
+ const type = Array.isArray(obj) ? "array" : obj instanceof Date ? "date" : typeof obj;
7446
+ const safeMethods = SAFE_METHODS[type];
7447
+ if (!safeMethods) {
7448
+ return false;
7449
+ }
7450
+ return safeMethods.has(methodName);
7451
+ }
7452
+ };
7453
+
7454
+ // packages/dynamic-forms/internal/src/lib/core/expressions/parser/tokenizer.ts
7455
+ var IDENTIFIER_START = /[\p{ID_Start}$_]/u;
7456
+ var IDENTIFIER_PART = /[\p{ID_Continue}$]/u;
7457
+ var Tokenizer = class {
7458
+ position = 0;
7459
+ expression;
7460
+ constructor(expression) {
7461
+ this.expression = expression;
7462
+ }
7463
+ /** Tokenize the entire expression */
7464
+ tokenize() {
7465
+ const tokens = [];
7466
+ while (this.position < this.expression.length) {
7467
+ this.skipWhitespace();
7468
+ if (this.position >= this.expression.length) {
7469
+ break;
7470
+ }
7471
+ const token = this.nextToken();
7472
+ tokens.push(token);
7473
+ }
7474
+ tokens.push({ type: "EOF" /* EOF */, value: "", position: this.position });
7475
+ return tokens;
7476
+ }
7477
+ skipWhitespace() {
7478
+ while (this.position < this.expression.length && /\s/.test(this.expression[this.position])) {
7479
+ this.position++;
7480
+ }
7481
+ }
7482
+ nextToken() {
7483
+ const char = this.expression[this.position];
7484
+ if (char === '"' || char === "'") {
7485
+ return this.readString(char);
7486
+ }
7487
+ if (/[0-9]/.test(char)) {
7488
+ return this.readNumber();
7489
+ }
7490
+ if (IDENTIFIER_START.test(this.codePointAt(this.position))) {
7491
+ return this.readIdentifierOrKeyword();
7492
+ }
7493
+ return this.readOperatorOrPunctuation();
7494
+ }
7495
+ readString(quote) {
7496
+ const start = this.position;
7497
+ this.position++;
7498
+ let value = "";
7499
+ while (this.position < this.expression.length) {
7500
+ const char = this.expression[this.position];
7501
+ if (char === quote) {
7502
+ this.position++;
7503
+ return { type: "STRING" /* STRING */, value, position: start };
7504
+ }
7505
+ if (char === "\\" && this.position + 1 < this.expression.length) {
7506
+ this.position++;
7507
+ const nextChar = this.expression[this.position];
7508
+ switch (nextChar) {
7509
+ case "n":
7510
+ value += "\n";
7511
+ break;
7512
+ case "t":
7513
+ value += " ";
7514
+ break;
7515
+ case "r":
7516
+ value += "\r";
7517
+ break;
7518
+ case "\\":
7519
+ value += "\\";
7520
+ break;
7521
+ case quote:
7522
+ value += quote;
7523
+ break;
7524
+ default:
7525
+ value += nextChar;
7526
+ }
7527
+ this.position++;
7528
+ } else {
7529
+ value += char;
7530
+ this.position++;
7531
+ }
7532
+ }
7533
+ throw new ExpressionParserError("Unterminated string literal", start, this.expression);
7534
+ }
7535
+ readNumber() {
7536
+ const start = this.position;
7537
+ let value = "";
7538
+ while (this.position < this.expression.length && /[0-9.]/.test(this.expression[this.position])) {
7539
+ value += this.expression[this.position];
7540
+ this.position++;
7541
+ }
7542
+ if (!/^\d+(\.\d+)?$/.test(value)) {
7543
+ throw new ExpressionParserError(`Invalid number: ${value}`, start, this.expression);
7544
+ }
7545
+ return { type: "NUMBER" /* NUMBER */, value, position: start };
7546
+ }
7547
+ readIdentifierOrKeyword() {
7548
+ const start = this.position;
7549
+ let value = "";
7550
+ while (this.position < this.expression.length) {
7551
+ const char = this.codePointAt(this.position);
7552
+ if (!IDENTIFIER_PART.test(char)) {
7553
+ break;
7554
+ }
7555
+ value += char;
7556
+ this.position += char.length;
7557
+ }
7558
+ const type = this.getKeywordType(value);
7559
+ return { type, value, position: start };
7560
+ }
7561
+ /** Reads the whole code point at `position`, keeping surrogate pairs intact. */
7562
+ codePointAt(position) {
7563
+ const codePoint = this.expression.codePointAt(position);
7564
+ return codePoint === void 0 ? "" : String.fromCodePoint(codePoint);
7565
+ }
7566
+ getKeywordType(value) {
7567
+ switch (value) {
7568
+ case "true":
7569
+ return "TRUE" /* TRUE */;
7570
+ case "false":
7571
+ return "FALSE" /* FALSE */;
7572
+ case "null":
7573
+ return "NULL" /* NULL */;
7574
+ case "undefined":
7575
+ return "UNDEFINED" /* UNDEFINED */;
7576
+ default:
7577
+ return "IDENTIFIER" /* IDENTIFIER */;
7578
+ }
7579
+ }
7580
+ readOperatorOrPunctuation() {
7581
+ const start = this.position;
7582
+ const char = this.expression[this.position];
7583
+ const nextChar = this.position + 1 < this.expression.length ? this.expression[this.position + 1] : "";
7584
+ const thirdChar = this.position + 2 < this.expression.length ? this.expression[this.position + 2] : "";
7585
+ const threeChar = char + nextChar + thirdChar;
7586
+ if (threeChar === "===") {
7587
+ this.position += 3;
7588
+ return { type: "EQUAL" /* EQUAL */, value: "===", position: start };
7589
+ }
7590
+ if (threeChar === "!==") {
7591
+ this.position += 3;
7592
+ return { type: "NOT_EQUAL" /* NOT_EQUAL */, value: "!==", position: start };
7593
+ }
7594
+ const twoChar = char + nextChar;
7595
+ switch (twoChar) {
7596
+ case "==":
7597
+ this.position += 2;
7598
+ return { type: "EQUAL" /* EQUAL */, value: "==", position: start };
7599
+ case "!=":
7600
+ this.position += 2;
7601
+ return { type: "NOT_EQUAL" /* NOT_EQUAL */, value: "!=", position: start };
7602
+ case ">=":
7603
+ this.position += 2;
7604
+ return { type: "GREATER_EQUAL" /* GREATER_EQUAL */, value: ">=", position: start };
7605
+ case "<=":
7606
+ this.position += 2;
7607
+ return { type: "LESS_EQUAL" /* LESS_EQUAL */, value: "<=", position: start };
7608
+ case "&&":
7609
+ this.position += 2;
7610
+ return { type: "AND" /* AND */, value: "&&", position: start };
7611
+ case "||":
7612
+ this.position += 2;
7613
+ return { type: "OR" /* OR */, value: "||", position: start };
7614
+ case "=>":
7615
+ this.position += 2;
7616
+ return { type: "ARROW" /* ARROW */, value: "=>", position: start };
7617
+ case "??":
7618
+ this.position += 2;
7619
+ return { type: "NULLISH" /* NULLISH */, value: "??", position: start };
7620
+ case "?.":
7621
+ this.position += 2;
7622
+ return { type: "OPTIONAL_DOT" /* OPTIONAL_DOT */, value: "?.", position: start };
7623
+ }
7624
+ this.position++;
7625
+ switch (char) {
7626
+ case "+":
7627
+ return { type: "PLUS" /* PLUS */, value: "+", position: start };
7628
+ case "-":
7629
+ return { type: "MINUS" /* MINUS */, value: "-", position: start };
7630
+ case "*":
7631
+ return { type: "MULTIPLY" /* MULTIPLY */, value: "*", position: start };
7632
+ case "/":
7633
+ return { type: "DIVIDE" /* DIVIDE */, value: "/", position: start };
7634
+ case "%":
7635
+ return { type: "MODULO" /* MODULO */, value: "%", position: start };
7636
+ case ">":
7637
+ return { type: "GREATER" /* GREATER */, value: ">", position: start };
7638
+ case "<":
7639
+ return { type: "LESS" /* LESS */, value: "<", position: start };
7640
+ case "!":
7641
+ return { type: "NOT" /* NOT */, value: "!", position: start };
7642
+ case ".":
7643
+ return { type: "DOT" /* DOT */, value: ".", position: start };
7644
+ case ",":
7645
+ return { type: "COMMA" /* COMMA */, value: ",", position: start };
7646
+ case ":":
7647
+ return { type: "COLON" /* COLON */, value: ":", position: start };
7648
+ case "(":
7649
+ return { type: "LPAREN" /* LPAREN */, value: "(", position: start };
7650
+ case ")":
7651
+ return { type: "RPAREN" /* RPAREN */, value: ")", position: start };
7652
+ case "[":
7653
+ return { type: "LBRACKET" /* LBRACKET */, value: "[", position: start };
7654
+ case "]":
7655
+ return { type: "RBRACKET" /* RBRACKET */, value: "]", position: start };
7656
+ case "{":
7657
+ return { type: "LBRACE" /* LBRACE */, value: "{", position: start };
7658
+ case "}":
7659
+ return { type: "RBRACE" /* RBRACE */, value: "}", position: start };
7660
+ case "?":
7661
+ return { type: "QUESTION" /* QUESTION */, value: "?", position: start };
7662
+ default:
7663
+ throw new ExpressionParserError(`Unexpected character: ${char}`, start, this.expression);
7664
+ }
7665
+ }
7666
+ };
7667
+
7668
+ // packages/dynamic-forms/internal/src/lib/core/expressions/parser/parser.ts
7669
+ var Parser = class {
7670
+ tokens = [];
7671
+ current = 0;
7672
+ expression;
7673
+ constructor(expression) {
7674
+ this.expression = expression;
7675
+ }
7676
+ /** Parse the expression into an AST */
7677
+ parse() {
7678
+ const tokenizer = new Tokenizer(this.expression);
7679
+ this.tokens = tokenizer.tokenize();
7680
+ this.current = 0;
7681
+ if (this.isAtEnd()) {
7682
+ throw new ExpressionParserError("Empty expression", 0, this.expression);
7683
+ }
7684
+ const result = this.parseExpression();
7685
+ if (!this.isAtEnd()) {
7686
+ const token = this.peek();
7687
+ throw new ExpressionParserError(
7688
+ `Unexpected token '${token.value}' at position ${token.position} \u2014 expression has trailing content`,
7689
+ token.position,
7690
+ this.expression
7691
+ );
7692
+ }
7693
+ return result;
7694
+ }
7695
+ parseExpression() {
7696
+ const arrow = this.tryParseArrowFunction();
7697
+ if (arrow) return arrow;
7698
+ return this.parseConditional();
7699
+ }
7700
+ /**
7701
+ * Ternary `test ? consequent : alternate` — right-associative, sits between
7702
+ * the arrow-function check and logical-or in precedence.
7703
+ */
7704
+ parseConditional() {
7705
+ const test = this.parseShortCircuit();
7706
+ if (!this.match("QUESTION" /* QUESTION */)) return test;
7707
+ const consequent = this.parseExpression();
7708
+ this.consume("COLON" /* COLON */, 'Expected ":" between ternary branches');
7709
+ const alternate = this.parseExpression();
7710
+ return { type: "Conditional", test, consequent, alternate };
7711
+ }
7712
+ /**
7713
+ * Attempts to parse an arrow function. Returns null and leaves position
7714
+ * unchanged if the next tokens don't form an arrow function head.
7715
+ */
7716
+ tryParseArrowFunction() {
7717
+ const savedPos = this.current;
7718
+ if (this.check("IDENTIFIER" /* IDENTIFIER */) && this.checkAt(this.current + 1, "ARROW" /* ARROW */)) {
7719
+ const param = this.advance().value;
7720
+ this.advance();
7721
+ const body = this.parseExpression();
7722
+ return { type: "ArrowFunction", params: [param], body };
7723
+ }
7724
+ if (this.check("LPAREN" /* LPAREN */)) {
7725
+ this.advance();
7726
+ const params = [];
7727
+ if (this.check("RPAREN" /* RPAREN */)) {
7728
+ this.advance();
7729
+ } else if (this.check("IDENTIFIER" /* IDENTIFIER */)) {
7730
+ params.push(this.advance().value);
7731
+ while (this.check("COMMA" /* COMMA */)) {
7732
+ this.advance();
7733
+ if (!this.check("IDENTIFIER" /* IDENTIFIER */)) {
7734
+ this.current = savedPos;
7735
+ return null;
7736
+ }
7737
+ params.push(this.advance().value);
7738
+ }
7739
+ if (!this.check("RPAREN" /* RPAREN */)) {
7740
+ this.current = savedPos;
7741
+ return null;
7742
+ }
7743
+ this.advance();
7744
+ } else {
7745
+ this.current = savedPos;
7746
+ return null;
7747
+ }
7748
+ if (!this.check("ARROW" /* ARROW */)) {
7749
+ this.current = savedPos;
7750
+ return null;
7751
+ }
7752
+ this.advance();
7753
+ const body = this.parseExpression();
7754
+ return { type: "ArrowFunction", params, body };
7755
+ }
7756
+ return null;
7757
+ }
7758
+ checkAt(index, type) {
7759
+ if (index < 0 || index >= this.tokens.length) return false;
7760
+ return this.tokens[index].type === type;
7761
+ }
7762
+ /**
7763
+ * `a ?? b` or an `||`/`&&` chain. As in JavaScript, `??` can't be mixed with
7764
+ * `&&` or `||` without parentheses.
7765
+ */
7766
+ parseShortCircuit() {
7767
+ const first = this.parseEquality();
7768
+ if (!this.check("NULLISH" /* NULLISH */)) {
7769
+ const node2 = this.parseLogicalOr(first);
7770
+ if (this.check("NULLISH" /* NULLISH */)) this.throwMixedNullish();
7771
+ return node2;
7772
+ }
7773
+ let node = first;
7774
+ while (this.match("NULLISH" /* NULLISH */)) {
7775
+ node = { type: "BinaryOp", operator: "??", left: node, right: this.parseEquality() };
7776
+ }
7777
+ if (this.check("AND" /* AND */) || this.check("OR" /* OR */)) this.throwMixedNullish();
7778
+ return node;
7779
+ }
7780
+ throwMixedNullish() {
7781
+ throw new ExpressionParserError('Cannot mix "??" with "&&" or "||" without parentheses', this.peek().position, this.expression);
7782
+ }
7783
+ parseLogicalOr(first) {
7784
+ let node = this.parseLogicalAnd(first);
7785
+ while (this.match("OR" /* OR */)) {
7786
+ const operator = this.previous().value;
7787
+ const right = this.parseLogicalAnd();
7788
+ node = { type: "BinaryOp", operator, left: node, right };
7789
+ }
7790
+ return node;
7791
+ }
7792
+ parseLogicalAnd(first) {
7793
+ let node = first ?? this.parseEquality();
7794
+ while (this.match("AND" /* AND */)) {
7795
+ const operator = this.previous().value;
7796
+ const right = this.parseEquality();
7797
+ node = { type: "BinaryOp", operator, left: node, right };
7798
+ }
7799
+ return node;
7800
+ }
7801
+ parseEquality() {
7802
+ let node = this.parseComparison();
7803
+ while (this.match("EQUAL" /* EQUAL */, "NOT_EQUAL" /* NOT_EQUAL */)) {
7804
+ const operator = this.previous().value;
7805
+ const right = this.parseComparison();
7806
+ node = { type: "BinaryOp", operator, left: node, right };
7807
+ }
7808
+ return node;
7809
+ }
7810
+ parseComparison() {
7811
+ let node = this.parseAddition();
7812
+ while (this.match("GREATER" /* GREATER */, "GREATER_EQUAL" /* GREATER_EQUAL */, "LESS" /* LESS */, "LESS_EQUAL" /* LESS_EQUAL */)) {
7813
+ const operator = this.previous().value;
7814
+ const right = this.parseAddition();
7815
+ node = { type: "BinaryOp", operator, left: node, right };
7816
+ }
7817
+ return node;
7818
+ }
7819
+ parseAddition() {
7820
+ let node = this.parseMultiplication();
7821
+ while (this.match("PLUS" /* PLUS */, "MINUS" /* MINUS */)) {
7822
+ const operator = this.previous().value;
7823
+ const right = this.parseMultiplication();
7824
+ node = { type: "BinaryOp", operator, left: node, right };
7825
+ }
7826
+ return node;
7827
+ }
7828
+ parseMultiplication() {
7829
+ let node = this.parseUnary();
7830
+ while (this.match("MULTIPLY" /* MULTIPLY */, "DIVIDE" /* DIVIDE */, "MODULO" /* MODULO */)) {
7831
+ const operator = this.previous().value;
7832
+ const right = this.parseUnary();
7833
+ node = { type: "BinaryOp", operator, left: node, right };
7834
+ }
7835
+ return node;
7836
+ }
7837
+ parseUnary() {
7838
+ if (this.match("NOT" /* NOT */, "MINUS" /* MINUS */, "PLUS" /* PLUS */)) {
7839
+ const operator = this.previous().value;
7840
+ const operand = this.parseUnary();
7841
+ return { type: "UnaryOp", operator, operand };
7842
+ }
7843
+ return this.parsePostfix();
7844
+ }
7845
+ parsePostfix() {
7846
+ let node = this.parsePrimary();
7847
+ while (true) {
7848
+ if (this.match("DOT" /* DOT */)) {
7849
+ if (!this.check("IDENTIFIER" /* IDENTIFIER */)) {
7850
+ throw new ExpressionParserError('Expected property name after "."', this.peek().position, this.expression);
7851
+ }
7852
+ const property = this.advance().value;
7853
+ node = { type: "MemberAccess", object: node, property };
7854
+ } else if (this.match("OPTIONAL_DOT" /* OPTIONAL_DOT */)) {
7855
+ if (this.match("LBRACKET" /* LBRACKET */)) {
7856
+ const property = this.parseExpression();
7857
+ this.consume("RBRACKET" /* RBRACKET */, 'Expected "]" after computed property');
7858
+ node = { type: "ComputedMemberAccess", object: node, property, optional: true };
7859
+ } else if (this.match("LPAREN" /* LPAREN */)) {
7860
+ const args = this.parseArgumentList();
7861
+ this.consume("RPAREN" /* RPAREN */, 'Expected ")" after arguments');
7862
+ node = { type: "CallExpression", callee: node, arguments: args, optional: true };
7863
+ } else if (this.check("IDENTIFIER" /* IDENTIFIER */)) {
7864
+ const property = this.advance().value;
7865
+ node = { type: "MemberAccess", object: node, property, optional: true };
7866
+ } else {
7867
+ throw new ExpressionParserError('Expected property name, "[", or "(" after "?."', this.peek().position, this.expression);
7868
+ }
7869
+ } else if (this.match("LBRACKET" /* LBRACKET */)) {
7870
+ const property = this.parseExpression();
7871
+ this.consume("RBRACKET" /* RBRACKET */, 'Expected "]" after computed property');
7872
+ node = { type: "ComputedMemberAccess", object: node, property };
7873
+ } else if (this.match("LPAREN" /* LPAREN */)) {
7874
+ const args = this.parseArgumentList();
7875
+ this.consume("RPAREN" /* RPAREN */, 'Expected ")" after arguments');
7876
+ node = { type: "CallExpression", callee: node, arguments: args };
7877
+ } else {
7878
+ break;
7879
+ }
7880
+ }
7881
+ return node;
7882
+ }
7883
+ parsePrimary() {
7884
+ if (this.match("TRUE" /* TRUE */)) {
7885
+ return { type: "Literal", value: true };
7886
+ }
7887
+ if (this.match("FALSE" /* FALSE */)) {
7888
+ return { type: "Literal", value: false };
7889
+ }
7890
+ if (this.match("NULL" /* NULL */)) {
7891
+ return { type: "Literal", value: null };
7892
+ }
7893
+ if (this.match("UNDEFINED" /* UNDEFINED */)) {
7894
+ return { type: "Literal", value: void 0 };
7895
+ }
7896
+ if (this.match("NUMBER" /* NUMBER */)) {
7897
+ return { type: "Literal", value: parseFloat(this.previous().value) };
7898
+ }
7899
+ if (this.match("STRING" /* STRING */)) {
7900
+ return { type: "Literal", value: this.previous().value };
7901
+ }
7902
+ if (this.match("LBRACKET" /* LBRACKET */)) {
7903
+ const elements = this.parseArrayElements();
7904
+ this.consume("RBRACKET" /* RBRACKET */, 'Expected "]" after array elements');
7905
+ return { type: "ArrayLiteral", elements };
7906
+ }
7907
+ if (this.match("LBRACE" /* LBRACE */)) {
7908
+ const properties = this.parseObjectProperties();
7909
+ this.consume("RBRACE" /* RBRACE */, 'Expected "}" after object properties');
7910
+ return { type: "ObjectLiteral", properties };
7911
+ }
7912
+ if (this.match("IDENTIFIER" /* IDENTIFIER */)) {
7913
+ return { type: "Identifier", name: this.previous().value };
7914
+ }
7915
+ if (this.match("LPAREN" /* LPAREN */)) {
7916
+ const expr = this.parseExpression();
7917
+ this.consume("RPAREN" /* RPAREN */, 'Expected ")" after expression');
7918
+ return expr;
7919
+ }
7920
+ throw new ExpressionParserError(`Unexpected token: ${this.peek().value}`, this.peek().position, this.expression);
7921
+ }
7922
+ parseArgumentList() {
7923
+ const args = [];
7924
+ if (!this.check("RPAREN" /* RPAREN */)) {
7925
+ do {
7926
+ args.push(this.parseExpression());
7927
+ } while (this.match("COMMA" /* COMMA */));
7928
+ }
7929
+ return args;
7930
+ }
7931
+ parseArrayElements() {
7932
+ const elements = [];
7933
+ if (!this.check("RBRACKET" /* RBRACKET */)) {
7934
+ do {
7935
+ elements.push(this.parseExpression());
7936
+ } while (this.match("COMMA" /* COMMA */));
7937
+ }
7938
+ return elements;
7939
+ }
7940
+ parseObjectProperties() {
7941
+ const properties = [];
7942
+ if (this.check("RBRACE" /* RBRACE */)) {
7943
+ return properties;
7944
+ }
7945
+ do {
7946
+ if (this.check("RBRACE" /* RBRACE */)) break;
7947
+ let key;
7948
+ if (this.check("IDENTIFIER" /* IDENTIFIER */) || this.check("STRING" /* STRING */)) {
7949
+ key = this.advance().value;
7950
+ } else {
7951
+ throw new ExpressionParserError(
7952
+ `Expected property name (identifier or string) in object literal, got '${this.peek().value}'`,
7953
+ this.peek().position,
7954
+ this.expression
7955
+ );
7956
+ }
7957
+ this.consume("COLON" /* COLON */, 'Expected ":" after property name in object literal');
7958
+ const value = this.parseExpression();
7959
+ properties.push({ key, value });
7960
+ } while (this.match("COMMA" /* COMMA */));
7961
+ return properties;
7962
+ }
7963
+ match(...types) {
7964
+ for (const type of types) {
7965
+ if (this.check(type)) {
7966
+ this.advance();
7967
+ return true;
7968
+ }
7969
+ }
7970
+ return false;
7971
+ }
7972
+ check(type) {
7973
+ if (this.isAtEnd()) return false;
7974
+ return this.peek().type === type;
7975
+ }
7976
+ advance() {
7977
+ if (!this.isAtEnd()) this.current++;
7978
+ return this.previous();
7979
+ }
7980
+ isAtEnd() {
7981
+ return this.peek().type === "EOF" /* EOF */;
7982
+ }
7983
+ peek() {
7984
+ return this.tokens[this.current];
7985
+ }
7986
+ previous() {
7987
+ return this.tokens[this.current - 1];
7988
+ }
7989
+ consume(type, message) {
7990
+ if (this.check(type)) return this.advance();
7991
+ throw new ExpressionParserError(message, this.peek().position, this.expression);
7992
+ }
7993
+ };
7994
+
7995
+ // packages/dynamic-forms/internal/src/lib/core/expressions/parser/expression-parser.ts
7996
+ var MAX_AST_CACHE_SIZE = 1e3;
7997
+ var LRUCache = class {
7998
+ cache = /* @__PURE__ */ new Map();
7999
+ maxSize;
8000
+ constructor(maxSize) {
8001
+ this.maxSize = maxSize;
8002
+ }
8003
+ get(key) {
8004
+ const value = this.cache.get(key);
8005
+ if (value !== void 0) {
8006
+ this.cache.delete(key);
8007
+ this.cache.set(key, value);
8008
+ }
8009
+ return value;
8010
+ }
8011
+ set(key, value) {
8012
+ if (this.cache.has(key)) {
8013
+ this.cache.delete(key);
8014
+ }
8015
+ this.cache.set(key, value);
8016
+ if (this.cache.size > this.maxSize) {
8017
+ const firstKey = this.cache.keys().next().value;
8018
+ if (firstKey !== void 0) {
8019
+ this.cache.delete(firstKey);
8020
+ }
8021
+ }
8022
+ }
8023
+ clear() {
8024
+ this.cache.clear();
8025
+ }
8026
+ get size() {
8027
+ return this.cache.size;
8028
+ }
8029
+ };
8030
+ var astCache = new LRUCache(MAX_AST_CACHE_SIZE);
8031
+ var ExpressionParser = class {
8032
+ /**
8033
+ * Parse an expression string into an AST
8034
+ * Results are cached for performance using LRU eviction
8035
+ */
8036
+ static parse(expression) {
8037
+ const cached = astCache.get(expression);
8038
+ if (cached) {
8039
+ return cached;
8040
+ }
8041
+ const parser = new Parser(expression);
8042
+ const ast = parser.parse();
8043
+ astCache.set(expression, ast);
8044
+ return ast;
8045
+ }
8046
+ /** Evaluate an expression with a given scope */
8047
+ static evaluate(expression, scope) {
8048
+ try {
8049
+ const ast = this.parse(expression);
8050
+ const evaluator = new Evaluator(scope, expression);
8051
+ return evaluator.evaluate(ast);
8052
+ } catch (error) {
8053
+ if (error instanceof ExpressionParserError) {
8054
+ throw error;
8055
+ }
8056
+ throw new ExpressionParserError(
8057
+ `Error evaluating expression: ${error instanceof Error ? error.message : String(error)}`,
8058
+ 0,
8059
+ expression
8060
+ );
8061
+ }
8062
+ }
8063
+ /** Clear the AST cache */
8064
+ static clearCache() {
8065
+ astCache.clear();
8066
+ }
8067
+ /** Get cache statistics */
8068
+ static getCacheStats() {
8069
+ return {
8070
+ size: astCache.size,
8071
+ maxSize: MAX_AST_CACHE_SIZE
8072
+ };
8073
+ }
8074
+ };
8075
+
8076
+ // packages/dynamic-forms/internal/src/lib/core/expressions/parser/static-check.ts
8077
+ var CONDITION_SCOPE_VARIABLES = /* @__PURE__ */ new Set([
8078
+ "fieldValue",
8079
+ "formValue",
8080
+ "fieldPath",
8081
+ "customFunctions",
8082
+ "groupValue",
8083
+ "rootFormValue",
8084
+ "arrayIndex",
8085
+ "arrayPath",
8086
+ "externalData",
8087
+ "fieldState",
8088
+ "formFieldState"
8089
+ ]);
8090
+ function findStaticExpressionProblems(ast, scope) {
8091
+ const problems = /* @__PURE__ */ new Set();
8092
+ const visit2 = (node, locals) => {
8093
+ switch (node.type) {
8094
+ case "Identifier":
8095
+ if (!scope.has(node.name) && !locals.has(node.name)) problems.add(`'${node.name}' is not available in expressions`);
8096
+ return;
8097
+ case "MemberAccess":
8098
+ visit2(node.object, locals);
8099
+ return;
8100
+ case "ComputedMemberAccess":
8101
+ visit2(node.object, locals);
8102
+ visit2(node.property, locals);
8103
+ return;
8104
+ case "CallExpression":
8105
+ if (node.callee.type === "MemberAccess") {
8106
+ if (!ALLOWED_METHOD_NAMES.has(node.callee.property)) problems.add(`method '${node.callee.property}' is not allowed`);
8107
+ } else {
8108
+ problems.add(`'${describeCallee(node.callee)}(...)' is a direct function call; only allowed methods can be called`);
8109
+ }
8110
+ visit2(node.callee.type === "MemberAccess" ? node.callee.object : node.callee, locals);
8111
+ node.arguments.forEach((arg) => visit2(arg, locals));
8112
+ return;
8113
+ case "BinaryOp":
8114
+ visit2(node.left, locals);
8115
+ visit2(node.right, locals);
8116
+ return;
8117
+ case "UnaryOp":
8118
+ visit2(node.operand, locals);
8119
+ return;
8120
+ case "Conditional":
8121
+ visit2(node.test, locals);
8122
+ visit2(node.consequent, locals);
8123
+ visit2(node.alternate, locals);
8124
+ return;
8125
+ case "ArrayLiteral":
8126
+ node.elements.forEach((element) => visit2(element, locals));
8127
+ return;
8128
+ case "ObjectLiteral":
8129
+ node.properties.forEach((property) => visit2(property.value, locals));
8130
+ return;
8131
+ case "ArrowFunction":
8132
+ visit2(node.body, /* @__PURE__ */ new Set([...locals, ...node.params]));
8133
+ return;
8134
+ case "Literal":
8135
+ return;
8136
+ }
8137
+ };
8138
+ visit2(ast, /* @__PURE__ */ new Set());
8139
+ return [...problems];
8140
+ }
8141
+ function describeCallee(node) {
8142
+ return node.type === "Identifier" ? node.name : "expression";
8143
+ }
8144
+ function findFieldExpressionProblems(field) {
8145
+ const found = [];
8146
+ const seen = /* @__PURE__ */ new WeakSet();
8147
+ const check = (expression, path) => {
8148
+ let problems;
8149
+ try {
8150
+ problems = findStaticExpressionProblems(ExpressionParser.parse(expression), CONDITION_SCOPE_VARIABLES);
8151
+ } catch (e) {
8152
+ problems = [e instanceof Error ? e.message : String(e)];
8153
+ }
8154
+ if (problems.length > 0) found.push({ path, expression, message: problems.join("; ") });
8155
+ };
8156
+ const visit2 = (node, path) => {
8157
+ if (node === null || typeof node !== "object" || seen.has(node)) return;
8158
+ seen.add(node);
8159
+ if (Array.isArray(node)) {
8160
+ node.forEach((item, i) => visit2(item, `${path}[${i}]`));
8161
+ return;
8162
+ }
8163
+ const record = node;
8164
+ const type = record["type"];
8165
+ if ((type === "javascript" || type === "derivation") && typeof record["expression"] === "string") {
8166
+ check(record["expression"], path);
8167
+ }
8168
+ if ((type === "and" || type === "or") && Array.isArray(record["conditions"]) && record["conditions"].length === 0) {
8169
+ found.push({ path, message: `an empty '${type}' group never fires` });
8170
+ }
8171
+ for (const [key, value] of Object.entries(record)) {
8172
+ if (key !== "fields") visit2(value, path ? `${path}.${key}` : key);
8173
+ }
8174
+ };
8175
+ if (field !== null && typeof field === "object" && typeof field["derivation"] === "string") {
8176
+ check(field["derivation"], "derivation");
8177
+ }
8178
+ visit2(field, "");
8179
+ return found;
8180
+ }
8181
+
7111
8182
  // internal/dynamic-forms-validation/validate/src/tools/validate-config.tool.ts
7112
8183
  var formConfigSchemas = {
7113
8184
  material: MatFormConfigSchema,
@@ -7371,11 +8442,22 @@ function preValidateConfig(config) {
7371
8442
  message: `Cannot mix page and non-page fields at top level. Found non-page fields: ${nonPageFields.join(", ")}. FIX: Move these fields INSIDE ${firstPageKey ? `the "${firstPageKey}" page` : "the first page"}'s fields array. In multi-page mode, hidden fields and other non-page fields must be placed inside a page (usually the first one). See: ngforge_quick_lookup topic="multi-page-gotchas"`
7372
8443
  });
7373
8444
  }
8445
+ const reportedExpressions = /* @__PURE__ */ new Set();
7374
8446
  function checkField(field, path, parentType) {
7375
8447
  if (!field || typeof field !== "object") return;
7376
8448
  const f = field;
7377
8449
  const fieldType = f["type"];
7378
8450
  const fieldKey = f["key"];
8451
+ for (const problem of findFieldExpressionProblems(field)) {
8452
+ const problemPath = `${path}.${problem.path}`;
8453
+ if (reportedExpressions.has(problemPath)) continue;
8454
+ reportedExpressions.add(problemPath);
8455
+ errors.push({
8456
+ path: problemPath,
8457
+ ruleId: "core/expression-syntax",
8458
+ message: problem.expression === void 0 ? `${problem.message[0].toUpperCase()}${problem.message.slice(1)}: an empty group evaluates to false.` : `Expression '${problem.expression}' can never work: ${problem.message}. Expressions support property access, operators, ternaries and allowed methods only; use a custom function for anything else.`
8459
+ });
8460
+ }
7379
8461
  const validators = f["validators"];
7380
8462
  if (Array.isArray(validators)) {
7381
8463
  validators.forEach((validator, vIdx) => {
@@ -8113,6 +9195,7 @@ function parseConfigInput(config) {
8113
9195
  }
8114
9196
 
8115
9197
  // internal/dynamic-forms-validation/reporting/fix-suggestions.ts
9198
+ var EXPRESSION_SYNTAX_SUGGESTION = "Rewrite with property access, operators, `??`, ternaries and allowed methods, for example `(formValue.a ?? 0) + 1` instead of `parseInt(formValue.a)`, or move the logic into a custom function.";
8116
9199
  var FIX_SUGGESTIONS = {
8117
9200
  options: "Move `options` from `props: { options: [...] }` to field level: `{ key, type, options: [...] }`",
8118
9201
  label: "Remove `label` from this container field (page/group/row/array). Use a `text` field inside for headings.",
@@ -8148,6 +9231,7 @@ function pathSegments(path) {
8148
9231
  return path.split(/[.[\]]+/).filter((segment) => segment.length > 0 && !/^\d+$/.test(segment));
8149
9232
  }
8150
9233
  function getFixSuggestion(error) {
9234
+ if (error.ruleId === "core/expression-syntax") return EXPRESSION_SYNTAX_SUGGESTION;
8151
9235
  for (const segment of pathSegments(error.path).reverse()) {
8152
9236
  if (FIX_SUGGESTIONS[segment]) {
8153
9237
  return FIX_SUGGESTIONS[segment];
@@ -8288,6 +9372,11 @@ function rule(id, summary, why) {
8288
9372
  var RULES = Object.freeze(
8289
9373
  Object.fromEntries(
8290
9374
  [
9375
+ rule(
9376
+ "core/expression-syntax",
9377
+ "Write conditions and derivations the expression parser can run",
9378
+ "An expression is a string, so the compiler never sees it. One using a global, a direct call or unparseable syntax evaluates to false or undefined at runtime instead of failing."
9379
+ ),
8291
9380
  rule(
8292
9381
  "core/hidden-minimal",
8293
9382
  "Keep hidden fields to `key`, `type`, `value` and `className`",
@@ -8538,7 +9627,7 @@ function registerResources(server) {
8538
9627
  }
8539
9628
 
8540
9629
  // packages/dynamic-form-mcp/src/tools/lookup.tool.ts
8541
- import { z as z59 } from "zod";
9630
+ import { z as z61 } from "zod";
8542
9631
 
8543
9632
  // packages/dynamic-form-mcp/src/tools/data/lookup-topics.ts
8544
9633
  var TOPICS = {
@@ -11840,11 +12929,11 @@ Patterns: field-placement, logic-matrix, context-api, containers, multi-page-got
11840
12929
  Use topic="list" to see all available topics with descriptions.
11841
12930
  Use ngforge_search query="your question" to find topics by keyword.`,
11842
12931
  {
11843
- topic: z59.string().describe(
12932
+ topic: z61.string().describe(
11844
12933
  'Topic to look up: field types (input, select, hidden, group, row, array, container, page), wrappers (wrappers, css, section, arraySection), concepts (validation, conditional, derivation, property-derivation, options-format), patterns (golden-path, pitfalls, multi-page-gotchas), or "list" to see all topics'
11845
12934
  ),
11846
- depth: z59.enum(["brief", "full", "schema"]).default("full").describe("brief=quick syntax (~20 lines), full=complete docs with examples, schema=include JSON schema"),
11847
- uiIntegration: z59.enum(UI_INTEGRATIONS2).optional().describe("Filter UI-specific info (only with depth=schema). material, bootstrap, primeng, ionic")
12935
+ depth: z61.enum(["brief", "full", "schema"]).default("full").describe("brief=quick syntax (~20 lines), full=complete docs with examples, schema=include JSON schema"),
12936
+ uiIntegration: z61.enum(UI_INTEGRATIONS2).optional().describe("Filter UI-specific info (only with depth=schema). material, bootstrap, primeng, ionic")
11848
12937
  },
11849
12938
  async ({ topic, depth, uiIntegration }) => {
11850
12939
  const normalizedTopic = topic.toLowerCase().trim();
@@ -11892,7 +12981,7 @@ ${nextSteps}`;
11892
12981
  }
11893
12982
 
11894
12983
  // packages/dynamic-form-mcp/src/tools/examples.tool.ts
11895
- import { z as z60 } from "zod";
12984
+ import { z as z62 } from "zod";
11896
12985
  var PATTERNS = {
11897
12986
  // ========== MINIMAL PATTERNS (NEW) ==========
11898
12987
  "minimal-multipage": {
@@ -13973,21 +15062,24 @@ const megaFormConfig = {
13973
15062
  key: 'sourceA',
13974
15063
  type: 'input',
13975
15064
  label: 'Source A',
13976
- value: '10'
15065
+ value: 10,
15066
+ props: { type: 'number' }
13977
15067
  },
13978
15068
  {
13979
15069
  key: 'sourceB',
13980
15070
  type: 'input',
13981
15071
  label: 'Source B',
13982
- value: '20'
15072
+ value: 20,
15073
+ props: { type: 'number' }
13983
15074
  },
13984
15075
  {
13985
15076
  key: 'derived',
13986
15077
  type: 'input',
13987
15078
  label: 'Derived (A + B)',
13988
15079
  readonly: true,
15080
+ props: { type: 'number' },
13989
15081
  // Self-targeting derivation - no targetField needed
13990
- derivation: 'parseInt(formValue.sourceA || 0) + parseInt(formValue.sourceB || 0)'
15082
+ derivation: '(formValue.sourceA ?? 0) + (formValue.sourceB ?? 0)'
13991
15083
  },
13992
15084
 
13993
15085
  // CONDITIONAL VISIBILITY
@@ -14157,10 +15249,10 @@ Standard patterns: derivation, property-derivation, multi-page, conditional, val
14157
15249
  Use pattern="list" to see all available patterns.
14158
15250
  Use depth="minimal" for code-only output (no markdown).`,
14159
15251
  {
14160
- pattern: z60.string().optional().describe(
15252
+ pattern: z62.string().optional().describe(
14161
15253
  'Pattern to get: minimal-multipage, minimal-array, minimal-simplified-array, minimal-conditional, minimal-validation, minimal-hidden, derivation, property-derivation, multi-page, conditional, validation, complete, mega. Use "list" to see all.'
14162
15254
  ),
14163
- depth: z60.enum(["minimal", "brief", "full", "explained"]).default("full").describe(
15255
+ depth: z62.enum(["minimal", "brief", "full", "explained"]).default("full").describe(
14164
15256
  "minimal=code only (~20-50 lines), brief=code+summary, full=code+comments (default), explained=code+detailed explanation"
14165
15257
  )
14166
15258
  },
@@ -14227,7 +15319,7 @@ function extractCode(markdown) {
14227
15319
  // packages/dynamic-form-mcp/src/tools/validate.tool.ts
14228
15320
  import { access } from "node:fs/promises";
14229
15321
  import { dirname as dirname2, join as join2, parse, resolve } from "node:path";
14230
- import { z as z61 } from "zod";
15322
+ import { z as z63 } from "zod";
14231
15323
  var UI_INTEGRATIONS3 = ["material", "bootstrap", "primeng", "ionic"];
14232
15324
  async function projectDisabledRules(filePath) {
14233
15325
  return (await loadProjectRules(await nearestManifest(dirname2(filePath)))).disabled;
@@ -14299,10 +15391,10 @@ Example errors you'll see:
14299
15391
  - "options MUST be at FIELD level, NOT inside props"
14300
15392
  - "containers only support 'hidden' logic type"`,
14301
15393
  {
14302
- config: z61.union([z61.string(), z61.object({}).passthrough()]).describe(
15394
+ config: z63.union([z63.string(), z63.object({}).passthrough()]).describe(
14303
15395
  "File path (.ts/.js) OR JSON string OR JSON object. Auto-detects: paths ending in .ts/.js or starting with / are treated as files."
14304
15396
  ),
14305
- uiIntegration: z61.enum(UI_INTEGRATIONS3).default("material").describe("UI library to validate against (material, bootstrap, primeng, ionic). Defaults to material.")
15397
+ uiIntegration: z63.enum(UI_INTEGRATIONS3).default("material").describe("UI library to validate against (material, bootstrap, primeng, ionic). Defaults to material.")
14306
15398
  },
14307
15399
  async ({ config, uiIntegration }) => {
14308
15400
  try {
@@ -14399,7 +15491,7 @@ If validating JSON, ensure:
14399
15491
  }
14400
15492
 
14401
15493
  // packages/dynamic-form-mcp/src/tools/scaffold.tool.ts
14402
- import { z as z62 } from "zod";
15494
+ import { z as z64 } from "zod";
14403
15495
  var UI_INTEGRATIONS4 = ["material", "bootstrap", "primeng", "ionic"];
14404
15496
  function parseFieldDefs(fields) {
14405
15497
  return fields.map((f) => {
@@ -14654,12 +15746,12 @@ Examples:
14654
15746
  - With groups: pages=0 groups=["address","billing"]
14655
15747
  - With hidden: hidden=["userId:abc123","source:web"]`,
14656
15748
  {
14657
- pages: z62.number().min(0).max(10).default(0).describe("Number of pages (0 = single-page form, 1-10 = multi-page wizard)"),
14658
- arrays: z62.array(z62.string()).optional().describe('Array field names for dynamic lists, e.g., ["contacts", "addresses"]'),
14659
- groups: z62.array(z62.string()).optional().describe('Group field names for nested objects, e.g., ["address", "billing"]'),
14660
- hidden: z62.array(z62.string()).optional().describe('Hidden fields as "name:value" pairs, e.g., ["userId:abc", "version:1"]'),
14661
- fields: z62.array(z62.string()).optional().describe('Basic fields as "name:type" pairs, e.g., ["email:input", "country:select", "age:slider"]'),
14662
- uiIntegration: z62.enum(UI_INTEGRATIONS4).default("material").describe("UI library (for future UI-specific props). Defaults to material.")
15749
+ pages: z64.number().min(0).max(10).default(0).describe("Number of pages (0 = single-page form, 1-10 = multi-page wizard)"),
15750
+ arrays: z64.array(z64.string()).optional().describe('Array field names for dynamic lists, e.g., ["contacts", "addresses"]'),
15751
+ groups: z64.array(z64.string()).optional().describe('Group field names for nested objects, e.g., ["address", "billing"]'),
15752
+ hidden: z64.array(z64.string()).optional().describe('Hidden fields as "name:value" pairs, e.g., ["userId:abc", "version:1"]'),
15753
+ fields: z64.array(z64.string()).optional().describe('Basic fields as "name:type" pairs, e.g., ["email:input", "country:select", "age:slider"]'),
15754
+ uiIntegration: z64.enum(UI_INTEGRATIONS4).default("material").describe("UI library (for future UI-specific props). Defaults to material.")
14663
15755
  },
14664
15756
  async ({ pages, arrays = [], groups = [], hidden = [], fields = [] }) => {
14665
15757
  const fieldDefs = parseFieldDefs(fields);
@@ -14701,7 +15793,7 @@ Examples:
14701
15793
  }
14702
15794
 
14703
15795
  // packages/dynamic-form-mcp/src/tools/search.tool.ts
14704
- import { z as z63 } from "zod";
15796
+ import { z as z65 } from "zod";
14705
15797
  var searchIndex = null;
14706
15798
  function getTopicSubcategory(key) {
14707
15799
  const fieldTypes = ["input", "select", "slider", "radio", "checkbox", "textarea", "datepicker", "toggle", "text", "hidden"];
@@ -14862,7 +15954,7 @@ Use this when you don't know the exact topic name.
14862
15954
 
14863
15955
  New to ng-forge? Start with: ngforge_lookup topic="workflow"`,
14864
15956
  {
14865
- query: z63.string().describe("Natural language or keywords to search for")
15957
+ query: z65.string().describe("Natural language or keywords to search for")
14866
15958
  },
14867
15959
  async ({ query }) => {
14868
15960
  const index = buildIndex();