ngwr 5.0.3 → 6.1.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.
Files changed (160) hide show
  1. package/alert/index.d.ts +30 -3
  2. package/avatar/index.d.ts +30 -5
  3. package/button/index.d.ts +43 -3
  4. package/cdk/index.d.ts +22 -3
  5. package/cdk/rxjs/index.d.ts +38 -3
  6. package/cdk/types/index.d.ts +25 -3
  7. package/cdk/utils/index.d.ts +12 -3
  8. package/checkbox/index.d.ts +29 -3
  9. package/dialog/index.d.ts +191 -3
  10. package/divider/index.d.ts +16 -5
  11. package/dropdown/index.d.ts +68 -0
  12. package/dropdown/styles/_index.scss +91 -0
  13. package/dropdown/styles/vars.scss +18 -0
  14. package/fesm2022/ngwr-alert.mjs +8 -28
  15. package/fesm2022/ngwr-alert.mjs.map +1 -1
  16. package/fesm2022/ngwr-avatar.mjs +8 -28
  17. package/fesm2022/ngwr-avatar.mjs.map +1 -1
  18. package/fesm2022/ngwr-button.mjs +10 -31
  19. package/fesm2022/ngwr-button.mjs.map +1 -1
  20. package/fesm2022/ngwr-cdk.mjs +9 -4
  21. package/fesm2022/ngwr-cdk.mjs.map +1 -1
  22. package/fesm2022/ngwr-checkbox.mjs +7 -26
  23. package/fesm2022/ngwr-checkbox.mjs.map +1 -1
  24. package/fesm2022/ngwr-dialog.mjs +135 -159
  25. package/fesm2022/ngwr-dialog.mjs.map +1 -1
  26. package/fesm2022/ngwr-divider.mjs +5 -19
  27. package/fesm2022/ngwr-divider.mjs.map +1 -1
  28. package/fesm2022/ngwr-dropdown.mjs +315 -0
  29. package/fesm2022/ngwr-dropdown.mjs.map +1 -0
  30. package/fesm2022/ngwr-form.mjs +8 -29
  31. package/fesm2022/ngwr-form.mjs.map +1 -1
  32. package/fesm2022/ngwr-icon.mjs +11 -32
  33. package/fesm2022/ngwr-icon.mjs.map +1 -1
  34. package/fesm2022/ngwr-input.mjs +12 -32
  35. package/fesm2022/ngwr-input.mjs.map +1 -1
  36. package/fesm2022/ngwr-pagination.mjs +125 -0
  37. package/fesm2022/ngwr-pagination.mjs.map +1 -0
  38. package/fesm2022/ngwr-pipes.mjs +5 -25
  39. package/fesm2022/ngwr-pipes.mjs.map +1 -1
  40. package/fesm2022/ngwr-progress.mjs +6 -25
  41. package/fesm2022/ngwr-progress.mjs.map +1 -1
  42. package/fesm2022/ngwr-qr.mjs +15 -37
  43. package/fesm2022/ngwr-qr.mjs.map +1 -1
  44. package/fesm2022/ngwr-select.mjs +405 -0
  45. package/fesm2022/ngwr-select.mjs.map +1 -0
  46. package/fesm2022/ngwr-skeleton.mjs +5 -19
  47. package/fesm2022/ngwr-skeleton.mjs.map +1 -1
  48. package/fesm2022/ngwr-spinner.mjs +16 -28
  49. package/fesm2022/ngwr-spinner.mjs.map +1 -1
  50. package/fesm2022/ngwr-table.mjs +258 -0
  51. package/fesm2022/ngwr-table.mjs.map +1 -0
  52. package/fesm2022/ngwr-tag.mjs +7 -21
  53. package/fesm2022/ngwr-tag.mjs.map +1 -1
  54. package/fesm2022/ngwr-textarea.mjs +8 -27
  55. package/fesm2022/ngwr-textarea.mjs.map +1 -1
  56. package/form/index.d.ts +26 -3
  57. package/icon/index.d.ts +828 -3
  58. package/index.d.ts +2 -5
  59. package/input/index.d.ts +41 -3
  60. package/package.json +35 -7
  61. package/pagination/index.d.ts +34 -0
  62. package/pagination/styles/_index.scss +60 -0
  63. package/pagination/styles/vars.scss +14 -0
  64. package/pipes/index.d.ts +15 -3
  65. package/progress/index.d.ts +13 -5
  66. package/qr/index.d.ts +127 -5
  67. package/select/index.d.ts +121 -0
  68. package/select/styles/_index.scss +237 -0
  69. package/select/styles/vars.scss +32 -0
  70. package/skeleton/index.d.ts +13 -2
  71. package/spinner/index.d.ts +23 -2
  72. package/spinner/styles/_index.scss +10 -3
  73. package/styles.scss +4 -0
  74. package/table/index.d.ts +101 -0
  75. package/table/styles/_index.scss +4 -0
  76. package/table/styles/table-filter.scss +202 -0
  77. package/table/styles/table-sort.scss +47 -0
  78. package/table/styles/table.scss +232 -0
  79. package/table/styles/vars.scss +21 -0
  80. package/tag/index.d.ts +24 -5
  81. package/textarea/index.d.ts +44 -4
  82. package/alert/alert-type.d.ts +0 -7
  83. package/alert/alert.component.d.ts +0 -21
  84. package/alert/alert.module.d.ts +0 -7
  85. package/alert/public-api.d.ts +0 -9
  86. package/avatar/avatar.component.d.ts +0 -27
  87. package/avatar/avatar.module.d.ts +0 -7
  88. package/avatar/public-api.d.ts +0 -8
  89. package/button/button-group.component.d.ts +0 -12
  90. package/button/button.component.d.ts +0 -31
  91. package/button/button.module.d.ts +0 -8
  92. package/button/public-api.d.ts +0 -9
  93. package/cdk/base.directive.d.ts +0 -15
  94. package/cdk/public-api.d.ts +0 -7
  95. package/cdk/rxjs/is-array.d.ts +0 -8
  96. package/cdk/rxjs/is-defined.d.ts +0 -8
  97. package/cdk/rxjs/is-not-empty-array.d.ts +0 -8
  98. package/cdk/rxjs/is-observable.d.ts +0 -9
  99. package/cdk/rxjs/public-api.d.ts +0 -10
  100. package/cdk/types/maybe.d.ts +0 -7
  101. package/cdk/types/public-api.d.ts +0 -9
  102. package/cdk/types/safe-any.d.ts +0 -7
  103. package/cdk/types/theme-color.d.ts +0 -8
  104. package/cdk/utils/generate-random-id.d.ts +0 -12
  105. package/cdk/utils/public-api.d.ts +0 -7
  106. package/checkbox/checkbox.component.d.ts +0 -28
  107. package/checkbox/checkbox.module.d.ts +0 -7
  108. package/checkbox/public-api.d.ts +0 -8
  109. package/dialog/dialog-animations.d.ts +0 -22
  110. package/dialog/dialog-base.directive.d.ts +0 -40
  111. package/dialog/dialog-close.directive.d.ts +0 -9
  112. package/dialog/dialog-content.directive.d.ts +0 -6
  113. package/dialog/dialog-data.token.d.ts +0 -8
  114. package/dialog/dialog-footer.directive.d.ts +0 -8
  115. package/dialog/dialog-options.d.ts +0 -19
  116. package/dialog/dialog-ref.d.ts +0 -26
  117. package/dialog/dialog-title.directive.d.ts +0 -6
  118. package/dialog/dialog.component.d.ts +0 -28
  119. package/dialog/dialog.module.d.ts +0 -11
  120. package/dialog/dialog.service.d.ts +0 -28
  121. package/dialog/public-api.d.ts +0 -18
  122. package/divider/divider.component.d.ts +0 -13
  123. package/divider/divider.module.d.ts +0 -7
  124. package/divider/public-api.d.ts +0 -8
  125. package/form/form-error.component.d.ts +0 -11
  126. package/form/form-item.component.d.ts +0 -14
  127. package/form/form.module.d.ts +0 -8
  128. package/form/public-api.d.ts +0 -9
  129. package/icon/icon.component.d.ts +0 -24
  130. package/icon/icon.module.d.ts +0 -7
  131. package/icon/icon.service.d.ts +0 -23
  132. package/icon/icons.d.ts +0 -770
  133. package/icon/provide-wr-icons.d.ts +0 -9
  134. package/icon/public-api.d.ts +0 -11
  135. package/input/input-types.d.ts +0 -1
  136. package/input/input.component.d.ts +0 -38
  137. package/input/input.module.d.ts +0 -7
  138. package/input/public-api.d.ts +0 -9
  139. package/pipes/new-array.pipe.d.ts +0 -13
  140. package/pipes/pipes.module.d.ts +0 -7
  141. package/pipes/public-api.d.ts +0 -8
  142. package/progress/progress.component.d.ts +0 -10
  143. package/progress/progress.module.d.ts +0 -7
  144. package/progress/public-api.d.ts +0 -8
  145. package/public-api.d.ts +0 -2
  146. package/qr/generator.d.ts +0 -7
  147. package/qr/public-api.d.ts +0 -8
  148. package/qr/qr.component.d.ts +0 -31
  149. package/qr/qr.module.d.ts +0 -7
  150. package/qr/qrcodegen.d.ts +0 -94
  151. package/skeleton/skeleton.component.d.ts +0 -10
  152. package/skeleton/skeleton.module.d.ts +0 -7
  153. package/spinner/spinner.component.d.ts +0 -11
  154. package/spinner/spinner.module.d.ts +0 -7
  155. package/tag/public-api.d.ts +0 -8
  156. package/tag/tag.component.d.ts +0 -21
  157. package/tag/tag.module.d.ts +0 -7
  158. package/textarea/public-api.d.ts +0 -8
  159. package/textarea/textarea.component.d.ts +0 -44
  160. package/textarea/textarea.module.d.ts +0 -7
package/index.d.ts CHANGED
@@ -1,5 +1,2 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="ngwr" />
5
- export * from './public-api';
1
+
2
+ export { };
package/input/index.d.ts CHANGED
@@ -1,5 +1,43 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { ControlValueAccessor } from '@angular/forms';
3
+ import { WrAbstractBase } from 'ngwr/cdk';
4
+ import { SafeAny } from 'ngwr/cdk/types';
5
+
6
+ type WrInputType = 'text' | 'number' | 'password' | 'email';
7
+
1
8
  /**
2
- * Generated bundle index. Do not edit.
9
+ * NGWR input component.
10
+ *
11
+ * {@tutorial} [How to use wr-alert]{@link http://ngwr.dev/docs/components/input}
3
12
  */
4
- /// <amd-module name="ngwr/input" />
5
- export * from './public-api';
13
+ declare class WrInputComponent extends WrAbstractBase implements ControlValueAccessor {
14
+ placeholder: string;
15
+ prefix: string | null;
16
+ suffix: string | null;
17
+ rounded: boolean;
18
+ passwordIcons: boolean;
19
+ readonly: boolean;
20
+ type: WrInputType;
21
+ get elClasses(): SafeAny;
22
+ protected readonly inputValue: _angular_core.WritableSignal<string | null>;
23
+ protected value?: string;
24
+ private readonly cdr;
25
+ protected readonly eyeOn: _angular_core.WritableSignal<boolean>;
26
+ protected readonly isFocused: _angular_core.WritableSignal<boolean>;
27
+ protected readonly isDisabled: _angular_core.WritableSignal<boolean>;
28
+ onChange: (value: string) => void;
29
+ onTouch: () => void;
30
+ registerOnChange(fn: (value: string) => void): void;
31
+ registerOnTouched(fn: () => void): void;
32
+ setDisabledState(isDisabled: boolean): void;
33
+ writeValue(value: string): void;
34
+ onPasswordVisibilityChange(): void;
35
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<WrInputComponent, never>;
36
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrInputComponent, "wr-input", never, { "placeholder": { "alias": "placeholder"; "required": false; }; "prefix": { "alias": "prefix"; "required": false; }; "suffix": { "alias": "suffix"; "required": false; }; "rounded": { "alias": "rounded"; "required": false; }; "passwordIcons": { "alias": "passwordIcons"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "type": { "alias": "type"; "required": false; }; }, {}, never, never, true, never>;
37
+ static ngAcceptInputType_rounded: unknown;
38
+ static ngAcceptInputType_passwordIcons: unknown;
39
+ static ngAcceptInputType_readonly: unknown;
40
+ }
41
+
42
+ export { WrInputComponent };
43
+ export type { WrInputType };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ngwr",
3
- "version": "5.0.3",
3
+ "version": "6.1.1",
4
4
  "license": "MIT",
5
5
  "description": "NGWR – Angular UI components library",
6
6
  "author": "Roman Khegay <rk@garuna.dev> (https://garuna.dev)",
@@ -84,6 +84,18 @@
84
84
  "./textarea/styles": {
85
85
  "sass": "./textarea/styles/_index.scss"
86
86
  },
87
+ "./select/styles": {
88
+ "sass": "./select/styles/_index.scss"
89
+ },
90
+ "./pagination/styles": {
91
+ "sass": "./pagination/styles/_index.scss"
92
+ },
93
+ "./dropdown/styles": {
94
+ "sass": "./dropdown/styles/_index.scss"
95
+ },
96
+ "./table/styles": {
97
+ "sass": "./table/styles/_index.scss"
98
+ },
87
99
  "./package.json": {
88
100
  "default": "./package.json"
89
101
  },
@@ -91,17 +103,17 @@
91
103
  "types": "./alert/index.d.ts",
92
104
  "default": "./fesm2022/ngwr-alert.mjs"
93
105
  },
94
- "./button": {
95
- "types": "./button/index.d.ts",
96
- "default": "./fesm2022/ngwr-button.mjs"
106
+ "./avatar": {
107
+ "types": "./avatar/index.d.ts",
108
+ "default": "./fesm2022/ngwr-avatar.mjs"
97
109
  },
98
110
  "./cdk": {
99
111
  "types": "./cdk/index.d.ts",
100
112
  "default": "./fesm2022/ngwr-cdk.mjs"
101
113
  },
102
- "./avatar": {
103
- "types": "./avatar/index.d.ts",
104
- "default": "./fesm2022/ngwr-avatar.mjs"
114
+ "./button": {
115
+ "types": "./button/index.d.ts",
116
+ "default": "./fesm2022/ngwr-button.mjs"
105
117
  },
106
118
  "./checkbox": {
107
119
  "types": "./checkbox/index.d.ts",
@@ -115,6 +127,10 @@
115
127
  "types": "./divider/index.d.ts",
116
128
  "default": "./fesm2022/ngwr-divider.mjs"
117
129
  },
130
+ "./dropdown": {
131
+ "types": "./dropdown/index.d.ts",
132
+ "default": "./fesm2022/ngwr-dropdown.mjs"
133
+ },
118
134
  "./form": {
119
135
  "types": "./form/index.d.ts",
120
136
  "default": "./fesm2022/ngwr-form.mjs"
@@ -127,6 +143,10 @@
127
143
  "types": "./input/index.d.ts",
128
144
  "default": "./fesm2022/ngwr-input.mjs"
129
145
  },
146
+ "./pagination": {
147
+ "types": "./pagination/index.d.ts",
148
+ "default": "./fesm2022/ngwr-pagination.mjs"
149
+ },
130
150
  "./pipes": {
131
151
  "types": "./pipes/index.d.ts",
132
152
  "default": "./fesm2022/ngwr-pipes.mjs"
@@ -139,6 +159,10 @@
139
159
  "types": "./qr/index.d.ts",
140
160
  "default": "./fesm2022/ngwr-qr.mjs"
141
161
  },
162
+ "./select": {
163
+ "types": "./select/index.d.ts",
164
+ "default": "./fesm2022/ngwr-select.mjs"
165
+ },
142
166
  "./skeleton": {
143
167
  "types": "./skeleton/index.d.ts",
144
168
  "default": "./fesm2022/ngwr-skeleton.mjs"
@@ -147,6 +171,10 @@
147
171
  "types": "./spinner/index.d.ts",
148
172
  "default": "./fesm2022/ngwr-spinner.mjs"
149
173
  },
174
+ "./table": {
175
+ "types": "./table/index.d.ts",
176
+ "default": "./fesm2022/ngwr-table.mjs"
177
+ },
150
178
  "./tag": {
151
179
  "types": "./tag/index.d.ts",
152
180
  "default": "./fesm2022/ngwr-tag.mjs"
@@ -0,0 +1,34 @@
1
+ import * as _angular_core from '@angular/core';
2
+
3
+ /**
4
+ * @license
5
+ *
6
+ * Use of this source code is governed by an MIT-style license that can be
7
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
8
+ */
9
+ type WrPaginationPosition = 'start' | 'center' | 'end';
10
+
11
+ declare class WrPaginationComponent {
12
+ currentPage: _angular_core.ModelSignal<number>;
13
+ total: _angular_core.InputSignalWithTransform<number, unknown>;
14
+ pageSize: _angular_core.ModelSignal<number>;
15
+ pageSizeOptions: _angular_core.InputSignal<number[]>;
16
+ showSizeChanger: _angular_core.InputSignalWithTransform<boolean, unknown>;
17
+ showTotal: _angular_core.InputSignalWithTransform<boolean, unknown>;
18
+ position: _angular_core.InputSignal<WrPaginationPosition>;
19
+ disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
20
+ ofLabel: _angular_core.InputSignal<string>;
21
+ get hostClasses(): Record<string, boolean>;
22
+ protected readonly String: StringConstructor;
23
+ protected readonly totalPages: _angular_core.Signal<number>;
24
+ protected readonly currentRange: _angular_core.Signal<string>;
25
+ protected readonly pages: _angular_core.Signal<(number | "...")[]>;
26
+ protected isCurrentPage(page: number): boolean;
27
+ protected onPageChange(page: number): void;
28
+ protected onPageSizeChange(size: number): void;
29
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<WrPaginationComponent, never>;
30
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrPaginationComponent, "wr-pagination", never, { "currentPage": { "alias": "currentPage"; "required": false; "isSignal": true; }; "total": { "alias": "total"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; "isSignal": true; }; "showSizeChanger": { "alias": "showSizeChanger"; "required": false; "isSignal": true; }; "showTotal": { "alias": "showTotal"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "ofLabel": { "alias": "ofLabel"; "required": false; "isSignal": true; }; }, { "currentPage": "currentPageChange"; "pageSize": "pageSizeChange"; }, never, never, true, never>;
31
+ }
32
+
33
+ export { WrPaginationComponent };
34
+ export type { WrPaginationPosition };
@@ -0,0 +1,60 @@
1
+ @forward "./vars";
2
+
3
+ .wr-pagination {
4
+ --wr-select-option-height: var(--wr-pagination-select-option-height);
5
+ --wr-select-padding-y: var(--wr-pagination-select-padding-y);
6
+ --wr-select-padding-x: var(--wr-pagination-select-padding-x);
7
+
8
+ display: block;
9
+
10
+ &-container {
11
+ display: flex;
12
+ align-items: center;
13
+ gap: var(--wr-pagination-gap);
14
+ }
15
+
16
+ &--start {
17
+ justify-content: flex-start;
18
+ }
19
+
20
+ &--center {
21
+ justify-content: center;
22
+ }
23
+
24
+ &--end {
25
+ justify-content: flex-end;
26
+ }
27
+
28
+ &--disabled {
29
+ opacity: 0.6;
30
+ pointer-events: none;
31
+ }
32
+
33
+ &-total {
34
+ color: var(--wr-pagination-total-color);
35
+ font-size: var(--wr-pagination-font-size);
36
+ }
37
+
38
+ &-items {
39
+ display: flex;
40
+ align-items: center;
41
+ gap: var(--wr-pagination-items-gap);
42
+ }
43
+
44
+ &-ellipsis {
45
+ color: var(--wr-pagination-ellipsis-color);
46
+ padding: 0 var(--wr-pagination-item-padding);
47
+ user-select: none;
48
+ }
49
+
50
+ wr-btn {
51
+ display: flex;
52
+ align-items: center;
53
+ justify-content: center;
54
+ min-width: var(--wr-pagination-item-size);
55
+ height: var(--wr-pagination-item-size);
56
+ padding: 0;
57
+ gap: 0;
58
+ text-align: center;
59
+ }
60
+ }
@@ -0,0 +1,14 @@
1
+ :root {
2
+ --wr-pagination-gap: 1rem;
3
+ --wr-pagination-items-gap: 0.5rem;
4
+ --wr-pagination-font-size: 0.875rem;
5
+ --wr-pagination-total-color: var(--wr-color-medium);
6
+ --wr-pagination-ellipsis-color: var(--wr-color-medium);
7
+
8
+ --wr-pagination-item-size: 1.625rem;
9
+ --wr-pagination-item-padding: 0.5rem;
10
+
11
+ --wr-pagination-select-option-height: var(--wr-pagination-item-size);
12
+ --wr-pagination-select-padding-y: 0;
13
+ --wr-pagination-select-padding-x: 0.825rem;
14
+ }
package/pipes/index.d.ts CHANGED
@@ -1,5 +1,17 @@
1
+ import * as i0 from '@angular/core';
2
+ import { PipeTransform } from '@angular/core';
3
+
1
4
  /**
2
- * Generated bundle index. Do not edit.
5
+ * @license
6
+ *
7
+ * Use of this source code is governed by an MIT-style license that can be
8
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
3
9
  */
4
- /// <amd-module name="ngwr/pipes" />
5
- export * from './public-api';
10
+
11
+ declare class NewArrayPipe implements PipeTransform {
12
+ transform(arrayLength: number): number[];
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<NewArrayPipe, never>;
14
+ static ɵpipe: i0.ɵɵPipeDeclaration<NewArrayPipe, "newArray", true>;
15
+ }
16
+
17
+ export { NewArrayPipe };
@@ -1,5 +1,13 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="ngwr/progress" />
5
- export * from './public-api';
1
+ import { WrThemeColor, SafeAny } from 'ngwr/cdk/types';
2
+ import * as i0 from '@angular/core';
3
+
4
+ declare class WrProgressComponent {
5
+ color: WrThemeColor | null;
6
+ percent: number;
7
+ get elClasses(): SafeAny;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<WrProgressComponent, never>;
9
+ static ɵcmp: i0.ɵɵComponentDeclaration<WrProgressComponent, "wr-progress", never, { "color": { "alias": "color"; "required": false; }; "percent": { "alias": "percent"; "required": false; }; }, {}, never, never, true, never>;
10
+ static ngAcceptInputType_percent: unknown;
11
+ }
12
+
13
+ export { WrProgressComponent };
package/qr/index.d.ts CHANGED
@@ -1,5 +1,127 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="ngwr/qr" />
5
- export * from './public-api';
1
+ import * as i0 from '@angular/core';
2
+ import { OnInit, AfterViewInit, OnChanges, ElementRef, SimpleChanges } from '@angular/core';
3
+ import { WrAbstractBase } from 'ngwr/cdk';
4
+ import { wrIconName } from 'ngwr/icon';
5
+
6
+ declare namespace qrcodegen {
7
+ type bit = number;
8
+ type byte = number;
9
+ type int = number;
10
+ export class QrCode {
11
+ readonly version: int;
12
+ readonly errorCorrectionLevel: QrCode.Ecc;
13
+ static encodeText(text: string, ecl: QrCode.Ecc): QrCode;
14
+ static encodeBinary(data: readonly byte[], ecl: QrCode.Ecc): QrCode;
15
+ static encodeSegments(segs: readonly QrSegment[], ecl: QrCode.Ecc, minVersion?: int, maxVersion?: int, mask?: int, boostEcl?: boolean): QrCode;
16
+ readonly size: int;
17
+ readonly mask: int;
18
+ private readonly modules;
19
+ private readonly isFunction;
20
+ constructor(version: int, errorCorrectionLevel: QrCode.Ecc, dataCodewords: readonly byte[], msk: int);
21
+ getModule(x: int, y: int): boolean;
22
+ private drawFunctionPatterns;
23
+ private drawFormatBits;
24
+ private drawVersion;
25
+ private drawFinderPattern;
26
+ private drawAlignmentPattern;
27
+ private setFunctionModule;
28
+ private addEccAndInterleave;
29
+ private drawCodewords;
30
+ private applyMask;
31
+ private getPenaltyScore;
32
+ private getAlignmentPatternPositions;
33
+ private static getNumRawDataModules;
34
+ private static getNumDataCodewords;
35
+ private static reedSolomonComputeDivisor;
36
+ private static reedSolomonComputeRemainder;
37
+ private static reedSolomonMultiply;
38
+ private finderPenaltyCountPatterns;
39
+ private finderPenaltyTerminateAndCount;
40
+ private finderPenaltyAddHistory;
41
+ static readonly MIN_VERSION: int;
42
+ static readonly MAX_VERSION: int;
43
+ private static readonly PENALTY_N1;
44
+ private static readonly PENALTY_N2;
45
+ private static readonly PENALTY_N3;
46
+ private static readonly PENALTY_N4;
47
+ private static readonly ECC_CODEWORDS_PER_BLOCK;
48
+ private static readonly NUM_ERROR_CORRECTION_BLOCKS;
49
+ }
50
+ export class QrSegment {
51
+ readonly mode: QrSegment.Mode;
52
+ readonly numChars: int;
53
+ private readonly bitData;
54
+ static makeBytes(data: readonly byte[]): QrSegment;
55
+ static makeNumeric(digits: string): QrSegment;
56
+ static makeAlphanumeric(text: string): QrSegment;
57
+ static makeSegments(text: string): QrSegment[];
58
+ static makeEci(assignVal: int): QrSegment;
59
+ static isNumeric(text: string): boolean;
60
+ static isAlphanumeric(text: string): boolean;
61
+ constructor(mode: QrSegment.Mode, numChars: int, bitData: bit[]);
62
+ getData(): bit[];
63
+ static getTotalBits(segs: readonly QrSegment[], version: int): number;
64
+ private static toUtf8ByteArray;
65
+ private static readonly NUMERIC_REGEX;
66
+ private static readonly ALPHANUMERIC_REGEX;
67
+ private static readonly ALPHANUMERIC_CHARSET;
68
+ }
69
+ export {};
70
+ }
71
+ declare namespace qrcodegen {
72
+ namespace QrCode {
73
+ class Ecc {
74
+ readonly ordinal: int;
75
+ readonly formatBits: int;
76
+ static readonly LOW: Ecc;
77
+ static readonly MEDIUM: Ecc;
78
+ static readonly QUARTILE: Ecc;
79
+ static readonly HIGH: Ecc;
80
+ private constructor();
81
+ }
82
+ }
83
+ namespace QrSegment {
84
+ class Mode {
85
+ readonly modeBits: int;
86
+ private readonly numBitsCharCount;
87
+ static readonly NUMERIC: Mode;
88
+ static readonly ALPHANUMERIC: Mode;
89
+ static readonly BYTE: Mode;
90
+ static readonly KANJI: Mode;
91
+ static readonly ECI: Mode;
92
+ private constructor();
93
+ numCharCountBits(ver: int): int;
94
+ }
95
+ }
96
+ }
97
+
98
+ declare const ERROR_LEVEL_MAP: Record<'L' | 'M' | 'Q' | 'H', qrcodegen.QrCode.Ecc>;
99
+
100
+ declare class WrQrComponent extends WrAbstractBase implements OnInit, AfterViewInit, OnChanges {
101
+ class: string;
102
+ canvas: ElementRef<HTMLCanvasElement>;
103
+ value: string;
104
+ level: keyof typeof ERROR_LEVEL_MAP;
105
+ padding: number;
106
+ color: string;
107
+ bgColor: string;
108
+ size: number;
109
+ icon: wrIconName | null;
110
+ iconSize: number;
111
+ private readonly pid;
112
+ private readonly elRef;
113
+ private readonly wrIconService;
114
+ protected readonly isBrowser: i0.WritableSignal<boolean>;
115
+ ngOnChanges(changes: SimpleChanges): void;
116
+ ngOnInit(): void;
117
+ ngAfterViewInit(): void;
118
+ setElBg(): void;
119
+ drawCanvas(): void;
120
+ static ɵfac: i0.ɵɵFactoryDeclaration<WrQrComponent, never>;
121
+ static ɵcmp: i0.ɵɵComponentDeclaration<WrQrComponent, "wr-qr", never, { "value": { "alias": "value"; "required": true; }; "level": { "alias": "level"; "required": false; }; "padding": { "alias": "padding"; "required": false; }; "color": { "alias": "color"; "required": false; }; "bgColor": { "alias": "bgColor"; "required": false; }; "size": { "alias": "size"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "iconSize": { "alias": "iconSize"; "required": false; }; }, {}, never, never, true, never>;
122
+ static ngAcceptInputType_padding: unknown;
123
+ static ngAcceptInputType_size: unknown;
124
+ static ngAcceptInputType_iconSize: unknown;
125
+ }
126
+
127
+ export { WrQrComponent };
@@ -0,0 +1,121 @@
1
+ import { SafeAny } from 'ngwr/cdk/types';
2
+ import * as _angular_core from '@angular/core';
3
+ import { TemplateRef, AfterContentInit, QueryList, ElementRef } from '@angular/core';
4
+ import { ControlValueAccessor } from '@angular/forms';
5
+ import { WrAbstractBase } from 'ngwr/cdk';
6
+
7
+ /**
8
+ * @license
9
+ *
10
+ * Use of this source code is governed by an MIT-style license that can be
11
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
12
+ */
13
+
14
+ interface WrSelectOption {
15
+ label: string;
16
+ value: SafeAny;
17
+ disabled?: boolean;
18
+ }
19
+ interface WrSelectGroup {
20
+ label: string;
21
+ options: WrSelectOption[];
22
+ disabled?: boolean;
23
+ }
24
+
25
+ declare class WrOptionComponent {
26
+ value: SafeAny;
27
+ label?: string;
28
+ disabled: boolean;
29
+ customTemplate?: TemplateRef<SafeAny>;
30
+ get hostClasses(): Record<string, boolean>;
31
+ protected readonly context: {
32
+ $implicit: SafeAny;
33
+ option: SafeAny;
34
+ };
35
+ private readonly selectComponent;
36
+ get isSelected(): boolean;
37
+ get isHighlighted(): boolean;
38
+ get isFiltered(): boolean;
39
+ select(): void;
40
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<WrOptionComponent, never>;
41
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrOptionComponent, "wr-option", never, { "value": { "alias": "value"; "required": false; }; "label": { "alias": "label"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, ["customTemplate"], never, true, never>;
42
+ static ngAcceptInputType_disabled: unknown;
43
+ }
44
+
45
+ /**
46
+ * @license
47
+ *
48
+ * Use of this source code is governed by an MIT-style license that can be
49
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
50
+ */
51
+
52
+ declare class WrOptionGroupComponent implements AfterContentInit {
53
+ label: string;
54
+ disabled: boolean;
55
+ options: QueryList<WrOptionComponent>;
56
+ get hostClasses(): Record<string, boolean>;
57
+ ngAfterContentInit(): void;
58
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<WrOptionGroupComponent, never>;
59
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrOptionGroupComponent, "wr-option-group", never, { "label": { "alias": "label"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, ["options"], ["*"], true, never>;
60
+ static ngAcceptInputType_disabled: unknown;
61
+ }
62
+
63
+ /**
64
+ * NGWR select component.
65
+ *
66
+ * {@tutorial} [How to use wr-select]{@link http://ngwr.dev/docs/components/select}
67
+ */
68
+ declare class WrSelectComponent extends WrAbstractBase implements ControlValueAccessor, AfterContentInit {
69
+ placeholder: string;
70
+ noItemsLabel: string;
71
+ multiple: boolean;
72
+ searchable: boolean;
73
+ clearable: boolean;
74
+ maxMultipleCount?: number;
75
+ set disabled(value: boolean);
76
+ get disabled(): boolean;
77
+ searchInput?: ElementRef<HTMLInputElement>;
78
+ options: QueryList<WrOptionComponent>;
79
+ optionGroups: QueryList<WrOptionGroupComponent>;
80
+ get hostClasses(): Record<string, boolean>;
81
+ onKeyDown(event: KeyboardEvent): void;
82
+ onClickOutside(event: MouseEvent): void;
83
+ protected readonly value: _angular_core.WritableSignal<any>;
84
+ protected readonly isOpen: _angular_core.WritableSignal<boolean>;
85
+ protected readonly isFocused: _angular_core.WritableSignal<boolean>;
86
+ protected readonly isDisabled: _angular_core.WritableSignal<boolean>;
87
+ protected readonly searchValue: _angular_core.WritableSignal<string>;
88
+ protected readonly highlightedOptionIndex: _angular_core.WritableSignal<number>;
89
+ protected readonly selectedOptions: _angular_core.Signal<WrOptionComponent[]>;
90
+ protected readonly selectedLabel: _angular_core.Signal<any>;
91
+ protected readonly filteredOptions: _angular_core.Signal<WrOptionComponent[]>;
92
+ private readonly elementRef;
93
+ private readonly cdr;
94
+ get currentValue(): SafeAny;
95
+ get isMultiple(): boolean;
96
+ ngAfterContentInit(): void;
97
+ onChange: (value: string) => void;
98
+ onTouch: () => void;
99
+ onOptionSelect(option: WrOptionComponent): void;
100
+ onSearch(event: Event): void;
101
+ isHighlightedOption(option: WrOptionComponent): boolean;
102
+ isFilteredOption(option: WrOptionComponent): boolean;
103
+ writeValue(value: SafeAny): void;
104
+ registerOnChange(fn: (value: SafeAny) => void): void;
105
+ registerOnTouched(fn: () => void): void;
106
+ setDisabledState(isDisabled: boolean): void;
107
+ clear(event: Event): void;
108
+ toggle(): void;
109
+ private close;
110
+ private isSelectedOption;
111
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<WrSelectComponent, never>;
112
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrSelectComponent, "wr-select", never, { "placeholder": { "alias": "placeholder"; "required": false; }; "noItemsLabel": { "alias": "noItemsLabel"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "searchable": { "alias": "searchable"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "maxMultipleCount": { "alias": "maxMultipleCount"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, ["options", "optionGroups"], ["*"], true, never>;
113
+ static ngAcceptInputType_multiple: unknown;
114
+ static ngAcceptInputType_searchable: unknown;
115
+ static ngAcceptInputType_clearable: unknown;
116
+ static ngAcceptInputType_maxMultipleCount: unknown;
117
+ static ngAcceptInputType_disabled: unknown;
118
+ }
119
+
120
+ export { WrOptionComponent, WrOptionGroupComponent, WrSelectComponent };
121
+ export type { WrSelectGroup, WrSelectOption };