@koobiq/components 18.21.0 → 18.22.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/badge/badge.component.d.ts +0 -1
- package/breadcrumbs/breadcrumbs.d.ts +19 -22
- package/breadcrumbs/breadcrumbs.scss +13 -4
- package/breadcrumbs/breadcrumbs.types.d.ts +22 -0
- package/breadcrumbs/public-api.d.ts +1 -0
- package/button/button.component.d.ts +11 -16
- package/checkbox/checkbox.d.ts +13 -18
- package/core/common-behaviors/color.d.ts +11 -0
- package/core/common-behaviors/index.d.ts +1 -1
- package/core/option/action.d.ts +5 -7
- package/core/option/optgroup.d.ts +6 -7
- package/core/pop-up/pop-up-trigger.d.ts +2 -2
- package/core/pop-up/pop-up.d.ts +8 -2
- package/core/selection/pseudo-checkbox/pseudo-checkbox.d.ts +3 -12
- package/core/utils/utils.d.ts +3 -0
- package/dropdown/dropdown-item.component.d.ts +6 -8
- package/empty-state/_empty-state-theme.scss +15 -5
- package/empty-state/empty-state-tokens.scss +12 -2
- package/empty-state/empty-state.component.d.ts +7 -2
- package/empty-state/empty-state.scss +29 -0
- package/esm2022/accordion/accordion-trigger.component.mjs +1 -1
- package/esm2022/actions-panel/actions-panel-container.mjs +2 -2
- package/esm2022/badge/badge.component.mjs +2 -5
- package/esm2022/breadcrumbs/breadcrumbs.mjs +55 -22
- package/esm2022/breadcrumbs/breadcrumbs.types.mjs +2 -0
- package/esm2022/breadcrumbs/public-api.mjs +2 -1
- package/esm2022/button/button.component.mjs +23 -27
- package/esm2022/button-toggle/button-toggle.component.mjs +4 -3
- package/esm2022/checkbox/checkbox.mjs +23 -24
- package/esm2022/code-block/code-block.mjs +2 -2
- package/esm2022/core/common-behaviors/color.mjs +35 -1
- package/esm2022/core/common-behaviors/disabled.mjs +2 -1
- package/esm2022/core/common-behaviors/error-state.mjs +2 -1
- package/esm2022/core/common-behaviors/index.mjs +2 -2
- package/esm2022/core/common-behaviors/tabindex.mjs +2 -1
- package/esm2022/core/option/action.mjs +17 -12
- package/esm2022/core/option/optgroup.mjs +18 -12
- package/esm2022/core/option/option.mjs +1 -1
- package/esm2022/core/pop-up/pop-up-trigger.mjs +7 -7
- package/esm2022/core/pop-up/pop-up.mjs +21 -5
- package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +10 -19
- package/esm2022/core/utils/utils.mjs +7 -1
- package/esm2022/core/version.mjs +2 -2
- package/esm2022/datepicker/calendar-header.component.mjs +1 -1
- package/esm2022/datepicker/datepicker-toggle.component.mjs +1 -1
- package/esm2022/dropdown/dropdown-item.component.mjs +19 -14
- package/esm2022/empty-state/empty-state.component.mjs +13 -8
- package/esm2022/file-upload/multiple-file-upload.component.mjs +2 -2
- package/esm2022/file-upload/single-file-upload.component.mjs +2 -2
- package/esm2022/filter-bar/filter-refresher.mjs +2 -2
- package/esm2022/filter-bar/filter-reset.mjs +1 -1
- package/esm2022/filter-bar/filter-search.mjs +2 -2
- package/esm2022/filter-bar/filters.mjs +2 -2
- package/esm2022/filter-bar/pipe-add.mjs +2 -2
- package/esm2022/filter-bar/pipes/pipe-button.mjs +2 -2
- package/esm2022/filter-bar/pipes/pipe-date.mjs +2 -2
- package/esm2022/filter-bar/pipes/pipe-datetime.mjs +2 -2
- package/esm2022/filter-bar/pipes/pipe-multi-select.mjs +2 -2
- package/esm2022/filter-bar/pipes/pipe-select.mjs +2 -2
- package/esm2022/filter-bar/pipes/pipe-text.mjs +2 -2
- package/esm2022/form-field/cleaner.mjs +1 -1
- package/esm2022/form-field/form-field.mjs +13 -22
- package/esm2022/form-field/hint.mjs +10 -18
- package/esm2022/form-field/password-hint.mjs +7 -7
- package/esm2022/form-field/password-toggle.mjs +1 -1
- package/esm2022/form-field/stepper.mjs +1 -1
- package/esm2022/icon/icon-button.component.mjs +13 -21
- package/esm2022/icon/icon-item.component.mjs +8 -15
- package/esm2022/icon/icon.component.mjs +15 -27
- package/esm2022/input/input-password.mjs +20 -5
- package/esm2022/input/input.mjs +21 -22
- package/esm2022/link/link.component.mjs +46 -14
- package/esm2022/list/list-selection.component.mjs +19 -15
- package/esm2022/loader-overlay/loader-overlay.component.mjs +14 -9
- package/esm2022/modal/modal.component.mjs +1 -1
- package/esm2022/modal/modal.directive.mjs +1 -1
- package/esm2022/navbar/navbar-item.component.mjs +2 -2
- package/esm2022/popover/popover-confirm.component.mjs +2 -2
- package/esm2022/popover/popover.component.mjs +5 -4
- package/esm2022/progress-bar/progress-bar.component.mjs +14 -21
- package/esm2022/progress-spinner/progress-spinner.component.mjs +17 -24
- package/esm2022/radio/radio.component.mjs +25 -35
- package/esm2022/select/select.component.mjs +56 -37
- package/esm2022/sidepanel/sidepanel-directives.mjs +2 -2
- package/esm2022/tabs/paginated-tab-header.mjs +7 -4
- package/esm2022/tabs/tab-group.component.mjs +23 -19
- package/esm2022/tabs/tab-header.component.mjs +3 -3
- package/esm2022/tabs/tab-label-wrapper.directive.mjs +16 -13
- package/esm2022/tabs/tab-nav-bar.mjs +2 -2
- package/esm2022/tabs/tab.component.mjs +17 -12
- package/esm2022/tags/tag-list.component.mjs +27 -22
- package/esm2022/tags/tag.component.mjs +7 -14
- package/esm2022/textarea/textarea.component.mjs +21 -22
- package/esm2022/timezone/timezone-select.component.mjs +3 -3
- package/esm2022/toast/toast.component.mjs +2 -2
- package/esm2022/toggle/toggle.component.mjs +20 -19
- package/esm2022/tree/toggle.mjs +19 -14
- package/esm2022/tree/tree-option.component.mjs +1 -1
- package/esm2022/tree/tree-selection.component.mjs +1 -1
- package/esm2022/tree-select/tree-select.component.mjs +58 -38
- package/fesm2022/koobiq-components-accordion.mjs +1 -1
- package/fesm2022/koobiq-components-accordion.mjs.map +1 -1
- package/fesm2022/koobiq-components-actions-panel.mjs +1 -1
- package/fesm2022/koobiq-components-actions-panel.mjs.map +1 -1
- package/fesm2022/koobiq-components-badge.mjs +2 -5
- package/fesm2022/koobiq-components-badge.mjs.map +1 -1
- package/fesm2022/koobiq-components-breadcrumbs.mjs +54 -21
- package/fesm2022/koobiq-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/koobiq-components-button-toggle.mjs +3 -3
- package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-button.mjs +23 -27
- package/fesm2022/koobiq-components-button.mjs.map +1 -1
- package/fesm2022/koobiq-components-checkbox.mjs +23 -24
- package/fesm2022/koobiq-components-checkbox.mjs.map +1 -1
- package/fesm2022/koobiq-components-code-block.mjs +1 -1
- package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
- package/fesm2022/koobiq-components-core.mjs +107 -46
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-datepicker.mjs +2 -2
- package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-dropdown.mjs +18 -13
- package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-empty-state.mjs +12 -7
- package/fesm2022/koobiq-components-empty-state.mjs.map +1 -1
- package/fesm2022/koobiq-components-file-upload.mjs +2 -2
- package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
- package/fesm2022/koobiq-components-filter-bar.mjs +11 -11
- package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-form-field.mjs +26 -43
- package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
- package/fesm2022/koobiq-components-icon.mjs +33 -57
- package/fesm2022/koobiq-components-icon.mjs.map +1 -1
- package/fesm2022/koobiq-components-input.mjs +40 -25
- package/fesm2022/koobiq-components-input.mjs.map +1 -1
- package/fesm2022/koobiq-components-link.mjs +46 -14
- package/fesm2022/koobiq-components-link.mjs.map +1 -1
- package/fesm2022/koobiq-components-list.mjs +19 -15
- package/fesm2022/koobiq-components-list.mjs.map +1 -1
- package/fesm2022/koobiq-components-loader-overlay.mjs +13 -8
- package/fesm2022/koobiq-components-loader-overlay.mjs.map +1 -1
- package/fesm2022/koobiq-components-modal.mjs +2 -2
- package/fesm2022/koobiq-components-modal.mjs.map +1 -1
- package/fesm2022/koobiq-components-navbar.mjs +2 -2
- package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-popover.mjs +5 -4
- package/fesm2022/koobiq-components-popover.mjs.map +1 -1
- package/fesm2022/koobiq-components-progress-bar.mjs +13 -20
- package/fesm2022/koobiq-components-progress-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-progress-spinner.mjs +16 -23
- package/fesm2022/koobiq-components-progress-spinner.mjs.map +1 -1
- package/fesm2022/koobiq-components-radio.mjs +25 -35
- package/fesm2022/koobiq-components-radio.mjs.map +1 -1
- package/fesm2022/koobiq-components-select.mjs +56 -37
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidepanel.mjs +1 -1
- package/fesm2022/koobiq-components-sidepanel.mjs.map +1 -1
- package/fesm2022/koobiq-components-tabs.mjs +60 -44
- package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
- package/fesm2022/koobiq-components-tags.mjs +32 -34
- package/fesm2022/koobiq-components-tags.mjs.map +1 -1
- package/fesm2022/koobiq-components-textarea.mjs +21 -22
- package/fesm2022/koobiq-components-textarea.mjs.map +1 -1
- package/fesm2022/koobiq-components-timezone.mjs +2 -2
- package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
- package/fesm2022/koobiq-components-toast.mjs +1 -1
- package/fesm2022/koobiq-components-toast.mjs.map +1 -1
- package/fesm2022/koobiq-components-toggle.mjs +20 -19
- package/fesm2022/koobiq-components-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree-select.mjs +57 -37
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree.mjs +21 -15
- package/fesm2022/koobiq-components-tree.mjs.map +1 -1
- package/file-upload/multiple-file-upload.component.d.ts +2 -2
- package/file-upload/single-file-upload.component.d.ts +2 -2
- package/form-field/form-field.d.ts +4 -12
- package/form-field/hint.d.ts +3 -12
- package/form-field/password-hint.d.ts +3 -3
- package/icon/icon-button.component.d.ts +5 -8
- package/icon/icon-item.component.d.ts +3 -7
- package/icon/icon.component.d.ts +7 -14
- package/input/input-password.d.ts +8 -2
- package/input/input.d.ts +9 -18
- package/link/_link-theme.scss +17 -8
- package/link/link.component.d.ts +13 -9
- package/list/list-selection.component.d.ts +8 -10
- package/loader-overlay/_loader-overlay-theme.scss +18 -8
- package/loader-overlay/loader-overlay-tokens.scss +6 -3
- package/loader-overlay/loader-overlay.component.d.ts +7 -2
- package/loader-overlay/loader-overlay.scss +19 -5
- package/package.json +4 -4
- package/prebuilt-themes/dark-theme.css +1 -1
- package/prebuilt-themes/light-theme.css +1 -1
- package/prebuilt-themes/theme.css +1 -1
- package/progress-bar/progress-bar.component.d.ts +4 -12
- package/progress-spinner/progress-spinner.component.d.ts +4 -12
- package/radio/radio.component.d.ts +11 -25
- package/schematics/collection.json +10 -0
- package/schematics/migrations/css-selectors/README.md +19 -0
- package/schematics/migrations/deprecated-icons/README.md +21 -0
- package/schematics/migrations/empty-state-size-attr/README.md +62 -0
- package/schematics/migrations/empty-state-size-attr/index.js +74 -0
- package/schematics/migrations/empty-state-size-attr/schema.json +15 -0
- package/schematics/migrations/loader-overlay-size-attr/README.md +62 -0
- package/schematics/migrations/loader-overlay-size-attr/index.js +74 -0
- package/schematics/migrations/loader-overlay-size-attr/schema.json +15 -0
- package/schematics/migrations/new-icons-pack/README.md +21 -0
- package/schematics/ng-add/index.js +2 -2
- package/schematics/utils/angular-parsing.js +153 -0
- package/schematics/utils/ast.js +28 -0
- package/schematics/utils/package-config.js +46 -0
- package/schematics/utils/typescript.js +171 -0
- package/select/select.component.d.ts +26 -25
- package/tabs/paginated-tab-header.d.ts +2 -1
- package/tabs/tab-group.component.d.ts +11 -13
- package/tabs/tab-header.component.d.ts +1 -1
- package/tabs/tab-label-wrapper.directive.d.ts +6 -8
- package/tabs/tab.component.d.ts +7 -8
- package/tags/tag-list.component.d.ts +15 -18
- package/tags/tag.component.d.ts +3 -10
- package/textarea/textarea.component.d.ts +8 -17
- package/toggle/toggle.component.d.ts +8 -12
- package/tree/toggle.d.ts +7 -9
- package/tree/tree-selection.component.d.ts +2 -2
- package/tree-select/tree-select.component.d.ts +24 -26
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/** WARNING:
|
|
4
|
+
* this is copy of https://github.com/angular/angular/blob/main/packages/compiler/src/ml_parser/ast.ts
|
|
5
|
+
* since @angular/compiler and @angular-devkit/schematics
|
|
6
|
+
* are not compatible with each other */
|
|
7
|
+
function visitAll(visitor, nodes) {
|
|
8
|
+
const result = [];
|
|
9
|
+
const visit = visitor.visit
|
|
10
|
+
? (ast) => visitor.visit(ast) || ast.visit(visitor)
|
|
11
|
+
: (ast) => ast.visit(visitor);
|
|
12
|
+
nodes.forEach((ast) => {
|
|
13
|
+
visit(ast);
|
|
14
|
+
});
|
|
15
|
+
return result;
|
|
16
|
+
}
|
|
17
|
+
// attr can be naked or in [ ]
|
|
18
|
+
// attr.value can be {{ value }} , 'value'
|
|
19
|
+
function getSimpleAttributeName(attrName) {
|
|
20
|
+
return attrName.replace(/[\[\]]/g, '');
|
|
21
|
+
}
|
|
22
|
+
function getSimpleAttributeValue(attrValue) {
|
|
23
|
+
return attrValue.replace(/[{}']/g, '');
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
exports.getSimpleAttributeName = getSimpleAttributeName;
|
|
27
|
+
exports.getSimpleAttributeValue = getSimpleAttributeValue;
|
|
28
|
+
exports.visitAll = visitAll;
|
|
@@ -56,7 +56,53 @@ async function setupOptions(project, tree) {
|
|
|
56
56
|
return projectWorkspace;
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
+
async function getParsingInfo(project, tree) {
|
|
60
|
+
const tsPaths = new Set();
|
|
61
|
+
const templatePaths = new Set();
|
|
62
|
+
const projectDefinition = await setupOptions(project, tree);
|
|
63
|
+
if (!projectDefinition) {
|
|
64
|
+
throw new schematics.SchematicsException(utils_messages.noProject('no project'));
|
|
65
|
+
}
|
|
66
|
+
tree.getDir(projectDefinition.root).visit((filePath) => {
|
|
67
|
+
if (filePath.endsWith('.ts')) {
|
|
68
|
+
tsPaths.add(filePath);
|
|
69
|
+
}
|
|
70
|
+
if (filePath.endsWith('.html')) {
|
|
71
|
+
templatePaths.add(filePath);
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
return { tsPaths, templatePaths, projectDefinition };
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* WARNING: do not change directly, since it's a copy of
|
|
78
|
+
* https://github.com/angular/angular/blob/6fa8d441979fdbabb88dddd246f54587e17126e8/packages/core/schematics/utils/load_esm.ts
|
|
79
|
+
*
|
|
80
|
+
* This uses a dynamic import to load a module which may be ESM.
|
|
81
|
+
* CommonJS code can load ESM code via a dynamic import. Unfortunately, TypeScript
|
|
82
|
+
* will currently, unconditionally downlevel dynamic import into a require call.
|
|
83
|
+
* require calls cannot load ESM code and will result in a runtime error. To workaround
|
|
84
|
+
* this, a Function constructor is used to prevent TypeScript from changing the dynamic import.
|
|
85
|
+
* Once TypeScript provides support for keeping the dynamic import this workaround can
|
|
86
|
+
* be dropped.
|
|
87
|
+
* This is only intended to be used with Angular framework packages.
|
|
88
|
+
*
|
|
89
|
+
* @param modulePath The path of the module to load.
|
|
90
|
+
* @returns A Promise that resolves to the dynamically imported module.
|
|
91
|
+
*/
|
|
92
|
+
async function loadEsmModule(modulePath) {
|
|
93
|
+
const namespaceObject = await new Function('modulePath', `return import(modulePath);`)(modulePath);
|
|
94
|
+
// If it is not ESM then the values needed will be stored in the `default` property.
|
|
95
|
+
// TODO_ESM: This can be removed once `@angular/*` packages are ESM only.
|
|
96
|
+
if (namespaceObject.default) {
|
|
97
|
+
return namespaceObject.default;
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
return namespaceObject;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
59
103
|
|
|
60
104
|
exports.addPackageToPackageJson = addPackageToPackageJson;
|
|
61
105
|
exports.getPackageVersionFromPackageJson = getPackageVersionFromPackageJson;
|
|
106
|
+
exports.getParsingInfo = getParsingInfo;
|
|
107
|
+
exports.loadEsmModule = loadEsmModule;
|
|
62
108
|
exports.setupOptions = setupOptions;
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var ts = require('typescript');
|
|
4
|
+
var utils_ast = require('./ast.js');
|
|
5
|
+
|
|
6
|
+
const LEADING_TRIVIA_CHARS = [' ', '\n', '\r', '\t'];
|
|
7
|
+
function forEachClass(sourceFile, callback) {
|
|
8
|
+
sourceFile.forEachChild(function walk(node) {
|
|
9
|
+
if (ts.isClassDeclaration(node)) {
|
|
10
|
+
callback(node);
|
|
11
|
+
}
|
|
12
|
+
node.forEachChild(walk);
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function canMigrateFile(sourceFile, program) {
|
|
16
|
+
// We shouldn't migrate .d.ts files, files from an external library or type checking files.
|
|
17
|
+
return !(sourceFile.fileName.endsWith('.ngtypecheck.ts') ||
|
|
18
|
+
sourceFile.isDeclarationFile ||
|
|
19
|
+
program.isSourceFileFromExternalLibrary(sourceFile));
|
|
20
|
+
}
|
|
21
|
+
function updateDecoratorProperty(decorator, propertyName, newValue) {
|
|
22
|
+
if (ts.isCallExpression(decorator.expression)) {
|
|
23
|
+
const [arg] = decorator.expression.arguments;
|
|
24
|
+
if (ts.isObjectLiteralExpression(arg)) {
|
|
25
|
+
const newProperties = arg.properties.map((prop) => {
|
|
26
|
+
if (ts.isPropertyAssignment(prop) && ts.isIdentifier(prop.name) && prop.name.text === propertyName) {
|
|
27
|
+
return ts.factory.updatePropertyAssignment(prop, prop.name, ts.factory.createNoSubstitutionTemplateLiteral(newValue, newValue));
|
|
28
|
+
}
|
|
29
|
+
return prop;
|
|
30
|
+
});
|
|
31
|
+
const newArg = ts.factory.updateObjectLiteralExpression(arg, newProperties);
|
|
32
|
+
const newCall = ts.factory.updateCallExpression(decorator.expression, decorator.expression.expression, undefined, [newArg]);
|
|
33
|
+
return ts.factory.updateDecorator(decorator, newCall);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return decorator;
|
|
37
|
+
}
|
|
38
|
+
function getClassWithUpdatedDecorator(node, decorator, updatedDecorator) {
|
|
39
|
+
const nodeDecorators = ts.getDecorators(node) || [];
|
|
40
|
+
const decoratorIndex = nodeDecorators.indexOf(decorator);
|
|
41
|
+
const updatedDecorators = decoratorIndex !== -1 ? [
|
|
42
|
+
...nodeDecorators.slice(0, decoratorIndex),
|
|
43
|
+
updatedDecorator,
|
|
44
|
+
...nodeDecorators.slice(decoratorIndex + 1, nodeDecorators.length)
|
|
45
|
+
] : nodeDecorators;
|
|
46
|
+
const modifiers = node.modifiers ? node.modifiers.filter((modifier) => modifier !== decorator) : [];
|
|
47
|
+
return ts.factory.replaceDecoratorsAndModifiers(node, [...updatedDecorators, ...modifiers]);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Class that collects specific elements for migration
|
|
51
|
+
* based on matching tag names and attribute values.
|
|
52
|
+
*
|
|
53
|
+
* Used as reference:
|
|
54
|
+
* @see https://github.com/angular/angular/blob/6fa8d441979fdbabb88dddd246f54587e17126e8/packages/core/schematics/migrations/control-flow-migration/types.ts#L432
|
|
55
|
+
*/
|
|
56
|
+
class ElementCollector {
|
|
57
|
+
constructor(migrationData, filePath) {
|
|
58
|
+
this.migrationData = migrationData;
|
|
59
|
+
this.filePath = filePath;
|
|
60
|
+
this.elementsToMigrate = [];
|
|
61
|
+
}
|
|
62
|
+
visitElement(el) {
|
|
63
|
+
if (el.name === this.migrationData.elementName && el.attrs.length > 0) {
|
|
64
|
+
for (const attr of el.attrs) {
|
|
65
|
+
const cleanAttrName = utils_ast.getSimpleAttributeName(attr.name);
|
|
66
|
+
if (cleanAttrName === this.migrationData.attrs.key.from) {
|
|
67
|
+
this.elementsToMigrate.push(el);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
this.visitChildren(el);
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Recursively visits all child nodes of a given element or block.
|
|
75
|
+
*/
|
|
76
|
+
visitChildren(el) {
|
|
77
|
+
if (el.children?.length) {
|
|
78
|
+
for (const child of el.children) {
|
|
79
|
+
child.visit(this);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Handle @if, @for blocks
|
|
85
|
+
*/
|
|
86
|
+
visitBlock(block, _1) {
|
|
87
|
+
this.visitChildren(block);
|
|
88
|
+
}
|
|
89
|
+
// part of interface
|
|
90
|
+
visitAttribute(_, _1) { }
|
|
91
|
+
visitText(_, _1) { }
|
|
92
|
+
visitComment(_, _1) { }
|
|
93
|
+
visitExpansion(_, _1) { }
|
|
94
|
+
visitExpansionCase(_, _1) { }
|
|
95
|
+
visitBlockParameter(_, _1) { }
|
|
96
|
+
visitLetDeclaration(_, _1) { }
|
|
97
|
+
}
|
|
98
|
+
class AnalyzedFile {
|
|
99
|
+
constructor(sourceFile) {
|
|
100
|
+
this.ranges = [];
|
|
101
|
+
this.templateRanges = [];
|
|
102
|
+
this.sourceFile = sourceFile;
|
|
103
|
+
}
|
|
104
|
+
/** Returns the ranges in the order in which they should be migrated. */
|
|
105
|
+
getSortedRanges() {
|
|
106
|
+
// templates first for checking on whether certain imports can be safely removed
|
|
107
|
+
this.templateRanges = this.ranges
|
|
108
|
+
.slice()
|
|
109
|
+
.filter((x) => x.type === 'template' || x.type === 'templateUrl')
|
|
110
|
+
.sort((aStart, bStart) => bStart.start - aStart.start);
|
|
111
|
+
return this.templateRanges;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Adds a text range to an `AnalyzedFile`.
|
|
115
|
+
* @param path Path of the file.
|
|
116
|
+
* @param sourceFile SourceFile
|
|
117
|
+
* @param analyzedFiles Map keeping track of all the analyzed files.
|
|
118
|
+
* @param range Range to be added.
|
|
119
|
+
*/
|
|
120
|
+
static addRange(path, sourceFile, analyzedFiles, range) {
|
|
121
|
+
let analysis = analyzedFiles.get(path);
|
|
122
|
+
if (!analysis) {
|
|
123
|
+
analysis = new AnalyzedFile(sourceFile);
|
|
124
|
+
analyzedFiles.set(path, analysis);
|
|
125
|
+
}
|
|
126
|
+
const duplicate = analysis.ranges.find((current) => current.start === range.start && current.end === range.end);
|
|
127
|
+
if (!duplicate) {
|
|
128
|
+
analysis.ranges.push(range);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* parses the template string into the Html AST
|
|
134
|
+
*/
|
|
135
|
+
async function parseTemplate(template) {
|
|
136
|
+
try {
|
|
137
|
+
const { HtmlParser } = await import('@angular/compiler');
|
|
138
|
+
const parser = new HtmlParser();
|
|
139
|
+
// Note: we use the HtmlParser here, instead of the `parseTemplate` function, because the
|
|
140
|
+
// latter returns an Ivy AST, not an HTML AST. The HTML AST has the advantage of preserving
|
|
141
|
+
// interpolated text as text nodes containing a mixture of interpolation tokens and text tokens,
|
|
142
|
+
// rather than turning them into `BoundText` nodes like the Ivy AST does. This allows us to
|
|
143
|
+
// easily get the text-only ranges without having to reconstruct the original text.
|
|
144
|
+
const parsed = parser.parse(template, '', {
|
|
145
|
+
// Allows for ICUs to be parsed.
|
|
146
|
+
tokenizeExpansionForms: true,
|
|
147
|
+
// Explicitly disable blocks so that their characters are treated as plain text.
|
|
148
|
+
tokenizeBlocks: true,
|
|
149
|
+
preserveLineEndings: true,
|
|
150
|
+
leadingTriviaChars: LEADING_TRIVIA_CHARS
|
|
151
|
+
});
|
|
152
|
+
// Don't migrate invalid templates.
|
|
153
|
+
if (parsed.errors && parsed.errors.length > 0) {
|
|
154
|
+
const errors = parsed.errors.map((e) => ({ type: 'parse', error: e }));
|
|
155
|
+
return { tree: undefined, errors };
|
|
156
|
+
}
|
|
157
|
+
return { tree: parsed, errors: [] };
|
|
158
|
+
}
|
|
159
|
+
catch (e) {
|
|
160
|
+
return { tree: undefined, errors: [{ type: 'parse', error: e }] };
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
exports.AnalyzedFile = AnalyzedFile;
|
|
165
|
+
exports.ElementCollector = ElementCollector;
|
|
166
|
+
exports.LEADING_TRIVIA_CHARS = LEADING_TRIVIA_CHARS;
|
|
167
|
+
exports.canMigrateFile = canMigrateFile;
|
|
168
|
+
exports.forEachClass = forEachClass;
|
|
169
|
+
exports.getClassWithUpdatedDecorator = getClassWithUpdatedDecorator;
|
|
170
|
+
exports.parseTemplate = parseTemplate;
|
|
171
|
+
exports.updateDecoratorProperty = updateDecoratorProperty;
|
|
@@ -2,10 +2,10 @@ import { Directionality } from '@angular/cdk/bidi';
|
|
|
2
2
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
3
3
|
import { CdkConnectedOverlay, CdkOverlayOrigin, ConnectedPosition, OverlayContainer } from '@angular/cdk/overlay';
|
|
4
4
|
import { CdkVirtualForOf } from '@angular/cdk/scrolling';
|
|
5
|
-
import { AfterContentInit, AfterViewInit, ChangeDetectorRef, DoCheck, ElementRef, EventEmitter, InjectionToken, NgZone,
|
|
5
|
+
import { AfterContentInit, AfterViewInit, ChangeDetectorRef, DoCheck, ElementRef, EventEmitter, InjectionToken, NgZone, OnDestroy, OnInit, Provider, QueryList, Renderer2, TemplateRef } from '@angular/core';
|
|
6
6
|
import { ControlValueAccessor, FormGroupDirective, NgControl, NgForm } from '@angular/forms';
|
|
7
7
|
import { ActiveDescendantKeyManager } from '@koobiq/cdk/a11y';
|
|
8
|
-
import {
|
|
8
|
+
import { CanUpdateErrorState, ErrorStateMatcher, KbqAbstractSelect, KbqComponentColors, KbqLocaleService, KbqOptgroup, KbqOption, KbqOptionBase, KbqOptionSelectionChange, KbqSelectMatcher, KbqSelectSearch, KbqSelectTrigger } from '@koobiq/components/core';
|
|
9
9
|
import { KbqCleaner, KbqFormField, KbqFormFieldControl } from '@koobiq/components/form-field';
|
|
10
10
|
import { KbqTag } from '@koobiq/components/tags';
|
|
11
11
|
import { Observable, Subject } from 'rxjs';
|
|
@@ -36,30 +36,18 @@ export declare const KBQ_SELECT_OPTIONS: InjectionToken<Partial<{
|
|
|
36
36
|
}>>;
|
|
37
37
|
/** Utility provider for `KBQ_SELECT_OPTIONS`. */
|
|
38
38
|
export declare const kbqSelectOptionsProvider: (options: KbqSelectOptions) => Provider;
|
|
39
|
-
|
|
40
|
-
export declare class KbqSelectBase extends KbqAbstractSelect {
|
|
41
|
-
elementRef: ElementRef;
|
|
42
|
-
defaultErrorStateMatcher: ErrorStateMatcher;
|
|
43
|
-
parentForm: NgForm;
|
|
44
|
-
parentFormGroup: FormGroupDirective;
|
|
45
|
-
ngControl: NgControl;
|
|
46
|
-
/**
|
|
47
|
-
* Emits whenever the component state changes and should cause the parent
|
|
48
|
-
* form-field to update. Implemented as part of `KbqFormFieldControl`.
|
|
49
|
-
* @docs-private
|
|
50
|
-
*/
|
|
51
|
-
readonly stateChanges: Subject<void>;
|
|
52
|
-
constructor(elementRef: ElementRef, defaultErrorStateMatcher: ErrorStateMatcher, parentForm: NgForm, parentFormGroup: FormGroupDirective, ngControl: NgControl);
|
|
53
|
-
}
|
|
54
|
-
/** @docs-private */
|
|
55
|
-
declare const KbqSelectMixinBase: CanDisableCtor & HasTabIndexCtor & CanUpdateErrorStateCtor & typeof KbqSelectBase;
|
|
56
|
-
export declare class KbqSelect extends KbqSelectMixinBase implements AfterContentInit, AfterViewInit, OnChanges, OnDestroy, OnInit, DoCheck, ControlValueAccessor, CanDisable, HasTabIndex, KbqFormFieldControl<any>, CanUpdateErrorState {
|
|
39
|
+
export declare class KbqSelect extends KbqAbstractSelect implements AfterContentInit, AfterViewInit, OnDestroy, OnInit, DoCheck, ControlValueAccessor, KbqFormFieldControl<any>, CanUpdateErrorState {
|
|
57
40
|
private readonly _changeDetectorRef;
|
|
58
41
|
private readonly _ngZone;
|
|
59
42
|
private readonly _renderer;
|
|
43
|
+
defaultErrorStateMatcher: ErrorStateMatcher;
|
|
44
|
+
elementRef: ElementRef;
|
|
60
45
|
private overlayContainer;
|
|
61
46
|
private readonly _dir;
|
|
47
|
+
parentForm: NgForm;
|
|
48
|
+
parentFormGroup: FormGroupDirective;
|
|
62
49
|
private readonly parentFormField;
|
|
50
|
+
ngControl: NgControl;
|
|
63
51
|
private readonly scrollStrategyFactory;
|
|
64
52
|
protected localeService?: KbqLocaleService | undefined;
|
|
65
53
|
protected readonly isBrowser: boolean;
|
|
@@ -70,6 +58,14 @@ export declare class KbqSelect extends KbqSelectMixinBase implements AfterConten
|
|
|
70
58
|
*/
|
|
71
59
|
panelWidth: KbqSelectPanelWidth;
|
|
72
60
|
}> | null;
|
|
61
|
+
/** Whether the component is in an error state. */
|
|
62
|
+
errorState: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Emits whenever the component state changes and should cause the parent
|
|
65
|
+
* form-field to update. Implemented as part of `KbqFormFieldControl`.
|
|
66
|
+
* @docs-private
|
|
67
|
+
*/
|
|
68
|
+
readonly stateChanges: Subject<void>;
|
|
73
69
|
/** A name for this control that can be used by `kbq-form-field`. */
|
|
74
70
|
controlType: string;
|
|
75
71
|
hiddenItems: number;
|
|
@@ -186,8 +182,11 @@ export declare class KbqSelect extends KbqSelectMixinBase implements AfterConten
|
|
|
186
182
|
get id(): string;
|
|
187
183
|
set id(value: string);
|
|
188
184
|
private _id;
|
|
189
|
-
get
|
|
190
|
-
set
|
|
185
|
+
get tabIndex(): number;
|
|
186
|
+
set tabIndex(value: number);
|
|
187
|
+
private _tabIndex;
|
|
188
|
+
get disabled(): boolean;
|
|
189
|
+
set disabled(value: boolean);
|
|
191
190
|
private _disabled;
|
|
192
191
|
/** Whether the select is focused. */
|
|
193
192
|
get focused(): boolean;
|
|
@@ -203,6 +202,7 @@ export declare class KbqSelect extends KbqSelectMixinBase implements AfterConten
|
|
|
203
202
|
get empty(): boolean;
|
|
204
203
|
get firstSelected(): KbqOptionBase | null;
|
|
205
204
|
get firstFiltered(): boolean;
|
|
205
|
+
get colorForState(): KbqComponentColors;
|
|
206
206
|
private closeSubscription;
|
|
207
207
|
/** The scroll position of the overlay panel, calculated to center the selected option. */
|
|
208
208
|
private scrollTop;
|
|
@@ -221,8 +221,8 @@ export declare class KbqSelect extends KbqSelectMixinBase implements AfterConten
|
|
|
221
221
|
ngAfterContentInit(): void;
|
|
222
222
|
ngAfterViewInit(): void;
|
|
223
223
|
ngDoCheck(): void;
|
|
224
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
225
224
|
ngOnDestroy(): void;
|
|
225
|
+
updateErrorState(): void;
|
|
226
226
|
hiddenItemsTextFormatter(hiddenItemsText: string, hiddenItems: number): string;
|
|
227
227
|
clearValue($event: any): void;
|
|
228
228
|
/** `View -> model callback called when value changes` */
|
|
@@ -341,8 +341,9 @@ export declare class KbqSelect extends KbqSelectMixinBase implements AfterConten
|
|
|
341
341
|
private getTotalVisibleItems;
|
|
342
342
|
private buildTriggerClone;
|
|
343
343
|
static ɵfac: i0.ɵɵFactoryDeclaration<KbqSelect, [null, null, null, null, null, null, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; host: true; }, { optional: true; self: true; }, null, { optional: true; }]>;
|
|
344
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<KbqSelect, "kbq-select", ["kbqSelect"], { "
|
|
344
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KbqSelect, "kbq-select", ["kbqSelect"], { "hiddenItemsText": { "alias": "hiddenItemsText"; "required": false; }; "panelClass": { "alias": "panelClass"; "required": false; }; "backdropClass": { "alias": "backdropClass"; "required": false; }; "errorStateMatcher": { "alias": "errorStateMatcher"; "required": false; }; "sortComparator": { "alias": "sortComparator"; "required": false; }; "hasBackdrop": { "alias": "hasBackdrop"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "required": { "alias": "required"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "compareWith": { "alias": "compareWith"; "required": false; }; "panelWidth": { "alias": "panelWidth"; "required": false; }; "panelMinWidth": { "alias": "panelMinWidth"; "required": false; }; "value": { "alias": "value"; "required": false; }; "id": { "alias": "id"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "hiddenItemsTextFormatter": { "alias": "hiddenItemsTextFormatter"; "required": false; }; }, { "openedChange": "openedChange"; "openedStream": "opened"; "closedStream": "closed"; "selectionChange": "selectionChange"; "valueChange": "valueChange"; }, ["footer", "cdkVirtualForOf", "customTrigger", "customMatcher", "customTagTemplateRef", "cleaner", "search", "options", "optionGroups"], ["kbq-select-matcher, [kbq-select-matcher]", "kbq-select-trigger, [kbq-select-trigger]", "kbq-cleaner", "[kbqSelectSearch]", "[kbq-select-search-empty-result]", "*", "kbq-select-footer,[kbq-select-footer]"], false, never>;
|
|
345
345
|
static ngAcceptInputType_multiple: unknown;
|
|
346
346
|
static ngAcceptInputType_panelMinWidth: unknown;
|
|
347
|
+
static ngAcceptInputType_tabIndex: unknown;
|
|
348
|
+
static ngAcceptInputType_disabled: unknown;
|
|
347
349
|
}
|
|
348
|
-
export {};
|
|
@@ -174,7 +174,8 @@ export declare abstract class KbqPaginatedTabHeader implements AfterContentCheck
|
|
|
174
174
|
private scrollTo;
|
|
175
175
|
private updateScrollPosition;
|
|
176
176
|
static ɵfac: i0.ɵɵFactoryDeclaration<KbqPaginatedTabHeader, never>;
|
|
177
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<KbqPaginatedTabHeader, never, never, { "disablePagination": { "alias": "disablePagination"; "required": false; }; "vertical": { "alias": "vertical"; "required": false; }; }, {}, never, never, false, never>;
|
|
177
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<KbqPaginatedTabHeader, never, never, { "selectedIndex": { "alias": "selectedIndex"; "required": false; }; "disablePagination": { "alias": "disablePagination"; "required": false; }; "vertical": { "alias": "vertical"; "required": false; }; }, {}, never, never, false, never>;
|
|
178
|
+
static ngAcceptInputType_selectedIndex: unknown;
|
|
178
179
|
static ngAcceptInputType_disablePagination: unknown;
|
|
179
180
|
static ngAcceptInputType_vertical: unknown;
|
|
180
181
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { AfterContentChecked, AfterContentInit, AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, InjectionToken, OnDestroy, QueryList } from '@angular/core';
|
|
2
|
-
import { CanDisableCtor } from '@koobiq/components/core';
|
|
3
2
|
import { Subject } from 'rxjs';
|
|
4
3
|
import { KbqTabHeader } from './tab-header.component';
|
|
5
4
|
import { KbqTab } from './tab.component';
|
|
@@ -36,16 +35,11 @@ export interface KbqTabsConfig {
|
|
|
36
35
|
}
|
|
37
36
|
/** Injection token that can be used to provide the default options the tabs module. */
|
|
38
37
|
export declare const KBQ_TABS_CONFIG: InjectionToken<KbqTabsConfig>;
|
|
39
|
-
declare class KbqTabGroupBase {
|
|
40
|
-
elementRef: ElementRef;
|
|
41
|
-
constructor(elementRef: ElementRef);
|
|
42
|
-
}
|
|
43
|
-
declare const KbqTabGroupMixinBase: CanDisableCtor & typeof KbqTabGroupBase;
|
|
44
38
|
export type KbqTabSelectBy = string | number | ((tabs: KbqTab[]) => KbqTab | null);
|
|
45
39
|
/**
|
|
46
40
|
* Tab-group component. Supports basic tab pairs (label + content) and includes keyboard navigation.
|
|
47
41
|
*/
|
|
48
|
-
export declare class KbqTabGroup
|
|
42
|
+
export declare class KbqTabGroup implements AfterContentInit, AfterViewInit, AfterContentChecked, OnDestroy {
|
|
49
43
|
private readonly changeDetectorRef;
|
|
50
44
|
readonly resizeStream: Subject<Event>;
|
|
51
45
|
tabs: QueryList<KbqTab>;
|
|
@@ -58,8 +52,8 @@ export declare class KbqTabGroup extends KbqTabGroupMixinBase implements AfterCo
|
|
|
58
52
|
/** Whether the tab group should grow to the size of the active tab. */
|
|
59
53
|
dynamicHeight: boolean;
|
|
60
54
|
/** The index of the active tab. */
|
|
61
|
-
get selectedIndex(): number
|
|
62
|
-
set selectedIndex(value: number
|
|
55
|
+
get selectedIndex(): number;
|
|
56
|
+
set selectedIndex(value: number);
|
|
63
57
|
private _selectedIndex;
|
|
64
58
|
get activeTab(): KbqTab | null;
|
|
65
59
|
set activeTab(value: KbqTabSelectBy | null);
|
|
@@ -67,6 +61,9 @@ export declare class KbqTabGroup extends KbqTabGroupMixinBase implements AfterCo
|
|
|
67
61
|
headerPosition: KbqTabHeaderPosition;
|
|
68
62
|
/** Duration for the tab animation. Must be a valid CSS value (e.g. 600ms). */
|
|
69
63
|
animationDuration: string;
|
|
64
|
+
get disabled(): boolean;
|
|
65
|
+
set disabled(value: boolean);
|
|
66
|
+
private _disabled;
|
|
70
67
|
/** Output to enable support for two-way binding on `[(selectedIndex)]` */
|
|
71
68
|
readonly selectedIndexChange: EventEmitter<number>;
|
|
72
69
|
/** Event emitted when the tab selection has changed. */
|
|
@@ -87,7 +84,7 @@ export declare class KbqTabGroup extends KbqTabGroupMixinBase implements AfterCo
|
|
|
87
84
|
private resizeSubscription;
|
|
88
85
|
private readonly groupId;
|
|
89
86
|
private readonly resizeDebounceInterval;
|
|
90
|
-
constructor(
|
|
87
|
+
constructor(changeDetectorRef: ChangeDetectorRef, defaultConfig?: KbqTabsConfig);
|
|
91
88
|
/**
|
|
92
89
|
* After the content is checked, this component knows what tabs have been defined
|
|
93
90
|
* and what the selected index should be. This is where we can know exactly what position
|
|
@@ -128,12 +125,13 @@ export declare class KbqTabGroup extends KbqTabGroupMixinBase implements AfterCo
|
|
|
128
125
|
/** Clamps the given index to the bounds of 0 and the tabs length. */
|
|
129
126
|
private clampTabIndex;
|
|
130
127
|
private getTabIndexToSelect;
|
|
131
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<KbqTabGroup, [null,
|
|
132
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<KbqTabGroup, "kbq-tab-group", ["kbqTabGroup"], { "
|
|
128
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<KbqTabGroup, [null, { optional: true; }]>;
|
|
129
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KbqTabGroup, "kbq-tab-group", ["kbqTabGroup"], { "transparent": { "alias": "transparent"; "required": false; }; "onSurface": { "alias": "onSurface"; "required": false; }; "underlined": { "alias": "underlined"; "required": false; }; "vertical": { "alias": "vertical"; "required": false; }; "dynamicHeight": { "alias": "dynamicHeight"; "required": false; }; "selectedIndex": { "alias": "selectedIndex"; "required": false; }; "activeTab": { "alias": "activeTab"; "required": false; }; "headerPosition": { "alias": "headerPosition"; "required": false; }; "animationDuration": { "alias": "animationDuration"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "selectedIndexChange": "selectedIndexChange"; "activeTabChange": "activeTabChange"; "focusChange": "focusChange"; "animationDone": "animationDone"; "selectedTabChange": "selectedTabChange"; }, ["tabs"], never, false, never>;
|
|
133
130
|
static ngAcceptInputType_transparent: unknown;
|
|
134
131
|
static ngAcceptInputType_onSurface: unknown;
|
|
135
132
|
static ngAcceptInputType_underlined: unknown;
|
|
136
133
|
static ngAcceptInputType_vertical: unknown;
|
|
137
134
|
static ngAcceptInputType_dynamicHeight: unknown;
|
|
135
|
+
static ngAcceptInputType_selectedIndex: unknown;
|
|
136
|
+
static ngAcceptInputType_disabled: unknown;
|
|
138
137
|
}
|
|
139
|
-
export {};
|
|
@@ -27,6 +27,6 @@ export declare class KbqTabHeader extends KbqPaginatedTabHeader {
|
|
|
27
27
|
protected get activeTabOffsetLeft(): string | null;
|
|
28
28
|
protected itemSelected(event: KeyboardEvent): void;
|
|
29
29
|
static ɵfac: i0.ɵɵFactoryDeclaration<KbqTabHeader, never>;
|
|
30
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<KbqTabHeader, "kbq-tab-header", never, { "
|
|
30
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KbqTabHeader, "kbq-tab-header", never, { "underlined": { "alias": "underlined"; "required": false; }; }, { "selectFocusedIndex": "selectFocusedIndex"; "indexFocused": "indexFocused"; }, ["items"], ["*"], false, never>;
|
|
31
31
|
static ngAcceptInputType_underlined: unknown;
|
|
32
32
|
}
|
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
import { AfterViewInit, ElementRef, Renderer2 } from '@angular/core';
|
|
2
|
-
import { CanDisable, CanDisableCtor } from '@koobiq/components/core';
|
|
3
2
|
import { KbqTab } from './tab.component';
|
|
4
3
|
import * as i0 from "@angular/core";
|
|
5
|
-
/** @docs-private */
|
|
6
|
-
export declare class KbqTabLabelWrapperBase {
|
|
7
|
-
}
|
|
8
|
-
/** @docs-private */
|
|
9
|
-
export declare const KbqTabLabelWrapperMixinBase: CanDisableCtor & typeof KbqTabLabelWrapperBase;
|
|
10
4
|
/**
|
|
11
5
|
* Used in the `kbq-tab-group` view to display tab labels.
|
|
12
6
|
* @docs-private
|
|
13
7
|
*/
|
|
14
|
-
export declare class KbqTabLabelWrapper
|
|
8
|
+
export declare class KbqTabLabelWrapper implements AfterViewInit {
|
|
15
9
|
elementRef: ElementRef;
|
|
16
10
|
private renderer;
|
|
17
11
|
labelContent: ElementRef;
|
|
18
12
|
tab: KbqTab;
|
|
13
|
+
get disabled(): boolean;
|
|
14
|
+
set disabled(value: boolean);
|
|
15
|
+
private _disabled;
|
|
19
16
|
constructor(elementRef: ElementRef, renderer: Renderer2);
|
|
20
17
|
ngAfterViewInit(): void;
|
|
21
18
|
/** Sets focus on the wrapper element */
|
|
@@ -27,5 +24,6 @@ export declare class KbqTabLabelWrapper extends KbqTabLabelWrapperMixinBase impl
|
|
|
27
24
|
getInnerText(): any;
|
|
28
25
|
private addClassModifierForIcons;
|
|
29
26
|
static ɵfac: i0.ɵɵFactoryDeclaration<KbqTabLabelWrapper, never>;
|
|
30
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<KbqTabLabelWrapper, "[kbqTabLabelWrapper]", never, { "
|
|
27
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<KbqTabLabelWrapper, "[kbqTabLabelWrapper]", never, { "tab": { "alias": "tab"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, ["labelContent"], never, false, never>;
|
|
28
|
+
static ngAcceptInputType_disabled: unknown;
|
|
31
29
|
}
|
package/tabs/tab.component.d.ts
CHANGED
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
import { TemplatePortal } from '@angular/cdk/portal';
|
|
2
2
|
import { OnChanges, OnDestroy, OnInit, SimpleChanges, TemplateRef, ViewContainerRef } from '@angular/core';
|
|
3
|
-
import {
|
|
3
|
+
import { PopUpPlacements } from '@koobiq/components/core';
|
|
4
4
|
import { Subject } from 'rxjs';
|
|
5
5
|
import { KbqTabLabel } from './tab-label.directive';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
|
-
|
|
8
|
-
export declare class KbqTabBase {
|
|
9
|
-
}
|
|
10
|
-
/** @docs-private */
|
|
11
|
-
export declare const KbqTabMixinBase: CanDisableCtor & typeof KbqTabBase;
|
|
12
|
-
export declare class KbqTab extends KbqTabMixinBase implements OnInit, CanDisable, OnChanges, OnDestroy {
|
|
7
|
+
export declare class KbqTab implements OnInit, OnChanges, OnDestroy {
|
|
13
8
|
private readonly viewContainerRef;
|
|
14
9
|
/** @docs-private */
|
|
15
10
|
get content(): TemplatePortal | null;
|
|
@@ -25,6 +20,9 @@ export declare class KbqTab extends KbqTabMixinBase implements OnInit, CanDisabl
|
|
|
25
20
|
get tooltipTitle(): string;
|
|
26
21
|
set tooltipTitle(value: string);
|
|
27
22
|
private _tooltipTitle;
|
|
23
|
+
get disabled(): boolean;
|
|
24
|
+
set disabled(value: boolean);
|
|
25
|
+
private _disabled;
|
|
28
26
|
tooltipPlacement: PopUpPlacements;
|
|
29
27
|
/** Plain text label for the tab, used when there is no template label. */
|
|
30
28
|
textLabel: string;
|
|
@@ -64,6 +62,7 @@ export declare class KbqTab extends KbqTabMixinBase implements OnInit, CanDisabl
|
|
|
64
62
|
*/
|
|
65
63
|
protected setTemplateLabelInput(value: KbqTabLabel): void;
|
|
66
64
|
static ɵfac: i0.ɵɵFactoryDeclaration<KbqTab, never>;
|
|
67
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<KbqTab, "kbq-tab", ["kbqTab"], { "
|
|
65
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KbqTab, "kbq-tab", ["kbqTab"], { "tooltipTitle": { "alias": "tooltipTitle"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "tooltipPlacement": { "alias": "tooltipPlacement"; "required": false; }; "textLabel": { "alias": "label"; "required": false; }; "empty": { "alias": "empty"; "required": false; }; "tabId": { "alias": "tabId"; "required": false; }; }, {}, ["templateLabel", "explicitContent"], ["*"], false, never>;
|
|
66
|
+
static ngAcceptInputType_disabled: unknown;
|
|
68
67
|
static ngAcceptInputType_empty: unknown;
|
|
69
68
|
}
|
|
@@ -3,39 +3,33 @@ import { SelectionModel } from '@angular/cdk/collections';
|
|
|
3
3
|
import { AfterContentInit, ChangeDetectorRef, DoCheck, ElementRef, EventEmitter, OnDestroy, OnInit, QueryList } from '@angular/core';
|
|
4
4
|
import { ControlValueAccessor, FormGroupDirective, NgControl, NgForm } from '@angular/forms';
|
|
5
5
|
import { FocusKeyManager } from '@koobiq/cdk/a11y';
|
|
6
|
-
import { CanUpdateErrorState,
|
|
6
|
+
import { CanUpdateErrorState, ErrorStateMatcher } from '@koobiq/components/core';
|
|
7
7
|
import { KbqCleaner, KbqFormFieldControl } from '@koobiq/components/form-field';
|
|
8
8
|
import { Observable, Subject } from 'rxjs';
|
|
9
9
|
import { KbqTagTextControl } from './tag-text-control';
|
|
10
10
|
import { KbqTag, KbqTagEvent, KbqTagSelectionChange } from './tag.component';
|
|
11
11
|
import * as i0 from "@angular/core";
|
|
12
|
-
/** @docs-private */
|
|
13
|
-
export declare class KbqTagListBase {
|
|
14
|
-
defaultErrorStateMatcher: ErrorStateMatcher;
|
|
15
|
-
parentForm: NgForm;
|
|
16
|
-
parentFormGroup: FormGroupDirective;
|
|
17
|
-
ngControl: NgControl;
|
|
18
|
-
/**
|
|
19
|
-
* Emits whenever the component state changes and should cause the parent
|
|
20
|
-
* form-field to update. Implemented as part of `KbqFormFieldControl`.
|
|
21
|
-
* @docs-private
|
|
22
|
-
*/
|
|
23
|
-
readonly stateChanges: Subject<void>;
|
|
24
|
-
constructor(defaultErrorStateMatcher: ErrorStateMatcher, parentForm: NgForm, parentFormGroup: FormGroupDirective, ngControl: NgControl);
|
|
25
|
-
}
|
|
26
|
-
/** @docs-private */
|
|
27
|
-
export declare const KbqTagListMixinBase: CanUpdateErrorStateCtor & typeof KbqTagListBase;
|
|
28
12
|
/** Change event object that is emitted when the tag list value has changed. */
|
|
29
13
|
export declare class KbqTagListChange {
|
|
30
14
|
source: KbqTagList;
|
|
31
15
|
value: any;
|
|
32
16
|
constructor(source: KbqTagList, value: any);
|
|
33
17
|
}
|
|
34
|
-
export declare class KbqTagList
|
|
18
|
+
export declare class KbqTagList implements KbqFormFieldControl<any>, ControlValueAccessor, AfterContentInit, DoCheck, OnInit, OnDestroy, CanUpdateErrorState {
|
|
35
19
|
protected elementRef: ElementRef<HTMLElement>;
|
|
36
20
|
private changeDetectorRef;
|
|
21
|
+
defaultErrorStateMatcher: ErrorStateMatcher;
|
|
37
22
|
private dir;
|
|
23
|
+
parentForm: NgForm;
|
|
24
|
+
parentFormGroup: FormGroupDirective;
|
|
25
|
+
ngControl: NgControl;
|
|
38
26
|
readonly controlType: string;
|
|
27
|
+
/**
|
|
28
|
+
* Emits whenever the component state changes and should cause the parent
|
|
29
|
+
* form-field to update. Implemented as part of `KbqFormFieldControl`.
|
|
30
|
+
* @docs-private
|
|
31
|
+
*/
|
|
32
|
+
readonly stateChanges: Subject<void>;
|
|
39
33
|
/** Combined stream of all of the child tags' selection change events. */
|
|
40
34
|
get tagSelectionChanges(): Observable<KbqTagSelectionChange>;
|
|
41
35
|
/** Combined stream of all of the child tags' focus change events. */
|
|
@@ -131,6 +125,8 @@ export declare class KbqTagList extends KbqTagListMixinBase implements KbqFormFi
|
|
|
131
125
|
cleaner: KbqCleaner;
|
|
132
126
|
/** The tag components contained within this tag list. */
|
|
133
127
|
tags: QueryList<KbqTag>;
|
|
128
|
+
/** Whether the component is in an error state. */
|
|
129
|
+
errorState: boolean;
|
|
134
130
|
private _value;
|
|
135
131
|
private _required;
|
|
136
132
|
private _placeholder;
|
|
@@ -159,6 +155,7 @@ export declare class KbqTagList extends KbqTagListMixinBase implements KbqFormFi
|
|
|
159
155
|
ngOnInit(): void;
|
|
160
156
|
ngDoCheck(): void;
|
|
161
157
|
ngOnDestroy(): void;
|
|
158
|
+
updateErrorState(): void;
|
|
162
159
|
onTouched: () => void;
|
|
163
160
|
onChange: (value: any) => void;
|
|
164
161
|
/** Associates an HTML input element with this tag list. */
|
package/tags/tag.component.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AfterContentInit, ChangeDetectorRef, ElementRef, EventEmitter, NgZone, OnDestroy, QueryList } from '@angular/core';
|
|
2
2
|
import { IFocusableOption } from '@koobiq/cdk/a11y';
|
|
3
|
-
import {
|
|
3
|
+
import { KbqColorDirective, KbqTitleTextRef } from '@koobiq/components/core';
|
|
4
4
|
import { KbqIcon } from '@koobiq/components/icon';
|
|
5
5
|
import { Subject } from 'rxjs';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
@@ -30,14 +30,7 @@ export declare class KbqTagTrailingIcon {
|
|
|
30
30
|
static ɵfac: i0.ɵɵFactoryDeclaration<KbqTagTrailingIcon, never>;
|
|
31
31
|
static ɵdir: i0.ɵɵDirectiveDeclaration<KbqTagTrailingIcon, "kbq-tag-trailing-icon, [kbqTagTrailingIcon]", never, {}, {}, never, never, false, never>;
|
|
32
32
|
}
|
|
33
|
-
|
|
34
|
-
export declare class KbqTagBase {
|
|
35
|
-
elementRef: ElementRef;
|
|
36
|
-
constructor(elementRef: ElementRef);
|
|
37
|
-
}
|
|
38
|
-
/** @docs-private */
|
|
39
|
-
export declare const KbqTagMixinBase: CanColorCtor & CanDisableCtor & typeof KbqTagBase;
|
|
40
|
-
export declare class KbqTag extends KbqTagMixinBase implements IFocusableOption, OnDestroy, CanColor, CanDisable, KbqTitleTextRef, AfterContentInit {
|
|
33
|
+
export declare class KbqTag extends KbqColorDirective implements IFocusableOption, OnDestroy, KbqTitleTextRef, AfterContentInit {
|
|
41
34
|
elementRef: ElementRef;
|
|
42
35
|
changeDetectorRef: ChangeDetectorRef;
|
|
43
36
|
private _ngZone;
|
|
@@ -116,7 +109,7 @@ export declare class KbqTag extends KbqTagMixinBase implements IFocusableOption,
|
|
|
116
109
|
blur(): void;
|
|
117
110
|
private dispatchSelectionChange;
|
|
118
111
|
static ɵfac: i0.ɵɵFactoryDeclaration<KbqTag, never>;
|
|
119
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<KbqTag, "kbq-tag, [kbq-tag], kbq-basic-tag, [kbq-basic-tag]", ["kbqTag"], { "
|
|
112
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KbqTag, "kbq-tag, [kbq-tag], kbq-basic-tag, [kbq-basic-tag]", ["kbqTag"], { "selected": { "alias": "selected"; "required": false; }; "value": { "alias": "value"; "required": false; }; "selectable": { "alias": "selectable"; "required": false; }; "removable": { "alias": "removable"; "required": false; }; "tabindex": { "alias": "tabindex"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "selectionChange": "selectionChange"; "destroyed": "destroyed"; "removed": "removed"; }, ["avatar", "trailingIcon", "removeIcon", "contentChildren"], ["[kbq-icon]:not([kbqTagRemove])", "*", "[kbqTagRemove]"], false, never>;
|
|
120
113
|
}
|
|
121
114
|
/**
|
|
122
115
|
*
|