oolib 2.233.1 → 2.235.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/icons/index.d.ts
CHANGED
|
@@ -40,6 +40,7 @@ export namespace icons {
|
|
|
40
40
|
export { Envelope };
|
|
41
41
|
export { Checks };
|
|
42
42
|
export { Check };
|
|
43
|
+
export { Clock };
|
|
43
44
|
export { ArrowClockwise };
|
|
44
45
|
export { ArrowsClockwise };
|
|
45
46
|
export { ArrowsIn };
|
|
@@ -277,6 +278,7 @@ import { PhoneIcon as Phone } from "@phosphor-icons/react";
|
|
|
277
278
|
import { EnvelopeIcon as Envelope } from "@phosphor-icons/react";
|
|
278
279
|
import { ChecksIcon as Checks } from "@phosphor-icons/react";
|
|
279
280
|
import { CheckIcon as Check } from "@phosphor-icons/react";
|
|
281
|
+
import { ClockIcon as Clock } from "@phosphor-icons/react";
|
|
280
282
|
import { ArrowClockwiseIcon as ArrowClockwise } from "@phosphor-icons/react";
|
|
281
283
|
import { ArrowsClockwiseIcon as ArrowsClockwise } from "@phosphor-icons/react";
|
|
282
284
|
import { ArrowsInIcon as ArrowsIn } from "@phosphor-icons/react";
|
package/dist/icons/index.js
CHANGED
|
@@ -45,6 +45,7 @@ exports.icons = {
|
|
|
45
45
|
Envelope: react_1.EnvelopeIcon,
|
|
46
46
|
Checks: react_1.ChecksIcon,
|
|
47
47
|
Check: react_1.CheckIcon,
|
|
48
|
+
Clock: react_1.ClockIcon,
|
|
48
49
|
ArrowClockwise: react_1.ArrowClockwiseIcon,
|
|
49
50
|
ArrowsClockwise: react_1.ArrowsClockwiseIcon,
|
|
50
51
|
ArrowsIn: react_1.ArrowsInIcon,
|
|
@@ -1,4 +1,4 @@
|
|
|
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, content, }: {
|
|
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, content, plugin, }: {
|
|
2
2
|
optionsAnchor: any;
|
|
3
3
|
lightboxHeight: any;
|
|
4
4
|
lightboxStyle: any;
|
|
@@ -38,5 +38,6 @@ export function DropdownSingle({ optionsAnchor, lightboxHeight, lightboxStyle, s
|
|
|
38
38
|
variant?: string;
|
|
39
39
|
matchSelectInputWidth: any;
|
|
40
40
|
content: any;
|
|
41
|
+
plugin: any;
|
|
41
42
|
}, ...args: any[]): React.JSX.Element;
|
|
42
43
|
import React from "react";
|
|
@@ -68,6 +68,7 @@ var styled_1 = require("../styled");
|
|
|
68
68
|
// single_multi
|
|
69
69
|
// static_dynamic
|
|
70
70
|
function DropdownSingle(_a) {
|
|
71
|
+
var _b, _c;
|
|
71
72
|
var optionsAnchor = _a.optionsAnchor, lightboxHeight = _a.lightboxHeight, lightboxStyle = _a.lightboxStyle,
|
|
72
73
|
//to restructure: rename to TYPO = 'SANS_3' or something. which can be overridden
|
|
73
74
|
selectClassName = _a.selectClassName, //used to override font size in priimary header
|
|
@@ -81,16 +82,23 @@ function DropdownSingle(_a) {
|
|
|
81
82
|
searchFieldsConfig = _a.searchFieldsConfig, setFilteredOptionsInParent = _a.setFilteredOptions, setSearchStringInParent = _a.setSearchString, searchStringInParent = _a.searchString, genCustomSelectComp = _a.genCustomSelectComp, placeholder = _a.placeholder, //
|
|
82
83
|
genCreateTagButton = _a.genCreateTagButton, popOutOfOverflowHiddenParent = _a.popOutOfOverflowHiddenParent, S = _a.S, //
|
|
83
84
|
disabled = _a.disabled, //
|
|
84
|
-
tagColor = _a.tagColor, observerRef = _a.observerRef, searchbarPlaceholder = _a.searchbarPlaceholder,
|
|
85
|
+
tagColor = _a.tagColor, observerRef = _a.observerRef, searchbarPlaceholder = _a.searchbarPlaceholder, _d = _a.alignDropdown, alignDropdown = _d === void 0 ? "left" : _d, _e = _a.variant, variant = _e === void 0 ? "default" : _e, matchSelectInputWidth = _a.matchSelectInputWidth, content = _a.content, // parent document; content.meta.kp_content_type is used to set ?activeTab= on collection tag links
|
|
86
|
+
plugin = _a.plugin;
|
|
85
87
|
var theme = (0, styled_components_1.useTheme)();
|
|
86
88
|
var props = arguments[0];
|
|
87
|
-
|
|
89
|
+
// Plugin: optionsFetcherFn — looks up a named hook from tplBlockPlugins to fetch options
|
|
90
|
+
var _noopOptionsFetcher = function () { return ({ options: undefined, status: "idle" }); };
|
|
91
|
+
var _useOptionsFetcherPlugin = ((plugin === null || plugin === void 0 ? void 0 : plugin.optionsFetcherFn) && ((_c = (_b = theme.pluginConfigs) === null || _b === void 0 ? void 0 : _b.tplBlockPlugins) === null || _c === void 0 ? void 0 : _c[plugin.optionsFetcherFn]))
|
|
92
|
+
|| _noopOptionsFetcher;
|
|
93
|
+
var pluginOptions = _useOptionsFetcherPlugin({ content: content, readOnly: readOnly }).options;
|
|
94
|
+
var effectiveOptionsProp = pluginOptions !== undefined ? pluginOptions : optionsProp;
|
|
95
|
+
var value = (0, getValue_1.getValue_SINGLE)({ valueProp: valueProp, optionsFn: optionsFn, options: effectiveOptionsProp, theme: theme, saveValueAsString: saveValueAsString });
|
|
88
96
|
//1 INIT REFS
|
|
89
|
-
var
|
|
97
|
+
var _f = (0, useCreateDropdownRefs_1.useCreateDropdownRefs)(), selectRef = _f.selectRef, dropdownRef = _f.dropdownRef;
|
|
90
98
|
//2 INIT SHOW OPTIONS STATE
|
|
91
|
-
var
|
|
99
|
+
var _g = (0, useHideShowOptions_1.useHideShowOptions)({
|
|
92
100
|
broadcastShowOptions: broadcastShowOptions
|
|
93
|
-
}), showOptions =
|
|
101
|
+
}), showOptions = _g.showOptions, handleHideOptions = _g.handleHideOptions, handleShowOptions = _g.handleShowOptions;
|
|
94
102
|
var screenWidth = (0, useScreenWidth_1.useScreenWidth)();
|
|
95
103
|
//3 INIT DD FOCUS CUSTOM HOOK
|
|
96
104
|
(0, useHandleClickOutside_1.useHandleClickOutside)(dropdownRef, handleHideOptions, { enabled: screenWidth >= (0, mixins_1.getBreakPoint)('sm') });
|
|
@@ -108,13 +116,13 @@ function DropdownSingle(_a) {
|
|
|
108
116
|
});
|
|
109
117
|
};
|
|
110
118
|
//-- TAG INPUT SPECIFIC
|
|
111
|
-
var
|
|
119
|
+
var _h = (0, useSearchString_1.useSearchString)({
|
|
112
120
|
searchStringInParent: searchStringInParent,
|
|
113
121
|
setSearchStringInParent: setSearchStringInParent
|
|
114
|
-
}), searchString =
|
|
122
|
+
}), searchString = _h[0], setSearchString = _h[1];
|
|
115
123
|
var options = (0, react_1.useMemo)(function () {
|
|
116
124
|
var ops = (0, generateOptions_1.generateOptions)({
|
|
117
|
-
options:
|
|
125
|
+
options: effectiveOptionsProp,
|
|
118
126
|
optionsFn: optionsFn,
|
|
119
127
|
theme: theme
|
|
120
128
|
});
|
|
@@ -129,7 +137,7 @@ function DropdownSingle(_a) {
|
|
|
129
137
|
setFilteredOptionsInParent: setFilteredOptionsInParent,
|
|
130
138
|
});
|
|
131
139
|
}, [
|
|
132
|
-
|
|
140
|
+
effectiveOptionsProp,
|
|
133
141
|
optionsFn === null || optionsFn === void 0 ? void 0 : optionsFn.fn,
|
|
134
142
|
optionsFn === null || optionsFn === void 0 ? void 0 : optionsFn.args,
|
|
135
143
|
searchString
|