@taiga-ui/cdk 2.79.0 → 2.81.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.
Files changed (58) hide show
  1. package/bundles/taiga-ui-cdk-constants.umd.js +1 -1
  2. package/bundles/taiga-ui-cdk-constants.umd.js.map +1 -1
  3. package/bundles/taiga-ui-cdk-constants.umd.min.js +1 -1
  4. package/bundles/taiga-ui-cdk-constants.umd.min.js.map +1 -1
  5. package/bundles/taiga-ui-cdk-pipes-is-present.umd.js +331 -0
  6. package/bundles/taiga-ui-cdk-pipes-is-present.umd.js.map +1 -0
  7. package/bundles/taiga-ui-cdk-pipes-is-present.umd.min.js +2 -0
  8. package/bundles/taiga-ui-cdk-pipes-is-present.umd.min.js.map +1 -0
  9. package/bundles/taiga-ui-cdk-pipes.umd.js +12 -4
  10. package/bundles/taiga-ui-cdk-pipes.umd.js.map +1 -1
  11. package/bundles/taiga-ui-cdk-pipes.umd.min.js +1 -1
  12. package/bundles/taiga-ui-cdk-utils-browser.umd.js +10 -3
  13. package/bundles/taiga-ui-cdk-utils-browser.umd.js.map +1 -1
  14. package/bundles/taiga-ui-cdk-utils-browser.umd.min.js +1 -1
  15. package/bundles/taiga-ui-cdk-utils-browser.umd.min.js.map +1 -1
  16. package/constants/taiga-ui-cdk-constants.metadata.json +1 -1
  17. package/constants/version.d.ts +1 -1
  18. package/constants/version.js +1 -1
  19. package/esm2015/constants/version.js +2 -2
  20. package/esm2015/pipes/index.js +2 -1
  21. package/esm2015/pipes/is-present/index.js +3 -0
  22. package/esm2015/pipes/is-present/is-present.module.js +13 -0
  23. package/esm2015/pipes/is-present/is-present.pipe.js +13 -0
  24. package/esm2015/pipes/is-present/taiga-ui-cdk-pipes-is-present.js +5 -0
  25. package/esm2015/utils/browser/is-safari.js +10 -4
  26. package/esm5/constants/version.js +2 -2
  27. package/esm5/pipes/index.js +2 -1
  28. package/esm5/pipes/is-present/index.js +3 -0
  29. package/esm5/pipes/is-present/is-present.module.js +16 -0
  30. package/esm5/pipes/is-present/is-present.pipe.js +16 -0
  31. package/esm5/pipes/is-present/taiga-ui-cdk-pipes-is-present.js +5 -0
  32. package/esm5/utils/browser/is-safari.js +11 -4
  33. package/fesm2015/taiga-ui-cdk-constants.js +1 -1
  34. package/fesm2015/taiga-ui-cdk-constants.js.map +1 -1
  35. package/fesm2015/taiga-ui-cdk-pipes-is-present.js +28 -0
  36. package/fesm2015/taiga-ui-cdk-pipes-is-present.js.map +1 -0
  37. package/fesm2015/taiga-ui-cdk-pipes.js +1 -0
  38. package/fesm2015/taiga-ui-cdk-pipes.js.map +1 -1
  39. package/fesm2015/taiga-ui-cdk-utils-browser.js +9 -3
  40. package/fesm2015/taiga-ui-cdk-utils-browser.js.map +1 -1
  41. package/fesm5/taiga-ui-cdk-constants.js +1 -1
  42. package/fesm5/taiga-ui-cdk-constants.js.map +1 -1
  43. package/fesm5/taiga-ui-cdk-pipes-is-present.js +34 -0
  44. package/fesm5/taiga-ui-cdk-pipes-is-present.js.map +1 -0
  45. package/fesm5/taiga-ui-cdk-pipes.js +1 -0
  46. package/fesm5/taiga-ui-cdk-pipes.js.map +1 -1
  47. package/fesm5/taiga-ui-cdk-utils-browser.js +10 -3
  48. package/fesm5/taiga-ui-cdk-utils-browser.js.map +1 -1
  49. package/package.json +1 -1
  50. package/pipes/index.d.ts +1 -0
  51. package/pipes/is-present/index.d.ts +2 -0
  52. package/pipes/is-present/is-present.module.d.ts +2 -0
  53. package/pipes/is-present/is-present.pipe.d.ts +4 -0
  54. package/pipes/is-present/package.json +13 -0
  55. package/pipes/is-present/taiga-ui-cdk-pipes-is-present.d.ts +4 -0
  56. package/pipes/is-present/taiga-ui-cdk-pipes-is-present.metadata.json +1 -0
  57. package/pipes/taiga-ui-cdk-pipes.metadata.json +1 -1
  58. package/utils/browser/is-safari.d.ts +1 -1
@@ -40,10 +40,17 @@ var tuiIsIE = isIE;
40
40
  * @deprecated: use {@link tuiIsSafari} instead
41
41
  */
42
42
  // eslint-disable-next-line @typescript-eslint/naming-convention
43
- function isSafari(element) {
44
- var documentRef = element.ownerDocument;
43
+ function isSafari(_a) {
44
+ var documentRef = _a.ownerDocument;
45
+ var _b, _c, _d, _e, _f, _g, _h, _j;
45
46
  var windowRef = documentRef === null || documentRef === void 0 ? void 0 : documentRef.defaultView;
46
- return !!windowRef && "safari" in windowRef;
47
+ var isMacOsSafari = typeof windowRef.safari !== "undefined" &&
48
+ ((_c = (_b = windowRef.safari) === null || _b === void 0 ? void 0 : _b.pushNotification) === null || _c === void 0 ? void 0 : _c.toString()) ===
49
+ "[object SafariRemoteNotification]";
50
+ var isIosSafari = !!((_e = (_d = windowRef.navigator) === null || _d === void 0 ? void 0 : _d.vendor) === null || _e === void 0 ? void 0 : _e.includes("Apple")) &&
51
+ !((_g = (_f = windowRef.navigator) === null || _f === void 0 ? void 0 : _f.userAgent) === null || _g === void 0 ? void 0 : _g.includes("CriOS")) &&
52
+ !((_j = (_h = windowRef.navigator) === null || _h === void 0 ? void 0 : _h.userAgent) === null || _j === void 0 ? void 0 : _j.includes("FxiOS"));
53
+ return isMacOsSafari || isIosSafari;
47
54
  }
48
55
  var tuiIsSafari = isSafari;
49
56
 
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-cdk-utils-browser.js","sources":["ng://@taiga-ui/cdk/utils/browser/is-edge.ts","ng://@taiga-ui/cdk/utils/browser/is-edge-older-than.ts","ng://@taiga-ui/cdk/utils/browser/is-firefox.ts","ng://@taiga-ui/cdk/utils/browser/is-ie.ts","ng://@taiga-ui/cdk/utils/browser/is-safari.ts","ng://@taiga-ui/cdk/utils/browser/taiga-ui-cdk-utils-browser.ts"],"sourcesContent":["/**\n * @deprecated: use {@link tuiIsEdge} instead\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function isEdge(userAgent: string): boolean {\n return userAgent.toLowerCase().includes(`edge`);\n}\n\nexport const tuiIsEdge = isEdge;\n","const EDGE = `edge/`;\n\n/**\n * @deprecated: use {@link tuiIsEdgeOlderThan} instead\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function isEdgeOlderThan(version: number, userAgent: string): boolean {\n const currentVersion = parseInt(\n userAgent.slice(userAgent.toLowerCase().indexOf(EDGE) + EDGE.length),\n 10,\n );\n\n return currentVersion < version;\n}\n\nexport const tuiIsEdgeOlderThan = isEdgeOlderThan;\n","/**\n * @deprecated: use {@link tuiIsFirefox} instead\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function isFirefox(userAgent: string): boolean {\n return userAgent.toLowerCase().includes(`firefox`);\n}\n\nexport const tuiIsFirefox = isFirefox;\n","/**\n * @deprecated: use {@link tuiIsIE} instead\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function isIE(userAgent: string): boolean {\n return userAgent.toLowerCase().includes(`trident`);\n}\n\nexport const tuiIsIE = isIE;\n","/**\n * @deprecated: use {@link tuiIsSafari} instead\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function isSafari(element: Element): boolean {\n const documentRef = element.ownerDocument;\n const windowRef = documentRef?.defaultView;\n\n return !!windowRef && `safari` in windowRef;\n}\n\nexport const tuiIsSafari = isSafari;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAAA;;;AAGA;SACgB,MAAM,CAAC,SAAiB;IACpC,OAAO,SAAS,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AACpD,CAAC;IAEY,SAAS,GAAG;;ACRzB,IAAM,IAAI,GAAG,OAAO,CAAC;AAErB;;;AAGA;SACgB,eAAe,CAAC,OAAe,EAAE,SAAiB;IAC9D,IAAM,cAAc,GAAG,QAAQ,CAC3B,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,EACpE,EAAE,CACL,CAAC;IAEF,OAAO,cAAc,GAAG,OAAO,CAAC;AACpC,CAAC;IAEY,kBAAkB,GAAG;;ACflC;;;AAGA;SACgB,SAAS,CAAC,SAAiB;IACvC,OAAO,SAAS,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;AACvD,CAAC;IAEY,YAAY,GAAG;;ACR5B;;;AAGA;SACgB,IAAI,CAAC,SAAiB;IAClC,OAAO,SAAS,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;AACvD,CAAC;IAEY,OAAO,GAAG;;ACRvB;;;AAGA;SACgB,QAAQ,CAAC,OAAgB;IACrC,IAAM,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC;IAC1C,IAAM,SAAS,GAAG,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,WAAW,CAAC;IAE3C,OAAO,CAAC,CAAC,SAAS,IAAI,QAAQ,IAAI,SAAS,CAAC;AAChD,CAAC;IAEY,WAAW,GAAG;;ACX3B;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-cdk-utils-browser.js","sources":["ng://@taiga-ui/cdk/utils/browser/is-edge.ts","ng://@taiga-ui/cdk/utils/browser/is-edge-older-than.ts","ng://@taiga-ui/cdk/utils/browser/is-firefox.ts","ng://@taiga-ui/cdk/utils/browser/is-ie.ts","ng://@taiga-ui/cdk/utils/browser/is-safari.ts","ng://@taiga-ui/cdk/utils/browser/taiga-ui-cdk-utils-browser.ts"],"sourcesContent":["/**\n * @deprecated: use {@link tuiIsEdge} instead\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function isEdge(userAgent: string): boolean {\n return userAgent.toLowerCase().includes(`edge`);\n}\n\nexport const tuiIsEdge = isEdge;\n","const EDGE = `edge/`;\n\n/**\n * @deprecated: use {@link tuiIsEdgeOlderThan} instead\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function isEdgeOlderThan(version: number, userAgent: string): boolean {\n const currentVersion = parseInt(\n userAgent.slice(userAgent.toLowerCase().indexOf(EDGE) + EDGE.length),\n 10,\n );\n\n return currentVersion < version;\n}\n\nexport const tuiIsEdgeOlderThan = isEdgeOlderThan;\n","/**\n * @deprecated: use {@link tuiIsFirefox} instead\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function isFirefox(userAgent: string): boolean {\n return userAgent.toLowerCase().includes(`firefox`);\n}\n\nexport const tuiIsFirefox = isFirefox;\n","/**\n * @deprecated: use {@link tuiIsIE} instead\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function isIE(userAgent: string): boolean {\n return userAgent.toLowerCase().includes(`trident`);\n}\n\nexport const tuiIsIE = isIE;\n","/**\n * @deprecated: use {@link tuiIsSafari} instead\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function isSafari({ownerDocument: documentRef}: Element): boolean {\n const windowRef = documentRef?.defaultView as unknown as Window & {safari?: any};\n\n const isMacOsSafari =\n typeof windowRef.safari !== `undefined` &&\n windowRef.safari?.pushNotification?.toString() ===\n `[object SafariRemoteNotification]`;\n\n const isIosSafari =\n !!windowRef.navigator?.vendor?.includes(`Apple`) &&\n !windowRef.navigator?.userAgent?.includes(`CriOS`) &&\n !windowRef.navigator?.userAgent?.includes(`FxiOS`);\n\n return isMacOsSafari || isIosSafari;\n}\n\nexport const tuiIsSafari = isSafari;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAAA;;;AAGA;SACgB,MAAM,CAAC,SAAiB;IACpC,OAAO,SAAS,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AACpD,CAAC;IAEY,SAAS,GAAG;;ACRzB,IAAM,IAAI,GAAG,OAAO,CAAC;AAErB;;;AAGA;SACgB,eAAe,CAAC,OAAe,EAAE,SAAiB;IAC9D,IAAM,cAAc,GAAG,QAAQ,CAC3B,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,EACpE,EAAE,CACL,CAAC;IAEF,OAAO,cAAc,GAAG,OAAO,CAAC;AACpC,CAAC;IAEY,kBAAkB,GAAG;;ACflC;;;AAGA;SACgB,SAAS,CAAC,SAAiB;IACvC,OAAO,SAAS,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;AACvD,CAAC;IAEY,YAAY,GAAG;;ACR5B;;;AAGA;SACgB,IAAI,CAAC,SAAiB;IAClC,OAAO,SAAS,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;AACvD,CAAC;IAEY,OAAO,GAAG;;ACRvB;;;AAGA;SACgB,QAAQ,CAAC,EAAqC;QAApC,8BAA0B;;IAChD,IAAM,SAAS,GAAG,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,WAAiD,CAAC;IAEjF,IAAM,aAAa,GACf,OAAO,SAAS,CAAC,MAAM,KAAK,WAAW;QACvC,aAAA,SAAS,CAAC,MAAM,0CAAE,gBAAgB,0CAAE,QAAQ;YACxC,mCAAmC,CAAC;IAE5C,IAAM,WAAW,GACb,CAAC,cAAC,SAAS,CAAC,SAAS,0CAAE,MAAM,0CAAE,QAAQ,CAAC,OAAO,EAAC;QAChD,cAAC,SAAS,CAAC,SAAS,0CAAE,SAAS,0CAAE,QAAQ,CAAC,OAAO,EAAC;QAClD,cAAC,SAAS,CAAC,SAAS,0CAAE,SAAS,0CAAE,QAAQ,CAAC,OAAO,EAAC,CAAC;IAEvD,OAAO,aAAa,IAAI,WAAW,CAAC;AACxC,CAAC;IAEY,WAAW,GAAG;;ACpB3B;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taiga-ui/cdk",
3
- "version": "2.79.0",
3
+ "version": "2.81.0",
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",
package/pipes/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from '@taiga-ui/cdk/pipes/filter';
2
+ export * from '@taiga-ui/cdk/pipes/is-present';
2
3
  export * from '@taiga-ui/cdk/pipes/keys';
3
4
  export * from '@taiga-ui/cdk/pipes/mapper';
@@ -0,0 +1,2 @@
1
+ export * from './is-present.module';
2
+ export * from './is-present.pipe';
@@ -0,0 +1,2 @@
1
+ export declare class TuiIsPresentPipeModule {
2
+ }
@@ -0,0 +1,4 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ export declare class TuiIsPresentPipe implements PipeTransform {
3
+ transform<T>(value?: T | null): value is T;
4
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "main": "../../bundles/taiga-ui-cdk-pipes-is-present.umd.js",
3
+ "module": "../../fesm5/taiga-ui-cdk-pipes-is-present.js",
4
+ "es2015": "../../fesm2015/taiga-ui-cdk-pipes-is-present.js",
5
+ "esm5": "../../esm5/pipes/is-present/taiga-ui-cdk-pipes-is-present.js",
6
+ "esm2015": "../../esm2015/pipes/is-present/taiga-ui-cdk-pipes-is-present.js",
7
+ "fesm5": "../../fesm5/taiga-ui-cdk-pipes-is-present.js",
8
+ "fesm2015": "../../fesm2015/taiga-ui-cdk-pipes-is-present.js",
9
+ "typings": "taiga-ui-cdk-pipes-is-present.d.ts",
10
+ "metadata": "taiga-ui-cdk-pipes-is-present.metadata.json",
11
+ "sideEffects": false,
12
+ "name": "@taiga-ui/cdk/pipes/is-present"
13
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './index';
@@ -0,0 +1 @@
1
+ {"__symbolic":"module","version":4,"metadata":{"TuiIsPresentPipeModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":4,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"TuiIsPresentPipe"}],"exports":[{"__symbolic":"reference","name":"TuiIsPresentPipe"}]}]}],"members":{}},"TuiIsPresentPipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":3,"character":1},"arguments":[{"name":"tuiIsPresent"}]}],"members":{"transform":[{"__symbolic":"method"}]}}},"origins":{"TuiIsPresentPipeModule":"./is-present.module","TuiIsPresentPipe":"./is-present.pipe"},"importAs":"@taiga-ui/cdk/pipes/is-present"}
@@ -1 +1 @@
1
- {"__symbolic":"module","version":4,"exports":[{"from":"@taiga-ui/cdk/pipes/filter"},{"from":"@taiga-ui/cdk/pipes/keys"},{"from":"@taiga-ui/cdk/pipes/mapper"}],"metadata":{},"origins":{},"importAs":"@taiga-ui/cdk/pipes"}
1
+ {"__symbolic":"module","version":4,"exports":[{"from":"@taiga-ui/cdk/pipes/filter"},{"from":"@taiga-ui/cdk/pipes/is-present"},{"from":"@taiga-ui/cdk/pipes/keys"},{"from":"@taiga-ui/cdk/pipes/mapper"}],"metadata":{},"origins":{},"importAs":"@taiga-ui/cdk/pipes"}
@@ -1,5 +1,5 @@
1
1
  /**
2
2
  * @deprecated: use {@link tuiIsSafari} instead
3
3
  */
4
- export declare function isSafari(element: Element): boolean;
4
+ export declare function isSafari({ ownerDocument: documentRef }: Element): boolean;
5
5
  export declare const tuiIsSafari: typeof isSafari;