@signal24/vue-foundation 3.7.4 → 3.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,28 +1,39 @@
1
1
  {
2
2
  "name": "@signal24/vue-foundation",
3
- "version": "3.7.4",
3
+ "type": "module",
4
+ "version": "3.8.0",
4
5
  "description": "Common components, directives, and helpers for Vue 3 apps",
5
- "main": "src/index.js",
6
+ "main": "dist/vue-foundation.umd.js",
7
+ "module": "./dist/vue-foundation.es.js",
8
+ "exports": {
9
+ ".": {
10
+ "import": "./dist/vue-foundation.es.js",
11
+ "require": "./dist/vue-foundation.umd.js"
12
+ },
13
+ "./dist/vue-foundation.css": {
14
+ "import": "./dist/vue-foundation.css",
15
+ "require": "./dist/vue-foundation.css"
16
+ }
17
+ },
6
18
  "scripts": {
7
- "format": "prettier --write . && eslint src --fix"
19
+ "dev": "vite",
20
+ "build": "vite build",
21
+ "preview": "vite preview"
8
22
  },
9
23
  "license": "MIT",
10
24
  "dependencies": {
11
- "axios": "^0.26.0",
12
- "jquery": "^3.6.0",
25
+ "axios": "^0.27.2",
26
+ "jquery": "^3.6.4",
13
27
  "lodash": "^4.17.21",
14
- "moment": "^2.29.1",
15
- "vue-stash-nested": "fergusean/vue-stash-nested#vue-foundation-3"
28
+ "moment": "^2.29.4",
29
+ "vue-stash-nested": "fergusean/vue-stash-nested#vue-foundation-3",
30
+ "vue": "^3.2.47"
16
31
  },
17
32
  "devDependencies": {
18
- "@vue/eslint-config-prettier": "^7.0.0",
19
- "eslint": "^8.10.0",
20
- "eslint-plugin-prettier": "^4.0.0",
21
- "eslint-plugin-simple-import-sort": "^7.0.0",
22
- "eslint-plugin-vue": "^8.5.0",
23
- "prettier": "^2.5.1",
24
- "sass": "^1.49.9",
25
- "sass-loader": "^12",
26
- "vue": "^3.2.31"
33
+ "@vitejs/plugin-vue": "^4.1.0",
34
+ "autoprefixer": "^10.4.14",
35
+ "sass": "^1.59.3",
36
+ "vite": "^4.2.0",
37
+ "vue": "^3.2.47"
27
38
  }
28
39
  }
@@ -19,7 +19,7 @@
19
19
 
20
20
  <script>
21
21
  import app from '../app';
22
- import Modal from './modal';
22
+ import Modal from './modal.vue';
23
23
 
24
24
  const classDef = {
25
25
  components: {
@@ -1,12 +1,12 @@
1
1
  import app from '../app';
2
- import AjaxSelect from './ajax-select';
2
+ import AjaxSelect from './ajax-select.vue';
3
3
  app.component('AjaxSelect', AjaxSelect);
4
4
 
5
- import Alert from './alert';
5
+ import Alert from './alert.vue';
6
6
  app.component('Alert', Alert);
7
7
 
8
- import Modal from './modal';
8
+ import Modal from './modal.vue';
9
9
  app.component('Modal', Modal);
10
10
 
11
- import SmartSelect from './smart-select';
11
+ import SmartSelect from './smart-select.vue';
12
12
  app.component('SmartSelect', SmartSelect);
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <Teleport to="#vf-modal-target">
3
- <div class="vf-overlay vf-modal-wrap" :class="class">
3
+ <div :id="id" class="vf-overlay vf-modal-wrap" :class="class">
4
4
  <form
5
5
  action="."
6
6
  class="vf-modal"
@@ -24,7 +24,7 @@
24
24
 
25
25
  <script>
26
26
  export default {
27
- props: ['closeOnMaskClick', 'scrolls', 'closeX', 'class'],
27
+ props: ['id', 'closeOnMaskClick', 'scrolls', 'closeX', 'class'],
28
28
  emits: ['formSubmit'],
29
29
 
30
30
  beforeCreate() {
package/vite.config.js ADDED
@@ -0,0 +1,42 @@
1
+ import { fileURLToPath, URL } from 'node:url'
2
+ import { defineConfig } from 'vite'
3
+ import vue from '@vitejs/plugin-vue'
4
+ import path from 'path';
5
+
6
+ // https://vitejs.dev/config/
7
+ export default defineConfig({
8
+ plugins: [vue()],
9
+ build: {
10
+ cssCodeSplit: true,
11
+ lib: {
12
+ // Could also be a dictionary or array of multiple entry points
13
+ entry: "src/index.js",
14
+ name: 'vueFoundatation',
15
+ formats: ["es", "cjs", "umd"],
16
+ fileName: format => `vue-foundation.${format}.js`
17
+ },
18
+ rollupOptions: {
19
+ // make sure to externalize deps that should not be bundled
20
+ // into your library
21
+ input: {
22
+ main: path.resolve(__dirname, "src/index.js")
23
+ },
24
+ external: ['axios', 'jquery', 'lodash', 'moment', 'vue-stash-nested', 'vue'],
25
+ output: {
26
+ assetFileNames: (assetInfo) => {
27
+ if (assetInfo.name === 'index.css') return 'vue-foundation.css';
28
+ return assetInfo.name;
29
+ },
30
+ exports: "named",
31
+ globals: {
32
+ vue: 'Vue',
33
+ },
34
+ },
35
+ },
36
+ },
37
+ resolve: {
38
+ alias: {
39
+ '@': fileURLToPath(new URL('./src', import.meta.url))
40
+ }
41
+ }
42
+ })
File without changes