@lmvz-ds/components 0.16.0 → 0.17.1
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/cjs/{icons-BOM23oli.js → Effect-DdYOHaR4.js} +153 -889
- package/dist/cjs/app-globals-V2Kpy_OQ.js +0 -3
- package/dist/cjs/aria-loader-BRxRUIyi.js +121 -0
- package/dist/cjs/{assets-XY-cBmal.js → assets-OvQ-WUwR.js} +2 -5
- package/dist/cjs/component-Csg9MtNK.js +140 -0
- package/dist/cjs/element-activation-controller-DC_6T0Rt.js +31 -0
- package/dist/cjs/icons-EHBLbidD.js +653 -0
- package/dist/cjs/{index-ww_DCXU7.js → index-BBqtydE-.js} +426 -431
- package/dist/cjs/index-Bp6Dd2i1.js +94 -0
- package/dist/cjs/{index-B1Puzu82.js → index-CH-YLRgg.js} +650 -10
- package/dist/cjs/index.cjs.js +12 -13
- package/dist/cjs/lmvz-action.cjs.entry.js +2 -5
- package/dist/cjs/lmvz-button.cjs.entry.js +73 -0
- package/dist/cjs/lmvz-card.cjs.entry.js +3 -6
- package/dist/cjs/lmvz-chip.cjs.entry.js +2 -5
- package/dist/cjs/lmvz-components.cjs.js +2 -5
- package/dist/cjs/lmvz-header_2.cjs.entry.js +153 -0
- package/dist/cjs/lmvz-icon.cjs.entry.js +87 -0
- package/dist/cjs/lmvz-input.cjs.entry.js +183 -0
- package/dist/cjs/lmvz-menuitem.cjs.entry.js +36 -0
- package/dist/cjs/lmvz-select.cjs.entry.js +71 -0
- package/dist/cjs/loader.cjs.js +2 -5
- package/dist/cjs/reactive-controller-host-vy1TIIXv.js +189 -0
- package/dist/collection/api/ds.constants.js +0 -1
- package/dist/collection/api/index.js +0 -1
- package/dist/collection/collection-manifest.json +13 -1
- package/dist/collection/components/lmvz-action/lmvz-action.js +1 -2
- package/dist/collection/components/lmvz-button/lmvz-button.css +2 -24
- package/dist/collection/components/lmvz-button/lmvz-button.js +1 -2
- package/dist/collection/components/lmvz-card/lmvz-card.css +2 -24
- package/dist/collection/components/lmvz-card/lmvz-card.js +1 -2
- package/dist/collection/components/lmvz-chip/lmvz-chip.js +1 -2
- package/dist/collection/components/lmvz-header/lmvz-header.js +1 -2
- package/dist/collection/components/lmvz-icon/icons.js +0 -1
- package/dist/collection/components/lmvz-icon/lmvz-icon.js +1 -2
- package/dist/collection/components/lmvz-icon/public.js +0 -1
- package/dist/collection/components/lmvz-icon/test/icons.unit.js +0 -1
- package/dist/collection/components/lmvz-input/lmvz-input.css +2 -24
- package/dist/collection/components/lmvz-input/lmvz-input.js +2 -3
- package/dist/collection/components/lmvz-menuitem/lmvz-menuitem.css +2 -24
- package/dist/collection/components/lmvz-menuitem/lmvz-menuitem.js +1 -2
- package/dist/collection/components/lmvz-select/lmvz-select.css +2 -24
- package/dist/collection/components/lmvz-select/lmvz-select.js +1 -2
- package/dist/collection/index.js +0 -1
- package/dist/collection/integration/header-integration.js +1 -2
- package/dist/collection/utils/aria/aria-validation-controller.js +0 -1
- package/dist/collection/utils/aria/element-activation-controller.js +0 -1
- package/dist/collection/utils/aria/list-keyboard-controller.js +0 -1
- package/dist/collection/utils/assets.js +0 -1
- package/dist/collection/utils/component.js +0 -1
- package/dist/collection/utils/effect.js +0 -1
- package/dist/collection/utils/environment.js +0 -1
- package/dist/collection/utils/http.js +0 -1
- package/dist/collection/utils/http.unit.js +0 -1
- package/dist/collection/utils/public.js +0 -1
- package/dist/collection/utils/reactive-controller-host.js +0 -1
- package/dist/collection/utils/validation/svg.js +0 -1
- package/dist/components/index.d.ts +0 -2
- package/dist/components/index.js +1 -2
- package/dist/components/lmvz-action.js +1 -2
- package/dist/components/lmvz-button.js +1 -2
- package/dist/components/lmvz-card.js +1 -2
- package/dist/components/lmvz-chip.js +1 -2
- package/dist/components/lmvz-header.js +1 -2
- package/dist/components/lmvz-icon.js +1 -2
- package/dist/components/lmvz-input.js +1 -2
- package/dist/components/lmvz-menuitem.js +1 -2
- package/dist/components/lmvz-select.js +1 -2
- package/dist/components/p-BfTCfPZ1.js +2 -3
- package/dist/components/p-BsHYIl56.js +1 -2
- package/dist/components/p-CKtksB0G.js +1 -0
- package/dist/components/p-CN0JX9-m.js +1 -2
- package/dist/components/p-CahBdGGN.js +1 -0
- package/dist/components/p-DQEkWkMh.js +1 -2
- package/dist/components/p-GKEnURpp.js +1 -0
- package/dist/components/p-vIq2biqy.js +2 -3
- package/dist/esm/{icons-D1lxdRXP.js → Effect-9SROYpxM.js} +91 -854
- package/dist/esm/app-globals-DQuL1Twl.js +0 -3
- package/dist/esm/aria-loader-JxXwTAe5.js +114 -0
- package/dist/esm/{assets-BD98wsl7.js → assets-CNHv_WMG.js} +1 -4
- package/dist/esm/component-DIrAQ4IB.js +134 -0
- package/dist/esm/element-activation-controller-CN0JX9-m.js +29 -0
- package/dist/esm/icons-B255FOe4.js +649 -0
- package/dist/esm/{index-DoNkkDv1.js → index-BW1YMEA3.js} +1 -6
- package/dist/esm/index-BfTCfPZ1.js +92 -0
- package/dist/esm/{index-WeqgWisK.js → index-CQb-mBBB.js} +650 -10
- package/dist/esm/index.js +5 -7
- package/dist/esm/lmvz-action.entry.js +2 -5
- package/dist/esm/lmvz-button.entry.js +71 -0
- package/dist/esm/lmvz-card.entry.js +3 -6
- package/dist/esm/lmvz-chip.entry.js +2 -5
- package/dist/esm/lmvz-components.js +3 -6
- package/dist/esm/lmvz-header_2.entry.js +150 -0
- package/dist/esm/lmvz-icon.entry.js +85 -0
- package/dist/esm/lmvz-input.entry.js +181 -0
- package/dist/esm/lmvz-menuitem.entry.js +34 -0
- package/dist/esm/lmvz-select.entry.js +69 -0
- package/dist/esm/loader.js +3 -6
- package/dist/esm/reactive-controller-host-OhKYwMvP.js +186 -0
- package/dist/lmvz-components/index.esm.js +1 -2
- package/dist/lmvz-components/lmvz-components.esm.js +1 -2
- package/dist/lmvz-components/p-150ecfb6.entry.js +1 -0
- package/dist/lmvz-components/p-22f67eff.entry.js +1 -0
- package/dist/lmvz-components/p-4530f088.entry.js +1 -0
- package/dist/lmvz-components/p-47d7ed0e.entry.js +1 -0
- package/dist/lmvz-components/p-5c3f1404.entry.js +1 -0
- package/dist/lmvz-components/p-8d51e396.entry.js +1 -0
- package/dist/lmvz-components/p-9SROYpxM.js +1 -0
- package/dist/lmvz-components/p-BfTCfPZ1.js +6 -0
- package/dist/lmvz-components/p-Bx29-tJt.js +1 -0
- package/dist/lmvz-components/p-CN0JX9-m.js +1 -0
- package/dist/lmvz-components/p-CQb-mBBB.js +2 -0
- package/dist/lmvz-components/p-Cp76bcGb.js +1 -0
- package/dist/lmvz-components/p-Cp7cp10e.js +12 -0
- package/dist/lmvz-components/p-DIrAQ4IB.js +1 -0
- package/dist/lmvz-components/p-DQuL1Twl.js +1 -2
- package/dist/lmvz-components/p-DyO6wO4l.js +1 -0
- package/dist/lmvz-components/p-b8926640.entry.js +1 -0
- package/dist/lmvz-components/p-b9d1953f.entry.js +1 -0
- package/dist/lmvz-components/p-d9c3f542.entry.js +1 -0
- package/dist/lmvz-components/p-i2508Ct1.js +1 -0
- package/dist/manifest.json +11 -47
- package/dist/stencil.config.base.js +0 -1
- package/dist/stencil.config.dev.js +0 -1
- package/dist/stencil.config.integration.js +0 -1
- package/dist/stencil.config.js +0 -1
- package/dist/stencil.config.prod.js +0 -1
- package/dist/types/components.d.ts +0 -18
- package/hydrate/index.js +11 -11
- package/hydrate/index.mjs +11 -11
- package/package.json +4 -4
- package/readme.md +1 -1
- package/dist/cjs/app-globals-V2Kpy_OQ.js.map +0 -1
- package/dist/cjs/assets-XY-cBmal.js.map +0 -1
- package/dist/cjs/header-integration_7.cjs.entry.js +0 -1024
- package/dist/cjs/header-integration_7.cjs.entry.js.map +0 -1
- package/dist/cjs/icons-BOM23oli.js.map +0 -1
- package/dist/cjs/index-B1Puzu82.js.map +0 -1
- package/dist/cjs/index-ww_DCXU7.js.map +0 -1
- package/dist/cjs/index.cjs.js.map +0 -1
- package/dist/cjs/lmvz-action.cjs.entry.js.map +0 -1
- package/dist/cjs/lmvz-card.cjs.entry.js.map +0 -1
- package/dist/cjs/lmvz-chip.cjs.entry.js.map +0 -1
- package/dist/cjs/lmvz-components.cjs.js.map +0 -1
- package/dist/cjs/loader.cjs.js.map +0 -1
- package/dist/collection/api/ds.constants.js.map +0 -1
- package/dist/collection/api/index.js.map +0 -1
- package/dist/collection/components/lmvz-action/lmvz-action.js.map +0 -1
- package/dist/collection/components/lmvz-button/lmvz-button.js.map +0 -1
- package/dist/collection/components/lmvz-card/lmvz-card.js.map +0 -1
- package/dist/collection/components/lmvz-chip/lmvz-chip.js.map +0 -1
- package/dist/collection/components/lmvz-header/lmvz-header.js.map +0 -1
- package/dist/collection/components/lmvz-icon/icons.js.map +0 -1
- package/dist/collection/components/lmvz-icon/lmvz-icon.js.map +0 -1
- package/dist/collection/components/lmvz-icon/public.js.map +0 -1
- package/dist/collection/components/lmvz-icon/test/icons.unit.js.map +0 -1
- package/dist/collection/components/lmvz-input/lmvz-input.js.map +0 -1
- package/dist/collection/components/lmvz-menuitem/lmvz-menuitem.js.map +0 -1
- package/dist/collection/components/lmvz-select/lmvz-select.js.map +0 -1
- package/dist/collection/index.js.map +0 -1
- package/dist/collection/integration/header-integration.js.map +0 -1
- package/dist/collection/utils/aria/aria-validation-controller.js.map +0 -1
- package/dist/collection/utils/aria/element-activation-controller.js.map +0 -1
- package/dist/collection/utils/aria/list-keyboard-controller.js.map +0 -1
- package/dist/collection/utils/assets.js.map +0 -1
- package/dist/collection/utils/component.js.map +0 -1
- package/dist/collection/utils/effect.js.map +0 -1
- package/dist/collection/utils/environment.js.map +0 -1
- package/dist/collection/utils/http.js.map +0 -1
- package/dist/collection/utils/http.unit.js.map +0 -1
- package/dist/collection/utils/public.js.map +0 -1
- package/dist/collection/utils/reactive-controller-host.js.map +0 -1
- package/dist/collection/utils/validation/svg.js.map +0 -1
- package/dist/components/header-integration.d.ts +0 -11
- package/dist/components/header-integration.js +0 -2
- package/dist/components/header-integration.js.map +0 -1
- package/dist/components/index.js.map +0 -1
- package/dist/components/lmvz-action.js.map +0 -1
- package/dist/components/lmvz-button.js.map +0 -1
- package/dist/components/lmvz-card.js.map +0 -1
- package/dist/components/lmvz-chip.js.map +0 -1
- package/dist/components/lmvz-header.js.map +0 -1
- package/dist/components/lmvz-icon.js.map +0 -1
- package/dist/components/lmvz-input.js.map +0 -1
- package/dist/components/lmvz-menuitem.js.map +0 -1
- package/dist/components/lmvz-select.js.map +0 -1
- package/dist/components/p-B2g3aN-E.js +0 -2
- package/dist/components/p-B2g3aN-E.js.map +0 -1
- package/dist/components/p-BXdOuZTp.js +0 -2
- package/dist/components/p-BXdOuZTp.js.map +0 -1
- package/dist/components/p-BfTCfPZ1.js.map +0 -1
- package/dist/components/p-BpCjj39Z.js +0 -2
- package/dist/components/p-BpCjj39Z.js.map +0 -1
- package/dist/components/p-BsHYIl56.js.map +0 -1
- package/dist/components/p-C5rqq3bf.js +0 -2
- package/dist/components/p-C5rqq3bf.js.map +0 -1
- package/dist/components/p-CI0tffvo.js +0 -2
- package/dist/components/p-CI0tffvo.js.map +0 -1
- package/dist/components/p-CN0JX9-m.js.map +0 -1
- package/dist/components/p-ClmDNIy4.js +0 -2
- package/dist/components/p-ClmDNIy4.js.map +0 -1
- package/dist/components/p-DQEkWkMh.js.map +0 -1
- package/dist/components/p-X5fEFT9T.js +0 -2
- package/dist/components/p-X5fEFT9T.js.map +0 -1
- package/dist/components/p-vIq2biqy.js.map +0 -1
- package/dist/esm/app-globals-DQuL1Twl.js.map +0 -1
- package/dist/esm/assets-BD98wsl7.js.map +0 -1
- package/dist/esm/header-integration_7.entry.js +0 -1016
- package/dist/esm/header-integration_7.entry.js.map +0 -1
- package/dist/esm/icons-D1lxdRXP.js.map +0 -1
- package/dist/esm/index-DoNkkDv1.js.map +0 -1
- package/dist/esm/index-WeqgWisK.js.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/lmvz-action.entry.js.map +0 -1
- package/dist/esm/lmvz-card.entry.js.map +0 -1
- package/dist/esm/lmvz-chip.entry.js.map +0 -1
- package/dist/esm/lmvz-components.js.map +0 -1
- package/dist/esm/loader.js.map +0 -1
- package/dist/lmvz-components/index.esm.js.map +0 -1
- package/dist/lmvz-components/lmvz-components.esm.js.map +0 -1
- package/dist/lmvz-components/p-33485219.entry.js +0 -2
- package/dist/lmvz-components/p-33485219.entry.js.map +0 -1
- package/dist/lmvz-components/p-76032c32.entry.js +0 -2
- package/dist/lmvz-components/p-76032c32.entry.js.map +0 -1
- package/dist/lmvz-components/p-7aeec9a8.entry.js +0 -7
- package/dist/lmvz-components/p-7aeec9a8.entry.js.map +0 -1
- package/dist/lmvz-components/p-84e0a9dd.entry.js +0 -2
- package/dist/lmvz-components/p-84e0a9dd.entry.js.map +0 -1
- package/dist/lmvz-components/p-CkJb8WVZ.js +0 -2
- package/dist/lmvz-components/p-CkJb8WVZ.js.map +0 -1
- package/dist/lmvz-components/p-DQuL1Twl.js.map +0 -1
- package/dist/lmvz-components/p-WeqgWisK.js +0 -3
- package/dist/lmvz-components/p-WeqgWisK.js.map +0 -1
- package/dist/lmvz-components/p-Z9X0_ik0.js +0 -2
- package/dist/lmvz-components/p-Z9X0_ik0.js.map +0 -1
- package/dist/lmvz-components/p-eP0oxQ44.js +0 -13
- package/dist/lmvz-components/p-eP0oxQ44.js.map +0 -1
- package/dist/stencil.config.base.js.map +0 -1
- package/dist/stencil.config.dev.js.map +0 -1
- package/dist/stencil.config.integration.js.map +0 -1
- package/dist/stencil.config.js.map +0 -1
- package/dist/stencil.config.prod.js.map +0 -1
- package/dist/types/integration/header-integration.d.ts +0 -5
- /package/dist/types/{Users/patrick.nemenz/workspace/lmvz/lmvz-ds → opt/atlassian/pipelines/agent/build}/packages/components/.stencil/stencil.config.base.d.ts +0 -0
- /package/dist/types/{Users/patrick.nemenz/workspace/lmvz/lmvz-ds → opt/atlassian/pipelines/agent/build}/packages/components/.stencil/stencil.config.d.ts +0 -0
- /package/dist/types/{Users/patrick.nemenz/workspace/lmvz/lmvz-ds → opt/atlassian/pipelines/agent/build}/packages/components/.stencil/stencil.config.dev.d.ts +0 -0
- /package/dist/types/{Users/patrick.nemenz/workspace/lmvz/lmvz-ds → opt/atlassian/pipelines/agent/build}/packages/components/.stencil/stencil.config.integration.d.ts +0 -0
- /package/dist/types/{Users/patrick.nemenz/workspace/lmvz/lmvz-ds → opt/atlassian/pipelines/agent/build}/packages/components/.stencil/stencil.config.prod.d.ts +0 -0
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Verify whether a value is a Promise by duck-testing for a 'then' function
|
|
5
|
+
*/
|
|
6
|
+
function isPromise(value) {
|
|
7
|
+
if (!value)
|
|
8
|
+
return false;
|
|
9
|
+
return typeof value === 'object' && typeof value.then === 'function';
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Resolve the result of a function that may be async or not, as a Promise.
|
|
14
|
+
*/
|
|
15
|
+
function resolvePossiblyAsyncFunction(func, args = []) {
|
|
16
|
+
const res = func(...args);
|
|
17
|
+
if (isPromise(res)) {
|
|
18
|
+
return res;
|
|
19
|
+
}
|
|
20
|
+
return Promise.resolve(res);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const GLOBAL_STATE_KEY = Symbol('__lmvzAriaValidationRuntimeState');
|
|
24
|
+
const ARIA_VALIDATION_RUNTIME_CHANGED_EVENT = 'lmvz:aria-validation-runtime-changed';
|
|
25
|
+
function getRuntimeState() {
|
|
26
|
+
const globalState = globalThis;
|
|
27
|
+
if (!globalState[GLOBAL_STATE_KEY]) {
|
|
28
|
+
globalState[GLOBAL_STATE_KEY] = {
|
|
29
|
+
enabled: false,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
return globalState[GLOBAL_STATE_KEY];
|
|
33
|
+
}
|
|
34
|
+
function notifyRuntimeChange() {
|
|
35
|
+
if (typeof window === 'undefined')
|
|
36
|
+
return;
|
|
37
|
+
window.dispatchEvent(new CustomEvent(ARIA_VALIDATION_RUNTIME_CHANGED_EVENT));
|
|
38
|
+
}
|
|
39
|
+
async function fetchRuntime() {
|
|
40
|
+
const state = getRuntimeState();
|
|
41
|
+
if (!state.enabled)
|
|
42
|
+
return null;
|
|
43
|
+
if (state.runtime)
|
|
44
|
+
return state.runtime;
|
|
45
|
+
if (!state.loadPromise) {
|
|
46
|
+
state.loadPromise = Promise.resolve().then(function () { return require('./index-BBqtydE-.js'); }).catch(() => null);
|
|
47
|
+
}
|
|
48
|
+
const runtime = await state.loadPromise;
|
|
49
|
+
if (runtime) {
|
|
50
|
+
state.runtime = runtime;
|
|
51
|
+
}
|
|
52
|
+
return runtime;
|
|
53
|
+
}
|
|
54
|
+
async function initializeValidation(...args) {
|
|
55
|
+
const runtime = await fetchRuntime();
|
|
56
|
+
const s = getRuntimeState();
|
|
57
|
+
if (!s.enabled)
|
|
58
|
+
return;
|
|
59
|
+
if (!runtime) {
|
|
60
|
+
console.warn('Failed to load aria validation runtime');
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
runtime.initializeValidationStream(...args);
|
|
64
|
+
}
|
|
65
|
+
const isAriaValidationEnabled = () => getRuntimeState().enabled;
|
|
66
|
+
const useVerboseLogging = () => getRuntimeState().verboseLogging ?? false;
|
|
67
|
+
const enableAriaValidation = (options = {}) => {
|
|
68
|
+
const state = getRuntimeState();
|
|
69
|
+
if (state.enabled)
|
|
70
|
+
return;
|
|
71
|
+
Object.assign(state, options);
|
|
72
|
+
state.enabled = true;
|
|
73
|
+
initializeValidation().then(() => {
|
|
74
|
+
notifyRuntimeChange();
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
const disableAriaValidation = () => {
|
|
78
|
+
const state = getRuntimeState();
|
|
79
|
+
if (!state.enabled)
|
|
80
|
+
return;
|
|
81
|
+
state.enabled = false;
|
|
82
|
+
notifyRuntimeChange();
|
|
83
|
+
};
|
|
84
|
+
function queueValidation(...args) {
|
|
85
|
+
const { enabled, runtime, loadPromise, lazyCondition } = getRuntimeState();
|
|
86
|
+
if (!enabled)
|
|
87
|
+
return;
|
|
88
|
+
if (!lazyCondition)
|
|
89
|
+
return q();
|
|
90
|
+
resolvePossiblyAsyncFunction(lazyCondition).then((shouldEnqueue) => {
|
|
91
|
+
if (!shouldEnqueue)
|
|
92
|
+
return;
|
|
93
|
+
q();
|
|
94
|
+
});
|
|
95
|
+
function q() {
|
|
96
|
+
if (runtime)
|
|
97
|
+
return runtime.enqueueValidation(...args);
|
|
98
|
+
if (!loadPromise) {
|
|
99
|
+
console.warn('neither runtime nor load promise found for aria validation. This should not happen, as enabling aria validation should have triggered the loading of the runtime.');
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
loadPromise
|
|
103
|
+
.then((loadedRuntime) => {
|
|
104
|
+
if (!loadedRuntime?.enqueueValidation) {
|
|
105
|
+
console.error('Failed to load aria validation runtime');
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
loadedRuntime.enqueueValidation(...args);
|
|
109
|
+
})
|
|
110
|
+
.catch(() => {
|
|
111
|
+
console.error('Failed to enqueue validation due to an error while loading the runtime');
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
exports.ARIA_VALIDATION_RUNTIME_CHANGED_EVENT = ARIA_VALIDATION_RUNTIME_CHANGED_EVENT;
|
|
117
|
+
exports.disableAriaValidation = disableAriaValidation;
|
|
118
|
+
exports.enableAriaValidation = enableAriaValidation;
|
|
119
|
+
exports.isAriaValidationEnabled = isAriaValidationEnabled;
|
|
120
|
+
exports.queueValidation = queueValidation;
|
|
121
|
+
exports.useVerboseLogging = useVerboseLogging;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-CH-YLRgg.js');
|
|
4
4
|
|
|
5
5
|
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
6
6
|
function getLocationBase() {
|
|
7
|
-
return (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('assets-
|
|
7
|
+
return (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('assets-OvQ-WUwR.js', document.baseURI).href)) ?? window?.location?.origin ?? '';
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
const relativeAssetsPath = '../../assets';
|
|
@@ -24,6 +24,3 @@ function joinPath(...parts) {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
exports.createAssetUrlSafely = createAssetUrlSafely;
|
|
27
|
-
//# sourceMappingURL=assets-XY-cBmal.js.map
|
|
28
|
-
|
|
29
|
-
//# sourceMappingURL=assets-XY-cBmal.js.map
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const componentOnReady = (el, callback) => {
|
|
4
|
+
if (el.componentOnReady) {
|
|
5
|
+
el.componentOnReady().then((resolvedEl) => callback(resolvedEl));
|
|
6
|
+
}
|
|
7
|
+
else {
|
|
8
|
+
raf(() => callback(el));
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
const inheritAttributes = (el, attributes = []) => {
|
|
12
|
+
const attributeObject = {};
|
|
13
|
+
attributes.forEach((attr) => {
|
|
14
|
+
if (el.hasAttribute(attr)) {
|
|
15
|
+
const value = el.getAttribute(attr);
|
|
16
|
+
if (value !== null) {
|
|
17
|
+
attributeObject[attr] = el.getAttribute(attr);
|
|
18
|
+
}
|
|
19
|
+
el.removeAttribute(attr);
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
return attributeObject;
|
|
23
|
+
};
|
|
24
|
+
const ariaAttributes = [
|
|
25
|
+
'role',
|
|
26
|
+
'aria-activedescendant',
|
|
27
|
+
'aria-atomic',
|
|
28
|
+
'aria-autocomplete',
|
|
29
|
+
'aria-braillelabel',
|
|
30
|
+
'aria-brailleroledescription',
|
|
31
|
+
'aria-busy',
|
|
32
|
+
'aria-checked',
|
|
33
|
+
'aria-colcount',
|
|
34
|
+
'aria-colindex',
|
|
35
|
+
'aria-colindextext',
|
|
36
|
+
'aria-colspan',
|
|
37
|
+
'aria-controls',
|
|
38
|
+
'aria-current',
|
|
39
|
+
'aria-describedby',
|
|
40
|
+
'aria-description',
|
|
41
|
+
'aria-details',
|
|
42
|
+
'aria-disabled',
|
|
43
|
+
'aria-errormessage',
|
|
44
|
+
'aria-expanded',
|
|
45
|
+
'aria-flowto',
|
|
46
|
+
'aria-haspopup',
|
|
47
|
+
'aria-hidden',
|
|
48
|
+
'aria-invalid',
|
|
49
|
+
'aria-keyshortcuts',
|
|
50
|
+
'aria-label',
|
|
51
|
+
'aria-labelledby',
|
|
52
|
+
'aria-level',
|
|
53
|
+
'aria-live',
|
|
54
|
+
'aria-multiline',
|
|
55
|
+
'aria-multiselectable',
|
|
56
|
+
'aria-orientation',
|
|
57
|
+
'aria-owns',
|
|
58
|
+
'aria-placeholder',
|
|
59
|
+
'aria-posinset',
|
|
60
|
+
'aria-pressed',
|
|
61
|
+
'aria-readonly',
|
|
62
|
+
'aria-relevant',
|
|
63
|
+
'aria-required',
|
|
64
|
+
'aria-roledescription',
|
|
65
|
+
'aria-rowcount',
|
|
66
|
+
'aria-rowindex',
|
|
67
|
+
'aria-rowindextext',
|
|
68
|
+
'aria-rowspan',
|
|
69
|
+
'aria-selected',
|
|
70
|
+
'aria-setsize',
|
|
71
|
+
'aria-sort',
|
|
72
|
+
'aria-valuemax',
|
|
73
|
+
'aria-valuemin',
|
|
74
|
+
'aria-valuenow',
|
|
75
|
+
'aria-valuetext',
|
|
76
|
+
];
|
|
77
|
+
const inheritAriaAttributes = (el, ignoreList) => {
|
|
78
|
+
let attributesToInherit = ariaAttributes;
|
|
79
|
+
return inheritAttributes(el, attributesToInherit);
|
|
80
|
+
};
|
|
81
|
+
const raf = (h) => {
|
|
82
|
+
if (typeof __zone_symbol__requestAnimationFrame === 'function') {
|
|
83
|
+
return __zone_symbol__requestAnimationFrame(h);
|
|
84
|
+
}
|
|
85
|
+
if (typeof requestAnimationFrame === 'function') {
|
|
86
|
+
return requestAnimationFrame(h);
|
|
87
|
+
}
|
|
88
|
+
return setTimeout(h);
|
|
89
|
+
};
|
|
90
|
+
function getDeepActiveElement(root = document) {
|
|
91
|
+
let activeElement = root.activeElement;
|
|
92
|
+
if (!activeElement) {
|
|
93
|
+
return null;
|
|
94
|
+
}
|
|
95
|
+
while (activeElement?.shadowRoot) {
|
|
96
|
+
const next = activeElement.shadowRoot.activeElement;
|
|
97
|
+
if (!next) {
|
|
98
|
+
break;
|
|
99
|
+
}
|
|
100
|
+
activeElement = next;
|
|
101
|
+
}
|
|
102
|
+
return activeElement;
|
|
103
|
+
}
|
|
104
|
+
function canReceiveFocus(el) {
|
|
105
|
+
if (!el)
|
|
106
|
+
return false;
|
|
107
|
+
return (el instanceof HTMLElement && el.tabIndex >= 0 && !el.hasAttribute('disabled') && el.getAttribute('aria-hidden') !== 'true' && el.checkVisibility() && el.offsetParent !== null);
|
|
108
|
+
}
|
|
109
|
+
function findFormByRef(form, el) {
|
|
110
|
+
if (form instanceof HTMLFormElement) {
|
|
111
|
+
return form;
|
|
112
|
+
}
|
|
113
|
+
if (typeof form === 'string') {
|
|
114
|
+
const el = document.getElementById(form);
|
|
115
|
+
if (el) {
|
|
116
|
+
if (el instanceof HTMLFormElement) {
|
|
117
|
+
return el;
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
console.warn(`No Form found with selector: "#${form}". Verify that the element with id exists and is actually a <form> element.`, el);
|
|
121
|
+
return null;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
console.warn(`No Form found with selector: "#${form}". Verify that the id is correct and the form is rendered in the DOM.`, el);
|
|
126
|
+
return null;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
if (form !== undefined) {
|
|
130
|
+
console.warn(`The provided "form" element is invalid. Verify that the form is a HTMLFormElement and rendered in the DOM.`, el);
|
|
131
|
+
return null;
|
|
132
|
+
}
|
|
133
|
+
return el.closest('form');
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
exports.canReceiveFocus = canReceiveFocus;
|
|
137
|
+
exports.componentOnReady = componentOnReady;
|
|
138
|
+
exports.findFormByRef = findFormByRef;
|
|
139
|
+
exports.getDeepActiveElement = getDeepActiveElement;
|
|
140
|
+
exports.inheritAriaAttributes = inheritAriaAttributes;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
class ElementActivationController {
|
|
4
|
+
host;
|
|
5
|
+
config;
|
|
6
|
+
constructor(host, config) {
|
|
7
|
+
this.host = host;
|
|
8
|
+
this.config = config;
|
|
9
|
+
}
|
|
10
|
+
hostDidLoad() {
|
|
11
|
+
if (!this.host.el.hasAttribute('tabindex')) {
|
|
12
|
+
console.warn('Interactive element does not have a tabindex attribute!', this.host.el);
|
|
13
|
+
}
|
|
14
|
+
this.host.el.addEventListener('keydown', this.handleKeyDown.bind(this));
|
|
15
|
+
this.host.el.addEventListener('click', this.handleActivation.bind(this));
|
|
16
|
+
}
|
|
17
|
+
handleKeyDown = (event) => {
|
|
18
|
+
if ((this.config?.keys ?? ['Enter', ' ']).includes(event.key)) {
|
|
19
|
+
event.preventDefault();
|
|
20
|
+
this.handleActivation(event);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
handleActivation = (event) => {
|
|
24
|
+
this.host.lmvzActivation.emit();
|
|
25
|
+
if (this.config?.localHandler) {
|
|
26
|
+
this.config.localHandler(event);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
exports.ElementActivationController = ElementActivationController;
|