Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/development' into fix-beam-ref…
Browse files Browse the repository at this point in the history
…actor
  • Loading branch information
Rohan Bansal committed Apr 18, 2024
2 parents 0c48981 + 6b7dd14 commit c7bb40a
Show file tree
Hide file tree
Showing 33 changed files with 152 additions and 65 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,10 @@ jobs:

- name: Coverage Report
if: always() # Also generate the report if tests are failing
uses: davelosert/vitest-coverage-report-action@v1
uses: davelosert/vitest-coverage-report-action@v2
with:
working-directory: ./aform
file-coverage-mode: 'all'
vite-config-path: './vite.config.ts'

atable:
Expand Down Expand Up @@ -93,7 +94,8 @@ jobs:

- name: Coverage Report
if: always() # Also generate the report if tests are failing
uses: davelosert/vitest-coverage-report-action@v1
uses: davelosert/vitest-coverage-report-action@v2
with:
working-directory: ./atable
file-coverage-mode: 'all'
vite-config-path: './vite.config.ts'
2 changes: 1 addition & 1 deletion aform/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,5 @@ module.exports = {
'@typescript-eslint/no-unsafe-return': 'off',
},

ignorePatterns: ['.eslintrc.cjs', '*.config.ts', 'node_modules/', 'dist/'],
ignorePatterns: ['.eslintrc.cjs', '*.config.ts', '*.spec.ts', 'node_modules/', 'dist/'],
}
2 changes: 1 addition & 1 deletion aform/dist/aform.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion aform/dist/aform.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion aform/dist/aform.umd.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion aform/dist/aform.umd.cjs.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion aform/dist/style.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions aform/src/components/AForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ const childModels = computed({
},
set: newValue => {
// Find the component in modelValue and update it
// eslint-disable-next-line vue/no-mutating-props
props.modelValue[i].value = newValue
emit('update:modelValue', props.modelValue)
},
Expand Down
5 changes: 3 additions & 2 deletions aform/tests/aform.spec.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { describe, it, expect } from 'vitest'
import { mount } from '@vue/test-utils'

import AForm from '@/components/AForm.vue'
import ATextInput from '@/components/form/ATextInput.vue'
import AForm from '../src/components/AForm.vue'
import ATextInput from '../src/components/form/ATextInput.vue'

describe('AForm Component', () => {
const form_schema = [
Expand All @@ -16,6 +16,7 @@ describe('AForm Component', () => {
const wrapper = mount(AForm, {
props: {
modelValue: form_schema,
data: {},
},
components: {
ATextInput,
Expand Down
9 changes: 4 additions & 5 deletions aform/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ export default defineConfig({
coverage: {
provider: 'v8',
thresholds: {
lines: 50,
branches: 50,
functions: 50,
statements: 50,
lines: 70,
branches: 70,
functions: 70,
statements: 70,
autoUpdate: true,
},
// required for Github Actions CI
Expand All @@ -67,7 +67,6 @@ export default defineConfig({
'**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*',
'**/.{eslint,mocha,prettier}rc.{js,cjs,yml}',
],
all: true,
skipFull: true,
},
},
Expand Down
2 changes: 1 addition & 1 deletion atable/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,5 @@ module.exports = {
'@typescript-eslint/no-unsafe-return': 'off',
},

ignorePatterns: ['.eslintrc.cjs', '*.config.ts', 'node_modules/', 'dist/'],
ignorePatterns: ['.eslintrc.cjs', '*.config.ts', '*.spec.ts', 'node_modules/', 'dist/'],
}
28 changes: 14 additions & 14 deletions atable/dist/atable.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion atable/dist/atable.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion atable/dist/atable.umd.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion atable/dist/atable.umd.cjs.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion atable/dist/style.css

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions atable/src/components/ATable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ provide(tableData.id, tableData)
watch(
() => tableData.rows,
(newValue, oldValue) => {
newValue => {
emit('update:modelValue', newValue)
},
{ deep: true }
Expand Down Expand Up @@ -139,11 +139,11 @@ const formatCell = (event?: KeyboardEvent, column?: TableColumn, cellData?: any)
}
}
const moveCursorToEnd = (target: HTMLElement) => {
target.focus()
document.execCommand('selectAll', false, null)
document.getSelection().collapseToEnd()
}
// const moveCursorToEnd = (target: HTMLElement) => {
// target.focus()
// document.execCommand('selectAll', false, null)
// document.getSelection().collapseToEnd()
// }
const clickOutside = (event: MouseEvent) => {
if (!tableData.modal.parent?.contains(event.target as HTMLElement)) {
Expand Down
2 changes: 1 addition & 1 deletion atable/stories/list.story.vue
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ const inbox = ref({
const chooseRandomData = (rows: any[]) => {
return Array(3)
.fill(0)
.map((_, i) => rows[Math.floor(Math.random() * rows.length)])
.map(() => rows[Math.floor(Math.random() * rows.length)])
}
const getRowCellStyle = (column: TableColumn): CSSProperties => {
Expand Down
9 changes: 4 additions & 5 deletions atable/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ export default defineConfig({
coverage: {
provider: 'v8',
thresholds: {
lines: 40,
branches: 40,
functions: 40,
statements: 40,
lines: 70,
branches: 70,
functions: 70,
statements: 70,
autoUpdate: true,
},
// required for Github Actions CI
Expand All @@ -71,7 +71,6 @@ export default defineConfig({
'**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*',
'**/.{eslint,mocha,prettier}rc.{js,cjs,yml}',
],
all: true,
skipFull: true,
},
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"comment": "update coverage report",
"type": "patch",
"packageName": "@stonecrop/aform"
}
],
"packageName": "@stonecrop/aform",
"email": "[email protected]"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"comment": "update coverage report",
"type": "patch",
"packageName": "@stonecrop/atable"
}
],
"packageName": "@stonecrop/atable",
"email": "[email protected]"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@stonecrop/code-editor",
"comment": "",
"type": "none"
}
],
"packageName": "@stonecrop/code-editor"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@stonecrop/desktop",
"comment": "",
"type": "none"
}
],
"packageName": "@stonecrop/desktop"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@stonecrop/node-editor",
"comment": "",
"type": "none"
}
],
"packageName": "@stonecrop/node-editor"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@stonecrop/stonecrop",
"comment": "",
"type": "none"
}
],
"packageName": "@stonecrop/stonecrop"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@stonecrop/themes",
"comment": "",
"type": "none"
}
],
"packageName": "@stonecrop/themes"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@stonecrop/utilities",
"comment": "",
"type": "none"
}
],
"packageName": "@stonecrop/utilities"
}
Loading

0 comments on commit c7bb40a

Please sign in to comment.