@dugararchit/cdk 0.0.0-dugararchit

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 (206) hide show
  1. package/_index.scss +8 -0
  2. package/a11y/_index.import.scss +2 -0
  3. package/a11y/_index.scss +102 -0
  4. package/a11y/a11y-prebuilt.scss +3 -0
  5. package/fesm2022/stagefright5-cdk-a11y.mjs +2381 -0
  6. package/fesm2022/stagefright5-cdk-a11y.mjs.map +1 -0
  7. package/fesm2022/stagefright5-cdk-accordion.mjs +267 -0
  8. package/fesm2022/stagefright5-cdk-accordion.mjs.map +1 -0
  9. package/fesm2022/stagefright5-cdk-bidi.mjs +185 -0
  10. package/fesm2022/stagefright5-cdk-bidi.mjs.map +1 -0
  11. package/fesm2022/stagefright5-cdk-clipboard.mjs +250 -0
  12. package/fesm2022/stagefright5-cdk-clipboard.mjs.map +1 -0
  13. package/fesm2022/stagefright5-cdk-coercion.mjs +128 -0
  14. package/fesm2022/stagefright5-cdk-coercion.mjs.map +1 -0
  15. package/fesm2022/stagefright5-cdk-collections.mjs +472 -0
  16. package/fesm2022/stagefright5-cdk-collections.mjs.map +1 -0
  17. package/fesm2022/stagefright5-cdk-drag-drop.mjs +3690 -0
  18. package/fesm2022/stagefright5-cdk-drag-drop.mjs.map +1 -0
  19. package/fesm2022/stagefright5-cdk-keycodes.mjs +159 -0
  20. package/fesm2022/stagefright5-cdk-keycodes.mjs.map +1 -0
  21. package/fesm2022/stagefright5-cdk-layout.mjs +246 -0
  22. package/fesm2022/stagefright5-cdk-layout.mjs.map +1 -0
  23. package/fesm2022/stagefright5-cdk-observers.mjs +203 -0
  24. package/fesm2022/stagefright5-cdk-observers.mjs.map +1 -0
  25. package/fesm2022/stagefright5-cdk-overlay.mjs +3033 -0
  26. package/fesm2022/stagefright5-cdk-overlay.mjs.map +1 -0
  27. package/fesm2022/stagefright5-cdk-platform.mjs +375 -0
  28. package/fesm2022/stagefright5-cdk-platform.mjs.map +1 -0
  29. package/fesm2022/stagefright5-cdk-portal.mjs +672 -0
  30. package/fesm2022/stagefright5-cdk-portal.mjs.map +1 -0
  31. package/fesm2022/stagefright5-cdk-scrolling.mjs +1399 -0
  32. package/fesm2022/stagefright5-cdk-scrolling.mjs.map +1 -0
  33. package/fesm2022/stagefright5-cdk-stepper.mjs +624 -0
  34. package/fesm2022/stagefright5-cdk-stepper.mjs.map +1 -0
  35. package/fesm2022/stagefright5-cdk-table.mjs +2346 -0
  36. package/fesm2022/stagefright5-cdk-table.mjs.map +1 -0
  37. package/fesm2022/stagefright5-cdk-testing-protractor.mjs +324 -0
  38. package/fesm2022/stagefright5-cdk-testing-protractor.mjs.map +1 -0
  39. package/fesm2022/stagefright5-cdk-testing-selenium-webdriver.mjs +364 -0
  40. package/fesm2022/stagefright5-cdk-testing-selenium-webdriver.mjs.map +1 -0
  41. package/fesm2022/stagefright5-cdk-testing-testbed.mjs +806 -0
  42. package/fesm2022/stagefright5-cdk-testing-testbed.mjs.map +1 -0
  43. package/fesm2022/stagefright5-cdk-testing.mjs +740 -0
  44. package/fesm2022/stagefright5-cdk-testing.mjs.map +1 -0
  45. package/fesm2022/stagefright5-cdk-text-field.mjs +453 -0
  46. package/fesm2022/stagefright5-cdk-text-field.mjs.map +1 -0
  47. package/fesm2022/stagefright5-cdk-tree.mjs +945 -0
  48. package/fesm2022/stagefright5-cdk-tree.mjs.map +1 -0
  49. package/fesm2022/stagefright5-cdk.mjs +26 -0
  50. package/fesm2022/stagefright5-cdk.mjs.map +1 -0
  51. package/overlay/_index-deprecated.scss +13 -0
  52. package/overlay/_index.import.scss +13 -0
  53. package/overlay/_index.scss +148 -0
  54. package/overlay/overlay-prebuilt.scss +3 -0
  55. package/package.json +159 -0
  56. package/schematics/ng-update/test-cases/misc/global-stylesheets-test.scss +3 -0
  57. package/schematics/schematics/BUILD.bazel +104 -0
  58. package/schematics/schematics/README.md +4 -0
  59. package/schematics/schematics/collection.json +18 -0
  60. package/schematics/schematics/index.ts +22 -0
  61. package/schematics/schematics/migration.json +50 -0
  62. package/schematics/schematics/ng-add/index.spec.ts +50 -0
  63. package/schematics/schematics/ng-add/index.ts +39 -0
  64. package/schematics/schematics/ng-add/package-config.ts +62 -0
  65. package/schematics/schematics/ng-add/schema.json +16 -0
  66. package/schematics/schematics/ng-add/schema.ts +12 -0
  67. package/schematics/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.__style__.template +53 -0
  68. package/schematics/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +17 -0
  69. package/schematics/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.spec.ts.template +29 -0
  70. package/schematics/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts.template +43 -0
  71. package/schematics/schematics/ng-generate/drag-drop/index.spec.ts +205 -0
  72. package/schematics/schematics/ng-generate/drag-drop/index.ts +35 -0
  73. package/schematics/schematics/ng-generate/drag-drop/schema.json +93 -0
  74. package/schematics/schematics/ng-generate/drag-drop/schema.ts +11 -0
  75. package/schematics/schematics/ng-update/data/attribute-selectors.ts +29 -0
  76. package/schematics/schematics/ng-update/data/class-names.ts +50 -0
  77. package/schematics/schematics/ng-update/data/constructor-checks.ts +75 -0
  78. package/schematics/schematics/ng-update/data/css-selectors.ts +33 -0
  79. package/schematics/schematics/ng-update/data/element-selectors.ts +21 -0
  80. package/schematics/schematics/ng-update/data/index.ts +18 -0
  81. package/schematics/schematics/ng-update/data/input-names.ts +118 -0
  82. package/schematics/schematics/ng-update/data/method-call-checks.ts +63 -0
  83. package/schematics/schematics/ng-update/data/output-names.ts +42 -0
  84. package/schematics/schematics/ng-update/data/property-names.ts +151 -0
  85. package/schematics/schematics/ng-update/data/symbol-removal.ts +22 -0
  86. package/schematics/schematics/ng-update/devkit-file-system.ts +87 -0
  87. package/schematics/schematics/ng-update/devkit-migration-rule.ts +185 -0
  88. package/schematics/schematics/ng-update/devkit-migration.ts +47 -0
  89. package/schematics/schematics/ng-update/find-stylesheets.ts +43 -0
  90. package/schematics/schematics/ng-update/html-parsing/angular.ts +49 -0
  91. package/schematics/schematics/ng-update/html-parsing/elements.ts +66 -0
  92. package/schematics/schematics/ng-update/index.ts +113 -0
  93. package/schematics/schematics/ng-update/migrations/attribute-selectors.ts +83 -0
  94. package/schematics/schematics/ng-update/migrations/class-inheritance.ts +63 -0
  95. package/schematics/schematics/ng-update/migrations/class-names.ts +107 -0
  96. package/schematics/schematics/ng-update/migrations/constructor-signature.ts +170 -0
  97. package/schematics/schematics/ng-update/migrations/css-selectors.ts +83 -0
  98. package/schematics/schematics/ng-update/migrations/element-selectors.ts +75 -0
  99. package/schematics/schematics/ng-update/migrations/input-names.ts +83 -0
  100. package/schematics/schematics/ng-update/migrations/method-call-arguments.ts +70 -0
  101. package/schematics/schematics/ng-update/migrations/misc-template.ts +36 -0
  102. package/schematics/schematics/ng-update/migrations/output-names.ts +61 -0
  103. package/schematics/schematics/ng-update/migrations/property-names.ts +61 -0
  104. package/schematics/schematics/ng-update/migrations/symbol-removal.ts +51 -0
  105. package/schematics/schematics/ng-update/migrations/tilde-import-v13/tilde-import-migration.ts +40 -0
  106. package/schematics/schematics/ng-update/public-api.ts +18 -0
  107. package/schematics/schematics/ng-update/test-cases/index.spec.ts +18 -0
  108. package/schematics/schematics/ng-update/test-cases/misc/external-resource-resolution.spec.ts +32 -0
  109. package/schematics/schematics/ng-update/test-cases/misc/external-resource-resolution_input.ts +22 -0
  110. package/schematics/schematics/ng-update/test-cases/misc/global-stylesheets-test.scss +3 -0
  111. package/schematics/schematics/ng-update/test-cases/misc/global-stylesheets.spec.ts +50 -0
  112. package/schematics/schematics/ng-update/test-cases/misc/global-stylesheets_input.ts +8 -0
  113. package/schematics/schematics/ng-update/test-cases/misc/method-call-checks.spec.ts +20 -0
  114. package/schematics/schematics/ng-update/test-cases/misc/method-call-checks_input.ts +18 -0
  115. package/schematics/schematics/ng-update/test-cases/misc/module-resolution.spec.ts +27 -0
  116. package/schematics/schematics/ng-update/test-cases/v13/misc/tilde-import-v13.spec.ts +149 -0
  117. package/schematics/schematics/ng-update/test-cases/v6/attribute-selectors_expected_output.ts +36 -0
  118. package/schematics/schematics/ng-update/test-cases/v6/attribute-selectors_input.ts +36 -0
  119. package/schematics/schematics/ng-update/test-cases/v6/class-names_expected_output.ts +8 -0
  120. package/schematics/schematics/ng-update/test-cases/v6/class-names_input.ts +8 -0
  121. package/schematics/schematics/ng-update/test-cases/v6/input-names_expected_output.ts +22 -0
  122. package/schematics/schematics/ng-update/test-cases/v6/input-names_input.ts +22 -0
  123. package/schematics/schematics/ng-update/test-cases/v6/property-names_expected_output.ts +64 -0
  124. package/schematics/schematics/ng-update/test-cases/v6/property-names_input.ts +64 -0
  125. package/schematics/schematics/ng-update/test-cases/v7/property-names_expected_output.ts +28 -0
  126. package/schematics/schematics/ng-update/test-cases/v7/property-names_input.ts +28 -0
  127. package/schematics/schematics/ng-update/typescript/base-types.ts +22 -0
  128. package/schematics/schematics/ng-update/typescript/imports.ts +54 -0
  129. package/schematics/schematics/ng-update/typescript/literal.ts +32 -0
  130. package/schematics/schematics/ng-update/typescript/module-specifiers.ts +39 -0
  131. package/schematics/schematics/ng-update/update-schematic.md +209 -0
  132. package/schematics/schematics/ng-update/upgrade-data.ts +79 -0
  133. package/schematics/schematics/paths.ts +15 -0
  134. package/schematics/schematics/testing/BUILD.bazel +27 -0
  135. package/schematics/schematics/testing/file-content.ts +20 -0
  136. package/schematics/schematics/testing/index.ts +14 -0
  137. package/schematics/schematics/testing/post-scheduled-tasks.ts +45 -0
  138. package/schematics/schematics/testing/resolve-bazel-path.ts +46 -0
  139. package/schematics/schematics/testing/test-app.ts +21 -0
  140. package/schematics/schematics/testing/test-case-setup.ts +236 -0
  141. package/schematics/schematics/testing/test-library.ts +21 -0
  142. package/schematics/schematics/testing/test-project.ts +40 -0
  143. package/schematics/schematics/testing/tsconfig.json +7 -0
  144. package/schematics/schematics/tsconfig.json +28 -0
  145. package/schematics/schematics/update-tool/BUILD.bazel +19 -0
  146. package/schematics/schematics/update-tool/component-resource-collector.ts +195 -0
  147. package/schematics/schematics/update-tool/file-system.ts +78 -0
  148. package/schematics/schematics/update-tool/index.ts +191 -0
  149. package/schematics/schematics/update-tool/logger.ts +23 -0
  150. package/schematics/schematics/update-tool/migration.ts +88 -0
  151. package/schematics/schematics/update-tool/public-api.ts +16 -0
  152. package/schematics/schematics/update-tool/target-version.ts +31 -0
  153. package/schematics/schematics/update-tool/tsconfig.json +7 -0
  154. package/schematics/schematics/update-tool/update-recorder.ts +14 -0
  155. package/schematics/schematics/update-tool/utils/decorators.ts +54 -0
  156. package/schematics/schematics/update-tool/utils/functions.ts +18 -0
  157. package/schematics/schematics/update-tool/utils/imports.ts +128 -0
  158. package/schematics/schematics/update-tool/utils/line-mappings.ts +84 -0
  159. package/schematics/schematics/update-tool/utils/parse-tsconfig.ts +25 -0
  160. package/schematics/schematics/update-tool/utils/property-name.ts +28 -0
  161. package/schematics/schematics/update-tool/utils/virtual-host.ts +116 -0
  162. package/schematics/schematics/update-tool/version-changes.ts +49 -0
  163. package/schematics/schematics/utils/ast/ng-module-imports.spec.ts +43 -0
  164. package/schematics/schematics/utils/ast/ng-module-imports.ts +102 -0
  165. package/schematics/schematics/utils/ast.ts +88 -0
  166. package/schematics/schematics/utils/build-component.ts +252 -0
  167. package/schematics/schematics/utils/get-project.ts +27 -0
  168. package/schematics/schematics/utils/html-manipulation.ts +105 -0
  169. package/schematics/schematics/utils/index.ts +19 -0
  170. package/schematics/schematics/utils/parse5-element.ts +34 -0
  171. package/schematics/schematics/utils/project-index-file.ts +21 -0
  172. package/schematics/schematics/utils/project-main-file.ts +26 -0
  173. package/schematics/schematics/utils/project-style-file.ts +53 -0
  174. package/schematics/schematics/utils/project-targets.ts +43 -0
  175. package/schematics/schematics/utils/project-tsconfig-paths.spec.ts +91 -0
  176. package/schematics/schematics/utils/project-tsconfig-paths.ts +49 -0
  177. package/schematics/schematics/utils/schematic-options.ts +65 -0
  178. package/schematics/schematics/utils/vendored-ast-utils/index.ts +599 -0
  179. package/scrolling/virtual-scroll-viewport.scss +87 -0
  180. package/table/table.scss +3 -0
  181. package/text-field/_index.import.scss +2 -0
  182. package/text-field/_index.scss +89 -0
  183. package/text-field/text-field-prebuilt.scss +4 -0
  184. package/types/stagefright5-cdk-a11y.d.ts +1160 -0
  185. package/types/stagefright5-cdk-accordion.d.ts +95 -0
  186. package/types/stagefright5-cdk-bidi.d.ts +95 -0
  187. package/types/stagefright5-cdk-clipboard.d.ts +116 -0
  188. package/types/stagefright5-cdk-coercion.d.ts +101 -0
  189. package/types/stagefright5-cdk-collections.d.ts +405 -0
  190. package/types/stagefright5-cdk-drag-drop.d.ts +1471 -0
  191. package/types/stagefright5-cdk-keycodes.d.ts +142 -0
  192. package/types/stagefright5-cdk-layout.d.ts +96 -0
  193. package/types/stagefright5-cdk-observers.d.ts +91 -0
  194. package/types/stagefright5-cdk-overlay.d.ts +1258 -0
  195. package/types/stagefright5-cdk-platform.d.ts +130 -0
  196. package/types/stagefright5-cdk-portal.d.ts +327 -0
  197. package/types/stagefright5-cdk-scrolling.d.ts +631 -0
  198. package/types/stagefright5-cdk-stepper.d.ts +302 -0
  199. package/types/stagefright5-cdk-table.d.ts +1128 -0
  200. package/types/stagefright5-cdk-testing-protractor.d.ts +146 -0
  201. package/types/stagefright5-cdk-testing-selenium-webdriver.d.ts +161 -0
  202. package/types/stagefright5-cdk-testing-testbed.d.ts +168 -0
  203. package/types/stagefright5-cdk-testing.d.ts +735 -0
  204. package/types/stagefright5-cdk-text-field.d.ts +171 -0
  205. package/types/stagefright5-cdk-tree.d.ts +522 -0
  206. package/types/stagefright5-cdk.d.ts +14 -0
@@ -0,0 +1,405 @@
1
+ import { Observable, Subject } from 'rxjs';
2
+ import * as i0 from '@angular/core';
3
+ import { IterableChanges, ViewContainerRef, IterableChangeRecord, TemplateRef, InjectionToken, OnDestroy } from '@angular/core';
4
+
5
+ /**
6
+ * @license
7
+ * Copyright Google LLC All Rights Reserved.
8
+ *
9
+ * Use of this source code is governed by an MIT-style license that can be
10
+ * found in the LICENSE file at https://angular.io/license
11
+ */
12
+
13
+ /** Represents a range of numbers with a specified start and end. */
14
+ type ListRange = {
15
+ start: number;
16
+ end: number;
17
+ };
18
+ /**
19
+ * Interface for any component that provides a view of some data collection and wants to provide
20
+ * information regarding the view and any changes made.
21
+ */
22
+ interface CollectionViewer {
23
+ /**
24
+ * A stream that emits whenever the `CollectionViewer` starts looking at a new portion of the
25
+ * data. The `start` index is inclusive, while the `end` is exclusive.
26
+ */
27
+ viewChange: Observable<ListRange>;
28
+ }
29
+
30
+ /**
31
+ * @license
32
+ * Copyright Google LLC All Rights Reserved.
33
+ *
34
+ * Use of this source code is governed by an MIT-style license that can be
35
+ * found in the LICENSE file at https://angular.io/license
36
+ */
37
+
38
+ declare abstract class DataSource<T> {
39
+ /**
40
+ * Connects a collection viewer (such as a data-table) to this data source. Note that
41
+ * the stream provided will be accessed during change detection and should not directly change
42
+ * values that are bound in template views.
43
+ * @param collectionViewer The component that exposes a view over the data provided by this
44
+ * data source.
45
+ * @returns Observable that emits a new value when the data changes.
46
+ */
47
+ abstract connect(collectionViewer: CollectionViewer): Observable<readonly T[]>;
48
+ /**
49
+ * Disconnects a collection viewer (such as a data-table) from this data source. Can be used
50
+ * to perform any clean-up or tear-down operations when a view is being destroyed.
51
+ *
52
+ * @param collectionViewer The component that exposes a view over the data provided by this
53
+ * data source.
54
+ */
55
+ abstract disconnect(collectionViewer: CollectionViewer): void;
56
+ }
57
+ /** Checks whether an object is a data source. */
58
+ declare function isDataSource(value: any): value is DataSource<any>;
59
+
60
+ /**
61
+ * @license
62
+ * Copyright Google LLC All Rights Reserved.
63
+ *
64
+ * Use of this source code is governed by an MIT-style license that can be
65
+ * found in the LICENSE file at https://angular.io/license
66
+ */
67
+
68
+ /** DataSource wrapper for a native array. */
69
+ declare class ArrayDataSource<T> extends DataSource<T> {
70
+ private _data;
71
+ constructor(_data: readonly T[] | Observable<readonly T[]>);
72
+ connect(): Observable<readonly T[]>;
73
+ disconnect(): void;
74
+ }
75
+
76
+ /**
77
+ * @license
78
+ * Copyright Google LLC All Rights Reserved.
79
+ *
80
+ * Use of this source code is governed by an MIT-style license that can be
81
+ * found in the LICENSE file at https://angular.io/license
82
+ */
83
+
84
+ /**
85
+ * The context for an embedded view in the repeater's view container.
86
+ *
87
+ * @template T The type for the embedded view's $implicit property.
88
+ */
89
+ interface _ViewRepeaterItemContext<T> {
90
+ $implicit?: T;
91
+ }
92
+ /**
93
+ * The arguments needed to construct an embedded view for an item in a view
94
+ * container.
95
+ *
96
+ * @template C The type for the context passed to each embedded view.
97
+ */
98
+ interface _ViewRepeaterItemInsertArgs<C> {
99
+ templateRef: TemplateRef<C>;
100
+ context?: C;
101
+ index?: number;
102
+ }
103
+ /**
104
+ * A factory that derives the embedded view context for an item in a view
105
+ * container.
106
+ *
107
+ * @template T The type for the embedded view's $implicit property.
108
+ * @template R The type for the item in each IterableDiffer change record.
109
+ * @template C The type for the context passed to each embedded view.
110
+ */
111
+ type _ViewRepeaterItemContextFactory<T, R, C extends _ViewRepeaterItemContext<T>> = (record: IterableChangeRecord<R>, adjustedPreviousIndex: number | null, currentIndex: number | null) => _ViewRepeaterItemInsertArgs<C>;
112
+ /**
113
+ * Extracts the value of an item from an {@link IterableChangeRecord}.
114
+ *
115
+ * @template T The type for the embedded view's $implicit property.
116
+ * @template R The type for the item in each IterableDiffer change record.
117
+ */
118
+ type _ViewRepeaterItemValueResolver<T, R> = (record: IterableChangeRecord<R>) => T;
119
+ /** Indicates how a view was changed by a {@link _ViewRepeater}. */
120
+ declare const enum _ViewRepeaterOperation {
121
+ /** The content of an existing view was replaced with another item. */
122
+ REPLACED = 0,
123
+ /** A new view was created with `createEmbeddedView`. */
124
+ INSERTED = 1,
125
+ /** The position of a view changed, but the content remains the same. */
126
+ MOVED = 2,
127
+ /** A view was detached from the view container. */
128
+ REMOVED = 3
129
+ }
130
+ /**
131
+ * Meta data describing the state of a view after it was updated by a
132
+ * {@link _ViewRepeater}.
133
+ *
134
+ * @template R The type for the item in each IterableDiffer change record.
135
+ * @template C The type for the context passed to each embedded view.
136
+ */
137
+ interface _ViewRepeaterItemChange<R, C> {
138
+ /** The view's context after it was changed. */
139
+ context?: C;
140
+ /** Indicates how the view was changed. */
141
+ operation: _ViewRepeaterOperation;
142
+ /** The view's corresponding change record. */
143
+ record: IterableChangeRecord<R>;
144
+ }
145
+ /**
146
+ * Type for a callback to be executed after a view has changed.
147
+ *
148
+ * @template R The type for the item in each IterableDiffer change record.
149
+ * @template C The type for the context passed to each embedded view.
150
+ */
151
+ type _ViewRepeaterItemChanged<R, C> = (change: _ViewRepeaterItemChange<R, C>) => void;
152
+ /**
153
+ * Describes a strategy for rendering items in a {@link ViewContainerRef}.
154
+ *
155
+ * @template T The type for the embedded view's $implicit property.
156
+ * @template R The type for the item in each IterableDiffer change record.
157
+ * @template C The type for the context passed to each embedded view.
158
+ */
159
+ interface _ViewRepeater<T, R, C extends _ViewRepeaterItemContext<T>> {
160
+ applyChanges(changes: IterableChanges<R>, viewContainerRef: ViewContainerRef, itemContextFactory: _ViewRepeaterItemContextFactory<T, R, C>, itemValueResolver: _ViewRepeaterItemValueResolver<T, R>, itemViewChanged?: _ViewRepeaterItemChanged<R, C>): void;
161
+ detach(): void;
162
+ }
163
+ /**
164
+ * Injection token for {@link _ViewRepeater}. This token is for use by Angular Material only.
165
+ * @docs-private
166
+ */
167
+ declare const _VIEW_REPEATER_STRATEGY: InjectionToken<_ViewRepeater<unknown, unknown, _ViewRepeaterItemContext<unknown>>>;
168
+
169
+ /**
170
+ * @license
171
+ * Copyright Google LLC All Rights Reserved.
172
+ *
173
+ * Use of this source code is governed by an MIT-style license that can be
174
+ * found in the LICENSE file at https://angular.io/license
175
+ */
176
+
177
+ /**
178
+ * A repeater that destroys views when they are removed from a
179
+ * {@link ViewContainerRef}. When new items are inserted into the container,
180
+ * the repeater will always construct a new embedded view for each item.
181
+ *
182
+ * @template T The type for the embedded view's $implicit property.
183
+ * @template R The type for the item in each IterableDiffer change record.
184
+ * @template C The type for the context passed to each embedded view.
185
+ */
186
+ declare class _DisposeViewRepeaterStrategy<T, R, C extends _ViewRepeaterItemContext<T>> implements _ViewRepeater<T, R, C> {
187
+ applyChanges(changes: IterableChanges<R>, viewContainerRef: ViewContainerRef, itemContextFactory: _ViewRepeaterItemContextFactory<T, R, C>, itemValueResolver: _ViewRepeaterItemValueResolver<T, R>, itemViewChanged?: _ViewRepeaterItemChanged<R, C>): void;
188
+ detach(): void;
189
+ }
190
+
191
+ /**
192
+ * @license
193
+ * Copyright Google LLC All Rights Reserved.
194
+ *
195
+ * Use of this source code is governed by an MIT-style license that can be
196
+ * found in the LICENSE file at https://angular.io/license
197
+ */
198
+
199
+ /**
200
+ * A repeater that caches views when they are removed from a
201
+ * {@link ViewContainerRef}. When new items are inserted into the container,
202
+ * the repeater will reuse one of the cached views instead of creating a new
203
+ * embedded view. Recycling cached views reduces the quantity of expensive DOM
204
+ * inserts.
205
+ *
206
+ * @template T The type for the embedded view's $implicit property.
207
+ * @template R The type for the item in each IterableDiffer change record.
208
+ * @template C The type for the context passed to each embedded view.
209
+ */
210
+ declare class _RecycleViewRepeaterStrategy<T, R, C extends _ViewRepeaterItemContext<T>> implements _ViewRepeater<T, R, C> {
211
+ /**
212
+ * The size of the cache used to store unused views.
213
+ * Setting the cache size to `0` will disable caching. Defaults to 20 views.
214
+ */
215
+ viewCacheSize: number;
216
+ /**
217
+ * View cache that stores embedded view instances that have been previously stamped out,
218
+ * but don't are not currently rendered. The view repeater will reuse these views rather than
219
+ * creating brand new ones.
220
+ *
221
+ * TODO(michaeljamesparsons) Investigate whether using a linked list would improve performance.
222
+ */
223
+ private _viewCache;
224
+ /** Apply changes to the DOM. */
225
+ applyChanges(changes: IterableChanges<R>, viewContainerRef: ViewContainerRef, itemContextFactory: _ViewRepeaterItemContextFactory<T, R, C>, itemValueResolver: _ViewRepeaterItemValueResolver<T, R>, itemViewChanged?: _ViewRepeaterItemChanged<R, C>): void;
226
+ detach(): void;
227
+ /**
228
+ * Inserts a view for a new item, either from the cache or by creating a new
229
+ * one. Returns `undefined` if the item was inserted into a cached view.
230
+ */
231
+ private _insertView;
232
+ /** Detaches the view at the given index and inserts into the view cache. */
233
+ private _detachAndCacheView;
234
+ /** Moves view at the previous index to the current index. */
235
+ private _moveView;
236
+ /**
237
+ * Cache the given detached view. If the cache is full, the view will be
238
+ * destroyed.
239
+ */
240
+ private _maybeCacheView;
241
+ /** Inserts a recycled view from the cache at the given index. */
242
+ private _insertViewFromCache;
243
+ }
244
+
245
+ /**
246
+ * @license
247
+ * Copyright Google LLC All Rights Reserved.
248
+ *
249
+ * Use of this source code is governed by an MIT-style license that can be
250
+ * found in the LICENSE file at https://angular.io/license
251
+ */
252
+
253
+ /**
254
+ * Class to be used to power selecting one or more options from a list.
255
+ */
256
+ declare class SelectionModel<T> {
257
+ private _multiple;
258
+ private _emitChanges;
259
+ /** Currently-selected values. */
260
+ private _selection;
261
+ /** Keeps track of the deselected options that haven't been emitted by the change event. */
262
+ private _deselectedToEmit;
263
+ /** Keeps track of the selected options that haven't been emitted by the change event. */
264
+ private _selectedToEmit;
265
+ /** Cache for the array value of the selected items. */
266
+ private _selected;
267
+ /** Selected values. */
268
+ get selected(): T[];
269
+ /** Event emitted when the value has changed. */
270
+ readonly changed: Subject<SelectionChange<T>>;
271
+ constructor(_multiple?: boolean, initiallySelectedValues?: T[], _emitChanges?: boolean);
272
+ /**
273
+ * Selects a value or an array of values.
274
+ */
275
+ select(...values: T[]): void;
276
+ /**
277
+ * Deselects a value or an array of values.
278
+ */
279
+ deselect(...values: T[]): void;
280
+ /**
281
+ * Toggles a value between selected and deselected.
282
+ */
283
+ toggle(value: T): void;
284
+ /**
285
+ * Clears all of the selected values.
286
+ */
287
+ clear(): void;
288
+ /**
289
+ * Determines whether a value is selected.
290
+ */
291
+ isSelected(value: T): boolean;
292
+ /**
293
+ * Determines whether the model does not have a value.
294
+ */
295
+ isEmpty(): boolean;
296
+ /**
297
+ * Determines whether the model has a value.
298
+ */
299
+ hasValue(): boolean;
300
+ /**
301
+ * Sorts the selected values based on a predicate function.
302
+ */
303
+ sort(predicate?: (a: T, b: T) => number): void;
304
+ /**
305
+ * Gets whether multiple values can be selected.
306
+ */
307
+ isMultipleSelection(): boolean;
308
+ /** Emits a change event and clears the records of selected and deselected values. */
309
+ private _emitChangeEvent;
310
+ /** Selects a value. */
311
+ private _markSelected;
312
+ /** Deselects a value. */
313
+ private _unmarkSelected;
314
+ /** Clears out the selected values. */
315
+ private _unmarkAll;
316
+ /**
317
+ * Verifies the value assignment and throws an error if the specified value array is
318
+ * including multiple values while the selection model is not supporting multiple values.
319
+ */
320
+ private _verifyValueAssignment;
321
+ }
322
+ /**
323
+ * Event emitted when the value of a MatSelectionModel has changed.
324
+ * @docs-private
325
+ */
326
+ interface SelectionChange<T> {
327
+ /** Model that dispatched the event. */
328
+ source: SelectionModel<T>;
329
+ /** Options that were added to the model. */
330
+ added: T[];
331
+ /** Options that were removed from the model. */
332
+ removed: T[];
333
+ }
334
+ /**
335
+ * Returns an error that reports that multiple values are passed into a selection model
336
+ * with a single value.
337
+ * @docs-private
338
+ */
339
+ declare function getMultipleValuesInSingleSelectionError(): Error;
340
+
341
+ /**
342
+ * @license
343
+ * Copyright Google LLC All Rights Reserved.
344
+ *
345
+ * Use of this source code is governed by an MIT-style license that can be
346
+ * found in the LICENSE file at https://angular.io/license
347
+ */
348
+
349
+ type UniqueSelectionDispatcherListener = (id: string, name: string) => void;
350
+ /**
351
+ * Class to coordinate unique selection based on name.
352
+ * Intended to be consumed as an Angular service.
353
+ * This service is needed because native radio change events are only fired on the item currently
354
+ * being selected, and we still need to uncheck the previous selection.
355
+ *
356
+ * This service does not *store* any IDs and names because they may change at any time, so it is
357
+ * less error-prone if they are simply passed through when the events occur.
358
+ */
359
+ declare class UniqueSelectionDispatcher implements OnDestroy {
360
+ private _listeners;
361
+ /**
362
+ * Notify other items that selection for the given name has been set.
363
+ * @param id ID of the item.
364
+ * @param name Name of the item.
365
+ */
366
+ notify(id: string, name: string): void;
367
+ /**
368
+ * Listen for future changes to item selection.
369
+ * @return Function used to deregister listener
370
+ */
371
+ listen(listener: UniqueSelectionDispatcherListener): () => void;
372
+ ngOnDestroy(): void;
373
+ static ɵfac: i0.ɵɵFactoryDeclaration<UniqueSelectionDispatcher, never>;
374
+ static ɵprov: i0.ɵɵInjectableDeclaration<UniqueSelectionDispatcher>;
375
+ }
376
+
377
+ /**
378
+ * @license
379
+ * Copyright Google LLC All Rights Reserved.
380
+ *
381
+ * Use of this source code is governed by an MIT-style license that can be
382
+ * found in the LICENSE file at https://angular.io/license
383
+ */
384
+
385
+ /**
386
+ * Interface for a class that can flatten hierarchical structured data and re-expand the flattened
387
+ * data back into its original structure. Should be used in conjunction with the cdk-tree.
388
+ */
389
+ interface TreeDataNodeFlattener<T> {
390
+ /** Transforms a set of hierarchical structured data into a flattened data array. */
391
+ flattenNodes(structuredData: any[]): T[];
392
+ /**
393
+ * Expands a flattened array of data into its hierarchical form using the provided expansion
394
+ * model.
395
+ */
396
+ expandFlattenedNodes(nodes: T[], expansionModel: SelectionModel<T>): T[];
397
+ /**
398
+ * Put node descendants of node in array.
399
+ * If `onlyExpandable` is true, then only process expandable descendants.
400
+ */
401
+ nodeDescendents(node: T, nodes: T[], onlyExpandable: boolean): void;
402
+ }
403
+
404
+ export { ArrayDataSource, DataSource, SelectionModel, UniqueSelectionDispatcher, _DisposeViewRepeaterStrategy, _RecycleViewRepeaterStrategy, _VIEW_REPEATER_STRATEGY, _ViewRepeaterOperation, getMultipleValuesInSingleSelectionError, isDataSource };
405
+ export type { CollectionViewer, ListRange, SelectionChange, TreeDataNodeFlattener, UniqueSelectionDispatcherListener, _ViewRepeater, _ViewRepeaterItemChange, _ViewRepeaterItemChanged, _ViewRepeaterItemContext, _ViewRepeaterItemContextFactory, _ViewRepeaterItemInsertArgs, _ViewRepeaterItemValueResolver };