@linzjs/lui 17.10.1 → 17.10.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/CHANGELOG.md +7 -0
- package/dist/components/LuiFormElements/LuiCheckboxInput/LuiCheckboxInput.d.ts +1 -0
- package/dist/components/LuiForms/LuiComboSelect/LuiComboSelect.d.ts +2 -2
- package/dist/components/LuiTabs/LuiTab/LuiTab.d.ts +1 -0
- package/dist/components/lol/MockBackendUtils.d.ts +85 -85
- package/dist/components/lol/handlers.d.ts +10 -10
- package/dist/index.js +123 -169
- package/dist/index.js.map +1 -1
- package/dist/lui.esm.js +108 -154
- package/dist/lui.esm.js.map +1 -1
- package/package.json +4 -4
package/dist/lui.esm.js
CHANGED
|
@@ -7,46 +7,7 @@ import require$$1, { createPortal } from 'react-dom';
|
|
|
7
7
|
import lottie from 'lottie-web/build/player/lottie_light';
|
|
8
8
|
import { useQuery } from 'react-query';
|
|
9
9
|
|
|
10
|
-
function
|
|
11
|
-
var k, y, str='';
|
|
12
|
-
|
|
13
|
-
if (typeof mix === 'string' || typeof mix === 'number') {
|
|
14
|
-
str += mix;
|
|
15
|
-
} else if (typeof mix === 'object') {
|
|
16
|
-
if (Array.isArray(mix)) {
|
|
17
|
-
for (k=0; k < mix.length; k++) {
|
|
18
|
-
if (mix[k]) {
|
|
19
|
-
if (y = toVal(mix[k])) {
|
|
20
|
-
str && (str += ' ');
|
|
21
|
-
str += y;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
} else {
|
|
26
|
-
for (k in mix) {
|
|
27
|
-
if (mix[k]) {
|
|
28
|
-
str && (str += ' ');
|
|
29
|
-
str += k;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
return str;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function clsx () {
|
|
39
|
-
var i=0, tmp, x, str='';
|
|
40
|
-
while (i < arguments.length) {
|
|
41
|
-
if (tmp = arguments[i++]) {
|
|
42
|
-
if (x = toVal(tmp)) {
|
|
43
|
-
str && (str += ' ');
|
|
44
|
-
str += x;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
return str;
|
|
49
|
-
}
|
|
10
|
+
function r$2(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r$2(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r$2(e))&&(n&&(n+=" "),n+=t);return n}
|
|
50
11
|
|
|
51
12
|
/*! *****************************************************************************
|
|
52
13
|
Copyright (c) Microsoft Corporation.
|
|
@@ -157,15 +118,6 @@ function __read(o, n) {
|
|
|
157
118
|
return ar;
|
|
158
119
|
}
|
|
159
120
|
|
|
160
|
-
/** @deprecated */
|
|
161
|
-
function __spreadArrays() {
|
|
162
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
163
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
164
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
165
|
-
r[k] = a[j];
|
|
166
|
-
return r;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
121
|
function __spreadArray(to, from, pack) {
|
|
170
122
|
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
171
123
|
if (ar || !(i in from)) {
|
|
@@ -484,7 +436,7 @@ var ICON_SIZES = {
|
|
|
484
436
|
md: 'LuiIcon--md',
|
|
485
437
|
lg: 'LuiIcon--lg',
|
|
486
438
|
xl: 'LuiIcon--xl',
|
|
487
|
-
ns: 'LuiIcon--noSize'
|
|
439
|
+
ns: 'LuiIcon--noSize'
|
|
488
440
|
};
|
|
489
441
|
var ICON_STATUS = {
|
|
490
442
|
none: '',
|
|
@@ -492,13 +444,13 @@ var ICON_STATUS = {
|
|
|
492
444
|
warning: 'LuiIcon--warning',
|
|
493
445
|
success: 'LuiIcon--success',
|
|
494
446
|
interactive: 'LuiIcon--interactive',
|
|
495
|
-
disabled: 'LuiIcon--disabled'
|
|
447
|
+
disabled: 'LuiIcon--disabled'
|
|
496
448
|
};
|
|
497
449
|
var LuiIcon = function (_a) {
|
|
498
450
|
var name = _a.name, className = _a.className, _b = _a.size, size = _b === void 0 ? 'ns' : _b, title = _a.title, alt = _a.alt, _c = _a.status, status = _c === void 0 ? 'none' : _c, spanProps = _a.spanProps;
|
|
499
451
|
var iconSVG = ICONS[name];
|
|
500
452
|
if (!iconSVG) {
|
|
501
|
-
console.warn("<LuiIcon>: No icon found for: "
|
|
453
|
+
console.warn("<LuiIcon>: No icon found for: ".concat(iconSVG));
|
|
502
454
|
return null;
|
|
503
455
|
}
|
|
504
456
|
return (React.createElement("span", __assign({ className: clsx('LuiIcon', className, size && ICON_SIZES[size], status && ICON_STATUS[status]), "data-icon": name, title: title, "aria-label": alt }, spanProps), iconSVG));
|
|
@@ -517,21 +469,21 @@ function getMaterialIconForLevel(level) {
|
|
|
517
469
|
}
|
|
518
470
|
}
|
|
519
471
|
var LuiBanner = function (props) {
|
|
520
|
-
return (React__default.createElement("div", { className: clsx('lui-msg-banner-container', props.className ? props.className
|
|
472
|
+
return (React__default.createElement("div", { className: clsx('lui-msg-banner-container', props.className ? "".concat(props.className, "-bannerContainer") : '') },
|
|
521
473
|
React__default.createElement(LuiBannerContent, { level: props.level, className: props.className }, props.children)));
|
|
522
474
|
};
|
|
523
475
|
var LuiBannerContent = function (props) {
|
|
524
476
|
var materialIcon = getMaterialIconForLevel(props.level);
|
|
525
|
-
return (React__default.createElement("div", { className: clsx("lui-msg-"
|
|
526
|
-
React__default.createElement(LuiIcon, { name: "ic_"
|
|
477
|
+
return (React__default.createElement("div", { className: clsx("lui-msg-".concat(props.level, " lui-msg-dynamic-banner"), props.className) },
|
|
478
|
+
React__default.createElement(LuiIcon, { name: "ic_".concat(materialIcon), alt: "".concat(props.level, " banner icon"), size: "lg", className: "lui-msg-status-icon" }),
|
|
527
479
|
React__default.createElement("div", null, props.children)));
|
|
528
480
|
};
|
|
529
481
|
|
|
530
482
|
var LuiStaticMessage = function (props) {
|
|
531
483
|
var _a = useState(true), display = _a[0], setDisplay = _a[1];
|
|
532
484
|
var materialIcon = getMaterialIconForLevel(props.level);
|
|
533
|
-
return display ? (React__default.createElement("div", { className: clsx("lui-msg-"
|
|
534
|
-
React__default.createElement(LuiIcon, { name: "ic_"
|
|
485
|
+
return display ? (React__default.createElement("div", { className: clsx("lui-msg-".concat(props.level), props.className), "data-testid": 'static-message-container' },
|
|
486
|
+
React__default.createElement(LuiIcon, { name: "ic_".concat(materialIcon), alt: "".concat(props.level, " static icon"), size: "lg", className: "lui-msg-status-icon" }),
|
|
535
487
|
props.children,
|
|
536
488
|
(props.closable === undefined || props.closable) && (React__default.createElement("button", { "aria-label": "Close dialog", onClick: function () {
|
|
537
489
|
setDisplay(false);
|
|
@@ -540,7 +492,7 @@ var LuiStaticMessage = function (props) {
|
|
|
540
492
|
};
|
|
541
493
|
|
|
542
494
|
var PlainButton = React__default.forwardRef(function (props, ref) {
|
|
543
|
-
return (React__default.createElement("button", __assign({}, props.buttonProps, { type: props.type, title: props.title, disabled: props.disabled, name: props.name, onClick: props.onClick, className: clsx('lui-button', "lui-button-"
|
|
495
|
+
return (React__default.createElement("button", __assign({}, props.buttonProps, { type: props.type, title: props.title, disabled: props.disabled, name: props.name, onClick: props.onClick, className: clsx('lui-button', "lui-button-".concat(props.level), "lui-button-".concat(props.size), props.className), "data-testid": props['data-testid'], style: props.style, ref: ref }), props.children));
|
|
544
496
|
});
|
|
545
497
|
var LuiButton = React__default.forwardRef(function (props, ref) {
|
|
546
498
|
var _level = props.level ? props.level : 'primary';
|
|
@@ -551,8 +503,8 @@ var LuiButton = React__default.forwardRef(function (props, ref) {
|
|
|
551
503
|
'data-testid': props['data-testid'],
|
|
552
504
|
name: props.name,
|
|
553
505
|
title: props.title,
|
|
554
|
-
className: clsx('lui-button', "lui-button-"
|
|
555
|
-
style: props.style
|
|
506
|
+
className: clsx('lui-button', "lui-button-".concat(props.level), "lui-button-".concat(props.size), props.className),
|
|
507
|
+
style: props.style
|
|
556
508
|
};
|
|
557
509
|
if (props.openInNewTab) {
|
|
558
510
|
aProps.target = '_blank';
|
|
@@ -609,7 +561,7 @@ var LuiToastMessage = function (_a) {
|
|
|
609
561
|
}
|
|
610
562
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
611
563
|
}, [display]);
|
|
612
|
-
return (React__default.createElement("div", { role: "status", "data-testid": className, className: "lui-msg-"
|
|
564
|
+
return (React__default.createElement("div", { role: "status", "data-testid": className, className: "lui-msg-".concat(level, " lui-msg-toast lui-msg-toast-dismissable ").concat(className) },
|
|
613
565
|
React__default.createElement("i", { className: "lui-msg-status-icon material-icons-round" }, materialIcon),
|
|
614
566
|
children,
|
|
615
567
|
React__default.createElement("button", { "aria-label": "Close dialog", type: type || 'button', onClick: function () {
|
|
@@ -621,7 +573,7 @@ var LuiToastMessage = function (_a) {
|
|
|
621
573
|
|
|
622
574
|
var UIMessagingContext = createContext({
|
|
623
575
|
// @ts-ignore
|
|
624
|
-
showMessage: function (props) { }
|
|
576
|
+
showMessage: function (props) { }
|
|
625
577
|
});
|
|
626
578
|
function useShowLUIMessage() {
|
|
627
579
|
return useContext(UIMessagingContext).showMessage;
|
|
@@ -728,10 +680,10 @@ var LuiSelectMenu = function (_a) {
|
|
|
728
680
|
};
|
|
729
681
|
var LuiSelectMenuItem = function (_a) {
|
|
730
682
|
var iconName = _a.iconName, iconAlt = _a.iconAlt, level = _a.level, _b = _a.noPadding, noPadding = _b === void 0 ? false : _b, rest = __rest(_a, ["iconName", "iconAlt", "level", "noPadding"]);
|
|
731
|
-
return (React__default.createElement(MenuItem, __assign({}, rest, { className: clsx('lui-select-menuItem', "lui-select-menuItem--"
|
|
683
|
+
return (React__default.createElement(MenuItem, __assign({}, rest, { className: clsx('lui-select-menuItem', "lui-select-menuItem--".concat(level ? level : 'primary'), rest.className), "data-testid": rest['data-testid'] }),
|
|
732
684
|
iconName ? (React__default.createElement(LuiIcon, { className: "lui-select-icon", name: iconName, alt: iconAlt ? iconAlt : '', size: "md" })) : (''),
|
|
733
685
|
React__default.createElement("p", { className: clsx('lui-select-menuItemText', {
|
|
734
|
-
'lui-select-menuItemText--noPadding': noPadding
|
|
686
|
+
'lui-select-menuItemText--noPadding': noPadding
|
|
735
687
|
}) }, rest.children)));
|
|
736
688
|
};
|
|
737
689
|
var LuiSelectSubMenuItem = function (_a) {
|
|
@@ -878,7 +830,7 @@ var LuiFilterMenu = function (props) {
|
|
|
878
830
|
|
|
879
831
|
var LuiTabsContext = React__default.createContext({
|
|
880
832
|
activePanel: null,
|
|
881
|
-
setActivePanel: function () { }
|
|
833
|
+
setActivePanel: function () { }
|
|
882
834
|
});
|
|
883
835
|
var LuiTabs = function (props) {
|
|
884
836
|
var _a = useState(props.defaultPanel), activePanel = _a[0], setActivePanel = _a[1];
|
|
@@ -887,12 +839,12 @@ var LuiTabs = function (props) {
|
|
|
887
839
|
};
|
|
888
840
|
|
|
889
841
|
var LuiTab = function (props) {
|
|
890
|
-
return (React__default.createElement("button", { className: clsx('LuiTab', props.active && 'LuiTab--active'), id: props.id, role: "tab", "aria-selected": props.active, "aria-controls": ""
|
|
842
|
+
return (React__default.createElement("button", { className: clsx('LuiTab', props.active && 'LuiTab--active'), id: props.id, role: "tab", "aria-selected": props.active, "aria-controls": "".concat(props.ariaControls), title: props.titleAttribute, onClick: props.onClick }, props.children));
|
|
891
843
|
};
|
|
892
844
|
|
|
893
845
|
// import './LuiTabsGroup.scss';
|
|
894
846
|
var LuiTabsGroup = function (props) {
|
|
895
|
-
return (React__default.createElement("div", { className: "LuiTabsGroup "
|
|
847
|
+
return (React__default.createElement("div", { className: "LuiTabsGroup ".concat(props.justify ? 'LuiTabsGroup--justified' : ''), role: "tablist", "aria-label": props.ariaLabel }, props.children));
|
|
896
848
|
};
|
|
897
849
|
|
|
898
850
|
var LuiTabsPanel = function (_a) {
|
|
@@ -905,13 +857,13 @@ var LuiTabsPanel = function (_a) {
|
|
|
905
857
|
setShouldShow(true);
|
|
906
858
|
}
|
|
907
859
|
}, [active, shouldShow]);
|
|
908
|
-
return (React__default.createElement("div", { className: clsx('LuiTabsPanel', active && 'LuiTabsPanel--active'), id: panel
|
|
860
|
+
return (React__default.createElement("div", { className: clsx('LuiTabsPanel', active && 'LuiTabsPanel--active'), id: "".concat(panel, "-tab-panel"), role: "tabpanel", "aria-labelledby": "".concat(panel, "-tab") }, shouldShow ? children : null));
|
|
909
861
|
};
|
|
910
862
|
|
|
911
863
|
var LuiTabsPanelSwitch = function (props) {
|
|
912
864
|
var context = useContext(LuiTabsContext);
|
|
913
865
|
var active = context.activePanel === props.targetPanel;
|
|
914
|
-
return (React__default.createElement(LuiTab, { id: props.targetPanel
|
|
866
|
+
return (React__default.createElement(LuiTab, { id: "".concat(props.targetPanel, "-tab"), ariaControls: "".concat(props.targetPanel, "-tab-panel"), active: active, onClick: function () {
|
|
915
867
|
if (context.setActivePanel)
|
|
916
868
|
context.setActivePanel(props.targetPanel);
|
|
917
869
|
} }, props.children));
|
|
@@ -920,7 +872,7 @@ var LuiTabsPanelSwitch = function (props) {
|
|
|
920
872
|
function useDeprecatedWarning(componentName) {
|
|
921
873
|
useEffect(function () {
|
|
922
874
|
if (window.location.hostname.includes('localhost')) {
|
|
923
|
-
console.warn(componentName
|
|
875
|
+
console.warn("".concat(componentName, " will be deprecated in future versions of Lui. Please see the 'Current Deprecations' page in Lui docs."));
|
|
924
876
|
}
|
|
925
877
|
}, []);
|
|
926
878
|
}
|
|
@@ -930,7 +882,9 @@ function LuiFormikForm(props) {
|
|
|
930
882
|
// this spreads all keys, except className
|
|
931
883
|
var _a = __assign({}, props); _a.className; var formikProps = __rest(_a, ["className"]);
|
|
932
884
|
var classNames = clsx(props.className);
|
|
933
|
-
return (
|
|
885
|
+
return (
|
|
886
|
+
// @ts-ignore not fixing due this component being deprecated
|
|
887
|
+
React__default.createElement(Formik, __assign({}, formikProps),
|
|
934
888
|
React__default.createElement("div", { className: classNames },
|
|
935
889
|
React__default.createElement(Form, null,
|
|
936
890
|
props.children,
|
|
@@ -942,9 +896,9 @@ styleInject(css_248z$5);
|
|
|
942
896
|
|
|
943
897
|
var LuiError = function (_a) {
|
|
944
898
|
var error = _a.error, className = _a.className;
|
|
945
|
-
return (React__default.createElement("div", { className: "LuiError "
|
|
946
|
-
React__default.createElement(LuiIcon, { className: "LuiError-errorIcon "
|
|
947
|
-
error && (React__default.createElement("span", { className: "LuiError-errorText "
|
|
899
|
+
return (React__default.createElement("div", { className: "LuiError ".concat(className, "-error") },
|
|
900
|
+
React__default.createElement(LuiIcon, { className: "LuiError-errorIcon ".concat(className, "-errorIcon"), alt: 'Error', name: "ic_error", size: "md", status: "error" }),
|
|
901
|
+
error && (React__default.createElement("span", { className: "LuiError-errorText ".concat(className, "-errorText") }, error))));
|
|
948
902
|
};
|
|
949
903
|
|
|
950
904
|
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
|
@@ -1048,14 +1002,14 @@ var LuiCheckboxInput = function (props) {
|
|
|
1048
1002
|
return (React__default.createElement("div", { className: clsx('LuiCheckboxInput', {
|
|
1049
1003
|
'LuiCheckboxInput--isChecked': props.isChecked,
|
|
1050
1004
|
'LuiCheckboxInput--hasError': !!props.error,
|
|
1051
|
-
'LuiCheckboxInput--isDisabled': !!props.isDisabled
|
|
1005
|
+
'LuiCheckboxInput--isDisabled': !!props.isDisabled
|
|
1052
1006
|
}, props.className) },
|
|
1053
1007
|
React__default.createElement("label", { htmlFor: id, className: "LuiCheckboxInput-group" },
|
|
1054
1008
|
props.mandatory && (React__default.createElement("span", { "aria-label": "Required", className: "LuiCheckboxInput-mandatory" }, "*")),
|
|
1055
1009
|
React__default.createElement("input", __assign({ className: clsx('LuiCheckboxInput-input'), id: id, type: "checkbox", value: props.value, onChange: props.onChange, checked: props.isChecked, disabled: props.isDisabled }, props.inputProps)),
|
|
1056
1010
|
React__default.createElement("span", { className: "LuiCheckboxInput-label" },
|
|
1057
1011
|
props.label,
|
|
1058
|
-
React__default.createElement(LuiIcon, { name: props.isIndeterminate ? 'ic_zoom_out' : 'ic_check', size: "md", alt: props.isIndeterminate ? 'Indeterminate Check' : 'Check', className: "LuiCheckboxInput-labelCheck" }))),
|
|
1012
|
+
React__default.createElement(LuiIcon, { name: props.isIndeterminate ? 'ic_zoom_out' : 'ic_check', size: "md", alt: props.isIndeterminate ? 'Indeterminate Check' : 'Check', className: "LuiCheckboxInput-labelCheck", title: props.titleAttribute }))),
|
|
1059
1013
|
props.error && (React__default.createElement(LuiError, { className: "LuiCheckboxInput", error: props.error }))));
|
|
1060
1014
|
};
|
|
1061
1015
|
|
|
@@ -1086,7 +1040,7 @@ var LuiFileInputBox = function (props) {
|
|
|
1086
1040
|
var hasError = hasFileFormatError || props.showMustSelectFileError === true;
|
|
1087
1041
|
return (React__default.createElement("div", { className: clsx('LuiFileInputBox-upload', hasError && 'LuiFileInputBox-upload-error'), style: { width: props.width || 320, height: props.height || 320 } },
|
|
1088
1042
|
React__default.createElement("input", { role: "button", "aria-label": "File Upload", type: "file", className: "LuiFileInputBox-upload-input", accept: props.acceptedExtensions
|
|
1089
|
-
.map(function (extension) { return "."
|
|
1043
|
+
.map(function (extension) { return ".".concat(extension); })
|
|
1090
1044
|
.join(','), onChange: onChange }),
|
|
1091
1045
|
React__default.createElement(React__default.Fragment, null, hasError ? (React__default.createElement("div", { className: "LuiFileInputBox-upload-container" },
|
|
1092
1046
|
React__default.createElement(React__default.Fragment, null,
|
|
@@ -1143,7 +1097,7 @@ var extensionsAsHumanReadableList = function (extensions) {
|
|
|
1143
1097
|
return '';
|
|
1144
1098
|
if (extensions.length === 1)
|
|
1145
1099
|
return uppercaseExtensions[0];
|
|
1146
|
-
return uppercaseExtensions.slice(0, -1).join(', ')
|
|
1100
|
+
return "".concat(uppercaseExtensions.slice(0, -1).join(', '), " or ").concat(uppercaseExtensions[extensions.length - 1]);
|
|
1147
1101
|
};
|
|
1148
1102
|
|
|
1149
1103
|
var LuiSelectInput = function (props) {
|
|
@@ -1184,17 +1138,17 @@ var LuiRadioInput = function (props) {
|
|
|
1184
1138
|
var id = useGenerateOrDefaultId((_a = props.inputProps) === null || _a === void 0 ? void 0 : _a.id);
|
|
1185
1139
|
return (React__default.createElement(React__default.Fragment, null,
|
|
1186
1140
|
React__default.createElement("div", { className: clsx('LuiRadioInput', {
|
|
1187
|
-
'LuiRadioInput--hasError': props.error
|
|
1141
|
+
'LuiRadioInput--hasError': props.error
|
|
1188
1142
|
}) },
|
|
1189
1143
|
React__default.createElement("fieldset", { className: 'LuiRadioInput-fieldset' },
|
|
1190
1144
|
props.legend && (React__default.createElement("legend", { className: "LuiRadioInput-legend" }, props.legend)),
|
|
1191
1145
|
props.options.map(function (option, index) {
|
|
1192
|
-
var radioId = id
|
|
1146
|
+
var radioId = "".concat(id, "-").concat(index);
|
|
1193
1147
|
var isSelected = props.selectedValue === option;
|
|
1194
1148
|
var isDisabled = props.isOptionDisabled && props.isOptionDisabled(index);
|
|
1195
1149
|
return (React__default.createElement("label", { htmlFor: radioId, className: clsx('LuiRadioInput-label', {
|
|
1196
1150
|
'LuiRadioInput-label--isDisabled': isDisabled,
|
|
1197
|
-
'LuiRadioInput-label--isSelected': isSelected
|
|
1151
|
+
'LuiRadioInput-label--isSelected': isSelected
|
|
1198
1152
|
}), key: radioId },
|
|
1199
1153
|
React__default.createElement("input", __assign({ disabled: isDisabled, className: "LuiRadioInput-input", type: "radio", id: radioId, name: option, value: option, checked: isSelected, onChange: props.onChange }, props.inputProps)),
|
|
1200
1154
|
props.renderLabelFor ? props.renderLabelFor(option) : option));
|
|
@@ -1222,7 +1176,7 @@ function LuiFormikCheckbox(props) {
|
|
|
1222
1176
|
|
|
1223
1177
|
var LuiFormikFormLabel = function (props) {
|
|
1224
1178
|
useDeprecatedWarning('LuiFormikFormLabel');
|
|
1225
|
-
return (React__default.createElement("div", { className: clsx('LuiFormLabel-wrapper', props.className && ""
|
|
1179
|
+
return (React__default.createElement("div", { className: clsx('LuiFormLabel-wrapper', props.className && "".concat(props.className)) },
|
|
1226
1180
|
props.children,
|
|
1227
1181
|
React__default.createElement("label", { className: "LuiFormLabel", htmlFor: props["for"] },
|
|
1228
1182
|
props.required && React__default.createElement("span", { className: "lui-required-input-icon" }, "*"),
|
|
@@ -1243,7 +1197,7 @@ var LuiFormikTextInput = connect(function (props) {
|
|
|
1243
1197
|
if (props.onValueChange) {
|
|
1244
1198
|
props.onValueChange({
|
|
1245
1199
|
value: event.target.value,
|
|
1246
|
-
formik: props.formik
|
|
1200
|
+
formik: props.formik
|
|
1247
1201
|
});
|
|
1248
1202
|
}
|
|
1249
1203
|
} }))) : (React__default.createElement("textarea", __assign({ id: props.name, "data-testid": props.name }, field, { rows: 1 }, props.inputProps, { onChange: function (event) {
|
|
@@ -1252,12 +1206,12 @@ var LuiFormikTextInput = connect(function (props) {
|
|
|
1252
1206
|
if (props.onValueChange) {
|
|
1253
1207
|
props.onValueChange({
|
|
1254
1208
|
value: event.target.value,
|
|
1255
|
-
formik: props.formik
|
|
1209
|
+
formik: props.formik
|
|
1256
1210
|
});
|
|
1257
1211
|
}
|
|
1258
1212
|
} })));
|
|
1259
1213
|
};
|
|
1260
|
-
return (React__default.createElement("div", { className: clsx(props.className && ""
|
|
1214
|
+
return (React__default.createElement("div", { className: clsx(props.className && "".concat(props.className)) },
|
|
1261
1215
|
props.label && (React__default.createElement(LuiFormikFormLabel, { required: props.required, label: props.label, "for": props.name, tooltip: props.tooltip })),
|
|
1262
1216
|
props.helperInfo,
|
|
1263
1217
|
React__default.createElement(Field, { name: props.name, validate: props.validate }, function (_a) {
|
|
@@ -1466,7 +1420,7 @@ var LuiBearingInput = function (props) {
|
|
|
1466
1420
|
remainder += '0';
|
|
1467
1421
|
}
|
|
1468
1422
|
var minutes = parseInt(remainder.substr(0, 2));
|
|
1469
|
-
var seconds = parseFloat(remainder.substr(2, 2)
|
|
1423
|
+
var seconds = parseFloat("".concat(remainder.substr(2, 2), ".").concat(remainder.length > 4 ? remainder.substr(4, 2) : '0'));
|
|
1470
1424
|
return { sign: sign, degrees: degrees, minutes: minutes, seconds: seconds };
|
|
1471
1425
|
};
|
|
1472
1426
|
var validateBearing = function (bearing) {
|
|
@@ -1484,13 +1438,13 @@ var LuiBearingInput = function (props) {
|
|
|
1484
1438
|
var formatBearing = function (decimalIsh) {
|
|
1485
1439
|
var _a = parseBearing(decimalIsh), sign = _a.sign, degrees = _a.degrees, minutes = _a.minutes, seconds = _a.seconds;
|
|
1486
1440
|
var displaySign = degrees === 0 && minutes === 0 && seconds === 0 ? '' : sign;
|
|
1487
|
-
return displaySign
|
|
1441
|
+
return "".concat(displaySign, " ").concat(degrees, "\u00B0 ").concat(padToTwo(minutes), "' ").concat(padToTwo(seconds), "\"");
|
|
1488
1442
|
};
|
|
1489
1443
|
var onChange = function (event) {
|
|
1490
1444
|
var newValue = event.target.value;
|
|
1491
1445
|
if (newValue === '' ||
|
|
1492
1446
|
newValue === '-' ||
|
|
1493
|
-
newValue.match(RegExp("^-?[0-9]+(\\.[0-9]{0,"
|
|
1447
|
+
newValue.match(RegExp("^-?[0-9]+(\\.[0-9]{0,".concat(maxAfterDP, "})?$")))) {
|
|
1494
1448
|
props.onChange && props.onChange(event);
|
|
1495
1449
|
}
|
|
1496
1450
|
else {
|
|
@@ -25040,7 +24994,7 @@ var LuiLottieLight = function (_a) {
|
|
|
25040
24994
|
container: element.current,
|
|
25041
24995
|
rendererSettings: rendererSettings,
|
|
25042
24996
|
autoplay: autoplay,
|
|
25043
|
-
loop: loop
|
|
24997
|
+
loop: loop
|
|
25044
24998
|
});
|
|
25045
24999
|
}
|
|
25046
25000
|
return function () {
|
|
@@ -25055,7 +25009,7 @@ var LuiLottieLight = function (_a) {
|
|
|
25055
25009
|
var autoplay = !isChromatic();
|
|
25056
25010
|
var style = { height: 148, width: 148 };
|
|
25057
25011
|
var renderSettings = {
|
|
25058
|
-
preserveAspectRatio: 'xMidYMid slice'
|
|
25012
|
+
preserveAspectRatio: 'xMidYMid slice'
|
|
25059
25013
|
};
|
|
25060
25014
|
var LuiLoadingSpinnerBase = function (props) {
|
|
25061
25015
|
return (React__default.createElement("div", { style: {
|
|
@@ -25064,7 +25018,7 @@ var LuiLoadingSpinnerBase = function (props) {
|
|
|
25064
25018
|
left: '50%',
|
|
25065
25019
|
zIndex: 1000,
|
|
25066
25020
|
marginLeft: '-74px',
|
|
25067
|
-
marginTop: '-74px'
|
|
25021
|
+
marginTop: '-74px'
|
|
25068
25022
|
}, "data-testid": "loading-spinner" },
|
|
25069
25023
|
React__default.createElement(LuiLottieLight, { animationData: props.animationData, loop: true, autoplay: autoplay, rendererSettings: renderSettings, style: style })));
|
|
25070
25024
|
};
|
|
@@ -25079,17 +25033,17 @@ var LuiStatusSpinner = function (props) {
|
|
|
25079
25033
|
top: '50%',
|
|
25080
25034
|
left: '50%',
|
|
25081
25035
|
marginLeft: '-150px',
|
|
25082
|
-
marginTop: '74px'
|
|
25036
|
+
marginTop: '74px'
|
|
25083
25037
|
} },
|
|
25084
25038
|
React__default.createElement("div", { style: {
|
|
25085
25039
|
textAlign: 'center',
|
|
25086
|
-
width: '300px'
|
|
25040
|
+
width: '300px'
|
|
25087
25041
|
} }, props.children))));
|
|
25088
25042
|
};
|
|
25089
25043
|
var LuiMiniSpinner = function (props) {
|
|
25090
25044
|
return (React__default.createElement("div", __assign({}, props.divProps),
|
|
25091
25045
|
React__default.createElement(LuiLottieLight, { animationData: loaderData, loop: true, autoplay: autoplay, rendererSettings: {
|
|
25092
|
-
preserveAspectRatio: 'xMidYMid slice'
|
|
25046
|
+
preserveAspectRatio: 'xMidYMid slice'
|
|
25093
25047
|
}, style: { height: props.size, width: props.size } })));
|
|
25094
25048
|
};
|
|
25095
25049
|
var LuiLoadingSpinner = function () {
|
|
@@ -25103,7 +25057,8 @@ var LuiLoadingSpinnerChristmas = function () {
|
|
|
25103
25057
|
};
|
|
25104
25058
|
// this function was extracted from chromatic/isChromatic. It was causing TS issues for the consumer
|
|
25105
25059
|
function isChromatic() {
|
|
25106
|
-
return !!((window === null || window === void 0 ? void 0 : window.navigator.userAgent.match(/Chromatic/)) ||
|
|
25060
|
+
return !!((window === null || window === void 0 ? void 0 : window.navigator.userAgent.match(/Chromatic/)) ||
|
|
25061
|
+
(window === null || window === void 0 ? void 0 : window.location.href.match(/chromatic=true/)));
|
|
25107
25062
|
}
|
|
25108
25063
|
|
|
25109
25064
|
var css_248z$4 = ":export {\n charcoal: #2a292c;\n fuscous: #6b6966;\n gray: #989189;\n silver: #beb9b4;\n lily: #eaeaea;\n hint: #f9f9f9;\n snow: #ffffff;\n white: #ffffff;\n teal: #00425d;\n sea: #007198;\n electric: #0096cc;\n spray: #73c8e1;\n polar: #e2f3f7;\n sherpa: #004b50;\n surfie: #017a76;\n persian: #00a599;\n downy: #73cdc8;\n iceberg: #dcf5f0;\n sacramento: #004e32;\n salem: #08814d;\n pigment: #0aa245;\n granny: #9bd79b;\n panache: #e9fae7;\n brand-primary: #004b50;\n brand-secondary: #017a76;\n error: #cc0000;\n error-bg: #f5cccc;\n error-focus: #5a0000;\n warning: #ea6a2e;\n warning-bg: #fbdfd2;\n warning-focus: #b33a01;\n success: #0aa245;\n success-bg: #e9fae7;\n info: #3a7cdf;\n info-bg: #d8e5f9;\n visited: #00425d;\n green-hover: #107c3a;\n green-active: #094a22;\n green-btn: #0aa245;\n txt-link: #0096cc;\n primary-hover-btn: #005678;\n selection: #c7e9f3;\n heading-color: #017a76;\n heading-color--secondary: #2a292c;\n base-type-color: #2a292c;\n input-text: #2a292c;\n input-placeholder: #6b6966;\n input-placeholder-when-disabled: #989189;\n base-icon-color: #007198;\n disabled-color: #989189;\n disabled-color-dark: #6b6966;\n linz-color-primary: #023d48;\n linz-color-primary-hover: #01818a;\n linz-color-tertiary: #e1e44a;\n linz-color-tertiary-hover: #cdcf59;\n color-test-pink: #f09;\n linz-linear-gradient-blue: linear-gradient(70deg, #00425d 12%, #007198 100%);\n linz-linear-gradient-teal: linear-gradient(270deg, #00a599 1%, #73cdc8 100%);\n}";
|
|
@@ -25221,8 +25176,8 @@ var LuiLoadingIndicator = function () { return React__default.createElement(LuiM
|
|
|
25221
25176
|
function LuiComboSelectActual(givenProps, ref) {
|
|
25222
25177
|
var props = Object.assign({
|
|
25223
25178
|
noOptionsMessage: function (i) {
|
|
25224
|
-
return "No options found containing '"
|
|
25225
|
-
}
|
|
25179
|
+
return "No options found containing '".concat(i.inputValue, "'");
|
|
25180
|
+
}
|
|
25226
25181
|
}, givenProps);
|
|
25227
25182
|
props.components = __assign({ LoadingIndicator: LuiLoadingIndicator }, props.components);
|
|
25228
25183
|
// box-shadow: "-8px 0px 0 0 #cc0000";
|
|
@@ -25232,12 +25187,12 @@ function LuiComboSelectActual(givenProps, ref) {
|
|
|
25232
25187
|
control: function (provided, state) { return (__assign(__assign({}, provided), {
|
|
25233
25188
|
/* matches style of .LuiTextInput-input */
|
|
25234
25189
|
boxShadow: 'none', border: state.isFocused ? '1px solid #053d52' : '1px solid #b2b2b2', '&:hover, &:active': {
|
|
25235
|
-
borderColor: '#053d52'
|
|
25190
|
+
borderColor: '#053d52'
|
|
25236
25191
|
} })); },
|
|
25237
25192
|
dropdownIndicator: function (provided) { return (__assign(__assign({}, provided), { color: css_248z$4['fuscous'] })); },
|
|
25238
25193
|
indicatorSeparator: function (provided) { return (__assign(__assign({}, provided), { width: 0 })); },
|
|
25239
25194
|
input: function (provided) { return (__assign(__assign({}, provided), { height: '40px', minHeight: '40px', fontWeight: 400, input: {
|
|
25240
|
-
height: '38px !important'
|
|
25195
|
+
height: '38px !important'
|
|
25241
25196
|
} })); },
|
|
25242
25197
|
singleValue: function (provided) { return (__assign(__assign({}, provided), { color: '#414042', fontWeight: 400 })); },
|
|
25243
25198
|
placeholder: function (provided) { return (__assign(__assign({}, provided), {
|
|
@@ -25246,7 +25201,7 @@ function LuiComboSelectActual(givenProps, ref) {
|
|
|
25246
25201
|
option: function (provided, _a) {
|
|
25247
25202
|
var isSelected = _a.isSelected;
|
|
25248
25203
|
return (__assign(__assign({}, provided), { color: css_248z$4['input-text'], backgroundColor: isSelected ? css_248z$4['selection'] : css_248z$4['white'] }));
|
|
25249
|
-
}
|
|
25204
|
+
}
|
|
25250
25205
|
} });
|
|
25251
25206
|
return (React__default.createElement("label", { htmlFor: id, className: clsx('LuiComboSelect-label', props.error && 'hasError') },
|
|
25252
25207
|
React__default.createElement("span", { className: clsx('LuiSelect-label-text', props.hideLabel ? 'LuiScreenReadersOnly' : '') }, props.label),
|
|
@@ -25336,7 +25291,7 @@ var buildHideClassDict = function (_a) {
|
|
|
25336
25291
|
'lui-hide-sm': inRange('sm'),
|
|
25337
25292
|
'lui-hide-md': inRange('md'),
|
|
25338
25293
|
'lui-hide-lg': inRange('lg'),
|
|
25339
|
-
'lui-hide-xl': inRange('xl')
|
|
25294
|
+
'lui-hide-xl': inRange('xl')
|
|
25340
25295
|
};
|
|
25341
25296
|
};
|
|
25342
25297
|
|
|
@@ -25356,7 +25311,7 @@ var LuiHeader = function (_a) {
|
|
|
25356
25311
|
'lui-header': true,
|
|
25357
25312
|
'lui-header-transparent': transparent,
|
|
25358
25313
|
'lui-header-small': size === 'small',
|
|
25359
|
-
'lui-header-sticky': sticky
|
|
25314
|
+
'lui-header-sticky': sticky
|
|
25360
25315
|
}) },
|
|
25361
25316
|
React__default.createElement("div", { className: "lui-header-row" },
|
|
25362
25317
|
React__default.createElement("div", { className: "lui-header-col" },
|
|
@@ -25376,7 +25331,7 @@ var LuiHeaderMenuItem = forwardRef(function (_a, ref) {
|
|
|
25376
25331
|
var resolvedIcon = !icon && !label ? 'menu' : icon;
|
|
25377
25332
|
return (React__default.createElement("div", { className: menuItemClasses, ref: ref },
|
|
25378
25333
|
React__default.createElement("div", { className: clsx('lui-header-menu-icon', onClick && 'clickable'), onClick: onClick, "data-testid": dataTestId },
|
|
25379
|
-
resolvedIcon && (React__default.createElement("i", { className: "material-icons-round md-36" }, resolvedIcon)),
|
|
25334
|
+
resolvedIcon && (React__default.createElement("i", { title: "Main menu", className: "material-icons-round md-36" }, resolvedIcon)),
|
|
25380
25335
|
label && React__default.createElement("div", { className: "lui-menu-label" }, label),
|
|
25381
25336
|
badge && React__default.createElement("div", { className: "badge" }, badge)),
|
|
25382
25337
|
children));
|
|
@@ -25384,7 +25339,7 @@ var LuiHeaderMenuItem = forwardRef(function (_a, ref) {
|
|
|
25384
25339
|
var LuiCloseableHeaderMenuContext = createContext({
|
|
25385
25340
|
isOpen: function () { return false; },
|
|
25386
25341
|
open: function () { },
|
|
25387
|
-
close: function () { }
|
|
25342
|
+
close: function () { }
|
|
25388
25343
|
});
|
|
25389
25344
|
var LuiCloseableHeaderMenuItem = function (_a) {
|
|
25390
25345
|
var open = _a.open, setOpen = _a.setOpen, props = __rest(_a, ["open", "setOpen"]);
|
|
@@ -25398,7 +25353,7 @@ var LuiCloseableHeaderMenuItem = function (_a) {
|
|
|
25398
25353
|
var menuControls = {
|
|
25399
25354
|
isOpen: function () { return open; },
|
|
25400
25355
|
open: function () { return setOpen(true); },
|
|
25401
|
-
close: function () { return setOpen(false); }
|
|
25356
|
+
close: function () { return setOpen(false); }
|
|
25402
25357
|
};
|
|
25403
25358
|
var menuItemProps = __assign({ onClick: function () { return menuControls.open(); } }, props);
|
|
25404
25359
|
return (React__default.createElement(LuiCloseableHeaderMenuContext.Provider, { value: menuControls },
|
|
@@ -25431,8 +25386,7 @@ var LuiDrawerMenu = function (_a) {
|
|
|
25431
25386
|
var restOfProps = __rest(_a, []);
|
|
25432
25387
|
var children = restOfProps.children, _b = restOfProps.hasStickyHeader, hasStickyHeader = _b === void 0 ? true : _b, menuPropsCopy = __rest(restOfProps, ["children", "hasStickyHeader"]);
|
|
25433
25388
|
var _c = useState(false), open = _c[0], setOpen = _c[1];
|
|
25434
|
-
var closeableMenuProps = __assign(__assign({}, menuPropsCopy), { open: open,
|
|
25435
|
-
setOpen: setOpen, icon: open ? 'close' : 'menu', onClick: function () { return setOpen(!open); } });
|
|
25389
|
+
var closeableMenuProps = __assign(__assign({}, menuPropsCopy), { open: open, setOpen: setOpen, icon: open ? 'close' : 'menu', onClick: function () { return setOpen(!open); } });
|
|
25436
25390
|
useEffect(function () {
|
|
25437
25391
|
// Support for non-sticky headers. Scroll back to top when menu is opened
|
|
25438
25392
|
if (open && !hasStickyHeader) {
|
|
@@ -25449,7 +25403,7 @@ var LuiDrawerMenu = function (_a) {
|
|
|
25449
25403
|
return (React__default.createElement(LuiCloseableHeaderMenuItem, __assign({}, closeableMenuProps),
|
|
25450
25404
|
React__default.createElement("div", { className: clsx({
|
|
25451
25405
|
'lui-menu-drawer': true,
|
|
25452
|
-
'lui-menu-drawer-closed': !open
|
|
25406
|
+
'lui-menu-drawer-closed': !open
|
|
25453
25407
|
}), "data-testid": 'drawer', "aria-hidden": !open }, children)));
|
|
25454
25408
|
};
|
|
25455
25409
|
var LuiDropdownMenu = function (_a) {
|
|
@@ -25460,7 +25414,7 @@ var LuiDropdownMenu = function (_a) {
|
|
|
25460
25414
|
return (React__default.createElement(LuiCloseableHeaderMenuItem, __assign({}, closeableMenuProps),
|
|
25461
25415
|
React__default.createElement("div", { className: clsx({
|
|
25462
25416
|
'lui-menu-dropdown lui-box-shadow': true,
|
|
25463
|
-
'lui-menu-dropdown-closed': !open
|
|
25417
|
+
'lui-menu-dropdown-closed': !open
|
|
25464
25418
|
}), "data-testid": 'dropdown', "aria-hidden": !open },
|
|
25465
25419
|
children,
|
|
25466
25420
|
' ')));
|
|
@@ -27823,8 +27777,8 @@ function polyfill(Component) {
|
|
|
27823
27777
|
}
|
|
27824
27778
|
|
|
27825
27779
|
var reactLifecyclesCompat_es = /*#__PURE__*/Object.freeze({
|
|
27826
|
-
|
|
27827
|
-
|
|
27780
|
+
__proto__: null,
|
|
27781
|
+
polyfill: polyfill
|
|
27828
27782
|
});
|
|
27829
27783
|
|
|
27830
27784
|
var require$$6 = /*@__PURE__*/getAugmentedNamespace(reactLifecyclesCompat_es);
|
|
@@ -28183,7 +28137,7 @@ var LuiModal = function (props) {
|
|
|
28183
28137
|
}
|
|
28184
28138
|
}
|
|
28185
28139
|
return (React__default.createElement(Modal, __assign({ key: props.key, isOpen: true, shouldCloseOnOverlayClick: props.shouldCloseOnOverlayClick, onRequestClose: props.onClose, overlayClassName: "modal", className: props.lowContrast ? 'lui-scrim-low-contrast' : 'lui-scrim', ariaHideApp: !isTest }, (props.appendToElement && {
|
|
28186
|
-
parentSelector: props.appendToElement
|
|
28140
|
+
parentSelector: props.appendToElement
|
|
28187
28141
|
})),
|
|
28188
28142
|
React__default.createElement("div", { ref: node, className: clsx('lui-modal lui-box-shadow', props.maxWidth && 'lui-max-width', props.headingText && 'lui-modal-no-padding', props.className) },
|
|
28189
28143
|
props.headingText && (React__default.createElement(LuiModalHeader, { headingText: props.headingText, onClose: props.onClose })),
|
|
@@ -28191,8 +28145,8 @@ var LuiModal = function (props) {
|
|
|
28191
28145
|
};
|
|
28192
28146
|
var LuiAlertModal = function (props) {
|
|
28193
28147
|
var materialIcon = getMaterialIconForLevel(props.level);
|
|
28194
|
-
return (React__default.createElement(LuiModal, { key: props.key, shouldCloseOnOverlayClick: props.shouldCloseOnOverlayClick, onClose: props.onClose, className: clsx("lui-modal-"
|
|
28195
|
-
React__default.createElement(LuiIcon, { name: "ic_"
|
|
28148
|
+
return (React__default.createElement(LuiModal, { key: props.key, shouldCloseOnOverlayClick: props.shouldCloseOnOverlayClick, onClose: props.onClose, className: clsx("lui-modal-".concat(props.level), props.className), appendToElement: props.appendToElement },
|
|
28149
|
+
React__default.createElement(LuiIcon, { name: "ic_".concat(materialIcon), alt: "".concat(props.level, " status icon"), size: "lg", className: "lui-msg-status-icon" }),
|
|
28196
28150
|
props.children));
|
|
28197
28151
|
};
|
|
28198
28152
|
var LuiAlertModalButtons = function (props) {
|
|
@@ -28382,7 +28336,7 @@ var LuiSearchInput = function (props) {
|
|
|
28382
28336
|
function moveUp() {
|
|
28383
28337
|
var items = flatten(results);
|
|
28384
28338
|
var takeNext = false;
|
|
28385
|
-
for (var _i = 0, _a =
|
|
28339
|
+
for (var _i = 0, _a = __spreadArray([], items, true).reverse(); _i < _a.length; _i++) {
|
|
28386
28340
|
var item = _a[_i];
|
|
28387
28341
|
if (item.id === selectedId) {
|
|
28388
28342
|
takeNext = true;
|
|
@@ -28462,7 +28416,7 @@ var LuiSearchInput = function (props) {
|
|
|
28462
28416
|
onClick: function () {
|
|
28463
28417
|
setInputValue('');
|
|
28464
28418
|
setResults([]);
|
|
28465
|
-
}
|
|
28419
|
+
}
|
|
28466
28420
|
} })) : null;
|
|
28467
28421
|
var searchIcon = (React__default.createElement(LuiIcon, { className: 'LuiSearchInput-startIconPosition', name: "ic_search", size: "md", alt: "search", spanProps: { onClick: function () { var _a; return (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus(); } } }));
|
|
28468
28422
|
var typeMore = 'You need to type a few more characters';
|
|
@@ -28480,7 +28434,7 @@ var LuiSearchInput = function (props) {
|
|
|
28480
28434
|
return typeMore;
|
|
28481
28435
|
}
|
|
28482
28436
|
if (props.name)
|
|
28483
|
-
return "The "
|
|
28437
|
+
return "The ".concat(props.name, " could not be displayed or does not exist.");
|
|
28484
28438
|
else
|
|
28485
28439
|
return null;
|
|
28486
28440
|
}
|
|
@@ -28566,17 +28520,17 @@ var renderSelectMenu = function (items, onClick) { return (React__default.create
|
|
|
28566
28520
|
return (React__default.createElement(React__default.Fragment, { key: item.value },
|
|
28567
28521
|
item.groupDivider ? React__default.createElement(LuiSelectMenuDivider, null) : null,
|
|
28568
28522
|
item.groupTitle ? (React__default.createElement(LuiSelectMenuHeader, null, item.groupTitle)) : null,
|
|
28569
|
-
React__default.createElement(LuiSelectMenuItem, { "data-testid": "select-box-"
|
|
28523
|
+
React__default.createElement(LuiSelectMenuItem, { "data-testid": "select-box-".concat(item.value), value: item.value, onClick: onClick, noPadding: true }, item.title)));
|
|
28570
28524
|
}))); };
|
|
28571
28525
|
|
|
28572
28526
|
var exampleSearchResults = [
|
|
28573
28527
|
{
|
|
28574
28528
|
id: 'DP44035-1',
|
|
28575
|
-
description: 'This is a example Newlands search result'
|
|
28529
|
+
description: 'This is a example Newlands search result'
|
|
28576
28530
|
},
|
|
28577
28531
|
{
|
|
28578
28532
|
id: 'DP44035-2',
|
|
28579
|
-
description: 'This is a example Newlands search result 2'
|
|
28533
|
+
description: 'This is a example Newlands search result 2'
|
|
28580
28534
|
},
|
|
28581
28535
|
];
|
|
28582
28536
|
var getDefaultOptions = function (input) {
|
|
@@ -28609,28 +28563,28 @@ var searchBoxOptions = [
|
|
|
28609
28563
|
disclaimer: 'This is a default disclaimer, add your own search options',
|
|
28610
28564
|
getOption: getDefaultOptions,
|
|
28611
28565
|
onSelectOption: defaultSelectOption,
|
|
28612
|
-
renderItem: defaultRenderItem
|
|
28566
|
+
renderItem: defaultRenderItem
|
|
28613
28567
|
},
|
|
28614
28568
|
{
|
|
28615
28569
|
value: 'titleReference',
|
|
28616
28570
|
title: 'Title Reference',
|
|
28617
28571
|
placeholderText: 'Enter a title reference e.g. TN117/154',
|
|
28618
28572
|
getOption: getDefaultOptions,
|
|
28619
|
-
onSelectOption: defaultSelectOption
|
|
28573
|
+
onSelectOption: defaultSelectOption
|
|
28620
28574
|
},
|
|
28621
28575
|
{
|
|
28622
28576
|
value: 'ownerName',
|
|
28623
28577
|
title: 'Registered Owner',
|
|
28624
28578
|
placeholderText: 'Enter owners name',
|
|
28625
28579
|
getOption: getDefaultOptions,
|
|
28626
|
-
onSelectOption: defaultSelectOption
|
|
28580
|
+
onSelectOption: defaultSelectOption
|
|
28627
28581
|
},
|
|
28628
28582
|
{
|
|
28629
28583
|
value: 'lgdId',
|
|
28630
28584
|
title: 'Legal Description',
|
|
28631
28585
|
placeholderText: 'Example: Lot 2 DP 1234',
|
|
28632
28586
|
getOption: getDefaultOptions,
|
|
28633
|
-
onSelectOption: defaultSelectOption
|
|
28587
|
+
onSelectOption: defaultSelectOption
|
|
28634
28588
|
},
|
|
28635
28589
|
{
|
|
28636
28590
|
value: 'parcelId',
|
|
@@ -28638,7 +28592,7 @@ var searchBoxOptions = [
|
|
|
28638
28592
|
placeholderText: 'Enter a parcel id e.g 93851642',
|
|
28639
28593
|
disclaimer: 'testdd2',
|
|
28640
28594
|
getOption: getDefaultOptions,
|
|
28641
|
-
onSelectOption: defaultSelectOption
|
|
28595
|
+
onSelectOption: defaultSelectOption
|
|
28642
28596
|
},
|
|
28643
28597
|
{
|
|
28644
28598
|
groupTitle: 'Survey',
|
|
@@ -28647,7 +28601,7 @@ var searchBoxOptions = [
|
|
|
28647
28601
|
title: 'Survey number',
|
|
28648
28602
|
placeholderText: 'Enter a survey number, e.g. DP 44035',
|
|
28649
28603
|
getOption: getDefaultOptions,
|
|
28650
|
-
onSelectOption: defaultSelectOption
|
|
28604
|
+
onSelectOption: defaultSelectOption
|
|
28651
28605
|
},
|
|
28652
28606
|
{
|
|
28653
28607
|
groupTitle: 'Instrument',
|
|
@@ -28656,7 +28610,7 @@ var searchBoxOptions = [
|
|
|
28656
28610
|
title: 'Instrument Number',
|
|
28657
28611
|
placeholderText: 'Example: 7723502.2',
|
|
28658
28612
|
getOption: getDefaultOptions,
|
|
28659
|
-
onSelectOption: defaultSelectOption
|
|
28613
|
+
onSelectOption: defaultSelectOption
|
|
28660
28614
|
},
|
|
28661
28615
|
];
|
|
28662
28616
|
var getDefaultSearchMenuOptions = function () {
|
|
@@ -28701,7 +28655,7 @@ var LOLUserContext = React__default.createContext({
|
|
|
28701
28655
|
console.error('Called changeFirm before UserContext loaded', firmId);
|
|
28702
28656
|
},
|
|
28703
28657
|
isInternal: function () { return false; },
|
|
28704
|
-
hasAnyPrivilege: function () { return false; }
|
|
28658
|
+
hasAnyPrivilege: function () { return false; }
|
|
28705
28659
|
});
|
|
28706
28660
|
function LOLUserContextProvider(props) {
|
|
28707
28661
|
var _a = useGetUserInfo(), isLoading = _a.isLoading, data = _a.data, isError = _a.isError;
|
|
@@ -28782,7 +28736,7 @@ function LOLUserContextProvider(props) {
|
|
|
28782
28736
|
selectedFirm: selectedFirm,
|
|
28783
28737
|
changeFirm: changeFirm,
|
|
28784
28738
|
isInternal: isInternal,
|
|
28785
|
-
hasAnyPrivilege: hasAnyPrivilege
|
|
28739
|
+
hasAnyPrivilege: hasAnyPrivilege
|
|
28786
28740
|
} }, props.children));
|
|
28787
28741
|
}
|
|
28788
28742
|
else {
|
|
@@ -28811,8 +28765,8 @@ function useGetUserInfo() {
|
|
|
28811
28765
|
}); });
|
|
28812
28766
|
}
|
|
28813
28767
|
function reAuthUser() {
|
|
28814
|
-
var redirectPath = ""
|
|
28815
|
-
window.location.assign("/auth/login?redirectPath="
|
|
28768
|
+
var redirectPath = "".concat(window.location.pathname).concat(window.location.search).concat(window.location.hash);
|
|
28769
|
+
window.location.assign("/auth/login?redirectPath=".concat(encodeURIComponent(redirectPath)));
|
|
28816
28770
|
}
|
|
28817
28771
|
function checkForStandardErrors(res) {
|
|
28818
28772
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -28869,7 +28823,7 @@ var LuiFilterContainer = function (props) {
|
|
|
28869
28823
|
return (React__default.createElement("div", null,
|
|
28870
28824
|
showFilter && (React__default.createElement("div", { className: 'LuiFilterContainer-filter-container LuiDeprecatedForms' },
|
|
28871
28825
|
isFilterClearable && (React__default.createElement(ClearableLuiTextInput, { label: 'Filter', inputProps: {
|
|
28872
|
-
placeholder: 'Type to filter'
|
|
28826
|
+
placeholder: 'Type to filter'
|
|
28873
28827
|
}, hideLabel: true, onValueChange: function (value) { return setFilter(value); } })),
|
|
28874
28828
|
!isFilterClearable && (React__default.createElement("input", { type: "text", placeholder: "Type to filter", value: filter, onChange: function (e) { return setFilter(e.target.value); } })))),
|
|
28875
28829
|
renderFunction(filterFunction(filter))));
|
|
@@ -28882,7 +28836,7 @@ var LOLGlobalClientRefContext = React__default.createContext({
|
|
|
28882
28836
|
clientRef: '',
|
|
28883
28837
|
changeClientRef: function () {
|
|
28884
28838
|
// no-op
|
|
28885
|
-
}
|
|
28839
|
+
}
|
|
28886
28840
|
});
|
|
28887
28841
|
var LOLGlobalClientRefContextProvider = function (props) {
|
|
28888
28842
|
var useUserIdAsClientReference = props.useUserIdAsClientReference;
|
|
@@ -28927,7 +28881,7 @@ var LOLGlobalClientRefContextProvider = function (props) {
|
|
|
28927
28881
|
]);
|
|
28928
28882
|
return (React__default.createElement(LOLGlobalClientRefContext.Provider, { value: {
|
|
28929
28883
|
clientRef: clientRef,
|
|
28930
|
-
changeClientRef: changeClientRef
|
|
28884
|
+
changeClientRef: changeClientRef
|
|
28931
28885
|
} }, props.children));
|
|
28932
28886
|
};
|
|
28933
28887
|
var GLOBAL_CLIENT_REFERENCE_KEY = 'globalClientReference';
|
|
@@ -28980,7 +28934,7 @@ var LOLFirmSwitcherMenuContent = function (_a) {
|
|
|
28980
28934
|
};
|
|
28981
28935
|
var FirmOption = function (_a) {
|
|
28982
28936
|
var _b = _a.value, id = _b.id, name = _b.name, onSelect = _a.onSelect, selected = _a.selected, disabled = _a.disabled;
|
|
28983
|
-
return (React__default.createElement("div", { className: 'LOLFirmSwitcherMenu-option', onClick: function () { return onSelect(id); }, "aria-disabled": disabled, "data-testid": "firm-"
|
|
28937
|
+
return (React__default.createElement("div", { className: 'LOLFirmSwitcherMenu-option', onClick: function () { return onSelect(id); }, "aria-disabled": disabled, "data-testid": "firm-".concat(id) },
|
|
28984
28938
|
React__default.createElement("span", null, name),
|
|
28985
28939
|
selected && React__default.createElement("i", { className: "material-icons-round" }, "check_circle")));
|
|
28986
28940
|
};
|
|
@@ -29040,13 +28994,13 @@ var LOLLogoutLink = function (props) {
|
|
|
29040
28994
|
case 3:
|
|
29041
28995
|
res = _b.sent();
|
|
29042
28996
|
if (res.status === 200) {
|
|
29043
|
-
window.location.assign("/auth/login?redirectPath="
|
|
28997
|
+
window.location.assign("/auth/login?redirectPath=".concat(redirectPathString));
|
|
29044
28998
|
}
|
|
29045
28999
|
return [2 /*return*/];
|
|
29046
29000
|
}
|
|
29047
29001
|
});
|
|
29048
29002
|
}); };
|
|
29049
|
-
return React__default.createElement(LuiDrawerMenuOption, { label: "Logout "
|
|
29003
|
+
return React__default.createElement(LuiDrawerMenuOption, { label: "Logout ".concat(user.id), onClick: logout });
|
|
29050
29004
|
};
|
|
29051
29005
|
|
|
29052
29006
|
var LOLUserLastLogin = function () {
|
|
@@ -29137,7 +29091,7 @@ function createLink(pathname, label, target, activeIcon, icon, anyPrivileges) {
|
|
|
29137
29091
|
activeIcon: activeIcon,
|
|
29138
29092
|
active: pathname.startsWith(target),
|
|
29139
29093
|
anyPrivileges: anyPrivileges,
|
|
29140
|
-
openExternally: true
|
|
29094
|
+
openExternally: true
|
|
29141
29095
|
};
|
|
29142
29096
|
}
|
|
29143
29097
|
var SEARCH_LABEL = 'Search';
|
|
@@ -29241,7 +29195,7 @@ var LOLCommonDrawerMenuAfterLinks = function (props) {
|
|
|
29241
29195
|
};
|
|
29242
29196
|
return (React__default.createElement(React__default.Fragment, null,
|
|
29243
29197
|
!isInternal() && (React__default.createElement(LuiDrawerMenuOption, { label: "Change password", onClick: function () {
|
|
29244
|
-
gotoLink("/manage/my-preferences?redirectPath="
|
|
29198
|
+
gotoLink("/manage/my-preferences?redirectPath=".concat(encodeURIComponent(path)));
|
|
29245
29199
|
} })),
|
|
29246
29200
|
React__default.createElement(LOLLogoutLink, { redirectPath: function () { return contextPath; } })));
|
|
29247
29201
|
};
|
|
@@ -32787,19 +32741,19 @@ var id = 0;
|
|
|
32787
32741
|
var getKey = function () { return id++; };
|
|
32788
32742
|
var LuiTooltip = function (props) {
|
|
32789
32743
|
var children = props.children, message = props.message, placement = props.placement, trigger = props.trigger, _a = props.animation, animation = _a === void 0 ? true : _a;
|
|
32790
|
-
var id = "LuiToolTip_"
|
|
32744
|
+
var id = "LuiToolTip_".concat(useMemo(getKey, []));
|
|
32791
32745
|
if (typeof message !== 'string') {
|
|
32792
32746
|
throw new Error('LuiTooltip message must be a string!');
|
|
32793
32747
|
}
|
|
32794
32748
|
useEffect(function () {
|
|
32795
|
-
tippy("#"
|
|
32749
|
+
tippy("#".concat(id), {
|
|
32796
32750
|
content: message,
|
|
32797
32751
|
arrow: true,
|
|
32798
32752
|
trigger: trigger,
|
|
32799
32753
|
theme: 'LUI',
|
|
32800
32754
|
placement: placement,
|
|
32801
32755
|
offset: [0, 24],
|
|
32802
|
-
animation: animation
|
|
32756
|
+
animation: animation
|
|
32803
32757
|
});
|
|
32804
32758
|
return function () {
|
|
32805
32759
|
var _a, _b;
|
|
@@ -32864,7 +32818,7 @@ var LuiSidePanelContainer = function (props) {
|
|
|
32864
32818
|
transition: 'width 0.2s ease',
|
|
32865
32819
|
boxShadow: '-0.1em 0 0.4em rgba(0, 0, 0, 0.2)',
|
|
32866
32820
|
padding: 0,
|
|
32867
|
-
zIndex: 3
|
|
32821
|
+
zIndex: 3
|
|
32868
32822
|
} },
|
|
32869
32823
|
children && (React__default.createElement("button", { type: "button", "data-testid": "close", onClick: onClose, style: {
|
|
32870
32824
|
color: '#5e5e61',
|
|
@@ -32875,7 +32829,7 @@ var LuiSidePanelContainer = function (props) {
|
|
|
32875
32829
|
border: 'none',
|
|
32876
32830
|
display: 'flex',
|
|
32877
32831
|
cursor: 'pointer',
|
|
32878
|
-
borderBottomLeftRadius: '5px'
|
|
32832
|
+
borderBottomLeftRadius: '5px'
|
|
32879
32833
|
} },
|
|
32880
32834
|
React__default.createElement(LuiIcon, { alt: "Close", name: "ic_clear", size: "lg", status: "interactive" }))),
|
|
32881
32835
|
children));
|
|
@@ -40468,14 +40422,14 @@ var LuiAccordicard = function (props) {
|
|
|
40468
40422
|
opacity: {
|
|
40469
40423
|
delay: 0.1,
|
|
40470
40424
|
duration: 0.6,
|
|
40471
|
-
ease: [0.04, 0.62, 0.23, 0.98]
|
|
40425
|
+
ease: [0.04, 0.62, 0.23, 0.98]
|
|
40472
40426
|
},
|
|
40473
40427
|
height: {
|
|
40474
40428
|
delay: 0,
|
|
40475
40429
|
duration: 0.2,
|
|
40476
|
-
ease: [0.04, 0.62, 0.23, 0.98]
|
|
40477
|
-
}
|
|
40478
|
-
}
|
|
40430
|
+
ease: [0.04, 0.62, 0.23, 0.98]
|
|
40431
|
+
}
|
|
40432
|
+
}
|
|
40479
40433
|
},
|
|
40480
40434
|
collapsed: {
|
|
40481
40435
|
opacity: 0,
|
|
@@ -40484,15 +40438,15 @@ var LuiAccordicard = function (props) {
|
|
|
40484
40438
|
opacity: {
|
|
40485
40439
|
delay: 0,
|
|
40486
40440
|
duration: 0.2,
|
|
40487
|
-
ease: [0.04, 0.62, 0.23, 0.98]
|
|
40441
|
+
ease: [0.04, 0.62, 0.23, 0.98]
|
|
40488
40442
|
},
|
|
40489
40443
|
height: {
|
|
40490
40444
|
delay: 0.1,
|
|
40491
40445
|
duration: 0.2,
|
|
40492
|
-
ease: [0.04, 0.62, 0.23, 0.98]
|
|
40493
|
-
}
|
|
40494
|
-
}
|
|
40495
|
-
}
|
|
40446
|
+
ease: [0.04, 0.62, 0.23, 0.98]
|
|
40447
|
+
}
|
|
40448
|
+
}
|
|
40449
|
+
}
|
|
40496
40450
|
} },
|
|
40497
40451
|
React__default.createElement("div", { className: clsx('LuiAccordicard-content', isOpen ? 'LuiAccordicard-content--isOpen' : null) }, isOpen ? children : React__default.createElement(React__default.Fragment, null))));
|
|
40498
40452
|
};
|
|
@@ -40513,7 +40467,7 @@ var LuiAccordicardStatic = function (props) {
|
|
|
40513
40467
|
React__default.createElement("div", { className: clsx('LuiAccordicardStatic-contentWrapper', isOpen ? 'LuiAccordicardStatic-contentWrapper--isOpen' : null) },
|
|
40514
40468
|
React__default.createElement("div", { className: clsx('LuiAccordicardStatic-content', isOpen ? 'LuiAccordicardStatic-content--isOpen' : null) }, isOpen ? children : React__default.createElement(React__default.Fragment, null))),
|
|
40515
40469
|
React__default.createElement("button", { "aria-label": isOpen ? 'Expanded' : 'Closed', className: "LuiAccordicardStatic-trigger", onClick: function () { return setIsOpen(!isOpen); } },
|
|
40516
|
-
React__default.createElement(LuiIcon, { className: clsx('LuiAccordicardStatic-chevron', isOpen ? 'LuiAccordicardStatic-chevron--isOpen' : null), name: 'ic_expand_more', alt: "expand", size: "md" }))));
|
|
40470
|
+
React__default.createElement(LuiIcon, { className: clsx('LuiAccordicardStatic-chevron', isOpen ? 'LuiAccordicardStatic-chevron--isOpen' : null), name: 'ic_expand_more', alt: "expand", title: "Expand and collapse panel", size: "md" }))));
|
|
40517
40471
|
};
|
|
40518
40472
|
|
|
40519
40473
|
export { FIRM_KEY, FIRM_NAME_KEY, GLOBAL_CLIENT_REFERENCE_KEY, LOLActiveFirmMessage, LOLAuthorisedLink, LOLCommonDrawerMenu, LOLCommonDrawerMenuAfterLinks, LOLDrawerMenu, LOLFirmSwitcherMenu, LOLGlobalClientRefContext, LOLGlobalClientRefContextProvider, LOLLogoutLink, LOLSearchBox, LOLUserContext, LOLUserContextProvider, LOLUserLastLogin, LuiAccordicard, LuiAccordicardStatic, LuiAlertModal, LuiAlertModalButtons, LuiBadge, LuiBanner, LuiBannerContent, LuiBearingFormikInput, LuiBearingInput, LuiButton, LuiButtonGroup, LuiCheckboxInput, LuiCloseableHeaderMenuContext, LuiCloseableHeaderMenuItem, LuiComboSelect, LuiControlledMenu, LuiDrawerMenu, LuiDrawerMenuDivider, LuiDrawerMenuOption, LuiDrawerMenuOptions, LuiDrawerMenuSection, LuiDropdownMenu, LuiErrorPage, LuiExpandableBanner, LuiFileInputBox, LuiFilterContainer, LuiFilterMenu, LuiFooter, LuiFormSectionHeader, LuiFormikCheckbox, LuiFormikForm, LuiFormikFormLabel, LuiFormikFormSubmitButton, LuiFormikRadioButton, LuiFormikRadioGroup, LuiFormikSelect, LuiFormikTextInput, LuiHeader, LuiHeaderMenuItem, LuiIcon, LuiLoadingSpinner, LuiLoadingSpinnerChristmas, LuiLoadingSpinnerEaster, LuiMenu, LuiMenuCloseButton, LuiMessagingContextProvider, LuiMiniSpinner, LuiModal, LuiRadioInput, LuiSearchBox, LuiSearchInput, LuiSelectDataMenu, LuiSelectInput, LuiSelectMenu, LuiSelectMenuItem, LuiSelectSubMenuItem, LuiShadow, LuiSidePanel, LuiSidePanelProvider, LuiStaticMessage, LuiStatusSpinner, LuiSwitchButton, LuiTab, LuiTabs, LuiTabsContext, LuiTabsGroup, LuiTabsPanel, LuiTabsPanelSwitch, LuiTextAreaInput, LuiTextInput, LuiToastMessage, LuiTooltip, LuiUpdatesSplashModal, getDefaultSearchMenuOptions, isChromatic, useClickedOutsideElement, useLOLGlobalClientRefContext, useLOLUserContext, useShowLUIMessage };
|