@shoper/phoenix_design_system 0.15.0-6 → 0.15.7
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/build/cjs/_virtual/_Symbol.js_commonjs-proxy +10 -0
- package/build/cjs/_virtual/_Symbol.js_commonjs-proxy.map +1 -0
- package/build/cjs/_virtual/_baseGetTag.js_commonjs-proxy +10 -0
- package/build/cjs/_virtual/_baseGetTag.js_commonjs-proxy.map +1 -0
- package/build/cjs/_virtual/_freeGlobal.js_commonjs-proxy +10 -0
- package/build/cjs/_virtual/_freeGlobal.js_commonjs-proxy.map +1 -0
- package/build/cjs/_virtual/_getRawTag.js_commonjs-proxy +10 -0
- package/build/cjs/_virtual/_getRawTag.js_commonjs-proxy.map +1 -0
- package/build/cjs/_virtual/_objectToString.js_commonjs-proxy +10 -0
- package/build/cjs/_virtual/_objectToString.js_commonjs-proxy.map +1 -0
- package/build/cjs/_virtual/_root.js_commonjs-proxy +10 -0
- package/build/cjs/_virtual/_root.js_commonjs-proxy.map +1 -0
- package/build/cjs/_virtual/debounce.js_commonjs-proxy +10 -0
- package/build/cjs/_virtual/debounce.js_commonjs-proxy.map +1 -0
- package/build/cjs/_virtual/isObject.js_commonjs-proxy +10 -0
- package/build/cjs/_virtual/isObject.js_commonjs-proxy.map +1 -0
- package/build/cjs/_virtual/isObjectLike.js_commonjs-proxy +10 -0
- package/build/cjs/_virtual/isObjectLike.js_commonjs-proxy.map +1 -0
- package/build/cjs/_virtual/isSymbol.js_commonjs-proxy +10 -0
- package/build/cjs/_virtual/isSymbol.js_commonjs-proxy.map +1 -0
- package/build/cjs/_virtual/now.js_commonjs-proxy +10 -0
- package/build/cjs/_virtual/now.js_commonjs-proxy.map +1 -0
- package/build/cjs/_virtual/toNumber.js_commonjs-proxy +10 -0
- package/build/cjs/_virtual/toNumber.js_commonjs-proxy.map +1 -0
- package/build/cjs/external/lodash/_Symbol.js +13 -0
- package/build/{esm/external/lit-html/directives/if-defined.js.map → cjs/external/lodash/_Symbol.js.map} +1 -1
- package/build/cjs/external/lodash/_baseGetTag.js +35 -0
- package/build/cjs/external/lodash/_baseGetTag.js.map +1 -0
- package/build/cjs/external/lodash/_freeGlobal.js +14 -0
- package/build/cjs/external/{lit-html/directive-helpers.js.map → lodash/_freeGlobal.js.map} +0 -0
- package/build/cjs/external/lodash/_getRawTag.js +53 -0
- package/build/cjs/external/lodash/_getRawTag.js.map +1 -0
- package/build/cjs/external/lodash/_objectToString.js +29 -0
- package/build/cjs/external/lodash/_objectToString.js.map +1 -0
- package/build/cjs/external/lodash/_root.js +16 -0
- package/build/cjs/external/{lit-html/async-directive.js.map → lodash/_root.js.map} +0 -0
- package/build/cjs/external/lodash/debounce.js +198 -0
- package/build/cjs/external/lodash/debounce.js.map +1 -0
- package/build/cjs/external/lodash/isObject.js +38 -0
- package/build/cjs/external/lodash/isObject.js.map +1 -0
- package/build/cjs/external/lodash/isObjectLike.js +36 -0
- package/build/cjs/external/lodash/isObjectLike.js.map +1 -0
- package/build/cjs/external/lodash/isSymbol.js +36 -0
- package/build/cjs/external/lodash/isSymbol.js.map +1 -0
- package/build/cjs/external/lodash/now.js +30 -0
- package/build/cjs/external/lodash/now.js.map +1 -0
- package/build/cjs/external/lodash/throttle.js +76 -0
- package/build/cjs/external/lodash/throttle.js.map +1 -0
- package/build/cjs/external/lodash/toNumber.js +73 -0
- package/build/cjs/external/lodash/toNumber.js.map +1 -0
- package/build/cjs/packages/phoenix/src/components/dropdown/dropdown.js +11 -22
- package/build/cjs/packages/phoenix/src/components/dropdown/dropdown.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/checkbox/checkbox_content.js +2 -2
- package/build/cjs/packages/phoenix/src/components/form/checkbox/checkbox_content.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/checkbox/checkbox_control.js +20 -20
- package/build/cjs/packages/phoenix/src/components/form/checkbox/checkbox_control.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/input/input_control.js +6 -6
- package/build/cjs/packages/phoenix/src/components/form/input/input_control.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/radio/radio_content.js +2 -2
- package/build/cjs/packages/phoenix/src/components/form/radio/radio_content.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/radio/radio_control.js +5 -5
- package/build/cjs/packages/phoenix/src/components/form/radio/radio_control.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/switch/switch_content.js +2 -2
- package/build/cjs/packages/phoenix/src/components/form/switch/switch_content.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/switch/switch_control.js +4 -4
- package/build/cjs/packages/phoenix/src/components/form/switch/switch_control.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/textarea/textarea_control.js +4 -4
- package/build/cjs/packages/phoenix/src/components/form/textarea/textarea_control.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/modal/modal.js +17 -16
- package/build/cjs/packages/phoenix/src/components/modal/modal.js.map +1 -1
- package/build/cjs/packages/phoenix/src/controllers/relative_position_controller/relative_position_controller.js +3 -3
- package/build/cjs/packages/phoenix/src/controllers/relative_position_controller/relative_position_controller.js.map +1 -1
- package/build/cjs/packages/phoenix/src/controllers/visibility_controller/visibility_controller.js +1 -1
- package/build/cjs/packages/phoenix/src/index.js +2 -2
- package/build/esm/_virtual/_Symbol.js_commonjs-proxy +3 -0
- package/build/esm/_virtual/_Symbol.js_commonjs-proxy.map +1 -0
- package/build/esm/_virtual/_baseGetTag.js_commonjs-proxy +3 -0
- package/build/esm/_virtual/_baseGetTag.js_commonjs-proxy.map +1 -0
- package/build/esm/_virtual/_freeGlobal.js_commonjs-proxy +3 -0
- package/build/esm/_virtual/_freeGlobal.js_commonjs-proxy.map +1 -0
- package/build/esm/_virtual/_getRawTag.js_commonjs-proxy +3 -0
- package/build/esm/_virtual/_getRawTag.js_commonjs-proxy.map +1 -0
- package/build/esm/_virtual/_objectToString.js_commonjs-proxy +3 -0
- package/build/esm/_virtual/_objectToString.js_commonjs-proxy.map +1 -0
- package/build/esm/_virtual/_root.js_commonjs-proxy +3 -0
- package/build/esm/_virtual/_root.js_commonjs-proxy.map +1 -0
- package/build/esm/_virtual/debounce.js_commonjs-proxy +3 -0
- package/build/esm/_virtual/debounce.js_commonjs-proxy.map +1 -0
- package/build/esm/_virtual/isObject.js_commonjs-proxy +3 -0
- package/build/esm/_virtual/isObject.js_commonjs-proxy.map +1 -0
- package/build/esm/_virtual/isObjectLike.js_commonjs-proxy +3 -0
- package/build/esm/_virtual/isObjectLike.js_commonjs-proxy.map +1 -0
- package/build/esm/_virtual/isSymbol.js_commonjs-proxy +3 -0
- package/build/esm/_virtual/isSymbol.js_commonjs-proxy.map +1 -0
- package/build/esm/_virtual/now.js_commonjs-proxy +3 -0
- package/build/esm/_virtual/now.js_commonjs-proxy.map +1 -0
- package/build/esm/_virtual/toNumber.js_commonjs-proxy +3 -0
- package/build/esm/_virtual/toNumber.js_commonjs-proxy.map +1 -0
- package/build/esm/external/lodash/_Symbol.js +9 -0
- package/build/esm/external/{lit-html/directive.js.map → lodash/_Symbol.js.map} +0 -0
- package/build/esm/external/lodash/_baseGetTag.js +31 -0
- package/build/esm/external/lodash/_baseGetTag.js.map +1 -0
- package/build/esm/external/lodash/_freeGlobal.js +10 -0
- package/build/esm/external/{lit-html/directive-helpers.js.map → lodash/_freeGlobal.js.map} +0 -0
- package/build/esm/external/lodash/_getRawTag.js +49 -0
- package/build/esm/external/lodash/_getRawTag.js.map +1 -0
- package/build/esm/external/lodash/_objectToString.js +25 -0
- package/build/{cjs/external/lit-html/directive.js.map → esm/external/lodash/_objectToString.js.map} +1 -1
- package/build/esm/external/lodash/_root.js +12 -0
- package/build/esm/external/{lit-html/async-directive.js.map → lodash/_root.js.map} +0 -0
- package/build/esm/external/lodash/debounce.js +194 -0
- package/build/esm/external/lodash/debounce.js.map +1 -0
- package/build/esm/external/lodash/isObject.js +34 -0
- package/build/esm/external/lodash/isObject.js.map +1 -0
- package/build/esm/external/lodash/isObjectLike.js +32 -0
- package/build/esm/external/lodash/isObjectLike.js.map +1 -0
- package/build/esm/external/lodash/isSymbol.js +32 -0
- package/build/esm/external/lodash/isSymbol.js.map +1 -0
- package/build/esm/external/lodash/now.js +26 -0
- package/build/{cjs/external/lit-html/directives/if-defined.js.map → esm/external/lodash/now.js.map} +1 -1
- package/build/esm/external/lodash/throttle.js +72 -0
- package/build/esm/external/lodash/throttle.js.map +1 -0
- package/build/esm/external/lodash/toNumber.js +69 -0
- package/build/esm/external/lodash/toNumber.js.map +1 -0
- package/build/esm/packages/phoenix/src/components/dropdown/dropdown.d.ts +1 -1
- package/build/esm/packages/phoenix/src/components/dropdown/dropdown.js +5 -16
- package/build/esm/packages/phoenix/src/components/dropdown/dropdown.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/checkbox/checkbox_content.js +2 -2
- package/build/esm/packages/phoenix/src/components/form/checkbox/checkbox_content.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/checkbox/checkbox_control.d.ts +1 -1
- package/build/esm/packages/phoenix/src/components/form/checkbox/checkbox_control.js +10 -10
- package/build/esm/packages/phoenix/src/components/form/checkbox/checkbox_control.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/input/input_control.js +6 -6
- package/build/esm/packages/phoenix/src/components/form/input/input_control.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/radio/radio_content.js +2 -2
- package/build/esm/packages/phoenix/src/components/form/radio/radio_content.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/radio/radio_control.js +5 -5
- package/build/esm/packages/phoenix/src/components/form/radio/radio_control.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/switch/switch_content.js +2 -2
- package/build/esm/packages/phoenix/src/components/form/switch/switch_content.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/switch/switch_control.js +4 -4
- package/build/esm/packages/phoenix/src/components/form/switch/switch_control.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/textarea/textarea_control.js +4 -4
- package/build/esm/packages/phoenix/src/components/form/textarea/textarea_control.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/modal/modal.d.ts +2 -1
- package/build/esm/packages/phoenix/src/components/modal/modal.js +10 -9
- package/build/esm/packages/phoenix/src/components/modal/modal.js.map +1 -1
- package/build/esm/packages/phoenix/src/controllers/click_outside_controller/click_outside_controller_types.d.ts +1 -1
- package/build/esm/packages/phoenix/src/controllers/click_outside_controller/click_outside_controller_types.js +1 -1
- package/build/esm/packages/phoenix/src/controllers/click_outside_controller/click_outside_controller_types.js.map +1 -1
- package/build/esm/packages/phoenix/src/controllers/relative_position_controller/relative_position_controller.js +5 -5
- package/build/esm/packages/phoenix/src/controllers/relative_position_controller/relative_position_controller.js.map +1 -1
- package/build/esm/packages/phoenix/src/controllers/visibility_controller/visibility_controller.d.ts +1 -1
- package/build/esm/packages/phoenix/src/controllers/visibility_controller/visibility_controller.js +1 -1
- package/build/esm/packages/phoenix/src/index.js +1 -1
- package/package.json +2 -2
- package/build/cjs/external/lit-html/async-directive.js +0 -16
- package/build/cjs/external/lit-html/directive-helpers.js +0 -14
- package/build/cjs/external/lit-html/directive.js +0 -15
- package/build/cjs/external/lit-html/directives/if-defined.js +0 -14
- package/build/cjs/external/lit-html/directives/ref.js +0 -17
- package/build/cjs/external/lit-html/directives/ref.js.map +0 -1
- package/build/cjs/external/lit-html/lit-html.js +0 -14
- package/build/cjs/external/lit-html/lit-html.js.map +0 -1
- package/build/cjs/external/lodash/lodash.js +0 -17110
- package/build/cjs/external/lodash/lodash.js.map +0 -1
- package/build/esm/external/lit-html/async-directive.js +0 -12
- package/build/esm/external/lit-html/directive-helpers.js +0 -10
- package/build/esm/external/lit-html/directive.js +0 -9
- package/build/esm/external/lit-html/directives/if-defined.js +0 -10
- package/build/esm/external/lit-html/directives/ref.js +0 -12
- package/build/esm/external/lit-html/directives/ref.js.map +0 -1
- package/build/esm/external/lit-html/lit-html.js +0 -9
- package/build/esm/external/lit-html/lit-html.js.map +0 -1
- package/build/esm/external/lodash/lodash.js +0 -17106
- package/build/esm/external/lodash/lodash.js.map +0 -1
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import isObject_1 from './isObject.js';
|
|
2
|
+
import now_1 from './now.js';
|
|
3
|
+
import toNumber_1 from './toNumber.js';
|
|
4
|
+
|
|
5
|
+
/** Error message constants. */
|
|
6
|
+
var FUNC_ERROR_TEXT = 'Expected a function';
|
|
7
|
+
|
|
8
|
+
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
9
|
+
var nativeMax = Math.max,
|
|
10
|
+
nativeMin = Math.min;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Creates a debounced function that delays invoking `func` until after `wait`
|
|
14
|
+
* milliseconds have elapsed since the last time the debounced function was
|
|
15
|
+
* invoked. The debounced function comes with a `cancel` method to cancel
|
|
16
|
+
* delayed `func` invocations and a `flush` method to immediately invoke them.
|
|
17
|
+
* Provide `options` to indicate whether `func` should be invoked on the
|
|
18
|
+
* leading and/or trailing edge of the `wait` timeout. The `func` is invoked
|
|
19
|
+
* with the last arguments provided to the debounced function. Subsequent
|
|
20
|
+
* calls to the debounced function return the result of the last `func`
|
|
21
|
+
* invocation.
|
|
22
|
+
*
|
|
23
|
+
* **Note:** If `leading` and `trailing` options are `true`, `func` is
|
|
24
|
+
* invoked on the trailing edge of the timeout only if the debounced function
|
|
25
|
+
* is invoked more than once during the `wait` timeout.
|
|
26
|
+
*
|
|
27
|
+
* If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
|
|
28
|
+
* until to the next tick, similar to `setTimeout` with a timeout of `0`.
|
|
29
|
+
*
|
|
30
|
+
* See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
|
|
31
|
+
* for details over the differences between `_.debounce` and `_.throttle`.
|
|
32
|
+
*
|
|
33
|
+
* @static
|
|
34
|
+
* @memberOf _
|
|
35
|
+
* @since 0.1.0
|
|
36
|
+
* @category Function
|
|
37
|
+
* @param {Function} func The function to debounce.
|
|
38
|
+
* @param {number} [wait=0] The number of milliseconds to delay.
|
|
39
|
+
* @param {Object} [options={}] The options object.
|
|
40
|
+
* @param {boolean} [options.leading=false]
|
|
41
|
+
* Specify invoking on the leading edge of the timeout.
|
|
42
|
+
* @param {number} [options.maxWait]
|
|
43
|
+
* The maximum time `func` is allowed to be delayed before it's invoked.
|
|
44
|
+
* @param {boolean} [options.trailing=true]
|
|
45
|
+
* Specify invoking on the trailing edge of the timeout.
|
|
46
|
+
* @returns {Function} Returns the new debounced function.
|
|
47
|
+
* @example
|
|
48
|
+
*
|
|
49
|
+
* // Avoid costly calculations while the window size is in flux.
|
|
50
|
+
* jQuery(window).on('resize', _.debounce(calculateLayout, 150));
|
|
51
|
+
*
|
|
52
|
+
* // Invoke `sendMail` when clicked, debouncing subsequent calls.
|
|
53
|
+
* jQuery(element).on('click', _.debounce(sendMail, 300, {
|
|
54
|
+
* 'leading': true,
|
|
55
|
+
* 'trailing': false
|
|
56
|
+
* }));
|
|
57
|
+
*
|
|
58
|
+
* // Ensure `batchLog` is invoked once after 1 second of debounced calls.
|
|
59
|
+
* var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
|
|
60
|
+
* var source = new EventSource('/stream');
|
|
61
|
+
* jQuery(source).on('message', debounced);
|
|
62
|
+
*
|
|
63
|
+
* // Cancel the trailing debounced invocation.
|
|
64
|
+
* jQuery(window).on('popstate', debounced.cancel);
|
|
65
|
+
*/
|
|
66
|
+
function debounce(func, wait, options) {
|
|
67
|
+
var lastArgs,
|
|
68
|
+
lastThis,
|
|
69
|
+
maxWait,
|
|
70
|
+
result,
|
|
71
|
+
timerId,
|
|
72
|
+
lastCallTime,
|
|
73
|
+
lastInvokeTime = 0,
|
|
74
|
+
leading = false,
|
|
75
|
+
maxing = false,
|
|
76
|
+
trailing = true;
|
|
77
|
+
|
|
78
|
+
if (typeof func != 'function') {
|
|
79
|
+
throw new TypeError(FUNC_ERROR_TEXT);
|
|
80
|
+
}
|
|
81
|
+
wait = toNumber_1(wait) || 0;
|
|
82
|
+
if (isObject_1(options)) {
|
|
83
|
+
leading = !!options.leading;
|
|
84
|
+
maxing = 'maxWait' in options;
|
|
85
|
+
maxWait = maxing ? nativeMax(toNumber_1(options.maxWait) || 0, wait) : maxWait;
|
|
86
|
+
trailing = 'trailing' in options ? !!options.trailing : trailing;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function invokeFunc(time) {
|
|
90
|
+
var args = lastArgs,
|
|
91
|
+
thisArg = lastThis;
|
|
92
|
+
|
|
93
|
+
lastArgs = lastThis = undefined;
|
|
94
|
+
lastInvokeTime = time;
|
|
95
|
+
result = func.apply(thisArg, args);
|
|
96
|
+
return result;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function leadingEdge(time) {
|
|
100
|
+
// Reset any `maxWait` timer.
|
|
101
|
+
lastInvokeTime = time;
|
|
102
|
+
// Start the timer for the trailing edge.
|
|
103
|
+
timerId = setTimeout(timerExpired, wait);
|
|
104
|
+
// Invoke the leading edge.
|
|
105
|
+
return leading ? invokeFunc(time) : result;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
function remainingWait(time) {
|
|
109
|
+
var timeSinceLastCall = time - lastCallTime,
|
|
110
|
+
timeSinceLastInvoke = time - lastInvokeTime,
|
|
111
|
+
timeWaiting = wait - timeSinceLastCall;
|
|
112
|
+
|
|
113
|
+
return maxing
|
|
114
|
+
? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
|
|
115
|
+
: timeWaiting;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
function shouldInvoke(time) {
|
|
119
|
+
var timeSinceLastCall = time - lastCallTime,
|
|
120
|
+
timeSinceLastInvoke = time - lastInvokeTime;
|
|
121
|
+
|
|
122
|
+
// Either this is the first call, activity has stopped and we're at the
|
|
123
|
+
// trailing edge, the system time has gone backwards and we're treating
|
|
124
|
+
// it as the trailing edge, or we've hit the `maxWait` limit.
|
|
125
|
+
return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
|
|
126
|
+
(timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
function timerExpired() {
|
|
130
|
+
var time = now_1();
|
|
131
|
+
if (shouldInvoke(time)) {
|
|
132
|
+
return trailingEdge(time);
|
|
133
|
+
}
|
|
134
|
+
// Restart the timer.
|
|
135
|
+
timerId = setTimeout(timerExpired, remainingWait(time));
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
function trailingEdge(time) {
|
|
139
|
+
timerId = undefined;
|
|
140
|
+
|
|
141
|
+
// Only invoke if we have `lastArgs` which means `func` has been
|
|
142
|
+
// debounced at least once.
|
|
143
|
+
if (trailing && lastArgs) {
|
|
144
|
+
return invokeFunc(time);
|
|
145
|
+
}
|
|
146
|
+
lastArgs = lastThis = undefined;
|
|
147
|
+
return result;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
function cancel() {
|
|
151
|
+
if (timerId !== undefined) {
|
|
152
|
+
clearTimeout(timerId);
|
|
153
|
+
}
|
|
154
|
+
lastInvokeTime = 0;
|
|
155
|
+
lastArgs = lastCallTime = lastThis = timerId = undefined;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
function flush() {
|
|
159
|
+
return timerId === undefined ? result : trailingEdge(now_1());
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
function debounced() {
|
|
163
|
+
var time = now_1(),
|
|
164
|
+
isInvoking = shouldInvoke(time);
|
|
165
|
+
|
|
166
|
+
lastArgs = arguments;
|
|
167
|
+
lastThis = this;
|
|
168
|
+
lastCallTime = time;
|
|
169
|
+
|
|
170
|
+
if (isInvoking) {
|
|
171
|
+
if (timerId === undefined) {
|
|
172
|
+
return leadingEdge(lastCallTime);
|
|
173
|
+
}
|
|
174
|
+
if (maxing) {
|
|
175
|
+
// Handle invocations in a tight loop.
|
|
176
|
+
clearTimeout(timerId);
|
|
177
|
+
timerId = setTimeout(timerExpired, wait);
|
|
178
|
+
return invokeFunc(lastCallTime);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
if (timerId === undefined) {
|
|
182
|
+
timerId = setTimeout(timerExpired, wait);
|
|
183
|
+
}
|
|
184
|
+
return result;
|
|
185
|
+
}
|
|
186
|
+
debounced.cancel = cancel;
|
|
187
|
+
debounced.flush = flush;
|
|
188
|
+
return debounced;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
var debounce_1 = debounce;
|
|
192
|
+
|
|
193
|
+
export default debounce_1;
|
|
194
|
+
//# sourceMappingURL=debounce.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks if `value` is the
|
|
3
|
+
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
4
|
+
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
5
|
+
*
|
|
6
|
+
* @static
|
|
7
|
+
* @memberOf _
|
|
8
|
+
* @since 0.1.0
|
|
9
|
+
* @category Lang
|
|
10
|
+
* @param {*} value The value to check.
|
|
11
|
+
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
12
|
+
* @example
|
|
13
|
+
*
|
|
14
|
+
* _.isObject({});
|
|
15
|
+
* // => true
|
|
16
|
+
*
|
|
17
|
+
* _.isObject([1, 2, 3]);
|
|
18
|
+
* // => true
|
|
19
|
+
*
|
|
20
|
+
* _.isObject(_.noop);
|
|
21
|
+
* // => true
|
|
22
|
+
*
|
|
23
|
+
* _.isObject(null);
|
|
24
|
+
* // => false
|
|
25
|
+
*/
|
|
26
|
+
function isObject(value) {
|
|
27
|
+
var type = typeof value;
|
|
28
|
+
return value != null && (type == 'object' || type == 'function');
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
var isObject_1 = isObject;
|
|
32
|
+
|
|
33
|
+
export default isObject_1;
|
|
34
|
+
//# sourceMappingURL=isObject.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
3
|
+
* and has a `typeof` result of "object".
|
|
4
|
+
*
|
|
5
|
+
* @static
|
|
6
|
+
* @memberOf _
|
|
7
|
+
* @since 4.0.0
|
|
8
|
+
* @category Lang
|
|
9
|
+
* @param {*} value The value to check.
|
|
10
|
+
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
11
|
+
* @example
|
|
12
|
+
*
|
|
13
|
+
* _.isObjectLike({});
|
|
14
|
+
* // => true
|
|
15
|
+
*
|
|
16
|
+
* _.isObjectLike([1, 2, 3]);
|
|
17
|
+
* // => true
|
|
18
|
+
*
|
|
19
|
+
* _.isObjectLike(_.noop);
|
|
20
|
+
* // => false
|
|
21
|
+
*
|
|
22
|
+
* _.isObjectLike(null);
|
|
23
|
+
* // => false
|
|
24
|
+
*/
|
|
25
|
+
function isObjectLike(value) {
|
|
26
|
+
return value != null && typeof value == 'object';
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
var isObjectLike_1 = isObjectLike;
|
|
30
|
+
|
|
31
|
+
export default isObjectLike_1;
|
|
32
|
+
//# sourceMappingURL=isObjectLike.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import _baseGetTag from './_baseGetTag.js';
|
|
2
|
+
import isObjectLike_1 from './isObjectLike.js';
|
|
3
|
+
|
|
4
|
+
/** `Object#toString` result references. */
|
|
5
|
+
var symbolTag = '[object Symbol]';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Checks if `value` is classified as a `Symbol` primitive or object.
|
|
9
|
+
*
|
|
10
|
+
* @static
|
|
11
|
+
* @memberOf _
|
|
12
|
+
* @since 4.0.0
|
|
13
|
+
* @category Lang
|
|
14
|
+
* @param {*} value The value to check.
|
|
15
|
+
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
|
16
|
+
* @example
|
|
17
|
+
*
|
|
18
|
+
* _.isSymbol(Symbol.iterator);
|
|
19
|
+
* // => true
|
|
20
|
+
*
|
|
21
|
+
* _.isSymbol('abc');
|
|
22
|
+
* // => false
|
|
23
|
+
*/
|
|
24
|
+
function isSymbol(value) {
|
|
25
|
+
return typeof value == 'symbol' ||
|
|
26
|
+
(isObjectLike_1(value) && _baseGetTag(value) == symbolTag);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
var isSymbol_1 = isSymbol;
|
|
30
|
+
|
|
31
|
+
export default isSymbol_1;
|
|
32
|
+
//# sourceMappingURL=isSymbol.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import _root from './_root.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Gets the timestamp of the number of milliseconds that have elapsed since
|
|
5
|
+
* the Unix epoch (1 January 1970 00:00:00 UTC).
|
|
6
|
+
*
|
|
7
|
+
* @static
|
|
8
|
+
* @memberOf _
|
|
9
|
+
* @since 2.4.0
|
|
10
|
+
* @category Date
|
|
11
|
+
* @returns {number} Returns the timestamp.
|
|
12
|
+
* @example
|
|
13
|
+
*
|
|
14
|
+
* _.defer(function(stamp) {
|
|
15
|
+
* console.log(_.now() - stamp);
|
|
16
|
+
* }, _.now());
|
|
17
|
+
* // => Logs the number of milliseconds it took for the deferred invocation.
|
|
18
|
+
*/
|
|
19
|
+
var now = function() {
|
|
20
|
+
return _root.Date.now();
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
var now_1 = now;
|
|
24
|
+
|
|
25
|
+
export default now_1;
|
|
26
|
+
//# sourceMappingURL=now.js.map
|
package/build/{cjs/external/lit-html/directives/if-defined.js.map → esm/external/lodash/now.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import isObject_1 from './isObject.js';
|
|
2
|
+
import debounce_1 from './debounce.js';
|
|
3
|
+
|
|
4
|
+
/** Error message constants. */
|
|
5
|
+
var FUNC_ERROR_TEXT = 'Expected a function';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Creates a throttled function that only invokes `func` at most once per
|
|
9
|
+
* every `wait` milliseconds. The throttled function comes with a `cancel`
|
|
10
|
+
* method to cancel delayed `func` invocations and a `flush` method to
|
|
11
|
+
* immediately invoke them. Provide `options` to indicate whether `func`
|
|
12
|
+
* should be invoked on the leading and/or trailing edge of the `wait`
|
|
13
|
+
* timeout. The `func` is invoked with the last arguments provided to the
|
|
14
|
+
* throttled function. Subsequent calls to the throttled function return the
|
|
15
|
+
* result of the last `func` invocation.
|
|
16
|
+
*
|
|
17
|
+
* **Note:** If `leading` and `trailing` options are `true`, `func` is
|
|
18
|
+
* invoked on the trailing edge of the timeout only if the throttled function
|
|
19
|
+
* is invoked more than once during the `wait` timeout.
|
|
20
|
+
*
|
|
21
|
+
* If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
|
|
22
|
+
* until to the next tick, similar to `setTimeout` with a timeout of `0`.
|
|
23
|
+
*
|
|
24
|
+
* See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
|
|
25
|
+
* for details over the differences between `_.throttle` and `_.debounce`.
|
|
26
|
+
*
|
|
27
|
+
* @static
|
|
28
|
+
* @memberOf _
|
|
29
|
+
* @since 0.1.0
|
|
30
|
+
* @category Function
|
|
31
|
+
* @param {Function} func The function to throttle.
|
|
32
|
+
* @param {number} [wait=0] The number of milliseconds to throttle invocations to.
|
|
33
|
+
* @param {Object} [options={}] The options object.
|
|
34
|
+
* @param {boolean} [options.leading=true]
|
|
35
|
+
* Specify invoking on the leading edge of the timeout.
|
|
36
|
+
* @param {boolean} [options.trailing=true]
|
|
37
|
+
* Specify invoking on the trailing edge of the timeout.
|
|
38
|
+
* @returns {Function} Returns the new throttled function.
|
|
39
|
+
* @example
|
|
40
|
+
*
|
|
41
|
+
* // Avoid excessively updating the position while scrolling.
|
|
42
|
+
* jQuery(window).on('scroll', _.throttle(updatePosition, 100));
|
|
43
|
+
*
|
|
44
|
+
* // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
|
|
45
|
+
* var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
|
|
46
|
+
* jQuery(element).on('click', throttled);
|
|
47
|
+
*
|
|
48
|
+
* // Cancel the trailing throttled invocation.
|
|
49
|
+
* jQuery(window).on('popstate', throttled.cancel);
|
|
50
|
+
*/
|
|
51
|
+
function throttle(func, wait, options) {
|
|
52
|
+
var leading = true,
|
|
53
|
+
trailing = true;
|
|
54
|
+
|
|
55
|
+
if (typeof func != 'function') {
|
|
56
|
+
throw new TypeError(FUNC_ERROR_TEXT);
|
|
57
|
+
}
|
|
58
|
+
if (isObject_1(options)) {
|
|
59
|
+
leading = 'leading' in options ? !!options.leading : leading;
|
|
60
|
+
trailing = 'trailing' in options ? !!options.trailing : trailing;
|
|
61
|
+
}
|
|
62
|
+
return debounce_1(func, wait, {
|
|
63
|
+
'leading': leading,
|
|
64
|
+
'maxWait': wait,
|
|
65
|
+
'trailing': trailing
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
var throttle_1 = throttle;
|
|
70
|
+
|
|
71
|
+
export default throttle_1;
|
|
72
|
+
//# sourceMappingURL=throttle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import isObject_1 from './isObject.js';
|
|
2
|
+
import isSymbol_1 from './isSymbol.js';
|
|
3
|
+
|
|
4
|
+
/** Used as references for various `Number` constants. */
|
|
5
|
+
var NAN = 0 / 0;
|
|
6
|
+
|
|
7
|
+
/** Used to match leading and trailing whitespace. */
|
|
8
|
+
var reTrim = /^\s+|\s+$/g;
|
|
9
|
+
|
|
10
|
+
/** Used to detect bad signed hexadecimal string values. */
|
|
11
|
+
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
|
12
|
+
|
|
13
|
+
/** Used to detect binary string values. */
|
|
14
|
+
var reIsBinary = /^0b[01]+$/i;
|
|
15
|
+
|
|
16
|
+
/** Used to detect octal string values. */
|
|
17
|
+
var reIsOctal = /^0o[0-7]+$/i;
|
|
18
|
+
|
|
19
|
+
/** Built-in method references without a dependency on `root`. */
|
|
20
|
+
var freeParseInt = parseInt;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Converts `value` to a number.
|
|
24
|
+
*
|
|
25
|
+
* @static
|
|
26
|
+
* @memberOf _
|
|
27
|
+
* @since 4.0.0
|
|
28
|
+
* @category Lang
|
|
29
|
+
* @param {*} value The value to process.
|
|
30
|
+
* @returns {number} Returns the number.
|
|
31
|
+
* @example
|
|
32
|
+
*
|
|
33
|
+
* _.toNumber(3.2);
|
|
34
|
+
* // => 3.2
|
|
35
|
+
*
|
|
36
|
+
* _.toNumber(Number.MIN_VALUE);
|
|
37
|
+
* // => 5e-324
|
|
38
|
+
*
|
|
39
|
+
* _.toNumber(Infinity);
|
|
40
|
+
* // => Infinity
|
|
41
|
+
*
|
|
42
|
+
* _.toNumber('3.2');
|
|
43
|
+
* // => 3.2
|
|
44
|
+
*/
|
|
45
|
+
function toNumber(value) {
|
|
46
|
+
if (typeof value == 'number') {
|
|
47
|
+
return value;
|
|
48
|
+
}
|
|
49
|
+
if (isSymbol_1(value)) {
|
|
50
|
+
return NAN;
|
|
51
|
+
}
|
|
52
|
+
if (isObject_1(value)) {
|
|
53
|
+
var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
|
|
54
|
+
value = isObject_1(other) ? (other + '') : other;
|
|
55
|
+
}
|
|
56
|
+
if (typeof value != 'string') {
|
|
57
|
+
return value === 0 ? value : +value;
|
|
58
|
+
}
|
|
59
|
+
value = value.replace(reTrim, '');
|
|
60
|
+
var isBinary = reIsBinary.test(value);
|
|
61
|
+
return (isBinary || reIsOctal.test(value))
|
|
62
|
+
? freeParseInt(value.slice(2), isBinary ? 2 : 8)
|
|
63
|
+
: (reIsBadHex.test(value) ? NAN : +value);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
var toNumber_1 = toNumber;
|
|
67
|
+
|
|
68
|
+
export default toNumber_1;
|
|
69
|
+
//# sourceMappingURL=toNumber.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { TemplateResult } from 'lit';
|
|
2
1
|
import { HDropdownContent } from './dropdown_content';
|
|
3
2
|
import { IDropdown } from "./dropdown_types";
|
|
4
3
|
import { PhoenixLightLitElement } from "../../core/phoenix_light_lit_element";
|
|
4
|
+
import { TemplateResult } from 'lit-html';
|
|
5
5
|
export declare class HDropdown extends PhoenixLightLitElement implements IDropdown {
|
|
6
6
|
opened: boolean;
|
|
7
7
|
direction: "bottom-center";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { __decorate, __metadata } from '../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { html } from 'lit';
|
|
3
|
-
import { property } from 'lit/decorators';
|
|
4
2
|
import { PhoenixLightLitElement } from '../../core/phoenix_light_lit_element.js';
|
|
5
3
|
import { phoenixCustomElement } from '../../core/decorators/phoenix_custom_element.js';
|
|
6
4
|
import { PORTAL_TARGET_COMPONENT_NAME, PORTAL_TARGET_NAME_PROP } from '../portal/portal_constants.js';
|
|
5
|
+
import { html } from 'lit-html';
|
|
7
6
|
import { BackdropController } from '../backdrop/controller/backdrop_controller.js';
|
|
7
|
+
import { property } from '@lit/reactive-element/decorators.js';
|
|
8
8
|
import { BREAKPOINTS, SCROLLABLE_CLASS_NAME } from '../../global_constants.js';
|
|
9
9
|
import { DEFAULT_DROPDOWN_PORTAL_NAME, DROPDOWN_CONTENT_VISIBLE_CLASS, DROPDOWN_CONTENT_SHOW, DROPDOWN_EVENTS, DROPDOWN_CONTENT_HIDE, DROPDOWN_CONTAINER_NAME, DROPDOWN_CONTENT_NAME, DROPDOWN_TOGGLER_NAME } from './dropdown_constants.js';
|
|
10
|
-
import { DIRECTIONS,
|
|
10
|
+
import { DIRECTIONS, RELATIVE_POSITION_CONTROLLER_EVENTS, DEFAULT_THROTTLE_WAIT_TIME } from '../../controllers/relative_position_controller/relative_position_controller_constants.js';
|
|
11
11
|
import { ClickOutsideController } from '../../controllers/click_outside_controller/click_outside_controller.js';
|
|
12
|
-
import
|
|
12
|
+
import throttle_1 from '../../../../../external/lodash/throttle.js';
|
|
13
13
|
import { RelativePositionController } from '../../controllers/relative_position_controller/relative_position_controller.js';
|
|
14
14
|
|
|
15
15
|
var HDropdown_1;
|
|
@@ -27,21 +27,11 @@ let HDropdown = HDropdown_1 = class HDropdown extends PhoenixLightLitElement {
|
|
|
27
27
|
var _a, _b;
|
|
28
28
|
if (!this.opened)
|
|
29
29
|
return;
|
|
30
|
-
//
|
|
31
|
-
// const target = ev.detail.target as HTMLElement;
|
|
32
30
|
const clickedWithinNestedDropdown = (_a = this.$nestedDropdownContentElements) === null || _a === void 0 ? void 0 : _a.find((element) => element.contains(target));
|
|
33
31
|
const shouldHideElements = !((_b = this.$dropdownContent) === null || _b === void 0 ? void 0 : _b.contains(target)) && !this.contains(target) && !clickedWithinNestedDropdown;
|
|
34
32
|
if (shouldHideElements)
|
|
35
33
|
this.hide();
|
|
36
34
|
};
|
|
37
|
-
// private _handleClickOutside = (ev: CustomEvent<TClickOutsideEvent>): void => {
|
|
38
|
-
// if (!this.opened) return;
|
|
39
|
-
//
|
|
40
|
-
// const target = ev.detail.target as HTMLElement;
|
|
41
|
-
//
|
|
42
|
-
// const clickedWithinNestedDropdown = this.$nestedDropdownContentElements?.find((element) =>
|
|
43
|
-
// element.contains(target)); const shouldHideElements = !this.$dropdownContent?.contains(target) &&
|
|
44
|
-
// !this.contains(target) && !clickedWithinNestedDropdown; if (shouldHideElements) this.hide(); }
|
|
45
35
|
this.toggle = () => {
|
|
46
36
|
this.opened ? this.hide() : this.show();
|
|
47
37
|
};
|
|
@@ -109,7 +99,7 @@ let HDropdown = HDropdown_1 = class HDropdown extends PhoenixLightLitElement {
|
|
|
109
99
|
this._handleEnabledPositioning = () => {
|
|
110
100
|
this._backdropController.hide();
|
|
111
101
|
};
|
|
112
|
-
this._observeScrollToggling =
|
|
102
|
+
this._observeScrollToggling = throttle_1(() => {
|
|
113
103
|
this._toggleScroll();
|
|
114
104
|
}, DEFAULT_THROTTLE_WAIT_TIME);
|
|
115
105
|
this._hoverToggle = async (ev) => {
|
|
@@ -184,7 +174,6 @@ let HDropdown = HDropdown_1 = class HDropdown extends PhoenixLightLitElement {
|
|
|
184
174
|
}
|
|
185
175
|
}
|
|
186
176
|
_setupListeners() {
|
|
187
|
-
// this.addEventListener(CLICK_OUTSIDE_CONTROLLER_MESSAGES.clickedOutside, this._handleClickOutside);
|
|
188
177
|
var _a;
|
|
189
178
|
this.addEventListener(RELATIVE_POSITION_CONTROLLER_EVENTS.disabledPositioning, this._handleDisabledPositioning);
|
|
190
179
|
this.addEventListener(RELATIVE_POSITION_CONTROLLER_EVENTS.enabledPositioning, this._handleEnabledPositioning);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,4CAAgD;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,4CAAgD;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,4CAAgD;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -4,7 +4,7 @@ import { property } from 'lit/decorators';
|
|
|
4
4
|
import { PhoenixLightLitElement } from '../../../core/phoenix_light_lit_element.js';
|
|
5
5
|
import { phoenixCustomElement } from '../../../core/decorators/phoenix_custom_element.js';
|
|
6
6
|
import { ControlPropsSyncConsumerController } from '../controllers/props_synchronizing/control_props_sync_consumer_controller.js';
|
|
7
|
-
import { ifDefined
|
|
7
|
+
import { ifDefined } from 'lit-html/directives/if-defined.js';
|
|
8
8
|
import { CHECKBOX_CONTROL_CSS_CLASSES, CHECKBOX_SLOTS } from './checkbox_constants.js';
|
|
9
9
|
import { LABEL_CSS_CLASSES } from '../label/label_constants.js';
|
|
10
10
|
|
|
@@ -22,7 +22,7 @@ let HCheckboxContent = class HCheckboxContent extends PhoenixLightLitElement {
|
|
|
22
22
|
render() {
|
|
23
23
|
super.render();
|
|
24
24
|
return html `
|
|
25
|
-
<label class="${LABEL_CSS_CLASSES.label}" for="${
|
|
25
|
+
<label class="${LABEL_CSS_CLASSES.label}" for="${ifDefined(this.controlId)}">${this.getSlot(CHECKBOX_SLOTS.label)}</label>
|
|
26
26
|
|
|
27
27
|
${this.hasSlot(CHECKBOX_SLOTS.description)
|
|
28
28
|
? html ` <div class="${CHECKBOX_CONTROL_CSS_CLASSES.checkboxDescription}">${this.getSlot(CHECKBOX_SLOTS.description)}</div> `
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PhoenixLightLitElement } from "../../../core/phoenix_light_lit_element";
|
|
2
|
-
import { TemplateResult } from 'lit';
|
|
2
|
+
import { TemplateResult } from 'lit-html';
|
|
3
3
|
export declare class HCheckboxControl extends PhoenixLightLitElement {
|
|
4
4
|
controlId: string;
|
|
5
5
|
controlName: string;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { __decorate, __metadata } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { html } from 'lit';
|
|
3
|
-
import { property } from 'lit/decorators';
|
|
4
2
|
import { PhoenixLightLitElement } from '../../../core/phoenix_light_lit_element.js';
|
|
5
3
|
import { phoenixCustomElement } from '../../../core/decorators/phoenix_custom_element.js';
|
|
6
|
-
import {
|
|
4
|
+
import { html } from 'lit-html';
|
|
5
|
+
import { property } from '@lit/reactive-element/decorators.js';
|
|
6
|
+
import { createRef, ref } from 'lit-html/directives/ref.js';
|
|
7
7
|
import classnames from '../../../../external/classnames/index.js';
|
|
8
8
|
import { ControlPropsSyncConsumerController } from '../controllers/props_synchronizing/control_props_sync_consumer_controller.js';
|
|
9
|
-
import { ifDefined
|
|
9
|
+
import { ifDefined } from 'lit-html/directives/if-defined.js';
|
|
10
10
|
import { CHECKBOX_CONTROL_EVENTS, CHECKBOX_CONTROL_CSS_CLASSES } from './checkbox_constants.js';
|
|
11
11
|
|
|
12
12
|
let HCheckboxControl = class HCheckboxControl extends PhoenixLightLitElement {
|
|
13
13
|
constructor() {
|
|
14
14
|
super();
|
|
15
|
-
this._inputRef =
|
|
15
|
+
this._inputRef = createRef();
|
|
16
16
|
this._handleChangeEvent = (event) => {
|
|
17
17
|
this.dispatchEvent(new CustomEvent(CHECKBOX_CONTROL_EVENTS.change, {
|
|
18
18
|
detail: event,
|
|
@@ -37,12 +37,12 @@ let HCheckboxControl = class HCheckboxControl extends PhoenixLightLitElement {
|
|
|
37
37
|
this._inputRef.value.indeterminate = this.partiallyChecked;
|
|
38
38
|
return html `
|
|
39
39
|
<input
|
|
40
|
-
${
|
|
40
|
+
${ref(this._inputRef)}
|
|
41
41
|
type="checkbox"
|
|
42
42
|
class="${checkboxInputClasses}"
|
|
43
|
-
id="${
|
|
44
|
-
name="${
|
|
45
|
-
value="${
|
|
43
|
+
id="${ifDefined(this.controlId)}"
|
|
44
|
+
name="${ifDefined(this.controlName)}"
|
|
45
|
+
value="${ifDefined(this.value)}"
|
|
46
46
|
?disabled="${this.disabled}"
|
|
47
47
|
?required="${this.required}"
|
|
48
48
|
?readonly="${this.readonly}"
|
|
@@ -51,7 +51,7 @@ let HCheckboxControl = class HCheckboxControl extends PhoenixLightLitElement {
|
|
|
51
51
|
@change="${this._handleChangeEvent}"
|
|
52
52
|
/>
|
|
53
53
|
|
|
54
|
-
<label class="${CHECKBOX_CONTROL_CSS_CLASSES.checkboxLabel}" for="${
|
|
54
|
+
<label class="${CHECKBOX_CONTROL_CSS_CLASSES.checkboxLabel}" for="${ifDefined(this.controlId)}"></label>
|
|
55
55
|
`;
|
|
56
56
|
}
|
|
57
57
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA,uBAAuB,0CAA8C;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|