Skip to content

Commit 78fa6db

Browse files
[8.x] JS Imports (#1242)
* wip * Fix styling * Uncomment .css input * Use the chart.js library directly It was erroring out since it couldn't resolve Vue.js, probably because Statamic puts it on the window instead of us pulling it in ourselves. * Update imports * Use runway dev-master --------- Co-authored-by: duncanmcclean <duncanmcclean@users.noreply.github.com>
1 parent ce99dbd commit 78fa6db

23 files changed

Lines changed: 98 additions & 97 deletions

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"phpunit/phpunit": "^11.0",
5050
"spatie/ray": "^1.17",
5151
"spatie/test-time": "^1.3",
52-
"statamic-rad-pack/runway": "dev-statamic-6"
52+
"statamic-rad-pack/runway": "dev-master"
5353
},
5454
"config": {
5555
"optimize-autoloader": true,

package.json

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,15 @@
11
{
22
"scripts": {
3-
"dev": "vite",
3+
"dev": "vite build --watch",
44
"build": "vite build"
55
},
66
"dependencies": {
7-
"@floating-ui/dom": "^1.2.5",
8-
"@shopify/draggable": "^1.0.0-beta.8",
7+
"@statamic/cms": "file:./vendor/statamic/cms/resources/js/package",
98
"axios": "^0.21.1",
10-
"cross-env": "^7.0.2",
11-
"marked": "^4.0.12",
12-
"underscore": "^1.13.2",
13-
"uniqid": "^5.4.0",
14-
"vite-svg-loader": "^5.1.0",
15-
"vue-chartjs": "^5.3.2"
9+
"chart.js": "^4.5.0"
1610
},
1711
"devDependencies": {
18-
"@vitejs/plugin-vue": "^5.2.3",
1912
"laravel-vite-plugin": "^1.2.0",
20-
"vite": "^6.3.4",
21-
"vite-plugin-externals": "^0.6.2"
13+
"vite": "^6.3.4"
2214
}
2315
}

resources/js/components/Fieldtypes/CountryRegionFieldtype.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
<script>
1616
import axios from 'axios'
17-
import { FieldtypeMixin } from 'statamic'
18-
import { Select } from '@statamic/ui'
17+
import { FieldtypeMixin } from '@statamic/cms'
18+
import { Select } from '@statamic/cms/ui'
1919
2020
export default {
2121
mixins: [FieldtypeMixin],

resources/js/components/Fieldtypes/CouponCodeFieldtype.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
</template>
1010

1111
<script>
12-
import { FieldtypeMixin } from 'statamic';
13-
import { Input } from '@statamic/ui';
12+
import { FieldtypeMixin } from '@statamic/cms';
13+
import { Input } from '@statamic/cms/ui';
1414
1515
export default {
1616
name: 'CouponCodeFieldtype',

resources/js/components/Fieldtypes/CouponSummaryFieldtype.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
</template>
4242

4343
<script>
44-
import { FieldtypeMixin } from 'statamic';
44+
import { FieldtypeMixin } from '@statamic/cms';
4545
4646
export default {
4747
name: 'CouponSummaryFieldtype',

resources/js/components/Fieldtypes/CouponValueFieldtype.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
</template>
2323

2424
<script>
25-
import { FieldtypeMixin } from 'statamic';
25+
import { FieldtypeMixin } from '@statamic/cms';
2626
2727
export default {
2828
name: 'CouponValueFieldtype',

resources/js/components/Fieldtypes/GatewayFieldtype.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@
5050
</template>
5151

5252
<script>
53-
import { FieldtypeMixin, ItemActions } from 'statamic'
54-
import { Dropdown, DropdownMenu, DropdownItem } from '@statamic/ui'
53+
import { FieldtypeMixin, ItemActions } from '@statamic/cms'
54+
import { Dropdown, DropdownMenu, DropdownItem } from '@statamic/cms/ui'
5555
5656
export default {
5757
name: 'gateway-fieldtype',

resources/js/components/Fieldtypes/MoneyFieldtype.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
</template>
99

1010
<script>
11-
import { FieldtypeMixin } from 'statamic';
12-
import { Input } from '@statamic/ui'
11+
import { FieldtypeMixin } from '@statamic/cms';
12+
import { Input } from '@statamic/cms/ui'
1313
1414
export default {
1515
name: 'money-fieldtype',

resources/js/components/Fieldtypes/OrderStatusFieldtype.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
</template>
99

1010
<script>
11-
import { FieldtypeMixin } from 'statamic';
12-
import { Badge } from '@statamic/ui'
11+
import { FieldtypeMixin } from '@statamic/cms';
12+
import { Badge } from '@statamic/cms/ui'
1313
1414
export default {
1515
name: 'order-status-fieldtype',

resources/js/components/Fieldtypes/OrderStatusIndexFieldtype.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
</template>
99

1010
<script>
11-
import { IndexFieldtypeMixin } from 'statamic';
12-
import { Badge } from '@statamic/ui'
11+
import { IndexFieldtypeMixin } from '@statamic/cms';
12+
import { Badge } from '@statamic/cms/ui'
1313
1414
export default {
1515
mixins: [IndexFieldtypeMixin],

0 commit comments

Comments
 (0)