@esri/solutions-components 0.3.6 → 0.3.7
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/buffer-tools_6.cjs.entry.js +8 -5
- package/dist/cjs/calcite-combobox_3.cjs.entry.js +2 -2
- package/dist/cjs/calcite-input-message_5.cjs.entry.js +6 -4
- package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +2 -2
- package/dist/cjs/{csvUtils-83af7ae1.js → csvUtils-34666909.js} +1 -1
- package/dist/cjs/{interfaces-772edf61.js → interfaces-17c631bf.js} +1 -1
- package/dist/cjs/layer-table.cjs.entry.js +3 -3
- package/dist/cjs/map-card.cjs.entry.js +1 -1
- package/dist/cjs/{mapViewUtils-55ac76cb.js → mapViewUtils-24d1d859.js} +1 -1
- package/dist/cjs/public-notification.cjs.entry.js +16 -10
- package/dist/cjs/solution-configuration.cjs.entry.js +2 -2
- package/dist/cjs/solution-contents_3.cjs.entry.js +2 -2
- package/dist/cjs/{solution-store-39726b81.js → solution-store-2dbab624.js} +1 -1
- package/dist/collection/components/buffer-tools/buffer-tools.js +2 -2
- package/dist/collection/components/map-draw-tools/map-draw-tools.js +2 -1
- package/dist/collection/components/public-notification/public-notification.js +14 -8
- package/dist/collection/components/refine-selection/refine-selection.js +4 -2
- package/dist/collection/components/refine-selection-tools/refine-selection-tools.css +1 -0
- package/dist/collection/components/refine-selection-tools/refine-selection-tools.js +3 -1
- package/dist/collection/demos/new-public-notification.html +2 -1
- package/dist/collection/utils/interfaces.js +1 -1
- package/dist/collection/utils/interfaces.ts +2 -2
- package/dist/components/interfaces3.js +1 -1
- package/dist/components/map-draw-tools2.js +2 -1
- package/dist/components/public-notification.js +14 -8
- package/dist/components/refine-selection-tools2.js +4 -2
- package/dist/components/refine-selection2.js +4 -2
- package/dist/esm/buffer-tools_6.entry.js +8 -5
- package/dist/esm/calcite-combobox_3.entry.js +2 -2
- package/dist/esm/calcite-input-message_5.entry.js +6 -4
- package/dist/esm/calcite-shell-panel_14.entry.js +2 -2
- package/dist/esm/{csvUtils-eb231cfb.js → csvUtils-ae3004b9.js} +1 -1
- package/dist/esm/{interfaces-3b23a5f9.js → interfaces-d0d83efa.js} +1 -1
- package/dist/esm/layer-table.entry.js +3 -3
- package/dist/esm/map-card.entry.js +1 -1
- package/dist/esm/{mapViewUtils-e5d8a1e1.js → mapViewUtils-541e7a3c.js} +1 -1
- package/dist/esm/public-notification.entry.js +16 -10
- package/dist/esm/solution-configuration.entry.js +2 -2
- package/dist/esm/solution-contents_3.entry.js +2 -2
- package/dist/esm/{solution-store-c0bf9200.js → solution-store-41e15f1c.js} +1 -1
- package/dist/solutions-components/demos/new-public-notification.html +2 -1
- package/dist/solutions-components/p-05e64bd1.js +498 -2
- package/dist/solutions-components/p-08a95b33.entry.js +138 -0
- package/dist/solutions-components/p-0da5bbdf.entry.js +91 -0
- package/dist/solutions-components/p-0ef91144.entry.js +913 -0
- package/dist/solutions-components/p-0f523243.entry.js +1916 -0
- package/dist/solutions-components/p-11b9510e.entry.js +173 -0
- package/dist/solutions-components/p-1b875d94.entry.js +58 -0
- package/dist/solutions-components/p-1c567f3a.js +23 -16
- package/dist/solutions-components/p-1c883db9.entry.js +43 -0
- package/dist/solutions-components/p-1f225056.js +322 -0
- package/dist/solutions-components/p-1f499e67.entry.js +72 -0
- package/dist/solutions-components/p-20d3d758.entry.js +881 -0
- package/dist/solutions-components/p-2274ac9e.entry.js +160 -0
- package/dist/solutions-components/p-23ec5ac5.entry.js +93 -0
- package/dist/solutions-components/p-2447798c.entry.js +155 -0
- package/dist/solutions-components/p-2525e691.entry.js +432 -0
- package/dist/solutions-components/p-2561f5b5.js +4092 -0
- package/dist/solutions-components/p-29f887c0.entry.js +234 -0
- package/dist/solutions-components/p-2a0d8047.entry.js +345 -0
- package/dist/solutions-components/p-2c177e6a.entry.js +101 -0
- package/dist/solutions-components/p-2e9ed892.js +46 -1
- package/dist/solutions-components/p-316f56db.js +219 -2
- package/dist/solutions-components/p-327f3ebf.entry.js +98 -0
- package/dist/solutions-components/p-356f8b54.entry.js +138 -0
- package/dist/solutions-components/p-359c58de.entry.js +172 -0
- package/dist/solutions-components/p-37336c0d.entry.js +116 -0
- package/dist/solutions-components/p-374a5031.js +105 -2
- package/dist/solutions-components/p-39ea6ef4.entry.js +71 -0
- package/dist/solutions-components/p-3b010ce1.js +17 -1
- package/dist/solutions-components/p-4307dacd.js +194 -1
- package/dist/solutions-components/p-44da2507.js +405 -14
- package/dist/solutions-components/p-46bdffe8.entry.js +54 -0
- package/dist/solutions-components/p-4894bbeb.js +53 -2
- package/dist/solutions-components/p-4cd569f1.entry.js +1298 -0
- package/dist/solutions-components/p-4d4160f9.entry.js +121 -0
- package/dist/solutions-components/p-4e32bf8c.js +482 -1
- package/dist/solutions-components/p-4e9cbd32.entry.js +184 -0
- package/dist/solutions-components/p-508317b3.js +13 -2
- package/dist/solutions-components/p-54697d58.entry.js +198 -0
- package/dist/solutions-components/p-55c79103.entry.js +311 -0
- package/dist/solutions-components/p-57fd19c0.entry.js +706 -0
- package/dist/solutions-components/p-59b48fde.entry.js +443 -0
- package/dist/solutions-components/p-60e0e6a0.entry.js +214 -0
- package/dist/solutions-components/p-621d0534.entry.js +123 -0
- package/dist/solutions-components/p-63f6e8f1.js +14 -1
- package/dist/solutions-components/p-66aeec57.entry.js +61 -0
- package/dist/solutions-components/p-69834f46.entry.js +618 -0
- package/dist/solutions-components/p-6d9da8e5.entry.js +21530 -0
- package/dist/solutions-components/p-6e0da576.js +13 -1
- package/dist/solutions-components/p-6ec3f294.entry.js +106 -0
- package/dist/solutions-components/p-6fe17794.js +9 -1
- package/dist/solutions-components/p-7024cb16.entry.js +72 -0
- package/dist/solutions-components/p-70535506.entry.js +226 -0
- package/dist/solutions-components/p-708a63a8.js +12 -1
- package/dist/solutions-components/p-729708a3.js +14 -1
- package/dist/solutions-components/p-73e23995.js +6 -1
- package/dist/solutions-components/p-74b29d75.entry.js +231 -0
- package/dist/solutions-components/p-74b7ee25.entry.js +711 -0
- package/dist/solutions-components/p-77182c3a.js +3015 -1
- package/dist/solutions-components/p-78b3ef80.entry.js +456 -0
- package/dist/solutions-components/p-79709c19.js +60 -3
- package/dist/solutions-components/p-7a46ef97.js +181 -2
- package/dist/solutions-components/p-7be159e6.entry.js +175 -0
- package/dist/solutions-components/p-7d4451c2.entry.js +71 -0
- package/dist/solutions-components/p-7daea1df.js +41 -1
- package/dist/solutions-components/p-7e39e5ad.entry.js +102 -0
- package/dist/solutions-components/p-7fb45059.entry.js +43 -0
- package/dist/solutions-components/p-815533de.js +306 -3
- package/dist/solutions-components/p-816622ca.entry.js +248 -0
- package/dist/solutions-components/p-83166522.js +205 -2
- package/dist/solutions-components/p-83bd1991.entry.js +36 -0
- package/dist/solutions-components/p-856464d7.entry.js +572 -0
- package/dist/solutions-components/p-8c349bad.entry.js +347 -0
- package/dist/solutions-components/p-8dccb390.entry.js +1986 -0
- package/dist/solutions-components/p-904c185a.entry.js +228 -0
- package/dist/solutions-components/p-9092f8b3.entry.js +156 -0
- package/dist/solutions-components/p-9371145a.entry.js +477 -0
- package/dist/solutions-components/p-93d3119d.js +1948 -1
- package/dist/solutions-components/p-95ec8062.entry.js +173 -0
- package/dist/solutions-components/p-991ee695.js +109 -1
- package/dist/solutions-components/p-9a57dab7.entry.js +213 -0
- package/dist/solutions-components/p-9a9955db.js +41 -1
- package/dist/solutions-components/p-9c1ebc90.js +35 -16
- package/dist/solutions-components/p-9eba5c66.js +399 -3
- package/dist/solutions-components/p-a033a507.entry.js +252 -0
- package/dist/solutions-components/p-a3773415.entry.js +1132 -0
- package/dist/solutions-components/p-a44fe40f.entry.js +94 -0
- package/dist/solutions-components/p-a5b1ab03.js +33 -3
- package/dist/solutions-components/p-a5b2c13d.entry.js +723 -0
- package/dist/solutions-components/p-a6d729b7.entry.js +85 -0
- package/dist/solutions-components/p-a8005026.entry.js +565 -0
- package/dist/solutions-components/p-a80b3880.js +14 -1
- package/dist/solutions-components/p-a89198a3.entry.js +2620 -0
- package/dist/solutions-components/p-aa04bd1f.entry.js +95 -0
- package/dist/solutions-components/p-aa0a0922.entry.js +80 -0
- package/dist/solutions-components/p-ae1fd76b.js +11 -1
- package/dist/solutions-components/p-b2cf435e.entry.js +87 -0
- package/dist/solutions-components/p-b359dc78.js +41 -1
- package/dist/solutions-components/p-b57bc4eb.entry.js +71 -0
- package/dist/solutions-components/p-b75cc407.entry.js +145 -0
- package/dist/solutions-components/p-b911cb75.entry.js +71 -0
- package/dist/solutions-components/p-b965e177.entry.js +335 -0
- package/dist/solutions-components/p-b978636e.js +14 -1
- package/dist/solutions-components/p-ba10a5c8.entry.js +42 -0
- package/dist/solutions-components/p-bd67334c.js +122 -2
- package/dist/solutions-components/p-bde20dba.entry.js +212 -0
- package/dist/solutions-components/p-be0b5a94.entry.js +248 -0
- package/dist/solutions-components/p-c023e6a1.js +2028 -2
- package/dist/solutions-components/p-c27b0c2d.entry.js +150 -0
- package/dist/solutions-components/p-c579ed60.entry.js +447 -0
- package/dist/solutions-components/p-c92bc231.js +101 -2
- package/dist/solutions-components/p-cc815aca.js +839 -16
- package/dist/solutions-components/p-cc8beabb.entry.js +695 -0
- package/dist/solutions-components/p-cdc46c0c.js +1751 -2
- package/dist/solutions-components/p-d12e6992.entry.js +118 -0
- package/dist/solutions-components/p-d1dfed6b.entry.js +179 -0
- package/dist/solutions-components/p-d48a24e6.js +754 -2
- package/dist/solutions-components/p-d96ee3ef.entry.js +579 -0
- package/dist/solutions-components/p-dbc9a5a8.js +80 -0
- package/dist/solutions-components/p-dcdbe712.entry.js +278 -0
- package/dist/solutions-components/p-de39206f.entry.js +113 -0
- package/dist/solutions-components/p-de5416e8.js +28 -1
- package/dist/solutions-components/p-df420d54.entry.js +213 -0
- package/dist/solutions-components/p-e3138cf0.entry.js +20 -0
- package/dist/solutions-components/p-e4845fec.entry.js +152 -0
- package/dist/solutions-components/p-e611d8c8.js +28 -1
- package/dist/solutions-components/p-e947d3b0.js +5 -1
- package/dist/solutions-components/p-ea534300.js +41 -2
- package/dist/solutions-components/p-ec84ee85.entry.js +55 -0
- package/dist/solutions-components/p-ed36c637.entry.js +85 -0
- package/dist/solutions-components/p-f0add71c.js +74 -0
- package/dist/solutions-components/p-f42e014b.js +171 -2
- package/dist/solutions-components/p-fc02e7de.entry.js +308 -0
- package/dist/solutions-components/p-fc884dd6.js +28 -16
- package/dist/solutions-components/p-fcbfa59c.entry.js +181 -0
- package/dist/solutions-components/p-fdc5cf5f.entry.js +138 -0
- package/dist/solutions-components/solutions-components.esm.js +20 -1
- package/dist/solutions-components/utils/interfaces.ts +2 -2
- package/dist/types/components/buffer-tools/buffer-tools.d.ts +2 -2
- package/dist/types/components/public-notification/public-notification.d.ts +9 -1
- package/dist/types/components.d.ts +2 -2
- package/package.json +1 -1
- package/dist/solutions-components/p-021432b8.entry.js +0 -12
- package/dist/solutions-components/p-03440b1e.entry.js +0 -11
- package/dist/solutions-components/p-0512635b.entry.js +0 -6
- package/dist/solutions-components/p-086ef115.entry.js +0 -29
- package/dist/solutions-components/p-0b4bf57f.entry.js +0 -6
- package/dist/solutions-components/p-0c088725.entry.js +0 -6
- package/dist/solutions-components/p-0f820c08.entry.js +0 -6
- package/dist/solutions-components/p-164780a0.entry.js +0 -6
- package/dist/solutions-components/p-179a68a0.entry.js +0 -6
- package/dist/solutions-components/p-184b5005.entry.js +0 -11
- package/dist/solutions-components/p-1d082fee.entry.js +0 -11
- package/dist/solutions-components/p-1e6c02a2.entry.js +0 -11
- package/dist/solutions-components/p-20a58e62.entry.js +0 -17
- package/dist/solutions-components/p-20b2458c.entry.js +0 -11
- package/dist/solutions-components/p-245d47c1.entry.js +0 -6
- package/dist/solutions-components/p-2cb057a9.entry.js +0 -11
- package/dist/solutions-components/p-2cc72806.entry.js +0 -23
- package/dist/solutions-components/p-2de1db9c.entry.js +0 -11
- package/dist/solutions-components/p-2e9c7055.entry.js +0 -11
- package/dist/solutions-components/p-2ed5e6c8.entry.js +0 -11
- package/dist/solutions-components/p-3109d940.entry.js +0 -6
- package/dist/solutions-components/p-31a8bcfa.entry.js +0 -6
- package/dist/solutions-components/p-3649acb3.entry.js +0 -18
- package/dist/solutions-components/p-3f88ba73.entry.js +0 -6
- package/dist/solutions-components/p-3fa9b3c8.js +0 -36
- package/dist/solutions-components/p-40c41709.entry.js +0 -6
- package/dist/solutions-components/p-40e963c7.entry.js +0 -11
- package/dist/solutions-components/p-40f480da.entry.js +0 -11
- package/dist/solutions-components/p-49d5d2d3.entry.js +0 -11
- package/dist/solutions-components/p-4f7049a4.entry.js +0 -11
- package/dist/solutions-components/p-506e4d78.entry.js +0 -6
- package/dist/solutions-components/p-576fdcab.entry.js +0 -6
- package/dist/solutions-components/p-5bd0cf34.entry.js +0 -23
- package/dist/solutions-components/p-65e177f1.entry.js +0 -6
- package/dist/solutions-components/p-67d710c2.entry.js +0 -6
- package/dist/solutions-components/p-7268b445.entry.js +0 -11
- package/dist/solutions-components/p-75ea4667.entry.js +0 -6
- package/dist/solutions-components/p-778c0a36.entry.js +0 -17
- package/dist/solutions-components/p-7a22509b.entry.js +0 -12
- package/dist/solutions-components/p-7bff51db.entry.js +0 -6
- package/dist/solutions-components/p-7d2d0d5d.entry.js +0 -6
- package/dist/solutions-components/p-7f0036f1.entry.js +0 -11
- package/dist/solutions-components/p-8060fb94.entry.js +0 -6
- package/dist/solutions-components/p-80a1b305.entry.js +0 -6
- package/dist/solutions-components/p-81eae877.entry.js +0 -12
- package/dist/solutions-components/p-84e86b8b.entry.js +0 -6
- package/dist/solutions-components/p-851e04ae.entry.js +0 -6
- package/dist/solutions-components/p-9106950a.entry.js +0 -11
- package/dist/solutions-components/p-979804a4.entry.js +0 -11
- package/dist/solutions-components/p-9862baa8.entry.js +0 -11
- package/dist/solutions-components/p-9b5a9117.entry.js +0 -12
- package/dist/solutions-components/p-9deff0c2.entry.js +0 -6
- package/dist/solutions-components/p-9f400eeb.entry.js +0 -6
- package/dist/solutions-components/p-a0639ad1.entry.js +0 -11
- package/dist/solutions-components/p-a33c044e.entry.js +0 -6
- package/dist/solutions-components/p-a516c658.entry.js +0 -6
- package/dist/solutions-components/p-aa0ef36d.entry.js +0 -11
- package/dist/solutions-components/p-aaccbdf3.entry.js +0 -18
- package/dist/solutions-components/p-ab03a5c9.entry.js +0 -11
- package/dist/solutions-components/p-ad469b92.entry.js +0 -11
- package/dist/solutions-components/p-adc86ac3.entry.js +0 -6
- package/dist/solutions-components/p-addc1156.entry.js +0 -11
- package/dist/solutions-components/p-ae846934.entry.js +0 -11
- package/dist/solutions-components/p-b0572fc4.entry.js +0 -37
- package/dist/solutions-components/p-b4e476b7.js +0 -257
- package/dist/solutions-components/p-b668daf8.js +0 -21
- package/dist/solutions-components/p-b6e6eae1.entry.js +0 -6
- package/dist/solutions-components/p-bc317a7f.entry.js +0 -6
- package/dist/solutions-components/p-be41429f.js +0 -21
- package/dist/solutions-components/p-bf6b6353.entry.js +0 -11
- package/dist/solutions-components/p-c2e3dfbb.entry.js +0 -11
- package/dist/solutions-components/p-c4afae53.entry.js +0 -12
- package/dist/solutions-components/p-c9da1c26.entry.js +0 -6
- package/dist/solutions-components/p-cbf8cd49.entry.js +0 -6
- package/dist/solutions-components/p-cc1a064a.entry.js +0 -11
- package/dist/solutions-components/p-d09a168c.entry.js +0 -6
- package/dist/solutions-components/p-d377f913.entry.js +0 -11
- package/dist/solutions-components/p-d4cefead.entry.js +0 -37
- package/dist/solutions-components/p-d7bc0baf.entry.js +0 -16
- package/dist/solutions-components/p-d8968487.entry.js +0 -11
- package/dist/solutions-components/p-e00a0b86.entry.js +0 -11
- package/dist/solutions-components/p-e9a7ed49.entry.js +0 -11
- package/dist/solutions-components/p-ec27e493.entry.js +0 -11
- package/dist/solutions-components/p-ed6404eb.entry.js +0 -6
- package/dist/solutions-components/p-ef21e195.entry.js +0 -23
- package/dist/solutions-components/p-f6068a2d.entry.js +0 -11
- package/dist/solutions-components/p-f6c4cff3.entry.js +0 -11
- package/dist/solutions-components/p-f847291f.entry.js +0 -6
- package/dist/solutions-components/p-f90fd262.entry.js +0 -11
- package/dist/solutions-components/p-fc973005.entry.js +0 -6
- package/dist/solutions-components/p-ff9fb6bc.entry.js +0 -11
@@ -0,0 +1,121 @@
|
|
1
|
+
/*!
|
2
|
+
* Copyright 2022 Esri
|
3
|
+
* Licensed under the Apache License, Version 2.0
|
4
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
5
|
+
*/
|
6
|
+
import { r as registerInstance, c as createEvent, h, F as Fragment, g as getElement } from './p-c023e6a1.js';
|
7
|
+
import { H as HEADING_LEVEL$1 } from './p-e611d8c8.js';
|
8
|
+
import { a as getSlotted } from './p-83166522.js';
|
9
|
+
import { H as Heading, c as constrainHeadingLevel } from './p-508317b3.js';
|
10
|
+
import { c as connectConditionalSlotComponent, d as disconnectConditionalSlotComponent } from './p-ea534300.js';
|
11
|
+
import './p-729708a3.js';
|
12
|
+
import './p-a80b3880.js';
|
13
|
+
import './p-9a9955db.js';
|
14
|
+
|
15
|
+
/*!
|
16
|
+
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
17
|
+
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
18
|
+
* v1.0.0-beta.97
|
19
|
+
*/
|
20
|
+
const CSS = {
|
21
|
+
container: "container",
|
22
|
+
header: "header",
|
23
|
+
heading: "heading",
|
24
|
+
close: "close",
|
25
|
+
imageFrame: "image-frame",
|
26
|
+
content: "content",
|
27
|
+
info: "info"
|
28
|
+
};
|
29
|
+
const ICONS = {
|
30
|
+
close: "x"
|
31
|
+
};
|
32
|
+
const SLOTS = {
|
33
|
+
thumbnail: "thumbnail"
|
34
|
+
};
|
35
|
+
const TEXT = {
|
36
|
+
close: "Close"
|
37
|
+
};
|
38
|
+
const HEADING_LEVEL = (HEADING_LEVEL$1 + 1);
|
39
|
+
|
40
|
+
const tipCss = "@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{position:relative;margin:1rem;box-sizing:border-box;display:flex;flex-direction:row;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-2);background-color:var(--calcite-ui-foreground-1);font-size:var(--calcite-font-size--1);line-height:1rem;color:var(--calcite-ui-text-2)}:host *{box-sizing:border-box}.container{inline-size:100%;padding:1rem}:host([dismissed]),:host([dismissed]) .container{display:none}:host([selected]) .container{margin:0px;border-style:none;padding:0px}.header{margin:0px;display:flex;align-content:space-between;align-items:center;fill:var(--calcite-ui-text-2);color:var(--calcite-ui-text-2)}.heading{margin:0px;padding:0px;font-weight:var(--calcite-font-weight-medium)}.header .heading{flex:1 1 auto;padding:0.5rem}.header{-webkit-margin-after:0.5rem;margin-block-end:0.5rem}.header .heading{padding:0px;font-size:var(--calcite-font-size-0);line-height:1.25rem;color:var(--calcite-ui-text-1)}.container[hidden]{display:none}.content{display:flex}.info{padding-block:0px;padding-inline:1rem;inline-size:70%}.info:only-child{inline-size:100%;padding-inline:0px}::slotted(p){-webkit-margin-before:0px;margin-block-start:0px}::slotted(a){outline-color:transparent;color:var(--calcite-ui-brand)}::slotted(a:focus){outline:2px solid var(--calcite-ui-brand);outline-offset:2px}.image-frame{inline-size:25%}.image-frame img{max-inline-size:100%}::slotted(img){max-inline-size:100%}";
|
41
|
+
|
42
|
+
const Tip = class {
|
43
|
+
constructor(hostRef) {
|
44
|
+
registerInstance(this, hostRef);
|
45
|
+
this.calciteTipDismiss = createEvent(this, "calciteTipDismiss", 6);
|
46
|
+
// --------------------------------------------------------------------------
|
47
|
+
//
|
48
|
+
// Properties
|
49
|
+
//
|
50
|
+
// --------------------------------------------------------------------------
|
51
|
+
/**
|
52
|
+
* When `true`, the component does not display.
|
53
|
+
*/
|
54
|
+
this.dismissed = false;
|
55
|
+
/**
|
56
|
+
* When `true`, the close button is not present on the component.
|
57
|
+
*/
|
58
|
+
this.nonDismissible = false;
|
59
|
+
/**
|
60
|
+
* When `true`, the component is selected if it has a parent `calcite-tip-manager`.
|
61
|
+
*
|
62
|
+
* Only one tip can be selected within the `calcite-tip-manager` parent.
|
63
|
+
*/
|
64
|
+
this.selected = false;
|
65
|
+
// --------------------------------------------------------------------------
|
66
|
+
//
|
67
|
+
// Private Methods
|
68
|
+
//
|
69
|
+
// --------------------------------------------------------------------------
|
70
|
+
this.hideTip = () => {
|
71
|
+
this.dismissed = true;
|
72
|
+
this.calciteTipDismiss.emit();
|
73
|
+
};
|
74
|
+
}
|
75
|
+
// --------------------------------------------------------------------------
|
76
|
+
//
|
77
|
+
// Lifecycle
|
78
|
+
//
|
79
|
+
// --------------------------------------------------------------------------
|
80
|
+
connectedCallback() {
|
81
|
+
connectConditionalSlotComponent(this);
|
82
|
+
}
|
83
|
+
disconnectedCallback() {
|
84
|
+
disconnectConditionalSlotComponent(this);
|
85
|
+
}
|
86
|
+
// --------------------------------------------------------------------------
|
87
|
+
//
|
88
|
+
// Render Methods
|
89
|
+
//
|
90
|
+
// --------------------------------------------------------------------------
|
91
|
+
renderHeader() {
|
92
|
+
var _a;
|
93
|
+
const { heading, headingLevel, el } = this;
|
94
|
+
const parentLevel = (_a = el.closest("calcite-tip-manager")) === null || _a === void 0 ? void 0 : _a.headingLevel;
|
95
|
+
const relativeLevel = parentLevel ? constrainHeadingLevel(parentLevel + 1) : null;
|
96
|
+
const level = headingLevel || relativeLevel || HEADING_LEVEL;
|
97
|
+
return heading ? (h("header", { class: CSS.header }, h(Heading, { class: CSS.heading, level: level }, heading))) : null;
|
98
|
+
}
|
99
|
+
renderDismissButton() {
|
100
|
+
const { nonDismissible, hideTip, intlClose } = this;
|
101
|
+
const text = intlClose || TEXT.close;
|
102
|
+
return !nonDismissible ? (h("calcite-action", { class: CSS.close, icon: ICONS.close, onClick: hideTip, scale: "l", text: text })) : null;
|
103
|
+
}
|
104
|
+
renderImageFrame() {
|
105
|
+
const { el } = this;
|
106
|
+
return getSlotted(el, SLOTS.thumbnail) ? (h("div", { class: CSS.imageFrame, key: "thumbnail" }, h("slot", { name: SLOTS.thumbnail }))) : null;
|
107
|
+
}
|
108
|
+
renderInfoNode() {
|
109
|
+
return (h("div", { class: CSS.info }, h("slot", null)));
|
110
|
+
}
|
111
|
+
renderContent() {
|
112
|
+
return (h("div", { class: CSS.content }, this.renderImageFrame(), this.renderInfoNode()));
|
113
|
+
}
|
114
|
+
render() {
|
115
|
+
return (h(Fragment, null, h("article", { class: CSS.container }, this.renderHeader(), this.renderContent()), this.renderDismissButton()));
|
116
|
+
}
|
117
|
+
get el() { return getElement(this); }
|
118
|
+
};
|
119
|
+
Tip.style = tipCss;
|
120
|
+
|
121
|
+
export { Tip as calcite_tip };
|
@@ -3,4 +3,485 @@
|
|
3
3
|
* Licensed under the Apache License, Version 2.0
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
|
-
|
6
|
+
/** Detect free variable `global` from Node.js. */
|
7
|
+
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
|
8
|
+
|
9
|
+
/** Detect free variable `self`. */
|
10
|
+
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
11
|
+
|
12
|
+
/** Used as a reference to the global object. */
|
13
|
+
var root = freeGlobal || freeSelf || Function('return this')();
|
14
|
+
|
15
|
+
/** Built-in value references. */
|
16
|
+
var Symbol = root.Symbol;
|
17
|
+
|
18
|
+
/** Used for built-in method references. */
|
19
|
+
var objectProto$1 = Object.prototype;
|
20
|
+
|
21
|
+
/** Used to check objects for own properties. */
|
22
|
+
var hasOwnProperty = objectProto$1.hasOwnProperty;
|
23
|
+
|
24
|
+
/**
|
25
|
+
* Used to resolve the
|
26
|
+
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
27
|
+
* of values.
|
28
|
+
*/
|
29
|
+
var nativeObjectToString$1 = objectProto$1.toString;
|
30
|
+
|
31
|
+
/** Built-in value references. */
|
32
|
+
var symToStringTag$1 = Symbol ? Symbol.toStringTag : undefined;
|
33
|
+
|
34
|
+
/**
|
35
|
+
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
|
36
|
+
*
|
37
|
+
* @private
|
38
|
+
* @param {*} value The value to query.
|
39
|
+
* @returns {string} Returns the raw `toStringTag`.
|
40
|
+
*/
|
41
|
+
function getRawTag(value) {
|
42
|
+
var isOwn = hasOwnProperty.call(value, symToStringTag$1),
|
43
|
+
tag = value[symToStringTag$1];
|
44
|
+
|
45
|
+
try {
|
46
|
+
value[symToStringTag$1] = undefined;
|
47
|
+
var unmasked = true;
|
48
|
+
} catch (e) {}
|
49
|
+
|
50
|
+
var result = nativeObjectToString$1.call(value);
|
51
|
+
if (unmasked) {
|
52
|
+
if (isOwn) {
|
53
|
+
value[symToStringTag$1] = tag;
|
54
|
+
} else {
|
55
|
+
delete value[symToStringTag$1];
|
56
|
+
}
|
57
|
+
}
|
58
|
+
return result;
|
59
|
+
}
|
60
|
+
|
61
|
+
/** Used for built-in method references. */
|
62
|
+
var objectProto = Object.prototype;
|
63
|
+
|
64
|
+
/**
|
65
|
+
* Used to resolve the
|
66
|
+
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
67
|
+
* of values.
|
68
|
+
*/
|
69
|
+
var nativeObjectToString = objectProto.toString;
|
70
|
+
|
71
|
+
/**
|
72
|
+
* Converts `value` to a string using `Object.prototype.toString`.
|
73
|
+
*
|
74
|
+
* @private
|
75
|
+
* @param {*} value The value to convert.
|
76
|
+
* @returns {string} Returns the converted string.
|
77
|
+
*/
|
78
|
+
function objectToString(value) {
|
79
|
+
return nativeObjectToString.call(value);
|
80
|
+
}
|
81
|
+
|
82
|
+
/** `Object#toString` result references. */
|
83
|
+
var nullTag = '[object Null]',
|
84
|
+
undefinedTag = '[object Undefined]';
|
85
|
+
|
86
|
+
/** Built-in value references. */
|
87
|
+
var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
|
88
|
+
|
89
|
+
/**
|
90
|
+
* The base implementation of `getTag` without fallbacks for buggy environments.
|
91
|
+
*
|
92
|
+
* @private
|
93
|
+
* @param {*} value The value to query.
|
94
|
+
* @returns {string} Returns the `toStringTag`.
|
95
|
+
*/
|
96
|
+
function baseGetTag(value) {
|
97
|
+
if (value == null) {
|
98
|
+
return value === undefined ? undefinedTag : nullTag;
|
99
|
+
}
|
100
|
+
return (symToStringTag && symToStringTag in Object(value))
|
101
|
+
? getRawTag(value)
|
102
|
+
: objectToString(value);
|
103
|
+
}
|
104
|
+
|
105
|
+
/**
|
106
|
+
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
107
|
+
* and has a `typeof` result of "object".
|
108
|
+
*
|
109
|
+
* @static
|
110
|
+
* @memberOf _
|
111
|
+
* @since 4.0.0
|
112
|
+
* @category Lang
|
113
|
+
* @param {*} value The value to check.
|
114
|
+
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
115
|
+
* @example
|
116
|
+
*
|
117
|
+
* _.isObjectLike({});
|
118
|
+
* // => true
|
119
|
+
*
|
120
|
+
* _.isObjectLike([1, 2, 3]);
|
121
|
+
* // => true
|
122
|
+
*
|
123
|
+
* _.isObjectLike(_.noop);
|
124
|
+
* // => false
|
125
|
+
*
|
126
|
+
* _.isObjectLike(null);
|
127
|
+
* // => false
|
128
|
+
*/
|
129
|
+
function isObjectLike(value) {
|
130
|
+
return value != null && typeof value == 'object';
|
131
|
+
}
|
132
|
+
|
133
|
+
/** `Object#toString` result references. */
|
134
|
+
var symbolTag = '[object Symbol]';
|
135
|
+
|
136
|
+
/**
|
137
|
+
* Checks if `value` is classified as a `Symbol` primitive or object.
|
138
|
+
*
|
139
|
+
* @static
|
140
|
+
* @memberOf _
|
141
|
+
* @since 4.0.0
|
142
|
+
* @category Lang
|
143
|
+
* @param {*} value The value to check.
|
144
|
+
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
145
|
+
* @example
|
146
|
+
*
|
147
|
+
* _.isSymbol(Symbol.iterator);
|
148
|
+
* // => true
|
149
|
+
*
|
150
|
+
* _.isSymbol('abc');
|
151
|
+
* // => false
|
152
|
+
*/
|
153
|
+
function isSymbol(value) {
|
154
|
+
return typeof value == 'symbol' ||
|
155
|
+
(isObjectLike(value) && baseGetTag(value) == symbolTag);
|
156
|
+
}
|
157
|
+
|
158
|
+
/** Used to match a single whitespace character. */
|
159
|
+
var reWhitespace = /\s/;
|
160
|
+
|
161
|
+
/**
|
162
|
+
* Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
|
163
|
+
* character of `string`.
|
164
|
+
*
|
165
|
+
* @private
|
166
|
+
* @param {string} string The string to inspect.
|
167
|
+
* @returns {number} Returns the index of the last non-whitespace character.
|
168
|
+
*/
|
169
|
+
function trimmedEndIndex(string) {
|
170
|
+
var index = string.length;
|
171
|
+
|
172
|
+
while (index-- && reWhitespace.test(string.charAt(index))) {}
|
173
|
+
return index;
|
174
|
+
}
|
175
|
+
|
176
|
+
/** Used to match leading whitespace. */
|
177
|
+
var reTrimStart = /^\s+/;
|
178
|
+
|
179
|
+
/**
|
180
|
+
* The base implementation of `_.trim`.
|
181
|
+
*
|
182
|
+
* @private
|
183
|
+
* @param {string} string The string to trim.
|
184
|
+
* @returns {string} Returns the trimmed string.
|
185
|
+
*/
|
186
|
+
function baseTrim(string) {
|
187
|
+
return string
|
188
|
+
? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
|
189
|
+
: string;
|
190
|
+
}
|
191
|
+
|
192
|
+
/**
|
193
|
+
* Checks if `value` is the
|
194
|
+
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
195
|
+
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
196
|
+
*
|
197
|
+
* @static
|
198
|
+
* @memberOf _
|
199
|
+
* @since 0.1.0
|
200
|
+
* @category Lang
|
201
|
+
* @param {*} value The value to check.
|
202
|
+
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
203
|
+
* @example
|
204
|
+
*
|
205
|
+
* _.isObject({});
|
206
|
+
* // => true
|
207
|
+
*
|
208
|
+
* _.isObject([1, 2, 3]);
|
209
|
+
* // => true
|
210
|
+
*
|
211
|
+
* _.isObject(_.noop);
|
212
|
+
* // => true
|
213
|
+
*
|
214
|
+
* _.isObject(null);
|
215
|
+
* // => false
|
216
|
+
*/
|
217
|
+
function isObject(value) {
|
218
|
+
var type = typeof value;
|
219
|
+
return value != null && (type == 'object' || type == 'function');
|
220
|
+
}
|
221
|
+
|
222
|
+
/** Used as references for various `Number` constants. */
|
223
|
+
var NAN = 0 / 0;
|
224
|
+
|
225
|
+
/** Used to detect bad signed hexadecimal string values. */
|
226
|
+
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
227
|
+
|
228
|
+
/** Used to detect binary string values. */
|
229
|
+
var reIsBinary = /^0b[01]+$/i;
|
230
|
+
|
231
|
+
/** Used to detect octal string values. */
|
232
|
+
var reIsOctal = /^0o[0-7]+$/i;
|
233
|
+
|
234
|
+
/** Built-in method references without a dependency on `root`. */
|
235
|
+
var freeParseInt = parseInt;
|
236
|
+
|
237
|
+
/**
|
238
|
+
* Converts `value` to a number.
|
239
|
+
*
|
240
|
+
* @static
|
241
|
+
* @memberOf _
|
242
|
+
* @since 4.0.0
|
243
|
+
* @category Lang
|
244
|
+
* @param {*} value The value to process.
|
245
|
+
* @returns {number} Returns the number.
|
246
|
+
* @example
|
247
|
+
*
|
248
|
+
* _.toNumber(3.2);
|
249
|
+
* // => 3.2
|
250
|
+
*
|
251
|
+
* _.toNumber(Number.MIN_VALUE);
|
252
|
+
* // => 5e-324
|
253
|
+
*
|
254
|
+
* _.toNumber(Infinity);
|
255
|
+
* // => Infinity
|
256
|
+
*
|
257
|
+
* _.toNumber('3.2');
|
258
|
+
* // => 3.2
|
259
|
+
*/
|
260
|
+
function toNumber(value) {
|
261
|
+
if (typeof value == 'number') {
|
262
|
+
return value;
|
263
|
+
}
|
264
|
+
if (isSymbol(value)) {
|
265
|
+
return NAN;
|
266
|
+
}
|
267
|
+
if (isObject(value)) {
|
268
|
+
var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
|
269
|
+
value = isObject(other) ? (other + '') : other;
|
270
|
+
}
|
271
|
+
if (typeof value != 'string') {
|
272
|
+
return value === 0 ? value : +value;
|
273
|
+
}
|
274
|
+
value = baseTrim(value);
|
275
|
+
var isBinary = reIsBinary.test(value);
|
276
|
+
return (isBinary || reIsOctal.test(value))
|
277
|
+
? freeParseInt(value.slice(2), isBinary ? 2 : 8)
|
278
|
+
: (reIsBadHex.test(value) ? NAN : +value);
|
279
|
+
}
|
280
|
+
|
281
|
+
/**
|
282
|
+
* Gets the timestamp of the number of milliseconds that have elapsed since
|
283
|
+
* the Unix epoch (1 January 1970 00:00:00 UTC).
|
284
|
+
*
|
285
|
+
* @static
|
286
|
+
* @memberOf _
|
287
|
+
* @since 2.4.0
|
288
|
+
* @category Date
|
289
|
+
* @returns {number} Returns the timestamp.
|
290
|
+
* @example
|
291
|
+
*
|
292
|
+
* _.defer(function(stamp) {
|
293
|
+
* console.log(_.now() - stamp);
|
294
|
+
* }, _.now());
|
295
|
+
* // => Logs the number of milliseconds it took for the deferred invocation.
|
296
|
+
*/
|
297
|
+
var now = function() {
|
298
|
+
return root.Date.now();
|
299
|
+
};
|
300
|
+
|
301
|
+
/** Error message constants. */
|
302
|
+
var FUNC_ERROR_TEXT = 'Expected a function';
|
303
|
+
|
304
|
+
/* Built-in method references for those with the same name as other `lodash` methods. */
|
305
|
+
var nativeMax = Math.max,
|
306
|
+
nativeMin = Math.min;
|
307
|
+
|
308
|
+
/**
|
309
|
+
* Creates a debounced function that delays invoking `func` until after `wait`
|
310
|
+
* milliseconds have elapsed since the last time the debounced function was
|
311
|
+
* invoked. The debounced function comes with a `cancel` method to cancel
|
312
|
+
* delayed `func` invocations and a `flush` method to immediately invoke them.
|
313
|
+
* Provide `options` to indicate whether `func` should be invoked on the
|
314
|
+
* leading and/or trailing edge of the `wait` timeout. The `func` is invoked
|
315
|
+
* with the last arguments provided to the debounced function. Subsequent
|
316
|
+
* calls to the debounced function return the result of the last `func`
|
317
|
+
* invocation.
|
318
|
+
*
|
319
|
+
* **Note:** If `leading` and `trailing` options are `true`, `func` is
|
320
|
+
* invoked on the trailing edge of the timeout only if the debounced function
|
321
|
+
* is invoked more than once during the `wait` timeout.
|
322
|
+
*
|
323
|
+
* If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
|
324
|
+
* until to the next tick, similar to `setTimeout` with a timeout of `0`.
|
325
|
+
*
|
326
|
+
* See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
|
327
|
+
* for details over the differences between `_.debounce` and `_.throttle`.
|
328
|
+
*
|
329
|
+
* @static
|
330
|
+
* @memberOf _
|
331
|
+
* @since 0.1.0
|
332
|
+
* @category Function
|
333
|
+
* @param {Function} func The function to debounce.
|
334
|
+
* @param {number} [wait=0] The number of milliseconds to delay.
|
335
|
+
* @param {Object} [options={}] The options object.
|
336
|
+
* @param {boolean} [options.leading=false]
|
337
|
+
* Specify invoking on the leading edge of the timeout.
|
338
|
+
* @param {number} [options.maxWait]
|
339
|
+
* The maximum time `func` is allowed to be delayed before it's invoked.
|
340
|
+
* @param {boolean} [options.trailing=true]
|
341
|
+
* Specify invoking on the trailing edge of the timeout.
|
342
|
+
* @returns {Function} Returns the new debounced function.
|
343
|
+
* @example
|
344
|
+
*
|
345
|
+
* // Avoid costly calculations while the window size is in flux.
|
346
|
+
* jQuery(window).on('resize', _.debounce(calculateLayout, 150));
|
347
|
+
*
|
348
|
+
* // Invoke `sendMail` when clicked, debouncing subsequent calls.
|
349
|
+
* jQuery(element).on('click', _.debounce(sendMail, 300, {
|
350
|
+
* 'leading': true,
|
351
|
+
* 'trailing': false
|
352
|
+
* }));
|
353
|
+
*
|
354
|
+
* // Ensure `batchLog` is invoked once after 1 second of debounced calls.
|
355
|
+
* var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
|
356
|
+
* var source = new EventSource('/stream');
|
357
|
+
* jQuery(source).on('message', debounced);
|
358
|
+
*
|
359
|
+
* // Cancel the trailing debounced invocation.
|
360
|
+
* jQuery(window).on('popstate', debounced.cancel);
|
361
|
+
*/
|
362
|
+
function debounce(func, wait, options) {
|
363
|
+
var lastArgs,
|
364
|
+
lastThis,
|
365
|
+
maxWait,
|
366
|
+
result,
|
367
|
+
timerId,
|
368
|
+
lastCallTime,
|
369
|
+
lastInvokeTime = 0,
|
370
|
+
leading = false,
|
371
|
+
maxing = false,
|
372
|
+
trailing = true;
|
373
|
+
|
374
|
+
if (typeof func != 'function') {
|
375
|
+
throw new TypeError(FUNC_ERROR_TEXT);
|
376
|
+
}
|
377
|
+
wait = toNumber(wait) || 0;
|
378
|
+
if (isObject(options)) {
|
379
|
+
leading = !!options.leading;
|
380
|
+
maxing = 'maxWait' in options;
|
381
|
+
maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
|
382
|
+
trailing = 'trailing' in options ? !!options.trailing : trailing;
|
383
|
+
}
|
384
|
+
|
385
|
+
function invokeFunc(time) {
|
386
|
+
var args = lastArgs,
|
387
|
+
thisArg = lastThis;
|
388
|
+
|
389
|
+
lastArgs = lastThis = undefined;
|
390
|
+
lastInvokeTime = time;
|
391
|
+
result = func.apply(thisArg, args);
|
392
|
+
return result;
|
393
|
+
}
|
394
|
+
|
395
|
+
function leadingEdge(time) {
|
396
|
+
// Reset any `maxWait` timer.
|
397
|
+
lastInvokeTime = time;
|
398
|
+
// Start the timer for the trailing edge.
|
399
|
+
timerId = setTimeout(timerExpired, wait);
|
400
|
+
// Invoke the leading edge.
|
401
|
+
return leading ? invokeFunc(time) : result;
|
402
|
+
}
|
403
|
+
|
404
|
+
function remainingWait(time) {
|
405
|
+
var timeSinceLastCall = time - lastCallTime,
|
406
|
+
timeSinceLastInvoke = time - lastInvokeTime,
|
407
|
+
timeWaiting = wait - timeSinceLastCall;
|
408
|
+
|
409
|
+
return maxing
|
410
|
+
? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
|
411
|
+
: timeWaiting;
|
412
|
+
}
|
413
|
+
|
414
|
+
function shouldInvoke(time) {
|
415
|
+
var timeSinceLastCall = time - lastCallTime,
|
416
|
+
timeSinceLastInvoke = time - lastInvokeTime;
|
417
|
+
|
418
|
+
// Either this is the first call, activity has stopped and we're at the
|
419
|
+
// trailing edge, the system time has gone backwards and we're treating
|
420
|
+
// it as the trailing edge, or we've hit the `maxWait` limit.
|
421
|
+
return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
|
422
|
+
(timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
|
423
|
+
}
|
424
|
+
|
425
|
+
function timerExpired() {
|
426
|
+
var time = now();
|
427
|
+
if (shouldInvoke(time)) {
|
428
|
+
return trailingEdge(time);
|
429
|
+
}
|
430
|
+
// Restart the timer.
|
431
|
+
timerId = setTimeout(timerExpired, remainingWait(time));
|
432
|
+
}
|
433
|
+
|
434
|
+
function trailingEdge(time) {
|
435
|
+
timerId = undefined;
|
436
|
+
|
437
|
+
// Only invoke if we have `lastArgs` which means `func` has been
|
438
|
+
// debounced at least once.
|
439
|
+
if (trailing && lastArgs) {
|
440
|
+
return invokeFunc(time);
|
441
|
+
}
|
442
|
+
lastArgs = lastThis = undefined;
|
443
|
+
return result;
|
444
|
+
}
|
445
|
+
|
446
|
+
function cancel() {
|
447
|
+
if (timerId !== undefined) {
|
448
|
+
clearTimeout(timerId);
|
449
|
+
}
|
450
|
+
lastInvokeTime = 0;
|
451
|
+
lastArgs = lastCallTime = lastThis = timerId = undefined;
|
452
|
+
}
|
453
|
+
|
454
|
+
function flush() {
|
455
|
+
return timerId === undefined ? result : trailingEdge(now());
|
456
|
+
}
|
457
|
+
|
458
|
+
function debounced() {
|
459
|
+
var time = now(),
|
460
|
+
isInvoking = shouldInvoke(time);
|
461
|
+
|
462
|
+
lastArgs = arguments;
|
463
|
+
lastThis = this;
|
464
|
+
lastCallTime = time;
|
465
|
+
|
466
|
+
if (isInvoking) {
|
467
|
+
if (timerId === undefined) {
|
468
|
+
return leadingEdge(lastCallTime);
|
469
|
+
}
|
470
|
+
if (maxing) {
|
471
|
+
// Handle invocations in a tight loop.
|
472
|
+
clearTimeout(timerId);
|
473
|
+
timerId = setTimeout(timerExpired, wait);
|
474
|
+
return invokeFunc(lastCallTime);
|
475
|
+
}
|
476
|
+
}
|
477
|
+
if (timerId === undefined) {
|
478
|
+
timerId = setTimeout(timerExpired, wait);
|
479
|
+
}
|
480
|
+
return result;
|
481
|
+
}
|
482
|
+
debounced.cancel = cancel;
|
483
|
+
debounced.flush = flush;
|
484
|
+
return debounced;
|
485
|
+
}
|
486
|
+
|
487
|
+
export { Symbol as S, isSymbol as a, baseGetTag as b, isObjectLike as c, debounce as d, freeGlobal as f, isObject as i, root as r };
|