@ahmadmubarak98/namozaj 1.2.0 → 1.4.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.
- package/dist/main.d.ts +14 -2
- package/dist/namozaj.js +915 -821
- package/package.json +2 -2
package/dist/main.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export declare type BaseFieldConfig = {
|
|
|
13
13
|
style?: React.CSSProperties;
|
|
14
14
|
placeholder?: string;
|
|
15
15
|
tooltip?: TooltipConfig;
|
|
16
|
+
translated?: boolean;
|
|
16
17
|
helperText?: HelperTextConfig;
|
|
17
18
|
validations?: ValidationRule[];
|
|
18
19
|
grid?: GridColumnConfig;
|
|
@@ -20,6 +21,7 @@ export declare type BaseFieldConfig = {
|
|
|
20
21
|
disabled?: boolean;
|
|
21
22
|
visibilityRules?: VisibilityRule[];
|
|
22
23
|
dependencies?: FieldDependency[];
|
|
24
|
+
onValueChange?: (value: FieldValueType, formMethods: any) => void;
|
|
23
25
|
};
|
|
24
26
|
};
|
|
25
27
|
|
|
@@ -51,6 +53,8 @@ export declare type CheckboxFieldConfig = BaseFieldConfig & {
|
|
|
51
53
|
export declare type CheckBoxGroupFieldConfig = BaseFieldConfig & {
|
|
52
54
|
type: "checkbox-group";
|
|
53
55
|
meta: BaseFieldConfig["meta"] & {
|
|
56
|
+
min?: number;
|
|
57
|
+
max?: number;
|
|
54
58
|
horizontal?: boolean;
|
|
55
59
|
options?: FieldOption[];
|
|
56
60
|
optionsFetch?: FieldOptionFetch;
|
|
@@ -233,7 +237,14 @@ export declare interface NamozajLocalizationOptions {
|
|
|
233
237
|
locales: string[];
|
|
234
238
|
translatedLabelSuffix?: (label: string, locale: string) => string;
|
|
235
239
|
translatedFieldNameSuffix?: (locale: string) => string;
|
|
236
|
-
translatedFieldGrid?: (
|
|
240
|
+
translatedFieldGrid?: (field: DynamicFormField, locale: string) => GridColumnConfig;
|
|
241
|
+
localePicker?: {
|
|
242
|
+
name?: string;
|
|
243
|
+
label?: string;
|
|
244
|
+
getLocaleLabel: (locale: string) => string;
|
|
245
|
+
onLocaleChange: (locale: string[], formMethods: any) => void;
|
|
246
|
+
grid?: GridColumnConfig;
|
|
247
|
+
};
|
|
237
248
|
}
|
|
238
249
|
|
|
239
250
|
export declare type NumberFieldConfig = BaseFieldConfig & {
|
|
@@ -316,6 +327,8 @@ export declare type SectionFieldConfig = BaseFieldConfig & {
|
|
|
316
327
|
export declare type SelectFieldConfig = BaseFieldConfig & {
|
|
317
328
|
type: "select";
|
|
318
329
|
meta: BaseFieldConfig["meta"] & {
|
|
330
|
+
min?: number;
|
|
331
|
+
max?: number;
|
|
319
332
|
options?: FieldOption[];
|
|
320
333
|
optionsFetch?: FieldOptionFetch;
|
|
321
334
|
optionsFetchFnc?: FieldOptionFetchFunction;
|
|
@@ -355,7 +368,6 @@ export declare type SwitchFieldConfig = BaseFieldConfig & {
|
|
|
355
368
|
export declare type TextFieldConfig = BaseFieldConfig & {
|
|
356
369
|
type: "text";
|
|
357
370
|
meta: BaseFieldConfig["meta"] & {
|
|
358
|
-
translated?: boolean;
|
|
359
371
|
variant?: FieldVariant;
|
|
360
372
|
size?: FieldSize;
|
|
361
373
|
maxLength?: number;
|