@cityway/bo-ui 1.0.1 → 1.0.3

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.
Files changed (208) hide show
  1. package/cityway-bo-ui-1.0.3.tgz +0 -0
  2. package/fesm2022/cityway-bo-ui.mjs +1598 -0
  3. package/fesm2022/cityway-bo-ui.mjs.map +1 -0
  4. package/index.d.ts +509 -0
  5. package/package.json +34 -21
  6. package/styles.min.css +5 -0
  7. package/styles.min.css.map +1 -0
  8. package/.eslintrc.json +0 -37
  9. package/ng-package.json +0 -21
  10. package/src/lib/bo-ui.config.ts +0 -8
  11. package/src/lib/components/accordions/accordions.component.html +0 -16
  12. package/src/lib/components/accordions/accordions.component.spec.ts +0 -24
  13. package/src/lib/components/accordions/accordions.component.ts +0 -27
  14. package/src/lib/components/accordions/components/accordions-content.component.spec.ts +0 -24
  15. package/src/lib/components/accordions/components/accordions-content.component.ts +0 -28
  16. package/src/lib/components/alert/alert.component.html +0 -15
  17. package/src/lib/components/alert/alert.component.spec.ts +0 -24
  18. package/src/lib/components/alert/alert.component.ts +0 -36
  19. package/src/lib/components/badge/badge.component.html +0 -7
  20. package/src/lib/components/badge/badge.component.spec.ts +0 -24
  21. package/src/lib/components/badge/badge.component.ts +0 -24
  22. package/src/lib/components/button/button.component.html +0 -43
  23. package/src/lib/components/button/button.component.spec.ts +0 -25
  24. package/src/lib/components/button/button.component.ts +0 -47
  25. package/src/lib/components/card/card.component.html +0 -15
  26. package/src/lib/components/card/card.component.spec.ts +0 -25
  27. package/src/lib/components/card/card.component.ts +0 -30
  28. package/src/lib/components/custom-list/custom-list.component.html +0 -31
  29. package/src/lib/components/custom-list/custom-list.component.spec.ts +0 -24
  30. package/src/lib/components/custom-list/custom-list.component.ts +0 -42
  31. package/src/lib/components/drag-n-drop-list/drag-n-drop-list.component.html +0 -27
  32. package/src/lib/components/drag-n-drop-list/drag-n-drop-list.component.spec.ts +0 -24
  33. package/src/lib/components/drag-n-drop-list/drag-n-drop-list.component.ts +0 -40
  34. package/src/lib/components/form-field/form-field.component.html +0 -333
  35. package/src/lib/components/form-field/form-field.component.spec.ts +0 -24
  36. package/src/lib/components/form-field/form-field.component.ts +0 -256
  37. package/src/lib/components/icon/icon.component.html +0 -9
  38. package/src/lib/components/icon/icon.component.spec.ts +0 -25
  39. package/src/lib/components/icon/icon.component.ts +0 -31
  40. package/src/lib/components/layout/admin-layout/admin-layout.component.html +0 -17
  41. package/src/lib/components/layout/admin-layout/admin-layout.component.ts +0 -181
  42. package/src/lib/components/layout/footer/footer.component.html +0 -51
  43. package/src/lib/components/layout/footer/footer.component.ts +0 -65
  44. package/src/lib/components/layout/header/header.component.html +0 -71
  45. package/src/lib/components/layout/header/header.component.ts +0 -95
  46. package/src/lib/components/layout/menu/menu.component.html +0 -115
  47. package/src/lib/components/layout/menu/menu.component.ts +0 -75
  48. package/src/lib/components/layout/menu-accordion/accordion.directive.ts +0 -57
  49. package/src/lib/components/layout/menu-accordion/accordionanchor.directive.ts +0 -21
  50. package/src/lib/components/layout/menu-accordion/accordionlink.directive.ts +0 -45
  51. package/src/lib/components/layout/menu-accordion/index.ts +0 -3
  52. package/src/lib/components/layout/sidebar/sidebar.component.html +0 -62
  53. package/src/lib/components/layout/sidebar/sidebar.component.ts +0 -28
  54. package/src/lib/components/layout/skip-links/skip-links.component.html +0 -3
  55. package/src/lib/components/layout/skip-links/skip-links.component.spec.ts +0 -25
  56. package/src/lib/components/layout/skip-links/skip-links.component.ts +0 -19
  57. package/src/lib/components/layout/title-breadcrumb/title-breadcrumb.component.html +0 -10
  58. package/src/lib/components/layout/title-breadcrumb/title-breadcrumb.component.spec.ts +0 -25
  59. package/src/lib/components/layout/title-breadcrumb/title-breadcrumb.component.ts +0 -16
  60. package/src/lib/components/legend/legend.component.html +0 -23
  61. package/src/lib/components/legend/legend.component.spec.ts +0 -24
  62. package/src/lib/components/legend/legend.component.ts +0 -28
  63. package/src/lib/components/loader/loader.component.html +0 -4
  64. package/src/lib/components/loader/loader.component.ts +0 -16
  65. package/src/lib/components/modals/modals.component.html +0 -71
  66. package/src/lib/components/modals/modals.component.spec.ts +0 -25
  67. package/src/lib/components/modals/modals.component.ts +0 -49
  68. package/src/lib/components/tab/components/tab-content.component.spec.ts +0 -24
  69. package/src/lib/components/tab/components/tab-content.component.ts +0 -27
  70. package/src/lib/components/tab/tab.component.html +0 -59
  71. package/src/lib/components/tab/tab.component.spec.ts +0 -24
  72. package/src/lib/components/tab/tab.component.ts +0 -79
  73. package/src/lib/components/table/components/actions-on-table/actions-on-table.component.html +0 -50
  74. package/src/lib/components/table/components/actions-on-table/actions-on-table.component.spec.ts +0 -24
  75. package/src/lib/components/table/components/actions-on-table/actions-on-table.component.ts +0 -33
  76. package/src/lib/components/table/components/filter/filter.component.html +0 -21
  77. package/src/lib/components/table/components/filter/filter.component.spec.ts +0 -24
  78. package/src/lib/components/table/components/filter/filter.component.ts +0 -38
  79. package/src/lib/components/table/table.component.html +0 -104
  80. package/src/lib/components/table/table.component.spec.ts +0 -24
  81. package/src/lib/components/table/table.component.ts +0 -85
  82. package/src/lib/components/wizard-stepper/components/wizard-step.component.spec.ts +0 -25
  83. package/src/lib/components/wizard-stepper/components/wizard-step.component.ts +0 -16
  84. package/src/lib/components/wizard-stepper/wizard-stepper.component.html +0 -45
  85. package/src/lib/components/wizard-stepper/wizard-stepper.component.spec.ts +0 -25
  86. package/src/lib/components/wizard-stepper/wizard-stepper.component.ts +0 -70
  87. package/src/lib/directives/double-scroll.ts +0 -64
  88. package/src/lib/directives/rwd-tabs.ts +0 -99
  89. package/src/lib/directives/show-hide-password.ts +0 -61
  90. package/src/lib/enum/drag-item.enum.ts +0 -5
  91. package/src/lib/enum/field-type.enum.ts +0 -36
  92. package/src/lib/enum/legend-type.enum.ts +0 -5
  93. package/src/lib/enum/modals.enum.ts +0 -6
  94. package/src/lib/enum/ui-type.enum.ts +0 -11
  95. package/src/lib/models/ui/custom-list.model.ts +0 -14
  96. package/src/lib/models/ui/legend.model.ts +0 -17
  97. package/src/lib/models/ui/table.model.ts +0 -33
  98. package/src/lib/services/ui/modals.service.ts +0 -47
  99. package/src/lib/services/version.service.ts +0 -22
  100. package/src/public-api.ts +0 -49
  101. package/tsconfig.lib.json +0 -18
  102. package/tsconfig.lib.prod.json +0 -11
  103. package/tsconfig.spec.json +0 -14
  104. package/tslint.json +0 -17
  105. /package/{src/lib → lib}/assets/fonts/bo/_variables.scss +0 -0
  106. /package/{src/lib → lib}/assets/fonts/bo/bo.scss +0 -0
  107. /package/{src/lib → lib}/assets/fonts/bo/bo.woff +0 -0
  108. /package/{src/lib → lib}/assets/fonts/bo/bo.woff2 +0 -0
  109. /package/{src/lib → lib}/assets/fonts/nunito/_nunito.scss +0 -0
  110. /package/{src/lib → lib}/assets/fonts/nunito/nunito-bold.woff +0 -0
  111. /package/{src/lib → lib}/assets/fonts/nunito/nunito-bold.woff2 +0 -0
  112. /package/{src/lib → lib}/assets/fonts/nunito/nunito-extrabold.woff +0 -0
  113. /package/{src/lib → lib}/assets/fonts/nunito/nunito-extrabold.woff2 +0 -0
  114. /package/{src/lib → lib}/assets/fonts/nunito/nunito-regular.woff +0 -0
  115. /package/{src/lib → lib}/assets/fonts/nunito/nunito-regular.woff2 +0 -0
  116. /package/{src/lib → lib}/assets/fonts/nunito/nunito-semi-bold.woff +0 -0
  117. /package/{src/lib → lib}/assets/fonts/nunito/nunito-semi-bold.woff2 +0 -0
  118. /package/{src/lib → lib}/assets/fonts/optyweb/_variables.scss +0 -0
  119. /package/{src/lib → lib}/assets/fonts/optyweb/optyweb.scss +0 -0
  120. /package/{src/lib → lib}/assets/fonts/optyweb/optyweb.woff +0 -0
  121. /package/{src/lib → lib}/assets/fonts/optyweb/optyweb.woff2 +0 -0
  122. /package/{src/lib → lib}/assets/i18n/common.en.json +0 -0
  123. /package/{src/lib → lib}/assets/i18n/common.fr.json +0 -0
  124. /package/{src/lib → lib}/assets/i18n/label.en.json +0 -0
  125. /package/{src/lib → lib}/assets/i18n/label.fr.json +0 -0
  126. /package/{src/lib → lib}/assets/images/common/bg-loader.svg +0 -0
  127. /package/{src/lib → lib}/assets/images/common/bg-menu.svg +0 -0
  128. /package/{src/lib → lib}/assets/images/common/bg-round.svg +0 -0
  129. /package/{src/lib → lib}/assets/images/common/check-mark.svg +0 -0
  130. /package/{src/lib → lib}/assets/images/common/loader.svg +0 -0
  131. /package/{src/lib → lib}/assets/images/common/logo-en-bw.svg +0 -0
  132. /package/{src/lib → lib}/assets/images/common/logo-en.svg +0 -0
  133. /package/{src/lib → lib}/assets/images/common/logo-fr-bw.svg +0 -0
  134. /package/{src/lib → lib}/assets/images/common/logo-fr.svg +0 -0
  135. /package/{src/lib → lib}/assets/images/favicon/android-chrome-192x192.png +0 -0
  136. /package/{src/lib → lib}/assets/images/favicon/android-chrome-512x512.png +0 -0
  137. /package/{src/lib → lib}/assets/images/favicon/apple-touch-icon.png +0 -0
  138. /package/{src/lib → lib}/assets/images/favicon/favicon-16x16.png +0 -0
  139. /package/{src/lib → lib}/assets/images/favicon/favicon-32x32.png +0 -0
  140. /package/{src/lib → lib}/assets/images/favicon/favicon-96x96.png +0 -0
  141. /package/{src/lib → lib}/assets/images/favicon/favicon.ico +0 -0
  142. /package/{src/lib → lib}/assets/images/favicon/site.webmanifest +0 -0
  143. /package/{src/lib → lib}/assets/images/icon/referential-icon.svg +0 -0
  144. /package/{src/lib → lib}/assets/images/login/login-bg.jpg +0 -0
  145. /package/{src/lib → lib}/assets/images/login/logo-cityway-baseline.svg +0 -0
  146. /package/{src/lib → lib}/assets/images/toast/warning.svg +0 -0
  147. /package/{src/lib → lib}/assets/styles/scss/_components.scss +0 -0
  148. /package/{src/lib → lib}/assets/styles/scss/_core.scss +0 -0
  149. /package/{src/lib → lib}/assets/styles/scss/_custom-bootstrap.scss +0 -0
  150. /package/{src/lib → lib}/assets/styles/scss/bootstrap/_accordion.scss +0 -0
  151. /package/{src/lib → lib}/assets/styles/scss/bootstrap/_alert.scss +0 -0
  152. /package/{src/lib → lib}/assets/styles/scss/bootstrap/_badge.scss +0 -0
  153. /package/{src/lib → lib}/assets/styles/scss/bootstrap/_breadcrumb.scss +0 -0
  154. /package/{src/lib → lib}/assets/styles/scss/bootstrap/_button-group.scss +0 -0
  155. /package/{src/lib → lib}/assets/styles/scss/bootstrap/_buttons.scss +0 -0
  156. /package/{src/lib → lib}/assets/styles/scss/bootstrap/_card.scss +0 -0
  157. /package/{src/lib → lib}/assets/styles/scss/bootstrap/_close.scss +0 -0
  158. /package/{src/lib → lib}/assets/styles/scss/bootstrap/_dropdown.scss +0 -0
  159. /package/{src/lib → lib}/assets/styles/scss/bootstrap/_forms.scss +0 -0
  160. /package/{src/lib → lib}/assets/styles/scss/bootstrap/_input-group.scss +0 -0
  161. /package/{src/lib → lib}/assets/styles/scss/bootstrap/_lists.scss +0 -0
  162. /package/{src/lib → lib}/assets/styles/scss/bootstrap/_modal.scss +0 -0
  163. /package/{src/lib → lib}/assets/styles/scss/bootstrap/_pagination.scss +0 -0
  164. /package/{src/lib → lib}/assets/styles/scss/bootstrap/_popover.scss +0 -0
  165. /package/{src/lib → lib}/assets/styles/scss/bootstrap/_progress.scss +0 -0
  166. /package/{src/lib → lib}/assets/styles/scss/bootstrap/_reboot.scss +0 -0
  167. /package/{src/lib → lib}/assets/styles/scss/bootstrap/_tables.scss +0 -0
  168. /package/{src/lib → lib}/assets/styles/scss/bootstrap/_tabs.scss +0 -0
  169. /package/{src/lib → lib}/assets/styles/scss/bootstrap/_tooltip.scss +0 -0
  170. /package/{src/lib → lib}/assets/styles/scss/bootstrap/_type.scss +0 -0
  171. /package/{src/lib → lib}/assets/styles/scss/components/_forms-firefox.scss +0 -0
  172. /package/{src/lib → lib}/assets/styles/scss/components/_leaflet.scss +0 -0
  173. /package/{src/lib → lib}/assets/styles/scss/components/_legend.scss +0 -0
  174. /package/{src/lib → lib}/assets/styles/scss/components/_ng-select.scss +0 -0
  175. /package/{src/lib → lib}/assets/styles/scss/components/_ng2-dragula.scss +0 -0
  176. /package/{src/lib → lib}/assets/styles/scss/components/_ng2-validation.scss +0 -0
  177. /package/{src/lib → lib}/assets/styles/scss/components/_ng5-slider.scss +0 -0
  178. /package/{src/lib → lib}/assets/styles/scss/components/_ngb-datepicker.scss +0 -0
  179. /package/{src/lib → lib}/assets/styles/scss/components/_ngb-timepicker.scss +0 -0
  180. /package/{src/lib → lib}/assets/styles/scss/components/_ngx-chips.scss +0 -0
  181. /package/{src/lib → lib}/assets/styles/scss/components/_ngx-editor.scss +0 -0
  182. /package/{src/lib → lib}/assets/styles/scss/components/_ngx-file-drop.scss +0 -0
  183. /package/{src/lib → lib}/assets/styles/scss/components/_ngx-intl-tel-input.scss +0 -0
  184. /package/{src/lib → lib}/assets/styles/scss/components/_ngx-slider.scss +0 -0
  185. /package/{src/lib → lib}/assets/styles/scss/components/_ngx-toast.scss +0 -0
  186. /package/{src/lib → lib}/assets/styles/scss/components/_pwd-policy.scss +0 -0
  187. /package/{src/lib → lib}/assets/styles/scss/components/_table.scss +0 -0
  188. /package/{src/lib → lib}/assets/styles/scss/components/_vis.scss +0 -0
  189. /package/{src/lib → lib}/assets/styles/scss/components/_wizard-stepper.scss +0 -0
  190. /package/{src/lib → lib}/assets/styles/scss/components/table/_table-action.scss +0 -0
  191. /package/{src/lib → lib}/assets/styles/scss/components/table/_table-bg-cell.scss +0 -0
  192. /package/{src/lib → lib}/assets/styles/scss/components/table/_table-double-scroll.scss +0 -0
  193. /package/{src/lib → lib}/assets/styles/scss/components/table/_table-filter.scss +0 -0
  194. /package/{src/lib → lib}/assets/styles/scss/components/table/_table-pagination.scss +0 -0
  195. /package/{src/lib → lib}/assets/styles/scss/components/table/_table-popover.scss +0 -0
  196. /package/{src/lib → lib}/assets/styles/scss/components/table/_table-sorting.scss +0 -0
  197. /package/{src/lib → lib}/assets/styles/scss/core/_footer.scss +0 -0
  198. /package/{src/lib → lib}/assets/styles/scss/core/_header.scss +0 -0
  199. /package/{src/lib → lib}/assets/styles/scss/core/_layout.scss +0 -0
  200. /package/{src/lib → lib}/assets/styles/scss/core/_menu.scss +0 -0
  201. /package/{src/lib → lib}/assets/styles/scss/core/_sidebar.scss +0 -0
  202. /package/{src/lib → lib}/assets/styles/scss/mixins/_utilities.scss +0 -0
  203. /package/{src/lib → lib}/assets/styles/scss/styles.scss +0 -0
  204. /package/{src/lib → lib}/assets/styles/scss/tools/_focus.scss +0 -0
  205. /package/{src/lib → lib}/assets/styles/scss/tools/_loader.scss +0 -0
  206. /package/{src/lib → lib}/assets/styles/scss/variables/_colors.scss +0 -0
  207. /package/{src/lib → lib}/assets/styles/scss/variables/_custom.scss +0 -0
  208. /package/{src/lib → lib}/assets/styles/scss/variables/_site.scss +0 -0
@@ -1,25 +0,0 @@
1
- import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
2
-
3
- import { TitleBreadcrumbComponent } from './title-breadcrumb.component';
4
-
5
- describe('TitleBreadcrumbComponent', () => {
6
- let component: TitleBreadcrumbComponent;
7
- let fixture: ComponentFixture<TitleBreadcrumbComponent>;
8
-
9
- beforeEach(waitForAsync(() => {
10
- TestBed.configureTestingModule({
11
- declarations: [ TitleBreadcrumbComponent ]
12
- })
13
- .compileComponents();
14
- }));
15
-
16
- beforeEach(() => {
17
- fixture = TestBed.createComponent(TitleBreadcrumbComponent);
18
- component = fixture.componentInstance;
19
- fixture.detectChanges();
20
- });
21
-
22
- it('should create', () => {
23
- expect(component).toBeTruthy();
24
- });
25
- });
@@ -1,16 +0,0 @@
1
- import { CommonModule } from '@angular/common';
2
- import { Component, Input } from '@angular/core';
3
- import { TranslateModule } from '@ngx-translate/core';
4
-
5
- @Component({
6
- selector: 'app-title-breadcrumb',
7
- templateUrl: './title-breadcrumb.component.html',
8
- standalone: true,
9
- imports: [
10
- TranslateModule,
11
- CommonModule
12
- ]
13
- })
14
- export class TitleBreadcrumbComponent {
15
- @Input() heading: string;
16
- }
@@ -1,23 +0,0 @@
1
- <div *ngIf="legend.title" class="legend-title">
2
- {{ '_COMMON._TABLE.LEGEND' | translate }}
3
- </div>
4
- <ul class="list-inline legend-items">
5
- @for (item of legend.data; track $index) {
6
- <li class="list-inline-item legend-item">
7
- @switch (item.type) {
8
- @case (legendTypeEnum.icon) {
9
- <app-icon [icon]="item.icon" [label]="item.label" [iconCssClass]="'text-' + item.colorUi" [iconColorCustom]="item.colorCustom">
10
- </app-icon>
11
- }
12
- @case (legendTypeEnum.badge) {
13
- <app-badge [type]="item.colorUi" [label]="item.labelBadge"></app-badge>
14
- {{item.label}}
15
- }
16
- @case (legendTypeEnum.color) {
17
- <span class="legend-item-color" [ngClass]="item.colorUi ?'legend-' + item.colorUi : ''" [style.background-color]="item.colorCustom"></span>
18
- {{item.label}}
19
- }
20
- }
21
- </li>
22
- }
23
- </ul>
@@ -1,24 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
- import { LegendComponent } from './legend.component';
3
-
4
- describe('LegendComponen', () => {
5
- let component: LegendComponent;
6
- let fixture: ComponentFixture<LegendComponent>;
7
-
8
- beforeEach(async () => {
9
- await TestBed.configureTestingModule({
10
- declarations: [ LegendComponent ]
11
- })
12
- .compileComponents();
13
- });
14
-
15
- beforeEach(() => {
16
- fixture = TestBed.createComponent(LegendComponent);
17
- component = fixture.componentInstance;
18
- fixture.detectChanges();
19
- });
20
-
21
- it('should create', () => {
22
- expect(component).toBeTruthy();
23
- });
24
- });
@@ -1,28 +0,0 @@
1
- import { CommonModule } from '@angular/common';
2
- import { Component, Input } from '@angular/core';
3
- import { TranslateModule } from '@ngx-translate/core';
4
- import { LegendTypeEnum } from '../../enum/legend-type.enum';
5
- import { Legend } from '../../models/ui/legend.model';
6
- import { BadgeComponent } from '../badge/badge.component';
7
- import { IconComponent } from '../icon/icon.component';
8
-
9
- @Component({
10
- selector: 'app-legend',
11
- templateUrl: './legend.component.html',
12
- standalone: true,
13
- imports: [
14
- CommonModule,
15
- IconComponent,
16
- BadgeComponent,
17
- TranslateModule
18
- ]
19
- })
20
- export class LegendComponent {
21
-
22
- @Input() legend: Legend;
23
-
24
- public legendTypeEnum = LegendTypeEnum;
25
-
26
- constructor() { }
27
-
28
- }
@@ -1,4 +0,0 @@
1
- <div class="animated-loader-container animated-loader-medium animated-loader-container-top">
2
- <div class="animated-loader mb-1" aria-live="assertive"></div>
3
- <div class="animated-loader-text">{{ '_COMMON._HTTP.TXT_LOADING' | translate }}</div>
4
- </div>
@@ -1,16 +0,0 @@
1
- import { Component } from '@angular/core';
2
- import { TranslateModule } from '@ngx-translate/core';
3
-
4
- @Component({
5
- selector: 'app-loader',
6
- templateUrl: './loader.component.html',
7
- standalone: true,
8
- imports: [
9
- TranslateModule
10
- ]
11
- })
12
- export class LoaderComponent {
13
-
14
- constructor() { }
15
-
16
- }
@@ -1,71 +0,0 @@
1
- @if (type !== modalsType.loader) {
2
- <div class="modal-header">
3
- @if (type === modalsType.delete) {
4
- <h1 class="modal-title" id="modal-basic-title">
5
- {{ '_COMMON._MODAL_DELETE.TITLE' | translate: { number: itemsToDelete.length, name: itemsToDeleteTitle } }}
6
- </h1>
7
- }
8
- @else {
9
- <h1 class="modal-title" id="modal-basic-title">
10
- {{ modalTitle | translate }}
11
- </h1>
12
- }
13
-
14
- <button type="button" class="btn-close" [attr.aria-label]="'_COMMON._ACTION.CLOSE' | translate"
15
- (click)="activeModal.dismiss()" data-test-ctw="btn-close-modal">
16
- </button>
17
- </div>
18
-
19
- <div class="modal-body">
20
- @if (type === modalsType.delete) {
21
- @if (itemsToDelete.length === 1) {
22
- <div [innerHTML]="'_COMMON._MODAL_DELETE.SIMPLE_TEXT' | translate"></div>
23
- }
24
- @if (itemsToDelete.length > 1) {
25
- <div [innerHTML]="'_COMMON._MODAL_DELETE.MULTIPLE_TEXT' | translate"></div>
26
- }
27
- @if (itemsToDelete.length > 0) {
28
- <ul class="mb-0">
29
- @for (item of itemsToDelete; track item) {
30
- <li>{{ item }}</li>
31
- }
32
- </ul>
33
- }
34
- }
35
- @else if (type === modalsType.custom || type === modalsType.quickSideView) {
36
- @if (customBodyTemplate) {
37
- <ng-container [ngTemplateOutlet]="customBodyTemplate" [ngTemplateOutletContext]="customBodyContext">
38
- </ng-container>
39
- }
40
- }
41
- </div>
42
-
43
- <div class="modal-footer">
44
- @if (type === modalsType.delete) {
45
- <app-button label="_COMMON._ACTION.DELETE" [type]="buttonTypeEnum.danger" [isMinWidth]="true"
46
- (btnAction)="actionClick()" dataTest="btn-action-modal">
47
- </app-button>
48
-
49
- <app-button label="_COMMON._ACTION.CANCEL" [type]="buttonTypeEnum.secondary" [isMinWidth]="true"
50
- (btnAction)="activeModal.dismiss()" dataTest="btn-close-modal">
51
- </app-button>
52
- }
53
- @else {
54
- @if(labelBtnAction) {
55
- <app-button [label]="labelBtnAction | translate" [type]="buttonTypeEnum.primary" [isMinWidth]="true"
56
- (btnAction)="actionClick()" dataTest="btn-close-modal">
57
- </app-button>
58
- }
59
-
60
- <app-button label="_COMMON._ACTION.CLOSE" [type]="buttonTypeEnum.secondary" [isMinWidth]="true"
61
- (btnAction)="activeModal.dismiss()" dataTest="btn-close-modal">
62
- </app-button>
63
- }
64
- </div>
65
- }
66
-
67
- @if (type === modalsType.loader) {
68
- <div class="modal-body">
69
- <app-loader></app-loader>
70
- </div>
71
- }
@@ -1,25 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { ModalsComponent } from './modals.component';
4
-
5
- describe('ModalsComponent', () => {
6
- let component: ModalsComponent;
7
- let fixture: ComponentFixture<ModalsComponent>;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- declarations: [ ModalsComponent ]
12
- })
13
- .compileComponents();
14
- });
15
-
16
- beforeEach(() => {
17
- fixture = TestBed.createComponent(ModalsComponent);
18
- component = fixture.componentInstance;
19
- fixture.detectChanges();
20
- });
21
-
22
- it('should create', () => {
23
- expect(component).toBeTruthy();
24
- });
25
- });
@@ -1,49 +0,0 @@
1
- import { Component, EventEmitter, Input, OnInit, Output, TemplateRef } from '@angular/core';
2
- import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
3
- import { ModalsType } from '../../enum/modals.enum';
4
- import { UiTypeEnum } from '../../enum/ui-type.enum';
5
- import { TranslateService } from '@ngx-translate/core';
6
- import { TranslateModule } from '@ngx-translate/core';
7
- import { CommonModule } from '@angular/common';
8
- import { ButtonComponent } from '../button/button.component';
9
- import { LoaderComponent } from '../loader/loader.component';
10
-
11
- @Component({
12
- selector: 'app-modals',
13
- templateUrl: './modals.component.html',
14
- standalone: true,
15
- imports: [
16
- CommonModule,
17
- TranslateModule,
18
- ButtonComponent,
19
- LoaderComponent
20
- ]
21
- })
22
- export class ModalsComponent implements OnInit {
23
- @Input() type: ModalsType;
24
- @Input() modalTitle: string;
25
- @Input() itemsToDelete: any[] = [];
26
- @Input() itemsToDeleteTitle = this.translateService.instant('_COMMON._MODAL_DELETE.DEFAULT_TYPE');
27
- @Input() labelBtnAction: string;
28
- @Input() customBodyTemplate?: TemplateRef<any>;
29
- @Input() customBodyContext?: any;
30
-
31
- @Output() btnAction = new EventEmitter<string>();
32
-
33
- public modalsType = ModalsType;
34
- public buttonTypeEnum = UiTypeEnum;
35
-
36
- constructor(
37
- public activeModal: NgbActiveModal,
38
- private translateService: TranslateService
39
- ) { }
40
-
41
- ngOnInit(): void {
42
- this.labelBtnAction = this.type === this.modalsType.quickSideView
43
- ? this.translateService.instant('_COMMON._ACTION.EDIT') : this.labelBtnAction;
44
- }
45
-
46
- public actionClick() {
47
- this.activeModal.close();
48
- }
49
- }
@@ -1,24 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
- import { TabContentComponent } from './tab-content.component';
3
-
4
- describe('TabContentComponent', () => {
5
- let component: TabContentComponent;
6
- let fixture: ComponentFixture<TabContentComponent>;
7
-
8
- beforeEach(async () => {
9
- await TestBed.configureTestingModule({
10
- declarations: [ TabContentComponent ]
11
- })
12
- .compileComponents();
13
- });
14
-
15
- beforeEach(() => {
16
- fixture = TestBed.createComponent(TabContentComponent);
17
- component = fixture.componentInstance;
18
- fixture.detectChanges();
19
- });
20
-
21
- it('should create', () => {
22
- expect(component).toBeTruthy();
23
- });
24
- });
@@ -1,27 +0,0 @@
1
- import { Component, Input, TemplateRef, ViewChild } from '@angular/core';
2
-
3
- @Component({
4
- selector: 'app-tab-content',
5
- template: '<ng-template #content><ng-content></ng-content></ng-template>',
6
- standalone: true
7
- })
8
- export class TabContentComponent {
9
- @Input() title!: string;
10
- @Input() disabled = false;
11
-
12
- @ViewChild('content', { static: true }) templateRef!: TemplateRef<any>;
13
-
14
- get fragment(): string {
15
- return this.slugify(this.title);
16
- }
17
-
18
- private slugify(text: string): string {
19
- return text
20
- .toLowerCase()
21
- .trim()
22
- .normalize('NFD')
23
- .replace(/[\u0300-\u036f]/g, '')
24
- .replace(/[^a-z0-9]+/g, '-')
25
- .replace(/^-+|-+$/g, '');
26
- }
27
- }
@@ -1,59 +0,0 @@
1
- @if (!basicDisplay) {
2
- <div class="card">
3
- @if (title) {
4
- <h2 class="card-header">{{ title | translate }}</h2>
5
- }
6
-
7
- <div class="card-body p-0">
8
- <ul ngbNav #nav="ngbNav" [(activeId)]="activeId" class="nav-tabs nav-tabs-card"
9
- (activeIdChange)="onTabChange($event)" appRwdTabs>
10
- @for (tab of tabs.toArray(); track tab; let i = $index) {
11
- <li [ngbNavItem]="i" [disabled]="tab.disabled">
12
- <a ngbNavLink [attr.data-test-ctw]="'link-tab-' + id + '-' + i">
13
- {{ tab.title | translate }}
14
- </a>
15
- <ng-template ngbNavContent>
16
- <ng-container *ngTemplateOutlet="tab.templateRef"></ng-container>
17
- </ng-template>
18
- </li>
19
- }
20
-
21
- <li ngbDropdown class="nav-item d-none" placement="bottom-right">
22
- <button (click)="false" class="nav-link" ngbDropdownToggle>
23
- {{ '_COMMON._ACTION.MORE' | translate }}
24
- </button>
25
- <ul ngbDropdownMenu placement="bottom right"></ul>
26
- </li>
27
- </ul>
28
- </div>
29
- </div>
30
-
31
- <div [ngbNavOutlet]="nav" class="tab-content-card"></div>
32
- }
33
- @else {
34
- @if (title) {
35
- <h2>{{ title | translate }}</h2>
36
- }
37
-
38
- <ul ngbNav #nav="ngbNav" [(activeId)]="activeId" class="nav-tabs" (activeIdChange)="onTabChange($event)" appRwdTabs>
39
- @for (tab of tabs.toArray(); track tab; let i = $index) {
40
- <li [ngbNavItem]="i" [disabled]="tab.disabled">
41
- <a ngbNavLink [attr.data-test-ctw]="'link-tab-' + i">
42
- {{ tab.title | translate }}
43
- </a>
44
- <ng-template ngbNavContent>
45
- <ng-container *ngTemplateOutlet="tab.templateRef"></ng-container>
46
- </ng-template>
47
- </li>
48
- }
49
-
50
- <li ngbDropdown class="nav-item d-none" placement="bottom-right">
51
- <button (click)="false" class="nav-link" ngbDropdownToggle>
52
- {{ '_COMMON._ACTION.MORE' | translate }}
53
- </button>
54
- <ul ngbDropdownMenu placement="bottom right"></ul>
55
- </li>
56
- </ul>
57
-
58
- <div [ngbNavOutlet]="nav" class="tab-content"></div>
59
- }
@@ -1,24 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
- import { TabComponent } from './tab.component';
3
-
4
- describe('TabComponent', () => {
5
- let component: TabComponent;
6
- let fixture: ComponentFixture<TabComponent>;
7
-
8
- beforeEach(async () => {
9
- await TestBed.configureTestingModule({
10
- declarations: [ TabComponent ]
11
- })
12
- .compileComponents();
13
- });
14
-
15
- beforeEach(() => {
16
- fixture = TestBed.createComponent(TabComponent);
17
- component = fixture.componentInstance;
18
- fixture.detectChanges();
19
- });
20
-
21
- it('should create', () => {
22
- expect(component).toBeTruthy();
23
- });
24
- });
@@ -1,79 +0,0 @@
1
- import { AfterContentInit, Component, ContentChildren, Input, QueryList } from '@angular/core';
2
- import { TabContentComponent } from './components/tab-content.component';
3
- import { ActivatedRoute, Router } from '@angular/router';
4
- import { CommonModule } from '@angular/common';
5
- import { TranslateModule } from '@ngx-translate/core';
6
- import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap';
7
-
8
- @Component({
9
- selector: 'app-tab',
10
- templateUrl: './tab.component.html',
11
- standalone: true,
12
- imports: [
13
- CommonModule,
14
- TranslateModule,
15
- NgbNavModule
16
- ]
17
- })
18
- export class TabComponent implements AfterContentInit {
19
-
20
- @Input() useFragment = true;
21
- @Input() title?: string;
22
- @Input() id: string;
23
- @Input() basicDisplay? = false;
24
- @ContentChildren(TabContentComponent) tabs!: QueryList<TabContentComponent>;
25
-
26
- public activeId = 0;
27
-
28
- constructor(
29
- private router: Router,
30
- private route: ActivatedRoute
31
- ) { }
32
-
33
- ngAfterContentInit(): void {
34
- const tabsArray = this.tabs.toArray();
35
- const firstEnabledIndex = tabsArray.findIndex(tab => !tab.disabled);
36
- this.activeId = firstEnabledIndex !== -1 ? firstEnabledIndex : 0;
37
-
38
- this.route.fragment.subscribe(fragment => {
39
- if (this.useFragment) {
40
- if (fragment) {
41
- const foundIndex = tabsArray.findIndex(
42
- tab => tab.fragment === fragment && !tab.disabled
43
- );
44
- if (foundIndex !== -1) {
45
- this.activeId = foundIndex;
46
- }
47
- } else {
48
- const currentTab = tabsArray[this.activeId];
49
- this.router.navigate([], {
50
- relativeTo: this.route,
51
- fragment: currentTab.fragment,
52
- queryParamsHandling: 'preserve',
53
- replaceUrl: true
54
- });
55
- }
56
- }
57
- });
58
- }
59
-
60
- public onTabChange(newIndex: number) {
61
- this.activeId = newIndex;
62
-
63
- if (!this.useFragment) {
64
- return;
65
- }
66
-
67
- const tabsArray = this.tabs.toArray();
68
- const selectedTab = tabsArray[newIndex];
69
-
70
- if (selectedTab && !selectedTab.disabled) {
71
- this.router.navigate([], {
72
- relativeTo: this.route,
73
- fragment: selectedTab.fragment,
74
- queryParamsHandling: 'preserve',
75
- replaceUrl: true
76
- });
77
- }
78
- }
79
- }
@@ -1,50 +0,0 @@
1
- <div class="actions-on-table" *ngIf="actionOnTable?.length || customContent">
2
- <div class="me-auto">
3
- @if (customContent) {
4
- <ng-container [ngTemplateOutlet]="customContent"></ng-container>
5
- }
6
- </div>
7
- <div class="btn-group">
8
- @for (action of actionOnTable; track action) {
9
- @if (action.action === actionOnTableAction.add) {
10
- <a (click)="onActionClick(actionOnTableAction.add)" href="javascript:void(0)" class="btn btn-primary btn-min-width">
11
- {{ '_COMMON._ACTION.ADD' | translate }}
12
- </a>
13
- }
14
-
15
- @if (action.action === actionOnTableAction.exportAll) {
16
- <div class="btn-group" ngbDropdown placement="bottom-right">
17
- <button class="btn btn-secondary btn-min-width" id="dd-export" ngbDropdownToggle>
18
- {{ '_COMMON._ACTION.EXPORT' | translate }}
19
- </button>
20
- <ul ngbDropdownMenu aria-labelledby="dd-export">
21
- <li>
22
- <button class="dropdown-item" (click)="onActionClick(actionOnTableAction.exportPage)">
23
- {{ '_COMMON._TABLE.EXPORT_CURRENT' | translate }}
24
- </button>
25
- </li>
26
- <li>
27
- <button class="dropdown-item" (click)="onActionClick(actionOnTableAction.exportAll)">
28
- {{ '_COMMON._TABLE.EXPORT_ALL' | translate }}
29
- </button>
30
- </li>
31
- </ul>
32
- </div>
33
- }
34
-
35
- @if (action.action === actionOnTableAction.custom1) {
36
- <a (click)="onActionClick(actionOnTableAction.custom1)" href="javascript:void(0)" class="btn btn-min-width"
37
- [ngClass]="'btn-' + action.type">
38
- {{ action.label }}
39
- </a>
40
- }
41
-
42
- @if (action.action === actionOnTableAction.custom2) {
43
- <a (click)="onActionClick(actionOnTableAction.custom2)" href="javascript:void(0)" class="btn btn-min-width"
44
- [ngClass]="'btn-' + action.type">
45
- {{ action.label }}
46
- </a>
47
- }
48
- }
49
- </div>
50
- </div>
@@ -1,24 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
- import { ActionsOnTableComponent } from './actions-on-table.component';
3
-
4
- describe('ActionsOnTableComponent', () => {
5
- let component: ActionsOnTableComponent;
6
- let fixture: ComponentFixture<ActionsOnTableComponent>;
7
-
8
- beforeEach(async () => {
9
- await TestBed.configureTestingModule({
10
- declarations: [ ActionsOnTableComponent ]
11
- })
12
- .compileComponents();
13
- });
14
-
15
- beforeEach(() => {
16
- fixture = TestBed.createComponent(ActionsOnTableComponent);
17
- component = fixture.componentInstance;
18
- fixture.detectChanges();
19
- });
20
-
21
- it('should create', () => {
22
- expect(component).toBeTruthy();
23
- });
24
- });
@@ -1,33 +0,0 @@
1
- import { CommonModule } from '@angular/common';
2
- import { Component, EventEmitter, Input, Output, TemplateRef } from '@angular/core';
3
- import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap';
4
- import { TranslateModule } from '@ngx-translate/core';
5
- import { ActionOnTable, ActionOnTableType } from '../../../../models/ui/table.model';
6
-
7
- @Component({
8
- selector: 'app-actions-on-table',
9
- templateUrl: './actions-on-table.component.html',
10
- standalone: true,
11
- imports: [
12
- TranslateModule,
13
- CommonModule,
14
- NgbDropdownModule
15
- ]
16
- })
17
-
18
- export class ActionsOnTableComponent {
19
-
20
- @Input() actionOnTable: ActionOnTable[] = [];
21
- @Input() customContent?: TemplateRef<any>;
22
-
23
- @Output() actionClick = new EventEmitter<ActionOnTableType>();
24
-
25
- public actionOnTableAction = ActionOnTableType;
26
-
27
- constructor() { }
28
-
29
- public onActionClick(action: ActionOnTableType): void {
30
- this.actionClick.emit(action);
31
- }
32
-
33
- }
@@ -1,21 +0,0 @@
1
- @if (
2
- [typeField.select, typeField.ngSelect, typeField.ngSelectMultiple, typeField.dateToDate,typeField.timeToTime,
3
- typeField.dateTimeToDateTime].includes(column.filter?.type)
4
- ) {
5
- <ng-container [ngTemplateOutlet]="field"></ng-container>
6
- }
7
- @else {
8
- <div class="input-group">
9
- <ng-container [ngTemplateOutlet]="field"></ng-container>
10
- <button *ngIf="cssClass" class="btn btn-secondary" type="button" (click)="onClearFilter()">&times;</button>
11
- </div>
12
- }
13
-
14
- <ng-template #field>
15
- <label class="form-label" [for]="column.key" class="visually-hidden">
16
- {{'_COMMON._FORM.FILTER_LABEL' | translate: { col: column.label } }}
17
- </label>
18
- <app-form-field [type]="column.filter?.type" [name]="column.key" [control]="control"
19
- [options]="column.filter?.options" [inTableFilter]="true" [cssClass]="cssClass"
20
- [placeholder]="'_COMMON._ACTION.FILTER_BY' | translate"></app-form-field>
21
- </ng-template>
@@ -1,24 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
- import { FilterComponent } from './filter.component';
3
-
4
- describe('FilterComponent', () => {
5
- let component: FilterComponent;
6
- let fixture: ComponentFixture<FilterComponent>;
7
-
8
- beforeEach(async () => {
9
- await TestBed.configureTestingModule({
10
- declarations: [ FilterComponent ]
11
- })
12
- .compileComponents();
13
- });
14
-
15
- beforeEach(() => {
16
- fixture = TestBed.createComponent(FilterComponent);
17
- component = fixture.componentInstance;
18
- fixture.detectChanges();
19
- });
20
-
21
- it('should create', () => {
22
- expect(component).toBeTruthy();
23
- });
24
- });