@smartsoft001/crud-shell-angular 2.76.0 → 2.80.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.
Files changed (75) hide show
  1. package/fesm2022/smartsoft001-crud-shell-angular.mjs +2840 -0
  2. package/fesm2022/smartsoft001-crud-shell-angular.mjs.map +1 -0
  3. package/index.d.ts +632 -0
  4. package/package.json +18 -3
  5. package/.storybook/addons.js +0 -1
  6. package/.storybook/config.js +0 -5
  7. package/.storybook/tsconfig.json +0 -8
  8. package/.storybook/webpack.config.js +0 -7
  9. package/jest.config.ts +0 -38
  10. package/ng-package.json +0 -7
  11. package/project.json +0 -49
  12. package/src/index.ts +0 -13
  13. package/src/lib/+state/crud.facade.ts +0 -82
  14. package/src/lib/+state/crud.methods.ts +0 -258
  15. package/src/lib/+state/crud.store.ts +0 -77
  16. package/src/lib/components/components.module.ts +0 -58
  17. package/src/lib/components/export/export.component.ts +0 -69
  18. package/src/lib/components/filter/base/base.component.ts +0 -175
  19. package/src/lib/components/filter/check/check.component.scss +0 -25
  20. package/src/lib/components/filter/check/check.component.ts +0 -72
  21. package/src/lib/components/filter/date/date.component.html +0 -30
  22. package/src/lib/components/filter/date/date.component.ts +0 -70
  23. package/src/lib/components/filter/date-time/date-time.component.html +0 -62
  24. package/src/lib/components/filter/date-time/date-time.component.ts +0 -56
  25. package/src/lib/components/filter/date-with-edit/date-with-edit.component.html +0 -109
  26. package/src/lib/components/filter/date-with-edit/date-with-edit.component.ts +0 -70
  27. package/src/lib/components/filter/filter.component.html +0 -52
  28. package/src/lib/components/filter/filter.component.ts +0 -34
  29. package/src/lib/components/filter/flag/flag.component.ts +0 -55
  30. package/src/lib/components/filter/index.ts +0 -9
  31. package/src/lib/components/filter/int/int.component.html +0 -74
  32. package/src/lib/components/filter/int/int.component.ts +0 -57
  33. package/src/lib/components/filter/radio/radio.component.ts +0 -74
  34. package/src/lib/components/filter/text/text.component.ts +0 -46
  35. package/src/lib/components/filters/filters.component.scss +0 -150
  36. package/src/lib/components/filters/filters.component.ts +0 -157
  37. package/src/lib/components/filters-config/filters-config.component.ts +0 -69
  38. package/src/lib/components/group/group.component.ts +0 -93
  39. package/src/lib/components/index.ts +0 -7
  40. package/src/lib/components/multiselect/multiselect.component.html +0 -41
  41. package/src/lib/components/multiselect/multiselect.component.scss +0 -125
  42. package/src/lib/components/multiselect/multiselect.component.ts +0 -104
  43. package/src/lib/crud-full.module.ts +0 -51
  44. package/src/lib/crud.config.ts +0 -79
  45. package/src/lib/crud.module.ts +0 -72
  46. package/src/lib/factories/list-pagination/list-pagination.factory.ts +0 -77
  47. package/src/lib/models/index.ts +0 -1
  48. package/src/lib/models/interfaces.ts +0 -34
  49. package/src/lib/pages/index.ts +0 -6
  50. package/src/lib/pages/item/base/base.component.ts +0 -54
  51. package/src/lib/pages/item/item.component.ts +0 -513
  52. package/src/lib/pages/item/standard/standard.component.scss +0 -0
  53. package/src/lib/pages/item/standard/standard.component.ts +0 -50
  54. package/src/lib/pages/list/base/base.component.ts +0 -29
  55. package/src/lib/pages/list/list.component.stories.ts +0 -77
  56. package/src/lib/pages/list/list.component.ts +0 -438
  57. package/src/lib/pages/list/standard/standard.component.ts +0 -42
  58. package/src/lib/pipes/form-options/form-options.pipe.ts +0 -61
  59. package/src/lib/pipes/index.ts +0 -2
  60. package/src/lib/pipes/pipes.module.ts +0 -9
  61. package/src/lib/providers/model-possibilities/model-possibilities.provider.ts +0 -19
  62. package/src/lib/services/crud/crud.service.spec.ts +0 -303
  63. package/src/lib/services/crud/crud.service.ts +0 -178
  64. package/src/lib/services/list-group/list-group.service.spec.ts +0 -87
  65. package/src/lib/services/list-group/list-group.service.ts +0 -65
  66. package/src/lib/services/page/page.service.spec.ts +0 -143
  67. package/src/lib/services/page/page.service.ts +0 -44
  68. package/src/lib/services/search/search.service.spec.ts +0 -134
  69. package/src/lib/services/search/search.service.ts +0 -42
  70. package/test-setup.ts +0 -0
  71. package/tsconfig.json +0 -13
  72. package/tsconfig.lib.json +0 -31
  73. package/tsconfig.lib.prod.json +0 -11
  74. package/tsconfig.spec.json +0 -10
  75. package/tslint.json +0 -10
@@ -1,52 +0,0 @@
1
- <!--<ion-item>-->
2
- @switch (item().fieldType) {
3
- @case (FieldType.date) {
4
- <smart-crud-filter-date
5
- [item]="item()"
6
- [filter]="filter()"
7
- ></smart-crud-filter-date>
8
- }
9
- @case (FieldType.dateWithEdit) {
10
- <smart-crud-filter-date-with-edit
11
- [item]="item()"
12
- [filter]="filter()"
13
- ></smart-crud-filter-date-with-edit>
14
- }
15
- @case (FieldType.dateTime) {
16
- <smart-crud-filter-date-time
17
- [item]="item()"
18
- [filter]="filter()"
19
- ></smart-crud-filter-date-time>
20
- }
21
- @case (FieldType.radio) {
22
- <smart-crud-filter-radio
23
- [item]="item()"
24
- [filter]="filter()"
25
- ></smart-crud-filter-radio>
26
- }
27
- @case (FieldType.check) {
28
- <smart-crud-filter-check
29
- [item]="item()"
30
- [filter]="filter()"
31
- ></smart-crud-filter-check>
32
- }
33
- @case (FieldType.flag) {
34
- <smart-crud-filter-flag
35
- [item]="item()"
36
- [filter]="filter()"
37
- ></smart-crud-filter-flag>
38
- }
39
- @case (FieldType.int) {
40
- <smart-crud-filter-int
41
- [item]="item()"
42
- [filter]="filter()"
43
- ></smart-crud-filter-int>
44
- }
45
- @default {
46
- <smart-crud-filter-text
47
- [item]="item()"
48
- [filter]="filter()"
49
- ></smart-crud-filter-text>
50
- }
51
- }
52
- <!--</ion-item>-->
@@ -1,34 +0,0 @@
1
- import { Component, input } from '@angular/core';
2
-
3
- import { FieldType, IModelFilter } from '@smartsoft001/models';
4
-
5
- import { ICrudFilter } from '../../models';
6
- import { FilterCheckComponent } from './check/check.component';
7
- import { FilterDateComponent } from './date/date.component';
8
- import { FilterDateTimeComponent } from './date-time/date-time.component';
9
- import { FilterDateWithEditComponent } from './date-with-edit/date-with-edit.component';
10
- import { FilterFlagComponent } from './flag/flag.component';
11
- import { FilterIntComponent } from './int/int.component';
12
- import { FilterRadioComponent } from './radio/radio.component';
13
- import { FilterTextComponent } from './text/text.component';
14
-
15
- @Component({
16
- selector: 'smart-crud-filter',
17
- templateUrl: './filter.component.html',
18
- imports: [
19
- FilterTextComponent,
20
- FilterIntComponent,
21
- FilterFlagComponent,
22
- FilterCheckComponent,
23
- FilterRadioComponent,
24
- FilterDateTimeComponent,
25
- FilterDateWithEditComponent,
26
- FilterDateComponent,
27
- ],
28
- })
29
- export class FilterComponent {
30
- FieldType = FieldType;
31
-
32
- item = input<IModelFilter>();
33
- filter = input<ICrudFilter>();
34
- }
@@ -1,55 +0,0 @@
1
- import { Component } from '@angular/core';
2
- import { FormsModule } from '@angular/forms';
3
- import { TranslatePipe } from '@ngx-translate/core';
4
-
5
- import { IEntity } from '@smartsoft001/domain-core';
6
-
7
- import { BaseComponent } from '../base/base.component';
8
-
9
- @Component({
10
- selector: 'smart-crud-filter-flag',
11
- template: `
12
- <!-- <ion-row>-->
13
- <!-- <ion-col>-->
14
- <div
15
- class="flag-container w-full flex flex-row flex-nowrap justify-between pr-5"
16
- >
17
- <!-- <ion-label class="align-middle my-6" position="static">-->
18
- {{ item().label | translate }}
19
- <!-- </ion-label>-->
20
- <!-- <ion-checkbox [(ngModel)]="value" slot="end"></ion-checkbox>-->
21
- </div>
22
- <!-- </ion-col>-->
23
- @if (typeof value === 'boolean') {
24
- <!-- <ion-col size="auto">-->
25
- <!-- <ion-button-->
26
- <!-- color="danger"-->
27
- <!-- (click)="refresh(null)"-->
28
- <!-- class="square-button m-3"-->
29
- <!-- >-->
30
- <!-- <ion-icon slot="icon-only" name="close-outline"></ion-icon>-->
31
- <!-- </ion-button>-->
32
- <!-- </ion-col>-->
33
- }
34
- <!-- </ion-row>-->
35
- `,
36
- imports: [TranslatePipe, FormsModule],
37
- styles: [
38
- `
39
- :host {
40
- width: 100%;
41
- .flag-container {
42
- ion-label {
43
- /*--color: var(--smart-color-dark);*/
44
- }
45
- }
46
- .square-button {
47
- height: var(--smart-button-height) !important;
48
- }
49
- }
50
- `,
51
- ],
52
- })
53
- export class FilterFlagComponent<
54
- T extends IEntity<string>,
55
- > extends BaseComponent<T> {}
@@ -1,9 +0,0 @@
1
- export * from './filter.component';
2
- export * from './date/date.component';
3
- export * from './date-with-edit/date-with-edit.component';
4
- export * from './date-time/date-time.component';
5
- export * from './radio/radio.component';
6
- export * from './text/text.component';
7
- export * from './flag/flag.component';
8
- export * from './check/check.component';
9
- export * from './int/int.component';
@@ -1,74 +0,0 @@
1
- <!--<ion-row>-->
2
- <!-- <ion-col>-->
3
- <!-- <ion-label>-->
4
- {{ item().label | translate }}
5
- <!-- </ion-label>-->
6
- @if (!advanced()) {
7
- <!-- <ion-input [(ngModel)]="value" type="number" step="1"></ion-input>-->
8
- }
9
- <!-- </ion-col>-->
10
- @if (allowAdvanced) {
11
- <!-- <ion-col size="auto">-->
12
- <!-- <ion-button-->
13
- <!-- (click)="toggleAdvanced()"-->
14
- <!-- class="square-button m-3"-->
15
- <!-- [disabled]="minValue || maxValue"-->
16
- <!-- >-->
17
- @if (!advanced()) {
18
- <!-- <ion-icon slot="icon-only" name="settings-outline"></ion-icon>-->
19
- } @else {
20
- <!-- <ion-icon slot="icon-only" name="settings"></ion-icon>-->
21
- }
22
- <!-- </ion-button>-->
23
- <!-- </ion-col>-->
24
- }
25
- @if (value || minValue || maxValue) {
26
- <!-- <ion-col size="auto">-->
27
- <!-- <ion-button color="danger" (click)="clear()" class="square-button m-3">-->
28
- <!-- <ion-icon slot="icon-only" name="close-outline"></ion-icon>-->
29
- <!-- </ion-button>-->
30
- <!-- </ion-col>-->
31
- }
32
- <!--</ion-row>-->
33
- @if ((advanced() || minValue || maxValue) && allowAdvanced) {
34
- <!-- <ion-row>-->
35
- <!-- <ion-col>-->
36
- <!-- <ion-item>-->
37
- <!-- <ion-label>-->
38
- {{ 'from' | translate }}
39
- <!-- </ion-label>-->
40
- <!-- <ion-input [(ngModel)]="minValue" type="number" step="1"></ion-input>-->
41
- <!-- </ion-item>-->
42
- <!-- </ion-col>-->
43
- @if (minValue) {
44
- <!-- <ion-col size="auto">-->
45
- <!-- <ion-button-->
46
- <!-- color="danger"-->
47
- <!-- (click)="refresh(null, '>=')"-->
48
- <!-- class="square-button m-3"-->
49
- <!-- >-->
50
- <!-- <ion-icon slot="icon-only" name="close-outline"></ion-icon>-->
51
- <!-- </ion-button>-->
52
- <!-- </ion-col>-->
53
- }
54
- <!-- <ion-col>-->
55
- <!-- <ion-item>-->
56
- <!-- <ion-label>-->
57
- {{ 'to' | translate }}
58
- <!-- </ion-label>-->
59
- <!-- <ion-input [(ngModel)]="maxValue" type="number" step="1"></ion-input>-->
60
- <!-- </ion-item>-->
61
- <!-- </ion-col>-->
62
- @if (maxValue) {
63
- <!-- <ion-col size="auto">-->
64
- <!-- <ion-button-->
65
- <!-- color="danger"-->
66
- <!-- (click)="refresh(null, '<=')"-->
67
- <!-- class="square-button m-3"-->
68
- <!-- >-->
69
- <!-- <ion-icon slot="icon-only" name="close-outline"></ion-icon>-->
70
- <!-- </ion-button>-->
71
- <!-- </ion-col>-->
72
- }
73
- <!-- </ion-row>-->
74
- }
@@ -1,57 +0,0 @@
1
- import {
2
- Component,
3
- OnDestroy,
4
- OnInit,
5
- signal,
6
- WritableSignal,
7
- } from '@angular/core';
8
- import { FormsModule } from '@angular/forms';
9
- import { TranslatePipe } from '@ngx-translate/core';
10
- import { Subscription } from 'rxjs';
11
-
12
- import { IEntity } from '@smartsoft001/domain-core';
13
-
14
- import { BaseComponent } from '../base/base.component';
15
-
16
- @Component({
17
- selector: 'smart-crud-filter-int',
18
- templateUrl: './int.component.html',
19
- imports: [TranslatePipe, FormsModule],
20
- styles: [
21
- `
22
- :host {
23
- width: 100%;
24
- .square-button {
25
- height: var(--smart-button-height) !important;
26
- }
27
- }
28
- `,
29
- ],
30
- })
31
- export class FilterIntComponent<T extends IEntity<string>>
32
- extends BaseComponent<T>
33
- implements OnInit, OnDestroy
34
- {
35
- private _subscriptions = new Subscription();
36
-
37
- advanced: WritableSignal<boolean> = signal<boolean>(false);
38
-
39
- get allowAdvanced(): boolean {
40
- return this.item()?.type === '=';
41
- }
42
-
43
- ngOnInit(): void {
44
- super.ngOnInit();
45
- }
46
-
47
- ngOnDestroy(): void {
48
- if (this._subscriptions) {
49
- this._subscriptions.unsubscribe();
50
- }
51
- }
52
-
53
- toggleAdvanced(): void {
54
- this.advanced.update((val) => !val);
55
- if (this.advanced) this.value = null;
56
- }
57
- }
@@ -1,74 +0,0 @@
1
- import { Component } from '@angular/core';
2
- import { FormsModule } from '@angular/forms';
3
- import { TranslatePipe } from '@ngx-translate/core';
4
-
5
- import { IEntity } from '@smartsoft001/domain-core';
6
-
7
- import { BaseComponent } from '../base/base.component';
8
-
9
- @Component({
10
- selector: 'smart-crud-filter-radio',
11
- template: `
12
- <!-- <ion-row>-->
13
- <!-- <ion-col>-->
14
- <!-- <ion-radio-group [(ngModel)]="value">-->
15
- <!-- <ion-item-divider class="font-light text-xl">-->
16
- <!-- <ion-icon class="mr-6 text-2xl" slot="start" name="filter-outline"></ion-icon>-->
17
- <!-- <ion-label>-->
18
- {{ item().label | translate }}
19
- <!-- </ion-label>-->
20
- @if (value || value === false) {
21
- <!-- <ion-button-->
22
- <!-- slot="end"-->
23
- <!-- color="danger"-->
24
- <!-- (click)="refresh(null)"-->
25
- <!-- class="square-button m-0 text-lg h-9 w-9 p-0"-->
26
- <!-- >-->
27
- <!-- <ion-icon class="mr-6 text-2xl m-0 p-0" slot="icon-only" name="close-outline"></ion-icon>-->
28
- <!-- </ion-button>-->
29
- }
30
- <!-- </ion-item-divider>-->
31
-
32
- @for (item of possibilities(); track item) {
33
- <!-- <ion-item>-->
34
- <!-- <ion-label>{{ item.text | translate }}</ion-label>-->
35
- <!-- <ion-radio class="mr-10" [value]="item.id"></ion-radio>-->
36
- <!-- </ion-item>-->
37
- }
38
- <!-- </ion-radio-group>-->
39
- <!-- </ion-col>-->
40
- <!-- </ion-row>-->
41
- `,
42
- imports: [TranslatePipe, FormsModule],
43
- styles: [
44
- `
45
- :host {
46
- width: 100%;
47
- margin-bottom: 1.2rem;
48
- ion-item-divider {
49
- //--padding-end: 0.8rem;
50
- //--ion-background-color: linear-gradient(
51
- // 90deg,
52
- // transparent,
53
- // var(--ion-color-light)
54
- //);
55
- ion-icon {
56
- //--color: var(--ion-color-primary);
57
- }
58
- ion-label {
59
- //--padding: var(--smart-button-padding-left) / 2
60
- // var(--smart-button-padding-top) / 2 var(--smart-button-padding-right) /
61
- // 2 var(--smart-button-padding-bottom) / 2;
62
- }
63
- .square-button {
64
- //--padding-start: 0.2em;
65
- //--padding-end: 0.2em;
66
- }
67
- }
68
- }
69
- `,
70
- ],
71
- })
72
- export class FilterRadioComponent<
73
- T extends IEntity<string>,
74
- > extends BaseComponent<T> {}
@@ -1,46 +0,0 @@
1
- import { Component } from '@angular/core';
2
- import { FormsModule } from '@angular/forms';
3
- import { TranslatePipe } from '@ngx-translate/core';
4
-
5
- import { IEntity } from '@smartsoft001/domain-core';
6
-
7
- import { BaseComponent } from '../base/base.component';
8
-
9
- @Component({
10
- selector: 'smart-crud-filter-text',
11
- template: `
12
- <!-- <ion-row>-->
13
- <!-- <ion-col>-->
14
- <!-- <ion-label position="floating">-->
15
- {{ item().label | translate }}
16
- <!-- </ion-label>-->
17
- <!-- <ion-input [(ngModel)]="value"></ion-input>-->
18
- <!-- </ion-col>-->
19
- @if (value) {
20
- <!-- <ion-col size="auto">-->
21
- <!-- <ion-button-->
22
- <!-- color="danger"-->
23
- <!-- (click)="refresh(null)"-->
24
- <!-- class="square-button m-3"-->
25
- <!-- >-->
26
- <!-- <ion-icon slot="icon-only" name="close-outline"></ion-icon>-->
27
- <!-- </ion-button>-->
28
- <!-- </ion-col>-->
29
- }
30
- <!-- </ion-row>-->
31
- `,
32
- imports: [TranslatePipe, FormsModule],
33
- styles: [
34
- `
35
- :host {
36
- width: 100%;
37
- .square-button {
38
- height: var(--smart-button-height) !important;
39
- }
40
- }
41
- `,
42
- ],
43
- })
44
- export class FilterTextComponent<
45
- T extends IEntity<string>,
46
- > extends BaseComponent<T> {}
@@ -1,150 +0,0 @@
1
- :host {
2
- ion-toolbar {
3
- //--background: linear-gradient(
4
- // 33deg,
5
- // var(--ion-color-light),
6
- // var(--ion-color-light-shade)
7
- //);
8
- //--color: var(--ion-color-dark);
9
- ion-modal & {
10
- //--background: linear-gradient(
11
- // 33deg,
12
- // var(--ion-color-light),
13
- // var(--ion-color-light-shade)
14
- //);
15
- //--color: var(--ion-color-dark);
16
- }
17
- // @media (max-width: var(--smart-tablet-breakpoint)) {
18
- @media only screen and (max-width: 992px) {
19
- //--background: linear-gradient(
20
- // 33deg,
21
- // var(--ion-color-primary),
22
- // var(--ion-color-tertiary)
23
- //);
24
- //--color: var(--ion-color-light);
25
- ion-modal & {
26
- //--background: linear-gradient(
27
- // 33deg,
28
- // var(--ion-color-light),
29
- // var(--ion-color-light-shade)
30
- //);
31
- //color: var(--ion-color-dark);
32
- }
33
- }
34
- // @media (max-width: var(--smart-phone-breakpoint)) {
35
- @media only screen and (max-width: 420px) {
36
- //--background: linear-gradient(
37
- // 33deg,
38
- // var(--ion-color-primary),
39
- // var(--ion-color-tertiary)
40
- //);
41
- //--color: var(--ion-color-light);
42
- ion-modal & {
43
- //--background: linear-gradient(
44
- // 33deg,
45
- // var(--ion-color-light),
46
- // var(--ion-color-light-shade)
47
- //);
48
- //color: var(--ion-color-dark);
49
- }
50
- }
51
- // TODO: verify ios can exist on the component, if not remove
52
- &.ios {
53
- height: 4.6rem;
54
- //--background: linear-gradient(
55
- // 33deg,
56
- // var(--ion-color-light),
57
- // var(--ion-color-light-shade)
58
- //);
59
- //--color: var(--ion-color-dark);
60
- // @media (max-width: var(--smart-tablet-breakpoint)) {
61
- @media only screen and (max-width: 992px) {
62
- //--background: linear-gradient(
63
- // 33deg,
64
- // var(--ion-color-primary),
65
- // var(--ion-color-tertiary)
66
- //);
67
- //--color: var(--ion-color-light);
68
- ion-title {
69
- //text-align: left;
70
- //padding-left: 5.2rem;
71
- }
72
- ion-icon {
73
- //color: var(--ion-color-light);
74
- }
75
- }
76
- // @media (max-width: var(--smart-phone-breakpoint)) {
77
- @media only screen and (max-width: 420px) {
78
- //--background: linear-gradient(
79
- // 33deg,
80
- // var(--ion-color-primary),
81
- // var(--ion-color-tertiary)
82
- //);
83
- //--color: var(--ion-color-light);
84
- ion-title {
85
- //text-align: left;
86
- //padding-left: 5.2rem;
87
- }
88
- ion-icon {
89
- //color: var(--ion-color-light);
90
- }
91
- }
92
- .modal-wrapper & {
93
- //--background: linear-gradient(
94
- // 33deg,
95
- // var(--ion-color-light),
96
- // var(--ion-color-light-shade)
97
- //);
98
- //--color: var(--ion-color-dark);
99
- // @media (max-width: var(--smart-tablet-breakpoint)) {
100
- @media only screen and (max-width: 992px) {
101
- //--background: linear-gradient(
102
- // 33deg,
103
- // var(--ion-color-light),
104
- // var(--ion-color-light-shade)
105
- //);
106
- //color: var(--ion-color-dark);
107
- ion-title {
108
- //text-align: left;
109
- //padding-left: 1.2rem;
110
- }
111
- ion-icon {
112
- //color: var(--ion-color-dark);
113
- }
114
- ion-buttons {
115
- //margin: 0;
116
- }
117
- }
118
- // @media (max-width: var(--smart-phone-breakpoint)) {
119
- @media only screen and (max-width: 420px) {
120
- //--background: linear-gradient(
121
- // 33deg,
122
- // var(--ion-color-light),
123
- // var(--ion-color-light-shade)
124
- //);
125
- //color: var(--ion-color-dark);
126
- //ion-title {
127
- // text-align: left;
128
- // padding-left: 1.2rem;
129
- //}
130
- //ion-icon {
131
- // color: var(--ion-color-dark);
132
- //}
133
- //ion-buttons {
134
- // margin: 0;
135
- //}
136
- }
137
- }
138
- }
139
- ion-menu-button {
140
- //color: var(--ion-color-light);
141
- }
142
- ion-buttons {
143
- //height: var(--smart-button-height);
144
- &.ios {
145
- height: var(--smart-button-height);
146
- margin: 0;
147
- }
148
- }
149
- }
150
- }