oolib 2.190.4 → 2.192.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/dist/components/Divider/index.d.ts +2 -1
- package/dist/components/Divider/index.js +2 -2
- package/dist/components/Dropdowns/comps/OptionsMulti/index.js +1 -0
- package/dist/components/ImageInput/comps/ImageEditor/index.js +1 -1
- package/dist/stories/v2/components/{Dropdowns.stories.d.ts → Dropdown/Dropdowns.stories.d.ts} +46 -18
- package/dist/stories/v2/components/Dropdown/Dropdowns.stories.js +204 -0
- package/dist/stories/v2/components/Dropdown/dropdownOptions.d.ts +15 -0
- package/dist/stories/v2/components/Dropdown/dropdownOptions.js +156 -0
- package/dist/stories/v2/components/List.stories.d.ts +96 -0
- package/dist/stories/v2/components/List.stories.js +219 -0
- package/dist/utils/useStyleUpdateAfterToggleTransition.js +6 -2
- package/dist/v2/components/Dropdowns/DropdownMulti/index.d.ts +3 -2
- package/dist/v2/components/Dropdowns/DropdownMulti/index.js +36 -19
- package/dist/v2/components/Dropdowns/DropdownSingle/index.d.ts +3 -2
- package/dist/v2/components/Dropdowns/DropdownSingle/index.js +12 -13
- package/dist/v2/components/Dropdowns/comps/Caret/index.d.ts +1 -2
- package/dist/v2/components/Dropdowns/comps/Caret/index.js +15 -5
- package/dist/v2/components/Dropdowns/comps/DisplayCompSingle/index.d.ts +1 -2
- package/dist/v2/components/Dropdowns/comps/DisplayCompSingle/index.js +8 -8
- package/dist/v2/components/Dropdowns/comps/NoOptionResultsComp/index.js +4 -4
- package/dist/v2/components/Dropdowns/comps/OptionsMulti/index.d.ts +2 -2
- package/dist/v2/components/Dropdowns/comps/OptionsMulti/index.js +12 -70
- package/dist/v2/components/Dropdowns/comps/OptionsShell/comps/OptionsAnimateWrapper/index.d.ts +1 -2
- package/dist/v2/components/Dropdowns/comps/OptionsShell/comps/OptionsAnimateWrapper/index.js +3 -3
- package/dist/v2/components/Dropdowns/comps/OptionsShell/comps/OptionsAnimateWrapper/styled.js +5 -2
- package/dist/v2/components/Dropdowns/comps/OptionsShell/index.js +12 -26
- package/dist/v2/components/Dropdowns/comps/OptionsShell/styled.js +8 -8
- package/dist/v2/components/Dropdowns/comps/OptionsSingle/index.d.ts +3 -3
- package/dist/v2/components/Dropdowns/comps/OptionsSingle/index.js +9 -33
- package/dist/v2/components/Dropdowns/comps/OptionsSingle/styled.js +13 -12
- package/dist/v2/components/Dropdowns/comps/SearchBar/index.d.ts +8 -0
- package/dist/v2/components/Dropdowns/comps/SearchBar/index.js +21 -0
- package/dist/v2/components/Dropdowns/comps/SelectDropdown/index.d.ts +2 -2
- package/dist/v2/components/Dropdowns/comps/SelectDropdown/index.js +13 -15
- package/dist/v2/components/Dropdowns/comps/SelectDropdown/styled.js +10 -9
- package/dist/v2/components/Dropdowns/comps/SelectTagsInput/index.d.ts +1 -2
- package/dist/v2/components/Dropdowns/comps/SelectTagsInput/index.js +6 -9
- package/dist/v2/components/Dropdowns/comps/SelectTagsInput/styled.js +3 -6
- package/dist/v2/components/Dropdowns/styled.js +1 -1
- package/dist/v2/components/Dropdowns/utils/genColor.js +2 -2
- package/dist/v2/components/Dropdowns/utils/genIcon.d.ts +3 -3
- package/dist/v2/components/Dropdowns/utils/genIcon.js +4 -2
- package/dist/v2/components/Dropdowns/utils/genProfileImg.d.ts +1 -2
- package/dist/v2/components/Dropdowns/utils/genProfileImg.js +2 -2
- package/dist/v2/components/Dropdowns/utils/genTagComp.js +3 -3
- package/dist/v2/components/Dropdowns/utils/getValue.d.ts +1 -0
- package/dist/v2/components/Dropdowns/utils/getValue.js +64 -10
- package/dist/v2/components/Dropdowns/utils/keywordSearchOptions.js +53 -9
- package/dist/v2/components/List/comps/ListGroup.d.ts +20 -0
- package/dist/v2/components/List/comps/ListGroup.js +39 -0
- package/dist/v2/components/List/comps/ListItem.d.ts +15 -0
- package/dist/v2/components/List/comps/ListItem.js +59 -0
- package/dist/v2/components/List/comps/styled.d.ts +1 -0
- package/dist/v2/components/List/comps/styled.js +71 -0
- package/dist/v2/components/List/index.d.ts +27 -0
- package/dist/v2/components/List/index.js +87 -0
- package/dist/v2/components/dataviz/BarGraphCollection/index.d.ts +2 -1
- package/dist/v2/components/dataviz/BarGraphCollection/index.js +17 -2
- package/dist/v2/components/dataviz/BarGraphCollection/utils/useGetDimensions.d.ts +1 -1
- package/dist/v2/components/dataviz/BarGraphCollection/utils/useGetDimensions.js +27 -3
- package/dist/v2/themes/globalStyles.js +2 -2
- package/package.json +1 -1
- package/dist/stories/v2/components/Dropdowns.stories.js +0 -289
- package/dist/v2/components/Dropdowns/comps/OptionContent/index.d.ts +0 -8
- package/dist/v2/components/Dropdowns/comps/OptionContent/index.js +0 -35
|
@@ -0,0 +1,219 @@
|
|
|
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
|
+
};
|
|
13
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
14
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
15
|
+
if (ar || !(i in from)) {
|
|
16
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
17
|
+
ar[i] = from[i];
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
21
|
+
};
|
|
22
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
+
exports.ListItem_ = exports.List_ = void 0;
|
|
24
|
+
var react_1 = require("react");
|
|
25
|
+
var __1 = require("../../..");
|
|
26
|
+
var themes_1 = require("../../../themes");
|
|
27
|
+
var List_1 = require("../../../v2/components/List");
|
|
28
|
+
var ListItem_1 = require("../../../v2/components/List/comps/ListItem");
|
|
29
|
+
var dropdownOptions_1 = require("./Dropdown/dropdownOptions");
|
|
30
|
+
var availableColors = __spreadArray([undefined], Object.keys(__1.colors2).sort(), true);
|
|
31
|
+
var availableIcons = __spreadArray([undefined], Object.keys(__1.icons).sort(), true);
|
|
32
|
+
var dropdownOptions = [
|
|
33
|
+
{
|
|
34
|
+
display: "Option with a slightly longer name",
|
|
35
|
+
value: "india",
|
|
36
|
+
color: themes_1.colors.lightRed,
|
|
37
|
+
// image: "xyz",
|
|
38
|
+
// icon: "CirclesFour",
|
|
39
|
+
// desc: "This is a story about schnil-tu, a.k.a tubito senpai. Tubito senpai loves to say bhai-god. Lol.",
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
display: "Sri Lanka",
|
|
43
|
+
value: "sriLanka",
|
|
44
|
+
color: themes_1.colors.invertRed,
|
|
45
|
+
// image: "xyz",
|
|
46
|
+
// icon: "Trash",
|
|
47
|
+
desc: "This is a story about schnil-tu, a.k.a tubito senpai. Tubito senpai loves to say bhai-god. Lol.",
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
display: "Japan",
|
|
51
|
+
value: "japan",
|
|
52
|
+
color: themes_1.colors.lightBlue
|
|
53
|
+
// image: "xyz",
|
|
54
|
+
// icon: "Trash",
|
|
55
|
+
// desc: "This is a story about schnil-tu, a.k.a tubito senpai. Tubito senpai loves to say bhai-god. Lol.",
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
display: "Germany",
|
|
59
|
+
value: "germany",
|
|
60
|
+
color: themes_1.colors.primaryColor100
|
|
61
|
+
// image: "xyz",
|
|
62
|
+
// icon: "Trash",
|
|
63
|
+
// desc: "This is a story about schnil-tu, a.k.a tubito senpai. Tubito senpai loves to say bhai-god. Lol.",
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
display: "USA",
|
|
67
|
+
value: "usa",
|
|
68
|
+
color: themes_1.colors.greyColor100
|
|
69
|
+
// image: "xyz",
|
|
70
|
+
// icon: "Trash",
|
|
71
|
+
// desc: "This is a story about schnil-tu, a.k.a tubito senpai. Tubito senpai loves to say bhai-god. Lol.",
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
display: "Columbia",
|
|
75
|
+
value: "columbia",
|
|
76
|
+
color: themes_1.colors.lightRed,
|
|
77
|
+
// image: "xyz",
|
|
78
|
+
// icon: "Trash",
|
|
79
|
+
// desc: "This is a story about schnil-tu, a.k.a tubito senpai. Tubito senpai loves to say bhai-god. Lol.",
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
display: "Brazil",
|
|
83
|
+
value: "brazil",
|
|
84
|
+
color: themes_1.colors.invertRed,
|
|
85
|
+
// image: "xyz",
|
|
86
|
+
// icon: "Trash",
|
|
87
|
+
// desc: "This is a story about schnil-tu, a.k.a tubito senpai. Tubito senpai loves to say bhai-god. Lol.",
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
display: "Australia",
|
|
91
|
+
value: "australia",
|
|
92
|
+
color: themes_1.colors.lightBlue,
|
|
93
|
+
disabled: true,
|
|
94
|
+
// image: "xyz",
|
|
95
|
+
// icon: "Trash",
|
|
96
|
+
// desc: "This is a story about schnil-tu, a.k.a tubito senpai. Tubito senpai loves to say bhai-god. Lol.",
|
|
97
|
+
},
|
|
98
|
+
];
|
|
99
|
+
exports.default = {
|
|
100
|
+
title: "Oolib V 2.0/Components/List",
|
|
101
|
+
parameters: {
|
|
102
|
+
docs: {
|
|
103
|
+
description: {
|
|
104
|
+
component: "A customizable list component with search and grouping capabilities",
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
argTypes: {
|
|
109
|
+
isSearchable: {
|
|
110
|
+
control: "boolean",
|
|
111
|
+
description: "Enable search functionality",
|
|
112
|
+
defaultValue: false,
|
|
113
|
+
},
|
|
114
|
+
grouped: {
|
|
115
|
+
control: "boolean",
|
|
116
|
+
description: "Display options in groups",
|
|
117
|
+
defaultValue: false,
|
|
118
|
+
},
|
|
119
|
+
isMulti: {
|
|
120
|
+
control: "boolean",
|
|
121
|
+
description: "Allow multiple selections",
|
|
122
|
+
defaultValue: false,
|
|
123
|
+
},
|
|
124
|
+
isTagsStyle: {
|
|
125
|
+
control: "boolean",
|
|
126
|
+
description: "Display selections as tags",
|
|
127
|
+
defaultValue: false,
|
|
128
|
+
},
|
|
129
|
+
searchbarPlaceholder: {
|
|
130
|
+
control: "text",
|
|
131
|
+
description: "Placeholder text for the search bar",
|
|
132
|
+
defaultValue: "Search...",
|
|
133
|
+
},
|
|
134
|
+
disableShadow: {
|
|
135
|
+
control: "boolean",
|
|
136
|
+
description: "Display selections as tags",
|
|
137
|
+
defaultValue: false,
|
|
138
|
+
},
|
|
139
|
+
enableBorder: {
|
|
140
|
+
control: "boolean",
|
|
141
|
+
description: "Display selections as tags",
|
|
142
|
+
defaultValue: false,
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
};
|
|
146
|
+
var List_ = function (args) {
|
|
147
|
+
var _a = (0, react_1.useState)(null), selectedValue = _a[0], setSelectedValue = _a[1];
|
|
148
|
+
var _b = (0, react_1.useState)(null), focussedOption = _b[0], setFocussedOption = _b[1];
|
|
149
|
+
var _c = (0, react_1.useState)(""), searchString = _c[0], setSearchString = _c[1];
|
|
150
|
+
var _d = (0, react_1.useState)(false), searchBarFocus = _d[0], setSearchBarFocus = _d[1];
|
|
151
|
+
var _e = (0, react_1.useState)(args.grouped ? dropdownOptions_1.dropdownOptionsGroup : dropdownOptions), filteredOptions = _e[0], setFilteredOptions = _e[1];
|
|
152
|
+
// Filter options based on search string
|
|
153
|
+
(0, react_1.useEffect)(function () {
|
|
154
|
+
if (args.isSearchable && searchString) {
|
|
155
|
+
if (args.grouped) {
|
|
156
|
+
var filtered = dropdownOptions_1.dropdownOptionsGroup
|
|
157
|
+
.map(function (group) { return (__assign(__assign({}, group), { options: group.options.filter(function (option) {
|
|
158
|
+
return option.display.toLowerCase().includes(searchString.toLowerCase());
|
|
159
|
+
}) })); })
|
|
160
|
+
.filter(function (group) { return group.options.length > 0; });
|
|
161
|
+
setFilteredOptions(filtered);
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
var filtered = dropdownOptions.filter(function (option) {
|
|
165
|
+
return option.display.toLowerCase().includes(searchString.toLowerCase());
|
|
166
|
+
});
|
|
167
|
+
setFilteredOptions(filtered);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
setFilteredOptions(args.grouped ? dropdownOptions_1.dropdownOptionsGroup : dropdownOptions);
|
|
172
|
+
}
|
|
173
|
+
}, [searchString, args.isSearchable, args.grouped]);
|
|
174
|
+
(0, react_1.useEffect)(function () {
|
|
175
|
+
setFilteredOptions(args.grouped ? dropdownOptions_1.dropdownOptionsGroup : dropdownOptions);
|
|
176
|
+
}, [args.grouped]);
|
|
177
|
+
var handleSelect = function (option) {
|
|
178
|
+
setSelectedValue(option);
|
|
179
|
+
if (args.onSelect) {
|
|
180
|
+
args.onSelect(option);
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
var scrollFocussedOpIntoView = function (index) {
|
|
184
|
+
setFocussedOption(index);
|
|
185
|
+
};
|
|
186
|
+
return (React.createElement(__1.Container, { style: { background: "#eff" } },
|
|
187
|
+
React.createElement(__1.PaddingTop40, null),
|
|
188
|
+
React.createElement(List_1.List, { options: filteredOptions, value: selectedValue, focussedOp: focussedOption, scrollFocussedOpIntoView: scrollFocussedOpIntoView, handleSelect: handleSelect, isSearchable: args.isSearchable, searchbarPlaceholder: args.searchbarPlaceholder, searchBarFocus: searchBarFocus, searchString: searchString, setSearchString: setSearchString, setSearchBarFocus: setSearchBarFocus, grouped: args.grouped, isMulti: args.isMulti, isTagsStyle: args.isTagsStyle, invert: args.invert, disableShadow: args.disableShadow, enableBorder: args.enableBorder }),
|
|
189
|
+
React.createElement(__1.PaddingBottom40, null)));
|
|
190
|
+
};
|
|
191
|
+
exports.List_ = List_;
|
|
192
|
+
var ListItem_ = function (args) {
|
|
193
|
+
args.option = args;
|
|
194
|
+
return (React.createElement("div", { style: { padding: '10rem', height: "100svh", background: "#eee" } },
|
|
195
|
+
React.createElement(ListItem_1.ListItem, __assign({}, args))));
|
|
196
|
+
};
|
|
197
|
+
exports.ListItem_ = ListItem_;
|
|
198
|
+
exports.ListItem_.argTypes = {
|
|
199
|
+
desc: {
|
|
200
|
+
name: "Description",
|
|
201
|
+
},
|
|
202
|
+
icon: {
|
|
203
|
+
name: "Icon",
|
|
204
|
+
options: availableIcons,
|
|
205
|
+
control: { type: "select" }
|
|
206
|
+
}
|
|
207
|
+
// color:{
|
|
208
|
+
// name: "Color",
|
|
209
|
+
// options: availableColors,
|
|
210
|
+
// }
|
|
211
|
+
};
|
|
212
|
+
exports.ListItem_.args = {
|
|
213
|
+
display: "Option with a slightly longer name",
|
|
214
|
+
desc: "This is a story about schnil-tu, a.k.a tubito senpai. Tubito senpai loves to say bhai-god. Lol.",
|
|
215
|
+
icon: "CirclesFour",
|
|
216
|
+
// color: undefined,
|
|
217
|
+
loading: false,
|
|
218
|
+
disabled: false,
|
|
219
|
+
};
|
|
@@ -25,7 +25,11 @@ var useStyleUpdateAfterToggleTransition = function (_a) {
|
|
|
25
25
|
}
|
|
26
26
|
else {
|
|
27
27
|
// Immediately set to hidden when closing
|
|
28
|
-
|
|
28
|
+
timeoutId = setTimeout(function () {
|
|
29
|
+
if (!toggleState) {
|
|
30
|
+
setStyle(initStyle.current);
|
|
31
|
+
}
|
|
32
|
+
}, transitionDuration);
|
|
29
33
|
}
|
|
30
34
|
// Cleanup function to clear timeout if component updates/unmounts
|
|
31
35
|
return function () {
|
|
@@ -33,7 +37,7 @@ var useStyleUpdateAfterToggleTransition = function (_a) {
|
|
|
33
37
|
clearTimeout(timeoutId);
|
|
34
38
|
}
|
|
35
39
|
};
|
|
36
|
-
}, [toggleState, transitionDuration]);
|
|
40
|
+
}, [toggleState, transitionDuration, styleOptions]);
|
|
37
41
|
return ({
|
|
38
42
|
style: style
|
|
39
43
|
});
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
export function DropdownMulti({ saveValueAsString, value: valueProp, id, onChange: parentOnChange, className, readOnly,
|
|
1
|
+
export function DropdownMulti({ saveValueAsString, value: valueProp, id, onChange: parentOnChange, className, readOnly, selectClassName, optionsClassName, selectStyleOverride, optionsFn, options: optionsProp, isTagsStyle, isSearchable, searchFieldsConfig, setFilteredOptions: setFilteredOptionsInParent, setSearchString: setSearchStringInParent, searchString: searchStringInParent, label, optionsModalLabel, genCreateTagButton, placeholder, genCustomSelectComp, disableSelectTextUpdate, selectConfig, lightboxHeight, lightboxStyle, optionsAnchor, popOutOfOverflowHiddenParent, S, disabled, broadcastShowOptions, tagColor, searchbarPlaceholder, alignDropdown, variant, matchSelectInputWidth }: {
|
|
2
2
|
saveValueAsString: any;
|
|
3
3
|
value: any;
|
|
4
4
|
id: any;
|
|
5
5
|
onChange: any;
|
|
6
6
|
className: any;
|
|
7
7
|
readOnly: any;
|
|
8
|
-
invert: any;
|
|
9
8
|
selectClassName: any;
|
|
10
9
|
optionsClassName: any;
|
|
11
10
|
selectStyleOverride: any;
|
|
@@ -34,5 +33,7 @@ export function DropdownMulti({ saveValueAsString, value: valueProp, id, onChang
|
|
|
34
33
|
tagColor: any;
|
|
35
34
|
searchbarPlaceholder: any;
|
|
36
35
|
alignDropdown?: string;
|
|
36
|
+
variant?: string;
|
|
37
|
+
matchSelectInputWidth?: boolean;
|
|
37
38
|
}, ...args: any[]): React.JSX.Element;
|
|
38
39
|
import React from "react";
|
|
@@ -68,28 +68,28 @@ var getBlockLabelProps_1 = require("../../../../utils/getBlockLabelProps");
|
|
|
68
68
|
function DropdownMulti(_a) {
|
|
69
69
|
var saveValueAsString = _a.saveValueAsString, valueProp = _a.value, id = _a.id, parentOnChange = _a.onChange, className = _a.className,
|
|
70
70
|
// injectOtherOption,
|
|
71
|
-
readOnly = _a.readOnly,
|
|
71
|
+
readOnly = _a.readOnly, selectClassName = _a.selectClassName, //used to override font size in priimary header
|
|
72
72
|
optionsClassName = _a.optionsClassName, //used to override font size in priimary header
|
|
73
73
|
selectStyleOverride = _a.selectStyleOverride, optionsFn = _a.optionsFn, optionsProp = _a.options, isTagsStyle = _a.isTagsStyle, isSearchable = _a.isSearchable, searchFieldsConfig = _a.searchFieldsConfig, setFilteredOptionsInParent = _a.setFilteredOptions, setSearchStringInParent = _a.setSearchString, searchStringInParent = _a.searchString, label = _a.label, optionsModalLabel = _a.optionsModalLabel, genCreateTagButton = _a.genCreateTagButton, placeholder = _a.placeholder, genCustomSelectComp = _a.genCustomSelectComp, disableSelectTextUpdate = _a.disableSelectTextUpdate, selectConfig = _a.selectConfig,
|
|
74
74
|
//props whose existence needs to be questioned:
|
|
75
|
-
lightboxHeight = _a.lightboxHeight, lightboxStyle = _a.lightboxStyle, optionsAnchor = _a.optionsAnchor, popOutOfOverflowHiddenParent = _a.popOutOfOverflowHiddenParent, S = _a.S, disabled = _a.disabled, broadcastShowOptions = _a.broadcastShowOptions, tagColor = _a.tagColor, searchbarPlaceholder = _a.searchbarPlaceholder, _b = _a.alignDropdown, alignDropdown = _b === void 0 ? "left" : _b;
|
|
75
|
+
lightboxHeight = _a.lightboxHeight, lightboxStyle = _a.lightboxStyle, optionsAnchor = _a.optionsAnchor, popOutOfOverflowHiddenParent = _a.popOutOfOverflowHiddenParent, S = _a.S, disabled = _a.disabled, broadcastShowOptions = _a.broadcastShowOptions, tagColor = _a.tagColor, searchbarPlaceholder = _a.searchbarPlaceholder, _b = _a.alignDropdown, alignDropdown = _b === void 0 ? "left" : _b, _c = _a.variant, variant = _c === void 0 ? "default" : _c, _d = _a.matchSelectInputWidth, matchSelectInputWidth = _d === void 0 ? false : _d;
|
|
76
76
|
var theme = (0, styled_components_1.useTheme)();
|
|
77
77
|
var props = arguments[0];
|
|
78
78
|
var value = (0, getValue_1.getValue_MULTI)({ valueProp: valueProp, optionsFn: optionsFn, options: optionsProp, theme: theme, saveValueAsString: saveValueAsString });
|
|
79
79
|
//1 INIT REFS
|
|
80
|
-
var
|
|
80
|
+
var _e = (0, useCreateDropdownRefs_1.useCreateDropdownRefs)(), selectRef = _e.selectRef, dropdownRef = _e.dropdownRef;
|
|
81
81
|
//2 INIT SHOW OPTIONS STATE
|
|
82
|
-
var
|
|
82
|
+
var _f = (0, useHideShowOptions_1.useHideShowOptions)({
|
|
83
83
|
broadcastShowOptions: broadcastShowOptions
|
|
84
|
-
}), showOptions =
|
|
84
|
+
}), showOptions = _f.showOptions, handleHideOptions = _f.handleHideOptions, handleShowOptions = _f.handleShowOptions;
|
|
85
85
|
var screenWidth = (0, useScreenWidth_1.useScreenWidth)();
|
|
86
86
|
//3 INIT DD FOCUS CUSTOM HOOK
|
|
87
87
|
(0, useHandleClickOutside_1.useHandleClickOutside)(dropdownRef, handleHideOptions, { enabled: screenWidth >= (0, mixins_1.getBreakPoint)('sm') });
|
|
88
88
|
//-- TAG INPUT SPECIFIC
|
|
89
|
-
var
|
|
89
|
+
var _g = (0, useSearchString_1.useSearchString)({
|
|
90
90
|
setSearchStringInParent: setSearchStringInParent,
|
|
91
91
|
searchStringInParent: searchStringInParent
|
|
92
|
-
}), searchString =
|
|
92
|
+
}), searchString = _g[0], setSearchString = _g[1];
|
|
93
93
|
var options = (0, react_1.useMemo)(function () {
|
|
94
94
|
var ops = (0, generateOptions_1.generateOptions)({
|
|
95
95
|
options: optionsProp,
|
|
@@ -99,13 +99,28 @@ function DropdownMulti(_a) {
|
|
|
99
99
|
});
|
|
100
100
|
var currentValue = value || [];
|
|
101
101
|
// rm the selectedOps from ops list (since they are shown anyway in the selectedops list)
|
|
102
|
-
|
|
102
|
+
var selectedValues = currentValue.map(function (v) { return v.value; });
|
|
103
|
+
// Check if we're dealing with grouped data
|
|
104
|
+
var isGrouped = (0, getValue_1.isGroupedData)(ops);
|
|
105
|
+
if (isGrouped) {
|
|
106
|
+
// For grouped data, filter out selected options from each group
|
|
107
|
+
return ops.map(function (group) {
|
|
108
|
+
// Filter the options within the group to remove selected ones
|
|
109
|
+
var filteredOptions = group.options.filter(function (option) {
|
|
110
|
+
return !selectedValues.includes(option.value);
|
|
111
|
+
});
|
|
112
|
+
// Return a new group with filtered options
|
|
113
|
+
return __assign(__assign({}, group), { options: filteredOptions });
|
|
114
|
+
}).filter(function (group) { return group.options.length > 0; }); // Remove empty groups
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
// For normal data, filter out selected options directly
|
|
118
|
+
return ops.filter(function (op) { return !selectedValues.includes(op.value); });
|
|
119
|
+
}
|
|
103
120
|
}, [
|
|
104
|
-
JSON.stringify(optionsProp), //
|
|
121
|
+
JSON.stringify(optionsProp), // For when options change from 'loading' to actual options
|
|
105
122
|
// showOptions
|
|
106
|
-
|
|
107
|
-
optionsFn === null || optionsFn === void 0 ? void 0 : optionsFn.args,
|
|
108
|
-
value
|
|
123
|
+
JSON.stringify(value) // Use stringify to properly detect changes in the value array
|
|
109
124
|
]);
|
|
110
125
|
options = (0, react_1.useMemo)(function () {
|
|
111
126
|
return (!isSearchable && !isTagsStyle)
|
|
@@ -119,6 +134,8 @@ function DropdownMulti(_a) {
|
|
|
119
134
|
}, [
|
|
120
135
|
searchString,
|
|
121
136
|
// showOptions,
|
|
137
|
+
optionsFn === null || optionsFn === void 0 ? void 0 : optionsFn.fn,
|
|
138
|
+
optionsFn === null || optionsFn === void 0 ? void 0 : optionsFn.args,
|
|
122
139
|
options,
|
|
123
140
|
value
|
|
124
141
|
]);
|
|
@@ -148,13 +165,13 @@ function DropdownMulti(_a) {
|
|
|
148
165
|
var genDisplayComp = function () {
|
|
149
166
|
if (!(value === null || value === void 0 ? void 0 : value.length) > 0)
|
|
150
167
|
return null;
|
|
151
|
-
return isTagsStyle ? (react_1.default.createElement(styled_1.StyledTagsInputWrapper, null, value.map(function (d) { return (0, genTagComp_1.genTagComp)(id, d, { display: true,
|
|
152
|
-
react_1.default.createElement(DisplayCompSingle_1.DisplayCompSingle, { value: v,
|
|
168
|
+
return isTagsStyle ? (react_1.default.createElement(styled_1.StyledTagsInputWrapper, null, value.map(function (d) { return (0, genTagComp_1.genTagComp)(id, d, { display: true, theme: theme, color: tagColor }); }))) : (react_1.default.createElement("div", { style: { display: "flex", flexWrap: "wrap", gap: "0.5rem" } }, value.map(function (v, i) { return (react_1.default.createElement(react_1.Fragment, null,
|
|
169
|
+
react_1.default.createElement(DisplayCompSingle_1.DisplayCompSingle, { value: v, injectComma: i !== value.length - 1, S: S }))); })));
|
|
153
170
|
};
|
|
154
|
-
var
|
|
171
|
+
var _h = (0, react_1.useState)(false), focusSelectTagsInput = _h[0], setFocusSelectTagsInput = _h[1];
|
|
155
172
|
var genSelectTagsInput = function (ops) {
|
|
156
173
|
if (ops === void 0) { ops = {}; }
|
|
157
|
-
return (react_1.default.createElement(SelectTagsInput_1.SelectTagsInput, { id: id, value: value,
|
|
174
|
+
return (react_1.default.createElement(SelectTagsInput_1.SelectTagsInput, { id: id, value: value, handleSelect: handleSelect, searchString: searchString,
|
|
158
175
|
setSearchString: setSearchString,
|
|
159
176
|
single_multi: "multi", placeholder: placeholder, focusSelectTagsInput: focusSelectTagsInput, setFocusSelectTagsInput: setFocusSelectTagsInput, showOptions: showOptions, S: S, disabled: disabled, style: ops.style }));
|
|
160
177
|
};
|
|
@@ -165,10 +182,10 @@ function DropdownMulti(_a) {
|
|
|
165
182
|
isTagsStyle
|
|
166
183
|
? !showOptions && handleShowOptions() //if tagsStyle, then click always shows options
|
|
167
184
|
: showOptions ? handleHideOptions() : handleShowOptions(); //if dropdowns, then click toggles show/hide
|
|
168
|
-
} }, isTagsStyle ? genSelectTagsInput() : (react_1.default.createElement(SelectDropdown_1.SelectDropdown, {
|
|
169
|
-
react_1.default.createElement(OptionsMulti_1.OptionsMulti, {
|
|
185
|
+
} }, isTagsStyle ? genSelectTagsInput() : (react_1.default.createElement(SelectDropdown_1.SelectDropdown, { value: value, placeholder: placeholder, selectClassName: selectClassName, selectStyleOverride: selectStyleOverride, showOptions: showOptions, genCustomSelectComp: genCustomSelectComp, disableSelectTextUpdate: disableSelectTextUpdate, selectConfig: selectConfig, S: S, disabled: disabled, variant: variant }))),
|
|
186
|
+
react_1.default.createElement(OptionsMulti_1.OptionsMulti, { id: id, value: value, relativeToRef: selectRef, showOptions: showOptions, handleSelect: handleSelect, handleHideOptions: handleHideOptions, optionsClassName: optionsClassName, options: options, optionsFn: optionsFn, label: label, optionsModalLabel: optionsModalLabel, isTagsStyle: isTagsStyle, genCreateTagButton: genCreateTagButton, lightboxHeight: lightboxHeight, lightboxStyle: lightboxStyle, optionsAnchor: optionsAnchor, SelectComp: isTagsStyle && genSelectTagsInput({ style: { position: 'sticky', top: 0, zIndex: 1000 } }), setFocusSelectTagsInput: setFocusSelectTagsInput, popOutOfOverflowHiddenParent: popOutOfOverflowHiddenParent, S: S, alignDropdown: alignDropdown, matchSelectInputWidth: matchSelectInputWidth, searchbarPlaceholder: searchbarPlaceholder, isSearchable: isTagsStyle ? false : isSearchable, searchString: searchString, setSearchString: setSearchString })));
|
|
170
187
|
};
|
|
171
|
-
return (react_1.default.createElement("div", { className: "OKE-Dropdown ".concat(className, " OKE-Dropdown--").concat(readOnly ? "displayComp" : "inputComp"
|
|
188
|
+
return (react_1.default.createElement("div", { className: "OKE-Dropdown ".concat(className, " OKE-Dropdown--").concat(readOnly ? "displayComp" : "inputComp") },
|
|
172
189
|
react_1.default.createElement(BlockLabel_1.BlockLabel, __assign({}, (0, getBlockLabelProps_1.getBlockLabelProps)(props))),
|
|
173
190
|
readOnly ? genDisplayComp() : genInputComp()));
|
|
174
191
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function DropdownSingle({ optionsAnchor, lightboxHeight, lightboxStyle, selectClassName, optionsClassName, disableSelectTextUpdate, selectStyleOverride, value: valueProp, id, onChange: parentOnChange, className, style, readOnly,
|
|
1
|
+
export function DropdownSingle({ optionsAnchor, lightboxHeight, lightboxStyle, selectClassName, optionsClassName, disableSelectTextUpdate, selectStyleOverride, value: valueProp, id, onChange: parentOnChange, className, style, readOnly, optionsFn, options: optionsProp, saveValueAsString, isTagsStyle, selectConfig, label, optionsModalLabel, broadcastShowOptions, isSearchable, searchFieldsConfig, setFilteredOptions: setFilteredOptionsInParent, setSearchString: setSearchStringInParent, searchString: searchStringInParent, genCustomSelectComp, placeholder, genCreateTagButton, popOutOfOverflowHiddenParent, S, disabled, tagColor, observerRef, searchbarPlaceholder, alignDropdown, variant, matchSelectInputWidth }: {
|
|
2
2
|
optionsAnchor: any;
|
|
3
3
|
lightboxHeight: any;
|
|
4
4
|
lightboxStyle: any;
|
|
@@ -12,7 +12,6 @@ export function DropdownSingle({ optionsAnchor, lightboxHeight, lightboxStyle, s
|
|
|
12
12
|
className: any;
|
|
13
13
|
style: any;
|
|
14
14
|
readOnly: any;
|
|
15
|
-
invert: any;
|
|
16
15
|
optionsFn: any;
|
|
17
16
|
options: any;
|
|
18
17
|
saveValueAsString: any;
|
|
@@ -36,5 +35,7 @@ export function DropdownSingle({ optionsAnchor, lightboxHeight, lightboxStyle, s
|
|
|
36
35
|
observerRef: any;
|
|
37
36
|
searchbarPlaceholder: any;
|
|
38
37
|
alignDropdown?: string;
|
|
38
|
+
variant?: string;
|
|
39
|
+
matchSelectInputWidth: any;
|
|
39
40
|
}, ...args: any[]): React.JSX.Element;
|
|
40
41
|
import React from "react";
|
|
@@ -74,7 +74,6 @@ function DropdownSingle(_a) {
|
|
|
74
74
|
optionsClassName = _a.optionsClassName, //used to override font size in priimary header
|
|
75
75
|
//used by filters topbar. this is a hack. find another way
|
|
76
76
|
disableSelectTextUpdate = _a.disableSelectTextUpdate, selectStyleOverride = _a.selectStyleOverride, valueProp = _a.value, id = _a.id, parentOnChange = _a.onChange, className = _a.className, style = _a.style, readOnly = _a.readOnly, //
|
|
77
|
-
invert = _a.invert, //
|
|
78
77
|
optionsFn = _a.optionsFn, optionsProp = _a.options, saveValueAsString = _a.saveValueAsString, // used in tci
|
|
79
78
|
isTagsStyle = _a.isTagsStyle, selectConfig = _a.selectConfig, label = _a.label, optionsModalLabel = _a.optionsModalLabel, broadcastShowOptions = _a.broadcastShowOptions,
|
|
80
79
|
//combobox specific
|
|
@@ -82,16 +81,16 @@ function DropdownSingle(_a) {
|
|
|
82
81
|
searchFieldsConfig = _a.searchFieldsConfig, setFilteredOptionsInParent = _a.setFilteredOptions, setSearchStringInParent = _a.setSearchString, searchStringInParent = _a.searchString, genCustomSelectComp = _a.genCustomSelectComp, placeholder = _a.placeholder, //
|
|
83
82
|
genCreateTagButton = _a.genCreateTagButton, popOutOfOverflowHiddenParent = _a.popOutOfOverflowHiddenParent, S = _a.S, //
|
|
84
83
|
disabled = _a.disabled, //
|
|
85
|
-
tagColor = _a.tagColor, observerRef = _a.observerRef, searchbarPlaceholder = _a.searchbarPlaceholder, _b = _a.alignDropdown, alignDropdown = _b === void 0 ? "left" : _b;
|
|
84
|
+
tagColor = _a.tagColor, observerRef = _a.observerRef, searchbarPlaceholder = _a.searchbarPlaceholder, _b = _a.alignDropdown, alignDropdown = _b === void 0 ? "left" : _b, _c = _a.variant, variant = _c === void 0 ? "default" : _c, matchSelectInputWidth = _a.matchSelectInputWidth;
|
|
86
85
|
var theme = (0, styled_components_1.useTheme)();
|
|
87
86
|
var props = arguments[0];
|
|
88
87
|
var value = (0, getValue_1.getValue_SINGLE)({ valueProp: valueProp, optionsFn: optionsFn, options: optionsProp, theme: theme, saveValueAsString: saveValueAsString });
|
|
89
88
|
//1 INIT REFS
|
|
90
|
-
var
|
|
89
|
+
var _d = (0, useCreateDropdownRefs_1.useCreateDropdownRefs)(), selectRef = _d.selectRef, dropdownRef = _d.dropdownRef;
|
|
91
90
|
//2 INIT SHOW OPTIONS STATE
|
|
92
|
-
var
|
|
91
|
+
var _e = (0, useHideShowOptions_1.useHideShowOptions)({
|
|
93
92
|
broadcastShowOptions: broadcastShowOptions
|
|
94
|
-
}), showOptions =
|
|
93
|
+
}), showOptions = _e.showOptions, handleHideOptions = _e.handleHideOptions, handleShowOptions = _e.handleShowOptions;
|
|
95
94
|
var screenWidth = (0, useScreenWidth_1.useScreenWidth)();
|
|
96
95
|
//3 INIT DD FOCUS CUSTOM HOOK
|
|
97
96
|
(0, useHandleClickOutside_1.useHandleClickOutside)(dropdownRef, handleHideOptions, { enabled: screenWidth >= (0, mixins_1.getBreakPoint)('sm') });
|
|
@@ -109,10 +108,10 @@ function DropdownSingle(_a) {
|
|
|
109
108
|
});
|
|
110
109
|
};
|
|
111
110
|
//-- TAG INPUT SPECIFIC
|
|
112
|
-
var
|
|
111
|
+
var _f = (0, useSearchString_1.useSearchString)({
|
|
113
112
|
searchStringInParent: searchStringInParent,
|
|
114
113
|
setSearchStringInParent: setSearchStringInParent
|
|
115
|
-
}), searchString =
|
|
114
|
+
}), searchString = _f[0], setSearchString = _f[1];
|
|
116
115
|
var options = (0, react_1.useMemo)(function () {
|
|
117
116
|
var ops = (0, generateOptions_1.generateOptions)({
|
|
118
117
|
options: optionsProp,
|
|
@@ -137,7 +136,7 @@ function DropdownSingle(_a) {
|
|
|
137
136
|
]);
|
|
138
137
|
var genSelectTagsInput = function (ops) {
|
|
139
138
|
if (ops === void 0) { ops = {}; }
|
|
140
|
-
return (react_1.default.createElement(SelectTagsInput_1.SelectTagsInput, { id: id, value: value,
|
|
139
|
+
return (react_1.default.createElement(SelectTagsInput_1.SelectTagsInput, { id: id, value: value, handleSelect: handleSelect, searchString: searchString, setSearchString: setSearchString, single_multi: 'single', placeholder: placeholder, S: S, disabled: disabled, showOptions: showOptions, S: S, style: ops.style
|
|
141
140
|
// forceFocus, comp is expecting this
|
|
142
141
|
}));
|
|
143
142
|
};
|
|
@@ -147,17 +146,17 @@ function DropdownSingle(_a) {
|
|
|
147
146
|
isTagsStyle
|
|
148
147
|
? !showOptions && handleShowOptions() //if tagsStyle, then click always shows options
|
|
149
148
|
: showOptions ? handleHideOptions() : handleShowOptions(); //if dropdowns, then click toggles show/hide
|
|
150
|
-
} }, isTagsStyle ? genSelectTagsInput() : (react_1.default.createElement(SelectDropdown_1.SelectDropdown, {
|
|
151
|
-
react_1.default.createElement(OptionsSingle_1.OptionsSingle, {
|
|
149
|
+
} }, isTagsStyle ? genSelectTagsInput() : (react_1.default.createElement(SelectDropdown_1.SelectDropdown, { value: value, placeholder: placeholder, genCustomSelectComp: genCustomSelectComp, selectClassName: selectClassName, selectStyleOverride: selectStyleOverride, showOptions: showOptions, disableSelectTextUpdate: disableSelectTextUpdate, selectConfig: selectConfig, S: S, disabled: disabled, variant: variant }))),
|
|
150
|
+
react_1.default.createElement(OptionsSingle_1.OptionsSingle, { observerRef: observerRef, lightboxHeight: lightboxHeight, lightboxStyle: lightboxStyle, optionsAnchor: optionsAnchor, id: id, optionsClassName: optionsClassName, label: label, value: value, relativeToRef: selectRef, showOptions: showOptions, handleHideOptions: handleHideOptions, handleSelect: handleSelect, options: options, optionsFn: optionsFn, optionsModalLabel: optionsModalLabel,
|
|
152
151
|
//combobox specific
|
|
153
|
-
|
|
152
|
+
alignDropdown: alignDropdown, genCreateTagButton: genCreateTagButton, matchSelectInputWidth: matchSelectInputWidth, SelectComp: isTagsStyle && genSelectTagsInput({ style: { position: 'sticky', top: 0, zIndex: 1000 } }), S: S, popOutOfOverflowHiddenParent: popOutOfOverflowHiddenParent, isSearchable: isTagsStyle ? false : isSearchable, searchbarPlaceholder: searchbarPlaceholder, searchString: searchString, setSearchString: setSearchString })));
|
|
154
153
|
};
|
|
155
154
|
var genDisplayComp = function () {
|
|
156
155
|
if (!value)
|
|
157
156
|
return null;
|
|
158
|
-
return isTagsStyle ? (react_1.default.createElement(styled_1.StyledTagsInputWrapper, null, (0, genTagComp_1.genTagComp)(id, value, { display: true,
|
|
157
|
+
return isTagsStyle ? (react_1.default.createElement(styled_1.StyledTagsInputWrapper, null, (0, genTagComp_1.genTagComp)(id, value, { display: true, theme: theme, color: tagColor }))) : (react_1.default.createElement(DisplayCompSingle_1.DisplayCompSingle, { value: value, S: S }));
|
|
159
158
|
};
|
|
160
|
-
return (react_1.default.createElement("div", { className: "OKE-Dropdown ".concat(className, " OKE-Dropdown--").concat(readOnly ? "displayComp" : "inputComp"
|
|
159
|
+
return (react_1.default.createElement("div", { className: "OKE-Dropdown ".concat(className, " OKE-Dropdown--").concat(readOnly ? "displayComp" : "inputComp"), style: style },
|
|
161
160
|
react_1.default.createElement(BlockLabel_1.BlockLabel, __assign({}, (0, getBlockLabelProps_1.getBlockLabelProps)(props) /** in other words, props. */)),
|
|
162
161
|
readOnly ? genDisplayComp() : genInputComp()));
|
|
163
162
|
}
|
|
@@ -1,19 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
2
6
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
7
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
8
|
};
|
|
5
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
10
|
exports.Caret = void 0;
|
|
7
|
-
var colors_1 = require("../../../../../themes/colors");
|
|
8
11
|
var icons_1 = require("../../../../../icons");
|
|
9
12
|
var react_1 = __importDefault(require("react"));
|
|
10
13
|
var styled_1 = require("./styled");
|
|
11
|
-
var
|
|
12
|
-
var
|
|
14
|
+
var styled_components_1 = __importDefault(require("styled-components"));
|
|
15
|
+
var mixins_1 = require("../../../../../themes/mixins");
|
|
16
|
+
var themes_1 = require("../../../../themes");
|
|
17
|
+
var CaretDown = icons_1.icons.CaretDown;
|
|
18
|
+
var StyledCaretDown = (0, styled_components_1.default)(CaretDown)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n transform: ", ";\n"], ["\n ", "\n transform: ", ";\n"])), (0, mixins_1.transition)("transform"), function (_a) {
|
|
19
|
+
var showOptions = _a.showOptions;
|
|
20
|
+
return showOptions ? "rotate(180deg)" : "rotate(0deg)";
|
|
21
|
+
});
|
|
13
22
|
var Caret = function (_a) {
|
|
14
|
-
var
|
|
23
|
+
var showOptions = _a.showOptions, disabled = _a.disabled;
|
|
15
24
|
return (react_1.default.createElement(styled_1.StyledCaret, null,
|
|
16
|
-
|
|
25
|
+
react_1.default.createElement(StyledCaretDown, { size: 16, color: disabled ? themes_1.colors.grey40 : themes_1.colors.grey80, weight: "bold", showOptions: showOptions }),
|
|
17
26
|
react_1.default.createElement(styled_1.StyledCaretClickArea, null)));
|
|
18
27
|
};
|
|
19
28
|
exports.Caret = Caret;
|
|
29
|
+
var templateObject_1;
|
|
@@ -16,24 +16,24 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.DisplayCompSingle = void 0;
|
|
18
18
|
var react_1 = __importDefault(require("react"));
|
|
19
|
-
var Typo_1 = require("../../../../../components/Typo");
|
|
20
|
-
var OKELink_1 = require("../../../../../components/OKELink");
|
|
21
19
|
var genLinkOrText_1 = require("../../utils/genLinkOrText");
|
|
22
20
|
var styled_components_1 = require("styled-components");
|
|
23
21
|
var genProfileImg_1 = require("../../utils/genProfileImg");
|
|
24
22
|
var genIcon_1 = require("../../utils/genIcon");
|
|
23
|
+
var Typo2_1 = require("../../../Typo2");
|
|
24
|
+
var OKELink_1 = require("../../../OKELink");
|
|
25
25
|
var DisplayCompSingle = function (_a) {
|
|
26
|
-
var value = _a.value,
|
|
26
|
+
var value = _a.value, injectComma = _a.injectComma, S = _a.S;
|
|
27
27
|
var theme = (0, styled_components_1.useTheme)();
|
|
28
28
|
if (!value)
|
|
29
29
|
return null;
|
|
30
30
|
return (react_1.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: '1rem' } },
|
|
31
|
-
(0, genIcon_1.genIcon)({ icon: value === null || value === void 0 ? void 0 : value.icon,
|
|
32
|
-
(value === null || value === void 0 ? void 0 : value.image) && (0, genProfileImg_1.genProfileImg)(__assign(__assign({}, value), {
|
|
33
|
-
(0, genLinkOrText_1.genLinkOrText)(value, function (display, link) { return (react_1.default.createElement(
|
|
31
|
+
(0, genIcon_1.genIcon)({ icon: value === null || value === void 0 ? void 0 : value.icon, S: S }),
|
|
32
|
+
(value === null || value === void 0 ? void 0 : value.image) && (0, genProfileImg_1.genProfileImg)(__assign(__assign({}, value), { theme: theme })),
|
|
33
|
+
(0, genLinkOrText_1.genLinkOrText)(value, function (display, link) { return (react_1.default.createElement(Typo2_1.UI_BODY_SM_DF, null,
|
|
34
34
|
link
|
|
35
|
-
? react_1.default.createElement(OKELink_1.OKELink, {
|
|
35
|
+
? react_1.default.createElement(OKELink_1.OKELink, { to: link }, display)
|
|
36
36
|
: display,
|
|
37
|
-
injectComma && react_1.default.createElement("span", null, ","))); }
|
|
37
|
+
injectComma && react_1.default.createElement("span", null, ","))); })));
|
|
38
38
|
};
|
|
39
39
|
exports.DisplayCompSingle = DisplayCompSingle;
|
|
@@ -5,11 +5,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.NoOptionResultsComp = void 0;
|
|
7
7
|
var react_1 = __importDefault(require("react"));
|
|
8
|
-
var
|
|
8
|
+
var Typo2_1 = require("../../../Typo2");
|
|
9
9
|
var NoOptionResultsComp = function (_a) {
|
|
10
10
|
var S = _a.S;
|
|
11
|
-
var TYPO_COMP = S ?
|
|
12
|
-
return (react_1.default.createElement("div", { style: { padding: '
|
|
13
|
-
react_1.default.createElement(TYPO_COMP, {
|
|
11
|
+
var TYPO_COMP = S ? Typo2_1.UI_BODY_SM_DF : Typo2_1.UI_BODY_DF;
|
|
12
|
+
return (react_1.default.createElement("div", { style: { padding: '1.2rem 0.8rem' } },
|
|
13
|
+
react_1.default.createElement(TYPO_COMP, { style: { fontStyle: "italic" } }, "No Results!")));
|
|
14
14
|
};
|
|
15
15
|
exports.NoOptionResultsComp = NoOptionResultsComp;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function OptionsMulti({ lightboxHeight, lightboxStyle, optionsAnchor, value, id, optionsClassName, relativeToRef, showOptions, handleHideOptions, handleSelect, options, isSearchable, label, optionsModalLabel, searchString, setSearchString, SelectComp, isTagsStyle, genCreateTagButton,
|
|
1
|
+
export function OptionsMulti({ lightboxHeight, lightboxStyle, optionsAnchor, value, id, optionsClassName, relativeToRef, showOptions, handleHideOptions, handleSelect, options, isSearchable, label, optionsModalLabel, searchString, setSearchString, SelectComp, isTagsStyle, genCreateTagButton, setFocusSelectTagsInput, popOutOfOverflowHiddenParent, S, searchbarPlaceholder, alignDropdown, matchSelectInputWidth }: {
|
|
2
2
|
lightboxHeight: any;
|
|
3
3
|
lightboxStyle: any;
|
|
4
4
|
optionsAnchor: any;
|
|
@@ -18,11 +18,11 @@ export function OptionsMulti({ lightboxHeight, lightboxStyle, optionsAnchor, val
|
|
|
18
18
|
SelectComp: any;
|
|
19
19
|
isTagsStyle: any;
|
|
20
20
|
genCreateTagButton: any;
|
|
21
|
-
invert: any;
|
|
22
21
|
setFocusSelectTagsInput: any;
|
|
23
22
|
popOutOfOverflowHiddenParent: any;
|
|
24
23
|
S: any;
|
|
25
24
|
searchbarPlaceholder: any;
|
|
26
25
|
alignDropdown: any;
|
|
26
|
+
matchSelectInputWidth: any;
|
|
27
27
|
}): React.JSX.Element;
|
|
28
28
|
import React from "react";
|