@ssv/ngx.ux 3.2.0 → 3.3.0-dev.76
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/fesm2022/ssv-ngx.ux.mjs +60 -72
- package/fesm2022/ssv-ngx.ux.mjs.map +1 -1
- package/index.d.ts +225 -3
- package/package.json +1 -3
- package/esm2022/index.mjs +0 -4
- package/esm2022/internal/internal.model.mjs +0 -2
- package/esm2022/platform/window.mjs +0 -31
- package/esm2022/ssv-ngx.ux.mjs +0 -5
- package/esm2022/ux.module.mjs +0 -19
- package/esm2022/version.mjs +0 -2
- package/esm2022/viewport/index.mjs +0 -10
- package/esm2022/viewport/viewport-data/index.mjs +0 -4
- package/esm2022/viewport/viewport-data/viewport-data-matcher.mjs +0 -107
- package/esm2022/viewport/viewport-data/viewport-data.pipe.mjs +0 -48
- package/esm2022/viewport/viewport-data/viewport-data.service.mjs +0 -32
- package/esm2022/viewport/viewport-data/viewport-data.utils.mjs +0 -100
- package/esm2022/viewport/viewport-matcher-var.directive.mjs +0 -69
- package/esm2022/viewport/viewport-matcher.directive.mjs +0 -136
- package/esm2022/viewport/viewport-server-size.service.mjs +0 -38
- package/esm2022/viewport/viewport.model.mjs +0 -30
- package/esm2022/viewport/viewport.module.mjs +0 -27
- package/esm2022/viewport/viewport.options.mjs +0 -51
- package/esm2022/viewport/viewport.service.mjs +0 -79
- package/esm2022/viewport/viewport.util.mjs +0 -117
- package/internal/internal.model.d.ts +0 -3
- package/platform/window.d.ts +0 -13
- package/ux.module.d.ts +0 -7
- package/version.d.ts +0 -1
- package/viewport/index.d.ts +0 -9
- package/viewport/viewport-data/index.d.ts +0 -3
- package/viewport/viewport-data/viewport-data-matcher.d.ts +0 -32
- package/viewport/viewport-data/viewport-data.pipe.d.ts +0 -18
- package/viewport/viewport-data/viewport-data.service.d.ts +0 -16
- package/viewport/viewport-data/viewport-data.utils.d.ts +0 -21
- package/viewport/viewport-matcher-var.directive.d.ts +0 -25
- package/viewport/viewport-matcher.directive.d.ts +0 -33
- package/viewport/viewport-server-size.service.d.ts +0 -10
- package/viewport/viewport.model.d.ts +0 -47
- package/viewport/viewport.module.d.ts +0 -9
- package/viewport/viewport.options.d.ts +0 -19
- package/viewport/viewport.service.d.ts +0 -34
- package/viewport/viewport.util.d.ts +0 -25
|
@@ -1 +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\tprovidedIn: \"platform\",\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, Signal, inject, signal } from \"@angular/core\";\nimport { takeUntilDestroyed, toObservable, toSignal } from \"@angular/core/rxjs-interop\";\nimport {\n\tObservable,\n\tfromEvent,\n\tmap,\n\ttap,\n\tdistinctUntilChanged,\n\tstartWith,\n\tshare,\n\tshareReplay,\n\tauditTime,\n\tof,\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 { VIEWPORT_OPTIONS } from \"./viewport.options\";\n\n@Injectable({\n\tprovidedIn: \"root\",\n})\nexport class ViewportService {\n\n\treadonly #viewportServerSize = inject(ViewportServerSizeService);\n\treadonly #windowRef = inject(WindowRef);\n\treadonly #config = inject(VIEWPORT_OPTIONS);\n\n\t/** Viewport size types list ordered by type, smallest to largest. */\n\treadonly sizeTypes = generateViewportSizeTypeInfoList(this.#config.breakpoints);\n\n\t/** Size types refs of the generated viewport size type info. */\n\treadonly sizeTypeMap = generateViewportSizeTypeInfoRefs(this.sizeTypes);\n\n\t/** Viewport size signal (which is also throttled). */\n\treadonly viewportSize: Signal<ViewportSize>;\n\n\t/** Viewport size type signal (which is also throttled). */\n\treadonly sizeType: Signal<ViewportSizeTypeInfo>;\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.sizeType(); }\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\tconstructor(\n\t) {\n\t\tif (this.#windowRef.hasNative) {\n\t\t\tthis.resizeSnap$ = fromEvent<Event>(this.#windowRef.native, \"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(this.#config.resizePollingSpeed),\n\t\t\t\tshare(),\n\t\t\t);\n\t\t} else {\n\t\t\tthis.resizeSnap$ = this.resize$ = of(this.#viewportServerSize.get());\n\t\t}\n\t\tconst size = this.getViewportSize();\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\tshareReplay(1),\n\t\t);\n\n\t\tthis.sizeType$ = sizeTypeFn(this.size$);\n\t\tthis.sizeTypeSnap$ = sizeTypeFn(this.sizeSnap$);\n\n\t\tthis.viewportSize = toSignal(this.size$, { initialValue: size });\n\t\tthis.sizeType = toSignal(this.sizeTypeSnap$, { initialValue: getSizeTypeInfo(size.width, this.sizeTypes) });\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\treadonly #viewport = inject(ViewportService);\n\treadonly #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.2.0\";\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["matchStrategyHandlerMap","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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,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,YAT/B,2BAA2B;YAC3B,8BAA8B;AAC9B,YAAA,gBAAgB,aAFhB,2BAA2B;YAC3B,8BAA8B;YAC9B,gBAAgB,CAAA,EAAA,CAAA,CAAA;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;;;;"}
|
|
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\tprovidedIn: \"platform\",\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, Signal, inject } from \"@angular/core\";\nimport { toSignal } from \"@angular/core/rxjs-interop\";\nimport {\n\tObservable,\n\tfromEvent,\n\tmap,\n\tdistinctUntilChanged,\n\tstartWith,\n\tshare,\n\tshareReplay,\n\tauditTime,\n\tof,\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 { VIEWPORT_OPTIONS } from \"./viewport.options\";\n\n@Injectable({\n\tprovidedIn: \"root\",\n})\nexport class ViewportService {\n\n\treadonly #viewportServerSize = inject(ViewportServerSizeService);\n\treadonly #windowRef = inject(WindowRef);\n\treadonly #config = inject(VIEWPORT_OPTIONS);\n\n\t/** Viewport size types list ordered by type, smallest to largest. */\n\treadonly sizeTypes = generateViewportSizeTypeInfoList(this.#config.breakpoints);\n\n\t/** Size types refs of the generated viewport size type info. */\n\treadonly sizeTypeMap = generateViewportSizeTypeInfoRefs(this.sizeTypes);\n\n\t/** Viewport size signal (which is also throttled). */\n\treadonly viewportSize: Signal<ViewportSize>;\n\n\t/** Viewport size type signal (which is also throttled). */\n\treadonly sizeType: Signal<ViewportSizeTypeInfo>;\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.sizeType(); }\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\tconstructor(\n\t) {\n\t\tif (this.#windowRef.hasNative) {\n\t\t\tthis.resizeSnap$ = fromEvent<Event>(this.#windowRef.native, \"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(this.#config.resizePollingSpeed),\n\t\t\t\tshare(),\n\t\t\t);\n\t\t} else {\n\t\t\tthis.resizeSnap$ = this.resize$ = of(this.#viewportServerSize.get());\n\t\t}\n\t\tconst size = this.getViewportSize();\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\tshareReplay(1),\n\t\t);\n\n\t\tthis.sizeType$ = sizeTypeFn(this.size$);\n\t\tthis.sizeTypeSnap$ = sizeTypeFn(this.sizeSnap$);\n\n\t\tthis.viewportSize = toSignal(this.size$, { initialValue: size });\n\t\tthis.sizeType = toSignal(this.sizeTypeSnap$, { initialValue: getSizeTypeInfo(size.width, this.sizeTypes) });\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\treadonly #viewport = inject(ViewportService);\n\treadonly #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, inject } 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\t#viewportData = inject(ViewportDataService);\n\t#cdr = inject(ChangeDetectorRef);\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\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 { OnInit, OnDestroy, Directive, Input, TemplateRef, ViewContainerRef, EmbeddedViewRef, inject } 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\t#viewport = inject(ViewportService);\n\t#viewContainer = inject(ViewContainerRef);\n\t#templateRef = inject<TemplateRef<SsvViewportMatcherVarContext>>(TemplateRef);\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\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 { OnInit, OnDestroy, Directive, Renderer2, ViewContainerRef, Input, EmbeddedViewRef, TemplateRef, ChangeDetectorRef, inject } 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\t#viewport = inject(ViewportService);\n\t#renderer = inject(Renderer2);\n\t#viewContainer = inject(ViewContainerRef);\n\t#cdr = inject(ChangeDetectorRef);\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\tconst templateRef = inject<TemplateRef<SsvViewportMatcherContext>>(TemplateRef);\n\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.3.0-dev.76\";\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["matchStrategyHandlerMap","EXPORTED_IMPORTS"],"mappings":";;;;;IAO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IAAA,EAAA,mBAAmB,YAT/B,2BAA2B;YAC3B,8BAA8B;AAC9B,YAAA,gBAAgB,aAFhB,2BAA2B;YAC3B,8BAA8B;YAC9B,gBAAgB,CAAA,EAAA,CAAA,CAAA;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/index.d.ts
CHANGED
|
@@ -1,3 +1,225 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { OnInit, OnDestroy, TemplateRef, PipeTransform, InjectionToken, EnvironmentProviders, Signal } from '@angular/core';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The indices of each breakpoint provided based on the `UX_VIEWPORT_DEFAULT_BREAKPOINTS`.
|
|
7
|
+
* @see UX_VIEWPORT_DEFAULT_BREAKPOINTS
|
|
8
|
+
*/
|
|
9
|
+
declare enum ViewportSizeType {
|
|
10
|
+
xsmall = 0,
|
|
11
|
+
small = 1,
|
|
12
|
+
medium = 2,
|
|
13
|
+
large = 3,
|
|
14
|
+
xlarge = 4,
|
|
15
|
+
xxlarge = 5,
|
|
16
|
+
xxlarge1 = 6
|
|
17
|
+
}
|
|
18
|
+
declare enum ComparisonOperation {
|
|
19
|
+
equals = "=",
|
|
20
|
+
notEquals = "<>",
|
|
21
|
+
lessThan = "<",
|
|
22
|
+
lessOrEqualThan = "<=",
|
|
23
|
+
greaterThan = ">",
|
|
24
|
+
greaterOrEqualThan = ">="
|
|
25
|
+
}
|
|
26
|
+
type ComparisonOperationKeyType = keyof typeof ComparisonOperation;
|
|
27
|
+
type ComparisonOperationValueType = "=" | "<>" | "<" | "<=" | ">" | ">=";
|
|
28
|
+
type ComparisonOperationLiteral = ComparisonOperationKeyType | ComparisonOperationValueType;
|
|
29
|
+
declare enum DeviceType {
|
|
30
|
+
desktop = "desktop",
|
|
31
|
+
mobile = "mobile",
|
|
32
|
+
tablet = "tablet"
|
|
33
|
+
}
|
|
34
|
+
interface ViewportSize {
|
|
35
|
+
width: number;
|
|
36
|
+
height: number;
|
|
37
|
+
}
|
|
38
|
+
interface ViewportSizeTypeInfo {
|
|
39
|
+
type: number;
|
|
40
|
+
name: string;
|
|
41
|
+
widthThreshold: number;
|
|
42
|
+
}
|
|
43
|
+
interface ViewportMatchConditions {
|
|
44
|
+
sizeType?: string | string[] | null;
|
|
45
|
+
sizeTypeExclude?: string | string[] | null;
|
|
46
|
+
expression?: ViewportSizeMatcherExpression;
|
|
47
|
+
}
|
|
48
|
+
interface ViewportSizeMatcherExpression {
|
|
49
|
+
size: string;
|
|
50
|
+
operation: ComparisonOperationLiteral;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
declare class SsvViewportMatcherContext implements ViewportMatchConditions {
|
|
54
|
+
sizeType: string | string[] | null;
|
|
55
|
+
sizeTypeExclude: string | string[] | null;
|
|
56
|
+
expression?: ViewportSizeMatcherExpression;
|
|
57
|
+
}
|
|
58
|
+
declare class SsvViewportMatcherDirective implements OnInit, OnDestroy {
|
|
59
|
+
#private;
|
|
60
|
+
sizeInfo: ViewportSizeTypeInfo | undefined;
|
|
61
|
+
private _context;
|
|
62
|
+
private _thenTemplateRef;
|
|
63
|
+
private _elseTemplateRef;
|
|
64
|
+
private _thenViewRef;
|
|
65
|
+
private _elseViewRef;
|
|
66
|
+
private sizeType$$;
|
|
67
|
+
private cssClass$$;
|
|
68
|
+
private readonly _update$;
|
|
69
|
+
set ssvViewportMatcher(value: string | string[] | ViewportSizeMatcherExpression);
|
|
70
|
+
set ssvViewportMatcherExclude(value: string | string[]);
|
|
71
|
+
set ssvViewportMatcherElse(templateRef: TemplateRef<SsvViewportMatcherContext> | null);
|
|
72
|
+
constructor();
|
|
73
|
+
ngOnInit(): void;
|
|
74
|
+
ngOnDestroy(): void;
|
|
75
|
+
private _updateView;
|
|
76
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SsvViewportMatcherDirective, never>;
|
|
77
|
+
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>;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
declare class SsvViewportMatcherVarContext {
|
|
81
|
+
$implicit: boolean;
|
|
82
|
+
constructor($implicit?: boolean);
|
|
83
|
+
}
|
|
84
|
+
declare class SsvViewportMatcherVarDirective implements OnInit, OnDestroy {
|
|
85
|
+
#private;
|
|
86
|
+
private _matchConditions;
|
|
87
|
+
private _context;
|
|
88
|
+
private readonly _destroy$;
|
|
89
|
+
private readonly _update$;
|
|
90
|
+
private _viewRef;
|
|
91
|
+
set condition(value: string | string[] | ViewportSizeMatcherExpression);
|
|
92
|
+
ngOnInit(): void;
|
|
93
|
+
ngOnDestroy(): void;
|
|
94
|
+
private updateView;
|
|
95
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SsvViewportMatcherVarDirective, never>;
|
|
96
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<SsvViewportMatcherVarDirective, "[ssvViewportMatcherVar]", never, { "condition": { "alias": "ssvViewportMatcherVarWhen"; "required": false; }; }, {}, never, never, true, never>;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
interface Dictionary<T> {
|
|
100
|
+
[key: string]: T;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
type ViewportDataConfig<TValue = unknown, TData = Dictionary<TValue>> = TData & {
|
|
104
|
+
default?: TValue;
|
|
105
|
+
};
|
|
106
|
+
declare enum ViewportDataMatchStrategy {
|
|
107
|
+
/** Indicates that size should match exact or default. */
|
|
108
|
+
exact = 0,
|
|
109
|
+
/** Indicates that size matches when exact match, first match smaller (down) or default. */
|
|
110
|
+
smaller = 1,
|
|
111
|
+
/** Indicates that size matches when exact match, first match larger (up) or default. */
|
|
112
|
+
larger = 2,
|
|
113
|
+
/** Indicates that size matches when exact match, or it tries both smaller/larger (smaller is preferred) until match or default. */
|
|
114
|
+
closestSmallerFirst = 3,
|
|
115
|
+
/** Indicates that size matches when exact match, or it tries both larger/smaller (larger is preferred) until match or default. */
|
|
116
|
+
closestLargerFirst = 4
|
|
117
|
+
}
|
|
118
|
+
type ViewportDataMatchStrategyLiteral = keyof typeof ViewportDataMatchStrategy;
|
|
119
|
+
|
|
120
|
+
declare class ViewportDataPipe implements PipeTransform, OnDestroy {
|
|
121
|
+
#private;
|
|
122
|
+
private markForTransform;
|
|
123
|
+
private value;
|
|
124
|
+
private data;
|
|
125
|
+
private strategy;
|
|
126
|
+
private data$$;
|
|
127
|
+
transform(data: ViewportDataConfig, strategy: ViewportDataMatchStrategyLiteral): unknown;
|
|
128
|
+
ngOnDestroy(): void;
|
|
129
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ViewportDataPipe, never>;
|
|
130
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<ViewportDataPipe, "ssvViewportData", true>;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
declare class SsvUxViewportModule {
|
|
134
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SsvUxViewportModule, never>;
|
|
135
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SsvUxViewportModule, never, [typeof SsvViewportMatcherDirective, typeof SsvViewportMatcherVarDirective, typeof ViewportDataPipe], [typeof SsvViewportMatcherDirective, typeof SsvViewportMatcherVarDirective, typeof ViewportDataPipe]>;
|
|
136
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<SsvUxViewportModule>;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
declare class SsvUxModule {
|
|
140
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SsvUxModule, never>;
|
|
141
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SsvUxModule, never, [typeof SsvUxViewportModule], [typeof SsvUxViewportModule]>;
|
|
142
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<SsvUxModule>;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
interface ViewportDataRule<T> {
|
|
146
|
+
min?: number;
|
|
147
|
+
max?: number;
|
|
148
|
+
value: T;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
declare class ViewportDataService {
|
|
152
|
+
#private;
|
|
153
|
+
/** Get data for match. */
|
|
154
|
+
get<T>(dataConfig: ViewportDataConfig<T>, strategy?: ViewportDataMatchStrategy, sizeType?: ViewportSizeTypeInfo): T | undefined;
|
|
155
|
+
/** Get data for match as observable. */
|
|
156
|
+
get$<T>(dataConfig: ViewportDataConfig<T>, strategy?: ViewportDataMatchStrategy, throttle?: boolean): Observable<T | undefined>;
|
|
157
|
+
/** Generate rules based on strategies for data. */
|
|
158
|
+
generateRules<T>(dataConfig: ViewportDataConfig<T>, strategy?: ViewportDataMatchStrategy): ViewportDataRule<T>[];
|
|
159
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ViewportDataService, never>;
|
|
160
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ViewportDataService>;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
interface UxViewportOptions {
|
|
164
|
+
/** Polling speed on resizing (in milliseconds). e.g. the higher the number the longer it takes to recalculate. */
|
|
165
|
+
resizePollingSpeed: number;
|
|
166
|
+
/** Breakpoints to use. Key needs to match the size type and the value the width threshold.
|
|
167
|
+
* e.g. given width '1000' and `medium` is set to '992' => `large`.
|
|
168
|
+
*/
|
|
169
|
+
breakpoints: Dictionary<number>;
|
|
170
|
+
/** Default data match strategy to use. */
|
|
171
|
+
defaultDataMatchStrategy: ViewportDataMatchStrategy;
|
|
172
|
+
}
|
|
173
|
+
declare const VIEWPORT_OPTIONS: InjectionToken<UxViewportOptions>;
|
|
174
|
+
declare function provideSsvUxViewportOptions(options: Partial<UxViewportOptions> | ((defaults: Readonly<UxViewportOptions>) => Partial<UxViewportOptions>), ...features: EnvironmentProviders[]): EnvironmentProviders;
|
|
175
|
+
declare function withViewportSsrDevice(options: DeviceType | (() => DeviceType)): EnvironmentProviders;
|
|
176
|
+
|
|
177
|
+
declare const VIEWPORT_SSR_DEVICE: InjectionToken<DeviceType>;
|
|
178
|
+
declare class ViewportServerSizeService {
|
|
179
|
+
private readonly deviceType;
|
|
180
|
+
get(): ViewportSize;
|
|
181
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ViewportServerSizeService, never>;
|
|
182
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ViewportServerSizeService>;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
declare class ViewportService {
|
|
186
|
+
#private;
|
|
187
|
+
/** Viewport size types list ordered by type, smallest to largest. */
|
|
188
|
+
readonly sizeTypes: ViewportSizeTypeInfo[];
|
|
189
|
+
/** Size types refs of the generated viewport size type info. */
|
|
190
|
+
readonly sizeTypeMap: Dictionary<ViewportSizeTypeInfo>;
|
|
191
|
+
/** Viewport size signal (which is also throttled). */
|
|
192
|
+
readonly viewportSize: Signal<ViewportSize>;
|
|
193
|
+
/** Viewport size type signal (which is also throttled). */
|
|
194
|
+
readonly sizeType: Signal<ViewportSizeTypeInfo>;
|
|
195
|
+
/** Window resize observable. */
|
|
196
|
+
readonly resizeSnap$: Observable<ViewportSize>;
|
|
197
|
+
/** Window resize observable (which is also throttled). */
|
|
198
|
+
readonly resize$: Observable<ViewportSize>;
|
|
199
|
+
/** Viewport size type observable (which is also throttled). */
|
|
200
|
+
readonly sizeType$: Observable<ViewportSizeTypeInfo>;
|
|
201
|
+
/** Viewport size type observable. */
|
|
202
|
+
readonly sizeTypeSnap$: Observable<ViewportSizeTypeInfo>;
|
|
203
|
+
/** Viewport size type snapshot of the last value. (Prefer use `sizeType$` observable when possible.) */
|
|
204
|
+
get sizeTypeSnapshot(): ViewportSizeTypeInfo;
|
|
205
|
+
/** Viewport size observable (which is also throttled). */
|
|
206
|
+
readonly size$: Observable<ViewportSize>;
|
|
207
|
+
/** Viewport size observable. */
|
|
208
|
+
readonly sizeSnap$: Observable<ViewportSize>;
|
|
209
|
+
constructor();
|
|
210
|
+
/** Returns the current viewport size */
|
|
211
|
+
private getViewportSize;
|
|
212
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ViewportService, never>;
|
|
213
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ViewportService>;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* A util function which generates the ViewportSizeTypeInfo.type for each breakpoint.
|
|
218
|
+
* @param breakpoints the custom breakpoints
|
|
219
|
+
*/
|
|
220
|
+
declare function generateViewportSizeType<T extends Record<string, number>>(breakpoints: T): T & Record<number, string>;
|
|
221
|
+
|
|
222
|
+
declare const VERSION = "3.3.0-dev.76";
|
|
223
|
+
|
|
224
|
+
export { ComparisonOperation, DeviceType, SsvUxModule, SsvUxViewportModule, SsvViewportMatcherContext, SsvViewportMatcherDirective, SsvViewportMatcherVarContext, SsvViewportMatcherVarDirective, VERSION, VIEWPORT_OPTIONS, VIEWPORT_SSR_DEVICE, ViewportDataMatchStrategy, ViewportDataPipe, ViewportDataService, ViewportServerSizeService, ViewportService, ViewportSizeType, generateViewportSizeType, provideSsvUxViewportOptions, withViewportSsrDevice };
|
|
225
|
+
export type { ComparisonOperationKeyType, ComparisonOperationLiteral, ComparisonOperationValueType, UxViewportOptions, ViewportDataConfig, ViewportDataMatchStrategyLiteral, ViewportSize, ViewportSizeTypeInfo };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ssv/ngx.ux",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0-dev.76",
|
|
4
4
|
"versionSuffix": "",
|
|
5
5
|
"description": "UX essentials for building apps, utilities which enables you writing richer apps easier.",
|
|
6
6
|
"keywords": [
|
|
@@ -37,8 +37,6 @@
|
|
|
37
37
|
},
|
|
38
38
|
".": {
|
|
39
39
|
"types": "./index.d.ts",
|
|
40
|
-
"esm2022": "./esm2022/ssv-ngx.ux.mjs",
|
|
41
|
-
"esm": "./esm2022/ssv-ngx.ux.mjs",
|
|
42
40
|
"default": "./fesm2022/ssv-ngx.ux.mjs"
|
|
43
41
|
}
|
|
44
42
|
}
|
package/esm2022/index.mjs
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { SsvUxModule } from "./ux.module";
|
|
2
|
-
export * from "./viewport/index";
|
|
3
|
-
export { VERSION } from "./version";
|
|
4
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9saWJzL25neC51eC9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLGFBQWEsQ0FBQztBQUMxQyxjQUFjLGtCQUFrQixDQUFDO0FBRWpDLE9BQU8sRUFBRSxPQUFPLEVBQUUsTUFBTSxXQUFXLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgeyBTc3ZVeE1vZHVsZSB9IGZyb20gXCIuL3V4Lm1vZHVsZVwiO1xuZXhwb3J0ICogZnJvbSBcIi4vdmlld3BvcnQvaW5kZXhcIjtcblxuZXhwb3J0IHsgVkVSU0lPTiB9IGZyb20gXCIuL3ZlcnNpb25cIjtcbiJdfQ==
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export {};
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJuYWwubW9kZWwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9saWJzL25neC51eC9zcmMvaW50ZXJuYWwvaW50ZXJuYWwubW9kZWwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBpbnRlcmZhY2UgRGljdGlvbmFyeTxUPiB7XG5cdFtrZXk6IHN0cmluZ106IFQ7XG59XG4iXX0=
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { InjectionToken, Injectable, inject } from "@angular/core";
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export const WINDOW = new InjectionToken("Window", {
|
|
4
|
-
factory: () => _window(),
|
|
5
|
-
});
|
|
6
|
-
export function _window() {
|
|
7
|
-
if (typeof window !== "undefined") {
|
|
8
|
-
return window;
|
|
9
|
-
}
|
|
10
|
-
return {};
|
|
11
|
-
}
|
|
12
|
-
export class WindowRef {
|
|
13
|
-
window = inject(WINDOW);
|
|
14
|
-
/** Window underlying native object. */
|
|
15
|
-
get native() {
|
|
16
|
-
return this.window;
|
|
17
|
-
}
|
|
18
|
-
/** Determines whether native element is supported or not. Generally `false` when executing in SSR. */
|
|
19
|
-
get hasNative() {
|
|
20
|
-
return !!this.native.window;
|
|
21
|
-
}
|
|
22
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: WindowRef, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
23
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: WindowRef, providedIn: "root" });
|
|
24
|
-
}
|
|
25
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: WindowRef, decorators: [{
|
|
26
|
-
type: Injectable,
|
|
27
|
-
args: [{
|
|
28
|
-
providedIn: "root",
|
|
29
|
-
}]
|
|
30
|
-
}] });
|
|
31
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2luZG93LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vbGlicy9uZ3gudXgvc3JjL3BsYXRmb3JtL3dpbmRvdy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsY0FBYyxFQUFFLFVBQVUsRUFBRSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7O0FBRW5FLE1BQU0sQ0FBQyxNQUFNLE1BQU0sR0FBRyxJQUFJLGNBQWMsQ0FBUyxRQUFRLEVBQUU7SUFDMUQsT0FBTyxFQUFFLEdBQUcsRUFBRSxDQUFDLE9BQU8sRUFBWTtDQUNsQyxDQUFDLENBQUM7QUFFSCxNQUFNLFVBQVUsT0FBTztJQUN0QixJ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mVmIHtcblxuXHRwcml2YXRlIHJlYWRvbmx5IHdpbmRvdyA9IGluamVjdChXSU5ET1cpO1xuXG5cdC8qKiBXaW5kb3cgdW5kZXJseWluZyBuYXRpdmUgb2JqZWN0LiAqL1xuXHRnZXQgbmF0aXZlKCk6IFdpbmRvdyB7XG5cdFx0cmV0dXJuIHRoaXMud2luZG93IGFzIFdpbmRvdztcblx0fVxuXG5cdC8qKiBEZXRlcm1pbmVzIHdoZXRoZXIgbmF0aXZlIGVsZW1lbnQgaXMgc3VwcG9ydGVkIG9yIG5vdC4gR2VuZXJhbGx5IGBmYWxzZWAgd2hlbiBleGVjdXRpbmcgaW4gU1NSLiAqL1xuXHRnZXQgaGFzTmF0aXZlKCk6IGJvb2xlYW4ge1xuXHRcdHJldHVybiAhIXRoaXMubmF0aXZlLndpbmRvdztcblx0fVxuXG59XG4iXX0=
|
package/esm2022/ssv-ngx.ux.mjs
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated bundle index. Do not edit.
|
|
3
|
-
*/
|
|
4
|
-
export * from './index';
|
|
5
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3N2LW5neC51eC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYnMvbmd4LnV4L3NyYy9zc3Ytbmd4LnV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxTQUFTLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vaW5kZXgnO1xuIl19
|