diff --git a/docs/package.json b/docs/package.json index f8e5dcc8..f6b74393 100644 --- a/docs/package.json +++ b/docs/package.json @@ -12,7 +12,7 @@ "@tmagic/form": "^1.0.0-rc.7", "@tmagic/schema": "^1.0.0-rc.7", "@tmagic/utils": "^1.0.0-rc.7", - "element-plus": "^2.2.0", + "element-plus": "^2.2.6", "highlight.js": "^11.2.0", "lodash": "^4.17.21", "lodash-es": "^4.17.21", diff --git a/magic-admin/web/package.json b/magic-admin/web/package.json index 564ef061..a8b38848 100644 --- a/magic-admin/web/package.json +++ b/magic-admin/web/package.json @@ -17,7 +17,7 @@ "axios": "^0.27.2", "axios-jsonp": "^1.0.4", "core-js": "^3.20.0", - "element-plus": "^2.2.0", + "element-plus": "^2.2.6", "js-cookie": "^3.0.0", "moment": "^2.29.3", "moment-timezone": "^0.5.34", diff --git a/packages/editor/package.json b/packages/editor/package.json index 521d3aa5..57dad58a 100644 --- a/packages/editor/package.json +++ b/packages/editor/package.json @@ -22,7 +22,7 @@ }, "license": "Apache-2.0", "scripts": { - "build": "vite build" + "build": "vue-tsc --noEmit && vite build" }, "engines": { "node": ">=14" @@ -50,7 +50,7 @@ "@tmagic/utils": "1.0.2", "buffer": "^6.0.3", "color": "^3.1.3", - "element-plus": "^2.2.0", + "element-plus": "^2.2.6", "events": "^3.3.0", "gesto": "^1.7.0", "keycon": "^1.1.2", @@ -61,7 +61,7 @@ }, "peerDependencies": { "@tmagic/form": "1.0.2", - "element-plus": "^2.2.0", + "element-plus": "^2.2.6", "monaco-editor": "^0.32.1", "vue": "^3.2.0" }, @@ -78,6 +78,6 @@ "typescript": "^4.3.4", "vite": "^2.3.7", "vite-plugin-dts": "^0.9.6", - "vue-tsc": "^0.0.24" + "vue-tsc": "^0.38.2" } } diff --git a/packages/editor/tests/unit/components/ToolButton.spec.ts b/packages/editor/tests/unit/components/ToolButton.spec.ts index 08c8ac82..26746e03 100644 --- a/packages/editor/tests/unit/components/ToolButton.spec.ts +++ b/packages/editor/tests/unit/components/ToolButton.spec.ts @@ -121,7 +121,7 @@ describe.skip('ToolButton', () => { }); test('自定义display', () => { - const display = jest.fn(); + const display = vi.fn(); getWrapper({ data: { display }, }); @@ -137,7 +137,7 @@ describe.skip('ToolButton', () => { setTimeout(async () => { const dropDown = wrapper.findComponent(ElDropdown); - const handler = jest.fn(); + const handler = vi.fn(); dropDown.vm.$emit('command', { item: { handler }, }); diff --git a/packages/form/package.json b/packages/form/package.json index 62ac0f15..cf5dbe86 100644 --- a/packages/form/package.json +++ b/packages/form/package.json @@ -22,7 +22,7 @@ }, "license": "Apache-2.0", "scripts": { - "build": "vite build" + "build": "vue-tsc --noEmit && vite build" }, "engines": { "node": ">=14" @@ -34,14 +34,14 @@ "dependencies": { "@element-plus/icons": "0.0.11", "@tmagic/utils": "1.0.2", - "element-plus": "^2.2.0", + "element-plus": "^2.2.6", "lodash-es": "^4.17.21", "moment": "^2.29.2", "sortablejs": "^1.14.0", "vue": "^3.2.0" }, "peerDependencies": { - "element-plus": "^2.2.0", + "element-plus": "^2.2.6", "vue": "^3.2.0" }, "devDependencies": { @@ -57,6 +57,6 @@ "typescript": "^4.3.4", "vite": "^2.3.7", "vite-plugin-dts": "^0.9.6", - "vue-tsc": "^0.0.24" + "vue-tsc": "^0.38.2" } } diff --git a/packages/form/src/fields/Cascader.vue b/packages/form/src/fields/Cascader.vue index 4b0e7a9a..b668e3af 100644 --- a/packages/form/src/fields/Cascader.vue +++ b/packages/form/src/fields/Cascader.vue @@ -79,8 +79,9 @@ export default defineComponent({ if (typeof body === 'function' && props.model && mForm) { body = body(mForm, { model: props.model, - formValue: null, + formValue: mForm.values, formValues: mForm.values, + config: props.config, }); } postOptions.data = body; diff --git a/packages/form/src/fields/Select.vue b/packages/form/src/fields/Select.vue index 1c964d90..b3a6ec9c 100644 --- a/packages/form/src/fields/Select.vue +++ b/packages/form/src/fields/Select.vue @@ -19,33 +19,14 @@ @change="changeHandler" @visible-change="visibleHandler" > - - + +
diff --git a/packages/form/src/fields/SelectOptions.vue b/packages/form/src/fields/SelectOptions.vue new file mode 100644 index 00000000..116e6efb --- /dev/null +++ b/packages/form/src/fields/SelectOptions.vue @@ -0,0 +1,18 @@ + + + diff --git a/packages/form/src/schema.ts b/packages/form/src/schema.ts index 700fd380..a6295a32 100644 --- a/packages/form/src/schema.ts +++ b/packages/form/src/schema.ts @@ -184,7 +184,14 @@ export interface SelectGroupOption { label: string; /** 是否禁用该选项组 */ disabled: boolean; - options: SelectOption[]; + options: { + /** 选项的标签 */ + label: string | SelectOptionTextFunction; + /** 选项的值 */ + value: any | SelectOptionValueFunction; + /** 是否禁用该选项 */ + disabled?: boolean; + }[]; } type SelectOptionFunction = ( diff --git a/packages/form/tests/unit/Form.spec.ts b/packages/form/tests/unit/Form.spec.ts index b673b511..95ed4ccc 100644 --- a/packages/form/tests/unit/Form.spec.ts +++ b/packages/form/tests/unit/Form.spec.ts @@ -15,14 +15,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - +import { describe, expect, test } from 'vitest'; import { mount } from '@vue/test-utils'; import ElementPlus from 'element-plus'; import MagicForm, { MForm } from '../../src'; describe('表单', () => { - it('初始化', (done) => { + test('初始化', (done) => { const initValues = {}; const config = [ { diff --git a/packages/form/tests/unit/containers/Tabs.spec.ts b/packages/form/tests/unit/containers/Tabs.spec.ts index ca4308c4..ff68ce81 100644 --- a/packages/form/tests/unit/containers/Tabs.spec.ts +++ b/packages/form/tests/unit/containers/Tabs.spec.ts @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - +import { describe, expect, test } from 'vitest'; import { mount } from '@vue/test-utils'; import ElementPlus from 'element-plus'; @@ -53,7 +53,7 @@ const getWrapper = ( }); describe('Tabs', () => { - it('基础', () => { + test('基础', () => { const wrapper = getWrapper(); setTimeout(async (done) => { diff --git a/packages/form/tests/unit/fields/Checkbox.spec.ts b/packages/form/tests/unit/fields/Checkbox.spec.ts index 45fcb60a..15ddaaaf 100644 --- a/packages/form/tests/unit/fields/Checkbox.spec.ts +++ b/packages/form/tests/unit/fields/Checkbox.spec.ts @@ -16,6 +16,7 @@ * limitations under the License. */ +import { describe, expect, test } from 'vitest'; import { mount } from '@vue/test-utils'; import ElementPlus from 'element-plus'; @@ -42,7 +43,7 @@ const getWrapper = ( }); describe('Checkbox', () => { - it('基础', (done) => { + test('基础', (done) => { const wrapper = getWrapper(); setTimeout(async () => { diff --git a/packages/form/tests/unit/fields/CheckboxGroup.spec.ts b/packages/form/tests/unit/fields/CheckboxGroup.spec.ts index 3e0a3304..53899c6b 100644 --- a/packages/form/tests/unit/fields/CheckboxGroup.spec.ts +++ b/packages/form/tests/unit/fields/CheckboxGroup.spec.ts @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - +import { describe, expect, test } from 'vitest'; import { mount } from '@vue/test-utils'; import ElementPlus from 'element-plus'; @@ -52,7 +52,7 @@ const getWrapper = ( }); describe('CheckboxGroup', () => { - it('基础', (done) => { + test('基础', (done) => { const wrapper = getWrapper(); setTimeout(async () => { @@ -65,7 +65,7 @@ describe('CheckboxGroup', () => { }, 0); }); - it('默认选中', (done) => { + test('默认选中', (done) => { const wrapper = getWrapper( [ { diff --git a/packages/form/tests/unit/fields/ColorPicker.spec.ts b/packages/form/tests/unit/fields/ColorPicker.spec.ts index 7727bac0..dcc4844f 100644 --- a/packages/form/tests/unit/fields/ColorPicker.spec.ts +++ b/packages/form/tests/unit/fields/ColorPicker.spec.ts @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - +import { describe, expect, test } from 'vitest'; import { mount } from '@vue/test-utils'; import ElementPlus, { ElColorPicker } from 'element-plus'; @@ -42,7 +42,7 @@ const getWrapper = ( }); describe('ColorPicker', () => { - it('基础', (done) => { + test('基础', (done) => { const wrapper = getWrapper(); setTimeout(async () => { @@ -55,7 +55,7 @@ describe('ColorPicker', () => { }, 0); }); - it('选择颜色', (done) => { + test('选择颜色', (done) => { const wrapper = getWrapper([ { type: 'color-picker', diff --git a/packages/form/tests/unit/fields/Date.spec.ts b/packages/form/tests/unit/fields/Date.spec.ts index e44ba766..6a127bb4 100644 --- a/packages/form/tests/unit/fields/Date.spec.ts +++ b/packages/form/tests/unit/fields/Date.spec.ts @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - +import { describe, expect, test } from 'vitest'; import { mount } from '@vue/test-utils'; import ElementPlus, { ElInput } from 'element-plus'; @@ -44,7 +44,7 @@ const getWrapper = ( }); describe('Date', () => { - it('基础', (done) => { + test('基础', (done) => { const wrapper = getWrapper(); setTimeout(async () => { @@ -57,7 +57,7 @@ describe('Date', () => { }, 0); }); - it('输入', (done) => { + test('输入', (done) => { const wrapper = getWrapper(); setTimeout(async () => { @@ -73,7 +73,7 @@ describe('Date', () => { }, 0); }); - it('清空', (done) => { + test('清空', (done) => { const wrapper = getWrapper(); setTimeout(async () => { diff --git a/packages/form/tests/unit/fields/DateTime.spec.ts b/packages/form/tests/unit/fields/DateTime.spec.ts index 8df2c797..34a3ae07 100644 --- a/packages/form/tests/unit/fields/DateTime.spec.ts +++ b/packages/form/tests/unit/fields/DateTime.spec.ts @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - +import { describe, expect, test } from 'vitest'; import { mount } from '@vue/test-utils'; import ElementPlus, { ElInput } from 'element-plus'; @@ -44,7 +44,7 @@ const getWrapper = ( }); describe('DateTime', () => { - it('基础', (done) => { + test('基础', (done) => { const wrapper = getWrapper(); setTimeout(async () => { @@ -57,7 +57,7 @@ describe('DateTime', () => { }, 0); }); - it('错误类型初始化初始化', (done) => { + test('错误类型初始化初始化', (done) => { const wrapper = getWrapper( [ { @@ -79,7 +79,7 @@ describe('DateTime', () => { }, 0); }); - it('无效值初始化', (done) => { + test('无效值初始化', (done) => { const wrapper = getWrapper( [ { @@ -100,7 +100,7 @@ describe('DateTime', () => { done(); }, 0); }); - it('输入日期', (done) => { + test('输入日期', (done) => { const wrapper = getWrapper(); setTimeout(async () => { @@ -113,7 +113,7 @@ describe('DateTime', () => { }); }); - it('清空', (done) => { + test('清空', (done) => { const wrapper = getWrapper(); setTimeout(async () => { diff --git a/packages/form/tests/unit/fields/Daterange.spec.ts b/packages/form/tests/unit/fields/Daterange.spec.ts index be80ea22..3778d5e2 100644 --- a/packages/form/tests/unit/fields/Daterange.spec.ts +++ b/packages/form/tests/unit/fields/Daterange.spec.ts @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - +import { describe, expect, test } from 'vitest'; import { mount } from '@vue/test-utils'; import ElementPlus from 'element-plus'; @@ -42,7 +42,7 @@ const getWrapper = ( }); describe('Daterange', () => { - it('基础', (done) => { + test('基础', (done) => { const wrapper = getWrapper(); setTimeout(async () => { @@ -56,7 +56,7 @@ describe('Daterange', () => { }); }); - it('基础初始化', (done) => { + test('基础初始化', (done) => { const wrapper = getWrapper([{ type: 'daterange', text: 'daterange' }], { daterange: [new Date('2021-7-30 00:00:00'), new Date('2021-7-30 12:00:00')], }); diff --git a/packages/form/tests/unit/fields/Display.spec.ts b/packages/form/tests/unit/fields/Display.spec.ts index af2c58bd..f643e06a 100644 --- a/packages/form/tests/unit/fields/Display.spec.ts +++ b/packages/form/tests/unit/fields/Display.spec.ts @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - +import { describe, expect, test } from 'vitest'; import { mount } from '@vue/test-utils'; import ElementPlus from 'element-plus'; @@ -44,7 +44,7 @@ const getWrapper = ( }); describe('Display', () => { - it('基础', (done) => { + test('基础', (done) => { const wrapper = getWrapper(); setTimeout(async () => { @@ -57,7 +57,7 @@ describe('Display', () => { }, 0); }); - it('初始化', (done) => { + test('初始化', (done) => { const wrapper = getWrapper( [ { diff --git a/packages/form/tests/unit/fields/Hidden.spec.ts b/packages/form/tests/unit/fields/Hidden.spec.ts index 1d735340..ef6a181c 100644 --- a/packages/form/tests/unit/fields/Hidden.spec.ts +++ b/packages/form/tests/unit/fields/Hidden.spec.ts @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - +import { describe, expect, test } from 'vitest'; import { mount } from '@vue/test-utils'; import ElementPlus from 'element-plus'; @@ -44,7 +44,7 @@ const getWrapper = ( }); describe('Hidden', () => { - it('基础', (done) => { + test('基础', (done) => { const wrapper = getWrapper(); setTimeout(async () => { @@ -57,7 +57,7 @@ describe('Hidden', () => { }, 0); }); - it('未设置name', (done) => { + test('未设置name', (done) => { const wrapper = getWrapper([ { type: 'hidden', diff --git a/packages/form/tests/unit/fields/Link.spec.ts b/packages/form/tests/unit/fields/Link.spec.ts index 0c8418ae..f8631b67 100644 --- a/packages/form/tests/unit/fields/Link.spec.ts +++ b/packages/form/tests/unit/fields/Link.spec.ts @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - +import { describe, expect, test } from 'vitest'; import { mount } from '@vue/test-utils'; import ElementPlus, { ElButton } from 'element-plus'; @@ -46,7 +46,7 @@ const getWrapper = ( }); describe('Link', () => { - it('基础', (done) => { + test('基础', (done) => { const wrapper = getWrapper(); setTimeout(() => { @@ -63,7 +63,7 @@ describe('Link', () => { }, 0); }); - it('默认文字', (done) => { + test('默认文字', (done) => { const wrapper = getWrapper( [ { @@ -92,7 +92,7 @@ describe('Link', () => { }, 0); }); - it('displayText为函数', (done) => { + test('displayText为函数', (done) => { const wrapper = getWrapper([ { type: 'link', @@ -130,7 +130,7 @@ describe('Link', () => { }, 0); }); - it('不可编辑', (done) => { + test('不可编辑', (done) => { const wrapper = getWrapper( [ { @@ -155,7 +155,7 @@ describe('Link', () => { }, 0); }); - it('编辑链接', (done) => { + test('编辑链接', (done) => { const wrapper = getWrapper([ { type: 'link', diff --git a/packages/form/tests/unit/fields/Number.spec.ts b/packages/form/tests/unit/fields/Number.spec.ts index c393f835..2bc06229 100644 --- a/packages/form/tests/unit/fields/Number.spec.ts +++ b/packages/form/tests/unit/fields/Number.spec.ts @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - +import { describe, expect, test } from 'vitest'; import { mount } from '@vue/test-utils'; import ElementPlus from 'element-plus'; @@ -44,7 +44,7 @@ const getWrapper = ( }); describe('Number', () => { - it('基础功能', (done) => { + test('基础功能', (done) => { const wrapper = getWrapper(); setTimeout(async () => { const num = wrapper.findComponent(MNumber); @@ -55,7 +55,7 @@ describe('Number', () => { }, 0); }); - it('默认值', (done) => { + test('默认值', (done) => { const wrapper = getWrapper([ { text: 'number', @@ -72,7 +72,7 @@ describe('Number', () => { }, 0); }); - it('增加减少', (done) => { + test('增加减少', (done) => { const wrapper = getWrapper([ { text: 'number', @@ -103,7 +103,7 @@ describe('Number', () => { }); }); - it('最大最小值', (done) => { + test('最大最小值', (done) => { const wrapper = getWrapper([ { text: 'number', diff --git a/packages/form/tests/unit/fields/RadioGroup.spec.ts b/packages/form/tests/unit/fields/RadioGroup.spec.ts index 2666ff26..37c445cf 100644 --- a/packages/form/tests/unit/fields/RadioGroup.spec.ts +++ b/packages/form/tests/unit/fields/RadioGroup.spec.ts @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - +import { describe, expect, test } from 'vitest'; import { mount } from '@vue/test-utils'; import ElementPlus from 'element-plus'; @@ -52,7 +52,7 @@ const getWrapper = ( }); describe('RadioGroup', () => { - it('基础', (done) => { + test('基础', (done) => { const wrapper = getWrapper(); setTimeout(async () => { @@ -65,7 +65,7 @@ describe('RadioGroup', () => { }, 0); }); - it('默认选中', (done) => { + test('默认选中', (done) => { const wrapper = getWrapper( [ { diff --git a/packages/form/tests/unit/fields/Switch.spec.ts b/packages/form/tests/unit/fields/Switch.spec.ts index 98e6ebd3..c641c1f3 100644 --- a/packages/form/tests/unit/fields/Switch.spec.ts +++ b/packages/form/tests/unit/fields/Switch.spec.ts @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - +import { describe, expect, test } from 'vitest'; import { mount } from '@vue/test-utils'; import ElementPlus from 'element-plus'; @@ -44,7 +44,7 @@ const getWrapper = ( }); describe('Switch', () => { - it('基础', (done) => { + test('基础', (done) => { const wrapper = getWrapper(); setTimeout(async () => { @@ -57,7 +57,7 @@ describe('Switch', () => { }, 0); }); - it('数字默认值', (done) => { + test('数字默认值', (done) => { const wrapper = getWrapper([ { type: 'switch', @@ -77,7 +77,7 @@ describe('Switch', () => { }, 0); }); - it('点击开关', (done) => { + test('点击开关', (done) => { const wrapper = getWrapper([ { type: 'switch', diff --git a/packages/form/tests/unit/fields/Text.spec.ts b/packages/form/tests/unit/fields/Text.spec.ts index 1fca08aa..4fd9294c 100644 --- a/packages/form/tests/unit/fields/Text.spec.ts +++ b/packages/form/tests/unit/fields/Text.spec.ts @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - +import { describe, expect, test } from 'vitest'; import { mount } from '@vue/test-utils'; import ElementPlus, { ElButton } from 'element-plus'; @@ -50,7 +50,7 @@ const getWrapper = ( }); describe('Text', () => { - it('基础', (done) => { + test('基础', (done) => { const wrapper = getWrapper(); setTimeout(async () => { @@ -63,7 +63,7 @@ describe('Text', () => { }, 0); }); - it('append string', (done) => { + test('append string', (done) => { const wrapper = getWrapper([ { text: 'text', @@ -79,7 +79,7 @@ describe('Text', () => { }, 0); }); - it('append button', (done) => { + test('append button', (done) => { // 用来标识append按钮是否有点击 let clickFlag = false; const wrapper = getWrapper([ @@ -105,7 +105,7 @@ describe('Text', () => { }, 0); }); - it('key ArrowUp', (done) => { + test('key ArrowUp', (done) => { const wrapper = getWrapper( [ { @@ -131,7 +131,7 @@ describe('Text', () => { }, 0); }); - it('key ArrowDown', (done) => { + test('key ArrowDown', (done) => { const wrapper = getWrapper( [ { @@ -157,7 +157,7 @@ describe('Text', () => { }, 0); }); - it('key ctrlKey ArrowUp', (done) => { + test('key ctrlKey ArrowUp', (done) => { const wrapper = getWrapper( [ { @@ -184,7 +184,7 @@ describe('Text', () => { }, 0); }); - it('key ctrlKey ArrowDown', (done) => { + test('key ctrlKey ArrowDown', (done) => { const wrapper = getWrapper( [ { @@ -211,7 +211,7 @@ describe('Text', () => { }, 0); }); - it('key shiftKey ArrowUp', (done) => { + test('key shiftKey ArrowUp', (done) => { const wrapper = getWrapper( [ { @@ -238,7 +238,7 @@ describe('Text', () => { }, 0); }); - it('key shiftKey ArrowDown', (done) => { + test('key shiftKey ArrowDown', (done) => { const wrapper = getWrapper( [ { @@ -265,7 +265,7 @@ describe('Text', () => { }, 0); }); - it('key altKey ArrowUp', (done) => { + test('key altKey ArrowUp', (done) => { const wrapper = getWrapper( [ { @@ -292,7 +292,7 @@ describe('Text', () => { }, 0); }); - it('key altKey ArrowDown', (done) => { + test('key altKey ArrowDown', (done) => { const wrapper = getWrapper( [ { diff --git a/packages/form/tests/unit/fields/Textarea.spec.ts b/packages/form/tests/unit/fields/Textarea.spec.ts index 22defb07..a2e42b50 100644 --- a/packages/form/tests/unit/fields/Textarea.spec.ts +++ b/packages/form/tests/unit/fields/Textarea.spec.ts @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - +import { describe, expect, test } from 'vitest'; import { mount } from '@vue/test-utils'; import ElementPlus from 'element-plus'; @@ -44,7 +44,7 @@ const getWrapper = ( }); describe('Textarea', () => { - it('基础', (done) => { + test('基础', (done) => { const wrapper = getWrapper(); setTimeout(async () => { diff --git a/packages/form/tests/unit/fields/Time.spec.ts b/packages/form/tests/unit/fields/Time.spec.ts index 715b5054..ebe20fe5 100644 --- a/packages/form/tests/unit/fields/Time.spec.ts +++ b/packages/form/tests/unit/fields/Time.spec.ts @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - +import { describe, expect, test } from 'vitest'; import { mount } from '@vue/test-utils'; import ElementPlus from 'element-plus'; @@ -44,7 +44,7 @@ const getWrapper = ( }); describe('Time', () => { - it('基础', (done) => { + test('基础', (done) => { const wrapper = getWrapper(); setTimeout(async () => { @@ -55,7 +55,7 @@ describe('Time', () => { expect(input.exists()).toBe(true); await input.setValue('12:00:00'); - time.vm.$emit('change', '12:00:00'); + time.vm.$emit('change', new Date('12:00:00')); const value = await (wrapper.vm as any).submitForm(); expect(value.time).toMatch('12:00:00'); done(); diff --git a/packages/form/tests/unit/utils/config.spec.ts b/packages/form/tests/unit/utils/config.spec.ts index 5230ac71..6bef49f8 100644 --- a/packages/form/tests/unit/utils/config.spec.ts +++ b/packages/form/tests/unit/utils/config.spec.ts @@ -15,6 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest'; describe('config.ts', () => { let mockModule: any; @@ -26,28 +27,28 @@ describe('config.ts', () => { // 在测试后都重置mock模块 afterEach(() => { - jest.resetModules(); + vi.resetModules(); }); - it('设置获取属性', () => { + test('设置获取属性', () => { mockModule.setConfig({ text: 'form', model: { config: { text: 'test' } } }); expect(mockModule.getConfig('model')).toEqual({ config: { text: 'test' } }); }); - it('获取不存在的属性', () => { + test('获取不存在的属性', () => { expect(mockModule.getConfig('model')).toBeUndefined(); mockModule.setConfig({ text: 'form', model: { config: { text: 'test' } } }); expect(mockModule.getConfig('config')).toBeUndefined(); }); - it('修改已经存在的form', () => { + test('修改已经存在的form', () => { mockModule.setConfig({ text: 'form', model: { config: { text: 'test' } } }); expect(mockModule.getConfig('text')).toMatch('form'); mockModule.setConfig({ text: 'new-form', model: { config: { text: 'test' } } }); expect(mockModule.getConfig('text')).toMatch('new-form'); }); - it('在未设置时获取Config', () => { + test('在未设置时获取Config', () => { expect(mockModule.getConfig('model')).toBeUndefined(); }); }); diff --git a/packages/form/tests/unit/utils/createForm.spec.ts b/packages/form/tests/unit/utils/createForm.spec.ts index bf92f377..c46d873d 100644 --- a/packages/form/tests/unit/utils/createForm.spec.ts +++ b/packages/form/tests/unit/utils/createForm.spec.ts @@ -16,17 +16,19 @@ * limitations under the License. */ +import { describe, expect, test } from 'vitest'; + import { FormConfig } from '@tmagic/form'; import createForm from '../../../src/utils/createForm'; describe('createForm', () => { - it('正常创建', () => { + test('正常创建', () => { const config: FormConfig = [{ type: 'time' }, { type: 'colorPicker' }]; expect(createForm(config)).toEqual(config); }); - it('参数为空数组', () => { + test('参数为空数组', () => { expect(createForm([])).toEqual([]); }); }); diff --git a/packages/form/tests/unit/utils/form.spec.ts b/packages/form/tests/unit/utils/form.spec.ts index 99fa18f5..f4571264 100644 --- a/packages/form/tests/unit/utils/form.spec.ts +++ b/packages/form/tests/unit/utils/form.spec.ts @@ -16,6 +16,8 @@ * limitations under the License. */ +import { describe, expect, test } from 'vitest'; + import { FormState } from '@tmagic/form'; import { display, filterFunction, getRules, initValue } from '../../../src/utils/form'; @@ -33,24 +35,24 @@ const mForm: FormState = { }; describe('filterFunction', () => { - it('config 不为函数', () => { + test('config 不为函数', () => { expect(filterFunction(mForm, 1, {})).toBe(1); }); - it('config 为函数', () => { + test('config 为函数', () => { expect(filterFunction(mForm, () => 2, {})).toBe(2); }); }); describe('display', () => { - it('config 不为函数', () => { + test('config 不为函数', () => { expect(display(mForm, false, {})).toBe(false); expect(display(mForm, undefined, {})).toBe(true); expect(display(mForm, 0, {})).toBe(true); expect(display(mForm, true, {})).toBe(true); }); - it('config 为函数', () => { + test('config 为函数', () => { expect(display(mForm, () => true, {})).toBe(true); expect(display(mForm, () => false, {})).toBe(false); expect(display(mForm, () => 1, {})).toBe(1); @@ -58,7 +60,7 @@ describe('display', () => { }); describe('getRules', () => { - it('函数功能', () => { + test('函数功能', () => { // 表单检验规则 const rules: any = { validator: () => 1, @@ -70,7 +72,7 @@ describe('getRules', () => { }); describe('initValue', () => { - it('没有onInitValue', async () => { + test('没有onInitValue', async () => { const initValues = { a: 1, void: [], @@ -167,7 +169,7 @@ describe('initValue', () => { expect(values.object.o).toBe('o'); }); - it('有onInitValue', async () => { + test('有onInitValue', async () => { const initValues = { a: 1, }; @@ -186,7 +188,7 @@ describe('initValue', () => { expect(values).toHaveLength(0); }); - it('defaultValue', async () => { + test('defaultValue', async () => { const initValues = { a: 1, }; @@ -258,7 +260,7 @@ describe('initValue', () => { expect(values.d.multiple).toHaveLength(0); }); - it('fieldset checkbox', async () => { + test('fieldset checkbox', async () => { const config = [ { type: 'fieldset', @@ -279,7 +281,7 @@ describe('initValue', () => { expect(values.fieldset.a).toBe(''); }); - it('table', async () => { + test('table', async () => { const config = [ { type: 'table', diff --git a/packages/table/package.json b/packages/table/package.json index 1e2dcbf3..610ce76a 100644 --- a/packages/table/package.json +++ b/packages/table/package.json @@ -20,7 +20,7 @@ }, "license": "Apache-2.0", "scripts": { - "build": "vite build" + "build": "vue-tsc --noEmit && vite build" }, "engines": { "node": ">=14" @@ -31,13 +31,13 @@ }, "dependencies": { "@tmagic/form": "1.0.2", - "element-plus": "^2.2.0", + "element-plus": "^2.2.6", "lodash-es": "^4.17.21", "vue": "^3.2.0" }, "peerDependencies": { "@tmagic/form": "1.0.2", - "element-plus": "^2.2.0", + "element-plus": "^2.2.6", "vue": "^3.2.0" }, "devDependencies": { @@ -51,6 +51,6 @@ "typescript": "^4.3.4", "vite": "^2.3.7", "vite-plugin-dts": "^0.9.6", - "vue-tsc": "^0.0.24" + "vue-tsc": "^0.38.2" } } diff --git a/playground/package.json b/playground/package.json index defc1300..4aba2eeb 100644 --- a/playground/package.json +++ b/playground/package.json @@ -17,7 +17,7 @@ "@tmagic/schema": "1.0.2", "@tmagic/stage": "1.0.2", "@tmagic/utils": "1.0.2", - "element-plus": "^2.2.0", + "element-plus": "^2.2.6", "monaco-editor": "^0.32.1", "serialize-javascript": "^6.0.0", "vue": "^3.2.0", @@ -33,6 +33,6 @@ "sass": "^1.35.1", "typescript": "^4.3.4", "vite": "^2.3.7", - "vue-tsc": "^0.0.24" + "vue-tsc": "^0.38.2" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1106e3ac..50a061db 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -79,7 +79,7 @@ importers: '@vuepress/client': ^2.0.0-beta.48 '@vuepress/plugin-search': ^2.0.0-beta.48 '@vuepress/theme-default': ^2.0.0-beta.48 - element-plus: ^2.2.0 + element-plus: ^2.2.6 highlight.js: ^11.2.0 lodash: ^4.17.21 lodash-es: ^4.17.21 @@ -90,7 +90,7 @@ importers: '@tmagic/form': link:../packages/form '@tmagic/schema': link:../packages/schema '@tmagic/utils': link:../packages/utils - element-plus: 2.2.4_vue@3.2.37 + element-plus: 2.2.6_vue@3.2.37 highlight.js: 11.5.1 lodash: 4.17.21 lodash-es: 4.17.21 @@ -141,7 +141,7 @@ importers: '@vue/test-utils': ^2.0.0 buffer: ^6.0.3 color: ^3.1.3 - element-plus: ^2.2.0 + element-plus: ^2.2.6 events: ^3.3.0 gesto: ^1.7.0 keycon: ^1.1.2 @@ -153,7 +153,7 @@ importers: vite: ^2.3.7 vite-plugin-dts: ^0.9.6 vue: ^3.2.0 - vue-tsc: ^0.0.24 + vue-tsc: ^0.38.2 dependencies: '@babel/core': 7.18.2 '@element-plus/icons': 0.0.11 @@ -164,7 +164,7 @@ importers: '@tmagic/utils': link:../utils buffer: 6.0.3 color: 3.2.1 - element-plus: 2.2.4_vue@3.2.37 + element-plus: 2.2.6_vue@3.2.37 events: 3.3.0 gesto: 1.8.1 keycon: 1.1.2 @@ -185,7 +185,7 @@ importers: typescript: 4.7.3 vite: 2.9.10_sass@1.52.2 vite-plugin-dts: 0.9.10_vite@2.9.10 - vue-tsc: 0.0.24 + vue-tsc: 0.38.2_typescript@4.7.3 packages/form: specifiers: @@ -199,7 +199,7 @@ importers: '@vitejs/plugin-vue-jsx': ^1.1.6 '@vue/compiler-sfc': ^3.2.0 '@vue/test-utils': ^2.0.0 - element-plus: ^2.2.0 + element-plus: ^2.2.6 lodash-es: ^4.17.21 moment: ^2.29.2 sass: ^1.35.1 @@ -208,11 +208,11 @@ importers: vite: ^2.3.7 vite-plugin-dts: ^0.9.6 vue: ^3.2.0 - vue-tsc: ^0.0.24 + vue-tsc: ^0.38.2 dependencies: '@element-plus/icons': 0.0.11 '@tmagic/utils': link:../utils - element-plus: 2.2.4_vue@3.2.37 + element-plus: 2.2.6_vue@3.2.37 lodash-es: 4.17.21 moment: 2.29.3 sortablejs: 1.15.0 @@ -230,7 +230,7 @@ importers: typescript: 4.7.3 vite: 2.9.10_sass@1.52.2 vite-plugin-dts: 0.9.10_vite@2.9.10 - vue-tsc: 0.0.24 + vue-tsc: 0.38.2_typescript@4.7.3 packages/schema: specifiers: @@ -288,17 +288,17 @@ importers: '@vitejs/plugin-vue': ^1.2.3 '@vue/compiler-sfc': ^3.2.0 '@vue/test-utils': ^2.0.0 - element-plus: ^2.2.0 + element-plus: ^2.2.6 lodash-es: ^4.17.21 sass: ^1.35.1 typescript: ^4.3.4 vite: ^2.3.7 vite-plugin-dts: ^0.9.6 vue: ^3.2.0 - vue-tsc: ^0.0.24 + vue-tsc: ^0.38.2 dependencies: '@tmagic/form': link:../form - element-plus: 2.2.4_vue@3.2.37 + element-plus: 2.2.6_vue@3.2.37 lodash-es: 4.17.21 vue: 3.2.37 devDependencies: @@ -312,7 +312,7 @@ importers: typescript: 4.7.3 vite: 2.9.10_sass@1.52.2 vite-plugin-dts: 0.9.10_vite@2.9.10 - vue-tsc: 0.0.24 + vue-tsc: 0.38.2_typescript@4.7.3 packages/ui: specifiers: @@ -406,7 +406,7 @@ importers: '@vitejs/plugin-vue': ^1.2.3 '@vitejs/plugin-vue-jsx': ^1.1.6 '@vue/compiler-sfc': ^3.2.0 - element-plus: ^2.2.0 + element-plus: ^2.2.6 monaco-editor: ^0.32.1 sass: ^1.35.1 serialize-javascript: ^6.0.0 @@ -414,7 +414,7 @@ importers: vite: ^2.3.7 vue: ^3.2.0 vue-router: ^4.0.10 - vue-tsc: ^0.0.24 + vue-tsc: ^0.38.2 dependencies: '@element-plus/icons': 0.0.11 '@tmagic/editor': link:../packages/editor @@ -422,7 +422,7 @@ importers: '@tmagic/schema': link:../packages/schema '@tmagic/stage': link:../packages/stage '@tmagic/utils': link:../packages/utils - element-plus: 2.2.4_vue@3.2.37 + element-plus: 2.2.6_vue@3.2.37 monaco-editor: 0.32.1 serialize-javascript: 6.0.0 vue: 3.2.37 @@ -437,7 +437,7 @@ importers: sass: 1.52.2 typescript: 4.7.3 vite: 2.9.10_sass@1.52.2 - vue-tsc: 0.0.24 + vue-tsc: 0.38.2_typescript@4.7.3 runtime/react: specifiers: @@ -511,7 +511,7 @@ importers: typescript: ^4.3.4 vite: ^2.3.7 vue: ^3.2.0 - vue-tsc: ^0.0.24 + vue-tsc: ^0.38.2 dependencies: '@tmagic/schema': link:../../packages/schema '@tmagic/stage': link:../../packages/stage @@ -528,7 +528,7 @@ importers: sass: 1.52.2 typescript: 4.7.3 vite: 2.9.10_sass@1.52.2 - vue-tsc: 0.0.24 + vue-tsc: 0.38.2_typescript@4.7.3 packages: @@ -1315,14 +1315,14 @@ packages: - supports-color dev: true - /@floating-ui/core/0.7.2: - resolution: {integrity: sha512-FRVAkSNU/vGXLIsgbggcs70GkXKEOXgBBbNpYPNHSaKsCAMMd00NrjbtKTesxkdv9xm9N3+XiDlcFGY6WnatBg==} + /@floating-ui/core/0.7.3: + resolution: {integrity: sha512-buc8BXHmG9l82+OQXOFU3Kr2XQx9ys01U/Q9HMIrZ300iLc8HLMgh7dcCqgYzAzf4BkoQvDcXf5Y+CuEZ5JBYg==} dev: false - /@floating-ui/dom/0.5.2: - resolution: {integrity: sha512-z1DnEa7F3d8Fm/eXSbii8UEGpcjZGkQaYYUI0WpEVgD3vBfebDW8j/3ysusxonuMexoigA+A3b/fYH7sEqiwyg==} + /@floating-ui/dom/0.5.4: + resolution: {integrity: sha512-419BMceRLq0RrmTSDxn8hf9R3VCJv2K9PUfugh5JyEFmdjzDo+e8U5EdR8nzKq8Yj1htzLm3b6eQEEam3/rrtg==} dependencies: - '@floating-ui/core': 0.7.2 + '@floating-ui/core': 0.7.3 dev: false /@humanwhocodes/config-array/0.5.0: @@ -1837,6 +1837,36 @@ packages: vue: 3.2.37 dev: true + /@volar/code-gen/0.38.2: + resolution: {integrity: sha512-H81I6d7rZB7teqL+zhK/Xz1v0/kKkUwkB0Aq6b4+BTCqcJeiZkoWxd0gFhrhWTnUoqiM83lhoTGo2vkvx5YagQ==} + dependencies: + '@volar/source-map': 0.38.2 + dev: true + + /@volar/source-map/0.38.2: + resolution: {integrity: sha512-DWcYbYt9SPwk0r4VmXk1F0v4X5+hCqH1JRkAWSeJymQyXCQ2OQDEbY2PF12a7y2qn4FUBD2gOba2TynAqI8ZFQ==} + dev: true + + /@volar/vue-code-gen/0.38.2: + resolution: {integrity: sha512-whLunD6phSGWBUHZKdTxeglrpzQu26ii8CRVapFdjfyMaVhQ7ESNeIAhkTVyg2ovOPc0PiDYPQEPzfWAADIWog==} + dependencies: + '@volar/code-gen': 0.38.2 + '@volar/source-map': 0.38.2 + '@vue/compiler-core': 3.2.37 + '@vue/compiler-dom': 3.2.37 + '@vue/shared': 3.2.37 + dev: true + + /@volar/vue-typescript/0.38.2: + resolution: {integrity: sha512-5IKvSK2m5yUmH6iu/tNScVlvJGuiHawTfSmjxaMs+/tod25WeK37LEdf+pdKtlJ30bYTQmmkAuEfG01QvvBRGQ==} + dependencies: + '@volar/code-gen': 0.38.2 + '@volar/source-map': 0.38.2 + '@volar/vue-code-gen': 0.38.2 + '@vue/compiler-sfc': 3.2.37 + '@vue/reactivity': 3.2.37 + dev: true + /@vue/babel-helper-vue-jsx-merge-props/1.2.1: resolution: {integrity: sha512-QOi5OW45e2R20VygMSNhyQHvpdUwQZqGPc748JLGCYEy+yp8fNFNdbNIGAgZmi9e+2JHPd6i6idRuqivyicIkA==} dev: true @@ -2670,23 +2700,11 @@ packages: /base64-js/1.5.1: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} - /big-integer/1.6.51: - resolution: {integrity: sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==} - engines: {node: '>=0.6'} - dev: true - /binary-extensions/2.2.0: resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} engines: {node: '>=8'} dev: true - /binary/0.3.0: - resolution: {integrity: sha512-D4H1y5KYwpJgK8wk1Cue5LLPgmwHKYSChkbspQg5JtVuR5ulGckxfR62H3AE9UDkdMC8yyXlqYihuz3Aqg2XZg==} - dependencies: - buffers: 0.1.1 - chainsaw: 0.1.0 - dev: true - /bl/4.1.0: resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} dependencies: @@ -2695,10 +2713,6 @@ packages: readable-stream: 3.6.0 dev: true - /bluebird/3.4.7: - resolution: {integrity: sha512-iD3898SR7sWVRHbiQv+sHUtHnMvC1o3nW5rAcqnq3uOn07DSAppZYUkIGslDz6gXC7HfunPe7YVBgoEJASPcHA==} - dev: true - /bluebird/3.7.2: resolution: {integrity: sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==} dev: true @@ -2732,11 +2746,6 @@ packages: node-releases: 2.0.5 picocolors: 1.0.0 - /buffer-indexof-polyfill/1.0.2: - resolution: {integrity: sha512-I7wzHwA3t1/lwXQh+A5PbNvJxgfo5r3xulgpYDB5zckTu/Z9oUK9biouBKQUjEqzaz3HnAT6TYoovmE+GqSf7A==} - engines: {node: '>=0.10'} - dev: true - /buffer/5.7.1: resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} dependencies: @@ -2751,11 +2760,6 @@ packages: ieee754: 1.2.1 dev: false - /buffers/0.1.1: - resolution: {integrity: sha512-9q/rDEGSb/Qsvv2qvzIzdluL5k7AaJOTrw23z9reQthrbF7is4CtlT0DXyO1oei2DCp4uojjzQ7igaSHp1kAEQ==} - engines: {node: '>=0.2.0'} - dev: true - /c8/7.11.3: resolution: {integrity: sha512-6YBmsaNmqRm9OS3ZbIiL2EZgi1+Xc4O24jL3vMYGE6idixYuGdy76rIfIdltSKDj9DpLNrcXSonUTR1miBD0wA==} engines: {node: '>=10.12.0'} @@ -2831,12 +2835,6 @@ packages: type-detect: 4.0.8 dev: true - /chainsaw/0.1.0: - resolution: {integrity: sha512-75kWfWt6MEKNC8xYXIdRpDehRYY/tNSgwKaJq+dbbDcxORuVrrQ+SEHoWsniVn9XPYfP4gmdWIeDk/4YNp1rNQ==} - dependencies: - traverse: 0.3.9 - dev: true - /chalk/2.4.2: resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} engines: {node: '>=4'} @@ -3852,23 +3850,17 @@ packages: is-obj: 2.0.0 dev: true - /duplexer2/0.1.4: - resolution: {integrity: sha512-asLFVfWWtJ90ZyOUHMqk7/S2w2guQKxUI2itj3d92ADHhxUSbCMGi1f1cBcJ7xM1To+pE/Khbwo1yuNbMEPKeA==} - dependencies: - readable-stream: 2.3.7 - dev: true - /electron-to-chromium/1.4.147: resolution: {integrity: sha512-czclPqxLMPqPMkahKcske4TaS5lcznsc26ByBlEFDU8grTBVK9C5W6K9I6oEEhm4Ai4jTihGnys90xY1yjXcRg==} - /element-plus/2.2.4_vue@3.2.37: - resolution: {integrity: sha512-jktZr0o3ARDxWNWPEaJZQm2BN7thTpQl0aIfCUo5eB5m+zEap2DEcojyGKMHSQsCULcPM32NFfu2sHlhbhOiGA==} + /element-plus/2.2.6_vue@3.2.37: + resolution: {integrity: sha512-N9G4yWSxDt1YtreCJgt7UaSsXKuR4Fzb3ThzlBjbGDYDhcHijsrLL3qkdLZgeoSB13LRyr9pgP1ljNXdaYGa+g==} peerDependencies: vue: ^3.2.0 dependencies: '@ctrl/tinycolor': 3.4.1 '@element-plus/icons-vue': 2.0.5_vue@3.2.37 - '@floating-ui/dom': 0.5.2 + '@floating-ui/dom': 0.5.4 '@popperjs/core': /@sxzz/popperjs-es/2.11.7 '@types/lodash': 4.14.182 '@types/lodash-es': 4.17.6 @@ -4716,16 +4708,6 @@ packages: dev: true optional: true - /fstream/1.0.12: - resolution: {integrity: sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==} - engines: {node: '>=0.6'} - dependencies: - graceful-fs: 4.2.10 - inherits: 2.0.4 - mkdirp: 0.5.6 - rimraf: 2.7.1 - dev: true - /function-bind/1.1.1: resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} dev: true @@ -5583,10 +5565,6 @@ packages: supports-color: 8.1.1 dev: true - /listenercount/1.0.1: - resolution: {integrity: sha512-3mk/Zag0+IJxeDrxSgaDPy4zZ3w05PRZeJNnlWhzFz5OkX49J4krc+A8X2d2M69vGMBEX0uyl8M+W+8gH+kBqQ==} - dev: true - /listr2/3.14.0_enquirer@2.3.6: resolution: {integrity: sha512-TyWI8G99GX9GjE54cJ+RrNMcIFBfwMPxc3XTFiAYGN4s10hWROGtOg7+O6u6LE3mNkyld7RSLE6nrKBvTfcs3g==} engines: {node: '>=10.0.0'} @@ -5905,13 +5883,6 @@ packages: resolution: {integrity: sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==} dev: true - /mkdirp/0.5.6: - resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} - hasBin: true - dependencies: - minimist: 1.2.6 - dev: true - /mkdirp/1.0.4: resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} engines: {node: '>=10'} @@ -6707,13 +6678,6 @@ packages: resolution: {integrity: sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==} dev: true - /rimraf/2.7.1: - resolution: {integrity: sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==} - hasBin: true - dependencies: - glob: 7.2.3 - dev: true - /rimraf/3.0.2: resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} hasBin: true @@ -6847,10 +6811,6 @@ packages: resolution: {integrity: sha1-BF+XgtARrppoA93TgrJDkrPYkPc=} dev: false - /setimmediate/1.0.5: - resolution: {integrity: sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=} - dev: true - /shebang-command/2.0.0: resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} engines: {node: '>=8'} @@ -7218,7 +7178,7 @@ packages: dev: true /to-fast-properties/2.0.0: - resolution: {integrity: sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=} + resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} engines: {node: '>=4'} /to-regex-range/5.0.1: @@ -7248,10 +7208,6 @@ packages: punycode: 2.1.1 dev: true - /traverse/0.3.9: - resolution: {integrity: sha1-cXuPIgzAu3tE5AUUwisui7xw2Lk=} - dev: true - /trim-newlines/3.0.1: resolution: {integrity: sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==} engines: {node: '>=8'} @@ -7410,21 +7366,6 @@ packages: engines: {node: '>= 10.0.0'} dev: true - /unzipper/0.10.11: - resolution: {integrity: sha512-+BrAq2oFqWod5IESRjL3S8baohbevGcVA+teAIOYWM3pDVdseogqbzhhvvmiyQrUNKFUnDMtELW3X8ykbyDCJw==} - dependencies: - big-integer: 1.6.51 - binary: 0.3.0 - bluebird: 3.4.7 - buffer-indexof-polyfill: 1.0.2 - duplexer2: 0.1.4 - fstream: 1.0.12 - graceful-fs: 4.2.10 - listenercount: 1.0.1 - readable-stream: 2.3.7 - setimmediate: 1.0.5 - dev: true - /upath/2.0.1: resolution: {integrity: sha512-1uEe95xksV1O0CYKXo8vQvN1JEbtJp7lb7C5U9HMsIp6IVwntkH/oNUzyVNQSd4S1sYk2FpSSW44FqMc8qee5w==} engines: {node: '>=4'} @@ -7735,11 +7676,14 @@ packages: resolution: {integrity: sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==} dev: true - /vue-tsc/0.0.24: - resolution: {integrity: sha512-Qx0V7jkWMtvddtaWa1SA8YKkBCRmjq9zZUB2UIMZiso6JSH538oHD2VumSzkoDnAfFbY3t0/j1mB2abpA0bGWA==} + /vue-tsc/0.38.2_typescript@4.7.3: + resolution: {integrity: sha512-+OMmpw9BZC9khul3I1HGtWchv7BCiaM7NvfdilVAiOFkjnivIoaW6jJm6YPQJaEPouePtpkDUWovyzgNxWdDsw==} hasBin: true + peerDependencies: + typescript: '*' dependencies: - unzipper: 0.10.11 + '@volar/vue-typescript': 0.38.2 + typescript: 4.7.3 dev: true /vue/2.6.14: diff --git a/runtime/vue2/package-lock.json b/runtime/vue2/package-lock.json index 4495d9d2..d54c0524 100644 --- a/runtime/vue2/package-lock.json +++ b/runtime/vue2/package-lock.json @@ -1,15 +1,15 @@ { "name": "runtime-vue2", - "version": "1.0.1", + "version": "1.0.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "runtime-vue2", - "version": "1.0.1", + "version": "1.0.2", "dependencies": { - "@tmagic/schema": "1.0.1", - "@tmagic/stage": "1.0.1", + "@tmagic/schema": "1.0.2", + "@tmagic/stage": "1.0.2", "@vue/composition-api": "1.0.5", "vue": "^2.6.14" }, @@ -846,11 +846,11 @@ } }, "node_modules/@tmagic/core": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@tmagic/core/-/core-1.0.1.tgz", - "integrity": "sha512-76hUQ3cfp73td63yWInUG09trZDD7fZJen1mkfFHvPY4LTpZYdnqGvHVcWGkh8dXSR8tZxkK7nm4HjmuZMO2eA==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@tmagic/core/-/core-1.0.2.tgz", + "integrity": "sha512-gYvzkCwd8wbLmx7/J2aEXINnRapuRgGHUmtmyIE2gq8iLG3yFA/7RBcgQH1ZXiVMZAx+qL1XvJUVWPKQSJT4PQ==", "dependencies": { - "@tmagic/schema": "1.0.1", + "@tmagic/schema": "1.0.2", "events": "^3.3.0" }, "engines": { @@ -858,22 +858,22 @@ } }, "node_modules/@tmagic/schema": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@tmagic/schema/-/schema-1.0.1.tgz", - "integrity": "sha512-st5FrTnZL21a/eHhbFgVA96FV784FzlBHrPza7Ozswko/O4Lg5Daf7lvqY3agIlrj0J/JjWBlE6x6Ka8UQEE5w==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@tmagic/schema/-/schema-1.0.2.tgz", + "integrity": "sha512-PvN1ODMT3CwLpRSx98Y9dXpzpYoL6WkyWICI0EGk6pCFNLtc/8DniO4zwji7ndCWI7w+hOzsj+riyWqIzKvWVg==", "engines": { "node": ">=14" } }, "node_modules/@tmagic/stage": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@tmagic/stage/-/stage-1.0.1.tgz", - "integrity": "sha512-TEkBTrTZnARmeRECGUZxBb2sRccuN5YrzL4NPKb3nX1Ezr9vF1XYJaO2F+7odDSuacHPjDZia1HigoJ+t5qPSg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@tmagic/stage/-/stage-1.0.2.tgz", + "integrity": "sha512-xG+qFxGP7zz5KhygKywI2F4HQqdbzT08UEx4wQU2ptgWaX5XmCujK1XEjdMmOapIJlKCymqF4AJhshG54xf3oA==", "dependencies": { "@scena/guides": "^0.17.0", - "@tmagic/core": "1.0.1", - "@tmagic/schema": "1.0.1", - "@tmagic/utils": "1.0.1", + "@tmagic/core": "1.0.2", + "@tmagic/schema": "1.0.2", + "@tmagic/utils": "1.0.2", "events": "^3.3.0", "lodash-es": "^4.17.21", "moveable": "^0.30.0", @@ -884,11 +884,11 @@ } }, "node_modules/@tmagic/utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@tmagic/utils/-/utils-1.0.1.tgz", - "integrity": "sha512-r7XmJcMZ3DBIWteWrDUH+JnDoCMJGvJMb63EDqricdWhlKbb0JfnGlth6Xjugts9PXouiunMZO4A80HtNBgtoQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@tmagic/utils/-/utils-1.0.2.tgz", + "integrity": "sha512-gyT/kJjxZjOLxwwShShdESsC5fPF1eqW0aDD0KsxOVjML9WOTeoLBfVPq4oFW/5p8/xQ18a/lCkD+5Spq2pyDA==", "dependencies": { - "@tmagic/schema": "1.0.1", + "@tmagic/schema": "1.0.2", "moment": "^2.29.2" }, "engines": { @@ -3415,28 +3415,28 @@ } }, "@tmagic/core": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@tmagic/core/-/core-1.0.1.tgz", - "integrity": "sha512-76hUQ3cfp73td63yWInUG09trZDD7fZJen1mkfFHvPY4LTpZYdnqGvHVcWGkh8dXSR8tZxkK7nm4HjmuZMO2eA==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@tmagic/core/-/core-1.0.2.tgz", + "integrity": "sha512-gYvzkCwd8wbLmx7/J2aEXINnRapuRgGHUmtmyIE2gq8iLG3yFA/7RBcgQH1ZXiVMZAx+qL1XvJUVWPKQSJT4PQ==", "requires": { - "@tmagic/schema": "1.0.1", + "@tmagic/schema": "1.0.2", "events": "^3.3.0" } }, "@tmagic/schema": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@tmagic/schema/-/schema-1.0.1.tgz", - "integrity": "sha512-st5FrTnZL21a/eHhbFgVA96FV784FzlBHrPza7Ozswko/O4Lg5Daf7lvqY3agIlrj0J/JjWBlE6x6Ka8UQEE5w==" + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@tmagic/schema/-/schema-1.0.2.tgz", + "integrity": "sha512-PvN1ODMT3CwLpRSx98Y9dXpzpYoL6WkyWICI0EGk6pCFNLtc/8DniO4zwji7ndCWI7w+hOzsj+riyWqIzKvWVg==" }, "@tmagic/stage": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@tmagic/stage/-/stage-1.0.1.tgz", - "integrity": "sha512-TEkBTrTZnARmeRECGUZxBb2sRccuN5YrzL4NPKb3nX1Ezr9vF1XYJaO2F+7odDSuacHPjDZia1HigoJ+t5qPSg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@tmagic/stage/-/stage-1.0.2.tgz", + "integrity": "sha512-xG+qFxGP7zz5KhygKywI2F4HQqdbzT08UEx4wQU2ptgWaX5XmCujK1XEjdMmOapIJlKCymqF4AJhshG54xf3oA==", "requires": { "@scena/guides": "^0.17.0", - "@tmagic/core": "1.0.1", - "@tmagic/schema": "1.0.1", - "@tmagic/utils": "1.0.1", + "@tmagic/core": "1.0.2", + "@tmagic/schema": "1.0.2", + "@tmagic/utils": "1.0.2", "events": "^3.3.0", "lodash-es": "^4.17.21", "moveable": "^0.30.0", @@ -3444,11 +3444,11 @@ } }, "@tmagic/utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@tmagic/utils/-/utils-1.0.1.tgz", - "integrity": "sha512-r7XmJcMZ3DBIWteWrDUH+JnDoCMJGvJMb63EDqricdWhlKbb0JfnGlth6Xjugts9PXouiunMZO4A80HtNBgtoQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@tmagic/utils/-/utils-1.0.2.tgz", + "integrity": "sha512-gyT/kJjxZjOLxwwShShdESsC5fPF1eqW0aDD0KsxOVjML9WOTeoLBfVPq4oFW/5p8/xQ18a/lCkD+5Spq2pyDA==", "requires": { - "@tmagic/schema": "1.0.1", + "@tmagic/schema": "1.0.2", "moment": "^2.29.2" } }, diff --git a/runtime/vue3/package.json b/runtime/vue3/package.json index 3eeb8ba1..bbce2724 100644 --- a/runtime/vue3/package.json +++ b/runtime/vue3/package.json @@ -25,6 +25,6 @@ "sass": "^1.35.1", "typescript": "^4.3.4", "vite": "^2.3.7", - "vue-tsc": "^0.0.24" + "vue-tsc": "^0.38.2" } } diff --git a/tsconfig.json b/tsconfig.json index e53bbd93..98c01e46 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,14 +4,14 @@ "module": "esnext", "strict": true, "jsx": "preserve", - "importHelpers": true, "moduleResolution": "node", - "experimentalDecorators": true, - "emitDecoratorMetadata": true, "skipLibCheck": true, "esModuleInterop": true, - "resolveJsonModule": true, "allowSyntheticDefaultImports": true, + "importHelpers": true, + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "resolveJsonModule": true, "sourceMap": true, "baseUrl": ".", "lib": [