@comet/cms-admin 8.4.0-canary-20251001092816 → 8.4.0-canary-20251001102415

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.
@@ -1 +1 @@
1
- {"version":3,"file":"PermissionDialog.d.ts","sourceRoot":"","sources":["../../../../src/userPermissions/user/permissions/PermissionDialog.tsx"],"names":[],"mappings":"AA4BA,UAAU,SAAS;IACf,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,GAAG,KAAK,CAAC;IAC7B,iBAAiB,EAAE,MAAM,IAAI,CAAC;CACjC;AACD,eAAO,MAAM,gBAAgB,GAAI,6CAA6C,SAAS,4CA4NtF,CAAC"}
1
+ {"version":3,"file":"PermissionDialog.d.ts","sourceRoot":"","sources":["../../../../src/userPermissions/user/permissions/PermissionDialog.tsx"],"names":[],"mappings":"AAmCA,UAAU,SAAS;IACf,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,GAAG,KAAK,CAAC;IAC7B,iBAAiB,EAAE,MAAM,IAAI,CAAC;CACjC;AACD,eAAO,MAAM,gBAAgB,GAAI,6CAA6C,SAAS,4CAsMtF,CAAC"}
@@ -7,8 +7,6 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.PermissionDialog = void 0;
8
8
  var _client = require("@apollo/client");
9
9
  var _admin = require("@comet/admin");
10
- var _adminDateTime = require("@comet/admin-date-time");
11
- var _adminIcons = require("@comet/admin-icons");
12
10
  var _material = require("@mui/material");
13
11
  var _reactIntl = require("react-intl");
14
12
  var _camelCaseToHumanReadable = require("../../utils/camelCaseToHumanReadable");
@@ -114,8 +112,7 @@ var PermissionDialog = exports.PermissionDialog = function PermissionDialog(_ref
114
112
  return null;
115
113
  },
116
114
  initialValues: initialValues,
117
- render: function render(_ref3) {
118
- var values = _ref3.values;
115
+ render: function render() {
119
116
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
120
117
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.DialogTitle, {
121
118
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
@@ -124,12 +121,9 @@ var PermissionDialog = exports.PermissionDialog = function PermissionDialog(_ref
124
121
  })
125
122
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.DialogContent, {
126
123
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.FormSection, {
127
- title: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
128
- variant: "h4",
129
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
130
- id: "comet.userPermissions.setPermission",
131
- defaultMessage: "Set permission"
132
- })
124
+ title: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
125
+ id: "comet.userPermissions.setPermission",
126
+ defaultMessage: "Set permission"
133
127
  }),
134
128
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.Field, {
135
129
  required: true,
@@ -148,62 +142,43 @@ var PermissionDialog = exports.PermissionDialog = function PermissionDialog(_ref
148
142
  variant: "horizontal"
149
143
  })
150
144
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_admin.FormSection, {
151
- title: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
152
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
153
- id: "comet.userPermissions.validityDuration",
154
- defaultMessage: "Validity duration"
155
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.Tooltip, {
156
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_adminIcons.Info, {}),
157
- title: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
158
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
159
- variant: "subtitle1",
160
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
145
+ title: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
146
+ id: "comet.userPermissions.validityDuration",
147
+ defaultMessage: "Validity duration"
148
+ }),
149
+ slotProps: {
150
+ title: {
151
+ slotProps: {
152
+ infoTooltip: {
153
+ title: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
161
154
  id: "comet.userPermission.validityDuration.tooltip.title",
162
155
  defaultMessage: "Validity duration"
163
- })
164
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
165
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
156
+ }),
157
+ description: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
166
158
  id: "comet.userPermission.validityDuration.tooltip.content",
167
159
  defaultMessage: "Leave empty for unlimited validity"
168
160
  })
169
- })]
170
- }),
171
- sx: {
172
- marginLeft: "5px"
161
+ }
173
162
  }
174
- })]
175
- }),
176
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.Field, {
163
+ }
164
+ },
165
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.Future_DatePickerField, {
177
166
  name: "validFrom",
178
167
  label: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
179
168
  id: "comet.userPermissions.validFrom",
180
169
  defaultMessage: "Valid from"
181
170
  }),
182
171
  fullWidth: true,
183
- component: _adminDateTime.FinalFormDatePicker,
184
172
  disabled: disabled,
185
- clearable: true,
186
- formatDateOptions: {
187
- month: "short",
188
- day: "numeric",
189
- year: "numeric"
190
- },
191
173
  variant: "horizontal"
192
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.Field, {
174
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.Future_DatePickerField, {
193
175
  name: "validTo",
194
176
  label: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
195
177
  id: "comet.userPermissions.validTo",
196
178
  defaultMessage: "Valid to"
197
179
  }),
198
180
  fullWidth: true,
199
- component: _adminDateTime.FinalFormDatePicker,
200
181
  disabled: disabled,
201
- clearable: true,
202
- formatDateOptions: {
203
- month: "short",
204
- day: "numeric",
205
- year: "numeric"
206
- },
207
182
  variant: "horizontal"
208
183
  })]
209
184
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_admin.FormSection, {
@@ -211,10 +186,9 @@ var PermissionDialog = exports.PermissionDialog = function PermissionDialog(_ref
211
186
  id: "comet.userPermissions.documentation",
212
187
  defaultMessage: "Documentation"
213
188
  }),
214
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.Field, {
189
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.TextField, {
215
190
  fullWidth: true,
216
191
  name: "reason",
217
- component: _admin.FinalFormInput,
218
192
  disabled: disabled,
219
193
  label: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
220
194
  id: "comet.userPermissions.reason",
@@ -226,10 +200,9 @@ var PermissionDialog = exports.PermissionDialog = function PermissionDialog(_ref
226
200
  id: "comet.userPermissions.reason.placeholder",
227
201
  defaultMessage: "Reason why this role is needed"
228
202
  })
229
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.Field, {
203
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.TextField, {
230
204
  fullWidth: true,
231
205
  name: "requestedBy",
232
- component: _admin.FinalFormInput,
233
206
  disabled: disabled,
234
207
  label: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
235
208
  id: "comet.userPermissions.requestedBy",
@@ -241,10 +214,9 @@ var PermissionDialog = exports.PermissionDialog = function PermissionDialog(_ref
241
214
  id: "comet.userPermissions.requestedBy.placeholder",
242
215
  defaultMessage: "Who has requested this?"
243
216
  })
244
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.Field, {
217
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.TextField, {
245
218
  fullWidth: true,
246
219
  name: "approvedBy",
247
- component: _admin.FinalFormInput,
248
220
  disabled: disabled,
249
221
  label: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
250
222
  id: "comet.userPermissions.approvedBy",
@@ -260,11 +232,7 @@ var PermissionDialog = exports.PermissionDialog = function PermissionDialog(_ref
260
232
  })]
261
233
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.DialogActions, {
262
234
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.CancelButton, {
263
- onClick: handleDialogClose,
264
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
265
- id: "comet.userPermissions.close",
266
- defaultMessage: "Close"
267
- })
235
+ onClick: handleDialogClose
268
236
  }), !disabled && /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.SaveButton, {
269
237
  type: "submit"
270
238
  })]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comet/cms-admin",
3
- "version": "8.4.0-canary-20251001092816",
3
+ "version": "8.4.0-canary-20251001102415",
4
4
  "description": "Comet CMS Admin package",
5
5
  "repository": {
6
6
  "directory": "packages/admin/cms-admin",
@@ -41,10 +41,10 @@
41
41
  "slugify": "^1.6.6",
42
42
  "use-debounce": "^10.0.5",
43
43
  "uuid": "^11.1.0",
44
- "@comet/admin": "8.4.0-canary-20251001092816",
45
- "@comet/admin-date-time": "8.4.0-canary-20251001092816",
46
- "@comet/admin-icons": "8.4.0-canary-20251001092816",
47
- "@comet/admin-rte": "8.4.0-canary-20251001092816"
44
+ "@comet/admin": "8.4.0-canary-20251001102415",
45
+ "@comet/admin-date-time": "8.4.0-canary-20251001102415",
46
+ "@comet/admin-icons": "8.4.0-canary-20251001102415",
47
+ "@comet/admin-rte": "8.4.0-canary-20251001102415"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@apollo/client": "^3.13.8",
@@ -98,9 +98,9 @@
98
98
  "react-router-dom": "^5.3.4",
99
99
  "ts-jest": "^29.4.0",
100
100
  "typescript": "5.8.3",
101
- "@comet/admin-babel-preset": "8.4.0-canary-20251001092816",
102
- "@comet/cli": "8.4.0-canary-20251001092816",
103
- "@comet/eslint-config": "8.4.0-canary-20251001092816"
101
+ "@comet/admin-babel-preset": "8.4.0-canary-20251001102415",
102
+ "@comet/cli": "8.4.0-canary-20251001102415",
103
+ "@comet/eslint-config": "8.4.0-canary-20251001102415"
104
104
  },
105
105
  "peerDependencies": {
106
106
  "@apollo/client": "^3.7.0",