@plumile/backoffice-react 0.1.107 → 0.1.109

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 (196) hide show
  1. package/lib/esm/auth/TotpQrCode.js +1 -1
  2. package/lib/esm/auth/TotpQrCode.js.map +1 -1
  3. package/lib/esm/auth/login/EmailCapturePanel.js +27 -23
  4. package/lib/esm/auth/login/EmailCapturePanel.js.map +1 -1
  5. package/lib/esm/auth/login/MfaChallengeForm.js +38 -36
  6. package/lib/esm/auth/login/MfaChallengeForm.js.map +1 -1
  7. package/lib/esm/auth/login/PasskeyLoginForm.js +40 -37
  8. package/lib/esm/auth/login/PasskeyLoginForm.js.map +1 -1
  9. package/lib/esm/auth/pages/AcceptInvitationScreen.js +63 -62
  10. package/lib/esm/auth/pages/AcceptInvitationScreen.js.map +1 -1
  11. package/lib/esm/auth/pages/PasswordResetCompleteScreen.js +56 -55
  12. package/lib/esm/auth/pages/PasswordResetCompleteScreen.js.map +1 -1
  13. package/lib/esm/auth/pages/PasswordResetRequestScreen.js +45 -45
  14. package/lib/esm/auth/pages/PasswordResetRequestScreen.js.map +1 -1
  15. package/lib/esm/components/backoffice/actions/BackofficeEntityActionFormDialog.js +1 -0
  16. package/lib/esm/components/backoffice/actions/BackofficeEntityActionFormDialog.js.map +1 -1
  17. package/lib/esm/components/backoffice/columns/buildDataTableColumns.js +44 -39
  18. package/lib/esm/components/backoffice/columns/buildDataTableColumns.js.map +1 -1
  19. package/lib/esm/components/backoffice/detail/BackofficeCopyButton.js +15 -0
  20. package/lib/esm/components/backoffice/detail/BackofficeCopyButton.js.map +1 -0
  21. package/lib/esm/components/backoffice/detail/BackofficeDetailActionBar.js +11 -0
  22. package/lib/esm/components/backoffice/detail/BackofficeDetailActionBar.js.map +1 -0
  23. package/lib/esm/components/backoffice/detail/BackofficeDetailBlock.js +7 -0
  24. package/lib/esm/components/backoffice/detail/BackofficeDetailBlock.js.map +1 -0
  25. package/lib/esm/components/backoffice/detail/BackofficeDetailHeader.js +15 -0
  26. package/lib/esm/components/backoffice/detail/BackofficeDetailHeader.js.map +1 -0
  27. package/lib/esm/components/backoffice/detail/BackofficeDetailPage.js +19 -0
  28. package/lib/esm/components/backoffice/detail/BackofficeDetailPage.js.map +1 -0
  29. package/lib/esm/components/backoffice/detail/BackofficeDetailRelationLink.js +47 -40
  30. package/lib/esm/components/backoffice/detail/BackofficeDetailRelationLink.js.map +1 -1
  31. package/lib/esm/components/backoffice/detail/BackofficeDetailRelationListBlock.js +83 -90
  32. package/lib/esm/components/backoffice/detail/BackofficeDetailRelationListBlock.js.map +1 -1
  33. package/lib/esm/components/backoffice/detail/BackofficeDetailTable.js +8 -0
  34. package/lib/esm/components/backoffice/detail/BackofficeDetailTable.js.map +1 -0
  35. package/lib/esm/components/backoffice/detail/BackofficeEmptyValue.js +7 -0
  36. package/lib/esm/components/backoffice/detail/BackofficeEmptyValue.js.map +1 -0
  37. package/lib/esm/components/backoffice/detail/BackofficeStatusGroup.js +8 -0
  38. package/lib/esm/components/backoffice/detail/BackofficeStatusGroup.js.map +1 -0
  39. package/lib/esm/components/backoffice/detail/BackofficeTechnicalFacts.js +2 -0
  40. package/lib/esm/components/backoffice/filters/EntityFilterValue.js +16 -8
  41. package/lib/esm/components/backoffice/filters/EntityFilterValue.js.map +1 -1
  42. package/lib/esm/components/backoffice/filters/EntityIdFilterField.js +85 -53
  43. package/lib/esm/components/backoffice/filters/EntityIdFilterField.js.map +1 -1
  44. package/lib/esm/components/backoffice/filters/entityIdFilterField.css.js +2 -2
  45. package/lib/esm/components/backoffice/filters/entityIdFilterField.css.js.map +1 -1
  46. package/lib/esm/components/backoffice/layout/breadcrumb/BackofficeTopbarBreadcrumb.js +53 -48
  47. package/lib/esm/components/backoffice/layout/breadcrumb/BackofficeTopbarBreadcrumb.js.map +1 -1
  48. package/lib/esm/components/backoffice/layout/breadcrumb/BackofficeTopbarPortalContext.js +2 -2
  49. package/lib/esm/components/backoffice/layout/breadcrumb/BackofficeTopbarPortalContext.js.map +1 -1
  50. package/lib/esm/components/backoffice/layout/breadcrumb/assertValidBreadcrumb.js +15 -11
  51. package/lib/esm/components/backoffice/layout/breadcrumb/assertValidBreadcrumb.js.map +1 -1
  52. package/lib/esm/components/backoffice/layout/breadcrumb/buildBreadcrumbs.js +50 -23
  53. package/lib/esm/components/backoffice/layout/breadcrumb/buildBreadcrumbs.js.map +1 -1
  54. package/lib/esm/components/backoffice/layout/buildSidebarSections.js +69 -69
  55. package/lib/esm/components/backoffice/layout/sidebarUtils.js +16 -16
  56. package/lib/esm/components/backoffice/layout/sidebarUtils.js.map +1 -1
  57. package/lib/esm/components/backoffice/links/BackofficeInlineLink.js +29 -0
  58. package/lib/esm/components/backoffice/links/BackofficeInlineLink.js.map +1 -0
  59. package/lib/esm/components/backoffice/links/BackofficeLink.js +21 -0
  60. package/lib/esm/components/backoffice/links/BackofficeLink.js.map +1 -0
  61. package/lib/esm/components/backoffice/links/BackofficeLinkContent.js +26 -0
  62. package/lib/esm/components/backoffice/links/BackofficeLinkContent.js.map +1 -0
  63. package/lib/esm/components/backoffice/links/BackofficeLinkLabel.js +19 -0
  64. package/lib/esm/components/backoffice/links/BackofficeLinkLabel.js.map +1 -0
  65. package/lib/esm/components/backoffice/links/backofficeLink.css.js +7 -0
  66. package/lib/esm/components/backoffice/links/backofficeLink.css.js.map +1 -0
  67. package/lib/esm/components/backoffice/links/resolveBackofficeLink.js +81 -0
  68. package/lib/esm/components/backoffice/links/resolveBackofficeLink.js.map +1 -0
  69. package/lib/esm/components/backoffice/links/resolveBackofficeTargetIcon.js +50 -0
  70. package/lib/esm/components/backoffice/links/resolveBackofficeTargetIcon.js.map +1 -0
  71. package/lib/esm/components/backoffice/links/types.js +0 -0
  72. package/lib/esm/components/backoffice/links/useBackofficeLink.js +21 -0
  73. package/lib/esm/components/backoffice/links/useBackofficeLink.js.map +1 -0
  74. package/lib/esm/components/backoffice/pickers/EntityIdPickerDialog.js +1 -0
  75. package/lib/esm/components/backoffice/pickers/EntityIdPickerDialog.js.map +1 -1
  76. package/lib/esm/components/backoffice/pickers/entityIdPickerDialog.css.js +2 -2
  77. package/lib/esm/components/backoffice/pickers/entityIdPickerDialog.css.js.map +1 -1
  78. package/lib/esm/components/backoffice/pickers/shared/EntityPickerList.js +27 -21
  79. package/lib/esm/components/backoffice/pickers/shared/EntityPickerList.js.map +1 -1
  80. package/lib/esm/components/backoffice/refs/BackofficeEntityIdRef.js +27 -27
  81. package/lib/esm/components/backoffice/refs/BackofficeEntityIdRef.js.map +1 -1
  82. package/lib/esm/components/backoffice/refs/BackofficeEntityLink.js +24 -21
  83. package/lib/esm/components/backoffice/refs/BackofficeEntityLink.js.map +1 -1
  84. package/lib/esm/components/backoffice/refs/BackofficeRelatedCountLink.js +45 -44
  85. package/lib/esm/components/backoffice/refs/BackofficeRelatedCountLink.js.map +1 -1
  86. package/lib/esm/components/backoffice/scaffolds/BackofficeEntityListScaffold.js +277 -227
  87. package/lib/esm/components/backoffice/scaffolds/BackofficeEntityListScaffold.js.map +1 -1
  88. package/lib/esm/components/backoffice/shared/BackofficeFilterableCell.js +25 -30
  89. package/lib/esm/components/backoffice/shared/BackofficeFilterableCell.js.map +1 -1
  90. package/lib/esm/i18n/locales/en/backofficeReact.js +8 -0
  91. package/lib/esm/i18n/locales/en/backofficeReact.js.map +1 -1
  92. package/lib/esm/i18n/locales/fr/backofficeReact.js +8 -0
  93. package/lib/esm/i18n/locales/fr/backofficeReact.js.map +1 -1
  94. package/lib/esm/index.js +88 -73
  95. package/lib/esm/pages/BackofficeDashboardPage.js +1 -5
  96. package/lib/esm/pages/BackofficeDashboardPage.js.map +1 -1
  97. package/lib/esm/pages/BackofficeEntityDetailPage.js +231 -222
  98. package/lib/esm/pages/BackofficeEntityDetailPage.js.map +1 -1
  99. package/lib/esm/pages/BackofficeEntityDetailPage.view-helpers.js +170 -54
  100. package/lib/esm/pages/BackofficeEntityDetailPage.view-helpers.js.map +1 -1
  101. package/lib/esm/pages/BackofficeEntityListPage.js +196 -207
  102. package/lib/esm/pages/BackofficeEntityListPage.js.map +1 -1
  103. package/lib/esm/pages/BackofficeHubPage.js +21 -21
  104. package/lib/esm/pages/BackofficeLayoutPage.js +7 -7
  105. package/lib/esm/pages/BackofficeLayoutPage.js.map +1 -1
  106. package/lib/esm/router/createBackofficeRoutes.js +132 -126
  107. package/lib/esm/router/createBackofficeRoutes.js.map +1 -1
  108. package/lib/esm/style.css +1 -1
  109. package/lib/types/auth/login/EmailCapturePanel.d.ts.map +1 -1
  110. package/lib/types/auth/login/MfaChallengeForm.d.ts.map +1 -1
  111. package/lib/types/auth/login/PasskeyLoginForm.d.ts.map +1 -1
  112. package/lib/types/auth/pages/AcceptInvitationScreen.d.ts.map +1 -1
  113. package/lib/types/auth/pages/PasswordResetCompleteScreen.d.ts.map +1 -1
  114. package/lib/types/auth/pages/PasswordResetRequestScreen.d.ts.map +1 -1
  115. package/lib/types/components/backoffice/actions/BackofficeEntityActionFormDialog.d.ts.map +1 -1
  116. package/lib/types/components/backoffice/columns/buildDataTableColumns.d.ts +0 -1
  117. package/lib/types/components/backoffice/columns/buildDataTableColumns.d.ts.map +1 -1
  118. package/lib/types/components/backoffice/detail/BackofficeCopyButton.d.ts +8 -0
  119. package/lib/types/components/backoffice/detail/BackofficeCopyButton.d.ts.map +1 -0
  120. package/lib/types/components/backoffice/detail/BackofficeDetailActionBar.d.ts +9 -0
  121. package/lib/types/components/backoffice/detail/BackofficeDetailActionBar.d.ts.map +1 -0
  122. package/lib/types/components/backoffice/detail/BackofficeDetailBlock.d.ts +7 -0
  123. package/lib/types/components/backoffice/detail/BackofficeDetailBlock.d.ts.map +1 -0
  124. package/lib/types/components/backoffice/detail/BackofficeDetailHeader.d.ts +12 -0
  125. package/lib/types/components/backoffice/detail/BackofficeDetailHeader.d.ts.map +1 -0
  126. package/lib/types/components/backoffice/detail/BackofficeDetailPage.d.ts +16 -0
  127. package/lib/types/components/backoffice/detail/BackofficeDetailPage.d.ts.map +1 -0
  128. package/lib/types/components/backoffice/detail/BackofficeDetailPage.stories.d.ts +11 -0
  129. package/lib/types/components/backoffice/detail/BackofficeDetailPage.stories.d.ts.map +1 -0
  130. package/lib/types/components/backoffice/detail/BackofficeDetailRelationLink.d.ts.map +1 -1
  131. package/lib/types/components/backoffice/detail/BackofficeDetailRelationListBlock.d.ts.map +1 -1
  132. package/lib/types/components/backoffice/detail/BackofficeDetailTable.d.ts +6 -0
  133. package/lib/types/components/backoffice/detail/BackofficeDetailTable.d.ts.map +1 -0
  134. package/lib/types/components/backoffice/detail/BackofficeEmptyValue.d.ts +7 -0
  135. package/lib/types/components/backoffice/detail/BackofficeEmptyValue.d.ts.map +1 -0
  136. package/lib/types/components/backoffice/detail/BackofficeStatusGroup.d.ts +8 -0
  137. package/lib/types/components/backoffice/detail/BackofficeStatusGroup.d.ts.map +1 -0
  138. package/lib/types/components/backoffice/detail/BackofficeTechnicalFacts.d.ts +2 -0
  139. package/lib/types/components/backoffice/detail/BackofficeTechnicalFacts.d.ts.map +1 -0
  140. package/lib/types/components/backoffice/filters/EntityFilterValue.d.ts +5 -1
  141. package/lib/types/components/backoffice/filters/EntityFilterValue.d.ts.map +1 -1
  142. package/lib/types/components/backoffice/filters/EntityIdFilterField.d.ts +1 -0
  143. package/lib/types/components/backoffice/filters/EntityIdFilterField.d.ts.map +1 -1
  144. package/lib/types/components/backoffice/filters/entityIdFilterField.css.d.ts +5 -2
  145. package/lib/types/components/backoffice/filters/entityIdFilterField.css.d.ts.map +1 -1
  146. package/lib/types/components/backoffice/layout/breadcrumb/BackofficeTopbarBreadcrumb.d.ts.map +1 -1
  147. package/lib/types/components/backoffice/layout/breadcrumb/BackofficeTopbarPortalContext.d.ts +1 -0
  148. package/lib/types/components/backoffice/layout/breadcrumb/BackofficeTopbarPortalContext.d.ts.map +1 -1
  149. package/lib/types/components/backoffice/layout/breadcrumb/assertValidBreadcrumb.d.ts.map +1 -1
  150. package/lib/types/components/backoffice/layout/breadcrumb/buildBreadcrumbs.d.ts +10 -8
  151. package/lib/types/components/backoffice/layout/breadcrumb/buildBreadcrumbs.d.ts.map +1 -1
  152. package/lib/types/components/backoffice/layout/breadcrumb/types.d.ts +10 -5
  153. package/lib/types/components/backoffice/layout/breadcrumb/types.d.ts.map +1 -1
  154. package/lib/types/components/backoffice/layout/sidebarUtils.d.ts +6 -2
  155. package/lib/types/components/backoffice/layout/sidebarUtils.d.ts.map +1 -1
  156. package/lib/types/components/backoffice/links/BackofficeInlineLink.d.ts +18 -0
  157. package/lib/types/components/backoffice/links/BackofficeInlineLink.d.ts.map +1 -0
  158. package/lib/types/components/backoffice/links/BackofficeLink.d.ts +13 -0
  159. package/lib/types/components/backoffice/links/BackofficeLink.d.ts.map +1 -0
  160. package/lib/types/components/backoffice/links/BackofficeLinkContent.d.ts +10 -0
  161. package/lib/types/components/backoffice/links/BackofficeLinkContent.d.ts.map +1 -0
  162. package/lib/types/components/backoffice/links/BackofficeLinkLabel.d.ts +12 -0
  163. package/lib/types/components/backoffice/links/BackofficeLinkLabel.d.ts.map +1 -0
  164. package/lib/types/components/backoffice/links/backofficeLink.css.d.ts +4 -0
  165. package/lib/types/components/backoffice/links/backofficeLink.css.d.ts.map +1 -0
  166. package/lib/types/components/backoffice/links/resolveBackofficeLink.d.ts +15 -0
  167. package/lib/types/components/backoffice/links/resolveBackofficeLink.d.ts.map +1 -0
  168. package/lib/types/components/backoffice/links/resolveBackofficeTargetIcon.d.ts +8 -0
  169. package/lib/types/components/backoffice/links/resolveBackofficeTargetIcon.d.ts.map +1 -0
  170. package/lib/types/components/backoffice/links/types.d.ts +45 -0
  171. package/lib/types/components/backoffice/links/types.d.ts.map +1 -0
  172. package/lib/types/components/backoffice/links/useBackofficeLink.d.ts +7 -0
  173. package/lib/types/components/backoffice/links/useBackofficeLink.d.ts.map +1 -0
  174. package/lib/types/components/backoffice/pickers/EntityIdPickerDialog.d.ts.map +1 -1
  175. package/lib/types/components/backoffice/pickers/entityIdPickerDialog.css.d.ts +2 -0
  176. package/lib/types/components/backoffice/pickers/entityIdPickerDialog.css.d.ts.map +1 -1
  177. package/lib/types/components/backoffice/pickers/shared/EntityPickerList.d.ts.map +1 -1
  178. package/lib/types/components/backoffice/refs/BackofficeEntityLink.d.ts.map +1 -1
  179. package/lib/types/components/backoffice/refs/BackofficeRelatedCountLink.d.ts.map +1 -1
  180. package/lib/types/components/backoffice/scaffolds/BackofficeEntityListScaffold.d.ts.map +1 -1
  181. package/lib/types/components/backoffice/shared/BackofficeFilterableCell.d.ts +6 -3
  182. package/lib/types/components/backoffice/shared/BackofficeFilterableCell.d.ts.map +1 -1
  183. package/lib/types/i18n/resources.d.ts +16 -0
  184. package/lib/types/i18n/resources.d.ts.map +1 -1
  185. package/lib/types/index.d.ts +24 -1
  186. package/lib/types/index.d.ts.map +1 -1
  187. package/lib/types/pages/BackofficeDashboardPage.d.ts.map +1 -1
  188. package/lib/types/pages/BackofficeEntityDetailPage.d.ts.map +1 -1
  189. package/lib/types/pages/BackofficeEntityDetailPage.view-helpers.d.ts +49 -22
  190. package/lib/types/pages/BackofficeEntityDetailPage.view-helpers.d.ts.map +1 -1
  191. package/lib/types/pages/BackofficeEntityListPage.d.ts.map +1 -1
  192. package/lib/types/provider/types.d.ts +26 -22
  193. package/lib/types/provider/types.d.ts.map +1 -1
  194. package/lib/types/router/createBackofficeRoutes.d.ts +36 -1
  195. package/lib/types/router/createBackofficeRoutes.d.ts.map +1 -1
  196. package/package.json +7 -7
@@ -1,35 +1,34 @@
1
1
  import { useBackofficeReactTranslation as e } from "../i18n/useBackofficeReactTranslation.js";
2
- import { useBackofficeConfig as t } from "../provider/BackofficeConfigContext.js";
3
- import { LazyBackofficeEntityActionFormDialog as n } from "../components/backoffice/actions/LazyBackofficeEntityActionFormDialog.js";
4
- import { buildDataTableColumns as r } from "../components/backoffice/columns/buildDataTableColumns.js";
5
- import { useBackofficeLoadMore as i } from "../hooks/useBackofficeLoadMore.js";
6
- import { useBackofficeListRefetch as a } from "../hooks/useBackofficeListRefetch.js";
7
- import { BackofficeEntityListScaffold as o } from "../components/backoffice/scaffolds/BackofficeEntityListScaffold.js";
8
- import { BackofficeRightPageLayout as s } from "../components/backoffice/layout/breadcrumb/BackofficeRightPageLayout.js";
9
- import { buildEntityListBreadcrumb as c } from "../components/backoffice/layout/breadcrumb/buildBreadcrumbs.js";
10
- import { rowFlagsColumnCell as l } from "../components/backoffice/list/RowFlagsCell.css.js";
11
- import { RowFlagsCell as u } from "../components/backoffice/list/RowFlagsCell.js";
12
- import { useBackofficeListUrlState as d } from "../hooks/useBackofficeListUrlState.js";
13
- import { buildActionsColumn as f, computeActionsColumnWidthPx as p, computeRowFlagsColumnWidthPx as m, isConnectionListConfig as h, isFormMutationAction as g, isRecordListConfig as _, isRouteAction as ee, resolveActionVariant as te, resolveLabel as v, resolveTrackBySize as y } from "./BackofficeEntityListPage.helpers.js";
2
+ import { LazyBackofficeEntityActionFormDialog as t } from "../components/backoffice/actions/LazyBackofficeEntityActionFormDialog.js";
3
+ import { buildDataTableColumns as n } from "../components/backoffice/columns/buildDataTableColumns.js";
4
+ import { useBackofficeLoadMore as r } from "../hooks/useBackofficeLoadMore.js";
5
+ import { useBackofficeListRefetch as i } from "../hooks/useBackofficeListRefetch.js";
6
+ import { BackofficeEntityListScaffold as a } from "../components/backoffice/scaffolds/BackofficeEntityListScaffold.js";
7
+ import { BackofficeRightPageLayout as o } from "../components/backoffice/layout/breadcrumb/BackofficeRightPageLayout.js";
8
+ import { buildEntityListBreadcrumb as s } from "../components/backoffice/layout/breadcrumb/buildBreadcrumbs.js";
9
+ import { rowFlagsColumnCell as c } from "../components/backoffice/list/RowFlagsCell.css.js";
10
+ import { RowFlagsCell as l } from "../components/backoffice/list/RowFlagsCell.js";
11
+ import { useBackofficeListUrlState as u } from "../hooks/useBackofficeListUrlState.js";
12
+ import { buildActionsColumn as d, computeActionsColumnWidthPx as f, computeRowFlagsColumnWidthPx as p, isConnectionListConfig as m, isFormMutationAction as h, isRecordListConfig as g, isRouteAction as ee, resolveActionVariant as te, resolveLabel as _, resolveTrackBySize as v } from "./BackofficeEntityListPage.helpers.js";
14
13
  import { actionTrigger as ne, actionsColumnCell as re, headerActions as ie } from "./backofficeEntityListPage.css.js";
15
- import { useCallback as b, useEffect as x, useMemo as S, useRef as C, useState as w } from "react";
16
- import { Button as T, EyeSvg as ae, InlineBanner as oe, LinkButton as E, TableCell as se } from "@plumile/ui";
17
- import { Fragment as ce, jsx as D, jsxs as le } from "react/jsx-runtime";
14
+ import { useCallback as y, useEffect as b, useMemo as x, useRef as S, useState as C } from "react";
15
+ import { Button as w, EyeSvg as ae, InlineBanner as oe, LinkButton as T, TableCell as se } from "@plumile/ui";
16
+ import { Fragment as E, jsx as D, jsxs as ce } from "react/jsx-runtime";
18
17
  import { useTranslation as O } from "react-i18next";
19
18
  import { fetchQuery as k } from "relay-runtime";
20
- import { useFragment as A, usePaginationFragment as j, usePreloadedQuery as ue, useRelayEnvironment as de } from "react-relay";
21
- import { BACKOFFICE_LIST_DEFAULTS as fe, BACKOFFICE_LIST_REFETCH_POLICY as M } from "@plumile/backoffice-core/constants.js";
19
+ import { useFragment as le, usePaginationFragment as A, usePreloadedQuery as ue, useRelayEnvironment as j } from "react-relay";
20
+ import { BACKOFFICE_LIST_DEFAULTS as de, BACKOFFICE_LIST_REFETCH_POLICY as M } from "@plumile/backoffice-core/constants.js";
22
21
  import { stableListVariablesKey as N } from "@plumile/backoffice-core/state/stableKey.js";
23
22
  //#region src/pages/BackofficeEntityListPage.tsx
24
- var pe = "store-or-network", me = (e, t, n, r) => {
23
+ var fe = "store-or-network", pe = (e, t, n, r) => {
25
24
  let i = t != null && t.length > 0, a = e;
26
25
  if (i) {
27
26
  let n = [{
28
27
  id: "__rowFlags",
29
28
  header: "",
30
- className: l,
29
+ className: c,
31
30
  mobileRole: "badge",
32
- cell: (e) => /* @__PURE__ */ D(u, {
31
+ cell: (e) => /* @__PURE__ */ D(l, {
33
32
  row: e,
34
33
  flags: t,
35
34
  tApp: r
@@ -42,38 +41,34 @@ var pe = "store-or-network", me = (e, t, n, r) => {
42
41
  }
43
42
  let o = 0;
44
43
  i && (o = t.length);
45
- let s = m(o), c = p(n), d = 0;
44
+ let s = p(o), u = f(n), d = 0;
46
45
  i && (d = 1);
47
- let f = a.length - d - 1, h = a.slice(d, d + Math.max(0, f)).map((e) => y(e, "1fr")).join(" "), g = "";
48
- return g = i ? `${s}px ${h} ${c}px` : `${h} ${c}px`, {
46
+ let m = a.length - d - 1, h = a.slice(d, d + Math.max(0, m)).map((e) => v(e, "1fr")).join(" "), g = "";
47
+ return g = i ? `${s}px ${h} ${u}px` : `${h} ${u}px`, {
49
48
  columns: a,
50
49
  gridTemplateColumns: g
51
50
  };
52
- }, P = ({ config: a, prepared: s }) => {
53
- let { t: c } = O(), { t: l } = e(), { entities: u } = t(), [p, m] = w(null), h = de(), _ = a.list, y = a.listDefaults ?? _.defaultState ?? {
51
+ }, P = ({ config: i, prepared: o }) => {
52
+ let { t: s } = O(), { t: c } = e(), [l, f] = C(null), p = j(), m = i.list, g = i.listDefaults ?? m.defaultState ?? {
54
53
  where: null,
55
54
  sort: null
56
- }, j = ue(_.query, s.query), M = A(_.fragment, j), P = S(() => _.getRows(M).map((e) => _.toRow(e)), [M, _]), F = S(() => _.getNextCursor?.(j) ?? null, [_, j]), [I, L] = w(P), [R, z] = w(F), [B, V] = w(!1), [H, U] = w(!1), [he, W] = w(!1);
57
- x(() => {
58
- L(P), z(F);
59
- }, [F, P]);
60
- let { columns: G, gridTemplateColumns: ge } = S(() => {
61
- let e = r(_.columns, {
62
- tApp: c,
63
- t: l,
64
- resolveEntityHref: (e, t) => {
65
- let n = u[e];
66
- return n == null ? null : n.routes.detail(t);
67
- }
68
- }), t = f({
69
- ariaLabel: l("actions.view"),
70
- fallback: l("common.notAvailable"),
55
+ }, v = ue(m.query, o.query), A = le(m.fragment, v), M = x(() => m.getRows(A).map((e) => m.toRow(e)), [A, m]), P = x(() => m.getNextCursor?.(v) ?? null, [m, v]), [F, I] = C(M), [L, R] = C(P), [z, B] = C(!1), [V, H] = C(!1), [me, U] = C(!1);
56
+ b(() => {
57
+ I(M), R(P);
58
+ }, [P, M]);
59
+ let { columns: W, gridTemplateColumns: he } = x(() => {
60
+ let e = n(m.columns, {
61
+ tApp: s,
62
+ t: c
63
+ }), t = d({
64
+ ariaLabel: c("actions.view"),
65
+ fallback: c("common.notAvailable"),
71
66
  className: re,
72
- resolveDetailHref: (e) => a.routes.detail(e),
67
+ resolveDetailHref: (e) => i.routes.detail(e),
73
68
  renderAction: ({ href: e, ariaLabel: t }) => /* @__PURE__ */ D(se.Actions, { children: /* @__PURE__ */ D("span", {
74
69
  className: ne,
75
70
  title: t,
76
- children: /* @__PURE__ */ D(E, {
71
+ children: /* @__PURE__ */ D(T, {
77
72
  to: e,
78
73
  variant: "icon",
79
74
  size: "small",
@@ -85,178 +80,173 @@ var pe = "store-or-network", me = (e, t, n, r) => {
85
80
  })
86
81
  }) })
87
82
  });
88
- return me([...e, t], _.rowFlags, 1, c);
83
+ return pe([...e, t], m.rowFlags, 1, s);
89
84
  }, [
90
- a.routes,
91
- _.columns,
92
- _.rowFlags,
93
- u,
94
- l,
95
- c
96
- ]), K = b((e) => _.getRowId(e), [_]), { state: q, pushState: _e } = d(a), J = q.sort ?? y.sort, { pageSize: Y } = fe, ve = b((e) => _.buildQueryVariables(e), [_]), X = C(0), ye = C(N({
97
- where: y.where,
98
- sort: y.sort,
99
- count: Y
100
- })), Z = b(async (e) => {
101
- let t = X.current + 1;
102
- X.current = t, e.mode === "append" ? V(!0) : U(!0), W(!1);
85
+ i.routes,
86
+ m.columns,
87
+ m.rowFlags,
88
+ c,
89
+ s
90
+ ]), G = y((e) => m.getRowId(e), [m]), { state: K, pushState: ge } = u(i), q = K.sort ?? g.sort, { pageSize: J } = de, _e = y((e) => m.buildQueryVariables(e), [m]), Y = S(0), ve = S(N({
91
+ where: g.where,
92
+ sort: g.sort,
93
+ count: J
94
+ })), X = y(async (e) => {
95
+ let t = Y.current + 1;
96
+ Y.current = t, e.mode === "append" ? B(!0) : H(!0), U(!1);
103
97
  try {
104
- let n = ve({
98
+ let n = _e({
105
99
  where: e.where,
106
100
  sort: e.sort,
107
101
  count: e.count,
108
102
  cursor: e.cursor
109
- }), r = await k(h, _.query, n, { fetchPolicy: pe }).toPromise();
110
- if (r == null || X.current !== t) return;
111
- let i = _.getRows(r).map((e) => _.toRow(e));
112
- L((t) => e.mode === "append" ? [...t, ...i] : i), z(_.getNextCursor?.(r) ?? null);
103
+ }), r = await k(p, m.query, n, { fetchPolicy: fe }).toPromise();
104
+ if (r == null || Y.current !== t) return;
105
+ let i = m.getRows(r).map((e) => m.toRow(e));
106
+ I((t) => e.mode === "append" ? [...t, ...i] : i), R(m.getNextCursor?.(r) ?? null);
113
107
  } catch {
114
- X.current === t && W(!0);
108
+ Y.current === t && U(!0);
115
109
  } finally {
116
- e.mode === "append" ? V(!1) : U(!1);
110
+ e.mode === "append" ? B(!1) : H(!1);
117
111
  }
118
112
  }, [
119
- ve,
120
- h,
121
- _
113
+ _e,
114
+ p,
115
+ m
122
116
  ]);
123
- x(() => {
117
+ b(() => {
124
118
  let e = N({
125
- where: q.where,
126
- sort: J,
127
- count: Y
119
+ where: K.where,
120
+ sort: q,
121
+ count: J
128
122
  });
129
- ye.current !== e && (ye.current = e, Z({
130
- where: q.where,
131
- sort: J,
132
- count: Y,
123
+ ve.current !== e && (ve.current = e, X({
124
+ where: K.where,
125
+ sort: q,
126
+ count: J,
133
127
  cursor: null,
134
128
  mode: "reset"
135
129
  }).catch(() => {
136
- W(!0);
130
+ U(!0);
137
131
  }));
138
132
  }, [
139
- Y,
140
133
  J,
141
- Z,
142
- q.where
134
+ q,
135
+ X,
136
+ K.where
143
137
  ]);
144
- let Q = b(() => {
145
- H || Z({
146
- where: q.where,
147
- sort: J,
148
- count: Y,
138
+ let Z = y(() => {
139
+ V || X({
140
+ where: K.where,
141
+ sort: q,
142
+ count: J,
149
143
  cursor: null,
150
144
  mode: "reset"
151
145
  }).catch(() => {
152
- W(!0);
146
+ U(!0);
153
147
  });
154
148
  }, [
155
- H,
156
- Y,
149
+ V,
157
150
  J,
158
- Z,
159
- q.where
160
- ]), be = i({
161
- hasNext: R != null,
162
- isLoadingNext: B,
151
+ q,
152
+ X,
153
+ K.where
154
+ ]), ye = r({
155
+ hasNext: L != null,
156
+ isLoadingNext: z,
163
157
  loadNext: (e) => {
164
- R != null && Z({
165
- where: q.where,
166
- sort: J,
158
+ L != null && X({
159
+ where: K.where,
160
+ sort: q,
167
161
  count: e,
168
- cursor: R,
162
+ cursor: L,
169
163
  mode: "append"
170
164
  }).catch(() => {
171
- W(!0);
165
+ U(!0);
172
166
  });
173
167
  },
174
- count: Y
175
- }), $ = S(() => a.listActions ?? [], [a.listActions]), xe = S(() => $.filter((e) => e.isVisible == null ? !0 : e.isVisible(null)), [$]), Se = S(() => {
176
- if (xe.length !== 0) return /* @__PURE__ */ D("div", {
168
+ count: J
169
+ }), Q = x(() => i.listActions ?? [], [i.listActions]), be = x(() => Q.filter((e) => e.isVisible == null ? !0 : e.isVisible(null)), [Q]), xe = x(() => {
170
+ if (be.length !== 0) return /* @__PURE__ */ D("div", {
177
171
  className: ie,
178
- children: xe.map((e, t) => {
179
- let { variant: n } = e, r = v(e.label, c), i = r;
180
- e.ariaLabel != null && (i = v(e.ariaLabel, c));
181
- let a = te(n, t), o = e.size ?? "small", s = e.isDisabled?.(null) === !0;
182
- return ee(e) ? /* @__PURE__ */ D(E, {
172
+ children: be.map((e, t) => {
173
+ let { variant: n } = e, r = _(e.label, s), i = r;
174
+ e.ariaLabel != null && (i = _(e.ariaLabel, s));
175
+ let a = te(n, t), o = e.size ?? "small", c = e.isDisabled?.(null) === !0;
176
+ return ee(e) ? /* @__PURE__ */ D(T, {
183
177
  to: e.to(null),
184
178
  variant: a,
185
179
  size: o,
186
- isDisabled: s,
180
+ isDisabled: c,
187
181
  "aria-label": i,
188
182
  children: r
189
- }, e.id) : g(e) ? /* @__PURE__ */ D(T, {
183
+ }, e.id) : h(e) ? /* @__PURE__ */ D(w, {
190
184
  type: "button",
191
185
  variant: a,
192
186
  size: o,
193
- disabled: s,
187
+ disabled: c,
194
188
  onClick: () => {
195
- m(e.id);
189
+ f(e.id);
196
190
  },
197
191
  "aria-label": i,
198
192
  children: r
199
193
  }, e.id) : null;
200
194
  })
201
195
  });
202
- }, [c, xe]), Ce = $.find((e) => e.id === p), we = null;
203
- return he && (we = /* @__PURE__ */ D(oe, {
196
+ }, [s, be]), $ = Q.find((e) => e.id === l), Se = null;
197
+ return me && (Se = /* @__PURE__ */ D(oe, {
204
198
  tone: "danger",
205
- title: l("list.errors.title"),
206
- actions: /* @__PURE__ */ D(T, {
199
+ title: c("list.errors.title"),
200
+ actions: /* @__PURE__ */ D(w, {
207
201
  type: "button",
208
202
  variant: "secondary",
209
203
  size: "small",
210
- onClick: Q,
211
- children: l("list.actions.retry")
204
+ onClick: Z,
205
+ children: c("list.actions.retry")
212
206
  }),
213
207
  onDismiss: () => {
214
- W(!1);
208
+ U(!1);
215
209
  },
216
- children: l("list.errors.fetchFailed")
217
- })), /* @__PURE__ */ le(ce, { children: [/* @__PURE__ */ D(o, {
218
- config: a,
219
- state: q,
220
- pushState: _e,
221
- headerActions: Se,
222
- rows: I,
223
- columns: G,
224
- gridTemplateColumns: ge,
225
- getRowId: K,
226
- hasNextPage: R != null,
227
- isLoadingMore: B,
228
- isRefreshing: H,
229
- onLoadMore: be,
230
- onRefresh: Q,
210
+ children: c("list.errors.fetchFailed")
211
+ })), /* @__PURE__ */ ce(E, { children: [/* @__PURE__ */ D(a, {
212
+ config: i,
213
+ state: K,
214
+ pushState: ge,
215
+ headerActions: xe,
216
+ rows: F,
217
+ columns: W,
218
+ gridTemplateColumns: he,
219
+ getRowId: G,
220
+ hasNextPage: L != null,
221
+ isLoadingMore: z,
222
+ isRefreshing: V,
223
+ onLoadMore: ye,
224
+ onRefresh: Z,
231
225
  totalCount: null,
232
- statusBanner: we
233
- }), Ce != null && g(Ce) && /* @__PURE__ */ D(n, {
226
+ statusBanner: Se
227
+ }), $ != null && h($) && /* @__PURE__ */ D(t, {
234
228
  isOpen: !0,
235
- action: Ce,
229
+ action: $,
236
230
  node: null,
237
231
  onClose: () => {
238
- m(null);
232
+ f(null);
239
233
  },
240
- onSuccess: Q
234
+ onSuccess: Z
241
235
  })] });
242
- }, F = ({ config: c, prepared: l, breadcrumb: u }) => {
243
- let p = c.list, { t: m } = O(), { t: h } = e(), { entities: _ } = t(), [y, x] = w(null), C = ue(p.query, l.query), { data: oe, loadNext: ce, hasNext: k, isLoadingNext: A, refetch: de } = j(p.fragment, C), N = p.getConnection(oe), pe = S(() => N.edges.map((e) => p.toRow(e.node)), [N.edges, p]), { columns: P, gridTemplateColumns: F } = S(() => {
244
- let e = r(p.columns, {
245
- tApp: m,
246
- t: h,
247
- resolveEntityHref: (e, t) => {
248
- let n = _[e];
249
- return n == null ? null : n.routes.detail(t);
250
- }
251
- }), t = f({
252
- ariaLabel: h("actions.view"),
253
- fallback: h("common.notAvailable"),
236
+ }, F = ({ config: s, prepared: c, breadcrumb: l }) => {
237
+ let f = s.list, { t: p } = O(), { t: m } = e(), [g, v] = C(null), b = ue(f.query, c.query), { data: S, loadNext: oe, hasNext: E, isLoadingNext: k, refetch: le } = A(f.fragment, b), j = f.getConnection(S), N = x(() => j.edges.map((e) => f.toRow(e.node)), [j.edges, f]), { columns: fe, gridTemplateColumns: P } = x(() => {
238
+ let e = n(f.columns, {
239
+ tApp: p,
240
+ t: m
241
+ }), t = d({
242
+ ariaLabel: m("actions.view"),
243
+ fallback: m("common.notAvailable"),
254
244
  className: re,
255
- resolveDetailHref: (e) => c.routes.detail(e),
245
+ resolveDetailHref: (e) => s.routes.detail(e),
256
246
  renderAction: ({ href: e, ariaLabel: t }) => /* @__PURE__ */ D(se.Actions, { children: /* @__PURE__ */ D("span", {
257
247
  className: ne,
258
248
  title: t,
259
- children: /* @__PURE__ */ D(E, {
249
+ children: /* @__PURE__ */ D(T, {
260
250
  to: e,
261
251
  variant: "icon",
262
252
  size: "small",
@@ -268,107 +258,106 @@ var pe = "store-or-network", me = (e, t, n, r) => {
268
258
  })
269
259
  }) })
270
260
  });
271
- return me([...e, t], p.rowFlags, 1, m);
261
+ return pe([...e, t], f.rowFlags, 1, p);
272
262
  }, [
273
- c.routes,
274
- p.columns,
275
- p.rowFlags,
276
- _,
277
- h,
278
- m
279
- ]), I = b((e) => p.getRowId(e), [p]), { state: L, pushState: R } = d(c), z = c.listDefaults ?? p.defaultState ?? {
263
+ s.routes,
264
+ f.columns,
265
+ f.rowFlags,
266
+ m,
267
+ p
268
+ ]), F = y((e) => f.getRowId(e), [f]), { state: I, pushState: L } = u(s), R = s.listDefaults ?? f.defaultState ?? {
280
269
  where: null,
281
270
  sort: null
282
- }, B = L.sort ?? z.sort, { pageSize: V } = fe, { isRefreshing: H, onRefresh: U } = a({
283
- refetch: de,
284
- variables: S(() => ({
285
- where: L.where,
286
- sort: B,
287
- count: V,
271
+ }, z = I.sort ?? R.sort, { pageSize: B } = de, { isRefreshing: V, onRefresh: H } = i({
272
+ refetch: le,
273
+ variables: x(() => ({
274
+ where: I.where,
275
+ sort: z,
276
+ count: B,
288
277
  cursor: null
289
278
  }), [
290
- V,
291
279
  B,
292
- L.where
280
+ z,
281
+ I.where
293
282
  ]),
294
283
  defaults: {
295
- where: z.where,
296
- sort: z.sort,
297
- count: V,
284
+ where: R.where,
285
+ sort: R.sort,
286
+ count: B,
298
287
  cursor: null
299
288
  },
300
289
  fetchPolicy: M,
301
- buildQueryVariables: p.buildQueryVariables
302
- }), he = i({
303
- hasNext: k,
304
- isLoadingNext: A,
305
- loadNext: ce,
306
- count: V
307
- }), W = S(() => c.listActions ?? [], [c.listActions]), G = S(() => W.filter((e) => e.isVisible == null ? !0 : e.isVisible(null)), [W]), ge = S(() => {
308
- if (G.length !== 0) return /* @__PURE__ */ D("div", {
290
+ buildQueryVariables: f.buildQueryVariables
291
+ }), me = r({
292
+ hasNext: E,
293
+ isLoadingNext: k,
294
+ loadNext: oe,
295
+ count: B
296
+ }), U = x(() => s.listActions ?? [], [s.listActions]), W = x(() => U.filter((e) => e.isVisible == null ? !0 : e.isVisible(null)), [U]), he = x(() => {
297
+ if (W.length !== 0) return /* @__PURE__ */ D("div", {
309
298
  className: ie,
310
- children: G.map((e, t) => {
311
- let { variant: n } = e, r = v(e.label, m), i = r;
312
- e.ariaLabel != null && (i = v(e.ariaLabel, m));
299
+ children: W.map((e, t) => {
300
+ let { variant: n } = e, r = _(e.label, p), i = r;
301
+ e.ariaLabel != null && (i = _(e.ariaLabel, p));
313
302
  let a = te(n, t), o = e.size ?? "small", s = e.isDisabled?.(null) === !0;
314
- return ee(e) ? /* @__PURE__ */ D(E, {
303
+ return ee(e) ? /* @__PURE__ */ D(T, {
315
304
  to: e.to(null),
316
305
  variant: a,
317
306
  size: o,
318
307
  isDisabled: s,
319
308
  "aria-label": i,
320
309
  children: r
321
- }, e.id) : g(e) ? /* @__PURE__ */ D(T, {
310
+ }, e.id) : h(e) ? /* @__PURE__ */ D(w, {
322
311
  type: "button",
323
312
  variant: a,
324
313
  size: o,
325
314
  disabled: s,
326
315
  onClick: () => {
327
- x(e.id);
316
+ v(e.id);
328
317
  },
329
318
  "aria-label": i,
330
319
  children: r
331
320
  }, e.id) : null;
332
321
  })
333
322
  });
334
- }, [m, G]), K = W.find((e) => e.id === y);
335
- return /* @__PURE__ */ le(s, {
336
- breadcrumb: u,
337
- children: [/* @__PURE__ */ D(o, {
338
- config: c,
339
- state: L,
340
- pushState: R,
341
- headerActions: ge,
342
- rows: pe,
343
- columns: P,
344
- gridTemplateColumns: F,
345
- getRowId: I,
346
- hasNextPage: k,
347
- isLoadingMore: A,
348
- isRefreshing: H,
349
- onLoadMore: he,
350
- onRefresh: U,
351
- totalCount: N.totalCount ?? null
352
- }), K != null && g(K) && /* @__PURE__ */ D(n, {
323
+ }, [p, W]), G = U.find((e) => e.id === g);
324
+ return /* @__PURE__ */ ce(o, {
325
+ breadcrumb: l,
326
+ children: [/* @__PURE__ */ D(a, {
327
+ config: s,
328
+ state: I,
329
+ pushState: L,
330
+ headerActions: he,
331
+ rows: N,
332
+ columns: fe,
333
+ gridTemplateColumns: P,
334
+ getRowId: F,
335
+ hasNextPage: E,
336
+ isLoadingMore: k,
337
+ isRefreshing: V,
338
+ onLoadMore: me,
339
+ onRefresh: H,
340
+ totalCount: j.totalCount ?? null
341
+ }), G != null && h(G) && /* @__PURE__ */ D(t, {
353
342
  isOpen: !0,
354
- action: K,
343
+ action: G,
355
344
  node: null,
356
345
  onClose: () => {
357
- x(null);
346
+ v(null);
358
347
  },
359
- onSuccess: U
348
+ onSuccess: H
360
349
  })]
361
350
  });
362
351
  }, I = ({ entityManifest: e, config: t, prepared: n }) => {
363
- let { t: r } = O(), i = c(t, r);
364
- return _(t) ? /* @__PURE__ */ D(s, {
352
+ let { t: r } = O(), i = s(t, r);
353
+ return g(t) ? /* @__PURE__ */ D(o, {
365
354
  breadcrumb: i,
366
355
  children: /* @__PURE__ */ D(P, {
367
356
  entityManifest: e,
368
357
  config: t,
369
358
  prepared: n
370
359
  })
371
- }) : h(t) ? /* @__PURE__ */ D(F, {
360
+ }) : m(t) ? /* @__PURE__ */ D(F, {
372
361
  entityManifest: e,
373
362
  config: t,
374
363
  prepared: n,