Skip to content

Commit

Permalink
[project] update import paths to avoid API extraction bugs (#221)
Browse files Browse the repository at this point in the history
* fix: update import paths to avoid API extraction bugs

* fix: add changelogs

---------

Co-authored-by: Rohan Bansal <[email protected]>
  • Loading branch information
Alchez and Rohan Bansal authored Dec 16, 2024
1 parent 1d44aae commit b22bdba
Show file tree
Hide file tree
Showing 118 changed files with 588 additions and 644 deletions.
11 changes: 0 additions & 11 deletions aform/config/api-extractor.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,5 @@
"docModel": {
"enabled": true,
"projectFolderUrl": "https://github.com/agritheory/stonecrop/tree/development/aform"
},

"messages": {
"extractorMessageReporting": {
// Disable this validation at your own risk: Processing an incorrect file type
// may lead to other errors. Function bodies may incorrectly get emitted in the
// .d.ts rollup.
"ae-wrong-input-file-type": {
"logLevel": "none"
}
}
}
}
2 changes: 1 addition & 1 deletion aform/src/components/AForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<script setup lang="ts">
import { ref, computed } from 'vue'
import type { SchemaTypes } from '@/types'
import type { SchemaTypes } from '../types'
const emit = defineEmits(['update:modelValue'])
const { modelValue, data, readonly } = defineProps<{
Expand Down
2 changes: 1 addition & 1 deletion aform/src/components/form/ACheckbox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<script setup lang="ts">
import { InputHTMLAttributes } from 'vue'
import { ComponentProps } from '@/types'
import { ComponentProps } from '../../types'
const { label, required, readonly, uuid, validation = { errorMessage: '&nbsp;' } } = defineProps<ComponentProps>()
const checkbox = defineModel<InputHTMLAttributes['checked']>()
Expand Down
2 changes: 1 addition & 1 deletion aform/src/components/form/ADate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<script setup lang="ts">
import { useTemplateRef } from 'vue'
import { ComponentProps } from '@/types'
import { ComponentProps } from '../../types'
const {
label = 'Date',
Expand Down
6 changes: 3 additions & 3 deletions aform/src/components/form/AFieldset.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
<script setup lang="ts">
import { ref } from 'vue'
import CollapseButton from '@/components/base/CollapseButton.vue'
import AForm from '@/components/AForm.vue'
import { SchemaTypes } from '@/types'
import CollapseButton from '../base/CollapseButton.vue'
import AForm from '../AForm.vue'
import { SchemaTypes } from '../../types'
const { schema, label, collapsible, data } = defineProps<{
schema: SchemaTypes[]
Expand Down
2 changes: 1 addition & 1 deletion aform/src/components/form/ANumericInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</template>

<script setup lang="ts">
import { ComponentProps } from '@/types'
import { ComponentProps } from '../../types'
const { label, required, readonly, uuid, validation = { errorMessage: '&nbsp;' } } = defineProps<ComponentProps>()
const inputNumber = defineModel<number>()
Expand Down
4 changes: 2 additions & 2 deletions aform/src/components/form/ATextInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
<script setup lang="ts">
import { /* inject, */ ref } from 'vue'
import { useStringMask as vMask } from '@/directives/mask'
import { ComponentProps } from '@/types'
import { useStringMask as vMask } from '../../directives/mask'
import { ComponentProps } from '../../types'
const { label, mask, required, readonly, uuid, validation = { errorMessage: '&nbsp;' } } = defineProps<ComponentProps>()
Expand Down
2 changes: 1 addition & 1 deletion aform/src/directives/mask.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { DirectiveBinding } from 'vue'

import type { FormSchema } from '@/types'
import type { FormSchema } from '../types'

const NAMED_MASKS = {
date: '##/##/####',
Expand Down
1 change: 1 addition & 0 deletions aform/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export type { CellContext, TableConfig, TableColumn, TableRow } from '@stonecrop/atable'
import { App } from 'vue'

import ACheckbox from './components/form/ACheckbox.vue'
Expand Down
2 changes: 1 addition & 1 deletion aform/src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,6 @@ export type FieldsetSchema = BasicSchema & {

/**
* Superset of schema types
* @public
* @beta
*/
export type SchemaTypes = FormSchema | TableSchema | FieldsetSchema
2 changes: 1 addition & 1 deletion aform/tests/checkbox.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { describe, it, expect } from 'vitest'
import { mount } from '@vue/test-utils'

import ACheckbox from '@/components/form/ACheckbox.vue'
import ACheckbox from '../src/components/form/ACheckbox.vue'

describe('checkbox component', () => {
let wrapper = mount(ACheckbox, {
Expand Down
2 changes: 1 addition & 1 deletion aform/tests/collapse.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { describe, it, expect } from 'vitest'
import { mount } from '@vue/test-utils'

import CollapseButton from '@/components/base/CollapseButton.vue'
import CollapseButton from '../src/components/base/CollapseButton.vue'

describe('numeric input component', () => {
it('apply specific class based on collapsed input', async () => {
Expand Down
2 changes: 1 addition & 1 deletion aform/tests/date.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { describe, it, expect } from 'vitest'
import { mount } from '@vue/test-utils'

import ADate from '@/components/form/ADate.vue'
import ADate from '../src/components/form/ADate.vue'

describe('date component', () => {
it('date input is rendered', async () => {
Expand Down
2 changes: 1 addition & 1 deletion aform/tests/datepicker.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { describe, it, expect } from 'vitest'
import { mount } from '@vue/test-utils'

import ADatePicker from '@/components/form/ADatePicker.vue'
import ADatePicker from '../src/components/form/ADatePicker.vue'

describe('datepicker component', () => {
it('emits update event when date is changed', async () => {
Expand Down
2 changes: 1 addition & 1 deletion aform/tests/dropdown.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { describe, it, expect } from 'vitest'
import { mount } from '@vue/test-utils'

import ADropdown from '@/components/form/ADropdown.vue'
import ADropdown from '../src/components/form/ADropdown.vue'

describe('dropdown input component', () => {
const dropdownData = {
Expand Down
2 changes: 1 addition & 1 deletion aform/tests/fieldset.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { describe, it, expect } from 'vitest'
import { mount } from '@vue/test-utils'

import AFieldset from '@/components/form/AFieldset.vue'
import AFieldset from '../src/components/form/AFieldset.vue'

describe('fieldset input component', () => {
it('no change in collapse status when fieldset is uncollapsible', async () => {
Expand Down
2 changes: 1 addition & 1 deletion aform/tests/login.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { describe, it, expect } from 'vitest'
import { mount } from '@vue/test-utils'

import Login from '@/components/utilities/Login.vue'
import Login from '../src/components/utilities/Login.vue'

describe('login component', () => {
it('mount the login component', async () => {
Expand Down
2 changes: 1 addition & 1 deletion aform/tests/numeric.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { describe, it, expect } from 'vitest'
import { mount } from '@vue/test-utils'

import ANumericInput from '@/components/form/ANumericInput.vue'
import ANumericInput from '../src/components/form/ANumericInput.vue'

describe('numeric input component', () => {
const numericInputModel = 25
Expand Down
2 changes: 1 addition & 1 deletion aform/tests/text.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { describe, it, expect } from 'vitest'
import { mount } from '@vue/test-utils'

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

describe('text input component', () => {
it('skip input mask when one is not provided', async () => {
Expand Down
6 changes: 1 addition & 5 deletions aform/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
"extends": "../tsconfig.json",
"compilerOptions": {
"tsBuildInfoFile": "./dist/aform.tsbuildinfo",
"types": ["vitest/globals", "vitest/jsdom"],
"paths": {
"@/*": ["./src/*"],
"types/*": ["./src/types/*"]
}
"types": ["vitest/globals", "vitest/jsdom"]
},
"include": ["src/**/*.ts", "src/**/*.vue", "tests/**/*.spec.ts", "tests/**/*.ts", "tests/**/*.vue"]
}
6 changes: 0 additions & 6 deletions aform/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ const projectRootDir = resolve(__dirname)

export default defineConfig({
plugins: [vue(), libInjectCss()],
resolve: {
alias: {
'@': resolve(projectRootDir, 'src'),
types: resolve(projectRootDir, 'src/types'),
},
},
build: {
emptyOutDir: false,
sourcemap: true,
Expand Down
11 changes: 0 additions & 11 deletions atable/config/api-extractor.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,5 @@
"docModel": {
"enabled": true,
"projectFolderUrl": "https://github.com/agritheory/stonecrop/tree/development/atable"
},

"messages": {
"extractorMessageReporting": {
// Disable this validation at your own risk: Processing an incorrect file type
// may lead to other errors. Function bodies may incorrectly get emitted in the
// .d.ts rollup.
"ae-wrong-input-file-type": {
"logLevel": "none"
}
}
}
}
4 changes: 2 additions & 2 deletions atable/src/components/ACell.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ import { vOnClickOutside } from '@vueuse/components'
import { useElementBounding } from '@vueuse/core'
import { computed, CSSProperties, ref, useTemplateRef } from 'vue'
import { createTableStore } from '@/stores/table'
import { isHtmlString } from '@/utils'
import { createTableStore } from '../stores/table'
import { isHtmlString } from '../utils'
const {
colIndex,
Expand Down
2 changes: 1 addition & 1 deletion atable/src/components/AExpansionRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import { type KeypressHandlers, useKeyboardNav } from '@stonecrop/utilities'
import { computed, useTemplateRef } from 'vue'
import { createTableStore } from '@/stores/table'
import { createTableStore } from '../stores/table'
const {
rowIndex,
Expand Down
2 changes: 1 addition & 1 deletion atable/src/components/ARow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import { type KeypressHandlers, useKeyboardNav, defaultKeypressHandlers } from '@stonecrop/utilities'
import { useTemplateRef } from 'vue'
import { createTableStore } from '@/stores/table'
import { createTableStore } from '../stores/table'
const {
rowIndex,
Expand Down
12 changes: 6 additions & 6 deletions atable/src/components/ATable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@
import { useMutationObserver } from '@vueuse/core'
import { nextTick, watch, onMounted, useTemplateRef } from 'vue'
import ACell from '@/components/ACell.vue'
import ARow from '@/components/ARow.vue'
import ATableHeader from '@/components/ATableHeader.vue'
import ATableModal from '@/components/ATableModal.vue'
import { createTableStore } from '@/stores/table'
import type { TableColumn, TableConfig, TableRow } from '@/types'
import ACell from './ACell.vue'
import ARow from './ARow.vue'
import ATableHeader from './ATableHeader.vue'
import ATableModal from './ATableModal.vue'
import { createTableStore } from '../stores/table'
import type { TableColumn, TableConfig, TableRow } from '../types'
const {
id,
Expand Down
4 changes: 2 additions & 2 deletions atable/src/components/ATableHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
</template>

<script setup lang="ts">
import { createTableStore } from '@/stores/table'
import type { TableColumn } from '@/types'
import { createTableStore } from '../stores/table'
import type { TableColumn } from '../types'
const { columns, store } = defineProps<{
columns: TableColumn[]
Expand Down
2 changes: 1 addition & 1 deletion atable/src/components/ATableModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</template>

<script setup lang="ts">
import { createTableStore } from '@/stores/table'
import { createTableStore } from '../stores/table'
/* const { colIndex, rowIndex, store } = */ defineProps<{
colIndex?: number
Expand Down
2 changes: 1 addition & 1 deletion atable/src/stores/table.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { defineStore } from 'pinia'
import { type CSSProperties, computed, ref } from 'vue'

import type { CellContext, TableColumn, TableConfig, TableDisplay, TableModal, TableRow } from '@/types'
import type { CellContext, TableColumn, TableConfig, TableDisplay, TableModal, TableRow } from '../types'

/**
* Create a table store
Expand Down
2 changes: 1 addition & 1 deletion atable/tests/cell.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { setActivePinia, createPinia } from 'pinia'
import { describe, it, expect, beforeEach } from 'vitest'
import { mount } from '@vue/test-utils'

import ATable from '@/components/ATable.vue'
import ATable from '../src/components/ATable.vue'
import data from './data/http_logs.json'

describe('table cell component', () => {
Expand Down
2 changes: 1 addition & 1 deletion atable/tests/modal.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { createPinia, setActivePinia } from 'pinia'
import { describe, it, expect, beforeEach } from 'vitest'
import { mount } from '@vue/test-utils'

import ATable from '@/components/ATable.vue'
import ATable from '../src/components/ATable.vue'
import data from './data/http_logs.json'

describe('table modal component', () => {
Expand Down
2 changes: 1 addition & 1 deletion atable/tests/row.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { createPinia, setActivePinia } from 'pinia'
import { describe, it, expect, beforeEach } from 'vitest'
import { mount } from '@vue/test-utils'

import ATable from '@/components/ATable.vue'
import ATable from '../src/components/ATable.vue'
import listData from './data/http_logs.json'

describe('table row component', () => {
Expand Down
2 changes: 1 addition & 1 deletion atable/tests/table.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { createPinia, setActivePinia } from 'pinia'
import { describe, it, expect, beforeEach } from 'vitest'
import { mount } from '@vue/test-utils'

import ATable from '@/components/ATable.vue'
import ATable from '../src/components/ATable.vue'
import data from './data/http_logs.json'

describe('table component', () => {
Expand Down
6 changes: 1 addition & 5 deletions atable/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
"extends": "../tsconfig.json",
"compilerOptions": {
"tsBuildInfoFile": "./dist/atable.tsbuildinfo",
"types": ["vitest/globals", "vitest/jsdom"],
"paths": {
"@/*": ["./src/*"],
"types/*": ["./src/types/*"]
}
"types": ["vitest/globals", "vitest/jsdom"]
},
"include": ["src/**/*.ts", "src/**/*.vue", "tests/**/*.ts", "tests/**/*.vue"]
}
6 changes: 0 additions & 6 deletions atable/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ const projectRootDir = resolve(__dirname)

export default defineConfig({
plugins: [vue(), libInjectCss()],
resolve: {
alias: {
'@': resolve(projectRootDir, 'src'),
types: resolve(projectRootDir, 'src/types'),
},
},
server: {
fs: {
allow: ['..'],
Expand Down
11 changes: 0 additions & 11 deletions beam/config/api-extractor.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,5 @@
"docModel": {
"enabled": true,
"projectFolderUrl": "https://github.com/agritheory/stonecrop/tree/development/beam"
},

"messages": {
"extractorMessageReporting": {
// Disable this validation at your own risk: Processing an incorrect file type
// may lead to other errors. Function bodies may incorrectly get emitted in the
// .d.ts rollup.
"ae-wrong-input-file-type": {
"logLevel": "none"
}
}
}
}
2 changes: 1 addition & 1 deletion beam/src/components/BeamDayDivider.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<script setup lang="ts">
import { defineProps, computed } from 'vue'
import type { ListViewItem } from '@/types'
import type { ListViewItem } from '../types'
defineSlots<{ default(): any }>()
const { item } = defineProps<{ item: ListViewItem }>()
Expand Down
6 changes: 3 additions & 3 deletions beam/src/components/ListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
<script setup lang="ts">
import { ref, watch } from 'vue'
import ItemCount from '@/components/ItemCount.vue'
import ItemCheck from '@/components/ItemCheck.vue'
import type { ListViewItem } from '@/types'
import ItemCount from './ItemCount.vue'
import ItemCheck from './ItemCheck.vue'
import type { ListViewItem } from '../types'
const { item } = defineProps<{ item: ListViewItem }>()
const emit = defineEmits<{ update: [item: ListViewItem] }>()
Expand Down
Loading

0 comments on commit b22bdba

Please sign in to comment.