@ulu/frontend 0.2.0-beta.6 → 0.2.0-beta.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/dist/README.md +12 -0
- package/dist/{types → es}/core/component.d.ts +3 -9
- package/dist/es/core/component.d.ts.map +1 -0
- package/dist/es/core/component.js +134 -0
- package/dist/{types → es}/core/events.d.ts +1 -1
- package/dist/{types → es}/core/events.d.ts.map +1 -1
- package/dist/es/core/events.js +45 -0
- package/dist/es/core/index.d.ts +4 -0
- package/dist/{types → es}/core/settings.d.ts +1 -1
- package/dist/es/core/settings.d.ts.map +1 -0
- package/dist/es/core/settings.js +44 -0
- package/dist/es/index.d.ts +4 -0
- package/dist/es/index.js +123 -0
- package/dist/{types → es}/ui/breakpoints.d.ts +5 -3
- package/dist/es/ui/breakpoints.d.ts.map +1 -0
- package/dist/es/ui/breakpoints.js +194 -0
- package/dist/{types → es}/ui/collapsible.d.ts +28 -7
- package/dist/es/ui/collapsible.d.ts.map +1 -0
- package/dist/es/ui/collapsible.js +140 -0
- package/dist/{types → es}/ui/details-group.d.ts +1 -1
- package/dist/es/ui/details-group.js +49 -0
- package/dist/{types → es}/ui/dialog.d.ts +3 -3
- package/dist/es/ui/dialog.d.ts.map +1 -0
- package/dist/es/ui/dialog.js +112 -0
- package/dist/{types → es}/ui/flipcard.d.ts +1 -1
- package/dist/es/ui/flipcard.js +97 -0
- package/dist/{types → es}/ui/grid.d.ts +2 -2
- package/dist/{types → es}/ui/grid.d.ts.map +1 -1
- package/dist/es/ui/grid.js +18 -0
- package/dist/{types → es}/ui/index.d.ts +21 -21
- package/dist/{types → es}/ui/modal-builder.d.ts +21 -16
- package/dist/es/ui/modal-builder.d.ts.map +1 -0
- package/dist/es/ui/modal-builder.js +136 -0
- package/dist/es/ui/overflow-scroller-pager.js +28 -0
- package/dist/{types → es}/ui/overflow-scroller.d.ts +3 -3
- package/dist/{types → es}/ui/overflow-scroller.d.ts.map +1 -1
- package/dist/es/ui/overflow-scroller.js +90 -0
- package/dist/es/ui/page.js +7 -0
- package/dist/{types → es}/ui/popover.d.ts +3 -3
- package/dist/{types → es}/ui/popover.d.ts.map +1 -1
- package/dist/es/ui/popover.js +77 -0
- package/dist/es/ui/print-details.js +22 -0
- package/dist/es/ui/print.js +34 -0
- package/dist/{types → es}/ui/programmatic-modal.d.ts +1 -1
- package/dist/{types → es}/ui/programmatic-modal.d.ts.map +1 -1
- package/dist/{types → es}/ui/proxy-click.d.ts +4 -4
- package/dist/es/ui/proxy-click.d.ts.map +1 -0
- package/dist/es/ui/proxy-click.js +44 -0
- package/dist/{types → es}/ui/resizer.d.ts +16 -16
- package/dist/es/ui/resizer.d.ts.map +1 -0
- package/dist/es/ui/resizer.js +242 -0
- package/dist/{types → es}/ui/scroll-slider.d.ts +1 -1
- package/dist/es/ui/scroll-slider.js +29 -0
- package/dist/{types → es}/ui/scrollpoint.d.ts +79 -11
- package/dist/es/ui/scrollpoint.d.ts.map +1 -0
- package/dist/es/ui/scrollpoint.js +178 -0
- package/dist/{types → es}/ui/slider.d.ts +11 -8
- package/dist/es/ui/slider.d.ts.map +1 -0
- package/dist/es/ui/slider.js +292 -0
- package/dist/{types → es}/ui/tabs.d.ts +2 -2
- package/dist/{types → es}/ui/tabs.d.ts.map +1 -1
- package/dist/es/ui/tabs.js +64 -0
- package/dist/{types → es}/ui/theme-toggle.d.ts +4 -4
- package/dist/es/ui/theme-toggle.d.ts.map +1 -0
- package/dist/es/ui/theme-toggle.js +190 -0
- package/dist/{types → es}/ui/tooltip.d.ts +5 -5
- package/dist/es/ui/tooltip.d.ts.map +1 -0
- package/dist/es/ui/tooltip.js +184 -0
- package/dist/{types → es}/utils/class-logger.d.ts +4 -4
- package/dist/es/utils/class-logger.d.ts.map +1 -0
- package/dist/es/utils/class-logger.js +37 -0
- package/dist/es/utils/css.js +6 -0
- package/dist/{types → es}/utils/dom.d.ts +1 -1
- package/dist/{types → es}/utils/dom.d.ts.map +1 -1
- package/dist/es/utils/dom.js +29 -0
- package/dist/{types → es}/utils/file-save.d.ts.map +1 -1
- package/dist/es/utils/file-save.js +46 -0
- package/dist/{types → es}/utils/floating-ui.d.ts +1 -1
- package/dist/{types → es}/utils/floating-ui.d.ts.map +1 -1
- package/dist/es/utils/floating-ui.js +46 -0
- package/dist/es/utils/font-awesome.js +13 -0
- package/dist/es/utils/id.js +11 -0
- package/dist/{types → es}/utils/index.d.ts +7 -7
- package/dist/es/utils/pause-youtube-video.js +27 -0
- package/dist/umd/style.css +1 -0
- package/dist/{ulu-frontend.umd.js → umd/ulu-frontend.umd.js} +15 -15
- package/lib/js/ui/breakpoints.js +12 -12
- package/lib/js/ui/modal-builder.js +5 -3
- package/lib/js/ui/slider.js +19 -10
- package/lib/scss/_element.scss +10 -4
- package/lib/scss/components/_accordion.scss +1 -7
- package/lib/scss/components/_button.scss +11 -2
- package/lib/scss/components/_card.scss +0 -2
- package/lib/scss/components/_menu-stack.scss +1 -0
- package/lib/scss/components/_modal.scss +13 -13
- package/lib/scss/helpers/_utilities.scss +0 -3
- package/package.json +19 -16
- package/dist/style.css +0 -1
- package/dist/types/core/component.d.ts.map +0 -1
- package/dist/types/core/index.d.ts +0 -4
- package/dist/types/core/settings.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -4
- package/dist/types/ui/breakpoints.d.ts.map +0 -1
- package/dist/types/ui/collapsible.d.ts.map +0 -1
- package/dist/types/ui/dialog.d.ts.map +0 -1
- package/dist/types/ui/modal-builder.d.ts.map +0 -1
- package/dist/types/ui/proxy-click.d.ts.map +0 -1
- package/dist/types/ui/resizer.d.ts.map +0 -1
- package/dist/types/ui/scrollpoint.d.ts.map +0 -1
- package/dist/types/ui/slider.d.ts.map +0 -1
- package/dist/types/ui/theme-toggle.d.ts.map +0 -1
- package/dist/types/ui/tooltip.d.ts.map +0 -1
- package/dist/types/utils/class-logger.d.ts.map +0 -1
- package/dist/ulu-frontend.es.js +0 -5743
- /package/dist/{types → es}/core/index.d.ts.map +0 -0
- /package/dist/{types → es}/index.d.ts.map +0 -0
- /package/dist/{types → es}/ui/details-group.d.ts.map +0 -0
- /package/dist/{types → es}/ui/flipcard.d.ts.map +0 -0
- /package/dist/{types → es}/ui/index.d.ts.map +0 -0
- /package/dist/{types → es}/ui/overflow-scroller-pager.d.ts +0 -0
- /package/dist/{types → es}/ui/overflow-scroller-pager.d.ts.map +0 -0
- /package/dist/{types → es}/ui/page.d.ts +0 -0
- /package/dist/{types → es}/ui/page.d.ts.map +0 -0
- /package/dist/{types → es}/ui/print-details.d.ts +0 -0
- /package/dist/{types → es}/ui/print-details.d.ts.map +0 -0
- /package/dist/{types → es}/ui/print.d.ts +0 -0
- /package/dist/{types → es}/ui/print.d.ts.map +0 -0
- /package/dist/{types → es}/ui/scroll-slider.d.ts.map +0 -0
- /package/dist/{types → es}/utils/css.d.ts +0 -0
- /package/dist/{types → es}/utils/css.d.ts.map +0 -0
- /package/dist/{types → es}/utils/file-save.d.ts +0 -0
- /package/dist/{types → es}/utils/font-awesome.d.ts +0 -0
- /package/dist/{types → es}/utils/font-awesome.d.ts.map +0 -0
- /package/dist/{types → es}/utils/id.d.ts +0 -0
- /package/dist/{types → es}/utils/id.d.ts.map +0 -0
- /package/dist/{types → es}/utils/index.d.ts.map +0 -0
- /package/dist/{types → es}/utils/pause-youtube-video.d.ts +0 -0
- /package/dist/{types → es}/utils/pause-youtube-video.d.ts.map +0 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ComponentInitializer } from '../core/component.js';
|
|
1
2
|
/**
|
|
2
3
|
* Initialize default popover
|
|
3
4
|
*/
|
|
@@ -74,23 +75,22 @@ export class Tooltip {
|
|
|
74
75
|
options: any;
|
|
75
76
|
floatingOptions: any;
|
|
76
77
|
elements: any;
|
|
77
|
-
handlers: {};
|
|
78
|
-
isOpen: boolean;
|
|
78
|
+
handlers: {} | undefined;
|
|
79
|
+
isOpen: boolean | undefined;
|
|
79
80
|
setup(): void;
|
|
80
81
|
setupAccessibility(): void;
|
|
81
82
|
destroy(): void;
|
|
82
83
|
getInnerContent(): any;
|
|
83
|
-
getAnchorElement(): HTMLElement;
|
|
84
|
+
getAnchorElement(): HTMLElement | null;
|
|
84
85
|
createContentElement(): void;
|
|
85
86
|
attachHandlers(): void;
|
|
86
87
|
destroyHandlers(): void;
|
|
87
88
|
setState(isOpen: any, event: any): void;
|
|
88
89
|
createEvent(name: any, detail: any): CustomEvent<any>;
|
|
89
90
|
createFloatingInstance(): void;
|
|
90
|
-
floatingCleanup: Function;
|
|
91
|
+
floatingCleanup: Function | null | undefined;
|
|
91
92
|
destroyFloatingInstance(): void;
|
|
92
93
|
show(event: any): void;
|
|
93
94
|
hide(event: any): void;
|
|
94
95
|
}
|
|
95
|
-
import { ComponentInitializer } from "../core/component.js";
|
|
96
96
|
//# sourceMappingURL=tooltip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../lib/js/ui/tooltip.js"],"names":[],"mappings":"AAuBA;;GAEG;AACH,6BAaC;AA5BD;;GAEG;AACH,+CAGG;AAwBH;;;;GAIG;AACH;IACE;;OAEG;IACH;QACE;;;;WAIG;;QAEH;;;WAGG;;;;;QAKH;;;WAGG;qBADO,SAAO,IAAI;QAGrB;;WAEG;;QAEH;;;WAGG;;QAEH;;;WAGG;oBADO,KAAK,QAAS;QAGxB;;;WAGG;oBADO,KAAK,QAAS;QAGxB;;;WAGG;;QAEH;;WAEG;;QAUH;;;WAGG;;MAIH;IACF,kCAEE;IACF,mEAaC;IAPC,aAA+D;IAC/D,qBAAyF;IACzF,cAA+B;IAC/B,yBAAkB;IAClB,4BAAmB;IAIrB,cAIC;IACD,2BAKC;IACD,gBAGC;IACD,uBAcC;IACD,uCASC;IACD,6BAkBC;IACD,uBAiCC;IACD,wBAiBC;IACD,wCAmBC;IACD,sDAEC;IACD,+BAEC;IADC,6CAA4E;IAE9E,gCAKC;IACD,uBAEC;IACD,uBAEC;CACF;qCApRoC,sBAAsB"}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
var f = Object.defineProperty;
|
|
2
|
+
var g = (l, t, e) => t in l ? f(l, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : l[t] = e;
|
|
3
|
+
var u = (l, t, e) => g(l, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import { ComponentInitializer as v } from "../core/component.js";
|
|
5
|
+
import { getUluEventName as E } from "../core/events.js";
|
|
6
|
+
import { createFloatingUi as y } from "../utils/floating-ui.js";
|
|
7
|
+
import { createElementFromHtml as C } from "@ulu/utils/browser/dom.js";
|
|
8
|
+
import { logError as p } from "../utils/class-logger.js";
|
|
9
|
+
import { ensureId as b, newId as w } from "../utils/id.js";
|
|
10
|
+
const d = new v({
|
|
11
|
+
type: "tooltip",
|
|
12
|
+
baseAttribute: "data-ulu-tooltip"
|
|
13
|
+
}), A = d.getAttribute("body"), H = d.attributeSelector("body"), S = d.attributeSelector("arrow");
|
|
14
|
+
function j() {
|
|
15
|
+
d.init({
|
|
16
|
+
coreEvents: ["pageModified"],
|
|
17
|
+
withData: !0,
|
|
18
|
+
setup({ element: l, data: t, initialize: e }) {
|
|
19
|
+
const n = typeof t == "object" ? t : {};
|
|
20
|
+
typeof t == "string" && (n.content = t), e(), new m({ trigger: l }, n);
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
const a = class a {
|
|
25
|
+
constructor(t, e, n) {
|
|
26
|
+
const { trigger: s } = t;
|
|
27
|
+
if (!s) {
|
|
28
|
+
p(this, "missing required trigger");
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
this.options = Object.assign({}, a.defaults, e), this.floatingOptions = Object.assign({}, a.defaultFloatingOptions, n), this.elements = { ...t }, this.handlers = {}, this.isOpen = !1, b(s), this.setup();
|
|
32
|
+
}
|
|
33
|
+
setup() {
|
|
34
|
+
this.createContentElement(), this.attachHandlers(), this.setupAccessibility();
|
|
35
|
+
}
|
|
36
|
+
setupAccessibility() {
|
|
37
|
+
const { trigger: t, content: e } = this.elements, { accessible: n } = this.options;
|
|
38
|
+
n && t.setAttribute("aria-describedby", e.id);
|
|
39
|
+
}
|
|
40
|
+
destroy() {
|
|
41
|
+
this.destroyHandlers(), this.destroyDisplay();
|
|
42
|
+
}
|
|
43
|
+
getInnerContent() {
|
|
44
|
+
const { fromElement: t, content: e, isHtml: n, fromAnchor: s } = this.options;
|
|
45
|
+
if (e)
|
|
46
|
+
return e;
|
|
47
|
+
if (t || s) {
|
|
48
|
+
const o = s ? this.getAnchorElement() : document.querySelector(t);
|
|
49
|
+
return o ? n ? o.innerHTML : o.innerText : "";
|
|
50
|
+
} else
|
|
51
|
+
p(this, "Could not resolve inner content");
|
|
52
|
+
}
|
|
53
|
+
getAnchorElement() {
|
|
54
|
+
const { trigger: t } = this.elements, { href: e } = t, n = e ? e.split("#")[1] : null, s = n ? document.getElementById(n) : null;
|
|
55
|
+
return s || console.error("Unable to get 'fromAnchor' element", t), s;
|
|
56
|
+
}
|
|
57
|
+
createContentElement() {
|
|
58
|
+
const { options: t } = this, e = C(t.template(t)), n = e.querySelector(H), s = this.getInnerContent();
|
|
59
|
+
t.isHtml ? n.innerHTML = s : n.textContent = s, e.id = w(), t.contentClass && e.classList.add(t.contentClass), this.elements.content = e, this.elements.contentArrow = e.querySelector(S), document.body.appendChild(e);
|
|
60
|
+
}
|
|
61
|
+
attachHandlers() {
|
|
62
|
+
const { trigger: t } = this.elements, { showEvents: e, hideEvents: n, delay: s } = this.options;
|
|
63
|
+
let o = null;
|
|
64
|
+
const c = (i) => {
|
|
65
|
+
o || (o = setTimeout(() => {
|
|
66
|
+
this.show(i), clearTimeout(o);
|
|
67
|
+
}, s));
|
|
68
|
+
}, r = (i) => {
|
|
69
|
+
o && (clearTimeout(o), o = null), this.hide(i);
|
|
70
|
+
}, h = (i) => {
|
|
71
|
+
i.key === "Escape" && this.hide(i);
|
|
72
|
+
};
|
|
73
|
+
e.forEach((i) => {
|
|
74
|
+
t.addEventListener(i, c);
|
|
75
|
+
}), n.forEach((i) => {
|
|
76
|
+
t.addEventListener(i, r);
|
|
77
|
+
}), document.addEventListener("keydown", h), this.handlers = { onShow: c, onHide: r, onDocumentKeydown: h };
|
|
78
|
+
}
|
|
79
|
+
destroyHandlers() {
|
|
80
|
+
const { trigger: t } = this, { onShow: e, onHide: n, onDocumentKeydown: s } = this.handlers, { showEvents: o, hideEvents: c } = this.options;
|
|
81
|
+
e && o.forEach((r) => {
|
|
82
|
+
t.removeEventListener(r, e);
|
|
83
|
+
}), n && c.forEach((r) => {
|
|
84
|
+
t.removeEventListener(r, n);
|
|
85
|
+
}), s && document.removeEventListener("keydown", s);
|
|
86
|
+
}
|
|
87
|
+
setState(t, e) {
|
|
88
|
+
const n = {
|
|
89
|
+
instance: this,
|
|
90
|
+
isOpen: t,
|
|
91
|
+
event: e
|
|
92
|
+
}, { trigger: s, content: o } = this.elements, { openClass: c } = this.options, r = (h) => h.classList[t ? "add" : "remove"](c);
|
|
93
|
+
r(s), r(o), this.isOpen = t, this.options.onChange(n), s.dispatchEvent(this.createEvent("change", n)), this.destroyFloatingInstance(), t && this.createFloatingInstance();
|
|
94
|
+
}
|
|
95
|
+
createEvent(t, e) {
|
|
96
|
+
return new CustomEvent(E("tooltip:" + t), { detail: e });
|
|
97
|
+
}
|
|
98
|
+
createFloatingInstance() {
|
|
99
|
+
this.floatingCleanup = y(this.elements, this.floatingOptions);
|
|
100
|
+
}
|
|
101
|
+
destroyFloatingInstance() {
|
|
102
|
+
this.floatingCleanup && (this.floatingCleanup(), this.floatingCleanup = null);
|
|
103
|
+
}
|
|
104
|
+
show(t) {
|
|
105
|
+
this.setState(!0, t);
|
|
106
|
+
}
|
|
107
|
+
hide(t) {
|
|
108
|
+
this.setState(!1, t);
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
/**
|
|
112
|
+
* Defaults options
|
|
113
|
+
*/
|
|
114
|
+
u(a, "defaults", {
|
|
115
|
+
/**
|
|
116
|
+
* Should the tooltip and content be linked accessibly
|
|
117
|
+
* - Note tooltips can only apply to interactive elements! (ie button, input, role="...", etc)
|
|
118
|
+
* @type {Boolean}
|
|
119
|
+
*/
|
|
120
|
+
accessible: !0,
|
|
121
|
+
/**
|
|
122
|
+
* String/markup to insert into tooltip display
|
|
123
|
+
* @type {String}
|
|
124
|
+
*/
|
|
125
|
+
content: null,
|
|
126
|
+
openClass: "is-active",
|
|
127
|
+
contentClass: "",
|
|
128
|
+
isHtml: !1,
|
|
129
|
+
/**
|
|
130
|
+
* Pull content from pre-existing content on page
|
|
131
|
+
* @type {String|Node}
|
|
132
|
+
*/
|
|
133
|
+
fromElement: null,
|
|
134
|
+
/**
|
|
135
|
+
* If used on a link that is an anchor link it will display the content of the anchor like fromElement
|
|
136
|
+
*/
|
|
137
|
+
fromAnchor: !1,
|
|
138
|
+
/**
|
|
139
|
+
* Move the content to the bottom of the document
|
|
140
|
+
* @type {Boolean}
|
|
141
|
+
*/
|
|
142
|
+
endOfDocument: !0,
|
|
143
|
+
/**
|
|
144
|
+
* Events to show tooltip on
|
|
145
|
+
* @type {Array.<String>}
|
|
146
|
+
*/
|
|
147
|
+
showEvents: ["pointerenter", "focus"],
|
|
148
|
+
/**
|
|
149
|
+
* Events to hide tooltip on
|
|
150
|
+
* @type {Array.<String>}
|
|
151
|
+
*/
|
|
152
|
+
hideEvents: ["pointerleave", "blur"],
|
|
153
|
+
/**
|
|
154
|
+
* Delay when using the directive
|
|
155
|
+
* @type {Number}
|
|
156
|
+
*/
|
|
157
|
+
delay: 500,
|
|
158
|
+
/**
|
|
159
|
+
* Template for the content display
|
|
160
|
+
*/
|
|
161
|
+
template(t) {
|
|
162
|
+
return `
|
|
163
|
+
<div class="popover popover--tooltip">
|
|
164
|
+
<div class="popover__inner" ${A}>
|
|
165
|
+
</div>
|
|
166
|
+
<span class="popover__arrow" data-ulu-tooltip-arrow></span>
|
|
167
|
+
</div>
|
|
168
|
+
`;
|
|
169
|
+
},
|
|
170
|
+
/**
|
|
171
|
+
* Callback when tooltip is shown or hidden
|
|
172
|
+
* @type {Function}
|
|
173
|
+
*/
|
|
174
|
+
onChange(t) {
|
|
175
|
+
}
|
|
176
|
+
}), u(a, "defaultFloatingOptions", {
|
|
177
|
+
// strategy: "fixed"
|
|
178
|
+
});
|
|
179
|
+
let m = a;
|
|
180
|
+
export {
|
|
181
|
+
m as Tooltip,
|
|
182
|
+
j as init,
|
|
183
|
+
d as initializer
|
|
184
|
+
};
|
|
@@ -2,23 +2,23 @@
|
|
|
2
2
|
* Changes to make to configuration
|
|
3
3
|
* @param {Object} changes
|
|
4
4
|
*/
|
|
5
|
-
export function set(changes:
|
|
5
|
+
export function set(changes: Object): void;
|
|
6
6
|
/**
|
|
7
7
|
* Proxy Console.log
|
|
8
8
|
* @param {Object} context Class instance (optional), will rely on classes (debug) property for output
|
|
9
9
|
* @param {...any} messages
|
|
10
10
|
*/
|
|
11
|
-
export function log(context:
|
|
11
|
+
export function log(context: Object, ...messages: any[]): void;
|
|
12
12
|
/**
|
|
13
13
|
* Proxy Console.warn
|
|
14
14
|
* @param {Object} context Class instance (optional), will rely on classes (debug) property for output
|
|
15
15
|
* @param {...any} messages
|
|
16
16
|
*/
|
|
17
|
-
export function logWarning(context:
|
|
17
|
+
export function logWarning(context: Object, ...messages: any[]): void;
|
|
18
18
|
/**
|
|
19
19
|
* Proxy Console.error
|
|
20
20
|
* @param {Object} context Class instance (optional), will rely on classes (debug) property for output
|
|
21
21
|
* @param {...any} messages
|
|
22
22
|
*/
|
|
23
|
-
export function logError(context:
|
|
23
|
+
export function logError(context: Object, ...messages: any[]): void;
|
|
24
24
|
//# sourceMappingURL=class-logger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"class-logger.d.ts","sourceRoot":"","sources":["../../../lib/js/utils/class-logger.js"],"names":[],"mappings":"AAiCA;;;GAGG;AACH,6BAFW,MAAM,QAIhB;AAED;;;;GAIG;AACH,6BAHW,MAAM,eACF,GAAG,EAAA,QAMjB;AAED;;;;GAIG;AACH,oCAHW,MAAM,eACF,GAAG,EAAA,QAMjB;AAED;;;;GAIG;AACH,kCAHW,MAAM,eACF,GAAG,EAAA,QAMjB"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
const n = {
|
|
2
|
+
debug: !1,
|
|
3
|
+
warningsAlways: !0,
|
|
4
|
+
errorsAlways: !0,
|
|
5
|
+
outputContext: !1
|
|
6
|
+
}, g = "console" in window;
|
|
7
|
+
function s(r) {
|
|
8
|
+
var o;
|
|
9
|
+
return g && n.debug && ((r == null ? void 0 : r.debug) || ((o = r == null ? void 0 : r.options) == null ? void 0 : o.debug) || r == null);
|
|
10
|
+
}
|
|
11
|
+
function a(r) {
|
|
12
|
+
var o;
|
|
13
|
+
return typeof r == "object" && ((o = r == null ? void 0 : r.constructor) == null ? void 0 : o.name);
|
|
14
|
+
}
|
|
15
|
+
function u(r, o, l) {
|
|
16
|
+
const i = a(o) || "Logger";
|
|
17
|
+
console[r](i, ...l), n.outputContext && console.log(`Context:
|
|
18
|
+
`, o);
|
|
19
|
+
}
|
|
20
|
+
function f(r) {
|
|
21
|
+
Object.assign(n, r);
|
|
22
|
+
}
|
|
23
|
+
function e(r, ...o) {
|
|
24
|
+
s(r) && u("log", r, o);
|
|
25
|
+
}
|
|
26
|
+
function w(r, ...o) {
|
|
27
|
+
(n.warningsAlways || s(r)) && u("warn", r, o);
|
|
28
|
+
}
|
|
29
|
+
function b(r, ...o) {
|
|
30
|
+
(n.errorsAlways || s(r)) && u("error", r, o);
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
e as log,
|
|
34
|
+
b as logError,
|
|
35
|
+
w as logWarning,
|
|
36
|
+
f as set
|
|
37
|
+
};
|
|
@@ -14,7 +14,7 @@ export function dataAttributeToDatasetKey(attribute: any): string;
|
|
|
14
14
|
* @param {Node} parent The grid parent <data-grid="">
|
|
15
15
|
* @param {Object} classes Override the default equal heights classes
|
|
16
16
|
*/
|
|
17
|
-
export function setPositionClasses(parent: Node, classes?:
|
|
17
|
+
export function setPositionClasses(parent: Node, classes?: Object): void;
|
|
18
18
|
/**
|
|
19
19
|
* Resolves a class input (string or array) into a consistent array of class names.
|
|
20
20
|
* @param {string|string[]} input - The class input, which can be a string, an array of strings, or any other value.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../../lib/js/utils/dom.js"],"names":[],"mappings":"AAMA;;;;GAIG;AACH,2DAFa,MAAM,CAIlB;AAED;;;;;;;;;GASG;AACH,2CAHa,IAAI,
|
|
1
|
+
{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../../lib/js/utils/dom.js"],"names":[],"mappings":"AAMA;;;;GAIG;AACH,2DAFa,MAAM,CAIlB;AAED;;;;;;;;;GASG;AACH,2CAHa,IAAI,YACJ,MAAM,QAmClB;AAED;;;;;;;;GAQG;AACH,8CANa,MAAM,EAAE,CAiBpB"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { kebabToCamel as f } from "@ulu/utils/string.js";
|
|
2
|
+
function c(t) {
|
|
3
|
+
return f(t.replace(/^data-/, ""));
|
|
4
|
+
}
|
|
5
|
+
function p(t, o = {
|
|
6
|
+
columnFirst: "position-column-first",
|
|
7
|
+
columnLast: "position-column-last",
|
|
8
|
+
rowFirst: "position-row-first",
|
|
9
|
+
rowLast: "position-row-last"
|
|
10
|
+
}) {
|
|
11
|
+
const l = [...t.children], n = [];
|
|
12
|
+
let e;
|
|
13
|
+
l.forEach((r) => {
|
|
14
|
+
const s = r.getBoundingClientRect().y;
|
|
15
|
+
e !== s && n.push([]), n[n.length - 1].push(r), e = s, r.classList.remove(...Object.values(o));
|
|
16
|
+
}), n.forEach((r, s) => {
|
|
17
|
+
s === 0 && r.forEach((i) => i.classList.add(o.rowFirst)), s == n.length - 1 && r.forEach((i) => i.classList.add(o.rowLast)), r.forEach((i, a) => {
|
|
18
|
+
a === 0 && i.classList.add(o.columnFirst), a == r.length - 1 && i.classList.add(o.columnLast);
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
function m(t) {
|
|
23
|
+
return typeof t == "string" ? t.split(" ").filter((o) => o !== "") : Array.isArray(t) ? t : t ? (console.warn("resolveClassArray: Invalid class input type.", t), []) : [];
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
c as dataAttributeToDatasetKey,
|
|
27
|
+
m as resolveClasses,
|
|
28
|
+
p as setPositionClasses
|
|
29
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-save.d.ts","sourceRoot":"","sources":["../../../lib/js/utils/file-save.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;GAKG;AAGH;;;;;;;;GAQG;AACH;IACE;;;MAGC;IAmCD;;OAEG;IACH,qCAEC;IAvCD;;;OAGG;IACH,
|
|
1
|
+
{"version":3,"file":"file-save.d.ts","sourceRoot":"","sources":["../../../lib/js/utils/file-save.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;GAKG;AAGH;;;;;;;;GAQG;AACH;IACE;;;MAGC;IAmCD;;OAEG;IACH,qCAEC;IAvCD;;;OAGG;IACH,kBAHW,GAAC,WACD,eAAe,EAOzB;IAJC;;;wBAA4D;IAC5D,UAAgB;IAChB,WAAyD;IACzD,YAAyC;IAE3C;;OAEG;IACH,gBAEC;IACD;;OAEG;IACH,iBAEC;IACD;;;OAGG;IACH,4CAOC;CAOF"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
var l = Object.defineProperty;
|
|
2
|
+
var a = (s, t, e) => t in s ? l(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
|
|
3
|
+
var i = (s, t, e) => a(s, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
const r = class r {
|
|
5
|
+
/**
|
|
6
|
+
* @param {*} data Data to put in blob file
|
|
7
|
+
* @param {FileSaveOptions} options Options for file, see defaults (ie. type, filename)
|
|
8
|
+
*/
|
|
9
|
+
constructor(t, e) {
|
|
10
|
+
this.options = Object.assign({}, r.defaults, e), this.data = t, this.blob = new Blob([t], { type: this.options.type }), this.url = URL.createObjectURL(this.blob);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Remove the blob url
|
|
14
|
+
*/
|
|
15
|
+
destroy() {
|
|
16
|
+
return URL.revokeObjectURL(this.url);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Get the blob url
|
|
20
|
+
*/
|
|
21
|
+
getUrl() {
|
|
22
|
+
return this.url;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Create link element with blob as href
|
|
26
|
+
* @param {String} text The text to put in the link
|
|
27
|
+
*/
|
|
28
|
+
createLink(t) {
|
|
29
|
+
const e = document.createElement("a"), n = document.createTextNode(t);
|
|
30
|
+
return e.setAttribute("download", this.options.filename), e.setAttribute("href", this.url), e.appendChild(n), e;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Check for Compatibility (optional, implement on user side)
|
|
34
|
+
*/
|
|
35
|
+
static isBrowserSupported() {
|
|
36
|
+
return "FileReader" in window;
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
i(r, "defaults", {
|
|
40
|
+
filename: "filesave-file.txt",
|
|
41
|
+
type: "text/plain;charset=utf-8"
|
|
42
|
+
});
|
|
43
|
+
let o = r;
|
|
44
|
+
export {
|
|
45
|
+
o as FileSave
|
|
46
|
+
};
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @param {*} options Configuration options for floatingUi
|
|
5
5
|
* @returns {Function} floating cleanup function call when no longer needed
|
|
6
6
|
*/
|
|
7
|
-
export function createFloatingUi(elements:
|
|
7
|
+
export function createFloatingUi(elements: Object, config: any): Function;
|
|
8
8
|
export namespace defaults {
|
|
9
9
|
let strategy: string;
|
|
10
10
|
let placement: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"floating-ui.d.ts","sourceRoot":"","sources":["../../../lib/js/utils/floating-ui.js"],"names":[],"mappings":"AA0BA;;;;;GAKG;AACH,
|
|
1
|
+
{"version":3,"file":"floating-ui.d.ts","sourceRoot":"","sources":["../../../lib/js/utils/floating-ui.js"],"names":[],"mappings":"AA0BA;;;;;GAKG;AACH,2CAJW,MAAM,yBA2ChB"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { autoUpdate as d, computePosition as g, inline as y, offset as b, flip as h, shift as j, arrow as w } from "@floating-ui/dom";
|
|
2
|
+
const $ = {
|
|
3
|
+
strategy: "absolute",
|
|
4
|
+
placement: "bottom",
|
|
5
|
+
inline: !1,
|
|
6
|
+
offset: {
|
|
7
|
+
mainAxis: 16
|
|
8
|
+
},
|
|
9
|
+
shift: !0,
|
|
10
|
+
flip: !0,
|
|
11
|
+
arrow: !0
|
|
12
|
+
// Options for arrow (not element)
|
|
13
|
+
};
|
|
14
|
+
function O(l, n) {
|
|
15
|
+
const t = Object.assign({}, $, n), { placement: r, strategy: f } = t, { trigger: o, content: s, contentArrow: a } = l;
|
|
16
|
+
return d(o, s, () => {
|
|
17
|
+
g(o, s, {
|
|
18
|
+
placement: r,
|
|
19
|
+
strategy: f,
|
|
20
|
+
middleware: [
|
|
21
|
+
...i(y, t.inline),
|
|
22
|
+
...i(b, t.offset),
|
|
23
|
+
...i(h, t.flip),
|
|
24
|
+
...i(j, t.shift),
|
|
25
|
+
...i(w, a && t.arrow, { element: a })
|
|
26
|
+
]
|
|
27
|
+
}).then((c) => {
|
|
28
|
+
const { x: p, y: u, middlewareData: m, placement: x } = c, e = m.arrow;
|
|
29
|
+
Object.assign(s.style, {
|
|
30
|
+
left: `${p}px`,
|
|
31
|
+
top: `${u}px`
|
|
32
|
+
}), s.setAttribute("data-placement", x), e && Object.assign(a.style, {
|
|
33
|
+
// position: "absolute",
|
|
34
|
+
left: (e == null ? void 0 : e.x) != null ? `${e.x}px` : "",
|
|
35
|
+
top: (e == null ? void 0 : e.y) != null ? `${e.y}px` : ""
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
function i(l, n, t = {}) {
|
|
41
|
+
return n ? typeof n == "object" ? [l({ ...n, ...t })] : [l(t)] : [];
|
|
42
|
+
}
|
|
43
|
+
export {
|
|
44
|
+
O as createFloatingUi,
|
|
45
|
+
$ as defaults
|
|
46
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { updateSettings as s } from "../core/settings.js";
|
|
2
|
+
function o() {
|
|
3
|
+
s({
|
|
4
|
+
iconClassClose: "fas fa-xmark",
|
|
5
|
+
iconClassDragX: "fas fa-solid fa-grip-lines-vertical",
|
|
6
|
+
// iconClassDragBoth: "fas fa-solid fa-grip", // Not really any good icons for this (no diagonal arrows, etc)
|
|
7
|
+
iconClassPrevious: "fas fa-solid fa-chevron-left",
|
|
8
|
+
iconClassNext: "fas fa-solid fa-chevron-right"
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
o as configureIcons
|
|
13
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { FileSave } from
|
|
2
|
-
export { configureIcons as fontAwesomeConfigureIcons } from
|
|
3
|
-
export { set as classLoggerSet, log as classLoggerLog, logWarning as classLoggerLogWarning, logError as classLoggerLogError } from
|
|
4
|
-
export { dataAttributeToDatasetKey, setPositionClasses, resolveClasses } from
|
|
5
|
-
export { defaults as floatingUiDefaults, createFloatingUi } from
|
|
6
|
-
export { newId, ensureId } from
|
|
7
|
-
export { pauseVideos as youtubePauseVideos, prepVideos as youtubePrepVideos } from
|
|
1
|
+
export { FileSave } from './file-save.js';
|
|
2
|
+
export { configureIcons as fontAwesomeConfigureIcons } from './font-awesome.js';
|
|
3
|
+
export { set as classLoggerSet, log as classLoggerLog, logWarning as classLoggerLogWarning, logError as classLoggerLogError } from './class-logger.js';
|
|
4
|
+
export { dataAttributeToDatasetKey, setPositionClasses, resolveClasses } from './dom.js';
|
|
5
|
+
export { defaults as floatingUiDefaults, createFloatingUi } from './floating-ui.js';
|
|
6
|
+
export { newId, ensureId } from './id.js';
|
|
7
|
+
export { pauseVideos as youtubePauseVideos, prepVideos as youtubePrepVideos } from './pause-youtube-video.js';
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const c = [
|
|
2
|
+
".youtube-embedded-video",
|
|
3
|
+
'iframe[title*="YouTube video player"]',
|
|
4
|
+
'iframe[src*="youtube.com/embed"]'
|
|
5
|
+
];
|
|
6
|
+
function n(e = document) {
|
|
7
|
+
s(e).forEach((o) => {
|
|
8
|
+
try {
|
|
9
|
+
o.contentWindow.postMessage('{"event":"command","func":"stopVideo","args":""}', "*");
|
|
10
|
+
} catch (t) {
|
|
11
|
+
console.error(t);
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function i(e = document) {
|
|
16
|
+
s(e).forEach((o) => {
|
|
17
|
+
const { src: t } = o;
|
|
18
|
+
t && (o.src = t.split("?")[0] + "?rel=0&enablejsapi=1");
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
function s(e) {
|
|
22
|
+
return e.querySelectorAll(c.join(", "));
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
n as pauseVideos,
|
|
26
|
+
i as prepVideos
|
|
27
|
+
};
|