@ahmadmubarak98/namozaj 1.11.76 → 1.11.78

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 (2) hide show
  1. package/dist/namozaj.js +19 -5
  2. package/package.json +1 -1
package/dist/namozaj.js CHANGED
@@ -9956,11 +9956,25 @@ function handleComparison(e, t, a) {
9956
9956
  const getDefaultValue = (e) => {
9957
9957
  var t, a, l, c, p;
9958
9958
  return e.type === "date" ? e.meta.defaultValue ? new Date(e.meta.defaultValue) : null : e.type === "checkbox" || e.type === "switch" ? e.meta.defaultValue === !0 : e.type === "checkbox-group" ? e.meta.defaultValue ?? [] : e.type === "multi-select" ? e.meta.defaultValue ?? [] : e.type === "time" || e.type === "datetime" ? e.meta.defaultValue ? new Date(e.meta.defaultValue) : "" : e.type === "number" ? ((t = e.meta) == null ? void 0 : t.defaultValue) ?? null : e.type === "repeater" || e.type === "field-array" ? ((a = e.meta) == null ? void 0 : a.defaultValue) ?? [] : e.type === "file" ? e.meta.multiple ? ((l = e.meta) == null ? void 0 : l.defaultValue) ?? [] : ((c = e.meta) == null ? void 0 : c.defaultValue) ?? "" : FIELDS_EXCLUDE_AS_VALUE.includes(e.type) ? void 0 : ((p = e.meta) == null ? void 0 : p.defaultValue) ?? "";
9959
- }, getDefaultValues = (e) => e.filter((t) => !FIELDS_EXCLUDE_AS_VALUE.includes(t.type)).reduce((t, a) => (a.type === "group" ? a.meta.fields.filter((l) => !FIELDS_EXCLUDE_AS_VALUE.includes(l.type)).forEach((l) => {
9960
- l.type === "group" && l.meta.fields.filter((c) => !FIELDS_EXCLUDE_AS_VALUE.includes(c.type)).forEach((c) => {
9961
- t[c.name] = getDefaultValue(c);
9962
- }, {}), t[l.name] = getDefaultValue(l);
9963
- }) : t[a.name] = getDefaultValue(a), t), {}), shouldRenderLabel = (e) => !FIELDS_EXCLUDE_LABEL.includes(e), shouldRenderHelperText = (e) => !FIELDS_EXCLUDE_HELPER_TEXT.includes(e), evaluateVisibilityRules = (visibilityRules, values) => {
9959
+ }, getDefaultValues = (e, t = {}) => e.filter((a) => !FIELDS_EXCLUDE_AS_VALUE.includes(a.type)).reduce((a, l) => (evaluateVisibilityRules(
9960
+ l.meta.visibilityRules || [],
9961
+ (l.meta.visibilityRules || []).reduce((p, d, u) => ({ ...p, [d.ref]: t[u] }), {})
9962
+ ) && (l.type === "group" ? l.meta.fields.filter((p) => !FIELDS_EXCLUDE_AS_VALUE.includes(p.type)).forEach((p) => {
9963
+ evaluateVisibilityRules(
9964
+ p.meta.visibilityRules || [],
9965
+ (p.meta.visibilityRules || []).reduce((u, b, h) => ({ ...u, [b.ref]: t[h] }), {})
9966
+ ) && (p.type === "group" ? p.meta.fields.filter(
9967
+ (u) => !FIELDS_EXCLUDE_AS_VALUE.includes(u.type)
9968
+ ).forEach((u) => {
9969
+ !evaluateVisibilityRules(
9970
+ u.meta.visibilityRules || [],
9971
+ (u.meta.visibilityRules || []).reduce(
9972
+ (h, g, m) => ({ ...h, [g.ref]: t[m] }),
9973
+ {}
9974
+ )
9975
+ ) || (a[u.name] = getDefaultValue(u));
9976
+ }) : a[p.name] = getDefaultValue(p));
9977
+ }) : a[l.name] = getDefaultValue(l)), a), {}), shouldRenderLabel = (e) => !FIELDS_EXCLUDE_LABEL.includes(e), shouldRenderHelperText = (e) => !FIELDS_EXCLUDE_HELPER_TEXT.includes(e), evaluateVisibilityRules = (visibilityRules, values) => {
9964
9978
  if (!visibilityRules) return !0;
9965
9979
  values = Object.fromEntries(
9966
9980
  Object.entries(values).filter(([e]) => !e.includes("."))
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ahmadmubarak98/namozaj",
3
3
  "private": false,
4
- "version": "1.11.76",
4
+ "version": "1.11.78",
5
5
  "type": "module",
6
6
  "main": "dist/namozaj.js",
7
7
  "types": "dist/main.d.ts",