diff --git a/.yarn/cache/@carbon-ibmdotcom-services-npm-1.54.0-ad1ee8ddb8-0370f56b68.zip b/.yarn/cache/@carbon-ibmdotcom-services-npm-1.54.0-ad1ee8ddb8-0370f56b68.zip new file mode 100644 index 00000000000..26dbc257301 Binary files /dev/null and b/.yarn/cache/@carbon-ibmdotcom-services-npm-1.54.0-ad1ee8ddb8-0370f56b68.zip differ diff --git a/.yarn/cache/@carbon-ibmdotcom-styles-npm-1.54.0-41a55af16d-56652977ca.zip b/.yarn/cache/@carbon-ibmdotcom-styles-npm-1.54.0-41a55af16d-56652977ca.zip new file mode 100644 index 00000000000..b87a703cef9 Binary files /dev/null and b/.yarn/cache/@carbon-ibmdotcom-styles-npm-1.54.0-41a55af16d-56652977ca.zip differ diff --git a/.yarn/cache/@carbon-ibmdotcom-utilities-npm-1.54.0-e8ad769e3a-45606730a2.zip b/.yarn/cache/@carbon-ibmdotcom-utilities-npm-1.54.0-e8ad769e3a-45606730a2.zip new file mode 100644 index 00000000000..b951b1dc6d0 Binary files /dev/null and b/.yarn/cache/@carbon-ibmdotcom-utilities-npm-1.54.0-e8ad769e3a-45606730a2.zip differ diff --git a/.yarn/cache/@ibm-telemetry-js-npm-1.2.0-0868d8ad4f-dd942eaecc.zip b/.yarn/cache/@ibm-telemetry-js-npm-1.2.0-0868d8ad4f-dd942eaecc.zip new file mode 100644 index 00000000000..e92e6c35cc7 Binary files /dev/null and b/.yarn/cache/@ibm-telemetry-js-npm-1.2.0-0868d8ad4f-dd942eaecc.zip differ diff --git a/packages/react/README.md b/packages/react/README.md index 2bed782837a..cca86a23bbf 100644 --- a/packages/react/README.md +++ b/packages/react/README.md @@ -84,3 +84,12 @@ Licensed under the [Apache 2.0 License](https://github.com/carbon-design-system/carbon-for-ibm-dotcom/blob/main/LICENSE). # dpo-cms-mission + +## IBM Telemetry IBM Telemetry + +This package uses IBM Telemetry to collect metrics data. By installing this +package as a dependency you are agreeing to telemetry collection. To opt out, +see +[Opting out of IBM Telemetry data collection](https://github.com/ibm-telemetry/telemetry-js/tree/main#opting-out-of-ibm-telemetry-data-collection). +For more information on the data being collected, please see the +[IBM Telemetry documentation](https://github.com/ibm-telemetry/telemetry-js/tree/main#ibm-telemetry-collection-basics). diff --git a/packages/react/package.json b/packages/react/package.json index 57d1d698662..67386380401 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -10,7 +10,8 @@ "files": [ "lib/**/*", "es/**/*", - "umd/**/*" + "umd/**/*", + "telemetry.yml" ], "keywords": [ "react", @@ -34,7 +35,7 @@ "contributors:generate": "all-contributors generate", "doctoc": "doctoc --title '## Table of Contents' docs", "preinstall": "echo \"⛔️⛔️⛔️ATTENTION: @carbon/ibmdotcom-react package will be deprecated in Carbon for IBM.com V2. This package will fall into maintaince-mode only; we will make updates only for potential security issues and high severity bugs. Head to https://www.ibm.com/standards/carbon/developing/frameworks/react for more details.⛔️⛔️⛔️\"", - "postinstall": "carbon-telemetry collect --install", + "postinstall": "ibmtelemetry --config=telemetry.yml", "start": "yarn storybook", "storybook": "cross-env NODE_OPTIONS=--openssl-legacy-provider start-storybook -p 9000", "test:e2e:build": "node ./tests/e2e/build/build-examples.js", @@ -66,7 +67,7 @@ "@carbon/ibmdotcom-services": "1.54.0", "@carbon/ibmdotcom-styles": "1.54.0", "@carbon/ibmdotcom-utilities": "1.54.0", - "@carbon/telemetry": "^0.1.0", + "@ibm/telemetry-js": "^1.2.0", "autosuggest-highlight": "^3.1.1", "carbon-components": "10.58.12", "carbon-components-react": "7.59.17", diff --git a/packages/react/telemetry.yml b/packages/react/telemetry.yml new file mode 100644 index 00000000000..82023316fe9 --- /dev/null +++ b/packages/react/telemetry.yml @@ -0,0 +1,307 @@ +# yaml-language-server: $schema=https://unpkg.com/@ibm/telemetry-config-schema@v1/dist/config.schema.json + +version: 1 +projectId: 15981afa-f735-4515-b4e2-a09b37cb72f6 +endpoint: https://collector-prod.1am6wm210aow.us-south.codeengine.appdomain.cloud/v1/metrics +collect: + jsx: + elements: + allowedAttributeNames: + # General + - adjunctLinks + - alt + - aside + - backButtonText + - border + - buttons + - card + - cards + - children + - className + - copy + - cta + - customClassName + - customProfileLogin + - disabled + - disableLocaleButton + - eyebrow + - formatCTAcopy + - heading + - href + - iconPlacement + - image + - initialSearchTerm + - inverse + - isActive + - isSearchActive + - isSideNavExpanded + - items + - labelText + - links + - media + - mediaData + - mediaType + - menuItems + - menuLabel + - navigation + - onBackClick + - onClick + - onClose + - openLightBox + - pictogram + - placeHolderText + - platform + - playingMode + - regionList + - renderLightBox + - searchOpenOnload + - selectedId + - setClearResults + - size + - stickyOffset + - style + - theme + - thumbnail + - title + - type + - videoId + - videoTitle + # BPIDLegalText + - bpidLegalText + # ButtonCTA + - setMediaData + # CalloutQuote + - quote + # Card + - cardStatic + - light + # CardCTA + - disableImage + # CardGroup + - cardsPerRow + # CategoryLink + - highlighted + # Content + - withL1 + # ContentSection + - childrenCustomClassName + # CTA + - customVideoTitle + # DotcomShell + - footerProps + - mastheadProps + # ExpressiveModal + - fullwidth + - open + # ExpressiveModalCloseBtn + - btnClassName + - iconClassName + - iconDescription + # Footer + - langCode + - languageCallback + - languageInitialItem + - languageItems + - languageOnly + # FooterNav + - groups + # HorizontalRule + - contrast + - weight + # IbmLogo + - autoid + - logoData + # Image + - classname + - defaultSrc + - icon + - longDescription + - refImage + - sources + # ImageWithCaption + - lightbox + # LanguageSelector + - callback + - initialSelectedItem + # Layout + - marginBottom + - marginTop + - nested + # LeadspaceWithSearch + - searchProps + # LegalNav + - button + # LinkWithIcon + - iconInline + # LocaleButton + - aria + - displayLang + # LocaleModal + - closeFunc + - isOpen + - localeData + - localeDisplay + - setIsOpen + # LocaleModalCountries + - currentRegion + - searchLabel + # LocaleModalRegions + - closeModalLabel + - returnButtonLabel + - setCurrentRegion + - setIsFiltering + # LogoGrid + - ctaCopy + - ctaHref + - hideBorder + - logosGroup + # Masthead + - customTypeaheadApi + - hasProfile + - hasSearch + - mastheadL1Data + - multiSection + - selectedMenuItem + # MastheadL1 + - navigationL1 + - titleLink + # MastheadProfile + - overflowMenuItemProps + - overflowMenuProps + - profileMenu + # MastheadSearch + - navType + - onChangeSearchActive + - renderValue + # MastheadSearchInput + - componentInputProps + - disableFocus + - dispatch + - searchIconClick + # MastheadSearchSuggestion + - getSuggestionValue + - isHighlighted + - query + - suggestion + # MegaMenu + - data + # Quote + - markType + - source + # RightNavigation + - hasHighlights + - viewAllLinkHref + - viewAllLinkTitle + # ScrollAnimations + - animation + - keepAnimations + - selectorTargets + # SideNavIcon + - small + # SideNavMenu + - defaultExpanded + - isbackbutton + - large + - onToggle + - renderIcon + # SideNavMenuSection + - show + # SideNavMenuWithBackForward + - titleUrl + # TableOfContents + - headingContent + - menuRule + # TOCMobile + - updateState + # VideoImageOverlay + - embedVideo + - videoData + # VideoPlayer + - aspectRatio + - autoPlay + - caption + - showCaption + # React + - key + - ref + allowedAttributeStringValues: + # General - iconPlacement + - left + - right + # General - mediaType + - image + - video + # General - playingMode + - inline + - lightbox + # General - size + - fluid + - large + - medium + - small + - super + - tall + # General - style + - button + - card + - feature + - horizontal + - text + - vertical + - vertical-end + # General - theme + - g10 + - g100 + - g90 + - white + # General - type + - 1-3 + - 2-1 + - centered + - dashed + - default + - download + - external + - jump + - left + - local + - micro + - short + - solid + - video + # HorizontalRule - contrast + - high-contrast + - low-contrast + - medium-contrast + # HorizontalRule - weight + - thick + - thin + # Layout - marginBottom + - layout-01 + - layout-02 + - layout-03 + - layout-04 + - layout-05 + - layout-06 + - layout-07 + # Layout - marginTop + - layout-01 + - layout-02 + - layout-03 + - layout-04 + - layout-05 + - layout-06 + - layout-07 + # MastheadSearch - navType + - alt + - default + - eco + # Quote - markType + - cornerBracket + - doubleAngle + - doubleCurved + - lowHighReversedDoubleCurved + - singleAngle + - singleCurved + npm: + dependencies: null diff --git a/yarn.lock b/yarn.lock index cf2baff1722..122ff0ff48a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2135,7 +2135,7 @@ __metadata: "@carbon/icons-react": "npm:10.49.2" "@carbon/pictograms-react": "npm:11.50.0" "@carbon/storybook-addon-theme": "npm:1.45.1-rc.0" - "@carbon/telemetry": "npm:^0.1.0" + "@ibm/telemetry-js": "npm:^1.2.0" "@percy-io/in-percy": "npm:^0.1.11" "@percy/cli": "npm:^1.8.1" "@percy/cypress": "npm:^3.1.1" @@ -2708,7 +2708,7 @@ __metadata: languageName: unknown linkType: soft -"@carbon/telemetry@npm:0.1.0, @carbon/telemetry@npm:^0.1.0": +"@carbon/telemetry@npm:0.1.0": version: 0.1.0 resolution: "@carbon/telemetry@npm:0.1.0" bin: @@ -3437,6 +3437,15 @@ __metadata: languageName: node linkType: hard +"@ibm/telemetry-js@npm:^1.2.0": + version: 1.2.0 + resolution: "@ibm/telemetry-js@npm:1.2.0" + bin: + ibmtelemetry: dist/collect.js + checksum: dd942eaecc6bdf40f91309fc783b2d1b654e9cb73dd0b98ec54eef53816cad027c60ccaf6415cc81dd3ee1f8686159733ac226f6c13288419269a001a7b81b3b + languageName: node + linkType: hard + "@isaacs/cliui@npm:^8.0.2": version: 8.0.2 resolution: "@isaacs/cliui@npm:8.0.2"