2021-08-04 23:31:54 +00:00
|
|
|
//
|
|
|
|
// Copyright © 2020 Anticrm Platform Contributors.
|
|
|
|
//
|
|
|
|
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License. You may
|
|
|
|
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
//
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
|
|
|
//
|
|
|
|
|
2022-09-21 08:08:25 +00:00
|
|
|
import { addLocation, addStringsLoader } from '@hcengineering/platform'
|
2022-06-22 13:27:10 +00:00
|
|
|
import { SvelteComponent } from 'svelte'
|
2022-10-04 15:49:11 +00:00
|
|
|
import { readable, writable } from 'svelte/store'
|
2021-08-04 23:31:54 +00:00
|
|
|
import Root from './components/internal/Root.svelte'
|
2022-06-23 08:54:58 +00:00
|
|
|
import { uiId, uis } from './plugin'
|
2022-10-04 15:49:11 +00:00
|
|
|
import type { DeviceOptions } from './types'
|
2021-08-04 23:31:54 +00:00
|
|
|
|
2022-04-29 05:27:17 +00:00
|
|
|
export type {
|
|
|
|
AnyComponent,
|
|
|
|
AnySvelteComponent,
|
|
|
|
Action,
|
|
|
|
LabelAndProps,
|
2022-05-11 17:17:38 +00:00
|
|
|
ListItem,
|
2022-04-29 05:27:17 +00:00
|
|
|
TooltipAlignment,
|
|
|
|
AnySvelteComponentWithProps,
|
|
|
|
Location,
|
|
|
|
PopupAlignment,
|
2022-05-04 08:08:12 +00:00
|
|
|
PopupPositionElement,
|
2022-04-29 05:27:17 +00:00
|
|
|
ButtonKind,
|
2022-05-16 11:41:22 +00:00
|
|
|
ButtonSize,
|
2022-06-02 02:29:09 +00:00
|
|
|
IconSize,
|
2022-10-04 15:49:11 +00:00
|
|
|
TabItem,
|
|
|
|
DeviceOptions
|
2022-04-29 05:27:17 +00:00
|
|
|
} from './types'
|
2021-08-04 23:31:54 +00:00
|
|
|
// export { applicationShortcutKey } from './utils'
|
2022-01-11 09:23:17 +00:00
|
|
|
export { getCurrentLocation, locationToUrl, navigate, location } from './location'
|
2021-08-04 23:31:54 +00:00
|
|
|
|
|
|
|
export { default as EditBox } from './components/EditBox.svelte'
|
|
|
|
export { default as Label } from './components/Label.svelte'
|
|
|
|
export { default as Button } from './components/Button.svelte'
|
2021-09-22 11:15:25 +00:00
|
|
|
export { default as Status } from './components/Status.svelte'
|
2021-08-04 23:31:54 +00:00
|
|
|
export { default as Component } from './components/Component.svelte'
|
|
|
|
export { default as Icon } from './components/Icon.svelte'
|
|
|
|
export { default as ActionIcon } from './components/ActionIcon.svelte'
|
|
|
|
export { default as Toggle } from './components/Toggle.svelte'
|
|
|
|
export { default as Dialog } from './components/Dialog.svelte'
|
|
|
|
export { default as ToggleWithLabel } from './components/ToggleWithLabel.svelte'
|
2022-04-02 04:06:48 +00:00
|
|
|
export { default as MiniToggle } from './components/MiniToggle.svelte'
|
2021-09-09 07:34:51 +00:00
|
|
|
export { default as TooltipInstance } from './components/TooltipInstance.svelte'
|
2021-08-04 23:31:54 +00:00
|
|
|
export { default as CheckBox } from './components/CheckBox.svelte'
|
|
|
|
export { default as Progress } from './components/Progress.svelte'
|
2022-06-08 03:11:18 +00:00
|
|
|
export { default as ProgressCircle } from './components/ProgressCircle.svelte'
|
2021-08-04 23:31:54 +00:00
|
|
|
export { default as Tabs } from './components/Tabs.svelte'
|
2023-05-04 12:34:51 +00:00
|
|
|
export { default as TabsControl } from './components/TabsControl.svelte'
|
2021-08-04 23:31:54 +00:00
|
|
|
export { default as ScrollBox } from './components/ScrollBox.svelte'
|
|
|
|
export { default as PopupMenu } from './components/PopupMenu.svelte'
|
2022-04-09 03:46:40 +00:00
|
|
|
export { default as SelectPopup } from './components/SelectPopup.svelte'
|
2022-04-13 04:25:59 +00:00
|
|
|
export { default as ColorPopup } from './components/ColorPopup.svelte'
|
2021-08-04 23:31:54 +00:00
|
|
|
export { default as TextArea } from './components/TextArea.svelte'
|
2022-05-12 08:00:58 +00:00
|
|
|
export { default as TextAreaEditor } from './components/TextAreaEditor.svelte'
|
2021-08-04 23:31:54 +00:00
|
|
|
export { default as Section } from './components/Section.svelte'
|
2022-03-29 14:29:53 +00:00
|
|
|
export { default as DatePicker } from './components/calendar/DatePicker.svelte'
|
2022-04-07 10:02:01 +00:00
|
|
|
export { default as DateRangePicker } from './components/calendar/DateRangePicker.svelte'
|
2022-03-29 14:29:53 +00:00
|
|
|
export { default as DatePopup } from './components/calendar/DatePopup.svelte'
|
2022-05-25 08:17:53 +00:00
|
|
|
export { default as DateRangePopup } from './components/calendar/DateRangePopup.svelte'
|
2022-03-29 14:29:53 +00:00
|
|
|
export { default as TimePopup } from './components/calendar/TimePopup.svelte'
|
2022-04-07 10:02:01 +00:00
|
|
|
export { default as DateRangePresenter } from './components/calendar/DateRangePresenter.svelte'
|
|
|
|
export { default as DateTimeRangePresenter } from './components/calendar/DateTimeRangePresenter.svelte'
|
2022-03-29 14:29:53 +00:00
|
|
|
export { default as DatePresenter } from './components/calendar/DatePresenter.svelte'
|
2023-04-21 10:29:47 +00:00
|
|
|
export { default as DueDatePresenter } from './components/calendar/DueDatePresenter.svelte'
|
2022-03-29 14:29:53 +00:00
|
|
|
export { default as DateTimePresenter } from './components/calendar/DateTimePresenter.svelte'
|
2021-08-05 16:27:51 +00:00
|
|
|
export { default as StylishEdit } from './components/StylishEdit.svelte'
|
2021-08-04 23:31:54 +00:00
|
|
|
export { default as Grid } from './components/Grid.svelte'
|
|
|
|
export { default as Row } from './components/Row.svelte'
|
2021-09-11 12:10:17 +00:00
|
|
|
// export { default as CheckBoxWithLabel } from './components/CheckBoxWithLabel.svelte'
|
|
|
|
// export { default as CheckBoxList } from './components/CheckBoxList.svelte.txt'
|
2021-08-06 06:49:54 +00:00
|
|
|
export { default as EditWithIcon } from './components/EditWithIcon.svelte'
|
2022-01-19 09:05:40 +00:00
|
|
|
export { default as SearchEdit } from './components/SearchEdit.svelte'
|
2021-08-10 10:53:24 +00:00
|
|
|
export { default as Loading } from './components/Loading.svelte'
|
2021-09-15 17:03:34 +00:00
|
|
|
export { default as Spinner } from './components/Spinner.svelte'
|
2021-08-19 12:54:06 +00:00
|
|
|
export { default as Popup } from './components/Popup.svelte'
|
2021-08-28 10:06:28 +00:00
|
|
|
export { default as CircleButton } from './components/CircleButton.svelte'
|
2021-08-30 17:19:58 +00:00
|
|
|
export { default as Link } from './components/Link.svelte'
|
2023-04-27 12:28:12 +00:00
|
|
|
export { default as LinkWrapper } from './components/LinkWrapper.svelte'
|
2023-03-27 06:16:20 +00:00
|
|
|
export { default as Like } from './components/Like.svelte'
|
2021-09-11 13:18:54 +00:00
|
|
|
export { default as TimeSince } from './components/TimeSince.svelte'
|
2021-11-02 08:45:08 +00:00
|
|
|
export { default as Dropdown } from './components/Dropdown.svelte'
|
2022-03-17 09:39:57 +00:00
|
|
|
export { default as DropdownPopup } from './components/DropdownPopup.svelte'
|
2021-12-23 09:03:35 +00:00
|
|
|
export { default as DropdownLabels } from './components/DropdownLabels.svelte'
|
2023-03-22 02:48:57 +00:00
|
|
|
export { default as DropdownLabelsPopup } from './components/DropdownLabelsPopup.svelte'
|
2022-04-23 02:40:38 +00:00
|
|
|
export { default as DropdownLabelsIntl } from './components/DropdownLabelsIntl.svelte'
|
2022-06-10 18:25:13 +00:00
|
|
|
export { default as DropdownRecord } from './components/DropdownRecord.svelte'
|
2021-12-21 09:12:20 +00:00
|
|
|
export { default as ShowMore } from './components/ShowMore.svelte'
|
2022-01-12 09:01:54 +00:00
|
|
|
export { default as Menu } from './components/Menu.svelte'
|
2022-06-16 01:25:49 +00:00
|
|
|
export { default as Submenu } from './components/Submenu.svelte'
|
2022-03-26 17:34:06 +00:00
|
|
|
export { default as TimeShiftPicker } from './components/TimeShiftPicker.svelte'
|
2022-01-12 09:01:54 +00:00
|
|
|
export { default as ErrorPresenter } from './components/ErrorPresenter.svelte'
|
2022-01-21 09:07:24 +00:00
|
|
|
export { default as Scroller } from './components/Scroller.svelte'
|
2022-11-04 06:07:27 +00:00
|
|
|
export { default as ScrollerBar } from './components/ScrollerBar.svelte'
|
2022-06-02 02:29:09 +00:00
|
|
|
export { default as TabList } from './components/TabList.svelte'
|
2023-01-17 01:07:05 +00:00
|
|
|
export { default as Chevron } from './components/Chevron.svelte'
|
2023-01-24 13:43:06 +00:00
|
|
|
export { default as Timeline } from './components/Timeline.svelte'
|
2021-08-04 23:31:54 +00:00
|
|
|
|
|
|
|
export { default as IconAdd } from './components/icons/Add.svelte'
|
2023-02-03 05:47:25 +00:00
|
|
|
export { default as IconStart } from './components/icons/Start.svelte'
|
|
|
|
export { default as IconStop } from './components/icons/Stop.svelte'
|
2022-01-12 09:01:54 +00:00
|
|
|
export { default as IconBack } from './components/icons/Back.svelte'
|
|
|
|
export { default as IconForward } from './components/icons/Forward.svelte'
|
2021-08-30 07:17:26 +00:00
|
|
|
export { default as IconClose } from './components/icons/Close.svelte'
|
2021-08-04 23:31:54 +00:00
|
|
|
export { default as IconSearch } from './components/icons/Search.svelte'
|
2022-01-12 09:01:54 +00:00
|
|
|
export { default as IconCalendar } from './components/icons/Calendar.svelte'
|
2021-09-03 15:39:10 +00:00
|
|
|
export { default as IconFolder } from './components/icons/Folder.svelte'
|
2021-09-06 16:00:43 +00:00
|
|
|
export { default as IconMoreH } from './components/icons/MoreH.svelte'
|
2021-12-22 09:03:28 +00:00
|
|
|
export { default as IconMoreV } from './components/icons/MoreV.svelte'
|
2021-09-06 16:00:43 +00:00
|
|
|
export { default as IconFile } from './components/icons/File.svelte'
|
2021-09-07 07:48:41 +00:00
|
|
|
export { default as IconAttachment } from './components/icons/Attachment.svelte'
|
|
|
|
export { default as IconThread } from './components/icons/Thread.svelte'
|
2021-09-11 18:33:51 +00:00
|
|
|
export { default as IconExpand } from './components/icons/Expand.svelte'
|
|
|
|
export { default as IconActivity } from './components/icons/Activity.svelte'
|
2021-10-06 09:57:44 +00:00
|
|
|
export { default as IconUp } from './components/icons/Up.svelte'
|
|
|
|
export { default as IconDown } from './components/icons/Down.svelte'
|
2022-04-23 03:51:42 +00:00
|
|
|
export { default as IconUpOutline } from './components/icons/UpOutline.svelte'
|
|
|
|
export { default as IconDownOutline } from './components/icons/DownOutline.svelte'
|
2021-12-02 15:47:34 +00:00
|
|
|
export { default as IconShare } from './components/icons/Share.svelte'
|
2021-11-29 11:11:27 +00:00
|
|
|
export { default as IconDelete } from './components/icons/Delete.svelte'
|
2021-11-03 13:01:21 +00:00
|
|
|
export { default as IconEdit } from './components/icons/Edit.svelte'
|
2021-11-26 11:09:46 +00:00
|
|
|
export { default as IconInfo } from './components/icons/Info.svelte'
|
2021-12-23 09:03:35 +00:00
|
|
|
export { default as IconBlueCheck } from './components/icons/BlueCheck.svelte'
|
2022-02-07 09:21:32 +00:00
|
|
|
export { default as IconCheck } from './components/icons/Check.svelte'
|
2023-01-12 15:50:41 +00:00
|
|
|
export { default as IconCheckAll } from './components/icons/CheckAll.svelte'
|
2022-01-12 09:01:54 +00:00
|
|
|
export { default as IconArrowLeft } from './components/icons/ArrowLeft.svelte'
|
2022-05-03 16:04:21 +00:00
|
|
|
export { default as IconArrowRight } from './components/icons/ArrowRight.svelte'
|
2022-04-07 10:02:01 +00:00
|
|
|
export { default as IconNavPrev } from './components/icons/NavPrev.svelte'
|
|
|
|
export { default as IconNavNext } from './components/icons/NavNext.svelte'
|
2022-04-14 06:07:07 +00:00
|
|
|
export { default as IconDPCalendar } from './components/calendar/icons/DPCalendar.svelte'
|
|
|
|
export { default as IconDPCalendarOver } from './components/calendar/icons/DPCalendarOver.svelte'
|
2022-04-20 06:06:05 +00:00
|
|
|
export { default as IconOptions } from './components/icons/Options.svelte'
|
2022-04-29 08:29:26 +00:00
|
|
|
export { default as IconDetails } from './components/icons/Details.svelte'
|
2022-08-21 07:03:00 +00:00
|
|
|
export { default as IconDetailsFilled } from './components/icons/DetailsFilled.svelte'
|
2022-05-21 11:25:49 +00:00
|
|
|
export { default as IconScale } from './components/icons/Scale.svelte'
|
|
|
|
export { default as IconScaleFull } from './components/icons/ScaleFull.svelte'
|
2022-09-14 04:53:48 +00:00
|
|
|
export { default as IconOpen } from './components/icons/Open.svelte'
|
2022-10-31 19:08:57 +00:00
|
|
|
export { default as IconCheckCircle } from './components/icons/CheckCircle.svelte'
|
2022-11-01 15:48:20 +00:00
|
|
|
export { default as IconColStar } from './components/icons/ColStar.svelte'
|
2022-12-20 04:27:02 +00:00
|
|
|
export { default as IconMinWidth } from './components/icons/MinWidth.svelte'
|
|
|
|
export { default as IconMaxWidth } from './components/icons/MaxWidth.svelte'
|
2023-02-17 15:16:36 +00:00
|
|
|
export { default as IconMixin } from './components/icons/Mixin.svelte'
|
2023-03-23 02:43:51 +00:00
|
|
|
export { default as IconCircles } from './components/icons/Circles.svelte'
|
2023-03-27 06:16:20 +00:00
|
|
|
export { default as IconLike } from './components/icons/Like.svelte'
|
2023-04-23 17:37:24 +00:00
|
|
|
export { default as IconCollapseArrow } from './components/icons/CollapseArrow.svelte'
|
2023-05-04 12:34:51 +00:00
|
|
|
export { default as IconEmoji } from './components/icons/Emoji.svelte'
|
|
|
|
export { default as IconObjects } from './components/icons/Objects.svelte'
|
2021-08-04 23:31:54 +00:00
|
|
|
|
2022-02-04 09:03:24 +00:00
|
|
|
export { default as PanelInstance } from './components/PanelInstance.svelte'
|
2022-04-05 04:15:14 +00:00
|
|
|
export { default as Panel } from './components/Panel.svelte'
|
2022-02-04 09:03:24 +00:00
|
|
|
|
2022-05-12 04:10:52 +00:00
|
|
|
export { default as MonthCalendar } from './components/calendar/MonthCalendar.svelte'
|
|
|
|
export { default as YearCalendar } from './components/calendar/YearCalendar.svelte'
|
|
|
|
export { default as WeekCalendar } from './components/calendar/WeekCalendar.svelte'
|
|
|
|
|
|
|
|
export { default as FocusHandler } from './components/FocusHandler.svelte'
|
|
|
|
export { default as ListView } from './components/ListView.svelte'
|
2022-05-31 14:07:16 +00:00
|
|
|
export { default as ToggleButton } from './components/ToggleButton.svelte'
|
2022-06-02 16:57:07 +00:00
|
|
|
export { default as ExpandCollapse } from './components/ExpandCollapse.svelte'
|
2023-01-20 07:45:43 +00:00
|
|
|
export { default as BooleanIcon } from './components/BooleanIcon.svelte'
|
2022-12-16 06:35:51 +00:00
|
|
|
export { default as Expandable } from './components/Expandable.svelte'
|
2022-07-05 05:38:19 +00:00
|
|
|
export { default as BarDashboard } from './components/BarDashboard.svelte'
|
2022-10-31 19:08:57 +00:00
|
|
|
export { default as Notifications } from './components/notifications/Notifications.svelte'
|
|
|
|
export { default as notificationsStore } from './components/notifications/store'
|
|
|
|
export { NotificationPosition } from './components/notifications/NotificationPosition'
|
|
|
|
export { NotificationSeverity } from './components/notifications/NotificationSeverity'
|
|
|
|
export { Notification } from './components/notifications/Notification'
|
2023-01-31 17:15:20 +00:00
|
|
|
export { default as Wizard } from './components/wizard/Wizard.svelte'
|
2023-02-27 06:55:25 +00:00
|
|
|
export { default as StepsDialog } from './components/StepsDialog.svelte'
|
2023-05-04 12:34:51 +00:00
|
|
|
export { default as EmojiPopup } from './components/EmojiPopup.svelte'
|
|
|
|
export { default as IconWithEmojii } from './components/IconWithEmojii.svelte'
|
2022-05-12 04:10:52 +00:00
|
|
|
|
|
|
|
export * from './types'
|
|
|
|
export * from './location'
|
2021-08-24 17:06:19 +00:00
|
|
|
export * from './utils'
|
2022-02-04 09:03:24 +00:00
|
|
|
export * from './popups'
|
|
|
|
export * from './tooltips'
|
|
|
|
export * from './panelup'
|
2022-04-14 06:07:07 +00:00
|
|
|
export * from './components/calendar/internal/DateUtils'
|
2022-05-12 04:10:52 +00:00
|
|
|
export * from './colors'
|
|
|
|
export * from './focus'
|
2022-06-27 14:42:23 +00:00
|
|
|
export * from './resize'
|
2021-08-24 17:06:19 +00:00
|
|
|
|
2021-08-04 23:31:54 +00:00
|
|
|
export function createApp (target: HTMLElement): SvelteComponent {
|
|
|
|
return new Root({ target })
|
|
|
|
}
|
|
|
|
|
2022-01-11 09:23:17 +00:00
|
|
|
export const ticker = readable(Date.now(), (set) => {
|
|
|
|
setInterval(() => {
|
2021-12-30 09:04:32 +00:00
|
|
|
set(Date.now())
|
|
|
|
}, 10000)
|
2021-09-11 13:18:54 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
addStringsLoader(uiId, async (lang: string) => {
|
|
|
|
return await import(`../lang/${lang}.json`)
|
|
|
|
})
|
2021-12-13 09:05:46 +00:00
|
|
|
|
2022-04-01 05:57:22 +00:00
|
|
|
addLocation(uiId, async () => ({ default: async () => ({}) }))
|
|
|
|
|
2022-10-04 15:49:11 +00:00
|
|
|
export const deviceOptionsStore = writable<DeviceOptions>({
|
|
|
|
docWidth: 0,
|
|
|
|
docHeight: 0,
|
|
|
|
isPortrait: false,
|
2022-10-24 10:26:56 +00:00
|
|
|
isMobile: false,
|
2023-04-23 17:37:24 +00:00
|
|
|
fontSize: 0,
|
2022-10-24 10:26:56 +00:00
|
|
|
minWidth: false,
|
|
|
|
twoRows: false
|
2022-10-04 15:49:11 +00:00
|
|
|
})
|
|
|
|
|
2022-06-23 08:54:58 +00:00
|
|
|
export default uis
|