@dskripchenko/laravel-admin 1.1.5 → 1.1.6

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/index.mjs CHANGED
@@ -2919,7 +2919,11 @@ function hs(e, t) {
2919
2919
  slug: n,
2920
2920
  title: e.label,
2921
2921
  permissions: ye(e, "view")
2922
- }
2922
+ },
2923
+ // slug передаётся в page-component'ы как prop. Конкретный slug запекаем в
2924
+ // function-mode, чтобы page видел его одинаково и через named-route, и через
2925
+ // path-routing (без params).
2926
+ props: { slug: n }
2923
2927
  },
2924
2928
  {
2925
2929
  path: `${o}/create`,
@@ -2931,7 +2935,8 @@ function hs(e, t) {
2931
2935
  slug: n,
2932
2936
  title: `${e.label}: создать`,
2933
2937
  permissions: ye(e, "create")
2934
- }
2938
+ },
2939
+ props: { slug: n }
2935
2940
  },
2936
2941
  {
2937
2942
  path: `${o}/:id/edit`,
@@ -2944,7 +2949,8 @@ function hs(e, t) {
2944
2949
  title: `${e.label}: редактирование`,
2945
2950
  permissions: ye(e, "update")
2946
2951
  },
2947
- props: !0
2952
+ // slug запекаем, id из route-params.
2953
+ props: (a) => ({ slug: n, id: a.params.id })
2948
2954
  },
2949
2955
  {
2950
2956
  path: `${o}/:id`,
@@ -2957,7 +2963,7 @@ function hs(e, t) {
2957
2963
  title: e.label,
2958
2964
  permissions: ye(e, "view")
2959
2965
  },
2960
- props: !0
2966
+ props: (a) => ({ slug: n, id: a.params.id })
2961
2967
  }
2962
2968
  ];
2963
2969
  }