udp-react-enterprise-component-library 25.1.0-beta.9 → 25.1.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AmbientGridTemplate-BqlMt5Su.js → AmbientGridTemplate-6xfwTiz-.js} +24 -62
- package/dist/AmbientGridTemplate-6xfwTiz-.js.map +1 -0
- package/dist/ClientSideUdpGrid-CEhDqIId.js +56 -0
- package/dist/ClientSideUdpGrid-CEhDqIId.js.map +1 -0
- package/dist/{EnvironmentRibbon-DaDmKAPO.js → EnvironmentRibbon-oEmbWjEq.js} +4 -148
- package/dist/EnvironmentRibbon-oEmbWjEq.js.map +1 -0
- package/dist/{MenuPage-CO6_GWwB.js → MenuPage-CZHpoopY.js} +12 -13
- package/dist/{MenuPage-CO6_GWwB.js.map → MenuPage-CZHpoopY.js.map} +1 -1
- package/dist/{MyExportsPage-CX9tzqHk.js → MyExportsPage-CS2Bw2mF.js} +56 -69
- package/dist/{MyExportsPage-CX9tzqHk.js.map → MyExportsPage-CS2Bw2mF.js.map} +1 -1
- package/dist/MyExportsPage-hyX42CN6.js +11 -0
- package/dist/{PageContainer-k8KCfGsM.js → PageContainer-BPHLFGju.js} +12 -17
- package/dist/PageContainer-BPHLFGju.js.map +1 -0
- package/dist/{PageNotFoundRoute-CxYZNEhN.js → PageNotFoundRoute-D9dLbM_w.js} +1 -1
- package/dist/{PageNotFoundRoute-CxYZNEhN.js.map → PageNotFoundRoute-D9dLbM_w.js.map} +1 -1
- package/dist/PageNotFoundRoute-DUj0Q9J8.js +3 -0
- package/dist/{PasswordResetRedirect-BHnkAW40.js → PasswordResetRedirect-C3g8L0vA.js} +2 -3
- package/dist/{PasswordResetRedirect-BHnkAW40.js.map → PasswordResetRedirect-C3g8L0vA.js.map} +1 -1
- package/dist/PasswordResetRedirect-Dh-S5Ril.js +3 -0
- package/dist/{SearchUtilities-Bor3HbfB.js → SearchUtilities-Btugro8y.js} +11 -20
- package/dist/{SearchUtilities-Bor3HbfB.js.map → SearchUtilities-Btugro8y.js.map} +1 -1
- package/dist/{SideSheet-DUsxG1FN.js → SideSheet-BsDoeNmq.js} +7 -47
- package/dist/SideSheet-BsDoeNmq.js.map +1 -0
- package/dist/UdpMaintenanceConfigPage-DcHntunS.js +88 -0
- package/dist/UdpMaintenanceConfigPage-DcHntunS.js.map +1 -0
- package/dist/UdpPublicForm-DTt-lMfk.js +4 -0
- package/dist/{UdpPublicForm-Caa1tH6z.js → UdpPublicForm-LDSuOwV2.js} +2 -2
- package/dist/{UdpPublicForm-Caa1tH6z.js.map → UdpPublicForm-LDSuOwV2.js.map} +1 -1
- package/dist/{UtilitySideBar-D4CXGtW2.js → UtilitySideBar-95k0edSA.js} +45 -89
- package/dist/{UtilitySideBar-D4CXGtW2.js.map → UtilitySideBar-95k0edSA.js.map} +1 -1
- package/dist/{VirtualBrowser-BXL0hdy0.js → VirtualBrowser-_epMjUkE.js} +23 -29
- package/dist/{VirtualBrowser-BXL0hdy0.js.map → VirtualBrowser-_epMjUkE.js.map} +1 -1
- package/dist/{WorkflowContainer-DrqzuQtU.js → WorkflowContainer-ClPvY2mG.js} +14 -20
- package/dist/{WorkflowContainer-DrqzuQtU.js.map → WorkflowContainer-ClPvY2mG.js.map} +1 -1
- package/dist/WorkflowContainer-D0QUOc-f.js +11 -0
- package/dist/{apiHelpers-DZots3og.js → apiHelpers-CmM6DWAT.js} +7 -12
- package/dist/{apiHelpers-DZots3og.js.map → apiHelpers-CmM6DWAT.js.map} +1 -1
- package/dist/entityUtilities-Dy-jsB5c.js +22 -0
- package/dist/entityUtilities-Dy-jsB5c.js.map +1 -0
- package/dist/index.js +1528 -2114
- package/dist/index.js.map +1 -1
- package/dist/{propertyTypeEnums-Civy7RJv.js → propertyTypeEnums-BCCGQqVB.js} +2 -2
- package/dist/{propertyTypeEnums-Civy7RJv.js.map → propertyTypeEnums-BCCGQqVB.js.map} +1 -1
- package/dist/types/index.d.ts +0 -4
- package/dist/types/maintenanceEngine/crudBrowser/CrudTableColumnDefs.d.ts +1 -9
- package/dist/types/maintenanceEngine/crudBrowser/crudHelper.d.ts +1 -0
- package/dist/types/menuPage/MenuPage.d.ts +2 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dist/types/udp/pages/UdpMaintenanceConfigPage.d.ts +2 -1
- package/dist/useAxiosGet-Dh5pVURP.js +144 -0
- package/dist/useAxiosGet-Dh5pVURP.js.map +1 -0
- package/dist/useAxiosMutate-DlG255x9.js +43 -0
- package/dist/useAxiosMutate-DlG255x9.js.map +1 -0
- package/package.json +2 -2
- package/dist/AmbientGridTemplate-BqlMt5Su.js.map +0 -1
- package/dist/EnvironmentRibbon-DaDmKAPO.js.map +0 -1
- package/dist/MyExportsPage-CkzQ0MRq.js +0 -8
- package/dist/PageContainer-k8KCfGsM.js.map +0 -1
- package/dist/PageNotFoundRoute-BbBtA9Cz.js +0 -3
- package/dist/PasswordResetRedirect-tUV2yEkH.js +0 -3
- package/dist/SideSheet-DUsxG1FN.js.map +0 -1
- package/dist/UdpPublicForm-Cvw5tOHe.js +0 -4
- package/dist/WorkflowContainer-Q8gtuaB7.js +0 -9
- package/dist/types/maintenanceEngine/crudBrowser/CrudTableActionRender.d.ts +0 -3
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { Field, Form, SideSheet
|
|
2
|
-
import { FluentButton, FluentIcon, GridStateTypeEnums, LayoutUnit, NodeActionEnums, PrimaryActionButton, PrimaryActionButton_default, SplitScreenTypeEnums, UnityFluentIcon, VisibilityTypeEnums,
|
|
3
|
-
import { ClickOpenEnums, useHandleAxiosSnackbar } from "./apiHelpers-
|
|
1
|
+
import { Field, Form, SideSheet } from "./SideSheet-BsDoeNmq.js";
|
|
2
|
+
import { FluentButton, FluentIcon, GridStateTypeEnums, LayoutUnit, NodeActionEnums, PrimaryActionButton, PrimaryActionButton_default, SplitScreenTypeEnums, UnityFluentIcon, VisibilityTypeEnums, useId, useShellStore } from "./EnvironmentRibbon-oEmbWjEq.js";
|
|
3
|
+
import { ClickOpenEnums, useHandleAxiosSnackbar } from "./apiHelpers-CmM6DWAT.js";
|
|
4
|
+
import { useAxiosGet } from "./useAxiosGet-Dh5pVURP.js";
|
|
5
|
+
import { apiMutate as apiMutate$1 } from "./useAxiosMutate-DlG255x9.js";
|
|
4
6
|
import React, { Children, cloneElement, createContext, forwardRef, isValidElement, memo, useCallback, useContext, useEffect, useLayoutEffect, useMemo, useReducer, useRef, useState } from "react";
|
|
5
7
|
import { Badge, Box, Button, ButtonGroup, Chip, ClickAwayListener, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle, Divider, FormControlLabel, Grid, Grow, IconButton, InputAdornment, LinearProgress, MenuItem, MenuList, Paper, Popover, Popper, Switch, Tab, Tabs, TextField, Tooltip, Typography, lighten, makeStyles, useTheme } from "@material-ui/core";
|
|
6
8
|
import { ConfigService } from "udp-react-stencil-component-library";
|
|
@@ -42,12 +44,10 @@ const LicenseKey = "Using_this_{AG_Grid}_Enterprise_key_{AG-080613}_in_excess_of
|
|
|
42
44
|
//#region src/utilities/maintenanceEngine/CrudBrowserUtilities.js
|
|
43
45
|
const RESERVED_PATH_PARAMETERS = ["version", "udp-api-version"];
|
|
44
46
|
const getPrimaryKeyValues = (properties, entityValue) => {
|
|
45
|
-
|
|
46
|
-
const primaryKeyValues = primaryKeyProperties.reduce((keyValues, property) => {
|
|
47
|
+
return properties.filter((property) => property?.extendedProperties?.identifier).reduce((keyValues, property) => {
|
|
47
48
|
if (entityValue && entityValue[property["name"]] !== null) keyValues.push(entityValue[property["name"]]);
|
|
48
49
|
return keyValues;
|
|
49
50
|
}, []);
|
|
50
|
-
return primaryKeyValues;
|
|
51
51
|
};
|
|
52
52
|
const getPathObject = (pathParameters, primaryKeyValues) => {
|
|
53
53
|
const primaryKeyParameters = pathParameters.filter((parameter) => parameter.name !== RESERVED_PATH_PARAMETERS);
|
|
@@ -115,24 +115,6 @@ const getPathParametersObj = (pathParametersDefinition, entityData) => {
|
|
|
115
115
|
return pathParametersObj;
|
|
116
116
|
};
|
|
117
117
|
|
|
118
|
-
//#endregion
|
|
119
|
-
//#region src/utilities/entities/entityUtilities.js
|
|
120
|
-
const getCommonEntityName = (entityName) => {
|
|
121
|
-
if (!entityName) return entityName;
|
|
122
|
-
return toTitleCase(getSanitizedName(entityName));
|
|
123
|
-
};
|
|
124
|
-
const getSanitizedName = (entityName) => {
|
|
125
|
-
if (!entityName) return "";
|
|
126
|
-
const entityNameParts = entityName.split(".");
|
|
127
|
-
return entityNameParts[entityNameParts.length - 1];
|
|
128
|
-
};
|
|
129
|
-
const getFullyQualifiedName = (udpObjectInfo) => {
|
|
130
|
-
if (!udpObjectInfo) return "";
|
|
131
|
-
const modelNameSpace = udpObjectInfo.namespaceStructure?.model;
|
|
132
|
-
if (modelNameSpace) return `${modelNameSpace}.Models.${udpObjectInfo.sanitizedName}`;
|
|
133
|
-
else return "";
|
|
134
|
-
};
|
|
135
|
-
|
|
136
118
|
//#endregion
|
|
137
119
|
//#region src/contexts/ActionDispatchContext.js
|
|
138
120
|
const ActionDispatchContext = createContext(null);
|
|
@@ -190,8 +172,7 @@ const useSetInitialInquiryMenuVisibility = () => {
|
|
|
190
172
|
//#endregion
|
|
191
173
|
//#region src/actions/utils/actionUtils.js
|
|
192
174
|
function isValidURL(url) {
|
|
193
|
-
|
|
194
|
-
return urlPattern.test(url);
|
|
175
|
+
return /^(ftp|http|https):\/\/[^ "]+$/.test(url);
|
|
195
176
|
}
|
|
196
177
|
const useHandleAction = () => {
|
|
197
178
|
const history = useHistory();
|
|
@@ -312,8 +293,7 @@ const useHandleAction = () => {
|
|
|
312
293
|
if (entityAttributes.length > 0 && (selectedNode?.nodeObj || actionData)) {
|
|
313
294
|
if (actionData) data = { ...actionData };
|
|
314
295
|
else data = { ...selectedNode?.nodeObj };
|
|
315
|
-
|
|
316
|
-
removeAttributes.forEach((att) => {
|
|
296
|
+
entityAttributes.filter((p) => p?.extendedProperties?.childEntity).forEach((att) => {
|
|
317
297
|
if (att["name"] in data || "serializeFields" in data) delete data[att["name"]];
|
|
318
298
|
});
|
|
319
299
|
}
|
|
@@ -366,8 +346,7 @@ const useHandleAction = () => {
|
|
|
366
346
|
inWorkflowMode: true,
|
|
367
347
|
currentWorkflowPlayId: playId
|
|
368
348
|
};
|
|
369
|
-
|
|
370
|
-
setWorkflowMap({ [containerId]: workflow });
|
|
349
|
+
setWorkflowMap({ [currentContainerId || 0]: workflow });
|
|
371
350
|
} else history.push({
|
|
372
351
|
pathname: `/workflowtask/${playId}?taskId=`,
|
|
373
352
|
state: { label: t("Workflow") }
|
|
@@ -450,14 +429,12 @@ const useActions = () => {
|
|
|
450
429
|
const containerId = currentContainerId || 0;
|
|
451
430
|
if (actionPanels && Array.isArray(actionPanels) && actionPanels[containerId]) {
|
|
452
431
|
const actionPanel = actionPanels[containerId];
|
|
453
|
-
if (Array.isArray(actionPanel.panelActions)) {
|
|
454
|
-
|
|
455
|
-
return
|
|
456
|
-
return pa.actionId === act.actionId;
|
|
457
|
-
});
|
|
432
|
+
if (Array.isArray(actionPanel.panelActions)) return actionPanel.find((ap) => {
|
|
433
|
+
return ap.panelActions.find((pa) => {
|
|
434
|
+
return pa.actionId === act.actionId;
|
|
458
435
|
});
|
|
459
|
-
|
|
460
|
-
|
|
436
|
+
});
|
|
437
|
+
else console.error("panelActions is not an array:", actionPanel.panelActions);
|
|
461
438
|
} else console.error("actionPanels is not valid:", actionPanels);
|
|
462
439
|
} else console.error("act or actionState is not defined:", act, actionState);
|
|
463
440
|
return null;
|
|
@@ -1324,11 +1301,10 @@ const AgTable = (props) => {
|
|
|
1324
1301
|
return 16;
|
|
1325
1302
|
};
|
|
1326
1303
|
const rowHeightFunction = useCallback((params) => {
|
|
1327
|
-
if (rowModelType === "serverSide") if (isUsingAgRowHeight) return
|
|
1304
|
+
if (rowModelType === "serverSide") if (isUsingAgRowHeight) return;
|
|
1328
1305
|
else if (getRowHeight) return getRowHeight(params);
|
|
1329
1306
|
else return calculateRowHeight(params);
|
|
1330
1307
|
else if (getRowHeight) return getRowHeight(params);
|
|
1331
|
-
return void 0;
|
|
1332
1308
|
}, [getRowHeight, isUsingAgRowHeight]);
|
|
1333
1309
|
const onGridSizeChanged = () => {
|
|
1334
1310
|
if (props.dynamicSizing) props.api?.sizeColumnsToFit();
|
|
@@ -1691,8 +1667,7 @@ const GridPrimaryBar = (props) => {
|
|
|
1691
1667
|
const numActionButtons = allActionButtons.length - hiddenActionButtons.length;
|
|
1692
1668
|
const buttonTotalWidth = numActionButtons * chipButtonSizePx - (chipButtonSizePx - tokenButtonSizePx) * hiddenLabels.length;
|
|
1693
1669
|
const calculatedMedian = Math.floor(buttonTotalWidth / numActionButtons);
|
|
1694
|
-
|
|
1695
|
-
let breakPoint = breakPointOffset + buttonTotalWidth;
|
|
1670
|
+
let breakPoint = (calculatedMedian > 70 ? 950 : 900) + buttonTotalWidth;
|
|
1696
1671
|
const currentWindowWidth = window.innerWidth;
|
|
1697
1672
|
while (currentWindowWidth < breakPoint && allActionButtons.length > 0) {
|
|
1698
1673
|
const movedAction = allActionButtons.pop();
|
|
@@ -2245,28 +2220,18 @@ SaveViewFormDialog.propTypes = {
|
|
|
2245
2220
|
const useDynamicListCalculation = () => {
|
|
2246
2221
|
const [averageChildWidth, setAverageChildWidth] = useState(0);
|
|
2247
2222
|
const [previousChildRefs, setPreviousChildRefs] = useState([]);
|
|
2248
|
-
|
|
2249
|
-
* Calculate the number of visible children based on container width and child widths.
|
|
2250
|
-
*
|
|
2251
|
-
* @param {object} parentRef - Ref object for the parent container.
|
|
2252
|
-
* @param {object} childRefs - Ref object for an array of child elements.
|
|
2253
|
-
* @param {boolean} includeBuffer - Whether to include a buffer for better performance (default: true).
|
|
2254
|
-
* @returns {number} The maximum number of visible children.
|
|
2255
|
-
*/
|
|
2256
|
-
const calculateNumberOfVisibleChildren = useCallback((parentRef, childRefs, includeBuffer = true) => {
|
|
2223
|
+
return { calculateNumberOfVisibleChildren: useCallback((parentRef, childRefs, includeBuffer = true) => {
|
|
2257
2224
|
if (!parentRef.current || !childRefs.current) return;
|
|
2258
2225
|
const containerWidth = parentRef.current.getBoundingClientRect().width ?? 0;
|
|
2259
2226
|
if (!averageChildWidth || previousChildRefs !== childRefs.current) {
|
|
2260
|
-
const
|
|
2261
|
-
const calculatedAverageWidth = childrenTotalWidth / childRefs.current.length;
|
|
2227
|
+
const calculatedAverageWidth = childRefs.current.map((ref) => ref && typeof ref?.getBoundingClientRect === "function" ? ref.getBoundingClientRect().width : 0).reduce((acc, curr) => acc + curr, 0) / childRefs.current.length;
|
|
2262
2228
|
setAverageChildWidth(calculatedAverageWidth);
|
|
2263
2229
|
setPreviousChildRefs(childRefs.current);
|
|
2264
2230
|
}
|
|
2265
2231
|
const maxVisibleChildren = Math.floor(containerWidth / averageChildWidth);
|
|
2266
2232
|
if (includeBuffer) return maxVisibleChildren - 1;
|
|
2267
2233
|
return maxVisibleChildren;
|
|
2268
|
-
}, [averageChildWidth, previousChildRefs]);
|
|
2269
|
-
return { calculateNumberOfVisibleChildren };
|
|
2234
|
+
}, [averageChildWidth, previousChildRefs]) };
|
|
2270
2235
|
};
|
|
2271
2236
|
|
|
2272
2237
|
//#endregion
|
|
@@ -2509,10 +2474,8 @@ const ChipSection = (props) => {
|
|
|
2509
2474
|
const isEmpty = (array) => Array.isArray(array) && array.length === 0;
|
|
2510
2475
|
const abbreviateLabel = (label) => {
|
|
2511
2476
|
const maxLength = 10;
|
|
2512
|
-
if (label.length > maxLength)
|
|
2513
|
-
|
|
2514
|
-
return newLabel;
|
|
2515
|
-
} else return null;
|
|
2477
|
+
if (label.length > maxLength) return label.slice(0, maxLength - 3) + "...";
|
|
2478
|
+
else return null;
|
|
2516
2479
|
};
|
|
2517
2480
|
const handleFilterChipToggle = (chip) => {
|
|
2518
2481
|
setSelectedFilterChip(chip);
|
|
@@ -3322,10 +3285,9 @@ const AmbientGridTemplate = (props) => {
|
|
|
3322
3285
|
if (!selectedView?.gridViewId) {
|
|
3323
3286
|
gcApi?.resetColumnState();
|
|
3324
3287
|
gApi?.sizeColumnsToFit();
|
|
3325
|
-
return
|
|
3288
|
+
return;
|
|
3326
3289
|
}
|
|
3327
3290
|
getView();
|
|
3328
|
-
return void 0;
|
|
3329
3291
|
}, [
|
|
3330
3292
|
setSelectedView,
|
|
3331
3293
|
selectedView,
|
|
@@ -3529,5 +3491,5 @@ AmbientGridTemplate.propTypes = {
|
|
|
3529
3491
|
};
|
|
3530
3492
|
|
|
3531
3493
|
//#endregion
|
|
3532
|
-
export { ActionContext, ActionDispatchContext, ActionLoadingDispatchContext, ActionsRenderer, AgTable, AgTableButtons, AmbientGridTemplate, AmbientTextField, AmbientToggleButton, AmbientTokenButton, DynamicContainerWithMenu, Ellipse, FilterOperators, FluentDialog, GridActionBar, GridGroupingHeader, GridGroupingSidebar, GridSidebarContainer, IconButtonWithTooltip, LicenseKey, SearchOperators, Token, clearGridState, deleteGridState, findTermByType,
|
|
3533
|
-
//# sourceMappingURL=AmbientGridTemplate-
|
|
3494
|
+
export { ActionContext, ActionDispatchContext, ActionLoadingDispatchContext, ActionsRenderer, AgTable, AgTableButtons, AmbientGridTemplate, AmbientTextField, AmbientToggleButton, AmbientTokenButton, DynamicContainerWithMenu, Ellipse, FilterOperators, FluentDialog, GridActionBar, GridGroupingHeader, GridGroupingSidebar, GridSidebarContainer, IconButtonWithTooltip, LicenseKey, SearchOperators, Token, clearGridState, deleteGridState, findTermByType, getEllipseColor, getEntityAttributes, getGridState, getPathObject, getPathParametersObj, getPrimaryKeyValues, getSuccessAction, isValueSelected, onFirstDataRendered, saveGridState, useActionState, useActionStore, useActions, useAgGridApi, useCatalogStore, useDynamicListCalculation, useExport, useGridClear, useGridFormat, useHandleAction, useInquiryStore, useQuickFilter, useSetInitialInquiryMenuVisibility };
|
|
3495
|
+
//# sourceMappingURL=AmbientGridTemplate-6xfwTiz-.js.map
|