eco-vue-js 0.8.40 → 0.8.41

Sign up to get free protection for your applications and to get access to all the features.
Files changed (93) hide show
  1. package/dist/assets/icons/default/IconAvatar.svg.js +1 -1
  2. package/dist/assets/icons/default/IconCheck.svg.js +1 -1
  3. package/dist/assets/icons/default/IconDanger.svg.js +2 -2
  4. package/dist/assets/icons/default/IconEdit.svg.js +2 -2
  5. package/dist/assets/icons/default/IconFalsePositive.svg.js +1 -1
  6. package/dist/assets/icons/default/IconFeedback.svg.js +1 -1
  7. package/dist/assets/icons/default/IconFilter.svg.js +1 -1
  8. package/dist/assets/icons/default/IconInProgress.svg.js +2 -2
  9. package/dist/assets/icons/default/IconJira.svg.js +1 -1
  10. package/dist/assets/icons/default/IconLogout.svg.js +1 -1
  11. package/dist/assets/icons/default/IconMore.svg.js +1 -1
  12. package/dist/assets/icons/default/IconNotification.svg.js +1 -1
  13. package/dist/assets/icons/default/IconProfile.svg.js +1 -1
  14. package/dist/assets/icons/default/IconSearch.svg.js +1 -1
  15. package/dist/assets/icons/default/IconSettings.svg.js +1 -1
  16. package/dist/assets/icons/default/IconStar.svg.js +1 -1
  17. package/dist/assets/icons/default/IconSuccess.svg.js +1 -1
  18. package/dist/assets/icons/default/IconTask.svg.js +1 -1
  19. package/dist/assets/icons/default/IconTime.svg.js +1 -1
  20. package/dist/assets/icons/sax/IconAddCircle.svg.js +1 -1
  21. package/dist/assets/icons/sax/IconAddSquare.svg.js +1 -1
  22. package/dist/assets/icons/sax/IconAlarm.svg.js +1 -1
  23. package/dist/assets/icons/sax/IconArchiveBook.svg.js +2 -2
  24. package/dist/assets/icons/sax/IconCandle.svg.js +1 -1
  25. package/dist/assets/icons/sax/IconCelery.svg.js +1 -1
  26. package/dist/assets/icons/sax/IconChart.svg.js +1 -1
  27. package/dist/assets/icons/sax/IconCheckCircle.svg.js +1 -1
  28. package/dist/assets/icons/sax/IconCloseCircle.svg.js +1 -1
  29. package/dist/assets/icons/sax/IconCopy.svg.js +2 -2
  30. package/dist/assets/icons/sax/IconCopySuccess.svg.js +2 -2
  31. package/dist/assets/icons/sax/IconCopyright.svg.js +1 -1
  32. package/dist/assets/icons/sax/IconDedupe.svg.js +2 -2
  33. package/dist/assets/icons/sax/IconEdit.svg.js +1 -1
  34. package/dist/assets/icons/sax/IconEditCircle.svg.js +2 -2
  35. package/dist/assets/icons/sax/IconElement.svg.js +1 -1
  36. package/dist/assets/icons/sax/IconEye.svg.js +2 -2
  37. package/dist/assets/icons/sax/IconEyeSlash.svg.js +1 -1
  38. package/dist/assets/icons/sax/IconFilter.svg.js +1 -1
  39. package/dist/assets/icons/sax/IconFilterRemove.svg.js +2 -2
  40. package/dist/assets/icons/sax/IconFinding.svg.js +1 -1
  41. package/dist/assets/icons/sax/IconJira.svg.js +1 -1
  42. package/dist/assets/icons/sax/IconKey.svg.js +2 -2
  43. package/dist/assets/icons/sax/IconKeySquare.svg.js +2 -2
  44. package/dist/assets/icons/sax/IconLayer.svg.js +1 -1
  45. package/dist/assets/icons/sax/IconLink.svg.js +2 -2
  46. package/dist/assets/icons/sax/IconLinkBold.svg.js +1 -1
  47. package/dist/assets/icons/sax/IconLinkOutline.svg.js +2 -2
  48. package/dist/assets/icons/sax/IconLogout.svg.js +4 -4
  49. package/dist/assets/icons/sax/IconMinusCircle.svg.js +1 -1
  50. package/dist/assets/icons/sax/IconNegate.svg.js +1 -1
  51. package/dist/assets/icons/sax/IconNegativeInfo.svg.js +1 -1
  52. package/dist/assets/icons/sax/IconNote.svg.js +2 -2
  53. package/dist/assets/icons/sax/IconOutlineCheckCircle.svg.js +1 -1
  54. package/dist/assets/icons/sax/IconOutlineCloseCircle.svg.js +1 -1
  55. package/dist/assets/icons/sax/IconOutlineEdit.svg.js +2 -2
  56. package/dist/assets/icons/sax/IconOutlineRefresh.svg.js +1 -1
  57. package/dist/assets/icons/sax/IconOutlineStar.svg.js +1 -1
  58. package/dist/assets/icons/sax/IconPaste.svg.js +2 -2
  59. package/dist/assets/icons/sax/IconProfile.svg.js +2 -2
  60. package/dist/assets/icons/sax/IconRadar.svg.js +1 -1
  61. package/dist/assets/icons/sax/IconSearch.svg.js +1 -1
  62. package/dist/assets/icons/sax/IconSettings.svg.js +2 -2
  63. package/dist/assets/icons/sax/IconSlash.svg.js +1 -1
  64. package/dist/assets/icons/sax/IconStar.svg.js +1 -1
  65. package/dist/assets/icons/sax/IconSummary.svg.js +1 -1
  66. package/dist/assets/icons/sax/IconTableSettings.svg.js +3 -3
  67. package/dist/assets/icons/sax/IconTag.svg.js +1 -1
  68. package/dist/assets/icons/sax/IconTime.svg.js +1 -1
  69. package/dist/assets/icons/sax/IconTrash.svg.js +1 -1
  70. package/dist/assets/icons/sax/IconUser.svg.js +1 -1
  71. package/dist/assets/icons/sax/IconVersionControl.svg.js +1 -1
  72. package/dist/assets/icons/sax/IconWeight.svg.js +2 -2
  73. package/dist/components/Button/WButtonCopy.vue.js +1 -1
  74. package/dist/components/Button/WButtonMore.vue.js +1 -1
  75. package/dist/components/Dropdown/utils/DropdownStyle.js +2 -2
  76. package/dist/components/DropdownMenu/WDropdownMenu.vue.d.ts.map +1 -1
  77. package/dist/components/List/WListCard.vue.js +3 -3
  78. package/dist/components/List/WListHeader.vue.js +2 -2
  79. package/dist/components/Modal/WModalStepper.vue.d.ts +2 -2
  80. package/dist/components/Modal/WModalStepper.vue.d.ts.map +1 -1
  81. package/dist/components/Modal/WModalStepper.vue.js +2 -2
  82. package/dist/components/Tabs/WTabs.vue.d.ts +2 -2
  83. package/dist/components/Tabs/WTabs.vue.d.ts.map +1 -1
  84. package/dist/components/Tabs/WTabs.vue.js +3 -3
  85. package/dist/components/Tabs/WTabsColumns.vue.js +2 -2
  86. package/dist/types/types.d.ts +1 -0
  87. package/dist/utils/DOMListenerContainer.d.ts.map +1 -1
  88. package/dist/utils/DOMListenerContainer.js +2 -2
  89. package/dist/utils/useDefaultQuery.d.ts +5 -3
  90. package/dist/utils/useDefaultQuery.d.ts.map +1 -1
  91. package/dist/utils/useDefaultQuery.js +19 -23
  92. package/package.json +20 -21
  93. package/tailwind-base/index.cjs +2 -0
@@ -1,12 +1,14 @@
1
1
  import { QueryClient, UseQueryReturnType, QueryKey } from '@tanstack/vue-query';
2
2
  import { ApiError } from './api';
3
3
  type Params = Parameters<QueryClient['setQueriesData']>;
4
+ type SetData<TQueryFnData = unknown> = (updater: TQueryFnData, options?: Params[2]) => ReturnType<QueryClient['setQueriesData']>;
5
+ type UseQueryReturnTypeSetData<TQueryFnData = unknown, TData = TQueryFnData> = UseQueryReturnType<TData, ApiError> & {
6
+ setData: SetData<TQueryFnData>;
7
+ };
4
8
  export declare const useDefaultQuery: <TQueryFnData = unknown, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: import('@tanstack/vue-query').UseQueryOptions<TQueryFnData, ApiError<{}, {
5
9
  detail?: string | undefined;
6
10
  non_field_errors?: string[] | undefined;
7
- }>, TData, TQueryFnData, TQueryKey>, queryClient?: QueryClient | undefined) => UseQueryReturnType<TData, ApiError> & {
8
- setData: (updater: TQueryFnData, options?: Params[2]) => ReturnType<QueryClient["setQueriesData"]>;
9
- };
11
+ }>, TData, TQueryFnData, TQueryKey>, queryClient?: QueryClient | undefined) => UseQueryReturnTypeSetData<TQueryFnData, TData>;
10
12
  export declare const PAGE_LENGTH = 24;
11
13
  export declare const makeQueryPaginated: <Data, QueryParams extends {
12
14
  page?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"useDefaultQuery.d.ts","sourceRoot":"","sources":["../../src/utils/useDefaultQuery.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,WAAW,EAAE,KAAK,kBAAkB,EAAE,KAAK,QAAQ,EAAC,MAAM,qBAAqB,CAAA;AACtH,OAAO,EAAC,QAAQ,EAAC,MAAM,OAAO,CAAA;AAG9B,KAAK,MAAM,GAAG,UAAU,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC,CAAA;AAEvD,eAAO,MAAM,eAAe,GAC1B,YAAY,YACZ,KAAK,iBACL,SAAS,SAAS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YACZ,KAAK,iBACL,SAAS,SAAS,QAAQ;;;+EACuD,yBAAyB,CAAC,YAAY,EAAE,KAAK,CAO/H,CAAA;AAED,eAAO,MAAM,WAAW,KAAK,CAAA;AAE7B,eAAO,MAAM,kBAAkB,GAAI,IAAI,EAAE,WAAW,SAAS;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAC,OAAO,MAAM,UAAU,CAAC,WAAW,EAAE,WAAW,KAAK,IAAI,EAAE,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,IAAI,0BAA6B,iBAAiB,CAAC,IAAI,EAAE,WAAW,CAoDvO,CAAA"}
@@ -1,14 +1,12 @@
1
- import { useQueryClient, useQuery } from '@tanstack/vue-query';
1
+ import { useQuery, useQueryClient } from '@tanstack/vue-query';
2
2
  import { ApiError } from './api.js';
3
3
  import { unref } from 'vue';
4
4
 
5
5
  const useDefaultQuery = (...args) => {
6
+ const query = useQuery(...args);
6
7
  const queryClient = args[1] ?? useQueryClient();
7
- const setData = (updater, options) => queryClient.setQueriesData({ queryKey: "queryKey" in args[0] ? args[0].queryKey : void 0 }, updater, options);
8
- return {
9
- ...useQuery(...args),
10
- setData
11
- };
8
+ query.setData = (updater, options) => queryClient.setQueriesData({ queryKey: "queryKey" in args[0] ? args[0].queryKey : void 0 }, updater, options);
9
+ return query;
12
10
  };
13
11
  const PAGE_LENGTH = 24;
14
12
  const makeQueryPaginated = (key, getter, setter, pageLength = PAGE_LENGTH) => {
@@ -33,28 +31,26 @@ const makeQueryPaginated = (key, getter, setter, pageLength = PAGE_LENGTH) => {
33
31
  },
34
32
  ...options
35
33
  });
36
- return {
37
- ...query,
38
- setData: (data, options2) => {
39
- if (setter && unref(options2)?.index !== void 0) {
40
- const index = unref(unref(options2)?.index);
41
- if (index !== void 0) {
42
- const newList = getter({}).slice();
43
- const oldItem = query.data.value?.results[index];
44
- if (oldItem !== void 0) {
45
- const itemIndex = newList.findIndex((item) => item.id === oldItem.id);
46
- const newItem = unref(unref(options2)?.newItem);
47
- if (index !== -1) {
48
- if (newItem === void 0) newList.splice(itemIndex, 1);
49
- else newList.splice(itemIndex, 1, newItem);
50
- setter(newList);
51
- }
34
+ query.setData = (data, options2) => {
35
+ if (setter && unref(options2)?.index !== void 0) {
36
+ const index = unref(unref(options2)?.index);
37
+ if (index !== void 0) {
38
+ const newList = getter({}).slice();
39
+ const oldItem = query.data.value?.results[index];
40
+ if (oldItem !== void 0) {
41
+ const itemIndex = newList.findIndex((item) => item.id === oldItem.id);
42
+ const newItem = unref(unref(options2)?.newItem);
43
+ if (index !== -1) {
44
+ if (newItem === void 0) newList.splice(itemIndex, 1);
45
+ else newList.splice(itemIndex, 1, newItem);
46
+ setter(newList);
52
47
  }
53
48
  }
54
49
  }
55
- return query.setData(data, options2);
56
50
  }
51
+ return query.setData(data, options2);
57
52
  };
53
+ return query;
58
54
  };
59
55
  };
60
56
 
package/package.json CHANGED
@@ -4,16 +4,15 @@
4
4
  "type": "git",
5
5
  "url": "https://github.com/rsmple/eco-vue-js.git"
6
6
  },
7
- "version": "0.8.40",
7
+ "version": "0.8.41",
8
8
  "scripts": {
9
- "dev": "vite",
10
- "build": "run-p type-check build-only",
9
+ "build": "run-p type-check \"build-only {@}\" --",
11
10
  "preview": "vite preview",
12
- "test:unit": "vitest --environment jsdom --root src/",
13
11
  "build-only": "vite build",
14
- "type-check": "vue-tsc --noEmit -p tsconfig.vue.json --composite false",
15
- "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
16
- "lint:no-fix": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --ignore-path .gitignore",
12
+ "type-check": "vue-tsc --build --force",
13
+ "lint": "eslint . --fix",
14
+ "lint-no-fix": "eslint .",
15
+ "lint-inspect-config": "npx eslint --inspect-config",
17
16
  "write-imports": "node write-imports.js"
18
17
  },
19
18
  "peerDependencies": {
@@ -22,29 +21,29 @@
22
21
  "vue-router": ">=4.4.5"
23
22
  },
24
23
  "devDependencies": {
25
- "@rushstack/eslint-patch": "1.10.4",
26
- "@tsconfig/node18": "18.2.4",
24
+ "@tanstack/eslint-plugin-query": "5.60.1",
25
+ "@tsconfig/node22": "22.0.0",
27
26
  "@types/jsdom": "21.1.7",
28
- "@types/node": "22.9.0",
27
+ "@types/node": "22.9.1",
29
28
  "@types/postcss-import": "14.0.3",
30
- "@vitejs/plugin-vue": "5.1.4",
31
- "@vue/eslint-config-typescript": "13.0.0",
32
- "@vue/tsconfig": "0.5.1",
29
+ "@vitejs/plugin-vue": "5.2.0",
30
+ "@vue/eslint-config-typescript": "14.1.3",
31
+ "@vue/tsconfig": "0.6.0",
33
32
  "autoprefixer": "10.4.20",
34
- "eslint": "8.57.0",
35
- "eslint-plugin-unused-imports": "3.0.0",
36
- "eslint-plugin-vue": "9.30.0",
33
+ "eslint": "9.15.0",
34
+ "eslint-plugin-tailwindcss": "3.17.5",
35
+ "eslint-plugin-unused-imports": "4.1.4",
36
+ "eslint-plugin-vue": "9.31.0",
37
37
  "jsdom": "25.0.1",
38
- "npm-run-all": "4.1.5",
38
+ "npm-run-all2": "7.0.1",
39
39
  "path": "0.12.7",
40
- "postcss": "8.4.47",
40
+ "postcss": "8.4.49",
41
41
  "postcss-import": "16.1.0",
42
- "tailwindcss": "3.4.14",
42
+ "tailwindcss": "3.4.15",
43
43
  "typescript": "5.6.3",
44
- "vite": "5.4.10",
44
+ "vite": "5.4.11",
45
45
  "vite-plugin-dts": "4.3.0",
46
46
  "vite-svg-loader": "5.1.0",
47
- "vitest": "2.1.4",
48
47
  "vue-tsc": "2.1.10"
49
48
  },
50
49
  "type": "module",
@@ -38,6 +38,8 @@ module.exports = {
38
38
 
39
39
  severity: require('./theme/severity.cjs'),
40
40
  score: require('./theme/score.cjs'),
41
+
42
+ transparent: 'transparent',
41
43
  },
42
44
  extend: {
43
45
  ...require('./theme/sizes.cjs'),