@limetech/lime-elements 37.45.1 → 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 +18 -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 +303 -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 +62 -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 +303 -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 +15 -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-3ae3b23e.entry.js +0 -2
  169. package/dist/lime-elements/p-3ae3b23e.entry.js.map +0 -1
  170. package/dist/lime-elements/p-3f4d2f62.entry.js +0 -2
  171. package/dist/lime-elements/p-516619d3.js.map +0 -1
  172. package/dist/lime-elements/p-5c9fbe6f.entry.js +0 -2
  173. package/dist/lime-elements/p-5c9fbe6f.entry.js.map +0 -1
  174. package/dist/lime-elements/p-714d6937.js +0 -2
  175. package/dist/lime-elements/p-714d6937.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
@@ -1,2 +0,0 @@
1
- import{r as t,c as i,h as s,g as e}from"./p-443111b3.js";import{d as n,i as h}from"./p-714d6937.js";import{T as r,E as o,a as l,b as a,c,d,A as u,e as f,f as p,g as m}from"./p-e03dfe70.js";import{c as y}from"./p-3ccdc4a3.js";import{g,c as b}from"./p-2f777fdb.js";import"./p-c93050d6.js";import"./p-365098fe.js";import"./p-d529bb7d.js";import"./p-858c6b82.js";const v=":host{position:relative;display:block}:host([hidden]){display:none}";const w=300;const j="limel-chip-set";const C=class{constructor(s){t(this,s);this.change=i(this,"change",7);this.interact=i(this,"interact",7);this.action=i(this,"action",7);this.chipSetEditMode=false;this.getValueId=t=>{const i=t.value;if(!!i&&typeof i==="object"){return i.id}return i};this.createChips=t=>{if(!t){return[]}if(this.multiple){const i=t;return i.map(this.createChip)}const i=t;return[this.createChip(i)]};this.createChip=t=>{const i=g(t.icon);const s=b(t.icon,t.iconColor);const e=this.getValueId(t);return{id:`${e}`,text:t.text,removable:true,icon:i?{name:i,color:s}:undefined,value:t,menuItems:t.actions}};this.search=async t=>{const i=setTimeout((()=>{this.loading=true}));const s=await this.searcher(this.textValue);clearTimeout(i);this.handleSearchResult(t,s)};this.disabled=false;this.readonly=false;this.label=undefined;this.searchLabel=undefined;this.helperText=undefined;this.leadingIcon=undefined;this.emptyResultMessage=undefined;this.required=false;this.invalid=false;this.value=undefined;this.searcher=undefined;this.multiple=false;this.delimiter=null;this.actions=[];this.actionPosition="bottom";this.actionScrollBehavior="sticky";this.badgeIcons=false;this.items=undefined;this.textValue="";this.loading=false;this.chips=[];this.handleTextInput=this.handleTextInput.bind(this);this.handleInputKeyDown=this.handleInputKeyDown.bind(this);this.handleDropdownKeyDown=this.handleDropdownKeyDown.bind(this);this.handleInputFieldFocus=this.handleInputFieldFocus.bind(this);this.handleChange=this.handleChange.bind(this);this.handleInteract=this.handleInteract.bind(this);this.handleListChange=this.handleListChange.bind(this);this.handleActionListChange=this.handleActionListChange.bind(this);this.handleStopEditAndBlur=this.handleStopEditAndBlur.bind(this);this.handleCloseMenu=this.handleCloseMenu.bind(this);this.onListKeyDown=this.onListKeyDown.bind(this);this.portalId=y();this.debouncedSearch=n(this.search,w)}componentWillLoad(){this.chips=this.createChips(this.value)}componentDidLoad(){this.chipSet=this.host.shadowRoot.querySelector(j)}async componentWillUpdate(){this.chipSetEditMode=false;if(this.chipSet){this.chipSetEditMode=await this.chipSet.getEditMode()}}render(){const t={};if(!this.multiple){t.maxItems=1}return[s("limel-chip-set",Object.assign({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},t)),this.renderDropdown()]}onChangeValue(){this.chips=this.createChips(this.value)}renderDelimiter(){if(this.multiple){return this.delimiter}return null}renderDropdown(){const t=this.getDropdownContent();const i=[];if(this.shouldShowDropDownContent()){const s=this.getActionContent();if(this.actionPosition==="top"){i.push(s)}if(t){i.push(t)}if(this.actionPosition==="bottom"){i.push(s)}}return this.renderPortal(i)}getActionContent(){var t,i;const e=(i=(t=this.actions)===null||t===void 0?void 0:t.length)!==null&&i!==void 0?i:0;if(e===0){return null}return[s("limel-list",{class:{"static-actions-list":true,"is-on-top":this.actionPosition==="top","is-at-bottom":this.actionPosition==="bottom","has-position-sticky":this.actionScrollBehavior==="sticky"},badgeIcons:true,type:"selectable",onChange:this.handleActionListChange,items:this.actions.map(this.removeUnusedPropertiesOnAction)})]}removeUnusedPropertiesOnAction(t){return Object.assign(Object.assign({},t),{actions:[]})}shouldShowDropDownContent(){if(this.isFull()){return false}return!!this.chipSetEditMode}getDropdownContent(){if(!this.shouldShowDropDownContent()){return}if(this.loading){return this.renderSpinner()}if(!this.items||!this.items.length){return this.renderEmptyMessage()}return this.renderListResult()}isFull(){return!this.multiple&&!!this.value}renderSpinner(){return s("div",{style:{width:"100%",display:"flex","align-items":"center","justify-content":"center",padding:"1rem 0"}},s("limel-spinner",{limeBranded:false}))}renderEmptyMessage(){if(!this.emptyResultMessage){return}const t={color:"rgb(var(--contrast-1100))","text-align":"center",margin:"0.5rem 1rem"};return s("p",{style:t},this.emptyResultMessage)}renderListResult(){return s("limel-list",{badgeIcons:this.badgeIcons,onChange:this.handleListChange,onKeyDown:this.onListKeyDown,type:"selectable",items:this.items})}onListKeyDown(t){const i=[r,o,l].includes(t.key);const s=[a,c,d].includes(t.keyCode);if(i||s){this.chipSet.setFocus()}}renderPortal(t=[]){const i=getComputedStyle(this.host).getPropertyValue("--dropdown-z-index");return s("limel-portal",{visible:t.length>0,containerId:this.portalId,inheritParentWidth:true,containerStyle:{"z-index":i}},s("limel-menu-surface",{open:t.length>0,allowClicksElement:this.host,style:{"--mdc-menu-min-width":"100%","max-height":"inherit",display:"flex"},onDismiss:this.handleCloseMenu},t))}handleStopEditAndBlur(){const t=this.host.shadowRoot.activeElement||document.activeElement;const i=document.querySelector(`#${this.portalId}`);if(h(t,this.host)||h(t,i)){return}this.clearInputField()}async handleTextInput(t){t.stopPropagation();const i=t.detail;this.textValue=i;this.debouncedSearch(i);if(i===""){this.debouncedSearch.flush()}}handleListChange(t){var i;t.stopPropagation();if(!this.value||this.value!==t.detail){let i=t.detail;if(this.multiple){i=[...this.value,t.detail]}this.change.emit(i);this.items=[]}if(this.multiple){(i=this.chipSet)===null||i===void 0?void 0:i.setFocus(true)}}handleActionListChange(t){t.stopPropagation();if(!t.detail){return}this.action.emit(t.detail.value);this.items=[]}handleInputFieldFocus(){const t=this.textValue;this.debouncedSearch(t)}handleChange(t){t.stopPropagation();let i=null;if(this.multiple){const s=t.detail;i=s.map((t=>this.value.find((i=>{const s=this.getValueId(i);return`${s}`===t.id}))))}this.change.emit(i)}handleInteract(t){t.stopPropagation();this.interact.emit(t.detail?t.detail.value:t.detail)}handleInputKeyDown(t){const i=(t.key===r||t.keyCode===a)&&!t.altKey&&!t.metaKey&&!t.shiftKey;const s=t.key===u||t.keyCode===f;const e=t.key===p||t.keyCode===m;if(!i&&!s&&!e){return}const n=document.querySelector(` #${this.portalId} limel-list`);if(!n){return}t.preventDefault();if(i||e){const t=n.shadowRoot.querySelector(".mdc-deprecated-list-item:first-child");t.focus();return}if(s){const t=n.shadowRoot.querySelector(".mdc-deprecated-list-item:last-child");t.focus()}}handleDropdownKeyDown(t){const i=t.key===o||t.keyCode===c;if(i){t.preventDefault();this.textValue="";this.chipSet.setFocus(true)}}handleSearchResult(t,i){if(t===this.textValue){this.items=i;if(this.multiple){const t=this.value;this.items=i.filter((i=>!t.includes(i)))}this.loading=false}}handleCloseMenu(){if(this.items.length>0){return}this.clearInputField()}clearInputField(){this.chipSet.emptyInput();this.textValue="";this.handleSearchResult("",[]);this.debouncedSearch.cancel()}get host(){return e(this)}static get watchers(){return{value:["onChangeValue"]}}};C.style=v;export{C as limel_picker};
2
- //# sourceMappingURL=p-3f4d2f62.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["getHref","value","href","String","trim","isValid","prependProtocol","getTarget","url","isRelativeLink","input","hasKnownProtocol","hasRelativeProtocol","knownProtocols","some","knownProtocol","indexOf","startsWith"],"sources":["./src/util/link-helper.ts"],"sourcesContent":["export function getHref(value: string) {\n const href = value ? String(value.trim()) : '';\n if (isValid(href)) {\n return href;\n }\n\n return prependProtocol(href);\n}\n\nexport function getTarget(value: string) {\n const url = getHref(value);\n if (isRelativeLink(url)) {\n return '_self';\n }\n\n return '_blank';\n}\n\nexport function prependProtocol(input: string) {\n if (!input) {\n return input;\n }\n\n return 'https://' + input;\n}\n\nfunction isValid(href: string) {\n return (\n hasKnownProtocol(href) ||\n isRelativeLink(href) ||\n hasRelativeProtocol(href)\n );\n}\n\nfunction hasKnownProtocol(input: string) {\n const knownProtocols = [\n 'ftp',\n 'ftps',\n 'https',\n 'http',\n\n // `file` may or may not work, due to cross-origin restrictions and browser settings.\n 'file',\n\n // m-files is a protocol used by the M-Files desktop app or something.\n // It's not a web protocol, but it allows open M-Files links in their app.\n 'm-files',\n ];\n\n return knownProtocols.some((knownProtocol) => {\n return input.indexOf(knownProtocol + '://') === 0;\n });\n}\n\nfunction isRelativeLink(input: string) {\n if (hasRelativeProtocol(input)) {\n return false;\n }\n\n return input.startsWith('/') || input.startsWith('#');\n}\n\nfunction hasRelativeProtocol(input: string) {\n return input.startsWith('//');\n}\n"],"mappings":"SAAgBA,EAAQC,GACpB,MAAMC,EAAOD,EAAQE,OAAOF,EAAMG,QAAU,GAC5C,GAAIC,EAAQH,GAAO,CACf,OAAOA,C,CAGX,OAAOI,EAAgBJ,EAC3B,C,SAEgBK,EAAUN,GACtB,MAAMO,EAAMR,EAAQC,GACpB,GAAIQ,EAAeD,GAAM,CACrB,MAAO,O,CAGX,MAAO,QACX,C,SAEgBF,EAAgBI,GAC5B,IAAKA,EAAO,CACR,OAAOA,C,CAGX,MAAO,WAAaA,CACxB,CAEA,SAASL,EAAQH,GACb,OACIS,EAAiBT,IACjBO,EAAeP,IACfU,EAAoBV,EAE5B,CAEA,SAASS,EAAiBD,GACtB,MAAMG,EAAiB,CACnB,MACA,OACA,QACA,OAGA,OAIA,WAGJ,OAAOA,EAAeC,MAAMC,GACjBL,EAAMM,QAAQD,EAAgB,SAAW,GAExD,CAEA,SAASN,EAAeC,GACpB,GAAIE,EAAoBF,GAAQ,CAC5B,OAAO,K,CAGX,OAAOA,EAAMO,WAAW,MAAQP,EAAMO,WAAW,IACrD,CAEA,SAASL,EAAoBF,GACzB,OAAOA,EAAMO,WAAW,KAC5B,Q"}
@@ -1,2 +0,0 @@
1
- import{r as t,h as i,g as e}from"./p-443111b3.js";import{g as r}from"./p-2c35fb9d.js";class s{constructor(t){this.promises={};this.cache=t}async get(t,i=""){const e=await this.cache;const r=this.getUrl(t,i);let s=await e.match(r);if(!s){s=await this.fetchData(r,e)}return this.getIcon(s)}async fetchData(t,i){let e=this.promises[t];if(e===undefined){e=i.add(t);this.promises[t]=e}await e;return i.match(t)}async getIcon(t){let i=await t.text();i=i.replace(/#000000/g,"currentColor");if(!this.validSvg(i)){throw new Error("Invalid SVG")}return i}validSvg(t){const i=new DOMParser;const e=i.parseFromString(t,"image/svg+xml");return e.documentElement.tagName.toLowerCase()==="svg"}getUrl(t,i){let e=i||"";if(i&&!i.endsWith("/")){e=`${i}/`}return`${e}assets/icons/${t}.svg`}}class n{constructor(){this.cache={};this.resolveFunctions={}}async get(t,i=""){if(!this.cache[t]){this.cache[t]=await this.getIcon(t,i)}return this.cache[t]}getIcon(t,i){return new Promise((e=>{if(!this.resolveFunctions[t]){this.resolveFunctions[t]=[];this.fetchData(t,i)}this.resolveFunctions[t].push(e)}))}async fetchData(t,i){let e=i||"";if(i&&!i.endsWith("/")){e=`${i}/`}const r=await fetch(`${e}assets/icons/${t}.svg`);let s=await r.text();s=s.replace(/#000000/g,"currentColor");if(!this.validSvg(s)){throw new Error("Invalid SVG")}this.resolvePromises(t,s)}validSvg(t){const i=new DOMParser;const e=i.parseFromString(t,"image/svg+xml");return e.documentElement.tagName.toLowerCase()==="svg"}resolvePromises(t,i){const e=this.resolveFunctions[t];e.forEach((t=>{t(i)}));this.resolveFunctions[t]=null}}const o="@limetech/lime-elements/icons";function a(){try{const t=caches.open(o);return new s(t)}catch(t){return new n}}const h=(()=>a())();const m=":host{background-color:var(--icon-background-color, transparent);border-radius:50%;display:inline-block;line-height:0;box-sizing:border-box}:host svg{fill:currentColor;height:100%;pointer-events:none;width:100%}:host div{margin:var(--limel-icon-svg-margin, 0)}:host([hidden]){display:none}:host([size=x-small]){height:0.9375rem !important;width:0.9375rem !important}:host([size=small]){height:1.25rem !important;width:1.25rem !important}:host([size=medium]){height:1.5625rem !important;width:1.5625rem !important}:host([size=large]){height:1.875rem !important;width:1.875rem !important}:host([badge][size=x-small]){height:1.4375rem !important;width:1.4375rem !important;--limel-icon-svg-margin:0.25rem}:host([badge][size=small]){height:1.875rem !important;width:1.875rem !important;--limel-icon-svg-margin:0.3125rem}:host([badge][size=medium]){height:2.5rem !important;width:2.5rem !important;--limel-icon-svg-margin:0.5rem}:host([badge][size=large]){height:2.875rem !important;width:2.875rem !important;--limel-icon-svg-margin:0.5rem}";const c=class{constructor(i){t(this,i);this.size=undefined;this.name=undefined;this.badge=undefined}componentDidLoad(){this.loadIcon(this.name)}render(){return i("div",{class:"container"})}async loadIcon(t){if(t===undefined||t===""){return}const i=await this.loadSvg(t);this.renderSvg(i)}loadSvg(t){return h.get(t,r.iconPath)}renderSvg(t){const i=this.host.shadowRoot.querySelector("div.container");if(i){i.innerHTML=t}}get host(){return e(this)}static get watchers(){return{name:["loadIcon"]}}};c.style=m;export{c as limel_icon};
2
- //# sourceMappingURL=p-5c9fbe6f.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["CacheStorageIconCache","constructor","cache","this","promises","async","name","path","url","getUrl","response","match","fetchData","getIcon","requestPromise","undefined","add","svgData","text","replace","validSvg","Error","data","parser","DOMParser","svgDoc","parseFromString","documentElement","tagName","toLowerCase","iconPath","endsWith","InMemoryIconCache","resolveFunctions","Promise","resolve","push","fetch","resolvePromises","resolves","forEach","CACHE_NAME","createIconCache","caches","open","_a","iconCache","iconCss","Icon","componentDidLoad","loadIcon","render","h","class","loadSvg","renderSvg","get","globalConfig","container","host","shadowRoot","querySelector","innerHTML"],"sources":["./src/global/icon-cache/cache-storage-icon-cache.ts","./src/global/icon-cache/in-memory-icon-cache.ts","./src/global/icon-cache/factory.ts","./src/components/icon/icon.scss?tag=limel-icon&encapsulation=shadow","./src/components/icon/icon.tsx"],"sourcesContent":["export class CacheStorageIconCache {\n /*\n * Cache of all loaded SVGs\n */\n private cache: Promise<Cache>;\n\n private promises: Record<string, Promise<void>> = {};\n\n constructor(cache: Promise<Cache>) {\n this.cache = cache;\n }\n\n /**\n * Get icon data from the cache\n *\n * @param name - Name of the icon\n * @param path - Path on the server where the assets are located\n * @returns SVG markup\n */\n public async get(name: string, path = ''): Promise<string> {\n const cache = await this.cache;\n const url = this.getUrl(name, path);\n\n let response = await cache.match(url);\n if (!response) {\n response = await this.fetchData(url, cache);\n }\n\n return this.getIcon(response);\n }\n\n private async fetchData(url: string, cache: Cache): Promise<Response> {\n let requestPromise = this.promises[url];\n if (requestPromise === undefined) {\n requestPromise = cache.add(url);\n this.promises[url] = requestPromise;\n }\n\n await requestPromise;\n\n return cache.match(url);\n }\n\n /*\n * Get icon data from a response\n */\n private async getIcon(response: Response): Promise<string> {\n let svgData = await response.text();\n\n // Some of the icons in the Icons8 library have hard coded black color on some of the paths.\n // In order to apply coloring with CSS, these have to be set to 'currentColor'\n svgData = svgData.replace(/#000000/g, 'currentColor');\n\n if (!this.validSvg(svgData)) {\n throw new Error('Invalid SVG');\n }\n\n return svgData;\n }\n\n /*\n * Check if the given data is a valid SVG document\n */\n private validSvg(data) {\n const parser = new DOMParser();\n const svgDoc = parser.parseFromString(data, 'image/svg+xml');\n\n return svgDoc.documentElement.tagName.toLowerCase() === 'svg';\n }\n\n private getUrl(name: string, path: string): string {\n let iconPath = path || '';\n if (path && !path.endsWith('/')) {\n iconPath = `${path}/`;\n }\n\n return `${iconPath}assets/icons/${name}.svg`;\n }\n}\n","export class InMemoryIconCache {\n /*\n * Cache of all loaded SVGs\n */\n private cache = {};\n\n /*\n * Contains resolve functions for all unresolved promises that are waiting for SVG data.\n */\n private resolveFunctions = {};\n\n /**\n * Get icon data from the cache\n *\n * @param name - Name of the icon\n * @param path - Path on the server where the assets are located\n * @returns SVG markup\n */\n public async get(name: string, path = ''): Promise<string> {\n if (!this.cache[name]) {\n this.cache[name] = await this.getIcon(name, path);\n }\n\n return this.cache[name];\n }\n\n /*\n * Creates and returns a promise that will be resolved when SVG data is available\n */\n private getIcon(name, path) {\n return new Promise((resolve) => {\n if (!this.resolveFunctions[name]) {\n this.resolveFunctions[name] = [];\n this.fetchData(name, path);\n }\n\n this.resolveFunctions[name].push(resolve);\n });\n }\n\n /*\n * Fetch SVG data from the server\n */\n private async fetchData(name, path) {\n let iconPath = path || '';\n if (path && !path.endsWith('/')) {\n iconPath = `${path}/`;\n }\n\n const response = await fetch(`${iconPath}assets/icons/${name}.svg`);\n\n let svgData = await response.text();\n\n // Some of the icons in the Icons8 library have hard coded black color on some of the paths.\n // In order to apply coloring with CSS, these have to be set to 'currentColor'\n svgData = svgData.replace(/#000000/g, 'currentColor');\n if (!this.validSvg(svgData)) {\n throw new Error('Invalid SVG');\n }\n\n this.resolvePromises(name, svgData);\n }\n\n /*\n * Check if the given data is a valid SVG document\n */\n private validSvg(data) {\n const parser = new DOMParser();\n const svgDoc = parser.parseFromString(data, 'image/svg+xml');\n\n return svgDoc.documentElement.tagName.toLowerCase() === 'svg';\n }\n\n /*\n * Resolve all promises waiting for data for a specific icon\n */\n private resolvePromises(name, svgData) {\n const resolves = this.resolveFunctions[name];\n resolves.forEach((resolve) => {\n resolve(svgData);\n });\n this.resolveFunctions[name] = null;\n }\n}\n","import { CacheStorageIconCache } from './cache-storage-icon-cache';\nimport { InMemoryIconCache } from './in-memory-icon-cache';\n\nconst CACHE_NAME = '@limetech/lime-elements/icons';\n\nfunction createIconCache() {\n try {\n const cache = caches.open(CACHE_NAME);\n\n return new CacheStorageIconCache(cache);\n } catch {\n return new InMemoryIconCache();\n }\n}\n\nexport default (() => {\n return createIconCache();\n})();\n","@use '../../style/functions';\n\n/**\n * @prop --icon-background-color: Background color when attribute `badge` is set to `true`. Defaults to `transparent`.\n */\n\n:host {\n background-color: var(--icon-background-color, transparent);\n border-radius: 50%;\n display: inline-block;\n line-height: 0;\n box-sizing: border-box;\n\n svg {\n fill: currentColor;\n height: 100%;\n pointer-events: none;\n width: 100%;\n }\n\n div {\n margin: var(--limel-icon-svg-margin, 0);\n }\n}\n\n:host([hidden]) {\n display: none;\n}\n\n:host([size='x-small']) {\n height: functions.pxToRem(15) !important;\n width: functions.pxToRem(15) !important;\n}\n:host([size='small']) {\n height: functions.pxToRem(20) !important;\n width: functions.pxToRem(20) !important;\n}\n:host([size='medium']) {\n height: functions.pxToRem(25) !important;\n width: functions.pxToRem(25) !important;\n}\n:host([size='large']) {\n height: functions.pxToRem(30) !important;\n width: functions.pxToRem(30) !important;\n}\n\n:host([badge][size='x-small']) {\n height: functions.pxToRem(23) !important;\n width: functions.pxToRem(23) !important;\n\n --limel-icon-svg-margin: #{functions.pxToRem(4)};\n}\n:host([badge][size='small']) {\n height: functions.pxToRem(30) !important;\n width: functions.pxToRem(30) !important;\n\n --limel-icon-svg-margin: #{functions.pxToRem(5)};\n}\n:host([badge][size='medium']) {\n height: functions.pxToRem(40) !important;\n width: functions.pxToRem(40) !important;\n\n --limel-icon-svg-margin: #{functions.pxToRem(8)};\n}\n:host([badge][size='large']) {\n height: functions.pxToRem(46) !important;\n width: functions.pxToRem(46) !important;\n\n --limel-icon-svg-margin: #{functions.pxToRem(8)};\n}\n","import { Component, Element, h, Prop, Watch } from '@stencil/core';\nimport { globalConfig } from '../../global/config';\nimport iconCache from '../../global/icon-cache/factory';\nimport { IconSize } from './icon.types';\n\n/**\n * Search for an icon and **click on it to copy its name to clipboard**.\n * <limel-example-icon-finder />\n *\n * *******\n *\n * :::important\n * To install your icon set correctly, please read the [documentation here](#/).\n * :::\n *\n * The size and color of the icon is normally set in CSS, however there are a few\n * standard sizes defined that can be used with the `size` property.\n *\n * :::note\n * There are icons included in the `@lundalogik/lime-icons8` package which are\n * designed by our designers at Lime.\n * The names of these icons start with `-lime-`, which makes them easy to\n * find using the Icon Finder tool below.\n *\n * Some of the multi-colored `-lime-` icons use our own CSS variables\n * (instead of HEX or RGB) values to visualize their colors. Thus, you must import\n * our color palette css files into your project to render the icons properly.\n * Read more about our [Color System](#/DesignGuidelines/color-system.md/)\n * and how to do this.\n * :::\n *\n * @exampleComponent limel-example-icon-name\n * @exampleComponent limel-example-icon-size\n * @exampleComponent limel-example-icon-color\n */\n@Component({\n tag: 'limel-icon',\n shadow: true,\n styleUrl: 'icon.scss',\n})\nexport class Icon {\n /**\n * Size of the icon\n */\n @Prop({ reflect: true })\n public size: IconSize;\n\n /**\n * Name of the icon\n */\n @Prop({ reflect: true })\n public name: string;\n\n /**\n * Set to `true` to give the icon a round background with some padding.\n * Only works when the `size` attribute is also set.\n */\n @Prop({ reflect: true })\n public badge: boolean;\n\n @Element()\n private host: HTMLLimelIconElement;\n\n public componentDidLoad() {\n this.loadIcon(this.name);\n }\n\n public render() {\n return <div class=\"container\" />;\n }\n\n @Watch('name')\n protected async loadIcon(name: string) {\n if (name === undefined || name === '') {\n return;\n }\n\n const svgData = await this.loadSvg(name);\n this.renderSvg(svgData);\n }\n\n /**\n * Load the SVG data for the icon from the icon cache\n *\n * @param name - name of the icon\n * @returns the icon SVG data\n */\n private loadSvg(name: string) {\n return iconCache.get(name, globalConfig.iconPath);\n }\n\n /*\n * There is no way to style external SVG files with CSS, i.e. SVGs loaded\n * with <img src=\"file.svg\" /> or <object data=\"file.svg\" type=\"image/svg+xml\" />\n * will remain the way they look in the file.\n * Therefore we inject the svg as inline markup instead.\n */\n private renderSvg(svgData: string) {\n const container = this.host.shadowRoot.querySelector('div.container');\n if (container) {\n container.innerHTML = svgData;\n }\n }\n}\n"],"mappings":"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"}
@@ -1,2 +0,0 @@
1
- import{r as n,i as e}from"./p-c93050d6.js";import{t}from"./p-365098fe.js";var r=function(){return n.Date.now()};var i="Expected a function";var u=Math.max,f=Math.min;function o(n,o,a){var d,c,s,m,l,v,p=0,T=false,h=false,w=true;if(typeof n!="function"){throw new TypeError(i)}o=t(o)||0;if(e(a)){T=!!a.leading;h="maxWait"in a;s=h?u(t(a.maxWait)||0,o):s;w="trailing"in a?!!a.trailing:w}function x(e){var t=d,r=c;d=c=undefined;p=e;m=n.apply(r,t);return m}function g(n){p=n;l=setTimeout(E,o);return T?x(n):m}function j(n){var e=n-v,t=n-p,r=o-e;return h?f(r,s-t):r}function y(n){var e=n-v,t=n-p;return v===undefined||e>=o||e<0||h&&t>=s}function E(){var n=r();if(y(n)){return M(n)}l=setTimeout(E,j(n))}function M(n){l=undefined;if(w&&d){return x(n)}d=c=undefined;return m}function W(){if(l!==undefined){clearTimeout(l)}p=0;d=v=c=l=undefined}function b(){return l===undefined?m:M(r())}function k(){var n=r(),e=y(n);d=arguments;c=this;v=n;if(e){if(l===undefined){return g(v)}if(h){clearTimeout(l);l=setTimeout(E,o);return x(v)}}if(l===undefined){l=setTimeout(E,o)}return m}k.cancel=W;k.flush=b;return k}function a(n,e){if(!e){return false}if(e.contains(n)){return true}let t=n;let r=0;const i=1e3;while(r<i&&t&&t.getRootNode().nodeName==="#document-fragment"){t=t.getRootNode().host;if(e.contains(t)){return true}r+=1}return e.contains(t)}export{o as d,a as i};
2
- //# sourceMappingURL=p-714d6937.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["now","root","Date","FUNC_ERROR_TEXT","nativeMax","Math","max","nativeMin","min","debounce","func","wait","options","lastArgs","lastThis","maxWait","result","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","TypeError","toNumber","isObject","invokeFunc","time","args","thisArg","undefined","apply","leadingEdge","setTimeout","timerExpired","remainingWait","timeSinceLastCall","timeSinceLastInvoke","timeWaiting","shouldInvoke","trailingEdge","cancel","clearTimeout","flush","debounced","isInvoking","arguments","this","isDescendant","element","parent","contains","currentNode","i","DEPTH","getRootNode","nodeName","host"],"sources":["./node_modules/lodash-es/now.js","./node_modules/lodash-es/debounce.js","./src/util/dom.ts"],"sourcesContent":["import root from './_root.js';\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nexport default now;\n","import isObject from './isObject.js';\nimport now from './now.js';\nimport toNumber from './toNumber.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nexport default debounce;\n","/**\n * Check if an element is a descendant of another, even if it is located within a shadow root\n *\n * @param element - The element to check\n * @param parent - The parent element\n * @returns True if the element is a descendant of the parent element, false otherwise\n */\nexport function isDescendant(element: Node, parent: Node): boolean {\n if (!parent) {\n return false;\n }\n\n if (parent.contains(element)) {\n return true;\n }\n\n let currentNode: Node = element;\n let i = 0; // Just in case something weird happens, let's not crash the browser…\n const DEPTH = 1000; // Max depth to search.\n\n while (\n i < DEPTH &&\n currentNode &&\n currentNode.getRootNode().nodeName === '#document-fragment'\n ) {\n currentNode = (currentNode.getRootNode() as any).host;\n if (parent.contains(currentNode)) {\n return true;\n }\n\n i += 1;\n }\n\n return parent.contains(currentNode);\n}\n"],"mappings":"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"}
@@ -1,2 +0,0 @@
1
- import{r as e,h as i,H as t}from"./p-443111b3.js";import{g as r}from"./p-2f777fdb.js";const s='@charset "UTF-8";*{box-sizing:border-box;min-width:0}:host(limel-dynamic-label){--limel-dynamic-label-min-height:1.75rem;display:flex;gap:0.5rem;align-items:center;border-radius:0.5rem;min-width:0}limel-icon{--limel-icon-svg-margin:0.125rem;border-radius:0.25rem;flex-shrink:0;width:var(--limel-dynamic-label-min-height);color:rgb(var(--contrast-900))}span{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;flex-grow:1;font-size:0.8125rem;color:var(--mdc-theme-on-surface)}';const l=class{constructor(i){e(this,i);this.value=undefined;this.defaultLabel={};this.labels=[]}render(){var e,i;const t=this.labels.find((e=>e.value===this.value));return[this.renderIcon((e=t===null||t===void 0?void 0:t.icon)!==null&&e!==void 0?e:this.defaultLabel.icon),this.renderLabel((i=t===null||t===void 0?void 0:t.text)!==null&&i!==void 0?i:this.defaultLabel.text)]}renderIcon(e){const t=r(e);if(!t){return}let s;let l;if(typeof e==="object"){s=e.color;l=e.backgroundColor}const n={role:"presentation",name:t,style:{color:s,"background-color":l}};return i("limel-icon",Object.assign({},n))}renderLabel(e=""){return i("span",null,e)}};l.style=s;const n=":host(limel-helper-line){transition:opacity 0.2s ease;box-sizing:border-box;display:grid;min-width:0;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-size:0.6875rem;line-height:normal;color:rgb(var(--contrast-1200))}div{display:flex;justify-content:space-between;gap:0.75rem;overflow:hidden;padding:0 1rem}:host(limel-helper-line.invalid) .helper-text{color:var(--mdc-theme-error)}.counter{flex-shrink:0;margin-left:auto}.helper-text,.counter{padding-top:0.125rem}:host(limel-helper-line){transition:grid-template-rows var(--limel-h-l-grid-template-rows-transition-speed, 0.46s) cubic-bezier(1, 0.09, 0, 0.89);grid-template-rows:var(--limel-h-l-grid-template-rows, 1fr)}:host(limel-helper-line.hide){--limel-h-l-grid-template-rows-transition-speed:0.3s;--limel-h-l-grid-template-rows:0fr}";const o=class{constructor(t){e(this,t);this.hasContent=()=>!!(this.maxLength>0||this.helperText&&this.helperText.length>0);this.renderHelperText=()=>{if(!this.helperText){return}return i("span",{class:"helper-text",id:this.helperTextId},this.helperText)};this.renderCharacterCounter=()=>{const e=`${this.length} / ${this.maxLength}`;if(!this.maxLength){return}return i("span",{class:"counter"},e)};this.helperText=undefined;this.length=undefined;this.maxLength=undefined;this.invalid=false;this.helperTextId=undefined}render(){return i(t,{tabIndex:-1,class:{invalid:this.invalid},style:!this.hasContent()?{display:"none"}:{},"aria-hidden":!this.hasContent()},i("div",null,this.renderHelperText(),this.renderCharacterCounter()))}};o.style=n;export{l as limel_dynamic_label,o as limel_helper_line};
2
- //# sourceMappingURL=p-a2d19673.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["dynamicLabelCss","DynamicLabel","render","label","this","labels","find","l","value","renderIcon","_a","icon","defaultLabel","renderLabel","_b","text","iconName","getIconName","iconColor","iconBackgroundColor","color","backgroundColor","iconProps","role","name","style","h","Object","assign","helperLineCss","HelperLine","hasContent","maxLength","helperText","length","renderHelperText","class","id","helperTextId","renderCharacterCounter","counter","Host","tabIndex","invalid","display"],"sources":["./src/components/dynamic-label/dynamic-label.scss?tag=limel-dynamic-label&encapsulation=shadow","./src/components/dynamic-label/dynamic-label.tsx","./src/components/helper-line/helper-line.scss?tag=limel-helper-line&encapsulation=shadow","./src/components/helper-line/helper-line.tsx"],"sourcesContent":["@use '../../style/mixins.scss';\n\n* {\n box-sizing: border-box;\n min-width: 0;\n}\n\n:host(limel-dynamic-label) {\n --limel-dynamic-label-min-height: 1.75rem;\n display: flex;\n gap: 0.5rem;\n align-items: center;\n border-radius: 0.5rem;\n min-width: 0;\n}\n\nlimel-icon {\n --limel-icon-svg-margin: 0.125rem;\n border-radius: 0.25rem;\n flex-shrink: 0;\n width: var(--limel-dynamic-label-min-height);\n color: rgb(\n var(--contrast-900)\n ); // The default `false` color. Will be overwritten by `Icon`\n}\n\nspan {\n @include mixins.truncate-text;\n flex-grow: 1;\n font-size: 0.8125rem; // `13px`, Like Checkbox & Switch\n color: var(--mdc-theme-on-surface);\n}\n","import { getIconName } from '../icon/get-icon-props';\nimport { Component, Prop, h } from '@stencil/core';\nimport { Label, LabelValue } from './label.types';\nimport { Icon } from '../../interface';\n\n/**\n * This components displays a different label depending on the current given\n * value. A label can consist of a text and an optional icon. If no matching\n * label is found among the given `labels`, the `defaultLabel` will be displayed.\n *\n * One use case of the component is to enhance the visualization of a `boolean`\n * field like a checkbox or switch in a `readonly` state.\n *\n * The reason we offer this component is that the default styling\n * of the Checkbox or Toggle switch in the `readonly` state may not always\n * provide the best way of _visualizing information_, potentially leading to\n * confusion and negatively affecting the end-users' experience.\n *\n * @exampleComponent limel-example-dynamic-label\n * @exampleComponent limel-example-dynamic-label-readonly-boolean\n * @beta\n */\n@Component({\n tag: 'limel-dynamic-label',\n shadow: true,\n styleUrl: 'dynamic-label.scss',\n})\nexport class DynamicLabel {\n /**\n * The current value of the component which is used to match with the given\n * `labels` to determine what label to display.\n *\n * If not matching label is found, the `defaultLabel` is displayed.\n */\n @Prop()\n public value: LabelValue;\n\n /**\n * The label to display when no matching value is found in the `labels`\n * array. This is a fallback label that ensures there's always a label\n * displayed for the component.\n */\n @Prop({ reflect: true })\n public defaultLabel: Omit<Label, 'value'> = {};\n\n /**\n * A list of available labels. Each label has a corresponding value that\n * will be matched with the current `value` of the component to determine\n * what label to display.\n */\n @Prop()\n public labels: Label[] = [];\n\n public render() {\n const label = this.labels.find((l) => l.value === this.value);\n\n return [\n this.renderIcon(label?.icon ?? this.defaultLabel.icon),\n this.renderLabel(label?.text ?? this.defaultLabel.text),\n ];\n }\n\n private renderIcon(icon?: string | Icon) {\n const iconName = getIconName(icon);\n if (!iconName) {\n return;\n }\n\n let iconColor: string | undefined;\n let iconBackgroundColor: string | undefined;\n\n if (typeof icon === 'object') {\n iconColor = icon.color;\n iconBackgroundColor = icon.backgroundColor;\n }\n\n const iconProps = {\n role: 'presentation',\n name: iconName,\n style: {\n color: iconColor,\n 'background-color': iconBackgroundColor,\n },\n };\n\n return <limel-icon {...iconProps} />;\n }\n\n private renderLabel(label: string = '') {\n return <span>{label}</span>;\n }\n}\n",":host(limel-helper-line) {\n transition: opacity 0.2s ease;\n\n box-sizing: border-box;\n display: grid;\n\n min-width: 0; // prevents overflowing, if component is placed in flex containers\n\n -moz-osx-font-smoothing: grayscale;\n -webkit-font-smoothing: antialiased;\n font-size: 0.6875rem;\n line-height: normal;\n\n color: rgb(var(--contrast-1200));\n}\n\ndiv {\n display: flex;\n justify-content: space-between;\n gap: 0.75rem;\n overflow: hidden;\n padding: 0 1rem;\n}\n\n:host(limel-helper-line.invalid) {\n .helper-text {\n color: var(--mdc-theme-error);\n }\n}\n\n.counter {\n flex-shrink: 0;\n margin-left: auto;\n}\n\n.helper-text,\n.counter {\n padding-top: 0.125rem;\n}\n\n// This animates height of the helper line, from `0` to `auto`.\n// To get this animation effect, the consumer component should\n// add `hide` classed accordingly.\n:host(limel-helper-line) {\n transition: grid-template-rows\n var(--limel-h-l-grid-template-rows-transition-speed, 0.46s)\n cubic-bezier(1, 0.09, 0, 0.89);\n grid-template-rows: var(--limel-h-l-grid-template-rows, 1fr);\n}\n\n:host(limel-helper-line.hide) {\n --limel-h-l-grid-template-rows-transition-speed: 0.3s;\n --limel-h-l-grid-template-rows: 0fr;\n}\n// End: animating height\n","import { Component, Host, Prop, h } from '@stencil/core';\n\n/**\n * This is an internal and private component that many input fields\n * use to display a helper text, along with a character counter below the\n * input field.\n *\n * We created this to keep the visual styles the same everywhere\n * and to avoid importing styles separately.\n *\n * Also this enables us to open the helper line in limel-portal,\n * more easily without having to send the styles to the portal.\n *\n * @exampleComponent limel-example-helper-line\n * @exampleComponent limel-example-helper-line-invalid\n * @exampleComponent limel-example-helper-line-long-text\n * @exampleComponent limel-example-helper-line-long-text-no-counter\n * @exampleComponent limel-example-helper-line-character-counter\n * @exampleComponent limel-example-helper-line-empty\n * @exampleComponent limel-example-helper-line-animation\n * @private\n */\n@Component({\n tag: 'limel-helper-line',\n shadow: true,\n styleUrl: 'helper-line.scss',\n})\nexport class HelperLine {\n /**\n * The helper text that is displayed on the left side.\n */\n @Prop({ reflect: true })\n public helperText?: string;\n\n /**\n * Length of the current input value, coming from the parent component.\n * Used in the character counter section on the right side.\n */\n @Prop({ reflect: true })\n public length?: number;\n\n /**\n * Maximum length of the characters, defined on the parent component.\n * Used in the character counter section on the right side.\n */\n @Prop({ reflect: true })\n public maxLength?: number;\n\n /**\n * Turns `true`, when the parent component is invalid.\n * For example, when the parent component is `required` but is left empty.\n * Or when the input format is invalid.\n */\n @Prop({ reflect: true })\n public invalid?: boolean = false;\n\n /**\n * Used by `aria-controls` and `aria-describedby` in the parent component.\n */\n @Prop({ reflect: true })\n public helperTextId?: string;\n\n public render() {\n return (\n <Host\n tabIndex={-1}\n class={{\n invalid: this.invalid,\n }}\n style={!this.hasContent() ? { display: 'none' } : {}}\n aria-hidden={!this.hasContent()}\n >\n <div>\n {this.renderHelperText()}\n {this.renderCharacterCounter()}\n </div>\n </Host>\n );\n }\n\n private hasContent = () => {\n return !!(\n this.maxLength > 0 ||\n (this.helperText && this.helperText.length > 0)\n );\n };\n\n private renderHelperText = () => {\n if (!this.helperText) {\n return;\n }\n\n return (\n <span class=\"helper-text\" id={this.helperTextId}>\n {this.helperText}\n </span>\n );\n };\n\n private renderCharacterCounter = () => {\n const counter = `${this.length} / ${this.maxLength}`;\n\n if (!this.maxLength) {\n return;\n }\n\n return <span class=\"counter\">{counter}</span>;\n };\n}\n"],"mappings":"sFAAA,MAAMA,EAAkB,oe,MC2BXC,EAAY,M,gEAgBuB,G,YAQnB,E,CAElBC,S,QACH,MAAMC,EAAQC,KAAKC,OAAOC,MAAMC,GAAMA,EAAEC,QAAUJ,KAAKI,QAEvD,MAAO,CACHJ,KAAKK,YAAWC,EAAAP,IAAK,MAALA,SAAK,SAALA,EAAOQ,QAAI,MAAAD,SAAA,EAAAA,EAAIN,KAAKQ,aAAaD,MACjDP,KAAKS,aAAYC,EAAAX,IAAK,MAALA,SAAK,SAALA,EAAOY,QAAI,MAAAD,SAAA,EAAAA,EAAIV,KAAKQ,aAAaG,M,CAIlDN,WAAWE,GACf,MAAMK,EAAWC,EAAYN,GAC7B,IAAKK,EAAU,CACX,M,CAGJ,IAAIE,EACJ,IAAIC,EAEJ,UAAWR,IAAS,SAAU,CAC1BO,EAAYP,EAAKS,MACjBD,EAAsBR,EAAKU,e,CAG/B,MAAMC,EAAY,CACdC,KAAM,eACNC,KAAMR,EACNS,MAAO,CACHL,MAAOF,EACP,mBAAoBC,IAI5B,OAAOO,EAAA,aAAAC,OAAAC,OAAA,GAAgBN,G,CAGnBT,YAAYV,EAAgB,IAChC,OAAOuB,EAAA,YAAOvB,E,aCzFtB,MAAM0B,EAAgB,gzB,MC2BTC,EAAU,M,yBAqDX1B,KAAA2B,WAAa,OAEb3B,KAAK4B,UAAY,GAChB5B,KAAK6B,YAAc7B,KAAK6B,WAAWC,OAAS,GAI7C9B,KAAA+B,iBAAmB,KACvB,IAAK/B,KAAK6B,WAAY,CAClB,M,CAGJ,OACIP,EAAA,QAAMU,MAAM,cAAcC,GAAIjC,KAAKkC,cAC9BlC,KAAK6B,WACH,EAIP7B,KAAAmC,uBAAyB,KAC7B,MAAMC,EAAU,GAAGpC,KAAK8B,YAAY9B,KAAK4B,YAEzC,IAAK5B,KAAK4B,UAAW,CACjB,M,CAGJ,OAAON,EAAA,QAAMU,MAAM,WAAWI,EAAe,E,sFApDtB,M,4BAQpBtC,SACH,OACIwB,EAACe,EAAI,CACDC,UAAW,EACXN,MAAO,CACHO,QAASvC,KAAKuC,SAElBlB,OAAQrB,KAAK2B,aAAe,CAAEa,QAAS,QAAW,GAAE,eACtCxC,KAAK2B,cAEnBL,EAAA,WACKtB,KAAK+B,mBACL/B,KAAKmC,0B"}
@@ -1,2 +0,0 @@
1
- const e={remove:"Fjern","callout.note":"Bemærk","callout.important":"Vigtig","callout.tip":"Tip","callout.caution":"Advarsel","callout.warning":"Advarsel","date-picker.today":"Idag","date-picker.month.heading":"Måned","date-picker.quarter.heading":"Kvartal","date-picker.year.heading":"År","chip-set.clear-all":"Ryd alle","file.drag-and-drop-tips":"Træk og slip filen her, eller klik for at gennemse.","file-viewer.message.unsupported-filetype":"Denne fil kan ikke vises!","file-viewer.download":"Hent","file-viewer.exit-fullscreen":"Afslut fuldskærm","file-viewer.open-in-fullscreen":"Åbn i fuld skærm","file-viewer.open-in-new-tab":"Åbn i en ny fane","file-viewer.more-actions":"Mere…","editor-menu.bold":"Fed","editor-menu.italic":"Kursiv","editor-menu.h1":"Overskrift 1","editor-menu.h2":"Overskrift 2","editor-menu.h3":"Overskrift 3","editor-menu.bulleted-list":"Punktliste","editor-menu.numbered-list":"Nummereret liste","editor-menu.blockquote":"Blokcitat","editor-menu.link":"Tilføj link"};const i={remove:"Remove","callout.note":"Note","callout.important":"Important","callout.tip":"Tip","callout.caution":"Caution","callout.warning":"Warning","date-picker.today":"Today","date-picker.month.heading":"Month","date-picker.quarter.heading":"Quarter","date-picker.year.heading":"Year","chip-set.clear-all":"Clear all","snackbar.dismiss":"Dismiss","file.drag-and-drop-tips":"Drag and drop your file here, or click to browse.","file-viewer.message.unsupported-filetype":"Cannot display this file!","file-viewer.download":"Download","file-viewer.exit-fullscreen":"Exit fullscreen","file-viewer.open-in-fullscreen":"Open in fullscreen","file-viewer.open-in-new-tab":"Open in a new tab","file-viewer.more-actions":"More…","editor-menu.bold":"Bold","editor-menu.italic":"Italic","editor-menu.h1":"Heading 1","editor-menu.h2":"Heading 2","editor-menu.h3":"Heading 3","editor-menu.bulleted-list":"Bulleted list","editor-menu.numbered-list":"Numbered list","editor-menu.blockquote":"Blockquote","editor-menu.link":"Link"};const t={remove:"Poista","callout.note":"Huomio","callout.important":"Tärkeää","callout.tip":"Vinkki","callout.caution":"Varoitus","callout.warning":"Varoitus","date-picker.today":"Tänään","date-picker.month.heading":"Kuukausi","date-picker.quarter.heading":"Vuosineljännes","date-picker.year.heading":"Vuosi","chip-set.clear-all":"Tyhjennä kaikki","file.drag-and-drop-tips":"Vedä ja pudota tiedostosi tähän, tai napsauta selataksesi.","file-viewer.message.unsupported-filetype":"Tätä tiedostoa ei voi näyttää!","file-viewer.download":"Ladata","file-viewer.exit-fullscreen":"Poistu koko näytöstä","file-viewer.open-in-fullscreen":"Avaa koko näytössä","file-viewer.open-in-new-tab":"Avaa uudella välilehdellä","file-viewer.more-actions":"Lisää…","editor-menu.bold":"Lihavoitu","editor-menu.italic":"Kursivoitu","editor-menu.h1":"Otsikkotaso 1","editor-menu.h2":"Otsikkotaso 2","editor-menu.h3":"Otsikkotaso 3","editor-menu.bulleted-list":"Luettelomerkitty lista","editor-menu.numbered-list":"Numeroitu lista","editor-menu.blockquote":"Lohkoteksti","editor-menu.link":"Lisää linkki"};const l={remove:"Verwijder","callout.note":"Opmerking","callout.important":"Belangrijk","callout.tip":"Tip","callout.caution":"Waarschuwing","callout.warning":"Waarschuwing","date-picker.today":"Vandaag","date-picker.month.heading":"Maand","date-picker.quarter.heading":"Kwartaal","date-picker.year.heading":"Jaar","chip-set.clear-all":"Alles wissen","file.drag-and-drop-tips":"Sleep uw bestand en zet het hier neer of klik om te bladeren.","file-viewer.message.unsupported-filetype":"Kan dit bestand niet weergeven!","file-viewer.download":"Downloaden","file-viewer.exit-fullscreen":"Verlaat volledig scherm","file-viewer.open-in-fullscreen":"Open in volledig scherm","file-viewer.open-in-new-tab":"Openen op een nieuw tabblad","file-viewer.more-actions":"Meer…","editor-menu.bold":"Vet","editor-menu.italic":"Cursief","editor-menu.h1":"Kopniveau 1","editor-menu.h2":"Kopniveau 2","editor-menu.h3":"Kopniveau 3","editor-menu.bulleted-list":"Opsomming","editor-menu.numbered-list":"Genummerde lijst","editor-menu.blockquote":"Blokcitaat","editor-menu.link":"Link toevoegen"};const n={remove:"Fjerne","callout.note":"Note","callout.important":"Viktig","callout.tip":"Tip","callout.caution":"Advarsel","callout.warning":"Advarsel","date-picker.today":"I dag","date-picker.month.heading":"Måned","date-picker.quarter.heading":"Kvartal","date-picker.year.heading":"År","chip-set.clear-all":"Fjern alle","file.drag-and-drop-tips":"Dra og slipp filen her, eller klikk for å bla gjennom.","file-viewer.message.unsupported-filetype":"Kan ikke vise denne filen!","file-viewer.download":"Nedlasting","file-viewer.exit-fullscreen":"Gå ut av fullskjerm","file-viewer.open-in-fullscreen":"Åpne i fullskjerm","file-viewer.open-in-new-tab":"Åpne i en ny fane","file-viewer.more-actions":"Mer…","editor-menu.bold":"Fet","editor-menu.italic":"Kursiv","editor-menu.h1":"Overskrift 1","editor-menu.h2":"Overskrift 2","editor-menu.h3":"Overskrifts 3","editor-menu.bulleted-list":"Punktliste","editor-menu.numbered-list":"Nummerert liste","editor-menu.blockquote":"Blokksitat","editor-menu.link":"Legg til lenke"};const r={remove:"Ta bort","callout.note":"Obs","callout.important":"Viktigt","callout.tip":"Tips","callout.caution":"Varning","callout.warning":"Varning","date-picker.today":"Idag","date-picker.month.heading":"Månad","date-picker.quarter.heading":"Kvartal","date-picker.year.heading":"År","chip-set.clear-all":"Rensa alla","snackbar.dismiss":"Stäng","file.drag-and-drop-tips":"Dra och släpp filen här eller klicka om du vill bläddra.","file-viewer.message.unsupported-filetype":"Kan inte visa den här filen!","file-viewer.download":"Ladda ner","file-viewer.exit-fullscreen":"Avsluta fullskärmsläge","file-viewer.open-in-fullscreen":"Öppna i fullskärmsläge","file-viewer.open-in-new-tab":"Öppna i ny flik","file-viewer.more-actions":"Mer…","editor-menu.bold":"Fet","editor-menu.italic":"Kursiv","editor-menu.h1":"Rubrik 1","editor-menu.h2":"Rubrik 2","editor-menu.h3":"Rubrik 3","editor-menu.bulleted-list":"Punktlista","editor-menu.numbered-list":"Numrerad lista","editor-menu.blockquote":"Blockcitat","editor-menu.link":"Lägg till länk"};const a={da:e,en:i,fi:t,no:n,nl:l,sv:r};class o{get(e,i="en"){return a[i][e]}}const d=new o;const u=(()=>d)();export{u as t};
2
- //# sourceMappingURL=p-cd6b9ff0.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["da","remove","en","fi","nl","no","sv","allTranslations","Translations","get","key","language","translations","translate"],"sources":["./src/translations/da.ts","./src/translations/en.ts","./src/translations/fi.ts","./src/translations/nl.ts","./src/translations/no.ts","./src/translations/sv.ts","./src/global/translations.ts"],"sourcesContent":["export default {\n remove: 'Fjern',\n 'callout.note': 'Bemærk',\n 'callout.important': 'Vigtig',\n 'callout.tip': 'Tip',\n 'callout.caution': 'Advarsel',\n 'callout.warning': 'Advarsel',\n 'date-picker.today': 'Idag',\n 'date-picker.month.heading': 'Måned',\n 'date-picker.quarter.heading': 'Kvartal',\n 'date-picker.year.heading': 'År',\n 'chip-set.clear-all': 'Ryd alle',\n 'file.drag-and-drop-tips':\n 'Træk og slip filen her, eller klik for at gennemse.',\n 'file-viewer.message.unsupported-filetype': 'Denne fil kan ikke vises!',\n 'file-viewer.download': 'Hent',\n 'file-viewer.exit-fullscreen': 'Afslut fuldskærm',\n 'file-viewer.open-in-fullscreen': 'Åbn i fuld skærm',\n 'file-viewer.open-in-new-tab': 'Åbn i en ny fane',\n 'file-viewer.more-actions': 'Mere…',\n 'editor-menu.bold': 'Fed',\n 'editor-menu.italic': 'Kursiv',\n 'editor-menu.h1': 'Overskrift 1',\n 'editor-menu.h2': 'Overskrift 2',\n 'editor-menu.h3': 'Overskrift 3',\n 'editor-menu.bulleted-list': 'Punktliste',\n 'editor-menu.numbered-list': 'Nummereret liste',\n 'editor-menu.blockquote': 'Blokcitat',\n 'editor-menu.link': 'Tilføj link',\n};\n","export default {\n remove: 'Remove',\n 'callout.note': 'Note',\n 'callout.important': 'Important',\n 'callout.tip': 'Tip',\n 'callout.caution': 'Caution',\n 'callout.warning': 'Warning',\n 'date-picker.today': 'Today',\n 'date-picker.month.heading': 'Month',\n 'date-picker.quarter.heading': 'Quarter',\n 'date-picker.year.heading': 'Year',\n 'chip-set.clear-all': 'Clear all',\n 'snackbar.dismiss': 'Dismiss',\n 'file.drag-and-drop-tips':\n 'Drag and drop your file here, or click to browse.',\n 'file-viewer.message.unsupported-filetype': 'Cannot display this file!',\n 'file-viewer.download': 'Download',\n 'file-viewer.exit-fullscreen': 'Exit fullscreen',\n 'file-viewer.open-in-fullscreen': 'Open in fullscreen',\n 'file-viewer.open-in-new-tab': 'Open in a new tab',\n 'file-viewer.more-actions': 'More…',\n 'editor-menu.bold': 'Bold',\n 'editor-menu.italic': 'Italic',\n 'editor-menu.h1': 'Heading 1',\n 'editor-menu.h2': 'Heading 2',\n 'editor-menu.h3': 'Heading 3',\n 'editor-menu.bulleted-list': 'Bulleted list',\n 'editor-menu.numbered-list': 'Numbered list',\n 'editor-menu.blockquote': 'Blockquote',\n 'editor-menu.link': 'Link',\n};\n","export default {\n remove: 'Poista',\n 'callout.note': 'Huomio',\n 'callout.important': 'Tärkeää',\n 'callout.tip': 'Vinkki',\n 'callout.caution': 'Varoitus',\n 'callout.warning': 'Varoitus',\n 'date-picker.today': 'Tänään',\n 'date-picker.month.heading': 'Kuukausi',\n 'date-picker.quarter.heading': 'Vuosineljännes',\n 'date-picker.year.heading': 'Vuosi',\n 'chip-set.clear-all': 'Tyhjennä kaikki',\n 'file.drag-and-drop-tips':\n 'Vedä ja pudota tiedostosi tähän, tai napsauta selataksesi.',\n 'file-viewer.message.unsupported-filetype':\n 'Tätä tiedostoa ei voi näyttää!',\n 'file-viewer.download': 'Ladata',\n 'file-viewer.exit-fullscreen': 'Poistu koko näytöstä',\n 'file-viewer.open-in-fullscreen': 'Avaa koko näytössä',\n 'file-viewer.open-in-new-tab': 'Avaa uudella välilehdellä',\n 'file-viewer.more-actions': 'Lisää…',\n 'editor-menu.bold': 'Lihavoitu',\n 'editor-menu.italic': 'Kursivoitu',\n 'editor-menu.h1': 'Otsikkotaso 1',\n 'editor-menu.h2': 'Otsikkotaso 2',\n 'editor-menu.h3': 'Otsikkotaso 3',\n 'editor-menu.bulleted-list': 'Luettelomerkitty lista',\n 'editor-menu.numbered-list': 'Numeroitu lista',\n 'editor-menu.blockquote': 'Lohkoteksti',\n 'editor-menu.link': 'Lisää linkki',\n};\n","export default {\n remove: 'Verwijder',\n 'callout.note': 'Opmerking',\n 'callout.important': 'Belangrijk',\n 'callout.tip': 'Tip',\n 'callout.caution': 'Waarschuwing',\n 'callout.warning': 'Waarschuwing',\n 'date-picker.today': 'Vandaag',\n 'date-picker.month.heading': 'Maand',\n 'date-picker.quarter.heading': 'Kwartaal',\n 'date-picker.year.heading': 'Jaar',\n 'chip-set.clear-all': 'Alles wissen',\n 'file.drag-and-drop-tips':\n 'Sleep uw bestand en zet het hier neer of klik om te bladeren.',\n 'file-viewer.message.unsupported-filetype':\n 'Kan dit bestand niet weergeven!',\n 'file-viewer.download': 'Downloaden',\n 'file-viewer.exit-fullscreen': 'Verlaat volledig scherm',\n 'file-viewer.open-in-fullscreen': 'Open in volledig scherm',\n 'file-viewer.open-in-new-tab': 'Openen op een nieuw tabblad',\n 'file-viewer.more-actions': 'Meer…',\n 'editor-menu.bold': 'Vet',\n 'editor-menu.italic': 'Cursief',\n 'editor-menu.h1': 'Kopniveau 1',\n 'editor-menu.h2': 'Kopniveau 2',\n 'editor-menu.h3': 'Kopniveau 3',\n 'editor-menu.bulleted-list': 'Opsomming',\n 'editor-menu.numbered-list': 'Genummerde lijst',\n 'editor-menu.blockquote': 'Blokcitaat',\n 'editor-menu.link': 'Link toevoegen',\n};\n","export default {\n remove: 'Fjerne',\n 'callout.note': 'Note',\n 'callout.important': 'Viktig',\n 'callout.tip': 'Tip',\n 'callout.caution': 'Advarsel',\n 'callout.warning': 'Advarsel',\n 'date-picker.today': 'I dag',\n 'date-picker.month.heading': 'Måned',\n 'date-picker.quarter.heading': 'Kvartal',\n 'date-picker.year.heading': 'År',\n 'chip-set.clear-all': 'Fjern alle',\n 'file.drag-and-drop-tips':\n 'Dra og slipp filen her, eller klikk for å bla gjennom.',\n 'file-viewer.message.unsupported-filetype': 'Kan ikke vise denne filen!',\n 'file-viewer.download': 'Nedlasting',\n 'file-viewer.exit-fullscreen': 'Gå ut av fullskjerm',\n 'file-viewer.open-in-fullscreen': 'Åpne i fullskjerm',\n 'file-viewer.open-in-new-tab': 'Åpne i en ny fane',\n 'file-viewer.more-actions': 'Mer…',\n 'editor-menu.bold': 'Fet',\n 'editor-menu.italic': 'Kursiv',\n 'editor-menu.h1': 'Overskrift 1',\n 'editor-menu.h2': 'Overskrift 2',\n 'editor-menu.h3': 'Overskrifts 3',\n 'editor-menu.bulleted-list': 'Punktliste',\n 'editor-menu.numbered-list': 'Nummerert liste',\n 'editor-menu.blockquote': 'Blokksitat',\n 'editor-menu.link': 'Legg til lenke',\n};\n","export default {\n remove: 'Ta bort',\n 'callout.note': 'Obs',\n 'callout.important': 'Viktigt',\n 'callout.tip': 'Tips',\n 'callout.caution': 'Varning',\n 'callout.warning': 'Varning',\n 'date-picker.today': 'Idag',\n 'date-picker.month.heading': 'Månad',\n 'date-picker.quarter.heading': 'Kvartal',\n 'date-picker.year.heading': 'År',\n 'chip-set.clear-all': 'Rensa alla',\n 'snackbar.dismiss': 'Stäng',\n 'file.drag-and-drop-tips':\n 'Dra och släpp filen här eller klicka om du vill bläddra.',\n 'file-viewer.message.unsupported-filetype': 'Kan inte visa den här filen!',\n 'file-viewer.download': 'Ladda ner',\n 'file-viewer.exit-fullscreen': 'Avsluta fullskärmsläge',\n 'file-viewer.open-in-fullscreen': 'Öppna i fullskärmsläge',\n 'file-viewer.open-in-new-tab': 'Öppna i ny flik',\n 'file-viewer.more-actions': 'Mer…',\n 'editor-menu.bold': 'Fet',\n 'editor-menu.italic': 'Kursiv',\n 'editor-menu.h1': 'Rubrik 1',\n 'editor-menu.h2': 'Rubrik 2',\n 'editor-menu.h3': 'Rubrik 3',\n 'editor-menu.bulleted-list': 'Punktlista',\n 'editor-menu.numbered-list': 'Numrerad lista',\n 'editor-menu.blockquote': 'Blockcitat',\n 'editor-menu.link': 'Lägg till länk',\n};\n","import da from '../translations/da';\nimport en from '../translations/en';\nimport fi from '../translations/fi';\nimport nl from '../translations/nl';\nimport no from '../translations/no';\nimport sv from '../translations/sv';\n\nconst allTranslations = { da: da, en: en, fi: fi, no: no, nl: nl, sv: sv };\n\nexport class Translations {\n public get(key, language = 'en') {\n return allTranslations[language][key];\n }\n}\n\nconst translations = new Translations();\nexport default (() => {\n return translations;\n})();\n"],"mappings":"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"}
@@ -1,2 +0,0 @@
1
- import{r as t,h as r,g as e}from"./p-443111b3.js";var n="top";var a="bottom";var i="right";var o="left";var f="auto";var u=[n,a,i,o];var v="start";var s="end";var c="clippingParents";var l="viewport";var d="popper";var h="reference";var p=u.reduce((function(t,r){return t.concat([r+"-"+v,r+"-"+s])}),[]);var b=[].concat(u,[f]).reduce((function(t,r){return t.concat([r,r+"-"+v,r+"-"+s])}),[]);var m="beforeRead";var y="read";var g="afterRead";var w="beforeMain";var x="main";var O="afterMain";var j="beforeWrite";var k="write";var M="afterWrite";var P=[m,y,g,w,x,O,j,k,M];function C(t){return t?(t.nodeName||"").toLowerCase():null}function A(t){if(t==null){return window}if(t.toString()!=="[object Window]"){var r=t.ownerDocument;return r?r.defaultView||window:window}return t}function q(t){var r=A(t).Element;return t instanceof r||t instanceof Element}function E(t){var r=A(t).HTMLElement;return t instanceof r||t instanceof HTMLElement}function R(t){if(typeof ShadowRoot==="undefined"){return false}var r=A(t).ShadowRoot;return t instanceof r||t instanceof ShadowRoot}function W(t){var r=t.state;Object.keys(r.elements).forEach((function(t){var e=r.styles[t]||{};var n=r.attributes[t]||{};var a=r.elements[t];if(!E(a)||!C(a)){return}Object.assign(a.style,e);Object.keys(n).forEach((function(t){var r=n[t];if(r===false){a.removeAttribute(t)}else{a.setAttribute(t,r===true?"":r)}}))}))}function B(t){var r=t.state;var e={popper:{position:r.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(r.elements.popper.style,e.popper);r.styles=e;if(r.elements.arrow){Object.assign(r.elements.arrow.style,e.arrow)}return function(){Object.keys(r.elements).forEach((function(t){var n=r.elements[t];var a=r.attributes[t]||{};var i=Object.keys(r.styles.hasOwnProperty(t)?r.styles[t]:e[t]);var o=i.reduce((function(t,r){t[r]="";return t}),{});if(!E(n)||!C(n)){return}Object.assign(n.style,o);Object.keys(a).forEach((function(t){n.removeAttribute(t)}))}))}}const S={name:"applyStyles",enabled:true,phase:"write",fn:W,effect:B,requires:["computeStyles"]};function L(t){return t.split("-")[0]}var I=Math.max;var T=Math.min;var z=Math.round;function F(){var t=navigator.userAgentData;if(t!=null&&t.brands&&Array.isArray(t.brands)){return t.brands.map((function(t){return t.brand+"/"+t.version})).join(" ")}return navigator.userAgent}function H(){return!/^((?!chrome|android).)*safari/i.test(F())}function V(t,r,e){if(r===void 0){r=false}if(e===void 0){e=false}var n=t.getBoundingClientRect();var a=1;var i=1;if(r&&E(t)){a=t.offsetWidth>0?z(n.width)/t.offsetWidth||1:1;i=t.offsetHeight>0?z(n.height)/t.offsetHeight||1:1}var o=q(t)?A(t):window,f=o.visualViewport;var u=!H()&&e;var v=(n.left+(u&&f?f.offsetLeft:0))/a;var s=(n.top+(u&&f?f.offsetTop:0))/i;var c=n.width/a;var l=n.height/i;return{width:c,height:l,top:s,right:v+c,bottom:s+l,left:v,x:v,y:s}}function D(t){var r=V(t);var e=t.offsetWidth;var n=t.offsetHeight;if(Math.abs(r.width-e)<=1){e=r.width}if(Math.abs(r.height-n)<=1){n=r.height}return{x:t.offsetLeft,y:t.offsetTop,width:e,height:n}}function $(t,r){var e=r.getRootNode&&r.getRootNode();if(t.contains(r)){return true}else if(e&&R(e)){var n=r;do{if(n&&t.isSameNode(n)){return true}n=n.parentNode||n.host}while(n)}return false}function _(t){return A(t).getComputedStyle(t)}function U(t){return["table","td","th"].indexOf(C(t))>=0}function G(t){return((q(t)?t.ownerDocument:t.document)||window.document).documentElement}function J(t){if(C(t)==="html"){return t}return t.assignedSlot||t.parentNode||(R(t)?t.host:null)||G(t)}function K(t){if(!E(t)||_(t).position==="fixed"){return null}return t.offsetParent}function N(t){var r=/firefox/i.test(F());var e=/Trident/i.test(F());if(e&&E(t)){var n=_(t);if(n.position==="fixed"){return null}}var a=J(t);if(R(a)){a=a.host}while(E(a)&&["html","body"].indexOf(C(a))<0){var i=_(a);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||r&&i.willChange==="filter"||r&&i.filter&&i.filter!=="none"){return a}else{a=a.parentNode}}return null}function Q(t){var r=A(t);var e=K(t);while(e&&U(e)&&_(e).position==="static"){e=K(e)}if(e&&(C(e)==="html"||C(e)==="body"&&_(e).position==="static")){return r}return e||N(t)||r}function X(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Y(t,r,e){return I(t,T(r,e))}function Z(t,r,e){var n=Y(t,r,e);return n>e?e:n}function tt(){return{top:0,right:0,bottom:0,left:0}}function rt(t){return Object.assign({},tt(),t)}function et(t,r){return r.reduce((function(r,e){r[e]=t;return r}),{})}var nt=function t(r,e){r=typeof r==="function"?r(Object.assign({},e.rects,{placement:e.placement})):r;return rt(typeof r!=="number"?r:et(r,u))};function at(t){var r;var e=t.state,f=t.name,u=t.options;var v=e.elements.arrow;var s=e.modifiersData.popperOffsets;var c=L(e.placement);var l=X(c);var d=[o,i].indexOf(c)>=0;var h=d?"height":"width";if(!v||!s){return}var p=nt(u.padding,e);var b=D(v);var m=l==="y"?n:o;var y=l==="y"?a:i;var g=e.rects.reference[h]+e.rects.reference[l]-s[l]-e.rects.popper[h];var w=s[l]-e.rects.reference[l];var x=Q(v);var O=x?l==="y"?x.clientHeight||0:x.clientWidth||0:0;var j=g/2-w/2;var k=p[m];var M=O-b[h]-p[y];var P=O/2-b[h]/2+j;var C=Y(k,P,M);var A=l;e.modifiersData[f]=(r={},r[A]=C,r.centerOffset=C-P,r)}function it(t){var r=t.state,e=t.options;var n=e.element,a=n===void 0?"[data-popper-arrow]":n;if(a==null){return}if(typeof a==="string"){a=r.elements.popper.querySelector(a);if(!a){return}}if(!$(r.elements.popper,a)){return}r.elements.arrow=a}const ot={name:"arrow",enabled:true,phase:"main",fn:at,effect:it,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ft(t){return t.split("-")[1]}var ut={top:"auto",right:"auto",bottom:"auto",left:"auto"};function vt(t,r){var e=t.x,n=t.y;var a=r.devicePixelRatio||1;return{x:z(e*a)/a||0,y:z(n*a)/a||0}}function st(t){var r;var e=t.popper,f=t.popperRect,u=t.placement,v=t.variation,c=t.offsets,l=t.position,d=t.gpuAcceleration,h=t.adaptive,p=t.roundOffsets,b=t.isFixed;var m=c.x,y=m===void 0?0:m,g=c.y,w=g===void 0?0:g;var x=typeof p==="function"?p({x:y,y:w}):{x:y,y:w};y=x.x;w=x.y;var O=c.hasOwnProperty("x");var j=c.hasOwnProperty("y");var k=o;var M=n;var P=window;if(h){var C=Q(e);var q="clientHeight";var E="clientWidth";if(C===A(e)){C=G(e);if(_(C).position!=="static"&&l==="absolute"){q="scrollHeight";E="scrollWidth"}}C=C;if(u===n||(u===o||u===i)&&v===s){M=a;var R=b&&C===P&&P.visualViewport?P.visualViewport.height:C[q];w-=R-f.height;w*=d?1:-1}if(u===o||(u===n||u===a)&&v===s){k=i;var W=b&&C===P&&P.visualViewport?P.visualViewport.width:C[E];y-=W-f.width;y*=d?1:-1}}var B=Object.assign({position:l},h&&ut);var S=p===true?vt({x:y,y:w},A(e)):{x:y,y:w};y=S.x;w=S.y;if(d){var L;return Object.assign({},B,(L={},L[M]=j?"0":"",L[k]=O?"0":"",L.transform=(P.devicePixelRatio||1)<=1?"translate("+y+"px, "+w+"px)":"translate3d("+y+"px, "+w+"px, 0)",L))}return Object.assign({},B,(r={},r[M]=j?w+"px":"",r[k]=O?y+"px":"",r.transform="",r))}function ct(t){var r=t.state,e=t.options;var n=e.gpuAcceleration,a=n===void 0?true:n,i=e.adaptive,o=i===void 0?true:i,f=e.roundOffsets,u=f===void 0?true:f;var v={placement:L(r.placement),variation:ft(r.placement),popper:r.elements.popper,popperRect:r.rects.popper,gpuAcceleration:a,isFixed:r.options.strategy==="fixed"};if(r.modifiersData.popperOffsets!=null){r.styles.popper=Object.assign({},r.styles.popper,st(Object.assign({},v,{offsets:r.modifiersData.popperOffsets,position:r.options.strategy,adaptive:o,roundOffsets:u})))}if(r.modifiersData.arrow!=null){r.styles.arrow=Object.assign({},r.styles.arrow,st(Object.assign({},v,{offsets:r.modifiersData.arrow,position:"absolute",adaptive:false,roundOffsets:u})))}r.attributes.popper=Object.assign({},r.attributes.popper,{"data-popper-placement":r.placement})}const lt={name:"computeStyles",enabled:true,phase:"beforeWrite",fn:ct,data:{}};var dt={passive:true};function ht(t){var r=t.state,e=t.instance,n=t.options;var a=n.scroll,i=a===void 0?true:a,o=n.resize,f=o===void 0?true:o;var u=A(r.elements.popper);var v=[].concat(r.scrollParents.reference,r.scrollParents.popper);if(i){v.forEach((function(t){t.addEventListener("scroll",e.update,dt)}))}if(f){u.addEventListener("resize",e.update,dt)}return function(){if(i){v.forEach((function(t){t.removeEventListener("scroll",e.update,dt)}))}if(f){u.removeEventListener("resize",e.update,dt)}}}const pt={name:"eventListeners",enabled:true,phase:"write",fn:function t(){},effect:ht,data:{}};var bt={left:"right",right:"left",bottom:"top",top:"bottom"};function mt(t){return t.replace(/left|right|bottom|top/g,(function(t){return bt[t]}))}var yt={start:"end",end:"start"};function gt(t){return t.replace(/start|end/g,(function(t){return yt[t]}))}function wt(t){var r=A(t);var e=r.pageXOffset;var n=r.pageYOffset;return{scrollLeft:e,scrollTop:n}}function xt(t){return V(G(t)).left+wt(t).scrollLeft}function Ot(t,r){var e=A(t);var n=G(t);var a=e.visualViewport;var i=n.clientWidth;var o=n.clientHeight;var f=0;var u=0;if(a){i=a.width;o=a.height;var v=H();if(v||!v&&r==="fixed"){f=a.offsetLeft;u=a.offsetTop}}return{width:i,height:o,x:f+xt(t),y:u}}function jt(t){var r;var e=G(t);var n=wt(t);var a=(r=t.ownerDocument)==null?void 0:r.body;var i=I(e.scrollWidth,e.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0);var o=I(e.scrollHeight,e.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0);var f=-n.scrollLeft+xt(t);var u=-n.scrollTop;if(_(a||e).direction==="rtl"){f+=I(e.clientWidth,a?a.clientWidth:0)-i}return{width:i,height:o,x:f,y:u}}function kt(t){var r=_(t),e=r.overflow,n=r.overflowX,a=r.overflowY;return/auto|scroll|overlay|hidden/.test(e+a+n)}function Mt(t){if(["html","body","#document"].indexOf(C(t))>=0){return t.ownerDocument.body}if(E(t)&&kt(t)){return t}return Mt(J(t))}function Pt(t,r){var e;if(r===void 0){r=[]}var n=Mt(t);var a=n===((e=t.ownerDocument)==null?void 0:e.body);var i=A(n);var o=a?[i].concat(i.visualViewport||[],kt(n)?n:[]):n;var f=r.concat(o);return a?f:f.concat(Pt(J(o)))}function Ct(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function At(t,r){var e=V(t,false,r==="fixed");e.top=e.top+t.clientTop;e.left=e.left+t.clientLeft;e.bottom=e.top+t.clientHeight;e.right=e.left+t.clientWidth;e.width=t.clientWidth;e.height=t.clientHeight;e.x=e.left;e.y=e.top;return e}function qt(t,r,e){return r===l?Ct(Ot(t,e)):q(r)?At(r,e):Ct(jt(G(t)))}function Et(t){var r=Pt(J(t));var e=["absolute","fixed"].indexOf(_(t).position)>=0;var n=e&&E(t)?Q(t):t;if(!q(n)){return[]}return r.filter((function(t){return q(t)&&$(t,n)&&C(t)!=="body"}))}function Rt(t,r,e,n){var a=r==="clippingParents"?Et(t):[].concat(r);var i=[].concat(a,[e]);var o=i[0];var f=i.reduce((function(r,e){var a=qt(t,e,n);r.top=I(a.top,r.top);r.right=T(a.right,r.right);r.bottom=T(a.bottom,r.bottom);r.left=I(a.left,r.left);return r}),qt(t,o,n));f.width=f.right-f.left;f.height=f.bottom-f.top;f.x=f.left;f.y=f.top;return f}function Wt(t){var r=t.reference,e=t.element,f=t.placement;var u=f?L(f):null;var c=f?ft(f):null;var l=r.x+r.width/2-e.width/2;var d=r.y+r.height/2-e.height/2;var h;switch(u){case n:h={x:l,y:r.y-e.height};break;case a:h={x:l,y:r.y+r.height};break;case i:h={x:r.x+r.width,y:d};break;case o:h={x:r.x-e.width,y:d};break;default:h={x:r.x,y:r.y}}var p=u?X(u):null;if(p!=null){var b=p==="y"?"height":"width";switch(c){case v:h[p]=h[p]-(r[b]/2-e[b]/2);break;case s:h[p]=h[p]+(r[b]/2-e[b]/2);break}}return h}function Bt(t,r){if(r===void 0){r={}}var e=r,o=e.placement,f=o===void 0?t.placement:o,v=e.strategy,s=v===void 0?t.strategy:v,p=e.boundary,b=p===void 0?c:p,m=e.rootBoundary,y=m===void 0?l:m,g=e.elementContext,w=g===void 0?d:g,x=e.altBoundary,O=x===void 0?false:x,j=e.padding,k=j===void 0?0:j;var M=rt(typeof k!=="number"?k:et(k,u));var P=w===d?h:d;var C=t.rects.popper;var A=t.elements[O?P:w];var E=Rt(q(A)?A:A.contextElement||G(t.elements.popper),b,y,s);var R=V(t.elements.reference);var W=Wt({reference:R,element:C,strategy:"absolute",placement:f});var B=Ct(Object.assign({},C,W));var S=w===d?B:R;var L={top:E.top-S.top+M.top,bottom:S.bottom-E.bottom+M.bottom,left:E.left-S.left+M.left,right:S.right-E.right+M.right};var I=t.modifiersData.offset;if(w===d&&I){var T=I[f];Object.keys(L).forEach((function(t){var r=[i,a].indexOf(t)>=0?1:-1;var e=[n,a].indexOf(t)>=0?"y":"x";L[t]+=T[e]*r}))}return L}function St(t,r){if(r===void 0){r={}}var e=r,n=e.placement,a=e.boundary,i=e.rootBoundary,o=e.padding,f=e.flipVariations,v=e.allowedAutoPlacements,s=v===void 0?b:v;var c=ft(n);var l=c?f?p:p.filter((function(t){return ft(t)===c})):u;var d=l.filter((function(t){return s.indexOf(t)>=0}));if(d.length===0){d=l}var h=d.reduce((function(r,e){r[e]=Bt(t,{placement:e,boundary:a,rootBoundary:i,padding:o})[L(e)];return r}),{});return Object.keys(h).sort((function(t,r){return h[t]-h[r]}))}function Lt(t){if(L(t)===f){return[]}var r=mt(t);return[gt(t),r,gt(r)]}function It(t){var r=t.state,e=t.options,u=t.name;if(r.modifiersData[u]._skip){return}var s=e.mainAxis,c=s===void 0?true:s,l=e.altAxis,d=l===void 0?true:l,h=e.fallbackPlacements,p=e.padding,b=e.boundary,m=e.rootBoundary,y=e.altBoundary,g=e.flipVariations,w=g===void 0?true:g,x=e.allowedAutoPlacements;var O=r.options.placement;var j=L(O);var k=j===O;var M=h||(k||!w?[mt(O)]:Lt(O));var P=[O].concat(M).reduce((function(t,e){return t.concat(L(e)===f?St(r,{placement:e,boundary:b,rootBoundary:m,padding:p,flipVariations:w,allowedAutoPlacements:x}):e)}),[]);var C=r.rects.reference;var A=r.rects.popper;var q=new Map;var E=true;var R=P[0];for(var W=0;W<P.length;W++){var B=P[W];var S=L(B);var I=ft(B)===v;var T=[n,a].indexOf(S)>=0;var z=T?"width":"height";var F=Bt(r,{placement:B,boundary:b,rootBoundary:m,altBoundary:y,padding:p});var H=T?I?i:o:I?a:n;if(C[z]>A[z]){H=mt(H)}var V=mt(H);var D=[];if(c){D.push(F[S]<=0)}if(d){D.push(F[H]<=0,F[V]<=0)}if(D.every((function(t){return t}))){R=B;E=false;break}q.set(B,D)}if(E){var $=w?3:1;var _=function t(r){var e=P.find((function(t){var e=q.get(t);if(e){return e.slice(0,r).every((function(t){return t}))}}));if(e){R=e;return"break"}};for(var U=$;U>0;U--){var G=_(U);if(G==="break")break}}if(r.placement!==R){r.modifiersData[u]._skip=true;r.placement=R;r.reset=true}}const Tt={name:"flip",enabled:true,phase:"main",fn:It,requiresIfExists:["offset"],data:{_skip:false}};function zt(t,r,e){if(e===void 0){e={x:0,y:0}}return{top:t.top-r.height-e.y,right:t.right-r.width+e.x,bottom:t.bottom-r.height+e.y,left:t.left-r.width-e.x}}function Ft(t){return[n,i,a,o].some((function(r){return t[r]>=0}))}function Ht(t){var r=t.state,e=t.name;var n=r.rects.reference;var a=r.rects.popper;var i=r.modifiersData.preventOverflow;var o=Bt(r,{elementContext:"reference"});var f=Bt(r,{altBoundary:true});var u=zt(o,n);var v=zt(f,a,i);var s=Ft(u);var c=Ft(v);r.modifiersData[e]={referenceClippingOffsets:u,popperEscapeOffsets:v,isReferenceHidden:s,hasPopperEscaped:c};r.attributes.popper=Object.assign({},r.attributes.popper,{"data-popper-reference-hidden":s,"data-popper-escaped":c})}const Vt={name:"hide",enabled:true,phase:"main",requiresIfExists:["preventOverflow"],fn:Ht};function Dt(t,r,e){var a=L(t);var f=[o,n].indexOf(a)>=0?-1:1;var u=typeof e==="function"?e(Object.assign({},r,{placement:t})):e,v=u[0],s=u[1];v=v||0;s=(s||0)*f;return[o,i].indexOf(a)>=0?{x:s,y:v}:{x:v,y:s}}function $t(t){var r=t.state,e=t.options,n=t.name;var a=e.offset,i=a===void 0?[0,0]:a;var o=b.reduce((function(t,e){t[e]=Dt(e,r.rects,i);return t}),{});var f=o[r.placement],u=f.x,v=f.y;if(r.modifiersData.popperOffsets!=null){r.modifiersData.popperOffsets.x+=u;r.modifiersData.popperOffsets.y+=v}r.modifiersData[n]=o}const _t={name:"offset",enabled:true,phase:"main",requires:["popperOffsets"],fn:$t};function Ut(t){var r=t.state,e=t.name;r.modifiersData[e]=Wt({reference:r.rects.reference,element:r.rects.popper,strategy:"absolute",placement:r.placement})}const Gt={name:"popperOffsets",enabled:true,phase:"read",fn:Ut,data:{}};function Jt(t){return t==="x"?"y":"x"}function Kt(t){var r=t.state,e=t.options,f=t.name;var u=e.mainAxis,s=u===void 0?true:u,c=e.altAxis,l=c===void 0?false:c,d=e.boundary,h=e.rootBoundary,p=e.altBoundary,b=e.padding,m=e.tether,y=m===void 0?true:m,g=e.tetherOffset,w=g===void 0?0:g;var x=Bt(r,{boundary:d,rootBoundary:h,padding:b,altBoundary:p});var O=L(r.placement);var j=ft(r.placement);var k=!j;var M=X(O);var P=Jt(M);var C=r.modifiersData.popperOffsets;var A=r.rects.reference;var q=r.rects.popper;var E=typeof w==="function"?w(Object.assign({},r.rects,{placement:r.placement})):w;var R=typeof E==="number"?{mainAxis:E,altAxis:E}:Object.assign({mainAxis:0,altAxis:0},E);var W=r.modifiersData.offset?r.modifiersData.offset[r.placement]:null;var B={x:0,y:0};if(!C){return}if(s){var S;var z=M==="y"?n:o;var F=M==="y"?a:i;var H=M==="y"?"height":"width";var V=C[M];var $=V+x[z];var _=V-x[F];var U=y?-q[H]/2:0;var G=j===v?A[H]:q[H];var J=j===v?-q[H]:-A[H];var K=r.elements.arrow;var N=y&&K?D(K):{width:0,height:0};var rt=r.modifiersData["arrow#persistent"]?r.modifiersData["arrow#persistent"].padding:tt();var et=rt[z];var nt=rt[F];var at=Y(0,A[H],N[H]);var it=k?A[H]/2-U-at-et-R.mainAxis:G-at-et-R.mainAxis;var ot=k?-A[H]/2+U+at+nt+R.mainAxis:J+at+nt+R.mainAxis;var ut=r.elements.arrow&&Q(r.elements.arrow);var vt=ut?M==="y"?ut.clientTop||0:ut.clientLeft||0:0;var st=(S=W==null?void 0:W[M])!=null?S:0;var ct=V+it-st-vt;var lt=V+ot-st;var dt=Y(y?T($,ct):$,V,y?I(_,lt):_);C[M]=dt;B[M]=dt-V}if(l){var ht;var pt=M==="x"?n:o;var bt=M==="x"?a:i;var mt=C[P];var yt=P==="y"?"height":"width";var gt=mt+x[pt];var wt=mt-x[bt];var xt=[n,o].indexOf(O)!==-1;var Ot=(ht=W==null?void 0:W[P])!=null?ht:0;var jt=xt?gt:mt-A[yt]-q[yt]-Ot+R.altAxis;var kt=xt?mt+A[yt]+q[yt]-Ot-R.altAxis:wt;var Mt=y&&xt?Z(jt,mt,kt):Y(y?jt:gt,mt,y?kt:wt);C[P]=Mt;B[P]=Mt-mt}r.modifiersData[f]=B}const Nt={name:"preventOverflow",enabled:true,phase:"main",fn:Kt,requiresIfExists:["offset"]};function Qt(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function Xt(t){if(t===A(t)||!E(t)){return wt(t)}else{return Qt(t)}}function Yt(t){var r=t.getBoundingClientRect();var e=z(r.width)/t.offsetWidth||1;var n=z(r.height)/t.offsetHeight||1;return e!==1||n!==1}function Zt(t,r,e){if(e===void 0){e=false}var n=E(r);var a=E(r)&&Yt(r);var i=G(r);var o=V(t,a,e);var f={scrollLeft:0,scrollTop:0};var u={x:0,y:0};if(n||!n&&!e){if(C(r)!=="body"||kt(i)){f=Xt(r)}if(E(r)){u=V(r,true);u.x+=r.clientLeft;u.y+=r.clientTop}else if(i){u.x=xt(i)}}return{x:o.left+f.scrollLeft-u.x,y:o.top+f.scrollTop-u.y,width:o.width,height:o.height}}function tr(t){var r=new Map;var e=new Set;var n=[];t.forEach((function(t){r.set(t.name,t)}));function a(t){e.add(t.name);var i=[].concat(t.requires||[],t.requiresIfExists||[]);i.forEach((function(t){if(!e.has(t)){var n=r.get(t);if(n){a(n)}}}));n.push(t)}t.forEach((function(t){if(!e.has(t.name)){a(t)}}));return n}function rr(t){var r=tr(t);return P.reduce((function(t,e){return t.concat(r.filter((function(t){return t.phase===e})))}),[])}function er(t){var r;return function(){if(!r){r=new Promise((function(e){Promise.resolve().then((function(){r=undefined;e(t())}))}))}return r}}function nr(t){var r=t.reduce((function(t,r){var e=t[r.name];t[r.name]=e?Object.assign({},e,r,{options:Object.assign({},e.options,r.options),data:Object.assign({},e.data,r.data)}):r;return t}),{});return Object.keys(r).map((function(t){return r[t]}))}var ar={placement:"bottom",modifiers:[],strategy:"absolute"};function ir(){for(var t=arguments.length,r=new Array(t),e=0;e<t;e++){r[e]=arguments[e]}return!r.some((function(t){return!(t&&typeof t.getBoundingClientRect==="function")}))}function or(t){if(t===void 0){t={}}var r=t,e=r.defaultModifiers,n=e===void 0?[]:e,a=r.defaultOptions,i=a===void 0?ar:a;return function t(r,e,a){if(a===void 0){a=i}var o={placement:"bottom",orderedModifiers:[],options:Object.assign({},ar,i),modifiersData:{},elements:{reference:r,popper:e},attributes:{},styles:{}};var f=[];var u=false;var v={state:o,setOptions:function t(a){var f=typeof a==="function"?a(o.options):a;c();o.options=Object.assign({},i,o.options,f);o.scrollParents={reference:q(r)?Pt(r):r.contextElement?Pt(r.contextElement):[],popper:Pt(e)};var u=rr(nr([].concat(n,o.options.modifiers)));o.orderedModifiers=u.filter((function(t){return t.enabled}));s();return v.update()},forceUpdate:function t(){if(u){return}var r=o.elements,e=r.reference,n=r.popper;if(!ir(e,n)){return}o.rects={reference:Zt(e,Q(n),o.options.strategy==="fixed"),popper:D(n)};o.reset=false;o.placement=o.options.placement;o.orderedModifiers.forEach((function(t){return o.modifiersData[t.name]=Object.assign({},t.data)}));for(var a=0;a<o.orderedModifiers.length;a++){if(o.reset===true){o.reset=false;a=-1;continue}var i=o.orderedModifiers[a],f=i.fn,s=i.options,c=s===void 0?{}:s,l=i.name;if(typeof f==="function"){o=f({state:o,options:c,name:l,instance:v})||o}}},update:er((function(){return new Promise((function(t){v.forceUpdate();t(o)}))})),destroy:function t(){c();u=true}};if(!ir(r,e)){return v}v.setOptions(a).then((function(t){if(!u&&a.onFirstUpdate){a.onFirstUpdate(t)}}));function s(){o.orderedModifiers.forEach((function(t){var r=t.name,e=t.options,n=e===void 0?{}:e,a=t.effect;if(typeof a==="function"){var i=a({state:o,name:r,instance:v,options:n});var u=function t(){};f.push(i||u)}}))}function c(){f.forEach((function(t){return t()}));f=[]}return v}}var fr=[pt,Gt,lt,S,_t,Tt,Nt,ot,Vt];var ur=or({defaultModifiers:fr});const vr=":host(limel-portal){display:block;position:absolute;top:0;bottom:0;width:100%;pointer-events:none}:host([hidden]){display:none}";const sr=class{constructor(r){t(this,r);this.loaded=false;this.openDirection="bottom";this.position="absolute";this.containerId=undefined;this.containerStyle={};this.parent=document.body;this.inheritParentWidth=false;this.visible=false;this.anchor=null;this.parents=new WeakMap}disconnectedCallback(){this.removeContainer();this.destroyPopper();if(this.observer){this.observer.unobserve(this.container)}}connectedCallback(){if(!this.loaded){return}this.createContainer();this.hideContainer();this.attachContainer();this.styleContainer();if(this.visible){this.createPopper();this.showContainer()}if("ResizeObserver"in window){const t=new ResizeObserver((()=>{if(this.popperInstance){this.styleContainer();this.popperInstance.update()}}));t.observe(this.container)}}componentDidLoad(){this.loaded=true;this.connectedCallback()}render(){return r("slot",null)}onVisible(){if(!this.visible){this.hideContainer();this.styleContainer();this.destroyPopper();return}this.styleContainer();this.createPopper();requestAnimationFrame((()=>{this.showContainer()}))}createContainer(){const t=this.host.shadowRoot.querySelector("slot");const r=t.assignedElements&&t.assignedElements()||[];this.container=document.createElement("div");this.container.setAttribute("id",this.containerId);this.container.setAttribute("class","limel-portal--container");this.container.style.fontFamily="var(--limel-portal-font-family, inherit)";Object.assign(this.container,{portalSource:this.host});r.forEach((t=>{this.parents.set(t,t.parentElement);this.container.appendChild(t)}))}attachContainer(){this.parent.appendChild(this.container)}removeContainer(){if(!this.container){return}Array.from(this.container.children).forEach((t=>{const r=this.parents.get(t);if(!r){return}r.appendChild(t)}));this.hideContainer();this.container.parentElement.removeChild(this.container)}hideContainer(){this.container.style.opacity="0"}showContainer(){this.container.style.opacity="1"}styleContainer(){const t=this.host.getBoundingClientRect().width;if(this.visible){this.container.style.display="block"}else{this.container.style.display="none"}if(this.inheritParentWidth){const r=this.getContentWidth(this.container);let e=r;if(t>0){e=t}this.container.style.width=`${e}px`}this.ensureContainerFitsInViewPort();Object.keys(this.containerStyle).forEach((t=>{this.container.style[t]=this.containerStyle[t]}))}getContentWidth(t){if(!t){return null}const r=t.getBoundingClientRect().width;if(r!==0){return r}const e=t.querySelector("*");return this.getContentWidth(e)}createPopper(){const t=this.createPopperConfig();this.popperInstance=ur(this.anchor||this.host,this.container,t)}destroyPopper(){var t;(t=this.popperInstance)===null||t===void 0?void 0:t.destroy();this.popperInstance=null}createPopperConfig(){const t=this.getPlacement(this.openDirection);const r=this.getFlipPlacement(this.openDirection);return{strategy:this.position,placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:[r]}}]}}getPlacement(t){const r={"left-start":"left-start",left:"left","left-end":"left-end","right-start":"right-start",right:"right","right-end":"right-end","top-start":"top-start",top:"top","top-end":"top-end","bottom-start":"bottom-start",bottom:"bottom","bottom-end":"bottom-end"};return r[t]}getFlipPlacement(t){const r={"left-start":"right-start",left:"right","left-end":"right-end","right-start":"left-start",right:"left","right-end":"left-end","top-start":"bottom-start",top:"bottom","top-end":"bottom-end","bottom-start":"top-start",bottom:"top","bottom-end":"top-end"};return r[t]}ensureContainerFitsInViewPort(){const t=Math.max(document.documentElement.clientHeight||0,window.innerHeight||0);const{top:r,bottom:e}=this.host.getBoundingClientRect();const n=Math.max(r,0);const a=Math.max(t-e,0);const i=16;const o=Math.max(n,a)-i;this.container.style.maxHeight=`${o}px`}get host(){return e(this)}static get watchers(){return{visible:["onVisible"]}}};sr.style=vr;export{sr as limel_portal};
2
- //# sourceMappingURL=p-f548d996.entry.js.map