@morozeckiy/dd-lib 0.1.1 → 0.1.2

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 (227) hide show
  1. package/esm2022/lib/common/lib-common-button.mjs +62 -0
  2. package/esm2022/lib/common/lib-common-input-text.mjs +172 -0
  3. package/esm2022/lib/core/dialog/dialog-config.mjs +15 -0
  4. package/esm2022/lib/core/dialog/dialog-container.component.mjs +40 -0
  5. package/esm2022/lib/core/dialog/dialog-ref.mjs +19 -0
  6. package/esm2022/lib/core/dialog/dialog.service.mjs +106 -0
  7. package/esm2022/lib/core/directives/auto-height.directive.mjs +36 -0
  8. package/esm2022/lib/core/directives/click-outside.directive.mjs +42 -0
  9. package/esm2022/lib/core/directives/counter.directive.mjs +64 -0
  10. package/esm2022/lib/core/directives/declension.directive.mjs +40 -0
  11. package/esm2022/lib/core/directives/resize-textarea.directive.mjs +26 -0
  12. package/esm2022/lib/core/directives/triangle.directive.mjs +75 -0
  13. package/esm2022/lib/core/index.mjs +26 -0
  14. package/esm2022/lib/core/pipes/filter-tabs.pipe.mjs +31 -0
  15. package/esm2022/lib/core/pipes/filter.pipe.mjs +49 -0
  16. package/esm2022/lib/core/pipes/highlight.pipe.mjs +23 -0
  17. package/esm2022/lib/core/pipes/reverse.pipe.mjs +17 -0
  18. package/esm2022/lib/core/pipes/safe.pipe.mjs +34 -0
  19. package/esm2022/lib/core/services/date.service.mjs +113 -0
  20. package/esm2022/lib/core/services/destroy.service.mjs +15 -0
  21. package/esm2022/lib/core/services/fetcher.service.mjs +92 -0
  22. package/esm2022/lib/core/services/interceptors.service.mjs +27 -0
  23. package/esm2022/lib/core/services/svg-icons.service.mjs +26 -0
  24. package/esm2022/lib/core/services/theme-constructor.service.mjs +64 -0
  25. package/esm2022/lib/core/services/validators.service.mjs +73 -0
  26. package/esm2022/lib/core/tools.mjs +128 -0
  27. package/esm2022/lib/core/tooltip/tooltip.component.mjs +27 -0
  28. package/esm2022/lib/core/tooltip/tooltip.directive.mjs +137 -0
  29. package/esm2022/lib/lib-accordion/lib-accordion.component.mjs +15 -0
  30. package/esm2022/lib/lib-back-button/lib-back-button.component.mjs +37 -0
  31. package/esm2022/lib/lib-button/lib-button.component.mjs +30 -0
  32. package/esm2022/lib/lib-calendar/lib-calendar.component.mjs +222 -0
  33. package/esm2022/lib/lib-card/lib-card.component.mjs +34 -0
  34. package/esm2022/lib/lib-checkbox/lib-checkbox.component.mjs +66 -0
  35. package/esm2022/lib/lib-comment-input/lib-comment-input.component.mjs +20 -0
  36. package/esm2022/lib/lib-file-upload/lib-file-upload.component.mjs +34 -0
  37. package/esm2022/lib/lib-filter-button/lib-filter-button.component.mjs +42 -0
  38. package/esm2022/lib/lib-image-loader/lib-image-loader.component.mjs +14 -0
  39. package/esm2022/lib/lib-input/lib-input.component.mjs +55 -0
  40. package/esm2022/lib/lib-loader/lib-loader.component.mjs +16 -0
  41. package/esm2022/lib/lib-period/lib-period.component.mjs +114 -0
  42. package/esm2022/lib/lib-radio/lib-radio.component.mjs +76 -0
  43. package/esm2022/lib/lib-search-input/lib-search-input.component.mjs +91 -0
  44. package/esm2022/lib/lib-select/lib-select.component.mjs +137 -0
  45. package/esm2022/lib/lib-skeleton/lib-skeleton.component.mjs +45 -0
  46. package/esm2022/lib/lib-sort/lib-sort.component.mjs +44 -0
  47. package/esm2022/lib/lib-step/lib-step.component.mjs +19 -0
  48. package/esm2022/lib/lib-svg/lib-svg.component.mjs +75 -0
  49. package/esm2022/lib/lib-svg-icon/lib-svg-icon.component.mjs +55 -0
  50. package/esm2022/lib/lib-tabs-fragment/lib-tabs-fragment.component.mjs +79 -0
  51. package/esm2022/lib/lib-textarea/lib-textarea.component.mjs +50 -0
  52. package/esm2022/lib/toast/toast-base/toast-base.component.mjs +29 -0
  53. package/esm2022/lib/toast/toast-placeholder/toast-placeholder.component.mjs +29 -0
  54. package/esm2022/lib/toast/toast.service.mjs +124 -0
  55. package/esm2022/lib/utils/decorators.mjs +102 -0
  56. package/esm2022/morozeckiy-dd-lib.mjs +5 -0
  57. package/esm2022/public-api.mjs +35 -0
  58. package/fesm2022/morozeckiy-dd-lib.mjs +3004 -0
  59. package/fesm2022/morozeckiy-dd-lib.mjs.map +1 -0
  60. package/index.d.ts +5 -0
  61. package/lib/common/lib-common-button.d.ts +20 -0
  62. package/lib/common/lib-common-input-text.d.ts +53 -0
  63. package/lib/core/dialog/dialog-config.d.ts +14 -0
  64. package/lib/core/dialog/dialog-container.component.d.ts +18 -0
  65. package/lib/core/dialog/dialog-ref.d.ts +18 -0
  66. package/lib/core/dialog/dialog.service.d.ts +28 -0
  67. package/lib/core/directives/auto-height.directive.d.ts +11 -0
  68. package/lib/core/directives/click-outside.directive.d.ts +11 -0
  69. package/lib/core/directives/counter.directive.d.ts +11 -0
  70. package/lib/core/directives/declension.directive.d.ts +13 -0
  71. package/lib/core/directives/resize-textarea.directive.d.ts +10 -0
  72. package/lib/core/directives/triangle.directive.d.ts +16 -0
  73. package/lib/core/index.d.ts +20 -0
  74. package/lib/core/pipes/filter-tabs.pipe.d.ts +7 -0
  75. package/lib/core/pipes/filter.pipe.d.ts +12 -0
  76. package/lib/core/pipes/highlight.pipe.d.ts +7 -0
  77. package/lib/core/pipes/reverse.pipe.d.ts +7 -0
  78. package/lib/core/pipes/safe.pipe.d.ts +10 -0
  79. package/lib/core/services/date.service.d.ts +41 -0
  80. package/lib/core/services/destroy.service.d.ts +8 -0
  81. package/lib/core/services/fetcher.service.d.ts +29 -0
  82. package/lib/core/services/interceptors.service.d.ts +12 -0
  83. package/lib/core/services/svg-icons.service.d.ts +9 -0
  84. package/lib/core/services/theme-constructor.service.d.ts +27 -0
  85. package/lib/core/services/validators.service.d.ts +18 -0
  86. package/lib/core/tools.d.ts +16 -0
  87. package/lib/core/tooltip/tooltip.component.d.ts +12 -0
  88. package/lib/core/tooltip/tooltip.directive.d.ts +22 -0
  89. package/lib/lib-accordion/lib-accordion.component.d.ts +8 -0
  90. package/lib/lib-back-button/lib-back-button.component.d.ts +13 -0
  91. package/lib/lib-button/lib-button.component.d.ts +10 -0
  92. package/lib/lib-calendar/lib-calendar.component.d.ts +76 -0
  93. package/lib/lib-card/lib-card.component.d.ts +16 -0
  94. package/lib/lib-checkbox/lib-checkbox.component.d.ts +23 -0
  95. package/lib/lib-comment-input/lib-comment-input.component.d.ts +8 -0
  96. package/lib/lib-file-upload/lib-file-upload.component.d.ts +12 -0
  97. package/lib/lib-filter-button/lib-filter-button.component.d.ts +13 -0
  98. package/lib/lib-image-loader/lib-image-loader.component.d.ts +6 -0
  99. package/lib/lib-input/lib-input.component.d.ts +13 -0
  100. package/lib/lib-loader/lib-loader.component.d.ts +6 -0
  101. package/lib/lib-period/lib-period.component.d.ts +41 -0
  102. package/lib/lib-radio/lib-radio.component.d.ts +25 -0
  103. package/lib/lib-search-input/lib-search-input.component.d.ts +29 -0
  104. package/lib/lib-select/lib-select.component.d.ts +30 -0
  105. package/lib/lib-skeleton/lib-skeleton.component.d.ts +16 -0
  106. package/lib/lib-sort/lib-sort.component.d.ts +18 -0
  107. package/lib/lib-step/lib-step.component.d.ts +7 -0
  108. package/{src/lib/lib-svg/lib-svg.component.ts → lib/lib-svg/lib-svg.component.d.ts} +38 -66
  109. package/lib/lib-svg-icon/lib-svg-icon.component.d.ts +18 -0
  110. package/lib/lib-tabs-fragment/lib-tabs-fragment.component.d.ts +29 -0
  111. package/lib/lib-textarea/lib-textarea.component.d.ts +13 -0
  112. package/lib/toast/toast-base/toast-base.component.d.ts +21 -0
  113. package/lib/toast/toast-placeholder/toast-placeholder.component.d.ts +12 -0
  114. package/lib/toast/toast.service.d.ts +35 -0
  115. package/lib/utils/decorators.d.ts +4 -0
  116. package/package.json +16 -3
  117. package/public-api.d.ts +30 -0
  118. package/ekgip-dd-lib-0.0.1.tgz +0 -0
  119. package/ng-package.json +0 -8
  120. package/src/lib/common/lib-common-button.ts +0 -34
  121. package/src/lib/common/lib-common-input-text.ts +0 -154
  122. package/src/lib/core/dialog/dialog-config.ts +0 -19
  123. package/src/lib/core/dialog/dialog-container.component.ts +0 -38
  124. package/src/lib/core/dialog/dialog-ref.ts +0 -28
  125. package/src/lib/core/dialog/dialog.service.ts +0 -144
  126. package/src/lib/core/directives/auto-height.directive.ts +0 -29
  127. package/src/lib/core/directives/click-outside.directive.ts +0 -33
  128. package/src/lib/core/directives/counter.directive.ts +0 -54
  129. package/src/lib/core/directives/declension.directive.ts +0 -29
  130. package/src/lib/core/directives/resize-textarea.directive.ts +0 -16
  131. package/src/lib/core/directives/triangle.directive.ts +0 -56
  132. package/src/lib/core/index.ts +0 -27
  133. package/src/lib/core/pipes/filter-tabs.pipe.ts +0 -25
  134. package/src/lib/core/pipes/filter.pipe.ts +0 -36
  135. package/src/lib/core/pipes/highlight.pipe.ts +0 -17
  136. package/src/lib/core/pipes/reverse.pipe.ts +0 -11
  137. package/src/lib/core/pipes/safe.pipe.ts +0 -37
  138. package/src/lib/core/services/date.service.ts +0 -153
  139. package/src/lib/core/services/destroy.service.ts +0 -10
  140. package/src/lib/core/services/fetcher.service.ts +0 -109
  141. package/src/lib/core/services/interceptors.service.ts +0 -26
  142. package/src/lib/core/services/svg-icons.service.ts +0 -25
  143. package/src/lib/core/services/theme-constructor.service.ts +0 -68
  144. package/src/lib/core/services/validators.service.ts +0 -73
  145. package/src/lib/core/tools.ts +0 -159
  146. package/src/lib/core/tooltip/tooltip.component.html +0 -10
  147. package/src/lib/core/tooltip/tooltip.component.scss +0 -59
  148. package/src/lib/core/tooltip/tooltip.component.ts +0 -27
  149. package/src/lib/core/tooltip/tooltip.directive.ts +0 -137
  150. package/src/lib/core/utils.ts +0 -28
  151. package/src/lib/lib-accordion/lib-accordion.component.html +0 -15
  152. package/src/lib/lib-accordion/lib-accordion.component.scss +0 -23
  153. package/src/lib/lib-accordion/lib-accordion.component.ts +0 -17
  154. package/src/lib/lib-back-button/lib-back-button.component.html +0 -4
  155. package/src/lib/lib-back-button/lib-back-button.component.scss +0 -3
  156. package/src/lib/lib-back-button/lib-back-button.component.ts +0 -31
  157. package/src/lib/lib-button/lib-button.component.html +0 -30
  158. package/src/lib/lib-button/lib-button.component.scss +0 -89
  159. package/src/lib/lib-button/lib-button.component.ts +0 -33
  160. package/src/lib/lib-calendar/lib-calendar.component.html +0 -64
  161. package/src/lib/lib-calendar/lib-calendar.component.scss +0 -88
  162. package/src/lib/lib-calendar/lib-calendar.component.ts +0 -227
  163. package/src/lib/lib-card/lib-card.component.html +0 -23
  164. package/src/lib/lib-card/lib-card.component.scss +0 -64
  165. package/src/lib/lib-card/lib-card.component.ts +0 -32
  166. package/src/lib/lib-checkbox/lib-checkbox.component.html +0 -15
  167. package/src/lib/lib-checkbox/lib-checkbox.component.scss +0 -80
  168. package/src/lib/lib-checkbox/lib-checkbox.component.ts +0 -67
  169. package/src/lib/lib-comment-input/lib-comment-input.component.html +0 -32
  170. package/src/lib/lib-comment-input/lib-comment-input.component.scss +0 -28
  171. package/src/lib/lib-comment-input/lib-comment-input.component.ts +0 -20
  172. package/src/lib/lib-file-upload/lib-file-upload.component.html +0 -14
  173. package/src/lib/lib-file-upload/lib-file-upload.component.scss +0 -3
  174. package/src/lib/lib-file-upload/lib-file-upload.component.ts +0 -26
  175. package/src/lib/lib-filter-button/lib-filter-button.component.html +0 -46
  176. package/src/lib/lib-filter-button/lib-filter-button.component.scss +0 -62
  177. package/src/lib/lib-filter-button/lib-filter-button.component.ts +0 -45
  178. package/src/lib/lib-image-loader/lib-image-loader.component.html +0 -17
  179. package/src/lib/lib-image-loader/lib-image-loader.component.scss +0 -6
  180. package/src/lib/lib-image-loader/lib-image-loader.component.ts +0 -16
  181. package/src/lib/lib-input/lib-input.component.html +0 -32
  182. package/src/lib/lib-input/lib-input.component.scss +0 -72
  183. package/src/lib/lib-input/lib-input.component.ts +0 -62
  184. package/src/lib/lib-loader/lib-loader.component.html +0 -29
  185. package/src/lib/lib-loader/lib-loader.component.scss +0 -26
  186. package/src/lib/lib-loader/lib-loader.component.ts +0 -13
  187. package/src/lib/lib-period/lib-period.component.html +0 -41
  188. package/src/lib/lib-period/lib-period.component.scss +0 -77
  189. package/src/lib/lib-period/lib-period.component.ts +0 -131
  190. package/src/lib/lib-radio/lib-radio.component.html +0 -22
  191. package/src/lib/lib-radio/lib-radio.component.scss +0 -113
  192. package/src/lib/lib-radio/lib-radio.component.ts +0 -78
  193. package/src/lib/lib-search-input/lib-search-input.component.html +0 -48
  194. package/src/lib/lib-search-input/lib-search-input.component.scss +0 -86
  195. package/src/lib/lib-search-input/lib-search-input.component.ts +0 -94
  196. package/src/lib/lib-select/lib-select.component.html +0 -83
  197. package/src/lib/lib-select/lib-select.component.scss +0 -130
  198. package/src/lib/lib-select/lib-select.component.ts +0 -152
  199. package/src/lib/lib-skeleton/lib-skeleton.component.html +0 -11
  200. package/src/lib/lib-skeleton/lib-skeleton.component.scss +0 -36
  201. package/src/lib/lib-skeleton/lib-skeleton.component.ts +0 -41
  202. package/src/lib/lib-sort/lib-sort.component.html +0 -21
  203. package/src/lib/lib-sort/lib-sort.component.scss +0 -21
  204. package/src/lib/lib-sort/lib-sort.component.ts +0 -52
  205. package/src/lib/lib-step/lib-step.component.html +0 -4
  206. package/src/lib/lib-step/lib-step.component.scss +0 -23
  207. package/src/lib/lib-step/lib-step.component.ts +0 -14
  208. package/src/lib/lib-svg/lib-svg.component.html +0 -15
  209. package/src/lib/lib-svg/lib-svg.component.scss +0 -81
  210. package/src/lib/lib-svg-icon/lib-svg-icon.component.css +0 -0
  211. package/src/lib/lib-svg-icon/lib-svg-icon.component.ts +0 -58
  212. package/src/lib/lib-tabs-fragment/lib-tabs-fragment.component.html +0 -12
  213. package/src/lib/lib-tabs-fragment/lib-tabs-fragment.component.scss +0 -19
  214. package/src/lib/lib-tabs-fragment/lib-tabs-fragment.component.ts +0 -88
  215. package/src/lib/lib-textarea/lib-textarea.component.html +0 -37
  216. package/src/lib/lib-textarea/lib-textarea.component.scss +0 -77
  217. package/src/lib/lib-textarea/lib-textarea.component.ts +0 -49
  218. package/src/lib/toast/toast-base/toast-base.component.html +0 -7
  219. package/src/lib/toast/toast-base/toast-base.component.scss +0 -44
  220. package/src/lib/toast/toast-base/toast-base.component.ts +0 -38
  221. package/src/lib/toast/toast-placeholder/toast-placeholder.component.ts +0 -20
  222. package/src/lib/toast/toast.service.ts +0 -130
  223. package/src/lib/utils/decorators.ts +0 -124
  224. package/src/public-api.ts +0 -35
  225. package/tsconfig.lib.json +0 -14
  226. package/tsconfig.lib.prod.json +0 -10
  227. package/tsconfig.spec.json +0 -14
@@ -1,130 +0,0 @@
1
- .lib-select {
2
- position: relative;
3
-
4
- input {
5
- width: 100%;
6
- height: 48px;
7
- padding: 15px 28px 15px 16px;
8
- overflow: hidden;
9
- text-overflow: ellipsis;
10
- border-radius: 8px;
11
- border: 1px solid var(--input-border-color);
12
- background-color: transparent;
13
- position: relative;
14
-
15
- &:hover {
16
- border-color: var(--input-active-border-colort);
17
- }
18
-
19
- &:focus {
20
- border-color: var(--input-active-border-colort);
21
- box-shadow: var(--input-active-border-shadow);
22
- }
23
-
24
- &:disabled {
25
- border: none;
26
- background-color: var(--input-disable-input);
27
- color: var(--input-disable-text);
28
- pointer-events: none;
29
-
30
- &::placeholder {
31
- color: var(--input-placeholder);
32
- }
33
- }
34
-
35
- &.invalid {
36
- border-color: var(--input-error-border-color);
37
-
38
- &:hover {
39
- border-color: var(--input-error-border-color);
40
- }
41
-
42
- &:focus {
43
- border-color: var(--input-error-border-color);
44
- box-shadow: var(--input-error-border-shadow);
45
- }
46
- }
47
- }
48
-
49
- .clear {
50
- cursor: pointer;
51
- position: absolute;
52
- right: 8px;
53
- top: 12px;
54
- }
55
-
56
- .chevron {
57
- cursor: pointer;
58
- position: absolute;
59
- right: 16px;
60
- top: 10px;
61
-
62
- &.up {
63
- transform: rotate(180deg);
64
- }
65
- }
66
-
67
- &__title {
68
- margin-bottom: 4px;
69
- font-size: 14px;
70
- line-height: 24px;
71
- display: flex;
72
- align-items: flex-start;
73
- }
74
-
75
- &__error {
76
- color: var(--primary-red-color);
77
- font-size: 12px;
78
- font-weight: 400;
79
- line-height: 10px;
80
- margin-top: 2px;
81
- }
82
-
83
- .select-list-wrapper {
84
- position: absolute;
85
- display: block;
86
- top: 80px;
87
- z-index: 100;
88
- width: 100%;
89
- max-height: 300px;
90
- overflow: auto;
91
- border-radius: 8px;
92
- box-shadow: var(--main-card-shadow);
93
- background-color: var(--main-card-color);
94
-
95
- .select-data {
96
- padding: 12px 16px;
97
- cursor: pointer;
98
- position: relative;
99
-
100
- &__desc {
101
- font-size: 14px;
102
- font-weight: 400;
103
- line-height: 24px;
104
- text-overflow: ellipsis;
105
- text-wrap: nowrap;
106
- padding-top: 2px;
107
- overflow: hidden;
108
- color: var(--second-gray-color);
109
- }
110
-
111
- &:hover {
112
- background: var(--select-act-hov-bgc);
113
- }
114
-
115
- &.active {
116
- background: var(--select-act-hov-bgc);
117
-
118
- .checked {
119
- position: absolute;
120
- right: 16px;
121
- top: 10px;
122
- }
123
- }
124
- }
125
-
126
- .select-loader {
127
- padding: 24px;
128
- }
129
- }
130
- }
@@ -1,152 +0,0 @@
1
- import {
2
- ChangeDetectionStrategy,
3
- ChangeDetectorRef,
4
- Component,
5
- forwardRef,
6
- Host,
7
- Input,
8
- OnInit,
9
- Optional,
10
- SkipSelf,
11
- } from '@angular/core';
12
- import {NgOptimizedImage} from '@angular/common';
13
- import {
14
- ControlContainer,
15
- ControlValueAccessor,
16
- FormsModule,
17
- NG_VALUE_ACCESSOR,
18
- ReactiveFormsModule,
19
- } from '@angular/forms';
20
- import {LibCommonInputTextComponent} from '../common/lib-common-input-text';
21
- import {LibCardComponent} from '../lib-card/lib-card.component';
22
- import {LibLoaderComponent} from '../lib-loader/lib-loader.component';
23
- import {LibSvgIconComponent} from "../lib-svg-icon/lib-svg-icon.component";
24
- import {ClickOutsideDirective, FilterByKeyPipe, HighlightPipe, SafePipe} from "../core";
25
-
26
- @Component({
27
- selector: 'dd-lib-select',
28
- standalone: true,
29
- imports: [
30
- NgOptimizedImage,
31
- ReactiveFormsModule,
32
- FormsModule,
33
- HighlightPipe,
34
- LibCardComponent,
35
- SafePipe,
36
- ClickOutsideDirective,
37
- LibLoaderComponent,
38
- FilterByKeyPipe,
39
- LibSvgIconComponent,
40
- ],
41
- templateUrl: './lib-select.component.html',
42
- styleUrl: './lib-select.component.scss',
43
- providers: [
44
- {
45
- provide: NG_VALUE_ACCESSOR,
46
- useExisting: forwardRef(() => LibSelectComponent),
47
- multi: true,
48
- },
49
- ],
50
- changeDetection: ChangeDetectionStrategy.OnPush,
51
- })
52
- export class LibSelectComponent<T>
53
- extends LibCommonInputTextComponent
54
- implements OnInit, ControlValueAccessor
55
- {
56
- public static idCounter = 1;
57
-
58
- @Input() public selectId: string | undefined;
59
- @Input() public data: any | undefined;
60
- @Input() public keyTitle: string | undefined;
61
- @Input() public keyDesc: string | undefined;
62
- @Input() public keyValue: string | undefined;
63
- @Input() public override placeholder = 'Выберите из списка';
64
- public checkedItem: any;
65
- public inputValue: string | undefined;
66
- public searchValue: string | undefined;
67
- public isShownList: boolean | undefined;
68
-
69
- constructor(
70
- changeDetection: ChangeDetectorRef,
71
- @Optional() @Host() @SkipSelf() private controlContainer: ControlContainer,
72
- ) {
73
- super(changeDetection);
74
- }
75
-
76
- public ngOnInit(): void {
77
- if (!this.selectId) {
78
- this.selectId = 'dd-select-' + LibSelectComponent.idCounter++;
79
- }
80
- if (this.keyTitle && !this.keyValue) {
81
- this.keyValue = this.keyTitle;
82
- }
83
- this.control =
84
- this.controlContainer && this.formControlName
85
- ? this.controlContainer?.control?.get(this.formControlName)
86
- : null;
87
- }
88
-
89
- public override registerOnChange(fn: any): void {
90
- this.propagateChange = fn;
91
- super.registerOnChange(fn)
92
- }
93
-
94
- public override registerOnTouched(fn: any): void {
95
- this.onTouchedCallback = fn;
96
- super.registerOnTouched(fn)
97
- }
98
-
99
- public override handleInput(e: Event): void {
100
- this.isShownList = true;
101
- this.searchValue = this.inputValue;
102
- super.handleInput(e)
103
- }
104
-
105
- public override notifyFocusEvent(e: Event): void {
106
- if (!this.disabled) {
107
- this.isShownList = !this.isShownList;
108
- }
109
- super.notifyFocusEvent(e)
110
- }
111
-
112
- public writeValue(value: any): void {
113
- this.value = value;
114
- this.inputValue = value;
115
- }
116
-
117
- public selectItem(item: any): void {
118
- if (typeof item === 'string') {
119
- if (!this.checkedItem) {
120
- this.checkedItem = item;
121
- this.inputValue = item;
122
- this.value = item;
123
- this.propagateChange(this.value);
124
- } else {
125
- this.checkedItem = null;
126
- this.inputValue = undefined;
127
- this.value = undefined;
128
- this.propagateChange(undefined);
129
- }
130
- } else {
131
- if (!this.checkedItem || item[this.keyValue!] !== this.checkedItem?.[this.keyValue!]) {
132
- this.checkedItem = item;
133
- this.inputValue = this.checkedItem[this.keyTitle!];
134
- this.value = item[this.keyValue!];
135
- this.propagateChange(this.value);
136
- } else {
137
- this.checkedItem = null;
138
- this.inputValue = undefined;
139
- this.value = undefined;
140
- this.propagateChange(undefined);
141
- }
142
- }
143
- this.searchValue = undefined;
144
- this.isShownList = false;
145
- }
146
-
147
- public filterList(item: any): any {
148
- return item[this.keyTitle!]?.toLowerCase().includes(this.searchValue?.toLowerCase() || '');
149
- }
150
-
151
- private propagateChange(_value: any) {}
152
- }
@@ -1,11 +0,0 @@
1
- @if (_skeleton && _plugs.length) { @for (plug of _plugs; track plug) {
2
- <div
3
- [class.skeleton]="_skeleton"
4
- [style.height]="_skeleton ? sHeight : ''"
5
- [style.margin-bottom]="sMb"
6
- class="skelet full-width full-height"></div>
7
- } } @else {
8
- <div [style.height]="_skeleton ? sHeight : ''" [class.skeleton]="_skeleton" [ddAutoHeight]="deepParent">
9
- <ng-content></ng-content>
10
- </div>
11
- }
@@ -1,36 +0,0 @@
1
- :host {
2
- min-width: 100%;
3
- }
4
- .skeleton {
5
- position: relative;
6
- overflow: hidden;
7
- min-height: 100%;
8
- &::after {
9
- position: absolute;
10
- top: 0;
11
- right: 0;
12
- bottom: 0;
13
- left: 0;
14
- transform: translateX(-100%);
15
- background-image: linear-gradient(
16
- 90deg,
17
- rgba(#d0cdcd, 0) 0,
18
- rgba(#d0cdcd, 0.2) 20%,
19
- rgba(#d0cdcd, 0.5) 60%,
20
- rgba(#d0cdcd, 0)
21
- );
22
- animation: shimmer 2s infinite;
23
- content: '';
24
- }
25
-
26
- @keyframes shimmer {
27
- 100% {
28
- transform: translateX(100%);
29
- }
30
- }
31
- }
32
- .skelet {
33
- min-height: 100%;
34
- border-radius: 24px;
35
- //margin-bottom: 12px;
36
- }
@@ -1,41 +0,0 @@
1
- import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input } from '@angular/core';
2
- import {AutoHeightDirective} from "../core";
3
-
4
- @Component({
5
- selector: 'dd-lib-skeleton',
6
- standalone: true,
7
- imports: [AutoHeightDirective],
8
- templateUrl: './lib-skeleton.component.html',
9
- styleUrl: './lib-skeleton.component.scss',
10
- changeDetection: ChangeDetectionStrategy.OnPush,
11
- })
12
- export class LibSkeletonComponent {
13
- @Input() public deepParent: number | undefined;
14
- @Input() public sHeight: string | undefined = '200px';
15
- @Input() public sMb: string | undefined;
16
-
17
- @Input()
18
- public set skeleton(s: boolean | undefined) {
19
- if (s === true) {
20
- this._skeleton = s;
21
- this.cdr.detectChanges();
22
- } else {
23
- setTimeout(() => {
24
- this._skeleton = s;
25
- this.cdr.detectChanges();
26
- }, 1000);
27
- }
28
- }
29
- @Input() public set plugs(n: number | undefined) {
30
- if (n && n > 0) {
31
- this._plugs = Array.from(Array(n).keys());
32
- }
33
- }
34
-
35
- public _plugs: number[] = [];
36
- public _skeleton: boolean | undefined;
37
-
38
- constructor(private cdr: ChangeDetectorRef) {}
39
-
40
- protected readonly length = length;
41
- }
@@ -1,21 +0,0 @@
1
- <div class="pos-relative" id="js-sort-wrapper">
2
- <div (click)="showSortList()" class="d-flex align-center cup">
3
- <div class="text-plain green mr-12">Сортировка</div>
4
- <div>
5
- <dd-lib-svg-icon icon="sort"></dd-lib-svg-icon>
6
- </div>
7
- </div>
8
- @if (showSort) {
9
- <div (ddClickOutside)="showSort = false" [elements]="['js-sort-wrapper']" class="sort-list-container">
10
- <dd-lib-card type="small">
11
- <div class="sort-list-container__list">
12
- @for (item of sortItems; track item) {
13
- <div (click)="onSort(item.value)" [class.green]="sort === item.value" class="mb-12 text-plain">
14
- {{ item.name }}
15
- </div>
16
- }
17
- </div>
18
- </dd-lib-card>
19
- </div>
20
- }
21
- </div>
@@ -1,21 +0,0 @@
1
- :host {
2
- display: block;
3
- }
4
-
5
- .sort-list-container {
6
- position: absolute;
7
- z-index: 1;
8
- top: 36px;
9
-
10
- &__list {
11
- white-space: nowrap;
12
-
13
- .text-plain {
14
- cursor: pointer;
15
-
16
- &:hover {
17
- color: var(--primary-green-color);
18
- }
19
- }
20
- }
21
- }
@@ -1,52 +0,0 @@
1
- import {ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output} from '@angular/core';
2
- import {LibCardComponent} from '../lib-card/lib-card.component';
3
- import {NgOptimizedImage} from '@angular/common';
4
- import {ClickOutsideDirective} from "../core";
5
- import {LibSvgIconComponent} from "../lib-svg-icon/lib-svg-icon.component";
6
-
7
- export interface ISort {
8
- value: string;
9
- name: string;
10
- default?: boolean;
11
- }
12
-
13
- const DefaultSort = [
14
- { name: 'По возрастанию', value: 'asc', default: true },
15
- { name: 'По убыванию', value: 'desc' },
16
- ];
17
-
18
- @Component({
19
- selector: 'dd-lib-sort',
20
- standalone: true,
21
- templateUrl: './lib-sort.component.html',
22
- styleUrls: ['./lib-sort.component.scss'],
23
- changeDetection: ChangeDetectionStrategy.OnPush,
24
- imports: [ClickOutsideDirective, LibCardComponent, NgOptimizedImage, LibSvgIconComponent],
25
- })
26
- export class LibSortComponent implements OnInit {
27
- @Input() public sortItems: ISort[] = DefaultSort;
28
- @Output() public sortEvent = new EventEmitter<string>();
29
-
30
- public sort: string | undefined;
31
- public showSort: boolean | undefined;
32
-
33
- public ngOnInit(): void {
34
- if (this.sortItems?.length) {
35
- this.sort = this.sortItems?.find(f => f.default)?.value || this.sortItems[0]?.value;
36
- }
37
- }
38
-
39
- public onSort(field: string): void {
40
- if (field !== this.sort) {
41
- this.sort = field;
42
- this.sortEvent.emit(field);
43
- this.showSort = false;
44
- }
45
- }
46
-
47
- public showSortList(): void {
48
- if (this.sortItems?.length) {
49
- this.showSort = !this.showSort;
50
- }
51
- }
52
- }
@@ -1,4 +0,0 @@
1
- <span class="step-badge">
2
- <span class="h3-title">{{ step }}</span>
3
- &nbsp;<span class="h4-title">{{ name }}</span>
4
- </span>
@@ -1,23 +0,0 @@
1
- @import '../../../assets/scss/mixins';
2
- @import '../../../assets/scss/vars';
3
-
4
- :host {
5
- display: flex;
6
- }
7
-
8
- .step-badge {
9
- padding: 8px 32px 8px 32px;
10
- border-radius: 40px;
11
- background-color: var(--low-bgc-color);
12
- display: flex;
13
- align-items: baseline;
14
-
15
- @include below($mobile) {
16
- width: 100%;
17
- justify-content: center;
18
- }
19
-
20
- & span {
21
- color: var(--primary-green-color);
22
- }
23
- }
@@ -1,14 +0,0 @@
1
- import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
2
-
3
- @Component({
4
- selector: 'dd-lib-step',
5
- standalone: true,
6
- imports: [],
7
- templateUrl: './lib-step.component.html',
8
- styleUrl: './lib-step.component.scss',
9
- changeDetection: ChangeDetectionStrategy.OnPush,
10
- })
11
- export class LibStepComponent {
12
- @Input() public step = 1;
13
- @Input() public name = 'шаг';
14
- }
@@ -1,15 +0,0 @@
1
- <div
2
- #svgRef
3
- [class.black-stroke]="stroke === 'black'"
4
- [class.black]="color === 'black'"
5
- [class.gray-stroke]="stroke === 'gray'"
6
- [class.gray]="color === 'gray'"
7
- [class.green-stroke]="stroke === 'green'"
8
- [class.green]="color === 'green'"
9
- [class.white-stroke]="stroke === 'white'"
10
- [class.white]="color === 'white'"
11
- [class.gold-stroke]="stroke === 'gold'"
12
- [class.gold]="color === 'gold'"
13
- [class.blue-stroke]="stroke === 'blue'"
14
- [class.blue]="color === 'blue'"
15
- class="lib-icon"></div>
@@ -1,81 +0,0 @@
1
- .lib-icon {
2
- display: flex;
3
- align-items: center;
4
- justify-content: center;
5
-
6
- &.green {
7
- fill: var(--primary-green-color);
8
- }
9
-
10
- &.white {
11
- fill: #fff;
12
- path {
13
- fill: #fff;
14
- stroke: #fff;
15
- }
16
- }
17
-
18
- &.white-stroke {
19
- stroke: var(--white-color);
20
-
21
- g > path,
22
- path {
23
- stroke: var(--white-color);
24
- }
25
- }
26
-
27
- &.black {
28
- fill: var(--black-color);
29
- }
30
-
31
- &.gray {
32
- fill: var(--second-gray-color);
33
-
34
- path {
35
- fill: var(--second-gray-color);
36
- stroke: var(--second-gray-color);
37
- }
38
- }
39
-
40
- &.gray-stroke {
41
- stroke: var(--second-gray-color);
42
-
43
- path {
44
- stroke: var(--second-gray-color);
45
- }
46
- }
47
-
48
- &.gold-stroke {
49
- stroke: var(--gold-svg-color);
50
-
51
- path {
52
- stroke: var(--gold-svg-color);
53
- }
54
- }
55
-
56
- &.gold {
57
- fill: var(--gold-bgc-color);
58
-
59
- path {
60
- fill: var(--gold-bgc-color);
61
- stroke: var(--gold-svg-color);
62
- }
63
- }
64
-
65
- &.blue-stroke {
66
- stroke: var(--blue-color);
67
-
68
- path {
69
- stroke: var(--blue-color);
70
- }
71
- }
72
-
73
- &.blue {
74
- fill: var(--blue-light-bgc);
75
-
76
- path {
77
- fill: var(--blue-light-bgc);
78
- stroke: var(--blue-light-bgc);
79
- }
80
- }
81
- }
File without changes
@@ -1,58 +0,0 @@
1
- import {ChangeDetectionStrategy, Component, ElementRef, Inject, Input, Optional, Renderer2} from '@angular/core';
2
- import {SvgIconsService} from "../core";
3
- import {DOCUMENT} from "@angular/common";
4
-
5
- @Component({
6
- selector: 'dd-lib-svg-icon',
7
- standalone: true,
8
- imports: [],
9
- template: '<ng-content></ng-content>',
10
- styleUrl: './lib-svg-icon.component.css',
11
- changeDetection: ChangeDetectionStrategy.OnPush,
12
-
13
- })
14
- export class LibSvgIconComponent {
15
- @Input() public width: string | undefined;
16
- @Input() public height: string | undefined;
17
- @Input() public color: string | undefined;
18
-
19
- @Input()
20
- public set icon(iconName: string) {
21
- const svgData = this.svgIconRegistry.getIcon(iconName);
22
- if (this.svgIcon) {
23
- this.el.nativeElement.removeChild(this.svgIcon);
24
- }
25
-
26
- if (svgData) {
27
- this.svgIcon = this.svgElementFromString(svgData);
28
- if (this.width) {
29
- this.rdr.setStyle(this.svgIcon, 'width', this.width)
30
- }
31
- if ( this.height) {
32
- }
33
- if (this.color) {
34
- this.rdr.setStyle(this.svgIcon, 'fill', this.color)
35
- }
36
-
37
-
38
- this.el.nativeElement.appendChild(this.svgIcon);
39
- }
40
- }
41
-
42
- private svgIcon: SVGElement | undefined;
43
-
44
- constructor(
45
- private el: ElementRef,
46
- private rdr: Renderer2,
47
- private svgIconRegistry: SvgIconsService,
48
- @Optional() @Inject(DOCUMENT) private document: any,
49
- ) {
50
- }
51
-
52
- private svgElementFromString(svgContent: string): SVGElement {
53
- const div = this.document.createElement('DIV');
54
- div.innerHTML = svgContent;
55
-
56
- return div.querySelector('svg') || this.document.createElementNS('http://www.w3.org/200/svg', 'path');
57
- }
58
- }
@@ -1,12 +0,0 @@
1
- @if (tabs?.length) {
2
- <div class="tabs-filter-types">
3
- @for (tab of tabs; track tab) {
4
- <div
5
- (click)="checkActiveTab(tab)"
6
- [class.active]="tab.id === activeFragment"
7
- class="tabs-filter-types__type">
8
- {{ tab.title }}
9
- </div>
10
- }
11
- </div>
12
- }