├── .gitattributes ├── .github └── workflows │ ├── build_test.yml │ └── release_xgen.yml ├── .gitignore ├── .gitmodules ├── .npmrc ├── .prettierignore ├── .prettierrc ├── LICENSE ├── README.md ├── asserts ├── components.png ├── why.png └── xgen.png ├── changelogs ├── v1.0.0.md ├── v1.1.0.md ├── v1.1.1.md ├── v1.1.2.md ├── v1.1.3.md ├── v1.2.0.md ├── v1.3.0.md └── v1.4.0.md ├── package.json ├── packages ├── actionflow │ ├── package.json │ ├── rollup.build.ts │ ├── rollup.common.ts │ ├── rollup.dev.ts │ ├── src │ │ ├── flow.ts │ │ ├── index.ts │ │ ├── types.ts │ │ └── utils │ │ │ ├── getTemplateValue.ts │ │ │ └── index.ts │ └── tsconfig.json ├── editorjs_plugins │ ├── package.json │ ├── rollup.build.ts │ ├── rollup.common.ts │ ├── rollup.dev.ts │ ├── src │ │ └── index.ts │ ├── tsconfig.json │ └── typings.d.ts ├── emittery │ ├── index.d.ts │ ├── index.js │ ├── license │ ├── maps.js │ ├── package.json │ └── readme.md ├── gantt │ ├── _package.json │ ├── rollup.build.ts │ ├── rollup.common.ts │ ├── rollup.dev.ts │ ├── src │ │ ├── components │ │ │ ├── Arrow │ │ │ │ ├── index.tsx │ │ │ │ ├── types.ts │ │ │ │ └── utils │ │ │ │ │ ├── drownPathAndTriangle.tsx │ │ │ │ │ ├── drownPathAndTriangleRTL.tsx │ │ │ │ │ └── index.ts │ │ │ ├── Calendar │ │ │ │ ├── components │ │ │ │ │ ├── Top │ │ │ │ │ │ ├── index.css │ │ │ │ │ │ └── index.tsx │ │ │ │ │ └── index.ts │ │ │ │ ├── hooks │ │ │ │ │ ├── index.ts │ │ │ │ │ └── useValues.tsx │ │ │ │ ├── index.css │ │ │ │ ├── index.tsx │ │ │ │ ├── types.ts │ │ │ │ └── utils │ │ │ │ │ ├── getCalendarValuesForDay.tsx │ │ │ │ │ ├── getCalendarValuesForHour.tsx │ │ │ │ │ ├── getCalendarValuesForMonth.tsx │ │ │ │ │ ├── getCalendarValuesForPartOfDay.tsx │ │ │ │ │ ├── getCalendarValuesForQuarterYear.tsx │ │ │ │ │ ├── getCalendarValuesForWeek.tsx │ │ │ │ │ ├── getCalendarValuesForYear.tsx │ │ │ │ │ └── index.ts │ │ │ ├── Gantt │ │ │ │ ├── hooks │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── useChangedTask.ts │ │ │ │ │ ├── useCurrent.ts │ │ │ │ │ ├── useFailedTask.ts │ │ │ │ │ ├── useTaskHeight.ts │ │ │ │ │ ├── useTaskSize.ts │ │ │ │ │ ├── useTasks.ts │ │ │ │ │ └── useWheel.ts │ │ │ │ ├── index.css │ │ │ │ ├── index.tsx │ │ │ │ └── types.ts │ │ │ ├── Grid │ │ │ │ ├── hooks │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── useRows.tsx │ │ │ │ │ └── useTicksToday.tsx │ │ │ │ ├── index.css │ │ │ │ ├── index.tsx │ │ │ │ └── types.ts │ │ │ ├── HorizontalScroll │ │ │ │ ├── index.css │ │ │ │ ├── index.tsx │ │ │ │ └── types.ts │ │ │ ├── Task │ │ │ │ ├── components │ │ │ │ │ ├── Content │ │ │ │ │ │ ├── hooks │ │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ │ ├── useHandleBarEventStart.ts │ │ │ │ │ │ │ ├── useStatus.ts │ │ │ │ │ │ │ └── useXStep.ts │ │ │ │ │ │ └── index.tsx │ │ │ │ │ └── index.ts │ │ │ │ ├── index.css │ │ │ │ ├── index.tsx │ │ │ │ └── types.ts │ │ │ ├── TaskItem │ │ │ │ ├── components │ │ │ │ │ ├── Bar │ │ │ │ │ │ ├── components │ │ │ │ │ │ │ ├── Date.tsx │ │ │ │ │ │ │ ├── Display.tsx │ │ │ │ │ │ │ ├── Progress.tsx │ │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ ├── index.css │ │ │ │ │ │ ├── index.tsx │ │ │ │ │ │ └── types.ts │ │ │ │ │ ├── Milestone │ │ │ │ │ │ ├── index.css │ │ │ │ │ │ └── index.tsx │ │ │ │ │ ├── Project │ │ │ │ │ │ ├── index.css │ │ │ │ │ │ └── index.tsx │ │ │ │ │ ├── SmallBar │ │ │ │ │ │ └── index.tsx │ │ │ │ │ └── index.ts │ │ │ │ ├── index.css │ │ │ │ ├── index.tsx │ │ │ │ └── types.ts │ │ │ ├── TaskList │ │ │ │ ├── components │ │ │ │ │ ├── Header │ │ │ │ │ │ ├── index.css │ │ │ │ │ │ └── index.tsx │ │ │ │ │ ├── Table │ │ │ │ │ │ ├── Row.tsx │ │ │ │ │ │ ├── index.css │ │ │ │ │ │ ├── index.tsx │ │ │ │ │ │ └── utils │ │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ │ └── toLocaleDateStringFactory.ts │ │ │ │ │ └── index.ts │ │ │ │ ├── index.tsx │ │ │ │ └── types.ts │ │ │ ├── Tooltip │ │ │ │ ├── components │ │ │ │ │ ├── Content │ │ │ │ │ │ ├── index.css │ │ │ │ │ │ └── index.tsx │ │ │ │ │ └── index.ts │ │ │ │ ├── hooks │ │ │ │ │ ├── index.ts │ │ │ │ │ └── useRelated.ts │ │ │ │ ├── index.css │ │ │ │ ├── index.tsx │ │ │ │ └── types.ts │ │ │ └── VerticalScroll │ │ │ │ ├── index.css │ │ │ │ ├── index.tsx │ │ │ │ └── types.ts │ │ ├── index.tsx │ │ ├── types │ │ │ ├── date.ts │ │ │ ├── display_option.ts │ │ │ ├── event_option.ts │ │ │ ├── index.ts │ │ │ ├── styling_option.ts │ │ │ └── task.ts │ │ └── utils │ │ │ ├── common │ │ │ ├── event.ts │ │ │ └── index.ts │ │ │ ├── date │ │ │ ├── addToDate.ts │ │ │ ├── ganttDateRange.ts │ │ │ ├── getCachedDateTimeFormat.ts │ │ │ ├── getDaysInMonth.ts │ │ │ ├── getLocalDayOfWeek.ts │ │ │ ├── getLocaleMonth.ts │ │ │ ├── getWeekNumberISO8601.ts │ │ │ ├── index.ts │ │ │ ├── seedDates.ts │ │ │ └── startOfDate.ts │ │ │ ├── index.ts │ │ │ └── task │ │ │ ├── condition.ts │ │ │ ├── convertToBar.ts │ │ │ ├── convertToBarTask.ts │ │ │ ├── convertToBarTasks.ts │ │ │ ├── convertToMilestone.ts │ │ │ ├── coordinate.ts │ │ │ ├── getTaskChildren.ts │ │ │ ├── handleTaskBySVGMouseEvent.ts │ │ │ ├── handleTaskBySVGMouseEventForBar.ts │ │ │ ├── handleTaskBySVGMouseEventForMilestone.ts │ │ │ ├── index.ts │ │ │ ├── isBarTask.ts │ │ │ ├── progress.ts │ │ │ ├── removeHiddenTasks.ts │ │ │ └── sortTasks.ts │ ├── tsconfig.json │ └── typings.d.ts ├── setup │ ├── package.json │ ├── src │ │ ├── app.config.ts │ │ ├── app.d.ts │ │ ├── app.html │ │ ├── components │ │ │ ├── DB │ │ │ │ ├── index.html │ │ │ │ ├── index.svelte │ │ │ │ └── index.ts │ │ │ ├── DynamicValue │ │ │ │ ├── index.html │ │ │ │ ├── index.less │ │ │ │ ├── index.svelte │ │ │ │ └── index.ts │ │ │ ├── Env │ │ │ │ ├── index.html │ │ │ │ ├── index.svelte │ │ │ │ └── index.ts │ │ │ ├── Header │ │ │ │ ├── index.html │ │ │ │ ├── index.less │ │ │ │ ├── index.svelte │ │ │ │ └── index.ts │ │ │ ├── Loading │ │ │ │ ├── index.html │ │ │ │ ├── index.less │ │ │ │ ├── index.svelte │ │ │ │ └── index.ts │ │ │ ├── Success │ │ │ │ ├── index.html │ │ │ │ ├── index.less │ │ │ │ ├── index.svelte │ │ │ │ └── index.ts │ │ │ └── Tabs │ │ │ │ ├── index.html │ │ │ │ ├── index.less │ │ │ │ ├── index.svelte │ │ │ │ └── index.ts │ │ ├── routes │ │ │ ├── +layout.svelte │ │ │ ├── +layout.ts │ │ │ ├── +page.svelte │ │ │ ├── global.less │ │ │ ├── index.html │ │ │ ├── index.ts │ │ │ └── styles.less │ │ ├── store │ │ │ └── index.ts │ │ └── utils.ts │ ├── static │ │ ├── atom.min.css │ │ ├── favicon.ico │ │ ├── font │ │ │ ├── Outfit-VariableFont_wght.ttf │ │ │ └── static │ │ │ │ ├── Outfit-Black.ttf │ │ │ │ ├── Outfit-Bold.ttf │ │ │ │ ├── Outfit-ExtraBold.ttf │ │ │ │ ├── Outfit-ExtraLight.ttf │ │ │ │ ├── Outfit-Light.ttf │ │ │ │ ├── Outfit-Medium.ttf │ │ │ │ ├── Outfit-Regular.ttf │ │ │ │ ├── Outfit-SemiBold.ttf │ │ │ │ └── Outfit-Thin.ttf │ │ ├── icon │ │ │ ├── fa_icon.woff │ │ │ ├── md_icon_filled.ttf │ │ │ └── md_icon_outline.otf │ │ ├── icon_font.css │ │ └── logo.svg │ ├── svelte.config.js │ ├── tsconfig.json │ └── vite.config.ts ├── storex │ ├── .npmignore │ ├── README.md │ ├── README.zh.md │ ├── __tests__ │ │ ├── index.test.ts │ │ └── tsconfig.json │ ├── jest.config.js │ ├── package.json │ ├── rollup.build.ts │ ├── rollup.common.ts │ ├── rollup.dev.ts │ ├── src │ │ ├── extends │ │ │ ├── expires.ts │ │ │ └── watch.ts │ │ ├── index.ts │ │ ├── proxy │ │ │ ├── object.ts │ │ │ ├── storage.ts │ │ │ └── transform.ts │ │ ├── shared.ts │ │ └── utils.ts │ └── tsconfig.json └── xgen │ ├── .env │ ├── .umirc.ts │ ├── _Component_ │ ├── index.less │ └── index.tsx │ ├── _Page_ │ └── index.tsx │ ├── actions │ ├── Common │ │ ├── closeModal.ts │ │ ├── confirm.ts │ │ ├── emitEvent.ts │ │ ├── historyBack.ts │ │ ├── historyPush.ts │ │ ├── index.ts │ │ ├── openModal.tsx │ │ ├── refetch.ts │ │ ├── reload.ts │ │ ├── reloadMenu.ts │ │ └── showMessage.ts │ ├── Form │ │ ├── delete.ts │ │ ├── find.ts │ │ ├── fullscreen.ts │ │ ├── index.ts │ │ └── submit.ts │ ├── Table │ │ ├── delete.ts │ │ ├── index.ts │ │ ├── save.ts │ │ └── search.ts │ ├── Yao │ │ ├── Service.ts │ │ ├── Studio.ts │ │ └── index.ts │ ├── index.ts │ ├── useAction.ts │ └── utils │ │ ├── createModalContainer.ts │ │ ├── handleActions.ts │ │ └── index.ts │ ├── app.tsx │ ├── assets │ └── images │ │ ├── 404.svg │ │ ├── dot.svg │ │ ├── feishu.png │ │ ├── image_login_left.svg │ │ └── logo.svg │ ├── build │ ├── after.ts │ ├── components.ts │ ├── config.ts │ ├── theme.ts │ └── tsconfig.json │ ├── components │ ├── base │ │ ├── Chart │ │ │ ├── index.tsx │ │ │ ├── model.ts │ │ │ └── services.ts │ │ ├── Dashboard │ │ │ ├── components │ │ │ │ ├── ChartRender.tsx │ │ │ │ ├── FormRender.tsx │ │ │ │ ├── FrameRender.tsx │ │ │ │ ├── Item.tsx │ │ │ │ ├── TableRender.tsx │ │ │ │ ├── ViewRender.tsx │ │ │ │ └── index.ts │ │ │ ├── index.tsx │ │ │ ├── model.ts │ │ │ ├── services.ts │ │ │ └── types.ts │ │ ├── Filter │ │ │ ├── components │ │ │ │ └── Actions │ │ │ │ │ └── index.tsx │ │ │ ├── hooks │ │ │ │ ├── index.ts │ │ │ │ ├── useCalcLayout.ts │ │ │ │ └── useVisibleMore.ts │ │ │ ├── index.less │ │ │ ├── index.tsx │ │ │ ├── locales.ts │ │ │ └── types.ts │ │ ├── Form │ │ │ ├── components │ │ │ │ ├── Anchor │ │ │ │ │ ├── index.less │ │ │ │ │ └── index.tsx │ │ │ │ ├── AnchorItem.tsx │ │ │ │ └── Breadcrumb │ │ │ │ │ ├── index.less │ │ │ │ │ └── index.tsx │ │ │ ├── hooks │ │ │ │ ├── index.ts │ │ │ │ ├── useHooks.ts │ │ │ │ └── usePageTitle.ts │ │ │ ├── index.less │ │ │ ├── index.tsx │ │ │ ├── locales.ts │ │ │ ├── model.ts │ │ │ ├── services.ts │ │ │ └── types.ts │ │ ├── Frame │ │ │ └── index.tsx │ │ ├── Modal │ │ │ ├── DrawerWrap │ │ │ │ ├── index.less │ │ │ │ └── index.tsx │ │ │ ├── ModalWrap │ │ │ │ ├── index.less │ │ │ │ └── index.tsx │ │ │ ├── index.tsx │ │ │ └── types.ts │ │ ├── Page │ │ │ ├── components │ │ │ │ ├── Actions.tsx │ │ │ │ ├── DevControls.tsx │ │ │ │ └── Left.tsx │ │ │ ├── hooks │ │ │ │ ├── index.ts │ │ │ │ └── usePageTitle.ts │ │ │ ├── index.less │ │ │ ├── index.tsx │ │ │ └── types.ts │ │ ├── PureChart │ │ │ ├── components │ │ │ │ ├── ChartItem.tsx │ │ │ │ └── ChartLink.tsx │ │ │ ├── index.less │ │ │ ├── index.tsx │ │ │ ├── locales.ts │ │ │ └── types.ts │ │ ├── PureForm │ │ │ ├── ai.less │ │ │ ├── components │ │ │ │ ├── Actions │ │ │ │ │ ├── index.less │ │ │ │ │ └── index.tsx │ │ │ │ ├── FormItem.tsx │ │ │ │ ├── Reference │ │ │ │ │ ├── components │ │ │ │ │ │ ├── FlatContent.tsx │ │ │ │ │ │ └── FloatContentItem.tsx │ │ │ │ │ ├── index.less │ │ │ │ │ └── index.tsx │ │ │ │ ├── RowItem.tsx │ │ │ │ ├── Section │ │ │ │ │ ├── index.less │ │ │ │ │ └── index.tsx │ │ │ │ ├── Sections │ │ │ │ │ ├── index.less │ │ │ │ │ └── index.tsx │ │ │ │ ├── TabsItem.tsx │ │ │ │ └── Text │ │ │ │ │ └── index.tsx │ │ │ ├── disabled.less │ │ │ ├── hooks │ │ │ │ ├── index.ts │ │ │ │ └── useOnValuesChange.ts │ │ │ ├── index.less │ │ │ ├── index.tsx │ │ │ ├── locales.ts │ │ │ └── types.ts │ │ ├── PureGantt │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── PureList │ │ │ ├── components │ │ │ │ ├── Actions │ │ │ │ │ ├── Builder │ │ │ │ │ │ ├── index.lsss │ │ │ │ │ │ └── index.tsx │ │ │ │ │ ├── index.lsss │ │ │ │ │ └── index.tsx │ │ │ │ ├── Empty │ │ │ │ │ ├── index.lsss │ │ │ │ │ └── index.tsx │ │ │ │ ├── Fields │ │ │ │ │ └── index.tsx │ │ │ │ ├── FormItem │ │ │ │ │ └── index.tsx │ │ │ │ ├── List │ │ │ │ │ └── index.tsx │ │ │ │ ├── Row │ │ │ │ │ └── index.tsx │ │ │ │ ├── Styles │ │ │ │ │ ├── builder.lsss │ │ │ │ │ ├── common.lsss │ │ │ │ │ ├── index.tsx │ │ │ │ │ ├── no_label.lsss │ │ │ │ │ └── show_label.lsss │ │ │ │ └── index.ts │ │ │ ├── index.tsx │ │ │ ├── model.ts │ │ │ ├── types.ts │ │ │ └── utils │ │ │ │ ├── createId.ts │ │ │ │ ├── handleChildren.ts │ │ │ │ ├── index.ts │ │ │ │ ├── updateChildren.ts │ │ │ │ └── updateValue.ts │ │ ├── PureTable │ │ │ ├── components │ │ │ │ ├── Block.tsx │ │ │ │ ├── EditPopover │ │ │ │ │ ├── getPlacement.ts │ │ │ │ │ ├── getWidth.ts │ │ │ │ │ ├── index.less │ │ │ │ │ └── index.tsx │ │ │ │ ├── FoldActions │ │ │ │ │ ├── index.less │ │ │ │ │ └── index.tsx │ │ │ │ ├── UnfoldActions │ │ │ │ │ ├── index.less │ │ │ │ │ └── index.tsx │ │ │ │ └── ViewContent.tsx │ │ │ ├── hooks │ │ │ │ ├── index.ts │ │ │ │ └── useColumns.tsx │ │ │ ├── index.tsx │ │ │ ├── locales.ts │ │ │ ├── types.ts │ │ │ └── utils │ │ │ │ ├── Render.tsx │ │ │ │ ├── getColumns.tsx │ │ │ │ ├── getOperation.tsx │ │ │ │ ├── index.ts │ │ │ │ ├── shouldGroupUpdate.ts │ │ │ │ └── shouldViewUpdate.ts │ │ └── Table │ │ │ ├── compact.less │ │ │ ├── components │ │ │ ├── CustomAction │ │ │ │ └── index.tsx │ │ │ └── index.ts │ │ │ ├── dark.less │ │ │ ├── in_form.less │ │ │ ├── index.less │ │ │ ├── index.tsx │ │ │ ├── model.ts │ │ │ ├── services.ts │ │ │ ├── types.ts │ │ │ └── withTotalRow.less │ ├── builder │ │ ├── AutoComplete │ │ │ ├── index.less │ │ │ ├── index.tsx │ │ │ ├── model.ts │ │ │ └── types.ts │ │ ├── CodeEditor │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── Input │ │ │ └── index.tsx │ │ ├── Item │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── List │ │ │ ├── index.less │ │ │ ├── index.tsx │ │ │ └── model.ts │ │ ├── Log │ │ │ ├── LogButton.tsx │ │ │ ├── LogView.tsx │ │ │ ├── LogWindow.tsx │ │ │ ├── api.tsx │ │ │ ├── index.less │ │ │ ├── index.tsx │ │ │ └── types.ts │ │ ├── RadioGroup │ │ │ ├── index.less │ │ │ ├── index.tsx │ │ │ └── model.ts │ │ ├── Select │ │ │ ├── index.less │ │ │ ├── index.tsx │ │ │ ├── model.ts │ │ │ └── types.ts │ │ ├── TextArea │ │ │ └── index.tsx │ │ └── WangEditor │ │ │ ├── index.less │ │ │ ├── index.tsx │ │ │ └── upload.ts │ ├── chart │ │ ├── Bar │ │ │ └── index.tsx │ │ ├── Funnel │ │ │ ├── index.tsx │ │ │ └── useChart.ts │ │ ├── Line │ │ │ └── index.tsx │ │ ├── LineBar │ │ │ └── index.tsx │ │ ├── Number │ │ │ ├── components │ │ │ │ └── BaseNumber.tsx │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── NumberChart │ │ │ ├── components │ │ │ │ └── BaseNumber.tsx │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── Pie │ │ │ ├── index.tsx │ │ │ └── useChart.ts │ │ ├── Table │ │ │ ├── index.less │ │ │ └── index.tsx │ │ └── theme │ │ │ ├── base.ts │ │ │ ├── common │ │ │ ├── legend.ts │ │ │ ├── textStyle.ts │ │ │ ├── title.ts │ │ │ ├── toolbox.ts │ │ │ ├── tooltip.ts │ │ │ └── visualMap.ts │ │ │ ├── dark.ts │ │ │ ├── index.ts │ │ │ └── light.ts │ ├── chat │ │ ├── error │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── guide │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── loading │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── page │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── plan │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── progress │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── text │ │ │ ├── Code │ │ │ │ ├── index.less │ │ │ │ └── index.tsx │ │ │ ├── Mermaid │ │ │ │ ├── index.less │ │ │ │ └── index.tsx │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── think │ │ │ ├── index.less │ │ │ └── index.tsx │ │ └── tool │ │ │ ├── index.less │ │ │ └── index.tsx │ ├── edit │ │ ├── AutoComplete │ │ │ ├── index.less │ │ │ ├── index.tsx │ │ │ ├── model.ts │ │ │ └── types.ts │ │ ├── Cascader │ │ │ ├── index.less │ │ │ ├── index.tsx │ │ │ └── model.ts │ │ ├── CheckboxGroup │ │ │ ├── index.less │ │ │ ├── index.tsx │ │ │ └── model.ts │ │ ├── CodeEditor │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── ColorPicker │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── DatePicker │ │ │ └── index.tsx │ │ ├── Divider │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── FlowBuilder │ │ │ ├── components │ │ │ │ ├── Builder │ │ │ │ │ ├── Provider │ │ │ │ │ │ └── index.tsx │ │ │ │ │ └── index.tsx │ │ │ │ ├── Canvas │ │ │ │ │ └── index.tsx │ │ │ │ ├── Flow │ │ │ │ │ ├── Edge │ │ │ │ │ │ ├── index.less │ │ │ │ │ │ └── index.tsx │ │ │ │ │ ├── Node │ │ │ │ │ │ ├── index.less │ │ │ │ │ │ └── index.tsx │ │ │ │ │ ├── Types │ │ │ │ │ │ └── index.tsx │ │ │ │ │ ├── index.less │ │ │ │ │ ├── index.tsx │ │ │ │ │ └── utils.ts │ │ │ │ ├── Sidebar │ │ │ │ │ └── index.tsx │ │ │ │ └── Tab │ │ │ │ │ └── index.tsx │ │ │ ├── index.less │ │ │ ├── index.tsx │ │ │ ├── types.ts │ │ │ └── utils.ts │ │ ├── FormBuilder │ │ │ ├── components │ │ │ │ ├── Canvas │ │ │ │ │ └── index.tsx │ │ │ │ ├── Preset │ │ │ │ │ ├── index.less │ │ │ │ │ └── index.tsx │ │ │ │ ├── Ruler │ │ │ │ │ ├── index.less │ │ │ │ │ └── index.tsx │ │ │ │ └── Sidebar │ │ │ │ │ └── index.tsx │ │ │ ├── index.less │ │ │ ├── index.tsx │ │ │ ├── types.ts │ │ │ └── utils.ts │ │ ├── Frame │ │ │ └── index.tsx │ │ ├── Gantt │ │ │ └── index.tsx │ │ ├── Input │ │ │ └── index.tsx │ │ ├── InputNumber │ │ │ └── index.tsx │ │ ├── Item │ │ │ └── index.tsx │ │ ├── List │ │ │ ├── index.less │ │ │ ├── index.tsx │ │ │ └── model.ts │ │ ├── Mentions │ │ │ ├── index.less │ │ │ ├── index.tsx │ │ │ └── model.ts │ │ ├── Password │ │ │ └── index.tsx │ │ ├── Placement │ │ │ └── index.tsx │ │ ├── RadioGroup │ │ │ ├── index.less │ │ │ ├── index.tsx │ │ │ └── model.ts │ │ ├── RangePicker │ │ │ └── index.tsx │ │ ├── RichText │ │ │ ├── editor_config.ts │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── Select │ │ │ ├── components │ │ │ │ ├── Extend │ │ │ │ │ ├── index.less │ │ │ │ │ └── index.tsx │ │ │ │ └── index.ts │ │ │ ├── index.less │ │ │ ├── index.tsx │ │ │ ├── model.ts │ │ │ └── types.ts │ │ ├── Table │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── Text │ │ │ └── index.tsx │ │ ├── TextArea │ │ │ └── index.tsx │ │ ├── TimePicker │ │ │ └── index.tsx │ │ ├── Tree │ │ │ ├── index.less │ │ │ ├── index.tsx │ │ │ └── model.ts │ │ ├── Upload │ │ │ ├── components │ │ │ │ ├── Audio.tsx │ │ │ │ ├── File.tsx │ │ │ │ ├── Image.tsx │ │ │ │ ├── Loader.tsx │ │ │ │ ├── Toolbar.tsx │ │ │ │ ├── UploadBtn.tsx │ │ │ │ └── Video.tsx │ │ │ ├── filemap.tsx │ │ │ ├── hooks │ │ │ │ ├── useList.ts │ │ │ │ └── useVisibleBtn.ts │ │ │ ├── index.less │ │ │ ├── index.tsx │ │ │ ├── request │ │ │ │ ├── index.ts │ │ │ │ ├── storages │ │ │ │ │ ├── local.ts │ │ │ │ │ ├── s3.ts │ │ │ │ │ └── utils.ts │ │ │ │ └── types.ts │ │ │ ├── types.ts │ │ │ └── utils │ │ │ │ └── handleFileList.ts │ │ └── WangEditor │ │ │ ├── index.less │ │ │ ├── index.tsx │ │ │ └── upload.ts │ ├── exports.ts │ ├── group │ │ ├── Block │ │ │ ├── index.less │ │ │ └── index.tsx │ │ └── index.ts │ ├── index.ts │ ├── optional │ │ └── Table │ │ │ ├── Batch │ │ │ ├── components │ │ │ │ └── Modal │ │ │ │ │ ├── hooks.tsx │ │ │ │ │ ├── index.less │ │ │ │ │ └── index.tsx │ │ │ ├── index.less │ │ │ └── index.tsx │ │ │ └── Import │ │ │ ├── components │ │ │ ├── Step1.tsx │ │ │ ├── Step2.tsx │ │ │ ├── Step3.tsx │ │ │ ├── Step4.tsx │ │ │ └── Steps.tsx │ │ │ ├── index.less │ │ │ ├── index.tsx │ │ │ └── types.ts │ ├── view │ │ ├── A │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── Checkbox │ │ │ └── index.tsx │ │ ├── Color │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── Image │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── Switch │ │ │ └── index.tsx │ │ ├── Tag │ │ │ ├── index.less │ │ │ ├── index.tsx │ │ │ ├── model.ts │ │ │ └── services.ts │ │ ├── Text │ │ │ └── index.tsx │ │ └── Tooltip │ │ │ └── index.tsx │ └── x │ │ └── index.tsx │ ├── config │ └── index.ts │ ├── context │ └── app │ │ ├── index.tsx │ │ └── model.ts │ ├── global.ts │ ├── hooks │ ├── chart │ │ ├── useAxisChart.ts │ │ └── utils │ │ │ └── wrapText.ts │ ├── index.tsx │ ├── useActionDisabled.ts │ ├── useActionStyle.ts │ ├── useIntl.ts │ ├── useLocale.tsx │ ├── useMatch.tsx │ └── useMounted.ts │ ├── knife │ ├── common │ │ ├── Handle.ts │ │ ├── memo.ts │ │ └── sleep.ts │ ├── decorators │ │ └── catchError.ts │ ├── dom │ │ └── hidePopover.ts │ ├── filter │ │ ├── filterEmpty.ts │ │ ├── fuzzyQuery.ts │ │ └── getDeepValue.ts │ ├── index.ts │ └── yao │ │ ├── getFileSrc.ts │ │ ├── getStudio.ts │ │ └── getToken.ts │ ├── layouts │ ├── components │ │ ├── ColumnOne │ │ │ ├── Container │ │ │ │ ├── index.less │ │ │ │ └── index.tsx │ │ │ └── Menu │ │ │ │ ├── Logo │ │ │ │ ├── index.less │ │ │ │ └── index.tsx │ │ │ │ ├── hooks │ │ │ │ ├── index.ts │ │ │ │ ├── useMenuItems.tsx │ │ │ │ └── useSearch.ts │ │ │ │ ├── index.less │ │ │ │ ├── index.tsx │ │ │ │ └── utils.ts │ │ ├── Container │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── Helmet.tsx │ │ ├── Loading │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── Menu │ │ │ ├── hooks │ │ │ │ ├── index.ts │ │ │ │ ├── useMenuItems.tsx │ │ │ │ └── useSearch.ts │ │ │ ├── index.less │ │ │ └── index.tsx │ │ └── Nav │ │ │ ├── components │ │ │ ├── Items │ │ │ │ ├── index.less │ │ │ │ └── index.tsx │ │ │ ├── Logo │ │ │ │ ├── index.less │ │ │ │ └── index.tsx │ │ │ ├── NavItem │ │ │ │ ├── index.less │ │ │ │ └── index.tsx │ │ │ ├── Options │ │ │ │ ├── index.less │ │ │ │ └── index.tsx │ │ │ └── UserModalContent.tsx │ │ │ ├── index.less │ │ │ └── index.tsx │ ├── index.tsx │ ├── types.ts │ └── wrappers │ │ ├── Admin │ │ └── index.tsx │ │ ├── Auth │ │ ├── index.less │ │ └── index.tsx │ │ ├── Chat │ │ ├── Container │ │ │ ├── Header.tsx │ │ │ ├── Menu.tsx │ │ │ ├── Utils.ts │ │ │ ├── header.less │ │ │ ├── index.tsx │ │ │ ├── menu.less │ │ │ └── style.less │ │ ├── Menu.tsx │ │ ├── Sidebar.tsx │ │ ├── index.tsx │ │ ├── menu.less │ │ └── style.less │ │ └── Login │ │ ├── components │ │ └── Left │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── index.less │ │ └── index.tsx │ ├── locales │ ├── en-US.ts │ ├── en.ts │ ├── source │ │ ├── cn │ │ │ ├── layout.ts │ │ │ ├── login.ts │ │ │ └── messages.ts │ │ └── en │ │ │ ├── layout.ts │ │ │ ├── login.ts │ │ │ └── messages.ts │ └── zh-CN.ts │ ├── models │ ├── index.ts │ ├── namespace.ts │ ├── remote.ts │ └── stack.ts │ ├── neo │ ├── components │ │ ├── AIChat │ │ │ ├── Assistant │ │ │ │ ├── index.less │ │ │ │ └── index.tsx │ │ │ ├── Card.less │ │ │ ├── Card.tsx │ │ │ ├── Header │ │ │ │ ├── index.less │ │ │ │ └── index.tsx │ │ │ ├── History │ │ │ │ ├── index.less │ │ │ │ └── index.tsx │ │ │ ├── MentionList │ │ │ │ ├── index.less │ │ │ │ └── index.tsx │ │ │ ├── MentionTextArea │ │ │ │ ├── index.less │ │ │ │ └── index.tsx │ │ │ ├── Tag.less │ │ │ ├── Tag.tsx │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── ChatItem │ │ │ ├── AIMessage.tsx │ │ │ ├── Content.tsx │ │ │ ├── HumanMessage.tsx │ │ │ ├── detail │ │ │ │ └── index.tsx │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── Float │ │ │ └── index.tsx │ │ ├── Page │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── Sidebar │ │ │ ├── index.less │ │ │ ├── index.tsx │ │ │ └── mock.ts │ │ └── index.ts │ ├── hooks │ │ ├── AIChat │ │ │ ├── assistantManagement.ts │ │ │ ├── chatManagement.ts │ │ │ ├── fileHandling.ts │ │ │ ├── index.ts │ │ │ ├── messageHandling.ts │ │ │ ├── titleGeneration.ts │ │ │ ├── types.ts │ │ │ └── utils.ts │ │ ├── index.ts │ │ ├── useAIChat.ts │ │ └── useEventStream.ts │ ├── index.less │ └── index.tsx │ ├── package.json │ ├── pages │ ├── 404 │ │ ├── index.less │ │ └── index.tsx │ ├── assistants │ │ ├── create │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── detail │ │ │ ├── $.tsx │ │ │ ├── components │ │ │ │ ├── ChatPlaceholder.tsx │ │ │ │ ├── Files.tsx │ │ │ │ ├── General.tsx │ │ │ │ ├── Prompts.tsx │ │ │ │ ├── Script.tsx │ │ │ │ ├── Tools.tsx │ │ │ │ └── Workflow.tsx │ │ │ └── index.less │ │ ├── index.less │ │ └── index.tsx │ ├── auth │ │ ├── index.less │ │ └── index.tsx │ ├── chat │ │ ├── $.tsx │ │ └── index.less │ ├── iframe │ │ └── index.tsx │ ├── index.tsx │ ├── login │ │ ├── admin │ │ │ └── index.tsx │ │ ├── components │ │ │ └── Common │ │ │ │ ├── components │ │ │ │ ├── Form.tsx │ │ │ │ ├── ThirdPartyLogin │ │ │ │ │ ├── index.less │ │ │ │ │ └── index.tsx │ │ │ │ └── index.ts │ │ │ │ └── index.tsx │ │ ├── model.ts │ │ ├── services.ts │ │ ├── types.ts │ │ └── user │ │ │ ├── $is │ │ │ └── index.tsx │ │ │ └── index.tsx │ ├── logo │ │ ├── index.less │ │ └── index.tsx │ ├── setting │ │ ├── $.tsx │ │ └── index.less │ ├── web │ │ └── $.tsx │ └── x │ │ └── $.tsx │ ├── public │ ├── assets │ │ └── css │ │ │ └── vidstack │ │ │ ├── layouts │ │ │ ├── audio.css │ │ │ └── video.css │ │ │ └── theme.css │ ├── components │ │ └── edit │ │ │ └── Upload │ │ │ ├── chunk.1.css │ │ │ └── index.sss │ ├── favicon.ico │ ├── font │ │ ├── Outfit-VariableFont_wght.ttf │ │ └── static │ │ │ ├── Outfit-Black.ttf │ │ │ ├── Outfit-Bold.ttf │ │ │ ├── Outfit-ExtraBold.ttf │ │ │ ├── Outfit-ExtraLight.ttf │ │ │ ├── Outfit-Light.ttf │ │ │ ├── Outfit-Medium.ttf │ │ │ ├── Outfit-Regular.ttf │ │ │ ├── Outfit-SemiBold.ttf │ │ │ └── Outfit-Thin.ttf │ ├── icon │ │ ├── fa_icon.woff │ │ ├── material_symbols.woff2 │ │ ├── md_icon_filled.ttf │ │ └── md_icon_outline.otf │ ├── icon_font.css │ ├── logo_xgen.png │ ├── styles │ │ ├── atom.min.css │ │ └── init.css │ └── theme │ │ ├── custom_antd_styles.css │ │ ├── dark.css │ │ ├── dark.sss │ │ ├── light.css │ │ └── light.sss │ ├── runtime.ts │ ├── services │ ├── app.ts │ ├── common.ts │ ├── form.ts │ ├── index.ts │ ├── remote.ts │ ├── table.ts │ └── utils │ │ ├── column.ts │ │ └── index.ts │ ├── styles │ ├── index.less │ ├── index.ts │ ├── preset │ │ ├── antd.less │ │ ├── classes.less │ │ ├── vars.less │ │ └── vars.ts │ └── theme │ │ ├── dark.less │ │ └── light.less │ ├── tsconfig.json │ ├── types │ ├── action.ts │ ├── app.ts │ ├── chart.ts │ ├── common.ts │ ├── component.ts │ ├── dashboard.ts │ ├── form.ts │ ├── global.ts │ ├── index.ts │ ├── list.ts │ ├── locale │ │ ├── index.ts │ │ ├── layout.ts │ │ ├── login.ts │ │ └── messages.ts │ ├── remote.ts │ ├── table.ts │ └── utils.ts │ ├── typings │ ├── $app.d.ts │ ├── Emittery.d.ts │ ├── Handle.d.ts │ ├── global.d.ts │ ├── index.d.ts │ └── runtime.d.ts │ ├── utils │ ├── algorithm │ │ ├── findPath.ts │ │ └── index.ts │ ├── bind.ts │ ├── filter │ │ ├── getComputedStyleNumber.ts │ │ ├── getCurrentMenuIndexs.ts │ │ ├── getItemBy.ts │ │ ├── getItemByPath.ts │ │ ├── getPath.ts │ │ ├── getTemplateValue.ts │ │ ├── index.ts │ │ └── toFirstUpperCase.ts │ ├── index.ts │ ├── preset │ │ ├── axios.ts │ │ ├── global_vars.ts │ │ ├── imports.ts │ │ ├── index.ts │ │ ├── mobx.ts │ │ └── storage.ts │ ├── reg │ │ └── index.ts │ ├── retryUntil.ts │ ├── studio_request.ts │ └── theme │ │ └── index.ts │ └── widgets │ ├── AntdProvider │ └── index.tsx │ ├── Card │ ├── index.less │ └── index.tsx │ ├── ErrorCatcher │ ├── FallbackComponent.tsx │ ├── index.less │ └── index.tsx │ ├── GlobalProvider │ └── index.tsx │ ├── Icon │ └── index.tsx │ ├── Loading │ └── index.tsx │ ├── Modal │ ├── index.less │ └── index.tsx │ ├── NeoContent │ ├── components │ │ ├── Code │ │ │ ├── index.less │ │ │ └── index.tsx │ │ └── index.ts │ ├── index.less │ └── index.tsx │ ├── Panel │ ├── Column │ │ └── index.tsx │ ├── Presets │ │ ├── Filter │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── Item │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── index.less │ │ ├── index.tsx │ │ └── uitls.tsx │ ├── Section │ │ └── index.tsx │ ├── index.less │ ├── index.tsx │ └── types.tsx │ ├── ShadowTheme │ └── index.tsx │ └── index.ts ├── pnpm-lock.yaml ├── pnpm-workspace.yaml └── turbo.json /.gitattributes: -------------------------------------------------------------------------------- 1 | *.css linguist-detectable=false 2 | *.sss linguist-detectable=false -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | node_modules 5 | *-debug.log* 6 | *-error.log 7 | 8 | # production 9 | dist 10 | /build 11 | /public/theme/*.css 12 | *.log 13 | 14 | # misc 15 | .DS_Store 16 | 17 | # umi 18 | .umi 19 | .umi-production 20 | .umi-test 21 | .mfsu 22 | .env.local 23 | .umirc.local.ts 24 | *.less.d.ts 25 | .cache 26 | 27 | # turbo 28 | .turbo 29 | 30 | # swc 31 | .swc 32 | 33 | # parcel 34 | .parcel-cache 35 | 36 | # svelte 37 | .svelte-kit 38 | packages/setup/build 39 | packages/setup/*.timestamp-* 40 | 41 | # pro 42 | __Test* 43 | .cursorrules 44 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "packages/pro"] 2 | path = packages/pro 3 | url = git@github.com:YaoApp/pro.git 4 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | strict-peer-dependencies=false 3 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | **/*.md 2 | **/*.svg 3 | **/*.ejs 4 | **/*.html 5 | package.json 6 | .umi 7 | .umi-production 8 | .umi-test 9 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "none", 4 | "printWidth": 120, 5 | "useTabs": true, 6 | "semi": false, 7 | "tabWidth": 6, 8 | "jsxSingleQuote": true, 9 | "bracketSpacing": true, 10 | "overrides": [ 11 | { 12 | "files": ".prettierrc", 13 | "options": { 14 | "parser": "json" 15 | } 16 | } 17 | ] 18 | } -------------------------------------------------------------------------------- /asserts/components.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YaoApp/xgen/014da4cee712436731df74c9a426df3e61b28aaf/asserts/components.png -------------------------------------------------------------------------------- /asserts/why.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YaoApp/xgen/014da4cee712436731df74c9a426df3e61b28aaf/asserts/why.png -------------------------------------------------------------------------------- /asserts/xgen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YaoApp/xgen/014da4cee712436731df74c9a426df3e61b28aaf/asserts/xgen.png -------------------------------------------------------------------------------- /changelogs/v1.0.0.md: -------------------------------------------------------------------------------- 1 | # Changelog for v1.0.0 2 | 3 | - test release -------------------------------------------------------------------------------- /changelogs/v1.1.0.md: -------------------------------------------------------------------------------- 1 | # Changelog for v1.1.0 2 | 3 | - [add] List: input tree data by it. 4 | - [add] add build time by html meta label. 5 | - [add] sss(css) & lsss(less) for developing shadow dom components. 6 | - [fix] fix `getFileSrc` does not match the Yao. 7 | - [change] Image: set preview default as false. 8 | - [remove] DynamicList replaced by List now. -------------------------------------------------------------------------------- /changelogs/v1.1.1.md: -------------------------------------------------------------------------------- 1 | # Changelog for v1.1.1 2 | 3 | - [fix] Table: handle extra Table render and calculating 4 | -------------------------------------------------------------------------------- /changelogs/v1.1.2.md: -------------------------------------------------------------------------------- 1 | # Changelog for v1.1.2 2 | 3 | - [fix] Table: handle edit.bind invalid 4 | - [fix] global style error 5 | -------------------------------------------------------------------------------- /changelogs/v1.1.3.md: -------------------------------------------------------------------------------- 1 | # Changelog for v1.1.3 2 | 3 | - [refactor] Menu: support unlimited levels, support badge and dot. 4 | - [add] Actions: historyPush support jump public path 5 | - [add] support custom bottom menu items 6 | - [add] Dynamically calculate according to the height of setting_items_wrap at the bottom, scroll the menu_items above 7 | - [optimize] Table.filter.actions don`t need width anymore,it computed by getComputedStyle now 8 | - [update] migrate setting to /setting page 9 | - [update] remove visible_menu & visible_menu 10 | - [fix] Action:openModal lose GlobalContext 11 | - [fix] fix Upload disabled style & accept one 12 | - [fix] Fix the batch flashing problem of Modal switching in batches -------------------------------------------------------------------------------- /changelogs/v1.2.0.md: -------------------------------------------------------------------------------- 1 | # Changelog for v1.2.0 2 | 3 | - [new] ActionFlow: an action-driven event stream management library. 4 | - [new] Password: a new component for password fields with hidden function 5 | - [feature] Login: supports third party login 6 | - [feature] Form: now supports binding onValuesChange hooks 7 | - [feature] Actions: now supports multiple asynchronous tasks for scheduling 8 | - [add] Actions: now supports specifying the execution order through the next and error fields 9 | - [add] Actions: added the following actions, and now they are all asynchronous: 10 | - Common.confirm 11 | - Common.closeModal 12 | - Form.submit 13 | - [add] Filter&Table: support receive search_params from location 14 | - [fix] when the route containing parameters changes, the selected state of the Menu is abnormal -------------------------------------------------------------------------------- /changelogs/v1.3.0.md: -------------------------------------------------------------------------------- 1 | # Changelog for v1.3.0 2 | 3 | [feature] Cloud component: define your component in Yao workspace dir, use in json by `public/[component_name]` 4 | 5 | [add] pnpm run local for preview dist at local 6 | 7 | [change] Dashboard settings 8 | [change] Action: devideLine now place right 9 | 10 | [fix] Menu: do nothing when target url is not in Menu 11 | [fix] Production Error: action crash by esbuild compress(`emittery` this lib) 12 | [fix] remove remote getDeepValue 13 | 14 | -------------------------------------------------------------------------------- /changelogs/v1.4.0.md: -------------------------------------------------------------------------------- 1 | # Changelog for v1.4.0 2 | 3 | [new] RichText: now support richtext by editorjs blocks. 4 | 5 | [feature] openModal support `isRef?:boolean` to open a reference Modal for current Modal 6 | [feature] Action: support contextual data 7 | 8 | [add] List: default hide children, active by "hasChildren: true" 9 | [add] Form: support disabled by field value 10 | 11 | [optimize] Table: remove onMouseEnter onMouseLeave to optimize render 12 | 13 | [fix] runtime base path error 14 | [fix] login captcha error 15 | [fix] swc compiler error when dev on win32 16 | [fix] Form onChange hooks error 17 | [fix] List : unsync list data to form 18 | [fix] Modal missing GlobalContext value 19 | [fix] Table scorll bar 20 | [fix] Menu missing hit 21 | [fix] reset setting and data when init -------------------------------------------------------------------------------- /packages/actionflow/rollup.build.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'rollup' 2 | import del from 'rollup-plugin-delete' 3 | import { defineRollupSwcMinifyOption, minify, swc } from 'rollup-plugin-swc3' 4 | 5 | import config, { plugins } from './rollup.common' 6 | 7 | export default defineConfig({ 8 | ...config, 9 | plugins: [ 10 | ...plugins, 11 | swc(), 12 | minify( 13 | defineRollupSwcMinifyOption({ 14 | compress: { drop_console: false } 15 | }) 16 | ), 17 | del({ targets: 'dist/*' }) 18 | ] 19 | }) 20 | -------------------------------------------------------------------------------- /packages/actionflow/rollup.common.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'rollup' 2 | 3 | import { nodeResolve } from '@rollup/plugin-node-resolve' 4 | 5 | export const plugins = [nodeResolve()] 6 | 7 | export default defineConfig({ 8 | input: 'src/index.ts', 9 | output: { 10 | dir: 'dist', 11 | format: 'esm', 12 | chunkFileNames:'[name].js', 13 | manualChunks: { 14 | to: ['await-to-js'], 15 | lodash: ['lodash-es'], 16 | mustache: ['mustache'] 17 | }, 18 | }, 19 | // When using tsyringe, this item needs to be set 20 | context: 'false' 21 | }) 22 | -------------------------------------------------------------------------------- /packages/actionflow/rollup.dev.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'rollup' 2 | import { swc } from 'rollup-plugin-swc3' 3 | 4 | import config, { plugins } from './rollup.common' 5 | 6 | export default defineConfig({ 7 | ...config, 8 | plugins: [...plugins, swc()] 9 | }) 10 | -------------------------------------------------------------------------------- /packages/actionflow/src/index.ts: -------------------------------------------------------------------------------- 1 | import Flow from './flow' 2 | 3 | export * from './types' 4 | 5 | export default Flow 6 | -------------------------------------------------------------------------------- /packages/actionflow/src/types.ts: -------------------------------------------------------------------------------- 1 | export type QueueItem = { 2 | task: (...args: any) => Promise 3 | name: string 4 | payload: any 5 | next?: string 6 | error?: string 7 | } 8 | 9 | export type Queue = Array 10 | -------------------------------------------------------------------------------- /packages/actionflow/src/utils/index.ts: -------------------------------------------------------------------------------- 1 | export { default as getTemplateValue } from './getTemplateValue' 2 | -------------------------------------------------------------------------------- /packages/actionflow/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2022", 4 | "module": "ESNext", 5 | "skipLibCheck": true, 6 | "lib": ["ESNEXT","DOM"], 7 | "moduleResolution": "Node", 8 | "declaration": true, 9 | "emitDeclarationOnly": true, 10 | "strict": true, 11 | "outDir": "dist", 12 | "suppressImplicitAnyIndexErrors": true, 13 | "baseUrl": ".", 14 | "esModuleInterop": true, 15 | "paths": { "@/*": ["./src/*"] }, 16 | "emitDecoratorMetadata": true, 17 | "experimentalDecorators": true 18 | }, 19 | "include": ["src"] 20 | } 21 | -------------------------------------------------------------------------------- /packages/editorjs_plugins/rollup.build.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'rollup' 2 | import del from 'rollup-plugin-delete' 3 | import { minify } from 'rollup-plugin-swc3' 4 | 5 | import config, { plugins } from './rollup.common' 6 | 7 | export default defineConfig({ 8 | ...config, 9 | plugins: [...plugins, minify(), del({ targets: 'dist/*' })] 10 | }) 11 | -------------------------------------------------------------------------------- /packages/editorjs_plugins/rollup.dev.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'rollup' 2 | 3 | import config, { plugins } from './rollup.common' 4 | 5 | export default defineConfig({ 6 | ...config, 7 | plugins: [...plugins] 8 | }) 9 | -------------------------------------------------------------------------------- /packages/editorjs_plugins/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2022", 4 | "module": "ESNext", 5 | "skipLibCheck": true, 6 | "lib": ["ESNEXT", "DOM"], 7 | "moduleResolution": "Node", 8 | "declaration": true, 9 | "emitDeclarationOnly": true, 10 | "strict": true, 11 | "outDir": "dist", 12 | "suppressImplicitAnyIndexErrors": true, 13 | "baseUrl": ".", 14 | "esModuleInterop": true, 15 | "paths": { "@/*": ["./src/*"] }, 16 | "emitDecoratorMetadata": true, 17 | "experimentalDecorators": true 18 | }, 19 | "include": ["src", "./typings.d.ts"] 20 | } 21 | -------------------------------------------------------------------------------- /packages/editorjs_plugins/typings.d.ts: -------------------------------------------------------------------------------- 1 | declare module '@editorjs/checklist' 2 | declare module '@editorjs/code' 3 | declare module '@editorjs/delimiter' 4 | declare module '@editorjs/header' 5 | declare module '@editorjs/image' 6 | declare module '@editorjs/inline-code' 7 | declare module '@editorjs/marker' 8 | declare module '@editorjs/nested-list' 9 | declare module '@editorjs/paragraph' 10 | declare module '@editorjs/quote' 11 | declare module '@editorjs/raw' 12 | declare module '@editorjs/table' 13 | declare module '@editorjs/underline' 14 | declare module '@editorjs/warning' 15 | declare module 'editorjs-button' 16 | declare module '@weekwood/editorjs-video' 17 | -------------------------------------------------------------------------------- /packages/emittery/maps.js: -------------------------------------------------------------------------------- 1 | export const anyMap = new WeakMap(); 2 | export const eventsMap = new WeakMap(); 3 | export const producersMap = new WeakMap(); 4 | -------------------------------------------------------------------------------- /packages/gantt/rollup.build.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'rollup' 2 | import del from 'rollup-plugin-delete' 3 | import { defineRollupSwcMinifyOption, minify, swc } from 'rollup-plugin-swc3' 4 | 5 | import config, { plugins } from './rollup.common' 6 | 7 | export default defineConfig({ 8 | ...config, 9 | plugins: [ 10 | ...plugins, 11 | swc(), 12 | minify( 13 | defineRollupSwcMinifyOption({ 14 | compress: { drop_console: false } 15 | }) 16 | ), 17 | del({ targets: 'dist/*' }) 18 | ] 19 | }) 20 | -------------------------------------------------------------------------------- /packages/gantt/rollup.dev.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'rollup' 2 | import { swc } from 'rollup-plugin-swc3' 3 | 4 | import config, { plugins } from './rollup.common' 5 | 6 | export default defineConfig({ 7 | ...config, 8 | plugins: [...plugins, swc()] 9 | }) 10 | -------------------------------------------------------------------------------- /packages/gantt/src/components/Arrow/types.ts: -------------------------------------------------------------------------------- 1 | import type { BarTask } from '@/types' 2 | 3 | export interface IPropsArrow { 4 | taskFrom: BarTask 5 | taskTo: BarTask 6 | rowHeight: number 7 | taskHeight: number 8 | arrowIndent: number 9 | rtl: boolean 10 | } 11 | -------------------------------------------------------------------------------- /packages/gantt/src/components/Arrow/utils/index.ts: -------------------------------------------------------------------------------- 1 | export { default as drownPathAndTriangle } from './drownPathAndTriangle' 2 | export { default as drownPathAndTriangleRTL } from './drownPathAndTriangleRTL' 3 | -------------------------------------------------------------------------------- /packages/gantt/src/components/Calendar/components/Top/index.css: -------------------------------------------------------------------------------- 1 | ._local { 2 | :global { 3 | .top_tick { 4 | stroke: #e6e4e4; 5 | } 6 | 7 | .top_text { 8 | text-anchor: middle; 9 | fill: #555; 10 | user-select: none; 11 | pointer-events: none; 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/gantt/src/components/Calendar/components/Top/index.tsx: -------------------------------------------------------------------------------- 1 | import styles from './Top.css' 2 | 3 | import type { IPropsTop } from '../../types' 4 | 5 | const Index = (props: IPropsTop) => { 6 | const { value, x1Line, y1Line, y2Line, xText, yText } = props 7 | 8 | return ( 9 | 10 | 11 | 12 | {value} 13 | 14 | 15 | ) 16 | } 17 | 18 | export default Index 19 | -------------------------------------------------------------------------------- /packages/gantt/src/components/Calendar/components/index.ts: -------------------------------------------------------------------------------- 1 | export { default as Top } from './Top' 2 | -------------------------------------------------------------------------------- /packages/gantt/src/components/Calendar/hooks/index.ts: -------------------------------------------------------------------------------- 1 | export { default as useValues } from './useValues' 2 | -------------------------------------------------------------------------------- /packages/gantt/src/components/Calendar/index.css: -------------------------------------------------------------------------------- 1 | ._local { 2 | :global { 3 | .calendarBottomText { 4 | text-anchor: middle; 5 | fill: #333; 6 | user-select: none; 7 | pointer-events: none; 8 | } 9 | 10 | .calendarTopTick { 11 | stroke: #e6e4e4; 12 | } 13 | 14 | .calendarTopText { 15 | text-anchor: middle; 16 | fill: #555; 17 | user-select: none; 18 | pointer-events: none; 19 | } 20 | 21 | .calendarHeader { 22 | fill: #ffffff; 23 | stroke: #e0e0e0; 24 | stroke-width: 1.4; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /packages/gantt/src/components/Calendar/types.ts: -------------------------------------------------------------------------------- 1 | import type { DateSetup, ViewMode } from '@/types' 2 | 3 | export interface IPropsTop { 4 | value: string 5 | x1Line: number 6 | y1Line: number 7 | y2Line: number 8 | xText: number 9 | yText: number 10 | } 11 | 12 | export type IPropsCalendar = { 13 | dateSetup: DateSetup 14 | locale: string 15 | viewMode: ViewMode 16 | rtl: boolean 17 | headerHeight: number 18 | columnWidth: number 19 | fontFamily: string 20 | fontSize: string 21 | } 22 | -------------------------------------------------------------------------------- /packages/gantt/src/components/Calendar/utils/index.ts: -------------------------------------------------------------------------------- 1 | export {default as getCalendarValuesForDay} from './getCalendarValuesForDay' 2 | export {default as getCalendarValuesForHour} from './getCalendarValuesForHour' 3 | export {default as getCalendarValuesForMonth} from './getCalendarValuesForMonth' 4 | export {default as getCalendarValuesForPartOfDay} from './getCalendarValuesForPartOfDay' 5 | export {default as getCalendarValuesForQuarterYear} from './getCalendarValuesForQuarterYear' 6 | export {default as getCalendarValuesForWeek} from './getCalendarValuesForWeek' 7 | export {default as getCalendarValuesForYear} from './getCalendarValuesForYear' -------------------------------------------------------------------------------- /packages/gantt/src/components/Gantt/hooks/index.ts: -------------------------------------------------------------------------------- 1 | export {default as useTaskHeight} from './useTaskHeight' 2 | export {default as useTasks} from './useTasks' 3 | export {default as useCurrent} from './useCurrent' 4 | export {default as useChangedTask} from './useChangedTask' 5 | export {default as useFailedTask} from './useFailedTask' 6 | export {default as useTaskSize} from './useTaskSize' 7 | export {default as useWheel} from './useWheel' -------------------------------------------------------------------------------- /packages/gantt/src/components/Gantt/hooks/useFailedTask.ts: -------------------------------------------------------------------------------- 1 | import { useEffect } from 'react' 2 | 3 | import type { BarTask } from '@/types' 4 | 5 | interface HookProps { 6 | failedTask: BarTask | null 7 | barTasks: Array 8 | setFailedTask: (v: BarTask | null) => void 9 | setBarTasks: (v: Array) => void 10 | } 11 | 12 | export default (props: HookProps) => { 13 | const { failedTask, barTasks, setBarTasks, setFailedTask } = props 14 | 15 | useEffect(() => { 16 | if (failedTask) { 17 | setBarTasks(barTasks.map((t) => (t.id !== failedTask.id ? t : failedTask))) 18 | setFailedTask(null) 19 | } 20 | }, [failedTask, barTasks]) 21 | } 22 | -------------------------------------------------------------------------------- /packages/gantt/src/components/Gantt/hooks/useTaskHeight.ts: -------------------------------------------------------------------------------- 1 | import { useMemo } from 'react' 2 | 3 | import type { GanttProps } from '@/types' 4 | 5 | interface HookProps extends Pick {} 6 | 7 | export default (props: HookProps) => { 8 | const { rowHeight, barFill } = props 9 | 10 | return useMemo(() => (rowHeight! * barFill!) / 100, [rowHeight, barFill]) 11 | } 12 | -------------------------------------------------------------------------------- /packages/gantt/src/components/Gantt/index.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YaoApp/xgen/014da4cee712436731df74c9a426df3e61b28aaf/packages/gantt/src/components/Gantt/index.css -------------------------------------------------------------------------------- /packages/gantt/src/components/Gantt/types.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YaoApp/xgen/014da4cee712436731df74c9a426df3e61b28aaf/packages/gantt/src/components/Gantt/types.ts -------------------------------------------------------------------------------- /packages/gantt/src/components/Grid/hooks/index.ts: -------------------------------------------------------------------------------- 1 | export { default as useRows } from './useRows' 2 | export { default as useTicksToday } from './useTicksToday' 3 | -------------------------------------------------------------------------------- /packages/gantt/src/components/Grid/index.css: -------------------------------------------------------------------------------- 1 | ._local { 2 | :global { 3 | .gridRow { 4 | fill: #fff; 5 | } 6 | 7 | .gridRow:nth-child(even) { 8 | fill: #f5f5f5; 9 | } 10 | 11 | .gridRowLine { 12 | stroke: #ebeff2; 13 | } 14 | 15 | .gridTick { 16 | stroke: #e6e4e4; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /packages/gantt/src/components/Grid/index.tsx: -------------------------------------------------------------------------------- 1 | import { useRows, useTicksToday } from './hooks' 2 | import styles from './index.css' 3 | 4 | import type { IPropsGrid } from './types' 5 | 6 | const Index = (props: IPropsGrid) => { 7 | const { tasks, dates, rowHeight, svgWidth, columnWidth, todayColor, rtl } = props 8 | const { gridRows, rowLines, y } = useRows({ tasks, rowHeight, svgWidth }) 9 | const {ticks,today} = useTicksToday({ dates, columnWidth, todayColor, rtl, y }) 10 | 11 | return ( 12 | 13 | 14 | {gridRows} 15 | {rowLines} 16 | {ticks} 17 | {today} 18 | 19 | 20 | ) 21 | } 22 | 23 | export default Index 24 | -------------------------------------------------------------------------------- /packages/gantt/src/components/Grid/types.ts: -------------------------------------------------------------------------------- 1 | import type { Task } from '@/types' 2 | 3 | export interface IPropsGrid { 4 | tasks: Task[] 5 | dates: Date[] 6 | svgWidth: number 7 | rowHeight: number 8 | columnWidth: number 9 | todayColor: string 10 | rtl: boolean 11 | } 12 | -------------------------------------------------------------------------------- /packages/gantt/src/components/HorizontalScroll/types.ts: -------------------------------------------------------------------------------- 1 | import { SyntheticEvent } from 'react' 2 | 3 | export interface IPropsHorizontalScroll { 4 | scroll: number 5 | svgWidth: number 6 | taskListWidth: number 7 | rtl: boolean 8 | onScroll: (event: SyntheticEvent) => void 9 | } 10 | -------------------------------------------------------------------------------- /packages/gantt/src/components/Task/components/Content/hooks/index.ts: -------------------------------------------------------------------------------- 1 | export {default as useStatus} from './useStatus' 2 | export {default as useHandleBarEventStart} from './useHandleBarEventStart' -------------------------------------------------------------------------------- /packages/gantt/src/components/Task/components/Content/hooks/useXStep.ts: -------------------------------------------------------------------------------- 1 | import { useMemo } from 'react' 2 | 3 | import type { IPropsContent } from '../../../types' 4 | 5 | interface HookProps extends Pick {} 6 | 7 | export default (props: HookProps) => { 8 | const { columnWidth, dates, timeStep } = props 9 | 10 | return useMemo(() => { 11 | const dateDelta = 12 | dates[1].getTime() - 13 | dates[0].getTime() - 14 | dates[1].getTimezoneOffset() * 60 * 1000 + 15 | dates[0].getTimezoneOffset() * 60 * 1000 16 | 17 | return (timeStep * columnWidth) / dateDelta 18 | }, [columnWidth, dates, timeStep]) 19 | } 20 | -------------------------------------------------------------------------------- /packages/gantt/src/components/Task/components/index.ts: -------------------------------------------------------------------------------- 1 | export {default as Content} from './Content' -------------------------------------------------------------------------------- /packages/gantt/src/components/Task/index.css: -------------------------------------------------------------------------------- 1 | .ganttVerticalContainer { 2 | overflow: hidden; 3 | font-size: 0; 4 | margin: 0; 5 | padding: 0; 6 | } 7 | 8 | .horizontalContainer { 9 | margin: 0; 10 | padding: 0; 11 | overflow: hidden; 12 | } 13 | -------------------------------------------------------------------------------- /packages/gantt/src/components/TaskItem/components/Bar/components/Date.tsx: -------------------------------------------------------------------------------- 1 | import type { IPropsDate } from '../types' 2 | 3 | const Index = (props: IPropsDate) => { 4 | const { x, y, width, height, barCornerRadius, onMouseDown } = props 5 | 6 | return ( 7 | 17 | ) 18 | } 19 | 20 | export default Index 21 | -------------------------------------------------------------------------------- /packages/gantt/src/components/TaskItem/components/Bar/components/Progress.tsx: -------------------------------------------------------------------------------- 1 | import type { IPropsProgress } from '../types' 2 | 3 | const Index = (props: IPropsProgress) => { 4 | const { progressPoint, onMouseDown } = props 5 | 6 | return 7 | } 8 | 9 | export default Index 10 | -------------------------------------------------------------------------------- /packages/gantt/src/components/TaskItem/components/Bar/components/index.ts: -------------------------------------------------------------------------------- 1 | export { default as Date } from './Date' 2 | export { default as Display } from './Display' 3 | export { default as Progress } from './Progress' 4 | -------------------------------------------------------------------------------- /packages/gantt/src/components/TaskItem/components/Bar/index.css: -------------------------------------------------------------------------------- 1 | ._local { 2 | cursor: pointer; 3 | outline: none; 4 | 5 | &:hover { 6 | :global { 7 | .barHandle { 8 | visibility: visible; 9 | opacity: 1; 10 | } 11 | } 12 | } 13 | 14 | :global { 15 | .barHandle { 16 | fill: #ddd; 17 | cursor: ew-resize; 18 | opacity: 0; 19 | visibility: hidden; 20 | } 21 | 22 | .barBackground { 23 | user-select: none; 24 | stroke-width: 0; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /packages/gantt/src/components/TaskItem/components/Milestone/index.css: -------------------------------------------------------------------------------- 1 | ._local { 2 | cursor: pointer; 3 | outline: none; 4 | 5 | :global { 6 | .milestoneBackground { 7 | user-select: none; 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/gantt/src/components/TaskItem/components/Project/index.css: -------------------------------------------------------------------------------- 1 | ._local { 2 | cursor: pointer; 3 | outline: none; 4 | 5 | :global { 6 | .projectBackground { 7 | user-select: none; 8 | opacity: 0.6; 9 | } 10 | 11 | .projectTop { 12 | user-select: none; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/gantt/src/components/TaskItem/components/index.ts: -------------------------------------------------------------------------------- 1 | export {default as Bar} from './Bar' 2 | export {default as Milestone} from './Milestone' 3 | export {default as Project} from './Project' 4 | export {default as SmallBar} from './SmallBar' -------------------------------------------------------------------------------- /packages/gantt/src/components/TaskItem/index.css: -------------------------------------------------------------------------------- 1 | .barLabel { 2 | fill: #fff; 3 | text-anchor: middle; 4 | font-weight: lighter; 5 | dominant-baseline: central; 6 | user-select: none; 7 | pointer-events: none; 8 | } 9 | 10 | .barLabelOutside { 11 | fill: #555; 12 | text-anchor: start; 13 | user-select: none; 14 | pointer-events: none; 15 | } 16 | -------------------------------------------------------------------------------- /packages/gantt/src/components/TaskList/components/Header/index.css: -------------------------------------------------------------------------------- 1 | ._local { 2 | display: table; 3 | border-bottom: #e6e4e4 1px solid; 4 | border-top: #e6e4e4 1px solid; 5 | border-left: #e6e4e4 1px solid; 6 | 7 | :global { 8 | .ganttTable_Header { 9 | display: table-row; 10 | list-style: none; 11 | } 12 | 13 | .ganttTable_HeaderSeparator { 14 | border-right: 1px solid rgb(196, 196, 196); 15 | opacity: 1; 16 | margin-left: -2px; 17 | } 18 | 19 | .ganttTable_HeaderItem { 20 | display: table-cell; 21 | vertical-align: -webkit-baseline-middle; 22 | vertical-align: middle; 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /packages/gantt/src/components/TaskList/components/Table/index.tsx: -------------------------------------------------------------------------------- 1 | import { useMemo } from 'react' 2 | 3 | import styles from './index.css' 4 | import Row from './Row' 5 | import { toLocaleDateStringFactory } from './utils' 6 | 7 | import type { IPropsTable } from '../../types' 8 | 9 | const Index = (props: IPropsTable) => { 10 | const { rowHeight, rowWidth, tasks, fontFamily, fontSize, locale, onExpanderClick } = props 11 | const toLocaleDateString = useMemo(() => toLocaleDateStringFactory(locale), [locale]) 12 | 13 | return ( 14 |
15 | {tasks.map((item) => ( 16 | 17 | ))} 18 |
19 | ) 20 | } 21 | 22 | export default Index 23 | -------------------------------------------------------------------------------- /packages/gantt/src/components/TaskList/components/Table/utils/index.ts: -------------------------------------------------------------------------------- 1 | export { default as toLocaleDateStringFactory } from './toLocaleDateStringFactory' 2 | -------------------------------------------------------------------------------- /packages/gantt/src/components/TaskList/components/Table/utils/toLocaleDateStringFactory.ts: -------------------------------------------------------------------------------- 1 | const localeDateStringCache = {} 2 | 3 | export default (locale: string) => (date: Date) => { 4 | const key = date.toString() 5 | let lds = localeDateStringCache[key] 6 | 7 | if (!lds) { 8 | lds = date.toLocaleDateString(locale, { 9 | weekday: 'short', 10 | year: 'numeric', 11 | month: 'long', 12 | day: 'numeric' 13 | }) 14 | 15 | localeDateStringCache[key] = lds 16 | } 17 | 18 | return lds 19 | } 20 | -------------------------------------------------------------------------------- /packages/gantt/src/components/TaskList/components/index.ts: -------------------------------------------------------------------------------- 1 | export {default as Header} from './Header' 2 | export {default as Table} from './Table' -------------------------------------------------------------------------------- /packages/gantt/src/components/Tooltip/components/Content/index.css: -------------------------------------------------------------------------------- 1 | .tooltipDefaultContainer { 2 | background: #fff; 3 | padding: 12px; 4 | box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23); 5 | } 6 | 7 | .tooltipDefaultContainerParagraph { 8 | font-size: 12px; 9 | margin-bottom: 6px; 10 | color: #666; 11 | } 12 | -------------------------------------------------------------------------------- /packages/gantt/src/components/Tooltip/components/index.ts: -------------------------------------------------------------------------------- 1 | export { default as Content } from './Content' 2 | -------------------------------------------------------------------------------- /packages/gantt/src/components/Tooltip/hooks/index.ts: -------------------------------------------------------------------------------- 1 | export { default as useRelated } from './useRelated' 2 | -------------------------------------------------------------------------------- /packages/gantt/src/components/Tooltip/index.css: -------------------------------------------------------------------------------- 1 | .tooltipDetailsContainer { 2 | position: absolute; 3 | display: flex; 4 | flex-shrink: 0; 5 | pointer-events: none; 6 | user-select: none; 7 | } 8 | 9 | .tooltipDetailsContainerHidden { 10 | visibility: hidden; 11 | position: absolute; 12 | display: flex; 13 | pointer-events: none; 14 | } 15 | -------------------------------------------------------------------------------- /packages/gantt/src/components/Tooltip/types.ts: -------------------------------------------------------------------------------- 1 | import type { Task, BarTask } from '@/types' 2 | 3 | export interface IPropsTooltip { 4 | task: BarTask 5 | arrowIndent: number 6 | rtl: boolean 7 | svgContainerHeight: number 8 | svgContainerWidth: number 9 | svgWidth: number 10 | headerHeight: number 11 | taskListWidth: number 12 | scrollX: number 13 | scrollY: number 14 | rowHeight: number 15 | fontSize: string 16 | fontFamily: string 17 | } 18 | 19 | export interface IPropsTooltipContent { 20 | task: Task 21 | fontSize: string 22 | fontFamily: string 23 | } 24 | -------------------------------------------------------------------------------- /packages/gantt/src/components/VerticalScroll/types.ts: -------------------------------------------------------------------------------- 1 | import { SyntheticEvent } from 'react' 2 | 3 | export interface IPropsVerticalScroll { 4 | scroll: number; 5 | ganttHeight: number; 6 | ganttFullHeight: number; 7 | headerHeight: number; 8 | rtl: boolean; 9 | onScroll: (event: SyntheticEvent) => void; 10 | } 11 | -------------------------------------------------------------------------------- /packages/gantt/src/index.tsx: -------------------------------------------------------------------------------- 1 | import Gantt from './components/Gantt' 2 | 3 | export * from './types' 4 | 5 | export default Gantt -------------------------------------------------------------------------------- /packages/gantt/src/types/date.ts: -------------------------------------------------------------------------------- 1 | export type DateTimeFormat = Intl.DateTimeFormat 2 | export type DateTimeFormatOptions = Intl.DateTimeFormatOptions 3 | export type DateScales = 'year' | 'month' | 'day' | 'hour' | 'minute' | 'second' | 'millisecond' 4 | 5 | -------------------------------------------------------------------------------- /packages/gantt/src/types/display_option.ts: -------------------------------------------------------------------------------- 1 | export enum ViewMode { 2 | Hour = 'Hour', 3 | QuarterDay = 'Quarter Day', 4 | HalfDay = 'Half Day', 5 | Day = 'Day', 6 | Week = 'Week', 7 | Month = 'Month', 8 | QuarterYear = 'QuarterYear', 9 | Year = 'Year' 10 | } 11 | 12 | export interface DisplayOption { 13 | viewMode?: ViewMode 14 | viewDate?: Date 15 | preStepsCount?: number 16 | locale?: string 17 | rtl?: boolean 18 | } 19 | 20 | export interface DateSetup { 21 | dates: Date[] 22 | viewMode: ViewMode 23 | } 24 | -------------------------------------------------------------------------------- /packages/gantt/src/types/event_option.ts: -------------------------------------------------------------------------------- 1 | import type { Task } from './task' 2 | 3 | export interface EventOption { 4 | timeStep?: number 5 | onSelect?: (task: Task, isSelected: boolean) => void 6 | onDoubleClick?: (task: Task) => void 7 | onClick?: (task: Task) => void 8 | onDateChange?: (task: Task, children: Task[]) => void | boolean | Promise | Promise 9 | onProgressChange?: (task: Task, children: Task[]) => void | boolean | Promise | Promise 10 | onDelete?: (task: Task) => void | boolean | Promise | Promise 11 | onExpanderClick?: (task: Task) => void 12 | } 13 | -------------------------------------------------------------------------------- /packages/gantt/src/types/styling_option.ts: -------------------------------------------------------------------------------- 1 | export interface StylingOption { 2 | headerHeight?: number 3 | columnWidth?: number 4 | listCellWidth?: string 5 | rowHeight?: number 6 | ganttHeight?: number 7 | barCornerRadius?: number 8 | handleWidth?: number 9 | fontFamily?: string 10 | fontSize?: string 11 | barFill?: number 12 | barProgressColor?: string 13 | barProgressSelectedColor?: string 14 | barBackgroundColor?: string 15 | barBackgroundSelectedColor?: string 16 | projectProgressColor?: string 17 | projectProgressSelectedColor?: string 18 | projectBackgroundColor?: string 19 | projectBackgroundSelectedColor?: string 20 | milestoneBackgroundColor?: string 21 | milestoneBackgroundSelectedColor?: string 22 | arrowColor?: string 23 | arrowIndent?: number 24 | todayColor?: string 25 | } 26 | -------------------------------------------------------------------------------- /packages/gantt/src/utils/common/event.ts: -------------------------------------------------------------------------------- 1 | import type { MouseEvent, KeyboardEvent, FocusEvent } from 'react' 2 | 3 | export const isKeyboardEvent = (event: MouseEvent | KeyboardEvent | FocusEvent): event is KeyboardEvent => { 4 | return (event as KeyboardEvent).key !== undefined 5 | } 6 | 7 | export const isMouseEvent = (event: MouseEvent | KeyboardEvent | FocusEvent): event is MouseEvent => { 8 | return (event as MouseEvent).clientX !== undefined 9 | } 10 | -------------------------------------------------------------------------------- /packages/gantt/src/utils/common/index.ts: -------------------------------------------------------------------------------- 1 | export * from './event' -------------------------------------------------------------------------------- /packages/gantt/src/utils/date/addToDate.ts: -------------------------------------------------------------------------------- 1 | import type { DateScales } from '@/types' 2 | 3 | export const addToDate = (date: Date, quantity: number, scale: DateScales) => { 4 | return new Date( 5 | date.getFullYear() + (scale === 'year' ? quantity : 0), 6 | date.getMonth() + (scale === 'month' ? quantity : 0), 7 | date.getDate() + (scale === 'day' ? quantity : 0), 8 | date.getHours() + (scale === 'hour' ? quantity : 0), 9 | date.getMinutes() + (scale === 'minute' ? quantity : 0), 10 | date.getSeconds() + (scale === 'second' ? quantity : 0), 11 | date.getMilliseconds() + (scale === 'millisecond' ? quantity : 0) 12 | ) 13 | } 14 | -------------------------------------------------------------------------------- /packages/gantt/src/utils/date/getCachedDateTimeFormat.ts: -------------------------------------------------------------------------------- 1 | import type { DateTimeFormat, DateTimeFormatOptions } from '@/types' 2 | 3 | const intlCache = {} 4 | 5 | export const getCachedDateTimeFormat = ( 6 | locale: string | string[], 7 | opts: DateTimeFormatOptions = {} 8 | ): DateTimeFormat => { 9 | const key = JSON.stringify([locale, opts]) 10 | 11 | let dtf = intlCache[key] 12 | 13 | if (!dtf) { 14 | dtf = new Intl.DateTimeFormat(locale, opts) 15 | 16 | intlCache[key] = dtf 17 | } 18 | 19 | return dtf 20 | } 21 | -------------------------------------------------------------------------------- /packages/gantt/src/utils/date/getDaysInMonth.ts: -------------------------------------------------------------------------------- 1 | export const getDaysInMonth = (month: number, year: number) => { 2 | return new Date(year, month + 1, 0).getDate() 3 | } 4 | -------------------------------------------------------------------------------- /packages/gantt/src/utils/date/getLocalDayOfWeek.ts: -------------------------------------------------------------------------------- 1 | import { getCachedDateTimeFormat } from './getCachedDateTimeFormat' 2 | 3 | export const getLocalDayOfWeek = (date: Date, locale: string, format?: 'long' | 'short' | 'narrow' | undefined) => { 4 | let bottomValue = getCachedDateTimeFormat(locale, { 5 | weekday: format 6 | }).format(date) 7 | 8 | bottomValue = bottomValue.replace(bottomValue[ 0 ], bottomValue[ 0 ].toLocaleUpperCase()) 9 | 10 | return bottomValue 11 | } 12 | -------------------------------------------------------------------------------- /packages/gantt/src/utils/date/getLocaleMonth.ts: -------------------------------------------------------------------------------- 1 | import { getCachedDateTimeFormat } from './getCachedDateTimeFormat' 2 | 3 | export const getLocaleMonth = (date: Date, locale: string) => { 4 | let bottomValue = getCachedDateTimeFormat(locale, { 5 | month: 'long' 6 | }).format(date) 7 | 8 | bottomValue = bottomValue.replace(bottomValue[0], bottomValue[0].toLocaleUpperCase()) 9 | 10 | return bottomValue 11 | } 12 | -------------------------------------------------------------------------------- /packages/gantt/src/utils/date/getWeekNumberISO8601.ts: -------------------------------------------------------------------------------- 1 | export const getWeekNumberISO8601 = (date: Date) => { 2 | const tmpDate = new Date(date.valueOf()) 3 | const dayNumber = (tmpDate.getDay() + 6) % 7 4 | 5 | tmpDate.setDate(tmpDate.getDate() - dayNumber + 3) 6 | 7 | const firstThursday = tmpDate.valueOf() 8 | 9 | tmpDate.setMonth(0, 1) 10 | 11 | if (tmpDate.getDay() !== 4) { 12 | tmpDate.setMonth(0, 1 + ((4 - tmpDate.getDay() + 7) % 7)) 13 | } 14 | 15 | const weekNumber = (1 + Math.ceil((firstThursday - tmpDate.valueOf()) / 604800000)).toString() 16 | 17 | if (weekNumber.length === 1) { 18 | return `0${weekNumber}` 19 | } else { 20 | return weekNumber 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /packages/gantt/src/utils/date/index.ts: -------------------------------------------------------------------------------- 1 | export * from './addToDate' 2 | export * from './ganttDateRange' 3 | export * from './getCachedDateTimeFormat' 4 | export * from './getDaysInMonth' 5 | export * from './getLocalDayOfWeek' 6 | export * from './getLocaleMonth' 7 | export * from './getWeekNumberISO8601' 8 | export * from './seedDates' 9 | export * from './startOfDate' 10 | -------------------------------------------------------------------------------- /packages/gantt/src/utils/date/startOfDate.ts: -------------------------------------------------------------------------------- 1 | import type { DateScales } from '@/types' 2 | 3 | const scores = ['millisecond', 'second', 'minute', 'hour', 'day', 'month', 'year'] 4 | 5 | const shouldReset = (scale: DateScales, _scale: DateScales) => { 6 | return scores.indexOf(_scale) <= scores.indexOf(scale) 7 | } 8 | 9 | export const startOfDate = (date: Date, scale: DateScales) => { 10 | return new Date( 11 | date.getFullYear(), 12 | shouldReset(scale, 'year') ? 0 : date.getMonth(), 13 | shouldReset(scale, 'month') ? 1 : date.getDate(), 14 | shouldReset(scale, 'day') ? 0 : date.getHours(), 15 | shouldReset(scale, 'hour') ? 0 : date.getMinutes(), 16 | shouldReset(scale, 'minute') ? 0 : date.getSeconds(), 17 | shouldReset(scale, 'second') ? 0 : date.getMilliseconds() 18 | ) 19 | } 20 | -------------------------------------------------------------------------------- /packages/gantt/src/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * from './common' 2 | export * from './date' 3 | export * from './task' 4 | -------------------------------------------------------------------------------- /packages/gantt/src/utils/task/getTaskChildren.ts: -------------------------------------------------------------------------------- 1 | import type { Task } from '@/types' 2 | 3 | export const getTaskChildren = (taskList: Task[], task: Task) => { 4 | let tasks: Task[] = [] 5 | 6 | if (task.type !== 'project') { 7 | tasks = taskList.filter((t) => t.dependencies && t.dependencies.indexOf(task.id) !== -1) 8 | } else { 9 | tasks = taskList.filter((t) => t.project && t.project === task.id) 10 | } 11 | 12 | var taskChildren: Task[] = [] 13 | 14 | tasks.forEach((t) => { 15 | taskChildren.push(...getTaskChildren(taskList, t)) 16 | }) 17 | 18 | tasks = tasks.concat(tasks, taskChildren) 19 | 20 | return tasks 21 | } 22 | -------------------------------------------------------------------------------- /packages/gantt/src/utils/task/index.ts: -------------------------------------------------------------------------------- 1 | export * from './convertToBarTasks' 2 | export * from './progress' 3 | export * from './handleTaskBySVGMouseEvent' 4 | export * from './removeHiddenTasks' 5 | export * from './sortTasks' 6 | -------------------------------------------------------------------------------- /packages/gantt/src/utils/task/isBarTask.ts: -------------------------------------------------------------------------------- 1 | import type { Task, BarTask } from '@/types' 2 | 3 | export const isBarTask = (task: Task | BarTask): task is BarTask => { 4 | return (task as BarTask).x1 !== undefined 5 | } 6 | -------------------------------------------------------------------------------- /packages/gantt/src/utils/task/removeHiddenTasks.ts: -------------------------------------------------------------------------------- 1 | import type { Task } from '@/types' 2 | 3 | import { getTaskChildren } from './getTaskChildren' 4 | 5 | export const removeHiddenTasks = (tasks: Task[]) => { 6 | const groupedTasks = tasks.filter((t) => t.hideChildren && t.type === 'project') 7 | 8 | if (groupedTasks.length > 0) { 9 | for (let i = 0; groupedTasks.length > i; i++) { 10 | const groupedTask = groupedTasks[i] 11 | const children = getTaskChildren(tasks, groupedTask) 12 | 13 | tasks = tasks.filter((t) => children.indexOf(t) === -1) 14 | } 15 | } 16 | 17 | return tasks 18 | } 19 | -------------------------------------------------------------------------------- /packages/gantt/src/utils/task/sortTasks.ts: -------------------------------------------------------------------------------- 1 | import type { Task } from '@/types' 2 | 3 | export const sortTasks = (taskA: Task, taskB: Task) => { 4 | const orderA = taskA.displayOrder || Number.MAX_VALUE 5 | const orderB = taskB.displayOrder || Number.MAX_VALUE 6 | 7 | if (orderA > orderB) { 8 | return 1 9 | } else if (orderA < orderB) { 10 | return -1 11 | } else { 12 | return 0 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/gantt/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2022", 4 | "module": "ESNext", 5 | "skipLibCheck": true, 6 | "lib": ["ESNEXT", "DOM"], 7 | "moduleResolution": "Node", 8 | "declaration": true, 9 | "emitDeclarationOnly": true, 10 | "strict": true, 11 | "outDir": "dist", 12 | "suppressImplicitAnyIndexErrors": true, 13 | "baseUrl": ".", 14 | "jsx": "react-jsx", 15 | "esModuleInterop": true, 16 | "paths": { "@/*": ["./src/*"] }, 17 | "emitDecoratorMetadata": true, 18 | "experimentalDecorators": true 19 | }, 20 | "include": ["src", "./typings.d.ts"] 21 | } 22 | -------------------------------------------------------------------------------- /packages/gantt/typings.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*.css' -------------------------------------------------------------------------------- /packages/setup/src/app.d.ts: -------------------------------------------------------------------------------- 1 | // See https://kit.svelte.dev/docs/types#app 2 | // for information about these interfaces 3 | // and what to do when importing types 4 | declare namespace App {} 5 | -------------------------------------------------------------------------------- /packages/setup/src/app.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Yao Setup 5 | 6 | 7 | 8 | 9 | 10 | %sveltekit.head% 11 | 12 | 13 |
%sveltekit.body%
14 | 15 | 16 | -------------------------------------------------------------------------------- /packages/setup/src/components/DB/index.svelte: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /packages/setup/src/components/DynamicValue/index.less: -------------------------------------------------------------------------------- 1 | .value{ 2 | font-size: 14px; 3 | } 4 | 5 | input,select { 6 | border: none; 7 | outline: none; 8 | box-shadow: none; 9 | height: 18px; 10 | padding: 0; 11 | font-size: 14px; 12 | } 13 | 14 | input{ 15 | padding: 0 3px; 16 | } -------------------------------------------------------------------------------- /packages/setup/src/components/DynamicValue/index.svelte: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/setup/src/components/DynamicValue/index.ts: -------------------------------------------------------------------------------- 1 | import DynamicValue from '../DynamicValue/index.svelte' 2 | 3 | export let name: string 4 | export let type: any 5 | export let value: any 6 | export let parent: string | undefined = undefined 7 | -------------------------------------------------------------------------------- /packages/setup/src/components/Env/index.svelte: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /packages/setup/src/components/Env/index.ts: -------------------------------------------------------------------------------- 1 | import { onMount } from 'svelte' 2 | 3 | import { metadata_env } from '../../app.config' 4 | import { steps } from '../../store' 5 | import { getFormJson } from '../../utils' 6 | import DynamicValue from '../DynamicValue/index.svelte' 7 | 8 | const preventDefault = (e: SubmitEvent) => { 9 | e.preventDefault() 10 | } 11 | 12 | onMount(() => { 13 | const form = document.getElementById('form_env')! as HTMLFormElement 14 | 15 | form.addEventListener('submit', (e) => preventDefault(e)) 16 | 17 | return () => { 18 | form.removeEventListener('submit', (e) => preventDefault(e)) 19 | } 20 | }) 21 | 22 | const next = () => { 23 | const form = document.getElementById('form_env')! as HTMLFormElement 24 | 25 | if (!form.checkValidity()) return 26 | 27 | steps.set(2) 28 | } 29 | -------------------------------------------------------------------------------- /packages/setup/src/components/Header/index.html: -------------------------------------------------------------------------------- 1 |
2 | 安装配置 3 |
-------------------------------------------------------------------------------- /packages/setup/src/components/Header/index.less: -------------------------------------------------------------------------------- 1 | .header_wrap{ 2 | font-size: 48px; 3 | font-weight: 100; 4 | line-height: 1; 5 | max-width: var(--content_width); 6 | margin: 0 auto; 7 | padding-top: 150px; 8 | margin-bottom: 48px; 9 | } -------------------------------------------------------------------------------- /packages/setup/src/components/Header/index.svelte: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/setup/src/components/Header/index.ts: -------------------------------------------------------------------------------- 1 | export {} 2 | -------------------------------------------------------------------------------- /packages/setup/src/components/Loading/index.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | 后台配置中 9 |
-------------------------------------------------------------------------------- /packages/setup/src/components/Loading/index.less: -------------------------------------------------------------------------------- 1 | .loading_wrap { 2 | display: inline-flex; 3 | width: var(--content_width); 4 | margin-top: 30px; 5 | } 6 | -------------------------------------------------------------------------------- /packages/setup/src/components/Loading/index.svelte: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/setup/src/components/Loading/index.ts: -------------------------------------------------------------------------------- 1 | export {} 2 | -------------------------------------------------------------------------------- /packages/setup/src/components/Success/index.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 配置成功 4 |
-------------------------------------------------------------------------------- /packages/setup/src/components/Success/index.less: -------------------------------------------------------------------------------- 1 | .success_wrap { 2 | display: inline-flex; 3 | width: var(--content_width); 4 | 5 | .icon-check-circle{ 6 | font-size: 48px; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/setup/src/components/Success/index.svelte: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/setup/src/components/Success/index.ts: -------------------------------------------------------------------------------- 1 | export {} 2 | -------------------------------------------------------------------------------- /packages/setup/src/components/Tabs/index.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
7 | 服务配置 8 |
9 |
13 | 数据库配置 14 |
15 |
16 |
-------------------------------------------------------------------------------- /packages/setup/src/components/Tabs/index.less: -------------------------------------------------------------------------------- 1 | .tabs_wrap { 2 | max-width: var(--content_width); 3 | margin: 0 auto; 4 | 5 | .tabs_items { 6 | border-radius: var(--radius); 7 | overflow: hidden; 8 | border: 1px solid var(--color_text); 9 | 10 | .tab_item { 11 | width: 90px; 12 | padding: 6px 0; 13 | line-height: 1; 14 | 15 | &:last-child { 16 | &.active { 17 | border: none; 18 | } 19 | } 20 | 21 | &.active { 22 | background-color: var(--color_text); 23 | color: var(--color_text_reverse); 24 | border-right: 1px solid var(--color_border); 25 | } 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /packages/setup/src/components/Tabs/index.svelte: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/setup/src/components/Tabs/index.ts: -------------------------------------------------------------------------------- 1 | import { steps } from '../../store' 2 | -------------------------------------------------------------------------------- /packages/setup/src/routes/+layout.svelte: -------------------------------------------------------------------------------- 1 | 5 | 6 |
7 | 8 |
9 | -------------------------------------------------------------------------------- /packages/setup/src/routes/+layout.ts: -------------------------------------------------------------------------------- 1 | export const prerender = true 2 | -------------------------------------------------------------------------------- /packages/setup/src/routes/+page.svelte: -------------------------------------------------------------------------------- 1 | 2 | 3 |