@limetech/lime-elements 37.1.0-next.44 → 37.1.0-next.45

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 (137) hide show
  1. package/dist/cjs/{component-66df95e7.js → component-9c3fa668.js} +12 -935
  2. package/dist/cjs/component-9c3fa668.js.map +1 -0
  3. package/dist/cjs/component-a0124759.js +929 -0
  4. package/dist/cjs/component-a0124759.js.map +1 -0
  5. package/dist/cjs/lime-elements.cjs.js +1 -1
  6. package/dist/cjs/limel-callout.cjs.entry.js +1 -1
  7. package/dist/cjs/limel-chip-set.cjs.entry.js +1 -1
  8. package/dist/cjs/limel-code-editor.cjs.entry.js +189 -0
  9. package/dist/cjs/limel-code-editor.cjs.entry.js.map +1 -1
  10. package/dist/cjs/limel-file-viewer.cjs.entry.js +260 -0
  11. package/dist/cjs/limel-file-viewer.cjs.entry.js.map +1 -0
  12. package/dist/cjs/limel-file.cjs.entry.js +1 -1
  13. package/dist/cjs/limel-flatpickr-adapter.cjs.entry.js +1 -1
  14. package/dist/cjs/limel-icon-button.cjs.entry.js +8 -1
  15. package/dist/cjs/limel-icon-button.cjs.entry.js.map +1 -1
  16. package/dist/cjs/{limel-list_2.cjs.entry.js → limel-list.cjs.entry.js} +2 -122
  17. package/dist/cjs/limel-list.cjs.entry.js.map +1 -0
  18. package/dist/cjs/limel-menu-surface.cjs.entry.js +130 -0
  19. package/dist/cjs/limel-menu-surface.cjs.entry.js.map +1 -0
  20. package/dist/cjs/limel-menu_2.cjs.entry.js +14 -13
  21. package/dist/cjs/limel-menu_2.cjs.entry.js.map +1 -1
  22. package/dist/cjs/limel-snackbar.cjs.entry.js +1 -1
  23. package/dist/cjs/loader.cjs.js +1 -1
  24. package/dist/cjs/{translations-f8080c48.js → translations-a384b596.js} +37 -1
  25. package/dist/cjs/translations-a384b596.js.map +1 -0
  26. package/dist/collection/collection-manifest.json +1 -0
  27. package/dist/collection/components/code-editor/code-editor.js +2 -3
  28. package/dist/collection/components/code-editor/code-editor.js.map +1 -1
  29. package/dist/collection/components/code-editor/code-editor.types.js.map +1 -1
  30. package/dist/collection/components/file-viewer/extension-mapping.js +66 -0
  31. package/dist/collection/components/file-viewer/extension-mapping.js.map +1 -0
  32. package/dist/collection/components/file-viewer/file-viewer.css +266 -0
  33. package/dist/collection/components/file-viewer/file-viewer.js +387 -0
  34. package/dist/collection/components/file-viewer/file-viewer.js.map +1 -0
  35. package/dist/collection/components/file-viewer/file-viewer.types.js +2 -0
  36. package/dist/collection/components/file-viewer/file-viewer.types.js.map +1 -0
  37. package/dist/collection/components/file-viewer/fullscreen.js +43 -0
  38. package/dist/collection/components/file-viewer/fullscreen.js.map +1 -0
  39. package/dist/collection/components/icon-button/icon-button.js +8 -1
  40. package/dist/collection/components/icon-button/icon-button.js.map +1 -1
  41. package/dist/collection/translations/da.js +6 -0
  42. package/dist/collection/translations/da.js.map +1 -1
  43. package/dist/collection/translations/en.js +6 -0
  44. package/dist/collection/translations/en.js.map +1 -1
  45. package/dist/collection/translations/fi.js +6 -0
  46. package/dist/collection/translations/fi.js.map +1 -1
  47. package/dist/collection/translations/nl.js +6 -0
  48. package/dist/collection/translations/nl.js.map +1 -1
  49. package/dist/collection/translations/no.js +6 -0
  50. package/dist/collection/translations/no.js.map +1 -1
  51. package/dist/collection/translations/sv.js +6 -0
  52. package/dist/collection/translations/sv.js.map +1 -1
  53. package/dist/esm/{component-fffa3419.js → component-0be247ac.js} +13 -934
  54. package/dist/esm/component-0be247ac.js.map +1 -0
  55. package/dist/esm/component-6d079abe.js +926 -0
  56. package/dist/esm/component-6d079abe.js.map +1 -0
  57. package/dist/esm/lime-elements.js +1 -1
  58. package/dist/esm/limel-callout.entry.js +1 -1
  59. package/dist/esm/limel-chip-set.entry.js +1 -1
  60. package/dist/esm/limel-code-editor.entry.js +189 -0
  61. package/dist/esm/limel-code-editor.entry.js.map +1 -1
  62. package/dist/esm/limel-file-viewer.entry.js +256 -0
  63. package/dist/esm/limel-file-viewer.entry.js.map +1 -0
  64. package/dist/esm/limel-file.entry.js +1 -1
  65. package/dist/esm/limel-flatpickr-adapter.entry.js +1 -1
  66. package/dist/esm/limel-icon-button.entry.js +8 -1
  67. package/dist/esm/limel-icon-button.entry.js.map +1 -1
  68. package/dist/esm/{limel-list_2.entry.js → limel-list.entry.js} +3 -122
  69. package/dist/esm/limel-list.entry.js.map +1 -0
  70. package/dist/esm/limel-menu-surface.entry.js +126 -0
  71. package/dist/esm/limel-menu-surface.entry.js.map +1 -0
  72. package/dist/esm/limel-menu_2.entry.js +2 -1
  73. package/dist/esm/limel-menu_2.entry.js.map +1 -1
  74. package/dist/esm/limel-snackbar.entry.js +1 -1
  75. package/dist/esm/loader.js +1 -1
  76. package/dist/esm/{translations-f88bb584.js → translations-dea847ae.js} +37 -1
  77. package/dist/esm/translations-dea847ae.js.map +1 -0
  78. package/dist/lime-elements/lime-elements.esm.js +1 -1
  79. package/dist/lime-elements/lime-elements.esm.js.map +1 -1
  80. package/dist/lime-elements/p-3ee3dcdc.js +2 -0
  81. package/dist/lime-elements/p-3ee3dcdc.js.map +1 -0
  82. package/dist/lime-elements/p-45449868.entry.js +2 -0
  83. package/dist/lime-elements/p-45449868.entry.js.map +1 -0
  84. package/dist/lime-elements/{p-550cae4a.entry.js → p-4c100bed.entry.js} +2 -2
  85. package/dist/lime-elements/p-5dd6d677.js +82 -0
  86. package/dist/lime-elements/p-5dd6d677.js.map +1 -0
  87. package/dist/lime-elements/p-685e5867.entry.js +2 -0
  88. package/dist/lime-elements/p-685e5867.entry.js.map +1 -0
  89. package/dist/lime-elements/p-6fa8bf86.entry.js +2 -0
  90. package/dist/lime-elements/p-6fa8bf86.entry.js.map +1 -0
  91. package/dist/lime-elements/{p-9a5745e5.entry.js → p-6fac3a11.entry.js} +2 -2
  92. package/dist/lime-elements/{p-c9aee7a1.entry.js → p-80f0c441.entry.js} +2 -2
  93. package/dist/lime-elements/{p-cf61ac34.entry.js → p-8eff47a6.entry.js} +2 -2
  94. package/dist/lime-elements/p-9eab9eb2.entry.js +2 -0
  95. package/dist/lime-elements/p-9eab9eb2.entry.js.map +1 -0
  96. package/dist/lime-elements/p-b8deba1b.entry.js +2 -0
  97. package/dist/lime-elements/p-b8deba1b.entry.js.map +1 -0
  98. package/dist/lime-elements/{p-7972528a.entry.js → p-dbcae3a0.entry.js} +2 -2
  99. package/dist/lime-elements/p-e3b16b61.js +126 -0
  100. package/dist/lime-elements/p-e3b16b61.js.map +1 -0
  101. package/dist/lime-elements/{p-2d0587d5.entry.js → p-fed820d9.entry.js} +4 -4
  102. package/dist/lime-elements/{p-2d0587d5.entry.js.map → p-fed820d9.entry.js.map} +1 -1
  103. package/dist/types/components/code-editor/code-editor.d.ts +1 -2
  104. package/dist/types/components/code-editor/code-editor.types.d.ts +1 -1
  105. package/dist/types/components/file-viewer/extension-mapping.d.ts +1 -0
  106. package/dist/types/components/file-viewer/file-viewer.types.d.ts +2 -0
  107. package/dist/types/components/file-viewer/fullscreen.d.ts +9 -0
  108. package/dist/types/components/icon-button/icon-button.d.ts +1 -0
  109. package/dist/types/components.d.ts +209 -20
  110. package/dist/types/translations/da.d.ts +6 -0
  111. package/dist/types/translations/en.d.ts +6 -0
  112. package/dist/types/translations/fi.d.ts +6 -0
  113. package/dist/types/translations/nl.d.ts +6 -0
  114. package/dist/types/translations/no.d.ts +6 -0
  115. package/dist/types/translations/sv.d.ts +6 -0
  116. package/package.json +2 -2
  117. package/dist/cjs/component-66df95e7.js.map +0 -1
  118. package/dist/cjs/limel-list_2.cjs.entry.js.map +0 -1
  119. package/dist/cjs/translations-f8080c48.js.map +0 -1
  120. package/dist/esm/component-fffa3419.js.map +0 -1
  121. package/dist/esm/limel-list_2.entry.js.map +0 -1
  122. package/dist/esm/translations-f88bb584.js.map +0 -1
  123. package/dist/lime-elements/p-172385f4.entry.js +0 -2
  124. package/dist/lime-elements/p-172385f4.entry.js.map +0 -1
  125. package/dist/lime-elements/p-22031b5b.entry.js +0 -2
  126. package/dist/lime-elements/p-22031b5b.entry.js.map +0 -1
  127. package/dist/lime-elements/p-94cb40fb.entry.js +0 -2
  128. package/dist/lime-elements/p-94cb40fb.entry.js.map +0 -1
  129. package/dist/lime-elements/p-b59e4287.js +0 -2
  130. package/dist/lime-elements/p-b59e4287.js.map +0 -1
  131. package/dist/lime-elements/p-dfba92de.js +0 -206
  132. package/dist/lime-elements/p-dfba92de.js.map +0 -1
  133. /package/dist/lime-elements/{p-550cae4a.entry.js.map → p-4c100bed.entry.js.map} +0 -0
  134. /package/dist/lime-elements/{p-9a5745e5.entry.js.map → p-6fac3a11.entry.js.map} +0 -0
  135. /package/dist/lime-elements/{p-c9aee7a1.entry.js.map → p-80f0c441.entry.js.map} +0 -0
  136. /package/dist/lime-elements/{p-cf61ac34.entry.js.map → p-8eff47a6.entry.js.map} +0 -0
  137. /package/dist/lime-elements/{p-7972528a.entry.js.map → p-dbcae3a0.entry.js.map} +0 -0
@@ -5,11 +5,15 @@
5
5
  * It contains typing information for all components that exist in this project.
6
6
  */
7
7
  import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
- import { Action as Action1, ActionBarItem, ActionPosition, ActionScrollBehavior, BreadcrumbsItem, Button, CalloutType, Chip, CircularProgressSize, ClosingActions, ColorScheme, Column, ColumnAggregate, ColumnSorter, DateType, DialogHeading, DockItem, FileInfo, FlexContainerAlign, FlexContainerDirection, FlexContainerJustify, FlowItem, FormError, IconSize, InfoTileProgress, InputType, Language, Languages, Link, ListItem, ListSeparator, ListType, MenuItem, MenuListType, OpenDirection, Option, Searcher, SpinnerSize, Tab, TableParams, ValidationError, ValidationStatus } from "./interface";
8
+ import { Action as Action1, ActionBarItem, ActionPosition, ActionScrollBehavior, BreadcrumbsItem, Button, CalloutType, Chip, CircularProgressSize, ClosingActions, ColorScheme, Column, ColumnAggregate, ColumnSorter, DateType, DialogHeading, DockItem, FileInfo, FlexContainerAlign, FlexContainerDirection, FlexContainerJustify, FlowItem, FormError, IconSize, InfoTileProgress, InputType, Language, Languages, Link, ListItem as ListItem1, ListSeparator, ListType, MenuItem, MenuListType, OpenDirection, Option, Searcher, SpinnerSize, Tab, TableParams, ValidationError, ValidationStatus } from "./interface";
9
9
  import { Action } from "./components/collapsible-section/action";
10
+ import { Languages as Languages1, ListItem } from "@limetech/lime-elements";
11
+ import { OfficeViewer } from "./components/file-viewer/file-viewer.types";
10
12
  import { Layout } from "./components/table/layout";
11
- export { Action as Action1, ActionBarItem, ActionPosition, ActionScrollBehavior, BreadcrumbsItem, Button, CalloutType, Chip, CircularProgressSize, ClosingActions, ColorScheme, Column, ColumnAggregate, ColumnSorter, DateType, DialogHeading, DockItem, FileInfo, FlexContainerAlign, FlexContainerDirection, FlexContainerJustify, FlowItem, FormError, IconSize, InfoTileProgress, InputType, Language, Languages, Link, ListItem, ListSeparator, ListType, MenuItem, MenuListType, OpenDirection, Option, Searcher, SpinnerSize, Tab, TableParams, ValidationError, ValidationStatus } from "./interface";
13
+ export { Action as Action1, ActionBarItem, ActionPosition, ActionScrollBehavior, BreadcrumbsItem, Button, CalloutType, Chip, CircularProgressSize, ClosingActions, ColorScheme, Column, ColumnAggregate, ColumnSorter, DateType, DialogHeading, DockItem, FileInfo, FlexContainerAlign, FlexContainerDirection, FlexContainerJustify, FlowItem, FormError, IconSize, InfoTileProgress, InputType, Language, Languages, Link, ListItem as ListItem1, ListSeparator, ListType, MenuItem, MenuListType, OpenDirection, Option, Searcher, SpinnerSize, Tab, TableParams, ValidationError, ValidationStatus } from "./interface";
12
14
  export { Action } from "./components/collapsible-section/action";
15
+ export { Languages as Languages1, ListItem } from "@limetech/lime-elements";
16
+ export { OfficeViewer } from "./components/file-viewer/file-viewer.types";
13
17
  export { Layout } from "./components/table/layout";
14
18
  export namespace Components {
15
19
  /**
@@ -450,8 +454,6 @@ export namespace Components {
450
454
  "value": number;
451
455
  }
452
456
  /**
453
- * Currently this component support syntax highlighting for `javascript`,
454
- * `json` and `typescript` formats.
455
457
  * @exampleComponent limel-example-code-editor
456
458
  * @exampleComponent limel-example-code-editor-readonly-with-line-numbers
457
459
  * @exampleComponent limel-example-code-editor-fold-lint
@@ -787,6 +789,69 @@ export namespace Components {
787
789
  */
788
790
  "value": FileInfo;
789
791
  }
792
+ /**
793
+ * This is a smart component that automatically detects
794
+ * the most common file types such as image, audio, video, and text,
795
+ * and properly displays them in the browser.
796
+ * The component is also capable to render the most common office files.
797
+ * :::note
798
+ * Image files will always be contained in their containers, which means
799
+ * they automatically increase or decrease in size to fill their containing box
800
+ * whilst preserving their aspect-ratio.
801
+ * Text and PDF files will also always respect the width and height of the
802
+ * container in which the `limel-file-viewer` is loaded.
803
+ * :::
804
+ * For some file types such as text and images, the component will display a
805
+ * download button and a button to open the file in a new browser tab.
806
+ * This will allow users to preview the file in a fullscreen mode with the
807
+ * browser and take advantage of for example native zooming and panning
808
+ * functionalities.
809
+ * @exampleComponent limel-example-file-viewer
810
+ * @exampleComponent limel-example-file-viewer-office
811
+ * @exampleComponent limel-example-file-viewer-filename
812
+ * @exampleComponent limel-example-file-viewer-inbuilt-actions
813
+ * @exampleComponent limel-example-file-viewer-custom-actions
814
+ * @exampleComponent limel-example-file-viewer-with-picker
815
+ * @private
816
+ */
817
+ interface LimelFileViewer {
818
+ /**
819
+ * An array of custom actions that can be displayed as an action menu on the file which is being displayed.
820
+ */
821
+ "actions": ListItem[];
822
+ /**
823
+ * Displays a button that allows the user to download the file. Note that due to the browser's security policies, the file should be hosted on the same domain for the download button to work properly. Not displayed for office files!
824
+ */
825
+ "allowDownload"?: boolean;
826
+ /**
827
+ * Displays a button that allows the user to view the file in fullscreen mode. Not displayed for office files!
828
+ */
829
+ "allowFullscreen"?: boolean;
830
+ /**
831
+ * Displays a button that allows the user to open the file in a new browser tab. Not displayed for office files!
832
+ */
833
+ "allowOpenInNewTab"?: boolean;
834
+ /**
835
+ * An optional alternative text, mainly for assistive technologies and screen readers. It is used for only image files, as an `alt` attribute. Should optimally hold a description of the image, which is also displayed on the page if the image can't be loaded for some reason.
836
+ */
837
+ "alt"?: string;
838
+ /**
839
+ * The name of the file that must also contains its extension. This overrides the filename that the `url` ends with. Useful when the `url` does not contain the filename. When specified, the `filename` will be used as filename of the downloaded file.
840
+ */
841
+ "filename"?: string;
842
+ /**
843
+ * Defines the localization for translations.
844
+ */
845
+ "language": Languages1;
846
+ /**
847
+ * Defines the third-party viewer that should be used to render the content of office files, such as word processing documents, presentations, or spreadsheets.
848
+ */
849
+ "officeViewer": OfficeViewer;
850
+ /**
851
+ * Link to the file
852
+ */
853
+ "url": string;
854
+ }
790
855
  /**
791
856
  * This component is internal and only supposed to be used by
792
857
  * the limel-date-picker. This component is needed in order for us
@@ -1289,7 +1354,7 @@ export namespace Components {
1289
1354
  /**
1290
1355
  * List of items to display
1291
1356
  */
1292
- "items": Array<ListItem | ListSeparator>;
1357
+ "items": Array<ListItem1 | ListSeparator>;
1293
1358
  /**
1294
1359
  * By default, lists will display 3 lines of text, and then truncate the rest. Consumers can increase or decrease this number by specifying `maxLinesSecondaryText`. If consumer enters zero or negative numbers we default to 1; and if they type decimals we round up.
1295
1360
  */
@@ -1418,7 +1483,7 @@ export namespace Components {
1418
1483
  /**
1419
1484
  * Static actions that can be clicked by the user.
1420
1485
  */
1421
- "actions": Array<ListItem<Action1>>;
1486
+ "actions": Array<ListItem1<Action1>>;
1422
1487
  /**
1423
1488
  * Whether badge icons should be used in the result list or not
1424
1489
  */
@@ -1470,7 +1535,7 @@ export namespace Components {
1470
1535
  /**
1471
1536
  * Currently selected value or values
1472
1537
  */
1473
- "value": ListItem<number | string> | Array<ListItem<number | string>>;
1538
+ "value": ListItem1<number | string> | Array<ListItem1<number | string>>;
1474
1539
  }
1475
1540
  /**
1476
1541
  * A popover is an impermanent layer that is displayed on top of other content
@@ -2159,6 +2224,10 @@ export interface LimelFileCustomEvent<T> extends CustomEvent<T> {
2159
2224
  detail: T;
2160
2225
  target: HTMLLimelFileElement;
2161
2226
  }
2227
+ export interface LimelFileViewerCustomEvent<T> extends CustomEvent<T> {
2228
+ detail: T;
2229
+ target: HTMLLimelFileViewerElement;
2230
+ }
2162
2231
  export interface LimelFlatpickrAdapterCustomEvent<T> extends CustomEvent<T> {
2163
2232
  detail: T;
2164
2233
  target: HTMLLimelFlatpickrAdapterElement;
@@ -2482,8 +2551,6 @@ declare global {
2482
2551
  new (): HTMLLimelCircularProgressElement;
2483
2552
  };
2484
2553
  /**
2485
- * Currently this component support syntax highlighting for `javascript`,
2486
- * `json` and `typescript` formats.
2487
2554
  * @exampleComponent limel-example-code-editor
2488
2555
  * @exampleComponent limel-example-code-editor-readonly-with-line-numbers
2489
2556
  * @exampleComponent limel-example-code-editor-fold-lint
@@ -2647,6 +2714,37 @@ declare global {
2647
2714
  prototype: HTMLLimelFileElement;
2648
2715
  new (): HTMLLimelFileElement;
2649
2716
  };
2717
+ /**
2718
+ * This is a smart component that automatically detects
2719
+ * the most common file types such as image, audio, video, and text,
2720
+ * and properly displays them in the browser.
2721
+ * The component is also capable to render the most common office files.
2722
+ * :::note
2723
+ * Image files will always be contained in their containers, which means
2724
+ * they automatically increase or decrease in size to fill their containing box
2725
+ * whilst preserving their aspect-ratio.
2726
+ * Text and PDF files will also always respect the width and height of the
2727
+ * container in which the `limel-file-viewer` is loaded.
2728
+ * :::
2729
+ * For some file types such as text and images, the component will display a
2730
+ * download button and a button to open the file in a new browser tab.
2731
+ * This will allow users to preview the file in a fullscreen mode with the
2732
+ * browser and take advantage of for example native zooming and panning
2733
+ * functionalities.
2734
+ * @exampleComponent limel-example-file-viewer
2735
+ * @exampleComponent limel-example-file-viewer-office
2736
+ * @exampleComponent limel-example-file-viewer-filename
2737
+ * @exampleComponent limel-example-file-viewer-inbuilt-actions
2738
+ * @exampleComponent limel-example-file-viewer-custom-actions
2739
+ * @exampleComponent limel-example-file-viewer-with-picker
2740
+ * @private
2741
+ */
2742
+ interface HTMLLimelFileViewerElement extends Components.LimelFileViewer, HTMLStencilElement {
2743
+ }
2744
+ var HTMLLimelFileViewerElement: {
2745
+ prototype: HTMLLimelFileViewerElement;
2746
+ new (): HTMLLimelFileViewerElement;
2747
+ };
2650
2748
  /**
2651
2749
  * This component is internal and only supposed to be used by
2652
2750
  * the limel-date-picker. This component is needed in order for us
@@ -3361,6 +3459,7 @@ declare global {
3361
3459
  "limel-dock": HTMLLimelDockElement;
3362
3460
  "limel-dock-button": HTMLLimelDockButtonElement;
3363
3461
  "limel-file": HTMLLimelFileElement;
3462
+ "limel-file-viewer": HTMLLimelFileViewerElement;
3364
3463
  "limel-flatpickr-adapter": HTMLLimelFlatpickrAdapterElement;
3365
3464
  "limel-flex-container": HTMLLimelFlexContainerElement;
3366
3465
  "limel-form": HTMLLimelFormElement;
@@ -3853,8 +3952,6 @@ declare namespace LocalJSX {
3853
3952
  "value"?: number;
3854
3953
  }
3855
3954
  /**
3856
- * Currently this component support syntax highlighting for `javascript`,
3857
- * `json` and `typescript` formats.
3858
3955
  * @exampleComponent limel-example-code-editor
3859
3956
  * @exampleComponent limel-example-code-editor-readonly-with-line-numbers
3860
3957
  * @exampleComponent limel-example-code-editor-fold-lint
@@ -4262,6 +4359,73 @@ declare namespace LocalJSX {
4262
4359
  */
4263
4360
  "value"?: FileInfo;
4264
4361
  }
4362
+ /**
4363
+ * This is a smart component that automatically detects
4364
+ * the most common file types such as image, audio, video, and text,
4365
+ * and properly displays them in the browser.
4366
+ * The component is also capable to render the most common office files.
4367
+ * :::note
4368
+ * Image files will always be contained in their containers, which means
4369
+ * they automatically increase or decrease in size to fill their containing box
4370
+ * whilst preserving their aspect-ratio.
4371
+ * Text and PDF files will also always respect the width and height of the
4372
+ * container in which the `limel-file-viewer` is loaded.
4373
+ * :::
4374
+ * For some file types such as text and images, the component will display a
4375
+ * download button and a button to open the file in a new browser tab.
4376
+ * This will allow users to preview the file in a fullscreen mode with the
4377
+ * browser and take advantage of for example native zooming and panning
4378
+ * functionalities.
4379
+ * @exampleComponent limel-example-file-viewer
4380
+ * @exampleComponent limel-example-file-viewer-office
4381
+ * @exampleComponent limel-example-file-viewer-filename
4382
+ * @exampleComponent limel-example-file-viewer-inbuilt-actions
4383
+ * @exampleComponent limel-example-file-viewer-custom-actions
4384
+ * @exampleComponent limel-example-file-viewer-with-picker
4385
+ * @private
4386
+ */
4387
+ interface LimelFileViewer {
4388
+ /**
4389
+ * An array of custom actions that can be displayed as an action menu on the file which is being displayed.
4390
+ */
4391
+ "actions"?: ListItem[];
4392
+ /**
4393
+ * Displays a button that allows the user to download the file. Note that due to the browser's security policies, the file should be hosted on the same domain for the download button to work properly. Not displayed for office files!
4394
+ */
4395
+ "allowDownload"?: boolean;
4396
+ /**
4397
+ * Displays a button that allows the user to view the file in fullscreen mode. Not displayed for office files!
4398
+ */
4399
+ "allowFullscreen"?: boolean;
4400
+ /**
4401
+ * Displays a button that allows the user to open the file in a new browser tab. Not displayed for office files!
4402
+ */
4403
+ "allowOpenInNewTab"?: boolean;
4404
+ /**
4405
+ * An optional alternative text, mainly for assistive technologies and screen readers. It is used for only image files, as an `alt` attribute. Should optimally hold a description of the image, which is also displayed on the page if the image can't be loaded for some reason.
4406
+ */
4407
+ "alt"?: string;
4408
+ /**
4409
+ * The name of the file that must also contains its extension. This overrides the filename that the `url` ends with. Useful when the `url` does not contain the filename. When specified, the `filename` will be used as filename of the downloaded file.
4410
+ */
4411
+ "filename"?: string;
4412
+ /**
4413
+ * Defines the localization for translations.
4414
+ */
4415
+ "language"?: Languages1;
4416
+ /**
4417
+ * Defines the third-party viewer that should be used to render the content of office files, such as word processing documents, presentations, or spreadsheets.
4418
+ */
4419
+ "officeViewer"?: OfficeViewer;
4420
+ /**
4421
+ * Emitted when a custom action is selected from the action menu.
4422
+ */
4423
+ "onAction"?: (event: LimelFileViewerCustomEvent<ListItem>) => void;
4424
+ /**
4425
+ * Link to the file
4426
+ */
4427
+ "url"?: string;
4428
+ }
4265
4429
  /**
4266
4430
  * This component is internal and only supposed to be used by
4267
4431
  * the limel-date-picker. This component is needed in order for us
@@ -4784,7 +4948,7 @@ declare namespace LocalJSX {
4784
4948
  /**
4785
4949
  * List of items to display
4786
4950
  */
4787
- "items"?: Array<ListItem | ListSeparator>;
4951
+ "items"?: Array<ListItem1 | ListSeparator>;
4788
4952
  /**
4789
4953
  * By default, lists will display 3 lines of text, and then truncate the rest. Consumers can increase or decrease this number by specifying `maxLinesSecondaryText`. If consumer enters zero or negative numbers we default to 1; and if they type decimals we round up.
4790
4954
  */
@@ -4792,11 +4956,11 @@ declare namespace LocalJSX {
4792
4956
  /**
4793
4957
  * Fired when a new value has been selected from the list. Only fired if `type` is set to `selectable`, `radio` or `checkbox`.
4794
4958
  */
4795
- "onChange"?: (event: LimelListCustomEvent<ListItem | ListItem[]>) => void;
4959
+ "onChange"?: (event: LimelListCustomEvent<ListItem1 | ListItem1[]>) => void;
4796
4960
  /**
4797
4961
  * Fired when an action has been selected from the action menu of a list item
4798
4962
  */
4799
- "onSelect"?: (event: LimelListCustomEvent<ListItem | ListItem[]>) => void;
4963
+ "onSelect"?: (event: LimelListCustomEvent<ListItem1 | ListItem1[]>) => void;
4800
4964
  /**
4801
4965
  * The type of the list, omit to get a regular list. Available types are: `selectable`: regular list with single selection. `radio`: radio button list with single selection. `checkbox`: checkbox list with multiple selection.
4802
4966
  */
@@ -4937,7 +5101,7 @@ declare namespace LocalJSX {
4937
5101
  /**
4938
5102
  * Static actions that can be clicked by the user.
4939
5103
  */
4940
- "actions"?: Array<ListItem<Action1>>;
5104
+ "actions"?: Array<ListItem1<Action1>>;
4941
5105
  /**
4942
5106
  * Whether badge icons should be used in the result list or not
4943
5107
  */
@@ -4977,11 +5141,11 @@ declare namespace LocalJSX {
4977
5141
  /**
4978
5142
  * Fired when a new value has been selected from the picker
4979
5143
  */
4980
- "onChange"?: (event: LimelPickerCustomEvent<ListItem<number | string> | Array<ListItem<number | string>>>) => void;
5144
+ "onChange"?: (event: LimelPickerCustomEvent<ListItem1<number | string> | Array<ListItem1<number | string>>>) => void;
4981
5145
  /**
4982
5146
  * Fired when clicking on a selected value
4983
5147
  */
4984
- "onInteract"?: (event: LimelPickerCustomEvent<ListItem<number | string>>) => void;
5148
+ "onInteract"?: (event: LimelPickerCustomEvent<ListItem1<number | string>>) => void;
4985
5149
  /**
4986
5150
  * Set to `true` to disable adding and removing items, but allow interaction with existing items.
4987
5151
  */
@@ -5001,7 +5165,7 @@ declare namespace LocalJSX {
5001
5165
  /**
5002
5166
  * Currently selected value or values
5003
5167
  */
5004
- "value"?: ListItem<number | string> | Array<ListItem<number | string>>;
5168
+ "value"?: ListItem1<number | string> | Array<ListItem1<number | string>>;
5005
5169
  }
5006
5170
  /**
5007
5171
  * A popover is an impermanent layer that is displayed on top of other content
@@ -5716,6 +5880,7 @@ declare namespace LocalJSX {
5716
5880
  "limel-dock": LimelDock;
5717
5881
  "limel-dock-button": LimelDockButton;
5718
5882
  "limel-file": LimelFile;
5883
+ "limel-file-viewer": LimelFileViewer;
5719
5884
  "limel-flatpickr-adapter": LimelFlatpickrAdapter;
5720
5885
  "limel-flex-container": LimelFlexContainer;
5721
5886
  "limel-form": LimelForm;
@@ -5942,8 +6107,6 @@ declare module "@stencil/core" {
5942
6107
  */
5943
6108
  "limel-circular-progress": LocalJSX.LimelCircularProgress & JSXBase.HTMLAttributes<HTMLLimelCircularProgressElement>;
5944
6109
  /**
5945
- * Currently this component support syntax highlighting for `javascript`,
5946
- * `json` and `typescript` formats.
5947
6110
  * @exampleComponent limel-example-code-editor
5948
6111
  * @exampleComponent limel-example-code-editor-readonly-with-line-numbers
5949
6112
  * @exampleComponent limel-example-code-editor-fold-lint
@@ -6057,6 +6220,32 @@ declare module "@stencil/core" {
6057
6220
  * @exampleComponent limel-example-file-composite
6058
6221
  */
6059
6222
  "limel-file": LocalJSX.LimelFile & JSXBase.HTMLAttributes<HTMLLimelFileElement>;
6223
+ /**
6224
+ * This is a smart component that automatically detects
6225
+ * the most common file types such as image, audio, video, and text,
6226
+ * and properly displays them in the browser.
6227
+ * The component is also capable to render the most common office files.
6228
+ * :::note
6229
+ * Image files will always be contained in their containers, which means
6230
+ * they automatically increase or decrease in size to fill their containing box
6231
+ * whilst preserving their aspect-ratio.
6232
+ * Text and PDF files will also always respect the width and height of the
6233
+ * container in which the `limel-file-viewer` is loaded.
6234
+ * :::
6235
+ * For some file types such as text and images, the component will display a
6236
+ * download button and a button to open the file in a new browser tab.
6237
+ * This will allow users to preview the file in a fullscreen mode with the
6238
+ * browser and take advantage of for example native zooming and panning
6239
+ * functionalities.
6240
+ * @exampleComponent limel-example-file-viewer
6241
+ * @exampleComponent limel-example-file-viewer-office
6242
+ * @exampleComponent limel-example-file-viewer-filename
6243
+ * @exampleComponent limel-example-file-viewer-inbuilt-actions
6244
+ * @exampleComponent limel-example-file-viewer-custom-actions
6245
+ * @exampleComponent limel-example-file-viewer-with-picker
6246
+ * @private
6247
+ */
6248
+ "limel-file-viewer": LocalJSX.LimelFileViewer & JSXBase.HTMLAttributes<HTMLLimelFileViewerElement>;
6060
6249
  /**
6061
6250
  * This component is internal and only supposed to be used by
6062
6251
  * the limel-date-picker. This component is needed in order for us
@@ -10,5 +10,11 @@ declare const _default: {
10
10
  'date-picker.year.heading': string;
11
11
  'chip-set.clear-all': string;
12
12
  'file.drag-and-drop-tips': string;
13
+ 'file-viewer.message.unsupported-filetype': string;
14
+ 'file-viewer.download': string;
15
+ 'file-viewer.exit-fullscreen': string;
16
+ 'file-viewer.open-in-fullscreen': string;
17
+ 'file-viewer.open-in-new-tab': string;
18
+ 'file-viewer.more-actions': string;
13
19
  };
14
20
  export default _default;
@@ -12,5 +12,11 @@ declare const _default: {
12
12
  'chip-set.remove-chip': string;
13
13
  'snackbar.dismiss': string;
14
14
  'file.drag-and-drop-tips': string;
15
+ 'file-viewer.message.unsupported-filetype': string;
16
+ 'file-viewer.download': string;
17
+ 'file-viewer.exit-fullscreen': string;
18
+ 'file-viewer.open-in-fullscreen': string;
19
+ 'file-viewer.open-in-new-tab': string;
20
+ 'file-viewer.more-actions': string;
15
21
  };
16
22
  export default _default;
@@ -10,5 +10,11 @@ declare const _default: {
10
10
  'date-picker.year.heading': string;
11
11
  'chip-set.clear-all': string;
12
12
  'file.drag-and-drop-tips': string;
13
+ 'file-viewer.message.unsupported-filetype': string;
14
+ 'file-viewer.download': string;
15
+ 'file-viewer.exit-fullscreen': string;
16
+ 'file-viewer.open-in-fullscreen': string;
17
+ 'file-viewer.open-in-new-tab': string;
18
+ 'file-viewer.more-actions': string;
13
19
  };
14
20
  export default _default;
@@ -10,5 +10,11 @@ declare const _default: {
10
10
  'date-picker.year.heading': string;
11
11
  'chip-set.clear-all': string;
12
12
  'file.drag-and-drop-tips': string;
13
+ 'file-viewer.message.unsupported-filetype': string;
14
+ 'file-viewer.download': string;
15
+ 'file-viewer.exit-fullscreen': string;
16
+ 'file-viewer.open-in-fullscreen': string;
17
+ 'file-viewer.open-in-new-tab': string;
18
+ 'file-viewer.more-actions': string;
13
19
  };
14
20
  export default _default;
@@ -10,5 +10,11 @@ declare const _default: {
10
10
  'date-picker.year.heading': string;
11
11
  'chip-set.clear-all': string;
12
12
  'file.drag-and-drop-tips': string;
13
+ 'file-viewer.message.unsupported-filetype': string;
14
+ 'file-viewer.download': string;
15
+ 'file-viewer.exit-fullscreen': string;
16
+ 'file-viewer.open-in-fullscreen': string;
17
+ 'file-viewer.open-in-new-tab': string;
18
+ 'file-viewer.more-actions': string;
13
19
  };
14
20
  export default _default;
@@ -12,5 +12,11 @@ declare const _default: {
12
12
  'chip-set.remove-chip': string;
13
13
  'snackbar.dismiss': string;
14
14
  'file.drag-and-drop-tips': string;
15
+ 'file-viewer.message.unsupported-filetype': string;
16
+ 'file-viewer.download': string;
17
+ 'file-viewer.exit-fullscreen': string;
18
+ 'file-viewer.open-in-fullscreen': string;
19
+ 'file-viewer.open-in-new-tab': string;
20
+ 'file-viewer.more-actions': string;
15
21
  };
16
22
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@limetech/lime-elements",
3
- "version": "37.1.0-next.44",
3
+ "version": "37.1.0-next.45",
4
4
  "description": "Lime Elements",
5
5
  "author": "Lime Technologies",
6
6
  "license": "Apache-2.0",
@@ -51,7 +51,7 @@
51
51
  "@types/jest": "^27.4.0",
52
52
  "@types/lodash-es": "^4.17.10",
53
53
  "@types/react": "^18.2.31",
54
- "@types/react-dom": "^18.2.13",
54
+ "@types/react-dom": "^18.2.14",
55
55
  "@types/tabulator-tables": "^4.9.4",
56
56
  "@typescript-eslint/eslint-plugin": "^5.61.0",
57
57
  "@typescript-eslint/parser": "^5.62.0",