@signal24/vue-foundation 4.1.1 → 4.2.1

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,7 +1,7 @@
1
1
  {
2
2
  "name": "@signal24/vue-foundation",
3
3
  "type": "module",
4
- "version": "4.1.1",
4
+ "version": "4.2.1",
5
5
  "description": "Common components, directives, and helpers for Vue 3 apps",
6
6
  "module": "./dist/vue-foundation.es.js",
7
7
  "bin": {
@@ -9,7 +9,8 @@
9
9
  },
10
10
  "exports": {
11
11
  ".": {
12
- "import": "./dist/vue-foundation.es.js"
12
+ "import": "./dist/vue-foundation.es.js",
13
+ "types": "./dist/src/index.d.ts"
13
14
  },
14
15
  "./dist/vue-foundation.css": {
15
16
  "import": "./dist/vue-foundation.css",
@@ -35,36 +36,37 @@
35
36
  },
36
37
  "license": "MIT",
37
38
  "dependencies": {
38
- "date-fns": "^2.29.3",
39
+ "date-fns": "^2.30.0",
39
40
  "lodash": "^4.17.21",
40
- "type-fest": "^3.8.0",
41
- "vue": "^3.2.47"
41
+ "type-fest": "^3.11.0",
42
+ "vue": "^3.3.4"
42
43
  },
43
44
  "devDependencies": {
44
45
  "@nabla/vite-plugin-eslint": "^1.5.0",
45
46
  "@rushstack/eslint-patch": "^1.2.0",
47
+ "@tsconfig/node18": "^2.0.1",
46
48
  "@types/jsdom": "^21.1.1",
47
- "@types/lodash": "^4.14.192",
49
+ "@types/lodash": "^4.14.194",
48
50
  "@types/node": "^18.15.11",
49
- "@vitejs/plugin-vue": "^4.1.0",
51
+ "@vitejs/plugin-vue": "^4.2.3",
50
52
  "@vue/eslint-config-prettier": "^7.1.0",
51
- "@vue/eslint-config-typescript": "^11.0.2",
53
+ "@vue/eslint-config-typescript": "^11.0.3",
52
54
  "@vue/test-utils": "^2.3.2",
53
- "@vue/tsconfig": "^0.1.3",
54
- "cypress": "^12.9.0",
55
- "eslint": "^8.37.0",
56
- "eslint-plugin-cypress": "^2.13.2",
55
+ "@vue/tsconfig": "^0.4.0",
56
+ "cypress": "^12.12.0",
57
+ "eslint": "^8.41.0",
58
+ "eslint-plugin-cypress": "^2.13.3",
57
59
  "eslint-plugin-simple-import-sort": "^10.0.0",
58
60
  "eslint-plugin-unused-imports": "^2.0.0",
59
- "eslint-plugin-vue": "^9.10.0",
60
- "jsdom": "^21.1.1",
61
- "openapi-typescript-codegen": "^0.23.0",
62
- "prettier": "^2.8.7",
63
- "sass": "^1.60.0",
61
+ "eslint-plugin-vue": "^9.13.0",
62
+ "jsdom": "^22.0.0",
63
+ "openapi-typescript-codegen": "^0.24.0",
64
+ "prettier": "^2.8.8",
65
+ "sass": "^1.62.1",
64
66
  "start-server-and-test": "^2.0.0",
65
- "typescript": "~4.9.5",
66
- "vite": "^4.2.1",
67
- "vitest": "^0.29.8",
68
- "vue-tsc": "^1.3.12"
67
+ "typescript": "~5.0.4",
68
+ "vite": "^4.3.8",
69
+ "vitest": "^0.31.1",
70
+ "vue-tsc": "^1.6.5"
69
71
  }
70
72
  }
@@ -18,10 +18,9 @@
18
18
  </template>
19
19
 
20
20
  <script lang="ts" setup>
21
- import { computed, defineProps } from 'vue';
22
-
23
- import { formatError } from '@/helpers/error';
21
+ import { computed } from 'vue';
24
22
 
23
+ import { formatError } from '../helpers/error';
25
24
  import Modal from './modal.vue';
26
25
 
27
26
  const props = defineProps<{
@@ -4,7 +4,7 @@
4
4
 
5
5
  <script lang="ts" setup>
6
6
  import { isEqual } from 'lodash';
7
- import { computed, defineEmits, defineProps, ref, watch } from 'vue';
7
+ import { computed, ref, watch } from 'vue';
8
8
 
9
9
  import VfSmartSelect from './smart-select.vue';
10
10
 
@@ -18,7 +18,7 @@
18
18
  </template>
19
19
 
20
20
  <script lang="ts" setup>
21
- import { defineProps, getCurrentInstance, onBeforeUnmount, onMounted, ref } from 'vue';
21
+ import { getCurrentInstance, onBeforeUnmount, onMounted, ref } from 'vue';
22
22
 
23
23
  import { removeModalInjectionByInternalInstance } from './modal-container';
24
24
 
@@ -1,7 +1,7 @@
1
1
  import { format } from 'date-fns';
2
2
  import type { DirectiveBinding, ObjectDirective } from 'vue';
3
3
 
4
- import { VfOptions } from '@/config';
4
+ import { VfOptions } from '../config';
5
5
 
6
6
  export const vDatetime: ObjectDirective<HTMLElement, string> = {
7
7
  beforeMount: applyDateTime,
@@ -1,5 +1,4 @@
1
- import { showAlert } from '@/components/alert-helpers';
2
-
1
+ import { showAlert } from '../components/alert-helpers';
3
2
  import { VfOptions } from '../config';
4
3
 
5
4
  export class UserError extends Error {
@@ -1,4 +1,4 @@
1
- import type { AnyComponentPublicInstance } from '@/components';
1
+ import type { AnyComponentPublicInstance } from '../components/modal-container';
2
2
 
3
3
  /*///////////////////////////////////////////////
4
4
  Component Overlay Masking
@@ -51,7 +51,7 @@ interface IFormMaskState {
51
51
  [FormMaskState]?: {
52
52
  disabledElements: HTMLElement[];
53
53
  waitButton: HTMLElement;
54
- buttonText: string;
54
+ buttonHtml: string;
55
55
  };
56
56
  }
57
57
  type FormMaskElement = Element & IFormMaskState;
@@ -63,7 +63,7 @@ export function maskForm(formOrCmp: Element | AnyComponentPublicInstance, button
63
63
  const buttonEl = (
64
64
  buttonSelector instanceof Element ? buttonSelector : form.querySelectorAll(buttonSelector ?? 'button:not([disabled])')[0]
65
65
  ) as HTMLElement;
66
- const originalButtonText = buttonEl.tagName === 'INPUT' ? (buttonEl as HTMLInputElement).value : buttonEl.innerText;
66
+ const originalButtonHtml = buttonEl.tagName === 'INPUT' ? (buttonEl as HTMLInputElement).value : buttonEl.innerHTML;
67
67
  buttonEl.setAttribute('disabled', 'disabled');
68
68
  buttonEl.innerText = buttonText ?? 'Please wait...';
69
69
 
@@ -74,7 +74,7 @@ export function maskForm(formOrCmp: Element | AnyComponentPublicInstance, button
74
74
  (form as FormMaskElement)[FormMaskState] = {
75
75
  disabledElements: inputs,
76
76
  waitButton: buttonEl,
77
- buttonText: originalButtonText
77
+ buttonHtml: originalButtonHtml
78
78
  };
79
79
 
80
80
  return () => unmaskForm(form);
@@ -89,7 +89,7 @@ export function unmaskForm(formOrCmp: Element | AnyComponentPublicInstance) {
89
89
  form.classList.remove('vf-masked');
90
90
 
91
91
  state.disabledElements.forEach(el => el.removeAttribute('disabled'));
92
- state.waitButton.innerText = state.buttonText;
92
+ state.waitButton.innerHTML = state.buttonHtml;
93
93
  state.waitButton.removeAttribute('disabled');
94
94
 
95
95
  delete (form as FormMaskElement)[FormMaskState];
package/tsconfig.app.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "extends": "@vue/tsconfig/tsconfig.web.json",
2
+ "extends": "@vue/tsconfig/tsconfig.dom.json",
3
3
  "include": ["src/**/*.ts", "src/**/*.vue"],
4
4
  "exclude": ["src/**/__tests__/*", "src/vite-plugins/*"],
5
5
  "compilerOptions": {
@@ -13,10 +13,6 @@
13
13
  "declaration": true,
14
14
  "declarationDir": "dist",
15
15
  "target": "ES2020",
16
- "lib": [
17
- "ES2020",
18
- "DOM",
19
- "DOM.Iterable"
20
- ]
16
+ "lib": ["ES2020", "DOM", "DOM.Iterable"]
21
17
  }
22
18
  }
@@ -1,8 +1,9 @@
1
1
  {
2
- "extends": "@vue/tsconfig/tsconfig.node.json",
2
+ "extends": "@tsconfig/node18/tsconfig.json",
3
3
  "include": ["vite.config.*", "vitest.config.*", "cypress.config.*", "playwright.config.*"],
4
4
  "compilerOptions": {
5
5
  "composite": true,
6
+ "module": "ESNext",
6
7
  "types": ["node"],
7
8
  "noImplicitAny": true
8
9
  }
@@ -1,8 +1,9 @@
1
1
  {
2
- "extends": "@vue/tsconfig/tsconfig.node.json",
2
+ "extends": "@tsconfig/node18/tsconfig.json",
3
3
  "include": ["src/vite-plugins/*"],
4
4
  "compilerOptions": {
5
5
  "composite": true,
6
+ "module": "ESNext",
6
7
  "types": ["node"],
7
8
  "noImplicitAny": true,
8
9
  "outDir": "dist"
@@ -4,6 +4,6 @@
4
4
  "compilerOptions": {
5
5
  "composite": true,
6
6
  "lib": [],
7
- "types": ["node", "jsdom"],
7
+ "types": ["node", "jsdom"]
8
8
  }
9
9
  }