@sysvale/citizen-components 0.1.0 → 1.1.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/README.md +22 -0
- package/dist/citizen-components.cjs.js +9 -9
- package/dist/citizen-components.css +1 -1
- package/dist/citizen-components.es.js +1553 -1137
- package/dist/index.d.ts +10 -4
- package/dist/services/citizen/citizen.types.d.ts +18 -0
- package/dist/types.d.ts +9 -2
- package/package.json +15 -4
package/dist/index.d.ts
CHANGED
|
@@ -4,17 +4,18 @@ import type { DefineComponent, Plugin } from 'vue';
|
|
|
4
4
|
export interface CitizenComponentsConfig {
|
|
5
5
|
apiBaseUrl?: string;
|
|
6
6
|
endpoints?: {
|
|
7
|
+
index?: string;
|
|
7
8
|
searchCitizens?: string;
|
|
8
9
|
};
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
// Re-export types
|
|
12
13
|
export type { Citizen, Nullable } from './services/citizen/citizen.types';
|
|
13
|
-
export type {
|
|
14
|
+
export type { CitizenSelectModelType } from './types';
|
|
14
15
|
|
|
15
16
|
// Import types for the component definition
|
|
16
17
|
import type { Citizen } from './services/citizen/citizen.types';
|
|
17
|
-
import type {
|
|
18
|
+
import type { CitizenSelectModelType } from './types';
|
|
18
19
|
|
|
19
20
|
// Define component types
|
|
20
21
|
export interface CitizenSelectProps {
|
|
@@ -22,11 +23,16 @@ export interface CitizenSelectProps {
|
|
|
22
23
|
fluid?: boolean;
|
|
23
24
|
variant?: string;
|
|
24
25
|
optionsField?: keyof Citizen;
|
|
25
|
-
modelValue?:
|
|
26
|
+
modelValue?: CitizenSelectModelType;
|
|
26
27
|
}
|
|
27
28
|
|
|
28
|
-
|
|
29
|
+
export interface CitizenTableProps {
|
|
30
|
+
modelValue?: Citizen[];
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// Export components
|
|
29
34
|
export declare const CitizenSelect: DefineComponent<CitizenSelectProps>;
|
|
35
|
+
export declare const CitizenTable: DefineComponent<CitizenTableProps>;
|
|
30
36
|
|
|
31
37
|
// Export plugin
|
|
32
38
|
export declare const CitizenComponentsPlugin: Plugin;
|
|
@@ -1,4 +1,22 @@
|
|
|
1
1
|
export type Nullable<T> = T | null;
|
|
2
|
+
export interface CitizenResponse {
|
|
3
|
+
data: Citizen[];
|
|
4
|
+
meta: {
|
|
5
|
+
current_page: number;
|
|
6
|
+
per_page: number;
|
|
7
|
+
total: number;
|
|
8
|
+
last_page: number;
|
|
9
|
+
path?: string;
|
|
10
|
+
from?: number;
|
|
11
|
+
to?: number;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export interface CitizenServiceParams {
|
|
15
|
+
page: number;
|
|
16
|
+
fields?: string[];
|
|
17
|
+
searchString?: string;
|
|
18
|
+
perPage?: number;
|
|
19
|
+
}
|
|
2
20
|
export interface Citizen {
|
|
3
21
|
id: string;
|
|
4
22
|
cpf: string;
|
package/dist/types.d.ts
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
-
export type { Citizen, Nullable, } from './services/citizen/citizen.types';
|
|
2
1
|
import type { Citizen } from './services/citizen/citizen.types';
|
|
3
|
-
export type
|
|
2
|
+
export type { Citizen, Nullable } from './services/citizen/citizen.types';
|
|
3
|
+
export type CitizenSelectModelType = Citizen | Partial<Citizen> | string | null;
|
|
4
|
+
export interface TableField {
|
|
5
|
+
key: keyof Citizen | 'actions';
|
|
6
|
+
label: string;
|
|
7
|
+
}
|
|
8
|
+
export interface CustomTableField extends TableField {
|
|
9
|
+
visible: boolean;
|
|
10
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sysvale/citizen-components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -30,21 +30,30 @@
|
|
|
30
30
|
"lint": "eslint . --ext .ts,.tsx,.js,.vue",
|
|
31
31
|
"prettier:check": "prettier . --check",
|
|
32
32
|
"format": "prettier --write .",
|
|
33
|
+
"format:vue": "node scripts/format-vue-structure.js",
|
|
33
34
|
"docs:dev": "vitepress dev docs",
|
|
34
35
|
"docs:build": "vitepress build docs",
|
|
35
|
-
"docs:preview": "vitepress preview docs"
|
|
36
|
+
"docs:preview": "vitepress preview docs",
|
|
37
|
+
"semantic-release:dry": "semantic-release --dry-run",
|
|
38
|
+
"semantic-release:test": "semantic-release --dry-run --no-ci"
|
|
36
39
|
},
|
|
37
40
|
"dependencies": {
|
|
41
|
+
"@sysvale/foundry": "^1.5.0",
|
|
38
42
|
"@vueuse/core": "^13.9.0",
|
|
39
43
|
"lodash": "^4.17.21"
|
|
40
44
|
},
|
|
41
45
|
"peerDependencies": {
|
|
42
|
-
"@sysvale/cuida": "^3.
|
|
46
|
+
"@sysvale/cuida": "^3.148.0",
|
|
43
47
|
"vue": "^3.5.13"
|
|
44
48
|
},
|
|
45
49
|
"devDependencies": {
|
|
46
50
|
"@faker-js/faker": "^10.0.0",
|
|
47
|
-
"@
|
|
51
|
+
"@semantic-release/commit-analyzer": "^13.0.1",
|
|
52
|
+
"@semantic-release/git": "^10.0.1",
|
|
53
|
+
"@semantic-release/github": "^12.0.0",
|
|
54
|
+
"@semantic-release/npm": "^13.1.1",
|
|
55
|
+
"@semantic-release/release-notes-generator": "^14.1.0",
|
|
56
|
+
"@sysvale/cuida": "^3.148.0",
|
|
48
57
|
"@tsconfig/node22": "^22.0.1",
|
|
49
58
|
"@types/jsdom": "^21.1.7",
|
|
50
59
|
"@types/lodash": "^4.17.13",
|
|
@@ -57,6 +66,7 @@
|
|
|
57
66
|
"@vue/test-utils": "^2.4.6",
|
|
58
67
|
"@vue/tsconfig": "^0.8.1",
|
|
59
68
|
"axios": "^1.7.4",
|
|
69
|
+
"conventional-changelog-conventionalcommits": "^9.1.0",
|
|
60
70
|
"eslint": "^9.22.0",
|
|
61
71
|
"eslint-plugin-vue": "~10.0.0",
|
|
62
72
|
"jiti": "^2.4.2",
|
|
@@ -64,6 +74,7 @@
|
|
|
64
74
|
"npm-run-all2": "^7.0.2",
|
|
65
75
|
"prettier": "3.5.3",
|
|
66
76
|
"sass-embedded": "^1.93.2",
|
|
77
|
+
"semantic-release": "^25.0.1",
|
|
67
78
|
"typescript": "~5.8.0",
|
|
68
79
|
"vite": "^6.2.4",
|
|
69
80
|
"vite-plugin-dts": "^4.5.4",
|