@limetech/lime-elements 39.0.4 → 39.1.0
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/CHANGELOG.md +12 -0
- package/dist/cjs/index-nxo2UO7I.js +20355 -0
- package/dist/cjs/lime-elements.cjs.js +1 -1
- package/dist/cjs/limel-action-bar_2.cjs.entry.js +4 -4
- package/dist/cjs/limel-ai-avatar.cjs.entry.js +1 -1
- package/dist/cjs/limel-breadcrumbs_7.cjs.entry.js +6 -6
- package/dist/cjs/limel-callout.cjs.entry.js +1 -1
- package/dist/cjs/limel-chart.cjs.entry.js +1 -1
- package/dist/cjs/limel-chip_2.cjs.entry.js +1 -1
- package/dist/cjs/limel-code-editor.cjs.entry.js +1 -1
- package/dist/cjs/limel-collapsible-section.cjs.entry.js +1 -1
- package/dist/cjs/limel-drag-handle.cjs.entry.js +1 -1
- package/dist/cjs/limel-email-viewer.cjs.entry.js +351 -0
- package/dist/cjs/limel-file-dropzone_2.cjs.entry.js +2 -2
- package/dist/cjs/limel-file-viewer.cjs.entry.js +4967 -26
- package/dist/cjs/limel-file.cjs.entry.js +2 -2
- package/dist/cjs/limel-flatpickr-adapter.cjs.entry.js +1 -1
- package/dist/cjs/limel-flex-container.cjs.entry.js +1 -1
- package/dist/cjs/limel-form.cjs.entry.js +1 -1
- package/dist/cjs/limel-grid.cjs.entry.js +1 -1
- package/dist/cjs/limel-header.cjs.entry.js +1 -1
- package/dist/cjs/limel-help-content.cjs.entry.js +1 -1
- package/dist/cjs/limel-help.cjs.entry.js +2 -2
- package/dist/cjs/limel-helper-line_2.cjs.entry.js +3 -3
- package/dist/cjs/limel-icon-button.cjs.entry.js +1 -1
- package/dist/cjs/limel-icon.cjs.entry.js +1 -1
- package/dist/cjs/limel-info-tile.cjs.entry.js +2 -2
- package/dist/cjs/limel-linear-progress.cjs.entry.js +1 -1
- package/dist/cjs/limel-list-item.cjs.entry.js +3 -3
- package/dist/cjs/limel-markdown.cjs.entry.js +3 -2
- package/dist/cjs/limel-menu-item-meta.cjs.entry.js +1 -1
- package/dist/cjs/limel-picker.cjs.entry.js +1 -1
- package/dist/cjs/limel-popover_2.cjs.entry.js +2 -2
- package/dist/cjs/limel-portal_3.cjs.entry.js +4 -4
- package/dist/cjs/limel-profile-picture.cjs.entry.js +1 -1
- package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +15 -14
- package/dist/cjs/limel-radio-button-group.cjs.entry.js +1 -1
- package/dist/cjs/limel-radio-button.cjs.entry.js +2 -2
- package/dist/cjs/limel-select.cjs.entry.js +1 -1
- package/dist/cjs/limel-shortcut.cjs.entry.js +1 -1
- package/dist/cjs/limel-slider.cjs.entry.js +1 -1
- package/dist/cjs/limel-snackbar.cjs.entry.js +3 -3
- package/dist/cjs/limel-split-button.cjs.entry.js +2 -2
- package/dist/cjs/limel-tab-bar.cjs.entry.js +2 -2
- package/dist/cjs/limel-tab-panel.cjs.entry.js +1 -1
- package/dist/cjs/limel-table.cjs.entry.js +4 -4
- package/dist/cjs/limel-text-editor.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{markdown-parser-_1bsy-5h.js → markdown-parser-B66l_Zvo.js} +20342 -40680
- package/dist/cjs/{translations-BIHr3B9O.js → translations-B0hzD08N.js} +112 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/email-viewer/email-loader.js +206 -0
- package/dist/collection/components/email-viewer/email-viewer.css +293 -0
- package/dist/collection/components/email-viewer/email-viewer.js +294 -0
- package/dist/collection/components/email-viewer/email-viewer.types.js +1 -0
- package/dist/collection/components/email-viewer/remote-images.js +50 -0
- package/dist/collection/components/email-viewer/sanitize-email-html.js +245 -0
- package/dist/collection/components/email-viewer/split-email-address-list.js +106 -0
- package/dist/collection/components/file/file.js +1 -1
- package/dist/collection/components/file-dropzone/file-dropzone.js +1 -1
- package/dist/collection/components/file-input/file-input.js +1 -1
- package/dist/collection/components/file-viewer/extension-mapping.js +1 -0
- package/dist/collection/components/file-viewer/file-viewer.js +54 -7
- package/dist/collection/components/flex-container/flex-container.js +1 -1
- package/dist/collection/components/form/form.js +1 -1
- package/dist/collection/components/grid/grid.js +1 -1
- package/dist/collection/components/header/header.js +1 -1
- package/dist/collection/components/help/help-content.js +1 -1
- package/dist/collection/components/help/help.js +2 -2
- package/dist/collection/components/helper-line/helper-line.js +2 -2
- package/dist/collection/components/icon/icon.js +1 -1
- package/dist/collection/components/icon-button/icon-button.js +1 -1
- package/dist/collection/components/info-tile/info-tile.js +2 -2
- package/dist/collection/components/input-field/input-field.js +1 -1
- package/dist/collection/components/list/list.js +1 -1
- package/dist/collection/components/list-item/list-item.js +2 -2
- package/dist/collection/components/list-item/menu-item-meta/menu-item-meta.js +1 -1
- package/dist/collection/components/markdown/markdown.js +1 -1
- package/dist/collection/components/menu/menu.js +1 -1
- package/dist/collection/components/menu-list/menu-list.js +1 -1
- package/dist/collection/components/menu-surface/menu-surface.js +1 -1
- package/dist/collection/components/notched-outline/notched-outline.js +1 -1
- package/dist/collection/components/picker/picker.js +1 -1
- package/dist/collection/components/popover/popover.js +1 -1
- package/dist/collection/components/popover-surface/popover-surface.js +1 -1
- package/dist/collection/components/portal/portal.js +1 -1
- package/dist/collection/components/radio-button-group/radio-button-group.js +1 -1
- package/dist/collection/components/radio-button-group/radio-button.js +2 -2
- package/dist/collection/components/select/select.js +1 -1
- package/dist/collection/components/shortcut/shortcut.js +1 -1
- package/dist/collection/components/slider/slider.js +1 -1
- package/dist/collection/components/snackbar/snackbar.js +2 -2
- package/dist/collection/components/spinner/spinner.js +1 -1
- package/dist/collection/components/split-button/split-button.js +2 -2
- package/dist/collection/components/tab-bar/tab-bar.js +2 -2
- package/dist/collection/components/tab-panel/tab-panel.js +1 -1
- package/dist/collection/components/table/table.js +3 -3
- package/dist/collection/components/text-editor/link-menu/editor-link-menu.js +3 -3
- package/dist/collection/components/text-editor/prosemirror-adapter/prosemirror-adapter.js +1 -1
- package/dist/collection/components/text-editor/text-editor.js +1 -1
- package/dist/collection/components/tooltip/tooltip-content.js +1 -1
- package/dist/collection/components/tooltip/tooltip.js +2 -2
- package/dist/collection/interface.js +1 -0
- package/dist/collection/translations/da.js +14 -0
- package/dist/collection/translations/de.js +14 -0
- package/dist/collection/translations/en.js +14 -0
- package/dist/collection/translations/fi.js +14 -0
- package/dist/collection/translations/fr.js +14 -0
- package/dist/collection/translations/nl.js +14 -0
- package/dist/collection/translations/no.js +14 -0
- package/dist/collection/translations/sv.js +14 -0
- package/dist/collection/util/format-bytes.js +38 -0
- package/dist/esm/{file-metadata-D5joHaqk.js → file-metadata-BwF9vTXN.js} +1 -1
- package/dist/esm/{files-CkgibGPZ.js → files-P324wLau.js} +1 -1
- package/dist/esm/{get-icon-props-COzG_Mhw.js → get-icon-props-CgNJbSP4.js} +1 -1
- package/dist/esm/index-CJ0GYrWG.js +20341 -0
- package/dist/esm/lime-elements.js +1 -1
- package/dist/esm/limel-action-bar-item_2.entry.js +1 -1
- package/dist/esm/limel-action-bar_2.entry.js +4 -4
- package/dist/esm/limel-ai-avatar.entry.js +1 -1
- package/dist/esm/limel-breadcrumbs_7.entry.js +7 -7
- package/dist/esm/limel-button.entry.js +1 -1
- package/dist/esm/limel-callout.entry.js +1 -1
- package/dist/esm/limel-card.entry.js +1 -1
- package/dist/esm/limel-chart.entry.js +1 -1
- package/dist/esm/limel-chip_2.entry.js +2 -2
- package/dist/esm/limel-code-editor.entry.js +1 -1
- package/dist/esm/limel-collapsible-section.entry.js +2 -2
- package/dist/esm/limel-drag-handle.entry.js +1 -1
- package/dist/esm/limel-dynamic-label.entry.js +1 -1
- package/dist/esm/limel-email-viewer.entry.js +349 -0
- package/dist/esm/limel-file-dropzone_2.entry.js +5 -5
- package/dist/esm/limel-file-viewer.entry.js +4948 -7
- package/dist/esm/limel-file.entry.js +4 -4
- package/dist/esm/limel-flatpickr-adapter.entry.js +1 -1
- package/dist/esm/limel-flex-container.entry.js +1 -1
- package/dist/esm/limel-form.entry.js +1 -1
- package/dist/esm/limel-grid.entry.js +1 -1
- package/dist/esm/limel-header.entry.js +2 -2
- package/dist/esm/limel-help-content.entry.js +1 -1
- package/dist/esm/limel-help.entry.js +2 -2
- package/dist/esm/limel-helper-line_2.entry.js +3 -3
- package/dist/esm/limel-icon-button.entry.js +2 -2
- package/dist/esm/limel-icon.entry.js +1 -1
- package/dist/esm/limel-info-tile.entry.js +2 -2
- package/dist/esm/limel-linear-progress.entry.js +1 -1
- package/dist/esm/limel-list-item.entry.js +4 -4
- package/dist/esm/limel-markdown.entry.js +3 -2
- package/dist/esm/limel-menu-item-meta.entry.js +1 -1
- package/dist/esm/limel-picker.entry.js +2 -2
- package/dist/esm/limel-popover_2.entry.js +2 -2
- package/dist/esm/limel-portal_3.entry.js +4 -4
- package/dist/esm/limel-profile-picture.entry.js +4 -4
- package/dist/esm/limel-progress-flow-item.entry.js +1 -1
- package/dist/esm/limel-progress-flow.entry.js +1 -1
- package/dist/esm/limel-prosemirror-adapter.entry.js +7 -6
- package/dist/esm/limel-radio-button-group.entry.js +1 -1
- package/dist/esm/limel-radio-button.entry.js +2 -2
- package/dist/esm/limel-select.entry.js +2 -2
- package/dist/esm/limel-shortcut.entry.js +1 -1
- package/dist/esm/limel-slider.entry.js +1 -1
- package/dist/esm/limel-snackbar.entry.js +3 -3
- package/dist/esm/limel-split-button.entry.js +2 -2
- package/dist/esm/limel-tab-bar.entry.js +3 -3
- package/dist/esm/limel-tab-panel.entry.js +1 -1
- package/dist/esm/limel-table.entry.js +4 -4
- package/dist/esm/limel-text-editor.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{markdown-parser-DkmQCwAi.js → markdown-parser-DJi1w622.js} +20287 -40624
- package/dist/esm/{translations-6rJPElLH.js → translations-Cdx3I2X8.js} +112 -0
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/{p-927622ec.entry.js → p-00fdb26c.entry.js} +1 -1
- package/dist/lime-elements/{p-880b9683.entry.js → p-1244d687.entry.js} +2 -2
- package/dist/lime-elements/p-1d71e9c8.entry.js +1 -0
- package/dist/lime-elements/p-21aef7f4.entry.js +1 -0
- package/dist/lime-elements/{p-68f49d6f.entry.js → p-278356b3.entry.js} +1 -1
- package/dist/lime-elements/{p-a6fae24d.entry.js → p-28dae22e.entry.js} +1 -1
- package/dist/lime-elements/{p-6951136b.entry.js → p-2d31cf0d.entry.js} +1 -1
- package/dist/lime-elements/{p-6e3666e5.entry.js → p-2ef38dac.entry.js} +1 -1
- package/dist/lime-elements/{p-dd36d57b.entry.js → p-2f788e92.entry.js} +7 -7
- package/dist/lime-elements/p-2kcqdtMr.js +1 -0
- package/dist/lime-elements/{p-11f716f5.entry.js → p-3000785f.entry.js} +1 -1
- package/dist/lime-elements/{p-2a5b259e.entry.js → p-3130d348.entry.js} +1 -1
- package/dist/lime-elements/{p-feeae1e4.entry.js → p-38097fa1.entry.js} +1 -1
- package/dist/lime-elements/p-3b299849.entry.js +1 -0
- package/dist/lime-elements/{p-00859fac.entry.js → p-3e6ce4e1.entry.js} +2 -2
- package/dist/lime-elements/{p-23f7956e.entry.js → p-3ec31835.entry.js} +1 -1
- package/dist/lime-elements/{p-52edfe86.entry.js → p-44396c0d.entry.js} +1 -1
- package/dist/lime-elements/{p-ec42a4aa.entry.js → p-494f880b.entry.js} +1 -1
- package/dist/lime-elements/{p-d1fa6da3.entry.js → p-4f6e3057.entry.js} +3 -3
- package/dist/lime-elements/{p-e6d74062.entry.js → p-504ae59f.entry.js} +1 -1
- package/dist/lime-elements/{p-7d5bd4a2.entry.js → p-51565372.entry.js} +1 -1
- package/dist/lime-elements/{p-5ddeb498.entry.js → p-52098c47.entry.js} +1 -1
- package/dist/lime-elements/{p-d2123236.entry.js → p-521a0204.entry.js} +1 -1
- package/dist/lime-elements/{p-38fb97fe.entry.js → p-54d85ae4.entry.js} +1 -1
- package/dist/lime-elements/{p-88f503eb.entry.js → p-59a522ee.entry.js} +1 -1
- package/dist/lime-elements/{p-2c1538f0.entry.js → p-5af72e1b.entry.js} +1 -1
- package/dist/lime-elements/p-64cc5094.entry.js +1 -0
- package/dist/lime-elements/{p-045c6027.entry.js → p-67a2c7f5.entry.js} +1 -1
- package/dist/lime-elements/{p-8db6b7d9.entry.js → p-68b1605f.entry.js} +1 -1
- package/dist/lime-elements/{p-7457bc07.entry.js → p-770981e6.entry.js} +1 -1
- package/dist/lime-elements/{p-9ea564fe.entry.js → p-7ed97446.entry.js} +1 -1
- package/dist/lime-elements/{p-cbb7d624.entry.js → p-8053727c.entry.js} +1 -1
- package/dist/lime-elements/{p-fc3209db.entry.js → p-80f9f2d3.entry.js} +1 -1
- package/dist/lime-elements/{p-34ef71f2.entry.js → p-95fb9ef8.entry.js} +1 -1
- package/dist/lime-elements/{p-6275668f.entry.js → p-961dff13.entry.js} +1 -1
- package/dist/lime-elements/{p-abef62d7.entry.js → p-97952658.entry.js} +1 -1
- package/dist/lime-elements/{p-d6270e4a.entry.js → p-982b9f50.entry.js} +1 -1
- package/dist/lime-elements/p-9c4156c6.entry.js +1 -0
- package/dist/lime-elements/p-BRCcjfVu.js +7 -0
- package/dist/lime-elements/{p-DSjFzQmB.js → p-CWuGCKo1.js} +1 -1
- package/dist/lime-elements/p-Cdx3I2X8.js +1 -0
- package/dist/lime-elements/{p-COzG_Mhw.js → p-CgNJbSP4.js} +1 -1
- package/dist/lime-elements/{p-BQY2kAWs.js → p-DlJXKdhK.js} +1 -1
- package/dist/lime-elements/{p-bbaf35ce.entry.js → p-a9f3f90c.entry.js} +1 -1
- package/dist/lime-elements/{p-c9e934af.entry.js → p-af5f2052.entry.js} +1 -1
- package/dist/lime-elements/{p-f9480c52.entry.js → p-c2478225.entry.js} +1 -1
- package/dist/lime-elements/{p-6aebcf60.entry.js → p-c7f2e189.entry.js} +1 -1
- package/dist/lime-elements/{p-d424688d.entry.js → p-cb2cc243.entry.js} +1 -1
- package/dist/lime-elements/{p-c118eac0.entry.js → p-cce53162.entry.js} +1 -1
- package/dist/lime-elements/{p-6896d5c8.entry.js → p-d4fea438.entry.js} +1 -1
- package/dist/lime-elements/{p-534fdf9b.entry.js → p-df1fa930.entry.js} +1 -1
- package/dist/lime-elements/{p-52bb74b9.entry.js → p-e05ad4f8.entry.js} +1 -1
- package/dist/lime-elements/{p-303d01e5.entry.js → p-e6b0e0a2.entry.js} +1 -1
- package/dist/lime-elements/{p-80d35f8f.entry.js → p-e975cc29.entry.js} +1 -1
- package/dist/lime-elements/{p-9ed578ec.entry.js → p-f532b60f.entry.js} +1 -1
- package/dist/lime-elements/{p-4be18a57.entry.js → p-ff845f5c.entry.js} +1 -1
- package/dist/types/components/email-viewer/email-loader.d.ts +19 -0
- package/dist/types/components/email-viewer/email-viewer.d.ts +69 -0
- package/dist/types/components/email-viewer/email-viewer.types.d.ts +70 -0
- package/dist/types/components/email-viewer/remote-images.d.ts +22 -0
- package/dist/types/components/email-viewer/sanitize-email-html.d.ts +14 -0
- package/dist/types/components/email-viewer/split-email-address-list.d.ts +25 -0
- package/dist/types/components/file-viewer/file-viewer.d.ts +9 -0
- package/dist/types/components/file-viewer/file-viewer.types.d.ts +1 -1
- package/dist/types/components.d.ts +116 -0
- package/dist/types/interface.d.ts +1 -0
- package/dist/types/translations/da.d.ts +10 -0
- package/dist/types/translations/de.d.ts +10 -0
- package/dist/types/translations/en.d.ts +10 -0
- package/dist/types/translations/fi.d.ts +10 -0
- package/dist/types/translations/fr.d.ts +10 -0
- package/dist/types/translations/nl.d.ts +10 -0
- package/dist/types/translations/no.d.ts +10 -0
- package/dist/types/translations/sv.d.ts +10 -0
- package/dist/types/util/format-bytes.d.ts +21 -0
- package/package.json +4 -5
- package/dist/lime-elements/p-017dd326.entry.js +0 -1
- package/dist/lime-elements/p-4beeec39.entry.js +0 -1
- package/dist/lime-elements/p-55596d9a.entry.js +0 -1
- package/dist/lime-elements/p-6rJPElLH.js +0 -1
- package/dist/lime-elements/p-Df0HAtSs.js +0 -7
- package/dist/lime-elements/p-f395fbe3.entry.js +0 -1
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Splits a comma-separated email address list (e.g. `To:` / `Cc:`) into individual
|
|
3
|
+
* recipient strings.
|
|
4
|
+
*
|
|
5
|
+
* In RFC 5322, address lists are comma-separated. However, commas can also appear
|
|
6
|
+
* inside quoted display names (quoted-string) and must then be ignored as separators.
|
|
7
|
+
* This splitter only treats a comma as a separator when it is outside quoted strings
|
|
8
|
+
* and outside angle-bracketed address parts (`<...>`).
|
|
9
|
+
*
|
|
10
|
+
* Notes:
|
|
11
|
+
* - If a display name contains a comma, it should be quoted or encoded to be
|
|
12
|
+
* unambiguous, e.g. `"Doe, Jane" <jane.doe@example.com>` or
|
|
13
|
+
* `=?UTF-8?Q?Doe,_Jane?= <jane.doe@example.com>`.
|
|
14
|
+
* - Real-world `.eml` files are usually RFC-ish but not always perfectly compliant.
|
|
15
|
+
* Malformed input with unquoted commas in display names may be split incorrectly.
|
|
16
|
+
*
|
|
17
|
+
* @param value - A comma-separated list of recipients.
|
|
18
|
+
* @returns An array of trimmed recipient strings.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* splitEmailAddressList('"Doe, Jane" <jane@example.com>, Team <team@example.com>');
|
|
22
|
+
* // => ['"Doe, Jane" <jane@example.com>', 'Team <team@example.com>']
|
|
23
|
+
*/
|
|
24
|
+
export function splitEmailAddressList(value) {
|
|
25
|
+
const parts = [];
|
|
26
|
+
let current = '';
|
|
27
|
+
const state = {
|
|
28
|
+
inQuotes: false,
|
|
29
|
+
escapeNext: false,
|
|
30
|
+
angleDepth: 0,
|
|
31
|
+
};
|
|
32
|
+
const append = (character) => {
|
|
33
|
+
current += character;
|
|
34
|
+
};
|
|
35
|
+
const flush = () => {
|
|
36
|
+
const trimmed = current.trim();
|
|
37
|
+
if (trimmed) {
|
|
38
|
+
parts.push(trimmed);
|
|
39
|
+
}
|
|
40
|
+
current = '';
|
|
41
|
+
};
|
|
42
|
+
for (const character of value) {
|
|
43
|
+
if (consumeEscaped(character, state, append)) {
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
if (beginEscape(character, state, append)) {
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
if (toggleQuote(character, state, append)) {
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
if (adjustAngleDepth(character, state, append)) {
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
if (isAddressSeparator(character, state)) {
|
|
56
|
+
flush();
|
|
57
|
+
continue;
|
|
58
|
+
}
|
|
59
|
+
append(character);
|
|
60
|
+
}
|
|
61
|
+
flush();
|
|
62
|
+
return parts;
|
|
63
|
+
}
|
|
64
|
+
function consumeEscaped(character, state, append) {
|
|
65
|
+
if (!state.escapeNext) {
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
append(character);
|
|
69
|
+
state.escapeNext = false;
|
|
70
|
+
return true;
|
|
71
|
+
}
|
|
72
|
+
function beginEscape(character, state, append) {
|
|
73
|
+
if (!state.inQuotes || character !== '\\') {
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
append(character);
|
|
77
|
+
state.escapeNext = true;
|
|
78
|
+
return true;
|
|
79
|
+
}
|
|
80
|
+
function toggleQuote(character, state, append) {
|
|
81
|
+
if (character !== '"' || state.angleDepth !== 0) {
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
84
|
+
append(character);
|
|
85
|
+
state.inQuotes = !state.inQuotes;
|
|
86
|
+
return true;
|
|
87
|
+
}
|
|
88
|
+
function adjustAngleDepth(character, state, append) {
|
|
89
|
+
if (state.inQuotes) {
|
|
90
|
+
return false;
|
|
91
|
+
}
|
|
92
|
+
if (character === '<') {
|
|
93
|
+
append(character);
|
|
94
|
+
state.angleDepth += 1;
|
|
95
|
+
return true;
|
|
96
|
+
}
|
|
97
|
+
if (character !== '>' || state.angleDepth === 0) {
|
|
98
|
+
return false;
|
|
99
|
+
}
|
|
100
|
+
append(character);
|
|
101
|
+
state.angleDepth -= 1;
|
|
102
|
+
return true;
|
|
103
|
+
}
|
|
104
|
+
function isAddressSeparator(character, state) {
|
|
105
|
+
return character === ',' && !state.inQuotes && state.angleDepth === 0;
|
|
106
|
+
}
|
|
@@ -89,7 +89,7 @@ export class File {
|
|
|
89
89
|
};
|
|
90
90
|
}
|
|
91
91
|
render() {
|
|
92
|
-
return (h(Host, { key: '
|
|
92
|
+
return (h(Host, { key: '2de03c65bb1c1aba3d2bb09717cc45f3ef618ebc' }, h("limel-file-dropzone", { key: '8cb9d8dcbbe0ca9b667bfea72992a11a25f73fdb', disabled: this.disabled || this.readonly || !!this.value, accept: this.accept, onFilesSelected: this.handleNewFiles }, this.renderChipset()), this.renderDragAndDropTip()));
|
|
93
93
|
}
|
|
94
94
|
renderDragAndDropTip() {
|
|
95
95
|
if (this.value || this.disabled || this.readonly) {
|
|
@@ -90,7 +90,7 @@ export class FileDropzone {
|
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
92
|
render() {
|
|
93
|
-
return (h(Host, { key: '
|
|
93
|
+
return (h(Host, { key: '4a002d8108fcb9d87b3f063171e0a531de31c1b1', onDrop: this.handleDrop, onDragOver: this.handleDragOver, onDragLeave: this.handleDragLeave }, h("slot", { key: 'ed0aa907729aab6bee39bad7c6f9f74fc718e286' }), this.renderOnDragLayout()));
|
|
94
94
|
}
|
|
95
95
|
static get is() { return "limel-file-dropzone"; }
|
|
96
96
|
static get encapsulation() { return "shadow"; }
|
|
@@ -71,7 +71,7 @@ export class FileInput {
|
|
|
71
71
|
this.fileInput = this.element.shadowRoot.getElementById(this.fileInputId);
|
|
72
72
|
}
|
|
73
73
|
render() {
|
|
74
|
-
return (h(Host, { key: '
|
|
74
|
+
return (h(Host, { key: '64b0de513357ed03fa7ae508ec6382acd600f392', onClick: this.handleClick, onKeyUp: this.handleKeyUp, onKeyDown: this.handleKeyDown }, h("input", { key: '0685cf5051c06e7e246631a38b349c2492dbb5b8', hidden: true, id: this.fileInputId, onChange: this.handleFileChange, type: "file", accept: this.accept, disabled: this.disabled, multiple: this.multiple }), h("slot", { key: 'da931d302eef5ed81663cce0b2d191166539a51d' })));
|
|
75
75
|
}
|
|
76
76
|
handleKeyDown(event) {
|
|
77
77
|
if (event.code === 'Tab' ||
|
|
@@ -2,6 +2,7 @@ import { h, } from "@stencil/core";
|
|
|
2
2
|
import translate from "../../global/translations";
|
|
3
3
|
import { detectExtension } from "./extension-mapping";
|
|
4
4
|
import { Fullscreen } from "./fullscreen";
|
|
5
|
+
import { loadEmail } from "../email-viewer/email-loader";
|
|
5
6
|
/**
|
|
6
7
|
* This is a smart component that automatically detects
|
|
7
8
|
* the most common file types such as image, audio, video, and text,
|
|
@@ -25,6 +26,7 @@ import { Fullscreen } from "./fullscreen";
|
|
|
25
26
|
*
|
|
26
27
|
* @exampleComponent limel-example-file-viewer-basic
|
|
27
28
|
* @exampleComponent limel-example-file-viewer-office
|
|
29
|
+
* @exampleComponent limel-example-file-viewer-eml
|
|
28
30
|
* @exampleComponent limel-example-file-viewer-filename
|
|
29
31
|
* @exampleComponent limel-example-file-viewer-inbuilt-actions
|
|
30
32
|
* @exampleComponent limel-example-file-viewer-custom-actions
|
|
@@ -95,6 +97,12 @@ export class FileViewer {
|
|
|
95
97
|
h("object", { data: this.sanitizeUrl(this.fileUrl), type: "text/plain" }, fallbackContent),
|
|
96
98
|
];
|
|
97
99
|
};
|
|
100
|
+
this.renderEmail = () => {
|
|
101
|
+
return [
|
|
102
|
+
this.renderButtons(),
|
|
103
|
+
h("limel-email-viewer", { email: this.email, fallbackUrl: this.sanitizeUrl(this.fileUrl), language: this.language }, h("div", { slot: "fallback" }, this.renderNoFileSupportMessage())),
|
|
104
|
+
];
|
|
105
|
+
};
|
|
98
106
|
this.renderOffice = () => {
|
|
99
107
|
return [
|
|
100
108
|
h("div", { class: "action-menu-for-office-files" }, this.renderActionMenu()),
|
|
@@ -153,15 +161,40 @@ export class FileViewer {
|
|
|
153
161
|
return (h("limel-menu", { class: "action-menu", items: this.actions, onSelect: this.emitOnAction, "open-direction": "left" }, h("button", { class: "button--action", id: "tooltip-more", role: "button", slot: "trigger" }, h("limel-icon", { name: "menu_2" }), h("limel-tooltip", { label: this.getTranslation('file-viewer.more-actions'), elementId: "tooltip-more", openDirection: "left" }))));
|
|
154
162
|
};
|
|
155
163
|
this.createURL = async (fileType) => {
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
164
|
+
const loaders = {
|
|
165
|
+
pdf: this.loadPdf,
|
|
166
|
+
email: this.loadEmail,
|
|
167
|
+
};
|
|
168
|
+
const loader = loaders[fileType] || this.loadDefault;
|
|
169
|
+
try {
|
|
170
|
+
await loader();
|
|
171
|
+
}
|
|
172
|
+
finally {
|
|
173
|
+
this.loading = false;
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
this.loadPdf = async () => {
|
|
177
|
+
this.revokePdfBlobUrl();
|
|
178
|
+
const response = await fetch(this.url);
|
|
179
|
+
if (!response.ok) {
|
|
180
|
+
throw new Error(`Failed to load PDF (${response.status} ${response.statusText})`);
|
|
160
181
|
}
|
|
161
|
-
|
|
182
|
+
const blob = await response.blob();
|
|
183
|
+
this.fileUrl = URL.createObjectURL(blob);
|
|
184
|
+
this.pdfBlobUrl = this.fileUrl;
|
|
185
|
+
};
|
|
186
|
+
this.loadEmail = async () => {
|
|
187
|
+
try {
|
|
188
|
+
this.email = await loadEmail(this.url);
|
|
162
189
|
this.fileUrl = this.url;
|
|
163
190
|
}
|
|
164
|
-
|
|
191
|
+
catch (_a) {
|
|
192
|
+
this.email = undefined;
|
|
193
|
+
this.fileUrl = '';
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
this.loadDefault = async () => {
|
|
197
|
+
this.fileUrl = this.url;
|
|
165
198
|
};
|
|
166
199
|
this.handleToggleFullscreen = () => {
|
|
167
200
|
if (this.fullscreen.isSupported()) {
|
|
@@ -175,6 +208,9 @@ export class FileViewer {
|
|
|
175
208
|
};
|
|
176
209
|
this.fullscreen = new Fullscreen(this.HostElement);
|
|
177
210
|
}
|
|
211
|
+
disconnectedCallback() {
|
|
212
|
+
this.revokePdfBlobUrl();
|
|
213
|
+
}
|
|
178
214
|
async componentWillLoad() {
|
|
179
215
|
this.fileType = detectExtension(this.filename, this.url);
|
|
180
216
|
await this.createURL(this.fileType);
|
|
@@ -203,13 +239,23 @@ export class FileViewer {
|
|
|
203
239
|
video: this.renderVideo,
|
|
204
240
|
audio: this.renderAudio,
|
|
205
241
|
text: this.renderText,
|
|
242
|
+
email: this.renderEmail,
|
|
206
243
|
office: this.renderOffice,
|
|
207
244
|
};
|
|
208
245
|
const fileViewerFunction = fileViewerFunctions[this.fileType] ||
|
|
209
246
|
this.renderNoFileSupportMessage;
|
|
210
247
|
return fileViewerFunction();
|
|
211
248
|
}
|
|
249
|
+
revokePdfBlobUrl() {
|
|
250
|
+
if (this.pdfBlobUrl) {
|
|
251
|
+
URL.revokeObjectURL(this.pdfBlobUrl);
|
|
252
|
+
this.pdfBlobUrl = undefined;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
212
255
|
sanitizeUrl(url) {
|
|
256
|
+
if (!(url === null || url === void 0 ? void 0 : url.trim())) {
|
|
257
|
+
return '';
|
|
258
|
+
}
|
|
213
259
|
try {
|
|
214
260
|
const u = new URL(url, window.location.href);
|
|
215
261
|
const allowed = ['http:', 'https:', 'blob:'];
|
|
@@ -438,7 +484,8 @@ export class FileViewer {
|
|
|
438
484
|
"isFullscreen": {},
|
|
439
485
|
"fileType": {},
|
|
440
486
|
"loading": {},
|
|
441
|
-
"fileUrl": {}
|
|
487
|
+
"fileUrl": {},
|
|
488
|
+
"email": {}
|
|
442
489
|
};
|
|
443
490
|
}
|
|
444
491
|
static get events() {
|
|
@@ -31,7 +31,7 @@ export class FlexContainer {
|
|
|
31
31
|
console.warn('limel-flex-container is deprecated, please use CSS instead: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Basic_Concepts_of_Flexbox');
|
|
32
32
|
}
|
|
33
33
|
render() {
|
|
34
|
-
return h("slot", { key: '
|
|
34
|
+
return h("slot", { key: '7e8db5fb4b796ae12f76ae2684599226f1229928' });
|
|
35
35
|
}
|
|
36
36
|
static get is() { return "limel-flex-container"; }
|
|
37
37
|
static get encapsulation() { return "shadow"; }
|
|
@@ -71,7 +71,7 @@ export class Form {
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
render() {
|
|
74
|
-
return h("div", { key: '
|
|
74
|
+
return h("div", { key: '515f0603403b9f432e97d9916e6d6c07f3edd9e7', class: "root" });
|
|
75
75
|
}
|
|
76
76
|
reactRender() {
|
|
77
77
|
if (!this.root) {
|
|
@@ -12,7 +12,7 @@ export class Grid {
|
|
|
12
12
|
console.warn('limel-grid is deprecated, please use CSS instead: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout');
|
|
13
13
|
}
|
|
14
14
|
render() {
|
|
15
|
-
return h("slot", { key: '
|
|
15
|
+
return h("slot", { key: 'b080a36f1771ee8da78a25bdd3baab5437faa917' });
|
|
16
16
|
}
|
|
17
17
|
static get is() { return "limel-grid"; }
|
|
18
18
|
static get encapsulation() { return "shadow"; }
|
|
@@ -61,7 +61,7 @@ export class Header {
|
|
|
61
61
|
this.subheadingDivider = '·';
|
|
62
62
|
}
|
|
63
63
|
render() {
|
|
64
|
-
return (h(Host, { key: '
|
|
64
|
+
return (h(Host, { key: 'af88692a3c1dcaf463519b33909f8338810437fc' }, h("div", { key: 'e5f38998bcae91adf802ec5f6bcf2bf8df25b93b', class: "information" }, this.renderIcon(), h("div", { key: '23e44ba0626bf7f0a936c3a2285353efa5fa950d', class: "headings" }, h("h1", { key: '66483d8c6ef67101b401c5609a3c7dc606da6f03', class: "heading", title: this.heading }, this.heading), h("h2", { key: 'e9748ebc2213157544835ff540400e14fab433dd', class: "subheading", title: this.subheading }, this.subheading, this.renderSupportingText()))), h("slot", { key: '8bcdf617951b5da61e75c0c1d8ff6722d6903e4f', name: "actions" }, h("slot", { key: '6adf11869362405ad30c0a6a7a7a463844b4022a' }))));
|
|
65
65
|
}
|
|
66
66
|
renderIcon() {
|
|
67
67
|
var _a, _b, _c, _d, _e;
|
|
@@ -19,7 +19,7 @@ export class HelpContent {
|
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
21
|
render() {
|
|
22
|
-
return (h(Host, { key: '
|
|
22
|
+
return (h(Host, { key: '72c02356b943cf997908589e7a6b9c10a16fc38b' }, h("limel-markdown", { key: '300ce7a4ea70e956f15ac2499935f73181340133', value: this.value }), this.renderReadMoreLink()));
|
|
23
23
|
}
|
|
24
24
|
static get is() { return "limel-help-content"; }
|
|
25
25
|
static get encapsulation() { return "shadow"; }
|
|
@@ -41,9 +41,9 @@ export class HelpComponent {
|
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
43
|
render() {
|
|
44
|
-
return (h(Host, { key: '
|
|
44
|
+
return (h(Host, { key: '3e7272ecc3c94a3fc8e62836f75aec832be5b242' }, h("limel-popover", { key: '55e5a79476d983f4602946ab7ab1a6e79843240a', open: this.isOpen, onClose: this.onPopoverClose, openDirection: this.openDirection }, h("button", { key: '92ddb2a98e452e82a12c5862ba8c1b2450558a74', slot: "trigger", type: "button", onClick: this.openPopover, class: {
|
|
45
45
|
'is-open': this.isOpen,
|
|
46
|
-
} }, this.trigger), h("limel-help-content", { key: '
|
|
46
|
+
} }, this.trigger), h("limel-help-content", { key: '9b14d405df2eccfdbe8d16c5700dc934b245fb17', value: this.value, readMoreLink: this.readMoreLink }))));
|
|
47
47
|
}
|
|
48
48
|
static get is() { return "limel-help"; }
|
|
49
49
|
static get encapsulation() { return "shadow"; }
|
|
@@ -46,9 +46,9 @@ export class HelperLine {
|
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
48
|
render() {
|
|
49
|
-
return (h(Host, { key: '
|
|
49
|
+
return (h(Host, { key: '141eab695d67c1561ac6175c30596833b96ad384', tabIndex: -1, class: {
|
|
50
50
|
invalid: this.invalid,
|
|
51
|
-
}, style: this.hasContent() ? {} : { display: 'none' }, "aria-hidden": !this.hasContent() }, h("div", { key: '
|
|
51
|
+
}, style: this.hasContent() ? {} : { display: 'none' }, "aria-hidden": !this.hasContent() }, h("div", { key: 'd82f31bec7730301ba43b380e034de632c391bda' }, this.renderHelperText(), this.renderCharacterCounter())));
|
|
52
52
|
}
|
|
53
53
|
static get is() { return "limel-helper-line"; }
|
|
54
54
|
static get encapsulation() { return "shadow"; }
|
|
@@ -18,7 +18,7 @@ export class Icon {
|
|
|
18
18
|
this.loadIcon(this.name);
|
|
19
19
|
}
|
|
20
20
|
render() {
|
|
21
|
-
return h("div", { key: '
|
|
21
|
+
return h("div", { key: '1af49b178e75a2701d2362817c5f74614a4a900a', class: "container" });
|
|
22
22
|
}
|
|
23
23
|
async loadIcon(name) {
|
|
24
24
|
if (name === undefined || name === '') {
|
|
@@ -51,7 +51,7 @@ export class IconButton {
|
|
|
51
51
|
if (this.host.hasAttribute('tabindex')) {
|
|
52
52
|
buttonAttributes.tabindex = this.host.getAttribute('tabindex');
|
|
53
53
|
}
|
|
54
|
-
return (h(Host, { key: '
|
|
54
|
+
return (h(Host, { key: '9405f3e395bf097253da6a24e0a6ab06dd85dc4b', onClick: this.filterClickWhenDisabled }, h("button", Object.assign({ key: 'd0c646ad1b57fd65a12ebb56bdfaa72b267632aa', disabled: this.disabled, id: this.tooltipId }, buttonAttributes), this.renderIcon(), this.renderTooltip(this.tooltipId))));
|
|
55
55
|
}
|
|
56
56
|
renderIcon() {
|
|
57
57
|
var _a, _b;
|
|
@@ -116,9 +116,9 @@ export class InfoTile {
|
|
|
116
116
|
this.checkProps((_d = this === null || this === void 0 ? void 0 : this.link) === null || _d === void 0 ? void 0 : _d.title);
|
|
117
117
|
const link = this.disabled ? '#' : (_e = this.link) === null || _e === void 0 ? void 0 : _e.href;
|
|
118
118
|
const rel = getRel((_f = this.link) === null || _f === void 0 ? void 0 : _f.target, (_g = this.link) === null || _g === void 0 ? void 0 : _g.rel);
|
|
119
|
-
return (h(Host, { key: '
|
|
119
|
+
return (h(Host, { key: '3acd30e03e1eca5ffee1ca2e1ad92acef99eac1d', onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave, class: { 'has-primary-slot-content': this.hasPrimarySlot } }, h("a", { key: '755afc858a330aadd152cc4c7efe348660f8a8b9', title: (_h = this.link) === null || _h === void 0 ? void 0 : _h.title, href: link, target: (_j = this.link) === null || _j === void 0 ? void 0 : _j.target, rel: rel, tabindex: "0", "aria-label": extendedAriaLabel, "aria-disabled": this.disabled, "aria-busy": this.loading ? 'true' : 'false', "aria-live": "polite", class: {
|
|
120
120
|
'is-clickable': !!((_k = this.link) === null || _k === void 0 ? void 0 : _k.href) && !this.disabled,
|
|
121
|
-
} }, this.renderIcon(), this.renderProgress(), h("slot", { key: '
|
|
121
|
+
} }, this.renderIcon(), this.renderProgress(), h("slot", { key: '26069e0fb0b3179882d095176e555cdef5a63c1f', name: "primary", onSlotchange: this.updateHasPrimarySlotContent }), h("div", { key: 'd8147e61d31a53e25468a562f5286476ffb515ba', class: "value-group" }, this.renderPrefix(), h("div", { key: '11abbbbb0b4774cb78597a0658a990079fb1823e', class: "value-and-suffix" }, this.renderValue(), this.renderSuffix()), this.renderSpinner()), this.renderLabel(), h("limel-3d-hover-effect-glow", { key: '626259aa388561cf05d3dcb65e82b57ac27fb15a' })), this.renderNotification()));
|
|
122
122
|
}
|
|
123
123
|
checkProps(propValue) {
|
|
124
124
|
return propValue ? propValue + ' ' : '';
|
|
@@ -588,7 +588,7 @@ export class InputField {
|
|
|
588
588
|
if (ariaControls) {
|
|
589
589
|
properties['aria-controls'] = ariaControls;
|
|
590
590
|
}
|
|
591
|
-
return (h(Host, { key: '
|
|
591
|
+
return (h(Host, { key: '5026e41e99b24333c72b6372f85ba5915a5ba0a1' }, h("limel-notched-outline", { key: '5d50900e3b92709a8f4e581d6c08cb21a3aa53f1', labelId: this.labelId, label: this.label, required: this.required, invalid: this.invalid || this.isInvalid(), disabled: this.disabled, readonly: this.readonly, hasValue: !!this.value, hasLeadingIcon: !!this.leadingIcon }, h("label", { key: '24de43f8c2e05781db453a7d71b3f84b8f5ac0e9', slot: "content", class: this.getContainerClassList() }, this.renderLeadingIcon(), this.renderPrefix(), this.renderFormattedNumber(), this.renderInput(properties), this.renderSuffix(), this.renderTextarea(properties), this.renderTrailingLinkOrButton())), this.renderHelperLine(), this.renderAutocompleteList()));
|
|
592
592
|
}
|
|
593
593
|
valueWatcher(newValue) {
|
|
594
594
|
if (!this.mdcTextField) {
|
|
@@ -143,7 +143,7 @@ export class List {
|
|
|
143
143
|
maxLinesSecondaryText = 1;
|
|
144
144
|
}
|
|
145
145
|
const html = this.listRenderer.render(this.items, this.config);
|
|
146
|
-
return (h(Host, { key: '
|
|
146
|
+
return (h(Host, { key: 'd40f927cbdcfb8ac41cb770921fcb57d3f0686a8', style: {
|
|
147
147
|
'--maxLinesSecondaryText': `${maxLinesSecondaryText}`,
|
|
148
148
|
} }, html));
|
|
149
149
|
}
|
|
@@ -162,9 +162,9 @@ export class ListItemComponent {
|
|
|
162
162
|
// also keep for `menuitem` for visual state consistency
|
|
163
163
|
ariaProps['aria-selected'] = this.selected ? 'true' : 'false';
|
|
164
164
|
}
|
|
165
|
-
return (h(Host, Object.assign({ key: '
|
|
165
|
+
return (h(Host, Object.assign({ key: '04d1f12fca6598e4d28ca447e6b3cf3d7a42e09b', role: this.getHostRole(), class: {
|
|
166
166
|
'has-primary-component': !!((_a = this.primaryComponent) === null || _a === void 0 ? void 0 : _a.name),
|
|
167
|
-
} }, ariaProps), this.renderRadioButton(), this.renderCheckbox(), this.renderIcon(), this.renderImage(), this.renderPrimaryComponent(), h("div", { key: '
|
|
167
|
+
} }, ariaProps), this.renderRadioButton(), this.renderCheckbox(), this.renderIcon(), this.renderImage(), this.renderPrimaryComponent(), h("div", { key: '6f6bcd5a83e866144aa2061f045d8136827a8a63', class: "text" }, this.renderLabel(), this.renderDescription()), this.renderActionMenu(this.actions)));
|
|
168
168
|
}
|
|
169
169
|
/**
|
|
170
170
|
* Returns a stable reference for the provided actions array to avoid
|
|
@@ -17,7 +17,7 @@ export class MenuItemMeta {
|
|
|
17
17
|
this.showChevron = false;
|
|
18
18
|
}
|
|
19
19
|
render() {
|
|
20
|
-
return (h(Host, { key: '
|
|
20
|
+
return (h(Host, { key: '60731fc2a51315556731654a08616092dc6e44a8' }, this.renderCommandText(), this.renderBadge(), this.renderChevron()));
|
|
21
21
|
}
|
|
22
22
|
renderCommandText() {
|
|
23
23
|
if (!this.commandText) {
|
|
@@ -79,7 +79,7 @@ export class Markdown {
|
|
|
79
79
|
this.cleanupImageIntersectionObserver();
|
|
80
80
|
}
|
|
81
81
|
render() {
|
|
82
|
-
return (h(Host, { key: '
|
|
82
|
+
return (h(Host, { key: 'b1939b572c0a9ac59178497f56ebc469bc707d98' }, h("div", { key: 'f9dd27e5263281fad9e6d1da9d25d3ccd3a9990e', id: "markdown", ref: (el) => (this.rootElement = el) })));
|
|
83
83
|
}
|
|
84
84
|
setupImageIntersectionObserver() {
|
|
85
85
|
if (this.lazyLoadImages) {
|
|
@@ -519,7 +519,7 @@ export class Menu {
|
|
|
519
519
|
const cssProperties = this.getCssProperties();
|
|
520
520
|
const dropdownZIndex = getComputedStyle(this.host).getPropertyValue('--dropdown-z-index');
|
|
521
521
|
const menuSurfaceWidth = this.getMenuSurfaceWidth(cssProperties['--menu-surface-width']);
|
|
522
|
-
return (h("div", { key: '
|
|
522
|
+
return (h("div", { key: 'adec7fedfe610207eed79b9587438d17111ffe82', class: "mdc-menu-surface--anchor", onClick: this.onTriggerClick }, h("slot", { key: '5dbc488a563ea2dcc315c35b7751fe829298e46d', ref: this.setTriggerRef, name: "trigger" }), this.renderNotificationBadge(), h("limel-portal", { key: '98b47d2d25f40b5294f6bbfca40371917ce438b2', visible: this.open, containerId: this.portalId, openDirection: this.openDirection, position: "absolute", containerStyle: { 'z-index': dropdownZIndex } }, h("limel-menu-surface", { key: '1a616b513b25383c6534d76c66a088c1e264f4b1', open: this.open, onDismiss: this.onClose, style: Object.assign(Object.assign({}, cssProperties), { '--menu-surface-width': menuSurfaceWidth, '--limel-menu-surface-display': 'flex', '--limel-menu-surface-flex-direction': 'column' }), class: {
|
|
523
523
|
'has-grid-layout': this.gridLayout,
|
|
524
524
|
} }, this.renderSearchField(), this.renderBreadcrumb(), this.renderLoader(), this.renderEmptyMessage(), this.renderMenuList()))));
|
|
525
525
|
}
|
|
@@ -88,7 +88,7 @@ export class MenuList {
|
|
|
88
88
|
iconSize: this.iconSize,
|
|
89
89
|
};
|
|
90
90
|
const html = this.MenuListRenderer.render(this.items, this.config);
|
|
91
|
-
return h("div", { key: '
|
|
91
|
+
return h("div", { key: 'f2a299d2e47ed6344fd817e748b8cc22f0e0e3a7', class: "mdc-menu mdc-menu-surface" }, html);
|
|
92
92
|
}
|
|
93
93
|
itemsChanged() {
|
|
94
94
|
setTimeout(() => {
|
|
@@ -105,7 +105,7 @@ export class MenuSurface {
|
|
|
105
105
|
'mdc-elevation-transition': true,
|
|
106
106
|
'mdc-elevation--z4': true,
|
|
107
107
|
};
|
|
108
|
-
return (h("div", { key: '
|
|
108
|
+
return (h("div", { key: 'd00fdc8b36fb54a29a2a310ddbc2f589ce34bce3', class: classList, tabindex: "-1" }, h("slot", { key: 'd134575dc508794b42fed852e952a7d12c399b2a' })));
|
|
109
109
|
}
|
|
110
110
|
static get is() { return "limel-menu-surface"; }
|
|
111
111
|
static get encapsulation() { return "shadow"; }
|
|
@@ -59,7 +59,7 @@ export class NotchedOutline {
|
|
|
59
59
|
this.hasFloatingLabel = false;
|
|
60
60
|
}
|
|
61
61
|
render() {
|
|
62
|
-
return (h("div", { key: '
|
|
62
|
+
return (h("div", { key: '3071dff00262f73ae8555fac09dedccad474b7fb', class: "limel-notched-outline" }, h("slot", { key: '15f3ecd4b18c36c310b62d4670aa81bdff90c99e', name: "content" }), h("span", { key: 'c7b02545a82d0f995bb86d489392d38c36f770e2', class: "limel-notched-outline--outlines", "aria-hidden": "true" }, h("span", { key: 'f03ae4002a01844989af7d2ad19252f3113d2155', class: "limel-notched-outline--leading-outline" }), this.renderLabel(), h("span", { key: '6e15221fe2d1c6fafb0d8109c6031d8302447762', class: "limel-notched-outline--trailing-outline" }), this.renderEmptyReadonlyValue())));
|
|
63
63
|
}
|
|
64
64
|
renderLabel() {
|
|
65
65
|
if (!this.label) {
|
|
@@ -188,7 +188,7 @@ export class Picker {
|
|
|
188
188
|
props.maxItems = 1;
|
|
189
189
|
}
|
|
190
190
|
return [
|
|
191
|
-
h("limel-chip-set", Object.assign({ key: '
|
|
191
|
+
h("limel-chip-set", Object.assign({ key: '21f4444eee99a33af5565df2c20aec5f7248f216', type: "input", inputType: "search", label: this.label, helperText: this.helperText, leadingIcon: this.leadingIcon, value: this.chips, disabled: this.disabled, invalid: this.invalid, delimiter: this.renderDelimiter(), readonly: this.readonly, required: this.required, searchLabel: this.searchLabel, onInput: this.handleTextInput, onKeyDown: this.handleInputKeyDown, onChange: this.handleChange, onInteract: this.handleInteract, onStartEdit: this.handleInputFieldFocus, onStopEdit: this.handleStopEditAndBlur, emptyInputOnBlur: false, clearAllButton: this.multiple && !this.chipSetEditMode }, props)),
|
|
192
192
|
this.renderDropdown(),
|
|
193
193
|
];
|
|
194
194
|
}
|
|
@@ -127,7 +127,7 @@ export class Popover {
|
|
|
127
127
|
render() {
|
|
128
128
|
const cssProperties = this.getCssProperties();
|
|
129
129
|
const popoverZIndex = getComputedStyle(this.host).getPropertyValue('--popover-z-index');
|
|
130
|
-
return (h("div", { key: '
|
|
130
|
+
return (h("div", { key: 'fdd43de39ed86b15e3eb72b519e13c21556fbc0e', class: "trigger-anchor" }, h("slot", { key: 'ed797a95c6cc7bccec411795c7f4c3c30c43d3d4', name: "trigger", ref: this.setTriggerRef }), h("limel-portal", { key: 'b665286d6ef9077a61b224190619df18afe7bd07', visible: this.open, containerId: this.portalId, containerStyle: { 'z-index': popoverZIndex }, openDirection: this.openDirection }, h("limel-popover-surface", { key: '9ccea4d6828e1cd33b79d850c4e9cf2f2e31ff44', contentCollection: this.host.children, style: cssProperties }))));
|
|
131
131
|
}
|
|
132
132
|
globalClickListener(event) {
|
|
133
133
|
const element = event.target;
|
|
@@ -8,7 +8,7 @@ export class PopoverSurface {
|
|
|
8
8
|
this.appendElement();
|
|
9
9
|
}
|
|
10
10
|
render() {
|
|
11
|
-
return h("div", { key: '
|
|
11
|
+
return h("div", { key: '26fa5134de057639d52e71eb9a0bce69ff38a894', class: "limel-popover-surface", tabindex: "0" });
|
|
12
12
|
}
|
|
13
13
|
appendElement() {
|
|
14
14
|
const portalContainer = this.host.shadowRoot.querySelector('.limel-popover-surface');
|
|
@@ -120,7 +120,7 @@ export class Portal {
|
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
render() {
|
|
123
|
-
return h("slot", { key: '
|
|
123
|
+
return h("slot", { key: 'bd5589945e34f7da397083ea53ab92ce38d3c56c' });
|
|
124
124
|
}
|
|
125
125
|
onVisible() {
|
|
126
126
|
if (!this.container && this.visible) {
|
|
@@ -37,7 +37,7 @@ export class RadioButtonGroup {
|
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
39
|
render() {
|
|
40
|
-
return (h("limel-list", { key: '
|
|
40
|
+
return (h("limel-list", { key: '591ebaf4100003058cf2c38202b9f7befa32d398', items: this.createItems(), type: "radio", badgeIcons: this.badgeIcons, maxLinesSecondaryText: this.maxLinesSecondaryText, onChange: this.handleChange }));
|
|
41
41
|
}
|
|
42
42
|
createItems() {
|
|
43
43
|
return this.items.map((option) => {
|
|
@@ -31,12 +31,12 @@ import { Host, h } from "@stencil/core";
|
|
|
31
31
|
*/
|
|
32
32
|
export class RadioButtonComponent {
|
|
33
33
|
render() {
|
|
34
|
-
return (h(Host, { key: '
|
|
34
|
+
return (h(Host, { key: 'eb692bd85b7ae08effca48b0061ce070fa2d726c', class: {
|
|
35
35
|
'boolean-input': true,
|
|
36
36
|
'radio-button': true,
|
|
37
37
|
checked: this.checked,
|
|
38
38
|
disabled: this.disabled,
|
|
39
|
-
} }, h("input", { key: '
|
|
39
|
+
} }, h("input", { key: 'd91531ef558efb24cfabef237a36f494ea1b8127', type: "radio", id: this.id, checked: this.checked, disabled: this.disabled, onChange: this.onChange }), h("div", { key: 'dd3a2a4b54c7b395fb8f28fad4921f31c644bd1e', class: "box" }), h("label", { key: 'ec47a41a86ab3e743168c5f8a8b792d14aeb3262', class: "boolean-input-label", htmlFor: this.id }, this.label)));
|
|
40
40
|
}
|
|
41
41
|
static get is() { return "limel-radio-button"; }
|
|
42
42
|
static get originalStyleUrls() {
|
|
@@ -100,7 +100,7 @@ export class Select {
|
|
|
100
100
|
}
|
|
101
101
|
render() {
|
|
102
102
|
const dropdownZIndex = getComputedStyle(this.host).getPropertyValue('--dropdown-z-index');
|
|
103
|
-
return (h(SelectTemplate, { key: '
|
|
103
|
+
return (h(SelectTemplate, { key: '9afb17956fe91725acb0e0df040a273bc62958af', id: this.portalId, disabled: this.disabled || this.readonly, readonly: this.readonly, required: this.required, invalid: this.invalid, label: this.label, helperText: this.helperText, value: this.value, options: this.options, onMenuChange: this.handleMenuChange, onNativeChange: this.handleNativeChange, onTriggerPress: this.handleMenuTriggerKeyPress, multiple: this.multiple, isOpen: this.menuOpen, open: this.openMenu, close: this.closeMenu, checkValid: this.checkValid, native: this.isMobileDevice, dropdownZIndex: dropdownZIndex, anchor: this.getAnchorElement() }));
|
|
104
104
|
}
|
|
105
105
|
watchOpen(newValue, oldValue) {
|
|
106
106
|
if (this.checkValid) {
|
|
@@ -56,7 +56,7 @@ export class Shortcut {
|
|
|
56
56
|
render() {
|
|
57
57
|
var _a, _b, _c, _d, _e;
|
|
58
58
|
const rel = getRel((_a = this.link) === null || _a === void 0 ? void 0 : _a.target, (_b = this.link) === null || _b === void 0 ? void 0 : _b.rel);
|
|
59
|
-
return (h(Host, { key: '
|
|
59
|
+
return (h(Host, { key: '3a8b1065324570ae46d22a1974c34432692632dc', onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave }, h("a", { key: 'a29c1d1e4c3bd0222762fb0675f01e9d12000ab7', "aria-disabled": this.disabled, href: (_c = this.link) === null || _c === void 0 ? void 0 : _c.href, target: (_d = this.link) === null || _d === void 0 ? void 0 : _d.target, rel: rel, tabindex: "0", "aria-label": this.getAriaLabel(), title: (_e = this.link) === null || _e === void 0 ? void 0 : _e.title }, h("limel-icon", { key: '1f1c964a055f6625ff0d67e6e1c7da182834d101', name: this.icon }), h("limel-3d-hover-effect-glow", { key: '45b45dd5a3c945c6662dbba504f2d2d43a87f1c4' })), this.renderLabel(), this.renderNotification()));
|
|
60
60
|
}
|
|
61
61
|
static get is() { return "limel-shortcut"; }
|
|
62
62
|
static get encapsulation() { return "shadow"; }
|
|
@@ -237,7 +237,7 @@ export class Slider {
|
|
|
237
237
|
if (this.disabled || this.readonly) {
|
|
238
238
|
inputProps.disabled = true;
|
|
239
239
|
}
|
|
240
|
-
return (h(Host, { key: '
|
|
240
|
+
return (h(Host, { key: 'cf07e4288eae4c909632d74fe77e6a827b122abb', class: this.getContainerClassList() }, h("limel-notched-outline", { key: '23ed21c06dea5c581ec9d8cdf2dcfea767417e2f', labelId: this.labelId, label: this.label, required: this.required, invalid: this.invalid, disabled: this.disabled, readonly: this.readonly, hasValue: !!this.value, hasFloatingLabel: true }, h("div", { key: 'afdaaa1f8b4d0ceeebb3eca73649849f871dff69', slot: "content" }, this.renderRangeContainer(), this.renderSliderContainer(inputProps))), this.renderHelperLine()));
|
|
241
241
|
}
|
|
242
242
|
watchDisabled() {
|
|
243
243
|
this.updateDisabledState();
|
|
@@ -121,14 +121,14 @@ export class Snackbar {
|
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
render() {
|
|
124
|
-
return (h("aside", { key: '
|
|
124
|
+
return (h("aside", { key: 'dcbc142070197202eac9cca2c6ff4408cf59afcb', popover: "manual", style: {
|
|
125
125
|
'--snackbar-timeout': `${Math.max(this.timeout || 0, 0)}ms`,
|
|
126
126
|
'--snackbar-distance-to-top-edge': `${this.offset}px`,
|
|
127
127
|
}, class: {
|
|
128
128
|
open: this.open,
|
|
129
129
|
'is-closing': this.closing,
|
|
130
130
|
'limel-portal--parent': true,
|
|
131
|
-
}, id: this.snackbarId, role: this.setAriaRoles(), "aria-relevant": this.open ? 'additions' : undefined }, h("div", { key: '
|
|
131
|
+
}, id: this.snackbarId, role: this.setAriaRoles(), "aria-relevant": this.open ? 'additions' : undefined }, h("div", { key: 'a145e38f6b8c583d4b15609c65bc614388906d17', class: "surface", "aria-atomic": "false" }, h("div", { key: '07403a473c269f7397e4073a58454c925259eb46', class: "label" }, this.message), this.renderActions(this.actionText), this.renderDismissButton(this.dismissible))));
|
|
132
132
|
}
|
|
133
133
|
setAriaRoles() {
|
|
134
134
|
if (!this.open) {
|