@ssv/ngx.ux 3.0.0-dev.35 → 3.0.0-dev.38
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/esm2022/index.mjs +4 -0
- package/esm2022/internal/internal.model.mjs +2 -0
- package/esm2022/platform/window.mjs +31 -0
- package/esm2022/ssv-ngx.ux.mjs +5 -0
- package/esm2022/ux.module.mjs +19 -0
- package/esm2022/version.mjs +2 -0
- package/esm2022/viewport/index.mjs +10 -0
- package/esm2022/viewport/viewport-data/index.mjs +4 -0
- package/esm2022/viewport/viewport-data/viewport-data-matcher.mjs +107 -0
- package/esm2022/viewport/viewport-data/viewport-data.pipe.mjs +48 -0
- package/esm2022/viewport/viewport-data/viewport-data.service.mjs +32 -0
- package/esm2022/viewport/viewport-data/viewport-data.utils.mjs +100 -0
- package/esm2022/viewport/viewport-matcher-var.directive.mjs +69 -0
- package/esm2022/viewport/viewport-matcher.directive.mjs +136 -0
- package/esm2022/viewport/viewport-server-size.service.mjs +37 -0
- package/esm2022/viewport/viewport.model.mjs +30 -0
- package/esm2022/viewport/viewport.module.mjs +27 -0
- package/esm2022/viewport/viewport.options.mjs +51 -0
- package/esm2022/viewport/viewport.service.mjs +82 -0
- package/esm2022/viewport/viewport.util.mjs +117 -0
- package/fesm2022/ssv-ngx.ux.mjs +846 -0
- package/fesm2022/ssv-ngx.ux.mjs.map +1 -0
- package/{src/index.ts → index.d.ts} +0 -1
- package/{src/internal/internal.model.ts → internal/internal.model.d.ts} +1 -1
- package/package.json +18 -3
- package/platform/window.d.ts +13 -0
- package/ux.module.d.ts +7 -0
- package/version.d.ts +1 -0
- package/{src/viewport/index.ts → viewport/index.d.ts} +1 -12
- package/viewport/viewport-data/viewport-data-matcher.d.ts +32 -0
- package/viewport/viewport-data/viewport-data.pipe.d.ts +18 -0
- package/viewport/viewport-data/viewport-data.service.d.ts +17 -0
- package/viewport/viewport-data/viewport-data.utils.d.ts +21 -0
- package/viewport/viewport-matcher-var.directive.d.ts +25 -0
- package/viewport/viewport-matcher.directive.d.ts +33 -0
- package/viewport/viewport-server-size.service.d.ts +10 -0
- package/viewport/viewport.model.d.ts +47 -0
- package/viewport/viewport.module.d.ts +9 -0
- package/viewport/viewport.options.d.ts +19 -0
- package/viewport/viewport.service.d.ts +36 -0
- package/viewport/viewport.util.d.ts +25 -0
- package/eslint.config.js +0 -43
- package/index.ts +0 -1
- package/jest.config.ts +0 -21
- package/ng-package.json +0 -7
- package/project.json +0 -36
- package/src/platform/window.ts +0 -31
- package/src/test-setup.ts +0 -8
- package/src/ux.module.ts +0 -15
- package/src/version.ts +0 -1
- package/src/viewport/viewport-data/README.md +0 -47
- package/src/viewport/viewport-data/viewport-data-matcher.spec.ts +0 -227
- package/src/viewport/viewport-data/viewport-data-matcher.ts +0 -175
- package/src/viewport/viewport-data/viewport-data.pipe.ts +0 -51
- package/src/viewport/viewport-data/viewport-data.service.ts +0 -48
- package/src/viewport/viewport-data/viewport-data.utils.spec.ts +0 -228
- package/src/viewport/viewport-data/viewport-data.utils.ts +0 -137
- package/src/viewport/viewport-matcher-var.directive.ts +0 -85
- package/src/viewport/viewport-matcher.directive.ts +0 -170
- package/src/viewport/viewport-server-size.service.ts +0 -37
- package/src/viewport/viewport.model.ts +0 -54
- package/src/viewport/viewport.module.ts +0 -19
- package/src/viewport/viewport.options.ts +0 -74
- package/src/viewport/viewport.service.ts +0 -123
- package/src/viewport/viewport.util.spec.ts +0 -254
- package/src/viewport/viewport.util.ts +0 -152
- package/tsconfig.json +0 -28
- package/tsconfig.lib.json +0 -12
- package/tsconfig.lib.prod.json +0 -9
- package/tsconfig.spec.json +0 -11
- /package/{src/viewport/viewport-data/index.ts → viewport/viewport-data/index.d.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ssv-ngx.ux.mjs","sources":["../../../../libs/ngx.ux/src/viewport/viewport-data/viewport-data-matcher.ts","../../../../libs/ngx.ux/src/platform/window.ts","../../../../libs/ngx.ux/src/viewport/viewport.model.ts","../../../../libs/ngx.ux/src/viewport/viewport-server-size.service.ts","../../../../libs/ngx.ux/src/viewport/viewport.util.ts","../../../../libs/ngx.ux/src/viewport/viewport.options.ts","../../../../libs/ngx.ux/src/viewport/viewport.service.ts","../../../../libs/ngx.ux/src/viewport/viewport-data/viewport-data.utils.ts","../../../../libs/ngx.ux/src/viewport/viewport-data/viewport-data.service.ts","../../../../libs/ngx.ux/src/viewport/viewport-data/viewport-data.pipe.ts","../../../../libs/ngx.ux/src/viewport/viewport-matcher-var.directive.ts","../../../../libs/ngx.ux/src/viewport/viewport-matcher.directive.ts","../../../../libs/ngx.ux/src/viewport/viewport.module.ts","../../../../libs/ngx.ux/src/ux.module.ts","../../../../libs/ngx.ux/src/version.ts","../../../../libs/ngx.ux/src/ssv-ngx.ux.ts"],"sourcesContent":["import type { Dictionary } from \"../../internal/internal.model\";\nimport type { ViewportSizeTypeInfo } from \"../viewport.model\";\n\nexport type ViewportDataConfig<TValue = unknown, TData = Dictionary<TValue>> = TData & {\n\tdefault?: TValue\n};\n\nexport enum ViewportDataMatchStrategy {\n\t/** Indicates that size should match exact or default. */\n\texact,\n\n\t/** Indicates that size matches when exact match, first match smaller (down) or default. */\n\tsmaller,\n\n\t/** Indicates that size matches when exact match, first match larger (up) or default. */\n\tlarger,\n\n\t/** Indicates that size matches when exact match, or it tries both smaller/larger (smaller is preferred) until match or default. */\n\tclosestSmallerFirst,\n\n\t/** Indicates that size matches when exact match, or it tries both larger/smaller (larger is preferred) until match or default. */\n\tclosestLargerFirst,\n}\nexport type ViewportDataMatchStrategyLiteral = keyof typeof ViewportDataMatchStrategy;\n\nexport interface ViewportDataMatcher<T = unknown> {\n\t(\n\t\tdataConfig: ViewportDataConfig<T>,\n\t\tcurrentSizeType: ViewportSizeTypeInfo,\n\t\tsizeTypes: ViewportSizeTypeInfo[],\n\t\tsizeTypeMap: Dictionary<ViewportSizeTypeInfo>,\n\t): T | undefined;\n}\n\n/**\n * Utility function to match data based on strategy and size.\n *\n * @param dataConfig Data config to generate rules based on.\n * @param sizeType Size type to get data for.\n * @param strategy Strategy to use when building rules.\n * @param sizeTypes Available size types ordered by index type. (Can be obtained from `ViewportService`)\n * @param sizeTypeMap Available size type map. (Can be obtained from `ViewportService`)\n * @returns Returns the matched data value.\n */\nexport function matchViewportData<T>(\n\tdataConfig: ViewportDataConfig<T>,\n\tsizeType: ViewportSizeTypeInfo,\n\tstrategy: ViewportDataMatchStrategy,\n\tsizeTypes: ViewportSizeTypeInfo[],\n\tsizeTypeMap: Dictionary<ViewportSizeTypeInfo>,\n): T | undefined {\n\tconst matchFn = matchStrategyHandlerMap[strategy];\n\tif (!matchFn) {\n\t\tthrow Error(`matchViewportData: Viewport Data strategy not implemented. Strategy: '${strategy}'`);\n\t}\n\tconst data = matchFn(dataConfig, sizeType, sizeTypes, sizeTypeMap) as T;\n\tif (data !== undefined) {\n\t\treturn data;\n\t}\n\treturn dataConfig.default;\n}\n\n\nconst matchStrategyHandlerMap: Dictionary<ViewportDataMatcher> = {\n\t[ViewportDataMatchStrategy.exact]: matchWithExact,\n\t[ViewportDataMatchStrategy.larger]: matchWithLargerMatch,\n\t[ViewportDataMatchStrategy.smaller]: matchWithSmallerMatch,\n\t[ViewportDataMatchStrategy.closestSmallerFirst]: matchWithClosestSmallerFirstMatch,\n\t[ViewportDataMatchStrategy.closestLargerFirst]: matchWithClosestLargerFirstMatch,\n};\n\nfunction matchWithExact<T>(\n\tdataConfig: ViewportDataConfig<T>,\n\tcurrentSizeType: ViewportSizeTypeInfo,\n): T | undefined {\n\treturn dataConfig[currentSizeType.name];\n}\n\nfunction matchWithLargerMatch<T>(\n\tdataConfig: ViewportDataConfig<T>,\n\tcurrentSizeType: ViewportSizeTypeInfo,\n\tsizeTypes: ViewportSizeTypeInfo[],\n): T | undefined {\n\tlet data = dataConfig[currentSizeType.name];\n\tif (data !== undefined) {\n\t\treturn data;\n\t}\n\n\tconst largestTypeIdx = sizeTypes[sizeTypes.length - 1].type;\n\tif (currentSizeType.type >= largestTypeIdx) {\n\t\treturn undefined;\n\t}\n\n\tfor (let index = currentSizeType.type; index < sizeTypes.length; index++) {\n\t\tconst sizeType = sizeTypes[index];\n\t\tdata = dataConfig[sizeType.name];\n\t\tif (data !== undefined) {\n\t\t\treturn data;\n\t\t}\n\t}\n\n\treturn undefined;\n}\n\nfunction matchWithSmallerMatch<T>(\n\tdataConfig: ViewportDataConfig<T>,\n\tcurrentSizeType: ViewportSizeTypeInfo,\n\tsizeTypes: ViewportSizeTypeInfo[],\n): T | undefined {\n\tlet data = dataConfig[currentSizeType.name];\n\tif (data !== undefined) {\n\t\treturn data;\n\t}\n\n\tif (currentSizeType.type <= 0) {\n\t\treturn undefined;\n\t}\n\n\t// eslint-disable-next-line for-direction\n\tfor (let index = currentSizeType.type; index < sizeTypes.length; index--) {\n\t\tconst sizeType = sizeTypes[index];\n\t\tdata = dataConfig[sizeType.name];\n\t\tif (data !== undefined) {\n\t\t\treturn data;\n\t\t}\n\t}\n\n\treturn undefined;\n}\n\nfunction matchWithClosestSmallerFirstMatch<T>(\n\tdataConfig: ViewportDataConfig<T>,\n\tcurrentSizeType: ViewportSizeTypeInfo,\n\tsizeTypes: ViewportSizeTypeInfo[],\n): T | undefined {\n\treturn closestMatch(dataConfig, currentSizeType, sizeTypes, true);\n}\n\nfunction matchWithClosestLargerFirstMatch<T>(\n\tdataConfig: ViewportDataConfig<T>,\n\tcurrentSizeType: ViewportSizeTypeInfo,\n\tsizeTypes: ViewportSizeTypeInfo[],\n): T | undefined {\n\treturn closestMatch(dataConfig, currentSizeType, sizeTypes, false);\n}\n\nfunction closestMatch<T>(\n\tdataConfig: ViewportDataConfig<T>,\n\tcurrentSizeType: ViewportSizeTypeInfo,\n\tsizeTypes: ViewportSizeTypeInfo[],\n\tisSmallerFirst: boolean\n): T | undefined {\n\tlet data = dataConfig[currentSizeType.name];\n\tif (data !== undefined) {\n\t\treturn data;\n\t}\n\n\tlet downIndex = currentSizeType.type;\n\tlet upIndex = currentSizeType.type;\n\n\t \n\tfor (let index = 0; index < sizeTypes.length; index++) {\n\t\tfor (const idx of isSmallerFirst ? [--downIndex, ++upIndex] : [++upIndex, --downIndex]) {\n\t\t\tconst sizeType = sizeTypes[idx];\n\t\t\tif (sizeType) {\n\t\t\t\tdata = dataConfig[sizeType.name];\n\t\t\t\tif (data !== undefined) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn undefined;\n}\n","import { InjectionToken, Injectable, inject } from \"@angular/core\";\n\nexport const WINDOW = new InjectionToken<Window>(\"Window\", {\n\tfactory: () => _window() as Window,\n});\n\nexport function _window(): unknown {\n\tif (typeof window !== \"undefined\") {\n\t\treturn window;\n\t}\n\treturn {};\n}\n\n@Injectable({\n\tprovidedIn: \"root\",\n})\nexport class WindowRef {\n\n\tprivate readonly window = inject(WINDOW);\n\n\t/** Window underlying native object. */\n\tget native(): Window {\n\t\treturn this.window as Window;\n\t}\n\n\t/** Determines whether native element is supported or not. Generally `false` when executing in SSR. */\n\tget hasNative(): boolean {\n\t\treturn !!this.native.window;\n\t}\n\n}\n","/**\n * The indices of each breakpoint provided based on the `UX_VIEWPORT_DEFAULT_BREAKPOINTS`.\n * @see UX_VIEWPORT_DEFAULT_BREAKPOINTS\n */\nexport enum ViewportSizeType {\n\txsmall = 0,\n\tsmall = 1,\n\tmedium = 2,\n\tlarge = 3,\n\txlarge = 4,\n\txxlarge = 5,\n\txxlarge1 = 6,\n}\n\nexport enum ComparisonOperation {\n\tequals = \"=\",\n\tnotEquals = \"<>\",\n\tlessThan = \"<\",\n\tlessOrEqualThan = \"<=\",\n\tgreaterThan = \">\",\n\tgreaterOrEqualThan = \">=\",\n}\n\nexport type ComparisonOperationKeyType = keyof typeof ComparisonOperation;\nexport type ComparisonOperationValueType = \"=\" | \"<>\" | \"<\" | \"<=\" | \">\" | \">=\"; // todo: find a better way to do this\nexport type ComparisonOperationLiteral = ComparisonOperationKeyType | ComparisonOperationValueType;\n\nexport enum DeviceType {\n\tdesktop = \"desktop\",\n\tmobile = \"mobile\",\n\ttablet = \"tablet\"\n}\n\nexport interface ViewportSize {\n\twidth: number;\n\theight: number;\n}\n\nexport interface ViewportSizeTypeInfo {\n\ttype: number;\n\tname: string;\n\twidthThreshold: number;\n}\n\nexport interface ViewportMatchConditions {\n\tsizeType?: string | string[] | null;\n\tsizeTypeExclude?: string | string[] | null;\n\texpression?: ViewportSizeMatcherExpression;\n}\n\nexport interface ViewportSizeMatcherExpression {\n\tsize: string;\n\toperation: ComparisonOperationLiteral;\n}\n","import { Injectable, InjectionToken, inject } from \"@angular/core\";\n\nimport { DeviceType, ViewportSize } from \"./viewport.model\";\n\n// todo: make this configurable\n/** Viewport size for SSR. */\nconst viewportSizeSSR: Record<DeviceType, ViewportSize> = {\n\t[DeviceType.desktop]: {\n\t\twidth: 1366,\n\t\theight: 768,\n\t},\n\t[DeviceType.tablet]: {\n\t\twidth: 768,\n\t\theight: 1024,\n\t},\n\t[DeviceType.mobile]: {\n\t\twidth: 414,\n\t\theight: 736,\n\t},\n};\n\nexport const VIEWPORT_SSR_DEVICE = new InjectionToken<DeviceType>(\"UX_VIEWPORT_SSR_DEVICE\", {\n\tfactory: () => DeviceType.desktop,\n});\n\n@Injectable({\n\tprovidedIn: \"root\",\n})\nexport class ViewportServerSizeService {\n\n\tprivate readonly deviceType = inject(VIEWPORT_SSR_DEVICE);\n\n\tget(): ViewportSize {\n\t\treturn viewportSizeSSR[this.deviceType] || viewportSizeSSR[DeviceType.desktop];\n\t}\n\n}\n","import { Dictionary } from \"../internal/internal.model\";\nimport {\n\tComparisonOperation,\n\tViewportSizeMatcherExpression,\n\tViewportSizeTypeInfo,\n\tViewportMatchConditions\n} from \"./viewport.model\";\n\nexport function isViewportSizeMatcherExpression(value: unknown): value is ViewportSizeMatcherExpression {\n\tif (typeof value !== \"object\" || !value) {\n\t\treturn false;\n\t}\n\tconst args: Partial<ViewportSizeMatcherExpression> = value;\n\tif (args.size && args.operation) {\n\t\treturn true;\n\t}\n\treturn false;\n}\n\nexport function isViewportSizeMatcherTupleExpression(arg: unknown): arg is [ComparisonOperation, string] {\n\tif (!arg) {\n\t\treturn false;\n\t}\n\tif (Array.isArray(arg)) {\n\t\tif (arg.length === 2) {\n\t\t\tconst [op] = arg;\n\t\t\treturn operations.includes(op);\n\t\t}\n\t}\n\treturn false;\n}\n\n\nconst operations = Object.values(ComparisonOperation);\n\nexport const COMPARISON_OPERATION_FUNC_MAPPING: Dictionary<(a: number, b: number) => boolean> = {\n\t[ComparisonOperation.equals]: (a: number, b: number) => a === b,\n\t[ComparisonOperation.notEquals]: (a: number, b: number) => a !== b,\n\t[ComparisonOperation.lessThan]: (a: number, b: number) => a < b,\n\t[ComparisonOperation.lessOrEqualThan]: (a: number, b: number) => a <= b,\n\t[ComparisonOperation.greaterThan]: (a: number, b: number) => a > b,\n\t[ComparisonOperation.greaterOrEqualThan]: (a: number, b: number) => a >= b,\n};\n\nexport function isViewportConditionMatch(\n\tevaluateSize: ViewportSizeTypeInfo,\n\tconditions: ViewportMatchConditions,\n\tviewportSizeTypeInfoRefs: Dictionary<ViewportSizeTypeInfo>\n): boolean {\n\tconst isExcluded = match(conditions.sizeTypeExclude, evaluateSize.name, false);\n\tlet isIncluded;\n\tlet isExpressionTruthy;\n\n\tif (!isExcluded && conditions.expression) {\n\t\tconst ref = viewportSizeTypeInfoRefs[conditions.expression.size];\n\t\tif(!ref) {\n\t\t\tthrow new Error(`Viewport size type is invalid. Size type: '${conditions.expression.size}'`);\n\t\t}\n\t\tconst expMatcher = COMPARISON_OPERATION_FUNC_MAPPING[conditions.expression.operation];\n\n\t\tisExpressionTruthy = expMatcher(evaluateSize.type, ref.type);\n\t} else {\n\t\tisIncluded = match(conditions.sizeType, evaluateSize.name, true);\n\t}\n\n\tconst shouldRender = (isExpressionTruthy || isIncluded) && !isExcluded;\n\t// console.warn(\">>> shouldRender\", { evaluateSize, conditions, shouldRender });\n\treturn !!shouldRender;\n}\n\nfunction match(value: string | string[] | null | undefined, targetValue: string, defaultValue: boolean) {\n\tif (!value) {\n\t\treturn defaultValue;\n\t}\n\n\treturn Array.isArray(value)\n\t\t? value.includes(targetValue)\n\t\t: value === targetValue;\n}\n\nexport function getSizeTypeInfo(width: number, sizeTypes: ViewportSizeTypeInfo[]): ViewportSizeTypeInfo {\n\tconst lastEntryIndex = sizeTypes.length - 1;\n\n\tfor (let idx = 0; idx < lastEntryIndex; idx++) {\n\t\tconst viewportSizeTypeInfo = sizeTypes[idx];\n\n\t\tif (width <= viewportSizeTypeInfo.widthThreshold) {\n\t\t\treturn viewportSizeTypeInfo;\n\t\t}\n\t}\n\n\treturn sizeTypes[lastEntryIndex];\n}\n\n/**\n * Converts the breakpoints into a 2 dimensional array containing the name and width, and sorted from\n * smallest to largest.\n * @param breakpoints the breakpoints obtained from the config\n * @internal\n */\nfunction getSortedBreakpoints(breakpoints: Dictionary<number>): [string, number][] {\n\treturn Object.entries(breakpoints)\n\t\t.sort(([, widthA], [, widthB]) => widthA - widthB);\n}\n\n/**\n * A util function which generates the ViewportSizeTypeInfo.type for each breakpoint.\n * @param breakpoints the custom breakpoints\n */\nexport function generateViewportSizeType<T extends Record<string, number>>(breakpoints: T): T & Record<number, string> {\n\treturn Object.freeze(\n\t\tgetSortedBreakpoints(breakpoints).reduce<Record<number | string, string | number>>(\n\t\t\t(dictionary, [name], index) => {\n\t\t\t\tdictionary[name] = index;\n\t\t\t\tdictionary[index] = name;\n\t\t\t\treturn dictionary;\n\t\t\t}, {}\n\t\t)\n\t) as T & Record<number, string>;\n}\n\n/**\n * Pre-processes the given breakpoints into an ordered list from smallest to largest while generating\n * all the necessary information on the viewport.\n * @param breakpoints the breakpoints obtained from the config\n * @internal\n */\nexport function generateViewportSizeTypeInfoList(breakpoints: Dictionary<number>): ViewportSizeTypeInfo[] {\n\treturn getSortedBreakpoints(breakpoints)\n\t\t.map(([name, width], index) =>\n\t\t\t(Object.freeze({\n\t\t\t\tname,\n\t\t\t\ttype: index,\n\t\t\t\twidthThreshold: width\n\t\t\t}))\n\t\t);\n}\n\n/**\n * Converts the breakpoint list into a dictionary while using the name as key.\n * @param breakpointList the list of breakpoints\n * @internal\n */\nexport function generateViewportSizeTypeInfoRefs(breakpointList: ViewportSizeTypeInfo[]): Dictionary<ViewportSizeTypeInfo> {\n\treturn Object.freeze(\n\t\tbreakpointList.reduce<Dictionary<ViewportSizeTypeInfo>>((dictionary, breakpoint) => {\n\t\t\tdictionary[breakpoint.name] = breakpoint;\n\t\t\tdictionary[breakpoint.type] = breakpoint;\n\t\t\treturn dictionary;\n\t\t}, {})\n\t);\n}\n","import { type EnvironmentProviders, InjectionToken, makeEnvironmentProviders } from \"@angular/core\";\n\nimport type { Dictionary } from \"../internal/internal.model\";\nimport { ViewportDataMatchStrategy } from \"./viewport-data/viewport-data-matcher\";\nimport { VIEWPORT_SSR_DEVICE } from \"./viewport-server-size.service\";\nimport { DeviceType } from \"./viewport.model\";\n\n/** Default viewport breakpoints. */\nexport const UX_VIEWPORT_DEFAULT_BREAKPOINTS: Dictionary<number> = {\n\txsmall: 450,\n\tsmall: 767,\n\tmedium: 992,\n\tlarge: 1200,\n\txlarge: 1500,\n\txxlarge: 1920,\n\txxlarge1: 2100,\n};\n\nexport interface UxViewportOptions {\n\t/** Polling speed on resizing (in milliseconds). e.g. the higher the number the longer it takes to recalculate. */\n\tresizePollingSpeed: number;\n\n\t/** Breakpoints to use. Key needs to match the size type and the value the width threshold.\n\t * e.g. given width '1000' and `medium` is set to '992' => `large`.\n\t */\n\tbreakpoints: Dictionary<number>;\n\n\t/** Default data match strategy to use. */\n\tdefaultDataMatchStrategy: ViewportDataMatchStrategy;\n}\n\nconst DEFAULT_OPTIONS = Object.freeze<UxViewportOptions>({\n\tresizePollingSpeed: 33,\n\tbreakpoints: UX_VIEWPORT_DEFAULT_BREAKPOINTS,\n\tdefaultDataMatchStrategy: ViewportDataMatchStrategy.smaller,\n});\n\nexport const VIEWPORT_OPTIONS = new InjectionToken<UxViewportOptions>(\"SSV_UX_VIEWPORT_OPTIONS\", {\n\tfactory: () => DEFAULT_OPTIONS,\n});\n\nexport function provideSsvUxViewportOptions(\n\toptions: Partial<UxViewportOptions> | ((defaults: Readonly<UxViewportOptions>) => Partial<UxViewportOptions>),\n\t...features: EnvironmentProviders[]\n): EnvironmentProviders {\n\treturn makeEnvironmentProviders([\n\t\t{\n\t\t\tprovide: VIEWPORT_OPTIONS,\n\t\t\tuseFactory: () => {\n\t\t\t\tlet opts = typeof options === \"function\" ? options(DEFAULT_OPTIONS) : options;\n\t\t\t\topts = opts\n\t\t\t\t\t? {\n\t\t\t\t\t\t...DEFAULT_OPTIONS,\n\t\t\t\t\t\t...opts, // NOTE: breakpoints shoudn't be merged\n\t\t\t\t\t}\n\t\t\t\t\t: DEFAULT_OPTIONS;\n\t\t\t\treturn opts;\n\t\t\t},\n\t\t},\n\t\t...features,\n\t]);\n}\n\nexport function withViewportSsrDevice(options: DeviceType | (() => DeviceType)): EnvironmentProviders {\n\treturn makeEnvironmentProviders([\n\t\t{\n\t\t\tprovide: VIEWPORT_SSR_DEVICE,\n\t\t\tuseFactory: () => {\n\t\t\t\tconst deviceType = typeof options === \"function\" ? options() : options;\n\t\t\t\treturn deviceType;\n\t\t\t},\n\t\t},\n\t]);\n}","import { Injectable, inject } from \"@angular/core\";\nimport {\n\tObservable,\n\tfromEvent,\n\tof,\n\tmap,\n\ttap,\n\tdistinctUntilChanged,\n\tstartWith,\n\tshare,\n\tshareReplay,\n\tauditTime,\n} from \"rxjs\";\n\nimport { ViewportSizeTypeInfo, ViewportSize } from \"./viewport.model\";\nimport { WindowRef } from \"../platform/window\";\nimport { ViewportServerSizeService } from \"./viewport-server-size.service\";\nimport { generateViewportSizeTypeInfoList, generateViewportSizeTypeInfoRefs, getSizeTypeInfo } from \"./viewport.util\";\nimport type { Dictionary } from \"../internal/internal.model\";\nimport { VIEWPORT_OPTIONS } from \"./viewport.options\";\n\n@Injectable({\n\tprovidedIn: \"root\",\n})\nexport class ViewportService {\n\n\t/** Window resize observable. */\n\treadonly resizeSnap$: Observable<ViewportSize>;\n\n\t/** Window resize observable (which is also throttled). */\n\treadonly resize$: Observable<ViewportSize>;\n\n\t/** Viewport size type observable (which is also throttled). */\n\treadonly sizeType$: Observable<ViewportSizeTypeInfo>;\n\n\t/** Viewport size type observable. */\n\treadonly sizeTypeSnap$: Observable<ViewportSizeTypeInfo>;\n\n\t/** Viewport size type snapshot of the last value. (Prefer use `sizeType$` observable when possible.) */\n\tget sizeTypeSnapshot(): ViewportSizeTypeInfo { return this._sizeTypeSnapshot; }\n\n\t/** Viewport size observable (which is also throttled). */\n\treadonly size$: Observable<ViewportSize>;\n\n\t/** Viewport size observable. */\n\treadonly sizeSnap$: Observable<ViewportSize>;\n\n\t/** Size types refs of the generated viewport size type info. */\n\tget sizeTypeMap(): Dictionary<ViewportSizeTypeInfo> { return this._sizeTypeMap; }\n\n\t/** Viewport size types list ordered by type, smallest to largest. */\n\tget sizeTypes(): ViewportSizeTypeInfo[] { return this._sizeTypes; }\n\n\tprivate _sizeTypeMap: Dictionary<ViewportSizeTypeInfo>;\n\tprivate _sizeTypes: ViewportSizeTypeInfo[];\n\tprivate _sizeTypeSnapshot: ViewportSizeTypeInfo;\n\n\tconstructor(\n\t\tprivate windowRef: WindowRef,\n\t\tprivate viewportServerSize: ViewportServerSizeService,\n\t) {\n\t\tconst config = inject(VIEWPORT_OPTIONS);\n\t\tthis._sizeTypes = generateViewportSizeTypeInfoList(config.breakpoints);\n\t\tthis._sizeTypeMap = generateViewportSizeTypeInfoRefs(this._sizeTypes);\n\n\t\tif (windowRef.hasNative) {\n\t\t\tthis.resizeSnap$ = fromEvent<Event>(window, \"resize\").pipe(\n\t\t\t\tmap(() => this.getViewportSize()),\n\t\t\t\tshare()\n\t\t\t);\n\n\t\t\tthis.resize$ = this.resizeSnap$.pipe(\n\t\t\t\tauditTime(config.resizePollingSpeed),\n\t\t\t\tshare(),\n\t\t\t);\n\t\t} else {\n\t\t\tthis.resizeSnap$ = this.resize$ = of(viewportServerSize.get());\n\t\t}\n\t\tconst size = this.getViewportSize();\n\t\tthis._sizeTypeSnapshot = getSizeTypeInfo(size.width, this.sizeTypes);\n\n\t\tconst sizeFn = (obs$: Observable<ViewportSize>) => obs$.pipe(\n\t\t\tstartWith(size),\n\t\t\tdistinctUntilChanged((a, b) => a.width === b.width && a.height === b.height),\n\t\t\tshareReplay(1),\n\t\t);\n\n\t\tthis.sizeSnap$ = sizeFn(this.resizeSnap$);\n\t\tthis.size$ = sizeFn(this.resize$);\n\n\t\tconst sizeTypeFn = (obs$: Observable<ViewportSize>) => obs$.pipe(\n\t\t\tdistinctUntilChanged((a, b) => a.width === b.width),\n\t\t\tmap(x => getSizeTypeInfo(x.width, this.sizeTypes)),\n\t\t\tdistinctUntilChanged(),\n\t\t\ttap(x => this._sizeTypeSnapshot = x),\n\t\t\tshareReplay(1),\n\t\t);\n\n\t\tthis.sizeType$ = sizeTypeFn(this.size$);\n\t\tthis.sizeTypeSnap$ = sizeTypeFn(this.sizeSnap$);\n\t}\n\n\t/** Returns the current viewport size */\n\tprivate getViewportSize(): ViewportSize {\n\t\tif (!this.windowRef.hasNative) {\n\t\t\treturn this.viewportServerSize.get();\n\t\t}\n\n\t\tconst ua = navigator.userAgent.toLowerCase();\n\t\tif (ua.indexOf(\"safari\") !== -1 && ua.indexOf(\"chrome\") === -1) { // safari subtracts the scrollbar width\n\t\t\treturn {\n\t\t\t\twidth: this.windowRef.native.document.documentElement.clientWidth,\n\t\t\t\theight: this.windowRef.native.document.documentElement.clientHeight,\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\twidth: this.windowRef.native.innerWidth,\n\t\t\theight: this.windowRef.native.innerHeight,\n\t\t};\n\t}\n\n}\n","import { Dictionary } from \"../../internal/internal.model\";\nimport { ViewportSizeTypeInfo } from \"../viewport.model\";\nimport { ViewportDataConfig, ViewportDataMatchStrategy } from \"./viewport-data-matcher\";\n\nexport interface ViewportDataRule<T> {\n\tmin?: number;\n\tmax?: number;\n\tvalue: T;\n}\n\n/**\n * Utility function to generate rules based on strategies.\n *\n * @param dataConfig Data config to generate rules based on.\n * @param strategy Strategy to use when building rules.\n * @param sizeTypes Available size types ordered by index type. (Can be obtained from `ViewportService`)\n * @param sizeTypeMap Available size type map. (Can be obtained from `ViewportService`)\n * @returns Returns a collection of rules (ordered).\n */\nexport function generateViewportRulesRangeFromDataMatcher<T>(\n\tdataConfig: ViewportDataConfig<T>,\n\tstrategy: ViewportDataMatchStrategy,\n\tsizeTypes: ViewportSizeTypeInfo[],\n\tsizeTypeMap: Dictionary<ViewportSizeTypeInfo>,\n): ViewportDataRule<T>[] {\n\tconst ruleBuilderFn = matchStrategyHandlerMap[strategy];\n\tif (!ruleBuilderFn) {\n\t\tthrow Error(`generateViewportRulesRangeFromDataMatcher: Viewport Data strategy not implemented. Strategy: '${strategy}'`);\n\t}\n\n\tlet dataSizes: ViewportSizeTypeInfo[] = [];\n\tfor (const key in dataConfig) {\n\t\tif (Object.prototype.hasOwnProperty.call(dataConfig, key)) {\n\t\t\tconst data = dataConfig[key];\n\t\t\tif (data === undefined) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst size = sizeTypeMap[key];\n\t\t\tif (size) {\n\t\t\t\tdataSizes.push(size);\n\t\t\t}\n\t\t}\n\t}\n\tdataSizes = dataSizes.sort(({ type: typeA }, { type: typeB }) => typeA - typeB);\n\n\tconst rules: ViewportDataRule<T>[] = [];\n\tif (dataConfig.default) {\n\t\trules.push({ value: dataConfig.default, min: undefined, max: undefined });\n\t}\n\n\tlet prevRule: ViewportDataRule<T> | undefined;\n\tfor (let index = 0; index < dataSizes.length; index++) {\n\t\tconst prevDataSize = dataSizes[index - 1];\n\t\tconst nextDataSize = dataSizes[index + 1];\n\t\tconst dataSize = dataSizes[index];\n\t\tconst prevSize = sizeTypes[dataSize.type - 1];\n\t\t// const nextSize = sizeTypes[dataSize.type + 1];\n\t\tconst data = dataConfig[dataSize.name];\n\t\tconst rule: ViewportDataRule<T> = {\n\t\t\tvalue: data,\n\t\t\tmin: undefined,\n\t\t\tmax: undefined,\n\t\t};\n\n\t\truleBuilderFn(rule, dataSize, nextDataSize, prevDataSize, prevSize, prevRule, sizeTypes);\n\n\t\tprevRule = rule;\n\t\trules.push(rule);\n\t}\n\treturn rules;\n}\n\nexport interface ViewportRuleRangeBuilder<T = unknown> {\n\t(\n\t\trule: ViewportDataRule<T>,\n\t\tdataSize: ViewportSizeTypeInfo,\n\t\tnextDataSize: ViewportSizeTypeInfo | undefined,\n\t\tprevDataSize: ViewportSizeTypeInfo | undefined,\n\t\tprevSize: ViewportSizeTypeInfo | undefined,\n\t\tprevRule: ViewportDataRule<T> | undefined,\n\t\tsizeTypes: ViewportSizeTypeInfo[],\n\t): void;\n}\n\nconst matchStrategyHandlerMap: Dictionary<ViewportRuleRangeBuilder> = {\n\t[ViewportDataMatchStrategy.exact]: (rule, dataSize, _nextDataSize, _prevDataSize, prevSize) => {\n\t\trule.max = dataSize.widthThreshold;\n\t\tif (prevSize) {\n\t\t\trule.min = prevSize.widthThreshold + 1;\n\t\t}\n\t},\n\t[ViewportDataMatchStrategy.smaller]: (rule, dataSize, nextDataSize, _prevDataSize, prevSize) => {\n\t\tif (nextDataSize) {\n\t\t\trule.max = dataSize.widthThreshold;\n\t\t}\n\t\tif (prevSize) {\n\t\t\trule.min = prevSize.widthThreshold + 1;\n\t\t}\n\t},\n\t[ViewportDataMatchStrategy.larger]: (rule, dataSize, _nextDataSize, prevDataSize) => {\n\t\tif (dataSize) {\n\t\t\trule.max = dataSize.widthThreshold;\n\t\t}\n\t\tif (prevDataSize) {\n\t\t\trule.min = prevDataSize.widthThreshold + 1;\n\t\t}\n\t},\n\t[ViewportDataMatchStrategy.closestSmallerFirst]: (rule, dataSize, nextDataSize, _prevDataSize, _prevSize, prevRule, sizeTypes) => {\n\t\tif (nextDataSize) {\n\t\t\trule.max = calculateClosestWidthThreshold(nextDataSize, dataSize, sizeTypes, true);\n\t\t}\n\t\tif (prevRule?.max) {\n\t\t\trule.min = prevRule.max + 1;\n\t\t}\n\t},\n\t[ViewportDataMatchStrategy.closestLargerFirst]: (rule, dataSize, nextDataSize, _prevDataSize, _prevSize, prevRule, sizeTypes) => {\n\t\tif (nextDataSize) {\n\t\t\trule.max = calculateClosestWidthThreshold(nextDataSize, dataSize, sizeTypes, false);\n\t\t}\n\t\tif (prevRule?.max) {\n\t\t\trule.min = prevRule.max + 1;\n\t\t}\n\t},\n};\n\nfunction calculateClosestWidthThreshold(\n\tnextDataSize: ViewportSizeTypeInfo,\n\tdataSize: ViewportSizeTypeInfo,\n\tsizeTypes: ViewportSizeTypeInfo[],\n\tisSmallerPreferred: boolean,\n) {\n\tconst fn = isSmallerPreferred ? Math.ceil : Math.floor;\n\t// get closest between curr and next\n\tconst diffIndex = fn((nextDataSize.type - dataSize.type - 1) / 2);\n\tconst diffNextSize = sizeTypes[dataSize.type + diffIndex];\n\treturn (diffNextSize || dataSize).widthThreshold;\n}\n","import { inject, Injectable } from \"@angular/core\";\nimport { Observable, distinctUntilChanged, map } from \"rxjs\";\n\nimport { ViewportSizeTypeInfo } from \"../viewport.model\";\nimport { ViewportService } from \"../viewport.service\";\nimport { matchViewportData, ViewportDataConfig, ViewportDataMatchStrategy } from \"./viewport-data-matcher\";\nimport { generateViewportRulesRangeFromDataMatcher, ViewportDataRule } from \"./viewport-data.utils\";\nimport { VIEWPORT_OPTIONS } from \"../viewport.options\";\n\n@Injectable({\n\tprovidedIn: \"root\",\n})\nexport class ViewportDataService {\n\n\tprivate readonly viewport = inject(ViewportService);\n\tprivate readonly config = inject(VIEWPORT_OPTIONS);\n\n\t/** Get data for match. */\n\tget<T>(\n\t\tdataConfig: ViewportDataConfig<T>,\n\t\tstrategy: ViewportDataMatchStrategy = this.config.defaultDataMatchStrategy,\n\t\tsizeType: ViewportSizeTypeInfo = this.viewport.sizeTypeSnapshot\n\t): T | undefined {\n\t\treturn matchViewportData(dataConfig, sizeType, strategy, this.viewport.sizeTypes, this.viewport.sizeTypeMap);\n\t}\n\n\t/** Get data for match as observable. */\n\tget$<T>(dataConfig: ViewportDataConfig<T>, strategy?: ViewportDataMatchStrategy, throttle = true): Observable<T | undefined> {\n\t\treturn (throttle ? this.viewport.sizeType$ : this.viewport.sizeTypeSnap$).pipe(\n\t\t\tmap(sizeType => this.get<T>(dataConfig, strategy, sizeType)),\n\t\t\tdistinctUntilChanged(),\n\t\t);\n\t}\n\n\t/** Generate rules based on strategies for data. */\n\tgenerateRules<T>(\n\t\tdataConfig: ViewportDataConfig<T>,\n\t\tstrategy: ViewportDataMatchStrategy = this.config.defaultDataMatchStrategy,\n\t): ViewportDataRule<T>[] {\n\t\treturn generateViewportRulesRangeFromDataMatcher(\n\t\t\tdataConfig,\n\t\t\tstrategy,\n\t\t\tthis.viewport.sizeTypes,\n\t\t\tthis.viewport.sizeTypeMap\n\t\t);\n\t}\n\n}\n","import { Subscription, tap } from \"rxjs\";\nimport { Pipe, PipeTransform, OnDestroy, ChangeDetectorRef } from \"@angular/core\";\n\nimport { ViewportDataConfig, ViewportDataMatchStrategy, ViewportDataMatchStrategyLiteral } from \"./viewport-data-matcher\";\nimport { ViewportDataService } from \"./viewport-data.service\";\n\n\n@Pipe({\n\tname: \"ssvViewportData\",\n\tpure: false,\n\tstandalone: true,\n})\nexport class ViewportDataPipe implements PipeTransform, OnDestroy {\n\n\tprivate markForTransform = true;\n\tprivate value: unknown;\n\tprivate data: ViewportDataConfig | undefined;\n\tprivate strategy: ViewportDataMatchStrategyLiteral | undefined;\n\tprivate data$$ = Subscription.EMPTY;\n\n\tconstructor(\n\t\tprivate viewportData: ViewportDataService,\n\t\tprivate cdr: ChangeDetectorRef\n\t) {\n\t}\n\n\ttransform(data: ViewportDataConfig, strategy: ViewportDataMatchStrategyLiteral): unknown {\n\t\tif (!this.markForTransform && data === this.data && strategy === this.strategy) {\n\t\t\treturn this.value;\n\t\t}\n\t\tthis.data = data;\n\t\tthis.strategy = strategy;\n\n\t\tthis.data$$.unsubscribe();\n\t\tthis.data$$ = this.viewportData.get$(data, ViewportDataMatchStrategy[strategy]).pipe(\n\t\t\ttap(value => {\n\t\t\t\tthis.markForTransform = true;\n\t\t\t\tthis.value = value;\n\t\t\t\tthis.cdr.markForCheck();\n\t\t\t}),\n\t\t).subscribe();\n\n\t\tthis.markForTransform = false;\n\t\treturn this.value;\n\t}\n\n\tngOnDestroy(): void {\n\t\tthis.data$$.unsubscribe();\n\t}\n\n}\n","import {\n\tOnInit,\n\tOnDestroy,\n\tDirective,\n\tInput,\n\tTemplateRef,\n\tViewContainerRef,\n\tEmbeddedViewRef,\n} from \"@angular/core\";\nimport { combineLatest, ReplaySubject, Subject, tap, map, takeUntil } from \"rxjs\";\n\nimport { ViewportService } from \"./viewport.service\";\nimport {\n\tisViewportSizeMatcherExpression,\n\tisViewportSizeMatcherTupleExpression,\n\tisViewportConditionMatch\n} from \"./viewport.util\";\nimport { ViewportMatchConditions, ViewportSizeMatcherExpression } from \"./viewport.model\";\n\nconst NAME_CAMEL = \"ssvViewportMatcherVar\";\n\nexport class SsvViewportMatcherVarContext {\n\n\tconstructor(\n\t\tpublic $implicit = false,\n\t) { }\n\n}\n\n@Directive({\n\tselector: `[${NAME_CAMEL}]`,\n\tstandalone: true,\n})\nexport class SsvViewportMatcherVarDirective implements OnInit, OnDestroy {\n\n\tprivate _matchConditions: ViewportMatchConditions = {};\n\tprivate _context = new SsvViewportMatcherVarContext();\n\tprivate readonly _destroy$ = new Subject<void>();\n\tprivate readonly _update$ = new ReplaySubject<void>(1);\n\tprivate _viewRef!: EmbeddedViewRef<SsvViewportMatcherVarContext>;\n\n\t@Input(`${NAME_CAMEL}When`) set condition(value: string | string[] | ViewportSizeMatcherExpression) {\n\t\tif (isViewportSizeMatcherExpression(value)) {\n\t\t\tthis._matchConditions.expression = value;\n\t\t} else if (isViewportSizeMatcherTupleExpression(value)) {\n\t\t\tconst [op, size] = value;\n\t\t\tthis._matchConditions.expression = {\n\t\t\t\toperation: op,\n\t\t\t\tsize\n\t\t\t};\n\t\t} else {\n\t\t\tthis._matchConditions.sizeType = value;\n\t\t}\n\n\t\tthis._update$.next();\n\t}\n\n\tconstructor(\n\t\tprivate viewport: ViewportService,\n\t\tprivate viewContainer: ViewContainerRef,\n\t\tprivate templateRef: TemplateRef<SsvViewportMatcherVarContext>,\n\t) {\n\t}\n\n\tngOnInit(): void {\n\t\tthis.updateView();\n\t\tcombineLatest([this.viewport.sizeType$, this._update$]).pipe(\n\t\t\tmap(([sizeType]) => isViewportConditionMatch(sizeType, this._matchConditions, this.viewport.sizeTypeMap)),\n\t\t\ttap(x => this._context.$implicit = x),\n\t\t\ttap(() => this._viewRef.markForCheck()),\n\t\t\ttakeUntil(this._destroy$),\n\t\t).subscribe();\n\t}\n\n\tngOnDestroy(): void {\n\t\tthis._destroy$.next();\n\t\tthis._destroy$.complete();\n\t}\n\n\tprivate updateView(): void {\n\t\tthis.viewContainer.clear();\n\t\tthis._viewRef = this.viewContainer.createEmbeddedView(this.templateRef, this._context);\n\t}\n\n}\n","import {\n\tOnInit,\n\tOnDestroy,\n\tDirective,\n\tRenderer2,\n\tViewContainerRef,\n\tInput,\n\tEmbeddedViewRef,\n\tTemplateRef,\n\tChangeDetectorRef,\n} from \"@angular/core\";\nimport { Subscription, Subject, tap, filter, pairwise, startWith } from \"rxjs\";\n\nimport { ViewportService } from \"./viewport.service\";\nimport {\n\tisViewportSizeMatcherExpression,\n\tisViewportSizeMatcherTupleExpression,\n\tisViewportConditionMatch\n} from \"./viewport.util\";\nimport { ViewportSizeTypeInfo, ViewportMatchConditions, ViewportSizeMatcherExpression } from \"./viewport.model\";\n\nexport class SsvViewportMatcherContext implements ViewportMatchConditions {\n\n\tsizeType: string | string[] | null = null;\n\tsizeTypeExclude: string | string[] | null = null;\n\texpression?: ViewportSizeMatcherExpression;\n\n}\n\n@Directive({\n\tselector: \"[ssvViewportMatcher]\",\n\texportAs: \"ssvViewportMatcher\",\n\tstandalone: true,\n})\nexport class SsvViewportMatcherDirective implements OnInit, OnDestroy {\n\n\tsizeInfo: ViewportSizeTypeInfo | undefined;\n\n\tprivate _context: SsvViewportMatcherContext = new SsvViewportMatcherContext();\n\tprivate _thenTemplateRef: TemplateRef<SsvViewportMatcherContext> | null = null;\n\tprivate _elseTemplateRef: TemplateRef<SsvViewportMatcherContext> | null = null;\n\tprivate _thenViewRef: EmbeddedViewRef<SsvViewportMatcherContext> | null = null;\n\tprivate _elseViewRef: EmbeddedViewRef<SsvViewportMatcherContext> | null = null;\n\tprivate sizeType$$ = Subscription.EMPTY;\n\tprivate cssClass$$ = Subscription.EMPTY;\n\tprivate readonly _update$ = new Subject<SsvViewportMatcherContext>();\n\n\t@Input() set ssvViewportMatcher(value: string | string[] | ViewportSizeMatcherExpression) {\n\t\tif (isViewportSizeMatcherExpression(value)) {\n\t\t\tthis._context.expression = value;\n\t\t} else if (isViewportSizeMatcherTupleExpression(value)) {\n\t\t\tconst [op, size] = value;\n\t\t\tthis._context.expression = {\n\t\t\t\toperation: op,\n\t\t\t\tsize\n\t\t\t};\n\t\t} else {\n\t\t\tthis._context.sizeType = value;\n\t\t}\n\n\t\tif (this.sizeInfo) {\n\t\t\tthis._update$.next(this._context);\n\t\t}\n\t}\n\n\t@Input() set ssvViewportMatcherExclude(value: string | string[]) {\n\t\tthis._context.sizeTypeExclude = value;\n\n\t\tif (this.sizeInfo) {\n\t\t\tthis._update$.next(this._context);\n\t\t}\n\t}\n\n\t@Input() set ssvViewportMatcherElse(templateRef: TemplateRef<SsvViewportMatcherContext> | null) {\n\t\tthis._elseTemplateRef = templateRef;\n\t\tthis._elseViewRef = null; // clear previous view if any.\n\t\tif (this.sizeInfo) {\n\t\t\tthis._update$.next(this._context);\n\t\t}\n\t}\n\n\tconstructor(\n\t\tprivate viewport: ViewportService,\n\t\tprivate renderer: Renderer2,\n\t\tprivate viewContainer: ViewContainerRef,\n\t\tprivate cdr: ChangeDetectorRef,\n\t\ttemplateRef: TemplateRef<SsvViewportMatcherContext>,\n\t) {\n\t\tthis._thenTemplateRef = templateRef;\n\t}\n\n\tngOnInit(): void {\n\t\t// console.log(\"ssvViewportMatcher init\");\n\n\t\tthis._update$\n\t\t\t.pipe(\n\t\t\t\t// tap(x => console.log(\">>> ssvViewportMatcher - update triggered\", x)),\n\t\t\t\tfilter(() => !!this.sizeInfo),\n\t\t\t\t// tap(x => console.log(\">>> ssvViewportMatcher - updating...\", x)),\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\t\ttap(() => this._updateView(this.sizeInfo!)),\n\t\t\t\ttap(() => this.cdr.markForCheck())\n\t\t\t)\n\t\t\t.subscribe();\n\n\t\tthis.sizeType$$ = this.viewport.sizeType$\n\t\t\t.pipe(\n\t\t\t\t// tap(x => console.log(\"ssvViewportMatcher - sizeType changed\", x)),\n\t\t\t\ttap(x => this.sizeInfo = x),\n\t\t\t\ttap(() => this._update$.next(this._context)),\n\t\t\t)\n\t\t\t.subscribe();\n\n\t\tthis.cssClass$$ = this.viewport.sizeType$\n\t\t\t.pipe(\n\t\t\t\tstartWith<ViewportSizeTypeInfo | undefined>(undefined),\n\t\t\t\tfilter(() => !!(this._thenViewRef || this._elseViewRef)),\n\t\t\t\tpairwise(),\n\t\t\t\ttap(([prev, curr]) => {\n\t\t\t\t\tconst el: Element = this._thenViewRef\n\t\t\t\t\t\t? this._thenViewRef.rootNodes[0]\n\t\t\t\t\t\t: this._elseViewRef?.rootNodes[0];\n\n\t\t\t\t\tif (!el.classList) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif (prev) {\n\t\t\t\t\t\tthis.renderer.removeClass(el, `ssv-vp-size--${prev.name}`);\n\t\t\t\t\t}\n\t\t\t\t\tthis.renderer.addClass(el, `ssv-vp-size--${curr?.name}`);\n\t\t\t\t}),\n\t\t\t)\n\t\t\t.subscribe();\n\t}\n\n\tngOnDestroy(): void {\n\t\tthis.cssClass$$.unsubscribe();\n\t\tthis.sizeType$$.unsubscribe();\n\t\tthis._update$.complete();\n\t}\n\n\tprivate _updateView(sizeInfo: ViewportSizeTypeInfo) {\n\t\tif (isViewportConditionMatch(sizeInfo, this._context, this.viewport.sizeTypeMap)) {\n\t\t\tif (!this._thenViewRef) {\n\t\t\t\tthis.viewContainer.clear();\n\t\t\t\tthis._elseViewRef = null;\n\n\t\t\t\tif (this._thenTemplateRef) {\n\t\t\t\t\tthis._thenViewRef = this.viewContainer.createEmbeddedView(\n\t\t\t\t\t\tthis._thenTemplateRef,\n\t\t\t\t\t\tthis._context,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif (!this._elseViewRef) {\n\t\t\t\tthis.viewContainer.clear();\n\t\t\t\tthis._thenViewRef = null;\n\n\t\t\t\tif (this._elseTemplateRef) {\n\t\t\t\t\tthis._elseViewRef = this.viewContainer.createEmbeddedView(\n\t\t\t\t\t\tthis._elseTemplateRef,\n\t\t\t\t\t\tthis._context,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { ViewportDataPipe } from \"./viewport-data/viewport-data.pipe\";\nimport { SsvViewportMatcherVarDirective } from \"./viewport-matcher-var.directive\";\nimport { SsvViewportMatcherDirective } from \"./viewport-matcher.directive\";\n\nconst EXPORTED_IMPORTS = [\n\tSsvViewportMatcherDirective,\n\tSsvViewportMatcherVarDirective,\n\tViewportDataPipe,\n];\n\n@NgModule({\n\timports: [EXPORTED_IMPORTS],\n\texports: [EXPORTED_IMPORTS]\n})\nexport class SsvUxViewportModule {\n\n}","import { NgModule } from \"@angular/core\";\n\nimport { SsvUxViewportModule } from \"./viewport/viewport.module\";\n\nconst EXPORTED_IMPORTS = [\n\tSsvUxViewportModule,\n];\n\n@NgModule({\n\timports: [EXPORTED_IMPORTS],\n\texports: [EXPORTED_IMPORTS]\n})\nexport class SsvUxModule {\n\n}","export const VERSION = \"3.0.0-dev.38\";\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["matchStrategyHandlerMap","i1.WindowRef","i2.ViewportServerSizeService","i1.ViewportDataService","i1.ViewportService","EXPORTED_IMPORTS"],"mappings":";;;;IAOY,0BAeX;AAfD,CAAA,UAAY,yBAAyB,EAAA;;AAEpC,IAAA,yBAAA,CAAA,yBAAA,CAAA,OAAA,CAAA,GAAA,CAAA,CAAA,GAAA,OAAK,CAAA;;AAGL,IAAA,yBAAA,CAAA,yBAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,GAAA,SAAO,CAAA;;AAGP,IAAA,yBAAA,CAAA,yBAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAM,CAAA;;AAGN,IAAA,yBAAA,CAAA,yBAAA,CAAA,qBAAA,CAAA,GAAA,CAAA,CAAA,GAAA,qBAAmB,CAAA;;AAGnB,IAAA,yBAAA,CAAA,yBAAA,CAAA,oBAAA,CAAA,GAAA,CAAA,CAAA,GAAA,oBAAkB,CAAA;AACnB,CAAC,EAfW,yBAAyB,KAAzB,yBAAyB,GAepC,EAAA,CAAA,CAAA,CAAA;AAYD;;;;;;;;;AASG;AACG,SAAU,iBAAiB,CAChC,UAAiC,EACjC,QAA8B,EAC9B,QAAmC,EACnC,SAAiC,EACjC,WAA6C,EAAA;AAE7C,IAAA,MAAM,OAAO,GAAGA,yBAAuB,CAAC,QAAQ,CAAC,CAAC;IAClD,IAAI,CAAC,OAAO,EAAE;AACb,QAAA,MAAM,KAAK,CAAC,CAAA,sEAAA,EAAyE,QAAQ,CAAA,CAAA,CAAG,CAAC,CAAC;KAClG;AACD,IAAA,MAAM,IAAI,GAAG,OAAO,CAAC,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,CAAM,CAAC;AACxE,IAAA,IAAI,IAAI,KAAK,SAAS,EAAE;AACvB,QAAA,OAAO,IAA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;wGAOJ,mBAAmB,EAAA,CAAA,CAAA;;2FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAJ/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACT,OAAO,EAAE,CAACA,kBAAgB,CAAC;oBAC3B,OAAO,EAAE,CAACA,kBAAgB,CAAC;AAC3B,iBAAA,CAAA;;;ACXD,MAAM,gBAAgB,GAAG;IACxB,mBAAmB;CACnB,CAAC;MAMW,WAAW,CAAA;uGAAX,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;wGAAX,WAAW,EAAA,OAAA,EAAA,CAPvB,mBAAmB,CAAA,EAAA,OAAA,EAAA,CAAnB,mBAAmB,CAAA,EAAA,CAAA,CAAA;wGAOP,WAAW,EAAA,OAAA,EAAA,CAHb,gBAAgB,EAJ1B,mBAAmB,CAAA,EAAA,CAAA,CAAA;;2FAOP,WAAW,EAAA,UAAA,EAAA,CAAA;kBAJvB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACT,OAAO,EAAE,CAAC,gBAAgB,CAAC;oBAC3B,OAAO,EAAE,CAAC,gBAAgB,CAAC;AAC3B,iBAAA,CAAA;;;ACXM,MAAM,OAAO,GAAG;;ACAvB;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ssv/ngx.ux",
|
|
3
|
-
"version": "3.0.0-dev.
|
|
3
|
+
"version": "3.0.0-dev.38",
|
|
4
4
|
"versionSuffix": "",
|
|
5
5
|
"description": "UX essentials for building apps, utilities which enables you writing richer apps easier.",
|
|
6
6
|
"keywords": [
|
|
@@ -21,10 +21,25 @@
|
|
|
21
21
|
"type": "git",
|
|
22
22
|
"url": "https://github.com/sketch7/ssv.ngx.git"
|
|
23
23
|
},
|
|
24
|
-
"dependencies": {
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"tslib": "^2.3.0"
|
|
26
|
+
},
|
|
25
27
|
"peerDependencies": {
|
|
26
28
|
"@angular/core": ">=17.0.0",
|
|
27
29
|
"rxjs": ">=6.0.0"
|
|
28
30
|
},
|
|
29
|
-
"sideEffects": false
|
|
31
|
+
"sideEffects": false,
|
|
32
|
+
"module": "fesm2022/ssv-ngx.ux.mjs",
|
|
33
|
+
"typings": "index.d.ts",
|
|
34
|
+
"exports": {
|
|
35
|
+
"./package.json": {
|
|
36
|
+
"default": "./package.json"
|
|
37
|
+
},
|
|
38
|
+
".": {
|
|
39
|
+
"types": "./index.d.ts",
|
|
40
|
+
"esm2022": "./esm2022/ssv-ngx.ux.mjs",
|
|
41
|
+
"esm": "./esm2022/ssv-ngx.ux.mjs",
|
|
42
|
+
"default": "./fesm2022/ssv-ngx.ux.mjs"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
30
45
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { InjectionToken } from "@angular/core";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare const WINDOW: InjectionToken<Window>;
|
|
4
|
+
export declare function _window(): unknown;
|
|
5
|
+
export declare class WindowRef {
|
|
6
|
+
private readonly window;
|
|
7
|
+
/** Window underlying native object. */
|
|
8
|
+
get native(): Window;
|
|
9
|
+
/** Determines whether native element is supported or not. Generally `false` when executing in SSR. */
|
|
10
|
+
get hasNative(): boolean;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WindowRef, never>;
|
|
12
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<WindowRef>;
|
|
13
|
+
}
|
package/ux.module.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./viewport/viewport.module";
|
|
3
|
+
export declare class SsvUxModule {
|
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SsvUxModule, never>;
|
|
5
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SsvUxModule, never, [typeof i1.SsvUxViewportModule], [typeof i1.SsvUxViewportModule]>;
|
|
6
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<SsvUxModule>;
|
|
7
|
+
}
|
package/version.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const VERSION = "3.0.0-dev.38";
|
|
@@ -1,20 +1,9 @@
|
|
|
1
1
|
export * from "./viewport-data/index";
|
|
2
|
-
|
|
3
2
|
export { SsvUxViewportModule } from "./viewport.module";
|
|
4
3
|
export { provideSsvUxViewportOptions, VIEWPORT_OPTIONS, type UxViewportOptions, withViewportSsrDevice } from "./viewport.options";
|
|
5
|
-
|
|
6
4
|
export { SsvViewportMatcherVarDirective, SsvViewportMatcherVarContext } from "./viewport-matcher-var.directive";
|
|
7
5
|
export { SsvViewportMatcherDirective, SsvViewportMatcherContext } from "./viewport-matcher.directive";
|
|
8
6
|
export { VIEWPORT_SSR_DEVICE, ViewportServerSizeService } from "./viewport-server-size.service";
|
|
9
|
-
export {
|
|
10
|
-
type ComparisonOperationValueType,
|
|
11
|
-
type ComparisonOperationLiteral,
|
|
12
|
-
type ComparisonOperationKeyType,
|
|
13
|
-
type ViewportSize,
|
|
14
|
-
type ViewportSizeTypeInfo,
|
|
15
|
-
ComparisonOperation,
|
|
16
|
-
DeviceType,
|
|
17
|
-
ViewportSizeType,
|
|
18
|
-
} from "./viewport.model";
|
|
7
|
+
export { type ComparisonOperationValueType, type ComparisonOperationLiteral, type ComparisonOperationKeyType, type ViewportSize, type ViewportSizeTypeInfo, ComparisonOperation, DeviceType, ViewportSizeType, } from "./viewport.model";
|
|
19
8
|
export { ViewportService } from "./viewport.service";
|
|
20
9
|
export { generateViewportSizeType } from "./viewport.util";
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Dictionary } from "../../internal/internal.model";
|
|
2
|
+
import type { ViewportSizeTypeInfo } from "../viewport.model";
|
|
3
|
+
export type ViewportDataConfig<TValue = unknown, TData = Dictionary<TValue>> = TData & {
|
|
4
|
+
default?: TValue;
|
|
5
|
+
};
|
|
6
|
+
export declare enum ViewportDataMatchStrategy {
|
|
7
|
+
/** Indicates that size should match exact or default. */
|
|
8
|
+
exact = 0,
|
|
9
|
+
/** Indicates that size matches when exact match, first match smaller (down) or default. */
|
|
10
|
+
smaller = 1,
|
|
11
|
+
/** Indicates that size matches when exact match, first match larger (up) or default. */
|
|
12
|
+
larger = 2,
|
|
13
|
+
/** Indicates that size matches when exact match, or it tries both smaller/larger (smaller is preferred) until match or default. */
|
|
14
|
+
closestSmallerFirst = 3,
|
|
15
|
+
/** Indicates that size matches when exact match, or it tries both larger/smaller (larger is preferred) until match or default. */
|
|
16
|
+
closestLargerFirst = 4
|
|
17
|
+
}
|
|
18
|
+
export type ViewportDataMatchStrategyLiteral = keyof typeof ViewportDataMatchStrategy;
|
|
19
|
+
export interface ViewportDataMatcher<T = unknown> {
|
|
20
|
+
(dataConfig: ViewportDataConfig<T>, currentSizeType: ViewportSizeTypeInfo, sizeTypes: ViewportSizeTypeInfo[], sizeTypeMap: Dictionary<ViewportSizeTypeInfo>): T | undefined;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Utility function to match data based on strategy and size.
|
|
24
|
+
*
|
|
25
|
+
* @param dataConfig Data config to generate rules based on.
|
|
26
|
+
* @param sizeType Size type to get data for.
|
|
27
|
+
* @param strategy Strategy to use when building rules.
|
|
28
|
+
* @param sizeTypes Available size types ordered by index type. (Can be obtained from `ViewportService`)
|
|
29
|
+
* @param sizeTypeMap Available size type map. (Can be obtained from `ViewportService`)
|
|
30
|
+
* @returns Returns the matched data value.
|
|
31
|
+
*/
|
|
32
|
+
export declare function matchViewportData<T>(dataConfig: ViewportDataConfig<T>, sizeType: ViewportSizeTypeInfo, strategy: ViewportDataMatchStrategy, sizeTypes: ViewportSizeTypeInfo[], sizeTypeMap: Dictionary<ViewportSizeTypeInfo>): T | undefined;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { PipeTransform, OnDestroy, ChangeDetectorRef } from "@angular/core";
|
|
2
|
+
import { ViewportDataConfig, ViewportDataMatchStrategyLiteral } from "./viewport-data-matcher";
|
|
3
|
+
import { ViewportDataService } from "./viewport-data.service";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class ViewportDataPipe implements PipeTransform, OnDestroy {
|
|
6
|
+
private viewportData;
|
|
7
|
+
private cdr;
|
|
8
|
+
private markForTransform;
|
|
9
|
+
private value;
|
|
10
|
+
private data;
|
|
11
|
+
private strategy;
|
|
12
|
+
private data$$;
|
|
13
|
+
constructor(viewportData: ViewportDataService, cdr: ChangeDetectorRef);
|
|
14
|
+
transform(data: ViewportDataConfig, strategy: ViewportDataMatchStrategyLiteral): unknown;
|
|
15
|
+
ngOnDestroy(): void;
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ViewportDataPipe, never>;
|
|
17
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<ViewportDataPipe, "ssvViewportData", true>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
import { ViewportSizeTypeInfo } from "../viewport.model";
|
|
3
|
+
import { ViewportDataConfig, ViewportDataMatchStrategy } from "./viewport-data-matcher";
|
|
4
|
+
import { ViewportDataRule } from "./viewport-data.utils";
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class ViewportDataService {
|
|
7
|
+
private readonly viewport;
|
|
8
|
+
private readonly config;
|
|
9
|
+
/** Get data for match. */
|
|
10
|
+
get<T>(dataConfig: ViewportDataConfig<T>, strategy?: ViewportDataMatchStrategy, sizeType?: ViewportSizeTypeInfo): T | undefined;
|
|
11
|
+
/** Get data for match as observable. */
|
|
12
|
+
get$<T>(dataConfig: ViewportDataConfig<T>, strategy?: ViewportDataMatchStrategy, throttle?: boolean): Observable<T | undefined>;
|
|
13
|
+
/** Generate rules based on strategies for data. */
|
|
14
|
+
generateRules<T>(dataConfig: ViewportDataConfig<T>, strategy?: ViewportDataMatchStrategy): ViewportDataRule<T>[];
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ViewportDataService, never>;
|
|
16
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ViewportDataService>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Dictionary } from "../../internal/internal.model";
|
|
2
|
+
import { ViewportSizeTypeInfo } from "../viewport.model";
|
|
3
|
+
import { ViewportDataConfig, ViewportDataMatchStrategy } from "./viewport-data-matcher";
|
|
4
|
+
export interface ViewportDataRule<T> {
|
|
5
|
+
min?: number;
|
|
6
|
+
max?: number;
|
|
7
|
+
value: T;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Utility function to generate rules based on strategies.
|
|
11
|
+
*
|
|
12
|
+
* @param dataConfig Data config to generate rules based on.
|
|
13
|
+
* @param strategy Strategy to use when building rules.
|
|
14
|
+
* @param sizeTypes Available size types ordered by index type. (Can be obtained from `ViewportService`)
|
|
15
|
+
* @param sizeTypeMap Available size type map. (Can be obtained from `ViewportService`)
|
|
16
|
+
* @returns Returns a collection of rules (ordered).
|
|
17
|
+
*/
|
|
18
|
+
export declare function generateViewportRulesRangeFromDataMatcher<T>(dataConfig: ViewportDataConfig<T>, strategy: ViewportDataMatchStrategy, sizeTypes: ViewportSizeTypeInfo[], sizeTypeMap: Dictionary<ViewportSizeTypeInfo>): ViewportDataRule<T>[];
|
|
19
|
+
export interface ViewportRuleRangeBuilder<T = unknown> {
|
|
20
|
+
(rule: ViewportDataRule<T>, dataSize: ViewportSizeTypeInfo, nextDataSize: ViewportSizeTypeInfo | undefined, prevDataSize: ViewportSizeTypeInfo | undefined, prevSize: ViewportSizeTypeInfo | undefined, prevRule: ViewportDataRule<T> | undefined, sizeTypes: ViewportSizeTypeInfo[]): void;
|
|
21
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { OnInit, OnDestroy, TemplateRef, ViewContainerRef } from "@angular/core";
|
|
2
|
+
import { ViewportService } from "./viewport.service";
|
|
3
|
+
import { ViewportSizeMatcherExpression } from "./viewport.model";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class SsvViewportMatcherVarContext {
|
|
6
|
+
$implicit: boolean;
|
|
7
|
+
constructor($implicit?: boolean);
|
|
8
|
+
}
|
|
9
|
+
export declare class SsvViewportMatcherVarDirective implements OnInit, OnDestroy {
|
|
10
|
+
private viewport;
|
|
11
|
+
private viewContainer;
|
|
12
|
+
private templateRef;
|
|
13
|
+
private _matchConditions;
|
|
14
|
+
private _context;
|
|
15
|
+
private readonly _destroy$;
|
|
16
|
+
private readonly _update$;
|
|
17
|
+
private _viewRef;
|
|
18
|
+
set condition(value: string | string[] | ViewportSizeMatcherExpression);
|
|
19
|
+
constructor(viewport: ViewportService, viewContainer: ViewContainerRef, templateRef: TemplateRef<SsvViewportMatcherVarContext>);
|
|
20
|
+
ngOnInit(): void;
|
|
21
|
+
ngOnDestroy(): void;
|
|
22
|
+
private updateView;
|
|
23
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SsvViewportMatcherVarDirective, never>;
|
|
24
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<SsvViewportMatcherVarDirective, "[ssvViewportMatcherVar]", never, { "condition": { "alias": "ssvViewportMatcherVarWhen"; "required": false; }; }, {}, never, never, true, never>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { OnInit, OnDestroy, Renderer2, ViewContainerRef, TemplateRef, ChangeDetectorRef } from "@angular/core";
|
|
2
|
+
import { ViewportService } from "./viewport.service";
|
|
3
|
+
import { ViewportSizeTypeInfo, ViewportMatchConditions, ViewportSizeMatcherExpression } from "./viewport.model";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class SsvViewportMatcherContext implements ViewportMatchConditions {
|
|
6
|
+
sizeType: string | string[] | null;
|
|
7
|
+
sizeTypeExclude: string | string[] | null;
|
|
8
|
+
expression?: ViewportSizeMatcherExpression;
|
|
9
|
+
}
|
|
10
|
+
export declare class SsvViewportMatcherDirective implements OnInit, OnDestroy {
|
|
11
|
+
private viewport;
|
|
12
|
+
private renderer;
|
|
13
|
+
private viewContainer;
|
|
14
|
+
private cdr;
|
|
15
|
+
sizeInfo: ViewportSizeTypeInfo | undefined;
|
|
16
|
+
private _context;
|
|
17
|
+
private _thenTemplateRef;
|
|
18
|
+
private _elseTemplateRef;
|
|
19
|
+
private _thenViewRef;
|
|
20
|
+
private _elseViewRef;
|
|
21
|
+
private sizeType$$;
|
|
22
|
+
private cssClass$$;
|
|
23
|
+
private readonly _update$;
|
|
24
|
+
set ssvViewportMatcher(value: string | string[] | ViewportSizeMatcherExpression);
|
|
25
|
+
set ssvViewportMatcherExclude(value: string | string[]);
|
|
26
|
+
set ssvViewportMatcherElse(templateRef: TemplateRef<SsvViewportMatcherContext> | null);
|
|
27
|
+
constructor(viewport: ViewportService, renderer: Renderer2, viewContainer: ViewContainerRef, cdr: ChangeDetectorRef, templateRef: TemplateRef<SsvViewportMatcherContext>);
|
|
28
|
+
ngOnInit(): void;
|
|
29
|
+
ngOnDestroy(): void;
|
|
30
|
+
private _updateView;
|
|
31
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SsvViewportMatcherDirective, never>;
|
|
32
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<SsvViewportMatcherDirective, "[ssvViewportMatcher]", ["ssvViewportMatcher"], { "ssvViewportMatcher": { "alias": "ssvViewportMatcher"; "required": false; }; "ssvViewportMatcherExclude": { "alias": "ssvViewportMatcherExclude"; "required": false; }; "ssvViewportMatcherElse": { "alias": "ssvViewportMatcherElse"; "required": false; }; }, {}, never, never, true, never>;
|
|
33
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { InjectionToken } from "@angular/core";
|
|
2
|
+
import { DeviceType, ViewportSize } from "./viewport.model";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare const VIEWPORT_SSR_DEVICE: InjectionToken<DeviceType>;
|
|
5
|
+
export declare class ViewportServerSizeService {
|
|
6
|
+
private readonly deviceType;
|
|
7
|
+
get(): ViewportSize;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ViewportServerSizeService, never>;
|
|
9
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ViewportServerSizeService>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The indices of each breakpoint provided based on the `UX_VIEWPORT_DEFAULT_BREAKPOINTS`.
|
|
3
|
+
* @see UX_VIEWPORT_DEFAULT_BREAKPOINTS
|
|
4
|
+
*/
|
|
5
|
+
export declare enum ViewportSizeType {
|
|
6
|
+
xsmall = 0,
|
|
7
|
+
small = 1,
|
|
8
|
+
medium = 2,
|
|
9
|
+
large = 3,
|
|
10
|
+
xlarge = 4,
|
|
11
|
+
xxlarge = 5,
|
|
12
|
+
xxlarge1 = 6
|
|
13
|
+
}
|
|
14
|
+
export declare enum ComparisonOperation {
|
|
15
|
+
equals = "=",
|
|
16
|
+
notEquals = "<>",
|
|
17
|
+
lessThan = "<",
|
|
18
|
+
lessOrEqualThan = "<=",
|
|
19
|
+
greaterThan = ">",
|
|
20
|
+
greaterOrEqualThan = ">="
|
|
21
|
+
}
|
|
22
|
+
export type ComparisonOperationKeyType = keyof typeof ComparisonOperation;
|
|
23
|
+
export type ComparisonOperationValueType = "=" | "<>" | "<" | "<=" | ">" | ">=";
|
|
24
|
+
export type ComparisonOperationLiteral = ComparisonOperationKeyType | ComparisonOperationValueType;
|
|
25
|
+
export declare enum DeviceType {
|
|
26
|
+
desktop = "desktop",
|
|
27
|
+
mobile = "mobile",
|
|
28
|
+
tablet = "tablet"
|
|
29
|
+
}
|
|
30
|
+
export interface ViewportSize {
|
|
31
|
+
width: number;
|
|
32
|
+
height: number;
|
|
33
|
+
}
|
|
34
|
+
export interface ViewportSizeTypeInfo {
|
|
35
|
+
type: number;
|
|
36
|
+
name: string;
|
|
37
|
+
widthThreshold: number;
|
|
38
|
+
}
|
|
39
|
+
export interface ViewportMatchConditions {
|
|
40
|
+
sizeType?: string | string[] | null;
|
|
41
|
+
sizeTypeExclude?: string | string[] | null;
|
|
42
|
+
expression?: ViewportSizeMatcherExpression;
|
|
43
|
+
}
|
|
44
|
+
export interface ViewportSizeMatcherExpression {
|
|
45
|
+
size: string;
|
|
46
|
+
operation: ComparisonOperationLiteral;
|
|
47
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./viewport-matcher.directive";
|
|
3
|
+
import * as i2 from "./viewport-matcher-var.directive";
|
|
4
|
+
import * as i3 from "./viewport-data/viewport-data.pipe";
|
|
5
|
+
export declare class SsvUxViewportModule {
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SsvUxViewportModule, never>;
|
|
7
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SsvUxViewportModule, never, [typeof i1.SsvViewportMatcherDirective, typeof i2.SsvViewportMatcherVarDirective, typeof i3.ViewportDataPipe], [typeof i1.SsvViewportMatcherDirective, typeof i2.SsvViewportMatcherVarDirective, typeof i3.ViewportDataPipe]>;
|
|
8
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<SsvUxViewportModule>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type EnvironmentProviders, InjectionToken } from "@angular/core";
|
|
2
|
+
import type { Dictionary } from "../internal/internal.model";
|
|
3
|
+
import { ViewportDataMatchStrategy } from "./viewport-data/viewport-data-matcher";
|
|
4
|
+
import { DeviceType } from "./viewport.model";
|
|
5
|
+
/** Default viewport breakpoints. */
|
|
6
|
+
export declare const UX_VIEWPORT_DEFAULT_BREAKPOINTS: Dictionary<number>;
|
|
7
|
+
export interface UxViewportOptions {
|
|
8
|
+
/** Polling speed on resizing (in milliseconds). e.g. the higher the number the longer it takes to recalculate. */
|
|
9
|
+
resizePollingSpeed: number;
|
|
10
|
+
/** Breakpoints to use. Key needs to match the size type and the value the width threshold.
|
|
11
|
+
* e.g. given width '1000' and `medium` is set to '992' => `large`.
|
|
12
|
+
*/
|
|
13
|
+
breakpoints: Dictionary<number>;
|
|
14
|
+
/** Default data match strategy to use. */
|
|
15
|
+
defaultDataMatchStrategy: ViewportDataMatchStrategy;
|
|
16
|
+
}
|
|
17
|
+
export declare const VIEWPORT_OPTIONS: InjectionToken<UxViewportOptions>;
|
|
18
|
+
export declare function provideSsvUxViewportOptions(options: Partial<UxViewportOptions> | ((defaults: Readonly<UxViewportOptions>) => Partial<UxViewportOptions>), ...features: EnvironmentProviders[]): EnvironmentProviders;
|
|
19
|
+
export declare function withViewportSsrDevice(options: DeviceType | (() => DeviceType)): EnvironmentProviders;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
import { ViewportSizeTypeInfo, ViewportSize } from "./viewport.model";
|
|
3
|
+
import { WindowRef } from "../platform/window";
|
|
4
|
+
import { ViewportServerSizeService } from "./viewport-server-size.service";
|
|
5
|
+
import type { Dictionary } from "../internal/internal.model";
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class ViewportService {
|
|
8
|
+
private windowRef;
|
|
9
|
+
private viewportServerSize;
|
|
10
|
+
/** Window resize observable. */
|
|
11
|
+
readonly resizeSnap$: Observable<ViewportSize>;
|
|
12
|
+
/** Window resize observable (which is also throttled). */
|
|
13
|
+
readonly resize$: Observable<ViewportSize>;
|
|
14
|
+
/** Viewport size type observable (which is also throttled). */
|
|
15
|
+
readonly sizeType$: Observable<ViewportSizeTypeInfo>;
|
|
16
|
+
/** Viewport size type observable. */
|
|
17
|
+
readonly sizeTypeSnap$: Observable<ViewportSizeTypeInfo>;
|
|
18
|
+
/** Viewport size type snapshot of the last value. (Prefer use `sizeType$` observable when possible.) */
|
|
19
|
+
get sizeTypeSnapshot(): ViewportSizeTypeInfo;
|
|
20
|
+
/** Viewport size observable (which is also throttled). */
|
|
21
|
+
readonly size$: Observable<ViewportSize>;
|
|
22
|
+
/** Viewport size observable. */
|
|
23
|
+
readonly sizeSnap$: Observable<ViewportSize>;
|
|
24
|
+
/** Size types refs of the generated viewport size type info. */
|
|
25
|
+
get sizeTypeMap(): Dictionary<ViewportSizeTypeInfo>;
|
|
26
|
+
/** Viewport size types list ordered by type, smallest to largest. */
|
|
27
|
+
get sizeTypes(): ViewportSizeTypeInfo[];
|
|
28
|
+
private _sizeTypeMap;
|
|
29
|
+
private _sizeTypes;
|
|
30
|
+
private _sizeTypeSnapshot;
|
|
31
|
+
constructor(windowRef: WindowRef, viewportServerSize: ViewportServerSizeService);
|
|
32
|
+
/** Returns the current viewport size */
|
|
33
|
+
private getViewportSize;
|
|
34
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ViewportService, never>;
|
|
35
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ViewportService>;
|
|
36
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Dictionary } from "../internal/internal.model";
|
|
2
|
+
import { ComparisonOperation, ViewportSizeMatcherExpression, ViewportSizeTypeInfo, ViewportMatchConditions } from "./viewport.model";
|
|
3
|
+
export declare function isViewportSizeMatcherExpression(value: unknown): value is ViewportSizeMatcherExpression;
|
|
4
|
+
export declare function isViewportSizeMatcherTupleExpression(arg: unknown): arg is [ComparisonOperation, string];
|
|
5
|
+
export declare const COMPARISON_OPERATION_FUNC_MAPPING: Dictionary<(a: number, b: number) => boolean>;
|
|
6
|
+
export declare function isViewportConditionMatch(evaluateSize: ViewportSizeTypeInfo, conditions: ViewportMatchConditions, viewportSizeTypeInfoRefs: Dictionary<ViewportSizeTypeInfo>): boolean;
|
|
7
|
+
export declare function getSizeTypeInfo(width: number, sizeTypes: ViewportSizeTypeInfo[]): ViewportSizeTypeInfo;
|
|
8
|
+
/**
|
|
9
|
+
* A util function which generates the ViewportSizeTypeInfo.type for each breakpoint.
|
|
10
|
+
* @param breakpoints the custom breakpoints
|
|
11
|
+
*/
|
|
12
|
+
export declare function generateViewportSizeType<T extends Record<string, number>>(breakpoints: T): T & Record<number, string>;
|
|
13
|
+
/**
|
|
14
|
+
* Pre-processes the given breakpoints into an ordered list from smallest to largest while generating
|
|
15
|
+
* all the necessary information on the viewport.
|
|
16
|
+
* @param breakpoints the breakpoints obtained from the config
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
export declare function generateViewportSizeTypeInfoList(breakpoints: Dictionary<number>): ViewportSizeTypeInfo[];
|
|
20
|
+
/**
|
|
21
|
+
* Converts the breakpoint list into a dictionary while using the name as key.
|
|
22
|
+
* @param breakpointList the list of breakpoints
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
export declare function generateViewportSizeTypeInfoRefs(breakpointList: ViewportSizeTypeInfo[]): Dictionary<ViewportSizeTypeInfo>;
|
package/eslint.config.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
const nx = require("@nx/eslint-plugin");
|
|
2
|
-
const baseConfig = require("../../eslint.config.js");
|
|
3
|
-
|
|
4
|
-
module.exports = [
|
|
5
|
-
...baseConfig,
|
|
6
|
-
{
|
|
7
|
-
files: ["**/*.json"],
|
|
8
|
-
rules: {
|
|
9
|
-
"@nx/dependency-checks": ["error", { ignoredFiles: ["{projectRoot}/eslint.config.{js,cjs,mjs}"] }],
|
|
10
|
-
},
|
|
11
|
-
languageOptions: { parser: require("jsonc-eslint-parser") },
|
|
12
|
-
},
|
|
13
|
-
...nx.configs["flat/angular"],
|
|
14
|
-
...nx.configs["flat/angular-template"],
|
|
15
|
-
{
|
|
16
|
-
files: ["**/*.ts"],
|
|
17
|
-
rules: {
|
|
18
|
-
"@angular-eslint/directive-selector": [
|
|
19
|
-
"error",
|
|
20
|
-
{
|
|
21
|
-
type: "attribute",
|
|
22
|
-
prefix: "ssv",
|
|
23
|
-
style: "camelCase",
|
|
24
|
-
},
|
|
25
|
-
],
|
|
26
|
-
"@angular-eslint/component-selector": [
|
|
27
|
-
"error",
|
|
28
|
-
{
|
|
29
|
-
type: "element",
|
|
30
|
-
prefix: "ssv",
|
|
31
|
-
style: "kebab-case",
|
|
32
|
-
},
|
|
33
|
-
],
|
|
34
|
-
"@angular-eslint/directive-selector": "off",
|
|
35
|
-
"@angular-eslint/no-input-rename": "off",
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
files: ["**/*.html"],
|
|
40
|
-
// Override or add rules here
|
|
41
|
-
rules: {},
|
|
42
|
-
},
|
|
43
|
-
];
|
package/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./src/index";
|