@limetech/lime-elements 37.45.2 → 37.46.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.
Files changed (187) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/cjs/component-cba208a8.js +2448 -0
  3. package/dist/cjs/component-cba208a8.js.map +1 -0
  4. package/dist/cjs/{dom-ee8ee17d.js → debounce-2e5f4b7e.js} +1 -31
  5. package/dist/cjs/debounce-2e5f4b7e.js.map +1 -0
  6. package/dist/cjs/dom-81eaa633.js +34 -0
  7. package/dist/cjs/dom-81eaa633.js.map +1 -0
  8. package/dist/cjs/lime-elements.cjs.js +1 -1
  9. package/dist/cjs/{limel-action-bar_3.cjs.entry.js → limel-action-bar_4.cjs.entry.js} +68 -1
  10. package/dist/cjs/limel-action-bar_4.cjs.entry.js.map +1 -0
  11. package/dist/cjs/{limel-breadcrumbs_7.cjs.entry.js → limel-breadcrumbs_5.cjs.entry.js} +412 -3357
  12. package/dist/cjs/limel-breadcrumbs_5.cjs.entry.js.map +1 -0
  13. package/dist/cjs/limel-callout.cjs.entry.js +1 -1
  14. package/dist/cjs/limel-chip_2.cjs.entry.js +2 -2
  15. package/dist/cjs/limel-dynamic-label_4.cjs.entry.js +610 -0
  16. package/dist/cjs/limel-dynamic-label_4.cjs.entry.js.map +1 -0
  17. package/dist/cjs/limel-file-viewer.cjs.entry.js +1 -1
  18. package/dist/cjs/limel-file.cjs.entry.js +1 -1
  19. package/dist/cjs/limel-flatpickr-adapter.cjs.entry.js +1 -1
  20. package/dist/cjs/limel-form.cjs.entry.js +1 -1
  21. package/dist/cjs/limel-form.cjs.entry.js.map +1 -1
  22. package/dist/cjs/{limel-portal.cjs.entry.js → limel-icon_2.cjs.entry.js} +201 -1
  23. package/dist/cjs/limel-icon_2.cjs.entry.js.map +1 -0
  24. package/dist/cjs/limel-picker.cjs.entry.js +3 -2
  25. package/dist/cjs/limel-picker.cjs.entry.js.map +1 -1
  26. package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +294 -16
  27. package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js.map +1 -1
  28. package/dist/cjs/limel-snackbar.cjs.entry.js +1 -1
  29. package/dist/cjs/{link-helper-b7e6c8df.js → link-helper-563b01c0.js} +3 -1
  30. package/dist/cjs/link-helper-563b01c0.js.map +1 -0
  31. package/dist/cjs/loader.cjs.js +1 -1
  32. package/dist/cjs/{translations-988a3f51.js → translations-83a68e56.js} +25 -1
  33. package/dist/cjs/translations-83a68e56.js.map +1 -0
  34. package/dist/collection/collection-manifest.json +1 -0
  35. package/dist/collection/components/chip/chip.js +2 -2
  36. package/dist/collection/components/text-editor/link-menu/editor-link-menu.css +12 -0
  37. package/dist/collection/components/text-editor/link-menu/editor-link-menu.js +201 -0
  38. package/dist/collection/components/text-editor/link-menu/editor-link-menu.js.map +1 -0
  39. package/dist/collection/components/text-editor/prosemirror-adapter/menu/menu-commands.js +72 -11
  40. package/dist/collection/components/text-editor/prosemirror-adapter/menu/menu-commands.js.map +1 -1
  41. package/dist/collection/components/text-editor/prosemirror-adapter/menu/menu-items.js +6 -0
  42. package/dist/collection/components/text-editor/prosemirror-adapter/menu/menu-items.js.map +1 -1
  43. package/dist/collection/components/text-editor/prosemirror-adapter/menu/types.js.map +1 -1
  44. package/dist/collection/components/text-editor/prosemirror-adapter/plugins/link-plugin.js +172 -0
  45. package/dist/collection/components/text-editor/prosemirror-adapter/plugins/link-plugin.js.map +1 -0
  46. package/dist/collection/components/text-editor/prosemirror-adapter/prosemirror-adapter.css +4 -0
  47. package/dist/collection/components/text-editor/prosemirror-adapter/prosemirror-adapter.js +53 -6
  48. package/dist/collection/components/text-editor/prosemirror-adapter/prosemirror-adapter.js.map +1 -1
  49. package/dist/collection/translations/da.js +4 -0
  50. package/dist/collection/translations/da.js.map +1 -1
  51. package/dist/collection/translations/en.js +4 -0
  52. package/dist/collection/translations/en.js.map +1 -1
  53. package/dist/collection/translations/fi.js +4 -0
  54. package/dist/collection/translations/fi.js.map +1 -1
  55. package/dist/collection/translations/nl.js +4 -0
  56. package/dist/collection/translations/nl.js.map +1 -1
  57. package/dist/collection/translations/no.js +4 -0
  58. package/dist/collection/translations/no.js.map +1 -1
  59. package/dist/collection/translations/sv.js +4 -0
  60. package/dist/collection/translations/sv.js.map +1 -1
  61. package/dist/collection/util/link-helper.js +1 -1
  62. package/dist/collection/util/link-helper.js.map +1 -1
  63. package/dist/esm/component-db286494.js +2440 -0
  64. package/dist/esm/component-db286494.js.map +1 -0
  65. package/dist/esm/{dom-ae531ebc.js → debounce-9a05c91c.js} +2 -31
  66. package/dist/esm/debounce-9a05c91c.js.map +1 -0
  67. package/dist/esm/dom-0b0170a0.js +32 -0
  68. package/dist/esm/dom-0b0170a0.js.map +1 -0
  69. package/dist/esm/lime-elements.js +1 -1
  70. package/dist/esm/{limel-action-bar_3.entry.js → limel-action-bar_4.entry.js} +68 -2
  71. package/dist/esm/limel-action-bar_4.entry.js.map +1 -0
  72. package/dist/esm/{limel-breadcrumbs_7.entry.js → limel-breadcrumbs_5.entry.js} +404 -3347
  73. package/dist/esm/limel-breadcrumbs_5.entry.js.map +1 -0
  74. package/dist/esm/limel-callout.entry.js +1 -1
  75. package/dist/esm/limel-chip_2.entry.js +2 -2
  76. package/dist/esm/limel-dynamic-label_4.entry.js +603 -0
  77. package/dist/esm/limel-dynamic-label_4.entry.js.map +1 -0
  78. package/dist/esm/limel-file-viewer.entry.js +1 -1
  79. package/dist/esm/limel-file.entry.js +1 -1
  80. package/dist/esm/limel-flatpickr-adapter.entry.js +1 -1
  81. package/dist/esm/limel-form.entry.js +1 -1
  82. package/dist/esm/limel-form.entry.js.map +1 -1
  83. package/dist/esm/{limel-portal.entry.js → limel-icon_2.entry.js} +201 -2
  84. package/dist/esm/limel-icon_2.entry.js.map +1 -0
  85. package/dist/esm/limel-picker.entry.js +2 -1
  86. package/dist/esm/limel-picker.entry.js.map +1 -1
  87. package/dist/esm/limel-prosemirror-adapter.entry.js +294 -16
  88. package/dist/esm/limel-prosemirror-adapter.entry.js.map +1 -1
  89. package/dist/esm/limel-snackbar.entry.js +1 -1
  90. package/dist/esm/{link-helper-725a9166.js → link-helper-2a16b323.js} +2 -2
  91. package/dist/esm/link-helper-2a16b323.js.map +1 -0
  92. package/dist/esm/loader.js +1 -1
  93. package/dist/esm/{translations-e73d7840.js → translations-5ae8ec7b.js} +25 -1
  94. package/dist/esm/translations-5ae8ec7b.js.map +1 -0
  95. package/dist/lime-elements/lime-elements.esm.js +1 -1
  96. package/dist/lime-elements/lime-elements.esm.js.map +1 -1
  97. package/dist/lime-elements/p-18c97232.js +2 -0
  98. package/dist/lime-elements/p-18c97232.js.map +1 -0
  99. package/dist/lime-elements/{p-5cfed8a8.entry.js → p-26a43fd9.entry.js} +5 -5
  100. package/dist/lime-elements/p-29e0e5bd.js +2 -0
  101. package/dist/lime-elements/p-29e0e5bd.js.map +1 -0
  102. package/dist/lime-elements/{p-dfc28411.entry.js → p-42b6ba6d.entry.js} +2 -2
  103. package/dist/lime-elements/{p-c8ce7cd4.entry.js → p-4bd0b7fb.entry.js} +2 -2
  104. package/dist/lime-elements/p-50b604b9.entry.js +2 -0
  105. package/dist/lime-elements/p-50b604b9.entry.js.map +1 -0
  106. package/dist/lime-elements/{p-ab13cb4a.entry.js → p-5e2604e5.entry.js} +2 -2
  107. package/dist/lime-elements/p-5e7b7b03.js +2 -0
  108. package/dist/lime-elements/p-5e7b7b03.js.map +1 -0
  109. package/dist/lime-elements/{p-516619d3.js → p-6465625e.js} +2 -2
  110. package/dist/lime-elements/p-6465625e.js.map +1 -0
  111. package/dist/lime-elements/{p-7681dae8.entry.js → p-70bfa812.entry.js} +2 -2
  112. package/dist/lime-elements/p-8d71c9e5.entry.js +2 -0
  113. package/dist/lime-elements/p-8d71c9e5.entry.js.map +1 -0
  114. package/dist/lime-elements/{p-e3eb403a.entry.js → p-91a8c244.entry.js} +2 -2
  115. package/dist/lime-elements/p-b8bfe44d.entry.js +2 -0
  116. package/dist/lime-elements/{p-3f4d2f62.entry.js.map → p-b8bfe44d.entry.js.map} +1 -1
  117. package/dist/lime-elements/p-bcfb5db5.entry.js +68 -0
  118. package/dist/lime-elements/p-bcfb5db5.entry.js.map +1 -0
  119. package/dist/lime-elements/p-d4d2593b.entry.js +2 -0
  120. package/dist/lime-elements/p-d4d2593b.entry.js.map +1 -0
  121. package/dist/lime-elements/p-eb9ab3d4.entry.js +2 -0
  122. package/dist/lime-elements/p-eb9ab3d4.entry.js.map +1 -0
  123. package/dist/lime-elements/p-f764b655.js +200 -0
  124. package/dist/lime-elements/p-f764b655.js.map +1 -0
  125. package/dist/lime-elements/{p-cfe4e725.entry.js → p-fe5e8f22.entry.js} +2 -2
  126. package/dist/lime-elements/{p-cfe4e725.entry.js.map → p-fe5e8f22.entry.js.map} +1 -1
  127. package/dist/types/components/file-viewer/file-viewer.d.ts +126 -0
  128. package/dist/types/components/progress-flow/progress-flow-item/progress-flow-item.d.ts +36 -0
  129. package/dist/types/components/progress-flow/progress-flow.d.ts +49 -0
  130. package/dist/types/components/text-editor/link-menu/editor-link-menu.d.ts +47 -0
  131. package/dist/types/components/text-editor/prosemirror-adapter/menu/menu-commands.d.ts +5 -2
  132. package/dist/types/components/text-editor/prosemirror-adapter/menu/types.d.ts +49 -0
  133. package/dist/types/components/text-editor/prosemirror-adapter/plugins/link-plugin.d.ts +9 -0
  134. package/dist/types/components/text-editor/prosemirror-adapter/prosemirror-adapter.d.ts +14 -3
  135. package/dist/types/components.d.ts +79 -0
  136. package/dist/types/translations/da.d.ts +4 -0
  137. package/dist/types/translations/en.d.ts +4 -0
  138. package/dist/types/translations/fi.d.ts +4 -0
  139. package/dist/types/translations/nl.d.ts +4 -0
  140. package/dist/types/translations/no.d.ts +4 -0
  141. package/dist/types/translations/sv.d.ts +4 -0
  142. package/dist/types/util/link-helper.d.ts +1 -0
  143. package/package.json +2 -2
  144. package/dist/cjs/dom-ee8ee17d.js.map +0 -1
  145. package/dist/cjs/limel-action-bar_3.cjs.entry.js.map +0 -1
  146. package/dist/cjs/limel-breadcrumbs_7.cjs.entry.js.map +0 -1
  147. package/dist/cjs/limel-dynamic-label_2.cjs.entry.js +0 -91
  148. package/dist/cjs/limel-dynamic-label_2.cjs.entry.js.map +0 -1
  149. package/dist/cjs/limel-icon.cjs.entry.js +0 -208
  150. package/dist/cjs/limel-icon.cjs.entry.js.map +0 -1
  151. package/dist/cjs/limel-portal.cjs.entry.js.map +0 -1
  152. package/dist/cjs/link-helper-b7e6c8df.js.map +0 -1
  153. package/dist/cjs/translations-988a3f51.js.map +0 -1
  154. package/dist/esm/dom-ae531ebc.js.map +0 -1
  155. package/dist/esm/limel-action-bar_3.entry.js.map +0 -1
  156. package/dist/esm/limel-breadcrumbs_7.entry.js.map +0 -1
  157. package/dist/esm/limel-dynamic-label_2.entry.js +0 -86
  158. package/dist/esm/limel-dynamic-label_2.entry.js.map +0 -1
  159. package/dist/esm/limel-icon.entry.js +0 -204
  160. package/dist/esm/limel-icon.entry.js.map +0 -1
  161. package/dist/esm/limel-portal.entry.js.map +0 -1
  162. package/dist/esm/link-helper-725a9166.js.map +0 -1
  163. package/dist/esm/translations-e73d7840.js.map +0 -1
  164. package/dist/lime-elements/p-2f453044.entry.js +0 -266
  165. package/dist/lime-elements/p-2f453044.entry.js.map +0 -1
  166. package/dist/lime-elements/p-35a4a846.entry.js +0 -2
  167. package/dist/lime-elements/p-35a4a846.entry.js.map +0 -1
  168. package/dist/lime-elements/p-3f4d2f62.entry.js +0 -2
  169. package/dist/lime-elements/p-516619d3.js.map +0 -1
  170. package/dist/lime-elements/p-5c9fbe6f.entry.js +0 -2
  171. package/dist/lime-elements/p-5c9fbe6f.entry.js.map +0 -1
  172. package/dist/lime-elements/p-714d6937.js +0 -2
  173. package/dist/lime-elements/p-714d6937.js.map +0 -1
  174. package/dist/lime-elements/p-a0fc1875.entry.js +0 -2
  175. package/dist/lime-elements/p-a0fc1875.entry.js.map +0 -1
  176. package/dist/lime-elements/p-a2d19673.entry.js +0 -2
  177. package/dist/lime-elements/p-a2d19673.entry.js.map +0 -1
  178. package/dist/lime-elements/p-cd6b9ff0.js +0 -2
  179. package/dist/lime-elements/p-cd6b9ff0.js.map +0 -1
  180. package/dist/lime-elements/p-f548d996.entry.js +0 -2
  181. package/dist/lime-elements/p-f548d996.entry.js.map +0 -1
  182. /package/dist/lime-elements/{p-5cfed8a8.entry.js.map → p-26a43fd9.entry.js.map} +0 -0
  183. /package/dist/lime-elements/{p-dfc28411.entry.js.map → p-42b6ba6d.entry.js.map} +0 -0
  184. /package/dist/lime-elements/{p-c8ce7cd4.entry.js.map → p-4bd0b7fb.entry.js.map} +0 -0
  185. /package/dist/lime-elements/{p-ab13cb4a.entry.js.map → p-5e2604e5.entry.js.map} +0 -0
  186. /package/dist/lime-elements/{p-7681dae8.entry.js.map → p-70bfa812.entry.js.map} +0 -0
  187. /package/dist/lime-elements/{p-e3eb403a.entry.js.map → p-91a8c244.entry.js.map} +0 -0
@@ -0,0 +1,126 @@
1
+ import { EventEmitter } from '../../stencil-public-runtime';
2
+ import { Languages } from '../date-picker/date.types';
3
+ import { ListItem } from '../list/list-item.types';
4
+ import { OfficeViewer } from './file-viewer.types';
5
+ /**
6
+ * This is a smart component that automatically detects
7
+ * the most common file types such as image, audio, video, and text,
8
+ * and properly displays them in the browser.
9
+ * The component is also capable to render the most common office files.
10
+ *
11
+ * :::note
12
+ * Image files will always be contained in their containers, which means
13
+ * they automatically increase or decrease in size to fill their containing box
14
+ * whilst preserving their aspect-ratio.
15
+ *
16
+ * Text and PDF files will also always respect the width and height of the
17
+ * container in which the `limel-file-viewer` is loaded.
18
+ * :::
19
+ *
20
+ * For some file types such as text and images, the component will display a
21
+ * download button and a button to open the file in a new browser tab.
22
+ * This will allow users to preview the file in a fullscreen mode with the
23
+ * browser and take advantage of for example native zooming and panning
24
+ * functionalities.
25
+ *
26
+ * @exampleComponent limel-example-file-viewer
27
+ * @exampleComponent limel-example-file-viewer-office
28
+ * @exampleComponent limel-example-file-viewer-filename
29
+ * @exampleComponent limel-example-file-viewer-inbuilt-actions
30
+ * @exampleComponent limel-example-file-viewer-custom-actions
31
+ * @exampleComponent limel-example-file-viewer-with-picker
32
+ * @private
33
+ */
34
+ export declare class FileViewer {
35
+ /**
36
+ * Link to the file
37
+ */
38
+ url: string;
39
+ /**
40
+ * The name of the file that must also contains its extension.
41
+ * This overrides the filename that the `url` ends with.
42
+ * Useful when the `url` does not contain the filename.
43
+ * When specified, the `filename` will be used as filename of
44
+ * the downloaded file.
45
+ */
46
+ filename?: string;
47
+ /**
48
+ * An optional alternative text, mainly for assistive technologies and screen readers.
49
+ * It is used for only image files, as an `alt` attribute.
50
+ * Should optimally hold a description of the image,
51
+ * which is also displayed on the page if the image can't be loaded for some reason.
52
+ */
53
+ alt?: string;
54
+ /**
55
+ * Displays a button that allows the user to view the file
56
+ * in fullscreen mode.
57
+ * Not displayed for office files!
58
+ */
59
+ allowFullscreen?: boolean;
60
+ /**
61
+ * Displays a button that allows the user to open the file
62
+ * in a new browser tab.
63
+ * Not displayed for office files!
64
+ */
65
+ allowOpenInNewTab?: boolean;
66
+ /**
67
+ * Displays a button that allows the user to download the file.
68
+ * Note that due to the browser's security policies,
69
+ * the file should be hosted on the same domain
70
+ * for the download button to work properly.
71
+ * Not displayed for office files!
72
+ */
73
+ allowDownload?: boolean;
74
+ /**
75
+ * Defines the localization for translations.
76
+ */
77
+ language: Languages;
78
+ /**
79
+ * Defines the third-party viewer that should be used to render
80
+ * the content of office files, such as word processing documents,
81
+ * presentations, or spreadsheets.
82
+ */
83
+ officeViewer: OfficeViewer;
84
+ /**
85
+ * An array of custom actions that can be displayed
86
+ * as an action menu on the file which is being displayed.
87
+ */
88
+ actions: ListItem[];
89
+ /**
90
+ * Emitted when a custom action is selected from the action menu.
91
+ */
92
+ action: EventEmitter<ListItem>;
93
+ HostElement: HTMLLimelFileViewerElement;
94
+ private fullscreen;
95
+ private isFullscreen;
96
+ private fileType;
97
+ /**
98
+ * True while the file is being loaded.
99
+ */
100
+ private loading;
101
+ private fileUrl;
102
+ constructor();
103
+ componentWillLoad(): Promise<void>;
104
+ render(): any;
105
+ protected watchUrl(newUrl: string, oldUrl: string): Promise<void>;
106
+ private renderFileViewer;
107
+ private renderPdf;
108
+ private renderImage;
109
+ private renderVideo;
110
+ private renderAudio;
111
+ private renderText;
112
+ private renderOffice;
113
+ private isOfficeFileAccessibleViaURL;
114
+ private getOfficeViewerUrl;
115
+ private renderNoFileSupportMessage;
116
+ private renderButtons;
117
+ private renderToggleFullscreenButton;
118
+ private renderDownloadButton;
119
+ private renderOpenInNewTabButton;
120
+ private renderActionMenu;
121
+ private createURL;
122
+ private handleToggleFullscreen;
123
+ private emitOnAction;
124
+ private getTranslation;
125
+ }
126
+ //# sourceMappingURL=file-viewer.d.ts.map
@@ -0,0 +1,36 @@
1
+ import { EventEmitter } from '../../../stencil-public-runtime';
2
+ import { FlowItem } from '../progress-flow.types';
3
+ /**
4
+ * @private
5
+ */
6
+ export declare class ProgressFlowItem {
7
+ element: HTMLLimelProgressFlowItemElement;
8
+ /**
9
+ * The flow item that should be rendered
10
+ */
11
+ item: FlowItem;
12
+ /**
13
+ * True if the flow item should be disabled
14
+ */
15
+ disabled: boolean;
16
+ /**
17
+ * True if the flow item should be readonly
18
+ */
19
+ readonly: boolean;
20
+ /**
21
+ * True for current step
22
+ */
23
+ currentStep: boolean;
24
+ /**
25
+ * Fired when clicking on the flow item
26
+ */
27
+ interact: EventEmitter<void>;
28
+ render(): any[];
29
+ private isDisabled;
30
+ private getToolTipText;
31
+ private handleClick;
32
+ private renderSecondaryText;
33
+ private renderIcon;
34
+ private renderDivider;
35
+ }
36
+ //# sourceMappingURL=progress-flow-item.d.ts.map
@@ -0,0 +1,49 @@
1
+ import { EventEmitter } from '../../stencil-public-runtime';
2
+ import { FlowItem } from './progress-flow.types';
3
+ /**
4
+ * @exampleComponent limel-example-progress-flow-basic
5
+ * @exampleComponent limel-example-progress-flow-secondary-text
6
+ * @exampleComponent limel-example-progress-flow-disabled-step
7
+ * @exampleComponent limel-example-progress-flow-colors
8
+ * @exampleComponent limel-example-progress-flow-colors-css
9
+ * @exampleComponent limel-example-progress-flow-off-progress-steps
10
+ * @exampleComponent limel-example-progress-flow-narrow
11
+ */
12
+ export declare class ProgressFlow {
13
+ element: HTMLLimelProgressFlowElement;
14
+ /**
15
+ * What flow items to render
16
+ */
17
+ flowItems: FlowItem[];
18
+ /**
19
+ * Set to `true` to disable the progress flow.
20
+ * Use `disabled` to indicate that the component can normally be interacted
21
+ * with, but is currently disabled. This tells the user that if certain
22
+ * requirements are met, the field may become enabled again.
23
+ */
24
+ disabled: boolean;
25
+ /**
26
+ * Disables the progress flow when `true`.
27
+ * This does not visualize the component that much differently.
28
+ * But since the component does not provide any feedback that users can
29
+ * interact with the component, it makes it perfect for illustrative and
30
+ * informative porpuses.
31
+ */
32
+ readonly: boolean;
33
+ /**
34
+ * Fired when a new value has been selected from the progress flow
35
+ */
36
+ change: EventEmitter<FlowItem>;
37
+ private selectedItemIndex;
38
+ componentDidRender(): void;
39
+ componentDidLoad(): void;
40
+ render(): any[][];
41
+ private renderRegularFlowItem;
42
+ private renderEndPhaseItem;
43
+ private handleFlowItemClick;
44
+ private getItemStyle;
45
+ private scrollToSelectedItem;
46
+ private getElementForSelectedItem;
47
+ private triggerIconColorWarning;
48
+ }
49
+ //# sourceMappingURL=progress-flow.d.ts.map
@@ -0,0 +1,47 @@
1
+ import { EditorTextLink } from '../prosemirror-adapter/menu/types';
2
+ import { Languages } from '../../date-picker/date.types';
3
+ /**
4
+ * This component is a menu for editing a link in the text editor.
5
+ * It allows the user to input the text and url for the link.
6
+ * @beta
7
+ * @private
8
+ */
9
+ export declare class TextEditorLinkMenu {
10
+ /**
11
+ * The link
12
+ */
13
+ link: EditorTextLink;
14
+ /**
15
+ * Defines the language for translations.
16
+ * Will translate the translatable strings on the components.
17
+ */
18
+ language: Languages;
19
+ /**
20
+ * Open state of the dialog
21
+ */
22
+ isOpen: boolean;
23
+ /**
24
+ * Emitted when the menu is closed from inside the component.
25
+ * (*Not* emitted when the consumer sets the `open`-property to `false`.)
26
+ */
27
+ private cancel;
28
+ /**
29
+ * Emitted when the menu is saved from inside the component.
30
+ */
31
+ private save;
32
+ /**
33
+ * Emitted when the user inputs new values for the link
34
+ */
35
+ private linkChange;
36
+ private invalidLink;
37
+ render(): any[];
38
+ private getTranslation;
39
+ private validateLink;
40
+ private handleCancel;
41
+ private handleSave;
42
+ private handleLinkInputAction;
43
+ private handleLinkTitleChange;
44
+ private handleLinkValueChange;
45
+ private emitLinkChange;
46
+ }
47
+ //# sourceMappingURL=editor-link-menu.d.ts.map
@@ -1,13 +1,15 @@
1
1
  import { Schema } from 'prosemirror-model';
2
2
  import { Command, EditorState } from 'prosemirror-state';
3
- import { EditorMenuTypes } from './types';
3
+ import { EditorMenuTypes, EditorTextLink } from './types';
4
4
  export interface CommandWithActive extends Command {
5
5
  active?: (state: EditorState) => boolean;
6
6
  }
7
+ export declare const isExternalLink: (url: string) => boolean;
8
+ export declare const isValidUrl: (text: string) => boolean;
7
9
  export declare class MenuCommandFactory {
8
10
  private schema;
9
11
  constructor(schema: Schema);
10
- getCommand(mark: EditorMenuTypes, url?: string): CommandWithActive;
12
+ getCommand(mark: EditorMenuTypes, link?: EditorTextLink): CommandWithActive;
11
13
  buildKeymap(): {
12
14
  'Mod-B': CommandWithActive;
13
15
  'Mod-I': CommandWithActive;
@@ -17,6 +19,7 @@ export declare class MenuCommandFactory {
17
19
  'Mod-Shift-X': CommandWithActive;
18
20
  'Mod-`': CommandWithActive;
19
21
  'Mod-Shift-C': CommandWithActive;
22
+ 'Mod-v': Command;
20
23
  };
21
24
  }
22
25
  //# sourceMappingURL=menu-commands.d.ts.map
@@ -0,0 +1,49 @@
1
+ /**
2
+ * The `EditorMenuType` type is used to specify the type of menu items that can be added to the editor toolbar.
3
+ * Each one represents a different type to be used for creating the prosemirror commands relevant to the button.
4
+ * The values correspond to the types that can be used with the `prosemirror-commands` library.
5
+ * @beta
6
+ */
7
+ export declare const EditorMenuTypes: {
8
+ Bold: string;
9
+ Italic: string;
10
+ Blockquote: string;
11
+ HeaderLevel1: string;
12
+ HeaderLevel2: string;
13
+ HeaderLevel3: string;
14
+ Link: string;
15
+ OrderedList: string;
16
+ BulletList: string;
17
+ Strikethrough: string;
18
+ Code: string;
19
+ CodeBlock: string;
20
+ };
21
+ export type EditorMenuTypes = (typeof EditorMenuTypes)[keyof typeof EditorMenuTypes];
22
+ /**
23
+ * `LevelMapping` is used to map string identifiers to numerical header levels.
24
+ * It provides a way to represent different levels of headings in ProseMirror commands.
25
+ *
26
+ * The `Heading` identifier is not a valid level and is used to identify the node type.
27
+ * The numerical values are used for creating ProseMirror commands to set the level of a heading node in the editor.
28
+ * @beta
29
+ */
30
+ export declare const LevelMapping: {
31
+ Heading: string;
32
+ one: number;
33
+ two: number;
34
+ three: number;
35
+ };
36
+ export type LevelMapping = (typeof LevelMapping)[keyof typeof LevelMapping];
37
+ export type ProseMirrorAdapterElementWithFocus = HTMLLimelProsemirrorAdapterElement & {
38
+ setFocus: () => void;
39
+ };
40
+ /**
41
+ * The `EditorTextLink` type is used to represent a link in the editor.
42
+ * @beta
43
+ * @private
44
+ */
45
+ export type EditorTextLink = {
46
+ text?: string;
47
+ href: string;
48
+ };
49
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,9 @@
1
+ import { Plugin, PluginKey } from 'prosemirror-state';
2
+ export declare const linkPluginKey: PluginKey<any>;
3
+ export type UpdateLinkCallback = (text: string, href: string) => void;
4
+ export interface EditorLinkMenuEventDetail {
5
+ href: string;
6
+ text: string;
7
+ }
8
+ export declare const createLinkPlugin: (updateLinkCallback?: UpdateLinkCallback) => Plugin<any>;
9
+ //# sourceMappingURL=link-plugin.d.ts.map
@@ -1,4 +1,3 @@
1
- import { PluginKey } from 'prosemirror-state';
2
1
  import { Languages } from '../../date-picker/date.types';
3
2
  /**
4
3
  * The ProseMirror adapter offers a rich text editing experience with markdown support.
@@ -25,8 +24,14 @@ export declare class ProsemirrorAdapter {
25
24
  */
26
25
  language: Languages;
27
26
  private host;
27
+ private portalId;
28
28
  private view;
29
29
  private actionBarItems;
30
+ private link;
31
+ /**
32
+ * Open state of the dialog
33
+ */
34
+ isLinkMenuOpen: boolean;
30
35
  private menuCommandFactory;
31
36
  private schema;
32
37
  private contentConverter;
@@ -35,11 +40,13 @@ export declare class ProsemirrorAdapter {
35
40
  * Dispatched when a change is made to the editor
36
41
  */
37
42
  private change;
43
+ constructor();
44
+ private actionBarPluginKey;
38
45
  protected watchValue(newValue: string): void;
39
46
  componentWillLoad(): void;
40
47
  componentDidLoad(): void;
41
- render(): any[];
42
48
  disconnectedCallback(): void;
49
+ render(): any[];
43
50
  private setupContentConverter;
44
51
  private getActionBarItems;
45
52
  private getTranslatedItem;
@@ -50,10 +57,14 @@ export declare class ProsemirrorAdapter {
50
57
  private updateView;
51
58
  private handleTransaction;
52
59
  private handleActionBarItem;
60
+ private handleCancelLinkMenu;
61
+ private handleSaveLinkMenu;
62
+ private handleLinkChange;
53
63
  private dispatchMenuCommand;
54
64
  setFocus(): void;
55
- actionBarPluginKey: PluginKey<any>;
56
65
  private updateActionBarItems;
57
66
  private createMenuStateTrackingPlugin;
67
+ private handleNewLinkSelection;
68
+ private handleOpenLinkMenu;
58
69
  }
59
70
  //# sourceMappingURL=prosemirror-adapter.d.ts.map
@@ -42,6 +42,7 @@ import { SpinnerSize } from "./components/spinner/spinner.types";
42
42
  import { Tab } from "./components/tab-bar/tab.types";
43
43
  import { Column, ColumnAggregate, ColumnSorter, TableParams } from "./components/table/table.types";
44
44
  import { Layout } from "./components/table/layout";
45
+ import { EditorTextLink } from "./components/text-editor/prosemirror-adapter/menu/types";
45
46
  export { ActionBarItem } from "./components/action-bar/action-bar.types";
46
47
  export { ListItem, ListSeparator } from "./components/list/list-item.types";
47
48
  export { MenuItem, MenuSearcher, OpenDirection, SurfaceWidth } from "./components/menu/menu.types";
@@ -79,6 +80,7 @@ export { SpinnerSize } from "./components/spinner/spinner.types";
79
80
  export { Tab } from "./components/tab-bar/tab.types";
80
81
  export { Column, ColumnAggregate, ColumnSorter, TableParams } from "./components/table/table.types";
81
82
  export { Layout } from "./components/table/layout";
83
+ export { EditorTextLink } from "./components/text-editor/prosemirror-adapter/menu/types";
82
84
  export namespace Components {
83
85
  /**
84
86
  * An action bar is a user interface element commonly found in software applications and websites.
@@ -2565,6 +2567,26 @@ export namespace Components {
2565
2567
  */
2566
2568
  "value": string;
2567
2569
  }
2570
+ /**
2571
+ * This component is a menu for editing a link in the text editor.
2572
+ * It allows the user to input the text and url for the link.
2573
+ * @beta
2574
+ * @private
2575
+ */
2576
+ interface LimelTextEditorLinkMenu {
2577
+ /**
2578
+ * Open state of the dialog
2579
+ */
2580
+ "isOpen": boolean;
2581
+ /**
2582
+ * Defines the language for translations. Will translate the translatable strings on the components.
2583
+ */
2584
+ "language": Languages;
2585
+ /**
2586
+ * The link
2587
+ */
2588
+ "link": EditorTextLink;
2589
+ }
2568
2590
  /**
2569
2591
  * A tooltip can be used to display a descriptive text for any element.
2570
2592
  * The displayed content must be a brief and supplemental string of text,
@@ -2809,6 +2831,10 @@ export interface LimelTextEditorCustomEvent<T> extends CustomEvent<T> {
2809
2831
  detail: T;
2810
2832
  target: HTMLLimelTextEditorElement;
2811
2833
  }
2834
+ export interface LimelTextEditorLinkMenuCustomEvent<T> extends CustomEvent<T> {
2835
+ detail: T;
2836
+ target: HTMLLimelTextEditorLinkMenuElement;
2837
+ }
2812
2838
  declare global {
2813
2839
  /**
2814
2840
  * An action bar is a user interface element commonly found in software applications and websites.
@@ -4095,6 +4121,18 @@ declare global {
4095
4121
  prototype: HTMLLimelTextEditorElement;
4096
4122
  new (): HTMLLimelTextEditorElement;
4097
4123
  };
4124
+ /**
4125
+ * This component is a menu for editing a link in the text editor.
4126
+ * It allows the user to input the text and url for the link.
4127
+ * @beta
4128
+ * @private
4129
+ */
4130
+ interface HTMLLimelTextEditorLinkMenuElement extends Components.LimelTextEditorLinkMenu, HTMLStencilElement {
4131
+ }
4132
+ var HTMLLimelTextEditorLinkMenuElement: {
4133
+ prototype: HTMLLimelTextEditorLinkMenuElement;
4134
+ new (): HTMLLimelTextEditorLinkMenuElement;
4135
+ };
4098
4136
  /**
4099
4137
  * A tooltip can be used to display a descriptive text for any element.
4100
4138
  * The displayed content must be a brief and supplemental string of text,
@@ -4214,6 +4252,7 @@ declare global {
4214
4252
  "limel-tab-panel": HTMLLimelTabPanelElement;
4215
4253
  "limel-table": HTMLLimelTableElement;
4216
4254
  "limel-text-editor": HTMLLimelTextEditorElement;
4255
+ "limel-text-editor-link-menu": HTMLLimelTextEditorLinkMenuElement;
4217
4256
  "limel-tooltip": HTMLLimelTooltipElement;
4218
4257
  "limel-tooltip-content": HTMLLimelTooltipContentElement;
4219
4258
  }
@@ -6952,6 +6991,38 @@ declare namespace LocalJSX {
6952
6991
  */
6953
6992
  "value"?: string;
6954
6993
  }
6994
+ /**
6995
+ * This component is a menu for editing a link in the text editor.
6996
+ * It allows the user to input the text and url for the link.
6997
+ * @beta
6998
+ * @private
6999
+ */
7000
+ interface LimelTextEditorLinkMenu {
7001
+ /**
7002
+ * Open state of the dialog
7003
+ */
7004
+ "isOpen"?: boolean;
7005
+ /**
7006
+ * Defines the language for translations. Will translate the translatable strings on the components.
7007
+ */
7008
+ "language"?: Languages;
7009
+ /**
7010
+ * The link
7011
+ */
7012
+ "link"?: EditorTextLink;
7013
+ /**
7014
+ * Emitted when the menu is closed from inside the component. (*Not* emitted when the consumer sets the `open`-property to `false`.)
7015
+ */
7016
+ "onCancel"?: (event: LimelTextEditorLinkMenuCustomEvent<void>) => void;
7017
+ /**
7018
+ * Emitted when the user inputs new values for the link
7019
+ */
7020
+ "onLinkChange"?: (event: LimelTextEditorLinkMenuCustomEvent<EditorTextLink>) => void;
7021
+ /**
7022
+ * Emitted when the menu is saved from inside the component.
7023
+ */
7024
+ "onSave"?: (event: LimelTextEditorLinkMenuCustomEvent<void>) => void;
7025
+ }
6955
7026
  /**
6956
7027
  * A tooltip can be used to display a descriptive text for any element.
6957
7028
  * The displayed content must be a brief and supplemental string of text,
@@ -7095,6 +7166,7 @@ declare namespace LocalJSX {
7095
7166
  "limel-tab-panel": LimelTabPanel;
7096
7167
  "limel-table": LimelTable;
7097
7168
  "limel-text-editor": LimelTextEditor;
7169
+ "limel-text-editor-link-menu": LimelTextEditorLinkMenu;
7098
7170
  "limel-tooltip": LimelTooltip;
7099
7171
  "limel-tooltip-content": LimelTooltipContent;
7100
7172
  }
@@ -8073,6 +8145,13 @@ declare module "@stencil/core" {
8073
8145
  * @private
8074
8146
  */
8075
8147
  "limel-text-editor": LocalJSX.LimelTextEditor & JSXBase.HTMLAttributes<HTMLLimelTextEditorElement>;
8148
+ /**
8149
+ * This component is a menu for editing a link in the text editor.
8150
+ * It allows the user to input the text and url for the link.
8151
+ * @beta
8152
+ * @private
8153
+ */
8154
+ "limel-text-editor-link-menu": LocalJSX.LimelTextEditorLinkMenu & JSXBase.HTMLAttributes<HTMLLimelTextEditorLinkMenuElement>;
8076
8155
  /**
8077
8156
  * A tooltip can be used to display a descriptive text for any element.
8078
8157
  * The displayed content must be a brief and supplemental string of text,
@@ -1,5 +1,7 @@
1
1
  declare const _default: {
2
2
  remove: string;
3
+ save: string;
4
+ cancel: string;
3
5
  'callout.note': string;
4
6
  'callout.important': string;
5
7
  'callout.tip': string;
@@ -26,6 +28,8 @@ declare const _default: {
26
28
  'editor-menu.numbered-list': string;
27
29
  'editor-menu.blockquote': string;
28
30
  'editor-menu.link': string;
31
+ 'editor-link-menu.text': string;
32
+ 'editor-link-menu.link': string;
29
33
  };
30
34
  export default _default;
31
35
  //# sourceMappingURL=da.d.ts.map
@@ -1,5 +1,7 @@
1
1
  declare const _default: {
2
2
  remove: string;
3
+ save: string;
4
+ cancel: string;
3
5
  'callout.note': string;
4
6
  'callout.important': string;
5
7
  'callout.tip': string;
@@ -27,6 +29,8 @@ declare const _default: {
27
29
  'editor-menu.numbered-list': string;
28
30
  'editor-menu.blockquote': string;
29
31
  'editor-menu.link': string;
32
+ 'editor-link-menu.text': string;
33
+ 'editor-link-menu.link': string;
30
34
  };
31
35
  export default _default;
32
36
  //# sourceMappingURL=en.d.ts.map
@@ -1,5 +1,7 @@
1
1
  declare const _default: {
2
2
  remove: string;
3
+ save: string;
4
+ canceL: string;
3
5
  'callout.note': string;
4
6
  'callout.important': string;
5
7
  'callout.tip': string;
@@ -26,6 +28,8 @@ declare const _default: {
26
28
  'editor-menu.numbered-list': string;
27
29
  'editor-menu.blockquote': string;
28
30
  'editor-menu.link': string;
31
+ 'editor-link-menu.text': string;
32
+ 'editor-link-menu.link': string;
29
33
  };
30
34
  export default _default;
31
35
  //# sourceMappingURL=fi.d.ts.map
@@ -1,5 +1,7 @@
1
1
  declare const _default: {
2
2
  remove: string;
3
+ save: string;
4
+ cancel: string;
3
5
  'callout.note': string;
4
6
  'callout.important': string;
5
7
  'callout.tip': string;
@@ -26,6 +28,8 @@ declare const _default: {
26
28
  'editor-menu.numbered-list': string;
27
29
  'editor-menu.blockquote': string;
28
30
  'editor-menu.link': string;
31
+ 'editor-link-menu.text': string;
32
+ 'editor-link-menu.link': string;
29
33
  };
30
34
  export default _default;
31
35
  //# sourceMappingURL=nl.d.ts.map
@@ -1,5 +1,7 @@
1
1
  declare const _default: {
2
2
  remove: string;
3
+ save: string;
4
+ cancel: string;
3
5
  'callout.note': string;
4
6
  'callout.important': string;
5
7
  'callout.tip': string;
@@ -26,6 +28,8 @@ declare const _default: {
26
28
  'editor-menu.numbered-list': string;
27
29
  'editor-menu.blockquote': string;
28
30
  'editor-menu.link': string;
31
+ 'editor-link-menu.text': string;
32
+ 'editor-link-menu.link': string;
29
33
  };
30
34
  export default _default;
31
35
  //# sourceMappingURL=no.d.ts.map
@@ -1,5 +1,7 @@
1
1
  declare const _default: {
2
2
  remove: string;
3
+ save: string;
4
+ cancel: string;
3
5
  'callout.note': string;
4
6
  'callout.important': string;
5
7
  'callout.tip': string;
@@ -27,6 +29,8 @@ declare const _default: {
27
29
  'editor-menu.numbered-list': string;
28
30
  'editor-menu.blockquote': string;
29
31
  'editor-menu.link': string;
32
+ 'editor-link-menu.text': string;
33
+ 'editor-link-menu.link': string;
30
34
  };
31
35
  export default _default;
32
36
  //# sourceMappingURL=sv.d.ts.map
@@ -1,4 +1,5 @@
1
1
  export declare function getHref(value: string): string;
2
2
  export declare function getTarget(value: string): "_self" | "_blank";
3
3
  export declare function prependProtocol(input: string): string;
4
+ export declare function hasKnownProtocol(input: string): boolean;
4
5
  //# sourceMappingURL=link-helper.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@limetech/lime-elements",
3
- "version": "37.45.2",
3
+ "version": "37.46.0",
4
4
  "description": "Lime Elements",
5
5
  "author": "Lime Technologies",
6
6
  "license": "Apache-2.0",
@@ -44,7 +44,7 @@
44
44
  },
45
45
  "devDependencies": {
46
46
  "@commitlint/config-conventional": "^19.2.2",
47
- "@microsoft/api-extractor": "^7.43.1",
47
+ "@microsoft/api-extractor": "^7.46.2",
48
48
  "@popperjs/core": "^2.11.8",
49
49
  "@rjsf/core": "^2.4.2",
50
50
  "@rollup/plugin-node-resolve": "^13.3.0",