@angular/cdk 8.0.0-beta.2 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/_overlay.scss +4 -4
- package/bundles/cdk-a11y.umd.js +227 -79
- package/bundles/cdk-a11y.umd.js.map +1 -1
- package/bundles/cdk-a11y.umd.min.js +1 -1
- package/bundles/cdk-a11y.umd.min.js.map +1 -1
- package/bundles/cdk-accordion.umd.js +20 -8
- package/bundles/cdk-accordion.umd.js.map +1 -1
- package/bundles/cdk-accordion.umd.min.js.map +1 -1
- package/bundles/cdk-bidi.umd.js +5 -5
- package/bundles/cdk-bidi.umd.min.js +1 -1
- package/bundles/cdk-bidi.umd.min.js.map +1 -1
- package/bundles/cdk-coercion.umd.js +5 -5
- package/bundles/cdk-collections.umd.js +38 -15
- package/bundles/cdk-collections.umd.js.map +1 -1
- package/bundles/cdk-collections.umd.min.js +1 -1
- package/bundles/cdk-collections.umd.min.js.map +1 -1
- package/bundles/cdk-drag-drop.umd.js +571 -180
- package/bundles/cdk-drag-drop.umd.js.map +1 -1
- package/bundles/cdk-drag-drop.umd.min.js +2 -2
- package/bundles/cdk-drag-drop.umd.min.js.map +1 -1
- package/bundles/cdk-keycodes.umd.js +7 -3
- package/bundles/cdk-keycodes.umd.js.map +1 -1
- package/bundles/cdk-keycodes.umd.min.js.map +1 -1
- package/bundles/cdk-layout.umd.js +83 -30
- package/bundles/cdk-layout.umd.js.map +1 -1
- package/bundles/cdk-layout.umd.min.js +1 -1
- package/bundles/cdk-layout.umd.min.js.map +1 -1
- package/bundles/cdk-observers.umd.js +30 -11
- package/bundles/cdk-observers.umd.js.map +1 -1
- package/bundles/cdk-observers.umd.min.js +1 -1
- package/bundles/cdk-observers.umd.min.js.map +1 -1
- package/bundles/cdk-overlay.umd.js +229 -108
- package/bundles/cdk-overlay.umd.js.map +1 -1
- package/bundles/cdk-overlay.umd.min.js +2 -2
- package/bundles/cdk-overlay.umd.min.js.map +1 -1
- package/bundles/cdk-platform.umd.js +17 -10
- package/bundles/cdk-platform.umd.js.map +1 -1
- package/bundles/cdk-platform.umd.min.js +1 -1
- package/bundles/cdk-platform.umd.min.js.map +1 -1
- package/bundles/cdk-portal.umd.js +32 -13
- package/bundles/cdk-portal.umd.js.map +1 -1
- package/bundles/cdk-portal.umd.min.js.map +1 -1
- package/bundles/cdk-scrolling.umd.js +184 -62
- package/bundles/cdk-scrolling.umd.js.map +1 -1
- package/bundles/cdk-scrolling.umd.min.js +1 -1
- package/bundles/cdk-scrolling.umd.min.js.map +1 -1
- package/bundles/cdk-stepper.umd.js +30 -12
- package/bundles/cdk-stepper.umd.js.map +1 -1
- package/bundles/cdk-stepper.umd.min.js.map +1 -1
- package/bundles/cdk-table.umd.js +384 -74
- package/bundles/cdk-table.umd.js.map +1 -1
- package/bundles/cdk-table.umd.min.js +1 -1
- package/bundles/cdk-table.umd.min.js.map +1 -1
- package/bundles/cdk-text-field.umd.js +61 -21
- package/bundles/cdk-text-field.umd.js.map +1 -1
- package/bundles/cdk-text-field.umd.min.js +1 -1
- package/bundles/cdk-text-field.umd.min.js.map +1 -1
- package/bundles/cdk-tree.umd.js +85 -29
- package/bundles/cdk-tree.umd.js.map +1 -1
- package/bundles/cdk-tree.umd.min.js.map +1 -1
- package/bundles/cdk.umd.js +2 -2
- package/bundles/cdk.umd.js.map +1 -1
- package/bundles/cdk.umd.min.js +1 -1
- package/bundles/cdk.umd.min.js.map +1 -1
- package/drag-drop/typings/directives/drag.d.ts +11 -2
- package/drag-drop/typings/drag-events.d.ts +17 -0
- package/drag-drop/typings/drag-ref.d.ts +9 -5
- package/drag-drop/typings/drop-list-ref.d.ts +9 -3
- package/drag-drop/typings/index.metadata.json +1 -1
- package/esm2015/a11y.js +229 -81
- package/esm2015/a11y.js.map +1 -1
- package/esm2015/accordion.js +22 -10
- package/esm2015/accordion.js.map +1 -1
- package/esm2015/bidi.js +8 -8
- package/esm2015/cdk.js +4 -4
- package/esm2015/cdk.js.map +1 -1
- package/esm2015/coercion.js +7 -7
- package/esm2015/collections.js +41 -18
- package/esm2015/collections.js.map +1 -1
- package/esm2015/drag-drop.js +540 -181
- package/esm2015/drag-drop.js.map +1 -1
- package/esm2015/keycodes.js +9 -5
- package/esm2015/keycodes.js.map +1 -1
- package/esm2015/layout.js +89 -36
- package/esm2015/layout.js.map +1 -1
- package/esm2015/observers.js +33 -14
- package/esm2015/observers.js.map +1 -1
- package/esm2015/overlay.js +232 -110
- package/esm2015/overlay.js.map +1 -1
- package/esm2015/platform.js +20 -13
- package/esm2015/platform.js.map +1 -1
- package/esm2015/portal.js +34 -15
- package/esm2015/portal.js.map +1 -1
- package/esm2015/scrolling.js +180 -58
- package/esm2015/scrolling.js.map +1 -1
- package/esm2015/stepper.js +32 -14
- package/esm2015/stepper.js.map +1 -1
- package/esm2015/table.js +369 -69
- package/esm2015/table.js.map +1 -1
- package/esm2015/text-field.js +64 -24
- package/esm2015/text-field.js.map +1 -1
- package/esm2015/tree.js +86 -30
- package/esm2015/tree.js.map +1 -1
- package/esm5/a11y.es5.js +230 -82
- package/esm5/a11y.es5.js.map +1 -1
- package/esm5/accordion.es5.js +22 -10
- package/esm5/accordion.es5.js.map +1 -1
- package/esm5/bidi.es5.js +8 -8
- package/esm5/cdk.es5.js +4 -4
- package/esm5/cdk.es5.js.map +1 -1
- package/esm5/coercion.es5.js +7 -7
- package/esm5/collections.es5.js +42 -19
- package/esm5/collections.es5.js.map +1 -1
- package/esm5/drag-drop.es5.js +574 -183
- package/esm5/drag-drop.es5.js.map +1 -1
- package/esm5/keycodes.es5.js +9 -5
- package/esm5/keycodes.es5.js.map +1 -1
- package/esm5/layout.es5.js +86 -33
- package/esm5/layout.es5.js.map +1 -1
- package/esm5/observers.es5.js +33 -14
- package/esm5/observers.es5.js.map +1 -1
- package/esm5/overlay.es5.js +232 -111
- package/esm5/overlay.es5.js.map +1 -1
- package/esm5/platform.es5.js +20 -13
- package/esm5/platform.es5.js.map +1 -1
- package/esm5/portal.es5.js +34 -15
- package/esm5/portal.es5.js.map +1 -1
- package/esm5/scrolling.es5.js +187 -65
- package/esm5/scrolling.es5.js.map +1 -1
- package/esm5/stepper.es5.js +32 -14
- package/esm5/stepper.es5.js.map +1 -1
- package/esm5/table.es5.js +386 -72
- package/esm5/table.es5.js.map +1 -1
- package/esm5/text-field.es5.js +64 -24
- package/esm5/text-field.es5.js.map +1 -1
- package/esm5/tree.es5.js +87 -31
- package/esm5/tree.es5.js.map +1 -1
- package/layout/typings/breakpoints-observer.d.ts +3 -3
- package/layout/typings/index.metadata.json +1 -1
- package/layout/typings/media-matcher.d.ts +2 -2
- package/overlay/typings/index.metadata.json +1 -1
- package/overlay/typings/position/flexible-connected-position-strategy.d.ts +1 -3
- package/package.json +8 -8
- package/portal/typings/portal.d.ts +2 -2
- package/schematics/ng-update/data/attribute-selectors.js +1 -1
- package/schematics/ng-update/data/attribute-selectors.js.map +1 -1
- package/schematics/ng-update/data/class-names.js +3 -3
- package/schematics/ng-update/data/class-names.js.map +1 -1
- package/schematics/ng-update/data/constructor-checks.js +1 -1
- package/schematics/ng-update/data/constructor-checks.js.map +1 -1
- package/schematics/ng-update/data/input-names.js +1 -1
- package/schematics/ng-update/data/input-names.js.map +1 -1
- package/schematics/ng-update/data/method-call-checks.js +1 -1
- package/schematics/ng-update/data/method-call-checks.js.map +1 -1
- package/schematics/ng-update/data/property-names.js +4 -4
- package/schematics/ng-update/data/property-names.js.map +1 -1
- package/schematics/ng-update/upgrade-rules/signature-check/constructorSignatureCheckRule.js +1 -1
- package/schematics/ng-update/upgrade-rules/signature-check/constructorSignatureCheckRule.js.map +1 -1
- package/schematics/tsconfig.tsbuildinfo +5811 -0
- package/schematics/utils/ast.d.ts +1 -1
- package/schematics/utils/build-component.js +1 -1
- package/schematics/utils/build-component.js.map +1 -1
- package/schematics/utils/get-project.d.ts +1 -1
- package/schematics/utils/project-main-file.d.ts +1 -1
- package/schematics/utils/project-style-file.d.ts +1 -1
- package/schematics/utils/project-targets.d.ts +1 -1
- package/schematics/utils/schematic-options.d.ts +1 -1
- package/table/typings/cell.d.ts +3 -2
- package/table/typings/index.metadata.json +1 -1
- package/table/typings/public-api.d.ts +1 -0
- package/table/typings/row.d.ts +5 -4
- package/table/typings/sticky-styler.d.ts +5 -5
- package/table/typings/table-errors.d.ts +10 -0
- package/table/typings/text-column.d.ts +80 -0
- package/typings/drag-drop/directives/drag.d.ts +11 -2
- package/typings/drag-drop/drag-events.d.ts +17 -0
- package/typings/drag-drop/drag-ref.d.ts +9 -5
- package/typings/drag-drop/drop-list-ref.d.ts +9 -3
- package/typings/drag-drop/index.metadata.json +1 -1
- package/typings/esm5/drag-drop/directives/drag.d.ts +11 -2
- package/typings/esm5/drag-drop/drag-events.d.ts +17 -0
- package/typings/esm5/drag-drop/drag-ref.d.ts +9 -5
- package/typings/esm5/drag-drop/drop-list-ref.d.ts +9 -3
- package/typings/esm5/drag-drop/index.metadata.json +1 -1
- package/typings/esm5/index.metadata.json +1 -1
- package/typings/esm5/layout/breakpoints-observer.d.ts +3 -3
- package/typings/esm5/layout/index.metadata.json +1 -1
- package/typings/esm5/layout/media-matcher.d.ts +2 -2
- package/typings/esm5/overlay/index.metadata.json +1 -1
- package/typings/esm5/overlay/position/flexible-connected-position-strategy.d.ts +1 -3
- package/typings/esm5/portal/portal.d.ts +2 -2
- package/typings/esm5/table/cell.d.ts +3 -2
- package/typings/esm5/table/index.metadata.json +1 -1
- package/typings/esm5/table/public-api.d.ts +1 -0
- package/typings/esm5/table/row.d.ts +5 -4
- package/typings/esm5/table/sticky-styler.d.ts +5 -5
- package/typings/esm5/table/table-errors.d.ts +10 -0
- package/typings/esm5/table/text-column.d.ts +80 -0
- package/typings/index.metadata.json +1 -1
- package/typings/layout/breakpoints-observer.d.ts +3 -3
- package/typings/layout/index.metadata.json +1 -1
- package/typings/layout/media-matcher.d.ts +2 -2
- package/typings/overlay/index.metadata.json +1 -1
- package/typings/overlay/position/flexible-connected-position-strategy.d.ts +1 -3
- package/typings/portal/portal.d.ts +2 -2
- package/typings/schematics/utils/ast.d.ts +1 -1
- package/typings/schematics/utils/get-project.d.ts +1 -1
- package/typings/schematics/utils/project-main-file.d.ts +1 -1
- package/typings/schematics/utils/project-style-file.d.ts +1 -1
- package/typings/schematics/utils/project-targets.d.ts +1 -1
- package/typings/schematics/utils/schematic-options.d.ts +1 -1
- package/typings/table/cell.d.ts +3 -2
- package/typings/table/index.metadata.json +1 -1
- package/typings/table/public-api.d.ts +1 -0
- package/typings/table/row.d.ts +5 -4
- package/typings/table/sticky-styler.d.ts +5 -5
- package/typings/table/table-errors.d.ts +10 -0
- package/typings/table/text-column.d.ts +80 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdk-tree.umd.min.js","sources":["../../node_modules/tslib/tslib.es6.js","../../src/cdk/tree/tree-errors.ts","../../src/cdk/tree/control/base-tree-control.ts","../../src/cdk/tree/control/flat-tree-control.ts","../../src/cdk/tree/control/nested-tree-control.ts","../../src/cdk/tree/outlet.ts","../../src/cdk/tree/node.ts","../../src/cdk/tree/tree.ts","../../src/cdk/tree/nested-node.ts","../../src/cdk/tree/padding.ts","../../src/cdk/tree/toggle.ts","../../src/cdk/tree/tree-module.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)\r\n t[p[i]] = s[p[i]];\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Returns an error to be thrown when there is no usable data.\n * @docs-private\n */\nexport function getTreeNoValidDataSourceError() {\n return Error(`A valid data source must be provided.`);\n}\n\n/**\n * Returns an error to be thrown when there are multiple nodes that are missing a when function.\n * @docs-private\n */\nexport function getTreeMultipleDefaultNodeDefsError() {\n return Error(`There can only be one default row without a when predicate function.`);\n}\n\n/**\n * Returns an error to be thrown when there are no matching node defs for a particular set of data.\n * @docs-private\n */\nexport function getTreeMissingMatchingNodeDefError() {\n return Error(`Could not find a matching node definition for the provided node data.`);\n}\n\n/**\n * Returns an error to be thrown when there are tree control.\n * @docs-private\n */\nexport function getTreeControlMissingError() {\n return Error(`Could not find a tree control for the tree.`);\n}\n\n/**\n * Returns an error to be thrown when tree control did not implement functions for flat/nested node.\n * @docs-private\n */\nexport function getTreeControlFunctionsMissingError() {\n return Error(`Could not find functions for nested/flat tree in tree control.`);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {SelectionModel} from '@angular/cdk/collections';\nimport {Observable} from 'rxjs';\nimport {TreeControl} from './tree-control';\n\n/** Base tree control. It has basic toggle/expand/collapse operations on a single data node. */\nexport abstract class BaseTreeControl<T> implements TreeControl<T> {\n\n /** Gets a list of descendent data nodes of a subtree rooted at given data node recursively. */\n abstract getDescendants(dataNode: T): T[];\n\n /** Expands all data nodes in the tree. */\n abstract expandAll(): void;\n\n /** Saved data node for `expandAll` action. */\n dataNodes: T[];\n\n /** A selection model with multi-selection to track expansion status. */\n expansionModel: SelectionModel<T> = new SelectionModel<T>(true);\n\n /** Get depth of a given data node, return the level number. This is for flat tree node. */\n getLevel: (dataNode: T) => number;\n\n /**\n * Whether the data node is expandable. Returns true if expandable.\n * This is for flat tree node.\n */\n isExpandable: (dataNode: T) => boolean;\n\n /** Gets a stream that emits whenever the given data node's children change. */\n getChildren: (dataNode: T) => (Observable<T[]> | T[] | undefined | null);\n\n /** Toggles one single data node's expanded/collapsed state. */\n toggle(dataNode: T): void {\n this.expansionModel.toggle(dataNode);\n }\n\n /** Expands one single data node. */\n expand(dataNode: T): void {\n this.expansionModel.select(dataNode);\n }\n\n /** Collapses one single data node. */\n collapse(dataNode: T): void {\n this.expansionModel.deselect(dataNode);\n }\n\n /** Whether a given data node is expanded or not. Returns true if the data node is expanded. */\n isExpanded(dataNode: T): boolean {\n return this.expansionModel.isSelected(dataNode);\n }\n\n /** Toggles a subtree rooted at `node` recursively. */\n toggleDescendants(dataNode: T): void {\n this.expansionModel.isSelected(dataNode)\n ? this.collapseDescendants(dataNode)\n : this.expandDescendants(dataNode);\n }\n\n /** Collapse all dataNodes in the tree. */\n collapseAll(): void {\n this.expansionModel.clear();\n }\n\n /** Expands a subtree rooted at given data node recursively. */\n expandDescendants(dataNode: T): void {\n let toBeProcessed = [dataNode];\n toBeProcessed.push(...this.getDescendants(dataNode));\n this.expansionModel.select(...toBeProcessed);\n }\n\n /** Collapses a subtree rooted at given data node recursively. */\n collapseDescendants(dataNode: T): void {\n let toBeProcessed = [dataNode];\n toBeProcessed.push(...this.getDescendants(dataNode));\n this.expansionModel.deselect(...toBeProcessed);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {BaseTreeControl} from './base-tree-control';\n\n/** Flat tree control. Able to expand/collapse a subtree recursively for flattened tree. */\nexport class FlatTreeControl<T> extends BaseTreeControl<T> {\n\n /** Construct with flat tree data node functions getLevel and isExpandable. */\n constructor(public getLevel: (dataNode: T) => number,\n public isExpandable: (dataNode: T) => boolean) {\n super();\n }\n\n /**\n * Gets a list of the data node's subtree of descendent data nodes.\n *\n * To make this working, the `dataNodes` of the TreeControl must be flattened tree nodes\n * with correct levels.\n */\n getDescendants(dataNode: T): T[] {\n const startIndex = this.dataNodes.indexOf(dataNode);\n const results: T[] = [];\n\n // Goes through flattened tree nodes in the `dataNodes` array, and get all descendants.\n // The level of descendants of a tree node must be greater than the level of the given\n // tree node.\n // If we reach a node whose level is equal to the level of the tree node, we hit a sibling.\n // If we reach a node whose level is greater than the level of the tree node, we hit a\n // sibling of an ancestor.\n for (let i = startIndex + 1;\n i < this.dataNodes.length && this.getLevel(dataNode) < this.getLevel(this.dataNodes[i]);\n i++) {\n results.push(this.dataNodes[i]);\n }\n return results;\n }\n\n /**\n * Expands all data nodes in the tree.\n *\n * To make this working, the `dataNodes` variable of the TreeControl must be set to all flattened\n * data nodes of the tree.\n */\n expandAll(): void {\n this.expansionModel.select(...this.dataNodes);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {Observable} from 'rxjs';\nimport {take, filter} from 'rxjs/operators';\nimport {BaseTreeControl} from './base-tree-control';\n\n/** Nested tree control. Able to expand/collapse a subtree recursively for NestedNode type. */\nexport class NestedTreeControl<T> extends BaseTreeControl<T> {\n\n /** Construct with nested tree function getChildren. */\n constructor(public getChildren: (dataNode: T) => (Observable<T[]> | T[] | undefined | null)) {\n super();\n }\n\n /**\n * Expands all dataNodes in the tree.\n *\n * To make this working, the `dataNodes` variable of the TreeControl must be set to all root level\n * data nodes of the tree.\n */\n expandAll(): void {\n this.expansionModel.clear();\n const allNodes = this.dataNodes.reduce((accumulator: T[], dataNode) =>\n [...accumulator, ...this.getDescendants(dataNode), dataNode], []);\n this.expansionModel.select(...allNodes);\n }\n\n /** Gets a list of descendant dataNodes of a subtree rooted at given data node recursively. */\n getDescendants(dataNode: T): T[] {\n const descendants: T[] = [];\n\n this._getDescendants(descendants, dataNode);\n // Remove the node itself\n return descendants.splice(1);\n }\n\n /** A helper function to get descendants recursively. */\n protected _getDescendants(descendants: T[], dataNode: T): void {\n descendants.push(dataNode);\n const childrenNodes = this.getChildren(dataNode);\n if (Array.isArray(childrenNodes)) {\n childrenNodes.forEach((child: T) => this._getDescendants(descendants, child));\n } else if (childrenNodes instanceof Observable) {\n childrenNodes.pipe(take(1), filter(Boolean)).subscribe(children => {\n children.forEach((child: T) => this._getDescendants(descendants, child));\n });\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {\n Directive,\n Inject,\n InjectionToken,\n Optional,\n ViewContainerRef,\n} from '@angular/core';\n\n/**\n * Injection token used to provide a `CdkTreeNode` to its outlet.\n * Used primarily to avoid circular imports.\n * @docs-private\n */\nexport const CDK_TREE_NODE_OUTLET_NODE = new InjectionToken<{}>('CDK_TREE_NODE_OUTLET_NODE');\n\n/**\n * Outlet for nested CdkNode. Put `[cdkTreeNodeOutlet]` on a tag to place children dataNodes\n * inside the outlet.\n */\n@Directive({\n selector: '[cdkTreeNodeOutlet]'\n})\nexport class CdkTreeNodeOutlet {\n constructor(\n public viewContainer: ViewContainerRef,\n @Inject(CDK_TREE_NODE_OUTLET_NODE) @Optional() public _node?: any) {}\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, TemplateRef} from '@angular/core';\n\n\n/** Context provided to the tree node component. */\nexport class CdkTreeNodeOutletContext<T> {\n /** Data for the node. */\n $implicit: T;\n\n /** Depth of the node. */\n level: number;\n\n /** Index location of the node. */\n index?: number;\n\n /** Length of the number of total dataNodes. */\n count?: number;\n\n constructor(data: T) {\n this.$implicit = data;\n }\n}\n\n/**\n * Data node definition for the CdkTree.\n * Captures the node's template and a when predicate that describes when this node should be used.\n */\n@Directive({\n selector: '[cdkTreeNodeDef]',\n inputs: [\n 'when: cdkTreeNodeDefWhen'\n ],\n})\nexport class CdkTreeNodeDef<T> {\n /**\n * Function that should return true if this node template should be used for the provided node\n * data and index. If left undefined, this node will be considered the default node template to\n * use when no other when functions return true for the data.\n * For every node, there must be at least one when function that passes or an undefined to\n * default.\n */\n when: (index: number, nodeData: T) => boolean;\n\n /** @docs-private */\n constructor(public template: TemplateRef<any>) {}\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {FocusableOption} from '@angular/cdk/a11y';\nimport {CollectionViewer, DataSource, isDataSource} from '@angular/cdk/collections';\nimport {\n AfterContentChecked,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n Directive,\n ElementRef,\n Input,\n IterableChangeRecord,\n IterableDiffer,\n IterableDiffers,\n OnDestroy,\n OnInit,\n QueryList,\n ViewChild,\n ViewContainerRef,\n ViewEncapsulation,\n TrackByFunction\n} from '@angular/core';\nimport {BehaviorSubject, Observable, of as observableOf, Subject, Subscription} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\nimport {TreeControl} from './control/tree-control';\nimport {CdkTreeNodeDef, CdkTreeNodeOutletContext} from './node';\nimport {CdkTreeNodeOutlet} from './outlet';\nimport {\n getTreeControlFunctionsMissingError,\n getTreeControlMissingError,\n getTreeMissingMatchingNodeDefError,\n getTreeMultipleDefaultNodeDefsError,\n getTreeNoValidDataSourceError\n} from './tree-errors';\n\n/**\n * CDK tree component that connects with a data source to retrieve data of type `T` and renders\n * dataNodes with hierarchy. Updates the dataNodes when new data is provided by the data source.\n */\n@Component({\n moduleId: module.id,\n selector: 'cdk-tree',\n exportAs: 'cdkTree',\n template: `<ng-container cdkTreeNodeOutlet></ng-container>`,\n host: {\n 'class': 'cdk-tree',\n 'role': 'tree',\n },\n encapsulation: ViewEncapsulation.None,\n\n // The \"OnPush\" status for the `CdkTree` component is effectively a noop, so we are removing it.\n // The view for `CdkTree` consists entirely of templates declared in other views. As they are\n // declared elsewhere, they are checked when their declaration points are checked.\n // tslint:disable-next-line:validate-decorators\n changeDetection: ChangeDetectionStrategy.Default\n})\nexport class CdkTree<T> implements AfterContentChecked, CollectionViewer, OnDestroy, OnInit {\n /** Subject that emits when the component has been destroyed. */\n private _onDestroy = new Subject<void>();\n\n /** Differ used to find the changes in the data provided by the data source. */\n private _dataDiffer: IterableDiffer<T>;\n\n /** Stores the node definition that does not have a when predicate. */\n private _defaultNodeDef: CdkTreeNodeDef<T> | null;\n\n /** Data subscription */\n private _dataSubscription: Subscription | null;\n\n /** Level of nodes */\n private _levels: Map<T, number> = new Map<T, number>();\n\n /**\n * Provides a stream containing the latest data array to render. Influenced by the tree's\n * stream of view window (what dataNodes are currently on screen).\n * Data source can be an observable of data array, or a data array to render.\n */\n @Input()\n get dataSource(): DataSource<T> | Observable<T[]> | T[] { return this._dataSource; }\n set dataSource(dataSource: DataSource<T> | Observable<T[]> | T[]) {\n if (this._dataSource !== dataSource) {\n this._switchDataSource(dataSource);\n }\n }\n private _dataSource: DataSource<T> | Observable<T[]> | T[];\n\n /** The tree controller */\n @Input() treeControl: TreeControl<T>;\n\n /**\n * Tracking function that will be used to check the differences in data changes. Used similarly\n * to `ngFor` `trackBy` function. Optimize node operations by identifying a node based on its data\n * relative to the function to know if a node should be added/removed/moved.\n * Accepts a function that takes two parameters, `index` and `item`.\n */\n @Input() trackBy: TrackByFunction<T>;\n\n // Outlets within the tree's template where the dataNodes will be inserted.\n @ViewChild(CdkTreeNodeOutlet, {static: true}) _nodeOutlet: CdkTreeNodeOutlet;\n\n /** The tree node template for the tree */\n @ContentChildren(CdkTreeNodeDef) _nodeDefs: QueryList<CdkTreeNodeDef<T>>;\n\n // TODO(tinayuangao): Setup a listener for scrolling, emit the calculated view to viewChange.\n // Remove the MAX_VALUE in viewChange\n /**\n * Stream containing the latest information on what rows are being displayed on screen.\n * Can be used by the data source to as a heuristic of what data should be provided.\n */\n viewChange =\n new BehaviorSubject<{start: number, end: number}>({start: 0, end: Number.MAX_VALUE});\n\n constructor(private _differs: IterableDiffers,\n private _changeDetectorRef: ChangeDetectorRef) {}\n\n ngOnInit() {\n this._dataDiffer = this._differs.find([]).create(this.trackBy);\n if (!this.treeControl) {\n throw getTreeControlMissingError();\n }\n }\n\n ngOnDestroy() {\n this._nodeOutlet.viewContainer.clear();\n\n this._onDestroy.next();\n this._onDestroy.complete();\n\n if (this._dataSource && typeof (this._dataSource as DataSource<T>).disconnect === 'function') {\n (this.dataSource as DataSource<T>).disconnect(this);\n }\n\n if (this._dataSubscription) {\n this._dataSubscription.unsubscribe();\n this._dataSubscription = null;\n }\n }\n\n ngAfterContentChecked() {\n const defaultNodeDefs = this._nodeDefs.filter(def => !def.when);\n if (defaultNodeDefs.length > 1) {\n throw getTreeMultipleDefaultNodeDefsError();\n }\n this._defaultNodeDef = defaultNodeDefs[0];\n\n if (this.dataSource && this._nodeDefs && !this._dataSubscription) {\n this._observeRenderChanges();\n }\n }\n\n\n // TODO(tinayuangao): Work on keyboard traversal and actions, make sure it's working for RTL\n // and nested trees.\n\n /**\n * Switch to the provided data source by resetting the data and unsubscribing from the current\n * render change subscription if one exists. If the data source is null, interpret this by\n * clearing the node outlet. Otherwise start listening for new data.\n */\n private _switchDataSource(dataSource: DataSource<T> | Observable<T[]> | T[]) {\n if (this._dataSource && typeof (this._dataSource as DataSource<T>).disconnect === 'function') {\n (this.dataSource as DataSource<T>).disconnect(this);\n }\n\n if (this._dataSubscription) {\n this._dataSubscription.unsubscribe();\n this._dataSubscription = null;\n }\n\n // Remove the all dataNodes if there is now no data source\n if (!dataSource) {\n this._nodeOutlet.viewContainer.clear();\n }\n\n this._dataSource = dataSource;\n if (this._nodeDefs) {\n this._observeRenderChanges();\n }\n }\n\n /** Set up a subscription for the data provided by the data source. */\n private _observeRenderChanges() {\n let dataStream: Observable<T[] | ReadonlyArray<T>> | undefined;\n\n if (isDataSource(this._dataSource)) {\n dataStream = this._dataSource.connect(this);\n } else if (this._dataSource instanceof Observable) {\n dataStream = this._dataSource;\n } else if (Array.isArray(this._dataSource)) {\n dataStream = observableOf(this._dataSource);\n }\n\n if (dataStream) {\n this._dataSubscription = dataStream.pipe(takeUntil(this._onDestroy))\n .subscribe(data => this.renderNodeChanges(data));\n } else {\n throw getTreeNoValidDataSourceError();\n }\n }\n\n /** Check for changes made in the data and render each change (node added/removed/moved). */\n renderNodeChanges(data: T[] | ReadonlyArray<T>, dataDiffer: IterableDiffer<T> = this._dataDiffer,\n viewContainer: ViewContainerRef = this._nodeOutlet.viewContainer,\n parentData?: T) {\n const changes = dataDiffer.diff(data);\n if (!changes) { return; }\n\n changes.forEachOperation((item: IterableChangeRecord<T>,\n adjustedPreviousIndex: number | null,\n currentIndex: number | null) => {\n if (item.previousIndex == null) {\n this.insertNode(data[currentIndex!], currentIndex!, viewContainer, parentData);\n } else if (currentIndex == null) {\n viewContainer.remove(adjustedPreviousIndex!);\n this._levels.delete(item.item);\n } else {\n const view = viewContainer.get(adjustedPreviousIndex!);\n viewContainer.move(view!, currentIndex);\n }\n });\n\n this._changeDetectorRef.detectChanges();\n }\n\n /**\n * Finds the matching node definition that should be used for this node data. If there is only\n * one node definition, it is returned. Otherwise, find the node definition that has a when\n * predicate that returns true with the data. If none return true, return the default node\n * definition.\n */\n _getNodeDef(data: T, i: number): CdkTreeNodeDef<T> {\n if (this._nodeDefs.length === 1) { return this._nodeDefs.first; }\n\n const nodeDef =\n this._nodeDefs.find(def => def.when && def.when(i, data)) || this._defaultNodeDef;\n if (!nodeDef) { throw getTreeMissingMatchingNodeDefError(); }\n\n return nodeDef;\n }\n\n /**\n * Create the embedded view for the data node template and place it in the correct index location\n * within the data node view container.\n */\n insertNode(nodeData: T, index: number, viewContainer?: ViewContainerRef, parentData?: T) {\n const node = this._getNodeDef(nodeData, index);\n\n // Node context that will be provided to created embedded view\n const context = new CdkTreeNodeOutletContext<T>(nodeData);\n\n // If the tree is flat tree, then use the `getLevel` function in flat tree control\n // Otherwise, use the level of parent node.\n if (this.treeControl.getLevel) {\n context.level = this.treeControl.getLevel(nodeData);\n } else if (typeof parentData !== 'undefined' && this._levels.has(parentData)) {\n context.level = this._levels.get(parentData)! + 1;\n } else {\n context.level = 0;\n }\n this._levels.set(nodeData, context.level);\n\n // Use default tree nodeOutlet, or nested node's nodeOutlet\n const container = viewContainer ? viewContainer : this._nodeOutlet.viewContainer;\n container.createEmbeddedView(node.template, context, index);\n\n // Set the data to just created `CdkTreeNode`.\n // The `CdkTreeNode` created from `createEmbeddedView` will be saved in static variable\n // `mostRecentTreeNode`. We get it from static variable and pass the node data to it.\n if (CdkTreeNode.mostRecentTreeNode) {\n CdkTreeNode.mostRecentTreeNode.data = nodeData;\n }\n }\n}\n\n\n/**\n * Tree node for CdkTree. It contains the data in the tree node.\n */\n@Directive({\n selector: 'cdk-tree-node',\n exportAs: 'cdkTreeNode',\n host: {\n '[attr.aria-expanded]': 'isExpanded',\n '[attr.aria-level]': 'role === \"treeitem\" ? level : null',\n '[attr.role]': 'role',\n 'class': 'cdk-tree-node',\n },\n})\nexport class CdkTreeNode<T> implements FocusableOption, OnDestroy {\n /**\n * The most recently created `CdkTreeNode`. We save it in static variable so we can retrieve it\n * in `CdkTree` and set the data to it.\n */\n static mostRecentTreeNode: CdkTreeNode<any> | null = null;\n\n /** Subject that emits when the component has been destroyed. */\n protected _destroyed = new Subject<void>();\n\n /** Emits when the node's data has changed. */\n _dataChanges = new Subject<void>();\n\n /** The tree node's data. */\n get data(): T { return this._data; }\n set data(value: T) {\n if (value !== this._data) {\n this._data = value;\n this._setRoleFromData();\n this._dataChanges.next();\n }\n }\n protected _data: T;\n\n get isExpanded(): boolean {\n return this._tree.treeControl.isExpanded(this._data);\n }\n\n get level(): number {\n return this._tree.treeControl.getLevel ? this._tree.treeControl.getLevel(this._data) : 0;\n }\n\n /**\n * The role of the node should be 'group' if it's an internal node,\n * and 'treeitem' if it's a leaf node.\n */\n @Input() role: 'treeitem' | 'group' = 'treeitem';\n\n constructor(protected _elementRef: ElementRef<HTMLElement>,\n protected _tree: CdkTree<T>) {\n CdkTreeNode.mostRecentTreeNode = this as CdkTreeNode<T>;\n }\n\n ngOnDestroy() {\n // If this is the last tree node being destroyed,\n // clear out the reference to avoid leaking memory.\n if (CdkTreeNode.mostRecentTreeNode === this) {\n CdkTreeNode.mostRecentTreeNode = null;\n }\n\n this._dataChanges.complete();\n this._destroyed.next();\n this._destroyed.complete();\n }\n\n /** Focuses the menu item. Implements for FocusableOption. */\n focus(): void {\n this._elementRef.nativeElement.focus();\n }\n\n protected _setRoleFromData(): void {\n if (this._tree.treeControl.isExpandable) {\n this.role = this._tree.treeControl.isExpandable(this._data) ? 'group' : 'treeitem';\n } else {\n if (!this._tree.treeControl.getChildren) {\n throw getTreeControlFunctionsMissingError();\n }\n const childrenNodes = this._tree.treeControl.getChildren(this._data);\n if (Array.isArray(childrenNodes)) {\n this._setRoleFromChildren(childrenNodes as T[]);\n } else if (childrenNodes instanceof Observable) {\n childrenNodes.pipe(takeUntil(this._destroyed))\n .subscribe(children => this._setRoleFromChildren(children));\n }\n }\n }\n\n protected _setRoleFromChildren(children: T[]) {\n this.role = children && children.length ? 'group' : 'treeitem';\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {\n AfterContentInit,\n ContentChildren,\n Directive,\n ElementRef,\n IterableDiffer,\n IterableDiffers,\n OnDestroy,\n QueryList,\n} from '@angular/core';\nimport {Observable} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\n\nimport {CDK_TREE_NODE_OUTLET_NODE, CdkTreeNodeOutlet} from './outlet';\nimport {CdkTree, CdkTreeNode} from './tree';\nimport {getTreeControlFunctionsMissingError} from './tree-errors';\n\n/**\n * Nested node is a child of `<cdk-tree>`. It works with nested tree.\n * By using `cdk-nested-tree-node` component in tree node template, children of the parent node will\n * be added in the `cdkTreeNodeOutlet` in tree node template.\n * For example:\n * ```html\n * <cdk-nested-tree-node>\n * {{node.name}}\n * <ng-template cdkTreeNodeOutlet></ng-template>\n * </cdk-nested-tree-node>\n * ```\n * The children of node will be automatically added to `cdkTreeNodeOutlet`, the result dom will be\n * like this:\n * ```html\n * <cdk-nested-tree-node>\n * {{node.name}}\n * <cdk-nested-tree-node>{{child1.name}}</cdk-nested-tree-node>\n * <cdk-nested-tree-node>{{child2.name}}</cdk-nested-tree-node>\n * </cdk-nested-tree-node>\n * ```\n */\n@Directive({\n selector: 'cdk-nested-tree-node',\n exportAs: 'cdkNestedTreeNode',\n host: {\n '[attr.aria-expanded]': 'isExpanded',\n '[attr.role]': 'role',\n 'class': 'cdk-tree-node cdk-nested-tree-node',\n },\n providers: [\n {provide: CdkTreeNode, useExisting: CdkNestedTreeNode},\n {provide: CDK_TREE_NODE_OUTLET_NODE, useExisting: CdkNestedTreeNode}\n ]\n})\nexport class CdkNestedTreeNode<T> extends CdkTreeNode<T> implements AfterContentInit, OnDestroy {\n /** Differ used to find the changes in the data provided by the data source. */\n private _dataDiffer: IterableDiffer<T>;\n\n /** The children data dataNodes of current node. They will be placed in `CdkTreeNodeOutlet`. */\n protected _children: T[];\n\n /** The children node placeholder. */\n @ContentChildren(CdkTreeNodeOutlet, {\n // We need to use `descendants: true`, because Ivy will no longer match\n // indirect descendants if it's left as false.\n descendants: true\n })\n nodeOutlet: QueryList<CdkTreeNodeOutlet>;\n\n constructor(protected _elementRef: ElementRef<HTMLElement>,\n protected _tree: CdkTree<T>,\n protected _differs: IterableDiffers) {\n super(_elementRef, _tree);\n }\n\n ngAfterContentInit() {\n this._dataDiffer = this._differs.find([]).create(this._tree.trackBy);\n if (!this._tree.treeControl.getChildren) {\n throw getTreeControlFunctionsMissingError();\n }\n const childrenNodes = this._tree.treeControl.getChildren(this.data);\n if (Array.isArray(childrenNodes)) {\n this.updateChildrenNodes(childrenNodes as T[]);\n } else if (childrenNodes instanceof Observable) {\n childrenNodes.pipe(takeUntil(this._destroyed))\n .subscribe(result => this.updateChildrenNodes(result));\n }\n this.nodeOutlet.changes.pipe(takeUntil(this._destroyed))\n .subscribe(() => this.updateChildrenNodes());\n }\n\n ngOnDestroy() {\n this._clear();\n super.ngOnDestroy();\n }\n\n /** Add children dataNodes to the NodeOutlet */\n protected updateChildrenNodes(children?: T[]): void {\n const outlet = this._getNodeOutlet();\n if (children) {\n this._children = children;\n }\n if (outlet && this._children) {\n const viewContainer = outlet.viewContainer;\n this._tree.renderNodeChanges(this._children, this._dataDiffer, viewContainer, this._data);\n } else {\n // Reset the data differ if there's no children nodes displayed\n this._dataDiffer.diff([]);\n }\n }\n\n /** Clear the children dataNodes. */\n protected _clear(): void {\n const outlet = this._getNodeOutlet();\n if (outlet) {\n outlet.viewContainer.clear();\n this._dataDiffer.diff([]);\n }\n }\n\n /** Gets the outlet for the current node. */\n private _getNodeOutlet() {\n const outlets = this.nodeOutlet;\n\n if (outlets) {\n // Note that since we use `descendants: true` on the query, we have to ensure\n // that we don't pick up the outlet of a child node by accident.\n return outlets.find(outlet => !outlet._node || outlet._node === this);\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directionality} from '@angular/cdk/bidi';\nimport {coerceNumberProperty} from '@angular/cdk/coercion';\nimport {Directive, ElementRef, Input, OnDestroy, Optional, Renderer2} from '@angular/core';\nimport {takeUntil} from 'rxjs/operators';\nimport {Subject} from 'rxjs';\nimport {CdkTree, CdkTreeNode} from './tree';\n\n/** Regex used to split a string on its CSS units. */\nconst cssUnitPattern = /([A-Za-z%]+)$/;\n\n/**\n * Indent for the children tree dataNodes.\n * This directive will add left-padding to the node to show hierarchy.\n */\n@Directive({\n selector: '[cdkTreeNodePadding]',\n})\nexport class CdkTreeNodePadding<T> implements OnDestroy {\n /** Current padding value applied to the element. Used to avoid unnecessarily hitting the DOM. */\n private _currentPadding: string|null;\n\n /** Subject that emits when the component has been destroyed. */\n private _destroyed = new Subject<void>();\n\n /** CSS units used for the indentation value. */\n indentUnits = 'px';\n\n /** The level of depth of the tree node. The padding will be `level * indent` pixels. */\n @Input('cdkTreeNodePadding')\n get level(): number { return this._level; }\n set level(value: number) {\n this._level = coerceNumberProperty(value);\n this._setPadding();\n }\n _level: number;\n\n /**\n * The indent for each level. Can be a number or a CSS string.\n * Default number 40px from material design menu sub-menu spec.\n */\n @Input('cdkTreeNodePaddingIndent')\n get indent(): number | string { return this._indent; }\n set indent(indent: number | string) {\n let value = indent;\n let units = 'px';\n\n if (typeof indent === 'string') {\n const parts = indent.split(cssUnitPattern);\n value = parts[0];\n units = parts[1] || units;\n }\n\n this.indentUnits = units;\n this._indent = coerceNumberProperty(value);\n this._setPadding();\n }\n _indent: number = 40;\n\n constructor(private _treeNode: CdkTreeNode<T>,\n private _tree: CdkTree<T>,\n private _renderer: Renderer2,\n private _element: ElementRef<HTMLElement>,\n @Optional() private _dir: Directionality) {\n this._setPadding();\n if (_dir) {\n _dir.change.pipe(takeUntil(this._destroyed)).subscribe(() => this._setPadding(true));\n }\n\n // In Ivy the indentation binding might be set before the tree node's data has been added,\n // which means that we'll miss the first render. We have to subscribe to changes in the\n // data to ensure that everything is up to date.\n _treeNode._dataChanges.subscribe(() => this._setPadding());\n }\n\n ngOnDestroy() {\n this._destroyed.next();\n this._destroyed.complete();\n }\n\n /** The padding indent value for the tree node. Returns a string with px numbers if not null. */\n _paddingIndent(): string|null {\n const nodeLevel = (this._treeNode.data && this._tree.treeControl.getLevel)\n ? this._tree.treeControl.getLevel(this._treeNode.data)\n : null;\n const level = this._level || nodeLevel;\n return level ? `${level * this._indent}${this.indentUnits}` : null;\n }\n\n _setPadding(forceChange = false) {\n const padding = this._paddingIndent();\n\n if (padding !== this._currentPadding || forceChange) {\n const element = this._element.nativeElement;\n const paddingProp = this._dir && this._dir.value === 'rtl' ? 'paddingRight' : 'paddingLeft';\n const resetProp = paddingProp === 'paddingLeft' ? 'paddingRight' : 'paddingLeft';\n this._renderer.setStyle(element, paddingProp, padding);\n this._renderer.setStyle(element, resetProp, null);\n this._currentPadding = padding;\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {Directive, HostListener, Input} from '@angular/core';\n\nimport {CdkTree, CdkTreeNode} from './tree';\n\n/**\n * Node toggle to expand/collapse the node.\n */\n@Directive({selector: '[cdkTreeNodeToggle]'})\nexport class CdkTreeNodeToggle<T> {\n /** Whether expand/collapse the node recursively. */\n @Input('cdkTreeNodeToggleRecursive')\n get recursive(): boolean { return this._recursive; }\n set recursive(value: boolean) { this._recursive = coerceBooleanProperty(value); }\n protected _recursive = false;\n\n constructor(protected _tree: CdkTree<T>,\n protected _treeNode: CdkTreeNode<T>) {}\n\n // We have to use a `HostListener` here in order to support both Ivy and ViewEngine.\n // In Ivy the `host` bindings will be merged when this class is extended, whereas in\n // ViewEngine they're overwritten.\n // TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.\n // tslint:disable-next-line:no-host-decorator-in-concrete\n @HostListener('click', ['$event'])\n _toggle(event: Event): void {\n this.recursive\n ? this._tree.treeControl.toggleDescendants(this._treeNode.data)\n : this._tree.treeControl.toggle(this._treeNode.data);\n\n event.stopPropagation();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {FocusMonitor} from '@angular/cdk/a11y';\nimport {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {CdkTreeNodeOutlet} from './outlet';\nimport {CdkTreeNodePadding} from './padding';\nimport {CdkTreeNodeToggle} from './toggle';\nimport {CdkTree, CdkTreeNode} from './tree';\nimport {CdkTreeNodeDef} from './node';\nimport {CdkNestedTreeNode} from './nested-node';\n\nconst EXPORTED_DECLARATIONS = [\n CdkNestedTreeNode,\n CdkTreeNodeDef,\n CdkTreeNodePadding,\n CdkTreeNodeToggle,\n CdkTree,\n CdkTreeNode,\n CdkTreeNodeOutlet,\n];\n\n@NgModule({\n imports: [CommonModule],\n exports: EXPORTED_DECLARATIONS,\n declarations: EXPORTED_DECLARATIONS,\n providers: [FocusMonitor, CdkTreeNodeDef]\n})\nexport class CdkTreeModule {}\n"],"names":["__extends","d","b","__","this","constructor","extendStatics","prototype","Object","create","getTreeNoValidDataSourceError","Error","getTreeMultipleDefaultNodeDefsError","getTreeMissingMatchingNodeDefError","getTreeControlMissingError","getTreeControlFunctionsMissingError","setPrototypeOf","__proto__","Array","p","hasOwnProperty","BaseTreeControl","expansionModel","SelectionModel","toggle","dataNode","expand","select","collapse","deselect","isExpanded","isSelected","toggleDescendants","collapseDescendants","expandDescendants","collapseAll","clear","toBeProcessed","push","apply","getDescendants","_a","FlatTreeControl","getLevel","isExpandable","_this","_super","call","tslib_1.__extends","startIndex","dataNodes","indexOf","results","i","length","expandAll","NestedTreeControl","getChildren","allNodes","reduce","accumulator","concat","descendants","_getDescendants","splice","childrenNodes","isArray","forEach","child","Observable","pipe","take","filter","Boolean","subscribe","children","CDK_TREE_NODE_OUTLET_NODE","InjectionToken","CdkTreeNodeOutlet","viewContainer","_node","type","Directive","args","selector","ViewContainerRef","undefined","decorators","Inject","Optional","CdkTreeNodeOutletContext","data","$implicit","CdkTreeNodeDef","template","inputs","TemplateRef","CdkTree","_differs","_changeDetectorRef","_onDestroy","Subject","_levels","Map","viewChange","BehaviorSubject","start","end","Number","MAX_VALUE","defineProperty","_dataSource","dataSource","_switchDataSource","ngOnInit","_dataDiffer","find","trackBy","treeControl","ngOnDestroy","_nodeOutlet","next","complete","disconnect","_dataSubscription","unsubscribe","ngAfterContentChecked","defaultNodeDefs","_nodeDefs","def","when","_defaultNodeDef","_observeRenderChanges","dataStream","isDataSource","connect","observableOf","takeUntil","renderNodeChanges","dataDiffer","parentData","changes","diff","forEachOperation","item","adjustedPreviousIndex","currentIndex","previousIndex","insertNode","remove","delete","view","get","move","detectChanges","_getNodeDef","first","nodeDef","nodeData","index","node","context","level","has","set","createEmbeddedView","CdkTreeNode","mostRecentTreeNode","Component","exportAs","host","class","role","encapsulation","ViewEncapsulation","None","propDecorators","Input","ViewChild","static","ContentChildren","_elementRef","_tree","_data","value","_setRoleFromData","_dataChanges","enumerable","configurable","_destroyed","_setRoleFromChildren","[attr.aria-expanded]","[attr.aria-level]","[attr.role]","CdkNestedTreeNode","ngAfterContentInit","updateChildrenNodes","result","nodeOutlet","_clear","outlet","_getNodeOutlet","_children","outlets","providers","provide","useExisting","ElementRef","IterableDiffers","cssUnitPattern","CdkTreeNodePadding","_treeNode","_renderer","_element","_dir","indentUnits","_indent","_setPadding","change","_level","coerceNumberProperty","indent","units","parts","split","_paddingIndent","nodeLevel","forceChange","padding","_currentPadding","element","nativeElement","paddingProp","resetProp","setStyle","Renderer2","Directionality","CdkTreeNodeToggle","_recursive","coerceBooleanProperty","_toggle","event","recursive","stopPropagation","HostListener","EXPORTED_DECLARATIONS","CdkTreeModule","NgModule","imports","CommonModule","exports","declarations","FocusMonitor"],"mappings":";;;;;;;0uBAuBA,SAAgBA,GAAUC,EAAGC,GAEzB,QAASC,KAAOC,KAAKC,YAAcJ,EADnCK,EAAcL,EAAGC,GAEjBD,EAAEM,UAAkB,OAANL,EAAaM,OAAOC,OAAOP,IAAMC,EAAGI,UAAYL,EAAEK,UAAW,GAAIJ,ICdnF,QAAgBO,KACd,MAAOC,OAAM,yCAOf,QAAgBC,KACd,MAAOD,OAAM,wEAOf,QAAgBE,KACd,MAAOF,OAAM,yEAOf,QAAgBG,KACd,MAAOH,OAAM,+CAOf,QAAgBI,KACd,MAAOJ,OAAM,kED7Bf,GAAIL,GAAgB,SAASL,EAAGC,GAI5B,OAHAI,EAAgBE,OAAOQ,iBAChBC,uBAA2BC,QAAS,SAAUjB,EAAGC,GAAKD,EAAEgB,UAAYf,IACvE,SAAUD,EAAGC,GAAK,IAAK,GAAIiB,KAAKjB,GAAOA,EAAEkB,eAAeD,KAAIlB,EAAEkB,GAAKjB,EAAEiB,MACpDlB,EAAGC,iBER5B,QAAAmB,KAYEjB,KAAFk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H,EADNtO,UAAA,iBAAE,WAC2B,MAAOH,MAAK0O,gBACvC,SAActD,GAAkBpL,KAAK0O,WAAaC,EAAAA,sBAAsBvD,oCAYxEqD,EAAFtO,UAAAyO,QADE,SACQC,GACN7O,KAAK8O,UACD9O,KAAKkL,MAAMhE,YAAYtF,kBAAkB5B,KAAK+M,UAAUxH,MACxDvF,KAAKkL,MAAMhE,YAAY9F,OAAOpB,KAAK+M,UAAUxH,MAEjDsJ,EAAME,kCAtBVlK,KAACC,EAAAA,UAADC,OAAYC,SAAU,8DALtBH,KAAQgB,IAARhB,KAAiBqF,uBAQjB4E,YAAAjK,KAAGgG,EAAAA,MAAH9F,MAAS,gCAaT6J,UAAA/J,KAAGmK,EAAAA,aAAHjK,MAAgB,SAAU,cAQ1B0J,KCtBMQ,GACJnD,EACArG,EACAqH,EACA2B,EACA5I,EACAqE,EACAxF,GAGFwK,EAAA,WAAA,QAAAA,MAM4B,sBAN5BrK,KAACsK,EAAAA,SAADpK,OACEqK,SAAUC,EAAAA,cACVC,QAASL,EACTM,aAAcN,EACdzC,WAAYgD,EAAAA,aAAc/J,OAE5ByJ"}
|
|
1
|
+
{"version":3,"file":"cdk-tree.umd.min.js","sources":["../../node_modules/tslib/tslib.es6.js","../../src/cdk/tree/tree-errors.ts","../../src/cdk/tree/control/base-tree-control.ts","../../src/cdk/tree/control/flat-tree-control.ts","../../src/cdk/tree/control/nested-tree-control.ts","../../src/cdk/tree/outlet.ts","../../src/cdk/tree/node.ts","../../src/cdk/tree/tree.ts","../../src/cdk/tree/nested-node.ts","../../src/cdk/tree/padding.ts","../../src/cdk/tree/toggle.ts","../../src/cdk/tree/tree-module.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)\r\n t[p[i]] = s[p[i]];\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Returns an error to be thrown when there is no usable data.\n * @docs-private\n */\nexport function getTreeNoValidDataSourceError() {\n return Error(`A valid data source must be provided.`);\n}\n\n/**\n * Returns an error to be thrown when there are multiple nodes that are missing a when function.\n * @docs-private\n */\nexport function getTreeMultipleDefaultNodeDefsError() {\n return Error(`There can only be one default row without a when predicate function.`);\n}\n\n/**\n * Returns an error to be thrown when there are no matching node defs for a particular set of data.\n * @docs-private\n */\nexport function getTreeMissingMatchingNodeDefError() {\n return Error(`Could not find a matching node definition for the provided node data.`);\n}\n\n/**\n * Returns an error to be thrown when there are tree control.\n * @docs-private\n */\nexport function getTreeControlMissingError() {\n return Error(`Could not find a tree control for the tree.`);\n}\n\n/**\n * Returns an error to be thrown when tree control did not implement functions for flat/nested node.\n * @docs-private\n */\nexport function getTreeControlFunctionsMissingError() {\n return Error(`Could not find functions for nested/flat tree in tree control.`);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {SelectionModel} from '@angular/cdk/collections';\nimport {Observable} from 'rxjs';\nimport {TreeControl} from './tree-control';\n\n/** Base tree control. It has basic toggle/expand/collapse operations on a single data node. */\nexport abstract class BaseTreeControl<T> implements TreeControl<T> {\n\n /** Gets a list of descendent data nodes of a subtree rooted at given data node recursively. */\n abstract getDescendants(dataNode: T): T[];\n\n /** Expands all data nodes in the tree. */\n abstract expandAll(): void;\n\n /** Saved data node for `expandAll` action. */\n dataNodes: T[];\n\n /** A selection model with multi-selection to track expansion status. */\n expansionModel: SelectionModel<T> = new SelectionModel<T>(true);\n\n /** Get depth of a given data node, return the level number. This is for flat tree node. */\n getLevel: (dataNode: T) => number;\n\n /**\n * Whether the data node is expandable. Returns true if expandable.\n * This is for flat tree node.\n */\n isExpandable: (dataNode: T) => boolean;\n\n /** Gets a stream that emits whenever the given data node's children change. */\n getChildren: (dataNode: T) => (Observable<T[]> | T[] | undefined | null);\n\n /** Toggles one single data node's expanded/collapsed state. */\n toggle(dataNode: T): void {\n this.expansionModel.toggle(dataNode);\n }\n\n /** Expands one single data node. */\n expand(dataNode: T): void {\n this.expansionModel.select(dataNode);\n }\n\n /** Collapses one single data node. */\n collapse(dataNode: T): void {\n this.expansionModel.deselect(dataNode);\n }\n\n /** Whether a given data node is expanded or not. Returns true if the data node is expanded. */\n isExpanded(dataNode: T): boolean {\n return this.expansionModel.isSelected(dataNode);\n }\n\n /** Toggles a subtree rooted at `node` recursively. */\n toggleDescendants(dataNode: T): void {\n this.expansionModel.isSelected(dataNode)\n ? this.collapseDescendants(dataNode)\n : this.expandDescendants(dataNode);\n }\n\n /** Collapse all dataNodes in the tree. */\n collapseAll(): void {\n this.expansionModel.clear();\n }\n\n /** Expands a subtree rooted at given data node recursively. */\n expandDescendants(dataNode: T): void {\n let toBeProcessed = [dataNode];\n toBeProcessed.push(...this.getDescendants(dataNode));\n this.expansionModel.select(...toBeProcessed);\n }\n\n /** Collapses a subtree rooted at given data node recursively. */\n collapseDescendants(dataNode: T): void {\n let toBeProcessed = [dataNode];\n toBeProcessed.push(...this.getDescendants(dataNode));\n this.expansionModel.deselect(...toBeProcessed);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {BaseTreeControl} from './base-tree-control';\n\n/** Flat tree control. Able to expand/collapse a subtree recursively for flattened tree. */\nexport class FlatTreeControl<T> extends BaseTreeControl<T> {\n\n /** Construct with flat tree data node functions getLevel and isExpandable. */\n constructor(public getLevel: (dataNode: T) => number,\n public isExpandable: (dataNode: T) => boolean) {\n super();\n }\n\n /**\n * Gets a list of the data node's subtree of descendent data nodes.\n *\n * To make this working, the `dataNodes` of the TreeControl must be flattened tree nodes\n * with correct levels.\n */\n getDescendants(dataNode: T): T[] {\n const startIndex = this.dataNodes.indexOf(dataNode);\n const results: T[] = [];\n\n // Goes through flattened tree nodes in the `dataNodes` array, and get all descendants.\n // The level of descendants of a tree node must be greater than the level of the given\n // tree node.\n // If we reach a node whose level is equal to the level of the tree node, we hit a sibling.\n // If we reach a node whose level is greater than the level of the tree node, we hit a\n // sibling of an ancestor.\n for (let i = startIndex + 1;\n i < this.dataNodes.length && this.getLevel(dataNode) < this.getLevel(this.dataNodes[i]);\n i++) {\n results.push(this.dataNodes[i]);\n }\n return results;\n }\n\n /**\n * Expands all data nodes in the tree.\n *\n * To make this working, the `dataNodes` variable of the TreeControl must be set to all flattened\n * data nodes of the tree.\n */\n expandAll(): void {\n this.expansionModel.select(...this.dataNodes);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {Observable} from 'rxjs';\nimport {take, filter} from 'rxjs/operators';\nimport {BaseTreeControl} from './base-tree-control';\n\n/** Nested tree control. Able to expand/collapse a subtree recursively for NestedNode type. */\nexport class NestedTreeControl<T> extends BaseTreeControl<T> {\n\n /** Construct with nested tree function getChildren. */\n constructor(public getChildren: (dataNode: T) => (Observable<T[]> | T[] | undefined | null)) {\n super();\n }\n\n /**\n * Expands all dataNodes in the tree.\n *\n * To make this working, the `dataNodes` variable of the TreeControl must be set to all root level\n * data nodes of the tree.\n */\n expandAll(): void {\n this.expansionModel.clear();\n const allNodes = this.dataNodes.reduce((accumulator: T[], dataNode) =>\n [...accumulator, ...this.getDescendants(dataNode), dataNode], []);\n this.expansionModel.select(...allNodes);\n }\n\n /** Gets a list of descendant dataNodes of a subtree rooted at given data node recursively. */\n getDescendants(dataNode: T): T[] {\n const descendants: T[] = [];\n\n this._getDescendants(descendants, dataNode);\n // Remove the node itself\n return descendants.splice(1);\n }\n\n /** A helper function to get descendants recursively. */\n protected _getDescendants(descendants: T[], dataNode: T): void {\n descendants.push(dataNode);\n const childrenNodes = this.getChildren(dataNode);\n if (Array.isArray(childrenNodes)) {\n childrenNodes.forEach((child: T) => this._getDescendants(descendants, child));\n } else if (childrenNodes instanceof Observable) {\n childrenNodes.pipe(take(1), filter(Boolean)).subscribe(children => {\n children.forEach((child: T) => this._getDescendants(descendants, child));\n });\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {\n Directive,\n Inject,\n InjectionToken,\n Optional,\n ViewContainerRef,\n} from '@angular/core';\n\n/**\n * Injection token used to provide a `CdkTreeNode` to its outlet.\n * Used primarily to avoid circular imports.\n * @docs-private\n */\nexport const CDK_TREE_NODE_OUTLET_NODE = new InjectionToken<{}>('CDK_TREE_NODE_OUTLET_NODE');\n\n/**\n * Outlet for nested CdkNode. Put `[cdkTreeNodeOutlet]` on a tag to place children dataNodes\n * inside the outlet.\n */\n@Directive({\n selector: '[cdkTreeNodeOutlet]'\n})\nexport class CdkTreeNodeOutlet {\n constructor(\n public viewContainer: ViewContainerRef,\n @Inject(CDK_TREE_NODE_OUTLET_NODE) @Optional() public _node?: any) {}\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, TemplateRef} from '@angular/core';\n\n\n/** Context provided to the tree node component. */\nexport class CdkTreeNodeOutletContext<T> {\n /** Data for the node. */\n $implicit: T;\n\n /** Depth of the node. */\n level: number;\n\n /** Index location of the node. */\n index?: number;\n\n /** Length of the number of total dataNodes. */\n count?: number;\n\n constructor(data: T) {\n this.$implicit = data;\n }\n}\n\n/**\n * Data node definition for the CdkTree.\n * Captures the node's template and a when predicate that describes when this node should be used.\n */\n@Directive({\n selector: '[cdkTreeNodeDef]',\n inputs: [\n 'when: cdkTreeNodeDefWhen'\n ],\n})\nexport class CdkTreeNodeDef<T> {\n /**\n * Function that should return true if this node template should be used for the provided node\n * data and index. If left undefined, this node will be considered the default node template to\n * use when no other when functions return true for the data.\n * For every node, there must be at least one when function that passes or an undefined to\n * default.\n */\n when: (index: number, nodeData: T) => boolean;\n\n /** @docs-private */\n constructor(public template: TemplateRef<any>) {}\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {FocusableOption} from '@angular/cdk/a11y';\nimport {CollectionViewer, DataSource, isDataSource} from '@angular/cdk/collections';\nimport {\n AfterContentChecked,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n Directive,\n ElementRef,\n Input,\n IterableChangeRecord,\n IterableDiffer,\n IterableDiffers,\n OnDestroy,\n OnInit,\n QueryList,\n ViewChild,\n ViewContainerRef,\n ViewEncapsulation,\n TrackByFunction\n} from '@angular/core';\nimport {BehaviorSubject, Observable, of as observableOf, Subject, Subscription} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\nimport {TreeControl} from './control/tree-control';\nimport {CdkTreeNodeDef, CdkTreeNodeOutletContext} from './node';\nimport {CdkTreeNodeOutlet} from './outlet';\nimport {\n getTreeControlFunctionsMissingError,\n getTreeControlMissingError,\n getTreeMissingMatchingNodeDefError,\n getTreeMultipleDefaultNodeDefsError,\n getTreeNoValidDataSourceError\n} from './tree-errors';\n\n/**\n * CDK tree component that connects with a data source to retrieve data of type `T` and renders\n * dataNodes with hierarchy. Updates the dataNodes when new data is provided by the data source.\n */\n@Component({\n moduleId: module.id,\n selector: 'cdk-tree',\n exportAs: 'cdkTree',\n template: `<ng-container cdkTreeNodeOutlet></ng-container>`,\n host: {\n 'class': 'cdk-tree',\n 'role': 'tree',\n },\n encapsulation: ViewEncapsulation.None,\n\n // The \"OnPush\" status for the `CdkTree` component is effectively a noop, so we are removing it.\n // The view for `CdkTree` consists entirely of templates declared in other views. As they are\n // declared elsewhere, they are checked when their declaration points are checked.\n // tslint:disable-next-line:validate-decorators\n changeDetection: ChangeDetectionStrategy.Default\n})\nexport class CdkTree<T> implements AfterContentChecked, CollectionViewer, OnDestroy, OnInit {\n /** Subject that emits when the component has been destroyed. */\n private _onDestroy = new Subject<void>();\n\n /** Differ used to find the changes in the data provided by the data source. */\n private _dataDiffer: IterableDiffer<T>;\n\n /** Stores the node definition that does not have a when predicate. */\n private _defaultNodeDef: CdkTreeNodeDef<T> | null;\n\n /** Data subscription */\n private _dataSubscription: Subscription | null;\n\n /** Level of nodes */\n private _levels: Map<T, number> = new Map<T, number>();\n\n /**\n * Provides a stream containing the latest data array to render. Influenced by the tree's\n * stream of view window (what dataNodes are currently on screen).\n * Data source can be an observable of data array, or a data array to render.\n */\n @Input()\n get dataSource(): DataSource<T> | Observable<T[]> | T[] { return this._dataSource; }\n set dataSource(dataSource: DataSource<T> | Observable<T[]> | T[]) {\n if (this._dataSource !== dataSource) {\n this._switchDataSource(dataSource);\n }\n }\n private _dataSource: DataSource<T> | Observable<T[]> | T[];\n\n /** The tree controller */\n @Input() treeControl: TreeControl<T>;\n\n /**\n * Tracking function that will be used to check the differences in data changes. Used similarly\n * to `ngFor` `trackBy` function. Optimize node operations by identifying a node based on its data\n * relative to the function to know if a node should be added/removed/moved.\n * Accepts a function that takes two parameters, `index` and `item`.\n */\n @Input() trackBy: TrackByFunction<T>;\n\n // Outlets within the tree's template where the dataNodes will be inserted.\n @ViewChild(CdkTreeNodeOutlet, {static: true}) _nodeOutlet: CdkTreeNodeOutlet;\n\n /** The tree node template for the tree */\n @ContentChildren(CdkTreeNodeDef) _nodeDefs: QueryList<CdkTreeNodeDef<T>>;\n\n // TODO(tinayuangao): Setup a listener for scrolling, emit the calculated view to viewChange.\n // Remove the MAX_VALUE in viewChange\n /**\n * Stream containing the latest information on what rows are being displayed on screen.\n * Can be used by the data source to as a heuristic of what data should be provided.\n */\n viewChange =\n new BehaviorSubject<{start: number, end: number}>({start: 0, end: Number.MAX_VALUE});\n\n constructor(private _differs: IterableDiffers,\n private _changeDetectorRef: ChangeDetectorRef) {}\n\n ngOnInit() {\n this._dataDiffer = this._differs.find([]).create(this.trackBy);\n if (!this.treeControl) {\n throw getTreeControlMissingError();\n }\n }\n\n ngOnDestroy() {\n this._nodeOutlet.viewContainer.clear();\n\n this._onDestroy.next();\n this._onDestroy.complete();\n\n if (this._dataSource && typeof (this._dataSource as DataSource<T>).disconnect === 'function') {\n (this.dataSource as DataSource<T>).disconnect(this);\n }\n\n if (this._dataSubscription) {\n this._dataSubscription.unsubscribe();\n this._dataSubscription = null;\n }\n }\n\n ngAfterContentChecked() {\n const defaultNodeDefs = this._nodeDefs.filter(def => !def.when);\n if (defaultNodeDefs.length > 1) {\n throw getTreeMultipleDefaultNodeDefsError();\n }\n this._defaultNodeDef = defaultNodeDefs[0];\n\n if (this.dataSource && this._nodeDefs && !this._dataSubscription) {\n this._observeRenderChanges();\n }\n }\n\n\n // TODO(tinayuangao): Work on keyboard traversal and actions, make sure it's working for RTL\n // and nested trees.\n\n /**\n * Switch to the provided data source by resetting the data and unsubscribing from the current\n * render change subscription if one exists. If the data source is null, interpret this by\n * clearing the node outlet. Otherwise start listening for new data.\n */\n private _switchDataSource(dataSource: DataSource<T> | Observable<T[]> | T[]) {\n if (this._dataSource && typeof (this._dataSource as DataSource<T>).disconnect === 'function') {\n (this.dataSource as DataSource<T>).disconnect(this);\n }\n\n if (this._dataSubscription) {\n this._dataSubscription.unsubscribe();\n this._dataSubscription = null;\n }\n\n // Remove the all dataNodes if there is now no data source\n if (!dataSource) {\n this._nodeOutlet.viewContainer.clear();\n }\n\n this._dataSource = dataSource;\n if (this._nodeDefs) {\n this._observeRenderChanges();\n }\n }\n\n /** Set up a subscription for the data provided by the data source. */\n private _observeRenderChanges() {\n let dataStream: Observable<T[] | ReadonlyArray<T>> | undefined;\n\n if (isDataSource(this._dataSource)) {\n dataStream = this._dataSource.connect(this);\n } else if (this._dataSource instanceof Observable) {\n dataStream = this._dataSource;\n } else if (Array.isArray(this._dataSource)) {\n dataStream = observableOf(this._dataSource);\n }\n\n if (dataStream) {\n this._dataSubscription = dataStream.pipe(takeUntil(this._onDestroy))\n .subscribe(data => this.renderNodeChanges(data));\n } else {\n throw getTreeNoValidDataSourceError();\n }\n }\n\n /** Check for changes made in the data and render each change (node added/removed/moved). */\n renderNodeChanges(data: T[] | ReadonlyArray<T>, dataDiffer: IterableDiffer<T> = this._dataDiffer,\n viewContainer: ViewContainerRef = this._nodeOutlet.viewContainer,\n parentData?: T) {\n const changes = dataDiffer.diff(data);\n if (!changes) { return; }\n\n changes.forEachOperation((item: IterableChangeRecord<T>,\n adjustedPreviousIndex: number | null,\n currentIndex: number | null) => {\n if (item.previousIndex == null) {\n this.insertNode(data[currentIndex!], currentIndex!, viewContainer, parentData);\n } else if (currentIndex == null) {\n viewContainer.remove(adjustedPreviousIndex!);\n this._levels.delete(item.item);\n } else {\n const view = viewContainer.get(adjustedPreviousIndex!);\n viewContainer.move(view!, currentIndex);\n }\n });\n\n this._changeDetectorRef.detectChanges();\n }\n\n /**\n * Finds the matching node definition that should be used for this node data. If there is only\n * one node definition, it is returned. Otherwise, find the node definition that has a when\n * predicate that returns true with the data. If none return true, return the default node\n * definition.\n */\n _getNodeDef(data: T, i: number): CdkTreeNodeDef<T> {\n if (this._nodeDefs.length === 1) { return this._nodeDefs.first; }\n\n const nodeDef =\n this._nodeDefs.find(def => def.when && def.when(i, data)) || this._defaultNodeDef;\n if (!nodeDef) { throw getTreeMissingMatchingNodeDefError(); }\n\n return nodeDef;\n }\n\n /**\n * Create the embedded view for the data node template and place it in the correct index location\n * within the data node view container.\n */\n insertNode(nodeData: T, index: number, viewContainer?: ViewContainerRef, parentData?: T) {\n const node = this._getNodeDef(nodeData, index);\n\n // Node context that will be provided to created embedded view\n const context = new CdkTreeNodeOutletContext<T>(nodeData);\n\n // If the tree is flat tree, then use the `getLevel` function in flat tree control\n // Otherwise, use the level of parent node.\n if (this.treeControl.getLevel) {\n context.level = this.treeControl.getLevel(nodeData);\n } else if (typeof parentData !== 'undefined' && this._levels.has(parentData)) {\n context.level = this._levels.get(parentData)! + 1;\n } else {\n context.level = 0;\n }\n this._levels.set(nodeData, context.level);\n\n // Use default tree nodeOutlet, or nested node's nodeOutlet\n const container = viewContainer ? viewContainer : this._nodeOutlet.viewContainer;\n container.createEmbeddedView(node.template, context, index);\n\n // Set the data to just created `CdkTreeNode`.\n // The `CdkTreeNode` created from `createEmbeddedView` will be saved in static variable\n // `mostRecentTreeNode`. We get it from static variable and pass the node data to it.\n if (CdkTreeNode.mostRecentTreeNode) {\n CdkTreeNode.mostRecentTreeNode.data = nodeData;\n }\n }\n}\n\n\n/**\n * Tree node for CdkTree. It contains the data in the tree node.\n */\n@Directive({\n selector: 'cdk-tree-node',\n exportAs: 'cdkTreeNode',\n host: {\n '[attr.aria-expanded]': 'isExpanded',\n '[attr.aria-level]': 'role === \"treeitem\" ? level : null',\n '[attr.role]': 'role',\n 'class': 'cdk-tree-node',\n },\n})\nexport class CdkTreeNode<T> implements FocusableOption, OnDestroy {\n /**\n * The most recently created `CdkTreeNode`. We save it in static variable so we can retrieve it\n * in `CdkTree` and set the data to it.\n */\n static mostRecentTreeNode: CdkTreeNode<any> | null = null;\n\n /** Subject that emits when the component has been destroyed. */\n protected _destroyed = new Subject<void>();\n\n /** Emits when the node's data has changed. */\n _dataChanges = new Subject<void>();\n\n /** The tree node's data. */\n get data(): T { return this._data; }\n set data(value: T) {\n if (value !== this._data) {\n this._data = value;\n this._setRoleFromData();\n this._dataChanges.next();\n }\n }\n protected _data: T;\n\n get isExpanded(): boolean {\n return this._tree.treeControl.isExpanded(this._data);\n }\n\n get level(): number {\n return this._tree.treeControl.getLevel ? this._tree.treeControl.getLevel(this._data) : 0;\n }\n\n /**\n * The role of the node should be 'group' if it's an internal node,\n * and 'treeitem' if it's a leaf node.\n */\n @Input() role: 'treeitem' | 'group' = 'treeitem';\n\n constructor(protected _elementRef: ElementRef<HTMLElement>,\n protected _tree: CdkTree<T>) {\n CdkTreeNode.mostRecentTreeNode = this as CdkTreeNode<T>;\n }\n\n ngOnDestroy() {\n // If this is the last tree node being destroyed,\n // clear out the reference to avoid leaking memory.\n if (CdkTreeNode.mostRecentTreeNode === this) {\n CdkTreeNode.mostRecentTreeNode = null;\n }\n\n this._dataChanges.complete();\n this._destroyed.next();\n this._destroyed.complete();\n }\n\n /** Focuses the menu item. Implements for FocusableOption. */\n focus(): void {\n this._elementRef.nativeElement.focus();\n }\n\n protected _setRoleFromData(): void {\n if (this._tree.treeControl.isExpandable) {\n this.role = this._tree.treeControl.isExpandable(this._data) ? 'group' : 'treeitem';\n } else {\n if (!this._tree.treeControl.getChildren) {\n throw getTreeControlFunctionsMissingError();\n }\n const childrenNodes = this._tree.treeControl.getChildren(this._data);\n if (Array.isArray(childrenNodes)) {\n this._setRoleFromChildren(childrenNodes as T[]);\n } else if (childrenNodes instanceof Observable) {\n childrenNodes.pipe(takeUntil(this._destroyed))\n .subscribe(children => this._setRoleFromChildren(children));\n }\n }\n }\n\n protected _setRoleFromChildren(children: T[]) {\n this.role = children && children.length ? 'group' : 'treeitem';\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {\n AfterContentInit,\n ContentChildren,\n Directive,\n ElementRef,\n IterableDiffer,\n IterableDiffers,\n OnDestroy,\n QueryList,\n} from '@angular/core';\nimport {Observable} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\n\nimport {CDK_TREE_NODE_OUTLET_NODE, CdkTreeNodeOutlet} from './outlet';\nimport {CdkTree, CdkTreeNode} from './tree';\nimport {getTreeControlFunctionsMissingError} from './tree-errors';\n\n/**\n * Nested node is a child of `<cdk-tree>`. It works with nested tree.\n * By using `cdk-nested-tree-node` component in tree node template, children of the parent node will\n * be added in the `cdkTreeNodeOutlet` in tree node template.\n * For example:\n * ```html\n * <cdk-nested-tree-node>\n * {{node.name}}\n * <ng-template cdkTreeNodeOutlet></ng-template>\n * </cdk-nested-tree-node>\n * ```\n * The children of node will be automatically added to `cdkTreeNodeOutlet`, the result dom will be\n * like this:\n * ```html\n * <cdk-nested-tree-node>\n * {{node.name}}\n * <cdk-nested-tree-node>{{child1.name}}</cdk-nested-tree-node>\n * <cdk-nested-tree-node>{{child2.name}}</cdk-nested-tree-node>\n * </cdk-nested-tree-node>\n * ```\n */\n@Directive({\n selector: 'cdk-nested-tree-node',\n exportAs: 'cdkNestedTreeNode',\n host: {\n '[attr.aria-expanded]': 'isExpanded',\n '[attr.role]': 'role',\n 'class': 'cdk-tree-node cdk-nested-tree-node',\n },\n providers: [\n {provide: CdkTreeNode, useExisting: CdkNestedTreeNode},\n {provide: CDK_TREE_NODE_OUTLET_NODE, useExisting: CdkNestedTreeNode}\n ]\n})\nexport class CdkNestedTreeNode<T> extends CdkTreeNode<T> implements AfterContentInit, OnDestroy {\n /** Differ used to find the changes in the data provided by the data source. */\n private _dataDiffer: IterableDiffer<T>;\n\n /** The children data dataNodes of current node. They will be placed in `CdkTreeNodeOutlet`. */\n protected _children: T[];\n\n /** The children node placeholder. */\n @ContentChildren(CdkTreeNodeOutlet, {\n // We need to use `descendants: true`, because Ivy will no longer match\n // indirect descendants if it's left as false.\n descendants: true\n })\n nodeOutlet: QueryList<CdkTreeNodeOutlet>;\n\n constructor(protected _elementRef: ElementRef<HTMLElement>,\n protected _tree: CdkTree<T>,\n protected _differs: IterableDiffers) {\n super(_elementRef, _tree);\n }\n\n ngAfterContentInit() {\n this._dataDiffer = this._differs.find([]).create(this._tree.trackBy);\n if (!this._tree.treeControl.getChildren) {\n throw getTreeControlFunctionsMissingError();\n }\n const childrenNodes = this._tree.treeControl.getChildren(this.data);\n if (Array.isArray(childrenNodes)) {\n this.updateChildrenNodes(childrenNodes as T[]);\n } else if (childrenNodes instanceof Observable) {\n childrenNodes.pipe(takeUntil(this._destroyed))\n .subscribe(result => this.updateChildrenNodes(result));\n }\n this.nodeOutlet.changes.pipe(takeUntil(this._destroyed))\n .subscribe(() => this.updateChildrenNodes());\n }\n\n ngOnDestroy() {\n this._clear();\n super.ngOnDestroy();\n }\n\n /** Add children dataNodes to the NodeOutlet */\n protected updateChildrenNodes(children?: T[]): void {\n const outlet = this._getNodeOutlet();\n if (children) {\n this._children = children;\n }\n if (outlet && this._children) {\n const viewContainer = outlet.viewContainer;\n this._tree.renderNodeChanges(this._children, this._dataDiffer, viewContainer, this._data);\n } else {\n // Reset the data differ if there's no children nodes displayed\n this._dataDiffer.diff([]);\n }\n }\n\n /** Clear the children dataNodes. */\n protected _clear(): void {\n const outlet = this._getNodeOutlet();\n if (outlet) {\n outlet.viewContainer.clear();\n this._dataDiffer.diff([]);\n }\n }\n\n /** Gets the outlet for the current node. */\n private _getNodeOutlet() {\n const outlets = this.nodeOutlet;\n\n if (outlets) {\n // Note that since we use `descendants: true` on the query, we have to ensure\n // that we don't pick up the outlet of a child node by accident.\n return outlets.find(outlet => !outlet._node || outlet._node === this);\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directionality} from '@angular/cdk/bidi';\nimport {coerceNumberProperty} from '@angular/cdk/coercion';\nimport {Directive, ElementRef, Input, OnDestroy, Optional, Renderer2} from '@angular/core';\nimport {takeUntil} from 'rxjs/operators';\nimport {Subject} from 'rxjs';\nimport {CdkTree, CdkTreeNode} from './tree';\n\n/** Regex used to split a string on its CSS units. */\nconst cssUnitPattern = /([A-Za-z%]+)$/;\n\n/**\n * Indent for the children tree dataNodes.\n * This directive will add left-padding to the node to show hierarchy.\n */\n@Directive({\n selector: '[cdkTreeNodePadding]',\n})\nexport class CdkTreeNodePadding<T> implements OnDestroy {\n /** Current padding value applied to the element. Used to avoid unnecessarily hitting the DOM. */\n private _currentPadding: string|null;\n\n /** Subject that emits when the component has been destroyed. */\n private _destroyed = new Subject<void>();\n\n /** CSS units used for the indentation value. */\n indentUnits = 'px';\n\n /** The level of depth of the tree node. The padding will be `level * indent` pixels. */\n @Input('cdkTreeNodePadding')\n get level(): number { return this._level; }\n set level(value: number) {\n this._level = coerceNumberProperty(value);\n this._setPadding();\n }\n _level: number;\n\n /**\n * The indent for each level. Can be a number or a CSS string.\n * Default number 40px from material design menu sub-menu spec.\n */\n @Input('cdkTreeNodePaddingIndent')\n get indent(): number | string { return this._indent; }\n set indent(indent: number | string) {\n let value = indent;\n let units = 'px';\n\n if (typeof indent === 'string') {\n const parts = indent.split(cssUnitPattern);\n value = parts[0];\n units = parts[1] || units;\n }\n\n this.indentUnits = units;\n this._indent = coerceNumberProperty(value);\n this._setPadding();\n }\n _indent: number = 40;\n\n constructor(private _treeNode: CdkTreeNode<T>,\n private _tree: CdkTree<T>,\n private _renderer: Renderer2,\n private _element: ElementRef<HTMLElement>,\n @Optional() private _dir: Directionality) {\n this._setPadding();\n if (_dir) {\n _dir.change.pipe(takeUntil(this._destroyed)).subscribe(() => this._setPadding(true));\n }\n\n // In Ivy the indentation binding might be set before the tree node's data has been added,\n // which means that we'll miss the first render. We have to subscribe to changes in the\n // data to ensure that everything is up to date.\n _treeNode._dataChanges.subscribe(() => this._setPadding());\n }\n\n ngOnDestroy() {\n this._destroyed.next();\n this._destroyed.complete();\n }\n\n /** The padding indent value for the tree node. Returns a string with px numbers if not null. */\n _paddingIndent(): string|null {\n const nodeLevel = (this._treeNode.data && this._tree.treeControl.getLevel)\n ? this._tree.treeControl.getLevel(this._treeNode.data)\n : null;\n const level = this._level || nodeLevel;\n return level ? `${level * this._indent}${this.indentUnits}` : null;\n }\n\n _setPadding(forceChange = false) {\n const padding = this._paddingIndent();\n\n if (padding !== this._currentPadding || forceChange) {\n const element = this._element.nativeElement;\n const paddingProp = this._dir && this._dir.value === 'rtl' ? 'paddingRight' : 'paddingLeft';\n const resetProp = paddingProp === 'paddingLeft' ? 'paddingRight' : 'paddingLeft';\n this._renderer.setStyle(element, paddingProp, padding);\n this._renderer.setStyle(element, resetProp, null);\n this._currentPadding = padding;\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {Directive, HostListener, Input} from '@angular/core';\n\nimport {CdkTree, CdkTreeNode} from './tree';\n\n/**\n * Node toggle to expand/collapse the node.\n */\n@Directive({selector: '[cdkTreeNodeToggle]'})\nexport class CdkTreeNodeToggle<T> {\n /** Whether expand/collapse the node recursively. */\n @Input('cdkTreeNodeToggleRecursive')\n get recursive(): boolean { return this._recursive; }\n set recursive(value: boolean) { this._recursive = coerceBooleanProperty(value); }\n protected _recursive = false;\n\n constructor(protected _tree: CdkTree<T>,\n protected _treeNode: CdkTreeNode<T>) {}\n\n // We have to use a `HostListener` here in order to support both Ivy and ViewEngine.\n // In Ivy the `host` bindings will be merged when this class is extended, whereas in\n // ViewEngine they're overwritten.\n // TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.\n // tslint:disable-next-line:no-host-decorator-in-concrete\n @HostListener('click', ['$event'])\n _toggle(event: Event): void {\n this.recursive\n ? this._tree.treeControl.toggleDescendants(this._treeNode.data)\n : this._tree.treeControl.toggle(this._treeNode.data);\n\n event.stopPropagation();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {FocusMonitor} from '@angular/cdk/a11y';\nimport {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {CdkTreeNodeOutlet} from './outlet';\nimport {CdkTreeNodePadding} from './padding';\nimport {CdkTreeNodeToggle} from './toggle';\nimport {CdkTree, CdkTreeNode} from './tree';\nimport {CdkTreeNodeDef} from './node';\nimport {CdkNestedTreeNode} from './nested-node';\n\nconst EXPORTED_DECLARATIONS = [\n CdkNestedTreeNode,\n CdkTreeNodeDef,\n CdkTreeNodePadding,\n CdkTreeNodeToggle,\n CdkTree,\n CdkTreeNode,\n CdkTreeNodeOutlet,\n];\n\n@NgModule({\n imports: [CommonModule],\n exports: EXPORTED_DECLARATIONS,\n declarations: EXPORTED_DECLARATIONS,\n providers: [FocusMonitor, CdkTreeNodeDef]\n})\nexport class CdkTreeModule {}\n"],"names":["__extends","d","b","__","this","constructor","extendStatics","prototype","Object","create","getTreeNoValidDataSourceError","Error","getTreeMultipleDefaultNodeDefsError","getTreeMissingMatchingNodeDefError","getTreeControlMissingError","getTreeControlFunctionsMissingError","setPrototypeOf","__proto__","Array","p","hasOwnProperty","BaseTreeControl","expansionModel","SelectionModel","toggle","dataNode","expand","select","collapse","deselect","isExpanded","isSelected","toggleDescendants","collapseDescendants","expandDescendants","collapseAll","clear","toBeProcessed","push","apply","getDescendants","_a","FlatTreeControl","getLevel","isExpandable","_this","_super","call","tslib_1.__extends","startIndex","dataNodes","indexOf","results","i","length","expandAll","NestedTreeControl","getChildren","allNodes","reduce","accumulator","concat","descendants","_getDescendants","splice","childrenNodes","isArray","forEach","child","Observable","pipe","take","filter","Boolean","subscribe","children","CDK_TREE_NODE_OUTLET_NODE","InjectionToken","CdkTreeNodeOutlet","viewContainer","_node","type","Directive","args","selector","ViewContainerRef","undefined","decorators","Inject","Optional","CdkTreeNodeOutletContext","data","$implicit","CdkTreeNodeDef","template","inputs","TemplateRef","CdkTree","_differs","_changeDetectorRef","_onDestroy","Subject","_levels","Map","viewChange","BehaviorSubject","start","end","Number","MAX_VALUE","defineProperty","_dataSource","dataSource","_switchDataSource","ngOnInit","_dataDiffer","find","trackBy","treeControl","ngOnDestroy","_nodeOutlet","next","complete","disconnect","_dataSubscription","unsubscribe","ngAfterContentChecked","defaultNodeDefs","_nodeDefs","def","when","_defaultNodeDef","_observeRenderChanges","dataStream","isDataSource","connect","observableOf","takeUntil","renderNodeChanges","dataDiffer","parentData","changes","diff","forEachOperation","item","adjustedPreviousIndex","currentIndex","previousIndex","insertNode","remove","delete","view","get","move","detectChanges","_getNodeDef","first","nodeDef","nodeData","index","node","context","level","has","set","createEmbeddedView","CdkTreeNode","mostRecentTreeNode","Component","exportAs","host","class","role","encapsulation","ViewEncapsulation","None","propDecorators","Input","ViewChild","static","ContentChildren","_elementRef","_tree","_data","value","_setRoleFromData","_dataChanges","enumerable","configurable","_destroyed","_setRoleFromChildren","[attr.aria-expanded]","[attr.aria-level]","[attr.role]","CdkNestedTreeNode","ngAfterContentInit","updateChildrenNodes","result","nodeOutlet","_clear","outlet","_getNodeOutlet","_children","outlets","providers","provide","useExisting","ElementRef","IterableDiffers","cssUnitPattern","CdkTreeNodePadding","_treeNode","_renderer","_element","_dir","indentUnits","_indent","_setPadding","change","_level","coerceNumberProperty","indent","units","parts","split","_paddingIndent","nodeLevel","forceChange","padding","_currentPadding","element","nativeElement","paddingProp","resetProp","setStyle","Renderer2","Directionality","CdkTreeNodeToggle","_recursive","coerceBooleanProperty","_toggle","event","recursive","stopPropagation","HostListener","EXPORTED_DECLARATIONS","CdkTreeModule","NgModule","imports","CommonModule","exports","declarations","FocusMonitor"],"mappings":";;;;;;;0uBAuBA,SAAgBA,GAAUC,EAAGC,GAEzB,QAASC,KAAOC,KAAKC,YAAcJ,EADnCK,EAAcL,EAAGC,GAEjBD,EAAEM,UAAkB,OAANL,EAAaM,OAAOC,OAAOP,IAAMC,EAAGI,UAAYL,EAAEK,UAAW,GAAIJ,ICdnF,QAAgBO,KACd,MAAOC,OAAM,yCAOf,QAAgBC,KACd,MAAOD,OAAM,wEAOf,QAAgBE,KACd,MAAOF,OAAM,yEAOf,QAAgBG,KACd,MAAOH,OAAM,+CAOf,QAAgBI,KACd,MAAOJ,OAAM,kED7Bf,GAAIL,GAAgB,SAASL,EAA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I,SAAA5I,KAAGgG,EAAAA,MAAH9F,MAAS,+BA4DT+H,KC5FA2B,EAAA,WAQE,QAAFA,GAAwBvD,EACA6B,GADA/M,KAAxBkL,MAAwBA,EACAlL,KAAxB+M,UAAwBA,EAHZ/M,KAAZ0O,YAAyB,EAkBzB,MArBEtO,QAAFsG,eACM+H,EADNtO,UAAA,iBAAE,WAC2B,MAAOH,MAAK0O,gBACvC,SAActD,GAAkBpL,KAAK0O,WAAaC,EAAAA,sBAAsBvD,oCAYxEqD,EAAFtO,UAAAyO,QADE,SACQC,GACN7O,KAAK8O,UACD9O,KAAKkL,MAAMhE,YAAYtF,kBAAkB5B,KAAK+M,UAAUxH,MACxDvF,KAAKkL,MAAMhE,YAAY9F,OAAOpB,KAAK+M,UAAUxH,MAEjDsJ,EAAME,kCAtBVlK,KAACC,EAAAA,UAADC,OAAYC,SAAU,8DALtBH,KAAQgB,IAARhB,KAAiBqF,uBAQjB4E,YAAAjK,KAAGgG,EAAAA,MAAH9F,MAAS,gCAaT6J,UAAA/J,KAAGmK,EAAAA,aAAHjK,MAAgB,SAAU,cAQ1B0J,KCtBMQ,GACJnD,EACArG,EACAqH,EACA2B,EACA5I,EACAqE,EACAxF,GAGFwK,EAAA,WAAA,QAAAA,MAM4B,sBAN5BrK,KAACsK,EAAAA,SAADpK,OACEqK,SAAUC,EAAAA,cACVC,QAASL,EACTM,aAAcN,EACdzC,WAAYgD,EAAAA,aAAc/J,OAE5ByJ"}
|
package/bundles/cdk.umd.js
CHANGED
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* @fileoverview added by tsickle
|
|
16
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
16
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
17
17
|
*/
|
|
18
18
|
/**
|
|
19
19
|
* Current version of the Angular Component Development Kit.
|
|
20
20
|
* @type {?}
|
|
21
21
|
*/
|
|
22
|
-
var VERSION = new core.Version('8.0.0
|
|
22
|
+
var VERSION = new core.Version('8.0.0');
|
|
23
23
|
|
|
24
24
|
exports.VERSION = VERSION;
|
|
25
25
|
|
package/bundles/cdk.umd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdk.umd.js","sources":["../../src/cdk/version.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Version} from '@angular/core';\n\n/** Current version of the Angular Component Development Kit. */\nexport const VERSION = new Version('8.0.0
|
|
1
|
+
{"version":3,"file":"cdk.umd.js","sources":["../../src/cdk/version.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Version} from '@angular/core';\n\n/** Current version of the Angular Component Development Kit. */\nexport const VERSION = new Version('8.0.0');\n"],"names":["Version"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAWA,AAAA,IAAa,OAAO,GAAG,IAAIA,YAAO,CAAC,mBAAmB,CAAC;;;;;;;;;;;;"}
|
package/bundles/cdk.umd.min.js
CHANGED
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
|
-
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@angular/core")):"function"==typeof define&&define.amd?define("@angular/cdk",["exports","@angular/core"],n):n((e.ng=e.ng||{},e.ng.cdk={}),e.ng.core)}(this,function(e,n){"use strict";var o=new n.Version("8.0.0
|
|
8
|
+
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@angular/core")):"function"==typeof define&&define.amd?define("@angular/cdk",["exports","@angular/core"],n):n((e.ng=e.ng||{},e.ng.cdk={}),e.ng.core)}(this,function(e,n){"use strict";var o=new n.Version("8.0.0");e.VERSION=o,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
9
9
|
//# sourceMappingURL=cdk.umd.min.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdk.umd.min.js","sources":["../../src/cdk/version.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Version} from '@angular/core';\n\n/** Current version of the Angular Component Development Kit. */\nexport const VERSION = new Version('8.0.0
|
|
1
|
+
{"version":3,"file":"cdk.umd.min.js","sources":["../../src/cdk/version.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Version} from '@angular/core';\n\n/** Current version of the Angular Component Development Kit. */\nexport const VERSION = new Version('8.0.0');\n"],"names":["VERSION","Version"],"mappings":";;;;;;;4QAWA,IAAaA,GAAU,GAAIC,GAAAA,QAAQ"}
|
|
@@ -49,10 +49,19 @@ export declare class CdkDrag<T = any> implements AfterViewInit, OnChanges, OnDes
|
|
|
49
49
|
* when trying to enable dragging on an element that you might not have access to.
|
|
50
50
|
*/
|
|
51
51
|
rootElementSelector: string;
|
|
52
|
+
/**
|
|
53
|
+
* Node or selector that will be used to determine the element to which the draggable's
|
|
54
|
+
* position will be constrained. If a string is passed in, it'll be used as a selector that
|
|
55
|
+
* will be matched starting from the element's parent and going up the DOM until a match
|
|
56
|
+
* has been found.
|
|
57
|
+
*/
|
|
58
|
+
boundaryElement: string | ElementRef<HTMLElement> | HTMLElement;
|
|
52
59
|
/**
|
|
53
60
|
* Selector that will be used to determine the element to which the draggable's position will
|
|
54
61
|
* be constrained. Matching starts from the element's parent and goes up the DOM until a matching
|
|
55
|
-
* element has been found
|
|
62
|
+
* element has been found
|
|
63
|
+
* @deprecated Use `boundaryElement` instead.
|
|
64
|
+
* @breaking-change 9.0.0
|
|
56
65
|
*/
|
|
57
66
|
boundaryElementSelector: string;
|
|
58
67
|
/**
|
|
@@ -121,7 +130,7 @@ export declare class CdkDrag<T = any> implements AfterViewInit, OnChanges, OnDes
|
|
|
121
130
|
ngOnDestroy(): void;
|
|
122
131
|
/** Syncs the root element with the `DragRef`. */
|
|
123
132
|
private _updateRootElement;
|
|
124
|
-
/** Gets the boundary element, based on the `
|
|
133
|
+
/** Gets the boundary element, based on the `boundaryElement` value. */
|
|
125
134
|
private _getBoundaryElement;
|
|
126
135
|
/** Syncs the inputs of the CdkDrag with the options of the underlying DragRef. */
|
|
127
136
|
private _syncInputs;
|
|
@@ -21,6 +21,11 @@ export interface CdkDragRelease<T = any> {
|
|
|
21
21
|
export interface CdkDragEnd<T = any> {
|
|
22
22
|
/** Draggable that emitted the event. */
|
|
23
23
|
source: CdkDrag<T>;
|
|
24
|
+
/** Distance in pixels that the user has dragged since the drag sequence started. */
|
|
25
|
+
distance: {
|
|
26
|
+
x: number;
|
|
27
|
+
y: number;
|
|
28
|
+
};
|
|
24
29
|
}
|
|
25
30
|
/** Event emitted when the user moves an item into a new drop container. */
|
|
26
31
|
export interface CdkDragEnter<T = any, I = T> {
|
|
@@ -28,6 +33,8 @@ export interface CdkDragEnter<T = any, I = T> {
|
|
|
28
33
|
container: CdkDropList<T>;
|
|
29
34
|
/** Item that was removed from the container. */
|
|
30
35
|
item: CdkDrag<I>;
|
|
36
|
+
/** Index at which the item has entered the container. */
|
|
37
|
+
currentIndex: number;
|
|
31
38
|
}
|
|
32
39
|
/**
|
|
33
40
|
* Event emitted when the user removes an item from a
|
|
@@ -53,6 +60,11 @@ export interface CdkDragDrop<T, O = T> {
|
|
|
53
60
|
previousContainer: CdkDropList<O>;
|
|
54
61
|
/** Whether the user's pointer was over the container when the item was dropped. */
|
|
55
62
|
isPointerOverContainer: boolean;
|
|
63
|
+
/** Distance in pixels that the user has dragged since the drag sequence started. */
|
|
64
|
+
distance: {
|
|
65
|
+
x: number;
|
|
66
|
+
y: number;
|
|
67
|
+
};
|
|
56
68
|
}
|
|
57
69
|
/** Event emitted as the user is dragging a draggable item. */
|
|
58
70
|
export interface CdkDragMove<T = any> {
|
|
@@ -65,6 +77,11 @@ export interface CdkDragMove<T = any> {
|
|
|
65
77
|
};
|
|
66
78
|
/** Native event that is causing the dragging. */
|
|
67
79
|
event: MouseEvent | TouchEvent;
|
|
80
|
+
/** Distance in pixels that the user has dragged since the drag sequence started. */
|
|
81
|
+
distance: {
|
|
82
|
+
x: number;
|
|
83
|
+
y: number;
|
|
84
|
+
};
|
|
68
85
|
/**
|
|
69
86
|
* Indicates the direction in which the user is dragging the element along each axis.
|
|
70
87
|
* `1` means that the position is increasing (e.g. the user is moving to the right or downwards),
|
|
@@ -88,11 +88,6 @@ export declare class DragRef<T = any> {
|
|
|
88
88
|
private _scrollPosition;
|
|
89
89
|
/** Emits when the item is being moved. */
|
|
90
90
|
private _moveEvents;
|
|
91
|
-
/**
|
|
92
|
-
* Amount of subscriptions to the move event. Used to avoid
|
|
93
|
-
* hitting the zone if the consumer didn't subscribe to it.
|
|
94
|
-
*/
|
|
95
|
-
private _moveEventSubscriptions;
|
|
96
91
|
/** Keeps track of the direction in which the user is dragging along each axis. */
|
|
97
92
|
private _pointerDirectionDelta;
|
|
98
93
|
/** Pointer position at which the last change in the delta occurred. */
|
|
@@ -162,11 +157,13 @@ export declare class DragRef<T = any> {
|
|
|
162
157
|
/** Emits when the user stops dragging an item in the container. */
|
|
163
158
|
ended: Subject<{
|
|
164
159
|
source: DragRef<any>;
|
|
160
|
+
distance: Point;
|
|
165
161
|
}>;
|
|
166
162
|
/** Emits when the user has moved the item into a new container. */
|
|
167
163
|
entered: Subject<{
|
|
168
164
|
container: DropListRef;
|
|
169
165
|
item: DragRef<any>;
|
|
166
|
+
currentIndex: number;
|
|
170
167
|
}>;
|
|
171
168
|
/** Emits when the user removes the item its container by dragging it into another container. */
|
|
172
169
|
exited: Subject<{
|
|
@@ -180,6 +177,7 @@ export declare class DragRef<T = any> {
|
|
|
180
177
|
item: DragRef<any>;
|
|
181
178
|
container: DropListRef;
|
|
182
179
|
previousContainer: DropListRef;
|
|
180
|
+
distance: Point;
|
|
183
181
|
isPointerOverContainer: boolean;
|
|
184
182
|
}>;
|
|
185
183
|
/**
|
|
@@ -193,6 +191,7 @@ export declare class DragRef<T = any> {
|
|
|
193
191
|
y: number;
|
|
194
192
|
};
|
|
195
193
|
event: MouseEvent | TouchEvent;
|
|
194
|
+
distance: Point;
|
|
196
195
|
delta: {
|
|
197
196
|
x: -1 | 0 | 1;
|
|
198
197
|
y: -1 | 0 | 1;
|
|
@@ -328,6 +327,11 @@ export declare class DragRef<T = any> {
|
|
|
328
327
|
* @param y New transform value along the Y axis.
|
|
329
328
|
*/
|
|
330
329
|
private _applyRootElementTransform;
|
|
330
|
+
/**
|
|
331
|
+
* Gets the distance that the user has dragged during the current drag sequence.
|
|
332
|
+
* @param currentPosition Current position of the user's pointer.
|
|
333
|
+
*/
|
|
334
|
+
private _getDragDistance;
|
|
331
335
|
}
|
|
332
336
|
/** Point on the page or within an element. */
|
|
333
337
|
export interface Point {
|
|
@@ -9,7 +9,7 @@ import { ElementRef } from '@angular/core';
|
|
|
9
9
|
import { DragDropRegistry } from './drag-drop-registry';
|
|
10
10
|
import { Direction } from '@angular/cdk/bidi';
|
|
11
11
|
import { Subject } from 'rxjs';
|
|
12
|
-
import { DragRefInternal as DragRef } from './drag-ref';
|
|
12
|
+
import { DragRefInternal as DragRef, Point } from './drag-ref';
|
|
13
13
|
/**
|
|
14
14
|
* Internal compile-time-only representation of a `DropListRef`.
|
|
15
15
|
* Used to avoid circular import issues between the `DropListRef` and the `DragRef`.
|
|
@@ -25,7 +25,7 @@ export declare class DropListRef<T = any> {
|
|
|
25
25
|
private _dragDropRegistry;
|
|
26
26
|
private _document;
|
|
27
27
|
/** Element that the drop list is attached to. */
|
|
28
|
-
|
|
28
|
+
element: HTMLElement | ElementRef<HTMLElement>;
|
|
29
29
|
/**
|
|
30
30
|
* Unique ID for the drop list.
|
|
31
31
|
* @deprecated No longer being used. To be removed.
|
|
@@ -51,6 +51,7 @@ export declare class DropListRef<T = any> {
|
|
|
51
51
|
entered: Subject<{
|
|
52
52
|
item: DragRef;
|
|
53
53
|
container: DropListRef<any>;
|
|
54
|
+
currentIndex: number;
|
|
54
55
|
}>;
|
|
55
56
|
/**
|
|
56
57
|
* Emits when the user removes an item from the container
|
|
@@ -68,6 +69,7 @@ export declare class DropListRef<T = any> {
|
|
|
68
69
|
container: DropListRef<any>;
|
|
69
70
|
previousContainer: DropListRef<any>;
|
|
70
71
|
isPointerOverContainer: boolean;
|
|
72
|
+
distance: Point;
|
|
71
73
|
}>;
|
|
72
74
|
/** Emits as the user is swapping items while actively dragging. */
|
|
73
75
|
sorted: Subject<{
|
|
@@ -131,8 +133,10 @@ export declare class DropListRef<T = any> {
|
|
|
131
133
|
* @param previousContainer Container from which the item got dragged in.
|
|
132
134
|
* @param isPointerOverContainer Whether the user's pointer was over the
|
|
133
135
|
* container when the item was dropped.
|
|
136
|
+
* @param distance Distance the user has dragged since the start of the dragging sequence.
|
|
137
|
+
* @breaking-change 9.0.0 `distance` parameter to become required.
|
|
134
138
|
*/
|
|
135
|
-
drop(item: DragRef, currentIndex: number, previousContainer: DropListRef, isPointerOverContainer: boolean): void;
|
|
139
|
+
drop(item: DragRef, currentIndex: number, previousContainer: DropListRef, isPointerOverContainer: boolean, distance?: Point): void;
|
|
136
140
|
/**
|
|
137
141
|
* Sets the draggable items that are a part of this list.
|
|
138
142
|
* @param items Items that are a part of this list.
|
|
@@ -206,6 +210,8 @@ export declare class DropListRef<T = any> {
|
|
|
206
210
|
* @param delta Direction in which the user is moving their pointer.
|
|
207
211
|
*/
|
|
208
212
|
private _getItemIndexFromPointerPosition;
|
|
213
|
+
/** Caches the current items in the list and their positions. */
|
|
214
|
+
private _cacheItems;
|
|
209
215
|
/**
|
|
210
216
|
* Checks whether the user's pointer is positioned over the container.
|
|
211
217
|
* @param x Pointer position along the X axis.
|