@cityway/bo-ui 1.0.0 → 1.0.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/.eslintrc.json +37 -0
- package/ng-package.json +21 -0
- package/package.json +21 -32
- package/src/lib/bo-ui.config.ts +8 -0
- package/src/lib/components/accordions/accordions.component.html +16 -0
- package/src/lib/components/accordions/accordions.component.spec.ts +24 -0
- package/src/lib/components/accordions/accordions.component.ts +27 -0
- package/src/lib/components/accordions/components/accordions-content.component.spec.ts +24 -0
- package/src/lib/components/accordions/components/accordions-content.component.ts +28 -0
- package/src/lib/components/alert/alert.component.html +15 -0
- package/src/lib/components/alert/alert.component.spec.ts +24 -0
- package/src/lib/components/alert/alert.component.ts +36 -0
- package/src/lib/components/badge/badge.component.html +7 -0
- package/src/lib/components/badge/badge.component.spec.ts +24 -0
- package/src/lib/components/badge/badge.component.ts +24 -0
- package/src/lib/components/button/button.component.html +43 -0
- package/src/lib/components/button/button.component.spec.ts +25 -0
- package/src/lib/components/button/button.component.ts +47 -0
- package/src/lib/components/card/card.component.html +15 -0
- package/src/lib/components/card/card.component.spec.ts +25 -0
- package/src/lib/components/card/card.component.ts +30 -0
- package/src/lib/components/custom-list/custom-list.component.html +31 -0
- package/src/lib/components/custom-list/custom-list.component.spec.ts +24 -0
- package/src/lib/components/custom-list/custom-list.component.ts +42 -0
- package/src/lib/components/drag-n-drop-list/drag-n-drop-list.component.html +27 -0
- package/src/lib/components/drag-n-drop-list/drag-n-drop-list.component.spec.ts +24 -0
- package/src/lib/components/drag-n-drop-list/drag-n-drop-list.component.ts +40 -0
- package/src/lib/components/form-field/form-field.component.html +333 -0
- package/src/lib/components/form-field/form-field.component.spec.ts +24 -0
- package/src/lib/components/form-field/form-field.component.ts +256 -0
- package/src/lib/components/icon/icon.component.html +9 -0
- package/src/lib/components/icon/icon.component.spec.ts +25 -0
- package/src/lib/components/icon/icon.component.ts +31 -0
- package/src/lib/components/layout/admin-layout/admin-layout.component.html +17 -0
- package/src/lib/components/layout/admin-layout/admin-layout.component.ts +181 -0
- package/src/lib/components/layout/footer/footer.component.html +51 -0
- package/src/lib/components/layout/footer/footer.component.ts +65 -0
- package/src/lib/components/layout/header/header.component.html +71 -0
- package/src/lib/components/layout/header/header.component.ts +95 -0
- package/src/lib/components/layout/menu/menu.component.html +115 -0
- package/src/lib/components/layout/menu/menu.component.ts +75 -0
- package/src/lib/components/layout/menu-accordion/accordion.directive.ts +57 -0
- package/src/lib/components/layout/menu-accordion/accordionanchor.directive.ts +21 -0
- package/src/lib/components/layout/menu-accordion/accordionlink.directive.ts +45 -0
- package/src/lib/components/layout/menu-accordion/index.ts +3 -0
- package/src/lib/components/layout/sidebar/sidebar.component.html +62 -0
- package/src/lib/components/layout/sidebar/sidebar.component.ts +28 -0
- package/src/lib/components/layout/skip-links/skip-links.component.html +3 -0
- package/src/lib/components/layout/skip-links/skip-links.component.spec.ts +25 -0
- package/src/lib/components/layout/skip-links/skip-links.component.ts +19 -0
- package/src/lib/components/layout/title-breadcrumb/title-breadcrumb.component.html +10 -0
- package/src/lib/components/layout/title-breadcrumb/title-breadcrumb.component.spec.ts +25 -0
- package/src/lib/components/layout/title-breadcrumb/title-breadcrumb.component.ts +16 -0
- package/src/lib/components/legend/legend.component.html +23 -0
- package/src/lib/components/legend/legend.component.spec.ts +24 -0
- package/src/lib/components/legend/legend.component.ts +28 -0
- package/src/lib/components/loader/loader.component.html +4 -0
- package/src/lib/components/loader/loader.component.ts +16 -0
- package/src/lib/components/modals/modals.component.html +71 -0
- package/src/lib/components/modals/modals.component.spec.ts +25 -0
- package/src/lib/components/modals/modals.component.ts +49 -0
- package/src/lib/components/tab/components/tab-content.component.spec.ts +24 -0
- package/src/lib/components/tab/components/tab-content.component.ts +27 -0
- package/src/lib/components/tab/tab.component.html +59 -0
- package/src/lib/components/tab/tab.component.spec.ts +24 -0
- package/src/lib/components/tab/tab.component.ts +79 -0
- package/src/lib/components/table/components/actions-on-table/actions-on-table.component.html +50 -0
- package/src/lib/components/table/components/actions-on-table/actions-on-table.component.spec.ts +24 -0
- package/src/lib/components/table/components/actions-on-table/actions-on-table.component.ts +33 -0
- package/src/lib/components/table/components/filter/filter.component.html +21 -0
- package/src/lib/components/table/components/filter/filter.component.spec.ts +24 -0
- package/src/lib/components/table/components/filter/filter.component.ts +38 -0
- package/src/lib/components/table/table.component.html +104 -0
- package/src/lib/components/table/table.component.spec.ts +24 -0
- package/src/lib/components/table/table.component.ts +85 -0
- package/src/lib/components/wizard-stepper/components/wizard-step.component.spec.ts +25 -0
- package/src/lib/components/wizard-stepper/components/wizard-step.component.ts +16 -0
- package/src/lib/components/wizard-stepper/wizard-stepper.component.html +45 -0
- package/src/lib/components/wizard-stepper/wizard-stepper.component.spec.ts +25 -0
- package/src/lib/components/wizard-stepper/wizard-stepper.component.ts +70 -0
- package/src/lib/directives/double-scroll.ts +64 -0
- package/src/lib/directives/rwd-tabs.ts +99 -0
- package/src/lib/directives/show-hide-password.ts +61 -0
- package/src/lib/enum/drag-item.enum.ts +5 -0
- package/src/lib/enum/field-type.enum.ts +36 -0
- package/src/lib/enum/legend-type.enum.ts +5 -0
- package/src/lib/enum/modals.enum.ts +6 -0
- package/src/lib/enum/ui-type.enum.ts +11 -0
- package/src/lib/models/ui/custom-list.model.ts +14 -0
- package/src/lib/models/ui/legend.model.ts +17 -0
- package/src/lib/models/ui/table.model.ts +33 -0
- package/src/lib/services/ui/modals.service.ts +47 -0
- package/src/lib/services/version.service.ts +22 -0
- package/src/public-api.ts +49 -0
- package/tsconfig.lib.json +18 -0
- package/tsconfig.lib.prod.json +11 -0
- package/tsconfig.spec.json +14 -0
- package/tslint.json +17 -0
- package/cityway-bo-ui-1.0.0.tgz +0 -0
- package/fesm2022/cityway-bo-ui.mjs +0 -1598
- package/fesm2022/cityway-bo-ui.mjs.map +0 -1
- package/index.d.ts +0 -509
- package/styles.min.css +0 -5
- package/styles.min.css.map +0 -1
- /package/{lib → src/lib}/assets/fonts/bo/_variables.scss +0 -0
- /package/{lib → src/lib}/assets/fonts/bo/bo.scss +0 -0
- /package/{lib → src/lib}/assets/fonts/bo/bo.woff +0 -0
- /package/{lib → src/lib}/assets/fonts/bo/bo.woff2 +0 -0
- /package/{lib → src/lib}/assets/fonts/nunito/_nunito.scss +0 -0
- /package/{lib → src/lib}/assets/fonts/nunito/nunito-bold.woff +0 -0
- /package/{lib → src/lib}/assets/fonts/nunito/nunito-bold.woff2 +0 -0
- /package/{lib → src/lib}/assets/fonts/nunito/nunito-extrabold.woff +0 -0
- /package/{lib → src/lib}/assets/fonts/nunito/nunito-extrabold.woff2 +0 -0
- /package/{lib → src/lib}/assets/fonts/nunito/nunito-regular.woff +0 -0
- /package/{lib → src/lib}/assets/fonts/nunito/nunito-regular.woff2 +0 -0
- /package/{lib → src/lib}/assets/fonts/nunito/nunito-semi-bold.woff +0 -0
- /package/{lib → src/lib}/assets/fonts/nunito/nunito-semi-bold.woff2 +0 -0
- /package/{lib → src/lib}/assets/fonts/optyweb/_variables.scss +0 -0
- /package/{lib → src/lib}/assets/fonts/optyweb/optyweb.scss +0 -0
- /package/{lib → src/lib}/assets/fonts/optyweb/optyweb.woff +0 -0
- /package/{lib → src/lib}/assets/fonts/optyweb/optyweb.woff2 +0 -0
- /package/{lib → src/lib}/assets/i18n/common.en.json +0 -0
- /package/{lib → src/lib}/assets/i18n/common.fr.json +0 -0
- /package/{lib → src/lib}/assets/i18n/label.en.json +0 -0
- /package/{lib → src/lib}/assets/i18n/label.fr.json +0 -0
- /package/{lib → src/lib}/assets/images/common/bg-loader.svg +0 -0
- /package/{lib → src/lib}/assets/images/common/bg-menu.svg +0 -0
- /package/{lib → src/lib}/assets/images/common/bg-round.svg +0 -0
- /package/{lib → src/lib}/assets/images/common/check-mark.svg +0 -0
- /package/{lib → src/lib}/assets/images/common/loader.svg +0 -0
- /package/{lib → src/lib}/assets/images/common/logo-en-bw.svg +0 -0
- /package/{lib → src/lib}/assets/images/common/logo-en.svg +0 -0
- /package/{lib → src/lib}/assets/images/common/logo-fr-bw.svg +0 -0
- /package/{lib → src/lib}/assets/images/common/logo-fr.svg +0 -0
- /package/{lib → src/lib}/assets/images/favicon/android-chrome-192x192.png +0 -0
- /package/{lib → src/lib}/assets/images/favicon/android-chrome-512x512.png +0 -0
- /package/{lib → src/lib}/assets/images/favicon/apple-touch-icon.png +0 -0
- /package/{lib → src/lib}/assets/images/favicon/favicon-16x16.png +0 -0
- /package/{lib → src/lib}/assets/images/favicon/favicon-32x32.png +0 -0
- /package/{lib → src/lib}/assets/images/favicon/favicon-96x96.png +0 -0
- /package/{lib → src/lib}/assets/images/favicon/favicon.ico +0 -0
- /package/{lib → src/lib}/assets/images/favicon/site.webmanifest +0 -0
- /package/{lib → src/lib}/assets/images/icon/referential-icon.svg +0 -0
- /package/{lib → src/lib}/assets/images/login/login-bg.jpg +0 -0
- /package/{lib → src/lib}/assets/images/login/logo-cityway-baseline.svg +0 -0
- /package/{lib → src/lib}/assets/images/toast/warning.svg +0 -0
- /package/{lib → src/lib}/assets/styles/scss/_components.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/_core.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/_custom-bootstrap.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/bootstrap/_accordion.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/bootstrap/_alert.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/bootstrap/_badge.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/bootstrap/_breadcrumb.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/bootstrap/_button-group.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/bootstrap/_buttons.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/bootstrap/_card.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/bootstrap/_close.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/bootstrap/_dropdown.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/bootstrap/_forms.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/bootstrap/_input-group.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/bootstrap/_lists.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/bootstrap/_modal.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/bootstrap/_pagination.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/bootstrap/_popover.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/bootstrap/_progress.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/bootstrap/_reboot.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/bootstrap/_tables.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/bootstrap/_tabs.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/bootstrap/_tooltip.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/bootstrap/_type.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/components/_forms-firefox.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/components/_leaflet.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/components/_legend.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/components/_ng-select.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/components/_ng2-dragula.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/components/_ng2-validation.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/components/_ng5-slider.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/components/_ngb-datepicker.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/components/_ngb-timepicker.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/components/_ngx-chips.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/components/_ngx-editor.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/components/_ngx-file-drop.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/components/_ngx-intl-tel-input.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/components/_ngx-slider.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/components/_ngx-toast.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/components/_pwd-policy.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/components/_table.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/components/_vis.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/components/_wizard-stepper.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/components/table/_table-action.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/components/table/_table-bg-cell.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/components/table/_table-double-scroll.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/components/table/_table-filter.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/components/table/_table-pagination.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/components/table/_table-popover.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/components/table/_table-sorting.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/core/_footer.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/core/_header.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/core/_layout.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/core/_menu.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/core/_sidebar.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/mixins/_utilities.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/styles.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/tools/_focus.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/tools/_loader.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/variables/_colors.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/variables/_custom.scss +0 -0
- /package/{lib → src/lib}/assets/styles/scss/variables/_site.scss +0 -0
package/.eslintrc.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../.eslintrc.json",
|
|
3
|
+
"ignorePatterns": [
|
|
4
|
+
"!**/*"
|
|
5
|
+
],
|
|
6
|
+
"overrides": [
|
|
7
|
+
{
|
|
8
|
+
"files": [
|
|
9
|
+
"*.ts"
|
|
10
|
+
],
|
|
11
|
+
"rules": {
|
|
12
|
+
"@angular-eslint/directive-selector": [
|
|
13
|
+
"error",
|
|
14
|
+
{
|
|
15
|
+
"type": "attribute",
|
|
16
|
+
"prefix": "lib",
|
|
17
|
+
"style": "camelCase"
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
"@angular-eslint/component-selector": [
|
|
21
|
+
"error",
|
|
22
|
+
{
|
|
23
|
+
"type": "element",
|
|
24
|
+
"prefix": "lib",
|
|
25
|
+
"style": "kebab-case"
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"files": [
|
|
32
|
+
"*.html"
|
|
33
|
+
],
|
|
34
|
+
"rules": {}
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
package/ng-package.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
|
|
3
|
+
"dest": "../../dist/bo-ui",
|
|
4
|
+
"lib": {
|
|
5
|
+
"entryFile": "src/public-api.ts"
|
|
6
|
+
},
|
|
7
|
+
"allowedNonPeerDependencies": [
|
|
8
|
+
"@ng-bootstrap/ng-bootstrap",
|
|
9
|
+
"@ng-select/ng-select",
|
|
10
|
+
"bootstrap",
|
|
11
|
+
"@angular-slider/ngx-slider",
|
|
12
|
+
"ngx-toastr"
|
|
13
|
+
],
|
|
14
|
+
"assets": [
|
|
15
|
+
{
|
|
16
|
+
"glob": "**/*",
|
|
17
|
+
"input": "src/lib/assets",
|
|
18
|
+
"output": "lib/assets"
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
package/package.json
CHANGED
|
@@ -1,32 +1,21 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@cityway/bo-ui",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"peerDependencies": {
|
|
5
|
-
"@angular/common": "^20.3.0",
|
|
6
|
-
"@angular/core": "^20.3.0",
|
|
7
|
-
"@angular/forms": "^20.3.0",
|
|
8
|
-
"@angular/animations": "^20.3.0",
|
|
9
|
-
"@angular/cdk": "^20.
|
|
10
|
-
"@angular/platform-browser": "^20.3.0"
|
|
11
|
-
},
|
|
12
|
-
"dependencies": {
|
|
13
|
-
"@ng-bootstrap/ng-bootstrap": "19.0.1",
|
|
14
|
-
"@ng-select/ng-select": "20.0.1",
|
|
15
|
-
"bootstrap": "5.3.0",
|
|
16
|
-
"@angular-slider/ngx-slider": "20.0.0",
|
|
17
|
-
"ngx-toastr": "19.1.0",
|
|
18
|
-
"tslib": "^2.8.0"
|
|
19
|
-
},
|
|
20
|
-
"sideEffects": false
|
|
21
|
-
|
|
22
|
-
"typings": "index.d.ts",
|
|
23
|
-
"exports": {
|
|
24
|
-
"./package.json": {
|
|
25
|
-
"default": "./package.json"
|
|
26
|
-
},
|
|
27
|
-
".": {
|
|
28
|
-
"types": "./index.d.ts",
|
|
29
|
-
"default": "./fesm2022/cityway-bo-ui.mjs"
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@cityway/bo-ui",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/common": "^20.3.0",
|
|
6
|
+
"@angular/core": "^20.3.0",
|
|
7
|
+
"@angular/forms": "^20.3.0",
|
|
8
|
+
"@angular/animations": "^20.3.0",
|
|
9
|
+
"@angular/cdk": "^20.2.2",
|
|
10
|
+
"@angular/platform-browser": "^20.3.0"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"@ng-bootstrap/ng-bootstrap": "19.0.1",
|
|
14
|
+
"@ng-select/ng-select": "20.0.1",
|
|
15
|
+
"bootstrap": "5.3.0",
|
|
16
|
+
"@angular-slider/ngx-slider": "20.0.0",
|
|
17
|
+
"ngx-toastr": "19.1.0",
|
|
18
|
+
"tslib": "^2.8.0"
|
|
19
|
+
},
|
|
20
|
+
"sideEffects": false
|
|
21
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<div ngbAccordion [closeOthers]="closeOthers" [destroyOnHide]="destroyOnHide">
|
|
2
|
+
@for (accordion of accordions.toArray(); track $index) {
|
|
3
|
+
<div ngbAccordionItem [disabled]="accordion.disabled" [collapsed]="accordion.collapsed">
|
|
4
|
+
<h2 ngbAccordionHeader>
|
|
5
|
+
<button ngbAccordionButton [attr.data-test-ctw]="'button-accordion-' + id + '-' + $index">
|
|
6
|
+
{{ accordion.title | translate }}
|
|
7
|
+
</button>
|
|
8
|
+
</h2>
|
|
9
|
+
<div ngbAccordionCollapse>
|
|
10
|
+
<div ngbAccordionBody>
|
|
11
|
+
<ng-container *ngTemplateOutlet="accordion.templateRef"></ng-container>
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
}
|
|
16
|
+
</div>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
import { AccordionsComponent } from './accordions.component';
|
|
3
|
+
|
|
4
|
+
describe('AccordionsComponent', () => {
|
|
5
|
+
let component: AccordionsComponent;
|
|
6
|
+
let fixture: ComponentFixture<AccordionsComponent>;
|
|
7
|
+
|
|
8
|
+
beforeEach(async () => {
|
|
9
|
+
await TestBed.configureTestingModule({
|
|
10
|
+
declarations: [ AccordionsComponent ]
|
|
11
|
+
})
|
|
12
|
+
.compileComponents();
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
beforeEach(() => {
|
|
16
|
+
fixture = TestBed.createComponent(AccordionsComponent);
|
|
17
|
+
component = fixture.componentInstance;
|
|
18
|
+
fixture.detectChanges();
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
it('should create', () => {
|
|
22
|
+
expect(component).toBeTruthy();
|
|
23
|
+
});
|
|
24
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Component, ContentChildren, Input, QueryList } from '@angular/core';
|
|
2
|
+
import { AccordionsContentComponent } from './components/accordions-content.component';
|
|
3
|
+
import { CommonModule } from '@angular/common';
|
|
4
|
+
import { TranslateModule } from '@ngx-translate/core';
|
|
5
|
+
import { NgbAccordionModule } from '@ng-bootstrap/ng-bootstrap';
|
|
6
|
+
|
|
7
|
+
@Component({
|
|
8
|
+
selector: 'app-accordions',
|
|
9
|
+
templateUrl: './accordions.component.html',
|
|
10
|
+
standalone: true,
|
|
11
|
+
imports: [
|
|
12
|
+
CommonModule,
|
|
13
|
+
TranslateModule,
|
|
14
|
+
NgbAccordionModule
|
|
15
|
+
]
|
|
16
|
+
})
|
|
17
|
+
export class AccordionsComponent {
|
|
18
|
+
|
|
19
|
+
@Input() title?: string;
|
|
20
|
+
@Input() closeOthers = false;
|
|
21
|
+
@Input() id = 'classic';
|
|
22
|
+
@Input() destroyOnHide = true;
|
|
23
|
+
@ContentChildren(AccordionsContentComponent) accordions!: QueryList<AccordionsContentComponent>;
|
|
24
|
+
|
|
25
|
+
constructor() { }
|
|
26
|
+
|
|
27
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
import { AccordionsContentComponent } from './accordions-content.component';
|
|
3
|
+
|
|
4
|
+
describe('AccordionsContentComponent', () => {
|
|
5
|
+
let component: AccordionsContentComponent;
|
|
6
|
+
let fixture: ComponentFixture<AccordionsContentComponent>;
|
|
7
|
+
|
|
8
|
+
beforeEach(async () => {
|
|
9
|
+
await TestBed.configureTestingModule({
|
|
10
|
+
declarations: [ AccordionsContentComponent ]
|
|
11
|
+
})
|
|
12
|
+
.compileComponents();
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
beforeEach(() => {
|
|
16
|
+
fixture = TestBed.createComponent(AccordionsContentComponent);
|
|
17
|
+
component = fixture.componentInstance;
|
|
18
|
+
fixture.detectChanges();
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
it('should create', () => {
|
|
22
|
+
expect(component).toBeTruthy();
|
|
23
|
+
});
|
|
24
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Component, Input, TemplateRef, ViewChild } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Component({
|
|
4
|
+
selector: 'app-accordions-content',
|
|
5
|
+
template: '<ng-template #content><ng-content></ng-content></ng-template>',
|
|
6
|
+
standalone: true
|
|
7
|
+
})
|
|
8
|
+
export class AccordionsContentComponent {
|
|
9
|
+
@Input() title!: string;
|
|
10
|
+
@Input() disabled = false;
|
|
11
|
+
@Input() collapsed = true;
|
|
12
|
+
|
|
13
|
+
@ViewChild('content', { static: true }) templateRef!: TemplateRef<any>;
|
|
14
|
+
|
|
15
|
+
get fragment(): string {
|
|
16
|
+
return this.slugify(this.title);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
private slugify(text: string): string {
|
|
20
|
+
return text
|
|
21
|
+
.toLowerCase()
|
|
22
|
+
.trim()
|
|
23
|
+
.normalize('NFD')
|
|
24
|
+
.replace(/[\u0300-\u036f]/g, '')
|
|
25
|
+
.replace(/[^a-z0-9]+/g, '-')
|
|
26
|
+
.replace(/^-+|-+$/g, '');
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
@if (isVisible) {
|
|
2
|
+
<div [class]="'alert alert-' + type + ' '+ cssClass" [ngClass]="{ 'alert-dismissible fade show': isDismissible }"
|
|
3
|
+
[attr.data-test-ctw]="dataTest ?? null">
|
|
4
|
+
|
|
5
|
+
@if (title) {
|
|
6
|
+
<div class="fw-bold">{{ title }}</div>
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
<ng-content></ng-content>
|
|
10
|
+
|
|
11
|
+
@if (isDismissible) {
|
|
12
|
+
<button type="button" class="btn-close" (click)="closeAlert()" [attr.aria-label]="'_COMMON._ACTION.CLOSE' | translate"></button>
|
|
13
|
+
}
|
|
14
|
+
</div>
|
|
15
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
import { AlertComponent } from './alert.component';
|
|
3
|
+
|
|
4
|
+
describe('AlertComponent', () => {
|
|
5
|
+
let component: AlertComponent;
|
|
6
|
+
let fixture: ComponentFixture<AlertComponent>;
|
|
7
|
+
|
|
8
|
+
beforeEach(async () => {
|
|
9
|
+
await TestBed.configureTestingModule({
|
|
10
|
+
declarations: [ AlertComponent ]
|
|
11
|
+
})
|
|
12
|
+
.compileComponents();
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
beforeEach(() => {
|
|
16
|
+
fixture = TestBed.createComponent(AlertComponent);
|
|
17
|
+
component = fixture.componentInstance;
|
|
18
|
+
fixture.detectChanges();
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
it('should create', () => {
|
|
22
|
+
expect(component).toBeTruthy();
|
|
23
|
+
});
|
|
24
|
+
});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
|
|
2
|
+
import { UiTypeEnum } from '../../enum/ui-type.enum';
|
|
3
|
+
import { TranslateModule } from '@ngx-translate/core';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
|
|
6
|
+
@Component({
|
|
7
|
+
selector: 'app-alert',
|
|
8
|
+
templateUrl: './alert.component.html',
|
|
9
|
+
standalone: true,
|
|
10
|
+
imports: [
|
|
11
|
+
CommonModule,
|
|
12
|
+
TranslateModule
|
|
13
|
+
]
|
|
14
|
+
})
|
|
15
|
+
export class AlertComponent implements OnInit {
|
|
16
|
+
|
|
17
|
+
@Input() type: UiTypeEnum;
|
|
18
|
+
@Input() title?: string;
|
|
19
|
+
@Input() isDismissible = false;
|
|
20
|
+
@Input() cssClass = '';
|
|
21
|
+
@Input() dataTest: string;
|
|
22
|
+
|
|
23
|
+
@Output() btnAction = new EventEmitter<string>();
|
|
24
|
+
|
|
25
|
+
public isVisible = true;
|
|
26
|
+
|
|
27
|
+
constructor() { }
|
|
28
|
+
|
|
29
|
+
ngOnInit(): void {
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
public closeAlert() {
|
|
33
|
+
this.isVisible = false;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
import { BadgeComponent } from './badge.component';
|
|
3
|
+
|
|
4
|
+
describe('BadgeComponent', () => {
|
|
5
|
+
let component: BadgeComponent;
|
|
6
|
+
let fixture: ComponentFixture<BadgeComponent>;
|
|
7
|
+
|
|
8
|
+
beforeEach(async () => {
|
|
9
|
+
await TestBed.configureTestingModule({
|
|
10
|
+
declarations: [ BadgeComponent ]
|
|
11
|
+
})
|
|
12
|
+
.compileComponents();
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
beforeEach(() => {
|
|
16
|
+
fixture = TestBed.createComponent(BadgeComponent);
|
|
17
|
+
component = fixture.componentInstance;
|
|
18
|
+
fixture.detectChanges();
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
it('should create', () => {
|
|
22
|
+
expect(component).toBeTruthy();
|
|
23
|
+
});
|
|
24
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Component, Input, OnInit } from '@angular/core';
|
|
2
|
+
import { UiTypeEnum } from '../../enum/ui-type.enum';
|
|
3
|
+
import { IconComponent } from '../icon/icon.component';
|
|
4
|
+
|
|
5
|
+
@Component({
|
|
6
|
+
selector: 'app-badge',
|
|
7
|
+
templateUrl: './badge.component.html',
|
|
8
|
+
standalone: true,
|
|
9
|
+
imports: [IconComponent]
|
|
10
|
+
})
|
|
11
|
+
export class BadgeComponent implements OnInit {
|
|
12
|
+
|
|
13
|
+
@Input() type: UiTypeEnum;
|
|
14
|
+
@Input() label: string;
|
|
15
|
+
@Input() withIcon: string;
|
|
16
|
+
@Input() cssClass = '';
|
|
17
|
+
@Input() dataTest: string;
|
|
18
|
+
|
|
19
|
+
constructor() { }
|
|
20
|
+
|
|
21
|
+
ngOnInit(): void {
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
@if (!isDropdown) {
|
|
2
|
+
<button type="button" class="btn"
|
|
3
|
+
[class]="'btn-' + type"
|
|
4
|
+
[ngClass]="{ 'btn-min-width': isMinWidth, 'btn-sm': small }"
|
|
5
|
+
[disabled]="isDisabled"
|
|
6
|
+
(click)="onBtnAction()"
|
|
7
|
+
[attr.data-test-ctw]="dataTest ?? null">
|
|
8
|
+
|
|
9
|
+
@if (isLoading) {
|
|
10
|
+
<span class="spinner-border spinner-border-sm me-2" aria-hidden="true"></span>
|
|
11
|
+
<span class="visually-hidden" role="status">{{ '_COMMON._HTTP.TXT_LOADING' | translate }}</span>
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@if (withIcon) {
|
|
15
|
+
<app-icon [icon]="withIcon" [label]="label" [withOnlyIcon]="withOnlyIcon"></app-icon>
|
|
16
|
+
}
|
|
17
|
+
@else {
|
|
18
|
+
{{ label | translate }}
|
|
19
|
+
}
|
|
20
|
+
</button>
|
|
21
|
+
}
|
|
22
|
+
@else {
|
|
23
|
+
<div ngbDropdown class="d-inline-block">
|
|
24
|
+
<button class="btn"
|
|
25
|
+
[class]="'btn-' + type"
|
|
26
|
+
ngbDropdownToggle
|
|
27
|
+
type="button"
|
|
28
|
+
[ngClass]="{ 'btn-min-width': isMinWidth, 'spinner-border': isLoading }"
|
|
29
|
+
[disabled]="isDisabled"
|
|
30
|
+
[attr.data-test-ctw]="dataTest ?? null">
|
|
31
|
+
|
|
32
|
+
@if (withIcon) {
|
|
33
|
+
<app-icon class="me-2"></app-icon>
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
{{ label | translate }}
|
|
37
|
+
</button>
|
|
38
|
+
|
|
39
|
+
<ul ngbDropdownMenu class="dropdown-menu dropdown-menu-right">
|
|
40
|
+
<ng-content></ng-content>
|
|
41
|
+
</ul>
|
|
42
|
+
</div>
|
|
43
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { ButtonComponent } from './button.component';
|
|
4
|
+
|
|
5
|
+
describe('ButtonComponent', () => {
|
|
6
|
+
let component: ButtonComponent;
|
|
7
|
+
let fixture: ComponentFixture<ButtonComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
declarations: [ ButtonComponent ]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
beforeEach(() => {
|
|
17
|
+
fixture = TestBed.createComponent(ButtonComponent);
|
|
18
|
+
component = fixture.componentInstance;
|
|
19
|
+
fixture.detectChanges();
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
it('should create', () => {
|
|
23
|
+
expect(component).toBeTruthy();
|
|
24
|
+
});
|
|
25
|
+
});
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
|
|
2
|
+
import { UiTypeEnum } from '../../enum/ui-type.enum';
|
|
3
|
+
import { IconComponent } from '../icon/icon.component';
|
|
4
|
+
import { TranslateModule } from '@ngx-translate/core';
|
|
5
|
+
import { CommonModule } from '@angular/common';
|
|
6
|
+
import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap';
|
|
7
|
+
|
|
8
|
+
@Component({
|
|
9
|
+
selector: 'app-button',
|
|
10
|
+
templateUrl: './button.component.html',
|
|
11
|
+
standalone: true,
|
|
12
|
+
imports: [
|
|
13
|
+
CommonModule,
|
|
14
|
+
TranslateModule,
|
|
15
|
+
NgbDropdownModule,
|
|
16
|
+
IconComponent
|
|
17
|
+
]
|
|
18
|
+
})
|
|
19
|
+
export class ButtonComponent implements OnInit {
|
|
20
|
+
|
|
21
|
+
@Input() type: UiTypeEnum;
|
|
22
|
+
@Input() isDropdown = false;
|
|
23
|
+
@Input() withIcon: string;
|
|
24
|
+
@Input() withOnlyIcon = false;
|
|
25
|
+
@Input() isMinWidth = false;
|
|
26
|
+
@Input() isDisabled = false;
|
|
27
|
+
@Input() withSpinner = false;
|
|
28
|
+
@Input() label: string;
|
|
29
|
+
@Input() small = false;
|
|
30
|
+
@Input() dataTest: string;
|
|
31
|
+
|
|
32
|
+
@Output() btnAction = new EventEmitter<string>();
|
|
33
|
+
public isLoading = false;
|
|
34
|
+
|
|
35
|
+
constructor() { }
|
|
36
|
+
|
|
37
|
+
ngOnInit(): void {
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
public onBtnAction() {
|
|
41
|
+
this.btnAction.emit();
|
|
42
|
+
if (this.withSpinner) {
|
|
43
|
+
this.isLoading = !this.isLoading;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<div class="card">
|
|
2
|
+
@if (title) {
|
|
3
|
+
<h2 class="card-header">{{ title }}</h2>
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
<div class="card-body">
|
|
7
|
+
<ng-content></ng-content>
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
@if (showFooter) {
|
|
11
|
+
<div class="card-footer" #cardFooter>
|
|
12
|
+
<ng-content select="[card-footer]"></ng-content>
|
|
13
|
+
</div>
|
|
14
|
+
}
|
|
15
|
+
</div>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { CardComponent } from './card.component';
|
|
4
|
+
|
|
5
|
+
describe('CardComponent', () => {
|
|
6
|
+
let component: CardComponent;
|
|
7
|
+
let fixture: ComponentFixture<CardComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
declarations: [ CardComponent ]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
beforeEach(() => {
|
|
17
|
+
fixture = TestBed.createComponent(CardComponent);
|
|
18
|
+
component = fixture.componentInstance;
|
|
19
|
+
fixture.detectChanges();
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
it('should create', () => {
|
|
23
|
+
expect(component).toBeTruthy();
|
|
24
|
+
});
|
|
25
|
+
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { ChangeDetectorRef, Component, Input, OnInit, AfterViewInit, ViewChild, ElementRef } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'app-card',
|
|
6
|
+
templateUrl: './card.component.html',
|
|
7
|
+
standalone: true,
|
|
8
|
+
imports: [
|
|
9
|
+
CommonModule
|
|
10
|
+
]
|
|
11
|
+
})
|
|
12
|
+
|
|
13
|
+
export class CardComponent implements OnInit, AfterViewInit {
|
|
14
|
+
|
|
15
|
+
@Input() title: string;
|
|
16
|
+
@ViewChild('cardFooter') cardFooter: ElementRef<any>;
|
|
17
|
+
|
|
18
|
+
public showFooter = true;
|
|
19
|
+
|
|
20
|
+
constructor(private cdRef: ChangeDetectorRef) { }
|
|
21
|
+
|
|
22
|
+
ngOnInit(): void {
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
ngAfterViewInit(): void {
|
|
26
|
+
this.showFooter = this.cardFooter.nativeElement && this.cardFooter.nativeElement.children.length > 0;
|
|
27
|
+
this.cdRef.detectChanges();
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<div class="custom-card-light">
|
|
2
|
+
@for (group of customListData; track group.title) {
|
|
3
|
+
@if (group.title) {
|
|
4
|
+
<h3>{{ group.title | translate }}</h3>
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
<dl class="custom-description-list">
|
|
8
|
+
@for (field of group.fields; track field.label) {
|
|
9
|
+
@if (!field.hideIfEmpty || hasValue(field.value)) {
|
|
10
|
+
<dt [innerHTML]="'_LABEL.COLON' | translate: { label: (field.label | translate) }"></dt>
|
|
11
|
+
<dd>
|
|
12
|
+
@switch (field.type) {
|
|
13
|
+
@case ('date') {
|
|
14
|
+
{{ field.value | date: 'short' }}
|
|
15
|
+
}
|
|
16
|
+
@case ('boolean') {
|
|
17
|
+
{{ (field.value ? '_COMMON._PRO_SENTENCE.YES' : '_COMMON._PRO_SENTENCE.NO') | translate }}
|
|
18
|
+
}
|
|
19
|
+
@case ('html') {
|
|
20
|
+
<span [innerHTML]="field.value"></span>
|
|
21
|
+
}
|
|
22
|
+
@default {
|
|
23
|
+
{{ field.translateValue ? (field.value | translate) : field.value }}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
</dd>
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
</dl>
|
|
30
|
+
}
|
|
31
|
+
</div>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
import { CustomListComponent } from './custom-list.component';
|
|
3
|
+
|
|
4
|
+
describe('CustomListComponent', () => {
|
|
5
|
+
let component: CustomListComponent;
|
|
6
|
+
let fixture: ComponentFixture<CustomListComponent>;
|
|
7
|
+
|
|
8
|
+
beforeEach(async () => {
|
|
9
|
+
await TestBed.configureTestingModule({
|
|
10
|
+
declarations: [ CustomListComponent ]
|
|
11
|
+
})
|
|
12
|
+
.compileComponents();
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
beforeEach(() => {
|
|
16
|
+
fixture = TestBed.createComponent(CustomListComponent);
|
|
17
|
+
component = fixture.componentInstance;
|
|
18
|
+
fixture.detectChanges();
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
it('should create', () => {
|
|
22
|
+
expect(component).toBeTruthy();
|
|
23
|
+
});
|
|
24
|
+
});
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Component, Input, OnInit } from '@angular/core';
|
|
2
|
+
import { DataCustomListGroup } from '../../models/ui/custom-list.model';
|
|
3
|
+
import { TranslateModule } from '@ngx-translate/core';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
|
|
6
|
+
@Component({
|
|
7
|
+
selector: 'app-custom-list',
|
|
8
|
+
templateUrl: './custom-list.component.html',
|
|
9
|
+
standalone: true,
|
|
10
|
+
imports: [
|
|
11
|
+
CommonModule,
|
|
12
|
+
TranslateModule
|
|
13
|
+
]
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
export class CustomListComponent implements OnInit {
|
|
17
|
+
|
|
18
|
+
@Input() customListData: DataCustomListGroup[] = [];
|
|
19
|
+
|
|
20
|
+
constructor() { }
|
|
21
|
+
|
|
22
|
+
ngOnInit(): void {
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
hasValue(value: any): boolean {
|
|
26
|
+
if (value === null || value === undefined) {
|
|
27
|
+
return false;
|
|
28
|
+
};
|
|
29
|
+
if (typeof value === 'string' && value.trim() === '') {
|
|
30
|
+
return false;
|
|
31
|
+
};
|
|
32
|
+
if (Array.isArray(value) && value.length === 0) {
|
|
33
|
+
return false;
|
|
34
|
+
};
|
|
35
|
+
if (typeof value === 'object' && Object.keys(value).length === 0) {
|
|
36
|
+
return false;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
}
|