@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,95 @@
1
+ import * as i0 from '@angular/core';
2
+ import { OnDestroy, OnChanges, SimpleChanges, EventEmitter, ChangeDetectorRef } from '@angular/core';
3
+ import { UniqueSelectionDispatcher } from '@dugararchit/cdk/collections';
4
+ import { BooleanInput } from '@dugararchit/cdk/coercion';
5
+ import { Subject } from 'rxjs';
6
+
7
+ /**
8
+ * Directive whose purpose is to manage the expanded state of CdkAccordionItem children.
9
+ */
10
+ declare class CdkAccordion implements OnDestroy, OnChanges {
11
+ /** Emits when the state of the accordion changes */
12
+ readonly _stateChanges: Subject<{
13
+ [propName: string]: i0.SimpleChange<any>;
14
+ }>;
15
+ /** Stream that emits true/false when openAll/closeAll is triggered. */
16
+ readonly _openCloseAllActions: Subject<boolean>;
17
+ /** A readonly id value to use for unique selection coordination. */
18
+ readonly id: string;
19
+ /** Whether the accordion should allow multiple expanded accordion items simultaneously. */
20
+ get multi(): boolean;
21
+ set multi(multi: BooleanInput);
22
+ private _multi;
23
+ /** Opens all enabled accordion items in an accordion where multi is enabled. */
24
+ openAll(): void;
25
+ /** Closes all enabled accordion items in an accordion where multi is enabled. */
26
+ closeAll(): void;
27
+ ngOnChanges(changes: SimpleChanges): void;
28
+ ngOnDestroy(): void;
29
+ static ɵfac: i0.ɵɵFactoryDeclaration<CdkAccordion, never>;
30
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CdkAccordion, "cdk-accordion, [cdkAccordion]", ["cdkAccordion"], { "multi": { "alias": "multi"; "required": false; }; }, {}, never, never, false, never>;
31
+ }
32
+
33
+ /**
34
+ * @license
35
+ * Copyright Google LLC All Rights Reserved.
36
+ *
37
+ * Use of this source code is governed by an MIT-style license that can be
38
+ * found in the LICENSE file at https://angular.io/license
39
+ */
40
+
41
+ /**
42
+ * An basic directive expected to be extended and decorated as a component. Sets up all
43
+ * events and attributes needed to be managed by a CdkAccordion parent.
44
+ */
45
+ declare class CdkAccordionItem implements OnDestroy {
46
+ accordion: CdkAccordion;
47
+ private _changeDetectorRef;
48
+ protected _expansionDispatcher: UniqueSelectionDispatcher;
49
+ /** Subscription to openAll/closeAll events. */
50
+ private _openCloseAllSubscription;
51
+ /** Event emitted every time the AccordionItem is closed. */
52
+ readonly closed: EventEmitter<void>;
53
+ /** Event emitted every time the AccordionItem is opened. */
54
+ readonly opened: EventEmitter<void>;
55
+ /** Event emitted when the AccordionItem is destroyed. */
56
+ readonly destroyed: EventEmitter<void>;
57
+ /**
58
+ * Emits whenever the expanded state of the accordion changes.
59
+ * Primarily used to facilitate two-way binding.
60
+ * @docs-private
61
+ */
62
+ readonly expandedChange: EventEmitter<boolean>;
63
+ /** The unique AccordionItem id. */
64
+ readonly id: string;
65
+ /** Whether the AccordionItem is expanded. */
66
+ get expanded(): boolean;
67
+ set expanded(expanded: BooleanInput);
68
+ private _expanded;
69
+ /** Whether the AccordionItem is disabled. */
70
+ get disabled(): boolean;
71
+ set disabled(disabled: BooleanInput);
72
+ private _disabled;
73
+ /** Unregister function for _expansionDispatcher. */
74
+ private _removeUniqueSelectionListener;
75
+ constructor(accordion: CdkAccordion, _changeDetectorRef: ChangeDetectorRef, _expansionDispatcher: UniqueSelectionDispatcher);
76
+ /** Emits an event for the accordion item being destroyed. */
77
+ ngOnDestroy(): void;
78
+ /** Toggles the expanded state of the accordion item. */
79
+ toggle(): void;
80
+ /** Sets the expanded state of the accordion item to false. */
81
+ close(): void;
82
+ /** Sets the expanded state of the accordion item to true. */
83
+ open(): void;
84
+ private _subscribeToOpenCloseAllActions;
85
+ static ɵfac: i0.ɵɵFactoryDeclaration<CdkAccordionItem, [{ optional: true; skipSelf: true; }, null, null]>;
86
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CdkAccordionItem, "cdk-accordion-item, [cdkAccordionItem]", ["cdkAccordionItem"], { "expanded": { "alias": "expanded"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "closed": "closed"; "opened": "opened"; "destroyed": "destroyed"; "expandedChange": "expandedChange"; }, never, never, false, never>;
87
+ }
88
+
89
+ declare class CdkAccordionModule {
90
+ static ɵfac: i0.ɵɵFactoryDeclaration<CdkAccordionModule, never>;
91
+ static ɵmod: i0.ɵɵNgModuleDeclaration<CdkAccordionModule, [typeof CdkAccordion, typeof CdkAccordionItem], never, [typeof CdkAccordion, typeof CdkAccordionItem]>;
92
+ static ɵinj: i0.ɵɵInjectorDeclaration<CdkAccordionModule>;
93
+ }
94
+
95
+ export { CdkAccordion, CdkAccordionItem, CdkAccordionModule };
@@ -0,0 +1,95 @@
1
+ import * as i0 from '@angular/core';
2
+ import { OnDestroy, EventEmitter, InjectionToken, AfterContentInit } from '@angular/core';
3
+
4
+ /**
5
+ * @license
6
+ * Copyright Google LLC All Rights Reserved.
7
+ *
8
+ * Use of this source code is governed by an MIT-style license that can be
9
+ * found in the LICENSE file at https://angular.io/license
10
+ */
11
+
12
+ type Direction = 'ltr' | 'rtl';
13
+ /**
14
+ * The directionality (LTR / RTL) context for the application (or a subtree of it).
15
+ * Exposes the current direction and a stream of direction changes.
16
+ */
17
+ declare class Directionality implements OnDestroy {
18
+ /** The current 'ltr' or 'rtl' value. */
19
+ readonly value: Direction;
20
+ /** Stream that emits whenever the 'ltr' / 'rtl' state changes. */
21
+ readonly change: EventEmitter<Direction>;
22
+ constructor(_document?: any);
23
+ ngOnDestroy(): void;
24
+ static ɵfac: i0.ɵɵFactoryDeclaration<Directionality, [{ optional: true; }]>;
25
+ static ɵprov: i0.ɵɵInjectableDeclaration<Directionality>;
26
+ }
27
+
28
+ /**
29
+ * @license
30
+ * Copyright Google LLC All Rights Reserved.
31
+ *
32
+ * Use of this source code is governed by an MIT-style license that can be
33
+ * found in the LICENSE file at https://angular.io/license
34
+ */
35
+
36
+ /**
37
+ * Injection token used to inject the document into Directionality.
38
+ * This is used so that the value can be faked in tests.
39
+ *
40
+ * We can't use the real document in tests because changing the real `dir` causes geometry-based
41
+ * tests in Safari to fail.
42
+ *
43
+ * We also can't re-provide the DOCUMENT token from platform-brower because the unit tests
44
+ * themselves use things like `querySelector` in test code.
45
+ *
46
+ * This token is defined in a separate file from Directionality as a workaround for
47
+ * https://github.com/angular/angular/issues/22559
48
+ *
49
+ * @docs-private
50
+ */
51
+ declare const DIR_DOCUMENT: InjectionToken<Document>;
52
+
53
+ /**
54
+ * @license
55
+ * Copyright Google LLC All Rights Reserved.
56
+ *
57
+ * Use of this source code is governed by an MIT-style license that can be
58
+ * found in the LICENSE file at https://angular.io/license
59
+ */
60
+
61
+ /**
62
+ * Directive to listen for changes of direction of part of the DOM.
63
+ *
64
+ * Provides itself as Directionality such that descendant directives only need to ever inject
65
+ * Directionality to get the closest direction.
66
+ */
67
+ declare class Dir implements Directionality, AfterContentInit, OnDestroy {
68
+ /** Normalized direction that accounts for invalid/unsupported values. */
69
+ private _dir;
70
+ /** Whether the `value` has been set to its initial value. */
71
+ private _isInitialized;
72
+ /** Direction as passed in by the consumer. */
73
+ _rawDir: string;
74
+ /** Event emitted when the direction changes. */
75
+ readonly change: EventEmitter<Direction>;
76
+ /** @docs-private */
77
+ get dir(): Direction;
78
+ set dir(value: Direction | 'auto');
79
+ /** Current layout direction of the element. */
80
+ get value(): Direction;
81
+ /** Initialize once default value has been set. */
82
+ ngAfterContentInit(): void;
83
+ ngOnDestroy(): void;
84
+ static ɵfac: i0.ɵɵFactoryDeclaration<Dir, never>;
85
+ static ɵdir: i0.ɵɵDirectiveDeclaration<Dir, "[dir]", ["dir"], { "dir": { "alias": "dir"; "required": false; }; }, { "change": "dirChange"; }, never, never, false, never>;
86
+ }
87
+
88
+ declare class BidiModule {
89
+ static ɵfac: i0.ɵɵFactoryDeclaration<BidiModule, never>;
90
+ static ɵmod: i0.ɵɵNgModuleDeclaration<BidiModule, [typeof Dir], never, [typeof Dir]>;
91
+ static ɵinj: i0.ɵɵInjectorDeclaration<BidiModule>;
92
+ }
93
+
94
+ export { BidiModule, DIR_DOCUMENT, Dir, Directionality };
95
+ export type { Direction };
@@ -0,0 +1,116 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, OnDestroy, EventEmitter, NgZone } from '@angular/core';
3
+
4
+ /**
5
+ * @license
6
+ * Copyright Google LLC All Rights Reserved.
7
+ *
8
+ * Use of this source code is governed by an MIT-style license that can be
9
+ * found in the LICENSE file at https://angular.io/license
10
+ */
11
+ /**
12
+ * A pending copy-to-clipboard operation.
13
+ *
14
+ * The implementation of copying text to the clipboard modifies the DOM and
15
+ * forces a relayout. This relayout can take too long if the string is large,
16
+ * causing the execCommand('copy') to happen too long after the user clicked.
17
+ * This results in the browser refusing to copy. This object lets the
18
+ * relayout happen in a separate tick from copying by providing a copy function
19
+ * that can be called later.
20
+ *
21
+ * Destroy must be called when no longer in use, regardless of whether `copy` is
22
+ * called.
23
+ */
24
+ declare class PendingCopy {
25
+ private readonly _document;
26
+ private _textarea;
27
+ constructor(text: string, _document: Document);
28
+ /** Finishes copying the text. */
29
+ copy(): boolean;
30
+ /** Cleans up DOM changes used to perform the copy operation. */
31
+ destroy(): void;
32
+ }
33
+
34
+ /**
35
+ * A service for copying text to the clipboard.
36
+ */
37
+ declare class Clipboard {
38
+ private readonly _document;
39
+ constructor(document: any);
40
+ /**
41
+ * Copies the provided text into the user's clipboard.
42
+ *
43
+ * @param text The string to copy.
44
+ * @returns Whether the operation was successful.
45
+ */
46
+ copy(text: string): boolean;
47
+ /**
48
+ * Prepares a string to be copied later. This is useful for large strings
49
+ * which take too long to successfully render and be copied in the same tick.
50
+ *
51
+ * The caller must call `destroy` on the returned `PendingCopy`.
52
+ *
53
+ * @param text The string to copy.
54
+ * @returns the pending copy operation.
55
+ */
56
+ beginCopy(text: string): PendingCopy;
57
+ static ɵfac: i0.ɵɵFactoryDeclaration<Clipboard, never>;
58
+ static ɵprov: i0.ɵɵInjectableDeclaration<Clipboard>;
59
+ }
60
+
61
+ /**
62
+ * @license
63
+ * Copyright Google LLC All Rights Reserved.
64
+ *
65
+ * Use of this source code is governed by an MIT-style license that can be
66
+ * found in the LICENSE file at https://angular.io/license
67
+ */
68
+
69
+ /** Object that can be used to configure the default options for `CdkCopyToClipboard`. */
70
+ interface CdkCopyToClipboardConfig {
71
+ /** Default number of attempts to make when copying text to the clipboard. */
72
+ attempts?: number;
73
+ }
74
+ /** Injection token that can be used to provide the default options to `CdkCopyToClipboard`. */
75
+ declare const CDK_COPY_TO_CLIPBOARD_CONFIG: InjectionToken<CdkCopyToClipboardConfig>;
76
+ /**
77
+ * Provides behavior for a button that when clicked copies content into user's
78
+ * clipboard.
79
+ */
80
+ declare class CdkCopyToClipboard implements OnDestroy {
81
+ private _clipboard;
82
+ private _ngZone;
83
+ /** Content to be copied. */
84
+ text: string;
85
+ /**
86
+ * How many times to attempt to copy the text. This may be necessary for longer text, because
87
+ * the browser needs time to fill an intermediate textarea element and copy the content.
88
+ */
89
+ attempts: number;
90
+ /**
91
+ * Emits when some text is copied to the clipboard. The
92
+ * emitted value indicates whether copying was successful.
93
+ */
94
+ readonly copied: EventEmitter<boolean>;
95
+ /** Copies that are currently being attempted. */
96
+ private _pending;
97
+ /** Whether the directive has been destroyed. */
98
+ private _destroyed;
99
+ /** Timeout for the current copy attempt. */
100
+ private _currentTimeout;
101
+ constructor(_clipboard: Clipboard, _ngZone: NgZone, config?: CdkCopyToClipboardConfig);
102
+ /** Copies the current text to the clipboard. */
103
+ copy(attempts?: number): void;
104
+ ngOnDestroy(): void;
105
+ static ɵfac: i0.ɵɵFactoryDeclaration<CdkCopyToClipboard, [null, null, { optional: true; }]>;
106
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CdkCopyToClipboard, "[cdkCopyToClipboard]", never, { "text": { "alias": "cdkCopyToClipboard"; "required": false; }; "attempts": { "alias": "cdkCopyToClipboardAttempts"; "required": false; }; }, { "copied": "cdkCopyToClipboardCopied"; }, never, never, false, never>;
107
+ }
108
+
109
+ declare class ClipboardModule {
110
+ static ɵfac: i0.ɵɵFactoryDeclaration<ClipboardModule, never>;
111
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ClipboardModule, [typeof CdkCopyToClipboard], never, [typeof CdkCopyToClipboard]>;
112
+ static ɵinj: i0.ɵɵInjectorDeclaration<ClipboardModule>;
113
+ }
114
+
115
+ export { CDK_COPY_TO_CLIPBOARD_CONFIG, CdkCopyToClipboard, Clipboard, ClipboardModule, PendingCopy };
116
+ export type { CdkCopyToClipboardConfig };
@@ -0,0 +1,101 @@
1
+ import { ElementRef } from '@angular/core';
2
+
3
+ /**
4
+ * @license
5
+ * Copyright Google LLC All Rights Reserved.
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://angular.io/license
9
+ */
10
+ /**
11
+ * Type describing the allowed values for a boolean input.
12
+ * @docs-private
13
+ */
14
+ type BooleanInput = string | boolean | null | undefined;
15
+ /** Coerces a data-bound value (typically a string) to a boolean. */
16
+ declare function coerceBooleanProperty(value: any): boolean;
17
+
18
+ /**
19
+ * @license
20
+ * Copyright Google LLC All Rights Reserved.
21
+ *
22
+ * Use of this source code is governed by an MIT-style license that can be
23
+ * found in the LICENSE file at https://angular.io/license
24
+ */
25
+ /**
26
+ * Type describing the allowed values for a number input
27
+ * @docs-private
28
+ */
29
+ type NumberInput = string | number | null | undefined;
30
+ /** Coerces a data-bound value (typically a string) to a number. */
31
+ declare function coerceNumberProperty(value: any): number;
32
+ declare function coerceNumberProperty<D>(value: any, fallback: D): number | D;
33
+ /**
34
+ * Whether the provided value is considered a number.
35
+ * @docs-private
36
+ */
37
+ declare function _isNumberValue(value: any): boolean;
38
+
39
+ /**
40
+ * @license
41
+ * Copyright Google LLC All Rights Reserved.
42
+ *
43
+ * Use of this source code is governed by an MIT-style license that can be
44
+ * found in the LICENSE file at https://angular.io/license
45
+ */
46
+ /** Wraps the provided value in an array, unless the provided value is an array. */
47
+ declare function coerceArray<T>(value: T | T[]): T[];
48
+ declare function coerceArray<T>(value: T | readonly T[]): readonly T[];
49
+
50
+ /**
51
+ * @license
52
+ * Copyright Google LLC All Rights Reserved.
53
+ *
54
+ * Use of this source code is governed by an MIT-style license that can be
55
+ * found in the LICENSE file at https://angular.io/license
56
+ */
57
+ /** Coerces a value to a CSS pixel value. */
58
+ declare function coerceCssPixelValue(value: any): string;
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
+ /**
69
+ * Coerces an ElementRef or an Element into an element.
70
+ * Useful for APIs that can accept either a ref or the native element itself.
71
+ */
72
+ declare function coerceElement<T>(elementOrRef: ElementRef<T> | T): T;
73
+
74
+ /**
75
+ * @license
76
+ * Copyright Google LLC All Rights Reserved.
77
+ *
78
+ * Use of this source code is governed by an MIT-style license that can be
79
+ * found in the LICENSE file at https://angular.io/license
80
+ */
81
+ /**
82
+ * Coerces a value to an array of trimmed non-empty strings.
83
+ * Any input that is not an array, `null` or `undefined` will be turned into a string
84
+ * via `toString()` and subsequently split with the given separator.
85
+ * `null` and `undefined` will result in an empty array.
86
+ * This results in the following outcomes:
87
+ * - `null` -&gt; `[]`
88
+ * - `[null]` -&gt; `["null"]`
89
+ * - `["a", "b ", " "]` -&gt; `["a", "b"]`
90
+ * - `[1, [2, 3]]` -&gt; `["1", "2,3"]`
91
+ * - `[{ a: 0 }]` -&gt; `["[object Object]"]`
92
+ * - `{ a: 0 }` -&gt; `["[object", "Object]"]`
93
+ *
94
+ * Useful for defining CSS classes or table columns.
95
+ * @param value the value to coerce into an array of strings
96
+ * @param separator split-separator if value isn't an array
97
+ */
98
+ declare function coerceStringArray(value: any, separator?: string | RegExp): string[];
99
+
100
+ export { _isNumberValue, coerceArray, coerceBooleanProperty, coerceCssPixelValue, coerceElement, coerceNumberProperty, coerceStringArray };
101
+ export type { BooleanInput, NumberInput };