@gpa-gemstone/react-forms 1.1.113 → 1.1.115
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/AutoCompleteInput.js +12 -1
- package/lib/AutoCompleteMultiInput.d.ts +52 -0
- package/lib/AutoCompleteMultiInput.js +104 -0
- package/lib/AutoCompleteTextArea.js +12 -1
- package/lib/MultiInput.js +9 -3
- package/lib/MultiSearchableSelect.js +9 -3
- package/lib/SearchableSelect.js +2 -1
- package/lib/ToolTip.js +8 -2
- package/lib/index.d.ts +2 -1
- package/lib/index.js +3 -1
- package/package.json +1 -1
package/lib/AutoCompleteInput.js
CHANGED
|
@@ -21,6 +21,17 @@
|
|
|
21
21
|
// Generated original version of source code.
|
|
22
22
|
//
|
|
23
23
|
// ******************************************************************************************************
|
|
24
|
+
var __assign = (this && this.__assign) || function () {
|
|
25
|
+
__assign = Object.assign || function(t) {
|
|
26
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
27
|
+
s = arguments[i];
|
|
28
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
29
|
+
t[p] = s[p];
|
|
30
|
+
}
|
|
31
|
+
return t;
|
|
32
|
+
};
|
|
33
|
+
return __assign.apply(this, arguments);
|
|
34
|
+
};
|
|
24
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
36
|
exports.getCurrentVariable = exports.getSuggestions = void 0;
|
|
26
37
|
exports.default = AutoCompleteInput;
|
|
@@ -122,7 +133,7 @@ function AutoCompleteInput(props) {
|
|
|
122
133
|
}
|
|
123
134
|
};
|
|
124
135
|
return (React.createElement("div", { ref: autoCompleteInput },
|
|
125
|
-
React.createElement(Input_1.default, {
|
|
136
|
+
React.createElement(Input_1.default, __assign({}, props, { InputRef: inputElement })),
|
|
126
137
|
position == null || !show ? null :
|
|
127
138
|
React.createElement(react_portal_1.Portal, null,
|
|
128
139
|
React.createElement("div", { ref: tableContainer, className: 'popover', style: {
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Gemstone } from '@gpa-gemstone/application-typings';
|
|
3
|
+
interface IProps<T> extends Omit<Gemstone.TSX.Interfaces.IBaseFormProps<T>, 'Valid' | 'Feedback'> {
|
|
4
|
+
/**
|
|
5
|
+
* CSS styles to apply to the Input component
|
|
6
|
+
* @type {React.CSSProperties}
|
|
7
|
+
* @optional
|
|
8
|
+
*/
|
|
9
|
+
Style?: React.CSSProperties;
|
|
10
|
+
/**
|
|
11
|
+
* Default value to use when adding an item and when value is null
|
|
12
|
+
* @type {number | string}
|
|
13
|
+
*/
|
|
14
|
+
DefaultValue: number | string;
|
|
15
|
+
/**
|
|
16
|
+
* Flag to allow null values
|
|
17
|
+
* @type {boolean}
|
|
18
|
+
* @optional
|
|
19
|
+
*/
|
|
20
|
+
AllowNull?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Function to determine the validity of a field
|
|
23
|
+
* @param value - The value of the item to check
|
|
24
|
+
* @param index - The index of the item in the array
|
|
25
|
+
* @param arr - The full array of items
|
|
26
|
+
* @returns {boolean}
|
|
27
|
+
*/
|
|
28
|
+
ItemValid?: (value: string | number, index: number, arr: Array<string | number>) => boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Feedback message to show when input is invalid
|
|
31
|
+
* @param value - The value of the item to check
|
|
32
|
+
* @param index - The index of the item in the array
|
|
33
|
+
* @param arr - The full array of items
|
|
34
|
+
* @returns {string | undefined}
|
|
35
|
+
*/
|
|
36
|
+
ItemFeedback?: (value: string | number, index: number, arr: Array<string | number>) => string | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Flag to disable add button
|
|
39
|
+
*/
|
|
40
|
+
DisableAdd?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Flag to disable all input fields
|
|
43
|
+
*/
|
|
44
|
+
Disabled?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* List of autocomplete suggestion options
|
|
47
|
+
* @type {string[]}
|
|
48
|
+
*/
|
|
49
|
+
Options: string[];
|
|
50
|
+
}
|
|
51
|
+
declare function AutoCompleteMultiInput<T>(props: IProps<T>): JSX.Element;
|
|
52
|
+
export default AutoCompleteMultiInput;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// ******************************************************************************************************
|
|
3
|
+
// AutoCompleteMultiInput.tsx - Gbtc
|
|
4
|
+
//
|
|
5
|
+
// Copyright © 2026, Grid Protection Alliance. All Rights Reserved.
|
|
6
|
+
//
|
|
7
|
+
// Licensed to the Grid Protection Alliance (GPA) under one or more contributor license agreements. See
|
|
8
|
+
// the NOTICE file distributed with this work for additional information regarding copyright ownership.
|
|
9
|
+
// The GPA licenses this file to you under the MIT License (MIT), the "License"; you may not use this
|
|
10
|
+
// file except in compliance with the License. You may obtain a copy of the License at:
|
|
11
|
+
//
|
|
12
|
+
// http://opensource.org/licenses/MIT
|
|
13
|
+
//
|
|
14
|
+
// Unless agreed to in writing, the subject software distributed under the License is distributed on an
|
|
15
|
+
// "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Refer to the
|
|
16
|
+
// License for the specific language governing permissions and limitations.
|
|
17
|
+
//
|
|
18
|
+
// Code Modification History:
|
|
19
|
+
// ----------------------------------------------------------------------------------------------------
|
|
20
|
+
// 02/26/2026 - Preston Crawford
|
|
21
|
+
// Generated original version of source code.
|
|
22
|
+
//
|
|
23
|
+
// ******************************************************************************************************
|
|
24
|
+
var __assign = (this && this.__assign) || function () {
|
|
25
|
+
__assign = Object.assign || function(t) {
|
|
26
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
27
|
+
s = arguments[i];
|
|
28
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
29
|
+
t[p] = s[p];
|
|
30
|
+
}
|
|
31
|
+
return t;
|
|
32
|
+
};
|
|
33
|
+
return __assign.apply(this, arguments);
|
|
34
|
+
};
|
|
35
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
36
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
37
|
+
if (ar || !(i in from)) {
|
|
38
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
39
|
+
ar[i] = from[i];
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
43
|
+
};
|
|
44
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
|
+
var React = require("react");
|
|
46
|
+
var AutoCompleteInput_1 = require("./AutoCompleteInput");
|
|
47
|
+
var gpa_symbols_1 = require("@gpa-gemstone/gpa-symbols");
|
|
48
|
+
var HelpIcon_1 = require("./HelpIcon");
|
|
49
|
+
function AutoCompleteMultiInput(props) {
|
|
50
|
+
var _a, _b;
|
|
51
|
+
var fieldArray = props.Record[props.Field];
|
|
52
|
+
if ((fieldArray === null || fieldArray === void 0 ? void 0 : fieldArray.constructor) !== Array) {
|
|
53
|
+
console.warn("AutoCompleteMultiInput: ".concat(props.Field.toString(), " is not of type array."));
|
|
54
|
+
return React.createElement(React.Fragment, null);
|
|
55
|
+
}
|
|
56
|
+
// Variables to control the rendering of label and help icon.
|
|
57
|
+
var showLabel = props.Label !== "";
|
|
58
|
+
var label = props.Label === undefined ? props.Field : props.Label;
|
|
59
|
+
return (React.createElement(React.Fragment, null,
|
|
60
|
+
fieldArray.length === 0 ?
|
|
61
|
+
React.createElement(React.Fragment, null, showLabel ?
|
|
62
|
+
React.createElement("label", { className: "d-flex align-items-center" },
|
|
63
|
+
React.createElement("span", null, showLabel ? label : ''),
|
|
64
|
+
React.createElement(HelpIcon_1.default, { Help: props.Help }),
|
|
65
|
+
React.createElement("button", { className: 'btn', style: ((_a = props.DisableAdd) !== null && _a !== void 0 ? _a : false) || ((_b = props.Disabled) !== null && _b !== void 0 ? _b : false) ? { display: 'none' } : undefined, onClick: function () {
|
|
66
|
+
var _a;
|
|
67
|
+
return props.Setter(__assign(__assign({}, props.Record), (_a = {}, _a[props.Field] = [props.DefaultValue], _a)));
|
|
68
|
+
} },
|
|
69
|
+
React.createElement(gpa_symbols_1.ReactIcons.CirclePlus, null)))
|
|
70
|
+
: null)
|
|
71
|
+
: null,
|
|
72
|
+
fieldArray.map(function (r, index) {
|
|
73
|
+
var _a, _b, _c, _d, _e;
|
|
74
|
+
return (React.createElement("div", { className: 'row no-gutters', key: index },
|
|
75
|
+
React.createElement("div", { className: 'col-10' },
|
|
76
|
+
React.createElement(AutoCompleteInput_1.default, { Record: fieldArray, Field: index, Label: index === 0 ? props.Label : '', AllowNull: props.AllowNull, Help: index === 0 ? props.Help : undefined, Feedback: (_b = (_a = props.ItemFeedback) === null || _a === void 0 ? void 0 : _a.call(props, r, index, fieldArray)) !== null && _b !== void 0 ? _b : undefined, Valid: function () { var _a, _b; return (_b = (_a = props.ItemValid) === null || _a === void 0 ? void 0 : _a.call(props, r, index, fieldArray)) !== null && _b !== void 0 ? _b : true; }, Style: props.Style, Disabled: props.Disabled, DefaultValue: typeof props.DefaultValue === 'number' ? props.DefaultValue : undefined, Options: props.Options, Setter: function (record) {
|
|
77
|
+
var _a;
|
|
78
|
+
var _b;
|
|
79
|
+
var newArray = __spreadArray([], fieldArray, true);
|
|
80
|
+
if (!((_b = props.AllowNull) !== null && _b !== void 0 ? _b : true) && record[index] === null)
|
|
81
|
+
newArray[index] = props.DefaultValue;
|
|
82
|
+
else
|
|
83
|
+
newArray[index] = record[index];
|
|
84
|
+
props.Setter(__assign(__assign({}, props.Record), (_a = {}, _a[props.Field] = newArray, _a)));
|
|
85
|
+
} })),
|
|
86
|
+
React.createElement("div", { className: "col-".concat(index === __spreadArray([], fieldArray, true).length - 1 ? 1 : 2, " ").concat(index === 0 ? 'd-flex align-items-center justify-content-center' : '') },
|
|
87
|
+
React.createElement("button", { className: 'btn', style: ((_c = props.Disabled) !== null && _c !== void 0 ? _c : false) ? { display: 'none' } : undefined, onClick: function () {
|
|
88
|
+
var _a;
|
|
89
|
+
var newRecords = __spreadArray([], fieldArray, true).filter(function (_, i) { return i !== index; });
|
|
90
|
+
props.Setter(__assign(__assign({}, props.Record), (_a = {}, _a[props.Field] = newRecords, _a)));
|
|
91
|
+
} },
|
|
92
|
+
React.createElement(gpa_symbols_1.ReactIcons.TrashCan, { Color: 'red' }))),
|
|
93
|
+
index === __spreadArray([], fieldArray, true).length - 1 ?
|
|
94
|
+
React.createElement("div", { className: "col-1 ".concat(index === 0 ? 'd-flex align-items-center justify-content-center' : '') },
|
|
95
|
+
React.createElement("button", { className: 'btn', style: ((_d = props.DisableAdd) !== null && _d !== void 0 ? _d : false) || ((_e = props.Disabled) !== null && _e !== void 0 ? _e : false) ? { display: 'none' } : undefined, onClick: function () {
|
|
96
|
+
var _a;
|
|
97
|
+
var newRecords = __spreadArray(__spreadArray([], __spreadArray([], fieldArray, true), true), [props.DefaultValue], false);
|
|
98
|
+
props.Setter(__assign(__assign({}, props.Record), (_a = {}, _a[props.Field] = newRecords, _a)));
|
|
99
|
+
} },
|
|
100
|
+
React.createElement(gpa_symbols_1.ReactIcons.CirclePlus, null)))
|
|
101
|
+
: null));
|
|
102
|
+
})));
|
|
103
|
+
}
|
|
104
|
+
exports.default = AutoCompleteMultiInput;
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
2
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
14
|
exports.default = AutoCompleteTextArea;
|
|
4
15
|
var React = require("react");
|
|
@@ -101,7 +112,7 @@ function AutoCompleteTextArea(props) {
|
|
|
101
112
|
setSuggestions([]);
|
|
102
113
|
};
|
|
103
114
|
return (React.createElement("div", { ref: autoCompleteTextArea },
|
|
104
|
-
React.createElement(TextArea_1.default, {
|
|
115
|
+
React.createElement(TextArea_1.default, __assign({}, props, { TextAreaRef: textAreaElement, SpellCheck: false })),
|
|
105
116
|
position == null || !show ? React.createElement(React.Fragment, null) :
|
|
106
117
|
React.createElement(react_portal_1.Portal, null,
|
|
107
118
|
React.createElement("div", { ref: tableContainer, className: 'popover', style: {
|
package/lib/MultiInput.js
CHANGED
|
@@ -48,6 +48,7 @@ var gpa_symbols_1 = require("@gpa-gemstone/gpa-symbols");
|
|
|
48
48
|
var HelpIcon_1 = require("./HelpIcon");
|
|
49
49
|
//Only supporting string/number arrays for now
|
|
50
50
|
function MultiInput(props) {
|
|
51
|
+
var _a, _b;
|
|
51
52
|
var fieldArray = props.Record[props.Field];
|
|
52
53
|
if ((fieldArray === null || fieldArray === void 0 ? void 0 : fieldArray.constructor) !== Array) {
|
|
53
54
|
console.warn("MultiInput: ".concat(props.Field.toString(), " is not of type array."));
|
|
@@ -61,11 +62,16 @@ function MultiInput(props) {
|
|
|
61
62
|
React.createElement(React.Fragment, null, showLabel ?
|
|
62
63
|
React.createElement("label", { className: "d-flex align-items-center" },
|
|
63
64
|
React.createElement("span", null, showLabel ? label : ''),
|
|
64
|
-
React.createElement(HelpIcon_1.default, { Help: props.Help })
|
|
65
|
+
React.createElement(HelpIcon_1.default, { Help: props.Help }),
|
|
66
|
+
React.createElement("button", { className: 'btn', style: ((_a = props.DisableAdd) !== null && _a !== void 0 ? _a : false) || ((_b = props.Disabled) !== null && _b !== void 0 ? _b : false) ? { display: 'none' } : undefined, onClick: function () {
|
|
67
|
+
var _a;
|
|
68
|
+
return props.Setter(__assign(__assign({}, props.Record), (_a = {}, _a[props.Field] = [props.DefaultValue], _a)));
|
|
69
|
+
} },
|
|
70
|
+
React.createElement(gpa_symbols_1.ReactIcons.CirclePlus, null)))
|
|
65
71
|
: null)
|
|
66
72
|
: null,
|
|
67
73
|
fieldArray.map(function (r, index) {
|
|
68
|
-
var _a, _b, _c, _d, _e
|
|
74
|
+
var _a, _b, _c, _d, _e;
|
|
69
75
|
return (React.createElement("div", { className: 'row no-gutters', key: index },
|
|
70
76
|
React.createElement("div", { className: 'col-10' },
|
|
71
77
|
React.createElement(Input_1.default, { Record: fieldArray, Field: index, Label: index === 0 ? props.Label : '', AllowNull: props.AllowNull, Type: props.Type, Help: index === 0 ? props.Help : undefined, Feedback: (_b = (_a = props.ItemFeedback) === null || _a === void 0 ? void 0 : _a.call(props, r, index, fieldArray)) !== null && _b !== void 0 ? _b : undefined, Valid: function () { var _a, _b; return (_b = (_a = props.ItemValid) === null || _a === void 0 ? void 0 : _a.call(props, r, index, fieldArray)) !== null && _b !== void 0 ? _b : true; }, Style: props.Style, Disabled: props.Disabled, Setter: function (record) {
|
|
@@ -87,7 +93,7 @@ function MultiInput(props) {
|
|
|
87
93
|
React.createElement(gpa_symbols_1.ReactIcons.TrashCan, { Color: 'red' }))),
|
|
88
94
|
index === __spreadArray([], fieldArray, true).length - 1 ?
|
|
89
95
|
React.createElement("div", { className: "col-1 ".concat(index === 0 ? 'd-flex align-items-center justify-content-center' : '') },
|
|
90
|
-
React.createElement("button", { className: 'btn', style: ((
|
|
96
|
+
React.createElement("button", { className: 'btn', style: ((_d = props.DisableAdd) !== null && _d !== void 0 ? _d : false) || ((_e = props.Disabled) !== null && _e !== void 0 ? _e : false) ? { display: 'none' } : undefined, onClick: function () {
|
|
91
97
|
var _a;
|
|
92
98
|
var newRecords = __spreadArray(__spreadArray([], __spreadArray([], fieldArray, true), true), [props.DefaultValue], false);
|
|
93
99
|
props.Setter(__assign(__assign({}, props.Record), (_a = {}, _a[props.Field] = newRecords, _a)));
|
|
@@ -48,6 +48,7 @@ var gpa_symbols_1 = require("@gpa-gemstone/gpa-symbols");
|
|
|
48
48
|
var HelpIcon_1 = require("./HelpIcon");
|
|
49
49
|
//Only supporting string/number arrays for now
|
|
50
50
|
function MultiSearchableSelect(props) {
|
|
51
|
+
var _a, _b;
|
|
51
52
|
var fieldArray = props.Record[props.Field];
|
|
52
53
|
if ((fieldArray === null || fieldArray === void 0 ? void 0 : fieldArray.constructor) !== Array) {
|
|
53
54
|
console.warn("MultiInput: ".concat(props.Field.toString(), " is not of type array."));
|
|
@@ -61,11 +62,16 @@ function MultiSearchableSelect(props) {
|
|
|
61
62
|
React.createElement(React.Fragment, null, showLabel ?
|
|
62
63
|
React.createElement("label", { className: "d-flex align-items-center" },
|
|
63
64
|
React.createElement("span", null, showLabel ? label : ''),
|
|
64
|
-
React.createElement(HelpIcon_1.default, { Help: props.Help })
|
|
65
|
+
React.createElement(HelpIcon_1.default, { Help: props.Help }),
|
|
66
|
+
React.createElement("button", { className: 'btn', style: ((_a = props.DisableAdd) !== null && _a !== void 0 ? _a : false) || ((_b = props.Disabled) !== null && _b !== void 0 ? _b : false) ? { display: 'none' } : undefined, onClick: function () {
|
|
67
|
+
var _a;
|
|
68
|
+
return props.Setter(__assign(__assign({}, props.Record), (_a = {}, _a[props.Field] = [props.DefaultValue], _a)), 0, { Label: props.DefaultValue.toString(), Value: props.DefaultValue });
|
|
69
|
+
} },
|
|
70
|
+
React.createElement(gpa_symbols_1.ReactIcons.CirclePlus, null)))
|
|
65
71
|
: null)
|
|
66
72
|
: null,
|
|
67
73
|
fieldArray.map(function (r, index) {
|
|
68
|
-
var _a, _b, _c, _d, _e
|
|
74
|
+
var _a, _b, _c, _d, _e;
|
|
69
75
|
return (React.createElement("div", { className: 'row align-items-center', key: index },
|
|
70
76
|
React.createElement("div", { className: 'col-10' },
|
|
71
77
|
React.createElement(SearchableSelect_1.default, { Record: fieldArray, Field: index, Label: index === 0 ? props.Label : '', Help: index === 0 ? props.Help : undefined, Feedback: (_b = (_a = props.ItemFeedback) === null || _a === void 0 ? void 0 : _a.call(props, r, index, fieldArray)) !== null && _b !== void 0 ? _b : undefined, Valid: function () { var _a, _b; return (_b = (_a = props.ItemValid) === null || _a === void 0 ? void 0 : _a.call(props, r, index, fieldArray)) !== null && _b !== void 0 ? _b : true; }, Style: props.Style, Disabled: props.Disabled, Setter: function (record, option) {
|
|
@@ -83,7 +89,7 @@ function MultiSearchableSelect(props) {
|
|
|
83
89
|
React.createElement(gpa_symbols_1.ReactIcons.TrashCan, { Color: 'red' }))),
|
|
84
90
|
index === __spreadArray([], fieldArray, true).length - 1 ?
|
|
85
91
|
React.createElement("div", { className: "col-1 ".concat(index === 0 ? 'd-flex align-items-center' : '') },
|
|
86
|
-
React.createElement("button", { className: 'btn', style: ((
|
|
92
|
+
React.createElement("button", { className: 'btn', style: ((_d = props.DisableAdd) !== null && _d !== void 0 ? _d : false) || ((_e = props.Disabled) !== null && _e !== void 0 ? _e : false) ? { display: 'none' } : undefined, onClick: function () {
|
|
87
93
|
var _a;
|
|
88
94
|
var newRecords = __spreadArray(__spreadArray([], __spreadArray([], fieldArray, true), true), [props.DefaultValue], false);
|
|
89
95
|
props.Setter(__assign(__assign({}, props.Record), (_a = {}, _a[props.Field] = newRecords, _a)), newRecords.length - 1, { Label: props.DefaultValue.toString(), Value: props.DefaultValue });
|
package/lib/SearchableSelect.js
CHANGED
|
@@ -108,7 +108,8 @@ function SearchableSelect(props) {
|
|
|
108
108
|
if ((_d = props.AllowCustom) !== null && _d !== void 0 ? _d : false)
|
|
109
109
|
ops.push({ Value: search, Element: React.createElement(React.Fragment, null,
|
|
110
110
|
search,
|
|
111
|
-
"
|
|
111
|
+
" ",
|
|
112
|
+
React.createElement("span", { className: "badge badge-info", style: { fontSize: '0.75em' } }, "Entered Value")), Label: search });
|
|
112
113
|
//Ensure selectedOption is always at top of the list
|
|
113
114
|
var selected = searchOptions.find(function (f) { return f.Value === props.Record[props.Field]; });
|
|
114
115
|
if (selected != null)
|
package/lib/ToolTip.js
CHANGED
|
@@ -219,8 +219,14 @@ var getPosition = function (toolTip, targetPosition, position) {
|
|
|
219
219
|
return [top, left, arrowPositionPercent, effectivePosition];
|
|
220
220
|
};
|
|
221
221
|
var getTarget = function (target) {
|
|
222
|
-
|
|
223
|
-
|
|
222
|
+
try {
|
|
223
|
+
var targets = document.querySelectorAll("[data-tooltip".concat(target === undefined ? '' : "=\"".concat(target, "\""), "]"));
|
|
224
|
+
return targets.length > 0 ? targets[0] : null;
|
|
225
|
+
}
|
|
226
|
+
catch (_a) {
|
|
227
|
+
console.warn('Tooltip: Invalid target selector provided. Target elements must have a valid data-tooltip attribute that matches the Target prop of the tooltip.');
|
|
228
|
+
return null;
|
|
229
|
+
}
|
|
224
230
|
};
|
|
225
231
|
exports.default = exports.Tooltip;
|
|
226
232
|
var templateObject_1, templateObject_2;
|
package/lib/index.d.ts
CHANGED
|
@@ -23,4 +23,5 @@ import MultiSearchableSelect from './MultiSearchableSelect';
|
|
|
23
23
|
import AutoCompleteTextArea from './AutoCompleteTextArea';
|
|
24
24
|
import AutoCompleteInput from './AutoCompleteInput';
|
|
25
25
|
import HelpIcon from './HelpIcon';
|
|
26
|
-
|
|
26
|
+
import AutoCompleteMultiInput from './AutoCompleteMultiInput';
|
|
27
|
+
export { CheckBox, Input, DatePicker, Select, TextArea, DateRangePicker, EnumCheckBoxes, ArrayMultiSelect, ArrayCheckBoxes, MultiCheckBoxSelect, DoubleInput, TimePicker, StylableSelect, ColorPicker, SearchableSelect, ToggleSwitch, InputWithButton, RadioButtons, FileUpload, MultiInput, ToolTip, MultiSearchableSelect, HelpIcon, AutoCompleteTextArea, AutoCompleteInput, AutoCompleteMultiInput };
|
package/lib/index.js
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
//
|
|
23
23
|
// ******************************************************************************************************
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.AutoCompleteInput = exports.AutoCompleteTextArea = exports.HelpIcon = exports.MultiSearchableSelect = exports.ToolTip = exports.MultiInput = exports.FileUpload = exports.RadioButtons = exports.InputWithButton = exports.ToggleSwitch = exports.SearchableSelect = exports.ColorPicker = exports.StylableSelect = exports.TimePicker = exports.DoubleInput = exports.MultiCheckBoxSelect = exports.ArrayCheckBoxes = exports.ArrayMultiSelect = exports.EnumCheckBoxes = exports.DateRangePicker = exports.TextArea = exports.Select = exports.DatePicker = exports.Input = exports.CheckBox = void 0;
|
|
25
|
+
exports.AutoCompleteMultiInput = exports.AutoCompleteInput = exports.AutoCompleteTextArea = exports.HelpIcon = exports.MultiSearchableSelect = exports.ToolTip = exports.MultiInput = exports.FileUpload = exports.RadioButtons = exports.InputWithButton = exports.ToggleSwitch = exports.SearchableSelect = exports.ColorPicker = exports.StylableSelect = exports.TimePicker = exports.DoubleInput = exports.MultiCheckBoxSelect = exports.ArrayCheckBoxes = exports.ArrayMultiSelect = exports.EnumCheckBoxes = exports.DateRangePicker = exports.TextArea = exports.Select = exports.DatePicker = exports.Input = exports.CheckBox = void 0;
|
|
26
26
|
var CheckBox_1 = require("./CheckBox");
|
|
27
27
|
exports.CheckBox = CheckBox_1.default;
|
|
28
28
|
var Input_1 = require("./Input");
|
|
@@ -73,3 +73,5 @@ var AutoCompleteInput_1 = require("./AutoCompleteInput");
|
|
|
73
73
|
exports.AutoCompleteInput = AutoCompleteInput_1.default;
|
|
74
74
|
var HelpIcon_1 = require("./HelpIcon");
|
|
75
75
|
exports.HelpIcon = HelpIcon_1.default;
|
|
76
|
+
var AutoCompleteMultiInput_1 = require("./AutoCompleteMultiInput");
|
|
77
|
+
exports.AutoCompleteMultiInput = AutoCompleteMultiInput_1.default;
|