@ng-doc/builder 15.0.0-beta.27 → 15.0.0-beta.29
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/engine/.cache/libs/app/components/api-list/api-list.component.js +7 -7
- package/engine/.cache/libs/app/components/code/code.component.js +12 -16
- package/engine/.cache/libs/app/components/demo/demo.component.js +8 -10
- package/engine/.cache/libs/app/components/navbar/navbar.component.js +1 -1
- package/engine/.cache/libs/app/components/page/page.module.js +1 -0
- package/engine/.cache/libs/app/components/page-map/page-map.component.js +1 -2
- package/engine/.cache/libs/app/components/playground/playground.component.js +5 -10
- package/engine/.cache/libs/app/components/playground-demo/playground-demo.component.js +8 -9
- package/engine/.cache/libs/app/components/playground-properties/playground-properties.component.js +1 -2
- package/engine/.cache/libs/app/components/playground-property/playground-property.component.js +9 -10
- package/engine/.cache/libs/app/components/root/root.component.js +2 -3
- package/engine/.cache/libs/app/components/sidebar/sidebar-category/sidebar-category.component.js +3 -5
- package/engine/.cache/libs/app/components/sidebar/sidebar.component.js +1 -2
- package/engine/.cache/libs/app/directives/code-highlighter/code-highlighter.directive.js +1 -2
- package/engine/.cache/libs/app/helpers/generate-page-map/generate-page-map.js +1 -2
- package/engine/.cache/libs/app/modules/root/ng-doc.module.js +3 -3
- package/engine/.cache/libs/app/pipes/filter-by-text/filter-by-text.pipe.js +1 -2
- package/engine/.cache/libs/app/processors/code-processor/code-processor.directive.js +2 -5
- package/engine/.cache/libs/app/processors/html-processor/html-processor.directive.js +1 -2
- package/engine/.cache/libs/app/processors/icon-processor/icon-processor.directive.js +2 -3
- package/engine/.cache/libs/app/processors/index.js +1 -0
- package/engine/.cache/libs/app/processors/playground-processor/playground-processor.directive.js +2 -3
- package/engine/.cache/libs/app/processors/tooltip-processor/index.js +6 -0
- package/engine/.cache/libs/app/processors/tooltip-processor/tooltip-processor.directive.js +30 -0
- package/engine/.cache/libs/app/processors/tooltip-processor/tooltip-processor.module.js +18 -0
- package/engine/.cache/libs/app/processors/tooltip-processor/tooltip-wrapper.component.js +30 -0
- package/engine/.cache/libs/app/services/theme/theme.service.js +1 -2
- package/engine/.cache/libs/builder/engine/actions/demo.action.js +1 -2
- package/engine/.cache/libs/builder/engine/actions/playground.action.js +3 -4
- package/engine/.cache/libs/builder/engine/actions.js +1 -2
- package/engine/.cache/libs/builder/engine/builder.js +2 -2
- package/engine/.cache/libs/builder/engine/entities/abstractions/entity.js +2 -3
- package/engine/.cache/libs/builder/engine/entities/abstractions/file.entity.js +7 -2
- package/engine/.cache/libs/builder/engine/entities/abstractions/module.entity.js +1 -2
- package/engine/.cache/libs/builder/engine/entities/abstractions/route.entity.js +1 -2
- package/engine/.cache/libs/builder/engine/entities/abstractions/source-file.entity.js +3 -3
- package/engine/.cache/libs/builder/engine/entities/api-page.entity.js +4 -4
- package/engine/.cache/libs/builder/engine/entities/api-scope.entity.js +1 -2
- package/engine/.cache/libs/builder/engine/entities/api.entity.js +9 -16
- package/engine/.cache/libs/builder/engine/entities/category.entity.js +6 -12
- package/engine/.cache/libs/builder/engine/entities/dependencies.entity.js +20 -9
- package/engine/.cache/libs/builder/engine/entities/page.entity.js +13 -20
- package/engine/.cache/libs/builder/engine/entities/playground.entity.js +4 -3
- package/engine/.cache/libs/builder/engine/entity-store.js +3 -5
- package/engine/.cache/libs/builder/engine/functions/build-candidates.js +1 -2
- package/engine/.cache/libs/builder/engine/post-processors/html-plugins/keywords-processor.js +19 -16
- package/engine/.cache/libs/builder/engine/post-processors/html-post-processor.js +5 -2
- package/engine/.cache/libs/builder/engine/renderer.js +10 -7
- package/engine/.cache/libs/builder/engine/template-filters.js +16 -1
- package/engine/.cache/libs/builder/engine/watcher.js +1 -1
- package/engine/.cache/libs/builder/helpers/build-assets.js +2 -0
- package/engine/.cache/libs/builder/helpers/build-global-indexes.js +1 -2
- package/engine/.cache/libs/builder/helpers/create-builder-context.js +3 -4
- package/engine/.cache/libs/builder/helpers/declaration-to-playground.js +6 -4
- package/engine/.cache/libs/builder/helpers/extract-path-anchor.js +2 -3
- package/engine/.cache/libs/builder/helpers/extract-selectors.js +2 -3
- package/engine/.cache/libs/builder/helpers/format-code.js +3 -6
- package/engine/.cache/libs/builder/helpers/generate-api-entities.js +1 -2
- package/engine/.cache/libs/builder/helpers/index.js +1 -0
- package/engine/.cache/libs/builder/helpers/marked.js +1 -1
- package/engine/.cache/libs/builder/helpers/no-empty.js +12 -0
- package/engine/.cache/libs/builder/helpers/not-empty-assets.js +1 -1
- package/engine/.cache/libs/builder/helpers/presentation.js +76 -5
- package/engine/.cache/libs/builder/helpers/typescript/class/find-base-class.js +21 -0
- package/engine/.cache/libs/builder/helpers/typescript/class/find-class.js +21 -0
- package/engine/.cache/libs/builder/helpers/typescript/class/for-all-classes.js +15 -0
- package/engine/.cache/libs/builder/helpers/typescript/class/index.js +6 -0
- package/engine/.cache/libs/builder/helpers/typescript/create-project.js +17 -2
- package/engine/.cache/libs/builder/helpers/typescript/find-declaration.js +3 -4
- package/engine/.cache/libs/builder/helpers/typescript/first-node-with-comment.js +13 -0
- package/engine/.cache/libs/builder/helpers/typescript/index.js +6 -0
- package/engine/.cache/libs/builder/helpers/typescript/interface/find-interface.js +29 -0
- package/engine/.cache/libs/builder/helpers/typescript/interface/for-all-interfaces.js +20 -0
- package/engine/.cache/libs/builder/helpers/typescript/interface/index.js +5 -0
- package/engine/.cache/libs/builder/helpers/typescript/method/get-class-methods.js +22 -0
- package/engine/.cache/libs/builder/helpers/typescript/method/get-implemented-method.js +44 -0
- package/engine/.cache/libs/builder/helpers/typescript/method/get-interface-methods.js +22 -0
- package/engine/.cache/libs/builder/helpers/typescript/method/get-method-chain.js +32 -0
- package/engine/.cache/libs/builder/helpers/typescript/method/get-overridden-method.js +26 -0
- package/engine/.cache/libs/builder/helpers/typescript/method/index.js +8 -0
- package/engine/.cache/libs/builder/helpers/typescript/node/index.js +4 -0
- package/engine/.cache/libs/builder/helpers/typescript/node/sort-by-nodes-name.js +11 -0
- package/engine/.cache/libs/builder/helpers/typescript/property/get-class-properties.js +22 -0
- package/engine/.cache/libs/builder/helpers/typescript/property/get-implemented-property.js +44 -0
- package/engine/.cache/libs/builder/helpers/typescript/property/get-interface-properties.js +22 -0
- package/engine/.cache/libs/builder/helpers/typescript/property/get-overridden-property.js +26 -0
- package/engine/.cache/libs/builder/helpers/typescript/property/get-property-chain.js +33 -0
- package/engine/.cache/libs/builder/helpers/typescript/property/index.js +8 -0
- package/engine/.cache/libs/builder/resolvers/common/get-property-assignment.js +1 -2
- package/engine/.cache/libs/builder/schematics/api/index.js +1 -1
- package/engine/.cache/libs/builder/schematics/category/index.js +1 -1
- package/engine/.cache/libs/builder/schematics/dependencies/index.js +2 -3
- package/engine/.cache/libs/builder/schematics/page/index.js +7 -1
- package/engine/.cache/libs/builder/templates-env/code.env.js +2 -0
- package/engine/.cache/libs/builder/templates-env/index.js +1 -0
- package/engine/.cache/libs/core/helpers/extract-value.js +1 -1
- package/engine/.cache/libs/core/helpers/kebab-case.js +4 -3
- package/engine/.cache/libs/ui-kit/cdk/combobox-host/combobox-host.component.js +8 -11
- package/engine/.cache/libs/ui-kit/components/clear-control/clear-control.component.js +3 -6
- package/engine/.cache/libs/ui-kit/components/dropdown/dropdown.component.js +27 -17
- package/engine/.cache/libs/ui-kit/components/input-wrapper/input-wrapper.component.js +3 -6
- package/engine/.cache/libs/ui-kit/components/list/list.component.js +7 -10
- package/engine/.cache/libs/ui-kit/components/option/option.component.js +2 -4
- package/engine/.cache/libs/ui-kit/components/overlay-container/overlay-container.component.js +5 -9
- package/engine/.cache/libs/ui-kit/components/selection/selection-host.directive.js +1 -2
- package/engine/.cache/libs/ui-kit/components/tab-group/tab-group.component.js +1 -2
- package/engine/.cache/libs/ui-kit/components/toggle/toggle.component.js +2 -3
- package/engine/.cache/libs/ui-kit/directives/media-query/media-query.directive.js +1 -2
- package/engine/.cache/libs/ui-kit/directives/tooltip/tooltip.directive.js +14 -7
- package/engine/.cache/libs/ui-kit/helpers/merge-overlay-configs.js +5 -3
- package/engine/.cache/libs/ui-kit/modules/root/root.module.js +1 -2
- package/engine/.cache/libs/ui-kit/services/notify/notify.service.js +2 -2
- package/engine/.cache/libs/ui-kit/services/overlay/overlay.service.js +2 -3
- package/engine/.cache/libs/ui-kit/services/overlay-strategy/overlay-strategy.js +4 -7
- package/engine/.cache/libs/ui-kit/utils/overlay-utils.js +1 -1
- package/engine/entities/api-page.entity.d.ts +1 -1
- package/engine/entities/dependencies.entity.js +14 -4
- package/engine/entities/dependencies.entity.js.map +1 -1
- package/engine/post-processors/html-plugins/keywords-processor.js +18 -15
- package/engine/post-processors/html-plugins/keywords-processor.js.map +1 -1
- package/engine/renderer.d.ts +1 -0
- package/engine/renderer.js +4 -1
- package/engine/renderer.js.map +1 -1
- package/engine/template-filters.d.ts +1 -1
- package/engine/template-filters.js +16 -1
- package/engine/template-filters.js.map +1 -1
- package/helpers/build-assets.js +2 -0
- package/helpers/build-assets.js.map +1 -1
- package/helpers/format-code.js +3 -6
- package/helpers/format-code.js.map +1 -1
- package/helpers/index.d.ts +1 -0
- package/helpers/index.js +1 -0
- package/helpers/index.js.map +1 -1
- package/helpers/no-empty.d.ts +5 -0
- package/helpers/no-empty.js +13 -0
- package/helpers/no-empty.js.map +1 -0
- package/helpers/not-empty-assets.js +1 -1
- package/helpers/not-empty-assets.js.map +1 -1
- package/helpers/presentation.d.ts +11 -1
- package/helpers/presentation.js +77 -4
- package/helpers/presentation.js.map +1 -1
- package/helpers/typescript/class/find-base-class.d.ts +7 -0
- package/helpers/typescript/class/find-base-class.js +22 -0
- package/helpers/typescript/class/find-base-class.js.map +1 -0
- package/helpers/typescript/class/find-class.d.ts +7 -0
- package/helpers/typescript/class/find-class.js +22 -0
- package/helpers/typescript/class/find-class.js.map +1 -0
- package/helpers/typescript/class/for-all-classes.d.ts +7 -0
- package/helpers/typescript/class/for-all-classes.js +16 -0
- package/helpers/typescript/class/for-all-classes.js.map +1 -0
- package/helpers/typescript/class/index.d.ts +3 -0
- package/helpers/typescript/class/index.js +7 -0
- package/helpers/typescript/class/index.js.map +1 -0
- package/helpers/typescript/first-node-with-comment.d.ts +8 -0
- package/helpers/typescript/first-node-with-comment.js +15 -0
- package/helpers/typescript/first-node-with-comment.js.map +1 -0
- package/helpers/typescript/index.d.ts +6 -0
- package/helpers/typescript/index.js +6 -0
- package/helpers/typescript/index.js.map +1 -1
- package/helpers/typescript/interface/find-interface.d.ts +7 -0
- package/helpers/typescript/interface/find-interface.js +30 -0
- package/helpers/typescript/interface/find-interface.js.map +1 -0
- package/helpers/typescript/interface/for-all-interfaces.d.ts +7 -0
- package/helpers/typescript/interface/for-all-interfaces.js +21 -0
- package/helpers/typescript/interface/for-all-interfaces.js.map +1 -0
- package/helpers/typescript/interface/index.d.ts +2 -0
- package/helpers/typescript/interface/index.js +6 -0
- package/helpers/typescript/interface/index.js.map +1 -0
- package/helpers/typescript/method/get-class-methods.d.ts +6 -0
- package/helpers/typescript/method/get-class-methods.js +23 -0
- package/helpers/typescript/method/get-class-methods.js.map +1 -0
- package/helpers/typescript/method/get-implemented-method.d.ts +7 -0
- package/helpers/typescript/method/get-implemented-method.js +46 -0
- package/helpers/typescript/method/get-implemented-method.js.map +1 -0
- package/helpers/typescript/method/get-interface-methods.d.ts +6 -0
- package/helpers/typescript/method/get-interface-methods.js +23 -0
- package/helpers/typescript/method/get-interface-methods.js.map +1 -0
- package/helpers/typescript/method/get-method-chain.d.ts +6 -0
- package/helpers/typescript/method/get-method-chain.js +33 -0
- package/helpers/typescript/method/get-method-chain.js.map +1 -0
- package/helpers/typescript/method/get-overridden-method.d.ts +7 -0
- package/helpers/typescript/method/get-overridden-method.js +28 -0
- package/helpers/typescript/method/get-overridden-method.js.map +1 -0
- package/helpers/typescript/method/index.d.ts +5 -0
- package/helpers/typescript/method/index.js +9 -0
- package/helpers/typescript/method/index.js.map +1 -0
- package/helpers/typescript/node/index.d.ts +1 -0
- package/helpers/typescript/node/index.js +5 -0
- package/helpers/typescript/node/index.js.map +1 -0
- package/helpers/typescript/node/sort-by-nodes-name.d.ts +6 -0
- package/helpers/typescript/node/sort-by-nodes-name.js +12 -0
- package/helpers/typescript/node/sort-by-nodes-name.js.map +1 -0
- package/helpers/typescript/property/get-class-properties.d.ts +6 -0
- package/helpers/typescript/property/get-class-properties.js +23 -0
- package/helpers/typescript/property/get-class-properties.js.map +1 -0
- package/helpers/typescript/property/get-implemented-property.d.ts +7 -0
- package/helpers/typescript/property/get-implemented-property.js +46 -0
- package/helpers/typescript/property/get-implemented-property.js.map +1 -0
- package/helpers/typescript/property/get-interface-properties.d.ts +6 -0
- package/helpers/typescript/property/get-interface-properties.js +23 -0
- package/helpers/typescript/property/get-interface-properties.js.map +1 -0
- package/helpers/typescript/property/get-overridden-property.d.ts +7 -0
- package/helpers/typescript/property/get-overridden-property.js +28 -0
- package/helpers/typescript/property/get-overridden-property.js.map +1 -0
- package/helpers/typescript/property/get-property-chain.d.ts +6 -0
- package/helpers/typescript/property/get-property-chain.js +34 -0
- package/helpers/typescript/property/get-property-chain.js.map +1 -0
- package/helpers/typescript/property/index.d.ts +5 -0
- package/helpers/typescript/property/index.js +9 -0
- package/helpers/typescript/property/index.js.map +1 -0
- package/interfaces/asset.d.ts +1 -0
- package/package.json +2 -2
- package/templates/api/class.html.nunj +22 -8
- package/templates/api/function.html.nunj +1 -1
- package/templates/api/interface.html.nunj +4 -4
- package/templates/code.html.nunj +3 -0
- package/templates/helpers/code.html.nunj +1 -1
- package/templates/helpers/constructor.html.nunj +34 -0
- package/templates/helpers/declaration-modifiers.html.nunj +5 -8
- package/templates/helpers/method.html.nunj +19 -4
- package/templates/helpers/methods.html.nunj +2 -2
- package/templates/helpers/parameters.html.nunj +2 -1
- package/templates/helpers/properties.html.nunj +19 -2
- package/templates-env/code.env.d.ts +4 -0
- package/templates-env/code.env.js +3 -0
- package/templates-env/code.env.js.map +1 -0
- package/templates-env/index.d.ts +1 -0
- package/templates-env/index.js +1 -0
- package/templates-env/index.js.map +1 -1
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getMethodChain = void 0;
|
|
4
|
+
const ts_morph_1 = require("ts-morph");
|
|
5
|
+
const class_1 = require("../class");
|
|
6
|
+
const for_all_interfaces_1 = require("../interface/for-all-interfaces");
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
* @param method
|
|
10
|
+
*/
|
|
11
|
+
function getMethodChain(method) {
|
|
12
|
+
const parent = method.getParent();
|
|
13
|
+
const methods = [];
|
|
14
|
+
if (ts_morph_1.Node.isClassDeclaration(parent)) {
|
|
15
|
+
(0, class_1.forAllClasses)(parent, (cls) => {
|
|
16
|
+
const mtd = cls.getMethod(method.getName());
|
|
17
|
+
if (mtd) {
|
|
18
|
+
methods.push(mtd);
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
if (ts_morph_1.Node.isInterfaceDeclaration(parent)) {
|
|
23
|
+
(0, for_all_interfaces_1.forAllInterfaces)(parent, (int) => {
|
|
24
|
+
const mtd = int.getMethod(method.getName());
|
|
25
|
+
if (mtd) {
|
|
26
|
+
methods.push(mtd);
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
return methods;
|
|
31
|
+
}
|
|
32
|
+
exports.getMethodChain = getMethodChain;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getOverriddenMethod = void 0;
|
|
4
|
+
const ts_morph_1 = require("ts-morph");
|
|
5
|
+
const class_1 = require("../class");
|
|
6
|
+
const interface_1 = require("../interface");
|
|
7
|
+
/**
|
|
8
|
+
* Returns method that was overridden by the provided one
|
|
9
|
+
*
|
|
10
|
+
* @param method - Target method
|
|
11
|
+
*/
|
|
12
|
+
function getOverriddenMethod(method) {
|
|
13
|
+
const parent = method.getParent();
|
|
14
|
+
const name = method.getName();
|
|
15
|
+
if (ts_morph_1.Node.isClassDeclaration(parent)) {
|
|
16
|
+
return (0, class_1.findBaseClass)(parent, (cls) => {
|
|
17
|
+
const mtd = cls.getMethod(name);
|
|
18
|
+
return !!mtd && !mtd.isAbstract();
|
|
19
|
+
})?.getMethod(name);
|
|
20
|
+
}
|
|
21
|
+
if (ts_morph_1.Node.isInterfaceDeclaration(parent)) {
|
|
22
|
+
return (0, interface_1.findInterface)(parent, (int) => int !== parent && !!int.getMethod(name))?.getMethod(name);
|
|
23
|
+
}
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
26
|
+
exports.getOverriddenMethod = getOverriddenMethod;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./get-class-methods"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./get-implemented-method"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./get-interface-methods"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./get-method-chain"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./get-overridden-method"), exports);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sortByNodesName = void 0;
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* @param nodes
|
|
7
|
+
*/
|
|
8
|
+
function sortByNodesName(nodes) {
|
|
9
|
+
return nodes.sort((a, b) => (a.getName() ?? '').localeCompare(b.getName() ?? ''));
|
|
10
|
+
}
|
|
11
|
+
exports.sortByNodesName = sortByNodesName;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getClassProperties = void 0;
|
|
4
|
+
const core_1 = require("@ng-doc/core");
|
|
5
|
+
const class_1 = require("../class");
|
|
6
|
+
/**
|
|
7
|
+
*
|
|
8
|
+
* @param cls
|
|
9
|
+
*/
|
|
10
|
+
function getClassProperties(cls) {
|
|
11
|
+
const properties = new Map();
|
|
12
|
+
(0, class_1.forAllClasses)(cls, (baseClass) => {
|
|
13
|
+
baseClass.getProperties().forEach((property) => {
|
|
14
|
+
const name = property.getName();
|
|
15
|
+
if (!properties.get(name) && (!property.isAbstract() || (property.isAbstract() && cls === baseClass))) {
|
|
16
|
+
properties.set(name, property);
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
return (0, core_1.asArray)(properties.values());
|
|
21
|
+
}
|
|
22
|
+
exports.getClassProperties = getClassProperties;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getImplementedProperty = void 0;
|
|
4
|
+
const core_1 = require("@ng-doc/core");
|
|
5
|
+
const ts_morph_1 = require("ts-morph");
|
|
6
|
+
const class_1 = require("../class");
|
|
7
|
+
const find_interface_1 = require("../interface/find-interface");
|
|
8
|
+
/**
|
|
9
|
+
* Returns property that was implemented by the provided one
|
|
10
|
+
*
|
|
11
|
+
* @param property - Target property
|
|
12
|
+
*/
|
|
13
|
+
function getImplementedProperty(property) {
|
|
14
|
+
const parent = property.getParent();
|
|
15
|
+
const name = property.getName();
|
|
16
|
+
if (ts_morph_1.Node.isClassDeclaration(parent)) {
|
|
17
|
+
const prop = (0, class_1.findBaseClass)(parent, (cls) => !!cls.getProperty(name))?.getProperty(name);
|
|
18
|
+
if (prop?.isAbstract) {
|
|
19
|
+
return prop;
|
|
20
|
+
}
|
|
21
|
+
const nodes = parent
|
|
22
|
+
.getImplements()
|
|
23
|
+
.map((expr) => expr.getType().getSymbol()?.getDeclarations()[0])
|
|
24
|
+
.filter(core_1.isPresent)
|
|
25
|
+
// Reverse implements because the latest one overrides previous one
|
|
26
|
+
.reverse();
|
|
27
|
+
for (const node of nodes) {
|
|
28
|
+
if (ts_morph_1.Node.isClassDeclaration(node)) {
|
|
29
|
+
const prop = (0, class_1.findClass)(node, (cls) => !!cls.getProperty(name))?.getProperty(name);
|
|
30
|
+
if (prop?.isAbstract) {
|
|
31
|
+
return prop;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
if (ts_morph_1.Node.isInterfaceDeclaration(node)) {
|
|
35
|
+
const prop = (0, find_interface_1.findInterface)(node, (int) => !!int.getProperty(name))?.getProperty(name);
|
|
36
|
+
if (prop) {
|
|
37
|
+
return prop;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return undefined;
|
|
43
|
+
}
|
|
44
|
+
exports.getImplementedProperty = getImplementedProperty;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getInterfaceProperties = void 0;
|
|
4
|
+
const core_1 = require("@ng-doc/core");
|
|
5
|
+
const interface_1 = require("../interface");
|
|
6
|
+
/**
|
|
7
|
+
*
|
|
8
|
+
* @param int
|
|
9
|
+
*/
|
|
10
|
+
function getInterfaceProperties(int) {
|
|
11
|
+
const properties = new Map();
|
|
12
|
+
(0, interface_1.forAllInterfaces)(int, (i) => {
|
|
13
|
+
i.getProperties().forEach((property) => {
|
|
14
|
+
const name = property.getName();
|
|
15
|
+
if (!properties.get(name)) {
|
|
16
|
+
properties.set(name, property);
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
return (0, core_1.asArray)(properties.values());
|
|
21
|
+
}
|
|
22
|
+
exports.getInterfaceProperties = getInterfaceProperties;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getOverriddenProperty = void 0;
|
|
4
|
+
const ts_morph_1 = require("ts-morph");
|
|
5
|
+
const class_1 = require("../class");
|
|
6
|
+
const interface_1 = require("../interface");
|
|
7
|
+
/**
|
|
8
|
+
* Returns property that was overridden by the provided one
|
|
9
|
+
*
|
|
10
|
+
* @param property - Target method
|
|
11
|
+
*/
|
|
12
|
+
function getOverriddenProperty(property) {
|
|
13
|
+
const parent = property.getParent();
|
|
14
|
+
const name = property.getName();
|
|
15
|
+
if (ts_morph_1.Node.isClassDeclaration(parent)) {
|
|
16
|
+
return (0, class_1.findBaseClass)(parent, (cls) => {
|
|
17
|
+
const prop = cls.getProperty(name);
|
|
18
|
+
return !!prop && !prop.isAbstract();
|
|
19
|
+
})?.getProperty(name);
|
|
20
|
+
}
|
|
21
|
+
if (ts_morph_1.Node.isInterfaceDeclaration(parent)) {
|
|
22
|
+
return (0, interface_1.findInterface)(parent, (int) => int !== parent && !!int.getProperty(name))?.getProperty(name);
|
|
23
|
+
}
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
26
|
+
exports.getOverriddenProperty = getOverriddenProperty;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getPropertyChain = void 0;
|
|
4
|
+
const ts_morph_1 = require("ts-morph");
|
|
5
|
+
const class_1 = require("../class");
|
|
6
|
+
const interface_1 = require("../interface");
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
* @param property
|
|
10
|
+
*/
|
|
11
|
+
function getPropertyChain(property) {
|
|
12
|
+
const parent = property.getParent();
|
|
13
|
+
const name = property.getName();
|
|
14
|
+
const properties = [];
|
|
15
|
+
if (ts_morph_1.Node.isClassDeclaration(parent)) {
|
|
16
|
+
(0, class_1.forAllClasses)(parent, (cls) => {
|
|
17
|
+
const prop = cls.getProperty(name);
|
|
18
|
+
if (prop) {
|
|
19
|
+
properties.push(prop);
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
if (ts_morph_1.Node.isInterfaceDeclaration(parent)) {
|
|
24
|
+
(0, interface_1.forAllInterfaces)(parent, (int) => {
|
|
25
|
+
const prop = int.getProperty(name);
|
|
26
|
+
if (prop) {
|
|
27
|
+
properties.push(prop);
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
return properties;
|
|
32
|
+
}
|
|
33
|
+
exports.getPropertyChain = getPropertyChain;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./get-class-properties"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./get-implemented-property"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./get-interface-properties"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./get-overridden-property"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./get-property-chain"), exports);
|
|
@@ -9,9 +9,8 @@ const ts_morph_1 = require("ts-morph");
|
|
|
9
9
|
* @returns {string} Property assignment
|
|
10
10
|
*/
|
|
11
11
|
function getPropertyAssignment(objectLiteralElementLike) {
|
|
12
|
-
var _a, _b;
|
|
13
12
|
return ts_morph_1.Node.isPropertyAssignment(objectLiteralElementLike)
|
|
14
|
-
?
|
|
13
|
+
? objectLiteralElementLike?.getInitializer()?.getText() ?? ''
|
|
15
14
|
: '';
|
|
16
15
|
}
|
|
17
16
|
exports.getPropertyAssignment = getPropertyAssignment;
|
|
@@ -12,7 +12,7 @@ function build(options) {
|
|
|
12
12
|
return (host) => {
|
|
13
13
|
return (0, schematics_1.chain)([
|
|
14
14
|
(0, schematics_1.mergeWith)((0, schematics_1.apply)((0, schematics_1.url)('./files'), [
|
|
15
|
-
(0, schematics_1.applyTemplates)(
|
|
15
|
+
(0, schematics_1.applyTemplates)({ ...options }),
|
|
16
16
|
(0, schematics_1.move)(options.path),
|
|
17
17
|
(0, schematics_1.forEach)((fileEntry) => {
|
|
18
18
|
if (host.exists(fileEntry.path)) {
|
|
@@ -26,7 +26,7 @@ function build(options) {
|
|
|
26
26
|
options.constantName = `${(0, strings_1.classify)(options.title)}Category`;
|
|
27
27
|
return (0, schematics_1.chain)([
|
|
28
28
|
(0, schematics_1.mergeWith)((0, schematics_1.apply)((0, schematics_1.url)('./files'), [
|
|
29
|
-
(0, schematics_1.applyTemplates)(
|
|
29
|
+
(0, schematics_1.applyTemplates)({ ...options, categoryName: categoryConstantName, importPath: categoryImportPath }),
|
|
30
30
|
(0, schematics_1.move)(path),
|
|
31
31
|
(0, schematics_1.forEach)((fileEntry) => {
|
|
32
32
|
if (host.exists(fileEntry.path)) {
|
|
@@ -14,14 +14,13 @@ const demoTemplates = ['ng-doc.module.ts.template'];
|
|
|
14
14
|
*/
|
|
15
15
|
function build(options) {
|
|
16
16
|
return (host) => {
|
|
17
|
-
var _a;
|
|
18
17
|
const pagePath = path_1.default.join(options.path, engine_1.PAGE_NAME);
|
|
19
|
-
const pageName = (
|
|
18
|
+
const pageName = (0, utils_1.extractDefaultExportName)(pagePath) ?? 'Page';
|
|
20
19
|
return (0, schematics_1.chain)([
|
|
21
20
|
(0, schematics_1.mergeWith)((0, schematics_1.apply)((0, schematics_1.url)('./files'), [
|
|
22
21
|
(0, schematics_1.filter)((path) => (demoTemplates.includes((0, path_1.basename)(path)) && options.module) ||
|
|
23
22
|
!demoTemplates.includes((0, path_1.basename)(path))),
|
|
24
|
-
(0, schematics_1.applyTemplates)(
|
|
23
|
+
(0, schematics_1.applyTemplates)({ ...options, pageName }),
|
|
25
24
|
(0, schematics_1.move)(options.path),
|
|
26
25
|
(0, schematics_1.forEach)((fileEntry) => {
|
|
27
26
|
if (host.exists(fileEntry.path)) {
|
|
@@ -29,7 +29,13 @@ function build(options) {
|
|
|
29
29
|
(0, schematics_1.mergeWith)((0, schematics_1.apply)((0, schematics_1.url)('./files'), [
|
|
30
30
|
(0, schematics_1.filter)((path) => (demoTemplates.includes((0, path_1.basename)(path)) && options.demo) ||
|
|
31
31
|
!demoTemplates.includes((0, path_1.basename)(path))),
|
|
32
|
-
(0, schematics_1.applyTemplates)(
|
|
32
|
+
(0, schematics_1.applyTemplates)({
|
|
33
|
+
...options,
|
|
34
|
+
categoryName: categoryConstantName,
|
|
35
|
+
importPath: categoryImportPath,
|
|
36
|
+
pageName,
|
|
37
|
+
keyword: options.keyword,
|
|
38
|
+
}),
|
|
33
39
|
(0, schematics_1.move)(path),
|
|
34
40
|
(0, schematics_1.forEach)((fileEntry) => {
|
|
35
41
|
if (host.exists(fileEntry.path)) {
|
|
@@ -7,6 +7,7 @@ tslib_1.__exportStar(require("./api-page.env"), exports);
|
|
|
7
7
|
tslib_1.__exportStar(require("./api-page.module.env"), exports);
|
|
8
8
|
tslib_1.__exportStar(require("./api-scope.module.env"), exports);
|
|
9
9
|
tslib_1.__exportStar(require("./category.module.env"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./code.env"), exports);
|
|
10
11
|
tslib_1.__exportStar(require("./component-assets.env"), exports);
|
|
11
12
|
tslib_1.__exportStar(require("./context.env"), exports);
|
|
12
13
|
tslib_1.__exportStar(require("./page.env"), exports);
|
|
@@ -6,8 +6,9 @@ exports.kebabCase = void 0;
|
|
|
6
6
|
* @param str
|
|
7
7
|
*/
|
|
8
8
|
function kebabCase(str) {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
return (str
|
|
10
|
+
.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g)
|
|
11
|
+
?.map((part) => part.toLowerCase())
|
|
12
|
+
?.join('-') ?? '');
|
|
12
13
|
}
|
|
13
14
|
exports.kebabCase = kebabCase;
|
|
@@ -20,31 +20,28 @@ let NgDocComboboxHostComponent = NgDocComboboxHostComponent_1 = class NgDocCombo
|
|
|
20
20
|
this.positions = ['bottom-center', 'top-center'];
|
|
21
21
|
}
|
|
22
22
|
ngAfterContentInit() {
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
this.inputControl?.valueChange
|
|
24
|
+
.pipe((0, operators_1.filter)(() => !!this.inputControl?.isFocused), (0, until_destroy_1.untilDestroyed)(this), (0, observables_1.ngDocZoneOptimize)(this.ngZone))
|
|
25
|
+
.subscribe(() => this.dropdown?.open());
|
|
25
26
|
this.typedControlChange(flex_controls_1.FlControlSelector)
|
|
26
27
|
.pipe((0, until_destroy_1.untilDestroyed)(this))
|
|
27
|
-
.subscribe(() =>
|
|
28
|
+
.subscribe(() => this.dropdown?.close());
|
|
28
29
|
}
|
|
29
30
|
get listHostOrigin() {
|
|
30
|
-
|
|
31
|
-
return (_a = this.inputControl) === null || _a === void 0 ? void 0 : _a.elementRef;
|
|
31
|
+
return this.inputControl?.elementRef;
|
|
32
32
|
}
|
|
33
33
|
get searchText() {
|
|
34
|
-
|
|
35
|
-
return this.hasValue ? '' : ((_a = this.inputControl) === null || _a === void 0 ? void 0 : _a.value) || '';
|
|
34
|
+
return this.hasValue ? '' : this.inputControl?.value || '';
|
|
36
35
|
}
|
|
37
36
|
get width() {
|
|
38
|
-
|
|
39
|
-
return ((_a = this.origin) === null || _a === void 0 ? void 0 : _a.nativeElement.offsetWidth) || 0;
|
|
37
|
+
return this.origin?.nativeElement.offsetWidth || 0;
|
|
40
38
|
}
|
|
41
39
|
get panelClass() {
|
|
42
40
|
return `ng-doc-combobox-host-overlay`;
|
|
43
41
|
}
|
|
44
42
|
clickEvent() {
|
|
45
|
-
var _a;
|
|
46
43
|
if (!this.disabled) {
|
|
47
|
-
|
|
44
|
+
this.dropdown?.open();
|
|
48
45
|
}
|
|
49
46
|
}
|
|
50
47
|
};
|
|
@@ -14,20 +14,17 @@ let NgDocClearControlComponent = class NgDocClearControlComponent extends flex_c
|
|
|
14
14
|
this.inputHost = inputHost;
|
|
15
15
|
}
|
|
16
16
|
ngAfterContentInit() {
|
|
17
|
-
|
|
18
|
-
if ((_a = this.inputHost) === null || _a === void 0 ? void 0 : _a.inputControl) {
|
|
17
|
+
if (this.inputHost?.inputControl) {
|
|
19
18
|
this.inputHost.inputControl.valueChange
|
|
20
19
|
.pipe((0, until_destroy_1.untilDestroyed)(this))
|
|
21
20
|
.subscribe(() => this.changeDetectorRef.detectChanges());
|
|
22
21
|
}
|
|
23
22
|
}
|
|
24
23
|
get isVisible() {
|
|
25
|
-
|
|
26
|
-
return ((_b = (_a = this.inputHost) === null || _a === void 0 ? void 0 : _a.inputControl) === null || _b === void 0 ? void 0 : _b.hasValue) || this.hasValue;
|
|
24
|
+
return this.inputHost?.inputControl?.hasValue || this.hasValue;
|
|
27
25
|
}
|
|
28
26
|
clear() {
|
|
29
|
-
|
|
30
|
-
(_b = (_a = this.inputHost) === null || _a === void 0 ? void 0 : _a.inputControl) === null || _b === void 0 ? void 0 : _b.writeValueFromHost(null);
|
|
27
|
+
this.inputHost?.inputControl?.writeValueFromHost(null);
|
|
31
28
|
this.updateModel(null);
|
|
32
29
|
}
|
|
33
30
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
@@ -67,30 +67,35 @@ let NgDocDropdownComponent = class NgDocDropdownComponent {
|
|
|
67
67
|
return this.isOpened ? 0 : -1;
|
|
68
68
|
}
|
|
69
69
|
focus() {
|
|
70
|
-
|
|
71
|
-
(_a = this.overlay) === null || _a === void 0 ? void 0 : _a.focus();
|
|
70
|
+
this.overlay?.focus();
|
|
72
71
|
}
|
|
73
72
|
get isFocused() {
|
|
74
|
-
|
|
75
|
-
return !!((_a = this.overlay) === null || _a === void 0 ? void 0 : _a.isFocused);
|
|
73
|
+
return !!this.overlay?.isFocused;
|
|
76
74
|
}
|
|
77
75
|
open() {
|
|
78
|
-
|
|
79
|
-
if (!((_a = this.overlay) === null || _a === void 0 ? void 0 : _a.hasAttached)) {
|
|
76
|
+
if (!this.overlay?.hasAttached) {
|
|
80
77
|
const config = this.getConfig();
|
|
81
78
|
this.overlay = this.overlayService.open(this.content, config);
|
|
82
79
|
this.beforeOpen.emit();
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
80
|
+
this.overlay
|
|
81
|
+
?.afterOpen()
|
|
82
|
+
.pipe((0, observables_1.ngDocZoneDetach)(this.ngZone))
|
|
83
|
+
.subscribe(() => this.afterOpen.emit());
|
|
84
|
+
this.overlay
|
|
85
|
+
?.beforeClose()
|
|
86
|
+
.pipe((0, observables_1.ngDocZoneDetach)(this.ngZone))
|
|
87
|
+
.subscribe(() => this.beforeClose.emit());
|
|
88
|
+
this.overlay
|
|
89
|
+
?.afterClose()
|
|
90
|
+
.pipe((0, observables_1.ngDocZoneDetach)(this.ngZone))
|
|
91
|
+
.subscribe(() => this.afterClose.emit());
|
|
86
92
|
this.overlay.beforeClose().subscribe(() => this.close());
|
|
87
93
|
this.changeDetectorRef.markForCheck();
|
|
88
94
|
}
|
|
89
95
|
}
|
|
90
96
|
close() {
|
|
91
|
-
var _a;
|
|
92
97
|
if (this.isOpened) {
|
|
93
|
-
|
|
98
|
+
this.overlay?.close();
|
|
94
99
|
this.changeDetectorRef.markForCheck();
|
|
95
100
|
}
|
|
96
101
|
}
|
|
@@ -98,8 +103,7 @@ let NgDocDropdownComponent = class NgDocDropdownComponent {
|
|
|
98
103
|
this.isOpened ? this.close() : this.open();
|
|
99
104
|
}
|
|
100
105
|
get isOpened() {
|
|
101
|
-
|
|
102
|
-
return ((_a = this.overlay) === null || _a === void 0 ? void 0 : _a.isOpened) === true;
|
|
106
|
+
return this.overlay?.isOpened === true;
|
|
103
107
|
}
|
|
104
108
|
updateOverlayPosition() {
|
|
105
109
|
if (this.overlay && this.overlay.hasAttached) {
|
|
@@ -108,10 +112,9 @@ let NgDocDropdownComponent = class NgDocDropdownComponent {
|
|
|
108
112
|
}
|
|
109
113
|
}
|
|
110
114
|
get currentOrigin() {
|
|
111
|
-
var _a;
|
|
112
115
|
return this.origin instanceof overlay_1.CdkOverlayOrigin
|
|
113
116
|
? this.origin.elementRef.nativeElement
|
|
114
|
-
: this.origin ||
|
|
117
|
+
: this.origin || this.overlayHost?.origin || null;
|
|
115
118
|
}
|
|
116
119
|
getPositions(positions, border) {
|
|
117
120
|
const origin = (0, helpers_1.toElement)(this.currentOrigin);
|
|
@@ -127,12 +130,19 @@ let NgDocDropdownComponent = class NgDocDropdownComponent {
|
|
|
127
130
|
}
|
|
128
131
|
}
|
|
129
132
|
getConfig() {
|
|
130
|
-
var _a;
|
|
131
133
|
const overlayProperties = (0, helpers_1.mergeOverlayConfigs)(this.overlayProperties, this.getOverlayProperties(), this.overlayHost);
|
|
132
134
|
if (!this.currentOrigin) {
|
|
133
135
|
throw new Error('Origin for the dropdown was not provided.');
|
|
134
136
|
}
|
|
135
|
-
return
|
|
137
|
+
return {
|
|
138
|
+
overlayContainer: overlay_container_1.NgDocOverlayContainerComponent,
|
|
139
|
+
positionStrategy: this.overlayService.connectedPositionStrategy(this.currentOrigin, this.getPositions(overlayProperties.positions || [], overlayProperties.borderOffset || 0)),
|
|
140
|
+
scrollStrategy: this.overlayScrollStrategy,
|
|
141
|
+
viewContainerRef: this.viewContainerRef,
|
|
142
|
+
openAnimation: animations_1.dropdownOpenAnimation,
|
|
143
|
+
...overlayProperties,
|
|
144
|
+
panelClass: ['ng-doc-dropdown', ...(0, core_2.asArray)(this.panelClass), ...(0, core_2.asArray)(this.overlayHost?.panelClass)],
|
|
145
|
+
};
|
|
136
146
|
}
|
|
137
147
|
getOverlayProperties() {
|
|
138
148
|
return {
|
|
@@ -29,16 +29,13 @@ let NgDocInputWrapperComponent = NgDocInputWrapperComponent_1 = class NgDocInput
|
|
|
29
29
|
return { $implicit };
|
|
30
30
|
}
|
|
31
31
|
get disabled() {
|
|
32
|
-
|
|
33
|
-
return !!((_a = this.inputControl) === null || _a === void 0 ? void 0 : _a.disabled);
|
|
32
|
+
return !!this.inputControl?.disabled;
|
|
34
33
|
}
|
|
35
34
|
inputHasValue() {
|
|
36
|
-
|
|
37
|
-
return !!((_a = this.inputControl) === null || _a === void 0 ? void 0 : _a.hasValue);
|
|
35
|
+
return !!this.inputControl?.hasValue;
|
|
38
36
|
}
|
|
39
37
|
get blurContentIsVisible() {
|
|
40
|
-
|
|
41
|
-
return !!this.blurContent && (!((_a = this.input) === null || _a === void 0 ? void 0 : _a.isFocused) || ((_b = this.input) === null || _b === void 0 ? void 0 : _b.isReadonly));
|
|
38
|
+
return !!this.blurContent && (!this.input?.isFocused || this.input?.isReadonly);
|
|
42
39
|
}
|
|
43
40
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
44
41
|
emptyEvent() { }
|
|
@@ -13,15 +13,14 @@ const rxjs_1 = require("rxjs");
|
|
|
13
13
|
const operators_1 = require("rxjs/operators");
|
|
14
14
|
let NgDocListComponent = class NgDocListComponent {
|
|
15
15
|
constructor(elementRef, ngZone, documentRef, listHost) {
|
|
16
|
-
var _a, _b;
|
|
17
16
|
this.elementRef = elementRef;
|
|
18
17
|
this.ngZone = ngZone;
|
|
19
18
|
this.documentRef = documentRef;
|
|
20
19
|
this.listHost = listHost;
|
|
21
20
|
this.keyManager = null;
|
|
22
21
|
this.items = new Set();
|
|
23
|
-
const origin =
|
|
24
|
-
? (0, helpers_1.toElement)(
|
|
22
|
+
const origin = this.listHost?.listHostOrigin
|
|
23
|
+
? (0, helpers_1.toElement)(this.listHost?.listHostOrigin)
|
|
25
24
|
: null;
|
|
26
25
|
const list = (0, helpers_1.toElement)(this.elementRef);
|
|
27
26
|
(0, rxjs_1.merge)((0, rxjs_1.fromEvent)(list, 'keydown'), origin
|
|
@@ -29,23 +28,21 @@ let NgDocListComponent = class NgDocListComponent {
|
|
|
29
28
|
: rxjs_1.NEVER)
|
|
30
29
|
.pipe((0, operators_1.filter)((event) => !event.defaultPrevented), (0, until_destroy_1.untilDestroyed)(this))
|
|
31
30
|
.subscribe((event) => {
|
|
32
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
33
31
|
const typedEvent = event;
|
|
34
32
|
switch (typedEvent.key) {
|
|
35
33
|
case 'Enter':
|
|
36
|
-
|
|
34
|
+
this.keyManager?.activeItem?.selectByUser();
|
|
37
35
|
typedEvent.preventDefault();
|
|
38
36
|
break;
|
|
39
37
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
this.keyManager?.activeItem?.setInactiveStyles();
|
|
39
|
+
this.keyManager?.onKeydown(typedEvent);
|
|
40
|
+
this.keyManager?.activeItem?.setActiveStyles();
|
|
43
41
|
});
|
|
44
42
|
}
|
|
45
43
|
registerItem(item) {
|
|
46
|
-
var _a, _b;
|
|
47
44
|
this.items.add(item);
|
|
48
|
-
|
|
45
|
+
this.keyManager?.activeItem?.setInactiveStyles();
|
|
49
46
|
this.keyManager = new a11y_1.ListKeyManager((0, core_2.asArray)(this.items)).withVerticalOrientation(true);
|
|
50
47
|
}
|
|
51
48
|
unregisterItem(item) {
|
|
@@ -9,14 +9,13 @@ const list_1 = require("@ng-doc/ui-kit/components/list");
|
|
|
9
9
|
const flex_controls_1 = require("flex-controls");
|
|
10
10
|
let NgDocOptionComponent = NgDocOptionComponent_1 = class NgDocOptionComponent extends flex_controls_1.FlControlSelector {
|
|
11
11
|
constructor(changeDetectorRef, list, compareHost, host) {
|
|
12
|
-
var _a;
|
|
13
12
|
super(compareHost, host);
|
|
14
13
|
this.changeDetectorRef = changeDetectorRef;
|
|
15
14
|
this.list = list;
|
|
16
15
|
this.compareHost = compareHost;
|
|
17
16
|
this.host = host;
|
|
18
17
|
this.hovered = false;
|
|
19
|
-
|
|
18
|
+
this.list?.registerItem(this);
|
|
20
19
|
}
|
|
21
20
|
clickEvent() {
|
|
22
21
|
this.select();
|
|
@@ -33,9 +32,8 @@ let NgDocOptionComponent = NgDocOptionComponent_1 = class NgDocOptionComponent e
|
|
|
33
32
|
this.changeDetectorRef.markForCheck();
|
|
34
33
|
}
|
|
35
34
|
ngOnDestroy() {
|
|
36
|
-
var _a;
|
|
37
35
|
super.ngOnDestroy();
|
|
38
|
-
|
|
36
|
+
this.list?.unregisterItem(this);
|
|
39
37
|
}
|
|
40
38
|
};
|
|
41
39
|
tslib_1.__decorate([
|