@ulu/frontend 0.2.0-beta.1 → 0.2.0-beta.11
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/js → 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/js → es}/core/events.d.ts +1 -1
- package/dist/es/core/events.d.ts.map +1 -0
- package/dist/es/core/events.js +45 -0
- package/dist/es/core/index.d.ts +4 -0
- package/dist/{types/js/ui → es/core}/index.d.ts.map +1 -1
- package/dist/{types/js → 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/{types/js → es}/index.d.ts.map +1 -1
- package/dist/es/index.js +125 -0
- package/dist/{types/js → 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/js → 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/js → es}/ui/details-group.d.ts +1 -1
- package/dist/es/ui/details-group.d.ts.map +1 -0
- package/dist/es/ui/details-group.js +49 -0
- package/dist/{types/js → 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/js → es}/ui/flipcard.d.ts +1 -1
- package/dist/es/ui/flipcard.d.ts.map +1 -0
- package/dist/es/ui/flipcard.js +97 -0
- package/dist/{types/js → es}/ui/grid.d.ts +2 -2
- package/dist/es/ui/grid.d.ts.map +1 -0
- package/dist/es/ui/grid.js +18 -0
- package/dist/{types/js → es}/ui/index.d.ts +22 -21
- package/dist/{types/js/core → es/ui}/index.d.ts.map +1 -1
- package/dist/{types/js → 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.d.ts.map +1 -0
- package/dist/es/ui/overflow-scroller-pager.js +28 -0
- package/dist/{types/js → es}/ui/overflow-scroller.d.ts +3 -3
- package/dist/es/ui/overflow-scroller.d.ts.map +1 -0
- package/dist/es/ui/overflow-scroller.js +90 -0
- package/dist/es/ui/page.d.ts.map +1 -0
- package/dist/es/ui/page.js +7 -0
- package/dist/{types/js → es}/ui/popover.d.ts +3 -3
- package/dist/es/ui/popover.d.ts.map +1 -0
- package/dist/es/ui/popover.js +77 -0
- package/dist/es/ui/print-details.d.ts.map +1 -0
- package/dist/es/ui/print-details.js +22 -0
- package/dist/es/ui/print.d.ts.map +1 -0
- package/dist/es/ui/print.js +34 -0
- package/dist/{types/js → es}/ui/programmatic-modal.d.ts +1 -1
- package/dist/es/ui/programmatic-modal.d.ts.map +1 -0
- package/dist/es/ui/programmatic-modal.js +55 -0
- package/dist/{types/js → 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/js → 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/js → es}/ui/scroll-slider.d.ts +1 -1
- package/dist/es/ui/scroll-slider.d.ts.map +1 -0
- package/dist/es/ui/scroll-slider.js +29 -0
- package/dist/{types/js → 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/js → es}/ui/slider.d.ts +11 -8
- package/dist/es/ui/slider.d.ts.map +1 -0
- package/dist/es/ui/slider.js +290 -0
- package/dist/{types/js → es}/ui/tabs.d.ts +2 -2
- package/dist/es/ui/tabs.d.ts.map +1 -0
- package/dist/es/ui/tabs.js +64 -0
- package/dist/{types/js → 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/js → 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/js → 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.d.ts.map +1 -0
- package/dist/es/utils/css.js +6 -0
- package/dist/{types/js → es}/utils/dom.d.ts +1 -1
- package/dist/es/utils/dom.d.ts.map +1 -0
- package/dist/es/utils/dom.js +29 -0
- package/dist/es/utils/file-save.d.ts.map +1 -0
- package/dist/es/utils/file-save.js +46 -0
- package/dist/{types/js → es}/utils/floating-ui.d.ts +1 -1
- package/dist/es/utils/floating-ui.d.ts.map +1 -0
- package/dist/es/utils/floating-ui.js +46 -0
- package/dist/es/utils/font-awesome.d.ts.map +1 -0
- package/dist/es/utils/font-awesome.js +13 -0
- package/dist/es/utils/id.d.ts.map +1 -0
- package/dist/es/utils/id.js +11 -0
- package/dist/{types/js → es}/utils/index.d.ts +7 -7
- package/dist/{types/js → es}/utils/index.d.ts.map +1 -1
- package/dist/es/utils/pause-youtube-video.d.ts.map +1 -0
- package/dist/es/utils/pause-youtube-video.js +27 -0
- package/dist/umd/style.css +1 -0
- package/dist/umd/ulu-frontend.umd.js +70 -0
- package/lib/js/ui/breakpoints.js +13 -5
- package/lib/js/ui/index.js +4 -0
- package/lib/js/ui/modal-builder.js +5 -3
- package/lib/js/ui/slider.js +22 -13
- 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 +5 -6
- package/lib/scss/components/_form-theme.scss +3 -3
- 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 +54 -45
- package/dist/style.css +0 -1
- package/dist/types/js/core/component.d.ts.map +0 -1
- package/dist/types/js/core/events.d.ts.map +0 -1
- package/dist/types/js/core/index.d.ts +0 -4
- package/dist/types/js/core/settings.d.ts.map +0 -1
- package/dist/types/js/index.d.ts +0 -4
- package/dist/types/js/ui/breakpoints.d.ts.map +0 -1
- package/dist/types/js/ui/collapsible.d.ts.map +0 -1
- package/dist/types/js/ui/details-group.d.ts.map +0 -1
- package/dist/types/js/ui/dialog.d.ts.map +0 -1
- package/dist/types/js/ui/flipcard.d.ts.map +0 -1
- package/dist/types/js/ui/grid.d.ts.map +0 -1
- package/dist/types/js/ui/modal-builder.d.ts.map +0 -1
- package/dist/types/js/ui/overflow-scroller-pager.d.ts.map +0 -1
- package/dist/types/js/ui/overflow-scroller.d.ts.map +0 -1
- package/dist/types/js/ui/page.d.ts.map +0 -1
- package/dist/types/js/ui/popover.d.ts.map +0 -1
- package/dist/types/js/ui/print-details.d.ts.map +0 -1
- package/dist/types/js/ui/print.d.ts.map +0 -1
- package/dist/types/js/ui/programmatic-modal.d.ts.map +0 -1
- package/dist/types/js/ui/proxy-click.d.ts.map +0 -1
- package/dist/types/js/ui/resizer.d.ts.map +0 -1
- package/dist/types/js/ui/scroll-slider.d.ts.map +0 -1
- package/dist/types/js/ui/scrollpoint.d.ts.map +0 -1
- package/dist/types/js/ui/slider.d.ts.map +0 -1
- package/dist/types/js/ui/tabs.d.ts.map +0 -1
- package/dist/types/js/ui/theme-toggle.d.ts.map +0 -1
- package/dist/types/js/ui/tooltip.d.ts.map +0 -1
- package/dist/types/js/utils/class-logger.d.ts.map +0 -1
- package/dist/types/js/utils/css.d.ts.map +0 -1
- package/dist/types/js/utils/dom.d.ts.map +0 -1
- package/dist/types/js/utils/file-save.d.ts.map +0 -1
- package/dist/types/js/utils/floating-ui.d.ts.map +0 -1
- package/dist/types/js/utils/font-awesome.d.ts.map +0 -1
- package/dist/types/js/utils/id.d.ts.map +0 -1
- package/dist/types/js/utils/pause-youtube-video.d.ts.map +0 -1
- package/dist/ulu-frontend.es.js +0 -5737
- package/dist/ulu-frontend.umd.js +0 -77
- package/lib/scss/components/_card-before-no-position-relative.TRASH.scss +0 -576
- /package/dist/{types/js → es}/ui/overflow-scroller-pager.d.ts +0 -0
- /package/dist/{types/js → es}/ui/page.d.ts +0 -0
- /package/dist/{types/js → es}/ui/print-details.d.ts +0 -0
- /package/dist/{types/js → es}/ui/print.d.ts +0 -0
- /package/dist/{types/js → es}/utils/css.d.ts +0 -0
- /package/dist/{types/js → es}/utils/file-save.d.ts +0 -0
- /package/dist/{types/js → es}/utils/font-awesome.d.ts +0 -0
- /package/dist/{types/js → es}/utils/id.d.ts +0 -0
- /package/dist/{types/js → es}/utils/pause-youtube-video.d.ts +0 -0
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { Resizer } from './resizer.js';
|
|
2
|
+
import { ComponentInitializer } from '../core/component.js';
|
|
1
3
|
/**
|
|
2
4
|
* @param {Object} options Change options used as default for dialogs, can then be overridden by data attribute settings on element
|
|
3
5
|
*/
|
|
4
|
-
export function setDefaults(options:
|
|
6
|
+
export function setDefaults(options: Object): void;
|
|
5
7
|
/**
|
|
6
8
|
* Initialize everything in document
|
|
7
9
|
* - This will only initialize elements once, it is safe to call on page changes
|
|
@@ -12,20 +14,20 @@ export function init(): void;
|
|
|
12
14
|
* @param {Node} content Content element of the dialog (what is inserted into the body)
|
|
13
15
|
* @param {Object} options Options for built dialog (see defaults)
|
|
14
16
|
*/
|
|
15
|
-
export function buildModal(content: Node, options:
|
|
17
|
+
export function buildModal(content: Node, options: Object): {
|
|
16
18
|
modal: any;
|
|
17
|
-
resizer: Resizer;
|
|
19
|
+
resizer: Resizer | undefined;
|
|
18
20
|
};
|
|
19
21
|
/**
|
|
20
22
|
* Modal Builder Component Initializer
|
|
21
23
|
*/
|
|
22
24
|
export const initializer: ComponentInitializer;
|
|
23
25
|
export namespace defaults {
|
|
24
|
-
export let title:
|
|
25
|
-
export let titleIcon:
|
|
26
|
+
export let title: null;
|
|
27
|
+
export let titleIcon: null;
|
|
26
28
|
export let titleClass: string;
|
|
27
|
-
export let labelledby:
|
|
28
|
-
export let describedby:
|
|
29
|
+
export let labelledby: null;
|
|
30
|
+
export let describedby: null;
|
|
29
31
|
export let nonModal: boolean;
|
|
30
32
|
export let documentEnd: boolean;
|
|
31
33
|
export let allowResize: boolean;
|
|
@@ -38,11 +40,12 @@ export namespace defaults {
|
|
|
38
40
|
let _class: string;
|
|
39
41
|
export { _class as class };
|
|
40
42
|
export let baseClass: string;
|
|
41
|
-
export let footerElement:
|
|
42
|
-
export let footerHtml:
|
|
43
|
-
export let
|
|
44
|
-
export let
|
|
45
|
-
export let
|
|
43
|
+
export let footerElement: null;
|
|
44
|
+
export let footerHtml: null;
|
|
45
|
+
export let classClose: string;
|
|
46
|
+
export let classCloseIcon: Object;
|
|
47
|
+
export let classResizerIcon: Object;
|
|
48
|
+
export let classResizerIconBoth: Object;
|
|
46
49
|
export let debug: boolean;
|
|
47
50
|
export function templateCloseIcon(config: any): string;
|
|
48
51
|
export function templateResizerIcon(config: any): string;
|
|
@@ -52,7 +55,7 @@ export namespace defaults {
|
|
|
52
55
|
* @param {Object} config Resolved options
|
|
53
56
|
* @returns {String} Markup for modal
|
|
54
57
|
*/
|
|
55
|
-
export function template(id: string, config:
|
|
58
|
+
export function template(id: string, config: Object): string;
|
|
56
59
|
}
|
|
57
60
|
/**
|
|
58
61
|
* Default builder options (extends dialog defaults, watch name collisions)
|
|
@@ -126,7 +129,11 @@ export type DefaultModalOptions = {
|
|
|
126
129
|
*/
|
|
127
130
|
baseClass: string;
|
|
128
131
|
/**
|
|
129
|
-
* - The class name for the close
|
|
132
|
+
* - The class name for the close button. Defaults to 'button button--icon' styling.
|
|
133
|
+
*/
|
|
134
|
+
classClose: string;
|
|
135
|
+
/**
|
|
136
|
+
* - The class name for the close icon. Defaults to 'button__icon' styling. Uses the wrapped setting string.
|
|
130
137
|
*/
|
|
131
138
|
classCloseIcon: string;
|
|
132
139
|
/**
|
|
@@ -154,6 +161,4 @@ export type DefaultModalOptions = {
|
|
|
154
161
|
*/
|
|
155
162
|
config: (arg0: object) => string;
|
|
156
163
|
};
|
|
157
|
-
import { Resizer } from "./resizer.js";
|
|
158
|
-
import { ComponentInitializer } from "../core/component.js";
|
|
159
164
|
//# sourceMappingURL=modal-builder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modal-builder.d.ts","sourceRoot":"","sources":["../../../lib/js/ui/modal-builder.js"],"names":[],"mappings":"AAoJA;;GAEG;AACH,qCAFW,MAAM,QAIhB;AAED;;;GAGG;AACH,6BAQC;AAED;;;;GAIG;AACH,oCAHW,IAAI,WACJ,MAAM;;;EAqEhB;AApOD;;GAEG;AACH,+CAGG;;;;;;;;;;;;;;;;;;;;;;;;;;IAiED,uDAGC;IACD,yDAIC;IACD;;;;;OAKG;IACH,6CAHW,MAAM,UA8ChB;;;;;;;;;;;;WAnHW,MAAM,GAAC,IAAI;;;;eACX,MAAM,GAAC,IAAI;;;;gBACX,MAAM;;;;gBACN,MAAM;;;;iBACN,MAAM;;;;cACN,OAAO;;;;iBACP,OAAO;;;;iBACP,OAAO;;;;cACP,QAAQ,GAAC,UAAU,GAAC,YAAY,GAAC,WAAW,GAAC,aAAa,GAAC,eAAe,GAAC,cAAc;;;;eACzF,OAAO;;;;gBACP,OAAO;;;;UACP,SAAS,GAAC,OAAO,GAAC,OAAO,GAAC,YAAY;;;;WACtC,OAAO;;;;iBACP,OAAO;;;;WACP,MAAM;;;;eACN,MAAM;;;;gBACN,MAAM;;;;oBACN,MAAM;;;;sBACN,MAAM;;;;mBACN,MAAM,GAAC,IAAI;;;;gBACX,MAAM,GAAC,IAAI;;;;WACX,OAAO;;;;uBACP,CAAS,IAAM,EAAN,MAAM,KAAG,MAAM;;;;YACxB,CAAS,IAAM,EAAN,MAAM,KAAG,MAAM;;wBA1Cd,cAAc;qCAHD,sBAAsB"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { ComponentInitializer as C } from "../core/component.js";
|
|
2
|
+
import { wrapSettingString as d } from "../core/settings.js";
|
|
3
|
+
import { getCoreEventName as m } from "../core/events.js";
|
|
4
|
+
import { Resizer as _ } from "./resizer.js";
|
|
5
|
+
import { closeAttribute as y, baseAttribute as I, defaults as E } from "./dialog.js";
|
|
6
|
+
import { createElementFromHtml as v, getElement as R } from "@ulu/utils/browser/dom.js";
|
|
7
|
+
const n = new C({
|
|
8
|
+
type: "modal-builder",
|
|
9
|
+
baseAttribute: "data-ulu-modal-builder"
|
|
10
|
+
}), w = {
|
|
11
|
+
title: null,
|
|
12
|
+
titleIcon: null,
|
|
13
|
+
titleClass: "",
|
|
14
|
+
labelledby: null,
|
|
15
|
+
describedby: null,
|
|
16
|
+
nonModal: !1,
|
|
17
|
+
documentEnd: !0,
|
|
18
|
+
allowResize: !1,
|
|
19
|
+
position: "center",
|
|
20
|
+
bodyFills: !1,
|
|
21
|
+
noBackdrop: !1,
|
|
22
|
+
size: "default",
|
|
23
|
+
print: !1,
|
|
24
|
+
noMinHeight: !1,
|
|
25
|
+
class: "",
|
|
26
|
+
baseClass: "modal",
|
|
27
|
+
footerElement: null,
|
|
28
|
+
footerHtml: null,
|
|
29
|
+
classClose: "button button--icon",
|
|
30
|
+
classCloseIcon: d("iconClassClose", (s) => `${s} button__icon`),
|
|
31
|
+
classResizerIcon: d("iconClassDragX"),
|
|
32
|
+
classResizerIconBoth: d("iconClassDragBoth"),
|
|
33
|
+
debug: !1,
|
|
34
|
+
templateCloseIcon(s) {
|
|
35
|
+
const { baseClass: t, classCloseIcon: e } = s;
|
|
36
|
+
return `<span class="${t}__close-icon ${e}" aria-hidden="true"></span>`;
|
|
37
|
+
},
|
|
38
|
+
templateResizerIcon(s) {
|
|
39
|
+
const { baseClass: t, classResizerIcon: e, classResizerIconBoth: i } = s, r = s.position === "center" ? i : e;
|
|
40
|
+
return `<span class="${t}__resizer-icon ${r}" aria-hidden="true"></span>`;
|
|
41
|
+
},
|
|
42
|
+
/**
|
|
43
|
+
* Default modal template
|
|
44
|
+
* @param {String} id ID for new modal
|
|
45
|
+
* @param {Object} config Resolved options
|
|
46
|
+
* @returns {String} Markup for modal
|
|
47
|
+
*/
|
|
48
|
+
template(s, t) {
|
|
49
|
+
const { baseClass: e, describedby: i, footerHtml: r } = t, o = [
|
|
50
|
+
e,
|
|
51
|
+
`${e}--${t.position}`,
|
|
52
|
+
`${e}--${t.size}`,
|
|
53
|
+
`${e}--${t.allowResize ? "resize" : "no-resize"}`,
|
|
54
|
+
...t.title ? [] : [`${e}--no-header`],
|
|
55
|
+
...t.bodyFills ? [`${e}--body-fills`] : [],
|
|
56
|
+
...t.noBackdrop ? [`${e}--no-backdrop`] : [],
|
|
57
|
+
...t.noMinHeight ? [`${e}--no-min-height`] : [],
|
|
58
|
+
...t.class ? [t.class] : []
|
|
59
|
+
], a = t.title ? `${s}--title` : t.labelledby;
|
|
60
|
+
return `
|
|
61
|
+
<dialog
|
|
62
|
+
id="${s}"
|
|
63
|
+
class="${o.join(" ")}"
|
|
64
|
+
${a ? `aria-labelledby="${a}"` : ""}
|
|
65
|
+
${i ? `aria-describedby="${i}"` : ""}
|
|
66
|
+
>
|
|
67
|
+
${t.title ? `
|
|
68
|
+
<header class="${e}__header">
|
|
69
|
+
<h2 id="${a}" class="${e}__title ${t.titleClass}">
|
|
70
|
+
${t.titleIcon ? `<span class="${e}__title-icon ${t.titleIcon}" aria-hidden="true"></span>` : ""}
|
|
71
|
+
<span class="${e}__title-text">${t.title}</span>
|
|
72
|
+
</h2>
|
|
73
|
+
<button class="${e}__close ${t.classClose}" aria-label="Close modal" ${y} autofocus>
|
|
74
|
+
${t.templateCloseIcon(t)}
|
|
75
|
+
</button>
|
|
76
|
+
</header>
|
|
77
|
+
` : ""}
|
|
78
|
+
<div class="${e}__body" ${n.getAttribute("body")}></div>
|
|
79
|
+
${r ? `<div class="${e}__footer">${r}</div>` : ""}
|
|
80
|
+
${t.allowResize ? `<button class="${e}__resizer" type="button" ${n.getAttribute("resizer")}>
|
|
81
|
+
${t.templateResizerIcon(t)}
|
|
82
|
+
</button>` : ""}
|
|
83
|
+
</dialog>
|
|
84
|
+
`;
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
let c = { ...w };
|
|
88
|
+
function j(s) {
|
|
89
|
+
c = Object.assign({}, c, s);
|
|
90
|
+
}
|
|
91
|
+
function N() {
|
|
92
|
+
n.init({
|
|
93
|
+
withData: !0,
|
|
94
|
+
coreEvents: ["pageModified"],
|
|
95
|
+
setup({ element: s, data: t }) {
|
|
96
|
+
A(s, t);
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
function A(s, t) {
|
|
101
|
+
const e = Object.assign({}, c, t), { position: i } = e;
|
|
102
|
+
if (e.debug && n.log(e, s), !s.id)
|
|
103
|
+
throw new Error("Missing ID on modal");
|
|
104
|
+
const r = e.template(s.id, e), o = v(r.trim()), a = (l) => o.querySelector(n.attributeSelector(l)), u = a("body"), p = a("resizer"), $ = g(e);
|
|
105
|
+
if (s.removeAttribute("id"), s.removeAttribute("hidden"), s.removeAttribute(n.getAttribute()), s.parentNode.replaceChild(o, s), u.appendChild(s), o.setAttribute(I, JSON.stringify($)), e.footerElement) {
|
|
106
|
+
const l = R(e.footerElement);
|
|
107
|
+
l && (l.classList.add(`${e.baseClass}__footer`), u.after(l));
|
|
108
|
+
}
|
|
109
|
+
let b;
|
|
110
|
+
const f = ["left", "right", "center"], h = i === "center", z = i === "right";
|
|
111
|
+
if (e.allowResize)
|
|
112
|
+
if (f.includes(i)) {
|
|
113
|
+
const l = h ? { fromX: "right", fromY: "bottom", multiplier: 2 } : { fromX: z ? "left" : "right" };
|
|
114
|
+
b = new _(o, p, l);
|
|
115
|
+
} else
|
|
116
|
+
console.warn(`${i} is not supported for resizing`);
|
|
117
|
+
if (e.print) {
|
|
118
|
+
let l;
|
|
119
|
+
document.addEventListener(m("beforePrint"), () => {
|
|
120
|
+
l = s.cloneNode(!0), o.after(l);
|
|
121
|
+
}), document.addEventListener(m("afterPrint"), () => {
|
|
122
|
+
l.remove();
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
return { modal: o, resizer: b };
|
|
126
|
+
}
|
|
127
|
+
function g(s) {
|
|
128
|
+
return Object.keys(E).reduce((t, e) => (e in s && (t[e] = s[e]), t), {});
|
|
129
|
+
}
|
|
130
|
+
export {
|
|
131
|
+
A as buildModal,
|
|
132
|
+
w as defaults,
|
|
133
|
+
N as init,
|
|
134
|
+
n as initializer,
|
|
135
|
+
j as setDefaults
|
|
136
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"overflow-scroller-pager.d.ts","sourceRoot":"","sources":["../../../lib/js/ui/overflow-scroller-pager.js"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;GAWG;AAEH,wCA4CC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
function y() {
|
|
2
|
+
return function(c, a) {
|
|
3
|
+
const r = a === "next", { track: s } = c.elements;
|
|
4
|
+
if (!s.children) return 400;
|
|
5
|
+
const g = window.getComputedStyle(s).getPropertyValue("scroll-padding-left").replace("auto", "0px"), n = parseInt(g, 10), { scrollLeft: i, offsetWidth: l } = s, u = i + l, o = [...s.children].map((e) => {
|
|
6
|
+
const { offsetLeft: t, offsetWidth: d } = e;
|
|
7
|
+
return {
|
|
8
|
+
element: e,
|
|
9
|
+
offsetLeft: t,
|
|
10
|
+
offsetRight: t + d
|
|
11
|
+
};
|
|
12
|
+
});
|
|
13
|
+
let f;
|
|
14
|
+
if (r)
|
|
15
|
+
f = o.find((e) => e.offsetRight >= u);
|
|
16
|
+
else {
|
|
17
|
+
let e = o.findLastIndex((t) => t.offsetLeft <= i);
|
|
18
|
+
if (e) {
|
|
19
|
+
let t = o[e];
|
|
20
|
+
f = o.slice(0, e + 1).find((h) => h.offsetLeft + n + l >= t.offsetRight);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return f ? r ? f.offsetLeft : f.offsetLeft + n : 400;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
y as createPager
|
|
28
|
+
};
|
|
@@ -8,8 +8,8 @@ export class OverflowScroller {
|
|
|
8
8
|
offsetEnd: number;
|
|
9
9
|
amount: string;
|
|
10
10
|
buttonClasses: string[];
|
|
11
|
-
iconClassPrevious:
|
|
12
|
-
iconClassNext:
|
|
11
|
+
iconClassPrevious: Object;
|
|
12
|
+
iconClassNext: Object;
|
|
13
13
|
};
|
|
14
14
|
constructor(elements: any, config: any);
|
|
15
15
|
options: any;
|
|
@@ -18,7 +18,7 @@ export class OverflowScroller {
|
|
|
18
18
|
previousEnabled: boolean;
|
|
19
19
|
scrollHandler: (e: any) => void;
|
|
20
20
|
checkOverflow(): void;
|
|
21
|
-
hasOverflow: boolean;
|
|
21
|
+
hasOverflow: boolean | undefined;
|
|
22
22
|
createControls(context: any): {
|
|
23
23
|
controls: HTMLUListElement;
|
|
24
24
|
previousItem: HTMLLIElement;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"overflow-scroller.d.ts","sourceRoot":"","sources":["../../../lib/js/ui/overflow-scroller.js"],"names":[],"mappings":"AAmBA;IACE,wBAAsB;IACtB;;;;;;;;;;MAUC;IACD,wCAgBC;IAfC,aAAmE;IAKnE,cAGC;IACD,qBAAuB;IACvB,yBAA2B;IAC3B,gCAA4C;IAK9C,sBAGC;IADC,iCAAwD;IAE1D;;;;;;MA2BC;IACD,oDAQC;IACD,uCAMC;IACD,2BAGC;IACD,2BAiBC;IACD,8CAeC;IACD,6BAaC;IACD,aAMC;IACD,iBAMC;IACD,6BAGC;CACF"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
var v = Object.defineProperty;
|
|
2
|
+
var C = (a, s, t) => s in a ? v(a, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[s] = t;
|
|
3
|
+
var u = (a, s, t) => C(a, typeof s != "symbol" ? s + "" : s, t);
|
|
4
|
+
import { wrapSettingString as p } from "../core/settings.js";
|
|
5
|
+
import { hasRequiredProps as b } from "@ulu/utils/object.js";
|
|
6
|
+
import { logError as m } from "../utils/class-logger.js";
|
|
7
|
+
const x = [
|
|
8
|
+
"track",
|
|
9
|
+
"controls"
|
|
10
|
+
], c = class c {
|
|
11
|
+
constructor(s, t) {
|
|
12
|
+
this.options = Object.assign({}, c.defaults, t), b(x) || m(this, "Missing a required Element"), this.elements = {
|
|
13
|
+
...s,
|
|
14
|
+
...this.createControls(s.controls)
|
|
15
|
+
}, this.nextEnabled = !0, this.previousEnabled = !0, this.scrollHandler = (e) => this.onScroll(e), this.elements.track.addEventListener("scroll", this.scrollHandler, { passive: !0 }), this.checkOverflow(), this.onScroll();
|
|
16
|
+
}
|
|
17
|
+
checkOverflow() {
|
|
18
|
+
const { track: s } = this.elements;
|
|
19
|
+
this.hasOverflow = s.scrollWidth > s.clientWidth;
|
|
20
|
+
}
|
|
21
|
+
createControls(s) {
|
|
22
|
+
const t = document.createElement("ul"), e = document.createElement("li"), o = document.createElement("li"), n = this.createControlButton("previous"), r = this.createControlButton("next"), i = this.getClass("controls-item");
|
|
23
|
+
return o.classList.add(i), o.classList.add(i + "--next"), e.classList.add(i), e.classList.add(i + "--previous"), t.classList.add(this.getClass("controls")), e.appendChild(n), o.appendChild(r), t.appendChild(e), t.appendChild(o), n.addEventListener("click", this.previous.bind(this)), r.addEventListener("click", this.next.bind(this)), s.appendChild(t), {
|
|
24
|
+
controls: t,
|
|
25
|
+
previousItem: e,
|
|
26
|
+
nextItem: o,
|
|
27
|
+
previous: n,
|
|
28
|
+
next: r
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
createControlButton(s) {
|
|
32
|
+
const t = document.createElement("button");
|
|
33
|
+
return t.classList.add(this.getClass("control-button")), t.classList.add(this.getClass(`control-button--${s}`)), t.classList.add(...this.options.buttonClasses), t.setAttribute("type", "button"), t.innerHTML = this.getControlContent(s), t;
|
|
34
|
+
}
|
|
35
|
+
getControlContent(s) {
|
|
36
|
+
const t = this.options[s === "next" ? "iconClassNext" : "iconClassPrevious"];
|
|
37
|
+
return `
|
|
38
|
+
<span class="hidden-visually">${s}</span>
|
|
39
|
+
<span class="${t}" aria-hidden="true"></span>
|
|
40
|
+
`;
|
|
41
|
+
}
|
|
42
|
+
onScroll(s) {
|
|
43
|
+
this.hasOverflow && this.onScrollHorizontal();
|
|
44
|
+
}
|
|
45
|
+
onScrollHorizontal() {
|
|
46
|
+
const { nextEnabled: s, previousEnabled: t } = this, { track: e } = this.elements, { offsetStart: o, offsetEnd: n } = this.options, { scrollWidth: r, clientWidth: i, scrollLeft: d } = e, l = d <= o, h = r - d - n <= i;
|
|
47
|
+
l && t ? this.setControlState("previous", !1) : !l && !t && this.setControlState("previous", !0), h && s ? this.setControlState("next", !1) : !h && !s && this.setControlState("next", !0);
|
|
48
|
+
}
|
|
49
|
+
setControlState(s, t) {
|
|
50
|
+
const e = s === "next", { next: o, nextItem: n, previous: r, previousItem: i } = this.elements, d = e ? n : i, l = e ? o : r, h = t ? "remove" : "add";
|
|
51
|
+
d.classList[h](this.getClass("controls-item--disabled")), l.classList[t ? "remove" : "add"](this.getClass("control--disabled")), t ? l.removeAttribute("disabled") : l.setAttribute("disabled", ""), this[e ? "nextEnabled" : "previousEnabled"] = t;
|
|
52
|
+
}
|
|
53
|
+
resolveAmount(s) {
|
|
54
|
+
const t = s === "next", { amount: e } = this.options, { scrollLeft: o, offsetWidth: n } = this.elements.track;
|
|
55
|
+
return e === "auto" ? t ? o + n : o - n : typeof e == "function" ? e(this, s) : typeof e == "number" ? t ? o + e : o - e : (m("Unable to resolve amount for scroll"), 500);
|
|
56
|
+
}
|
|
57
|
+
next() {
|
|
58
|
+
this.elements.track.scrollTo({
|
|
59
|
+
top: 0,
|
|
60
|
+
left: this.resolveAmount("next"),
|
|
61
|
+
behavior: "smooth"
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
previous() {
|
|
65
|
+
this.elements.track.scrollTo({
|
|
66
|
+
top: 0,
|
|
67
|
+
left: this.resolveAmount("previous"),
|
|
68
|
+
behavior: "smooth"
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
getClass(s) {
|
|
72
|
+
const { namespace: t } = this.options;
|
|
73
|
+
return `${t}__${s}`;
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
u(c, "instances", []), u(c, "defaults", {
|
|
77
|
+
namespace: "OverflowScroller",
|
|
78
|
+
events: {},
|
|
79
|
+
horizontal: !0,
|
|
80
|
+
offsetStart: 100,
|
|
81
|
+
offsetEnd: 100,
|
|
82
|
+
amount: "auto",
|
|
83
|
+
buttonClasses: ["button", "button--icon"],
|
|
84
|
+
iconClassPrevious: p("iconClassPrevious"),
|
|
85
|
+
iconClassNext: p("iconClassNext")
|
|
86
|
+
});
|
|
87
|
+
let f = c;
|
|
88
|
+
export {
|
|
89
|
+
f as OverflowScroller
|
|
90
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../lib/js/ui/page.js"],"names":[],"mappings":"AAQA;;GAEG;AACH,6BAEC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { ComponentInitializer } from '../core/component.js';
|
|
2
|
+
import { Collapsible } from './collapsible.js';
|
|
1
3
|
/**
|
|
2
4
|
* Initialize default popover
|
|
3
5
|
*/
|
|
@@ -31,9 +33,7 @@ export class Popover extends Collapsible {
|
|
|
31
33
|
constructor(elements: any, config: any, floatingOptions: any);
|
|
32
34
|
floatingOptions: any;
|
|
33
35
|
createFloatingInstance(): void;
|
|
34
|
-
floatingCleanup: Function;
|
|
36
|
+
floatingCleanup: Function | null | undefined;
|
|
35
37
|
destroyFloatingInstance(): void;
|
|
36
38
|
}
|
|
37
|
-
import { ComponentInitializer } from "../core/component.js";
|
|
38
|
-
import { Collapsible } from "./collapsible.js";
|
|
39
39
|
//# sourceMappingURL=popover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../../lib/js/ui/popover.js"],"names":[],"mappings":"AAgCA;;GAEG;AACH,6BAmBC;AAED;;GAEG;AACH;;;;;;;;;EAiBC;AAKD,uDAmBC;AA5FD;;GAEG;AACH,+CAGG;AAOH;;GAEG;AACH,8CAAqC;AA+ErC;;GAEG;AACH;IACE,8DAIC;IADC,qBAA4C;IAa9C,+BAIC;IADC,6CAA+E;IAEjF,gCAKC;CACF;qCAlIoC,sBAAsB;4BAE/B,kBAAkB"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { ComponentInitializer as p } from "../core/component.js";
|
|
2
|
+
import { createFloatingUi as f } from "../utils/floating-ui.js";
|
|
3
|
+
import { Collapsible as u } from "./collapsible.js";
|
|
4
|
+
const r = new p({
|
|
5
|
+
type: "popover",
|
|
6
|
+
baseAttribute: "data-ulu-popover"
|
|
7
|
+
}), d = r.attributeSelector("trigger-anchor"), h = r.attributeSelector("arrow"), m = r.getAttribute("content"), b = r.attributeSelector("content"), c = /* @__PURE__ */ new WeakMap(), g = {
|
|
8
|
+
clickOutsideCloses: !0,
|
|
9
|
+
escapeCloses: !0
|
|
10
|
+
};
|
|
11
|
+
function I() {
|
|
12
|
+
r.init({
|
|
13
|
+
key: "trigger",
|
|
14
|
+
withData: !0,
|
|
15
|
+
coreEvents: ["pageModified"],
|
|
16
|
+
setup({ element: t, data: e, initialize: n }) {
|
|
17
|
+
if (c.has(t)) return;
|
|
18
|
+
const o = y(t, e);
|
|
19
|
+
if (!o) {
|
|
20
|
+
r.warn("Unable to resolve popover elements for trigger.", t);
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
const { elements: s, options: i, floatingOptions: a } = o;
|
|
24
|
+
c.set(s, new S(s, i, a)), n();
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
function y(t, e) {
|
|
29
|
+
const n = Object.assign({}, e), o = C(t), s = {
|
|
30
|
+
trigger: t,
|
|
31
|
+
content: o,
|
|
32
|
+
anchor: t.querySelector(d) || t,
|
|
33
|
+
contentArrow: o.querySelector(h)
|
|
34
|
+
}, i = n.floating || {};
|
|
35
|
+
return delete n.floating, o ? { elements: s, options: n, floatingOptions: i } : (r.logError("Unable to make popover for", t), !1);
|
|
36
|
+
}
|
|
37
|
+
function C(t) {
|
|
38
|
+
var o;
|
|
39
|
+
let e;
|
|
40
|
+
const n = t.getAttribute("aria-controls");
|
|
41
|
+
if (n)
|
|
42
|
+
e = document.getElementById(n);
|
|
43
|
+
else if ((o = t == null ? void 0 : t.nextElementSibling) != null && o.hasAttribute(m))
|
|
44
|
+
e = t.nextElementSibling;
|
|
45
|
+
else {
|
|
46
|
+
const s = Array.from(t.parentNode.children), i = s.findIndex((l) => l === t);
|
|
47
|
+
e = s.slice(i).find((l) => l.matches(b));
|
|
48
|
+
}
|
|
49
|
+
return e || r.logError("Unable to resolve 'content' element for popover", t), e;
|
|
50
|
+
}
|
|
51
|
+
class S extends u {
|
|
52
|
+
constructor(e, n, o) {
|
|
53
|
+
const s = Object.assign({}, g, n);
|
|
54
|
+
super(e, s), this.floatingOptions = o || {};
|
|
55
|
+
}
|
|
56
|
+
setState(e, n) {
|
|
57
|
+
super.setState(e, n), this.destroyFloatingInstance(), e && this.createFloatingInstance();
|
|
58
|
+
}
|
|
59
|
+
destroy() {
|
|
60
|
+
super.destroy(), this.destroyFloatingInstance();
|
|
61
|
+
}
|
|
62
|
+
createFloatingInstance() {
|
|
63
|
+
const { content: e, anchor: n, contentArrow: o } = this.elements, s = { trigger: n, contentArrow: o, content: e };
|
|
64
|
+
this.floatingCleanup = f(s, this.floatingOptions);
|
|
65
|
+
}
|
|
66
|
+
destroyFloatingInstance() {
|
|
67
|
+
this.floatingCleanup && (this.floatingCleanup(), this.floatingCleanup = null);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
export {
|
|
71
|
+
S as Popover,
|
|
72
|
+
C as getContentByTrigger,
|
|
73
|
+
I as init,
|
|
74
|
+
r as initializer,
|
|
75
|
+
c as instances,
|
|
76
|
+
y as resolve
|
|
77
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"print-details.d.ts","sourceRoot":"","sources":["../../../lib/js/ui/print-details.js"],"names":[],"mappings":"AAmBA;;;;GAIG;AACH,yCAmBC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { getCoreEventName as n } from "../core/events.js";
|
|
2
|
+
const o = {
|
|
3
|
+
opened: "data-ulu-print-details-opened"
|
|
4
|
+
}, c = (t) => `[${o[t]}]`, d = {
|
|
5
|
+
selector: "details:not([open])"
|
|
6
|
+
};
|
|
7
|
+
function i(t) {
|
|
8
|
+
const r = Object.assign({}, d, t);
|
|
9
|
+
document.addEventListener(n("beforePrint"), () => {
|
|
10
|
+
document.querySelectorAll(r.selector).forEach((e) => {
|
|
11
|
+
e.open || (e.setAttribute(o.opened, !0), e.open = !0);
|
|
12
|
+
});
|
|
13
|
+
}), document.addEventListener(n("afterPrint"), () => {
|
|
14
|
+
document.querySelectorAll(c("opened")).forEach((e) => {
|
|
15
|
+
e.removeAttribute(o.opened), e.open = !1;
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
o as attrs,
|
|
21
|
+
i as init
|
|
22
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"print.d.ts","sourceRoot":"","sources":["../../../lib/js/ui/print.js"],"names":[],"mappings":"AAuBA;;;GAGG;AACH,6BASC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ComponentInitializer as o } from "../core/component.js";
|
|
2
|
+
import { getElement as r } from "@ulu/utils/browser/dom.js";
|
|
3
|
+
import { printElement as l } from "@ulu/utils/browser/print.js";
|
|
4
|
+
const s = new o({
|
|
5
|
+
type: "print",
|
|
6
|
+
baseAttribute: "data-ulu-print"
|
|
7
|
+
}), m = {
|
|
8
|
+
/**
|
|
9
|
+
* Print element/selector
|
|
10
|
+
*/
|
|
11
|
+
element: null
|
|
12
|
+
};
|
|
13
|
+
function u() {
|
|
14
|
+
s.init({
|
|
15
|
+
withData: !0,
|
|
16
|
+
coreEvents: ["pageModified"],
|
|
17
|
+
setup({ element: t, data: n, initialize: e }) {
|
|
18
|
+
p(t, n), e();
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
function p(t, n) {
|
|
23
|
+
const e = Object.assign({}, m, n);
|
|
24
|
+
t.addEventListener("click", () => {
|
|
25
|
+
if (e.element) {
|
|
26
|
+
const i = r(e.element);
|
|
27
|
+
i ? l(i) : console.error("Unable to find element to print", t, e);
|
|
28
|
+
} else
|
|
29
|
+
window.print();
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
u as init
|
|
34
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"programmatic-modal.d.ts","sourceRoot":"","sources":["../../../lib/js/ui/programmatic-modal.js"],"names":[],"mappings":"AAUA;IACE;;;MAGE;IACF,gCAeC;IAbC,aAAsB;IACtB,cAAoB;IACpB,mBAAyB;IAEzB,qCAGC;IACD,2BAEC;IAIH,sBAMC;IACD,gBAMC;IACD;;;;kBAkDC;CACF"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
var p = Object.defineProperty;
|
|
2
|
+
var v = (n, e, t) => e in n ? p(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var a = (n, e, t) => v(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { getCoreEventName as T, dispatchCoreEvent as E } from "../core/events.js";
|
|
5
|
+
import { newId as k } from "../utils/id.js";
|
|
6
|
+
import { buildModal as C } from "./modal-builder.js";
|
|
7
|
+
import { getElement as L } from "@ulu/utils/browser/dom.js";
|
|
8
|
+
const c = class c {
|
|
9
|
+
constructor(e) {
|
|
10
|
+
const t = Object.assign({}, c.defaults, e);
|
|
11
|
+
this.options = t, this.triggers = null, this.cachedTrigger = null, this.triggerListener, this.onTriggerClick = (i) => {
|
|
12
|
+
const r = i.target.closest(t.triggerSelector);
|
|
13
|
+
r && (this.cachedTrigger = r);
|
|
14
|
+
}, this.onPageModified = () => {
|
|
15
|
+
this.setupTriggers();
|
|
16
|
+
}, document.addEventListener(T("pageModified"), this.onPageModified), this.setupTriggers();
|
|
17
|
+
}
|
|
18
|
+
setupTriggers() {
|
|
19
|
+
const { triggerSelector: e, triggerInitAttr: t } = this.options;
|
|
20
|
+
document.querySelectorAll(`${e}:not([${t}])`).forEach((r) => {
|
|
21
|
+
r.addEventListener("click", this.onTriggerClick);
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
destroy() {
|
|
25
|
+
const { triggerSelector: e } = this.options;
|
|
26
|
+
document.querySelectorAll(e).forEach((i) => {
|
|
27
|
+
i.removeEventListener("click", this.onTriggerClick);
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
createAndOpen(e, t) {
|
|
31
|
+
const { noClickTrigger: i, removeOnClose: r, element: u, classes: l } = e, g = L(u);
|
|
32
|
+
g.id || (g.id = k()), l && g.classList.add(...l);
|
|
33
|
+
let o;
|
|
34
|
+
if (i || (o = this.cachedTrigger, this.cachedTrigger = null), !g) {
|
|
35
|
+
console.error("No element found from config.element. ", e);
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
const { modal: s } = C(g, e.modal), d = { trigger: o, modal: s, config: e };
|
|
39
|
+
t && t(d);
|
|
40
|
+
const m = () => {
|
|
41
|
+
r && s.remove(), o && o.focus();
|
|
42
|
+
};
|
|
43
|
+
return s.addEventListener("close", m, { once: !0 }), !r && o && o.addEventListener("click", (f) => {
|
|
44
|
+
f.preventDefault(), s.showModal();
|
|
45
|
+
}), E("pageModified", s), s.showModal(), d;
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
a(c, "defaults", {
|
|
49
|
+
triggerSelector: "[data-ulu-programmatic-modal-trigger]",
|
|
50
|
+
triggerInitAttr: "data-ulu-programmatic-modal-init"
|
|
51
|
+
});
|
|
52
|
+
let h = c;
|
|
53
|
+
export {
|
|
54
|
+
h as ProgrammaticModalManager
|
|
55
|
+
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { ComponentInitializer } from '../core/component.js';
|
|
1
2
|
/**
|
|
2
3
|
* @param {Object} options Change options used as default for dialogs, can then be overridden by data attribute settings on element
|
|
3
4
|
*/
|
|
4
|
-
export function setDefaults(options:
|
|
5
|
+
export function setDefaults(options: Object): void;
|
|
5
6
|
/**
|
|
6
7
|
* Initialize everything in document
|
|
7
8
|
* - This will only initialize elements once, it is safe to call on page changes
|
|
@@ -12,14 +13,14 @@ export function init(): void;
|
|
|
12
13
|
* @param {Node} proxy The container who's click should proxy the click of inner element with options.selector (defaults to [data-ulu-proxy-click-source])
|
|
13
14
|
* @param {Object} userOptions Options to override defaults
|
|
14
15
|
*/
|
|
15
|
-
export function setupProxy(proxy: Node, userOptions:
|
|
16
|
+
export function setupProxy(proxy: Node, userOptions: Object): void;
|
|
16
17
|
/**
|
|
17
18
|
* Main function for attaching behaviors that enable proxy click
|
|
18
19
|
* @param {Node} proxy The container who's click should proxy the click of inner element with options.selector (defaults to [data-ulu-proxy-click-source])
|
|
19
20
|
* @param {Node} child The element who is being proxied and will get clicked if the proxy is clicked (as long as not an interactive element within proxy)
|
|
20
21
|
* @param {Object} config Merged/final options object
|
|
21
22
|
*/
|
|
22
|
-
export function attachHandlers(proxy: Node, child: Node, config:
|
|
23
|
+
export function attachHandlers(proxy: Node, child: Node, config: Object): void;
|
|
23
24
|
/**
|
|
24
25
|
* Proxy Click Component Initializer
|
|
25
26
|
*/
|
|
@@ -30,5 +31,4 @@ export namespace defaults {
|
|
|
30
31
|
let selectorPrevent: string;
|
|
31
32
|
let mousedownDurationPrevent: number;
|
|
32
33
|
}
|
|
33
|
-
import { ComponentInitializer } from "../core/component.js";
|
|
34
34
|
//# sourceMappingURL=proxy-click.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proxy-click.d.ts","sourceRoot":"","sources":["../../../lib/js/ui/proxy-click.js"],"names":[],"mappings":"AAkCA;;GAEG;AACH,qCAFW,MAAM,QAIhB;AACD;;;GAGG;AACH,6BASC;AAED;;;;GAIG;AACH,kCAHW,IAAI,eACJ,MAAM,QAUhB;AAED;;;;;GAKG;AACH,sCAJW,IAAI,SACJ,IAAI,UACJ,MAAM,QAmBhB;AAhFD;;GAEG;AACH,+CAGG;;;;;;;qCARkC,sBAAsB"}
|