@ahmadmubarak98/namozaj 1.16.21 → 1.16.23

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.
Files changed (3) hide show
  1. package/dist/main.d.ts +22 -2
  2. package/dist/namozaj.js +2557 -2535
  3. package/package.json +1 -1
package/dist/main.d.ts CHANGED
@@ -233,7 +233,7 @@ export declare type FieldOptionFetchFunction = ((data: any, index: number) => Pr
233
233
 
234
234
  export declare type FieldSize = 'small' | 'medium';
235
235
 
236
- export declare type FieldType = "custom" | "text" | "phone" | "number" | "slider" | "select" | "multi-select" | "checkbox-group" | "radio-group" | "checkbox" | "switch" | "date" | "time" | "datetime" | "file" | "repeater" | "field-array" | "group" | "panel-group" | "button" | "color";
236
+ export declare type FieldType = "custom" | "text" | "phone" | "number" | "slider" | "select" | "multi-select" | "checkbox-group" | "radio-group" | "checkbox" | "switch" | "date" | "time" | "datetime" | "file" | "repeater" | "field-array" | "group" | "panel-group" | "button" | "color" | "ghost";
237
237
 
238
238
  export declare type FieldValueType = string | number | boolean | Date | File | (string | undefined)[] | ({
239
239
  [x: string]: any;
@@ -323,6 +323,26 @@ export declare type FullRowConfig = {
323
323
  xl?: boolean;
324
324
  };
325
325
 
326
+ /**
327
+ * GhostField registers itself in React Hook Form so other fields can watch()
328
+ * its value via visibility rules, but renders absolutely nothing in the DOM.
329
+ * It is used to inject cross-form values into an active form instance.
330
+ */
331
+ export declare function GhostField({ config, formMethods }: GhostFieldRendererProps): null;
332
+
333
+ export declare type GhostFieldConfig = {
334
+ name: string;
335
+ type: "ghost";
336
+ meta: Omit<BaseFieldConfig["meta"], "defaultValue"> & {
337
+ defaultValue?: any;
338
+ };
339
+ };
340
+
341
+ declare interface GhostFieldRendererProps {
342
+ config: GhostFieldConfig;
343
+ formMethods: NamozajFormMethods;
344
+ }
345
+
326
346
  export declare type GridColumnConfig = {
327
347
  xs?: GridSize;
328
348
  sm?: GridSize;
@@ -387,7 +407,7 @@ export declare const NamozajDateLocaleProvider: (<TDate extends PickerValidDate,
387
407
  propTypes?: any;
388
408
  };
389
409
 
390
- export declare type NamozajField = CustomFieldConfig | TextFieldConfig | ColorFieldConfig | NumberFieldConfig | SliderFieldConfig | PhoneFieldConfig | GroupFieldConfig | PanelGroupFieldConfig | SelectFieldConfig | MultiSelectFieldConfig | CheckBoxGroupFieldConfig | RadioGroupFieldConfig | SwitchFieldConfig | CheckboxFieldConfig | DateFieldConfig | FileFieldConfig | ComputedFieldConfig | SectionFieldConfig | ButtonFieldConfig | RepeaterFieldConfig | FieldArrayFieldConfig;
410
+ export declare type NamozajField = CustomFieldConfig | TextFieldConfig | ColorFieldConfig | NumberFieldConfig | SliderFieldConfig | PhoneFieldConfig | GroupFieldConfig | PanelGroupFieldConfig | SelectFieldConfig | MultiSelectFieldConfig | CheckBoxGroupFieldConfig | RadioGroupFieldConfig | SwitchFieldConfig | CheckboxFieldConfig | DateFieldConfig | FileFieldConfig | ComputedFieldConfig | SectionFieldConfig | ButtonFieldConfig | RepeaterFieldConfig | FieldArrayFieldConfig | GhostFieldConfig;
391
411
 
392
412
  export declare type NamozajFormMethods = RHFFormMethods & {
393
413
  validateForm: () => Promise<boolean>;