carbon-components-angular
Version:
Next generation components
1 lines • 23.7 kB
Source Map (JSON)
{"version":3,"file":"carbon-components-angular-icon.mjs","sources":["../../src/icon/icon.service.ts","../../src/icon/icon.directive.ts","../../src/icon/icon.module.ts","../../src/icon/carbon-components-angular-icon.ts"],"sourcesContent":["import { Injectable } from \"@angular/core\";\nimport { toString } from \"@carbon/icon-helpers\";\n\n// icon imports\nimport {\n\tAdd16,\n\tCalendar16,\n\tCaretDown16,\n\tCaretLeft16,\n\tCaretRight16,\n\tCaretUp16,\n\tCheckmark16,\n\tCheckmarkFilled16,\n\tCheckmarkOutline16,\n\tChevronDown16,\n\tChevronRight16,\n\tClose16,\n\tCopy16,\n\tDownload16,\n\tErrorFilled16,\n\tInformationFilled16,\n\tMenu16,\n\tOverflowMenuVertical16,\n\tSave16,\n\tSettings16,\n\tTrashCan16,\n\tWarning16,\n\tWarningFilled16\n} from \"@carbon/icons\";\n\n/**\n * An object that represents a parsed icon\n */\nexport interface IconDescriptor {\n\t/**\n\t * The element to render. For the root this is `svg`\n\t */\n\telem: string;\n\t/**\n\t * An object of attributes to apply to the element.\n\t *\n\t * The type here is non-exhaustive.\n\t */\n\tattrs: {\n\t\txmlns: string,\n\t\t// needed by the icon directive to determine other attributes\n\t\tviewBox: string,\n\t\tfill: string,\n\t\t// needed by the icon directive to determine other attributes\n\t\twidth: string,\n\t\t// needed by the icon directive to determine other attributes\n\t\theight: string,\n\t\t[x: string]: string\n\t};\n\t/**\n\t * The content (children) of the element as an array of `IconDescriptor`s\n\t * (usually without a few fields, namely `name` and `size`)\n\t */\n\tcontent: IconDescriptor[];\n\t/**\n\t * The name of the icon.\n\t *\n\t * Needed by the icon service.\n\t */\n\tname: string;\n\t/**\n\t * The size of the icon in pixels.\n\t *\n\t * Needed by the icon service.\n\t */\n\tsize: number;\n\t/**\n\t * Optional. A string representation of the compiled svg.\n\t * If missing the icon service will add this.\n\t */\n\tsvg?: string;\n}\n\n/**\n * Abstract class that represent a cache of icons.\n *\n * The actual caching mechanism will be implementation specific,\n * but it's likely a good idea to key by the icons name and/or size.\n * Icon name and size will always be strings, and they will be the two consistent\n * identifiers of an icon. For the purposes of storage additonal descriptor properties may\n * be used, but the name and size are the only ones guarenteed to be passed for lookup purposes.\n */\nexport abstract class IconCache {\n\t/**\n\t * Finds and returns an icon based on it's name and size\n\t */\n\tabstract get(name: string, size: string): object;\n\t/**\n\t * stores an icon descriptor to the cache\n\t */\n\tabstract set(name: string, size: string, descriptor: object): void;\n}\n\n/**\n * Custom error for when a name can't be found\n */\nexport class IconNameNotFoundError extends Error {\n\tconstructor(name: string) {\n\t\tsuper(`Icon ${name} not found`);\n\t}\n}\n\n/**\n * Custom error for when a specific size can't be found\n */\nexport class IconSizeNotFoundError extends Error {\n\tconstructor(size: string, name: string) {\n\t\tsuper(\"Size ${size} for ${name} not found\");\n\t}\n}\n\n/**\n * Concrete implementation of `IconCache` as a simple in memory cache\n */\nexport class IconMemoryCache extends IconCache {\n\tprivate iconMap = new Map<string, Map<string, object>>();\n\n\tget(name: string, size: string) {\n\t\tif (!this.iconMap.has(name)) {\n\t\t\tthrow new IconNameNotFoundError(name);\n\t\t}\n\t\tconst sizeMap = this.iconMap.get(name);\n\t\tif (!sizeMap.has(size)) {\n\t\t\tthrow new IconSizeNotFoundError(size, name);\n\t\t}\n\t\treturn sizeMap.get(size);\n\t}\n\n\tset(name: string, size: string, descriptor: object) {\n\t\tif (!this.iconMap.has(name)) {\n\t\t\tthis.iconMap.set(name, new Map());\n\t\t}\n\t\tconst sizeMap = this.iconMap.get(name);\n\t\tsizeMap.set(size, descriptor);\n\t}\n}\n\n/**\n * The icon service is a singleton service responsible for registering and retriving icons from `@carbon/icons`.\n *\n * It's important to register icons before use. It's reccommended to register your icons early, likely in your app.component.\n *\n * To allow for improved tree shaking _do not_ import all the icons from `@carbon/icons` and register them.\n * Instead register only the icons in use by your application. If your application makes use of lazy loaded\n * modules you may also lazy load the icons used in that module by registering them early on in that module.\n *\n * `ngOnInit` should be sufficiantly early to register icons.\n *\n * Example:\n * ```\n * import { Accessibility16 } from \"@carbon/icons\";\n *\n * // ...\n *\n * class MyComponent implements OnInit {\n * \tconstructor(protected iconService: IconService) {}\n *\n * \t// ...\n *\n * \tngOnInit() {\n * \t\tthis.iconService.register(Accessibility16);\n * \t}\n *\n * \t// ...\n * }\n * ```\n *\n * If needed it is possible to register an icon under a different name, via `registerAs`.\n */\n@Injectable()\nexport class IconService {\n\tprivate iconCache: IconCache = new IconMemoryCache();\n\n\t/**\n\t * Registers an array of icons based on the metadata provided by `@carbon/icons`\n\t */\n\tpublic registerAll(descriptors: object[]) {\n\t\tdescriptors.forEach(icon => this.register(icon));\n\t}\n\n\t/**\n\t * Registers an icon based on the metadata provided by `@carbon/icons`\n\t */\n\tpublic register(descriptor: object) {\n\t\tconst { name } = descriptor as IconDescriptor;\n\t\tthis.registerAs(name, descriptor);\n\t}\n\n\t/**\n\t * Registers an icon based on a uniqe name and metadata provided by `@carbon/icons`\n\t */\n\tpublic registerAs(name: string, descriptor: object) {\n\t\tconst { size } = descriptor as IconDescriptor;\n\t\tthis.iconCache.set(name, size.toString(), descriptor);\n\t}\n\n\t/**\n\t * Gets an icon, converts it to a string, and caches the result\n\t */\n\tpublic get(name: string, size: string): IconDescriptor {\n\t\ttry {\n\t\t\tconst icon = this.iconCache.get(name, size.toString()) as IconDescriptor;\n\t\t\tif (!icon.svg) {\n\t\t\t\ticon.svg = toString(icon);\n\t\t\t}\n\t\t\treturn icon;\n\t\t} catch (e) {\n\t\t\tthrow e;\n\t\t}\n\t}\n\n\t/**\n\t * Configure various service settings (caching strategy ...)\n\t */\n\tpublic configure(options: { cache: IconCache }) {\n\t\tthis.iconCache = options.cache;\n\t}\n}\n","import {\n\tAfterViewInit,\n\tDirective,\n\tElementRef,\n\tInput,\n\tOnChanges,\n\tSimpleChanges\n} from \"@angular/core\";\nimport { IconService } from \"./icon.service\";\nimport { getAttributes } from \"@carbon/icon-helpers\";\n\n/**\n * A directive for populating a svg element based on the provided carbon icon name.\n *\n * Get started with importing the module:\n *\n * ```typescript\n * import { IconModule } from 'carbon-components-angular';\n * ```\n *\n * [See demo](../../?path=/story/components-icon--basic)\n */\n@Directive({\n\tselector: \"[cdsIcon], [ibmIcon]\"\n})\nexport class IconDirective implements AfterViewInit, OnChanges {\n\n\t/**\n\t * @deprecated since v5 - Use `cdsIcon` input property instead\n\t */\n\t@Input() set ibmIcon(iconName: string) {\n\t\tthis.cdsIcon = iconName;\n\t}\n\n\tstatic titleIdCounter = 0;\n\n\t@Input() cdsIcon = \"\";\n\n\t@Input() size = \"16\";\n\n\t@Input() title = \"\";\n\n\t@Input() ariaLabel = \"\";\n\n\t@Input() ariaLabelledBy = \"\";\n\n\t@Input() ariaHidden = \"\";\n\n\t@Input() isFocusable = false;\n\n\tconstructor(\n\t\tprotected elementRef: ElementRef,\n\t\tprotected iconService: IconService\n\t) {}\n\n\trenderIcon(iconName: string) {\n\t\tconst root = this.elementRef.nativeElement as HTMLElement;\n\n\t\tlet icon;\n\t\ttry {\n\t\t\ticon = this.iconService.get(iconName, this.size.toString());\n\t\t} catch (error) {\n\t\t\tconsole.warn(error);\n\t\t\t// bail out\n\t\t\treturn;\n\t\t}\n\n\t\tconst domParser = new DOMParser();\n\t\tconst rawSVG = icon.svg;\n\t\tconst svgElement = domParser.parseFromString(rawSVG, \"image/svg+xml\").documentElement;\n\n\t\tlet node: ChildNode = root.tagName.toUpperCase() !== \"SVG\" ? svgElement : svgElement.firstChild;\n\t\troot.innerHTML = \"\"; // Clear root element\n\t\twhile (node) {\n\t\t\t// importNode makes a clone of the node\n\t\t\t// this ensures we keep looping over the nodes in the parsed document\n\t\t\troot.appendChild(root.ownerDocument.importNode(node, true));\n\t\t\t// type the node because the angular compiler freaks out if it\n\t\t\t// ends up thinking it's a `Node` instead of a `ChildNode`\n\t\t\tnode = node.nextSibling as ChildNode;\n\t\t}\n\n\t\tconst svg = root.tagName.toUpperCase() !== \"SVG\" ? svgElement : root;\n\t\tsvg.setAttribute(\"xmlns\", \"http://www.w3.org/2000/svg\");\n\n\t\tconst attributes = getAttributes({\n\t\t\twidth: icon.attrs.width,\n\t\t\theight: icon.attrs.height,\n\t\t\tviewBox: icon.attrs.viewBox,\n\t\t\ttitle: this.title,\n\t\t\t\"aria-label\": this.ariaLabel,\n\t\t\t\"aria-labelledby\": this.ariaLabelledBy,\n\t\t\t\"aria-hidden\": this.ariaHidden,\n\t\t\tfocusable: this.isFocusable.toString()\n\t\t});\n\n\t\tconst attrKeys = Object.keys(attributes);\n\t\tfor (let i = 0; i < attrKeys.length; i++) {\n\t\t\tconst key = attrKeys[i];\n\t\t\tconst value = attributes[key];\n\n\t\t\tif (key === \"title\") {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (value) {\n\t\t\t\tsvg.setAttribute(key, value);\n\t\t\t}\n\t\t}\n\n\t\tif (attributes[\"title\"]) {\n\t\t\tconst title = document.createElement(\"title\");\n\t\t\ttitle.textContent = attributes.title;\n\t\t\tIconDirective.titleIdCounter++;\n\t\t\ttitle.setAttribute(\"id\", `${icon.name}-title-${IconDirective.titleIdCounter}`);\n\t\t\t// title must be first for screen readers\n\t\t\tsvg.insertBefore(title, svg.firstElementChild);\n\t\t\tsvg.setAttribute(\"aria-labelledby\", `${icon.name}-title-${IconDirective.titleIdCounter}`);\n\t\t}\n\t}\n\n\tngAfterViewInit() {\n\t\tthis.renderIcon(this.cdsIcon);\n\t}\n\n\tngOnChanges({ cdsIcon }: SimpleChanges) {\n\t\t// We want to ignore first change to let the icon register\n\t\t// and add only after view has been initialized\n\t\tif (cdsIcon && !cdsIcon.isFirstChange()) {\n\t\t\tthis.renderIcon(this.cdsIcon);\n\t\t}\n\t}\n}\n","// modules\nimport { NgModule, Optional, SkipSelf } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\n\n// imports\nimport { IconDirective } from \"./icon.directive\";\nimport { IconService } from \"./icon.service\";\n\n// icon imports\nimport Add16 from \"@carbon/icons/es/add/16\";\nimport Add20 from \"@carbon/icons/es/add/20\";\nimport Bee16 from \"@carbon/icons/es/bee/16\";\nimport Bee20 from \"@carbon/icons/es/bee/20\";\nimport Calendar16 from \"@carbon/icons/es/calendar/16\";\nimport Carbon16 from \"@carbon/icons/es/carbon/16\";\nimport Carbon20 from \"@carbon/icons/es/carbon/20\";\nimport CaretDown16 from \"@carbon/icons/es/caret--down/16\";\nimport CaretLeft16 from \"@carbon/icons/es/caret--left/16\";\nimport CaretRight16 from \"@carbon/icons/es/caret--right/16\";\nimport CaretUp16 from \"@carbon/icons/es/caret--up/16\";\nimport Checkmark16 from \"@carbon/icons/es/checkmark/16\";\nimport CheckmarkFilled16 from \"@carbon/icons/es/checkmark--filled/16\";\nimport CheckmarkFilled20 from \"@carbon/icons/es/checkmark--filled/20\";\nimport CheckmarkOutline16 from \"@carbon/icons/es/checkmark--outline/16\";\nimport ChevronDown16 from \"@carbon/icons/es/chevron--down/16\";\nimport ChevronRight16 from \"@carbon/icons/es/chevron--right/16\";\nimport CircleDash16 from \"@carbon/icons/es/circle-dash/16\";\nimport Close16 from \"@carbon/icons/es/close/16\";\nimport Close20 from \"@carbon/icons/es/close/20\";\nimport Copy16 from \"@carbon/icons/es/copy/16\";\nimport Copy20 from \"@carbon/icons/es/copy/20\";\nimport Data216 from \"@carbon/icons/es/data--2/16\";\nimport Data220 from \"@carbon/icons/es/data--2/20\";\nimport Document16 from \"@carbon/icons/es/document/16\";\nimport Document20 from \"@carbon/icons/es/document/20\";\nimport Download16 from \"@carbon/icons/es/download/16\";\nimport ErrorFilled16 from \"@carbon/icons/es/error--filled/16\";\nimport ErrorFilled20 from \"@carbon/icons/es/error--filled/20\";\nimport Fade16 from \"@carbon/icons/es/fade/16\";\nimport Fade20 from \"@carbon/icons/es/fade/20\";\nimport Folder16 from \"@carbon/icons/es/folder/16\";\nimport Incomplete16 from \"@carbon/icons/es/incomplete/16\";\nimport InformationFilled16 from \"@carbon/icons/es/information--filled/16\";\nimport InformationFilled20 from \"@carbon/icons/es/information--filled/20\";\nimport InformationSquareFilled20 from \"@carbon/icons/es/information--square--filled/20\";\nimport Menu16 from \"@carbon/icons/es/menu/16\";\nimport Menu20 from \"@carbon/icons/es/menu/20\";\nimport OverflowMenuVertical16 from \"@carbon/icons/es/overflow-menu--vertical/16\";\nimport OverflowMenuHorizontal16 from \"@carbon/icons/es/overflow-menu--horizontal/16\";\nimport Save16 from \"@carbon/icons/es/save/16\";\nimport Search16 from \"@carbon/icons/es/search/16\";\nimport Settings16 from \"@carbon/icons/es/settings/16\";\nimport SettingsAdjust16 from \"@carbon/icons/es/settings--adjust/16\";\nimport Subtract16 from \"@carbon/icons/es/subtract/16\";\nimport TrashCan16 from \"@carbon/icons/es/trash-can/16\";\nimport Warning16 from \"@carbon/icons/es/warning/16\";\nimport WarningFilled16 from \"@carbon/icons/es/warning--filled/16\";\nimport WarningFilled20 from \"@carbon/icons/es/warning--filled/20\";\nimport WarningAltFilled16 from \"@carbon/icons/es/warning--alt--filled/16\";\nimport WarningAltFilled20 from \"@carbon/icons/es/warning--alt--filled/20\";\nimport View16 from \"@carbon/icons/es/view/16\";\nimport ViewOff16 from \"@carbon/icons/es/view--off/16\";\n\n// either provides a new instance of IconService, or returns the parent\nexport function ICON_SERVICE_PROVIDER_FACTORY(parentService: IconService) {\n\treturn parentService || new IconService();\n}\n\n// icon service *must* be a singleton to ensure that icons are accessible globally and not duplicated\nexport const ICON_SERVICE_PROVIDER = {\n\tprovide: IconService,\n\tdeps: [[new Optional(), new SkipSelf(), IconService]],\n\tuseFactory: ICON_SERVICE_PROVIDER_FACTORY\n};\n\n@NgModule({\n\tdeclarations: [\n\t\tIconDirective\n\t],\n\texports: [\n\t\tIconDirective\n\t],\n\timports: [\n\t\tCommonModule\n\t],\n\tproviders: [\n\t\tICON_SERVICE_PROVIDER\n\t]\n})\nexport class IconModule {\n\tconstructor(protected iconService: IconService) {\n\t\ticonService.registerAll([\n\t\t\tAdd16,\n\t\t\tAdd20,\n\t\t\tBee16,\n\t\t\tBee20,\n\t\t\tCalendar16,\n\t\t\tCarbon16,\n\t\t\tCarbon20,\n\t\t\tCaretDown16,\n\t\t\tCaretLeft16,\n\t\t\tCaretRight16,\n\t\t\tCaretUp16,\n\t\t\tCheckmark16,\n\t\t\tCheckmarkFilled16,\n\t\t\tCheckmarkFilled20,\n\t\t\tCheckmarkOutline16,\n\t\t\tChevronDown16,\n\t\t\tChevronRight16,\n\t\t\tCircleDash16,\n\t\t\tClose16,\n\t\t\tClose20,\n\t\t\tCopy16,\n\t\t\tCopy20,\n\t\t\tData216,\n\t\t\tData220,\n\t\t\tDocument16,\n\t\t\tDocument20,\n\t\t\tDownload16,\n\t\t\tErrorFilled16,\n\t\t\tErrorFilled20,\n\t\t\tFade16,\n\t\t\tFade20,\n\t\t\tFolder16,\n\t\t\tIncomplete16,\n\t\t\tInformationFilled16,\n\t\t\tInformationFilled20,\n\t\t\tInformationSquareFilled20,\n\t\t\tMenu16,\n\t\t\tMenu20,\n\t\t\tOverflowMenuVertical16,\n\t\t\tOverflowMenuHorizontal16,\n\t\t\tSave16,\n\t\t\tSearch16,\n\t\t\tSettings16,\n\t\t\tSettingsAdjust16,\n\t\t\tSubtract16,\n\t\t\tTrashCan16,\n\t\t\tView16,\n\t\t\tViewOff16,\n\t\t\tWarning16,\n\t\t\tWarningFilled16,\n\t\t\tWarningFilled20,\n\t\t\tWarningAltFilled16,\n\t\t\tWarningAltFilled20\n\t\t]);\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1.IconService"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8EA;;;;;;;;AAQG;MACmB,SAAS,CAAA;AAS9B,CAAA;AAED;;AAEG;AACG,MAAO,qBAAsB,SAAQ,KAAK,CAAA;AAC/C,IAAA,WAAA,CAAY,IAAY,EAAA;AACvB,QAAA,KAAK,CAAC,CAAA,KAAA,EAAQ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