playbook_ui 13.32.0.pre.alpha.PLAY14143251 → 13.32.0.pre.alpha.PLAY14143255

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,97 @@
1
+ import WebpackerReact from "webpacker-react";
2
+ import { B as BarGraph, C as CircleChart, D as Dialog, a as DialogBody, b as DialogFooter, c as DialogHeader, d as DistributionBar, M as MultiLevelSelect, L as Legend, e as LineGraph, P as Passphrase, R as RichTextEditor, T as TreemapChart, f as Typeahead, G as Gauge, g as PhoneNumberInput } from "./chunks/_typeahead.js";
3
+ import "react";
4
+ import "./chunks/lib.js";
5
+ import "react-dom";
6
+ var ujs$1 = {};
7
+ Object.defineProperty(ujs$1, "__esModule", {
8
+ value: true
9
+ });
10
+ var ujs = {
11
+ handleEvent: function handleEvent(eventName, callback) {
12
+ var _ref = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : { once: false }, once = _ref.once;
13
+ var $ = typeof window.jQuery !== "undefined" && window.jQuery;
14
+ if ($) {
15
+ if (once) {
16
+ $(document).one(eventName, callback);
17
+ } else {
18
+ $(document).on(eventName, callback);
19
+ }
20
+ } else {
21
+ document.addEventListener(eventName, callback, { once });
22
+ }
23
+ },
24
+ setup: function setup(onMount, onUnmount) {
25
+ var $ = typeof window.jQuery !== "undefined" && window.jQuery;
26
+ var Turbolinks = window.Turbolinks;
27
+ if (typeof Turbolinks !== "undefined" && Turbolinks.supported) {
28
+ if (typeof Turbolinks.EVENTS !== "undefined") {
29
+ this.turbolinksClassic(onMount, onUnmount);
30
+ } else if (typeof Turbolinks.controller !== "undefined") {
31
+ this.turbolinks5(onMount, onUnmount);
32
+ } else {
33
+ this.turbolinksClassicDeprecated(onMount, onUnmount);
34
+ }
35
+ } else if ($ && typeof $.pjax === "function") {
36
+ this.pjax(onMount, onUnmount);
37
+ } else {
38
+ this.native(onMount);
39
+ }
40
+ },
41
+ turbolinks5: function turbolinks5(onMount, onUnmount) {
42
+ this.handleEvent("turbolinks:load", onMount, { once: true });
43
+ this.handleEvent("turbolinks:render", onMount);
44
+ this.handleEvent("turbolinks:before-render", onUnmount);
45
+ },
46
+ turbolinksClassic: function turbolinksClassic(onMount, onUnmount) {
47
+ var Turbolinks = window.Turbolinks;
48
+ this.handleEvent(Turbolinks.EVENTS.CHANGE, onMount);
49
+ this.handleEvent(Turbolinks.EVENTS.BEFORE_UNLOAD, onUnmount);
50
+ },
51
+ turbolinksClassicDeprecated: function turbolinksClassicDeprecated(onMount, onUnmount) {
52
+ var Turbolinks = window.Turbolinks;
53
+ Turbolinks.pagesCached(0);
54
+ this.handleEvent("page:change", onMount);
55
+ this.handleEvent("page:receive", onUnmount);
56
+ },
57
+ pjax: function pjax(onMount, onUnmount) {
58
+ this.handleEvent("ready", onMount);
59
+ this.handleEvent("pjax:end", onMount);
60
+ this.handleEvent("pjax:beforeReplace", onUnmount);
61
+ },
62
+ native: function native(onMount) {
63
+ var $ = typeof window.jQuery !== "undefined" && window.jQuery;
64
+ if ($) {
65
+ $(function() {
66
+ return onMount();
67
+ });
68
+ } else if ("addEventListener" in window) {
69
+ document.addEventListener("DOMContentLoaded", onMount);
70
+ } else {
71
+ window.attachEvent("onload", onMount);
72
+ }
73
+ }
74
+ };
75
+ var _default = ujs$1.default = ujs;
76
+ WebpackerReact.registerComponents({
77
+ BarGraph,
78
+ CircleChart,
79
+ Dialog,
80
+ DialogBody,
81
+ DialogFooter,
82
+ DialogHeader,
83
+ DistributionBar,
84
+ MultiLevelSelect,
85
+ Legend,
86
+ LineGraph,
87
+ Passphrase,
88
+ RichTextEditor,
89
+ TreemapChart,
90
+ Typeahead,
91
+ Gauge,
92
+ PhoneNumberInput
93
+ });
94
+ _default.setup(
95
+ () => WebpackerReact.mountComponents(),
96
+ () => WebpackerReact.unmountComponents()
97
+ );