@verisoft/ui-govcz 20.0.1 → 20.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/.eslintrc.json +60 -0
- package/assets/i18n/cs.json +2 -0
- package/assets/i18n/en.json +2 -0
- package/jest.config.ts +21 -0
- package/ng-package.json +28 -0
- package/package.json +9 -19
- package/project.json +49 -0
- package/src/config.d.ts +10 -0
- package/src/index.ts +1 -0
- package/src/lib/components/breadcrumb/breadcrumb.component.html +25 -0
- package/src/lib/components/breadcrumb/breadcrumb.component.scss +0 -0
- package/src/lib/components/breadcrumb/breadcrumb.component.spec.ts +21 -0
- package/src/lib/components/breadcrumb/breadcrumb.component.ts +28 -0
- package/src/lib/components/breadcrumb/index.ts +1 -0
- package/src/lib/components/button/button.component.html +28 -0
- package/src/lib/components/button/button.component.scss +21 -0
- package/src/lib/components/button/button.component.ts +77 -0
- package/src/lib/components/button/index.ts +1 -0
- package/src/lib/components/calendar/calendar.component.html +28 -0
- package/src/lib/components/calendar/calendar.component.scss +0 -0
- package/src/lib/components/calendar/calendar.component.ts +77 -0
- package/src/lib/components/calendar/index.ts +1 -0
- package/src/lib/components/checkbox/checkbox.component.html +23 -0
- package/src/lib/components/checkbox/checkbox.component.scss +0 -0
- package/src/lib/components/checkbox/checkbox.component.ts +61 -0
- package/src/lib/components/checkbox/index.ts +1 -0
- package/src/lib/components/confirm-dialog/confirm-dialog.component.html +50 -0
- package/src/lib/components/confirm-dialog/confirm-dialog.component.scss +4 -0
- package/src/lib/components/confirm-dialog/confirm-dialog.component.ts +79 -0
- package/src/lib/components/confirm-dialog/index.ts +1 -0
- package/src/lib/components/dropdown/dropdown-item.component.html +8 -0
- package/src/lib/components/dropdown/dropdown-item.component.ts +18 -0
- package/src/lib/components/dropdown/dropdown.component.html +91 -0
- package/src/lib/components/dropdown/dropdown.component.scss +108 -0
- package/src/lib/components/dropdown/dropdown.component.spec.ts +21 -0
- package/src/lib/components/dropdown/dropdown.component.ts +296 -0
- package/src/lib/components/dropdown/dropdown.model.ts +6 -0
- package/src/lib/components/dropdown/index.ts +1 -0
- package/src/lib/components/dropdown-button/dropdown-button.component.html +31 -0
- package/src/lib/components/dropdown-button/dropdown-button.component.ts +34 -0
- package/src/lib/components/dropdown-button/index.ts +1 -0
- package/src/lib/components/errors/error.component.html +11 -0
- package/src/lib/components/errors/error.component.scss +0 -0
- package/src/lib/components/errors/error.component.spec.ts +19 -0
- package/src/lib/components/errors/error.component.ts +29 -0
- package/src/lib/components/errors/index.ts +1 -0
- package/src/lib/components/feature-list/directives/feature-list-column.directive.ts +32 -0
- package/src/lib/components/feature-list/directives/feature-list-filter-field.directive.ts +8 -0
- package/src/lib/components/feature-list/feature-list-filter.pipe.ts +20 -0
- package/src/lib/components/feature-list/feature-list-page.component.ts +30 -0
- package/src/lib/components/feature-list/feature-list-page.model.ts +42 -0
- package/src/lib/components/feature-list/feature-list.component.html +67 -0
- package/src/lib/components/feature-list/feature-list.component.scss +10 -0
- package/src/lib/components/feature-list/feature-list.component.ts +360 -0
- package/src/lib/components/feature-list/index.ts +5 -0
- package/src/lib/components/filter/directives/filter-field.directive.ts +35 -0
- package/src/lib/components/filter/filter.component.html +78 -0
- package/src/lib/components/filter/filter.component.scss +32 -0
- package/src/lib/components/filter/filter.component.spec.ts +21 -0
- package/src/lib/components/filter/filter.component.stories.ts +23 -0
- package/src/lib/components/filter/filter.component.ts +286 -0
- package/src/lib/components/filter/filter.model.ts +18 -0
- package/src/lib/components/filter/index.ts +2 -0
- package/src/lib/components/form-field/form-field.component.html +14 -0
- package/src/lib/components/form-field/form-field.component.scss +0 -0
- package/src/lib/components/form-field/form-field.component.spec.ts +21 -0
- package/src/lib/components/form-field/form-field.component.ts +76 -0
- package/src/lib/components/form-field/index.ts +1 -0
- package/src/lib/components/header/header.component.html +122 -0
- package/src/lib/components/header/header.component.scss +0 -0
- package/src/lib/components/header/header.component.ts +90 -0
- package/src/lib/components/header/index.ts +1 -0
- package/src/lib/components/icon/icon.component.html +11 -0
- package/src/lib/components/icon/icon.component.scss +20 -0
- package/src/lib/components/icon/icon.component.ts +110 -0
- package/src/lib/components/icon/index.ts +2 -0
- package/src/lib/components/index.ts +37 -0
- package/src/lib/components/input-group/index.ts +1 -0
- package/src/lib/components/input-group/input-group.component.html +41 -0
- package/src/lib/components/input-group/input-group.component.scss +0 -0
- package/src/lib/components/input-group/input-group.component.ts +75 -0
- package/src/lib/components/loader/index.ts +1 -0
- package/src/lib/components/loader/loader.component.html +7 -0
- package/src/lib/components/loader/loader.component.scss +0 -0
- package/src/lib/components/loader/loader.component.spec.ts +21 -0
- package/src/lib/components/loader/loader.component.ts +33 -0
- package/src/lib/components/multiselect/index.ts +1 -0
- package/src/lib/components/multiselect/multiselect.component.html +21 -0
- package/src/lib/components/multiselect/multiselect.component.scss +0 -0
- package/src/lib/components/multiselect/multiselect.component.spec.ts +21 -0
- package/src/lib/components/multiselect/multiselect.component.ts +117 -0
- package/src/lib/components/number-input/index.ts +1 -0
- package/src/lib/components/number-input/number-input.component.html +48 -0
- package/src/lib/components/number-input/number-input.component.scss +0 -0
- package/src/lib/components/number-input/number-input.component.ts +80 -0
- package/src/lib/components/page-header/index.ts +1 -0
- package/src/lib/components/page-header/page-header.component.html +3 -0
- package/src/lib/components/page-header/page-header.component.scss +11 -0
- package/src/lib/components/page-header/page-header.component.spec.ts +21 -0
- package/src/lib/components/page-header/page-header.component.ts +27 -0
- package/src/lib/components/password/index.ts +1 -0
- package/src/lib/components/password/password.component.html +31 -0
- package/src/lib/components/password/password.component.scss +0 -0
- package/src/lib/components/password/password.component.spec.ts +21 -0
- package/src/lib/components/password/password.component.ts +83 -0
- package/src/lib/components/radiobutton/index.ts +1 -0
- package/src/lib/components/radiobutton/radiobutton.component.html +23 -0
- package/src/lib/components/radiobutton/radiobutton.component.scss +0 -0
- package/src/lib/components/radiobutton/radiobutton.component.ts +61 -0
- package/src/lib/components/search/index.ts +1 -0
- package/src/lib/components/search/search.component.html +23 -0
- package/src/lib/components/search/search.component.scss +0 -0
- package/src/lib/components/search/search.component.ts +45 -0
- package/src/lib/components/section/index.ts +1 -0
- package/src/lib/components/section/section.component.html +26 -0
- package/src/lib/components/section/section.component.scss +0 -0
- package/src/lib/components/section/section.component.ts +55 -0
- package/src/lib/components/side-menu/index.ts +2 -0
- package/src/lib/components/side-menu/side-menu.component.html +22 -0
- package/src/lib/components/side-menu/side-menu.component.scss +17 -0
- package/src/lib/components/side-menu/side-menu.component.ts +42 -0
- package/src/lib/components/side-menu/side-menu.module.ts +56 -0
- package/src/lib/components/snackbar/index.ts +2 -0
- package/src/lib/components/snackbar/services/snackbar.service.ts +73 -0
- package/src/lib/components/snackbar/snackbar.component.html +14 -0
- package/src/lib/components/snackbar/snackbar.component.scss +0 -0
- package/src/lib/components/snackbar/snackbar.component.spec.ts +21 -0
- package/src/lib/components/snackbar/snackbar.component.ts +44 -0
- package/src/lib/components/snackbar/snackbar.model.ts +10 -0
- package/src/lib/components/stepper/index.ts +1 -0
- package/src/lib/components/stepper/stepper.component.html +35 -0
- package/src/lib/components/stepper/stepper.component.scss +9 -0
- package/src/lib/components/stepper/stepper.component.ts +60 -0
- package/src/lib/components/switch/index.ts +1 -0
- package/src/lib/components/switch/switch.component.html +16 -0
- package/src/lib/components/switch/switch.component.scss +0 -0
- package/src/lib/components/switch/switch.component.ts +39 -0
- package/src/lib/components/tab-view/index.ts +2 -0
- package/src/lib/components/tab-view/tab-view-item.component.ts +23 -0
- package/src/lib/components/tab-view/tab-view.component.html +51 -0
- package/src/lib/components/tab-view/tab-view.component.scss +43 -0
- package/src/lib/components/tab-view/tab-view.component.ts +64 -0
- package/src/lib/components/tab-view/tab-view.module.ts +25 -0
- package/src/lib/components/table/index.ts +1 -0
- package/src/lib/components/table/table-pagination-info.component.html +9 -0
- package/src/lib/components/table/table-pagination-info.component.ts +22 -0
- package/src/lib/components/table/table.component.html +199 -0
- package/src/lib/components/table/table.component.scss +192 -0
- package/src/lib/components/table/table.component.ts +390 -0
- package/src/lib/components/table/table.model.ts +17 -0
- package/src/lib/components/table/table.models.ts +12 -0
- package/src/lib/components/tag/index.ts +3 -0
- package/src/lib/components/tag/tag.component.html +12 -0
- package/src/lib/components/tag/tag.component.scss +4 -0
- package/src/lib/components/tag/tag.component.ts +44 -0
- package/src/lib/components/tag/tag.model.ts +7 -0
- package/src/lib/components/textarea/index.ts +1 -0
- package/src/lib/components/textarea/textarea.component.html +50 -0
- package/src/lib/components/textarea/textarea.component.scss +0 -0
- package/src/lib/components/textarea/textarea.component.ts +77 -0
- package/src/lib/components/textfield/index.ts +1 -0
- package/src/lib/components/textfield/textfield.component.html +34 -0
- package/src/lib/components/textfield/textfield.component.scss +0 -0
- package/src/lib/components/textfield/textfield.component.ts +112 -0
- package/src/lib/components/tooltip/index.ts +1 -0
- package/src/lib/components/tooltip/tooltip.component.html +9 -0
- package/src/lib/components/tooltip/tooltip.component.ts +19 -0
- package/src/lib/icons.ts +36 -0
- package/src/lib/index.ts +5 -0
- package/src/lib/init.service.ts +11 -0
- package/src/lib/interceptors/http-error-message.interceptor.ts +45 -0
- package/src/lib/pages/bad-request-page/bad-request-page.component.html +5 -0
- package/src/lib/pages/bad-request-page/bad-request-page.component.scss +0 -0
- package/src/lib/pages/bad-request-page/bad-request-page.component.ts +14 -0
- package/src/lib/pages/error-page/error-page.component.html +5 -0
- package/src/lib/pages/error-page/error-page.component.scss +0 -0
- package/src/lib/pages/error-page/error-page.component.ts +31 -0
- package/src/lib/pages/error-page/error-page.constants.ts +19 -0
- package/src/lib/pages/index.ts +3 -0
- package/src/lib/pages/internal-server-error-page/internal-server-error-page.component.html +5 -0
- package/src/lib/pages/internal-server-error-page/internal-server-error-page.component.scss +0 -0
- package/src/lib/pages/internal-server-error-page/internal-server-error-page.component.ts +15 -0
- package/src/lib/pages/not-authenticated/index.ts +1 -0
- package/src/lib/pages/not-authenticated/not-authenticated.component.html +5 -0
- package/src/lib/pages/not-authenticated/not-authenticated.component.ts +13 -0
- package/src/lib/pages/not-authorized/index.ts +1 -0
- package/src/lib/pages/not-authorized/not-authorized.component.html +5 -0
- package/src/lib/pages/not-authorized/not-authorized.component.ts +17 -0
- package/src/lib/pages/not-found/index.ts +1 -0
- package/src/lib/pages/not-found/not-found.component.html +5 -0
- package/src/lib/pages/not-found/not-found.component.ts +17 -0
- package/src/lib/pages/not-found-page/not-found-page.component.html +6 -0
- package/src/lib/pages/not-found-page/not-found-page.component.scss +0 -0
- package/src/lib/pages/not-found-page/not-found-page.component.ts +15 -0
- package/src/lib/pipes/color/color.pipe.ts +24 -0
- package/src/lib/pipes/index.ts +3 -0
- package/src/lib/pipes/multiselect/multiselect-options.pipe.ts +61 -0
- package/src/lib/pipes/size/size.pipe.ts +24 -0
- package/src/sass/foundations/_colors.scss +4 -0
- package/src/sass/foundations/index.scss +1 -0
- package/src/sass/integrations/_bootstrap.scss +4 -0
- package/src/sass/integrations/index.scss +1 -0
- package/src/sass/main.scss +12 -0
- package/src/sass/overrides/_gov.scss +4 -0
- package/src/sass/overrides/index.scss +1 -0
- package/src/sass/tokens/_theme-dark.scss +18 -0
- package/src/sass/tokens/_theme-light.scss +9 -0
- package/src/sass/tokens/index.scss +3 -0
- package/src/sass/utils/_table_filter.scss +4 -0
- package/src/sass/utils/index.scss +2 -0
- package/{styles → src}/sass/vendors/_bootstrap.scss +1 -0
- package/src/test-setup.ts +8 -0
- package/tsconfig.json +30 -0
- package/tsconfig.lib.json +17 -0
- package/tsconfig.lib.prod.json +9 -0
- package/tsconfig.spec.json +16 -0
- package/fesm2022/verisoft-ui-govcz.mjs +0 -3582
- package/fesm2022/verisoft-ui-govcz.mjs.map +0 -1
- package/index.d.ts +0 -955
- package/styles/dist/main.css +0 -9
- package/styles/dist/main.css.map +0 -1
- package/styles/sass/main.scss +0 -10
- package/styles/sass/utils/_variables.scss +0 -3
- package/styles/sass/utils/index.scss +0 -2
- /package/{styles → src}/sass/header.css +0 -0
- /package/{styles → src}/sass/header.scss +0 -0
- /package/{styles → src}/sass/scrollbar.scss +0 -0
- /package/{styles → src}/sass/utils/_utils.scss +0 -0
package/.eslintrc.json
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": ["../../../.eslintrc.base.json"],
|
|
3
|
+
"ignorePatterns": ["!**/*"],
|
|
4
|
+
"overrides": [
|
|
5
|
+
{
|
|
6
|
+
"files": ["*.ts"],
|
|
7
|
+
"extends": [
|
|
8
|
+
"plugin:@nx/angular",
|
|
9
|
+
"plugin:@angular-eslint/template/process-inline-templates"
|
|
10
|
+
],
|
|
11
|
+
"rules": {
|
|
12
|
+
"@angular-eslint/directive-selector": [
|
|
13
|
+
"error",
|
|
14
|
+
{
|
|
15
|
+
"type": "attribute",
|
|
16
|
+
"prefix": "v",
|
|
17
|
+
"style": "camelCase"
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
"@angular-eslint/component-selector": [
|
|
21
|
+
"error",
|
|
22
|
+
{
|
|
23
|
+
"type": "element",
|
|
24
|
+
"prefix": "v",
|
|
25
|
+
"style": "kebab-case"
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"no-restricted-imports": [
|
|
29
|
+
"error",
|
|
30
|
+
{
|
|
31
|
+
"paths": [
|
|
32
|
+
{
|
|
33
|
+
"name": "primeng",
|
|
34
|
+
"message": "Import PrimeNG není povolen v @verisoft/ui-govcz."
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"patterns": ["primeng/*", "@verisoft/ui-primeng"]
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"files": ["*.html"],
|
|
44
|
+
"extends": ["plugin:@nx/angular-template"],
|
|
45
|
+
"rules": {}
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"files": ["*.json"],
|
|
49
|
+
"parser": "jsonc-eslint-parser",
|
|
50
|
+
"rules": {
|
|
51
|
+
"@nx/dependency-checks": [
|
|
52
|
+
"error",
|
|
53
|
+
{
|
|
54
|
+
"ignoredFiles": ["{projectRoot}/eslint.config.{js,cjs,mjs}"]
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
}
|
package/assets/i18n/cs.json
CHANGED
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
"PATTERN": "Input neodpovídá vzoru!",
|
|
6
6
|
"MIN_LENGTH": "Hodnota nemá dostatek znaků!",
|
|
7
7
|
"MAX_LENGTH": "Hodnota přesahuje maximum znaků!"
|
|
8
|
+
}, "FILTER": {
|
|
9
|
+
"RECORDS": "{{count}} záznamů"
|
|
8
10
|
}, "TABLES": {
|
|
9
11
|
"NO_DATA": "Žádná data k zobrazení",
|
|
10
12
|
"LOADING": "Načítání dat...",
|
package/assets/i18n/en.json
CHANGED
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
"PATTERN": "Input doesn't match the pattern",
|
|
6
6
|
"MIN_LENGTH": "Value doesn't have enough characters",
|
|
7
7
|
"MAX_LENGTH": "Value exceeds the maximum amount of characters"
|
|
8
|
+
}, "FILTER": {
|
|
9
|
+
"RECORDS": "{{count}} records"
|
|
8
10
|
}, "TABLES": {
|
|
9
11
|
"EMPTY": "No data to display",
|
|
10
12
|
"PAGINATION": {
|
package/jest.config.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
displayName: 'ui-govcz',
|
|
3
|
+
preset: '../../../jest.preset.js',
|
|
4
|
+
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
|
|
5
|
+
coverageDirectory: '../../../coverage/src/libs/ui-govcz',
|
|
6
|
+
transform: {
|
|
7
|
+
'^.+\\.(ts|mjs|js|html)$': [
|
|
8
|
+
'jest-preset-angular',
|
|
9
|
+
{
|
|
10
|
+
tsconfig: '<rootDir>/tsconfig.spec.json',
|
|
11
|
+
stringifyContentPathRegex: '\\.(html|svg)$',
|
|
12
|
+
},
|
|
13
|
+
],
|
|
14
|
+
},
|
|
15
|
+
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'],
|
|
16
|
+
snapshotSerializers: [
|
|
17
|
+
'jest-preset-angular/build/serializers/no-ng-attributes',
|
|
18
|
+
'jest-preset-angular/build/serializers/ng-snapshot',
|
|
19
|
+
'jest-preset-angular/build/serializers/html-comment',
|
|
20
|
+
],
|
|
21
|
+
};
|
package/ng-package.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
|
|
3
|
+
"dest": "../../../dist/src/libs/ui-govcz",
|
|
4
|
+
"lib": {
|
|
5
|
+
"entryFile": "src/index.ts"
|
|
6
|
+
},
|
|
7
|
+
"assets": [
|
|
8
|
+
{
|
|
9
|
+
"glob": "**/*",
|
|
10
|
+
"input": "./src/sass/",
|
|
11
|
+
"output": "/styles/sass"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"glob": "**/*",
|
|
15
|
+
"input": "./styles/dist/",
|
|
16
|
+
"output": "/styles/dist"
|
|
17
|
+
},
|
|
18
|
+
"./assets/",
|
|
19
|
+
"README.md"
|
|
20
|
+
],
|
|
21
|
+
"allowedNonPeerDependencies": [
|
|
22
|
+
"@gov-design-system-ce/angular",
|
|
23
|
+
"@gov-design-system-ce/components",
|
|
24
|
+
"@gov-design-system-ce/styles",
|
|
25
|
+
"uuid",
|
|
26
|
+
"zxcvbn"
|
|
27
|
+
]
|
|
28
|
+
}
|
package/package.json
CHANGED
|
@@ -1,35 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@verisoft/ui-govcz",
|
|
3
|
-
"version": "20.0
|
|
3
|
+
"version": "20.1.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@verisoft/security-core": "~20.
|
|
6
|
-
"@verisoft/core": "~20.
|
|
7
|
-
"@verisoft/ui-core": "~20.
|
|
5
|
+
"@verisoft/security-core": "~20.1.0",
|
|
6
|
+
"@verisoft/core": "~20.1.0",
|
|
7
|
+
"@verisoft/ui-core": "~20.1.0",
|
|
8
8
|
"@angular/core": "~20.2.0",
|
|
9
9
|
"@angular/common": "~20.2.0",
|
|
10
10
|
"@angular/forms": "~20.2.0",
|
|
11
11
|
"@angular/router": "~20.2.0",
|
|
12
12
|
"@angular/cdk": "~20.2.0",
|
|
13
13
|
"@ngx-translate/core": "^17.0.0",
|
|
14
|
+
"bootstrap-icons": "^1.11.0",
|
|
14
15
|
"rxjs": "~7.8.0"
|
|
15
16
|
},
|
|
16
17
|
"dependencies": {
|
|
17
18
|
"@gov-design-system-ce/angular": "^1.3.1",
|
|
18
19
|
"@gov-design-system-ce/components": "^4.2.6",
|
|
20
|
+
"@gov-design-system-ce/styles": "^4.2.6",
|
|
19
21
|
"uuid": "^11.0.0",
|
|
20
|
-
"zxcvbn": "^4.4.2"
|
|
21
|
-
"tslib": "^2.3.0"
|
|
22
|
+
"zxcvbn": "^4.4.2"
|
|
22
23
|
},
|
|
23
|
-
"sideEffects": false
|
|
24
|
-
|
|
25
|
-
"typings": "index.d.ts",
|
|
26
|
-
"exports": {
|
|
27
|
-
"./package.json": {
|
|
28
|
-
"default": "./package.json"
|
|
29
|
-
},
|
|
30
|
-
".": {
|
|
31
|
-
"types": "./index.d.ts",
|
|
32
|
-
"default": "./fesm2022/verisoft-ui-govcz.mjs"
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
24
|
+
"sideEffects": false
|
|
25
|
+
}
|
package/project.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ui-govcz",
|
|
3
|
+
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
|
|
4
|
+
"sourceRoot": "src/libs/ui-govcz/src",
|
|
5
|
+
"prefix": "lib",
|
|
6
|
+
"projectType": "library",
|
|
7
|
+
"tags": [],
|
|
8
|
+
"targets": {
|
|
9
|
+
"build": {
|
|
10
|
+
"executor": "@nx/angular:package",
|
|
11
|
+
"outputs": ["{workspaceRoot}/dist/{projectRoot}"],
|
|
12
|
+
"options": {
|
|
13
|
+
"project": "src/libs/ui-govcz/ng-package.json"
|
|
14
|
+
},
|
|
15
|
+
"configurations": {
|
|
16
|
+
"production": {
|
|
17
|
+
"tsConfig": "src/libs/ui-govcz/tsconfig.lib.prod.json"
|
|
18
|
+
},
|
|
19
|
+
"development": {
|
|
20
|
+
"tsConfig": "src/libs/ui-govcz/tsconfig.lib.json"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"dependsOn": ["sync-shared", "compile-sass", "^build"],
|
|
24
|
+
"defaultConfiguration": "production"
|
|
25
|
+
},
|
|
26
|
+
"test": {
|
|
27
|
+
"executor": "@nx/jest:jest",
|
|
28
|
+
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
|
29
|
+
"options": {
|
|
30
|
+
"jestConfig": "src/libs/ui-govcz/jest.config.ts"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"lint": {
|
|
34
|
+
"executor": "@nx/eslint:lint"
|
|
35
|
+
},
|
|
36
|
+
"sync-shared": {
|
|
37
|
+
"executor": "nx:run-commands",
|
|
38
|
+
"options": {
|
|
39
|
+
"command": "cpx \"src/libs/ui-primeng/src/lib/components/shared-components/**/*.*\" \"src/libs/ui-govcz/src/lib/components/shared-components\" --update"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"compile-sass": {
|
|
43
|
+
"executor": "nx:run-commands",
|
|
44
|
+
"options": {
|
|
45
|
+
"command": "sass src/libs/ui-govcz/src/sass/main.scss src/libs/ui-govcz/styles/dist/main.css --style=compressed --source-map --load-path=node_modules"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
package/src/config.d.ts
ADDED
package/src/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './lib';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<div class="gov-breadcrums mt-3 mb-3">
|
|
2
|
+
<gov-breadcrumbs accessible-label="gov-breadcrums">
|
|
3
|
+
<ul>
|
|
4
|
+
@if (useHomeRoute) {
|
|
5
|
+
<li>
|
|
6
|
+
<gov-icon [name]="icons.house" />
|
|
7
|
+
<a [routerLink]="'/'">Home</a>
|
|
8
|
+
</li>
|
|
9
|
+
}
|
|
10
|
+
@if (items) { @for (item of items; track item; let index = $index) {
|
|
11
|
+
<li>
|
|
12
|
+
@if (index > 0 || useHomeRoute) {
|
|
13
|
+
<gov-icon [name]="icons.chevronRight" />
|
|
14
|
+
}
|
|
15
|
+
@if (item.icon) {
|
|
16
|
+
<gov-icon [name]="item.icon" />
|
|
17
|
+
}
|
|
18
|
+
<a [routerLink]="item.routerLink">
|
|
19
|
+
{{ item.label }}
|
|
20
|
+
</a>
|
|
21
|
+
</li>
|
|
22
|
+
} }
|
|
23
|
+
</ul>
|
|
24
|
+
</gov-breadcrumbs>
|
|
25
|
+
</div>
|
|
File without changes
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
import { BreadcrumbComponent } from './breadcrumb.component';
|
|
3
|
+
|
|
4
|
+
describe('BreadcrumbComponent', () => {
|
|
5
|
+
let component: BreadcrumbComponent;
|
|
6
|
+
let fixture: ComponentFixture<BreadcrumbComponent>;
|
|
7
|
+
|
|
8
|
+
beforeEach(async () => {
|
|
9
|
+
await TestBed.configureTestingModule({
|
|
10
|
+
imports: [BreadcrumbComponent],
|
|
11
|
+
}).compileComponents();
|
|
12
|
+
|
|
13
|
+
fixture = TestBed.createComponent(BreadcrumbComponent);
|
|
14
|
+
component = fixture.componentInstance;
|
|
15
|
+
fixture.detectChanges();
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it('should create', () => {
|
|
19
|
+
expect(component).toBeTruthy();
|
|
20
|
+
});
|
|
21
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
|
|
2
|
+
import { Component } from '@angular/core';
|
|
3
|
+
import { RouterModule } from '@angular/router';
|
|
4
|
+
import { GovDesignSystemModule } from '@gov-design-system-ce/angular';
|
|
5
|
+
import {
|
|
6
|
+
BREADCRUMB_COMPONENT_TOKEN,
|
|
7
|
+
BreadcrumbCoreComponent
|
|
8
|
+
} from '@verisoft/ui-core';
|
|
9
|
+
import { Icons } from '../../icons';
|
|
10
|
+
|
|
11
|
+
@Component({
|
|
12
|
+
selector: 'v-breadcrumb',
|
|
13
|
+
imports: [
|
|
14
|
+
GovDesignSystemModule,
|
|
15
|
+
RouterModule
|
|
16
|
+
],
|
|
17
|
+
templateUrl: './breadcrumb.component.html',
|
|
18
|
+
styleUrl: './breadcrumb.component.scss',
|
|
19
|
+
providers: [
|
|
20
|
+
{
|
|
21
|
+
provide: BREADCRUMB_COMPONENT_TOKEN,
|
|
22
|
+
useExisting: BreadcrumbComponent
|
|
23
|
+
},
|
|
24
|
+
]
|
|
25
|
+
})
|
|
26
|
+
export class BreadcrumbComponent extends BreadcrumbCoreComponent {
|
|
27
|
+
icons = Icons;
|
|
28
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './breadcrumb.component';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<div class="v-button" [class.v-button--expanded]="expanded">
|
|
2
|
+
<a
|
|
3
|
+
[routerLink]="routerLink ? routerLink : undefined"
|
|
4
|
+
[queryParams]="queryParams ? queryParams : undefined"
|
|
5
|
+
>
|
|
6
|
+
<gov-button
|
|
7
|
+
[type]="outlined === true ? 'outlined' : type"
|
|
8
|
+
[class.v-button--rounded]="rounded"
|
|
9
|
+
[color]="severity | govColor"
|
|
10
|
+
[disabled]="disabled"
|
|
11
|
+
[size]="size | govSize"
|
|
12
|
+
[name]="name"
|
|
13
|
+
[expanded]="expanded"
|
|
14
|
+
(gov-click)="handleClick($event)"
|
|
15
|
+
(click)="handleClick($event)"
|
|
16
|
+
>
|
|
17
|
+
@if (icon) {
|
|
18
|
+
<v-icon
|
|
19
|
+
[name]="icon"
|
|
20
|
+
[library]="library"
|
|
21
|
+
[slot]="iconPos === 'left' ? 'icon-start' : 'icon-end'"
|
|
22
|
+
/>
|
|
23
|
+
} @if (label) {
|
|
24
|
+
{{ label | translate }}
|
|
25
|
+
}
|
|
26
|
+
</gov-button>
|
|
27
|
+
</a>
|
|
28
|
+
</div>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: inline-block;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.v-button {
|
|
6
|
+
display: inline-block;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
:host.v-button--expanded {
|
|
10
|
+
display: block;
|
|
11
|
+
width: 100%;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.v-button--expanded {
|
|
15
|
+
display: block;
|
|
16
|
+
width: 100%;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.v-button--rounded {
|
|
20
|
+
border-radius: 5rem;
|
|
21
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ChangeDetectionStrategy,
|
|
3
|
+
Component,
|
|
4
|
+
EventEmitter,
|
|
5
|
+
Input,
|
|
6
|
+
Output,
|
|
7
|
+
} from "@angular/core";
|
|
8
|
+
import { Params, RouterModule } from "@angular/router";
|
|
9
|
+
import { GovDesignSystemModule } from "@gov-design-system-ce/angular";
|
|
10
|
+
import { ButtonEvent, GovButtonCustomEvent } from "@gov-design-system-ce/components";
|
|
11
|
+
import { TranslateModule } from "@ngx-translate/core";
|
|
12
|
+
import {
|
|
13
|
+
BUTTON_COMPONENT_TOKEN,
|
|
14
|
+
ButtonCore,
|
|
15
|
+
IconPositionType,
|
|
16
|
+
IconPosition,
|
|
17
|
+
FieldSize,
|
|
18
|
+
FieldSizeType,
|
|
19
|
+
ControlSeverity,
|
|
20
|
+
ControlSeverityType,
|
|
21
|
+
GovButtonType,
|
|
22
|
+
GovButtonTypeType,
|
|
23
|
+
IconLibraryType,
|
|
24
|
+
} from "@verisoft/ui-core";
|
|
25
|
+
import { GovColorPipe, GovSizePipe } from "../../pipes";
|
|
26
|
+
import { IconComponent } from "../icon";
|
|
27
|
+
|
|
28
|
+
@Component({
|
|
29
|
+
selector: "v-button",
|
|
30
|
+
styleUrl: "./button.component.scss",
|
|
31
|
+
templateUrl: './button.component.html',
|
|
32
|
+
imports: [
|
|
33
|
+
GovDesignSystemModule, RouterModule, GovSizePipe, GovColorPipe, TranslateModule, IconComponent
|
|
34
|
+
],
|
|
35
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
36
|
+
host: {
|
|
37
|
+
'[class.v-button--expanded]': 'expanded'
|
|
38
|
+
},
|
|
39
|
+
providers: [
|
|
40
|
+
{
|
|
41
|
+
provide: BUTTON_COMPONENT_TOKEN,
|
|
42
|
+
useExisting: ButtonComponent,
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
})
|
|
46
|
+
export class ButtonComponent
|
|
47
|
+
implements ButtonCore
|
|
48
|
+
{
|
|
49
|
+
@Input() label: string | undefined;
|
|
50
|
+
@Input() icon: string | undefined;
|
|
51
|
+
@Input() library: IconLibraryType = 'native';
|
|
52
|
+
@Input() badge!: string;
|
|
53
|
+
@Input() iconPos: IconPositionType = IconPosition.left;
|
|
54
|
+
@Input() disabled = false;
|
|
55
|
+
@Input() rounded!: boolean;
|
|
56
|
+
@Input() outlined!: boolean;
|
|
57
|
+
@Input() raised!: boolean;
|
|
58
|
+
@Input() routerLink!: any[];
|
|
59
|
+
@Input() size: FieldSizeType | undefined = FieldSize.medium;
|
|
60
|
+
@Input() queryParams!: Params;
|
|
61
|
+
@Input() severity: ControlSeverityType | undefined = ControlSeverity.primary;
|
|
62
|
+
@Input() type: GovButtonTypeType = GovButtonType.solid;
|
|
63
|
+
@Input() expanded = false;
|
|
64
|
+
@Input() name!: string;
|
|
65
|
+
|
|
66
|
+
// eslint-disable-next-line @angular-eslint/no-output-native
|
|
67
|
+
@Output() click = new EventEmitter<any>();
|
|
68
|
+
|
|
69
|
+
handleClick(event: GovButtonCustomEvent<ButtonEvent> | MouseEvent) {
|
|
70
|
+
if (this.disabled) {
|
|
71
|
+
event.stopPropagation();
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
this.click.emit(event);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './button.component';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<gov-form-control class="mb-3">
|
|
2
|
+
@if (label) {
|
|
3
|
+
<gov-form-label [slot]="labelSlot" [size]="size | govSize">
|
|
4
|
+
{{ label | translate}}
|
|
5
|
+
</gov-form-label>
|
|
6
|
+
}
|
|
7
|
+
<gov-form-group>
|
|
8
|
+
<gov-form-input
|
|
9
|
+
[formControl]="formControl"
|
|
10
|
+
[attr.input-type]="type"
|
|
11
|
+
[invalid]="ngControl?.errors ? true : false"
|
|
12
|
+
[size]="size | govSize"
|
|
13
|
+
[required]="required"
|
|
14
|
+
[readonly]="readonly"
|
|
15
|
+
[attr.disabled]="readonly ? 'true' : 'false'"
|
|
16
|
+
[name]="name"
|
|
17
|
+
/>
|
|
18
|
+
</gov-form-group>
|
|
19
|
+
<v-validation-message [ngControl]="ngControl"></v-validation-message>
|
|
20
|
+
@if (message) {
|
|
21
|
+
<gov-form-message
|
|
22
|
+
[slot]="messageSlot"
|
|
23
|
+
color="neutral"
|
|
24
|
+
>
|
|
25
|
+
{{ message }}
|
|
26
|
+
</gov-form-message>
|
|
27
|
+
}
|
|
28
|
+
</gov-form-control>
|
|
File without changes
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
|
|
2
|
+
import { ChangeDetectionStrategy, Component, Input, Optional, Self } from '@angular/core';
|
|
3
|
+
import { ControlValueAccessor, NgControl, ReactiveFormsModule } from '@angular/forms';
|
|
4
|
+
import { GovDesignSystemModule } from '@gov-design-system-ce/angular';
|
|
5
|
+
import { TranslateModule } from '@ngx-translate/core';
|
|
6
|
+
import {
|
|
7
|
+
BaseFormInputComponent,
|
|
8
|
+
CalendarCore,
|
|
9
|
+
CALENDAR_COMPONENT_TOKEN,
|
|
10
|
+
FieldType,
|
|
11
|
+
FieldSizeType,
|
|
12
|
+
FieldSize,
|
|
13
|
+
SlotPosition,
|
|
14
|
+
SlotPositionType,
|
|
15
|
+
} from '@verisoft/ui-core';
|
|
16
|
+
import { Icons } from '../../icons';
|
|
17
|
+
import { GovSizePipe } from '../../pipes';
|
|
18
|
+
import { ErrorComponent } from '../errors';
|
|
19
|
+
|
|
20
|
+
@Component({
|
|
21
|
+
selector: 'v-calendar',
|
|
22
|
+
imports: [
|
|
23
|
+
ReactiveFormsModule,
|
|
24
|
+
GovDesignSystemModule,
|
|
25
|
+
GovSizePipe,
|
|
26
|
+
ErrorComponent,
|
|
27
|
+
TranslateModule
|
|
28
|
+
],
|
|
29
|
+
templateUrl: './calendar.component.html',
|
|
30
|
+
styleUrl: './calendar.component.scss',
|
|
31
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
32
|
+
providers: [
|
|
33
|
+
{
|
|
34
|
+
provide: CALENDAR_COMPONENT_TOKEN,
|
|
35
|
+
useExisting: CalendarComponent
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
export class CalendarComponent
|
|
41
|
+
extends BaseFormInputComponent
|
|
42
|
+
implements ControlValueAccessor, CalendarCore
|
|
43
|
+
{
|
|
44
|
+
@Input() icon!: string;
|
|
45
|
+
|
|
46
|
+
@Input() floatLabel: string | undefined;
|
|
47
|
+
|
|
48
|
+
@Input() maxDate!: Date;
|
|
49
|
+
|
|
50
|
+
@Input() minDate!: Date;
|
|
51
|
+
|
|
52
|
+
@Input() header!: string;
|
|
53
|
+
|
|
54
|
+
@Input() footer!: string;
|
|
55
|
+
|
|
56
|
+
@Input() selectionMode: 'single' | 'multiple' | 'range' | undefined;
|
|
57
|
+
|
|
58
|
+
@Input() size: FieldSizeType = FieldSize.medium;
|
|
59
|
+
|
|
60
|
+
@Input() errorSlot: SlotPositionType = SlotPosition.bottom;
|
|
61
|
+
|
|
62
|
+
@Input() labelSlot: SlotPositionType = SlotPosition.top;
|
|
63
|
+
|
|
64
|
+
@Input() messageSlot: SlotPositionType = SlotPosition.bottom;
|
|
65
|
+
|
|
66
|
+
@Input() message!: string;
|
|
67
|
+
|
|
68
|
+
@Input() name!: string;
|
|
69
|
+
|
|
70
|
+
type = FieldType.date;
|
|
71
|
+
|
|
72
|
+
icons = Icons;
|
|
73
|
+
|
|
74
|
+
constructor(@Optional() @Self() ngControl: NgControl) {
|
|
75
|
+
super(ngControl);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './calendar.component';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<gov-form-control class="mt-3">
|
|
2
|
+
<gov-form-checkbox
|
|
3
|
+
[formControl]="formControl"
|
|
4
|
+
[size]="size | govSize"
|
|
5
|
+
[value]="value"
|
|
6
|
+
[required]="required"
|
|
7
|
+
[attr.disabled]="disabled ? 'true' : 'false'"
|
|
8
|
+
[identifier]="id"
|
|
9
|
+
[indeterminate]="indeterminate"
|
|
10
|
+
[name]="name"
|
|
11
|
+
[invalid]="ngControl?.errors"
|
|
12
|
+
[noLabel]="noLabel"
|
|
13
|
+
[disabled]="disabled"
|
|
14
|
+
>
|
|
15
|
+
<gov-form-label
|
|
16
|
+
[size]="size"
|
|
17
|
+
slot="label"
|
|
18
|
+
>
|
|
19
|
+
{{ label ?? '' | translate }}
|
|
20
|
+
</gov-form-label>
|
|
21
|
+
</gov-form-checkbox>
|
|
22
|
+
<v-validation-message [ngControl]="ngControl"></v-validation-message>
|
|
23
|
+
</gov-form-control>
|
|
File without changes
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
|
|
2
|
+
import {
|
|
3
|
+
ChangeDetectionStrategy,
|
|
4
|
+
Component,
|
|
5
|
+
Optional,
|
|
6
|
+
Self,
|
|
7
|
+
Input,
|
|
8
|
+
input,
|
|
9
|
+
} from "@angular/core";
|
|
10
|
+
import { ControlValueAccessor, NgControl, ReactiveFormsModule } from "@angular/forms";
|
|
11
|
+
import { RouterModule } from "@angular/router";
|
|
12
|
+
import { GovDesignSystemModule } from "@gov-design-system-ce/angular";
|
|
13
|
+
import { TranslateModule } from "@ngx-translate/core";
|
|
14
|
+
import {
|
|
15
|
+
BaseFormInputComponent,
|
|
16
|
+
CHECKBOX_COMPONENT_TOKEN,
|
|
17
|
+
CheckboxCore,
|
|
18
|
+
FieldSize,
|
|
19
|
+
FieldSizeType,
|
|
20
|
+
} from "@verisoft/ui-core";
|
|
21
|
+
import { v4 as uuidv4 } from 'uuid';
|
|
22
|
+
import { Icons } from "../../icons";
|
|
23
|
+
import { GovSizePipe } from "../../pipes";
|
|
24
|
+
import { ErrorComponent } from "../errors";
|
|
25
|
+
|
|
26
|
+
@Component({
|
|
27
|
+
selector: "v-checkbox",
|
|
28
|
+
styleUrl: "./checkbox.component.scss",
|
|
29
|
+
templateUrl: './checkbox.component.html',
|
|
30
|
+
imports: [
|
|
31
|
+
GovDesignSystemModule,
|
|
32
|
+
RouterModule,
|
|
33
|
+
ReactiveFormsModule,
|
|
34
|
+
GovSizePipe,
|
|
35
|
+
ErrorComponent,
|
|
36
|
+
TranslateModule
|
|
37
|
+
],
|
|
38
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
39
|
+
providers: [{
|
|
40
|
+
provide: CHECKBOX_COMPONENT_TOKEN,
|
|
41
|
+
useExisting: CheckboxComponent,
|
|
42
|
+
}]
|
|
43
|
+
})
|
|
44
|
+
export class CheckboxComponent
|
|
45
|
+
extends BaseFormInputComponent
|
|
46
|
+
implements ControlValueAccessor, CheckboxCore
|
|
47
|
+
{
|
|
48
|
+
@Input() size: FieldSizeType = FieldSize.medium;
|
|
49
|
+
@Input() value!: string;
|
|
50
|
+
@Input() name!: string;
|
|
51
|
+
readonly indeterminate = input(false);
|
|
52
|
+
@Input() noLabel = false;
|
|
53
|
+
|
|
54
|
+
protected readonly icons = Icons;
|
|
55
|
+
|
|
56
|
+
constructor(@Optional() @Self() ngControl: NgControl) {
|
|
57
|
+
super(ngControl);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
id = uuidv4();
|
|
61
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './checkbox.component';
|