@linzjs/lui 17.14.1 → 17.15.0

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 CHANGED
@@ -1,3 +1,10 @@
1
+ # [17.15.0](https://github.com/linz/lui/compare/v17.14.1...v17.15.0) (2022-09-20)
2
+
3
+
4
+ ### Features
5
+
6
+ * **LuiTextInput:** Adds support for ref to inputProps ([#765](https://github.com/linz/lui/issues/765)) ([056cbc4](https://github.com/linz/lui/commit/056cbc44938f6c88425e69d2dde3990c96fa0be8))
7
+
1
8
  ## [17.14.1](https://github.com/linz/lui/compare/v17.14.0...v17.14.1) (2022-09-14)
2
9
 
3
10
 
@@ -1,7 +1,7 @@
1
- import { ChangeEventHandler, InputHTMLAttributes } from 'react';
1
+ import { ChangeEventHandler, DetailedHTMLProps, InputHTMLAttributes } from 'react';
2
2
  export interface LuiTextInputProps {
3
3
  onChange?: ChangeEventHandler<HTMLInputElement>;
4
- inputProps?: InputHTMLAttributes<HTMLInputElement>;
4
+ inputProps?: DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
5
5
  error?: string;
6
6
  warning?: string;
7
7
  hideLabel?: boolean;
@@ -3,4 +3,7 @@ import { Size } from '../common/ResponsiveUtils';
3
3
  export interface ILOLActiveFirmMessageProperties {
4
4
  showFrom?: Size;
5
5
  }
6
+ /**
7
+ * Deprecated: this is LandOnline specific and has been moved to https://github.com/linz/landonline-common-js
8
+ */
6
9
  export declare const LOLActiveFirmMessage: (props: ILOLActiveFirmMessageProperties) => JSX.Element | null;
@@ -9,4 +9,7 @@ export declare const SEARCH_LABEL = "Search";
9
9
  export declare const NOC_LABEL = "Post registered NoC";
10
10
  export declare const SURVEY_LABEL = "Survey";
11
11
  export declare const TITLES_LABEL = "Dealings";
12
+ /**
13
+ * Deprecated: this is LandOnline specific and has been moved to https://github.com/linz/landonline-common-js
14
+ */
12
15
  export declare const LOLAppLauncherMenu: (props: ILOLAppLauncherMenuProps) => JSX.Element | null;
@@ -11,4 +11,7 @@ export interface LOLAuthorisedLinkProps {
11
11
  anyPrivileges: string[];
12
12
  openExternally?: boolean;
13
13
  }
14
+ /**
15
+ * Deprecated: this is LandOnline specific and has been moved to https://github.com/linz/landonline-common-js
16
+ */
14
17
  export declare const LOLAuthorisedLink: (props: LOLAuthorisedLinkProps) => JSX.Element | null;
@@ -1,5 +1,8 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { ILOLAppLauncherMenuProps } from './LOLAppLauncherMenu';
3
+ /**
4
+ * Deprecated: this is LandOnline specific and has been moved to https://github.com/linz/landonline-common-js
5
+ */
3
6
  export declare const LOLDrawerMenu: (props: {
4
7
  children: ReactNode;
5
8
  hasStickyHeader?: boolean;
@@ -2,4 +2,7 @@ import React from 'react';
2
2
  export interface ILOLDrawerMenuFirmSwitcherProperties {
3
3
  minimumFilterCount: number;
4
4
  }
5
+ /**
6
+ * Deprecated: this is LandOnline specific and has been moved to https://github.com/linz/landonline-common-js
7
+ */
5
8
  export declare const LOLDrawerMenuFirmSwitcher: React.FC<ILOLDrawerMenuFirmSwitcherProperties>;
@@ -4,6 +4,9 @@ import { ILuiDropdownMenu } from '../LuiHeaderMenu/LuiHeaderMenus';
4
4
  export declare type ILOLFirmSwitcherMenu = Omit<ILuiDropdownMenu, 'icon' | 'label'> & {
5
5
  showClientRef?: boolean;
6
6
  };
7
+ /**
8
+ * Deprecated: this is LandOnline specific and has been moved to https://github.com/linz/landonline-common-js
9
+ */
7
10
  export declare const LOLFirmSwitcherMenu: React.FC<ILOLFirmSwitcherMenu>;
8
11
  interface ILOLFirmSwitcherMenuContent {
9
12
  firms: IFirm[];
@@ -4,4 +4,7 @@ export interface Props {
4
4
  /** Return false if the logout should be aborted. */
5
5
  callBackBeforeLogout?: () => Promise<void | boolean>;
6
6
  }
7
+ /**
8
+ * Deprecated: this is LandOnline specific and has been moved to https://github.com/linz/landonline-common-js
9
+ */
7
10
  export declare const LOLLogoutLink: (props: Props) => JSX.Element | null;
@@ -6,4 +6,7 @@ export interface ILOLSearchBoxProps {
6
6
  initOptionValue?: string;
7
7
  onMenuSelect?: (e: Event) => void;
8
8
  }
9
+ /**
10
+ * Deprecated: this is LandOnline specific and has been moved to https://github.com/linz/landonline-common-js
11
+ */
9
12
  export declare const LOLSearchBox: ({ searchBoxOptions, initOptionValue, onMenuSelect, }: ILOLSearchBoxProps) => JSX.Element;
@@ -1,2 +1,5 @@
1
1
  import React from 'react';
2
+ /**
3
+ * Deprecated: this is LandOnline specific and has been moved to https://github.com/linz/landonline-common-js
4
+ */
2
5
  export declare const LOLUserLastLogin: React.FC;
@@ -12,6 +12,9 @@ interface LOLGlobalClientRefContextProviderProperties {
12
12
  useUserIdAsClientReference?: boolean;
13
13
  children: React.ReactNode;
14
14
  }
15
+ /**
16
+ * Deprecated: this is Landonline specific and has been moved to https://github.com/linz/landonline-common-js
17
+ */
15
18
  export declare const LOLGlobalClientRefContextProvider: (props: LOLGlobalClientRefContextProviderProperties) => JSX.Element;
16
19
  export declare const GLOBAL_CLIENT_REFERENCE_KEY = "globalClientReference";
17
20
  export declare function getGlobalClientRefCache(): string | null;
@@ -8,6 +8,9 @@ interface IUserContext {
8
8
  }
9
9
  declare function useLOLUserContext(): IUserContext;
10
10
  declare const LOLUserContext: React.Context<IUserContext>;
11
+ /**
12
+ * Deprecated: this is Landonline specific and has been moved to https://github.com/linz/landonline-common-js
13
+ */
11
14
  declare function LOLUserContextProvider(props: {
12
15
  children: React.ReactNode;
13
16
  }): JSX.Element;
package/dist/index.js CHANGED
@@ -28678,8 +28678,12 @@ var searchBoxOptions = [
28678
28678
  var getDefaultSearchMenuOptions = function () {
28679
28679
  return searchBoxOptions;
28680
28680
  };
28681
+ /**
28682
+ * Deprecated: this is LandOnline specific and has been moved to https://github.com/linz/landonline-common-js
28683
+ */
28681
28684
  var LOLSearchBox = function (_a) {
28682
28685
  var searchBoxOptions = _a.searchBoxOptions, initOptionValue = _a.initOptionValue, onMenuSelect = _a.onMenuSelect;
28686
+ useDeprecatedWarning('LOLSearchBox');
28683
28687
  return (React__default["default"].createElement(LuiSearchBox, { onMenuSelect: onMenuSelect, initOptionValue: initOptionValue, searchBoxOptions: searchBoxOptions ? searchBoxOptions : getDefaultSearchMenuOptions() }));
28684
28688
  };
28685
28689
 
@@ -28719,7 +28723,11 @@ var LOLUserContext = React__default["default"].createContext({
28719
28723
  isInternal: function () { return false; },
28720
28724
  hasAnyPrivilege: function () { return false; }
28721
28725
  });
28726
+ /**
28727
+ * Deprecated: this is Landonline specific and has been moved to https://github.com/linz/landonline-common-js
28728
+ */
28722
28729
  function LOLUserContextProvider(props) {
28730
+ useDeprecatedWarning('LOLUserContextProvider');
28723
28731
  var _a = useGetUserInfo(), isLoading = _a.isLoading, data = _a.data, isError = _a.isError;
28724
28732
  var _b = React.useState(), selectedFirm = _b[0], setSelectedFirm = _b[1];
28725
28733
  var _c = React.useState(false), ready = _c[0], setReady = _c[1];
@@ -28900,7 +28908,11 @@ var LOLGlobalClientRefContext = React__default["default"].createContext({
28900
28908
  // no-op
28901
28909
  }
28902
28910
  });
28911
+ /**
28912
+ * Deprecated: this is Landonline specific and has been moved to https://github.com/linz/landonline-common-js
28913
+ */
28903
28914
  var LOLGlobalClientRefContextProvider = function (props) {
28915
+ useDeprecatedWarning('LOLGlobalClientRefContextProvider');
28904
28916
  var useUserIdAsClientReference = props.useUserIdAsClientReference;
28905
28917
  var _a = useLOLUserContext(), user = _a.user, selectedFirm = _a.selectedFirm;
28906
28918
  var _b = React.useState(''), clientRef = _b[0], setClientRef = _b[1];
@@ -28959,8 +28971,12 @@ function setGlobalClientRefCache(clientReference) {
28959
28971
  }
28960
28972
  }
28961
28973
 
28974
+ /**
28975
+ * Deprecated: this is LandOnline specific and has been moved to https://github.com/linz/landonline-common-js
28976
+ */
28962
28977
  var LOLFirmSwitcherMenu = function (_a) {
28963
28978
  var _b = _a.showClientRef, showClientRef = _b === void 0 ? false : _b, restOfProps = __rest(_a, ["showClientRef"]);
28979
+ useDeprecatedWarning('LOLFirmSwitcherMenu');
28964
28980
  var _c = useLOLUserContext(), user = _c.user, selectedFirm = _c.selectedFirm, changeFirm = _c.changeFirm, isInternal = _c.isInternal;
28965
28981
  var clientRef = useLOLGlobalClientRefContext().clientRef;
28966
28982
  var firms = user.firms;
@@ -29031,7 +29047,11 @@ var FirmSwitcher = function (_a) {
29031
29047
  React__default["default"].createElement(LuiFilterContainer, { showFilter: showFilter, filterFunction: filterFunction, renderFunction: renderFunction })));
29032
29048
  };
29033
29049
 
29050
+ /**
29051
+ * Deprecated: this is LandOnline specific and has been moved to https://github.com/linz/landonline-common-js
29052
+ */
29034
29053
  var LOLLogoutLink = function (props) {
29054
+ useDeprecatedWarning('LOLLogoutLink');
29035
29055
  var redirectPathString = props.redirectPath();
29036
29056
  var user = useLOLUserContext().user;
29037
29057
  if (!user) {
@@ -29065,8 +29085,12 @@ var LOLLogoutLink = function (props) {
29065
29085
  return React__default["default"].createElement(LuiDrawerMenuOption, { label: "Logout ".concat(user.id), onClick: logout });
29066
29086
  };
29067
29087
 
29088
+ /**
29089
+ * Deprecated: this is LandOnline specific and has been moved to https://github.com/linz/landonline-common-js
29090
+ */
29068
29091
  var LOLUserLastLogin = function () {
29069
29092
  var _a;
29093
+ useDeprecatedWarning('LOLUserLastLogin');
29070
29094
  var lastLogin;
29071
29095
  var context = useLOLUserContext();
29072
29096
  var lastLoginISO = (_a = context === null || context === void 0 ? void 0 : context.user) === null || _a === void 0 ? void 0 : _a.lastLogin;
@@ -29083,7 +29107,11 @@ var LOLUserLastLogin = function () {
29083
29107
  React__default["default"].createElement("span", null, "Not you? Please, call us on 0800 665 463"))));
29084
29108
  };
29085
29109
 
29110
+ /**
29111
+ * Deprecated: this is LandOnline specific and has been moved to https://github.com/linz/landonline-common-js
29112
+ */
29086
29113
  var LOLActiveFirmMessage = function (props) {
29114
+ useDeprecatedWarning('LOLActiveFirmMessage');
29087
29115
  var _a = useLOLUserContext(), selectedFirm = _a.selectedFirm, user = _a.user;
29088
29116
  var _b = React.useState(false), visible = _b[0], setVisible = _b[1];
29089
29117
  var hide = props.showFrom !== 'xl' ? { from: props.showFrom || 'sm' } : undefined;
@@ -29105,7 +29133,11 @@ var LOLActiveFirmMessage = function (props) {
29105
29133
 
29106
29134
  var ExternalIcon = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzk4OTE4OSI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDE5SDVWNWg3VjNINWMtMS4xMSAwLTIgLjktMiAydjE0YzAgMS4xLjg5IDIgMiAyaDE0YzEuMSAwIDItLjkgMi0ydi03aC0ydjd6TTE0IDN2MmgzLjU5bC05LjgzIDkuODMgMS40MSAxLjQxTDE5IDYuNDFWMTBoMlYzaC03eiIvPjwvc3ZnPg==';
29107
29135
 
29136
+ /**
29137
+ * Deprecated: this is LandOnline specific and has been moved to https://github.com/linz/landonline-common-js
29138
+ */
29108
29139
  var LOLAuthorisedLink = function (props) {
29140
+ useDeprecatedWarning('LOLAuthorisedLink');
29109
29141
  var hasAnyPrivilege = useLOLUserContext().hasAnyPrivilege;
29110
29142
  var icon = props.icon, activeIcon = props.activeIcon, active = props.active, label = props.label, path = props.path, openExternally = props.openExternally, anyPrivileges = props.anyPrivileges;
29111
29143
  var onClickHandler = function () { return __awaiter(void 0, void 0, void 0, function () {
@@ -29160,7 +29192,11 @@ var SEARCH_LABEL = 'Search';
29160
29192
  var NOC_LABEL = 'Post registered NoC';
29161
29193
  var SURVEY_LABEL = 'Survey';
29162
29194
  var TITLES_LABEL = 'Dealings';
29195
+ /**
29196
+ * Deprecated: this is LandOnline specific and has been moved to https://github.com/linz/landonline-common-js
29197
+ */
29163
29198
  var LOLAppLauncherMenu = function (props) {
29199
+ useDeprecatedWarning('LOLAppLauncherMenu');
29164
29200
  var _a = useLOLUserContext(), user = _a.user, isInternal = _a.isInternal;
29165
29201
  var pathname = props.pathname, _b = props.enableNOCLink, enableNOCLink = _b === void 0 ? false : _b, _c = props.enableSurveyLink, enableSurveyLink = _c === void 0 ? false : _c, _d = props.enableTitlesLink, enableTitlesLink = _d === void 0 ? false : _d;
29166
29202
  if (!user) {
@@ -29213,7 +29249,11 @@ var LOLAppLauncherMenu = function (props) {
29213
29249
  return (React__default["default"].createElement(LuiDrawerMenuSection, { title: "Launch app" }, links.map(function (link) { return (React__default["default"].createElement(LOLAuthorisedLink, __assign({ key: link.path }, link))); })));
29214
29250
  };
29215
29251
 
29252
+ /**
29253
+ * Deprecated: this is LandOnline specific and has been moved to https://github.com/linz/landonline-common-js
29254
+ */
29216
29255
  var LOLDrawerMenuFirmSwitcher = function (props) {
29256
+ useDeprecatedWarning('LOLDrawerMenuFirmSwitcher');
29217
29257
  var minimumFilterCount = props.minimumFilterCount;
29218
29258
  var _a = useLOLUserContext(), user = _a.user, selectedFirm = _a.selectedFirm, changeFirm = _a.changeFirm;
29219
29259
  var firms = user === null || user === void 0 ? void 0 : user.firms;
@@ -29226,7 +29266,11 @@ var LOLDrawerMenuFirmSwitcher = function (props) {
29226
29266
  return (React__default["default"].createElement(LOLFirmSwitcherMenuContent, { firms: firms, selectedFirm: selectedFirm, changeFirm: changeFirm, collapsible: true, minimumFilterCount: minimumFilterCount }));
29227
29267
  };
29228
29268
 
29269
+ /**
29270
+ * Deprecated: this is LandOnline specific and has been moved to https://github.com/linz/landonline-common-js
29271
+ */
29229
29272
  var LOLDrawerMenu = function (props) {
29273
+ useDeprecatedWarning('LOLDrawerMenu');
29230
29274
  return (React__default["default"].createElement(LuiDrawerMenu, { hasStickyHeader: props.hasStickyHeader },
29231
29275
  React__default["default"].createElement("div", { className: "LOLDrawerMenu" },
29232
29276
  React__default["default"].createElement("div", { className: "LOLDrawerMenu-contents" }, props.children),