@comet/cms-admin 8.8.0 → 8.9.0-canary-20251201074015

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":"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,4CAgMtF,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,4CAwMtF,CAAC"}
@@ -16,12 +16,12 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4;
16
16
  var _excluded = ["source", "__typename"];
17
17
  function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
18
18
  function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
19
+ function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
19
20
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
20
21
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
21
22
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
22
23
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
23
24
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
24
- function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
25
25
  function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
26
26
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
27
27
  function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
@@ -34,11 +34,19 @@ var PermissionDialog = exports.PermissionDialog = function PermissionDialog(_ref
34
34
  var client = (0, _client.useApolloClient)();
35
35
  var submit = /*#__PURE__*/function () {
36
36
  var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(submitData) {
37
- var source, __typename, data;
37
+ var _data$validFrom, _data$validTo, _data$reason, _data$requestedBy, _data$approvedBy;
38
+ var source, __typename, data, input;
38
39
  return _regenerator().w(function (_context) {
39
40
  while (1) switch (_context.n) {
40
41
  case 0:
41
42
  source = submitData.source, __typename = submitData.__typename, data = _objectWithoutProperties(submitData, _excluded); // Remove source and __typename from data
43
+ input = _objectSpread(_objectSpread({}, data), {}, {
44
+ validFrom: (_data$validFrom = data.validFrom) !== null && _data$validFrom !== void 0 ? _data$validFrom : null,
45
+ validTo: (_data$validTo = data.validTo) !== null && _data$validTo !== void 0 ? _data$validTo : null,
46
+ reason: (_data$reason = data.reason) !== null && _data$reason !== void 0 ? _data$reason : null,
47
+ requestedBy: (_data$requestedBy = data.requestedBy) !== null && _data$requestedBy !== void 0 ? _data$requestedBy : null,
48
+ approvedBy: (_data$approvedBy = data.approvedBy) !== null && _data$approvedBy !== void 0 ? _data$approvedBy : null
49
+ });
42
50
  if (!(permissionId && permissionId !== "add")) {
43
51
  _context.n = 2;
44
52
  break;
@@ -48,7 +56,7 @@ var PermissionDialog = exports.PermissionDialog = function PermissionDialog(_ref
48
56
  mutation: (0, _client.gql)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n mutation UpdateUserPermission($id: String!, $input: UserPermissionInput!) {\n userPermissionsUpdatePermission(id: $id, input: $input) {\n id\n }\n }\n "]))),
49
57
  variables: {
50
58
  id: permissionId,
51
- input: data
59
+ input: input
52
60
  },
53
61
  refetchQueries: [_PermissionDialog.namedOperations.Query.Permission, "Permissions"]
54
62
  });
@@ -61,7 +69,7 @@ var PermissionDialog = exports.PermissionDialog = function PermissionDialog(_ref
61
69
  mutation: (0, _client.gql)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n mutation CreateUserPermission($userId: String!, $input: UserPermissionInput!) {\n userPermissionsCreatePermission(userId: $userId, input: $input) {\n id\n }\n }\n "]))),
62
70
  variables: {
63
71
  userId: userId,
64
- input: _objectSpread({}, data)
72
+ input: input
65
73
  },
66
74
  refetchQueries: [_PermissionDialog.namedOperations.Query.Permission, "Permissions"]
67
75
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comet/cms-admin",
3
- "version": "8.8.0",
3
+ "version": "8.9.0-canary-20251201074015",
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.8.0",
45
- "@comet/admin-date-time": "8.8.0",
46
- "@comet/admin-icons": "8.8.0",
47
- "@comet/admin-rte": "8.8.0"
44
+ "@comet/admin": "8.9.0-canary-20251201074015",
45
+ "@comet/admin-date-time": "8.9.0-canary-20251201074015",
46
+ "@comet/admin-icons": "8.9.0-canary-20251201074015",
47
+ "@comet/admin-rte": "8.9.0-canary-20251201074015"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@apollo/client": "^3.14.0",
@@ -97,9 +97,9 @@
97
97
  "react-router-dom": "^5.3.4",
98
98
  "ts-jest": "^29.4.0",
99
99
  "typescript": "5.9.3",
100
- "@comet/admin-babel-preset": "8.8.0",
101
- "@comet/cli": "8.8.0",
102
- "@comet/eslint-config": "8.8.0"
100
+ "@comet/admin-babel-preset": "8.9.0-canary-20251201074015",
101
+ "@comet/cli": "8.9.0-canary-20251201074015",
102
+ "@comet/eslint-config": "8.9.0-canary-20251201074015"
103
103
  },
104
104
  "peerDependencies": {
105
105
  "@apollo/client": "^3.7.0",