@salesforcedevs/dx-components 0.54.0 → 0.54.5
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/lwc.config.json +19 -19
- package/package.json +2 -3
- package/src/assets/svg/sidebar-item-loading.svg +2 -8
- package/src/modules/dx/banner/banner.css +3 -3
- package/src/modules/dx/breadcrumbs/breadcrumbs.css +2 -2
- package/src/modules/dx/breadcrumbs/breadcrumbs.ts +9 -11
- package/src/modules/dx/button/button.css +1 -1
- package/src/modules/dx/cardBlogPost/cardBlogPost.css +1 -1
- package/src/modules/dx/cardCallout/cardCallout.css +3 -3
- package/src/modules/dx/cardCallout/cardCallout.ts +2 -2
- package/src/modules/dx/cardContent/cardContent.css +3 -3
- package/src/modules/dx/cardContent/cardContent.ts +2 -2
- package/src/modules/dx/cardDemo/cardDemo.css +1 -1
- package/src/modules/dx/cardDocs/cardDocs.css +3 -3
- package/src/modules/dx/cardDocs/cardDocs.ts +1 -1
- package/src/modules/dx/cardEvent/cardEvent.css +3 -3
- package/src/modules/dx/cardExpanded/cardExpanded.css +1 -1
- package/src/modules/dx/cardExpanded/cardExpanded.ts +1 -1
- package/src/modules/dx/cardMinimal/cardMinimal.css +2 -2
- package/src/modules/dx/cardMinimal/cardMinimal.ts +1 -1
- package/src/modules/dx/cardNews/cardNews.css +3 -3
- package/src/modules/dx/cardNews/cardNews.ts +2 -2
- package/src/modules/dx/cardPodcastEpisode/cardPodcastEpisode.css +3 -3
- package/src/modules/dx/cardSmall/cardSmall.css +3 -3
- package/src/modules/dx/cardSmall/cardSmall.ts +1 -1
- package/src/modules/dx/cardTitle/cardTitle.css +2 -2
- package/src/modules/dx/cardTrailheadModule/cardTrailheadModule.css +1 -1
- package/src/modules/dx/cardTrial/cardTrial.css +3 -3
- package/src/modules/dx/cardTrial/cardTrial.ts +1 -1
- package/src/modules/dx/cardVideoPreview/cardVideoPreview.css +1 -1
- package/src/modules/dx/checkbox/checkbox.css +2 -2
- package/src/modules/dx/checkboxGroup/checkboxGroup.css +1 -1
- package/src/modules/dx/checkboxGroup/checkboxGroup.ts +1 -1
- package/src/modules/dx/codeBlock/codeBlock.css +2 -2
- package/src/modules/dx/codeBlock/codeBlock.ts +2 -2
- package/src/modules/dx/dropdown/dropdown.css +1 -1
- package/src/modules/dx/dropdown/dropdown.ts +2 -2
- package/src/modules/dx/dropdownOption/dropdownOption.css +1 -1
- package/src/modules/dx/dropdownOption/dropdownOption.ts +1 -1
- package/src/modules/dx/emptyState/emptyState.css +2 -2
- package/src/modules/dx/feature/feature.css +2 -2
- package/src/modules/dx/featuredContentHeader/featuredContentHeader.css +4 -4
- package/src/modules/dx/featuredContentHeader/featuredContentHeader.ts +2 -2
- package/src/modules/dx/featuresList/featuresList.css +2 -2
- package/src/modules/dx/featuresList/featuresList.ts +1 -1
- package/src/modules/dx/filterMenu/filterMenu.css +1 -1
- package/src/modules/dx/footer/footer.css +2 -2
- package/src/modules/dx/footer/footer.ts +2 -2
- package/src/modules/dx/footerOption/footerOption.ts +1 -1
- package/src/modules/dx/formattedDateTime/formattedDateTime.ts +5 -0
- package/src/modules/dx/groupText/groupText.css +2 -2
- package/src/modules/dx/groupText/groupText.ts +3 -3
- package/src/modules/dx/header/header.css +1 -1
- package/src/modules/dx/header/header.ts +2 -2
- package/src/modules/dx/headerMobileNavMenu/headerMobileNavMenu.css +1 -1
- package/src/modules/dx/headerMobileNavMenu/headerMobileNavMenu.ts +1 -1
- package/src/modules/dx/headerMobileNavMenuOption/headerMobileNavMenuOption.ts +1 -1
- package/src/modules/dx/headerNav/headerNav.css +1 -1
- package/src/modules/dx/headerSearch/headerSearch.css +1 -1
- package/src/modules/dx/headerSearch/headerSearch.ts +1 -1
- package/src/modules/dx/helmet/helmet.css +2 -2
- package/src/modules/dx/hr/hr.css +2 -2
- package/src/modules/dx/icon/icon.css +1 -1
- package/src/modules/dx/icon/icon.ts +1 -1
- package/src/modules/dx/iconBadge/iconBadge.css +1 -1
- package/src/modules/dx/iconBadge/iconBadge.ts +1 -1
- package/src/modules/dx/imageAndLabel/imageAndLabel.css +3 -3
- package/src/modules/dx/input/input.css +2 -2
- package/src/modules/dx/input/input.ts +1 -1
- package/src/modules/dx/logo/logo.css +2 -2
- package/src/modules/dx/modalDrawer/modalDrawer.ts +1 -1
- package/src/modules/dx/pagination/pagination.css +1 -1
- package/src/modules/dx/pagination/pagination.ts +1 -1
- package/src/modules/dx/podcastHost/podcastHost.css +2 -2
- package/src/modules/dx/popover/popover.css +1 -1
- package/src/modules/dx/popover/popover.ts +1 -1
- package/src/modules/dx/radioGroup/radioGroup.css +1 -1
- package/src/modules/dx/radioGroup/radioGroup.ts +1 -1
- package/src/modules/dx/section/section.css +2 -2
- package/src/modules/dx/section/section.ts +1 -1
- package/src/modules/dx/select/select.css +1 -1
- package/src/modules/dx/select/select.ts +1 -1
- package/src/modules/dx/sidebar/sidebar.css +2 -2
- package/src/modules/dx/sidebar/sidebar.ts +4 -4
- package/src/modules/dx/sidebarOld/sidebarOld.css +2 -2
- package/src/modules/dx/sidebarOld/sidebarOld.ts +3 -3
- package/src/modules/dx/sidebarSearch/sidebarSearch.ts +3 -3
- package/src/modules/dx/sidebarSearchResult/sidebarSearchResult.css +3 -3
- package/src/modules/dx/skipNavLink/skipNavLink.css +1 -1
- package/src/modules/dx/socials/socials.ts +1 -1
- package/src/modules/dx/tab/tab.css +1 -1
- package/src/modules/dx/tab/tab.ts +2 -2
- package/src/modules/dx/toc/toc.css +2 -2
- package/src/modules/dx/toc/toc.ts +1 -1
- package/src/modules/dx/topics/topics.ts +1 -1
- package/src/modules/dx/tree/tree.css +1 -1
- package/src/modules/dx/tree/tree.ts +1 -1
- package/src/modules/dx/treeItem/treeItem.css +6 -1
- package/src/modules/dx/treeItem/treeItem.ts +2 -2
- package/src/modules/dx/treeTile/treeTile.css +2 -2
- package/src/modules/dx/typeBadge/typeBadge.css +1 -1
- package/src/modules/dx/typeBadge/typeBadge.ts +1 -1
- package/src/modules/dx/typeBadgeGroup/typeBadgeGroup.ts +1 -1
- package/src/modules/dx/vimeoPlayer/vimeoPlayer.css +1 -1
- package/src/modules/{base-elements → dxBaseElements}/archiveCard/archiveCard.ts +0 -0
- package/src/modules/{base-elements → dxBaseElements}/headerBase/headerBase.ts +2 -2
- package/src/modules/{base-elements → dxBaseElements}/matchMediaElement/matchMediaElement.ts +1 -1
- package/src/modules/{base-elements → dxBaseElements}/sidebarBase/sidebarBase.ts +0 -0
- package/src/modules/{helpers → dxHelpers}/animations/animations.css +0 -0
- package/src/modules/{helpers → dxHelpers}/button/button.css +0 -0
- package/src/modules/{helpers → dxHelpers}/card/card.css +1 -1
- package/src/modules/{helpers → dxHelpers}/code/code.css +0 -0
- package/src/modules/{helpers → dxHelpers}/commonHeader/commonHeader.css +2 -2
- package/src/modules/{helpers → dxHelpers}/reset/reset.css +0 -0
- package/src/modules/{helpers → dxHelpers}/sidebar/sidebar.css +0 -0
- package/src/modules/{helpers → dxHelpers}/slds/slds.css +0 -0
- package/src/modules/{helpers → dxHelpers}/table/table.css +0 -0
- package/src/modules/{helpers → dxHelpers}/text/text.css +0 -0
- package/src/modules/{utils → dxUtils}/analytics/analytics.ts +0 -0
- package/src/modules/{utils → dxUtils}/browser/browser.ts +0 -0
- package/src/modules/{utils → dxUtils}/constants/breakpoints.ts +0 -0
- package/src/modules/{utils → dxUtils}/constants/constants.ts +0 -0
- package/src/modules/{utils → dxUtils}/coveo/coveo.ts +0 -0
- package/src/modules/{utils → dxUtils}/css/css.ts +0 -0
- package/src/modules/{utils → dxUtils}/dates/dates.ts +0 -0
- package/src/modules/{utils → dxUtils}/devices/devices.ts +0 -0
- package/src/modules/{utils → dxUtils}/highlight/highlight.ts +1 -1
- package/src/modules/{utils → dxUtils}/normalizers/normalizers.ts +9 -21
- package/src/modules/{utils → dxUtils}/options/options.ts +0 -0
- package/src/modules/{utils → dxUtils}/prismjs/prismjs.html +0 -0
- package/src/modules/{utils → dxUtils}/prismjs/prismjs.ts +0 -0
- package/src/modules/{utils → dxUtils}/queryCoordinator/queryCoordinator.ts +0 -0
- package/src/modules/{utils → dxUtils}/recentSearches/recentSearches.ts +0 -0
- package/src/modules/{utils → dxUtils}/regexps/regexps.ts +0 -0
- package/src/modules/{utils → dxUtils}/seo/seo.ts +0 -0
- package/src/modules/{utils → dxUtils}/slot/slot.ts +0 -0
- package/src/modules/{utils → dxUtils}/wordpress/wordpress.ts +0 -0
- package/LICENSE +0 -12
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LightningElement, api } from "lwc";
|
|
2
2
|
import cx from "classnames";
|
|
3
3
|
import { Option } from "typings/custom";
|
|
4
|
-
import { deepmapOptions } from "
|
|
4
|
+
import { deepmapOptions } from "dxUtils/options";
|
|
5
5
|
|
|
6
6
|
export default class HeaderMobileNavMenu extends LightningElement {
|
|
7
7
|
@api open: boolean = false;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LightningElement, api } from "lwc";
|
|
2
2
|
import cx from "classnames";
|
|
3
3
|
import { PopoverRequestCloseType, Option } from "typings/custom";
|
|
4
|
-
import { buildSearchEngine } from "
|
|
4
|
+
import { buildSearchEngine } from "dxUtils/coveo";
|
|
5
5
|
import {
|
|
6
6
|
StandaloneSearchBox as StandaloneSearchBoxType,
|
|
7
7
|
StandaloneSearchBoxState,
|
package/src/modules/dx/hr/hr.css
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LightningElement, api } from "lwc";
|
|
2
2
|
import cx from "classnames";
|
|
3
3
|
import { IconSprite, IconSymbol, IconBadgeShape } from "typings/custom";
|
|
4
|
-
import { toDxColor } from "
|
|
4
|
+
import { toDxColor } from "dxUtils/css";
|
|
5
5
|
|
|
6
6
|
const validShapes = ["square", "circle"];
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LightningElement, api } from "lwc";
|
|
2
2
|
import cx from "classnames";
|
|
3
3
|
import { IconSize, IconSymbol } from "typings/custom";
|
|
4
|
-
import { isMac } from "
|
|
4
|
+
import { isMac } from "dxUtils/devices";
|
|
5
5
|
import { isValidEmail } from "./validators";
|
|
6
6
|
|
|
7
7
|
type ValidatorMap = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import cx from "classnames";
|
|
2
2
|
import { LightningElement, api } from "lwc";
|
|
3
|
-
import { normalizeBoolean } from "
|
|
3
|
+
import { normalizeBoolean } from "dxUtils/normalizers";
|
|
4
4
|
|
|
5
5
|
export default class ModalDrawer extends LightningElement {
|
|
6
6
|
private _open = false;
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
import { createPopper } from "@popperjs/core";
|
|
9
9
|
import cx from "classnames";
|
|
10
10
|
import debounce from "debounce";
|
|
11
|
-
import { isPrerender } from "
|
|
11
|
+
import { isPrerender } from "dxUtils/seo";
|
|
12
12
|
|
|
13
13
|
const isEventOutsideElements = (
|
|
14
14
|
e: Event,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import cx from "classnames";
|
|
2
2
|
import { api } from "lwc";
|
|
3
3
|
import LightningSelect from "lightning/select";
|
|
4
|
-
import { toJson } from "
|
|
4
|
+
import { toJson } from "dxUtils/normalizers";
|
|
5
5
|
|
|
6
6
|
export default class Select extends LightningSelect {
|
|
7
7
|
@api placeholder?: string;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import cx from "classnames";
|
|
2
|
-
import { track as trackAnalytics } from "utils/analytics";
|
|
3
2
|
import { api, track } from "lwc";
|
|
4
3
|
import {
|
|
5
4
|
TreeNode,
|
|
6
5
|
SidebarGtmAction,
|
|
7
6
|
SidebarSearchResult
|
|
8
7
|
} from "typings/custom";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
8
|
+
import { track as trackAnalytics } from "dxUtils/analytics";
|
|
9
|
+
import { getSidebarSearchParams } from "dxUtils/coveo";
|
|
10
|
+
import { toJson } from "dxUtils/normalizers";
|
|
11
11
|
import SidebarSearch from "dx/sidebarSearch";
|
|
12
|
-
import { SidebarBase } from "
|
|
12
|
+
import { SidebarBase } from "dxBaseElements/sidebarBase";
|
|
13
13
|
|
|
14
14
|
const MOBILE_SIZE_MATCH = "768px";
|
|
15
15
|
const TOGGLE_BUTTON_LABEL = "Toggle Sidebar";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import cx from "classnames";
|
|
2
|
-
import { track } from "
|
|
2
|
+
import { track } from "dxUtils/analytics";
|
|
3
3
|
import { api } from "lwc";
|
|
4
4
|
|
|
5
5
|
import { TreeNode, SidebarGtmAction } from "typings/custom";
|
|
6
|
-
import { toJson } from "
|
|
7
|
-
import { SidebarBase } from "
|
|
6
|
+
import { toJson } from "dxUtils/normalizers";
|
|
7
|
+
import { SidebarBase } from "dxBaseElements/sidebarBase";
|
|
8
8
|
|
|
9
9
|
const WAIT_TIME = 500;
|
|
10
10
|
const MOBILE_SIZE_MATCH = "768px";
|
|
@@ -14,9 +14,9 @@ import {
|
|
|
14
14
|
SearchAppState,
|
|
15
15
|
loadQueryActions
|
|
16
16
|
} from "@coveo/headless";
|
|
17
|
-
import { buildSearchEngine, getSidebarSearchParams } from "
|
|
18
|
-
import { RecentSearches } from "
|
|
19
|
-
import { toJson } from "
|
|
17
|
+
import { buildSearchEngine, getSidebarSearchParams } from "dxUtils/coveo";
|
|
18
|
+
import { RecentSearches } from "dxUtils/recentSearches";
|
|
19
|
+
import { toJson } from "dxUtils/normalizers";
|
|
20
20
|
import {
|
|
21
21
|
Option,
|
|
22
22
|
PopoverRequestCloseType,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { LightningElement, api } from "lwc";
|
|
2
|
-
import { track } from "
|
|
2
|
+
import { track } from "dxUtils/analytics";
|
|
3
3
|
import cx from "classnames";
|
|
4
4
|
import { TabVariant } from "typings/custom";
|
|
5
|
-
import { normalizeBoolean } from "
|
|
5
|
+
import { normalizeBoolean } from "dxUtils/normalizers";
|
|
6
6
|
|
|
7
7
|
export default class Tab extends LightningElement {
|
|
8
8
|
@api label: string | null = null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LightningElement, api, track } from "lwc";
|
|
2
2
|
import cx from "classnames";
|
|
3
3
|
import { ContentElement } from "typings/custom";
|
|
4
|
-
import { toJson } from "
|
|
4
|
+
import { toJson } from "dxUtils/normalizers";
|
|
5
5
|
|
|
6
6
|
export default class Toc extends LightningElement {
|
|
7
7
|
@api title!: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LightningElement, api } from "lwc";
|
|
2
2
|
import { TreeNode, InternalTreeNode } from "typings/custom";
|
|
3
|
-
import { toJson } from "
|
|
3
|
+
import { toJson } from "dxUtils/normalizers";
|
|
4
4
|
import { TreeHandler } from "./treeHandler";
|
|
5
5
|
|
|
6
6
|
export default class Tree extends LightningElement {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@import "
|
|
1
|
+
@import "dxHelpers/reset";
|
|
2
2
|
|
|
3
3
|
:host {
|
|
4
4
|
display: block;
|
|
@@ -13,6 +13,11 @@ button:focus {
|
|
|
13
13
|
outline-offset: -1px;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
.tree-children-loading {
|
|
17
|
+
margin: var(--dx-g-spacing-sm) var(--dx-g-spacing-md) var(--dx-g-spacing-md)
|
|
18
|
+
var(--dx-g-spacing-md);
|
|
19
|
+
}
|
|
20
|
+
|
|
16
21
|
@media (max-width: 768px) {
|
|
17
22
|
.tree-children-loading {
|
|
18
23
|
width: 100%;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { LightningElement, api } from "lwc";
|
|
2
2
|
import { InternalTreeNode } from "typings/custom";
|
|
3
|
-
import { track } from "
|
|
3
|
+
import { track } from "dxUtils/analytics";
|
|
4
4
|
import { SidebarGtmAction } from "typings/custom";
|
|
5
|
-
import { isInViewport } from "
|
|
5
|
+
import { isInViewport } from "dxUtils/browser";
|
|
6
6
|
|
|
7
7
|
const DEFAULT_TARGET = "_self";
|
|
8
8
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LightningElement, api } from "lwc";
|
|
2
|
-
import { normalizeToArray } from "
|
|
2
|
+
import { normalizeToArray } from "dxUtils/normalizers";
|
|
3
3
|
import { TypeBadgeSize } from "typings/custom";
|
|
4
4
|
|
|
5
5
|
export default class TypeBadgeGroup extends LightningElement {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@import "
|
|
1
|
+
@import "dxHelpers/reset";
|
|
File without changes
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { LightningElement, api } from "lwc";
|
|
2
2
|
import cx from "classnames";
|
|
3
3
|
import { Brand, Option } from "typings/custom";
|
|
4
|
-
import { toJson } from "
|
|
5
|
-
import { track } from "
|
|
4
|
+
import { toJson } from "dxUtils/normalizers";
|
|
5
|
+
import { track } from "dxUtils/analytics";
|
|
6
6
|
|
|
7
7
|
const VALID_BRANDS = [
|
|
8
8
|
"analytics",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import get from "lodash.get";
|
|
2
|
+
import { WordpressPodcastEpisode, WordpressBlogPost } from "typings/custom";
|
|
2
3
|
|
|
3
4
|
export const toJson = (value: string | object | null) =>
|
|
4
5
|
typeof value === "string" ? JSON.parse(value) : value;
|
|
@@ -22,16 +23,6 @@ export const normalizeToArray = (
|
|
|
22
23
|
return (Array.isArray(value) ? value : [value]) as Array<string>;
|
|
23
24
|
};
|
|
24
25
|
|
|
25
|
-
type WordpressPodcastEpisode = {
|
|
26
|
-
date: string;
|
|
27
|
-
description: string;
|
|
28
|
-
id: string;
|
|
29
|
-
originalUrl: string;
|
|
30
|
-
podcastDuration: string;
|
|
31
|
-
title: string;
|
|
32
|
-
url: string;
|
|
33
|
-
};
|
|
34
|
-
|
|
35
26
|
const getLength = (duration: string) => {
|
|
36
27
|
if (!duration || !duration.includes(":")) {
|
|
37
28
|
return undefined;
|
|
@@ -55,17 +46,6 @@ export const normalizeEpisode = ({
|
|
|
55
46
|
title
|
|
56
47
|
});
|
|
57
48
|
|
|
58
|
-
type WordpressBlogPost = {
|
|
59
|
-
date: string;
|
|
60
|
-
description: string;
|
|
61
|
-
id: string;
|
|
62
|
-
originalUrl: string;
|
|
63
|
-
title: string;
|
|
64
|
-
url: string;
|
|
65
|
-
authors: any[];
|
|
66
|
-
featuredImage: string;
|
|
67
|
-
};
|
|
68
|
-
|
|
69
49
|
export const normalizePost = ({
|
|
70
50
|
authors = [],
|
|
71
51
|
date,
|
|
@@ -89,3 +69,11 @@ export const normalizePost = ({
|
|
|
89
69
|
|
|
90
70
|
export const normalizeBoolean = (value: string | boolean | number): boolean =>
|
|
91
71
|
typeof value === "string" ? value === "true" : !!value;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Cleans characters that are invalid for DOM IDs
|
|
75
|
+
* @param {string} id id to normalize
|
|
76
|
+
*/
|
|
77
|
+
export const normalizeDomId = (id: string): string => {
|
|
78
|
+
return id.replace(/^[^a-z]+|[^\w.-]+/gi, "");
|
|
79
|
+
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|