@comet/cms-admin 9.0.0-beta.0 → 9.0.0-beta.1

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 (89) hide show
  1. package/lib/blocks/createTableBlock.d.ts +23 -0
  2. package/lib/blocks/createTableBlock.d.ts.map +1 -0
  3. package/lib/blocks/createTableBlock.js +243 -0
  4. package/lib/blocks/table/CellValue.d.ts +9 -0
  5. package/lib/blocks/table/CellValue.d.ts.map +1 -0
  6. package/lib/blocks/table/CellValue.js +86 -0
  7. package/lib/blocks/table/ColumnHeader.d.ts +16 -0
  8. package/lib/blocks/table/ColumnHeader.d.ts.map +1 -0
  9. package/lib/blocks/table/ColumnHeader.js +296 -0
  10. package/lib/blocks/table/EditCell.d.ts +3 -0
  11. package/lib/blocks/table/EditCell.d.ts.map +1 -0
  12. package/lib/blocks/table/EditCell.js +119 -0
  13. package/lib/blocks/table/FailedToPasteSnackbar.d.ts +3 -0
  14. package/lib/blocks/table/FailedToPasteSnackbar.d.ts.map +1 -0
  15. package/lib/blocks/table/FailedToPasteSnackbar.js +23 -0
  16. package/lib/blocks/table/RowActionsCell.d.ts +13 -0
  17. package/lib/blocks/table/RowActionsCell.d.ts.map +1 -0
  18. package/lib/blocks/table/RowActionsCell.js +240 -0
  19. package/lib/blocks/table/TableBlockContext.d.ts +11 -0
  20. package/lib/blocks/table/TableBlockContext.d.ts.map +1 -0
  21. package/lib/blocks/table/TableBlockContext.js +18 -0
  22. package/lib/blocks/table/TableBlockGrid.d.ts +9 -0
  23. package/lib/blocks/table/TableBlockGrid.d.ts.map +1 -0
  24. package/lib/blocks/table/TableBlockGrid.js +231 -0
  25. package/lib/blocks/table/__mocks__/TableBlockData.mocks.js +203 -0
  26. package/lib/blocks/table/dataGridStyles.d.ts +3 -0
  27. package/lib/blocks/table/dataGridStyles.d.ts.map +1 -0
  28. package/lib/blocks/table/dataGridStyles.js +59 -0
  29. package/lib/blocks/table/utils/column.d.ts +48 -0
  30. package/lib/blocks/table/utils/column.d.ts.map +1 -0
  31. package/lib/blocks/table/utils/column.js +149 -0
  32. package/lib/blocks/table/utils/ensureMinimumTableState.d.ts +4 -0
  33. package/lib/blocks/table/utils/ensureMinimumTableState.d.ts.map +1 -0
  34. package/lib/blocks/table/utils/ensureMinimumTableState.js +49 -0
  35. package/lib/blocks/table/utils/getClipboardValueForSchema.d.ts +3 -0
  36. package/lib/blocks/table/utils/getClipboardValueForSchema.d.ts.map +1 -0
  37. package/lib/blocks/table/utils/getClipboardValueForSchema.js +45 -0
  38. package/lib/blocks/table/utils/row.d.ts +33 -0
  39. package/lib/blocks/table/utils/row.d.ts.map +1 -0
  40. package/lib/blocks/table/utils/row.js +124 -0
  41. package/lib/blocks/table/utils/rteSchema.d.ts +9 -0
  42. package/lib/blocks/table/utils/rteSchema.d.ts.map +1 -0
  43. package/lib/blocks/table/utils/rteSchema.js +4 -0
  44. package/lib/blocks/table/utils/useRecentlyPastedIds.d.ts +5 -0
  45. package/lib/blocks/table/utils/useRecentlyPastedIds.d.ts.map +1 -0
  46. package/lib/blocks/table/utils/useRecentlyPastedIds.js +45 -0
  47. package/lib/blocks.generated.d.ts +31 -1
  48. package/lib/blocks.generated.d.ts.map +1 -1
  49. package/lib/dam/DataGrid/DamContextMenu.d.ts.map +1 -1
  50. package/lib/dam/DataGrid/DamContextMenu.js +2 -3
  51. package/lib/dam/DataGrid/FolderDataGrid.d.ts.map +1 -1
  52. package/lib/dam/DataGrid/FolderDataGrid.gql.d.ts.map +1 -1
  53. package/lib/dam/DataGrid/FolderDataGrid.gql.generated.d.ts +8 -0
  54. package/lib/dam/DataGrid/FolderDataGrid.gql.generated.d.ts.map +1 -1
  55. package/lib/dam/DataGrid/FolderDataGrid.gql.js +1 -1
  56. package/lib/dam/DataGrid/FolderDataGrid.js +47 -7
  57. package/lib/dam/DataGrid/selection/DamSelectionContext.js +2 -2
  58. package/lib/dam/FileForm/EditFile.gql.d.ts.map +1 -1
  59. package/lib/dam/FileForm/EditFile.gql.generated.d.ts +3 -0
  60. package/lib/dam/FileForm/EditFile.gql.generated.d.ts.map +1 -1
  61. package/lib/dam/FileForm/EditFile.gql.js +1 -1
  62. package/lib/dam/FileForm/EditFile.js +4 -4
  63. package/lib/dam/FileForm/FilePreview.d.ts.map +1 -1
  64. package/lib/dam/FileForm/FilePreview.js +6 -7
  65. package/lib/dependencies/DependenciesList.d.ts +30 -0
  66. package/lib/dependencies/DependenciesList.d.ts.map +1 -0
  67. package/lib/dependencies/DependenciesList.js +282 -0
  68. package/lib/dependencies/DependentsList.d.ts +30 -0
  69. package/lib/dependencies/DependentsList.d.ts.map +1 -0
  70. package/lib/dependencies/{DependencyList.js → DependentsList.js} +165 -135
  71. package/lib/dependencies/getDisplayNameString.d.ts +4 -0
  72. package/lib/dependencies/getDisplayNameString.d.ts.map +1 -0
  73. package/lib/dependencies/getDisplayNameString.js +12 -0
  74. package/lib/graphql.generated.d.ts +27 -3
  75. package/lib/graphql.generated.d.ts.map +1 -1
  76. package/lib/index.d.ts +4 -2
  77. package/lib/index.d.ts.map +1 -1
  78. package/lib/index.js +4 -2
  79. package/lib/redirects/RedirectForm.d.ts.map +1 -1
  80. package/lib/redirects/RedirectForm.js +23 -6
  81. package/lib/testing/test-utils.d.ts +6 -0
  82. package/lib/testing/test-utils.d.ts.map +1 -0
  83. package/lib/testing/test-utils.js +34 -0
  84. package/package.json +23 -15
  85. package/lib/dependencies/DependencyList.d.ts +0 -29
  86. package/lib/dependencies/DependencyList.d.ts.map +0 -1
  87. package/lib/dependencies/DependencyList.sc.d.ts +0 -7
  88. package/lib/dependencies/DependencyList.sc.d.ts.map +0 -1
  89. package/lib/dependencies/DependencyList.sc.js +0 -73
@@ -15,25 +15,25 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
15
15
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
16
16
  function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
17
17
  import { useApolloClient, useQuery } from "@apollo/client";
18
- import { Alert, DataGridToolbar, FillSpace, messages, Tooltip, useBufferedRowCount, useDataGridRemote, usePersistentColumnState } from "@comet/admin";
18
+ import { Alert, DataGridToolbar, FillSpace, GridCellContent, GridFilterButton, messages, muiGridFilterToGql, muiGridSortToGql, Tooltip, useBufferedRowCount, useDataGridRemote, usePersistentColumnState } from "@comet/admin";
19
19
  import { ArrowRight, OpenNewTab, Reload, ThreeDotSaving } from "@comet/admin-icons";
20
- import { IconButton } from "@mui/material";
20
+ import { Box, Chip, IconButton } from "@mui/material";
21
21
  import { DataGrid } from "@mui/x-data-grid";
22
- import { useState } from "react";
22
+ import { useMemo, useState } from "react";
23
23
  import { FormattedMessage, useIntl } from "react-intl";
24
24
  import { useHistory } from "react-router";
25
25
  import { useContentScope } from "../contentScope/Provider";
26
26
  import { useDependenciesConfig } from "./dependenciesConfig";
27
- import * as sc from "./DependencyList.sc";
27
+ import { getDisplayNameString } from "./getDisplayNameString";
28
28
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
29
- function DependencyListGridToolbar(_ref) {
29
+ function DependentsListGridToolbar(_ref) {
30
30
  var refetch = _ref.refetch;
31
31
  var _useState = useState(false),
32
32
  _useState2 = _slicedToArray(_useState, 2),
33
33
  isRefetching = _useState2[0],
34
34
  setIsRefetching = _useState2[1];
35
35
  return /*#__PURE__*/_jsxs(DataGridToolbar, {
36
- children: [/*#__PURE__*/_jsx(FillSpace, {}), /*#__PURE__*/_jsx(Tooltip, {
36
+ children: [/*#__PURE__*/_jsx(GridFilterButton, {}), /*#__PURE__*/_jsx(FillSpace, {}), /*#__PURE__*/_jsx(Tooltip, {
37
37
  title: /*#__PURE__*/_jsx(FormattedMessage, {
38
38
  id: "comet.dependencies.dataGrid.reloadTooltip",
39
39
  defaultMessage: "Reload"
@@ -65,8 +65,8 @@ function DependencyListGridToolbar(_ref) {
65
65
  });
66
66
  }
67
67
  var pageSize = 10;
68
- export var DependencyList = function DependencyList(_ref3) {
69
- var _data$item$type, _data$item$type$nodes, _data$item$type2;
68
+ export var DependentsList = function DependentsList(_ref3) {
69
+ var _data$item$dependents, _data$item$dependents2, _data$item$dependents3;
70
70
  var query = _ref3.query,
71
71
  variables = _ref3.variables;
72
72
  var intl = useIntl();
@@ -76,130 +76,165 @@ export var DependencyList = function DependencyList(_ref3) {
76
76
  var apolloClient = useApolloClient();
77
77
  var history = useHistory();
78
78
  var dataGridProps = _objectSpread(_objectSpread({}, useDataGridRemote({
79
- queryParamsPrefix: "dependencies",
80
- pageSize: pageSize
81
- })), usePersistentColumnState("DependencyList"));
82
- var columns = [{
83
- field: "nameInfo",
84
- headerName: intl.formatMessage({
85
- id: "comet.dependencies.dataGrid.nameAndInfo",
86
- defaultMessage: "Name/Info"
87
- }),
88
- sortable: false,
89
- flex: 1,
90
- renderCell: function renderCell(_ref4) {
91
- var _row$name;
92
- var row = _ref4.row;
93
- return /*#__PURE__*/_jsxs(sc.NameInfoWrapper, {
94
- children: [/*#__PURE__*/_jsx(sc.NameInfoTypography, {
95
- color: "text.primary",
96
- children: (_row$name = row.name) !== null && _row$name !== void 0 ? _row$name : /*#__PURE__*/_jsx(FormattedMessage, _objectSpread({}, messages.unknown))
97
- }), /*#__PURE__*/_jsx(sc.NameInfoTypography, {
98
- color: "text.secondary",
99
- children: row.secondaryInformation
100
- })]
101
- });
102
- }
103
- }, {
104
- field: "type",
105
- headerName: intl.formatMessage({
106
- id: "comet.dependencies.dataGrid.type",
107
- defaultMessage: "Type"
108
- }),
109
- sortable: false,
110
- renderCell: function renderCell(_ref5) {
111
- var _entityDependencyMap$, _entityDependencyMap$2;
112
- var row = _ref5.row;
113
- return /*#__PURE__*/_jsx(sc.StyledChip, {
114
- label: (_entityDependencyMap$ = (_entityDependencyMap$2 = entityDependencyMap[row.graphqlObjectType]) === null || _entityDependencyMap$2 === void 0 ? void 0 : _entityDependencyMap$2.displayName) !== null && _entityDependencyMap$ !== void 0 ? _entityDependencyMap$ : row.graphqlObjectType
115
- });
79
+ queryParamsPrefix: "dependents",
80
+ pageSize: pageSize,
81
+ initialFilter: {
82
+ items: [{
83
+ field: "visible",
84
+ operator: "is",
85
+ value: "true"
86
+ }]
116
87
  }
117
- }, {
118
- field: "actions",
119
- type: "actions",
120
- headerName: "",
121
- sortable: false,
122
- renderCell: function renderCell(_ref6) {
123
- var row = _ref6.row;
124
- var dependencyObject = entityDependencyMap[row.graphqlObjectType];
125
- if (dependencyObject === undefined) {
126
- if (process.env.NODE_ENV === "development") {
127
- console.warn("Cannot load URL because no implementation of DependencyInterface for ".concat(row.graphqlObjectType, " was provided via the DependenciesConfig"));
128
- }
129
- return /*#__PURE__*/_jsx(FormattedMessage, {
130
- id: "comet.dependencies.dataGrid.cannotLoadUrl",
131
- defaultMessage: "Cannot determine URL"
88
+ })), usePersistentColumnState("DependentsList"));
89
+ var columns = useMemo(function () {
90
+ return [{
91
+ field: "name",
92
+ headerName: intl.formatMessage({
93
+ id: "comet.dependencies.dataGrid.nameAndInfo",
94
+ defaultMessage: "Name/Info"
95
+ }),
96
+ flex: 1,
97
+ sortBy: "name",
98
+ renderCell: function renderCell(_ref4) {
99
+ var _row$name;
100
+ var row = _ref4.row;
101
+ return /*#__PURE__*/_jsx(GridCellContent, {
102
+ primaryText: (_row$name = row.name) !== null && _row$name !== void 0 ? _row$name : /*#__PURE__*/_jsx(FormattedMessage, _objectSpread({}, messages.unknown)),
103
+ secondaryText: row.secondaryInformation
132
104
  });
133
105
  }
134
- var loadUrl = /*#__PURE__*/function () {
135
- var _ref7 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2() {
136
- var path;
137
- return _regenerator().w(function (_context2) {
138
- while (1) switch (_context2.n) {
139
- case 0:
140
- _context2.n = 1;
141
- return dependencyObject.resolvePath({
142
- rootColumnName: row.rootColumnName,
143
- jsonPath: row.jsonPath,
144
- apolloClient: apolloClient,
145
- id: row.id
146
- });
147
- case 1:
148
- path = _context2.v;
149
- return _context2.a(2, contentScope.match.url + path);
150
- }
151
- }, _callee2);
152
- }));
153
- return function loadUrl() {
154
- return _ref7.apply(this, arguments);
106
+ }, {
107
+ field: "secondaryInformation",
108
+ headerName: intl.formatMessage({
109
+ id: "comet.dependencies.dataGrid.secondaryInformation",
110
+ defaultMessage: "Secondary information"
111
+ }),
112
+ sortBy: "secondaryInformation",
113
+ visible: false
114
+ }, {
115
+ field: "rootGraphqlObjectType",
116
+ headerName: intl.formatMessage({
117
+ id: "comet.dependencies.dataGrid.type",
118
+ defaultMessage: "Type"
119
+ }),
120
+ type: "singleSelect",
121
+ sortBy: "graphqlObjectType",
122
+ valueOptions: Object.entries(entityDependencyMap).map(function (_ref5) {
123
+ var _ref6 = _slicedToArray(_ref5, 2),
124
+ value = _ref6[0],
125
+ dep = _ref6[1];
126
+ return {
127
+ value: value,
128
+ label: getDisplayNameString(dep.displayName, intl, value)
155
129
  };
156
- }();
157
- return /*#__PURE__*/_jsxs("div", {
158
- style: {
159
- display: "flex"
160
- },
161
- children: [/*#__PURE__*/_jsx(IconButton, {
162
- onClick: /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3() {
163
- var url;
164
- return _regenerator().w(function (_context3) {
165
- while (1) switch (_context3.n) {
166
- case 0:
167
- _context3.n = 1;
168
- return loadUrl();
169
- case 1:
170
- url = _context3.v;
171
- window.open(url, "_blank");
172
- case 2:
173
- return _context3.a(2);
174
- }
175
- }, _callee3);
176
- })),
177
- children: /*#__PURE__*/_jsx(OpenNewTab, {})
178
- }), /*#__PURE__*/_jsx(IconButton, {
179
- onClick: /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4() {
180
- var url;
181
- return _regenerator().w(function (_context4) {
182
- while (1) switch (_context4.n) {
130
+ }),
131
+ renderCell: function renderCell(_ref7) {
132
+ var _entityDependencyMap$, _entityDependencyMap$2;
133
+ var row = _ref7.row;
134
+ return /*#__PURE__*/_jsx(Chip, {
135
+ label: (_entityDependencyMap$ = (_entityDependencyMap$2 = entityDependencyMap[row.rootGraphqlObjectType]) === null || _entityDependencyMap$2 === void 0 ? void 0 : _entityDependencyMap$2.displayName) !== null && _entityDependencyMap$ !== void 0 ? _entityDependencyMap$ : row.rootGraphqlObjectType
136
+ });
137
+ }
138
+ }, {
139
+ field: "visible",
140
+ headerName: intl.formatMessage({
141
+ id: "comet.dependencies.dataGrid.visible",
142
+ defaultMessage: "Visible"
143
+ }),
144
+ type: "boolean",
145
+ visible: false,
146
+ sortBy: "visible"
147
+ }, {
148
+ field: "actions",
149
+ type: "actions",
150
+ headerName: "",
151
+ filterable: false,
152
+ sortable: false,
153
+ renderCell: function renderCell(_ref8) {
154
+ var row = _ref8.row;
155
+ var dependencyObject = entityDependencyMap[row.rootGraphqlObjectType];
156
+ if (dependencyObject === undefined) {
157
+ if (process.env.NODE_ENV === "development") {
158
+ console.warn("Cannot load URL because no implementation of DependencyInterface for ".concat(row.rootGraphqlObjectType, " was provided via the DependenciesConfig"));
159
+ }
160
+ return /*#__PURE__*/_jsx(FormattedMessage, {
161
+ id: "comet.dependencies.dataGrid.cannotLoadUrl",
162
+ defaultMessage: "Cannot determine URL"
163
+ });
164
+ }
165
+ var loadUrl = /*#__PURE__*/function () {
166
+ var _ref9 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2() {
167
+ var path;
168
+ return _regenerator().w(function (_context2) {
169
+ while (1) switch (_context2.n) {
183
170
  case 0:
184
- _context4.n = 1;
185
- return loadUrl();
171
+ _context2.n = 1;
172
+ return dependencyObject.resolvePath({
173
+ rootColumnName: row.rootColumnName,
174
+ jsonPath: row.jsonPath,
175
+ apolloClient: apolloClient,
176
+ id: row.id
177
+ });
186
178
  case 1:
187
- url = _context4.v;
188
- history.push(url);
189
- case 2:
190
- return _context4.a(2);
179
+ path = _context2.v;
180
+ return _context2.a(2, contentScope.match.url + path);
191
181
  }
192
- }, _callee4);
193
- })),
194
- children: /*#__PURE__*/_jsx(ArrowRight, {})
195
- })]
196
- });
197
- }
198
- }];
182
+ }, _callee2);
183
+ }));
184
+ return function loadUrl() {
185
+ return _ref9.apply(this, arguments);
186
+ };
187
+ }();
188
+ return /*#__PURE__*/_jsxs(Box, {
189
+ display: "flex",
190
+ children: [/*#__PURE__*/_jsx(IconButton, {
191
+ onClick: /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3() {
192
+ var url;
193
+ return _regenerator().w(function (_context3) {
194
+ while (1) switch (_context3.n) {
195
+ case 0:
196
+ _context3.n = 1;
197
+ return loadUrl();
198
+ case 1:
199
+ url = _context3.v;
200
+ window.open(url, "_blank");
201
+ case 2:
202
+ return _context3.a(2);
203
+ }
204
+ }, _callee3);
205
+ })),
206
+ children: /*#__PURE__*/_jsx(OpenNewTab, {})
207
+ }), /*#__PURE__*/_jsx(IconButton, {
208
+ onClick: /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4() {
209
+ var url;
210
+ return _regenerator().w(function (_context4) {
211
+ while (1) switch (_context4.n) {
212
+ case 0:
213
+ _context4.n = 1;
214
+ return loadUrl();
215
+ case 1:
216
+ url = _context4.v;
217
+ history.push(url);
218
+ case 2:
219
+ return _context4.a(2);
220
+ }
221
+ }, _callee4);
222
+ })),
223
+ children: /*#__PURE__*/_jsx(ArrowRight, {})
224
+ })]
225
+ });
226
+ }
227
+ }];
228
+ }, [intl, entityDependencyMap, apolloClient, contentScope, history]);
229
+ var _muiGridFilterToGql = muiGridFilterToGql(columns, dataGridProps.filterModel),
230
+ gqlFilter = _muiGridFilterToGql.filter;
231
+ var sort = muiGridSortToGql(dataGridProps.sortModel, columns);
199
232
  var _useQuery = useQuery(query, {
200
233
  variables: _objectSpread({
201
234
  offset: dataGridProps.paginationModel.page * dataGridProps.paginationModel.pageSize,
202
- limit: dataGridProps.paginationModel.pageSize
235
+ limit: dataGridProps.paginationModel.pageSize,
236
+ filter: gqlFilter,
237
+ sort: sort
203
238
  }, variables)
204
239
  }),
205
240
  data = _useQuery.data,
@@ -207,17 +242,12 @@ export var DependencyList = function DependencyList(_ref3) {
207
242
  error = _useQuery.error,
208
243
  refetch = _useQuery.refetch;
209
244
  if (error) throw error;
210
- if (!loading && (data !== null && data !== void 0 && data.item.dependencies && data !== null && data !== void 0 && data.item.dependents || !(data !== null && data !== void 0 && data.item.dependents) && !(data !== null && data !== void 0 && data.item.dependencies))) {
211
- throw new Error("Either dependencies or dependents must be defined, but not both.");
212
- }
213
- var type = data !== null && data !== void 0 && data.item.dependencies ? "dependencies" : "dependents";
214
- var rowCount = useBufferedRowCount(data === null || data === void 0 || (_data$item$type = data.item[type]) === null || _data$item$type === void 0 ? void 0 : _data$item$type.totalCount);
215
- var rows = (_data$item$type$nodes = data === null || data === void 0 || (_data$item$type2 = data.item[type]) === null || _data$item$type2 === void 0 ? void 0 : _data$item$type2.nodes.map(function (node) {
245
+ var rowCount = useBufferedRowCount(data === null || data === void 0 || (_data$item$dependents = data.item.dependents) === null || _data$item$dependents === void 0 ? void 0 : _data$item$dependents.totalCount);
246
+ var rows = (_data$item$dependents2 = data === null || data === void 0 || (_data$item$dependents3 = data.item.dependents) === null || _data$item$dependents3 === void 0 ? void 0 : _data$item$dependents3.nodes.map(function (node) {
216
247
  return _objectSpread(_objectSpread({}, node), {}, {
217
- graphqlObjectType: type === "dependencies" ? node.targetGraphqlObjectType : node.rootGraphqlObjectType,
218
- id: type === "dependencies" ? node.targetId : node.rootId
248
+ id: node.rootId
219
249
  });
220
- })) !== null && _data$item$type$nodes !== void 0 ? _data$item$type$nodes : [];
250
+ })) !== null && _data$item$dependents2 !== void 0 ? _data$item$dependents2 : [];
221
251
  return /*#__PURE__*/_jsxs(_Fragment, {
222
252
  children: [/*#__PURE__*/_jsx(DataGrid, _objectSpread(_objectSpread({}, dataGridProps), {}, {
223
253
  rows: rows,
@@ -228,7 +258,7 @@ export var DependencyList = function DependencyList(_ref3) {
228
258
  return "".concat(row.id, "_").concat(row.rootColumnName, "_").concat(row.jsonPath);
229
259
  },
230
260
  slots: {
231
- toolbar: DependencyListGridToolbar
261
+ toolbar: DependentsListGridToolbar
232
262
  },
233
263
  slotProps: {
234
264
  toolbar: {
@@ -237,15 +267,15 @@ export var DependencyList = function DependencyList(_ref3) {
237
267
  }
238
268
  })), /*#__PURE__*/_jsx(Alert, {
239
269
  title: /*#__PURE__*/_jsx(FormattedMessage, {
240
- id: "comet.dam.file.dependents.info.title",
270
+ id: "comet.dependencies.dependents.info.title",
241
271
  defaultMessage: "What are dependents?"
242
272
  }),
243
273
  sx: {
244
274
  marginTop: 4
245
275
  },
246
276
  children: /*#__PURE__*/_jsx(FormattedMessage, {
247
- id: "comet.dam.file.dependents.info.content",
248
- defaultMessage: "Dependents are all pages, snippets and content in which a particular asset is used, linked or included. With this list, it's easy to manage or reorganize the integration of your assets."
277
+ id: "comet.dependencies.dependents.info.content",
278
+ defaultMessage: "Dependents are all content items that reference or use this item \u2014 such as pages, snippets, or other content. Use this list to see where this item is used."
249
279
  })
250
280
  })]
251
281
  });
@@ -0,0 +1,4 @@
1
+ import { type ReactNode } from "react";
2
+ import { type IntlShape } from "react-intl";
3
+ export declare function getDisplayNameString(displayName: ReactNode, intl: IntlShape, fallback: string): string;
4
+ //# sourceMappingURL=getDisplayNameString.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getDisplayNameString.d.ts","sourceRoot":"","sources":["../../src/dependencies/getDisplayNameString.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC1E,OAAO,EAAoB,KAAK,SAAS,EAA0B,MAAM,YAAY,CAAC;AAMtF,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAMtG"}
@@ -0,0 +1,12 @@
1
+ import { isValidElement } from "react";
2
+ import { FormattedMessage } from "react-intl";
3
+ function isFormattedMessage(node) {
4
+ return /*#__PURE__*/isValidElement(node) && node.type === FormattedMessage;
5
+ }
6
+ export function getDisplayNameString(displayName, intl, fallback) {
7
+ if (typeof displayName === "string") return displayName;
8
+ if (isFormattedMessage(displayName)) {
9
+ return intl.formatMessage(displayName.props);
10
+ }
11
+ return fallback;
12
+ }
@@ -154,6 +154,7 @@ export type GQLDamFiledependentsArgs = {
154
154
  forceRefresh?: Scalars['Boolean']['input'];
155
155
  limit?: Scalars['Int']['input'];
156
156
  offset?: Scalars['Int']['input'];
157
+ sort?: InputMaybe<Array<GQLDependencySort>>;
157
158
  };
158
159
  export type GQLDamFileImage = {
159
160
  __typename?: 'DamFileImage';
@@ -253,14 +254,29 @@ export type GQLDependency = {
253
254
  visible: Scalars['Boolean']['output'];
254
255
  };
255
256
  export type GQLDependencyFilter = {
257
+ and?: InputMaybe<Array<GQLDependencyFilter>>;
258
+ name?: InputMaybe<GQLStringFilter>;
259
+ or?: InputMaybe<Array<GQLDependencyFilter>>;
256
260
  rootColumnName?: InputMaybe<Scalars['String']['input']>;
257
- targetGraphqlObjectType?: InputMaybe<Scalars['String']['input']>;
261
+ secondaryInformation?: InputMaybe<GQLStringFilter>;
262
+ targetGraphqlObjectType?: InputMaybe<GQLStringFilter>;
258
263
  targetId?: InputMaybe<Scalars['String']['input']>;
264
+ visible?: InputMaybe<GQLBooleanFilter>;
265
+ };
266
+ export type GQLDependencySort = {
267
+ direction?: GQLSortDirection;
268
+ field: GQLDependencySortField;
259
269
  };
270
+ export type GQLDependencySortField = 'graphqlObjectType' | 'name' | 'secondaryInformation' | 'visible';
260
271
  export type GQLDependentFilter = {
272
+ and?: InputMaybe<Array<GQLDependentFilter>>;
273
+ name?: InputMaybe<GQLStringFilter>;
274
+ or?: InputMaybe<Array<GQLDependentFilter>>;
261
275
  rootColumnName?: InputMaybe<Scalars['String']['input']>;
262
- rootGraphqlObjectType?: InputMaybe<Scalars['String']['input']>;
276
+ rootGraphqlObjectType?: InputMaybe<GQLStringFilter>;
263
277
  rootId?: InputMaybe<Scalars['String']['input']>;
278
+ secondaryInformation?: InputMaybe<GQLStringFilter>;
279
+ visible?: InputMaybe<GQLBooleanFilter>;
264
280
  };
265
281
  export type GQLDocumentInterface = {
266
282
  id: Scalars['ID']['output'];
@@ -583,6 +599,7 @@ export type GQLPageTreeNodedependentsArgs = {
583
599
  forceRefresh?: Scalars['Boolean']['input'];
584
600
  limit?: Scalars['Int']['input'];
585
601
  offset?: Scalars['Int']['input'];
602
+ sort?: InputMaybe<Array<GQLDependencySort>>;
586
603
  };
587
604
  export type GQLPageTreeNodeCreateInput = {
588
605
  attachedDocument: GQLAttachedDocumentInput;
@@ -919,6 +936,7 @@ export type GQLRedirectdependenciesArgs = {
919
936
  forceRefresh?: Scalars['Boolean']['input'];
920
937
  limit?: Scalars['Int']['input'];
921
938
  offset?: Scalars['Int']['input'];
939
+ sort?: InputMaybe<Array<GQLDependencySort>>;
922
940
  };
923
941
  export type GQLRedirectFilter = {
924
942
  activatedAt?: InputMaybe<GQLDateTimeFilter>;
@@ -928,6 +946,7 @@ export type GQLRedirectFilter = {
928
946
  generationType?: InputMaybe<GQLStringFilter>;
929
947
  or?: InputMaybe<Array<GQLRedirectFilter>>;
930
948
  source?: InputMaybe<GQLStringFilter>;
949
+ sourceType?: InputMaybe<GQLRedirectSourceTypeEnumFilter>;
931
950
  target?: InputMaybe<GQLStringFilter>;
932
951
  updatedAt?: InputMaybe<GQLDateTimeFilter>;
933
952
  };
@@ -948,7 +967,12 @@ export type GQLRedirectSort = {
948
967
  field: GQLRedirectSortField;
949
968
  };
950
969
  export type GQLRedirectSortField = 'createdAt' | 'source' | 'updatedAt';
951
- export type GQLRedirectSourceTypeValues = 'path';
970
+ export type GQLRedirectSourceTypeEnumFilter = {
971
+ equal?: InputMaybe<GQLRedirectSourceTypeValues>;
972
+ isAnyOf?: InputMaybe<Array<GQLRedirectSourceTypeValues>>;
973
+ notEqual?: InputMaybe<GQLRedirectSourceTypeValues>;
974
+ };
975
+ export type GQLRedirectSourceTypeValues = 'domain' | 'path';
952
976
  export type GQLRedirectUpdateActivenessInput = {
953
977
  active: Scalars['Boolean']['input'];
954
978
  };