@taiga-ui/cdk 3.16.0-dev.main-be14e7c → 3.16.0-dev.main-92f5373

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/package.json +1 -1
  2. package/schematics/utils/angular-json-manipulations.js +4 -3
  3. package/schematics/utils/templates/elements.js +6 -3
  4. package/schematics/utils/templates/ng-component-input-manipulations.js +3 -2
  5. package/constants/always-false-handler.js +0 -9
  6. package/constants/always-true-handler.js +0 -9
  7. package/constants/browser.js +0 -8
  8. package/constants/empty.js +0 -26
  9. package/constants/index.js +0 -14
  10. package/constants/matcher.js +0 -32
  11. package/constants/parent-animation.js +0 -10
  12. package/constants/polling-time.js +0 -4
  13. package/constants/stringify.js +0 -8
  14. package/constants/svg-node-filter.js +0 -8
  15. package/constants/unicode-chars.js +0 -66
  16. package/interfaces/alert-context.js +0 -2
  17. package/interfaces/aria-dialog-context.js +0 -2
  18. package/interfaces/base-dialog-context.js +0 -2
  19. package/interfaces/base-dialog.js +0 -2
  20. package/interfaces/context-with-implicit.js +0 -2
  21. package/interfaces/control-value-transformer.js +0 -2
  22. package/interfaces/day-like.js +0 -2
  23. package/interfaces/focusable-element-accessor.js +0 -2
  24. package/interfaces/index.js +0 -16
  25. package/interfaces/month-like.js +0 -2
  26. package/interfaces/swipe.js +0 -2
  27. package/interfaces/time-like.js +0 -2
  28. package/interfaces/year-like.js +0 -2
  29. package/interfaces/zoom.js +0 -2
  30. package/types/autocomplete.js +0 -2
  31. package/types/date-mode.js +0 -2
  32. package/types/dialog.js +0 -2
  33. package/types/event-with.js +0 -2
  34. package/types/handler.js +0 -2
  35. package/types/index.js +0 -15
  36. package/types/injection-token-type.js +0 -2
  37. package/types/input-mode.js +0 -2
  38. package/types/input-type.js +0 -2
  39. package/types/mapper.js +0 -2
  40. package/types/matcher.js +0 -2
  41. package/types/overscroll-mode.js +0 -2
  42. package/types/time-mode.js +0 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taiga-ui/cdk",
3
- "version": "3.16.0-dev.main-be14e7c",
3
+ "version": "3.16.0-dev.main-92f5373",
4
4
  "description": "Base library for creating Angular components and applications using Taiga UI principles regarding of actual visual appearance",
5
5
  "keywords": [
6
6
  "angular",
@@ -5,7 +5,6 @@ const tslib_1 = require("tslib");
5
5
  const tasks_1 = require("@angular-devkit/schematics/tasks");
6
6
  const workspace_1 = require("@schematics/angular/utility/workspace");
7
7
  const ng_morph_1 = require("ng-morph");
8
- const constants_1 = require("../../constants");
9
8
  const is_string_1 = require("../../utils/miscellaneous/is-string");
10
9
  const versions_1 = require("../ng-add/constants/versions");
11
10
  const get_project_target_options_1 = require("./get-project-target-options");
@@ -13,12 +12,14 @@ const get_projects_1 = require("./get-projects");
13
12
  function isInvalidAngularJson(tree) {
14
13
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
15
14
  return (workspace_1.getWorkspace(tree)
16
- .then(constants_1.ALWAYS_FALSE_HANDLER)
15
+ // eslint-disable-next-line no-restricted-syntax
16
+ .then(() => false)
17
17
  /**
18
18
  * Possible error – "Invalid format version detected - Expected:[ 1 ] Found: [ 2 ]"
19
19
  * @see https://github.com/angular/angular-cli/blob/main/packages/angular_devkit/core/src/workspace/json/reader.ts#L67-L69
20
20
  */
21
- .catch(constants_1.ALWAYS_TRUE_HANDLER));
21
+ // eslint-disable-next-line no-restricted-syntax
22
+ .catch(() => true));
22
23
  });
23
24
  }
24
25
  exports.isInvalidAngularJson = isInvalidAngularJson;
@@ -2,7 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getStartOffsetOfAttribute = exports.hasElementAttribute = exports.findAttributeOnElementWithAttrs = exports.findAttributeOnElementWithTag = exports.findElementsWithAttribute = exports.findElementsByTagNames = exports.findElementsByTagName = exports.findElementsInTemplateByFn = exports.findElementsByFn = void 0;
4
4
  const parse5_1 = require("parse5");
5
- const constants_1 = require("../../../constants");
6
5
  function findElementsByFn(nodes, predicateFn) {
7
6
  const elements = [];
8
7
  const visitNodes = (nodes) => {
@@ -49,7 +48,9 @@ exports.findElementsWithAttribute = findElementsWithAttribute;
49
48
  * Finds elements with explicit tag names that also contain the specified attribute. Returns the
50
49
  * attribute start offset based on the specified HTML.
51
50
  */
52
- function findAttributeOnElementWithTag(html, name, tagNames, filterFn = constants_1.ALWAYS_TRUE_HANDLER) {
51
+ function findAttributeOnElementWithTag(html, name, tagNames,
52
+ // eslint-disable-next-line no-restricted-syntax
53
+ filterFn = () => true) {
53
54
  return findElementsWithAttribute(html, name)
54
55
  .filter(element => (tagNames.includes(element.tagName) || tagNames.includes(`*`)) &&
55
56
  filterFn(element))
@@ -60,7 +61,9 @@ exports.findAttributeOnElementWithTag = findAttributeOnElementWithTag;
60
61
  * Finds elements that contain the given attribute and contain at least one of the other
61
62
  * specified attributes. Returns the primary attribute's start offset based on the specified HTML.
62
63
  */
63
- function findAttributeOnElementWithAttrs(html, name, attrs, filterFn = constants_1.ALWAYS_TRUE_HANDLER) {
64
+ function findAttributeOnElementWithAttrs(html, name, attrs,
65
+ // eslint-disable-next-line no-restricted-syntax
66
+ filterFn = () => true) {
64
67
  return findElementsWithAttribute(html, name)
65
68
  .filter(element => attrs.some(attr => hasElementAttribute(element, attr)) &&
66
69
  filterFn(element))
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.removeInputProperty = exports.replaceInputPropertyByDirective = exports.getInputPropertyValueOffsets = exports.getInputPropertyOffsets = exports.replaceInputProperty = void 0;
4
- const constants_1 = require("../../../constants");
5
4
  const add_import_to_closest_module_1 = require("../add-import-to-closest-module");
6
5
  const elements_1 = require("./elements");
7
6
  const template_resource_1 = require("./template-resource");
@@ -77,7 +76,9 @@ exports.replaceInputProperty = replaceInputProperty;
77
76
  *
78
77
  * getInputPropertyOffsets(template, 'size', ['tui-card']) // [[10, 18]]
79
78
  */
80
- function getInputPropertyOffsets(html, attrName, tags, filterFn = constants_1.ALWAYS_TRUE_HANDLER) {
79
+ function getInputPropertyOffsets(html, attrName, tags,
80
+ // eslint-disable-next-line no-restricted-syntax
81
+ filterFn = () => true) {
81
82
  return elements_1.findElementsWithAttribute(html, attrName)
82
83
  .filter(element => (tags.includes(element.tagName) || tags.includes(`*`)) &&
83
84
  filterFn(element))
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ALWAYS_FALSE_HANDLER = void 0;
4
- /**
5
- * Handler that always returns `false`.
6
- */
7
- // eslint-disable-next-line no-restricted-syntax
8
- const ALWAYS_FALSE_HANDLER = () => false;
9
- exports.ALWAYS_FALSE_HANDLER = ALWAYS_FALSE_HANDLER;
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ALWAYS_TRUE_HANDLER = void 0;
4
- /**
5
- * Handler that always returns `true`.
6
- */
7
- // eslint-disable-next-line no-restricted-syntax
8
- const ALWAYS_TRUE_HANDLER = () => true;
9
- exports.ALWAYS_TRUE_HANDLER = ALWAYS_TRUE_HANDLER;
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CHROMIUM_EDGE_START_VERSION = void 0;
4
- /**
5
- * @deprecated
6
- * TODO: drop support of legacy Edge (EdgeHTML) in v4.x
7
- */
8
- exports.CHROMIUM_EDGE_START_VERSION = 79;
@@ -1,26 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EMPTY_CLIENT_RECT = exports.EMPTY_FUNCTION = exports.EMPTY_ARRAY = exports.EMPTY_QUERY = void 0;
4
- const core_1 = require("@angular/core");
5
- /**
6
- * For type safety when using @ContentChildren and @ViewChildren
7
- *
8
- * NOTE: Be careful subscribing to 'changes'
9
- */
10
- exports.EMPTY_QUERY = new core_1.QueryList();
11
- exports.EMPTY_ARRAY = [];
12
- const EMPTY_FUNCTION = () => { };
13
- exports.EMPTY_FUNCTION = EMPTY_FUNCTION;
14
- const rect = {
15
- bottom: 0,
16
- height: 0,
17
- left: 0,
18
- right: 0,
19
- top: 0,
20
- width: 0,
21
- x: 0,
22
- y: 0,
23
- };
24
- exports.EMPTY_CLIENT_RECT = Object.assign(Object.assign({}, rect), { toJSON() {
25
- return rect;
26
- } });
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./always-false-handler"), exports);
5
- tslib_1.__exportStar(require("./always-true-handler"), exports);
6
- tslib_1.__exportStar(require("./browser"), exports);
7
- tslib_1.__exportStar(require("./empty"), exports);
8
- tslib_1.__exportStar(require("./matcher"), exports);
9
- tslib_1.__exportStar(require("./parent-animation"), exports);
10
- tslib_1.__exportStar(require("./polling-time"), exports);
11
- tslib_1.__exportStar(require("./stringify"), exports);
12
- tslib_1.__exportStar(require("./svg-node-filter"), exports);
13
- tslib_1.__exportStar(require("./unicode-chars"), exports);
14
- tslib_1.__exportStar(require("./version"), exports);
@@ -1,32 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TUI_DEFAULT_IDENTITY_MATCHER = exports.TUI_STRICT_MATCHER = exports.TUI_DEFAULT_MATCHER = void 0;
4
- const stringify_1 = require("./stringify");
5
- /**
6
- * Default handler for matching stringified version of an item and a search query
7
- * @param item arbitrary element to match with a string
8
- * @param search search query
9
- * @param stringify handler to turn item into a string
10
- */
11
- const TUI_DEFAULT_MATCHER = (item, search, stringify = stringify_1.TUI_DEFAULT_STRINGIFY) => stringify(item).toLowerCase().includes(search.toLowerCase());
12
- exports.TUI_DEFAULT_MATCHER = TUI_DEFAULT_MATCHER;
13
- /**
14
- * Default handler for strict matching stringified version of an item and a search query
15
- * @param item arbitrary element to match with a string
16
- * @param search search query
17
- * @param stringify handler to turn item into a string
18
- */
19
- const TUI_STRICT_MATCHER = (item, search, stringify = stringify_1.TUI_DEFAULT_STRINGIFY) => stringify(item).toLowerCase() === search.toLowerCase();
20
- exports.TUI_STRICT_MATCHER = TUI_STRICT_MATCHER;
21
- /**
22
- * Default handler to match equality of two elements
23
- * ATTENTION: considers two empty arrays equal
24
- *
25
- * @param item1 first element
26
- * @param item2 second element
27
- */
28
- const TUI_DEFAULT_IDENTITY_MATCHER = (item1, item2) => item1 === item2 || bothEmpty(item1, item2);
29
- exports.TUI_DEFAULT_IDENTITY_MATCHER = TUI_DEFAULT_IDENTITY_MATCHER;
30
- function bothEmpty(item1, item2) {
31
- return Array.isArray(item1) && Array.isArray(item2) && !item1.length && !item2.length;
32
- }
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TUI_PARENT_ANIMATION = void 0;
4
- const animations_1 = require("@angular/animations");
5
- exports.TUI_PARENT_ANIMATION = animations_1.trigger(`tuiParentAnimation`, [
6
- animations_1.transition(`* => void`, [
7
- animations_1.style({ overflow: `hidden` }),
8
- animations_1.query(`:scope > *`, [animations_1.animateChild()], { optional: true }),
9
- ]),
10
- ]);
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.POLLING_TIME = void 0;
4
- exports.POLLING_TIME = 1000 / 15;
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TUI_DEFAULT_STRINGIFY = void 0;
4
- /**
5
- * Default method to turn arbitrary object into string
6
- */
7
- const TUI_DEFAULT_STRINGIFY = item => String(item);
8
- exports.TUI_DEFAULT_STRINGIFY = TUI_DEFAULT_STRINGIFY;
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.svgNodeFilter = void 0;
4
- // Filtering SVGElements for TreeWalker
5
- // Filter must be a function in IE, other modern browsers are compliant to this format
6
- exports.svgNodeFilter = ((node) => `ownerSVGElement` in node
7
- ? NodeFilter.FILTER_REJECT
8
- : NodeFilter.FILTER_ACCEPT);
@@ -1,66 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CHAR_ZERO_WIDTH_SPACE = exports.CHAR_CURRENCY_SIGN = exports.CHAR_ELLIPSIS = exports.CHAR_BULLET = exports.CHAR_PLUS = exports.CHAR_MINUS = exports.CHAR_HYPHEN = exports.CHAR_RAQUO = exports.CHAR_LAQUO = exports.CHAR_EM_DASH = exports.CHAR_EN_DASH = exports.CHAR_NO_BREAK_SPACE = void 0;
4
- /**
5
- * {@link https://unicode-table.com/en/00A0/ Non-breaking space}.
6
- */
7
- exports.CHAR_NO_BREAK_SPACE = `\u00A0`;
8
- /**
9
- * {@link https://unicode-table.com/en/2013/ EN dash}
10
- * is used to indicate a range of numbers or a span of time.
11
- * @example 2006–2022
12
- * ___
13
- * Don't confuse with {@link CHAR_EM_DASH} or {@link CHAR_HYPHEN}!
14
- */
15
- exports.CHAR_EN_DASH = `\u2013`;
16
- /**
17
- * {@link https://unicode-table.com/en/2014/ EM dash}
18
- * is used to mark a break in a sentence.
19
- * @example Taiga UI — powerful set of open source components for Angular
20
- * ___
21
- * Don't confuse with {@link CHAR_EN_DASH} or {@link CHAR_HYPHEN}!
22
- */
23
- exports.CHAR_EM_DASH = `\u2014`;
24
- /**
25
- * {@link https://unicode-table.com/en/00AB/ Left-Pointing Double Angle Quotation Mark}
26
- */
27
- exports.CHAR_LAQUO = `\u00AB`;
28
- /**
29
- * {@link https://unicode-table.com/en/00BB/ Right-Pointing Double Angle Quotation Mark}
30
- */
31
- exports.CHAR_RAQUO = `\u00BB`;
32
- /**
33
- * {@link https://unicode-table.com/en/002D/ Hyphen (minus sign)}
34
- * is used to combine words.
35
- * @example well-behaved
36
- * ___
37
- * Don't confuse with {@link CHAR_EN_DASH} or {@link CHAR_EM_DASH}!
38
- */
39
- exports.CHAR_HYPHEN = `\u002D`;
40
- /**
41
- * {@link https://unicode-table.com/en/2212/ Minus}
42
- * is used as math operator symbol or before negative digits.
43
- * ---
44
- * Can be used as `−`. Don't confuse with {@link CHAR_HYPHEN}
45
- */
46
- exports.CHAR_MINUS = `\u2212`;
47
- /**
48
- * {@link https://unicode-table.com/en/002B/ Plus}
49
- */
50
- exports.CHAR_PLUS = `\u002B`;
51
- /**
52
- * {@link https://unicode-table.com/en/2022/ Bullet}.
53
- */
54
- exports.CHAR_BULLET = `\u2022`;
55
- /**
56
- * {@link https://unicode-table.com/en/2026/ Suspension points}.
57
- */
58
- exports.CHAR_ELLIPSIS = `\u2026`;
59
- /**
60
- * {@link https://unicode-table.com/en/00A4/ Suspension points}.
61
- */
62
- exports.CHAR_CURRENCY_SIGN = `\u00A4`;
63
- /**
64
- * {@link https://unicode-table.com/en/200b/ Suspension points}.
65
- */
66
- exports.CHAR_ZERO_WIDTH_SPACE = `\u200B`;
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./alert-context"), exports);
5
- tslib_1.__exportStar(require("./aria-dialog-context"), exports);
6
- tslib_1.__exportStar(require("./base-dialog"), exports);
7
- tslib_1.__exportStar(require("./base-dialog-context"), exports);
8
- tslib_1.__exportStar(require("./context-with-implicit"), exports);
9
- tslib_1.__exportStar(require("./control-value-transformer"), exports);
10
- tslib_1.__exportStar(require("./day-like"), exports);
11
- tslib_1.__exportStar(require("./focusable-element-accessor"), exports);
12
- tslib_1.__exportStar(require("./month-like"), exports);
13
- tslib_1.__exportStar(require("./swipe"), exports);
14
- tslib_1.__exportStar(require("./time-like"), exports);
15
- tslib_1.__exportStar(require("./year-like"), exports);
16
- tslib_1.__exportStar(require("./zoom"), exports);
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
package/types/dialog.js DELETED
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
package/types/handler.js DELETED
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
package/types/index.js DELETED
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./autocomplete"), exports);
5
- tslib_1.__exportStar(require("./date-mode"), exports);
6
- tslib_1.__exportStar(require("./dialog"), exports);
7
- tslib_1.__exportStar(require("./event-with"), exports);
8
- tslib_1.__exportStar(require("./handler"), exports);
9
- tslib_1.__exportStar(require("./injection-token-type"), exports);
10
- tslib_1.__exportStar(require("./input-mode"), exports);
11
- tslib_1.__exportStar(require("./input-type"), exports);
12
- tslib_1.__exportStar(require("./mapper"), exports);
13
- tslib_1.__exportStar(require("./matcher"), exports);
14
- tslib_1.__exportStar(require("./overscroll-mode"), exports);
15
- tslib_1.__exportStar(require("./time-mode"), exports);
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
package/types/mapper.js DELETED
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
package/types/matcher.js DELETED
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });