@comet/admin 8.0.0-beta.1 → 8.0.0-beta.2
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/lib/EditDialog.d.ts +1 -2
- package/lib/EditDialog.d.ts.map +1 -1
- package/lib/EditDialog.js +1 -3
- package/lib/FinalFormSaveButton.d.ts.map +1 -1
- package/lib/FinalFormSaveButton.js +4 -6
- package/lib/FinalFormSaveCancelButtonsLegacy.d.ts +1 -1
- package/lib/FinalFormSaveCancelButtonsLegacy.d.ts.map +1 -1
- package/lib/FinalFormSaveCancelButtonsLegacy.js +1 -1
- package/lib/FinalFormSaveSplitButton.d.ts.map +1 -1
- package/lib/FinalFormSaveSplitButton.js +42 -38
- package/lib/common/DeleteDialog.d.ts.map +1 -1
- package/lib/common/DeleteDialog.js +1 -2
- package/lib/common/FieldSet.d.ts.map +1 -1
- package/lib/common/FieldSet.js +16 -11
- package/lib/common/buttons/Button.d.ts.map +1 -1
- package/lib/common/buttons/Button.js +10 -12
- package/lib/common/buttons/SaveButton.d.ts +21 -0
- package/lib/common/buttons/SaveButton.d.ts.map +1 -0
- package/lib/common/buttons/SaveButton.js +41 -0
- package/lib/common/buttons/feedback/FeedbackButton.d.ts +3 -2
- package/lib/common/buttons/feedback/FeedbackButton.d.ts.map +1 -1
- package/lib/common/buttons/feedback/FeedbackButton.js +3 -9
- package/lib/dataGrid/DataGridPanel.d.ts +1 -1
- package/lib/dataGrid/DataGridPanel.d.ts.map +1 -1
- package/lib/dataGrid/DataGridPanel.js +2 -2
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/inputWithPopper/InputWithPopper.slots.d.ts +1 -1
- package/lib/saveBoundary/SaveBoundarySaveButton.d.ts +1 -1
- package/lib/saveBoundary/SaveBoundarySaveButton.d.ts.map +1 -1
- package/lib/saveBoundary/SaveBoundarySaveButton.js +5 -4
- package/lib/stack/breadcrumbs/BreadcrumbsEntry.d.ts.map +1 -1
- package/lib/stack/breadcrumbs/BreadcrumbsEntry.js +2 -1
- package/lib/stack/breadcrumbs/StackBreadcrumbs.d.ts +1 -1
- package/lib/stack/breadcrumbs/StackBreadcrumbs.d.ts.map +1 -1
- package/lib/table/LocalChangesToolbar.js +1 -1
- package/lib/theme/componentsTheme/MuiButton.d.ts.map +1 -1
- package/lib/theme/componentsTheme/MuiButton.js +86 -24
- package/lib/theme/componentsTheme/MuiDataGrid.d.ts.map +1 -1
- package/lib/theme/componentsTheme/MuiDataGrid.js +78 -70
- package/lib/theme/componentsTheme/MuiLink.js +1 -1
- package/package.json +21 -18
- package/lib/common/buttons/save/SaveButton.d.ts +0 -34
- package/lib/common/buttons/save/SaveButton.d.ts.map +0 -1
- package/lib/common/buttons/save/SaveButton.js +0 -173
package/lib/EditDialog.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type DialogActionsProps, type
|
|
1
|
+
import { type DialogActionsProps, type DialogProps, type DialogTitleProps } from "@mui/material";
|
|
2
2
|
import { type ComponentType, type PropsWithChildren, type ReactNode } from "react";
|
|
3
3
|
import { type IEditDialogApi } from "./EditDialogApiContext";
|
|
4
4
|
import { type ISelectionApi } from "./SelectionApi";
|
|
@@ -9,7 +9,6 @@ interface ITitle {
|
|
|
9
9
|
interface EditDialogComponentsProps {
|
|
10
10
|
dialog?: Omit<Partial<DialogProps>, "open" | "onClose">;
|
|
11
11
|
dialogActions?: Partial<DialogActionsProps>;
|
|
12
|
-
dialogContent?: Partial<DialogContentProps>;
|
|
13
12
|
dialogTitle?: Partial<DialogTitleProps>;
|
|
14
13
|
}
|
|
15
14
|
type EditDialogProps = PropsWithChildren<{
|
package/lib/EditDialog.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditDialog.d.ts","sourceRoot":"","sources":["../src/EditDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIH,KAAK,kBAAkB,
|
|
1
|
+
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,EAAE,MAAM,CAAC;QAAC,aAAa,CAAC,EAAE,MAAM,GAAG,KAAK,CAAA;KAAE,KAAK,SAAS,CAAC;CACnG;AAcD,eAAO,MAAM,UAAU,qHAAsC,CAAC"}
|
package/lib/EditDialog.js
CHANGED
|
@@ -114,9 +114,7 @@ var EditDialogInner = function EditDialogInner(_ref) {
|
|
|
114
114
|
}, componentsProps === null || componentsProps === void 0 ? void 0 : componentsProps.dialog), {}, {
|
|
115
115
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.DialogTitle, _objectSpread(_objectSpread({}, componentsProps === null || componentsProps === void 0 ? void 0 : componentsProps.dialogTitle), {}, {
|
|
116
116
|
children: typeof title === "string" ? title : selection.mode === "edit" ? title.edit : title.add
|
|
117
|
-
})), /*#__PURE__*/(0, _jsxRuntime.
|
|
118
|
-
children: children
|
|
119
|
-
})), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.DialogActions, _objectSpread(_objectSpread({}, componentsProps === null || componentsProps === void 0 ? void 0 : componentsProps.dialogActions), {}, {
|
|
117
|
+
})), children, /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.DialogActions, _objectSpread(_objectSpread({}, componentsProps === null || componentsProps === void 0 ? void 0 : componentsProps.dialogActions), {}, {
|
|
120
118
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CancelButton.CancelButton, {
|
|
121
119
|
onClick: handleCancelClick
|
|
122
120
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_SaveBoundarySaveButton.SaveBoundarySaveButton, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FinalFormSaveButton.d.ts","sourceRoot":"","sources":["../src/FinalFormSaveButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAOvC,UAAU,wBAAwB;IAC9B,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,eAAO,MAAM,mBAAmB,6BAAwE,wBAAwB,
|
|
1
|
+
{"version":3,"file":"FinalFormSaveButton.d.ts","sourceRoot":"","sources":["../src/FinalFormSaveButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAOvC,UAAU,wBAAwB;IAC9B,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,eAAO,MAAM,mBAAmB,6BAAwE,wBAAwB,4CAmB/H,CAAC"}
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.FinalFormSaveButton = void 0;
|
|
7
7
|
var _reactFinalForm = require("react-final-form");
|
|
8
8
|
var _reactIntl = require("react-intl");
|
|
9
|
-
var _SaveButton = require("./common/buttons/
|
|
9
|
+
var _SaveButton = require("./common/buttons/SaveButton");
|
|
10
10
|
var _messages = require("./messages");
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
12
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
@@ -27,12 +27,10 @@ var FinalFormSaveButton = exports.FinalFormSaveButton = function FinalFormSaveBu
|
|
|
27
27
|
hasSubmitErrors = _useFormState.hasSubmitErrors;
|
|
28
28
|
var isDisabled = pristine || hasValidationErrors || submitting;
|
|
29
29
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_SaveButton.SaveButton, {
|
|
30
|
-
|
|
30
|
+
hasErrors: hasConflict || hasSubmitErrors,
|
|
31
|
+
tooltipErrorMessage: hasConflict ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, _objectSpread({}, _messages.messages.saveConflict)) : undefined,
|
|
31
32
|
disabled: isDisabled,
|
|
32
|
-
|
|
33
|
-
variant: "contained",
|
|
34
|
-
saving: submitting,
|
|
35
|
-
hasErrors: hasSubmitErrors,
|
|
33
|
+
loading: submitting,
|
|
36
34
|
onClick: function onClick() {
|
|
37
35
|
if (!isDisabled) form.submit();
|
|
38
36
|
},
|
|
@@ -2,7 +2,7 @@ import { type ComponentsOverrides } from "@mui/material";
|
|
|
2
2
|
import { type Theme } from "@mui/material/styles";
|
|
3
3
|
import { type ReactNode } from "react";
|
|
4
4
|
import { CancelButton } from "./common/buttons/cancel/CancelButton";
|
|
5
|
-
import { SaveButton } from "./common/buttons/
|
|
5
|
+
import { SaveButton } from "./common/buttons/SaveButton";
|
|
6
6
|
import { type ThemedComponentBaseProps } from "./helpers/ThemedComponentBaseProps";
|
|
7
7
|
export interface FinalFormSaveCancelButtonsLegacyProps extends ThemedComponentBaseProps<{
|
|
8
8
|
root: "div";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FinalFormSaveCancelButtonsLegacy.d.ts","sourceRoot":"","sources":["../src/FinalFormSaveCancelButtonsLegacy.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAO,KAAK,KAAK,EAAiB,MAAM,sBAAsB,CAAC;AACtE,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"FinalFormSaveCancelButtonsLegacy.d.ts","sourceRoot":"","sources":["../src/FinalFormSaveCancelButtonsLegacy.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAO,KAAK,KAAK,EAAiB,MAAM,sBAAsB,CAAC;AACtE,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAEzD,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAGnF,MAAM,WAAW,qCACb,SAAQ,wBAAwB,CAAC;IAC7B,IAAI,EAAE,KAAK,CAAC;IACZ,YAAY,EAAE,OAAO,YAAY,CAAC;IAClC,UAAU,EAAE,OAAO,UAAU,CAAC;CACjC,CAAC;IACF,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB;AAED,MAAM,MAAM,wCAAwC,GAAG,MAAM,GAAG,cAAc,GAAG,YAAY,CAAC;AAyB9F,wBAAgB,gCAAgC,CAAC,OAAO,EAAE,qCAAqC,2CAwB9F;AAED,OAAO,QAAQ,sBAAsB,CAAC;IAClC,UAAU,uBAAuB;QAC7B,0CAA0C,EAAE,wCAAwC,CAAC;KACxF;IAED,UAAU,mBAAmB;QACzB,0CAA0C,EAAE,qCAAqC,CAAC;KACrF;IAED,UAAU,UAAU;QAChB,0CAA0C,CAAC,EAAE;YACzC,YAAY,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,4CAA4C,CAAC,CAAC,CAAC;YAC1F,cAAc,CAAC,EAAE,mBAAmB,CAAC,KAAK,CAAC,CAAC,4CAA4C,CAAC,CAAC;SAC7F,CAAC;KACL;CACJ"}
|
|
@@ -8,7 +8,7 @@ exports.FinalFormSaveCancelButtonsLegacy = FinalFormSaveCancelButtonsLegacy;
|
|
|
8
8
|
var _styles = require("@mui/material/styles");
|
|
9
9
|
var _reactFinalForm = require("react-final-form");
|
|
10
10
|
var _CancelButton = require("./common/buttons/cancel/CancelButton");
|
|
11
|
-
var _SaveButton = require("./common/buttons/
|
|
11
|
+
var _SaveButton = require("./common/buttons/SaveButton");
|
|
12
12
|
var _createComponentSlot = require("./helpers/createComponentSlot");
|
|
13
13
|
var _Api = require("./stack/Api");
|
|
14
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FinalFormSaveSplitButton.d.ts","sourceRoot":"","sources":["../src/FinalFormSaveSplitButton.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAU/C,UAAU,mBAAmB;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;GAEG;AACH,eAAO,MAAM,wBAAwB,qCAAkE,iBAAiB,CAAC,mBAAmB,CAAC,
|
|
1
|
+
{"version":3,"file":"FinalFormSaveSplitButton.d.ts","sourceRoot":"","sources":["../src/FinalFormSaveSplitButton.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAU/C,UAAU,mBAAmB;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;GAEG;AACH,eAAO,MAAM,wBAAwB,qCAAkE,iBAAiB,CAAC,mBAAmB,CAAC,4CAyE5I,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -8,20 +7,21 @@ exports.FinalFormSaveSplitButton = void 0;
|
|
|
8
7
|
var _adminIcons = require("@comet/admin-icons");
|
|
9
8
|
var _reactFinalForm = require("react-final-form");
|
|
10
9
|
var _reactIntl = require("react-intl");
|
|
11
|
-
var _SaveButton = require("./common/buttons/
|
|
10
|
+
var _SaveButton = require("./common/buttons/SaveButton");
|
|
12
11
|
var _SplitButton = require("./common/buttons/split/SplitButton");
|
|
13
12
|
var _FinalForm = require("./FinalForm");
|
|
14
13
|
var _messages = require("./messages");
|
|
15
14
|
var _Api = require("./stack/Api");
|
|
16
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
17
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
18
|
+
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); }
|
|
19
|
+
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
17
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; }
|
|
18
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; }
|
|
19
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; }
|
|
20
23
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
21
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); }
|
|
22
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
23
|
-
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); }
|
|
24
|
-
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
25
25
|
/**
|
|
26
26
|
* @deprecated Use `FinalFormSaveButton` instead as we are retiring the SplitButton pattern.
|
|
27
27
|
*/
|
|
@@ -53,42 +53,46 @@ var FinalFormSaveSplitButton = exports.FinalFormSaveSplitButton = function Final
|
|
|
53
53
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_SplitButton.SplitButton, _objectSpread(_objectSpread({}, splitButtonProps), {}, {
|
|
54
54
|
disabled: pristine || hasValidationErrors || submitting,
|
|
55
55
|
localStorageKey: localStorageKey,
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
var event;
|
|
67
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
68
|
-
while (1) switch (_context.prev = _context.next) {
|
|
69
|
-
case 0:
|
|
70
|
-
event = new _FinalForm.FinalFormSubmitEvent("submit");
|
|
71
|
-
event.navigatingBack = false;
|
|
72
|
-
setSubmitEvent(event);
|
|
73
|
-
_context.next = 5;
|
|
74
|
-
return form.submit();
|
|
75
|
-
case 5:
|
|
76
|
-
setSubmitEvent(undefined);
|
|
77
|
-
case 6:
|
|
78
|
-
case "end":
|
|
79
|
-
return _context.stop();
|
|
56
|
+
slotProps: {
|
|
57
|
+
activeButton: {
|
|
58
|
+
variant: "contained",
|
|
59
|
+
color: hasConflict ? "error" : "primary",
|
|
60
|
+
sx: function sx(_ref2) {
|
|
61
|
+
var palette = _ref2.palette;
|
|
62
|
+
return {
|
|
63
|
+
borderLeft: "1px solid ".concat(palette.primary.dark),
|
|
64
|
+
"&.Mui-disabled": {
|
|
65
|
+
borderLeftColor: palette.grey[200]
|
|
80
66
|
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_SaveButton.SaveButton, {
|
|
72
|
+
loading: submitting,
|
|
73
|
+
hasErrors: hasSubmitErrors || hasConflict,
|
|
74
|
+
tooltipErrorMessage: hasConflict ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, _objectSpread({}, _messages.messages.saveConflict)) : undefined,
|
|
75
|
+
onClick: /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
76
|
+
var event;
|
|
77
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
78
|
+
while (1) switch (_context.prev = _context.next) {
|
|
79
|
+
case 0:
|
|
80
|
+
event = new _FinalForm.FinalFormSubmitEvent("submit");
|
|
81
|
+
event.navigatingBack = false;
|
|
82
|
+
setSubmitEvent(event);
|
|
83
|
+
_context.next = 5;
|
|
84
|
+
return form.submit();
|
|
85
|
+
case 5:
|
|
86
|
+
setSubmitEvent(undefined);
|
|
87
|
+
case 6:
|
|
88
|
+
case "end":
|
|
89
|
+
return _context.stop();
|
|
90
|
+
}
|
|
91
|
+
}, _callee);
|
|
92
|
+
})),
|
|
87
93
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, _objectSpread({}, _messages.messages.save))
|
|
88
94
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_SaveButton.SaveButton, {
|
|
89
|
-
|
|
90
|
-
variant: "contained",
|
|
91
|
-
saving: submitting,
|
|
95
|
+
loading: submitting,
|
|
92
96
|
hasErrors: hasSubmitErrors,
|
|
93
97
|
onClick: /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
94
98
|
var event, submitReturn, successful;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeleteDialog.d.ts","sourceRoot":"","sources":["../../src/common/DeleteDialog.tsx"],"names":[],"mappings":"AAcA,UAAU,iBAAiB;IACvB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,QAAQ,EAAE,MAAM,IAAI,CAAC;CACxB;AAED,eAAO,MAAM,YAAY,UAAW,iBAAiB,
|
|
1
|
+
{"version":3,"file":"DeleteDialog.d.ts","sourceRoot":"","sources":["../../src/common/DeleteDialog.tsx"],"names":[],"mappings":"AAcA,UAAU,iBAAiB;IACvB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,QAAQ,EAAE,MAAM,IAAI,CAAC;CACxB;AAED,eAAO,MAAM,YAAY,UAAW,iBAAiB,4CAyBpD,CAAC"}
|
|
@@ -50,8 +50,7 @@ var DeleteDialog = exports.DeleteDialog = function DeleteDialog(props) {
|
|
|
50
50
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_FeedbackButton.FeedbackButton, {
|
|
51
51
|
startIcon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_adminIcons.Delete, {}),
|
|
52
52
|
onClick: onDelete,
|
|
53
|
-
|
|
54
|
-
variant: "outlined",
|
|
53
|
+
variant: "destructive",
|
|
55
54
|
tooltipErrorMessage: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
56
55
|
id: "comet.common.deleteFailed",
|
|
57
56
|
defaultMessage: "Failed to delete"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldSet.d.ts","sourceRoot":"","sources":["../../src/common/FieldSet.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,KAAK,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,YAAY,MAAM,yBAAyB,CAAC;AACnD,OAAO,mBAAmB,MAAM,gCAAgC,CAAC;AACjE,OAAO,mBAAmB,MAAM,gCAAgC,CAAC;AAEjE,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,SAAS,EAAiC,MAAM,OAAO,CAAC;AAG9F,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAEpF,MAAM,WAAW,aACb,SAAQ,wBAAwB,CAAC;IAC7B,IAAI,EAAE,OAAO,YAAY,CAAC;IAC1B,OAAO,EAAE,OAAO,mBAAmB,CAAC;IACpC,YAAY,EAAE,KAAK,CAAC;IACpB,KAAK,EAAE,KAAK,CAAC;IACb,WAAW,EAAE,KAAK,CAAC;IACnB,WAAW,EAAE,KAAK,CAAC;IACnB,YAAY,EAAE,KAAK,CAAC;IACpB,QAAQ,EAAE,OAAO,mBAAmB,CAAC;CACxC,CAAC;IACF,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,cAAc,CAAC,EAAE,OAAO,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aAAa,GACb,UAAU,GACV,gBAAgB,CAAC;AAQvB,eAAO,MAAM,QAAQ,YAAa,iBAAiB,CAAC,aAAa,CAAC,4CAuDjE,CAAC;AA0HF,OAAO,QAAQ,sBAAsB,CAAC;IAClC,UAAU,mBAAmB;QACzB,kBAAkB,EAAE,aAAa,CAAC;KACrC;IAED,UAAU,uBAAuB;QAC7B,kBAAkB,EAAE,gBAAgB,CAAC;KACxC;IAED,UAAU,UAAU;QAChB,kBAAkB,CAAC,EAAE;YACjB,YAAY,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,oBAAoB,CAAC,CAAC,CAAC;YAClE,cAAc,CAAC,EAAE,mBAAmB,CAAC,KAAK,CAAC,CAAC,oBAAoB,CAAC,CAAC;SACrE,CAAC;KACL;CACJ"}
|
package/lib/common/FieldSet.js
CHANGED
|
@@ -13,7 +13,7 @@ var _styles = require("@mui/material/styles");
|
|
|
13
13
|
var _react = require("react");
|
|
14
14
|
var _createComponentSlot = require("../helpers/createComponentSlot");
|
|
15
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
|
|
16
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
|
|
17
17
|
var _excluded = ["title", "supportText", "endAdornment", "children", "collapsible", "initiallyExpanded", "disablePadding", "slotProps"];
|
|
18
18
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
19
19
|
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
@@ -56,7 +56,8 @@ var FieldSet = exports.FieldSet = function FieldSet(inProps) {
|
|
|
56
56
|
};
|
|
57
57
|
var ownerState = {
|
|
58
58
|
disablePadding: disablePadding,
|
|
59
|
-
hiddenSummary: !title
|
|
59
|
+
hiddenSummary: !title,
|
|
60
|
+
collapsible: collapsible
|
|
60
61
|
};
|
|
61
62
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Root, _objectSpread(_objectSpread(_objectSpread({
|
|
62
63
|
expanded: expanded,
|
|
@@ -66,10 +67,13 @@ var FieldSet = exports.FieldSet = function FieldSet(inProps) {
|
|
|
66
67
|
ownerState: ownerState
|
|
67
68
|
}, slotProps === null || slotProps === void 0 ? void 0 : slotProps.root), restProps), {}, {
|
|
68
69
|
children: [!ownerState.hiddenSummary && /*#__PURE__*/(0, _jsxRuntime.jsxs)(Summary, _objectSpread(_objectSpread({
|
|
69
|
-
expandIcon: collapsible
|
|
70
|
+
expandIcon: collapsible ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_adminIcons.ChevronRight, {}) : undefined,
|
|
71
|
+
disabled: !collapsible
|
|
70
72
|
}, slotProps === null || slotProps === void 0 ? void 0 : slotProps.summary), {}, {
|
|
71
73
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(HeaderColumn, _objectSpread(_objectSpread({}, slotProps === null || slotProps === void 0 ? void 0 : slotProps.headerColumn), {}, {
|
|
72
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Title, _objectSpread(_objectSpread({
|
|
74
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Title, _objectSpread(_objectSpread({
|
|
75
|
+
ownerState: ownerState
|
|
76
|
+
}, slotProps === null || slotProps === void 0 ? void 0 : slotProps.title), {}, {
|
|
73
77
|
children: title
|
|
74
78
|
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(SupportText, _objectSpread(_objectSpread({}, slotProps === null || slotProps === void 0 ? void 0 : slotProps.supportText), {}, {
|
|
75
79
|
children: supportText
|
|
@@ -96,7 +100,7 @@ var Summary = (0, _createComponentSlot.createComponentSlot)(_AccordionSummary["d
|
|
|
96
100
|
slotName: "summary"
|
|
97
101
|
})(function (_ref) {
|
|
98
102
|
var theme = _ref.theme;
|
|
99
|
-
return (0, _styles.css)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row-reverse;\n padding: 0 10px;\n height:
|
|
103
|
+
return (0, _styles.css)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row-reverse;\n padding: 0 10px;\n height: 60px;\n\n ", " {\n padding: 0 20px;\n height: 80px;\n }\n "])), theme.breakpoints.up("sm"));
|
|
100
104
|
});
|
|
101
105
|
var HeaderColumn = (0, _createComponentSlot.createComponentSlot)("div")({
|
|
102
106
|
componentName: "FieldSet",
|
|
@@ -109,24 +113,25 @@ var Title = (0, _createComponentSlot.createComponentSlot)("div")({
|
|
|
109
113
|
componentName: "FieldSet",
|
|
110
114
|
slotName: "title"
|
|
111
115
|
})(function (_ref3) {
|
|
112
|
-
var theme = _ref3.theme
|
|
113
|
-
|
|
116
|
+
var theme = _ref3.theme,
|
|
117
|
+
ownerState = _ref3.ownerState;
|
|
118
|
+
return (0, _styles.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n font-weight: ", ";\n font-size: 16px;\n text-transform: uppercase;\n color: ", ";\n\n ", "\n "])), theme.typography.fontWeightMedium, theme.palette.text.primary, !ownerState.collapsible && (0, _styles.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n // MUIAccordionSummary inherits from ButtonBase. Overriding the styling of a disabled button is necessary to align with the design.\n opacity: 1;\n "]))));
|
|
114
119
|
});
|
|
115
120
|
var SupportText = (0, _createComponentSlot.createComponentSlot)("div")({
|
|
116
121
|
componentName: "FieldSet",
|
|
117
122
|
slotName: "supportText"
|
|
118
123
|
})(function (_ref4) {
|
|
119
124
|
var theme = _ref4.theme;
|
|
120
|
-
return (0, _styles.css)(
|
|
125
|
+
return (0, _styles.css)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n font-size: 12px;\n line-height: 18px;\n color: ", ";\n "])), theme.palette.text.secondary);
|
|
121
126
|
});
|
|
122
127
|
var Placeholder = (0, _createComponentSlot.createComponentSlot)("div")({
|
|
123
128
|
componentName: "FieldSet",
|
|
124
129
|
slotName: "placeholder"
|
|
125
|
-
})((0, _styles.css)(
|
|
130
|
+
})((0, _styles.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n flex-grow: 1;\n box-sizing: inherit;\n user-select: none;\n"]))));
|
|
126
131
|
var EndAdornment = (0, _createComponentSlot.createComponentSlot)("div")({
|
|
127
132
|
componentName: "FieldSet",
|
|
128
133
|
slotName: "endAdornment"
|
|
129
|
-
})((0, _styles.css)(
|
|
134
|
+
})((0, _styles.css)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n"]))));
|
|
130
135
|
var Children = (0, _createComponentSlot.createComponentSlot)(_AccordionDetails["default"])({
|
|
131
136
|
componentName: "FieldSet",
|
|
132
137
|
slotName: "children",
|
|
@@ -136,5 +141,5 @@ var Children = (0, _createComponentSlot.createComponentSlot)(_AccordionDetails["
|
|
|
136
141
|
})(function (_ref5) {
|
|
137
142
|
var theme = _ref5.theme,
|
|
138
143
|
ownerState = _ref5.ownerState;
|
|
139
|
-
return (0, _styles.css)(
|
|
144
|
+
return (0, _styles.css)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n padding: 20px;\n\n ", "\n\n ", " {\n padding: 40px;\n }\n\n ", "\n "])), !ownerState.hiddenSummary && (0, _styles.css)(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n border-top: 1px solid ", ";\n "])), theme.palette.divider), theme.breakpoints.up("sm"), ownerState.disablePadding && (0, _styles.css)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n padding: 0;\n\n ", " {\n padding: 0;\n }\n "])), theme.breakpoints.up("sm")));
|
|
140
145
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/common/buttons/Button.tsx"],"names":[],"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BAAgB,CAAC,EAAE,UAAU,CAAC;CACjC,CAAC;AAEN,UAAU,aAAa,CAAC,CAAC,SAAS,WAAW,GAAG,QAAQ,CAAE,SAAQ,kBAAkB;IAChF,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;IACtB,gBAAgB,EAAE,CAAC,CAAC;CACvB;AAiCD,eAAO,MAAM,MAAM,EAyDb,oBAAoB,CAAC,aAAa,CAAC,CAAC;AA2C1C,OAAO,QAAQ,sBAAsB,CAAC;IAClC,UAAU,uBAAuB;QAC7B,gBAAgB,EAAE,cAAc,CAAC;KACpC;IAED,UAAU,mBAAmB;QACzB,gBAAgB,EAAE,WAAW,CAAC;KACjC;IAED,UAAU,UAAU;QAChB,gBAAgB,CAAC,EAAE;YACf,YAAY,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,kBAAkB,CAAC,CAAC,CAAC;YAChE,cAAc,CAAC,EAAE,mBAAmB,CAAC,KAAK,CAAC,CAAC,kBAAkB,CAAC,CAAC;SACnE,CAAC;KACL;CACJ"}
|
|
@@ -11,7 +11,7 @@ var _Tooltip = require("../../common/Tooltip");
|
|
|
11
11
|
var _createComponentSlot = require("../../helpers/createComponentSlot");
|
|
12
12
|
var _useWindowSize = require("../../helpers/useWindowSize");
|
|
13
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
-
var _templateObject, _templateObject2;
|
|
14
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
15
15
|
var _excluded = ["slotProps", "sx", "variant", "responsive", "mobileIcon", "mobileBreakpoint", "startIcon", "endIcon", "children"];
|
|
16
16
|
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
17
17
|
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; }
|
|
@@ -42,16 +42,10 @@ var variantToMuiProps = {
|
|
|
42
42
|
color: "success"
|
|
43
43
|
},
|
|
44
44
|
textLight: {
|
|
45
|
-
variant: "text"
|
|
46
|
-
sx: {
|
|
47
|
-
color: "white"
|
|
48
|
-
}
|
|
45
|
+
variant: "text"
|
|
49
46
|
},
|
|
50
47
|
textDark: {
|
|
51
|
-
variant: "text"
|
|
52
|
-
sx: {
|
|
53
|
-
color: "black"
|
|
54
|
-
}
|
|
48
|
+
variant: "text"
|
|
55
49
|
}
|
|
56
50
|
};
|
|
57
51
|
var getMobileIconNode = function getMobileIconNode(_ref) {
|
|
@@ -101,7 +95,10 @@ var Button = exports.Button = /*#__PURE__*/(0, _react.forwardRef)(function (inPr
|
|
|
101
95
|
variant: variant,
|
|
102
96
|
usingResponsiveBehavior: Boolean(responsive) && windowSize.width < theme.breakpoints.values[mobileBreakpoint]
|
|
103
97
|
};
|
|
104
|
-
var commonButtonProps = _objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
98
|
+
var commonButtonProps = _objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
99
|
+
disableFocusRipple: true,
|
|
100
|
+
disableTouchRipple: true
|
|
101
|
+
}, variantToMuiProps[variant]), {}, {
|
|
105
102
|
sx: _objectSpread(_objectSpread({}, variantToMuiProps[variant].sx), sx)
|
|
106
103
|
}, restProps), {}, {
|
|
107
104
|
ownerState: ownerState
|
|
@@ -133,8 +130,9 @@ var Root = (0, _createComponentSlot.createComponentSlot)(_material.Button)({
|
|
|
133
130
|
return [ownerState.usingResponsiveBehavior && "usingResponsiveBehavior", ownerState.variant];
|
|
134
131
|
}
|
|
135
132
|
})(function (_ref2) {
|
|
136
|
-
var ownerState = _ref2.ownerState
|
|
137
|
-
|
|
133
|
+
var ownerState = _ref2.ownerState,
|
|
134
|
+
theme = _ref2.theme;
|
|
135
|
+
return (0, _material.css)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n\n ", "\n\n ", "\n "])), ownerState.usingResponsiveBehavior && (0, _material.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n min-width: 0;\n "]))), ownerState.variant === "textLight" && (0, _material.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n color: ", ";\n &:focus {\n color: ", ";\n }\n\n &.Mui-disabled {\n color: ", ";\n }\n "])), theme.palette.common.white, theme.palette.primary.main, theme.palette.grey[200]), ownerState.variant === "textDark" && (0, _material.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n color: ", ";\n &.Mui-disabled {\n background-color: ", ";\n color: ", ";\n }\n "])), theme.palette.common.black, theme.palette.secondary.contrastText, theme.palette.grey[200]));
|
|
138
136
|
});
|
|
139
137
|
var MobileTooltip = (0, _createComponentSlot.createComponentSlot)(_Tooltip.Tooltip)({
|
|
140
138
|
componentName: "Button",
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type ComponentsOverrides } from "@mui/material";
|
|
2
|
+
import { type Theme } from "@mui/material/styles";
|
|
3
|
+
import { type FeedbackButtonClassKey, type FeedbackButtonProps } from "./feedback/FeedbackButton";
|
|
4
|
+
export type SaveButtonClassKey = FeedbackButtonClassKey;
|
|
5
|
+
export type SaveButtonProps = FeedbackButtonProps;
|
|
6
|
+
export declare function SaveButton(inProps: SaveButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare module "@mui/material/styles" {
|
|
8
|
+
interface ComponentNameToClassKey {
|
|
9
|
+
CometAdminSaveButton: SaveButtonClassKey;
|
|
10
|
+
}
|
|
11
|
+
interface ComponentsPropsList {
|
|
12
|
+
CometAdminSaveButton: SaveButtonProps;
|
|
13
|
+
}
|
|
14
|
+
interface Components {
|
|
15
|
+
CometAdminSaveButton?: {
|
|
16
|
+
defaultProps?: Partial<ComponentsPropsList["CometAdminSaveButton"]>;
|
|
17
|
+
styleOverrides?: ComponentsOverrides<Theme>["CometAdminSaveButton"];
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=SaveButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SaveButton.d.ts","sourceRoot":"","sources":["../../../src/common/buttons/SaveButton.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,KAAK,KAAK,EAAiB,MAAM,sBAAsB,CAAC;AAKjE,OAAO,EAAkB,KAAK,sBAAsB,EAAE,KAAK,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAElH,MAAM,MAAM,kBAAkB,GAAG,sBAAsB,CAAC;AACxD,MAAM,MAAM,eAAe,GAAG,mBAAmB,CAAC;AAElD,wBAAgB,UAAU,CAAC,OAAO,EAAE,eAAe,2CAelD;AAOD,OAAO,QAAQ,sBAAsB,CAAC;IAClC,UAAU,uBAAuB;QAC7B,oBAAoB,EAAE,kBAAkB,CAAC;KAC5C;IAED,UAAU,mBAAmB;QACzB,oBAAoB,EAAE,eAAe,CAAC;KACzC;IAED,UAAU,UAAU;QAChB,oBAAoB,CAAC,EAAE;YACnB,YAAY,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,sBAAsB,CAAC,CAAC,CAAC;YACpE,cAAc,CAAC,EAAE,mBAAmB,CAAC,KAAK,CAAC,CAAC,sBAAsB,CAAC,CAAC;SACvE,CAAC;KACL;CACJ"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.SaveButton = SaveButton;
|
|
8
|
+
var _adminIcons = require("@comet/admin-icons");
|
|
9
|
+
var _styles = require("@mui/material/styles");
|
|
10
|
+
var _reactIntl = require("react-intl");
|
|
11
|
+
var _createComponentSlot = require("../../helpers/createComponentSlot");
|
|
12
|
+
var _messages = require("../../messages");
|
|
13
|
+
var _FeedbackButton = require("./feedback/FeedbackButton");
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
+
var _excluded = ["children", "startIcon"];
|
|
16
|
+
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; }
|
|
17
|
+
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; }
|
|
18
|
+
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; }
|
|
19
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
20
|
+
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); }
|
|
21
|
+
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; }
|
|
22
|
+
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; }
|
|
23
|
+
function SaveButton(inProps) {
|
|
24
|
+
var _useThemeProps = (0, _styles.useThemeProps)({
|
|
25
|
+
props: inProps,
|
|
26
|
+
name: "CometAdminSaveButton"
|
|
27
|
+
}),
|
|
28
|
+
_useThemeProps$childr = _useThemeProps.children,
|
|
29
|
+
children = _useThemeProps$childr === void 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, _objectSpread({}, _messages.messages.save)) : _useThemeProps$childr,
|
|
30
|
+
_useThemeProps$startI = _useThemeProps.startIcon,
|
|
31
|
+
startIcon = _useThemeProps$startI === void 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_adminIcons.Save, {}) : _useThemeProps$startI,
|
|
32
|
+
restProps = _objectWithoutProperties(_useThemeProps, _excluded);
|
|
33
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Root, _objectSpread(_objectSpread({}, restProps), {}, {
|
|
34
|
+
startIcon: startIcon,
|
|
35
|
+
children: children
|
|
36
|
+
}));
|
|
37
|
+
}
|
|
38
|
+
var Root = (0, _createComponentSlot.createComponentSlot)(_FeedbackButton.FeedbackButton)({
|
|
39
|
+
componentName: "SaveButton",
|
|
40
|
+
slotName: "root"
|
|
41
|
+
})();
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type ComponentsOverrides } from "@mui/material";
|
|
2
2
|
import { type Theme } from "@mui/material/styles";
|
|
3
3
|
import { type ReactNode } from "react";
|
|
4
4
|
import { type ThemedComponentBaseProps } from "../../../helpers/ThemedComponentBaseProps";
|
|
5
5
|
import { Tooltip as CometTooltip } from "../../Tooltip";
|
|
6
|
+
import { Button, type ButtonClassKey, type ButtonProps } from "../Button";
|
|
6
7
|
export type FeedbackButtonClassKey = "idle" | "loading" | "success" | "error" | "tooltip" | ButtonClassKey;
|
|
7
8
|
export interface FeedbackButtonProps extends ThemedComponentBaseProps<{
|
|
8
9
|
root: typeof Button;
|
|
9
10
|
tooltip: typeof CometTooltip;
|
|
10
|
-
}>, Omit<ButtonProps, "
|
|
11
|
+
}>, Omit<ButtonProps, "slotProps"> {
|
|
11
12
|
onClick?: () => void | Promise<void>;
|
|
12
13
|
hasErrors?: boolean;
|
|
13
14
|
loading?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeedbackButton.d.ts","sourceRoot":"","sources":["../../../../src/common/buttons/feedback/FeedbackButton.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"FeedbackButton.d.ts","sourceRoot":"","sources":["../../../../src/common/buttons/feedback/FeedbackButton.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,KAAK,KAAK,EAAiB,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,KAAK,SAAS,EAAuB,MAAM,OAAO,CAAC;AAI5D,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AAC1F,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,KAAK,cAAc,EAAE,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AAE1E,MAAM,MAAM,sBAAsB,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,cAAc,CAAC;AAsB3G,MAAM,WAAW,mBACb,SAAQ,wBAAwB,CAAC;IACzB,IAAI,EAAE,OAAO,MAAM,CAAC;IACpB,OAAO,EAAE,OAAO,YAAY,CAAC;CAChC,CAAC,EACF,IAAI,CAAC,WAAW,EAAE,WAAW,CAAC;IAClC,OAAO,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,qBAAqB,CAAC,EAAE,SAAS,CAAC;IAClC,mBAAmB,CAAC,EAAE,SAAS,CAAC;CACnC;AAID,wBAAgB,cAAc,CAAC,OAAO,EAAE,mBAAmB,2CAsH1D;AAED,OAAO,QAAQ,sBAAsB,CAAC;IAClC,UAAU,uBAAuB;QAC7B,wBAAwB,EAAE,sBAAsB,CAAC;KACpD;IAED,UAAU,mBAAmB;QACzB,wBAAwB,EAAE,mBAAmB,CAAC;KACjD;IAED,UAAU,UAAU;QAChB,wBAAwB,CAAC,EAAE;YACvB,YAAY,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,0BAA0B,CAAC,CAAC,CAAC;YACxE,cAAc,CAAC,EAAE,mBAAmB,CAAC,KAAK,CAAC,CAAC,0BAA0B,CAAC,CAAC;SAC3E,CAAC;KACL;CACJ"}
|
|
@@ -6,14 +6,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.FeedbackButton = FeedbackButton;
|
|
8
8
|
var _adminIcons = require("@comet/admin-icons");
|
|
9
|
-
var _material = require("@mui/material");
|
|
10
9
|
var _styles = require("@mui/material/styles");
|
|
11
10
|
var _react = require("react");
|
|
12
11
|
var _reactIntl = require("react-intl");
|
|
13
12
|
var _createComponentSlot = require("../../../helpers/createComponentSlot");
|
|
14
13
|
var _Tooltip = require("../../Tooltip");
|
|
14
|
+
var _Button = require("../Button");
|
|
15
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
-
var _excluded = ["onClick", "loading", "hasErrors", "children", "
|
|
16
|
+
var _excluded = ["onClick", "loading", "hasErrors", "children", "classes", "disabled", "startIcon", "endIcon", "tooltipSuccessMessage", "tooltipErrorMessage", "slotProps"];
|
|
17
17
|
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; }
|
|
18
18
|
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; }
|
|
19
19
|
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; }
|
|
@@ -30,7 +30,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
30
30
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
31
31
|
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; }
|
|
32
32
|
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; }
|
|
33
|
-
var Root = (0, _createComponentSlot.createComponentSlot)(
|
|
33
|
+
var Root = (0, _createComponentSlot.createComponentSlot)(_Button.Button)({
|
|
34
34
|
componentName: "FeedbackButton",
|
|
35
35
|
slotName: "root",
|
|
36
36
|
classesResolver: function classesResolver(ownerState) {
|
|
@@ -50,10 +50,6 @@ function FeedbackButton(inProps) {
|
|
|
50
50
|
loading = _useThemeProps.loading,
|
|
51
51
|
hasErrors = _useThemeProps.hasErrors,
|
|
52
52
|
children = _useThemeProps.children,
|
|
53
|
-
_useThemeProps$varian = _useThemeProps.variant,
|
|
54
|
-
variant = _useThemeProps$varian === void 0 ? "contained" : _useThemeProps$varian,
|
|
55
|
-
_useThemeProps$color = _useThemeProps.color,
|
|
56
|
-
color = _useThemeProps$color === void 0 ? "primary" : _useThemeProps$color,
|
|
57
53
|
classes = _useThemeProps.classes,
|
|
58
54
|
disabled = _useThemeProps.disabled,
|
|
59
55
|
startIcon = _useThemeProps.startIcon,
|
|
@@ -161,8 +157,6 @@ function FeedbackButton(inProps) {
|
|
|
161
157
|
onClick: handleOnClick,
|
|
162
158
|
ownerState: ownerState,
|
|
163
159
|
loading: loading !== undefined ? loading : displayState === "loading",
|
|
164
|
-
variant: variant,
|
|
165
|
-
color: color,
|
|
166
160
|
disabled: disabled || (loading !== undefined ? loading : displayState === "loading"),
|
|
167
161
|
loadingPosition: startIcon ? "start" : "end",
|
|
168
162
|
loadingIndicator: /*#__PURE__*/(0, _jsxRuntime.jsx)(_adminIcons.ThreeDotSaving, {}),
|
|
@@ -4,7 +4,7 @@ import { type ReactNode } from "react";
|
|
|
4
4
|
import { Button } from "../common/buttons/Button";
|
|
5
5
|
import { type ThemedComponentBaseProps } from "../helpers/ThemedComponentBaseProps";
|
|
6
6
|
export type DataGridPanelClassKey = "desktopGridPanel" | "desktopPanelFooterDivider" | "desktopPanelFooter" | "desktopAddFilterButton" | "mobileDialog" | "mobileDialogHeader" | "mobileDialogTitle" | "mobileDialogCloseButton" | "mobileDialogContent" | "mobileDialogFooter" | "mobileAddFilterButtonWrapper" | "mobileAddFilterButton" | "mobileDialogFooterActions" | "resetFiltersButton" | "resetColumnsButton" | "applyButton";
|
|
7
|
-
export type DataGridPanelProps =
|
|
7
|
+
export type DataGridPanelProps = GridPanelProps & Omit<ThemedComponentBaseProps<{
|
|
8
8
|
desktopGridPanel: typeof GridPanel;
|
|
9
9
|
desktopPanelFooterDivider: typeof Divider;
|
|
10
10
|
desktopPanelFooter: "div";
|