1 line
44 KiB
Plaintext
1 line
44 KiB
Plaintext
|
{"version":3,"file":"angular-fontawesome.mjs","sources":["../../../src/lib/shared/errors/warn-if-icon-html-missing.ts","../../../src/lib/shared/errors/warn-if-icon-spec-missing.ts","../../../src/lib/shared/utils/classlist.util.ts","../../../src/lib/shared/utils/is-icon-lookup.util.ts","../../../src/lib/shared/utils/normalize-icon-spec.util.ts","../../../src/lib/config.ts","../../../src/lib/icon-library.ts","../../../src/lib/stack/stack-item-size.directive.ts","../../../src/lib/stack/stack.component.ts","../../../src/lib/icon/icon.component.ts","../../../src/lib/icon/duotone-icon.component.ts","../../../src/lib/shared/errors/warn-if-parent-not-exist.ts","../../../src/lib/layers/layers.component.ts","../../../src/lib/layers/layers-counter.component.ts","../../../src/lib/layers/layers-text.component.ts","../../../src/lib/fontawesome.module.ts","../../../src/lib/angular-fontawesome.ts"],"sourcesContent":["import { IconLookup } from '@fortawesome/fontawesome-svg-core';\n\nexport const faWarnIfIconDefinitionMissing = (iconSpec: IconLookup) => {\n throw new Error(\n `Could not find icon with iconName=${iconSpec.iconName} and prefix=${iconSpec.prefix} in the icon library.`,\n );\n};\n","export const faWarnIfIconSpecMissing = () => {\n throw new Error('Property `icon` is required for `fa-icon`/`fa-duotone-icon` components.');\n};\n","import { FaProps } from '../models/props.model';\n\n/**\n * Fontawesome class list.\n * Returns classes array by props.\n */\nexport const faClassList = (props: FaProps): string[] => {\n const classes = {\n [`fa-${props.animation}`]: props.animation != null && !props.animation.startsWith('spin'),\n 'fa-spin': props.animation === 'spin' || props.animation === 'spin-reverse',\n 'fa-spin-pulse': props.animation === 'spin-pulse' || props.animation === 'spin-pulse-reverse',\n 'fa-spin-reverse': props.animation === 'spin-reverse' || props.animation === 'spin-pulse-reverse',\n // According to https://fontawesome.com/docs/web/style/animate#spin fa-pulse\n // class is deprecated, remove the below line when Font Awesome 5 support\n // is dropped.\n 'fa-pulse': props.animation === 'spin-pulse' || props.animation === 'spin-pulse-reverse',\n 'fa-fw': props.fixedWidth,\n 'fa-border': props.border,\n 'fa-inverse': props.inverse,\n 'fa-layers-counter': props.counter,\n 'fa-flip-horizontal': props.flip === 'horizontal' || props.flip === 'both',\n 'fa-flip-vertical': props.flip === 'vertical' || props.flip === 'both',\n [`fa-${props.size}`]: props.size !== null,\n [`fa-rotate-${props.rotate}`]: props.rotate !== null,\n [`fa-pull-${props.pull}`]: props.pull !== null,\n [`fa-stack-${props.stackItemSize}`]: props.stackItemSize != null,\n };\n\n return Object.keys(classes)\n .map((key) => (classes[key] ? key : null))\n .filter((key) => key);\n};\n","import { IconLookup, IconProp } from '@fortawesome/fontawesome-svg-core';\n\n/**\n * Returns if is IconLookup or not.\n */\nexport const isIconLookup = (i: IconProp): i is IconLookup =>\n (i as IconLookup).prefix !== undefined && (i as IconLookup).iconName !== undefined;\n","import { IconDefinition, IconLookup, IconPrefix, IconProp } from '@fortawesome/fontawesome-svg-core';\nimport { isIconLookup } from './is-icon-lookup.util';\n\n/**\n * Normalizing icon spec.\n */\nexport const faNormalizeIconSpec = (\n iconSpec: IconProp | IconDefinition,\n defaultPrefix: IconPrefix,\n): IconLookup | IconDefinition => {\n if (isIconLookup(iconSpec)) {\n return iconSpec;\n }\n\n if (typeof iconSpec === 'string') {\n return { prefix: defaultPrefix, iconName: iconSpec };\n }\n\n return { prefix: iconSpec[0], iconName: iconSpec[1] };\n};\n","import { Injectable } from '@angular/core';\nimport { IconDefinition, IconPrefix } from '@fortawesome/fontawesome-svg-core';\n\n@Injectable({ providedIn: 'root' })\nexport class FaConfig {\n /**\n * Default prefix to use, when one is not provided with the icon name.\n *\n * @default 'fas'\n */\n defaultPrefix: IconPrefix = 'fas';\n\n /**\n * Provides a fallback
|