@ahmadmubarak98/namozaj 1.4.3 → 1.4.4
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 +1 -1
- package/dist/namozaj.js +8 -5
- package/package.json +1 -1
package/dist/main.d.ts
CHANGED
|
@@ -237,7 +237,7 @@ export declare interface NamozajLocalizationOptions {
|
|
|
237
237
|
locales: string[];
|
|
238
238
|
translatedLabel?: (label: string, locale: string) => string;
|
|
239
239
|
translatedFieldNameSuffix?: (locale: string) => string;
|
|
240
|
-
translatedFieldGrid?: (field: DynamicFormField, locale: string) => GridColumnConfig;
|
|
240
|
+
translatedFieldGrid?: (field: DynamicFormField, locale: string, selectedLocales: string[]) => GridColumnConfig;
|
|
241
241
|
localePicker?: {
|
|
242
242
|
name?: string;
|
|
243
243
|
label?: string;
|
package/dist/namozaj.js
CHANGED
|
@@ -4588,17 +4588,19 @@ const getDefaultValue = (e) => {
|
|
|
4588
4588
|
const l = t.charAt(0).toUpperCase() + t.slice(1);
|
|
4589
4589
|
return `${e.meta.label} (${l})`;
|
|
4590
4590
|
}
|
|
4591
|
-
}, getTranslatedFieldGrid = (e, t, a) => {
|
|
4592
|
-
var
|
|
4593
|
-
return
|
|
4591
|
+
}, getTranslatedFieldGrid = (e, t, a, l) => {
|
|
4592
|
+
var c;
|
|
4593
|
+
return l ? l(e, t, a) : e.type === "text" && ((c = e.meta) != null && c.multiline) ? {
|
|
4594
4594
|
xs: 12,
|
|
4595
4595
|
sm: 12,
|
|
4596
4596
|
md: 12,
|
|
4597
4597
|
lg: 12,
|
|
4598
4598
|
xl: 12
|
|
4599
|
-
} : {
|
|
4599
|
+
} : a.length > 1 ? {
|
|
4600
4600
|
xs: 12,
|
|
4601
|
-
|
|
4601
|
+
sm: 6
|
|
4602
|
+
} : e.meta.grid || {
|
|
4603
|
+
xs: 12
|
|
4602
4604
|
};
|
|
4603
4605
|
};
|
|
4604
4606
|
function chainPropTypes(e, t) {
|
|
@@ -82574,6 +82576,7 @@ const Form = React__default.forwardRef(
|
|
|
82574
82576
|
), y.grid = getTranslatedFieldGrid(
|
|
82575
82577
|
p,
|
|
82576
82578
|
h,
|
|
82579
|
+
a,
|
|
82577
82580
|
(w = e.localization) == null ? void 0 : w.translatedFieldGrid
|
|
82578
82581
|
), m.meta = y, m;
|
|
82579
82582
|
}, d = useMemo(() => {
|