@ssv/ngx.ux 2.1.2 → 3.0.0-dev.34

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 (79) hide show
  1. package/README.md +28 -114
  2. package/eslint.config.js +43 -0
  3. package/index.ts +1 -0
  4. package/jest.config.ts +21 -0
  5. package/ng-package.json +7 -0
  6. package/package.json +4 -30
  7. package/project.json +36 -0
  8. package/src/index.ts +4 -0
  9. package/src/internal/internal.model.ts +3 -0
  10. package/src/platform/window.ts +31 -0
  11. package/src/test-setup.ts +8 -0
  12. package/src/ux.module.ts +15 -0
  13. package/src/version.ts +1 -0
  14. package/src/viewport/index.ts +20 -0
  15. package/src/viewport/viewport-data/README.md +47 -0
  16. package/src/viewport/viewport-data/index.ts +3 -0
  17. package/src/viewport/viewport-data/viewport-data-matcher.spec.ts +227 -0
  18. package/src/viewport/viewport-data/viewport-data-matcher.ts +175 -0
  19. package/src/viewport/viewport-data/viewport-data.pipe.ts +51 -0
  20. package/src/viewport/viewport-data/viewport-data.service.ts +48 -0
  21. package/src/viewport/viewport-data/viewport-data.utils.spec.ts +228 -0
  22. package/src/viewport/viewport-data/viewport-data.utils.ts +137 -0
  23. package/src/viewport/viewport-matcher-var.directive.ts +85 -0
  24. package/src/viewport/viewport-matcher.directive.ts +170 -0
  25. package/src/viewport/viewport-server-size.service.ts +37 -0
  26. package/src/viewport/viewport.model.ts +54 -0
  27. package/src/viewport/viewport.module.ts +19 -0
  28. package/src/viewport/viewport.options.ts +74 -0
  29. package/src/viewport/viewport.service.ts +123 -0
  30. package/src/viewport/viewport.util.spec.ts +254 -0
  31. package/src/viewport/viewport.util.ts +152 -0
  32. package/tsconfig.json +28 -0
  33. package/tsconfig.lib.json +12 -0
  34. package/tsconfig.lib.prod.json +9 -0
  35. package/tsconfig.spec.json +11 -0
  36. package/LICENSE +0 -21
  37. package/config.d.ts +0 -7
  38. package/esm2020/config.mjs +0 -7
  39. package/esm2020/index.mjs +0 -5
  40. package/esm2020/internal/internal.model.mjs +0 -2
  41. package/esm2020/module.mjs +0 -65
  42. package/esm2020/platform/window.mjs +0 -30
  43. package/esm2020/ssv-ngx.ux.mjs +0 -5
  44. package/esm2020/version.mjs +0 -2
  45. package/esm2020/viewport/index.mjs +0 -9
  46. package/esm2020/viewport/viewport-data/index.mjs +0 -4
  47. package/esm2020/viewport/viewport-data/viewport-data-matcher.mjs +0 -108
  48. package/esm2020/viewport/viewport-data/viewport-data.pipe.mjs +0 -43
  49. package/esm2020/viewport/viewport-data/viewport-data.service.mjs +0 -37
  50. package/esm2020/viewport/viewport-data/viewport-data.utils.mjs +0 -100
  51. package/esm2020/viewport/viewport-matcher-var.directive.mjs +0 -63
  52. package/esm2020/viewport/viewport-matcher.directive.mjs +0 -131
  53. package/esm2020/viewport/viewport-server-size.service.mjs +0 -43
  54. package/esm2020/viewport/viewport.const.mjs +0 -17
  55. package/esm2020/viewport/viewport.model.mjs +0 -30
  56. package/esm2020/viewport/viewport.service.mjs +0 -66
  57. package/esm2020/viewport/viewport.util.mjs +0 -117
  58. package/fesm2015/ssv-ngx.ux.mjs +0 -826
  59. package/fesm2015/ssv-ngx.ux.mjs.map +0 -1
  60. package/fesm2020/ssv-ngx.ux.mjs +0 -820
  61. package/fesm2020/ssv-ngx.ux.mjs.map +0 -1
  62. package/index.d.ts +0 -4
  63. package/internal/internal.model.d.ts +0 -9
  64. package/module.d.ts +0 -19
  65. package/platform/window.d.ts +0 -13
  66. package/version.d.ts +0 -1
  67. package/viewport/index.d.ts +0 -8
  68. package/viewport/viewport-data/index.d.ts +0 -3
  69. package/viewport/viewport-data/viewport-data-matcher.d.ts +0 -32
  70. package/viewport/viewport-data/viewport-data.pipe.d.ts +0 -18
  71. package/viewport/viewport-data/viewport-data.service.d.ts +0 -20
  72. package/viewport/viewport-data/viewport-data.utils.d.ts +0 -21
  73. package/viewport/viewport-matcher-var.directive.d.ts +0 -25
  74. package/viewport/viewport-matcher.directive.d.ts +0 -33
  75. package/viewport/viewport-server-size.service.d.ts +0 -12
  76. package/viewport/viewport.const.d.ts +0 -5
  77. package/viewport/viewport.model.d.ts +0 -59
  78. package/viewport/viewport.service.d.ts +0 -37
  79. package/viewport/viewport.util.d.ts +0 -25
@@ -0,0 +1,227 @@
1
+ import { generateViewportSizeTypeInfoList, generateViewportSizeTypeInfoRefs, } from "../viewport.util";
2
+ import { ViewportSizeTypeInfo } from "../viewport.model";
3
+ import {
4
+ ViewportDataConfig,
5
+ matchViewportData as matchViewportData_,
6
+ ViewportDataMatchStrategy
7
+ } from "./viewport-data-matcher";
8
+ import { TestViewportSizeType } from "../viewport.util.spec";
9
+
10
+ type TestViewportDataConfig<T> = ViewportDataConfig<T, Partial<Record<keyof typeof TestViewportSizeType, T>>>;
11
+
12
+ const breakpoints: Record<keyof typeof TestViewportSizeType, number> = {
13
+ xsmall: 450,
14
+ small: 767,
15
+ medium: 992,
16
+ large: 1200,
17
+ hd: 1280,
18
+ fullHd: 1920,
19
+ };
20
+
21
+ const sizeTypes = generateViewportSizeTypeInfoList(breakpoints);
22
+ const sizeRefs = generateViewportSizeTypeInfoRefs(sizeTypes) as Record<keyof typeof TestViewportSizeType, ViewportSizeTypeInfo>;
23
+
24
+ const matchViewportData = <T>(
25
+ dataConfig: ViewportDataConfig<T>,
26
+ currentSizeType: ViewportSizeTypeInfo,
27
+ strategy: ViewportDataMatchStrategy,
28
+ ) => matchViewportData_<T>(dataConfig, currentSizeType, strategy, sizeTypes, sizeRefs);
29
+
30
+ describe("viewportDataMatcher", () => {
31
+
32
+ describe("matchViewportData", () => {
33
+
34
+ describe("given strategy is exact", () => {
35
+ const strategy = ViewportDataMatchStrategy.exact;
36
+ const dataConfig: TestViewportDataConfig<number> = {
37
+ default: 15,
38
+ small: 10,
39
+ large: 20,
40
+ };
41
+
42
+ describe("when type value exists", () => {
43
+
44
+ it("should return matching value", () => {
45
+ const result = matchViewportData(dataConfig, sizeRefs.small, strategy);
46
+ expect(result).toBe(dataConfig.small);
47
+ });
48
+ });
49
+
50
+ describe("when type value does not exists", () => {
51
+
52
+ it("should return default", () => {
53
+ const result = matchViewportData(dataConfig, sizeRefs.hd, strategy);
54
+ expect(result).toBe(dataConfig.default);
55
+ });
56
+ });
57
+
58
+ });
59
+
60
+
61
+ describe("given strategy is larger (up)", () => {
62
+ const strategy = ViewportDataMatchStrategy.larger;
63
+ const dataConfig: TestViewportDataConfig<number> = {
64
+ default: 15,
65
+ small: 10,
66
+ large: 20,
67
+ hd: 25,
68
+ };
69
+
70
+
71
+ describe("when matching is largest", () => {
72
+ it("should return match", () => {
73
+ const result = matchViewportData(dataConfig, sizeRefs.hd, strategy);
74
+ expect(result).toBe(dataConfig.hd);
75
+ });
76
+ });
77
+
78
+ describe("when matching not exist but larger exists", () => {
79
+ it("should return first match larger value", () => {
80
+ const result = matchViewportData(dataConfig, sizeRefs.medium, strategy);
81
+ expect(result).toBe(dataConfig.large);
82
+ });
83
+ });
84
+
85
+ describe("when type is larger than data defined", () => {
86
+ it("should return default", () => {
87
+ const result = matchViewportData(dataConfig, sizeRefs.fullHd, strategy);
88
+ expect(result).toBe(dataConfig.default);
89
+ });
90
+ });
91
+
92
+ describe("when type defined index far apart", () => {
93
+ it("should return largest", () => {
94
+ const result = matchViewportData({ default: dataConfig.default, hd: dataConfig.hd }, sizeRefs.xsmall, strategy);
95
+ expect(result).toBe(25);
96
+ });
97
+ });
98
+
99
+ });
100
+
101
+
102
+ describe("given strategy is smaller (down)", () => {
103
+ const dataConfig: TestViewportDataConfig<number> = {
104
+ default: 15,
105
+ small: 10,
106
+ large: 20,
107
+ hd: 25,
108
+ };
109
+ const strategy = ViewportDataMatchStrategy.smaller;
110
+
111
+ describe("when matching is smallest", () => {
112
+ it("should return match", () => {
113
+ const result = matchViewportData(dataConfig, sizeRefs.small, strategy);
114
+ expect(result).toBe(dataConfig.small);
115
+ });
116
+ });
117
+
118
+ describe("when match not exist but smaller exists", () => {
119
+ it("should return first match larger value", () => {
120
+ const result = matchViewportData(dataConfig, sizeRefs.medium, strategy);
121
+ expect(result).toBe(dataConfig.small);
122
+ });
123
+ });
124
+
125
+ describe("when type is smaller than data defined", () => {
126
+ it("should return default", () => {
127
+ const result = matchViewportData(dataConfig, sizeRefs.xsmall, strategy);
128
+ expect(result).toBe(dataConfig.default);
129
+ });
130
+ });
131
+
132
+ describe("when type defined index far apart", () => {
133
+ it("should return smallest", () => {
134
+ const result = matchViewportData({ default: dataConfig.default, xsmall: 5 }, sizeRefs.fullHd, strategy);
135
+ expect(result).toBe(5);
136
+ });
137
+ });
138
+
139
+ });
140
+
141
+
142
+ describe("given strategy is closestSmallerFirst (down)", () => {
143
+ const dataConfig: TestViewportDataConfig<number> = {
144
+ default: 15,
145
+ small: 10,
146
+ large: 20,
147
+ hd: 25,
148
+ };
149
+ const strategy = ViewportDataMatchStrategy.closestSmallerFirst;
150
+
151
+ describe("when closest is smaller", () => {
152
+ it("should return smaller", () => {
153
+ const result = matchViewportData(dataConfig, sizeRefs.medium, strategy);
154
+ expect(result).toBe(dataConfig.small);
155
+ });
156
+ });
157
+
158
+ describe("when closest is smaller and current not specified", () => {
159
+ it("should return smaller", () => {
160
+ const result = matchViewportData(dataConfig, sizeRefs.fullHd, strategy);
161
+ expect(result).toBe(dataConfig.hd);
162
+ });
163
+ });
164
+
165
+ describe("when closest is larger", () => {
166
+ it("should return larger", () => {
167
+ const result = matchViewportData({
168
+ default: 15,
169
+ xsmall: 5, // -3
170
+ small: undefined,
171
+ medium: undefined,
172
+ large: undefined, // <--
173
+ hd: undefined,
174
+ fullHd: 20, // +2
175
+ }, sizeRefs.large, strategy);
176
+ expect(result).toBe(20);
177
+ });
178
+ });
179
+
180
+ });
181
+
182
+
183
+ describe("given strategy is closestLargerFirst (up)", () => {
184
+ const dataConfig: TestViewportDataConfig<number> = {
185
+ default: 15,
186
+ small: 10,
187
+ large: 20,
188
+ hd: 25,
189
+ };
190
+ const strategy = ViewportDataMatchStrategy.closestLargerFirst;
191
+
192
+ describe("when closest is larger", () => {
193
+ it("should return larger", () => {
194
+ const result = matchViewportData(dataConfig, sizeRefs.medium, strategy);
195
+ expect(result).toBe(dataConfig.large);
196
+ });
197
+ });
198
+
199
+ describe("when closest is larger and current not specified", () => {
200
+ it("should return larger", () => {
201
+ const result = matchViewportData(dataConfig, sizeRefs.xsmall, strategy);
202
+ expect(result).toBe(dataConfig.small);
203
+ });
204
+ });
205
+
206
+ describe("when closest is smaller", () => {
207
+ it("should return smaller", () => {
208
+ const result = matchViewportData({
209
+ default: 15,
210
+ xsmall: 5, // -2
211
+ small: undefined,
212
+ medium: undefined, // <--
213
+ large: undefined,
214
+ hd: undefined,
215
+ fullHd: 20, // +3
216
+ }, sizeRefs.medium, strategy);
217
+ expect(result).toBe(5);
218
+ });
219
+ });
220
+
221
+ });
222
+
223
+
224
+ });
225
+
226
+
227
+ });
@@ -0,0 +1,175 @@
1
+ import type { Dictionary } from "../../internal/internal.model";
2
+ import type { ViewportSizeTypeInfo } from "../viewport.model";
3
+
4
+ export type ViewportDataConfig<TValue = unknown, TData = Dictionary<TValue>> = TData & {
5
+ default?: TValue
6
+ };
7
+
8
+ export enum ViewportDataMatchStrategy {
9
+ /** Indicates that size should match exact or default. */
10
+ exact,
11
+
12
+ /** Indicates that size matches when exact match, first match smaller (down) or default. */
13
+ smaller,
14
+
15
+ /** Indicates that size matches when exact match, first match larger (up) or default. */
16
+ larger,
17
+
18
+ /** Indicates that size matches when exact match, or it tries both smaller/larger (smaller is preferred) until match or default. */
19
+ closestSmallerFirst,
20
+
21
+ /** Indicates that size matches when exact match, or it tries both larger/smaller (larger is preferred) until match or default. */
22
+ closestLargerFirst,
23
+ }
24
+ export type ViewportDataMatchStrategyLiteral = keyof typeof ViewportDataMatchStrategy;
25
+
26
+ export interface ViewportDataMatcher<T = unknown> {
27
+ (
28
+ dataConfig: ViewportDataConfig<T>,
29
+ currentSizeType: ViewportSizeTypeInfo,
30
+ sizeTypes: ViewportSizeTypeInfo[],
31
+ sizeTypeMap: Dictionary<ViewportSizeTypeInfo>,
32
+ ): T | undefined;
33
+ }
34
+
35
+ /**
36
+ * Utility function to match data based on strategy and size.
37
+ *
38
+ * @param dataConfig Data config to generate rules based on.
39
+ * @param sizeType Size type to get data for.
40
+ * @param strategy Strategy to use when building rules.
41
+ * @param sizeTypes Available size types ordered by index type. (Can be obtained from `ViewportService`)
42
+ * @param sizeTypeMap Available size type map. (Can be obtained from `ViewportService`)
43
+ * @returns Returns the matched data value.
44
+ */
45
+ export function matchViewportData<T>(
46
+ dataConfig: ViewportDataConfig<T>,
47
+ sizeType: ViewportSizeTypeInfo,
48
+ strategy: ViewportDataMatchStrategy,
49
+ sizeTypes: ViewportSizeTypeInfo[],
50
+ sizeTypeMap: Dictionary<ViewportSizeTypeInfo>,
51
+ ): T | undefined {
52
+ const matchFn = matchStrategyHandlerMap[strategy];
53
+ if (!matchFn) {
54
+ throw Error(`matchViewportData: Viewport Data strategy not implemented. Strategy: '${strategy}'`);
55
+ }
56
+ const data = matchFn(dataConfig, sizeType, sizeTypes, sizeTypeMap) as T;
57
+ if (data !== undefined) {
58
+ return data;
59
+ }
60
+ return dataConfig.default;
61
+ }
62
+
63
+
64
+ const matchStrategyHandlerMap: Dictionary<ViewportDataMatcher> = {
65
+ [ViewportDataMatchStrategy.exact]: matchWithExact,
66
+ [ViewportDataMatchStrategy.larger]: matchWithLargerMatch,
67
+ [ViewportDataMatchStrategy.smaller]: matchWithSmallerMatch,
68
+ [ViewportDataMatchStrategy.closestSmallerFirst]: matchWithClosestSmallerFirstMatch,
69
+ [ViewportDataMatchStrategy.closestLargerFirst]: matchWithClosestLargerFirstMatch,
70
+ };
71
+
72
+ function matchWithExact<T>(
73
+ dataConfig: ViewportDataConfig<T>,
74
+ currentSizeType: ViewportSizeTypeInfo,
75
+ ): T | undefined {
76
+ return dataConfig[currentSizeType.name];
77
+ }
78
+
79
+ function matchWithLargerMatch<T>(
80
+ dataConfig: ViewportDataConfig<T>,
81
+ currentSizeType: ViewportSizeTypeInfo,
82
+ sizeTypes: ViewportSizeTypeInfo[],
83
+ ): T | undefined {
84
+ let data = dataConfig[currentSizeType.name];
85
+ if (data !== undefined) {
86
+ return data;
87
+ }
88
+
89
+ const largestTypeIdx = sizeTypes[sizeTypes.length - 1].type;
90
+ if (currentSizeType.type >= largestTypeIdx) {
91
+ return undefined;
92
+ }
93
+
94
+ for (let index = currentSizeType.type; index < sizeTypes.length; index++) {
95
+ const sizeType = sizeTypes[index];
96
+ data = dataConfig[sizeType.name];
97
+ if (data !== undefined) {
98
+ return data;
99
+ }
100
+ }
101
+
102
+ return undefined;
103
+ }
104
+
105
+ function matchWithSmallerMatch<T>(
106
+ dataConfig: ViewportDataConfig<T>,
107
+ currentSizeType: ViewportSizeTypeInfo,
108
+ sizeTypes: ViewportSizeTypeInfo[],
109
+ ): T | undefined {
110
+ let data = dataConfig[currentSizeType.name];
111
+ if (data !== undefined) {
112
+ return data;
113
+ }
114
+
115
+ if (currentSizeType.type <= 0) {
116
+ return undefined;
117
+ }
118
+
119
+ // eslint-disable-next-line for-direction
120
+ for (let index = currentSizeType.type; index < sizeTypes.length; index--) {
121
+ const sizeType = sizeTypes[index];
122
+ data = dataConfig[sizeType.name];
123
+ if (data !== undefined) {
124
+ return data;
125
+ }
126
+ }
127
+
128
+ return undefined;
129
+ }
130
+
131
+ function matchWithClosestSmallerFirstMatch<T>(
132
+ dataConfig: ViewportDataConfig<T>,
133
+ currentSizeType: ViewportSizeTypeInfo,
134
+ sizeTypes: ViewportSizeTypeInfo[],
135
+ ): T | undefined {
136
+ return closestMatch(dataConfig, currentSizeType, sizeTypes, true);
137
+ }
138
+
139
+ function matchWithClosestLargerFirstMatch<T>(
140
+ dataConfig: ViewportDataConfig<T>,
141
+ currentSizeType: ViewportSizeTypeInfo,
142
+ sizeTypes: ViewportSizeTypeInfo[],
143
+ ): T | undefined {
144
+ return closestMatch(dataConfig, currentSizeType, sizeTypes, false);
145
+ }
146
+
147
+ function closestMatch<T>(
148
+ dataConfig: ViewportDataConfig<T>,
149
+ currentSizeType: ViewportSizeTypeInfo,
150
+ sizeTypes: ViewportSizeTypeInfo[],
151
+ isSmallerFirst: boolean
152
+ ): T | undefined {
153
+ let data = dataConfig[currentSizeType.name];
154
+ if (data !== undefined) {
155
+ return data;
156
+ }
157
+
158
+ let downIndex = currentSizeType.type;
159
+ let upIndex = currentSizeType.type;
160
+
161
+
162
+ for (let index = 0; index < sizeTypes.length; index++) {
163
+ for (const idx of isSmallerFirst ? [--downIndex, ++upIndex] : [++upIndex, --downIndex]) {
164
+ const sizeType = sizeTypes[idx];
165
+ if (sizeType) {
166
+ data = dataConfig[sizeType.name];
167
+ if (data !== undefined) {
168
+ return data;
169
+ }
170
+ }
171
+ }
172
+ }
173
+
174
+ return undefined;
175
+ }
@@ -0,0 +1,51 @@
1
+ import { Subscription, tap } from "rxjs";
2
+ import { Pipe, PipeTransform, OnDestroy, ChangeDetectorRef } from "@angular/core";
3
+
4
+ import { ViewportDataConfig, ViewportDataMatchStrategy, ViewportDataMatchStrategyLiteral } from "./viewport-data-matcher";
5
+ import { ViewportDataService } from "./viewport-data.service";
6
+
7
+
8
+ @Pipe({
9
+ name: "ssvViewportData",
10
+ pure: false,
11
+ standalone: true,
12
+ })
13
+ export class ViewportDataPipe implements PipeTransform, OnDestroy {
14
+
15
+ private markForTransform = true;
16
+ private value: unknown;
17
+ private data: ViewportDataConfig | undefined;
18
+ private strategy: ViewportDataMatchStrategyLiteral | undefined;
19
+ private data$$ = Subscription.EMPTY;
20
+
21
+ constructor(
22
+ private viewportData: ViewportDataService,
23
+ private cdr: ChangeDetectorRef
24
+ ) {
25
+ }
26
+
27
+ transform(data: ViewportDataConfig, strategy: ViewportDataMatchStrategyLiteral): unknown {
28
+ if (!this.markForTransform && data === this.data && strategy === this.strategy) {
29
+ return this.value;
30
+ }
31
+ this.data = data;
32
+ this.strategy = strategy;
33
+
34
+ this.data$$.unsubscribe();
35
+ this.data$$ = this.viewportData.get$(data, ViewportDataMatchStrategy[strategy]).pipe(
36
+ tap(value => {
37
+ this.markForTransform = true;
38
+ this.value = value;
39
+ this.cdr.markForCheck();
40
+ }),
41
+ ).subscribe();
42
+
43
+ this.markForTransform = false;
44
+ return this.value;
45
+ }
46
+
47
+ ngOnDestroy(): void {
48
+ this.data$$.unsubscribe();
49
+ }
50
+
51
+ }
@@ -0,0 +1,48 @@
1
+ import { inject, Injectable } from "@angular/core";
2
+ import { Observable, distinctUntilChanged, map } from "rxjs";
3
+
4
+ import { ViewportSizeTypeInfo } from "../viewport.model";
5
+ import { ViewportService } from "../viewport.service";
6
+ import { matchViewportData, ViewportDataConfig, ViewportDataMatchStrategy } from "./viewport-data-matcher";
7
+ import { generateViewportRulesRangeFromDataMatcher, ViewportDataRule } from "./viewport-data.utils";
8
+ import { VIEWPORT_OPTIONS } from "../viewport.options";
9
+
10
+ @Injectable({
11
+ providedIn: "root",
12
+ })
13
+ export class ViewportDataService {
14
+
15
+ private readonly viewport = inject(ViewportService);
16
+ private readonly config = inject(VIEWPORT_OPTIONS);
17
+
18
+ /** Get data for match. */
19
+ get<T>(
20
+ dataConfig: ViewportDataConfig<T>,
21
+ strategy: ViewportDataMatchStrategy = this.config.defaultDataMatchStrategy,
22
+ sizeType: ViewportSizeTypeInfo = this.viewport.sizeTypeSnapshot
23
+ ): T | undefined {
24
+ return matchViewportData(dataConfig, sizeType, strategy, this.viewport.sizeTypes, this.viewport.sizeTypeMap);
25
+ }
26
+
27
+ /** Get data for match as observable. */
28
+ get$<T>(dataConfig: ViewportDataConfig<T>, strategy?: ViewportDataMatchStrategy, throttle = true): Observable<T | undefined> {
29
+ return (throttle ? this.viewport.sizeType$ : this.viewport.sizeTypeSnap$).pipe(
30
+ map(sizeType => this.get<T>(dataConfig, strategy, sizeType)),
31
+ distinctUntilChanged(),
32
+ );
33
+ }
34
+
35
+ /** Generate rules based on strategies for data. */
36
+ generateRules<T>(
37
+ dataConfig: ViewportDataConfig<T>,
38
+ strategy: ViewportDataMatchStrategy = this.config.defaultDataMatchStrategy,
39
+ ): ViewportDataRule<T>[] {
40
+ return generateViewportRulesRangeFromDataMatcher(
41
+ dataConfig,
42
+ strategy,
43
+ this.viewport.sizeTypes,
44
+ this.viewport.sizeTypeMap
45
+ );
46
+ }
47
+
48
+ }