@equinor/amplify-component-lib 9.13.0 → 9.14.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (273) hide show
  1. package/dist/atoms/hooks/index.d.ts +0 -1
  2. package/dist/atoms/hooks/useAmplifyKit.js +1 -1
  3. package/dist/atoms/hooks/useDebounce.js +1 -1
  4. package/dist/atoms/hooks/useFakeProgress.js +1 -1
  5. package/dist/atoms/hooks/useFaqsInApplication.js +1 -1
  6. package/dist/atoms/hooks/useLocalStorage.js +1 -1
  7. package/dist/atoms/hooks/useOnScreenMultiple.js +1 -1
  8. package/dist/atoms/hooks/usePrefetchRichTextImages.js +1 -1
  9. package/dist/atoms/hooks/usePrevious.js +1 -1
  10. package/dist/atoms/hooks/useSelect.js +1 -1
  11. package/dist/atoms/index.js +1 -1
  12. package/dist/atoms/style/colors.d.ts +6 -0
  13. package/dist/atoms/style/colors.js +1 -1
  14. package/dist/atoms/style/darkTokens.js +3 -0
  15. package/dist/atoms/style/lightTokens.js +2 -0
  16. package/dist/atoms/style/spacingTokens.js +10 -0
  17. package/dist/atoms/utils/auth_environment.js +1 -1
  18. package/dist/atoms/utils/export.js +1 -1
  19. package/dist/atoms/utils/richtext.js +1 -1
  20. package/dist/atoms/utils/skeleton.d.ts +9 -0
  21. package/dist/atoms/utils/skeleton.js +1 -0
  22. package/dist/atoms/utils/string.js +1 -1
  23. package/dist/atoms/utils/tutorials.js +1 -1
  24. package/dist/deprecated/ExpandingIconButton/ExpandingIconButton.js +1 -1
  25. package/dist/deprecated/IconToggleButton.js +1 -1
  26. package/dist/deprecated/OldStepper/OldStep.js +1 -1
  27. package/dist/deprecated/OldStepper/OldStepLine.js +1 -1
  28. package/dist/deprecated/OldStepper/OldStepper.js +1 -1
  29. package/dist/index.js +1 -1
  30. package/dist/molecules/ApplicationIcon/ApplicationIcon.d.ts +1 -1
  31. package/dist/molecules/ApplicationIcon/ApplicationIcon.js +1 -1
  32. package/dist/molecules/ApplicationIcon/ApplicationIconBase.js +1 -1
  33. package/dist/molecules/ApplicationIcon/ApplicationIconCollection.d.ts +1 -0
  34. package/dist/molecules/ApplicationIcon/ApplicationIconCollection.js +1 -1
  35. package/dist/molecules/ApplicationIcon/Icons/Acquire.js +1 -1
  36. package/dist/molecules/ApplicationIcon/Icons/Adca.d.ts +2 -0
  37. package/dist/molecules/ApplicationIcon/Icons/Adca.js +1 -0
  38. package/dist/molecules/ApplicationIcon/Icons/Bravos.js +1 -1
  39. package/dist/molecules/ApplicationIcon/Icons/Dasha.js +1 -1
  40. package/dist/molecules/ApplicationIcon/Icons/Fallback.js +1 -1
  41. package/dist/molecules/ApplicationIcon/Icons/FourDInsight.js +1 -1
  42. package/dist/molecules/ApplicationIcon/Icons/InPress.js +1 -1
  43. package/dist/molecules/ApplicationIcon/Icons/JsEmbark.js +1 -1
  44. package/dist/molecules/ApplicationIcon/Icons/LoggingQualification.js +1 -1
  45. package/dist/molecules/ApplicationIcon/Icons/Orca.js +1 -1
  46. package/dist/molecules/ApplicationIcon/Icons/Premo.js +1 -1
  47. package/dist/molecules/ApplicationIcon/Icons/Pwex.js +1 -1
  48. package/dist/molecules/ApplicationIcon/Icons/Recap.js +1 -1
  49. package/dist/molecules/ApplicationIcon/Icons/Sam.js +1 -1
  50. package/dist/molecules/ApplicationIcon/Icons/SubsurfacePortal.js +1 -1
  51. package/dist/molecules/Badge/Badge.js +1 -1
  52. package/dist/molecules/Button/Button.js +3 -3
  53. package/dist/molecules/Chip/Chip.js +1 -1
  54. package/dist/molecules/Chip/InteractiveChip.js +1 -1
  55. package/dist/molecules/Chip/ReadOnlyChip.js +1 -1
  56. package/dist/molecules/ContentMenu/ContentMenu.js +1 -1
  57. package/dist/molecules/DatePicker/DatePicker.d.ts +10 -3
  58. package/dist/molecules/DatePicker/DatePicker.js +1 -1
  59. package/dist/molecules/DatePicker/DatePicker.styles.d.ts +7 -1
  60. package/dist/molecules/DatePicker/DatePicker.styles.js +50 -7
  61. package/dist/molecules/DateRangePicker/DateRangePicker.d.ts +12 -0
  62. package/dist/molecules/DateRangePicker/DateRangePicker.js +1 -0
  63. package/dist/molecules/Dialog/Dialog.js +1 -1
  64. package/dist/molecules/Dialog/DialogAction.js +1 -1
  65. package/dist/molecules/EquinorLogo/EquinorLogo.js +1 -1
  66. package/dist/molecules/FeedBackIcon/FeedBackIcon.js +1 -1
  67. package/dist/molecules/FileProgress/CompactFileProgress.js +1 -1
  68. package/dist/molecules/FileProgress/CompactFileProgress.styles.d.ts +2 -2
  69. package/dist/molecules/FileProgress/FileProgress.js +1 -1
  70. package/dist/molecules/FileProgress/FileProgress.utils.js +1 -1
  71. package/dist/molecules/FileProgress/RegularFileProgress.js +1 -1
  72. package/dist/molecules/FileUploadArea/FileUploadArea.constants.d.ts +1 -0
  73. package/dist/molecules/FileUploadArea/FileUploadArea.constants.js +1 -0
  74. package/dist/molecules/FileUploadArea/FileUploadArea.d.ts +1 -1
  75. package/dist/molecules/FileUploadArea/FileUploadArea.js +1 -67
  76. package/dist/molecules/FileUploadArea/FileUploadArea.styles.d.ts +4 -0
  77. package/dist/molecules/FileUploadArea/FileUploadArea.styles.js +88 -0
  78. package/dist/molecules/FullPageSpinner/FullPageSpinner.js +1 -1
  79. package/dist/molecules/InfoElement/CopyText.js +1 -1
  80. package/dist/molecules/InfoElement/InfoElement.js +1 -1
  81. package/dist/molecules/ListItem/ListItem.js +3 -3
  82. package/dist/molecules/ListItem/ListItem.utils.js +1 -1
  83. package/dist/molecules/OptionDrawer/OptionDrawer.js +1 -1
  84. package/dist/molecules/OptionDrawer/OptionDrawer.utils.js +1 -1
  85. package/dist/molecules/OptionalTooltip/OptionalTooltip.js +1 -1
  86. package/dist/molecules/ProfileAvatar/ProfileAvatar.js +1 -1
  87. package/dist/molecules/RichTextDisplay/RichTextDisplay.js +1 -1
  88. package/dist/molecules/RichTextEditor/EditorProvider.js +1 -1
  89. package/dist/molecules/RichTextEditor/MenuBar/AddImageButton.js +1 -1
  90. package/dist/molecules/RichTextEditor/MenuBar/MenuBar.d.ts +2 -2
  91. package/dist/molecules/RichTextEditor/MenuBar/MenuBar.js +5 -5
  92. package/dist/molecules/RichTextEditor/MenuBar/MenuBar.styles.js +14 -8
  93. package/dist/molecules/RichTextEditor/MenuBar/MenuButton.js +1 -1
  94. package/dist/molecules/RichTextEditor/MenuBar/Table/Table.js +1 -1
  95. package/dist/molecules/RichTextEditor/MenuBar/TextAlignment.js +1 -1
  96. package/dist/molecules/RichTextEditor/MenuBar/TextClearFormatting.js +2 -2
  97. package/dist/molecules/RichTextEditor/MenuBar/TextCode.js +1 -1
  98. package/dist/molecules/RichTextEditor/MenuBar/TextColor.js +14 -14
  99. package/dist/molecules/RichTextEditor/MenuBar/TextFormatting.js +1 -1
  100. package/dist/molecules/RichTextEditor/MenuBar/TextHeaders.js +1 -1
  101. package/dist/molecules/RichTextEditor/MenuBar/TextHighlight.d.ts +3 -0
  102. package/dist/molecules/RichTextEditor/MenuBar/TextHighlight.js +1 -0
  103. package/dist/molecules/RichTextEditor/MenuBar/TextHistory.js +1 -1
  104. package/dist/molecules/RichTextEditor/MenuBar/TextLinks.js +2 -2
  105. package/dist/molecules/RichTextEditor/MenuBar/TextLists.js +1 -1
  106. package/dist/molecules/RichTextEditor/RichTextEditor.styles.d.ts +1 -1
  107. package/dist/molecules/RichTextEditor/RichTextEditor.types.d.ts +2 -1
  108. package/dist/molecules/RichTextEditor/RichTextEditor.types.js +1 -1
  109. package/dist/molecules/RichTextEditor/custom-extensions/AmplifyKit.js +1 -1
  110. package/dist/molecules/RichTextEditor/custom-extensions/ExtendedHeaders.js +1 -1
  111. package/dist/molecules/RichTextEditor/custom-extensions/ExtendedImage.js +1 -1
  112. package/dist/molecules/RichTextEditor/index.d.ts +1 -1
  113. package/dist/molecules/Search/Search.js +1 -1
  114. package/dist/molecules/Select/GroupedSelectMenu.js +1 -1
  115. package/dist/molecules/Select/ListSelectMenu.js +1 -1
  116. package/dist/molecules/Select/Select.js +1 -1
  117. package/dist/molecules/Select/Select.styles.d.ts +6 -5
  118. package/dist/molecules/Select/Select.styles.js +19 -22
  119. package/dist/molecules/Select/Select.utils.js +1 -1
  120. package/dist/molecules/Select/SelectMenuItem.js +1 -1
  121. package/dist/molecules/Select/SelectMenuItem.utils.js +1 -1
  122. package/dist/molecules/SelectionControls/Checkbox/Checkbox.js +1 -1
  123. package/dist/molecules/SelectionControls/Radio/Radio.js +1 -1
  124. package/dist/molecules/SelectionControls/Switch/Switch.js +1 -1
  125. package/dist/molecules/Sieve/Filter.js +1 -1
  126. package/dist/molecules/Sieve/Sieve.js +1 -1
  127. package/dist/molecules/Sieve/Sieve.types.d.ts +0 -2
  128. package/dist/molecules/Sieve/Sort.js +1 -1
  129. package/dist/molecules/SingleFilterMenu/SingleFilterMenu.js +1 -1
  130. package/dist/molecules/Skeleton/SkeletonField.d.ts +1 -0
  131. package/dist/molecules/Skeleton/SkeletonField.js +8 -0
  132. package/dist/molecules/Stepper/Step/Step.js +1 -1
  133. package/dist/molecules/Stepper/StepLine.js +1 -1
  134. package/dist/molecules/Stepper/Stepper.js +1 -1
  135. package/dist/molecules/Stepper/SubTitle/SubStepIndicator.js +1 -1
  136. package/dist/molecules/Stepper/SubTitle/SubTitle.js +3 -3
  137. package/dist/molecules/Tabs/Tabs.js +1 -1
  138. package/dist/molecules/TextField/TextField.d.ts +1 -0
  139. package/dist/molecules/TextField/TextField.js +23 -17
  140. package/dist/molecules/Waves/Waves.js +1 -1
  141. package/dist/molecules/index.d.ts +4 -2
  142. package/dist/node_modules/@equinor/eds-utils/dist/esm/hooks/useOutsideClick.js +1 -1
  143. package/dist/node_modules/lodash/lodash.js +1 -1
  144. package/dist/node_modules/prosemirror-model/dist/index.js +1 -1
  145. package/dist/node_modules/prosemirror-state/dist/index.js +1 -1
  146. package/dist/node_modules/prosemirror-transform/dist/index.js +1 -1
  147. package/dist/organisms/Faq/Category/Category.js +3 -3
  148. package/dist/organisms/Faq/Category/Question.js +2 -2
  149. package/dist/organisms/Faq/CategorySkeleton.js +1 -1
  150. package/dist/organisms/Faq/Faq.js +1 -1
  151. package/dist/organisms/Faq/Header.js +2 -2
  152. package/dist/organisms/FieldSelector/ChangingField.js +7 -7
  153. package/dist/organisms/FieldSelector/SelectorCard/SelectorCard.js +2 -2
  154. package/dist/organisms/Filter/AutoCompleteMenu.d.ts +11 -0
  155. package/dist/organisms/Filter/AutoCompleteMenu.js +10 -0
  156. package/dist/organisms/Filter/AutoCompleteText.d.ts +10 -0
  157. package/dist/organisms/Filter/AutoCompleteText.js +11 -0
  158. package/dist/organisms/Filter/Filter.d.ts +1 -1
  159. package/dist/organisms/Filter/Filter.js +1 -1
  160. package/dist/organisms/Filter/Filter.styles.d.ts +1 -0
  161. package/dist/organisms/Filter/Filter.styles.js +9 -5
  162. package/dist/organisms/Filter/Filter.types.d.ts +5 -1
  163. package/dist/organisms/Filter/Filter.utils.d.ts +11 -0
  164. package/dist/organisms/Filter/Filter.utils.js +1 -0
  165. package/dist/organisms/Filter/QuickFilter.js +1 -1
  166. package/dist/organisms/Filter/SortMenu.js +2 -2
  167. package/dist/organisms/PageTitle/PageTitle.js +1 -1
  168. package/dist/organisms/ReleaseNote/MetaTags.js +1 -1
  169. package/dist/organisms/ReleaseNote/ReleaseNote.js +9 -9
  170. package/dist/organisms/ReleaseNote/ToggleExpanded.js +6 -6
  171. package/dist/organisms/SideBar/CreateItem.styles.js +1 -1
  172. package/dist/organisms/SideBar/MenuItem/BasicMenuItem.js +1 -1
  173. package/dist/organisms/SideBar/MenuItem/CollapsableMenuItem.js +6 -6
  174. package/dist/organisms/SideBar/MenuItem/MenuItem.styles.d.ts +295 -2
  175. package/dist/organisms/SideBar/MenuItem/MenuItem.styles.js +2 -2
  176. package/dist/organisms/SideBar/SideBar.js +1 -1
  177. package/dist/organisms/Status/Action.js +1 -1
  178. package/dist/organisms/Status/Description.js +1 -1
  179. package/dist/organisms/Status/Illustration.constants.js +1 -1
  180. package/dist/organisms/Status/Illustration.js +1 -1
  181. package/dist/organisms/Status/MissingAccesses.js +1 -1
  182. package/dist/organisms/Status/Title.js +1 -1
  183. package/dist/organisms/Status/collections/BadRequest.js +1 -1
  184. package/dist/organisms/Status/collections/GenericError.js +1 -1
  185. package/dist/organisms/Status/collections/MissingAccessToApp.js +1 -1
  186. package/dist/organisms/Status/collections/MissingPermissions.js +1 -1
  187. package/dist/organisms/Status/collections/PageNotFound.js +1 -1
  188. package/dist/organisms/Status/collections/ServerError.js +1 -1
  189. package/dist/organisms/TableOfContents/TableOfContents.js +1 -1
  190. package/dist/organisms/TableOfContents/TableOfContents.styles.d.ts +294 -1
  191. package/dist/organisms/TableOfContents/TableOfContents.styles.js +2 -2
  192. package/dist/organisms/TableOfContents/TableOfContentsItem.js +1 -1
  193. package/dist/organisms/ToggleGroup/ToggleGroup.js +2 -2
  194. package/dist/organisms/ToggleGroup/ToggleGroupOption.js +1 -1
  195. package/dist/organisms/TopBar/Account/Account.js +1 -1
  196. package/dist/organisms/TopBar/Account/AccountAvatar.js +1 -1
  197. package/dist/organisms/TopBar/Account/AccountButton.js +3 -3
  198. package/dist/organisms/TopBar/Account/ActiveUserImpersonationButton.js +2 -2
  199. package/dist/organisms/TopBar/Account/ImpersonateAvatar.js +2 -2
  200. package/dist/organisms/TopBar/Account/ImpersonateButton.js +1 -1
  201. package/dist/organisms/TopBar/Account/ImpersonateMenu/CreateOrEditUser/CreateOrEditUser.js +1 -1
  202. package/dist/organisms/TopBar/Account/ImpersonateMenu/DeleteUser/DeleteUser.js +1 -1
  203. package/dist/organisms/TopBar/Account/ImpersonateMenu/DeleteUser/DeleteUser.styles.js +1 -1
  204. package/dist/organisms/TopBar/Account/ImpersonateMenu/Impersonate.constants.js +1 -1
  205. package/dist/organisms/TopBar/Account/ImpersonateMenu/Impersonate.styles.js +1 -1
  206. package/dist/organisms/TopBar/Account/ImpersonateMenu/ImpersonateMenu.js +1 -1
  207. package/dist/organisms/TopBar/Account/ImpersonateMenu/ImpersonateMenu.styles.d.ts +1 -1
  208. package/dist/organisms/TopBar/Account/ImpersonateMenu/ImpersonateMenu.styles.js +1 -1
  209. package/dist/organisms/TopBar/Account/ImpersonateMenu/UserImpersonation.js +1 -1
  210. package/dist/organisms/TopBar/Account/ImpersonateMenu/UserImpersonation.styles.js +1 -1
  211. package/dist/organisms/TopBar/Account/ImpersonateMenu/hooks/useCreateImpersonation.js +1 -1
  212. package/dist/organisms/TopBar/Account/ImpersonateMenu/hooks/useDeleteImpersonation.js +1 -1
  213. package/dist/organisms/TopBar/Account/ImpersonateMenu/hooks/useEditImpersonation.js +1 -1
  214. package/dist/organisms/TopBar/Account/ImpersonateMenu/hooks/useMappedRoles.js +1 -1
  215. package/dist/organisms/TopBar/Actions.js +1 -1
  216. package/dist/organisms/TopBar/ApplicationDrawer/ApplicationDrawer.js +1 -1
  217. package/dist/organisms/TopBar/FieldMenu/FieldMenu.js +1 -1
  218. package/dist/organisms/TopBar/FieldMenu/FieldMenu.styles.d.ts +1 -1
  219. package/dist/organisms/TopBar/FieldMenu/FieldMenu.styles.js +1 -1
  220. package/dist/organisms/TopBar/Guidelines/Guidelines.js +1 -1
  221. package/dist/organisms/TopBar/Guidelines/Item.js +2 -2
  222. package/dist/organisms/TopBar/Guidelines/Section.js +1 -1
  223. package/dist/organisms/TopBar/Notifications/FilterOptions.js +1 -1
  224. package/dist/organisms/TopBar/Notifications/NotificationsInner.js +1 -1
  225. package/dist/organisms/TopBar/Notifications/NotificationsTemplate/NotificationElements/DefaultNotification.js +1 -1
  226. package/dist/organisms/TopBar/Notifications/NotificationsTemplate/NotificationElements/NoNotifications.js +1 -1
  227. package/dist/organisms/TopBar/Notifications/NotificationsTemplate/NotificationTemplate.js +1 -1
  228. package/dist/organisms/TopBar/Resources/Feedback/Feedback.styles.d.ts +1 -1
  229. package/dist/organisms/TopBar/Resources/Feedback/Feedback.styles.js +4 -4
  230. package/dist/organisms/TopBar/Resources/Feedback/Feedback.utils.js +1 -1
  231. package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/Description.js +2 -2
  232. package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/FeedbackForm.js +1 -1
  233. package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/LockedInputTooltip.js +1 -1
  234. package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/Severity.js +1 -1
  235. package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/UploadFile/ImageFile.js +1 -1
  236. package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/UploadFile/UploadFile.js +2 -2
  237. package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/UploadFile/UploadFile.styles.d.ts +1 -1
  238. package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/AnimateChangeInHeight.js +1 -1
  239. package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/FullSlackResponse.js +1 -1
  240. package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/RequestStatus.js +1 -1
  241. package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/ResponsePage.js +1 -1
  242. package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/ResponsePage.styles.d.ts +1 -1
  243. package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/ResponsePage.styles.js +1 -1
  244. package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/Success.js +3 -3
  245. package/dist/organisms/TopBar/Resources/Feedback/providers/FeedbackContextProvider.js +1 -1
  246. package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/ReleaseNotesDialog.js +1 -1
  247. package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/ReleaseNotesDialog.utils.js +1 -1
  248. package/dist/organisms/TopBar/Resources/ResourceMenuItem.js +1 -1
  249. package/dist/organisms/TopBar/Resources/Resources.js +1 -1
  250. package/dist/organisms/TopBar/Settings.js +1 -1
  251. package/dist/organisms/TopBar/TopBar.js +1 -1
  252. package/dist/organisms/TopBar/TopBar.styles.d.ts +295 -2
  253. package/dist/organisms/TopBar/TopBar.styles.js +6 -6
  254. package/dist/organisms/TopBar/TopBarMenu.js +1 -1
  255. package/dist/organisms/TopBar/TransferToAppDialog.js +1 -1
  256. package/dist/organisms/TopBar/Tutorials/Tutorials.js +1 -1
  257. package/dist/providers/AuthProvider/AuthProvider.js +1 -1
  258. package/dist/providers/AuthProvider/AuthProviderInner.js +1 -1
  259. package/dist/providers/LoadingProvider.js +1 -1
  260. package/dist/providers/ReleaseNotesProvider.js +1 -1
  261. package/dist/providers/ReleaseNotesProvider.utils.js +1 -1
  262. package/dist/providers/SnackbarProvider/SnackbarProvider.js +1 -1
  263. package/dist/providers/StepperProvider.js +1 -1
  264. package/dist/providers/TableOfContentsProvider.js +1 -1
  265. package/dist/providers/ThemeProvider/ThemeProvider.js +1 -1
  266. package/dist/providers/TutorialHighlightingProvider/TutorialHighlightingProviderInner.js +1 -1
  267. package/dist/providers/TutorialHighlightingProvider/TutorialPopover/StepIndicator.js +8 -8
  268. package/dist/providers/TutorialHighlightingProvider/TutorialPopover/TutorialPopover.js +3 -3
  269. package/dist/providers/TutorialHighlightingProvider/TutorialPopover/hooks/useTutorialPopoverPosition.js +1 -1
  270. package/dist/providers/TutorialHighlightingProvider/hooks/useReversedScrollY.js +1 -1
  271. package/package.json +5 -9
  272. package/dist/atoms/hooks/useSearchParameter.d.ts +0 -5
  273. package/dist/atoms/hooks/useSearchParameter.js +0 -1
@@ -1 +1 @@
1
- import{Slice as e,Fragment as t}from"../../prosemirror-model/dist/index.js";import{ReplaceStep as n,ReplaceAroundStep as r}from"../../prosemirror-transform/dist/index.js";const o=Object.create(null);class s{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new i(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(t,n=e.empty){let r=n.content.lastChild,o=null;for(let e=0;e<n.openEnd;e++)o=r,r=r.lastChild;let s=t.steps.length,i=this.ranges;for(let a=0;a<i.length;a++){let{$from:l,$to:c}=i[a],h=t.mapping.slice(s);t.replaceRange(h.map(l.pos),h.map(c.pos),a?e.empty:n),0==a&&g(t,s,(r?r.isInline:o&&o.isTextblock)?-1:1)}}replaceWith(e,t){let n=e.steps.length,r=this.ranges;for(let o=0;o<r.length;o++){let{$from:s,$to:i}=r[o],a=e.mapping.slice(n),l=a.map(s.pos),c=a.map(i.pos);o?e.deleteRange(l,c):(e.replaceRangeWith(l,c,t),g(e,n,t.isInline?-1:1))}}static findFrom(e,t,n=!1){let r=e.parent.inlineContent?new c(e):m(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(let r=e.depth-1;r>=0;r--){let o=t<0?m(e.node(0),e.node(r),e.before(r+1),e.index(r),t,n):m(e.node(0),e.node(r),e.after(r+1),e.index(r)+1,t,n);if(o)return o}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new d(e.node(0))}static atStart(e){return m(e,e,0,0,1)||new d(e)}static atEnd(e){return m(e,e,e.content.size,e.childCount,-1)||new d(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=o[t.type];if(!n)throw new RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in o)throw new RangeError("Duplicate use of selection JSON ID "+e);return o[e]=t,t.prototype.jsonID=e,t}getBookmark(){return c.between(this.$anchor,this.$head).getBookmark()}}s.prototype.visible=!0;class i{constructor(e,t){this.$from=e,this.$to=t}}let a=!1;function l(e){a||e.parent.inlineContent||(a=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class c extends s{constructor(e,t=e){l(e),l(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let n=e.resolve(t.map(this.head));if(!n.parent.inlineContent)return s.near(n);let r=e.resolve(t.map(this.anchor));return new c(r.parent.inlineContent?r:n,n)}replace(t,n=e.empty){if(super.replace(t,n),n==e.empty){let e=this.$from.marksAcross(this.$to);e&&t.ensureMarks(e)}}eq(e){return e instanceof c&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new h(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if("number"!=typeof t.anchor||"number"!=typeof t.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new c(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,n=t){let r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))}static between(e,t,n){let r=e.pos-t.pos;if(n&&!r||(n=r>=0?1:-1),!t.parent.inlineContent){let e=s.findFrom(t,n,!0)||s.findFrom(t,-n,!0);if(!e)return s.near(t,n);t=e.$head}return e.parent.inlineContent||(0==r||(e=(s.findFrom(e,-n,!0)||s.findFrom(e,n,!0)).$anchor).pos<t.pos!=r<0)&&(e=t),new c(e,t)}}s.jsonID("text",c);class h{constructor(e,t){this.anchor=e,this.head=t}map(e){return new h(e.map(this.anchor),e.map(this.head))}resolve(e){return c.between(e.resolve(this.anchor),e.resolve(this.head))}}class p extends s{constructor(e){let t=e.nodeAfter,n=e.node(0).resolve(e.pos+t.nodeSize);super(e,n),this.node=t}map(e,t){let{deleted:n,pos:r}=t.mapResult(this.anchor),o=e.resolve(r);return n?s.near(o):new p(o)}content(){return new e(t.from(this.node),0,0)}eq(e){return e instanceof p&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new u(this.anchor)}static fromJSON(e,t){if("number"!=typeof t.anchor)throw new RangeError("Invalid input for NodeSelection.fromJSON");return new p(e.resolve(t.anchor))}static create(e,t){return new p(e.resolve(t))}static isSelectable(e){return!e.isText&&!1!==e.type.spec.selectable}}p.prototype.visible=!1,s.jsonID("node",p);class u{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:n}=e.mapResult(this.anchor);return t?new h(n,n):new u(n)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&p.isSelectable(n)?new p(t):s.near(t)}}class d extends s{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(t,n=e.empty){if(n==e.empty){t.delete(0,t.doc.content.size);let e=s.atStart(t.doc);e.eq(t.selection)||t.setSelection(e)}else super.replace(t,n)}toJSON(){return{type:"all"}}static fromJSON(e){return new d(e)}map(e){return new d(e)}eq(e){return e instanceof d}getBookmark(){return f}}s.jsonID("all",d);const f={map(){return this},resolve:e=>new d(e)};function m(e,t,n,r,o,s=!1){if(t.inlineContent)return c.create(e,n);for(let i=r-(o>0?0:1);o>0?i<t.childCount:i>=0;i+=o){let r=t.child(i);if(r.isAtom){if(!s&&p.isSelectable(r))return p.create(e,n-(o<0?r.nodeSize:0))}else{let t=m(e,r,n+o,o<0?r.childCount:0,o,s);if(t)return t}n+=r.nodeSize*o}return null}function g(e,t,o){let i=e.steps.length-1;if(i<t)return;let a,l=e.steps[i];(l instanceof n||l instanceof r)&&(e.mapping.maps[i].forEach(((e,t,n,r)=>{null==a&&(a=r)})),e.setSelection(s.near(e.doc.resolve(a),o)))}function w(e,t){return t&&e?e.bind(t):e}class y{constructor(e,t,n){this.name=e,this.init=w(t.init,n),this.apply=w(t.apply,n)}}function $(e,t,n){for(let r in e){let o=e[r];o instanceof Function?o=o.bind(t):"handleDOMEvents"==r&&(o=$(o,t,{})),n[r]=o}return n}new y("doc",{init:e=>e.doc||e.schema.topNodeType.createAndFill(),apply:e=>e.doc}),new y("selection",{init:(e,t)=>e.selection||s.atStart(t.doc),apply:e=>e.selection}),new y("storedMarks",{init:e=>e.storedMarks||null,apply:(e,t,n,r)=>r.selection.$cursor?e.storedMarks:null}),new y("scrollToSelection",{init:()=>0,apply:(e,t)=>e.scrolledIntoView?t+1:t});class S{constructor(e){this.spec=e,this.props={},e.props&&$(e.props,this,this.props),this.key=e.key?e.key.key:v("plugin")}getState(e){return e[this.key]}}const k=Object.create(null);function v(e){return e in k?e+"$"+ ++k[e]:(k[e]=0,e+"$")}class b{constructor(e="key"){this.key=v(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}export{d as AllSelection,p as NodeSelection,S as Plugin,b as PluginKey,s as Selection,i as SelectionRange,c as TextSelection};
1
+ import{Slice as e,Fragment as t}from"../../prosemirror-model/dist/index.js";import{ReplaceStep as n,ReplaceAroundStep as r}from"../../prosemirror-transform/dist/index.js";const o=Object.create(null);class s{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new i(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(t,n=e.empty){let r=n.content.lastChild,o=null;for(let e=0;e<n.openEnd;e++)o=r,r=r.lastChild;let s=t.steps.length,i=this.ranges;for(let a=0;a<i.length;a++){let{$from:l,$to:c}=i[a],h=t.mapping.slice(s);t.replaceRange(h.map(l.pos),h.map(c.pos),a?e.empty:n),0==a&&g(t,s,(r?r.isInline:o&&o.isTextblock)?-1:1)}}replaceWith(e,t){let n=e.steps.length,r=this.ranges;for(let o=0;o<r.length;o++){let{$from:s,$to:i}=r[o],a=e.mapping.slice(n),l=a.map(s.pos),c=a.map(i.pos);o?e.deleteRange(l,c):(e.replaceRangeWith(l,c,t),g(e,n,t.isInline?-1:1))}}static findFrom(e,t,n=!1){let r=e.parent.inlineContent?new c(e):m(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(let r=e.depth-1;r>=0;r--){let o=t<0?m(e.node(0),e.node(r),e.before(r+1),e.index(r),t,n):m(e.node(0),e.node(r),e.after(r+1),e.index(r)+1,t,n);if(o)return o}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new d(e.node(0))}static atStart(e){return m(e,e,0,0,1)||new d(e)}static atEnd(e){return m(e,e,e.content.size,e.childCount,-1)||new d(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=o[t.type];if(!n)throw new RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in o)throw new RangeError("Duplicate use of selection JSON ID "+e);return o[e]=t,t.prototype.jsonID=e,t}getBookmark(){return c.between(this.$anchor,this.$head).getBookmark()}}s.prototype.visible=!0;class i{constructor(e,t){this.$from=e,this.$to=t}}let a=!1;function l(e){a||e.parent.inlineContent||(a=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class c extends s{constructor(e,t=e){l(e),l(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let n=e.resolve(t.map(this.head));if(!n.parent.inlineContent)return s.near(n);let r=e.resolve(t.map(this.anchor));return new c(r.parent.inlineContent?r:n,n)}replace(t,n=e.empty){if(super.replace(t,n),n==e.empty){let e=this.$from.marksAcross(this.$to);e&&t.ensureMarks(e)}}eq(e){return e instanceof c&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new h(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if("number"!=typeof t.anchor||"number"!=typeof t.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new c(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,n=t){let r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))}static between(e,t,n){let r=e.pos-t.pos;if(n&&!r||(n=r>=0?1:-1),!t.parent.inlineContent){let e=s.findFrom(t,n,!0)||s.findFrom(t,-n,!0);if(!e)return s.near(t,n);t=e.$head}return e.parent.inlineContent||(0==r||(e=(s.findFrom(e,-n,!0)||s.findFrom(e,n,!0)).$anchor).pos<t.pos!=r<0)&&(e=t),new c(e,t)}}s.jsonID("text",c);class h{constructor(e,t){this.anchor=e,this.head=t}map(e){return new h(e.map(this.anchor),e.map(this.head))}resolve(e){return c.between(e.resolve(this.anchor),e.resolve(this.head))}}class p extends s{constructor(e){let t=e.nodeAfter,n=e.node(0).resolve(e.pos+t.nodeSize);super(e,n),this.node=t}map(e,t){let{deleted:n,pos:r}=t.mapResult(this.anchor),o=e.resolve(r);return n?s.near(o):new p(o)}content(){return new e(t.from(this.node),0,0)}eq(e){return e instanceof p&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new u(this.anchor)}static fromJSON(e,t){if("number"!=typeof t.anchor)throw new RangeError("Invalid input for NodeSelection.fromJSON");return new p(e.resolve(t.anchor))}static create(e,t){return new p(e.resolve(t))}static isSelectable(e){return!e.isText&&!1!==e.type.spec.selectable}}p.prototype.visible=!1,s.jsonID("node",p);class u{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:n}=e.mapResult(this.anchor);return t?new h(n,n):new u(n)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&p.isSelectable(n)?new p(t):s.near(t)}}class d extends s{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(t,n=e.empty){if(n==e.empty){t.delete(0,t.doc.content.size);let e=s.atStart(t.doc);e.eq(t.selection)||t.setSelection(e)}else super.replace(t,n)}toJSON(){return{type:"all"}}static fromJSON(e){return new d(e)}map(e){return new d(e)}eq(e){return e instanceof d}getBookmark(){return f}}s.jsonID("all",d);const f={map(){return this},resolve:e=>new d(e)};function m(e,t,n,r,o,s=!1){if(t.inlineContent)return c.create(e,n);for(let i=r-(o>0?0:1);o>0?i<t.childCount:i>=0;i+=o){let r=t.child(i);if(r.isAtom){if(!s&&p.isSelectable(r))return p.create(e,n-(o<0?r.nodeSize:0))}else{let t=m(e,r,n+o,o<0?r.childCount:0,o,s);if(t)return t}n+=r.nodeSize*o}return null}function g(e,t,o){let i=e.steps.length-1;if(i<t)return;let a,l=e.steps[i];(l instanceof n||l instanceof r)&&(e.mapping.maps[i].forEach((e,t,n,r)=>{null==a&&(a=r)}),e.setSelection(s.near(e.doc.resolve(a),o)))}function w(e,t){return t&&e?e.bind(t):e}class y{constructor(e,t,n){this.name=e,this.init=w(t.init,n),this.apply=w(t.apply,n)}}function $(e,t,n){for(let r in e){let o=e[r];o instanceof Function?o=o.bind(t):"handleDOMEvents"==r&&(o=$(o,t,{})),n[r]=o}return n}new y("doc",{init:e=>e.doc||e.schema.topNodeType.createAndFill(),apply:e=>e.doc}),new y("selection",{init:(e,t)=>e.selection||s.atStart(t.doc),apply:e=>e.selection}),new y("storedMarks",{init:e=>e.storedMarks||null,apply:(e,t,n,r)=>r.selection.$cursor?e.storedMarks:null}),new y("scrollToSelection",{init:()=>0,apply:(e,t)=>e.scrolledIntoView?t+1:t});class S{constructor(e){this.spec=e,this.props={},e.props&&$(e.props,this,this.props),this.key=e.key?e.key.key:v("plugin")}getState(e){return e[this.key]}}const k=Object.create(null);function v(e){return e in k?e+"$"+ ++k[e]:(k[e]=0,e+"$")}class b{constructor(e="key"){this.key=v(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}export{d as AllSelection,p as NodeSelection,S as Plugin,b as PluginKey,s as Selection,i as SelectionRange,c as TextSelection};
@@ -1 +1 @@
1
- import{Slice as t,ReplaceError as e,Fragment as r}from"../../prosemirror-model/dist/index.js";const s=Math.pow(2,16);function o(t){return 65535&t}class i{constructor(t,e,r){this.pos=t,this.delInfo=e,this.recover=r}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}}class n{constructor(t,e=!1){if(this.ranges=t,this.inverted=e,!t.length&&n.empty)return n.empty}recover(t){let e=0,r=o(t);if(!this.inverted)for(let t=0;t<r;t++)e+=this.ranges[3*t+2]-this.ranges[3*t+1];return this.ranges[3*r]+e+function(t){return(t-(65535&t))/s}(t)}mapResult(t,e=1){return this._map(t,e,!1)}map(t,e=1){return this._map(t,e,!0)}_map(t,e,r){let o=0,n=this.inverted?2:1,a=this.inverted?1:2;for(let h=0;h<this.ranges.length;h+=3){let p=this.ranges[h]-(this.inverted?o:0);if(p>t)break;let l=this.ranges[h+n],m=this.ranges[h+a],u=p+l;if(t<=u){let n=p+o+((l?t==p?-1:t==u?1:e:e)<0?0:m);if(r)return n;let a=t==(e<0?p:u)?null:h/3+(t-p)*s,f=t==p?2:t==u?1:4;return(e<0?t!=p:t!=u)&&(f|=8),new i(n,f,a)}o+=m-l}return r?t+o:new i(t+o,0,null)}touches(t,e){let r=0,s=o(e),i=this.inverted?2:1,n=this.inverted?1:2;for(let e=0;e<this.ranges.length;e+=3){let o=this.ranges[e]-(this.inverted?r:0);if(o>t)break;let a=this.ranges[e+i];if(t<=o+a&&e==3*s)return!0;r+=this.ranges[e+n]-a}return!1}forEach(t){let e=this.inverted?2:1,r=this.inverted?1:2;for(let s=0,o=0;s<this.ranges.length;s+=3){let i=this.ranges[s],n=i-(this.inverted?o:0),a=i+(this.inverted?0:o),h=this.ranges[s+e],p=this.ranges[s+r];t(n,n+h,a,a+p),o+=p-h}}invert(){return new n(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return 0==t?n.empty:new n(t<0?[0,-t,0]:[0,0,t])}}n.empty=new n([]);const a=Object.create(null);class h{getMap(){return n.empty}merge(t){return null}static fromJSON(t,e){if(!e||!e.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=a[e.stepType];if(!r)throw new RangeError(`No step type ${e.stepType} defined`);return r.fromJSON(t,e)}static jsonID(t,e){if(t in a)throw new RangeError("Duplicate use of step JSON ID "+t);return a[t]=e,e.prototype.jsonID=t,e}}class p{constructor(t,e){this.doc=t,this.failed=e}static ok(t){return new p(t,null)}static fail(t){return new p(null,t)}static fromReplace(t,r,s,o){try{return p.ok(t.replace(r,s,o))}catch(t){if(t instanceof e)return p.fail(t.message);throw t}}}function l(t,e,s){let o=[];for(let r=0;r<t.childCount;r++){let i=t.child(r);i.content.size&&(i=i.copy(l(i.content,e,i))),i.isInline&&(i=e(i,s,r)),o.push(i)}return r.fromArray(o)}class m extends h{constructor(t,e,r){super(),this.from=t,this.to=e,this.mark=r}apply(e){let r=e.slice(this.from,this.to),s=e.resolve(this.from),o=s.node(s.sharedDepth(this.to)),i=new t(l(r.content,((t,e)=>t.isAtom&&e.type.allowsMarkType(this.mark.type)?t.mark(this.mark.addToSet(t.marks)):t),o),r.openStart,r.openEnd);return p.fromReplace(e,this.from,this.to,i)}invert(){return new u(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return e.deleted&&r.deleted||e.pos>=r.pos?null:new m(e.pos,r.pos,this.mark)}merge(t){return t instanceof m&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new m(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new m(e.from,e.to,t.markFromJSON(e.mark))}}h.jsonID("addMark",m);class u extends h{constructor(t,e,r){super(),this.from=t,this.to=e,this.mark=r}apply(e){let r=e.slice(this.from,this.to),s=new t(l(r.content,(t=>t.mark(this.mark.removeFromSet(t.marks))),e),r.openStart,r.openEnd);return p.fromReplace(e,this.from,this.to,s)}invert(){return new m(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return e.deleted&&r.deleted||e.pos>=r.pos?null:new u(e.pos,r.pos,this.mark)}merge(t){return t instanceof u&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new u(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new u(e.from,e.to,t.markFromJSON(e.mark))}}h.jsonID("removeMark",u);class f extends h{constructor(t,e){super(),this.pos=t,this.mark=e}apply(e){let s=e.nodeAt(this.pos);if(!s)return p.fail("No node at mark step's position");let o=s.type.create(s.attrs,null,this.mark.addToSet(s.marks));return p.fromReplace(e,this.pos,this.pos+1,new t(r.from(o),0,s.isLeaf?0:1))}invert(t){let e=t.nodeAt(this.pos);if(e){let t=this.mark.addToSet(e.marks);if(t.length==e.marks.length){for(let r=0;r<e.marks.length;r++)if(!e.marks[r].isInSet(t))return new f(this.pos,e.marks[r]);return new f(this.pos,this.mark)}}return new c(this.pos,this.mark)}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new f(e.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,e){if("number"!=typeof e.pos)throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new f(e.pos,t.markFromJSON(e.mark))}}h.jsonID("addNodeMark",f);class c extends h{constructor(t,e){super(),this.pos=t,this.mark=e}apply(e){let s=e.nodeAt(this.pos);if(!s)return p.fail("No node at mark step's position");let o=s.type.create(s.attrs,null,this.mark.removeFromSet(s.marks));return p.fromReplace(e,this.pos,this.pos+1,new t(r.from(o),0,s.isLeaf?0:1))}invert(t){let e=t.nodeAt(this.pos);return e&&this.mark.isInSet(e.marks)?new f(this.pos,this.mark):this}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new c(e.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,e){if("number"!=typeof e.pos)throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new c(e.pos,t.markFromJSON(e.mark))}}h.jsonID("removeNodeMark",c);class d extends h{constructor(t,e,r,s=!1){super(),this.from=t,this.to=e,this.slice=r,this.structure=s}apply(t){return this.structure&&k(t,this.from,this.to)?p.fail("Structure replace would overwrite content"):p.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new n([this.from,this.to-this.from,this.slice.size])}invert(t){return new d(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let e=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return e.deletedAcross&&r.deletedAcross?null:new d(e.pos,Math.max(e.pos,r.pos),this.slice)}merge(e){if(!(e instanceof d)||e.structure||this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart){if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;{let r=this.slice.size+e.slice.size==0?t.empty:new t(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new d(e.from,this.to,r,this.structure)}}{let r=this.slice.size+e.slice.size==0?t.empty:new t(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new d(this.from,this.to+(e.to-e.from),r,this.structure)}}toJSON(){let t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(e,r){if("number"!=typeof r.from||"number"!=typeof r.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new d(r.from,r.to,t.fromJSON(e,r.slice),!!r.structure)}}h.jsonID("replace",d);class g extends h{constructor(t,e,r,s,o,i,n=!1){super(),this.from=t,this.to=e,this.gapFrom=r,this.gapTo=s,this.slice=o,this.insert=i,this.structure=n}apply(t){if(this.structure&&(k(t,this.from,this.gapFrom)||k(t,this.gapTo,this.to)))return p.fail("Structure gap-replace would overwrite content");let e=t.slice(this.gapFrom,this.gapTo);if(e.openStart||e.openEnd)return p.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,e.content);return r?p.fromReplace(t,this.from,this.to,r):p.fail("Content does not fit in gap")}getMap(){return new n([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let e=this.gapTo-this.gapFrom;return new g(this.from,this.from+this.slice.size+e,this.from+this.insert,this.from+this.insert+e,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let e=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),s=this.from==this.gapFrom?e.pos:t.map(this.gapFrom,-1),o=this.to==this.gapTo?r.pos:t.map(this.gapTo,1);return e.deletedAcross&&r.deletedAcross||s<e.pos||o>r.pos?null:new g(e.pos,r.pos,s,o,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(e,r){if("number"!=typeof r.from||"number"!=typeof r.to||"number"!=typeof r.gapFrom||"number"!=typeof r.gapTo||"number"!=typeof r.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new g(r.from,r.to,r.gapFrom,r.gapTo,t.fromJSON(e,r.slice),r.insert,!!r.structure)}}function k(t,e,r){let s=t.resolve(e),o=r-e,i=s.depth;for(;o>0&&i>0&&s.indexAfter(i)==s.node(i).childCount;)i--,o--;if(o>0){let t=s.node(i).maybeChild(s.indexAfter(i));for(;o>0;){if(!t||t.isLeaf)return!0;t=t.firstChild,o--}}return!1}h.jsonID("replaceAround",g);class w extends h{constructor(t,e,r){super(),this.pos=t,this.attr=e,this.value=r}apply(e){let s=e.nodeAt(this.pos);if(!s)return p.fail("No node at attribute step's position");let o=Object.create(null);for(let t in s.attrs)o[t]=s.attrs[t];o[this.attr]=this.value;let i=s.type.create(o,null,s.marks);return p.fromReplace(e,this.pos,this.pos+1,new t(r.from(i),0,s.isLeaf?0:1))}getMap(){return n.empty}invert(t){return new w(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new w(e.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,e){if("number"!=typeof e.pos||"string"!=typeof e.attr)throw new RangeError("Invalid input for AttrStep.fromJSON");return new w(e.pos,e.attr,e.value)}}h.jsonID("attr",w);class S extends h{constructor(t,e){super(),this.attr=t,this.value=e}apply(t){let e=Object.create(null);for(let r in t.attrs)e[r]=t.attrs[r];e[this.attr]=this.value;let r=t.type.create(e,t.content,t.marks);return p.ok(r)}getMap(){return n.empty}invert(t){return new S(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,e){if("string"!=typeof e.attr)throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new S(e.attr,e.value)}}h.jsonID("docAttr",S);let y=class extends Error{};y=function t(e){let r=Error.call(this,e);return r.__proto__=t.prototype,r},(y.prototype=Object.create(Error.prototype)).constructor=y,y.prototype.name="TransformError";export{m as AddMarkStep,f as AddNodeMarkStep,w as AttrStep,S as DocAttrStep,i as MapResult,u as RemoveMarkStep,c as RemoveNodeMarkStep,g as ReplaceAroundStep,d as ReplaceStep,h as Step,n as StepMap,p as StepResult,y as TransformError};
1
+ import{Slice as t,ReplaceError as e,Fragment as r}from"../../prosemirror-model/dist/index.js";const s=Math.pow(2,16);function o(t,e){return t+e*s}function i(t){return 65535&t}class n{constructor(t,e,r){this.pos=t,this.delInfo=e,this.recover=r}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}}class a{constructor(t,e=!1){if(this.ranges=t,this.inverted=e,!t.length&&a.empty)return a.empty}recover(t){let e=0,r=i(t);if(!this.inverted)for(let t=0;t<r;t++)e+=this.ranges[3*t+2]-this.ranges[3*t+1];return this.ranges[3*r]+e+function(t){return(t-(65535&t))/s}(t)}mapResult(t,e=1){return this._map(t,e,!1)}map(t,e=1){return this._map(t,e,!0)}_map(t,e,r){let s=0,i=this.inverted?2:1,a=this.inverted?1:2;for(let h=0;h<this.ranges.length;h+=3){let p=this.ranges[h]-(this.inverted?s:0);if(p>t)break;let l=this.ranges[h+i],m=this.ranges[h+a],u=p+l;if(t<=u){let i=p+s+((l?t==p?-1:t==u?1:e:e)<0?0:m);if(r)return i;let a=t==(e<0?p:u)?null:o(h/3,t-p),f=t==p?2:t==u?1:4;return(e<0?t!=p:t!=u)&&(f|=8),new n(i,f,a)}s+=m-l}return r?t+s:new n(t+s,0,null)}touches(t,e){let r=0,s=i(e),o=this.inverted?2:1,n=this.inverted?1:2;for(let e=0;e<this.ranges.length;e+=3){let i=this.ranges[e]-(this.inverted?r:0);if(i>t)break;let a=this.ranges[e+o];if(t<=i+a&&e==3*s)return!0;r+=this.ranges[e+n]-a}return!1}forEach(t){let e=this.inverted?2:1,r=this.inverted?1:2;for(let s=0,o=0;s<this.ranges.length;s+=3){let i=this.ranges[s],n=i-(this.inverted?o:0),a=i+(this.inverted?0:o),h=this.ranges[s+e],p=this.ranges[s+r];t(n,n+h,a,a+p),o+=p-h}}invert(){return new a(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return 0==t?a.empty:new a(t<0?[0,-t,0]:[0,0,t])}}a.empty=new a([]);const h=Object.create(null);class p{getMap(){return a.empty}merge(t){return null}static fromJSON(t,e){if(!e||!e.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=h[e.stepType];if(!r)throw new RangeError(`No step type ${e.stepType} defined`);return r.fromJSON(t,e)}static jsonID(t,e){if(t in h)throw new RangeError("Duplicate use of step JSON ID "+t);return h[t]=e,e.prototype.jsonID=t,e}}class l{constructor(t,e){this.doc=t,this.failed=e}static ok(t){return new l(t,null)}static fail(t){return new l(null,t)}static fromReplace(t,r,s,o){try{return l.ok(t.replace(r,s,o))}catch(t){if(t instanceof e)return l.fail(t.message);throw t}}}function m(t,e,s){let o=[];for(let r=0;r<t.childCount;r++){let i=t.child(r);i.content.size&&(i=i.copy(m(i.content,e,i))),i.isInline&&(i=e(i,s,r)),o.push(i)}return r.fromArray(o)}class u extends p{constructor(t,e,r){super(),this.from=t,this.to=e,this.mark=r}apply(e){let r=e.slice(this.from,this.to),s=e.resolve(this.from),o=s.node(s.sharedDepth(this.to)),i=new t(m(r.content,(t,e)=>t.isAtom&&e.type.allowsMarkType(this.mark.type)?t.mark(this.mark.addToSet(t.marks)):t,o),r.openStart,r.openEnd);return l.fromReplace(e,this.from,this.to,i)}invert(){return new f(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return e.deleted&&r.deleted||e.pos>=r.pos?null:new u(e.pos,r.pos,this.mark)}merge(t){return t instanceof u&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new u(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new u(e.from,e.to,t.markFromJSON(e.mark))}}p.jsonID("addMark",u);class f extends p{constructor(t,e,r){super(),this.from=t,this.to=e,this.mark=r}apply(e){let r=e.slice(this.from,this.to),s=new t(m(r.content,t=>t.mark(this.mark.removeFromSet(t.marks)),e),r.openStart,r.openEnd);return l.fromReplace(e,this.from,this.to,s)}invert(){return new u(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return e.deleted&&r.deleted||e.pos>=r.pos?null:new f(e.pos,r.pos,this.mark)}merge(t){return t instanceof f&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new f(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new f(e.from,e.to,t.markFromJSON(e.mark))}}p.jsonID("removeMark",f);class c extends p{constructor(t,e){super(),this.pos=t,this.mark=e}apply(e){let s=e.nodeAt(this.pos);if(!s)return l.fail("No node at mark step's position");let o=s.type.create(s.attrs,null,this.mark.addToSet(s.marks));return l.fromReplace(e,this.pos,this.pos+1,new t(r.from(o),0,s.isLeaf?0:1))}invert(t){let e=t.nodeAt(this.pos);if(e){let t=this.mark.addToSet(e.marks);if(t.length==e.marks.length){for(let r=0;r<e.marks.length;r++)if(!e.marks[r].isInSet(t))return new c(this.pos,e.marks[r]);return new c(this.pos,this.mark)}}return new d(this.pos,this.mark)}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new c(e.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,e){if("number"!=typeof e.pos)throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new c(e.pos,t.markFromJSON(e.mark))}}p.jsonID("addNodeMark",c);class d extends p{constructor(t,e){super(),this.pos=t,this.mark=e}apply(e){let s=e.nodeAt(this.pos);if(!s)return l.fail("No node at mark step's position");let o=s.type.create(s.attrs,null,this.mark.removeFromSet(s.marks));return l.fromReplace(e,this.pos,this.pos+1,new t(r.from(o),0,s.isLeaf?0:1))}invert(t){let e=t.nodeAt(this.pos);return e&&this.mark.isInSet(e.marks)?new c(this.pos,this.mark):this}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new d(e.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,e){if("number"!=typeof e.pos)throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new d(e.pos,t.markFromJSON(e.mark))}}p.jsonID("removeNodeMark",d);class g extends p{constructor(t,e,r,s=!1){super(),this.from=t,this.to=e,this.slice=r,this.structure=s}apply(t){return this.structure&&w(t,this.from,this.to)?l.fail("Structure replace would overwrite content"):l.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new a([this.from,this.to-this.from,this.slice.size])}invert(t){return new g(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let e=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return e.deletedAcross&&r.deletedAcross?null:new g(e.pos,Math.max(e.pos,r.pos),this.slice,this.structure)}merge(e){if(!(e instanceof g)||e.structure||this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart){if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;{let r=this.slice.size+e.slice.size==0?t.empty:new t(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new g(e.from,this.to,r,this.structure)}}{let r=this.slice.size+e.slice.size==0?t.empty:new t(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new g(this.from,this.to+(e.to-e.from),r,this.structure)}}toJSON(){let t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(e,r){if("number"!=typeof r.from||"number"!=typeof r.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new g(r.from,r.to,t.fromJSON(e,r.slice),!!r.structure)}}p.jsonID("replace",g);class k extends p{constructor(t,e,r,s,o,i,n=!1){super(),this.from=t,this.to=e,this.gapFrom=r,this.gapTo=s,this.slice=o,this.insert=i,this.structure=n}apply(t){if(this.structure&&(w(t,this.from,this.gapFrom)||w(t,this.gapTo,this.to)))return l.fail("Structure gap-replace would overwrite content");let e=t.slice(this.gapFrom,this.gapTo);if(e.openStart||e.openEnd)return l.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,e.content);return r?l.fromReplace(t,this.from,this.to,r):l.fail("Content does not fit in gap")}getMap(){return new a([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let e=this.gapTo-this.gapFrom;return new k(this.from,this.from+this.slice.size+e,this.from+this.insert,this.from+this.insert+e,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let e=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),s=this.from==this.gapFrom?e.pos:t.map(this.gapFrom,-1),o=this.to==this.gapTo?r.pos:t.map(this.gapTo,1);return e.deletedAcross&&r.deletedAcross||s<e.pos||o>r.pos?null:new k(e.pos,r.pos,s,o,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(e,r){if("number"!=typeof r.from||"number"!=typeof r.to||"number"!=typeof r.gapFrom||"number"!=typeof r.gapTo||"number"!=typeof r.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new k(r.from,r.to,r.gapFrom,r.gapTo,t.fromJSON(e,r.slice),r.insert,!!r.structure)}}function w(t,e,r){let s=t.resolve(e),o=r-e,i=s.depth;for(;o>0&&i>0&&s.indexAfter(i)==s.node(i).childCount;)i--,o--;if(o>0){let t=s.node(i).maybeChild(s.indexAfter(i));for(;o>0;){if(!t||t.isLeaf)return!0;t=t.firstChild,o--}}return!1}p.jsonID("replaceAround",k);class S extends p{constructor(t,e,r){super(),this.pos=t,this.attr=e,this.value=r}apply(e){let s=e.nodeAt(this.pos);if(!s)return l.fail("No node at attribute step's position");let o=Object.create(null);for(let t in s.attrs)o[t]=s.attrs[t];o[this.attr]=this.value;let i=s.type.create(o,null,s.marks);return l.fromReplace(e,this.pos,this.pos+1,new t(r.from(i),0,s.isLeaf?0:1))}getMap(){return a.empty}invert(t){return new S(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new S(e.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,e){if("number"!=typeof e.pos||"string"!=typeof e.attr)throw new RangeError("Invalid input for AttrStep.fromJSON");return new S(e.pos,e.attr,e.value)}}p.jsonID("attr",S);class y extends p{constructor(t,e){super(),this.attr=t,this.value=e}apply(t){let e=Object.create(null);for(let r in t.attrs)e[r]=t.attrs[r];e[this.attr]=this.value;let r=t.type.create(e,t.content,t.marks);return l.ok(r)}getMap(){return a.empty}invert(t){return new y(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,e){if("string"!=typeof e.attr)throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new y(e.attr,e.value)}}p.jsonID("docAttr",y);let v=class extends Error{};v=function t(e){let r=Error.call(this,e);return r.__proto__=t.prototype,r},(v.prototype=Object.create(Error.prototype)).constructor=v,v.prototype.name="TransformError";export{u as AddMarkStep,c as AddNodeMarkStep,S as AttrStep,y as DocAttrStep,n as MapResult,f as RemoveMarkStep,d as RemoveNodeMarkStep,k as ReplaceAroundStep,g as ReplaceStep,p as Step,a as StepMap,l as StepResult,v as TransformError};
@@ -1,9 +1,9 @@
1
- import{jsx as r,jsxs as o}from"react/jsx-runtime";import{useMemo as e}from"react";import{Typography as t}from"@equinor/eds-core-react";import{Question as i}from"./Question.js";import"../../../molecules/RichTextEditor/custom-extensions/AmplifyKit.js";import"../../../molecules/RichTextEditor/RichTextEditor.types.js";import"../../../_virtual/lodash.js";import"../../TopBar/Notifications/NotificationProvider.js";import"../../../providers/AuthProvider/AuthProvider.js";import"../../../providers/ReleaseNotesProvider.js";import"../../../providers/SideBarProvider.js";import"../../../providers/SnackbarProvider/SnackbarProvider.js";import"../../../providers/StepperProvider.js";import"../../../providers/TableOfContentsProvider.js";import"../../../providers/ThemeProvider/ThemeProvider.js";import{useSearchParameter as s}from"../../../atoms/hooks/useSearchParameter.js";import"@tanstack/react-query";import"@equinor/subsurface-app-management";import"../../../atoms/utils/auth_environment.js";import"../../../atoms/style/colors.js";import{spacings as m}from"../../../atoms/style/spacings.js";import"../../../atoms/enums/Errors.js";import"../../../atoms/enums/Environment.js";import"../../../atoms/enums/Theme.js";import"../../../atoms/enums/SpacingsMode.js";import"html2canvas";import"proj4";import"@equinor/eds-icons";import{Status as a}from"../../Status/index.js";import n from"styled-components";const p=n.div`
1
+ import{jsx as e,jsxs as o}from"react/jsx-runtime";import{useState as t,useMemo as r}from"react";import{Typography as s}from"@equinor/eds-core-react";import{Question as i}from"./Question.js";import"../../../atoms/style/colors.js";import{spacings as n}from"../../../atoms/style/spacings.js";import{Status as a}from"../../Status/index.js";import m from"styled-components";const d=m.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
- gap: ${m.medium};
4
+ gap: ${n.medium};
5
5
  width: 100%;
6
6
  &:has(> div > div > svg) {
7
7
  transform: translateY(50%);
8
8
  }
9
- `,d=({categoryName:m,faqs:n})=>{const[d]=s({key:"search"}),[c]=s({key:"category"}),l=e((()=>n.toSorted(((r,o)=>(r.orderBy??0)-(o.orderBy??0)))),[n]),u=e((()=>d?l.filter((r=>r.question.toLowerCase().includes(d.toLowerCase())||r.answer.toLowerCase().includes(d.toLowerCase())||m.toLowerCase().includes(d.toLowerCase()))):l),[m,d,l]);return void 0!==c&&0===u.length?r(p,{children:o(a,{center:!1,children:[r(a.Title,{title:"No Questions Found"}),r(a.Description,{text:"No questions or answers matches your search in this category"})]})}):0===u.length?null:o(p,{children:[r(t,{variant:"h4",children:m}),u.map((o=>r(i,{...o},o.id)))]})};export{d as Category};
9
+ `,c=({categoryName:n,faqs:m})=>{const[c]=t(void 0),[l]=t(void 0),u=r(()=>m.toSorted((e,o)=>(e.orderBy??0)-(o.orderBy??0)),[m]),p=r(()=>c?u.filter(e=>e.question.toLowerCase().includes(c.toLowerCase())||e.answer.toLowerCase().includes(c.toLowerCase())||n.toLowerCase().includes(c.toLowerCase())):u,[n,c,u]);return void 0!==l&&0===p.length?e(d,{children:o(a,{center:!1,children:[e(a.Title,{title:"No Questions Found"}),e(a.Description,{text:"No questions or answers matches your search in this category"})]})}):0===p.length?null:o(d,{children:[e(s,{variant:"h4",children:n}),p.map(o=>e(i,{...o},o.id))]})};export{c as Category};
@@ -1,4 +1,4 @@
1
- import{jsxs as e,jsx as o}from"react/jsx-runtime";import{useState as t}from"react";import{Typography as r,Icon as i}from"@equinor/eds-core-react";import{chevron_up as s,chevron_down as l}from"@equinor/eds-icons";import{FaqService as m}from"@equinor/subsurface-app-management";import{shape as a}from"../../../atoms/style/index.js";import{formatDate as n}from"../../../atoms/utils/date.js";import"../../../molecules/AnimatedCheckmark/AnimatedCheckmark.styles.js";import"../../../molecules/ApplicationIcon/ApplicationIcon.js";import"../../../molecules/Badge/Badge.styles.js";import"../../../molecules/Banner/Banner.styles.js";import{Button as c}from"../../../molecules/Button/Button.js";import"../../../molecules/Chip/Chip.js";import"../../../molecules/ContentMenu/ContentMenu.styles.js";import"../../../molecules/DatePicker/DatePicker.js";import"../../../molecules/Dialog/Dialog.js";import"../../../molecules/EquinorLogo/EquinorLogo.js";import"../../../molecules/FileProgress/CompactFileProgress.styles.js";import"../../../atoms/utils/auth_environment.js";import"html2canvas";import"proj4";import"../../../molecules/RichTextEditor/RichTextEditor.types.js";import"../../../molecules/FileProgress/RegularFileProgress.styles.js";import"../../../molecules/FileUploadArea/FileUploadArea.js";import"../../../molecules/FullPageSpinner/FullPageSpinner.js";import"../../../molecules/InfoElement/InfoElement.js";import"../../../molecules/OptionalTooltip/OptionalTooltip.js";import"../../../molecules/ProfileAvatar/ProfileAvatar.js";import{RichTextDisplay as p}from"../../../molecules/RichTextDisplay/RichTextDisplay.js";import"../../../molecules/RichTextEditor/MenuBar/MenuBar.js";import"@tanstack/react-query";import"@tiptap/react";import"../../../molecules/RichTextEditor/custom-extensions/AmplifyKit.js";import"../../../molecules/RichTextEditor/RichTextEditor.styles.js";import{colors as u}from"../../../atoms/style/colors.js";import"../../../molecules/Tabs/Tabs.js";import"../../../molecules/RichTextEditor/MenuBar/MenuBar.styles.js";import"../../../molecules/RichTextEditor/MenuBar/MenuButton.js";import"../../../molecules/Search/Search.js";import"react-router-dom";import"../../../molecules/Sieve/Sieve.styles.js";import"../../../_virtual/lodash.js";import"../../../molecules/SingleFilterMenu/SingleFilterMenu.js";import"../../../molecules/Skeleton/SkeletonBase/SkeletonBase.js";import"../../../molecules/Skeleton/Skeleton.styles.js";import"../../../molecules/Stepper/Stepper.js";import"../../../molecules/OptionDrawer/OptionDrawer.js";import"../../../molecules/Select/Select.styles.js";import{spacings as d}from"../../../atoms/style/spacings.js";import"../../../molecules/ListItem/ListItem.js";import"../../../molecules/SelectionControls/Checkbox/Checkbox.js";import"../../../molecules/SelectionControls/Radio/Radio.js";import"../../../molecules/SelectionControls/Switch/Switch.js";import"../../../molecules/Waves/Waves.styles.js";import{AnimatePresence as j,motion as h}from"framer-motion";import g from"styled-components";import{animation as y}from"../../../atoms/style/animation.js";const f=g.div`
1
+ import{jsxs as e,jsx as o}from"react/jsx-runtime";import{useState as t}from"react";import{Typography as r,Icon as i}from"@equinor/eds-core-react";import{chevron_up as s,chevron_down as l}from"@equinor/eds-icons";import{FaqService as m}from"@equinor/subsurface-app-management";import{shape as a}from"../../../atoms/style/index.js";import{formatDate as n}from"../../../atoms/utils/date.js";import"../../../molecules/AnimatedCheckmark/AnimatedCheckmark.styles.js";import"../../../molecules/ApplicationIcon/ApplicationIcon.js";import"../../../molecules/Badge/Badge.styles.js";import"../../../molecules/Banner/Banner.styles.js";import{Button as c}from"../../../molecules/Button/Button.js";import"../../../molecules/Chip/Chip.js";import"../../../molecules/ContentMenu/ContentMenu.styles.js";import"../../../molecules/DatePicker/DatePicker.js";import"../../../molecules/DateRangePicker/DateRangePicker.js";import"../../../molecules/Dialog/Dialog.js";import"../../../molecules/EquinorLogo/EquinorLogo.js";import"../../../molecules/FileProgress/CompactFileProgress.styles.js";import"../../../atoms/utils/auth_environment.js";import"html2canvas";import"proj4";import"../../../molecules/RichTextEditor/RichTextEditor.types.js";import"../../../molecules/FileProgress/RegularFileProgress.styles.js";import"react-dropzone";import"../../../molecules/FileUploadArea/FileUploadArea.styles.js";import"../../../molecules/FullPageSpinner/FullPageSpinner.js";import"../../../molecules/InfoElement/InfoElement.js";import"../../../molecules/OptionalTooltip/OptionalTooltip.js";import"../../../molecules/ProfileAvatar/ProfileAvatar.js";import{RichTextDisplay as p}from"../../../molecules/RichTextDisplay/RichTextDisplay.js";import"../../../molecules/RichTextEditor/MenuBar/MenuBar.js";import"@tanstack/react-query";import"@tiptap/react";import"../../../molecules/RichTextEditor/custom-extensions/AmplifyKit.js";import"../../../molecules/RichTextEditor/RichTextEditor.styles.js";import{colors as u}from"../../../atoms/style/colors.js";import"../../../molecules/Tabs/Tabs.js";import"../../../molecules/RichTextEditor/MenuBar/MenuBar.styles.js";import"../../../molecules/RichTextEditor/MenuBar/MenuButton.js";import"../../../molecules/Search/Search.js";import"../../../molecules/Sieve/Sieve.styles.js";import"../../../_virtual/lodash.js";import"../../../molecules/SingleFilterMenu/SingleFilterMenu.js";import"../../../molecules/Skeleton/SkeletonBase/SkeletonBase.js";import"../../../molecules/Skeleton/Skeleton.styles.js";import"../../../molecules/Stepper/Stepper.js";import"../../../molecules/OptionDrawer/OptionDrawer.js";import"../../../molecules/Select/Select.styles.js";import{spacings as d}from"../../../atoms/style/spacings.js";import"../../../molecules/Skeleton/SkeletonField.js";import"../../../molecules/ListItem/ListItem.js";import"../../../molecules/SelectionControls/Checkbox/Checkbox.js";import"../../../molecules/SelectionControls/Radio/Radio.js";import"../../../molecules/SelectionControls/Switch/Switch.js";import"../../../molecules/Waves/Waves.styles.js";import{AnimatePresence as j,motion as h}from"framer-motion";import g from"styled-components";import{animation as y}from"../../../atoms/style/animation.js";const S=g.div`
2
2
  background: ${u.ui.background__default.rgba};
3
3
  width: 100%;
4
4
  display: grid;
@@ -19,4 +19,4 @@ import{jsxs as e,jsx as o}from"react/jsx-runtime";import{useState as t}from"reac
19
19
  background: ${u.interactive.primary__hover_alt.rgba};
20
20
  }
21
21
  }
22
- `,S=({question:a,answer:u,createdDate:d})=>{const[g,y]=t(!1);return e(f,{onClick:()=>y((e=>!e)),children:[o(r,{variant:"h4",children:a}),o(r,{variant:"caption",children:n(d)}),o(c,{variant:"ghost_icon",children:o(i,{data:g?s:l})}),o(j,{children:g&&o(h.div,{style:{overflow:"hidden"},initial:{height:0},animate:{height:"auto"},exit:{height:0},children:o(p,{value:u,onImageRead:m.getFaqImage})})})]})};export{S as Question};
22
+ `,f=({question:a,answer:u,createdDate:d})=>{const[g,y]=t(!1);return e(S,{onClick:()=>y(e=>!e),children:[o(r,{variant:"h4",children:a}),o(r,{variant:"caption",children:n(d)}),o(c,{variant:"ghost_icon",children:o(i,{data:g?s:l})}),o(j,{children:g&&o(h.div,{style:{overflow:"hidden"},initial:{height:0},animate:{height:"auto"},exit:{height:0},children:o(p,{value:u,onImageRead:m.getFaqImage})})})]})};export{f as Question};
@@ -26,4 +26,4 @@ import{jsxs as r,jsx as e}from"react/jsx-runtime";import{Icon as o}from"@equinor
26
26
  height: 16px;
27
27
  width: 5rem;
28
28
  border-radius: ${t.corners.borderRadius};
29
- `,g=()=>r(u,{children:[e(l,{}),new Array(3).fill(0).map(((t,s)=>r(c,{children:[e(p,{$offset:100*s}),e(f,{$offset:100*s}),e(d,{variant:"ghost_icon",children:e(o,{data:i})})]},`card-${s}`)))]});export{g as CategorySkeleton};
29
+ `,g=()=>r(u,{children:[e(l,{}),new Array(3).fill(0).map((t,s)=>r(c,{children:[e(p,{$offset:100*s}),e(f,{$offset:100*s}),e(d,{variant:"ghost_icon",children:e(o,{data:i})})]},`card-${s}`))]});export{g as CategorySkeleton};
@@ -1 +1 @@
1
- import{jsxs as r,jsx as o,Fragment as t}from"react/jsx-runtime";import{useMemo as e}from"react";import{Typography as i}from"@equinor/eds-core-react";import{Container as s}from"./Faq.styles.js";import{Header as m}from"./Header.js";import"../../molecules/RichTextEditor/custom-extensions/AmplifyKit.js";import"../../molecules/RichTextEditor/RichTextEditor.types.js";import"../../_virtual/lodash.js";import"../TopBar/Notifications/NotificationProvider.js";import"../../providers/AuthProvider/AuthProvider.js";import"../../providers/ReleaseNotesProvider.js";import"../../providers/SideBarProvider.js";import"../../providers/SnackbarProvider/SnackbarProvider.js";import"../../providers/StepperProvider.js";import"../../providers/TableOfContentsProvider.js";import"../../providers/ThemeProvider/ThemeProvider.js";import{useSearchParameter as a}from"../../atoms/hooks/useSearchParameter.js";import"@tanstack/react-query";import{useFaqsInApplication as p}from"../../atoms/hooks/useFaqsInApplication.js";import"../../atoms/style/colors.js";import"../../atoms/enums/Errors.js";import"../../atoms/enums/Environment.js";import"../../atoms/enums/Theme.js";import"../../atoms/enums/SpacingsMode.js";import"../../atoms/utils/auth_environment.js";import"html2canvas";import"proj4";import"@equinor/eds-icons";import{Category as n}from"./Category/Category.js";import{CategorySkeleton as d}from"./CategorySkeleton.js";import{Status as c}from"../Status/index.js";const j=()=>{const{data:j,isLoading:l}=p(),[u]=a({key:"category"}),v=e((()=>{if(!j)return;if(!u)return j;return[j.find((r=>r.id==Number(u)))]}),[j,u]);return r(s,{children:[o(i,{variant:"h1",bold:!0,children:"FAQ"}),o(m,{}),v&&v.length>0?v.map((r=>o(n,{...r},r.id))):l?r(t,{children:[o(d,{}),o(d,{}),o(d,{})]}):o(c,{center:!1,children:o(c.Title,{title:"No FAQs available yet"})})]})};export{j as Faq};
1
+ import{jsxs as r,jsx as t,Fragment as o}from"react/jsx-runtime";import{useState as e,useMemo as i}from"react";import{Typography as m}from"@equinor/eds-core-react";import{Container as a}from"./Faq.styles.js";import{Header as n}from"./Header.js";import{useFaqsInApplication as s}from"../../atoms/hooks/useFaqsInApplication.js";import{Category as d}from"./Category/Category.js";import{CategorySkeleton as l}from"./CategorySkeleton.js";import{Status as p}from"../Status/index.js";const c=()=>{const{data:c,isLoading:f}=s(),[u]=e(void 0),h=i(()=>{if(!c)return;if(!u)return c;return[c.find(r=>r.id==Number(u))]},[c,u]);return r(a,{children:[t(m,{variant:"h1",bold:!0,children:"FAQ"}),t(n,{}),h&&h.length>0?h.map(r=>t(d,{...r},r.id)):f?r(o,{children:[t(l,{}),t(l,{}),t(l,{})]}):t(p,{center:!1,children:t(p.Title,{title:"No FAQs available yet"})})]})};export{c as Faq};
@@ -1,4 +1,4 @@
1
- import{jsxs as r,jsx as o}from"react/jsx-runtime";import{useMemo as e}from"react";import{Search as t}from"@equinor/eds-core-react";import"../../molecules/RichTextEditor/custom-extensions/AmplifyKit.js";import"../../molecules/RichTextEditor/RichTextEditor.types.js";import"../../_virtual/lodash.js";import"../TopBar/Notifications/NotificationProvider.js";import"../../providers/AuthProvider/AuthProvider.js";import"../../providers/ReleaseNotesProvider.js";import"../../providers/SideBarProvider.js";import"../../providers/SnackbarProvider/SnackbarProvider.js";import"../../providers/StepperProvider.js";import"../../providers/TableOfContentsProvider.js";import"../../providers/ThemeProvider/ThemeProvider.js";import{useSearchParameter as i}from"../../atoms/hooks/useSearchParameter.js";import"@tanstack/react-query";import{useFaqsInApplication as s}from"../../atoms/hooks/useFaqsInApplication.js";import{colors as a}from"../../atoms/style/colors.js";import{spacings as m}from"../../atoms/style/spacings.js";import"../../atoms/enums/Errors.js";import"../../atoms/enums/Environment.js";import"../../atoms/enums/Theme.js";import"../../atoms/enums/SpacingsMode.js";import"../../atoms/utils/auth_environment.js";import"html2canvas";import"proj4";import"@equinor/eds-icons";import{Tabs as l}from"../../molecules/Tabs/Tabs.js";import p from"styled-components";const n=p.div`
1
+ import{jsxs as r,jsx as o}from"react/jsx-runtime";import{useState as e,useMemo as i}from"react";import{Search as t}from"@equinor/eds-core-react";import"../../molecules/RichTextEditor/custom-extensions/AmplifyKit.js";import"../../molecules/RichTextEditor/RichTextEditor.types.js";import"../../_virtual/lodash.js";import"../TopBar/Notifications/NotificationProvider.js";import"../../providers/AuthProvider/AuthProvider.js";import"../../providers/ReleaseNotesProvider.js";import"../../providers/SideBarProvider.js";import"../../providers/SnackbarProvider/SnackbarProvider.js";import"../../providers/StepperProvider.js";import"../../providers/TableOfContentsProvider.js";import"../../providers/ThemeProvider/ThemeProvider.js";import"@tanstack/react-query";import{useFaqsInApplication as s}from"../../atoms/hooks/useFaqsInApplication.js";import{colors as a}from"../../atoms/style/colors.js";import{spacings as m}from"../../atoms/style/spacings.js";import"../../atoms/enums/Errors.js";import"../../atoms/enums/Environment.js";import"../../atoms/enums/Theme.js";import"../../atoms/enums/SpacingsMode.js";import"../../atoms/utils/auth_environment.js";import"html2canvas";import"proj4";import"@equinor/eds-icons";import{Tabs as l}from"../../molecules/Tabs/Tabs.js";import p from"styled-components";const n=p.div`
2
2
  position: sticky;
3
3
  top: 0;
4
4
  display: flex;
@@ -11,4 +11,4 @@ import{jsxs as r,jsx as o}from"react/jsx-runtime";import{useMemo as e}from"react
11
11
  > div[role='search'] > div {
12
12
  background: ${a.ui.background__default.rgba};
13
13
  }
14
- `,d=()=>{const{data:a}=s(),[m,p]=i({key:"category"}),[d,c]=i({key:"search"}),u=e((()=>a?[{value:"all",label:"All categories"},...a.map((r=>({value:r.id.toString(),label:r.categoryName})))]:[{value:"all",label:"All categories"}]),[a]);return r(n,{children:[o(l,{style:{maxWidth:"100%",width:"fit-content"},selected:m??"all",onChange:r=>{p("all"===r?void 0:r)},options:u}),o(t,{value:d,onChange:r=>{c(r.target.value)},placeholder:"Search for answer by keyword"})]})};export{d as Header};
14
+ `,d=()=>{const{data:a}=s(),[m,p]=e(void 0),[d,c]=e(""),u=i(()=>a?[{value:"all",label:"All categories"},...a.map(r=>({value:r.id.toString(),label:r.categoryName}))]:[{value:"all",label:"All categories"}],[a]);return r(n,{children:[o(l,{style:{maxWidth:"100%",width:"fit-content"},selected:m??"all",onChange:r=>{p("all"===r?void 0:r)},options:u}),o(t,{value:d,onChange:r=>{c(r.target.value)},placeholder:"Search for answer by keyword"})]})};export{d as Header};
@@ -1,5 +1,5 @@
1
- import{jsx as r,jsxs as e,Fragment as o}from"react/jsx-runtime";import{LinearProgress as i,Typography as t}from"@equinor/eds-core-react";import"react";import"../../molecules/RichTextEditor/custom-extensions/AmplifyKit.js";import"../../molecules/RichTextEditor/RichTextEditor.types.js";import{useFakeProgress as s}from"../../atoms/hooks/useFakeProgress.js";import"../../_virtual/lodash.js";import"../TopBar/Notifications/NotificationProvider.js";import"../../providers/AuthProvider/AuthProvider.js";import"../../providers/ReleaseNotesProvider.js";import"../../providers/SideBarProvider.js";import"../../providers/SnackbarProvider/SnackbarProvider.js";import"../../providers/StepperProvider.js";import"../../providers/TableOfContentsProvider.js";import"../../providers/ThemeProvider/ThemeProvider.js";import"react-router-dom";import"@tanstack/react-query";import{colors as m}from"../../atoms/style/colors.js";import{spacings as a}from"../../atoms/style/spacings.js";import"../../atoms/enums/Errors.js";import"../../atoms/enums/Environment.js";import"../../atoms/enums/Theme.js";import"../../atoms/enums/SpacingsMode.js";import"../../atoms/utils/auth_environment.js";import"html2canvas";import"proj4";import{capitalize as n}from"../../atoms/utils/string.js";import"@equinor/eds-icons";import"@equinor/subsurface-app-management";import{AnimatedCheckmark as p}from"../../molecules/AnimatedCheckmark/AnimatedCheckmark.js";import d from"styled-components";const c=d.div`
2
- gap: ${a.medium};
1
+ import{jsx as r,jsxs as e,Fragment as i}from"react/jsx-runtime";import{LinearProgress as o,Typography as t}from"@equinor/eds-core-react";import"react";import"../../molecules/RichTextEditor/custom-extensions/AmplifyKit.js";import"../../molecules/RichTextEditor/RichTextEditor.types.js";import{useFakeProgress as s}from"../../atoms/hooks/useFakeProgress.js";import"../../_virtual/lodash.js";import"../TopBar/Notifications/NotificationProvider.js";import"../../providers/AuthProvider/AuthProvider.js";import"../../providers/ReleaseNotesProvider.js";import"../../providers/SideBarProvider.js";import"../../providers/SnackbarProvider/SnackbarProvider.js";import"../../providers/StepperProvider.js";import"../../providers/TableOfContentsProvider.js";import"../../providers/ThemeProvider/ThemeProvider.js";import"@tanstack/react-query";import{colors as a}from"../../atoms/style/colors.js";import{spacings as m}from"../../atoms/style/spacings.js";import"../../atoms/enums/Errors.js";import"../../atoms/enums/Environment.js";import"../../atoms/enums/Theme.js";import"../../atoms/enums/SpacingsMode.js";import"../../atoms/utils/auth_environment.js";import"html2canvas";import"proj4";import{capitalize as n}from"../../atoms/utils/string.js";import"@equinor/eds-icons";import"@equinor/subsurface-app-management";import{AnimatedCheckmark as p}from"../../molecules/AnimatedCheckmark/AnimatedCheckmark.js";import d from"styled-components";const c=d.div`
2
+ gap: ${m.medium};
3
3
  position: absolute;
4
4
  top: 50%;
5
5
  left: 50%;
@@ -8,17 +8,17 @@ import{jsx as r,jsxs as e,Fragment as o}from"react/jsx-runtime";import{LinearPro
8
8
  flex-direction: column;
9
9
  justify-content: center;
10
10
  align-items: center;
11
- min-height: calc(100vh - (${a.xxx_large} * 4));
11
+ min-height: calc(100vh - (${m.xxx_large} * 4));
12
12
  width: 100%;
13
13
  max-width: 370px;
14
- `,l=d(i)`
15
- background-color: ${m.interactive.primary__hover_alt.rgba};
14
+ `,l=d(o)`
15
+ background-color: ${a.interactive.primary__hover_alt.rgba};
16
16
 
17
17
  div {
18
- background-color: ${m.interactive.primary__resting.rgba};
18
+ background-color: ${a.interactive.primary__resting.rgba};
19
19
  }
20
20
  `,h=d(t)`
21
21
  span {
22
22
  text-transform: capitalize;
23
23
  }
24
- `,v=({fieldName:i,onChangedField:m,finishedText:a})=>{const{finished:d,progress:v}=s({onDone:m});return r(c,{children:e(o,d?{children:[e(h,{variant:"h3",children:["Changed to ",r("span",{children:n(i)})]}),r(p,{}),r(t,{variant:"h6",children:a})]}:{children:[e(t,{variant:"h3",children:["Changing field.",".".repeat(v/35)]}),r(l,{variant:"determinate",value:v})]})})};export{v as ChangingField,l as LinearProgress};
24
+ `,v=({fieldName:o,onChangedField:a,finishedText:m})=>{const{finished:d,progress:v}=s({onDone:a});return r(c,{children:e(i,d?{children:[e(h,{variant:"h3",children:["Changed to ",r("span",{children:n(o)})]}),r(p,{}),r(t,{variant:"h6",children:m})]}:{children:[e(t,{variant:"h3",children:["Changing field.",".".repeat(v/35)]}),r(l,{variant:"determinate",value:v})]})})};export{v as ChangingField,l as LinearProgress};
@@ -1,4 +1,4 @@
1
- import{jsxs as e,jsx as o}from"react/jsx-runtime";import{useState as t,useMemo as i}from"react";import{Card as r,Typography as l,Button as s,Icon as a}from"@equinor/eds-core-react";import{arrow_forward as n}from"@equinor/eds-icons";import{tokens as m}from"../../../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import"../../../atoms/style/colors.js";import{spacings as c}from"../../../atoms/style/spacings.js";import"../../../molecules/AnimatedCheckmark/AnimatedCheckmark.styles.js";import"../../../molecules/ApplicationIcon/ApplicationIcon.js";import"../../../molecules/Badge/Badge.styles.js";import"../../../molecules/Banner/Banner.styles.js";import"../../../molecules/Button/Button.js";import"../../../molecules/Chip/Chip.js";import"../../../molecules/ContentMenu/ContentMenu.styles.js";import"../../../molecules/DatePicker/DatePicker.js";import"../../../molecules/Dialog/Dialog.js";import"../../../molecules/EquinorLogo/EquinorLogo.js";import"../../../molecules/FileProgress/CompactFileProgress.styles.js";import"../../../atoms/utils/auth_environment.js";import"html2canvas";import"proj4";import"../../../molecules/RichTextEditor/RichTextEditor.types.js";import"../../../molecules/FileProgress/RegularFileProgress.styles.js";import"../../../molecules/FileUploadArea/FileUploadArea.js";import"../../../molecules/FullPageSpinner/FullPageSpinner.js";import"../../../molecules/InfoElement/InfoElement.js";import"../../../molecules/OptionalTooltip/OptionalTooltip.js";import"../../../molecules/ProfileAvatar/ProfileAvatar.js";import"@tiptap/react";import"../../../molecules/RichTextEditor/custom-extensions/AmplifyKit.js";import"../../../molecules/RichTextEditor/RichTextEditor.styles.js";import"../../../molecules/RichTextEditor/MenuBar/MenuBar.js";import"@tanstack/react-query";import"../../../molecules/Tabs/Tabs.js";import"../../../molecules/RichTextEditor/MenuBar/MenuBar.styles.js";import"../../../molecules/RichTextEditor/MenuBar/MenuButton.js";import"../../../molecules/Search/Search.js";import"react-router-dom";import"../../../molecules/Sieve/Sieve.styles.js";import"../../../_virtual/lodash.js";import"../../../molecules/SingleFilterMenu/SingleFilterMenu.js";import"../../../molecules/Skeleton/SkeletonBase/SkeletonBase.js";import"../../../molecules/Skeleton/Skeleton.styles.js";import"../../../molecules/Stepper/Stepper.js";import"../../../molecules/OptionDrawer/OptionDrawer.js";import"../../../molecules/Select/Select.styles.js";import{SingleSelect as p}from"../../../molecules/Select/SingleSelect/SingleSelect.js";import"../../../molecules/ListItem/ListItem.js";import"../../../molecules/SelectionControls/Checkbox/Checkbox.js";import"../../../molecules/SelectionControls/Radio/Radio.js";import"../../../molecules/SelectionControls/Switch/Switch.js";import"../../../molecules/Waves/Waves.styles.js";import"framer-motion";import u from"styled-components";const{elevation:d,colors:h,shape:g}=m,j=u(r)`
1
+ import{jsxs as e,jsx as o}from"react/jsx-runtime";import{useState as t,useMemo as i}from"react";import{Card as r,Typography as l,Button as s,Icon as a}from"@equinor/eds-core-react";import{arrow_forward as n}from"@equinor/eds-icons";import{tokens as m}from"../../../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import"../../../atoms/style/colors.js";import{spacings as c}from"../../../atoms/style/spacings.js";import"../../../molecules/AnimatedCheckmark/AnimatedCheckmark.styles.js";import"../../../molecules/ApplicationIcon/ApplicationIcon.js";import"../../../molecules/Badge/Badge.styles.js";import"../../../molecules/Banner/Banner.styles.js";import"../../../molecules/Button/Button.js";import"../../../molecules/Chip/Chip.js";import"../../../molecules/ContentMenu/ContentMenu.styles.js";import"../../../molecules/DatePicker/DatePicker.js";import"../../../molecules/DateRangePicker/DateRangePicker.js";import"../../../molecules/Dialog/Dialog.js";import"../../../molecules/EquinorLogo/EquinorLogo.js";import"../../../molecules/FileProgress/CompactFileProgress.styles.js";import"../../../atoms/utils/auth_environment.js";import"html2canvas";import"proj4";import"../../../molecules/RichTextEditor/RichTextEditor.types.js";import"../../../molecules/FileProgress/RegularFileProgress.styles.js";import"react-dropzone";import"../../../molecules/FileUploadArea/FileUploadArea.styles.js";import"../../../molecules/FullPageSpinner/FullPageSpinner.js";import"../../../molecules/InfoElement/InfoElement.js";import"../../../molecules/OptionalTooltip/OptionalTooltip.js";import"../../../molecules/ProfileAvatar/ProfileAvatar.js";import"@tiptap/react";import"../../../molecules/RichTextEditor/custom-extensions/AmplifyKit.js";import"../../../molecules/RichTextEditor/RichTextEditor.styles.js";import"../../../molecules/RichTextEditor/MenuBar/MenuBar.js";import"@tanstack/react-query";import"../../../molecules/Tabs/Tabs.js";import"../../../molecules/RichTextEditor/MenuBar/MenuBar.styles.js";import"../../../molecules/RichTextEditor/MenuBar/MenuButton.js";import"../../../molecules/Search/Search.js";import"../../../molecules/Sieve/Sieve.styles.js";import"../../../_virtual/lodash.js";import"../../../molecules/SingleFilterMenu/SingleFilterMenu.js";import"../../../molecules/Skeleton/SkeletonBase/SkeletonBase.js";import"../../../molecules/Skeleton/Skeleton.styles.js";import"../../../molecules/Stepper/Stepper.js";import"../../../molecules/OptionDrawer/OptionDrawer.js";import"../../../molecules/Select/Select.styles.js";import"../../../molecules/Skeleton/SkeletonField.js";import{SingleSelect as p}from"../../../molecules/Select/SingleSelect/SingleSelect.js";import"../../../molecules/ListItem/ListItem.js";import"../../../molecules/SelectionControls/Checkbox/Checkbox.js";import"../../../molecules/SelectionControls/Radio/Radio.js";import"../../../molecules/SelectionControls/Switch/Switch.js";import"../../../molecules/Waves/Waves.styles.js";import"framer-motion";import u from"styled-components";const{elevation:d,colors:h,shape:g}=m,j=u(r)`
2
2
  position: absolute;
3
3
  left: 50%;
4
4
  top: 50%;
@@ -54,4 +54,4 @@ import{jsxs as e,jsx as o}from"react/jsx-runtime";import{useState as t,useMemo a
54
54
  background-color: ${h.interactive.primary__hover_alt.rgba};
55
55
  cursor: pointer;
56
56
  }
57
- `,S=({availableFields:r,onSelect:m,itemNameSingular:c,showAccessITLink:u=!0})=>{const[d,h]=t(),g=i((()=>{const e=[];for(const o of r)o.name?e.push({label:o.name,value:o.name,...o}):console.error("Field with no name found!:",o);return e}),[r]);return e(j,{children:[e(l,{variant:"h3",children:["Please select a ",c]}),e("div",{children:[e("section",{children:[o(p,{lightBackground:!0,value:d,items:g,placeholder:`Select a ${c}...`,onSelect:e=>{h(e)}}),o(s,{"data-testid":"nextButton",variant:"contained_icon",disabled:void 0===d,onClick:()=>{void 0!==d&&m({name:d.name,uuid:d.uuid,country:d.country})},children:o(a,{data:n})})]}),u&&e(f,{children:[e(l,{variant:"overline",children:["Missing a ",c,"?"]}),o(x,{tabIndex:0,"data-testid":"missing-access",href:"https://accessit.equinor.com/#",target:"_blank",children:"Go to AccessIT"})]})]})]})};export{S as SelectorCard};
57
+ `,S=({availableFields:r,onSelect:m,itemNameSingular:c,showAccessITLink:u=!0})=>{const[d,h]=t(),g=i(()=>{const e=[];for(const o of r)o.name?e.push({label:o.name,value:o.name,...o}):console.error("Field with no name found!:",o);return e},[r]);return e(j,{children:[e(l,{variant:"h3",children:["Please select a ",c]}),e("div",{children:[e("section",{children:[o(p,{lightBackground:!0,value:d,items:g,placeholder:`Select a ${c}...`,onSelect:e=>{h(e)}}),o(s,{"data-testid":"nextButton",variant:"contained_icon",disabled:void 0===d,onClick:()=>{void 0!==d&&m({name:d.name,uuid:d.uuid,country:d.country})},children:o(a,{data:n})})]}),u&&e(f,{children:[e(l,{variant:"overline",children:["Missing a ",c,"?"]}),o(x,{tabIndex:0,"data-testid":"missing-access",href:"https://accessit.equinor.com/#",target:"_blank",children:"Go to AccessIT"})]})]})]})};export{S as SelectorCard};
@@ -0,0 +1,11 @@
1
+ import { FilterWithAutoCompleteOptions } from './Filter.types';
2
+ interface AutoCompleteMenuProps<T extends string> {
3
+ anchorElement: HTMLElement | null;
4
+ searchElement: HTMLElement | null;
5
+ search: string;
6
+ isFilterOpen: boolean;
7
+ autoCompleteOptions: FilterWithAutoCompleteOptions<T>['autoCompleteOptions'];
8
+ onAutoComplete: FilterWithAutoCompleteOptions<T>['onAutoComplete'];
9
+ }
10
+ export declare function AutoCompleteMenu<T extends string>({ anchorElement, searchElement, search, isFilterOpen, autoCompleteOptions, onAutoComplete, }: AutoCompleteMenuProps<T>): import("react/jsx-runtime").JSX.Element | null;
11
+ export {};
@@ -0,0 +1,10 @@
1
+ import{jsx as r}from"react/jsx-runtime";import{useState as e,useRef as o,useEffect as t}from"react";import{Menu as i,Typography as s}from"@equinor/eds-core-react";import"../../molecules/RichTextEditor/custom-extensions/AmplifyKit.js";import"../../molecules/RichTextEditor/RichTextEditor.types.js";import"../../_virtual/lodash.js";import"../TopBar/Notifications/NotificationProvider.js";import"../../providers/AuthProvider/AuthProvider.js";import"../../providers/ReleaseNotesProvider.js";import"../../providers/SideBarProvider.js";import"../../providers/SnackbarProvider/SnackbarProvider.js";import"../../providers/StepperProvider.js";import"../../providers/TableOfContentsProvider.js";import"../../providers/ThemeProvider/ThemeProvider.js";import"@tanstack/react-query";import"@equinor/subsurface-app-management";import"../../atoms/utils/auth_environment.js";import{colors as n}from"../../atoms/style/colors.js";import"../../atoms/enums/Errors.js";import"../../atoms/enums/Environment.js";import"../../atoms/enums/Theme.js";import"../../atoms/enums/SpacingsMode.js";import"html2canvas";import"proj4";import"@equinor/eds-icons";import{getFilteredAutoCompleteOptions as m,findStartAndEndIndexOfSearch as a}from"./Filter.utils.js";import{styled as p}from"styled-components";const c=p(i)`
2
+ overflow-y: auto;
3
+ max-height: 250px;
4
+ `,l=p(s)`
5
+ color: ${n.text.static_icons__tertiary.rgba};
6
+ > strong {
7
+ color: ${n.text.static_icons__default.rgba};
8
+ font-weight: unset;
9
+ }
10
+ `;function u({anchorElement:s,searchElement:n,search:p,isFilterOpen:u,autoCompleteOptions:d,onAutoComplete:v}){const[h,j]=e(!1),f=o("");t(()=>{h||p===f.current?p!==f.current&&(f.current=p):(f.current=p,j(!0))},[h,p]);const b=m({searchValue:p,autoCompleteOptions:d});return u&&h&&p&&0!==b.length?r(c,{open:!0,anchorEl:s,matchAnchorWidth:!0,onClose:()=>{j(!1)},children:b.map((e,o)=>{const[t,s]=a({searchValue:p,label:e.label}),m=[e.label.slice(0,t),r("strong",{children:e.label.slice(t,s+1)},`${e.value}-start`),e.label.slice(s+1)];return r(i.Item,{onKeyDown:r=>((r,e)=>"ArrowUp"===r.key&&0===e?(r.preventDefault(),void n?.focus()):"Enter"===r.key&&b[e]?(v(b[e].key,b[e]),void j(!1)):void 0)(r,o),children:r(l,{children:m})},e.value)})}):null}export{u as AutoCompleteMenu};
@@ -0,0 +1,10 @@
1
+ import { FilterWithAutoCompleteOptions } from './Filter.types';
2
+ export declare const StyledTypography: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<({
3
+ as?: import("react").ElementType | undefined;
4
+ } & (import("@equinor/eds-core-react").TypographyProps & Omit<any, "nonce" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | "italic" | "bold" | "variant" | "link" | "group" | "token" | "lines">)) & import("styled-components/dist/types").BaseObject, import("styled-components/dist/types").BaseObject>> & string & Omit<import("@equinor/eds-utils").OverridableComponent<import("@equinor/eds-core-react").TypographyProps, HTMLElement>, keyof import("react").Component<any, {}, any>>;
5
+ interface AutoCompleteTextProps<T extends string> {
6
+ search: string;
7
+ autoCompleteOptions: FilterWithAutoCompleteOptions<T>['autoCompleteOptions'];
8
+ }
9
+ export declare function AutoCompleteText<T extends string>({ search, autoCompleteOptions, }: AutoCompleteTextProps<T>): import("react/jsx-runtime").JSX.Element | null;
10
+ export {};
@@ -0,0 +1,11 @@
1
+ import{jsxs as r,jsx as o}from"react/jsx-runtime";import{Typography as t}from"@equinor/eds-core-react";import"react";import"../../molecules/RichTextEditor/custom-extensions/AmplifyKit.js";import"../../molecules/RichTextEditor/RichTextEditor.types.js";import"../../_virtual/lodash.js";import"../TopBar/Notifications/NotificationProvider.js";import"../../providers/AuthProvider/AuthProvider.js";import"../../providers/ReleaseNotesProvider.js";import"../../providers/SideBarProvider.js";import"../../providers/SnackbarProvider/SnackbarProvider.js";import"../../providers/StepperProvider.js";import"../../providers/TableOfContentsProvider.js";import"../../providers/ThemeProvider/ThemeProvider.js";import"@tanstack/react-query";import"@equinor/subsurface-app-management";import"../../atoms/utils/auth_environment.js";import{colors as e}from"../../atoms/style/colors.js";import"../../atoms/enums/Errors.js";import"../../atoms/enums/Environment.js";import"../../atoms/enums/Theme.js";import"../../atoms/enums/SpacingsMode.js";import"html2canvas";import"proj4";import"@equinor/eds-icons";import{getFilteredAutoCompleteOptions as i,findStartAndEndIndexOfSearch as s}from"./Filter.utils.js";import{styled as m}from"styled-components";const n=m(t)`
2
+ position: absolute;
3
+ left: 0;
4
+ color: ${e.text.static_icons__tertiary.rgba};
5
+ height: fit-content;
6
+ text-wrap: nowrap;
7
+ line-height: normal;
8
+ > span {
9
+ color: transparent;
10
+ }
11
+ `;function p({search:t,autoCompleteOptions:e}){const m=i({autoCompleteOptions:e,searchValue:t});if(0===m.length)return null;const p=m[0],[a,l]=s({searchValue:t,label:p.label});return 0!==a?null:r(n,{children:[o("span",{children:t.slice(0,t.length)}),p.label.slice(l+1)]})}export{p as AutoCompleteText,n as StyledTypography};
@@ -12,4 +12,4 @@ import { FilterProps } from './Filter.types';
12
12
  * @param placeholder - Placeholder text for the search input, defaults to 'Search...'
13
13
  * @param id - ID for the search field
14
14
  */
15
- export declare function Filter<T extends string>({ values, search, onSearchChange, onSearchEnter, onClearFilter, onClearAllFilters, children, topContent, inlineContent, initialOpen, placeholder, id, }: FilterProps<T>): import("react/jsx-runtime").JSX.Element;
15
+ export declare function Filter<T extends string>({ values, search, onSearchChange, onSearchEnter, onClearFilter, onClearAllFilters, children, topContent, inlineContent, initialOpen, placeholder, id, ...rest }: FilterProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useRef as r,useState as i}from"react";import{Icon as o,Button as n,Typography as a}from"@equinor/eds-core-react";import{search as c,clear as l,arrow_drop_up as s,arrow_drop_down as d,info_circle as h}from"@equinor/eds-icons";import{Wrapper as u,Container as p,Section as g,StyledChip as m,SearchField as f,Content as y}from"./Filter.styles.js";import{colors as _}from"../../atoms/style/colors.js";import{AnimatePresence as b,motion as v}from"framer-motion";function k({values:k,search:C,onSearchChange:x,onSearchEnter:j,onClearFilter:F,onClearAllFilters:O,children:$,topContent:D,inlineContent:S,initialOpen:q=!1,placeholder:w="Search...",id:z}){const E=r(null),[R,T]=i(q),[A,B]=i(void 0),I=r(q?"auto":0),K=Object.values(k).some((e=>e.length>0));return e(u,{id:z,children:[D,e(p,{children:[e(g,{onClick:()=>{E.current?.focus()},children:[t(o,{data:c,color:_.text.static_icons__tertiary.rgba}),Object.keys(k).flatMap((e=>k[e].map((({label:r,icon:i},o,n)=>t(m,{onDelete:()=>F(e,o),leadingIconData:i,$tryingToRemove:A===e&&o===n.length-1,children:r},`${r}-${o}-${e}`))))),t(f,{ref:E,id:`filter-search-${z}`,type:"search",value:C,placeholder:K?void 0:w,onChange:x,onKeyDownCapture:e=>{if("Enter"===e.key&&""!==C)j(C);else if("Backspace"===e.key&&""===C){if(void 0===A){for(const e of Object.keys(k).toReversed())if(k[e].length>0){B(e);break}return}F(A,k[A].length-1),B(void 0)}},onFocus:()=>{R||T(!0)}}),Object.values(k).some((e=>e.length>0))&&t(n,{variant:"ghost_icon",onClick:O,"data-testid":"clear-all-x",children:t(o,{data:l,size:18,color:_.text.static_icons__tertiary.rgba})})]}),S,e("button",{onClick:()=>{T((e=>!e)),"auto"===I.current&&(I.current=0)},"data-testid":"toggle-open-button",children:[t(a,{variant:"button",group:"navigation",as:"span",children:"Filters"}),t(o,{data:R?s:d,color:_.text.static_icons__tertiary.rgba})]})]}),t(b,{children:R&&t(v.div,{animate:{height:"auto"},initial:{height:I.current},exit:{height:0},children:e(y,{children:[e("span",{children:[t(o,{data:h,size:16,color:_.text.static_icons__tertiary.rgba}),t(a,{variant:"label",group:"input",color:_.text.static_icons__tertiary.rgba,children:"Type a keyword and press enter"})]}),$]})})})]})}export{k as Filter};
1
+ import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useRef as o,useState as r}from"react";import{Icon as n,Button as i,Typography as a}from"@equinor/eds-core-react";import{search as l,clear as c,arrow_drop_up as s,arrow_drop_down as p,info_circle as u}from"@equinor/eds-icons";import{Wrapper as m,Container as h,Section as d,StyledChip as C,SearchFieldWrapper as f,SearchField as g,Content as y}from"./Filter.styles.js";import{colors as O}from"../../atoms/style/colors.js";import{AutoCompleteMenu as v}from"./AutoCompleteMenu.js";import{AutoCompleteText as _}from"./AutoCompleteText.js";import{getFilteredAutoCompleteOptions as b}from"./Filter.utils.js";import{AnimatePresence as k,motion as j}from"framer-motion";function x({values:x,search:F,onSearchChange:A,onSearchEnter:$,onClearFilter:E,onClearAllFilters:D,children:S,topContent:T,inlineContent:q,initialOpen:w=!1,placeholder:z="Search...",id:M,...R}){const B=o(null),I=o(null),[K,V]=r(w),[G,H]=r(void 0),J=o(w?"auto":0),L=Object.values(x).some(e=>e.length>0);return e(m,{id:M,children:[T,e(h,{children:[e(d,{ref:I,onClick:()=>{B.current?.focus()},children:[t(n,{data:l,color:O.text.static_icons__tertiary.rgba}),Object.keys(x).flatMap(e=>x[e].map(({label:o,icon:r},n,i)=>t(C,{onDelete:()=>E(e,n),leadingIconData:r,$tryingToRemove:G===e&&n===i.length-1,children:o},`${o}-${n}-${e}`))),e(f,{children:["autoCompleteOptions"in R&&R.autoCompleteOptions&&t(_,{search:F,autoCompleteOptions:R.autoCompleteOptions}),t(g,{ref:B,id:`filter-search-${M}`,type:"search",autoComplete:"off",value:F,placeholder:L?void 0:z,onChange:A,onKeyDownCapture:e=>{if("Enter"===e.key&&""!==F)(e=>{if(!("autoCompleteOptions"in R))return void $(e);const t=b({searchValue:e,autoCompleteOptions:R.autoCompleteOptions});1!==t.length?$(e):R.onAutoComplete(t[0].key,t[0])})(F);else if("Backspace"===e.key&&""===F){if(void 0===G){for(const e of Object.keys(x).toReversed())if(x[e].length>0){H(e);break}return}E(G,x[G].length-1),H(void 0)}},onFocus:()=>{K||V(!0)}})]}),Object.values(x).some(e=>e.length>0)&&t(i,{variant:"ghost_icon",onClick:D,"data-testid":"clear-all-x",children:t(n,{data:c,size:18,color:O.text.static_icons__tertiary.rgba})})]}),q,e("button",{onClick:()=>{V(e=>!e),"auto"===J.current&&(J.current=0)},"data-testid":"toggle-open-button",children:[t(a,{variant:"button",group:"navigation",as:"span",children:"Filters"}),t(n,{data:K?s:p,color:O.text.static_icons__tertiary.rgba})]})]}),t(k,{children:K&&t(j.div,{animate:{height:"auto"},initial:{height:J.current},exit:{height:0},children:e(y,{children:[e("span",{children:[t(n,{data:u,size:16,color:O.text.static_icons__tertiary.rgba}),t(a,{variant:"label",group:"input",color:O.text.static_icons__tertiary.rgba,children:"Type a keyword and press enter"})]}),S]})})}),"autoCompleteOptions"in R&&R.autoCompleteOptions&&t(v,{isFilterOpen:K,search:F,anchorElement:I.current,autoCompleteOptions:R.autoCompleteOptions,onAutoComplete:R.onAutoComplete,searchElement:B.current})]})}export{x as Filter};
@@ -13,4 +13,5 @@ export declare const StyledChip: import("styled-components/dist/types").IStyledC
13
13
  onClick?: undefined;
14
14
  onDelete?: undefined;
15
15
  }))) & import("react").RefAttributes<HTMLDivElement | HTMLButtonElement>>, keyof import("react").Component<any, {}, any>>;
16
+ export declare const SearchFieldWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
16
17
  export {};
@@ -1,4 +1,4 @@
1
- import"react";import"../../molecules/RichTextEditor/custom-extensions/AmplifyKit.js";import"../../molecules/RichTextEditor/RichTextEditor.types.js";import"../../_virtual/lodash.js";import"../TopBar/Notifications/NotificationProvider.js";import"../../providers/AuthProvider/AuthProvider.js";import"../../providers/ReleaseNotesProvider.js";import"../../providers/SideBarProvider.js";import"../../providers/SnackbarProvider/SnackbarProvider.js";import"../../providers/StepperProvider.js";import"../../providers/TableOfContentsProvider.js";import"../../providers/ThemeProvider/ThemeProvider.js";import"react-router-dom";import"@tanstack/react-query";import"@equinor/subsurface-app-management";import"../../atoms/utils/auth_environment.js";import{shape as r,typography as e}from"../../atoms/style/index.js";import"../../atoms/enums/Errors.js";import"../../atoms/enums/Environment.js";import"../../atoms/enums/Theme.js";import"../../atoms/enums/SpacingsMode.js";import"html2canvas";import"proj4";import"@equinor/eds-icons";import{Chip as i}from"../../molecules/Chip/Chip.js";import{motion as t}from"framer-motion";import o,{css as a}from"styled-components";import{colors as s}from"../../atoms/style/colors.js";import{spacings as n}from"../../atoms/style/spacings.js";const d=o.div`
1
+ import"react";import"../../molecules/RichTextEditor/custom-extensions/AmplifyKit.js";import"../../molecules/RichTextEditor/RichTextEditor.types.js";import"../../_virtual/lodash.js";import"../TopBar/Notifications/NotificationProvider.js";import"../../providers/AuthProvider/AuthProvider.js";import"../../providers/ReleaseNotesProvider.js";import"../../providers/SideBarProvider.js";import"../../providers/SnackbarProvider/SnackbarProvider.js";import"../../providers/StepperProvider.js";import"../../providers/TableOfContentsProvider.js";import"../../providers/ThemeProvider/ThemeProvider.js";import"@tanstack/react-query";import"@equinor/subsurface-app-management";import"../../atoms/utils/auth_environment.js";import{shape as r,typography as i}from"../../atoms/style/index.js";import"../../atoms/enums/Errors.js";import"../../atoms/enums/Environment.js";import"../../atoms/enums/Theme.js";import"../../atoms/enums/SpacingsMode.js";import"html2canvas";import"proj4";import"@equinor/eds-icons";import{Chip as e}from"../../molecules/Chip/Chip.js";import{motion as t}from"framer-motion";import o,{css as a}from"styled-components";import{colors as s}from"../../atoms/style/colors.js";import{spacings as n}from"../../atoms/style/spacings.js";const d=o.div`
2
2
  width: 100%;
3
3
  border: 1px solid ${s.ui.background__heavy.rgba};
4
4
  background: ${s.ui.background__default.rgba};
@@ -72,8 +72,8 @@ import"react";import"../../molecules/RichTextEditor/custom-extensions/AmplifyKit
72
72
  flex-grow: 1;
73
73
  padding: 0;
74
74
  font-family: 'Equinor', sans-serif;
75
- font-size: ${e.input.text.fontSize};
76
- font-weight: ${e.input.text.fontWeight};
75
+ font-size: ${i.input.text.fontSize};
76
+ font-weight: ${i.input.text.fontWeight};
77
77
  color: ${s.text.static_icons__default.rgba};
78
78
  outline: none;
79
79
  border: none;
@@ -99,8 +99,12 @@ import"react";import"../../molecules/RichTextEditor/custom-extensions/AmplifyKit
99
99
  display: flex;
100
100
  gap: ${n.x_small};
101
101
  }
102
- `,u=o(i)`
102
+ `,u=o(e)`
103
103
  ${({$tryingToRemove:r})=>{if(r)return a`
104
104
  background: ${s.interactive.primary__hover_alt.rgba};
105
105
  `}}
106
- `;export{m as Container,c as Content,p as SearchField,l as Section,u as StyledChip,d as Wrapper};
106
+ `,g=o.section`
107
+ position: relative;
108
+ flex-grow: 1;
109
+ display: flex;
110
+ `;export{m as Container,c as Content,p as SearchField,g as SearchFieldWrapper,l as Section,u as StyledChip,d as Wrapper};
@@ -17,5 +17,9 @@ interface CommonFilterProps<T extends string> {
17
17
  placeholder?: string;
18
18
  id?: string;
19
19
  }
20
- export type FilterProps<T extends string> = CommonFilterProps<T>;
20
+ export interface FilterWithAutoCompleteOptions<T extends string> extends CommonFilterProps<T> {
21
+ autoCompleteOptions: Record<T, SelectOptionRequired[]>;
22
+ onAutoComplete: (key: T, value: SelectOptionRequired) => void;
23
+ }
24
+ export type FilterProps<T extends string> = CommonFilterProps<T> | FilterWithAutoCompleteOptions<T>;
21
25
  export {};
@@ -0,0 +1,11 @@
1
+ import { SelectOptionRequired } from '../../molecules';
2
+ export declare function getFilteredAutoCompleteOptions<T extends string>({ searchValue, autoCompleteOptions, }: {
3
+ searchValue: string;
4
+ autoCompleteOptions: Record<T, SelectOptionRequired[]>;
5
+ }): Array<SelectOptionRequired & {
6
+ key: T;
7
+ }>;
8
+ export declare function findStartAndEndIndexOfSearch({ searchValue, label, }: {
9
+ searchValue: string;
10
+ label: string;
11
+ }): [number, number];
@@ -0,0 +1 @@
1
+ function e({searchValue:e,autoCompleteOptions:o}){return function(e){const o=[];for(const a in e)o.push(...e[a].map(e=>({...e,key:a})));return o}(o).filter(o=>function({searchValue:e,option:o}){return""!==e&&o.label.toLowerCase().includes(e.toLowerCase())}({searchValue:e,option:o})).sort((o,a)=>function({a:e,b:o,searchValue:a}){const t=a.toLowerCase(),r=e.toLowerCase().replace(t,""),l=o.toLowerCase().replace(t,"");return r.length-l.length}({a:o.label,b:a.label,searchValue:e})).sort((e,o)=>e.label.localeCompare(o.label))}function o({searchValue:e,label:o}){const a=o.toLowerCase().indexOf(e.toLowerCase());return[a,a+e.length-1]}export{o as findStartAndEndIndexOfSearch,e as getFilteredAutoCompleteOptions};
@@ -1 +1 @@
1
- import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as r}from"react";import{Typography as o,Icon as i,Menu as n}from"@equinor/eds-core-react";import{arrow_drop_up as a,arrow_drop_down as m}from"@equinor/eds-icons";import{ButtonWithMenu as l}from"./ButtonWithMenu.js";function c({values:c,items:u,onQuickFilter:s,label:p="Quick filter"}){const[f,d]=r(!1);return e(l,{onOpenChange:d,menuItems:Object.keys(u).flatMap((e=>u[e].map((r=>t(n.Item,{active:c[e]?.some((e=>e.value===r.value)),onClick:()=>s(e,r),children:r.label},r.label))))),children:[t(o,{as:"span",variant:"button",group:"navigation",children:p}),t(i,{data:f?a:m})]})}export{c as QuickFilter};
1
+ import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as r}from"react";import{Typography as o,Icon as i,Menu as n}from"@equinor/eds-core-react";import{arrow_drop_up as a,arrow_drop_down as m}from"@equinor/eds-icons";import{ButtonWithMenu as l}from"./ButtonWithMenu.js";function c({values:c,items:u,onQuickFilter:s,label:p="Quick filter"}){const[f,d]=r(!1);return e(l,{onOpenChange:d,menuItems:Object.keys(u).flatMap(e=>u[e].map(r=>t(n.Item,{active:c[e]?.some(e=>e.value===r.value),onClick:()=>s(e,r),children:r.label},r.label))),children:[t(o,{as:"span",variant:"button",group:"navigation",children:p}),t(i,{data:f?a:m})]})}export{c as QuickFilter};
@@ -1,5 +1,5 @@
1
- import{jsxs as r,jsx as o}from"react/jsx-runtime";import{Menu as t,Typography as e,Icon as i}from"@equinor/eds-core-react";import{sort as s,radio_button_selected as m,radio_button_unselected as a}from"@equinor/eds-icons";import{ButtonWithMenu as n}from"./ButtonWithMenu.js";import"react";import"../../molecules/RichTextEditor/custom-extensions/AmplifyKit.js";import"../../molecules/RichTextEditor/RichTextEditor.types.js";import"../../_virtual/lodash.js";import"../TopBar/Notifications/NotificationProvider.js";import"../../providers/AuthProvider/AuthProvider.js";import"../../providers/ReleaseNotesProvider.js";import"../../providers/SideBarProvider.js";import"../../providers/SnackbarProvider/SnackbarProvider.js";import"../../providers/StepperProvider.js";import"../../providers/TableOfContentsProvider.js";import"../../providers/ThemeProvider/ThemeProvider.js";import"react-router-dom";import"@tanstack/react-query";import"@equinor/subsurface-app-management";import"../../atoms/utils/auth_environment.js";import{colors as p}from"../../atoms/style/colors.js";import"../../atoms/enums/Errors.js";import"../../atoms/enums/Environment.js";import"../../atoms/enums/Theme.js";import"../../atoms/enums/SpacingsMode.js";import"html2canvas";import"proj4";import d from"styled-components";const c=d(t.Item)`
1
+ import{jsxs as r,jsx as o}from"react/jsx-runtime";import{Menu as t,Typography as e,Icon as i}from"@equinor/eds-core-react";import{sort as s,radio_button_selected as m,radio_button_unselected as a}from"@equinor/eds-icons";import{ButtonWithMenu as n}from"./ButtonWithMenu.js";import"react";import"../../molecules/RichTextEditor/custom-extensions/AmplifyKit.js";import"../../molecules/RichTextEditor/RichTextEditor.types.js";import"../../_virtual/lodash.js";import"../TopBar/Notifications/NotificationProvider.js";import"../../providers/AuthProvider/AuthProvider.js";import"../../providers/ReleaseNotesProvider.js";import"../../providers/SideBarProvider.js";import"../../providers/SnackbarProvider/SnackbarProvider.js";import"../../providers/StepperProvider.js";import"../../providers/TableOfContentsProvider.js";import"../../providers/ThemeProvider/ThemeProvider.js";import"@tanstack/react-query";import"@equinor/subsurface-app-management";import"../../atoms/utils/auth_environment.js";import{colors as p}from"../../atoms/style/colors.js";import"../../atoms/enums/Errors.js";import"../../atoms/enums/Environment.js";import"../../atoms/enums/Theme.js";import"../../atoms/enums/SpacingsMode.js";import"html2canvas";import"proj4";import d from"styled-components";const c=d(t.Item)`
2
2
  > div {
3
3
  grid-template-columns: 1fr auto;
4
4
  }
5
- `;function u({value:t,onChange:d,items:u}){const l=u.find((r=>r.value===t));return r(n,{menuItems:u.map((e=>r(c,{onClick:()=>{(r=>{d(r)})(e.value)},children:[e.label,o(i,{color:e.value===t?p.interactive.primary__resting.rgba:p.text.static_icons__tertiary.rgba,data:e.value===t?m:a})]},e.label))),children:[r(e,{as:"span",variant:"button",group:"navigation",children:["Sort by ",l?.label]}),o(i,{data:s})]})}export{u as SortMenu};
5
+ `;function u({value:t,onChange:d,items:u}){const l=u.find(r=>r.value===t);return r(n,{menuItems:u.map(e=>r(c,{onClick:()=>{(r=>{d(r)})(e.value)},children:[e.label,o(i,{color:e.value===t?p.interactive.primary__resting.rgba:p.text.static_icons__tertiary.rgba,data:e.value===t?m:a})]},e.label)),children:[r(e,{as:"span",variant:"button",group:"navigation",children:["Sort by ",l?.label]}),o(i,{data:s})]})}export{u as SortMenu};
@@ -1 +1 @@
1
- import{useEffect as r}from"react";import"../../molecules/RichTextEditor/custom-extensions/AmplifyKit.js";import"../../molecules/RichTextEditor/RichTextEditor.types.js";import"../../_virtual/lodash.js";import"../TopBar/Notifications/NotificationProvider.js";import"../../providers/AuthProvider/AuthProvider.js";import"../../providers/ReleaseNotesProvider.js";import"../../providers/SideBarProvider.js";import"../../providers/SnackbarProvider/SnackbarProvider.js";import"../../providers/StepperProvider.js";import"../../providers/TableOfContentsProvider.js";import"../../providers/ThemeProvider/ThemeProvider.js";import"react-router-dom";import"@tanstack/react-query";import"@equinor/subsurface-app-management";import{environment as o}from"../../atoms/utils/auth_environment.js";import"../../atoms/style/colors.js";import"../../atoms/enums/Errors.js";import"../../atoms/enums/Environment.js";import"../../atoms/enums/Theme.js";import"../../atoms/enums/SpacingsMode.js";import"html2canvas";import"proj4";import"@equinor/eds-icons";const t=o.getAppName(import.meta.env.VITE_NAME),e=({title:o,children:e})=>(r((()=>{document.title!==o&&(document.title=`${t} - ${o}`)}),[o]),e);export{e as PageTitle};
1
+ import{useEffect as r}from"react";import"../../molecules/RichTextEditor/custom-extensions/AmplifyKit.js";import"../../molecules/RichTextEditor/RichTextEditor.types.js";import"../../_virtual/lodash.js";import"../TopBar/Notifications/NotificationProvider.js";import"../../providers/AuthProvider/AuthProvider.js";import"../../providers/ReleaseNotesProvider.js";import"../../providers/SideBarProvider.js";import"../../providers/SnackbarProvider/SnackbarProvider.js";import"../../providers/StepperProvider.js";import"../../providers/TableOfContentsProvider.js";import"../../providers/ThemeProvider/ThemeProvider.js";import"@tanstack/react-query";import"@equinor/subsurface-app-management";import{environment as o}from"../../atoms/utils/auth_environment.js";import"../../atoms/style/colors.js";import"../../atoms/enums/Errors.js";import"../../atoms/enums/Environment.js";import"../../atoms/enums/Theme.js";import"../../atoms/enums/SpacingsMode.js";import"html2canvas";import"proj4";import"@equinor/eds-icons";const t=o.getAppName(import.meta.env.VITE_NAME),e=({title:o,children:e})=>(r(()=>{document.title!==o&&(document.title=`${t} - ${o}`)},[o]),e);export{e as PageTitle};
@@ -7,4 +7,4 @@ import{jsxs as r,jsx as e}from"react/jsx-runtime";import{Icon as t}from"@equinor
7
7
  width: 10px !important;
8
8
  height: 10px !important;
9
9
  border-radius: 50%;
10
- `,d=({children:i,tags:a})=>r(l,{children:[r(n,{children:[e(t,{data:o}),"Release Note"]}),a?.map((t=>r(n,{children:[e(c,{style:{background:p[t]}}),t]},t))),i]});export{d as MetaTags};
10
+ `,d=({children:i,tags:a})=>r(l,{children:[r(n,{children:[e(t,{data:o}),"Release Note"]}),a?.map(t=>r(n,{children:[e(c,{style:{background:p[t]}}),t]},t)),i]});export{d as MetaTags};
@@ -1,20 +1,20 @@
1
- import{jsxs as e,jsx as o}from"react/jsx-runtime";import{forwardRef as t,useRef as r,useState as i}from"react";import{Typography as s}from"@equinor/eds-core-react";import{ReleaseNotesService as l}from"@equinor/subsurface-app-management";import{RELEASE_NOTE_RICH_TEXT_COLLAPSED_HEIGHT as m}from"./ReleaseNote.constants.js";import{timeToRead as a,usingReleaseNoteDate as n}from"./ReleaseNote.utils.js";import{ToggleExpanded as p}from"./ToggleExpanded.js";import"../../molecules/RichTextEditor/custom-extensions/AmplifyKit.js";import"../../molecules/RichTextEditor/RichTextEditor.types.js";import"../../_virtual/lodash.js";import"../TopBar/Notifications/NotificationProvider.js";import"../../providers/AuthProvider/AuthProvider.js";import"../../providers/ReleaseNotesProvider.js";import"../../providers/SideBarProvider.js";import"../../providers/SnackbarProvider/SnackbarProvider.js";import"../../providers/StepperProvider.js";import"../../providers/TableOfContentsProvider.js";import"../../providers/ThemeProvider/ThemeProvider.js";import"react-router-dom";import"@tanstack/react-query";import"../../atoms/utils/auth_environment.js";import{shape as c}from"../../atoms/style/index.js";import"../../atoms/enums/Errors.js";import"../../atoms/enums/Environment.js";import"../../atoms/enums/Theme.js";import"../../atoms/enums/SpacingsMode.js";import{formatDate as d}from"../../atoms/utils/date.js";import"html2canvas";import"proj4";import{getImagesFromRichText as u}from"../../atoms/utils/richtext.js";import"@equinor/eds-icons";import"../../molecules/AnimatedCheckmark/AnimatedCheckmark.styles.js";import"../../molecules/ApplicationIcon/ApplicationIcon.js";import"../../molecules/Badge/Badge.styles.js";import"../../molecules/Banner/Banner.styles.js";import"../../molecules/Button/Button.js";import"../../molecules/Chip/Chip.js";import"../../molecules/ContentMenu/ContentMenu.styles.js";import"../../molecules/DatePicker/DatePicker.js";import"../../molecules/Dialog/Dialog.js";import"../../molecules/EquinorLogo/EquinorLogo.js";import"../../molecules/FileProgress/CompactFileProgress.styles.js";import"../../molecules/FileProgress/RegularFileProgress.styles.js";import"../../molecules/FileUploadArea/FileUploadArea.js";import"../../molecules/FullPageSpinner/FullPageSpinner.js";import"../../molecules/InfoElement/InfoElement.js";import"../../molecules/OptionalTooltip/OptionalTooltip.js";import"../../molecules/ProfileAvatar/ProfileAvatar.js";import{RichTextDisplay as j}from"../../molecules/RichTextDisplay/RichTextDisplay.js";import"../../molecules/RichTextEditor/MenuBar/MenuBar.js";import"@tiptap/react";import"../../molecules/RichTextEditor/RichTextEditor.styles.js";import{colors as h}from"../../atoms/style/colors.js";import"../../molecules/Tabs/Tabs.js";import"../../molecules/RichTextEditor/MenuBar/MenuBar.styles.js";import"../../molecules/RichTextEditor/MenuBar/MenuButton.js";import"../../molecules/Search/Search.js";import"../../molecules/Sieve/Sieve.styles.js";import"../../molecules/SingleFilterMenu/SingleFilterMenu.js";import"../../molecules/Skeleton/SkeletonBase/SkeletonBase.js";import"../../molecules/Skeleton/Skeleton.styles.js";import"../../molecules/Stepper/Stepper.js";import"../../molecules/OptionDrawer/OptionDrawer.js";import"../../molecules/Select/Select.styles.js";import{spacings as g}from"../../atoms/style/spacings.js";import"../../molecules/ListItem/ListItem.js";import"../../molecules/SelectionControls/Checkbox/Checkbox.js";import"../../molecules/SelectionControls/Radio/Radio.js";import"../../molecules/SelectionControls/Switch/Switch.js";import"../../molecules/Waves/Waves.styles.js";import{motion as v}from"framer-motion";import{MetaTags as f}from"./MetaTags.js";import y from"styled-components";const x=y.div`
1
+ import{jsxs as e,jsx as o}from"react/jsx-runtime";import{forwardRef as t,useRef as r,useState as i}from"react";import{Typography as s}from"@equinor/eds-core-react";import{ReleaseNotesService as l}from"@equinor/subsurface-app-management";import{RELEASE_NOTE_RICH_TEXT_COLLAPSED_HEIGHT as m}from"./ReleaseNote.constants.js";import{timeToRead as a,usingReleaseNoteDate as n}from"./ReleaseNote.utils.js";import{ToggleExpanded as p}from"./ToggleExpanded.js";import"../../molecules/RichTextEditor/custom-extensions/AmplifyKit.js";import"../../molecules/RichTextEditor/RichTextEditor.types.js";import"../../_virtual/lodash.js";import"../TopBar/Notifications/NotificationProvider.js";import"../../providers/AuthProvider/AuthProvider.js";import"../../providers/ReleaseNotesProvider.js";import"../../providers/SideBarProvider.js";import"../../providers/SnackbarProvider/SnackbarProvider.js";import"../../providers/StepperProvider.js";import"../../providers/TableOfContentsProvider.js";import"../../providers/ThemeProvider/ThemeProvider.js";import"@tanstack/react-query";import"../../atoms/utils/auth_environment.js";import{shape as c}from"../../atoms/style/index.js";import"../../atoms/enums/Errors.js";import"../../atoms/enums/Environment.js";import"../../atoms/enums/Theme.js";import"../../atoms/enums/SpacingsMode.js";import{formatDate as d}from"../../atoms/utils/date.js";import"html2canvas";import"proj4";import{getImagesFromRichText as u}from"../../atoms/utils/richtext.js";import"@equinor/eds-icons";import"../../molecules/AnimatedCheckmark/AnimatedCheckmark.styles.js";import"../../molecules/ApplicationIcon/ApplicationIcon.js";import"../../molecules/Badge/Badge.styles.js";import"../../molecules/Banner/Banner.styles.js";import"../../molecules/Button/Button.js";import"../../molecules/Chip/Chip.js";import"../../molecules/ContentMenu/ContentMenu.styles.js";import"../../molecules/DatePicker/DatePicker.js";import"../../molecules/DateRangePicker/DateRangePicker.js";import"../../molecules/Dialog/Dialog.js";import"../../molecules/EquinorLogo/EquinorLogo.js";import"../../molecules/FileProgress/CompactFileProgress.styles.js";import"../../molecules/FileProgress/RegularFileProgress.styles.js";import"react-dropzone";import"../../molecules/FileUploadArea/FileUploadArea.styles.js";import"../../molecules/FullPageSpinner/FullPageSpinner.js";import"../../molecules/InfoElement/InfoElement.js";import"../../molecules/OptionalTooltip/OptionalTooltip.js";import"../../molecules/ProfileAvatar/ProfileAvatar.js";import{RichTextDisplay as j}from"../../molecules/RichTextDisplay/RichTextDisplay.js";import"../../molecules/RichTextEditor/MenuBar/MenuBar.js";import"@tiptap/react";import"../../molecules/RichTextEditor/RichTextEditor.styles.js";import{colors as g}from"../../atoms/style/colors.js";import"../../molecules/Tabs/Tabs.js";import"../../molecules/RichTextEditor/MenuBar/MenuBar.styles.js";import"../../molecules/RichTextEditor/MenuBar/MenuButton.js";import"../../molecules/Search/Search.js";import"../../molecules/Sieve/Sieve.styles.js";import"../../molecules/SingleFilterMenu/SingleFilterMenu.js";import"../../molecules/Skeleton/SkeletonBase/SkeletonBase.js";import"../../molecules/Skeleton/Skeleton.styles.js";import"../../molecules/Stepper/Stepper.js";import"../../molecules/OptionDrawer/OptionDrawer.js";import"../../molecules/Select/Select.styles.js";import{spacings as h}from"../../atoms/style/spacings.js";import"../../molecules/Skeleton/SkeletonField.js";import"../../molecules/ListItem/ListItem.js";import"../../molecules/SelectionControls/Checkbox/Checkbox.js";import"../../molecules/SelectionControls/Radio/Radio.js";import"../../molecules/SelectionControls/Switch/Switch.js";import"../../molecules/Waves/Waves.styles.js";import{motion as v}from"framer-motion";import{MetaTags as f}from"./MetaTags.js";import y from"styled-components";const x=y.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
- padding: ${g.medium};
4
+ padding: ${h.medium};
5
5
  position: relative;
6
- background: ${h.ui.background__default.rgba};
7
- border: 1px solid ${h.ui.background__heavy.rgba};
6
+ background: ${g.ui.background__default.rgba};
7
+ border: 1px solid ${g.ui.background__heavy.rgba};
8
8
  border-radius: ${c.corners.borderRadius};
9
9
  min-width: 800px;
10
10
  width: 100%;
11
11
  overflow: hidden;
12
12
  > h4 {
13
- margin-top: ${g.large};
14
- margin-bottom: ${g.medium};
13
+ margin-top: ${h.large};
14
+ margin-bottom: ${h.medium};
15
15
  }
16
16
  padding-bottom: calc(
17
- 68px + ${g.medium}
17
+ 68px + ${h.medium}
18
18
  ); // Space for the expand button
19
19
  `,S=y.header`
20
20
  display: flex;
@@ -22,6 +22,6 @@ import{jsxs as e,jsx as o}from"react/jsx-runtime";import{forwardRef as t,useRef
22
22
  align-items: center;
23
23
  `,b=y.section`
24
24
  display: flex;
25
- gap: ${g.medium};
25
+ gap: ${h.medium};
26
26
  align-items: center;
27
- `,T=t((({applicationName:t,releaseDate:c,createdDate:y,tags:T,version:P,title:R,body:k,actionMenu:B,expanded:E=!1},C)=>{const M=n({releaseDate:c,createdDate:y}),D=r(E?"auto":m),[_,A]=i(E),[w,F]=i(u(k).length>0),N=r(new ResizeObserver((e=>{e.at(0)&&e[0].target.scrollHeight>m&&F(!0)})));return e(x,{ref:C,style:{paddingBottom:_?g.medium:void 0},children:[e(S,{children:[e(b,{children:[o(s,{variant:"caption",color:h.text.static_icons__secondary.rgba,children:t}),e(s,{variant:"overline",color:h.text.static_icons__tertiary.rgba,children:[d(M),P?` ・ ${P}`:""," ・ ",a(k)]})]}),o(f,{tags:T,children:B})]}),o(s,{variant:"h4",children:R}),o(v.div,{ref:e=>{e&&N.current.observe(e)},initial:{height:D.current},animate:{height:_?"auto":m},style:{overflow:_?"auto":void 0},children:o(j,{value:k,onImageRead:l.getReleaseNoteImage,padding:"none"})}),w&&!E&&o(p,{expanded:_,onToggleExpanded:()=>{A((e=>!e))}})]})}));T.displayName="ReleaseNote";export{T as ReleaseNote};
27
+ `,k=t(({applicationName:t,releaseDate:c,createdDate:y,tags:k,version:P,title:R,body:T,actionMenu:B,expanded:E=!1},D)=>{const C=n({releaseDate:c,createdDate:y}),M=r(E?"auto":m),[_,A]=i(E),[F,w]=i(u(T).length>0),N=r(new ResizeObserver(e=>{e.at(0)&&e[0].target.scrollHeight>m&&w(!0)}));return e(x,{ref:D,style:{paddingBottom:_?h.medium:void 0},children:[e(S,{children:[e(b,{children:[o(s,{variant:"caption",color:g.text.static_icons__secondary.rgba,children:t}),e(s,{variant:"overline",color:g.text.static_icons__tertiary.rgba,children:[d(C),P?` ・ ${P}`:""," ・ ",a(T)]})]}),o(f,{tags:k,children:B})]}),o(s,{variant:"h4",children:R}),o(v.div,{ref:e=>{e&&N.current.observe(e)},initial:{height:M.current},animate:{height:_?"auto":m},style:{overflow:_?"auto":void 0},children:o(j,{value:T,onImageRead:l.getReleaseNoteImage,padding:"none"})}),F&&!E&&o(p,{expanded:_,onToggleExpanded:()=>{A(e=>!e)}})]})});k.displayName="ReleaseNote";export{k as ReleaseNote};