@gen-epix/ui-client-common 4.0.0 → 4.0.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/dist/@types/{ui.d.ts → ui-client-common.d.ts} +1 -1
- package/dist/_chunks/ApplicationFooter.js +1 -1
- package/dist/_chunks/ApplicationFooter.js.map +1 -1
- package/dist/_chunks/Breadcrumbs.js +1 -1
- package/dist/_chunks/Breadcrumbs.js.map +1 -1
- package/dist/_chunks/CrudPage.js +293 -293
- package/dist/_chunks/CrudPage.js.map +1 -1
- package/dist/_chunks/GeoFilter.js +1 -1
- package/dist/_chunks/GeoFilter.js.map +1 -1
- package/dist/_chunks/Notifications.js.map +1 -1
- package/dist/_chunks/OutageList.js.map +1 -1
- package/dist/_chunks/QueryClientProvider.js +1 -1
- package/dist/_chunks/QueryClientProvider.js.map +1 -1
- package/dist/_chunks/QueryClientService.js +79 -66
- package/dist/_chunks/QueryClientService.js.map +1 -1
- package/dist/_chunks/Table.js +953 -945
- package/dist/_chunks/Table.js.map +1 -1
- package/dist/_chunks/TableUtil.js.map +1 -1
- package/dist/_chunks/TextFilter.js +4 -4
- package/dist/_chunks/TextFilter.js.map +1 -1
- package/dist/_chunks/UserInvitationsAdminPage.js +110 -110
- package/dist/_chunks/UserInvitationsAdminPage.js.map +1 -1
- package/dist/_chunks/_baseFlatten.js +1 -1
- package/dist/_chunks/_baseGet.js +26 -26
- package/dist/_chunks/_baseGet.js.map +1 -1
- package/dist/_chunks/_baseIteratee.js +25 -26
- package/dist/_chunks/_baseIteratee.js.map +1 -1
- package/dist/_chunks/_setToString.js.map +1 -1
- package/dist/_chunks/{chunk-KS7C4IRE.js → chunk-BV7QT456.js} +1041 -1128
- package/dist/_chunks/chunk-BV7QT456.js.map +1 -0
- package/dist/_chunks/format.js +199 -198
- package/dist/_chunks/format.js.map +1 -1
- package/dist/_chunks/index.esm.js +797 -692
- package/dist/_chunks/index.esm.js.map +1 -1
- package/dist/_chunks/isArrayLike.js +1 -2
- package/dist/_chunks/isArrayLike.js.map +1 -1
- package/dist/_chunks/isObject.js +38 -2
- package/dist/_chunks/isObject.js.map +1 -1
- package/dist/_chunks/isSymbol.js +2 -2
- package/dist/_chunks/middleware.js +11 -9
- package/dist/_chunks/middleware.js.map +1 -1
- package/dist/_chunks/oidc-client-ts.js +12 -9
- package/dist/_chunks/oidc-client-ts.js.map +1 -1
- package/dist/_chunks/omit.js +38 -39
- package/dist/_chunks/omit.js.map +1 -1
- package/dist/_chunks/query.js +210 -228
- package/dist/_chunks/query.js.map +1 -1
- package/dist/_chunks/react-oidc-context.js +1 -1
- package/dist/_chunks/react-oidc-context.js.map +1 -1
- package/dist/_chunks/react.js +1 -1
- package/dist/_chunks/react.js.map +1 -1
- package/dist/_chunks/rolldown-runtime.js +2 -2
- package/dist/_chunks/tableStore.js +79 -78
- package/dist/_chunks/tableStore.js.map +1 -1
- package/dist/_chunks/toDate.js +1 -1
- package/dist/_chunks/toDate.js.map +1 -1
- package/dist/_chunks/uniq.js +1 -1
- package/dist/_chunks/uniq.js.map +1 -1
- package/dist/_chunks/useColumnsMenu.js +7 -6
- package/dist/_chunks/useColumnsMenu.js.map +1 -1
- package/dist/_chunks/useMutation.js +19 -16
- package/dist/_chunks/useMutation.js.map +1 -1
- package/dist/_chunks/useQueryMemo.js +156 -169
- package/dist/_chunks/useQueryMemo.js.map +1 -1
- package/dist/_chunks/vanilla.js +1 -1
- package/dist/_chunks/vanilla.js.map +1 -1
- package/dist/_chunks/yup.js +5 -5
- package/dist/_chunks/yup.js.map +1 -1
- package/dist/classes/filters/GeoFilter.d.ts +1 -1
- package/dist/classes/filters/MultiSelectFilter.d.ts +1 -1
- package/dist/classes/services/AuthenticationService/index.js +41 -44
- package/dist/classes/services/AuthenticationService/index.js.map +1 -1
- package/dist/classes/services/BreadcrumbService/index.js.map +1 -1
- package/dist/classes/services/InactivityService/index.js +10 -11
- package/dist/classes/services/InactivityService/index.js.map +1 -1
- package/dist/classes/services/RouterService/index.js +1 -1
- package/dist/components/app/App/index.js +48 -38
- package/dist/components/app/App/index.js.map +1 -1
- package/dist/components/app/ApplicationBootstrap/index.js +54 -54
- package/dist/components/app/ApplicationBootstrap/index.js.map +1 -1
- package/dist/components/app/AuthenticationWrapper/index.js +45 -45
- package/dist/components/app/AuthenticationWrapper/index.js.map +1 -1
- package/dist/components/app/AuthorizationWrapper/index.js +7 -7
- package/dist/components/app/AuthorizationWrapper/index.js.map +1 -1
- package/dist/components/app/RouterRoot/index.js +53 -53
- package/dist/components/app/RouterRoot/index.js.map +1 -1
- package/dist/components/epi/EpiContactDetailsDialog/EpiContactDetailsDialog.d.ts +2 -2
- package/dist/components/epi/EpiContactDetailsDialog/index.js +28 -26
- package/dist/components/epi/EpiContactDetailsDialog/index.js.map +1 -1
- package/dist/components/filters/BooleanFilterField/index.js +1 -1
- package/dist/components/filters/BooleanFilterField/index.js.map +1 -1
- package/dist/components/filters/DateFilterField/index.js +1 -1
- package/dist/components/filters/DateFilterField/index.js.map +1 -1
- package/dist/components/filters/GeoFilterField/index.js +2 -2
- package/dist/components/filters/GeoFilterField/index.js.map +1 -1
- package/dist/components/filters/MultiSelectFilterField/index.js +2 -2
- package/dist/components/filters/MultiSelectFilterField/index.js.map +1 -1
- package/dist/components/filters/NumberRangeFilterField/index.js +1 -1
- package/dist/components/filters/NumberRangeFilterField/index.js.map +1 -1
- package/dist/components/filters/TextFilterField/index.js +1 -1
- package/dist/components/filters/TextFilterField/index.js.map +1 -1
- package/dist/components/ui/ApplicationBar/index.js +132 -132
- package/dist/components/ui/ApplicationBar/index.js.map +1 -1
- package/dist/components/ui/ConsentDialog/ConsentDialog.d.ts +2 -2
- package/dist/components/ui/ConsentDialog/index.js +11 -11
- package/dist/components/ui/ConsentDialog/index.js.map +1 -1
- package/dist/components/ui/GenericErrorMessage/index.js +1 -1
- package/dist/components/ui/GenericErrorMessage/index.js.map +1 -1
- package/dist/components/ui/LicensesDialog/LicensesDialog.d.ts +2 -2
- package/dist/components/ui/LicensesDialog/index.js +40 -40
- package/dist/components/ui/LicensesDialog/index.js.map +1 -1
- package/dist/components/ui/MyPermissionsDialog/MyPermissionsDialog.d.ts +2 -2
- package/dist/components/ui/MyPermissionsDialog/index.js +21 -21
- package/dist/components/ui/MyPermissionsDialog/index.js.map +1 -1
- package/dist/components/ui/NavLink/index.js +1 -1
- package/dist/components/ui/NavLink/index.js.map +1 -1
- package/dist/components/ui/OrganizationSwitcherDialog/OrganizationSwitcherDialog.d.ts +2 -2
- package/dist/components/ui/OrganizationSwitcherDialog/index.js +43 -43
- package/dist/components/ui/OrganizationSwitcherDialog/index.js.map +1 -1
- package/dist/components/ui/OutagesDialog/OutagesDialog.d.ts +2 -2
- package/dist/components/ui/OutagesDialog/index.js +14 -14
- package/dist/components/ui/OutagesDialog/index.js.map +1 -1
- package/dist/components/ui/PageContainer/index.js +2 -2
- package/dist/components/ui/PageContainer/index.js.map +1 -1
- package/dist/components/ui/ResponseHandler/index.js +8 -8
- package/dist/components/ui/ResponseHandler/index.js.map +1 -1
- package/dist/components/ui/Sidebar/index.js.map +1 -1
- package/dist/components/ui/Table/TableColumnsEditorDialog.d.ts +2 -2
- package/dist/components/ui/UserFeedbackDialog/UserFeedbackDialog.d.ts +2 -2
- package/dist/components/ui/UserFeedbackDialog/index.js +38 -38
- package/dist/components/ui/UserFeedbackDialog/index.js.map +1 -1
- package/dist/components/ui/UserInactivityConfirmation/index.js +14 -14
- package/dist/components/ui/UserInactivityConfirmation/index.js.map +1 -1
- package/dist/context/uiClientCommonConfigContext/UiClientCommonConfigContext.d.ts +5 -0
- package/dist/context/uiClientCommonConfigContext/UiClientCommonConfigContextProvider.d.ts +6 -0
- package/dist/context/uiClientCommonConfigContext/index.d.ts +3 -0
- package/dist/context/uiClientCommonConfigContext/index.js +18 -0
- package/dist/context/uiClientCommonConfigContext/index.js.map +1 -0
- package/dist/context/uiClientCommonConfigContext/useUiClientCommonConfigContext.d.ts +2 -0
- package/dist/dataHooks/useIdentifierIssuerOwnOrganizationQuery/index.js +4 -4
- package/dist/dataHooks/useIdentifierIssuerQuery/index.js +4 -4
- package/dist/dataHooks/useInviteUserConstraintsQuery/index.js +4 -4
- package/dist/dataHooks/useOrganizationAdminPoliciesQuery/index.js +4 -4
- package/dist/dataHooks/useOrganizationIdentifierIssuerLinksQuery/index.js +4 -4
- package/dist/dataHooks/useOrganizationsQuery/index.js +4 -4
- package/dist/dataHooks/useUsersQuery/index.js +4 -4
- package/dist/hooks/useColumnsMenu/useColumnsMenu.d.ts +1 -1
- package/dist/hooks/useEditMutation/index.js +6 -6
- package/dist/hooks/useEditMutation/index.js.map +1 -1
- package/dist/hooks/useItemQuery/index.js +8 -8
- package/dist/hooks/useItemQuery/index.js.map +1 -1
- package/dist/locale/en.json +0 -10
- package/dist/locale/nl.json +0 -10
- package/dist/models/dataHooks.d.ts +1 -1
- package/dist/models/table.d.ts +1 -1
- package/dist/models/table.js.map +1 -1
- package/dist/pages/AcceptInvitationPage/index.js +5 -5
- package/dist/pages/AcceptInvitationPage/index.js.map +1 -1
- package/dist/pages/AdminPage/index.js +1 -1
- package/dist/pages/AdminPage/index.js.map +1 -1
- package/dist/pages/ChooseIdentityProviderPage/index.js.map +1 -1
- package/dist/pages/CrudPage/CrudPage.d.ts +2 -2
- package/dist/pages/CrudPage/CrudPageDeleteDialog.d.ts +2 -2
- package/dist/pages/CrudPage/CrudPageEditDialog.d.ts +4 -4
- package/dist/pages/ErrorPage/index.js.map +1 -1
- package/dist/pages/IdentifierIssuersAdminPage/index.js +2 -2
- package/dist/pages/IdentifierIssuersAdminPage/index.js.map +1 -1
- package/dist/pages/OrganizationAdminPoliciesAdminPage/index.js +1 -1
- package/dist/pages/OrganizationAdminPoliciesAdminPage/index.js.map +1 -1
- package/dist/pages/OrganizationContactsAdminPage/index.js +3 -3
- package/dist/pages/OrganizationContactsAdminPage/index.js.map +1 -1
- package/dist/pages/OrganizationSitesAdminPage/index.js +3 -3
- package/dist/pages/OrganizationSitesAdminPage/index.js.map +1 -1
- package/dist/pages/OrganizationsAdminPage/index.js +2 -2
- package/dist/pages/OrganizationsAdminPage/index.js.map +1 -1
- package/dist/pages/OutagesAdminPage/index.js +2 -2
- package/dist/pages/OutagesAdminPage/index.js.map +1 -1
- package/dist/pages/PostLoginPage/index.js.map +1 -1
- package/dist/pages/PostLogoutPage/index.js.map +1 -1
- package/dist/pages/RouterErrorPage/index.js +1 -1
- package/dist/pages/RouterErrorPage/index.js.map +1 -1
- package/dist/pages/UserInvitationsAdminPage/UserInvitationConsumeDialog.d.ts +2 -2
- package/dist/pages/UserInvitationsAdminPage/UserInvitationShareDialog.d.ts +2 -2
- package/dist/pages/UsersAdminPage/index.js +47 -47
- package/dist/pages/UsersAdminPage/index.js.map +1 -1
- package/dist/setup/setup.js +1 -1
- package/dist/setup/setup.js.map +1 -1
- package/dist/utils/MenuDataUtil/MenuDataUtil.d.ts +1 -1
- package/dist/utils/MenuDataUtil/index.js.map +1 -1
- package/dist/utils/StandardConfigUtil/index.js +4 -4
- package/dist/utils/StandardConfigUtil/index.js.map +1 -1
- package/dist/utils/TableUtil/TableUtil.d.ts +1 -1
- package/package.json +7 -7
- package/dist/_chunks/chunk-KS7C4IRE.js.map +0 -1
- package/dist/_chunks/isObjectLike.js +0 -43
- package/dist/_chunks/isObjectLike.js.map +0 -1
- package/dist/components/ui/BackdropSpinner/BackdropSpinner.d.ts +0 -5
- package/dist/components/ui/BackdropSpinner/index.d.ts +0 -1
- package/dist/components/ui/BackdropSpinner/index.js +0 -19
- package/dist/components/ui/BackdropSpinner/index.js.map +0 -1
- package/dist/components/ui/Confirmation/Confirmation.d.ts +0 -2
- package/dist/components/ui/Confirmation/ConfirmationRender.d.ts +0 -11
- package/dist/components/ui/Confirmation/index.d.ts +0 -2
- package/dist/components/ui/Confirmation/index.js +0 -58
- package/dist/components/ui/Confirmation/index.js.map +0 -1
- package/dist/components/ui/CopyToClipboardButton/CopyToClipboardButton.d.ts +0 -13
- package/dist/components/ui/CopyToClipboardButton/index.d.ts +0 -1
- package/dist/components/ui/CopyToClipboardButton/index.js +0 -101
- package/dist/components/ui/CopyToClipboardButton/index.js.map +0 -1
- package/dist/components/ui/Dialog/Dialog.d.ts +0 -27
- package/dist/components/ui/Dialog/index.d.ts +0 -1
- package/dist/components/ui/Dialog/index.js +0 -83
- package/dist/components/ui/Dialog/index.js.map +0 -1
- package/dist/components/ui/LinearProgressWithLabel/LinearProgressWithLabel.d.ts +0 -5
- package/dist/components/ui/LinearProgressWithLabel/index.d.ts +0 -1
- package/dist/components/ui/LinearProgressWithLabel/index.js +0 -31
- package/dist/components/ui/LinearProgressWithLabel/index.js.map +0 -1
- package/dist/components/ui/LoadingIndicator/LoadingIndicator.d.ts +0 -2
- package/dist/components/ui/LoadingIndicator/index.d.ts +0 -1
- package/dist/components/ui/LoadingIndicator/index.js +0 -12
- package/dist/components/ui/LoadingIndicator/index.js.map +0 -1
- package/dist/components/ui/NestedMenu/IconMenuItem.d.ts +0 -18
- package/dist/components/ui/NestedMenu/NestedDropdown.d.ts +0 -17
- package/dist/components/ui/NestedMenu/NestedMenuItem.d.ts +0 -22
- package/dist/components/ui/NestedMenu/index.d.ts +0 -4
- package/dist/components/ui/NestedMenu/index.js +0 -240
- package/dist/components/ui/NestedMenu/index.js.map +0 -1
- package/dist/components/ui/NestedMenu/nestedMenuItemsFromObject.d.ts +0 -11
- package/dist/components/ui/Spinner/Spinner.d.ts +0 -11
- package/dist/components/ui/Spinner/index.d.ts +0 -1
- package/dist/components/ui/Spinner/index.js +0 -63
- package/dist/components/ui/Spinner/index.js.map +0 -1
- package/dist/components/ui/Stepper/Stepper.d.ts +0 -17
- package/dist/components/ui/Stepper/index.d.ts +0 -2
- package/dist/components/ui/Stepper/index.js +0 -126
- package/dist/components/ui/Stepper/index.js.map +0 -1
- package/dist/components/ui/Stepper/stepperModel.d.ts +0 -4
- package/dist/hoc/withDialog/index.d.ts +0 -1
- package/dist/hoc/withDialog/index.js +0 -69
- package/dist/hoc/withDialog/index.js.map +0 -1
- package/dist/hoc/withDialog/withDialog.d.ts +0 -33
- package/dist/models/nestedMenu.d.ts +0 -17
- package/dist/models/nestedMenu.js +0 -0
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./rolldown-runtime.js";
|
|
2
|
-
//#region ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_freeGlobal.js
|
|
3
|
-
var t = /* @__PURE__ */ e(((e, t) => {
|
|
4
|
-
t.exports = typeof global == "object" && global && global.Object === Object && global;
|
|
5
|
-
})), n = /* @__PURE__ */ e(((e, n) => {
|
|
6
|
-
var r = t(), i = typeof self == "object" && self && self.Object === Object && self;
|
|
7
|
-
n.exports = r || i || Function("return this")();
|
|
8
|
-
})), r = /* @__PURE__ */ e(((e, t) => {
|
|
9
|
-
t.exports = n().Symbol;
|
|
10
|
-
})), i = /* @__PURE__ */ e(((e, t) => {
|
|
11
|
-
var n = r(), i = Object.prototype, a = i.hasOwnProperty, o = i.toString, s = n ? n.toStringTag : void 0;
|
|
12
|
-
function c(e) {
|
|
13
|
-
var t = a.call(e, s), n = e[s];
|
|
14
|
-
try {
|
|
15
|
-
e[s] = void 0;
|
|
16
|
-
var r = !0;
|
|
17
|
-
} catch {}
|
|
18
|
-
var i = o.call(e);
|
|
19
|
-
return r && (t ? e[s] = n : delete e[s]), i;
|
|
20
|
-
}
|
|
21
|
-
t.exports = c;
|
|
22
|
-
})), a = /* @__PURE__ */ e(((e, t) => {
|
|
23
|
-
var n = Object.prototype.toString;
|
|
24
|
-
function r(e) {
|
|
25
|
-
return n.call(e);
|
|
26
|
-
}
|
|
27
|
-
t.exports = r;
|
|
28
|
-
})), o = /* @__PURE__ */ e(((e, t) => {
|
|
29
|
-
var n = r(), o = i(), s = a(), c = "[object Null]", l = "[object Undefined]", u = n ? n.toStringTag : void 0;
|
|
30
|
-
function d(e) {
|
|
31
|
-
return e == null ? e === void 0 ? l : c : u && u in Object(e) ? o(e) : s(e);
|
|
32
|
-
}
|
|
33
|
-
t.exports = d;
|
|
34
|
-
})), s = /* @__PURE__ */ e(((e, t) => {
|
|
35
|
-
function n(e) {
|
|
36
|
-
return typeof e == "object" && !!e;
|
|
37
|
-
}
|
|
38
|
-
t.exports = n;
|
|
39
|
-
}));
|
|
40
|
-
//#endregion
|
|
41
|
-
export { t as a, n as i, o as n, r, s as t };
|
|
42
|
-
|
|
43
|
-
//# sourceMappingURL=isObjectLike.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isObjectLike.js","names":[],"sources":["../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_freeGlobal.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_root.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_Symbol.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_getRawTag.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_objectToString.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseGetTag.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isObjectLike.js"],"sourcesContent":["/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n"],"x_google_ignoreList":[0,1,2,3,4,5,6],"mappings":";;;CAGA,EAAO,UAFU,OAAO,UAAU,YAAY,UAAU,OAAO,WAAW,UAAU;;CCDpF,IAAI,IAAA,EAAA,GAGA,IAAW,OAAO,QAAQ,YAAY,QAAQ,KAAK,WAAW,UAAU;CAK5E,EAAO,UAFI,KAAc,KAAY,SAAS,aAAa,CAAC,CAAC;;CCD7D,EAAO,UAFH,EAAA,CAAA,CAAc;;CCHlB,IAAI,IAAA,EAAA,GAGA,IAAc,OAAO,WAGrB,IAAiB,EAAY,gBAO7B,IAAuB,EAAY,UAGnC,IAAiB,IAAS,EAAO,cAAc,KAAA;CASnD,SAAS,EAAU,GAAO;EACxB,IAAI,IAAQ,EAAe,KAAK,GAAO,CAAc,GACjD,IAAM,EAAM;EAEhB,IAAI;GACF,EAAM,KAAkB,KAAA;GACxB,IAAI,IAAW;EACjB,QAAY,CAAC;EAEb,IAAI,IAAS,EAAqB,KAAK,CAAK;EAQ5C,OAPI,MACE,IACF,EAAM,KAAkB,IAExB,OAAO,EAAM,KAGV;CACT;CAEA,EAAO,UAAU;;CCrCjB,IAAI,IAPc,OAAO,UAOc;CASvC,SAAS,EAAe,GAAO;EAC7B,OAAO,EAAqB,KAAK,CAAK;CACxC;CAEA,EAAO,UAAU;;CCrBjB,IAAI,IAAA,EAAA,GACA,IAAA,EAAA,GACA,IAAA,EAAA,GAGA,IAAU,iBACV,IAAe,sBAGf,IAAiB,IAAS,EAAO,cAAc,KAAA;CASnD,SAAS,EAAW,GAAO;EAIzB,OAHI,KAAS,OACJ,MAAU,KAAA,IAAY,IAAe,IAEtC,KAAkB,KAAkB,OAAO,CAAK,IACpD,EAAU,CAAK,IACf,EAAe,CAAK;CAC1B;CAEA,EAAO,UAAU;;CCHjB,SAAS,EAAa,GAAO;EAC3B,OAAwB,OAAO,KAAS,cAAjC;CACT;CAEA,EAAO,UAAU"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './BackdropSpinner';
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Spinner as e } from "../Spinner/index.js";
|
|
2
|
-
import { Backdrop as t, useTheme as n } from "@mui/material";
|
|
3
|
-
import { jsx as r } from "react/jsx-runtime";
|
|
4
|
-
//#region src/components/ui/BackdropSpinner/BackdropSpinner.tsx
|
|
5
|
-
var i = ({ open: i, ...a }) => {
|
|
6
|
-
let o = n();
|
|
7
|
-
return /* @__PURE__ */ r(t, {
|
|
8
|
-
open: i,
|
|
9
|
-
sx: {
|
|
10
|
-
backgroundColor: o.palette.mode === "light" ? "rgba(255, 255, 255, 0.7)" : "rgba(0, 0, 0, 0.5)",
|
|
11
|
-
zIndex: o.zIndex.drawer + 1
|
|
12
|
-
},
|
|
13
|
-
children: i && /* @__PURE__ */ r(e, { ...a })
|
|
14
|
-
});
|
|
15
|
-
};
|
|
16
|
-
//#endregion
|
|
17
|
-
export { i as BackdropSpinner };
|
|
18
|
-
|
|
19
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/ui/BackdropSpinner/BackdropSpinner.tsx"],"sourcesContent":["import {\n Backdrop,\n useTheme,\n} from '@mui/material';\n\nimport type { SpinnerProps } from '../Spinner';\nimport { Spinner } from '../Spinner';\n\nexport type BackdropSpinnerProps = {\n readonly open: boolean;\n} & Omit<SpinnerProps, 'inline'>;\n\nexport const BackdropSpinner = ({ open, ...spinnerProps }: BackdropSpinnerProps) => {\n const theme = useTheme();\n return (\n <Backdrop\n open={open}\n sx={{\n backgroundColor: theme.palette.mode === 'light' ? 'rgba(255, 255, 255, 0.7)' : 'rgba(0, 0, 0, 0.5)',\n zIndex: theme.zIndex.drawer + 1,\n }}\n >\n {open && (\n <Spinner\n {...spinnerProps}\n />\n )}\n </Backdrop>\n );\n};\n"],"mappings":";;;;AAYA,IAAa,KAAmB,EAAE,SAAM,GAAG,QAAyC;CAClF,IAAM,IAAQ,EAAS;CACvB,OACE,kBAAC,GAAD;EACQ;EACN,IAAI;GACF,iBAAiB,EAAM,QAAQ,SAAS,UAAU,6BAA6B;GAC/E,QAAQ,EAAM,OAAO,SAAS;EAChC;YAEC,KACC,kBAAC,GAAD,EACE,GAAI,EACL,CAAA;CAEK,CAAA;AAEd"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ReactElement } from 'react';
|
|
2
|
-
import { WithDialogRefMethods, WithDialogRenderProps } from '../../../hoc/withDialog';
|
|
3
|
-
export interface ConfirmationProps<TOpenProps = never> extends WithDialogRenderProps<TOpenProps> {
|
|
4
|
-
readonly body?: string;
|
|
5
|
-
readonly cancelLabel?: string;
|
|
6
|
-
readonly confirmLabel: string;
|
|
7
|
-
readonly onCancel?: (openProps: TOpenProps) => void;
|
|
8
|
-
readonly onConfirm: (openProps: TOpenProps) => void;
|
|
9
|
-
}
|
|
10
|
-
export type ConfirmationRefMethods<TOpenProps = never> = WithDialogRefMethods<ConfirmationProps, TOpenProps>;
|
|
11
|
-
export declare const ConfirmationRender: <TOpenProps>({ body, cancelLabel, confirmLabel, onActionsChange, onCancel, onClose, onConfirm, openProps, }: ConfirmationProps<TOpenProps>) => ReactElement;
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { withDialog as e } from "../../../hoc/withDialog/index.js";
|
|
2
|
-
import { DialogContentText as t } from "@mui/material";
|
|
3
|
-
import { useCallback as n, useEffect as r } from "react";
|
|
4
|
-
import { jsx as i } from "react/jsx-runtime";
|
|
5
|
-
import { useTranslation as a } from "react-i18next";
|
|
6
|
-
import { TestIdUtil as o } from "@gen-epix/ui-core/utils/TestIdUtil";
|
|
7
|
-
//#region src/components/ui/Confirmation/ConfirmationRender.tsx
|
|
8
|
-
var s = ({ body: e, cancelLabel: s, confirmLabel: c, onActionsChange: l, onCancel: u, onClose: d, onConfirm: f, openProps: p }) => {
|
|
9
|
-
let { t: m } = a(), h = n(() => {
|
|
10
|
-
u && u(p), d();
|
|
11
|
-
}, [
|
|
12
|
-
u,
|
|
13
|
-
d,
|
|
14
|
-
p
|
|
15
|
-
]), g = n(() => {
|
|
16
|
-
f(p), d();
|
|
17
|
-
}, [
|
|
18
|
-
f,
|
|
19
|
-
p,
|
|
20
|
-
d
|
|
21
|
-
]);
|
|
22
|
-
return r(() => {
|
|
23
|
-
let e = [];
|
|
24
|
-
s && e.push({
|
|
25
|
-
...o.createAttributes("Confirmation-cancelButton"),
|
|
26
|
-
color: "primary",
|
|
27
|
-
label: s ?? m`Cancel`,
|
|
28
|
-
onClick: h,
|
|
29
|
-
variant: "outlined"
|
|
30
|
-
}), e.push({
|
|
31
|
-
...o.createAttributes("Confirmation-confirmButton"),
|
|
32
|
-
autoFocus: !0,
|
|
33
|
-
color: "secondary",
|
|
34
|
-
label: c ?? m`OK`,
|
|
35
|
-
onClick: g,
|
|
36
|
-
variant: "contained"
|
|
37
|
-
}), l(e);
|
|
38
|
-
}, [
|
|
39
|
-
s,
|
|
40
|
-
h,
|
|
41
|
-
c,
|
|
42
|
-
g,
|
|
43
|
-
l,
|
|
44
|
-
u,
|
|
45
|
-
m
|
|
46
|
-
]), e ? /* @__PURE__ */ i(t, {
|
|
47
|
-
...o.createAttributes("Confirmation-textContent"),
|
|
48
|
-
children: e
|
|
49
|
-
}) : null;
|
|
50
|
-
}, c = e(s, {
|
|
51
|
-
fullWidth: !0,
|
|
52
|
-
maxWidth: "sm",
|
|
53
|
-
testId: "Confirmation"
|
|
54
|
-
});
|
|
55
|
-
//#endregion
|
|
56
|
-
export { c as Confirmation, s as ConfirmationRender };
|
|
57
|
-
|
|
58
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/ui/Confirmation/ConfirmationRender.tsx","../../../../src/components/ui/Confirmation/Confirmation.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport {\n useCallback,\n useEffect,\n} from 'react';\nimport { DialogContentText } from '@mui/material';\nimport { useTranslation } from 'react-i18next';\nimport { TestIdUtil } from '@gen-epix/ui-core/utils/TestIdUtil';\n\nimport type { DialogAction } from '../Dialog/Dialog';\nimport type {\n WithDialogRefMethods,\n WithDialogRenderProps,\n} from '../../../hoc/withDialog';\n\nexport interface ConfirmationProps<TOpenProps = never> extends WithDialogRenderProps<TOpenProps> {\n readonly body?: string;\n readonly cancelLabel?: string;\n readonly confirmLabel: string;\n readonly onCancel?: (openProps: TOpenProps) => void;\n readonly onConfirm: (openProps: TOpenProps) => void;\n}\n\nexport type ConfirmationRefMethods<TOpenProps = never> = WithDialogRefMethods<ConfirmationProps, TOpenProps>;\n\nexport const ConfirmationRender = <TOpenProps,>(\n {\n body,\n cancelLabel,\n confirmLabel,\n onActionsChange,\n onCancel,\n onClose,\n onConfirm,\n openProps,\n }: ConfirmationProps<TOpenProps>,\n): ReactElement => {\n const { t } = useTranslation();\n const onCancelButtonClick = useCallback((): void => {\n if (onCancel) {\n onCancel(openProps);\n }\n onClose();\n }, [onCancel, onClose, openProps]);\n\n const onConfirmButtonClick = useCallback((): void => {\n onConfirm(openProps);\n onClose();\n }, [onConfirm, openProps, onClose]);\n\n useEffect(() => {\n const actions: DialogAction[] = [];\n if (cancelLabel) {\n actions.push({\n ...TestIdUtil.createAttributes('Confirmation-cancelButton'),\n color: 'primary',\n label: cancelLabel ?? t`Cancel`,\n onClick: onCancelButtonClick,\n variant: 'outlined',\n });\n }\n actions.push({\n ...TestIdUtil.createAttributes('Confirmation-confirmButton'),\n autoFocus: true,\n color: 'secondary',\n label: confirmLabel ?? t`OK`,\n onClick: onConfirmButtonClick,\n variant: 'contained',\n });\n onActionsChange(actions);\n }, [cancelLabel, onCancelButtonClick, confirmLabel, onConfirmButtonClick, onActionsChange, onCancel, t]);\n\n if (!body) {\n return null;\n }\n return (\n <DialogContentText {...TestIdUtil.createAttributes('Confirmation-textContent')}>\n {body}\n </DialogContentText>\n );\n};\n","import { withDialog } from '../../../hoc/withDialog';\n\nimport type { ConfirmationProps } from './ConfirmationRender';\nimport { ConfirmationRender } from './ConfirmationRender';\n\nexport const Confirmation = withDialog<ConfirmationProps, unknown>(ConfirmationRender, {\n fullWidth: true,\n maxWidth: 'sm',\n testId: 'Confirmation',\n});\n"],"mappings":";;;;;;;AAyBA,IAAa,KACX,EACE,SACA,gBACA,iBACA,oBACA,aACA,YACA,cACA,mBAEe;CACjB,IAAM,EAAE,SAAM,EAAe,GACvB,IAAsB,QAAwB;EAIlD,AAHI,KACF,EAAS,CAAS,GAEpB,EAAQ;CACV,GAAG;EAAC;EAAU;EAAS;CAAS,CAAC,GAE3B,IAAuB,QAAwB;EAEnD,AADA,EAAU,CAAS,GACnB,EAAQ;CACV,GAAG;EAAC;EAAW;EAAW;CAAO,CAAC;CA2BlC,OAzBA,QAAgB;EACd,IAAM,IAA0B,CAAC;EAkBjC,AAjBI,KACF,EAAQ,KAAK;GACX,GAAG,EAAW,iBAAiB,2BAA2B;GAC1D,OAAO;GACP,OAAO,KAAe,CAAC;GACvB,SAAS;GACT,SAAS;EACX,CAAC,GAEH,EAAQ,KAAK;GACX,GAAG,EAAW,iBAAiB,4BAA4B;GAC3D,WAAW;GACX,OAAO;GACP,OAAO,KAAgB,CAAC;GACxB,SAAS;GACT,SAAS;EACX,CAAC,GACD,EAAgB,CAAO;CACzB,GAAG;EAAC;EAAa;EAAqB;EAAc;EAAsB;EAAiB;EAAU;CAAC,CAAC,GAElG,IAIH,kBAAC,GAAD;EAAmB,GAAI,EAAW,iBAAiB,0BAA0B;YAC1E;CACgB,CAAA,IALZ;AAOX,GC3Ea,IAAe,EAAuC,GAAoB;CACrF,WAAW;CACX,UAAU;CACV,QAAQ;AACV,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ButtonOwnProps } from '@mui/material';
|
|
2
|
-
import { ReactElement } from 'react';
|
|
3
|
-
export type CopyToClipboardButtonProps = {
|
|
4
|
-
readonly baseIcon?: ReactElement;
|
|
5
|
-
readonly buttonProps?: ButtonOwnProps;
|
|
6
|
-
readonly buttonText?: string;
|
|
7
|
-
readonly buttonVariant?: ButtonOwnProps['variant'];
|
|
8
|
-
readonly clipboardValue?: string;
|
|
9
|
-
readonly iconOnly?: boolean;
|
|
10
|
-
readonly onGetClipboardValue?: () => string;
|
|
11
|
-
readonly tooltipSuccessText?: string;
|
|
12
|
-
};
|
|
13
|
-
export declare const CopyToClipboardButton: ({ baseIcon, buttonProps, buttonText, buttonVariant, clipboardValue, iconOnly, onGetClipboardValue, tooltipSuccessText }: CopyToClipboardButtonProps) => import("react").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './CopyToClipboardButton';
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import { n as e, t } from "../../../_chunks/rolldown-runtime.js";
|
|
2
|
-
import { Button as n, IconButton as r, Tooltip as i } from "@mui/material";
|
|
3
|
-
import * as a from "react";
|
|
4
|
-
import { useState as o } from "react";
|
|
5
|
-
import { jsx as s } from "react/jsx-runtime";
|
|
6
|
-
import { useTranslation as c } from "react-i18next";
|
|
7
|
-
import l from "@mui/icons-material/ContentCopy";
|
|
8
|
-
import u from "@mui/icons-material/Done";
|
|
9
|
-
import d from "@mui/icons-material/Error";
|
|
10
|
-
//#region builtin:esm-external-require-react
|
|
11
|
-
var f = /* @__PURE__ */ t(((e, t) => {
|
|
12
|
-
t.exports = { ...a };
|
|
13
|
-
})), p = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
14
|
-
var n = f();
|
|
15
|
-
function r(e) {
|
|
16
|
-
var t = e.cleanup;
|
|
17
|
-
e.isCalled || typeof t != "function" || (e.isCalled = !0, t());
|
|
18
|
-
}
|
|
19
|
-
t.exports = function(e, t, i) {
|
|
20
|
-
var a = i === void 0 ? {} : i, o = a.cleanUpOnCall, s = o === void 0 || o, c = a.cleanUpOnDepsChange, l = c !== void 0 && c, u = a.cleanUpOnUnmount, d = u === void 0 || u, f = n.useRef({
|
|
21
|
-
cleanup: null,
|
|
22
|
-
isCalled: !1
|
|
23
|
-
}), p = {
|
|
24
|
-
cleanUpOnCall: s,
|
|
25
|
-
cleanUpOnDepsChange: l,
|
|
26
|
-
cleanUpOnUnmount: d
|
|
27
|
-
}, m = n.useRef(p);
|
|
28
|
-
return n.useEffect(function() {
|
|
29
|
-
m.current = p;
|
|
30
|
-
}), n.useEffect(function() {
|
|
31
|
-
return function() {
|
|
32
|
-
m.current.cleanUpOnDepsChange && r(f.current);
|
|
33
|
-
};
|
|
34
|
-
}, [t]), n.useEffect(function() {
|
|
35
|
-
return function() {
|
|
36
|
-
m.current.cleanUpOnUnmount && r(f.current);
|
|
37
|
-
};
|
|
38
|
-
}, []), n.useCallback(function() {
|
|
39
|
-
m.current.cleanUpOnCall && r(f.current);
|
|
40
|
-
var t = e.apply(void 0, [].slice.call(arguments));
|
|
41
|
-
if (typeof t == "object") {
|
|
42
|
-
var n = t.value;
|
|
43
|
-
return f.current = {
|
|
44
|
-
cleanup: t.cleanup,
|
|
45
|
-
isCalled: !1
|
|
46
|
-
}, n;
|
|
47
|
-
}
|
|
48
|
-
return typeof t == "function" && (f.current = {
|
|
49
|
-
cleanup: t,
|
|
50
|
-
isCalled: !1
|
|
51
|
-
}), t;
|
|
52
|
-
}, t);
|
|
53
|
-
};
|
|
54
|
-
})))(), 1), m = ({ baseIcon: e, buttonProps: t, buttonText: a, buttonVariant: f, clipboardValue: m, iconOnly: h, onGetClipboardValue: g, tooltipSuccessText: _ }) => {
|
|
55
|
-
let { t: v } = c(), [y, b] = o("primary"), [x, S] = o(e ?? /* @__PURE__ */ s(l, {})), [C, w] = o(a ?? v`Copy to clipboard`), T = (0, p.default)(() => {
|
|
56
|
-
let t;
|
|
57
|
-
return (async () => {
|
|
58
|
-
try {
|
|
59
|
-
await navigator.clipboard.writeText(m ?? g()), b("success"), S(/* @__PURE__ */ s(u, {})), w(_ ?? v`Copied to clipboard`);
|
|
60
|
-
} catch {
|
|
61
|
-
b("error"), S(/* @__PURE__ */ s(d, {})), w(v`Error`);
|
|
62
|
-
} finally {
|
|
63
|
-
t = window.setTimeout(() => {
|
|
64
|
-
b("primary"), S(e ?? /* @__PURE__ */ s(l, {})), w(a ?? v`Copy to clipboard`);
|
|
65
|
-
}, 2e3);
|
|
66
|
-
}
|
|
67
|
-
})(), () => {
|
|
68
|
-
clearTimeout(t);
|
|
69
|
-
};
|
|
70
|
-
}, [
|
|
71
|
-
e,
|
|
72
|
-
a,
|
|
73
|
-
m,
|
|
74
|
-
g,
|
|
75
|
-
v,
|
|
76
|
-
_
|
|
77
|
-
]);
|
|
78
|
-
return h ? /* @__PURE__ */ s(i, {
|
|
79
|
-
arrow: !0,
|
|
80
|
-
placement: "top",
|
|
81
|
-
title: C,
|
|
82
|
-
children: /* @__PURE__ */ s(r, {
|
|
83
|
-
...t,
|
|
84
|
-
color: y,
|
|
85
|
-
onClick: T,
|
|
86
|
-
size: "small",
|
|
87
|
-
children: x
|
|
88
|
-
})
|
|
89
|
-
}) : /* @__PURE__ */ s(n, {
|
|
90
|
-
...t,
|
|
91
|
-
color: y,
|
|
92
|
-
onClick: T,
|
|
93
|
-
startIcon: x,
|
|
94
|
-
variant: f ?? "contained",
|
|
95
|
-
children: a ?? v`Copy to clipboard`
|
|
96
|
-
});
|
|
97
|
-
};
|
|
98
|
-
//#endregion
|
|
99
|
-
export { m as CopyToClipboardButton, f as t };
|
|
100
|
-
|
|
101
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../builtin:esm-external-require-react","../../../../../../node_modules/.pnpm/use-cleanup-callback@1.3.0_react@19.2.7/node_modules/use-cleanup-callback/dist/index.js","../../../../src/components/ui/CopyToClipboardButton/CopyToClipboardButton.tsx"],"sourcesContent":["import * as m from 'react';module.exports = { ...m };","var n=require(\"react\");function e(n){var e=n.cleanup;n.isCalled||\"function\"!=typeof e||(n.isCalled=!0,e())}module.exports=function(u,c,l){var r=void 0===l?{}:l,a=r.cleanUpOnCall,t=void 0===a||a,o=r.cleanUpOnDepsChange,i=void 0!==o&&o,p=r.cleanUpOnUnmount,f=void 0===p||p,s=n.useRef({cleanup:null,isCalled:!1}),C={cleanUpOnCall:t,cleanUpOnDepsChange:i,cleanUpOnUnmount:f},U=n.useRef(C);return n.useEffect(function(){U.current=C}),n.useEffect(function(){return function(){U.current.cleanUpOnDepsChange&&e(s.current)}},[c]),n.useEffect(function(){return function(){U.current.cleanUpOnUnmount&&e(s.current)}},[]),n.useCallback(function(){U.current.cleanUpOnCall&&e(s.current);var n=u.apply(void 0,[].slice.call(arguments));if(\"object\"==typeof n){var c=n.value,l=n.cleanup;return s.current={cleanup:l,isCalled:!1},c}return\"function\"==typeof n&&(s.current={cleanup:n,isCalled:!1}),n},c)};\n//# sourceMappingURL=index.js.map\n","import type { ButtonOwnProps } from '@mui/material';\nimport {\n Button,\n IconButton,\n Tooltip,\n} from '@mui/material';\nimport { useTranslation } from 'react-i18next';\nimport useCleanupCallback from 'use-cleanup-callback';\nimport ContentCopyIcon from '@mui/icons-material/ContentCopy';\nimport DoneIcon from '@mui/icons-material/Done';\nimport ErrorIcon from '@mui/icons-material/Error';\nimport type { ReactElement } from 'react';\nimport { useState } from 'react';\n\nexport type CopyToClipboardButtonProps = {\n readonly baseIcon?: ReactElement;\n readonly buttonProps?: ButtonOwnProps;\n readonly buttonText?: string;\n readonly buttonVariant?: ButtonOwnProps['variant'];\n readonly clipboardValue?: string;\n readonly iconOnly?: boolean;\n readonly onGetClipboardValue?: () => string;\n readonly tooltipSuccessText?: string;\n};\n\nexport const CopyToClipboardButton = ({ baseIcon, buttonProps, buttonText, buttonVariant, clipboardValue, iconOnly, onGetClipboardValue, tooltipSuccessText }: CopyToClipboardButtonProps) => {\n const { t } = useTranslation();\n const [copyToClipBoardButtonColor, setCopyToClipBoardButtonColor] = useState<ButtonOwnProps['color']>('primary');\n const [copyToClipBoardIcon, setCopyToClipBoardIcon] = useState<ReactElement>(baseIcon ?? <ContentCopyIcon />);\n const [tooltipText, setTooltipText] = useState<string>(buttonText ?? t`Copy to clipboard`);\n\n\n const onCopyToClipboardButtonClick = useCleanupCallback(() => {\n let timeoutId: number;\n const perform = async () => {\n try {\n await navigator.clipboard.writeText(clipboardValue ?? onGetClipboardValue());\n setCopyToClipBoardButtonColor('success');\n setCopyToClipBoardIcon(\n <DoneIcon />,\n );\n setTooltipText(tooltipSuccessText ?? t`Copied to clipboard`);\n } catch (_error: unknown) {\n setCopyToClipBoardButtonColor('error');\n setCopyToClipBoardIcon(\n <ErrorIcon />,\n );\n setTooltipText(t`Error`);\n } finally {\n timeoutId = window.setTimeout(() => {\n setCopyToClipBoardButtonColor('primary');\n setCopyToClipBoardIcon(baseIcon ?? <ContentCopyIcon />);\n setTooltipText(buttonText ?? t`Copy to clipboard`);\n }, 2000);\n }\n };\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n perform();\n return () => {\n clearTimeout(timeoutId);\n };\n }, [baseIcon, buttonText, clipboardValue, onGetClipboardValue, t, tooltipSuccessText]);\n\n if (iconOnly) {\n return (\n <Tooltip\n arrow\n placement={'top'}\n title={tooltipText}\n >\n <IconButton\n {...buttonProps}\n color={copyToClipBoardButtonColor}\n onClick={onCopyToClipboardButtonClick}\n size={'small'}\n >\n {copyToClipBoardIcon}\n </IconButton>\n </Tooltip>\n );\n }\n\n return (\n <Button\n {...buttonProps}\n color={copyToClipBoardButtonColor}\n onClick={onCopyToClipboardButtonClick}\n startIcon={copyToClipBoardIcon}\n variant={buttonVariant ?? 'contained'}\n >\n {buttonText ?? t`Copy to clipboard`}\n </Button>\n );\n};\n"],"x_google_ignoreList":[1],"mappings":";;;;;;;;;;;CAA2B,EAAO,UAAU,EAAE,GAAG,EAAE;;CCAnD,IAAI,IAAA,EAAA;CAAmB,SAAS,EAAE,GAAE;EAAC,IAAI,IAAE,EAAE;EAAQ,EAAE,YAAsB,OAAO,KAAnB,eAAuB,EAAE,WAAS,CAAC,GAAE,EAAE;CAAE;CAAC,EAAO,UAAQ,SAAS,GAAE,GAAE,GAAE;EAAC,IAAI,IAAW,MAAT,KAAK,IAAM,CAAC,IAAE,GAAE,IAAE,EAAE,eAAc,IAAW,MAAT,KAAK,KAAO,GAAE,IAAE,EAAE,qBAAoB,IAAW,MAAT,KAAK,KAAO,GAAE,IAAE,EAAE,kBAAiB,IAAW,MAAT,KAAK,KAAO,GAAE,IAAE,EAAE,OAAO;GAAC,SAAQ;GAAK,UAAS,CAAC;EAAC,CAAC,GAAE,IAAE;GAAC,eAAc;GAAE,qBAAoB;GAAE,kBAAiB;EAAC,GAAE,IAAE,EAAE,OAAO,CAAC;EAAE,OAAO,EAAE,UAAU,WAAU;GAAC,EAAE,UAAQ;EAAC,CAAC,GAAE,EAAE,UAAU,WAAU;GAAC,OAAO,WAAU;IAAC,EAAE,QAAQ,uBAAqB,EAAE,EAAE,OAAO;GAAC;EAAC,GAAE,CAAC,CAAC,CAAC,GAAE,EAAE,UAAU,WAAU;GAAC,OAAO,WAAU;IAAC,EAAE,QAAQ,oBAAkB,EAAE,EAAE,OAAO;GAAC;EAAC,GAAE,CAAC,CAAC,GAAE,EAAE,YAAY,WAAU;GAAC,EAAE,QAAQ,iBAAe,EAAE,EAAE,OAAO;GAAE,IAAI,IAAE,EAAE,MAAM,KAAK,GAAE,CAAC,CAAC,CAAC,MAAM,KAAK,SAAS,CAAC;GAAE,IAAa,OAAO,KAAjB,UAAmB;IAAC,IAAI,IAAE,EAAE;IAAkB,OAAO,EAAE,UAAQ;KAAC,SAA5B,EAAE;KAAoC,UAAS,CAAC;IAAC,GAAE;GAAC;GAAC,OAAkB,OAAO,KAAnB,eAAuB,EAAE,UAAQ;IAAC,SAAQ;IAAE,UAAS,CAAC;GAAC,IAAG;EAAC,GAAE,CAAC;CAAC;YCyBn2B,KAAyB,EAAE,aAAU,gBAAa,eAAY,kBAAe,mBAAgB,aAAU,wBAAqB,4BAAqD;CAC5L,IAAM,EAAE,SAAM,EAAe,GACvB,CAAC,GAA4B,KAAiC,EAAkC,SAAS,GACzG,CAAC,GAAqB,KAA0B,EAAuB,KAAY,kBAAC,GAAD,CAAkB,CAAA,CAAC,GACtG,CAAC,GAAa,KAAkB,EAAiB,KAAc,CAAC,mBAAmB,GAGnF,KAAA,GAAA,EAAA,QAAA,OAAwD;EAC5D,IAAI;EAyBJ,QADA,YAvB4B;GAC1B,IAAI;IAMF,AALA,MAAM,UAAU,UAAU,UAAU,KAAkB,EAAoB,CAAC,GAC3E,EAA8B,SAAS,GACvC,EACE,kBAAC,GAAD,CAAW,CAAA,CACb,GACA,EAAe,KAAsB,CAAC,qBAAqB;GAC7D,QAA0B;IAKxB,AAJA,EAA8B,OAAO,GACrC,EACE,kBAAC,GAAD,CAAY,CAAA,CACd,GACA,EAAe,CAAC,OAAO;GACzB,UAAU;IACR,IAAY,OAAO,iBAAiB;KAGlC,AAFA,EAA8B,SAAS,GACvC,EAAuB,KAAY,kBAAC,GAAD,CAAkB,CAAA,CAAC,GACtD,EAAe,KAAc,CAAC,mBAAmB;IACnD,GAAG,GAAI;GACT;EACF,EAEA,CAAQ,SACK;GACX,aAAa,CAAS;EACxB;CACF,GAAG;EAAC;EAAU;EAAY;EAAgB;EAAqB;EAAG;CAAkB,CAAC;CAqBrF,OAnBI,IAEA,kBAAC,GAAD;EACE,OAAA;EACA,WAAW;EACX,OAAO;YAEP,kBAAC,GAAD;GACE,GAAI;GACJ,OAAO;GACP,SAAS;GACT,MAAM;aAEL;EACS,CAAA;CACL,CAAA,IAKX,kBAAC,GAAD;EACE,GAAI;EACJ,OAAO;EACP,SAAS;EACT,WAAW;EACX,SAAS,KAAiB;YAEzB,KAAc,CAAC;CACV,CAAA;AAEZ"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { DialogProps as MuiDialogProps, TypographyVariant, Button } from '@mui/material';
|
|
2
|
-
import { PropsWithChildren, ReactElement, RefObject } from 'react';
|
|
3
|
-
export type DialogAction = DialogActionButton | ReactElement;
|
|
4
|
-
export type DialogActionButton = {
|
|
5
|
-
label: string;
|
|
6
|
-
} & Omit<Parameters<typeof Button>[0], 'children'>;
|
|
7
|
-
export type DialogProps = {
|
|
8
|
-
readonly actionButtons?: () => ReactElement;
|
|
9
|
-
readonly actions?: DialogAction[];
|
|
10
|
-
readonly component?: (props: {
|
|
11
|
-
onDialogTitleChange?: (title: string) => void;
|
|
12
|
-
}) => ReactElement;
|
|
13
|
-
readonly dialogContentRef?: RefObject<HTMLDivElement>;
|
|
14
|
-
readonly disableBackdropClick?: boolean;
|
|
15
|
-
readonly fullScreen?: boolean;
|
|
16
|
-
readonly fullWidth?: boolean;
|
|
17
|
-
readonly maxWidth?: MuiDialogProps['maxWidth'];
|
|
18
|
-
readonly noCloseButton?: boolean;
|
|
19
|
-
readonly noPadding?: boolean;
|
|
20
|
-
readonly noTitle?: boolean;
|
|
21
|
-
readonly onClose?: () => void;
|
|
22
|
-
readonly permalink?: string;
|
|
23
|
-
readonly testId: string;
|
|
24
|
-
readonly title?: string;
|
|
25
|
-
readonly titleVariant?: TypographyVariant;
|
|
26
|
-
};
|
|
27
|
-
export declare const Dialog: ({ actionButtons: ActionButtons, actions, children, dialogContentRef, disableBackdropClick, fullScreen, fullWidth, maxWidth, noCloseButton, noPadding, noTitle, onClose, permalink, testId, title, titleVariant, }: PropsWithChildren<DialogProps>) => ReactElement;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Dialog';
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { n as e } from "../../../_chunks/rolldown-runtime.js";
|
|
2
|
-
import { t } from "../../../_chunks/isObject.js";
|
|
3
|
-
import { CopyToClipboardButton as n } from "../CopyToClipboardButton/index.js";
|
|
4
|
-
import { Box as r, Button as i, Dialog as a, DialogActions as o, DialogContent as s, DialogTitle as c, IconButton as l } from "@mui/material";
|
|
5
|
-
import { useCallback as u } from "react";
|
|
6
|
-
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
7
|
-
import { useTranslation as p } from "react-i18next";
|
|
8
|
-
import { TestIdUtil as m } from "@gen-epix/ui-core/utils/TestIdUtil";
|
|
9
|
-
import h from "@mui/icons-material/Close";
|
|
10
|
-
import g from "@mui/icons-material/Link";
|
|
11
|
-
//#region src/components/ui/Dialog/Dialog.tsx
|
|
12
|
-
var _ = /* @__PURE__ */ e(t(), 1), v = (e) => (0, _.default)(e) && "label" in e, y = ({ actionButtons: e, actions: t, children: _, dialogContentRef: y, disableBackdropClick: b = !1, fullScreen: x = !1, fullWidth: S = !1, maxWidth: C = !1, noCloseButton: w = !1, noPadding: T = !1, noTitle: E = !1, onClose: D, permalink: O, testId: k, title: A, titleVariant: j = "h5" }) => {
|
|
13
|
-
let { t: M } = p(), N = u((e, t) => {
|
|
14
|
-
b && (t === "backdropClick" || t === "escapeKeyDown") || D?.();
|
|
15
|
-
}, [b, D]), P = u(() => O, [O]);
|
|
16
|
-
return /* @__PURE__ */ f(a, {
|
|
17
|
-
...m.createAttributes(k, { title: A }),
|
|
18
|
-
fullScreen: x,
|
|
19
|
-
fullWidth: S,
|
|
20
|
-
maxWidth: C,
|
|
21
|
-
onClose: N,
|
|
22
|
-
open: !0,
|
|
23
|
-
sx: { "& .MuiDialogContent-root, & .MuiCardContent-root:last-child": { padding: T ? "0" : void 0 } },
|
|
24
|
-
children: [
|
|
25
|
-
!E && /* @__PURE__ */ f(r, {
|
|
26
|
-
sx: {
|
|
27
|
-
display: "flex",
|
|
28
|
-
justifyContent: "space-between"
|
|
29
|
-
},
|
|
30
|
-
children: [/* @__PURE__ */ f(c, {
|
|
31
|
-
...m.createAttributes(`${k}-title`),
|
|
32
|
-
sx: { pr: 3 },
|
|
33
|
-
variant: j,
|
|
34
|
-
children: [A, O && /* @__PURE__ */ d(r, {
|
|
35
|
-
className: "genepix-permalink",
|
|
36
|
-
sx: {
|
|
37
|
-
display: "inline-block",
|
|
38
|
-
marginLeft: 1
|
|
39
|
-
},
|
|
40
|
-
children: /* @__PURE__ */ d(n, {
|
|
41
|
-
baseIcon: /* @__PURE__ */ d(g, {}),
|
|
42
|
-
buttonProps: { sx: {
|
|
43
|
-
"& svg": { fontSize: 20 },
|
|
44
|
-
height: 20,
|
|
45
|
-
width: 20
|
|
46
|
-
} },
|
|
47
|
-
iconOnly: !0,
|
|
48
|
-
onGetClipboardValue: P
|
|
49
|
-
})
|
|
50
|
-
})]
|
|
51
|
-
}), !w && /* @__PURE__ */ d(l, {
|
|
52
|
-
...m.createAttributes(`${k}-closeButton`),
|
|
53
|
-
"aria-label": A ? M("Close dialog with title: {{title}}", { title: A }) : M`Close dialog`,
|
|
54
|
-
onClick: D,
|
|
55
|
-
sx: { color: "grey.500" },
|
|
56
|
-
title: M`Close`,
|
|
57
|
-
children: /* @__PURE__ */ d(h, {})
|
|
58
|
-
})]
|
|
59
|
-
}),
|
|
60
|
-
!!_ && /* @__PURE__ */ d(s, {
|
|
61
|
-
...m.createAttributes(`${k}-content`),
|
|
62
|
-
dividers: !!e,
|
|
63
|
-
ref: y,
|
|
64
|
-
sx: { paddingTop: x ? 0 : void 0 },
|
|
65
|
-
children: _
|
|
66
|
-
}),
|
|
67
|
-
t?.length > 0 && /* @__PURE__ */ d(o, {
|
|
68
|
-
...m.createAttributes(`${k}-actions`),
|
|
69
|
-
children: /* @__PURE__ */ d(r, {
|
|
70
|
-
sx: { "& > button": { margin: 1 } },
|
|
71
|
-
children: t.map((e) => v(e) ? /* @__PURE__ */ d(i, {
|
|
72
|
-
...e,
|
|
73
|
-
children: e.label
|
|
74
|
-
}, e.label) : e)
|
|
75
|
-
})
|
|
76
|
-
})
|
|
77
|
-
]
|
|
78
|
-
});
|
|
79
|
-
};
|
|
80
|
-
//#endregion
|
|
81
|
-
export { y as Dialog };
|
|
82
|
-
|
|
83
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/ui/Dialog/Dialog.tsx"],"sourcesContent":["import type {\n DialogProps as MuiDialogProps,\n TypographyVariant,\n} from '@mui/material';\nimport {\n Box,\n Button,\n DialogContent,\n DialogTitle,\n IconButton,\n Dialog as MuiDialog,\n DialogActions as MuiDialogActions,\n} from '@mui/material';\nimport CloseIcon from '@mui/icons-material/Close';\nimport LinkIcon from '@mui/icons-material/Link';\nimport isObject from 'lodash/isObject';\nimport type {\n PropsWithChildren,\n ReactElement,\n RefObject,\n} from 'react';\nimport { useCallback } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { TestIdUtil } from '@gen-epix/ui-core/utils/TestIdUtil';\n\nimport { CopyToClipboardButton } from '../CopyToClipboardButton';\n\nexport type DialogAction = DialogActionButton | ReactElement;\n\nexport type DialogActionButton = {\n label: string;\n} & Omit<Parameters<typeof Button>[0], 'children'>;\n\nexport type DialogProps = {\n readonly actionButtons?: () => ReactElement;\n readonly actions?: DialogAction[];\n readonly component?: (props: { onDialogTitleChange?: (title: string) => void }) => ReactElement;\n readonly dialogContentRef?: RefObject<HTMLDivElement>;\n readonly disableBackdropClick?: boolean;\n readonly fullScreen?: boolean;\n readonly fullWidth?: boolean;\n readonly maxWidth?: MuiDialogProps['maxWidth'];\n readonly noCloseButton?: boolean;\n readonly noPadding?: boolean;\n readonly noTitle?: boolean;\n readonly onClose?: () => void;\n readonly permalink?: string;\n readonly testId: string;\n readonly title?: string;\n readonly titleVariant?: TypographyVariant;\n};\n\nconst isDialogActionButton = (action: DialogAction): action is DialogActionButton => {\n return isObject(action) && 'label' in action;\n};\n\nexport const Dialog = ({\n actionButtons: ActionButtons,\n actions,\n children,\n dialogContentRef,\n disableBackdropClick = false,\n fullScreen = false,\n fullWidth = false,\n maxWidth = false,\n noCloseButton = false,\n noPadding = false,\n noTitle = false,\n onClose,\n permalink,\n testId,\n title,\n titleVariant = 'h5',\n}: PropsWithChildren<DialogProps>): ReactElement => {\n const { t } = useTranslation();\n const onMuiDialogClose = useCallback<NonNullable<MuiDialogProps['onClose']>>((_event, reason) => {\n if (disableBackdropClick && (reason === 'backdropClick' || reason === 'escapeKeyDown')) {\n return;\n }\n onClose?.();\n }, [disableBackdropClick, onClose]);\n\n const onGetClipboardValue = useCallback(() => {\n return permalink;\n }, [permalink]);\n\n return (\n <MuiDialog\n {...TestIdUtil.createAttributes(testId, { title })}\n fullScreen={fullScreen}\n fullWidth={fullWidth}\n maxWidth={maxWidth}\n onClose={onMuiDialogClose}\n open\n sx={{\n '& .MuiDialogContent-root, & .MuiCardContent-root:last-child': {\n padding: noPadding ? '0' : undefined,\n },\n }}\n >\n {!noTitle && (\n <Box\n sx={{\n display: 'flex',\n justifyContent: 'space-between',\n }}\n >\n <DialogTitle\n {...TestIdUtil.createAttributes(`${testId}-title`)}\n sx={{\n pr: 3,\n }}\n variant={titleVariant}\n >\n {title}\n {permalink && (\n <Box\n className={'genepix-permalink'}\n sx={{\n display: 'inline-block',\n marginLeft: 1,\n }}\n >\n <CopyToClipboardButton\n baseIcon={<LinkIcon />}\n buttonProps={{\n sx: {\n '& svg': {\n fontSize: 20,\n },\n height: 20,\n width: 20,\n },\n }}\n iconOnly\n onGetClipboardValue={onGetClipboardValue}\n />\n </Box>\n )}\n </DialogTitle>\n {!noCloseButton && (\n <IconButton\n {...TestIdUtil.createAttributes(`${testId}-closeButton`)}\n aria-label={title ? t('Close dialog with title: {{title}}', { title }) : t`Close dialog`}\n onClick={onClose}\n sx={{\n color: 'grey.500',\n }}\n title={t`Close`}\n >\n <CloseIcon />\n </IconButton>\n )}\n </Box>\n )}\n {!!children && (\n <DialogContent\n {...TestIdUtil.createAttributes(`${testId}-content`)}\n dividers={!!ActionButtons}\n ref={dialogContentRef}\n sx={{\n paddingTop: fullScreen ? 0 : undefined,\n }}\n >\n {children}\n </DialogContent>\n )}\n {actions?.length > 0 && (\n <MuiDialogActions {...TestIdUtil.createAttributes(`${testId}-actions`)}>\n <Box\n sx={{\n '& > button': {\n margin: 1,\n },\n }}\n >\n {actions.map((action) => {\n if (isDialogActionButton(action)) {\n return (\n <Button\n key={action.label}\n {...action}\n >\n {action.label}\n </Button>\n );\n }\n return action;\n })}\n </Box>\n </MuiDialogActions>\n )}\n </MuiDialog>\n );\n};\n"],"mappings":";;;;;;;;;;;mCAoDM,KAAwB,OAC5B,GAAA,EAAA,QAAA,CAAgB,CAAM,KAAK,WAAW,GAG3B,KAAU,EACrB,eAAe,GACf,YACA,aACA,qBACA,0BAAuB,IACvB,gBAAa,IACb,eAAY,IACZ,cAAW,IACX,mBAAgB,IAChB,eAAY,IACZ,aAAU,IACV,YACA,cACA,WACA,UACA,kBAAe,WACmC;CAClD,IAAM,EAAE,SAAM,EAAe,GACvB,IAAmB,GAAqD,GAAQ,MAAW;EAC3F,MAAyB,MAAW,mBAAmB,MAAW,oBAGtE,IAAU;CACZ,GAAG,CAAC,GAAsB,CAAO,CAAC,GAE5B,IAAsB,QACnB,GACN,CAAC,CAAS,CAAC;CAEd,OACE,kBAAC,GAAD;EACE,GAAI,EAAW,iBAAiB,GAAQ,EAAE,SAAM,CAAC;EACrC;EACD;EACD;EACV,SAAS;EACT,MAAA;EACA,IAAI,EACF,+DAA+D,EAC7D,SAAS,IAAY,MAAM,KAAA,EAC7B,EACF;YAXF;GAaG,CAAC,KACA,kBAAC,GAAD;IACE,IAAI;KACF,SAAS;KACT,gBAAgB;IAClB;cAJF,CAME,kBAAC,GAAD;KACE,GAAI,EAAW,iBAAiB,GAAG,EAAO,OAAO;KACjD,IAAI,EACF,IAAI,EACN;KACA,SAAS;eALX,CAOG,GACA,KACC,kBAAC,GAAD;MACE,WAAW;MACX,IAAI;OACF,SAAS;OACT,YAAY;MACd;gBAEA,kBAAC,GAAD;OACE,UAAU,kBAAC,GAAD,CAAW,CAAA;OACrB,aAAa,EACX,IAAI;QACF,SAAS,EACP,UAAU,GACZ;QACA,QAAQ;QACR,OAAO;OACT,EACF;OACA,UAAA;OACqB;MACtB,CAAA;KACE,CAAA,CAEI;QACZ,CAAC,KACA,kBAAC,GAAD;KACE,GAAI,EAAW,iBAAiB,GAAG,EAAO,aAAa;KACvD,cAAY,IAAQ,EAAE,sCAAsC,EAAE,SAAM,CAAC,IAAI,CAAC;KAC1E,SAAS;KACT,IAAI,EACF,OAAO,WACT;KACA,OAAO,CAAC;eAER,kBAAC,GAAD,CAAY,CAAA;IACF,CAAA,CAEX;;GAEN,CAAC,CAAC,KACD,kBAAC,GAAD;IACE,GAAI,EAAW,iBAAiB,GAAG,EAAO,SAAS;IACnD,UAAU,CAAC,CAAC;IACZ,KAAK;IACL,IAAI,EACF,YAAY,IAAa,IAAI,KAAA,EAC/B;IAEC;GACY,CAAA;GAEhB,GAAS,SAAS,KACjB,kBAAC,GAAD;IAAkB,GAAI,EAAW,iBAAiB,GAAG,EAAO,SAAS;cACnE,kBAAC,GAAD;KACE,IAAI,EACF,cAAc,EACZ,QAAQ,EACV,EACF;eAEC,EAAQ,KAAK,MACR,EAAqB,CAAM,IAE3B,kBAAC,GAAD;MAEE,GAAI;gBAEH,EAAO;KACF,GAJD,EAAO,KAIN,IAGL,CACR;IACE,CAAA;GACW,CAAA;EAEX;;AAEf"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { LinearProgressProps } from '@mui/material';
|
|
2
|
-
export type LinearProgressWithLabelProps = {
|
|
3
|
-
readonly value: number;
|
|
4
|
-
} & LinearProgressProps;
|
|
5
|
-
export declare const LinearProgressWithLabel: ({ value, ...props }: LinearProgressWithLabelProps) => import("react").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './LinearProgressWithLabel';
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { Box as e, LinearProgress as t, Typography as n } from "@mui/material";
|
|
2
|
-
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
3
|
-
//#region src/components/ui/LinearProgressWithLabel/LinearProgressWithLabel.tsx
|
|
4
|
-
var a = ({ value: a, ...o }) => /* @__PURE__ */ i(e, {
|
|
5
|
-
sx: {
|
|
6
|
-
alignItems: "center",
|
|
7
|
-
display: "flex"
|
|
8
|
-
},
|
|
9
|
-
children: [/* @__PURE__ */ r(e, {
|
|
10
|
-
sx: {
|
|
11
|
-
mr: 1,
|
|
12
|
-
width: "100%"
|
|
13
|
-
},
|
|
14
|
-
children: /* @__PURE__ */ r(t, {
|
|
15
|
-
value: a > 1 ? a : void 0,
|
|
16
|
-
variant: a > 1 ? "determinate" : "indeterminate",
|
|
17
|
-
...o
|
|
18
|
-
})
|
|
19
|
-
}), a > 1 && /* @__PURE__ */ r(e, {
|
|
20
|
-
sx: { minWidth: 35 },
|
|
21
|
-
children: /* @__PURE__ */ r(n, {
|
|
22
|
-
sx: { color: "text.secondary" },
|
|
23
|
-
variant: "body2",
|
|
24
|
-
children: `${Math.round(a)}%`
|
|
25
|
-
})
|
|
26
|
-
})]
|
|
27
|
-
});
|
|
28
|
-
//#endregion
|
|
29
|
-
export { a as LinearProgressWithLabel };
|
|
30
|
-
|
|
31
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/ui/LinearProgressWithLabel/LinearProgressWithLabel.tsx"],"sourcesContent":["import type { LinearProgressProps } from '@mui/material';\nimport {\n Box,\n LinearProgress,\n Typography,\n} from '@mui/material';\n\nexport type LinearProgressWithLabelProps = {\n readonly value: number;\n} & LinearProgressProps;\n\nexport const LinearProgressWithLabel = ({ value, ...props }: LinearProgressWithLabelProps) => {\n return (\n <Box sx={{ alignItems: 'center', display: 'flex' }}>\n <Box sx={{ mr: 1, width: '100%' }}>\n <LinearProgress\n value={value > 1 ? value : undefined}\n variant={value > 1 ? 'determinate' : 'indeterminate'}\n {...props}\n />\n </Box>\n {value > 1 && (\n <Box sx={{ minWidth: 35 }}>\n <Typography\n sx={{ color: 'text.secondary' }}\n variant={'body2'}\n >\n {`${Math.round(value)}%`}\n </Typography>\n </Box>\n )}\n </Box>\n );\n};\n"],"mappings":";;;AAWA,IAAa,KAA2B,EAAE,UAAO,GAAG,QAEhD,kBAAC,GAAD;CAAK,IAAI;EAAE,YAAY;EAAU,SAAS;CAAO;WAAjD,CACE,kBAAC,GAAD;EAAK,IAAI;GAAE,IAAI;GAAG,OAAO;EAAO;YAC9B,kBAAC,GAAD;GACE,OAAO,IAAQ,IAAI,IAAQ,KAAA;GAC3B,SAAS,IAAQ,IAAI,gBAAgB;GACrC,GAAI;EACL,CAAA;CACE,CAAA,GACJ,IAAQ,KACP,kBAAC,GAAD;EAAK,IAAI,EAAE,UAAU,GAAG;YACtB,kBAAC,GAAD;GACE,IAAI,EAAE,OAAO,iBAAiB;GAC9B,SAAS;aAER,GAAG,KAAK,MAAM,CAAK,EAAE;EACZ,CAAA;CACT,CAAA,CAEJ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './LoadingIndicator';
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { LinearProgress as e, styled as t } from "@mui/material";
|
|
2
|
-
//#region src/components/ui/LoadingIndicator/LoadingIndicator.tsx
|
|
3
|
-
var n = t(e)(() => ({
|
|
4
|
-
left: 0,
|
|
5
|
-
position: "absolute",
|
|
6
|
-
right: 0,
|
|
7
|
-
zIndex: 1
|
|
8
|
-
}));
|
|
9
|
-
//#endregion
|
|
10
|
-
export { n as LoadingIndicator };
|
|
11
|
-
|
|
12
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/ui/LoadingIndicator/LoadingIndicator.tsx"],"sourcesContent":["import {\n LinearProgress,\n styled,\n} from '@mui/material';\n\nexport const LoadingIndicator = styled(LinearProgress)(() => ({\n left: 0,\n position: 'absolute',\n right: 0,\n zIndex: 1,\n})) as typeof LinearProgress;\n"],"mappings":";;AAKA,IAAa,IAAmB,EAAO,CAAc,CAAC,QAAQ;CAC5D,MAAM;CACN,UAAU;CACV,OAAO;CACP,QAAQ;AACV,EAAE"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { MenuItemProps } from '@mui/material/MenuItem';
|
|
2
|
-
import { SxProps } from '@mui/material';
|
|
3
|
-
import { MouseEvent, ReactNode, Ref } from 'react';
|
|
4
|
-
type IconMenuItemProps = {
|
|
5
|
-
readonly checked?: 'false' | 'mixed' | 'true';
|
|
6
|
-
readonly className?: string;
|
|
7
|
-
readonly disabled?: boolean;
|
|
8
|
-
readonly divider?: boolean;
|
|
9
|
-
readonly label?: string;
|
|
10
|
-
readonly leftIcon?: ReactNode;
|
|
11
|
-
readonly MenuItemProps?: MenuItemProps;
|
|
12
|
-
readonly onClick?: (event: MouseEvent<HTMLElement>) => void;
|
|
13
|
-
readonly ref?: Ref<HTMLLIElement>;
|
|
14
|
-
readonly rightIcon?: ReactNode;
|
|
15
|
-
readonly sx?: SxProps;
|
|
16
|
-
};
|
|
17
|
-
export declare const IconMenuItem: ({ checked, className, label, leftIcon, MenuItemProps, ref, rightIcon, ...props }: IconMenuItemProps) => import("react").JSX.Element;
|
|
18
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { ButtonProps } from '@mui/material/Button';
|
|
2
|
-
import { MenuProps } from '@mui/material/Menu';
|
|
3
|
-
import { MouseEvent, ReactNode, Ref } from 'react';
|
|
4
|
-
import { BoxProps } from '@mui/material';
|
|
5
|
-
import { MenuItemData } from '../../../models/nestedMenu';
|
|
6
|
-
interface NestedDropdownProps {
|
|
7
|
-
readonly ButtonProps?: Partial<ButtonProps>;
|
|
8
|
-
readonly children?: ReactNode;
|
|
9
|
-
readonly ContainerProps?: Partial<BoxProps>;
|
|
10
|
-
readonly menuItemsData?: MenuItemData;
|
|
11
|
-
readonly MenuProps?: Partial<MenuProps>;
|
|
12
|
-
readonly onClick?: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
13
|
-
readonly ref?: Ref<HTMLDivElement>;
|
|
14
|
-
readonly showTopLevelTooltip?: boolean;
|
|
15
|
-
}
|
|
16
|
-
export declare const NestedDropdown: ({ ref, ...props }: NestedDropdownProps) => import("react").JSX.Element;
|
|
17
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { MenuProps } from '@mui/material/Menu';
|
|
2
|
-
import { MenuItemProps } from '@mui/material/MenuItem';
|
|
3
|
-
import { ElementType, HTMLAttributes, ReactNode, Ref } from 'react';
|
|
4
|
-
export type NestedMenuItemProps = {
|
|
5
|
-
readonly active?: boolean;
|
|
6
|
-
readonly button?: true;
|
|
7
|
-
readonly callback?: () => void;
|
|
8
|
-
readonly checked?: 'false' | 'mixed' | 'true';
|
|
9
|
-
readonly children?: ReactNode;
|
|
10
|
-
readonly className?: string;
|
|
11
|
-
readonly component?: ElementType;
|
|
12
|
-
readonly ContainerProps?: HTMLAttributes<HTMLElement>;
|
|
13
|
-
readonly disabled?: boolean;
|
|
14
|
-
readonly label?: string;
|
|
15
|
-
readonly leftIcon?: ReactNode;
|
|
16
|
-
readonly MenuProps?: Partial<Omit<MenuProps, 'children'>>;
|
|
17
|
-
readonly parentMenuOpen: boolean;
|
|
18
|
-
readonly ref?: Ref<HTMLLIElement>;
|
|
19
|
-
readonly rightIcon?: ReactNode;
|
|
20
|
-
readonly tabIndex?: number;
|
|
21
|
-
} & Omit<MenuItemProps, 'button'>;
|
|
22
|
-
export declare const NestedMenuItem: ({ ref, ...props }: NestedMenuItemProps) => import("react").JSX.Element;
|