Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(utils): delete the renderless/common directory and adjust all reference paths. #2849

Merged
merged 28 commits into from
Feb 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
00dd4c5
fix(utils): 调整sha256, 移除 getWindow, isWeb
shenjunjian Jan 26, 2025
39901e7
fix(utils): 移除isSerer到globalConfig, 删除isBrowser函数
shenjunjian Jan 26, 2025
6e7aacd
fix(utils): 移除 prop-util 包
shenjunjian Jan 26, 2025
dba8c92
fix(utils): 更新date, calendar,date-utils, type四个引用
shenjunjian Jan 27, 2025
538736f
fix(utils): 更新string包路径
shenjunjian Feb 5, 2025
ed9307f
fix(utils): 更新 object路径
shenjunjian Feb 5, 2025
10f847f
fix(utils): 添加'@opentiny/utils' 依赖
shenjunjian Feb 5, 2025
97c1f84
fix(utils): 添加'@opentiny/utils' 依赖
shenjunjian Feb 5, 2025
cb2d4b7
fix(utils): 更新 dataset 路径
shenjunjian Feb 5, 2025
3119781
fix(utils): 更新 array 路径
shenjunjian Feb 5, 2025
ea19a56
fix(utils): 更新 array 路径
shenjunjian Feb 5, 2025
63ec0f0
fix(utils): 更新 dataset 路径
shenjunjian Feb 5, 2025
19c771b
fix(utils): 删除所有的renderless/common中的文件
shenjunjian Feb 5, 2025
338eef3
fix(utils): 替换路径
shenjunjian Feb 5, 2025
1ca41ba
fix(utils): 替换路径
shenjunjian Feb 6, 2025
5586ff3
fix(utils): 替换路径
shenjunjian Feb 6, 2025
7302c1c
fix(utils): 替换路径
shenjunjian Feb 6, 2025
ba298b5
fix(utils): 替换路径
shenjunjian Feb 6, 2025
d249b84
fix(utils): 替换路径
shenjunjian Feb 6, 2025
54e95a7
fix(utils): 替换路径
shenjunjian Feb 6, 2025
035da89
Merge branch 'dev' of github.com:opentiny/tiny-vue into refactor-util…
shenjunjian Feb 6, 2025
0b0c263
fix(utils): fix
shenjunjian Feb 7, 2025
c6d2cc6
fix(utils): remove time-line-new
shenjunjian Feb 7, 2025
aaacca6
fix(utils): adjust import orders
shenjunjian Feb 7, 2025
7064e5b
Merge branch 'dev' of github.com:opentiny/tiny-vue into refactor-util…
shenjunjian Feb 7, 2025
1baade3
fix(utils): 替换路径
shenjunjian Feb 7, 2025
6f68ab9
Merge branch 'dev' of github.com:opentiny/tiny-vue into refactor-util…
shenjunjian Feb 7, 2025
44b3da9
fix(utils): add popup-manager file
shenjunjian Feb 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 3 additions & 1 deletion examples/nuxt/playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@
},
"devDependencies": {
"@opentiny-internal/unplugin-virtual-template": "workspace:*",
"@opentiny/utils": "workspace:~",
"@opentiny/vue": "workspace:~",
"@opentiny/vue-common": "workspace:~",
"@opentiny/vue-directive": "workspace:~",
"@opentiny/vue-hooks": "workspace:~",
"@opentiny/vue-icon": "workspace:~",
"@opentiny/vue-locale": "workspace:~",
"@opentiny/vue-renderless": "workspace:~",
Expand All @@ -26,7 +29,6 @@
"@opentiny/vue-vite-import": "~1.2.0",
"@tiptap/vue-3": "^2.1.0",
"@vitejs/plugin-vue-jsx": "^3.0.0",
"js-sha256": "^0.9.0",
"onigasm": "^2.2.5",
"postcss": "^8.4.16",
"typescript": "^5.0.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/nuxt/playground/pages/InfiniteScroll.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</template>

<script setup lang="ts">
import InfiniteScroll from '@opentiny/vue-renderless/common/deps/infinite-scroll'
import { InfiniteScroll } from '@opentiny/vue-directive'
import { ref } from 'vue'

const count = ref(0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<script>
import { TinySelect, TinyOption } from '@opentiny/vue'
import Memorize from '@opentiny/vue-renderless/common/deps/memorize'
import { Memorize } from '@opentiny/utils'

const MemorizeInstance = new Memorize({ key: 'test456' })

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<script setup>
import { ref } from 'vue'
import { TinyBaseSelect, TinyOption } from '@opentiny/vue'
import Memorize from '@opentiny/vue-renderless/common/deps/memorize'
import { Memorize } from '@opentiny/utils'

const MemorizeInstance = new Memorize({ key: 'test456' })

Expand Down
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/base-select/memoize-usage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<script>
import { TinyBaseSelect, TinyOption } from '@opentiny/vue'
import Memorize from '@opentiny/vue-renderless/common/deps/memorize'
import { Memorize } from '@opentiny/utils'

const MemorizeInstance = new Memorize({ key: 'test456' })

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</template>

<script setup lang="ts">
import InfiniteScroll from '@opentiny/vue-renderless/common/deps/infinite-scroll'
import { InfiniteScroll } from '@opentiny/vue-directive'
import { ref } from 'vue'

const count = ref(0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</template>

<script>
import InfiniteScroll from '@opentiny/vue-renderless/common/deps/infinite-scroll'
import { InfiniteScroll } from '@opentiny/vue-directive'

export default {
directives: { InfiniteScroll },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</template>

<script setup lang="ts">
import InfiniteScroll from '@opentiny/vue-renderless/common/deps/infinite-scroll'
import { InfiniteScroll } from '@opentiny/vue-directive'
import { ref, computed } from 'vue'

const count = ref(0)
Expand Down
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/infinite-scroll/disabled.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</template>

<script>
import InfiniteScroll from '@opentiny/vue-renderless/common/deps/infinite-scroll'
import { InfiniteScroll } from '@opentiny/vue-directive'

export default {
directives: { InfiniteScroll },
Expand Down
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/query-builder/basic-usage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

<script>
import { TinyQueryBuilder, TinyButton } from '@opentiny/vue'
import { random } from '@opentiny/vue-renderless/common/string'
import { random } from '@opentiny/utils'

export default {
components: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

<script>
import { TinyQueryBuilder } from '@opentiny/vue'
import { random } from '@opentiny/vue-renderless/common/string'
import { random } from '@opentiny/utils'

export default {
components: {
Expand Down
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/query-builder/max-height.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<script>
import { TinyQueryBuilder } from '@opentiny/vue'
import { random } from '@opentiny/vue-renderless/common/string'
import { random } from '@opentiny/utils'

export default {
components: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

<script>
import { TinyQueryBuilder } from '@opentiny/vue'
import { random } from '@opentiny/vue-renderless/common/string'
import { random } from '@opentiny/utils'

export default {
components: {
Expand Down
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/query-builder/tree-field.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

<script>
import { TinyQueryBuilder } from '@opentiny/vue'
import { random } from '@opentiny/vue-renderless/common/string'
import { random } from '@opentiny/utils'

export default {
components: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<script setup>
import { ref } from 'vue'
import { TinySelect, TinyOption } from '@opentiny/vue'
import Memorize from '@opentiny/vue-renderless/common/deps/memorize'
import { Memorize } from '@opentiny/utils'

const MemorizeInstance = new Memorize({ key: 'test456' })

Expand Down
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/select/memoize-usage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<script>
import { TinySelect, TinyOption } from '@opentiny/vue'
import Memorize from '@opentiny/vue-renderless/common/deps/memorize'
import { Memorize } from '@opentiny/utils'

const MemorizeInstance = new Memorize({ key: 'test456' })

Expand Down
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/webdoc/faq-en.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ therefore, it can misjudge boundaries, leading to issues such as flipping and mi
**Solution:** Introducing 'popup global' configuration, assigning the 'window' of the main application to the 'viewportWindow' of the global configuration for boundary judgment

```js
import globalConfig from '@opentiny/vue-renderless/common/global'
import { globalConfig } from '@opentiny/utils'

// Determine if the app run in the sub application
if (window.__POWERED_BY_WUJIE__) {
Expand Down
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/webdoc/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
**解决方案:** 引入 `popup` 全局配置,将主应用的 `window` 赋值给全局配置的 `viewportWindow` 用于边界判断

```js
import globalConfig from '@opentiny/vue-renderless/common/global'
import { globalConfig } from '@opentiny/utils'

// 需要判断是否在子应用当中
if (window.__POWERED_BY_WUJIE__) {
Expand Down
9 changes: 5 additions & 4 deletions examples/sites/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,25 @@
"@docsearch/css": "^3.8.0",
"@docsearch/js": "^3.8.0",
"@docsearch/react": "npm:@docsearch/css",
"@opentiny/utils": "workspace:~",
"@opentiny/vue": "workspace:~",
"@opentiny/vue-common": "workspace:~",
"@opentiny/vue-design-aurora": "workspace:~",
"@opentiny/vue-design-saas": "workspace:~",
"@opentiny/vue-design-smb": "workspace:~",
"@opentiny/vue-directive": "workspace:~",
"@opentiny/vue-flowchart": "workspace:~",
"@opentiny/vue-hooks": "workspace:~",
"@opentiny/vue-icon": "workspace:~",
"@opentiny/vue-icon-multicolor": "workspace:~",
"@opentiny/vue-icon-saas": "workspace:~",
"@opentiny/vue-locale": "workspace:~",
"@opentiny/vue-modal": "workspace:~",
"@opentiny/vue-renderless": "workspace:~",
"@opentiny/vue-repl": "^1.1.2",
"@opentiny/vue-theme": "workspace:~",
"@opentiny/vue-theme-mobile": "workspace:~",
"@opentiny/vue-theme-saas": "workspace:~",
"@opentiny/vue-locale": "workspace:~",
"@opentiny/vue-renderless": "workspace:~",
"@opentiny/vue-modal": "workspace:~",
"@opentiny/vue-flowchart": "workspace:~",
"@opentiny/vue-vite-import": "~1.2.0",
"@unocss/reset": "0.38.2",
"@vue/repl": "^2.5.5",
Expand Down
2 changes: 1 addition & 1 deletion examples/sites/src/views/components/components.vue
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ import { marked } from 'marked'
import hljs from 'highlight.js'
import { Anchor, ButtonGroup, Grid, GridColumn, Tabs, TabItem, Tooltip } from '@opentiny/vue'
import { iconOuterLink } from '@opentiny/vue-icon'
import debounce from '@opentiny/vue-renderless/common/deps/debounce'
import { debounce } from '@opentiny/utils'
import { i18nByKey, getWord, $clone, fetchDemosFile, useApiMode, useTemplateMode, getCmpContributors } from '@/tools'
import demo from '@/views/components/demo'
import { router } from '@/router.js'
Expand Down
12 changes: 6 additions & 6 deletions examples/sites/src/views/components/float-settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
:style="settingsStyle"
>
<!-- 切换主题样式 暂时隐藏 -->
<tiny-popover
<!-- <tiny-popover
width="404"
v-if="false"
placement="left-end"
trigger="click"
:visible-arrow="false"
Expand Down Expand Up @@ -38,7 +37,7 @@
<theme-settings-icon class="settings-icon theme-settings-icon"></theme-settings-icon>
</div>
</template>
</tiny-popover>
</tiny-popover> -->

<!-- demo风格设置 -->
<tiny-popover
Expand Down Expand Up @@ -91,12 +90,13 @@
import { defineComponent, reactive, toRefs, onMounted, onUnmounted, watch, nextTick, ref } from 'vue'
import { Tooltip, Radio, RadioGroup, Popover, Notify } from '@opentiny/vue'
import { iconUpWard } from '@opentiny/vue-icon'
import debounce from '@opentiny/vue-renderless/common/deps/debounce'
import { debounce } from '@opentiny/utils'
import { i18nByKey, useApiMode, useTemplateMode } from '@/tools'
import useTheme from '@/tools/useTheme'
import { router } from '@/router'
import useStyleSettings from '@/tools/useStyleSettings'
import ThemeSettingsIcon from '@/assets/images/theme-settings.svg'

// import ThemeSettingsIcon from '@/assets/images/theme-settings.svg'
import StyleSettingsIcon from '@/assets/images/style-settings.svg'

export default defineComponent({
Expand All @@ -107,7 +107,7 @@ export default defineComponent({
TinyRadioGroup: RadioGroup,
IconUpWard: iconUpWard(),
TinyPopover: Popover,
ThemeSettingsIcon,
// ThemeSettingsIcon,
StyleSettingsIcon
},
setup() {
Expand Down
3 changes: 1 addition & 2 deletions examples/vue2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
"@vue/composition-api": "1.7.2",
"@vue/runtime-dom": "^3.2.31",
"@vue/test-utils": "^1.3.3",
"js-sha256": "^0.9.0",
"jsdom": "^21.0.0",
"onigasm": "^2.2.5",
"postcss": "^8.4.16",
Expand All @@ -60,4 +59,4 @@
"vue-template-compiler": "2.6.14",
"vue-tsc": "^1.0.16"
}
}
}
3 changes: 1 addition & 2 deletions examples/vue3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
"@vitest/ui": "^0.31.0",
"@vue/runtime-core": "3.2.31",
"@vue/test-utils": "^2.2.7",
"js-sha256": "^0.9.0",
"jsdom": "^21.0.0",
"onigasm": "^2.2.5",
"postcss": "^8.4.16",
Expand All @@ -59,4 +58,4 @@
"vue": "^3.3.9",
"vue-i18n": "^9.1.7"
}
}
}
8 changes: 5 additions & 3 deletions packages/renderless/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,13 @@
"release": "esno ./scripts/postbuild.ts && shx cp README.md dist"
},
"dependencies": {
"color": "4.2.3",
"@opentiny/utils": "workspace:~"
"@opentiny/utils": "workspace:~",
"@opentiny/vue-directive": "workspace:~",
"@opentiny/vue-hooks": "workspace:~",
"color": "4.2.3"
},
"devDependencies": {
"esno": "^4.7.0",
"tsup": "7.2.0"
}
}
}
8 changes: 4 additions & 4 deletions packages/renderless/src/amount/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
*
*/

import { on, off } from '../common/deps/dom'
import { formatNumber } from '../common/decimal'
import { getMiniDecimal, equalsDecimal } from '../common/bigInt'
import { isNumber } from '../common/type'
import { on, off } from '@opentiny/utils'
import { formatNumber } from '@opentiny/utils'
import { getMiniDecimal, equalsDecimal } from '@opentiny/utils'
import { isNumber } from '@opentiny/utils'

export const initService = (service) => {
const { utils = {} } = service || {}
Expand Down
2 changes: 1 addition & 1 deletion packages/renderless/src/anchor/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
*/
import type { IAnchorRenderlessParams, IAnchorLinkItem } from '@/types'
import { addClass, removeClass } from '../common/deps/dom'
import { addClass, removeClass } from '@opentiny/utils'

const getEleMentBySelect = (parent, selector) =>
selector?.startsWith('#') ? document.getElementById(selector.slice(1)) : parent.querySelector(selector)
Expand Down
2 changes: 1 addition & 1 deletion packages/renderless/src/async-flowchart/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import ResizeObserver from '../common/deps/ResizeObserver'
import { ResizeObserver } from '@opentiny/utils'
import type {
IAsyncFlowchartState,
IAsyncFlowchartProps,
Expand Down
2 changes: 1 addition & 1 deletion packages/renderless/src/autocomplete/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import type {
IAutoCompleteRenderlessParams,
IAutoCompleteRenderlessParamUtils
} from '@/types'
import { FORM_ITEM, FORM_EVENT } from '../common/form/const'
import { FORM_ITEM, FORM_EVENT } from '@opentiny/utils'

export const getData =
({
Expand Down
6 changes: 3 additions & 3 deletions packages/renderless/src/autocomplete/vue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
*
*/

import debounce from '../common/deps/debounce'
import userPopper from '../common/deps/vue-popper'
import { debounce } from '@opentiny/utils'
import { userPopper } from '@opentiny/vue-hooks'
import type { Ref } from 'vue'
import { guid } from '../common/string'
import { guid } from '@opentiny/utils'
import {
computedVisible,
watchVisible,
Expand Down
Loading
Loading