@salesforce/design-system-react 11.0.0-alpha.2 → 11.0.0-alpha.3
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/dist/cjs/components/combobox/combobox.cjs +1 -1
- package/dist/cjs/components/combobox/combobox.cjs.map +1 -1
- package/dist/cjs/components/data-table/highlight-cell.cjs +1 -1
- package/dist/cjs/components/data-table/index.cjs +1 -1
- package/dist/cjs/components/date-picker/date-picker.cjs +1 -1
- package/dist/cjs/components/date-picker/date-picker.cjs.map +1 -1
- package/dist/cjs/components/date-picker/index.cjs +1 -1
- package/dist/cjs/components/date-picker/index.cjs.map +1 -1
- package/dist/cjs/components/illustration/check-props.cjs +2 -0
- package/dist/cjs/components/illustration/check-props.cjs.map +1 -0
- package/dist/cjs/components/illustration/index.cjs +1 -1
- package/dist/cjs/components/illustration/index.cjs.map +1 -1
- package/dist/cjs/components/index.cjs +1 -1
- package/dist/cjs/components/modal/trigger.cjs +1 -1
- package/dist/cjs/components/pill/index.cjs +1 -1
- package/dist/cjs/components/pill/index.cjs.map +1 -1
- package/dist/cjs/components/pill-container/index.cjs +1 -1
- package/dist/cjs/components/pill-container/index.cjs.map +1 -1
- package/dist/cjs/components/pill-container/private/selected-listbox.cjs +1 -1
- package/dist/cjs/components/pill-container/private/selected-listbox.cjs.map +1 -1
- package/dist/cjs/components/tree/private/item.cjs +1 -1
- package/dist/cjs/components/tree/private/render-branch.cjs +1 -1
- package/dist/cjs/components/utilities/dialog/index.cjs +1 -1
- package/dist/cjs/components/utilities/dialog/index.cjs.map +1 -1
- package/dist/cjs/utilities/constants.cjs +1 -1
- package/dist/cjs/utilities/constants.cjs.map +1 -1
- package/dist/es/components/combobox/combobox.js +131 -117
- package/dist/es/components/combobox/combobox.js.map +1 -1
- package/dist/es/components/data-table/highlight-cell.js +4 -4
- package/dist/es/components/data-table/index.js +9 -9
- package/dist/es/components/date-picker/date-picker.js +150 -145
- package/dist/es/components/date-picker/date-picker.js.map +1 -1
- package/dist/es/components/date-picker/index.js +6 -18
- package/dist/es/components/date-picker/index.js.map +1 -1
- package/dist/es/components/illustration/check-props.js +11 -0
- package/dist/es/components/illustration/check-props.js.map +1 -0
- package/dist/es/components/illustration/index.js +37 -25
- package/dist/es/components/illustration/index.js.map +1 -1
- package/dist/es/components/index.js +89 -115
- package/dist/es/components/modal/trigger.js +4 -4
- package/dist/es/components/pill/index.js +32 -30
- package/dist/es/components/pill/index.js.map +1 -1
- package/dist/es/components/pill-container/index.js +1 -0
- package/dist/es/components/pill-container/index.js.map +1 -1
- package/dist/es/components/pill-container/private/selected-listbox.js +3 -1
- package/dist/es/components/pill-container/private/selected-listbox.js.map +1 -1
- package/dist/es/components/tree/private/item.js +4 -4
- package/dist/es/components/tree/private/render-branch.js +9 -9
- package/dist/es/components/utilities/dialog/index.js +2 -2
- package/dist/es/components/utilities/dialog/index.js.map +1 -1
- package/dist/es/utilities/constants.js +2 -2
- package/dist/es/utilities/constants.js.map +1 -1
- package/dist/types/components/combobox/combobox.d.ts.map +1 -1
- package/dist/types/components/date-picker/date-picker.d.ts.map +1 -1
- package/dist/types/components/date-picker/index.d.ts +6 -2
- package/dist/types/components/date-picker/index.d.ts.map +1 -1
- package/dist/types/components/illustration/index.d.ts.map +1 -1
- package/dist/types/components/index.d.ts +0 -52
- package/dist/types/components/index.d.ts.map +1 -1
- package/dist/types/components/pill/index.d.ts +4 -0
- package/dist/types/components/pill/index.d.ts.map +1 -1
- package/dist/types/components/pill-container/index.d.ts.map +1 -1
- package/dist/types/components/pill-container/private/selected-listbox.d.ts +7 -1
- package/dist/types/components/pill-container/private/selected-listbox.d.ts.map +1 -1
- package/package.json +4 -1
- package/dist/cjs/components/app-launcher/check-props.cjs +0 -2
- package/dist/cjs/components/app-launcher/check-props.cjs.map +0 -1
- package/dist/cjs/components/app-launcher/component.cjs +0 -2
- package/dist/cjs/components/app-launcher/component.cjs.map +0 -1
- package/dist/cjs/components/app-launcher/expandable-section.cjs +0 -2
- package/dist/cjs/components/app-launcher/expandable-section.cjs.map +0 -1
- package/dist/cjs/components/app-launcher/index.cjs +0 -2
- package/dist/cjs/components/app-launcher/index.cjs.map +0 -1
- package/dist/cjs/components/app-launcher/link.cjs +0 -2
- package/dist/cjs/components/app-launcher/link.cjs.map +0 -1
- package/dist/cjs/components/app-launcher/tile.cjs +0 -2
- package/dist/cjs/components/app-launcher/tile.cjs.map +0 -1
- package/dist/cjs/components/app-launcher.cjs +0 -1
- package/dist/cjs/components/brand-band/index.cjs +0 -2
- package/dist/cjs/components/brand-band/index.cjs.map +0 -1
- package/dist/cjs/components/brand-band.cjs +0 -1
- package/dist/cjs/components/expression/condition.cjs +0 -2
- package/dist/cjs/components/expression/condition.cjs.map +0 -1
- package/dist/cjs/components/expression/formula.cjs +0 -2
- package/dist/cjs/components/expression/formula.cjs.map +0 -1
- package/dist/cjs/components/expression/group.cjs +0 -2
- package/dist/cjs/components/expression/group.cjs.map +0 -1
- package/dist/cjs/components/expression/index.cjs +0 -2
- package/dist/cjs/components/expression/index.cjs.map +0 -1
- package/dist/cjs/components/expression.cjs +0 -1
- package/dist/cjs/components/global-header/button.cjs +0 -2
- package/dist/cjs/components/global-header/button.cjs.map +0 -1
- package/dist/cjs/components/global-header/check-props.cjs +0 -2
- package/dist/cjs/components/global-header/check-props.cjs.map +0 -1
- package/dist/cjs/components/global-header/dropdown.cjs +0 -2
- package/dist/cjs/components/global-header/dropdown.cjs.map +0 -1
- package/dist/cjs/components/global-header/favorites.cjs +0 -2
- package/dist/cjs/components/global-header/favorites.cjs.map +0 -1
- package/dist/cjs/components/global-header/help.cjs +0 -2
- package/dist/cjs/components/global-header/help.cjs.map +0 -1
- package/dist/cjs/components/global-header/index.cjs +0 -2
- package/dist/cjs/components/global-header/index.cjs.map +0 -1
- package/dist/cjs/components/global-header/notifications.cjs +0 -2
- package/dist/cjs/components/global-header/notifications.cjs.map +0 -1
- package/dist/cjs/components/global-header/private/dropdown-trigger.cjs +0 -2
- package/dist/cjs/components/global-header/private/dropdown-trigger.cjs.map +0 -1
- package/dist/cjs/components/global-header/profile.cjs +0 -2
- package/dist/cjs/components/global-header/profile.cjs.map +0 -1
- package/dist/cjs/components/global-header/search.cjs +0 -2
- package/dist/cjs/components/global-header/search.cjs.map +0 -1
- package/dist/cjs/components/global-header/setup.cjs +0 -2
- package/dist/cjs/components/global-header/setup.cjs.map +0 -1
- package/dist/cjs/components/global-header/task.cjs +0 -2
- package/dist/cjs/components/global-header/task.cjs.map +0 -1
- package/dist/cjs/components/global-header.cjs +0 -1
- package/dist/cjs/components/global-navigation-bar/button.cjs +0 -2
- package/dist/cjs/components/global-navigation-bar/button.cjs.map +0 -1
- package/dist/cjs/components/global-navigation-bar/check-props.cjs +0 -2
- package/dist/cjs/components/global-navigation-bar/check-props.cjs.map +0 -1
- package/dist/cjs/components/global-navigation-bar/component.cjs +0 -2
- package/dist/cjs/components/global-navigation-bar/component.cjs.map +0 -1
- package/dist/cjs/components/global-navigation-bar/dropdown-trigger.cjs +0 -2
- package/dist/cjs/components/global-navigation-bar/dropdown-trigger.cjs.map +0 -1
- package/dist/cjs/components/global-navigation-bar/dropdown.cjs +0 -2
- package/dist/cjs/components/global-navigation-bar/dropdown.cjs.map +0 -1
- package/dist/cjs/components/global-navigation-bar/index.cjs +0 -2
- package/dist/cjs/components/global-navigation-bar/index.cjs.map +0 -1
- package/dist/cjs/components/global-navigation-bar/label.cjs +0 -2
- package/dist/cjs/components/global-navigation-bar/label.cjs.map +0 -1
- package/dist/cjs/components/global-navigation-bar/link.cjs +0 -2
- package/dist/cjs/components/global-navigation-bar/link.cjs.map +0 -1
- package/dist/cjs/components/global-navigation-bar/region.cjs +0 -2
- package/dist/cjs/components/global-navigation-bar/region.cjs.map +0 -1
- package/dist/cjs/components/global-navigation-bar.cjs +0 -1
- package/dist/cjs/components/location-map/index.cjs +0 -2
- package/dist/cjs/components/location-map/index.cjs.map +0 -1
- package/dist/cjs/components/location-map.cjs +0 -1
- package/dist/cjs/components/utilities/truncate/index.cjs +0 -2
- package/dist/cjs/components/utilities/truncate/index.cjs.map +0 -1
- package/dist/cjs/components/utilities/truncate.cjs +0 -1
- package/dist/cjs/utilities/warning/one-of-component.cjs +0 -2
- package/dist/cjs/utilities/warning/one-of-component.cjs.map +0 -1
- package/dist/es/components/app-launcher/check-props.js +0 -17
- package/dist/es/components/app-launcher/check-props.js.map +0 -1
- package/dist/es/components/app-launcher/component.js +0 -31
- package/dist/es/components/app-launcher/component.js.map +0 -1
- package/dist/es/components/app-launcher/expandable-section.js +0 -42
- package/dist/es/components/app-launcher/expandable-section.js.map +0 -1
- package/dist/es/components/app-launcher/index.js +0 -96
- package/dist/es/components/app-launcher/index.js.map +0 -1
- package/dist/es/components/app-launcher/link.js +0 -29
- package/dist/es/components/app-launcher/link.js.map +0 -1
- package/dist/es/components/app-launcher/tile.js +0 -101
- package/dist/es/components/app-launcher/tile.js.map +0 -1
- package/dist/es/components/app-launcher.js +0 -2
- package/dist/es/components/brand-band/index.js +0 -27
- package/dist/es/components/brand-band/index.js.map +0 -1
- package/dist/es/components/brand-band.js +0 -2
- package/dist/es/components/expression/condition.js +0 -124
- package/dist/es/components/expression/condition.js.map +0 -1
- package/dist/es/components/expression/formula.js +0 -105
- package/dist/es/components/expression/formula.js.map +0 -1
- package/dist/es/components/expression/group.js +0 -153
- package/dist/es/components/expression/group.js.map +0 -1
- package/dist/es/components/expression/index.js +0 -33
- package/dist/es/components/expression/index.js.map +0 -1
- package/dist/es/components/expression.js +0 -2
- package/dist/es/components/global-header/button.js +0 -19
- package/dist/es/components/global-header/button.js.map +0 -1
- package/dist/es/components/global-header/check-props.js +0 -20
- package/dist/es/components/global-header/check-props.js.map +0 -1
- package/dist/es/components/global-header/dropdown.js +0 -33
- package/dist/es/components/global-header/dropdown.js.map +0 -1
- package/dist/es/components/global-header/favorites.js +0 -74
- package/dist/es/components/global-header/favorites.js.map +0 -1
- package/dist/es/components/global-header/help.js +0 -39
- package/dist/es/components/global-header/help.js.map +0 -1
- package/dist/es/components/global-header/index.js +0 -90
- package/dist/es/components/global-header/index.js.map +0 -1
- package/dist/es/components/global-header/notifications.js +0 -51
- package/dist/es/components/global-header/notifications.js.map +0 -1
- package/dist/es/components/global-header/private/dropdown-trigger.js +0 -50
- package/dist/es/components/global-header/private/dropdown-trigger.js.map +0 -1
- package/dist/es/components/global-header/profile.js +0 -47
- package/dist/es/components/global-header/profile.js.map +0 -1
- package/dist/es/components/global-header/search.js +0 -12
- package/dist/es/components/global-header/search.js.map +0 -1
- package/dist/es/components/global-header/setup.js +0 -39
- package/dist/es/components/global-header/setup.js.map +0 -1
- package/dist/es/components/global-header/task.js +0 -38
- package/dist/es/components/global-header/task.js.map +0 -1
- package/dist/es/components/global-header.js +0 -2
- package/dist/es/components/global-navigation-bar/button.js +0 -22
- package/dist/es/components/global-navigation-bar/button.js.map +0 -1
- package/dist/es/components/global-navigation-bar/check-props.js +0 -13
- package/dist/es/components/global-navigation-bar/check-props.js.map +0 -1
- package/dist/es/components/global-navigation-bar/component.js +0 -43
- package/dist/es/components/global-navigation-bar/component.js.map +0 -1
- package/dist/es/components/global-navigation-bar/dropdown-trigger.js +0 -66
- package/dist/es/components/global-navigation-bar/dropdown-trigger.js.map +0 -1
- package/dist/es/components/global-navigation-bar/dropdown.js +0 -34
- package/dist/es/components/global-navigation-bar/dropdown.js.map +0 -1
- package/dist/es/components/global-navigation-bar/index.js +0 -27
- package/dist/es/components/global-navigation-bar/index.js.map +0 -1
- package/dist/es/components/global-navigation-bar/label.js +0 -25
- package/dist/es/components/global-navigation-bar/label.js.map +0 -1
- package/dist/es/components/global-navigation-bar/link.js +0 -50
- package/dist/es/components/global-navigation-bar/link.js.map +0 -1
- package/dist/es/components/global-navigation-bar/region.js +0 -50
- package/dist/es/components/global-navigation-bar/region.js.map +0 -1
- package/dist/es/components/global-navigation-bar.js +0 -2
- package/dist/es/components/location-map/index.js +0 -75
- package/dist/es/components/location-map/index.js.map +0 -1
- package/dist/es/components/location-map.js +0 -2
- package/dist/es/components/utilities/truncate/index.js +0 -91
- package/dist/es/components/utilities/truncate/index.js.map +0 -1
- package/dist/es/components/utilities/truncate.js +0 -2
- package/dist/es/utilities/warning/one-of-component.js +0 -15
- package/dist/es/utilities/warning/one-of-component.js.map +0 -1
- package/dist/types/components/app-launcher/check-props.d.ts +0 -3
- package/dist/types/components/app-launcher/check-props.d.ts.map +0 -1
- package/dist/types/components/app-launcher/expandable-section.d.ts +0 -62
- package/dist/types/components/app-launcher/expandable-section.d.ts.map +0 -1
- package/dist/types/components/app-launcher/index.d.ts +0 -48
- package/dist/types/components/app-launcher/index.d.ts.map +0 -1
- package/dist/types/components/app-launcher/link.d.ts +0 -39
- package/dist/types/components/app-launcher/link.d.ts.map +0 -1
- package/dist/types/components/app-launcher/section.d.ts +0 -55
- package/dist/types/components/app-launcher/section.d.ts.map +0 -1
- package/dist/types/components/app-launcher/tile.d.ts +0 -74
- package/dist/types/components/app-launcher/tile.d.ts.map +0 -1
- package/dist/types/components/app-launcher.d.ts +0 -2
- package/dist/types/components/brand-band/check-props.d.ts +0 -3
- package/dist/types/components/brand-band/check-props.d.ts.map +0 -1
- package/dist/types/components/brand-band/index.d.ts +0 -39
- package/dist/types/components/brand-band/index.d.ts.map +0 -1
- package/dist/types/components/brand-band.d.ts +0 -2
- package/dist/types/components/bread-crumb/index.d.ts +0 -3
- package/dist/types/components/bread-crumb/index.d.ts.map +0 -1
- package/dist/types/components/bread-crumb.d.ts +0 -2
- package/dist/types/components/expression/condition.d.ts +0 -105
- package/dist/types/components/expression/condition.d.ts.map +0 -1
- package/dist/types/components/expression/formula.d.ts +0 -88
- package/dist/types/components/expression/formula.d.ts.map +0 -1
- package/dist/types/components/expression/group.d.ts +0 -114
- package/dist/types/components/expression/group.d.ts.map +0 -1
- package/dist/types/components/expression/index.d.ts +0 -72
- package/dist/types/components/expression/index.d.ts.map +0 -1
- package/dist/types/components/expression.d.ts +0 -2
- package/dist/types/components/forms/input/index.d.ts +0 -3
- package/dist/types/components/forms/input/index.d.ts.map +0 -1
- package/dist/types/components/forms/input/search.d.ts +0 -3
- package/dist/types/components/forms/input/search.d.ts.map +0 -1
- package/dist/types/components/forms/input.d.ts +0 -2
- package/dist/types/components/forms/radio/index.d.ts +0 -3
- package/dist/types/components/forms/radio/index.d.ts.map +0 -1
- package/dist/types/components/forms/radio.d.ts +0 -2
- package/dist/types/components/forms/textarea/index.d.ts +0 -3
- package/dist/types/components/forms/textarea/index.d.ts.map +0 -1
- package/dist/types/components/forms/textarea.d.ts +0 -2
- package/dist/types/components/global-header/button.d.ts +0 -15
- package/dist/types/components/global-header/button.d.ts.map +0 -1
- package/dist/types/components/global-header/check-props.d.ts +0 -3
- package/dist/types/components/global-header/check-props.d.ts.map +0 -1
- package/dist/types/components/global-header/dropdown.d.ts +0 -59
- package/dist/types/components/global-header/dropdown.d.ts.map +0 -1
- package/dist/types/components/global-header/favorites.d.ts +0 -42
- package/dist/types/components/global-header/favorites.d.ts.map +0 -1
- package/dist/types/components/global-header/help.d.ts +0 -25
- package/dist/types/components/global-header/help.d.ts.map +0 -1
- package/dist/types/components/global-header/index.d.ts +0 -38
- package/dist/types/components/global-header/index.d.ts.map +0 -1
- package/dist/types/components/global-header/notifications.d.ts +0 -33
- package/dist/types/components/global-header/notifications.d.ts.map +0 -1
- package/dist/types/components/global-header/private/dropdown-trigger.d.ts +0 -78
- package/dist/types/components/global-header/private/dropdown-trigger.d.ts.map +0 -1
- package/dist/types/components/global-header/profile.d.ts +0 -38
- package/dist/types/components/global-header/profile.d.ts.map +0 -1
- package/dist/types/components/global-header/search.d.ts +0 -14
- package/dist/types/components/global-header/search.d.ts.map +0 -1
- package/dist/types/components/global-header/setup.d.ts +0 -25
- package/dist/types/components/global-header/setup.d.ts.map +0 -1
- package/dist/types/components/global-header/task.d.ts +0 -25
- package/dist/types/components/global-header/task.d.ts.map +0 -1
- package/dist/types/components/global-header.d.ts +0 -2
- package/dist/types/components/global-navigation-bar/button.d.ts +0 -18
- package/dist/types/components/global-navigation-bar/button.d.ts.map +0 -1
- package/dist/types/components/global-navigation-bar/check-props.d.ts +0 -3
- package/dist/types/components/global-navigation-bar/check-props.d.ts.map +0 -1
- package/dist/types/components/global-navigation-bar/dropdown-trigger.d.ts +0 -88
- package/dist/types/components/global-navigation-bar/dropdown-trigger.d.ts.map +0 -1
- package/dist/types/components/global-navigation-bar/dropdown.d.ts +0 -64
- package/dist/types/components/global-navigation-bar/dropdown.d.ts.map +0 -1
- package/dist/types/components/global-navigation-bar/index.d.ts +0 -35
- package/dist/types/components/global-navigation-bar/index.d.ts.map +0 -1
- package/dist/types/components/global-navigation-bar/label.d.ts +0 -25
- package/dist/types/components/global-navigation-bar/label.d.ts.map +0 -1
- package/dist/types/components/global-navigation-bar/link.d.ts +0 -84
- package/dist/types/components/global-navigation-bar/link.d.ts.map +0 -1
- package/dist/types/components/global-navigation-bar/region.d.ts +0 -36
- package/dist/types/components/global-navigation-bar/region.d.ts.map +0 -1
- package/dist/types/components/global-navigation-bar.d.ts +0 -2
- package/dist/types/components/location-map/index.d.ts +0 -49
- package/dist/types/components/location-map/index.d.ts.map +0 -1
- package/dist/types/components/location-map.d.ts +0 -2
- package/dist/types/components/navigation/index.d.ts +0 -3
- package/dist/types/components/navigation/index.d.ts.map +0 -1
- package/dist/types/components/navigation.d.ts +0 -2
- package/dist/types/components/popover-tooltip/index.d.ts +0 -3
- package/dist/types/components/popover-tooltip/index.d.ts.map +0 -1
- package/dist/types/components/popover-tooltip.d.ts +0 -2
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { GLOBAL_NAVIGATION_BAR_LABEL as e } from "../../utilities/constants.js";
|
|
2
|
-
import t from "../../utilities/design-tokens/dist/salesforce-skin.common.js";
|
|
3
|
-
import n from "classnames";
|
|
4
|
-
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
-
//#region components/global-navigation-bar/label.tsx
|
|
6
|
-
var i = (e) => {
|
|
7
|
-
let { className: i, dividerPosition: a, id: o, label: s } = e;
|
|
8
|
-
return /* @__PURE__ */ r("li", {
|
|
9
|
-
className: "slds-context-bar__item slds-no-hover",
|
|
10
|
-
children: /* @__PURE__ */ r("span", {
|
|
11
|
-
id: o,
|
|
12
|
-
style: { color: t.colorTextLinkDisabled },
|
|
13
|
-
className: n("slds-context-bar__label-action", { [`slds-context-bar__item_divider-${a}`]: a }, i),
|
|
14
|
-
children: /* @__PURE__ */ r("span", {
|
|
15
|
-
className: "slds-truncate",
|
|
16
|
-
children: s
|
|
17
|
-
})
|
|
18
|
-
})
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
i.displayName = e;
|
|
22
|
-
//#endregion
|
|
23
|
-
export { i as default };
|
|
24
|
-
|
|
25
|
-
//# sourceMappingURL=label.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"label.js","names":[],"sources":["../../../../components/global-navigation-bar/label.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\n// # GlobalNavigationBar Label Component\n\n// ## Dependencies\n\n// ### classNames\nimport classNames from 'classnames';\n\nimport colors from '../../utilities/design-tokens/dist/salesforce-skin.common.js';\n\n// ## Constants\nimport { GLOBAL_NAVIGATION_BAR_LABEL } from '../../utilities/constants';\n\nexport interface GlobalNavigationBarLabelProps {\n\t/**\n\t * Class names to be added to the `span` element\n\t */\n\tclassName?: unknown[] | Record<string, unknown> | string;\n\t/**\n\t * Determines position of separating bar.\n\t */\n\tdividerPosition?: 'left' | 'right';\n\t/**\n\t * Id string applied to first <span> inside of <li>\n\t */\n\tid?: string;\n\t/**\n\t * Text to show\n\t */\n\tlabel?: string;\n}\n\n/**\n * Wraps text in the proper markup and removes link styling to support use in the GlobalNavigationBar.\n */\nconst GlobalNavigationBarLabel = (props: GlobalNavigationBarLabelProps) => {\n\t// Separate props we care about in order to pass others along passively to the `span` tag\n\tconst { className, dividerPosition, id, label } = props;\n\n\treturn (\n\t\t<li className=\"slds-context-bar__item slds-no-hover\">\n\t\t\t<span\n\t\t\t\tid={id}\n\t\t\t\t// inline style override\n\t\t\t\tstyle={{ color: colors.colorTextLinkDisabled }}\n\t\t\t\tclassName={classNames(\n\t\t\t\t\t'slds-context-bar__label-action',\n\t\t\t\t\t{\n\t\t\t\t\t\t[`slds-context-bar__item_divider-${dividerPosition}`]:\n\t\t\t\t\t\t\tdividerPosition,\n\t\t\t\t\t},\n\t\t\t\t\tclassName as string\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t<span className=\"slds-truncate\">{label}</span>\n\t\t\t</span>\n\t\t</li>\n\t);\n};\n\nGlobalNavigationBarLabel.displayName = GLOBAL_NAVIGATION_BAR_LABEL;\n\nexport default GlobalNavigationBarLabel;\n"],"mappings":";;;;;AAqCA,IAAM,KAA4B,MAAyC;CAE1E,IAAM,EAAE,cAAW,oBAAiB,OAAI,aAAU;CAElD,OACC,kBAAC,MAAD;EAAI,WAAU;EACb,UAAA,kBAAC,QAAD;GACK;GAEJ,OAAO,EAAE,OAAO,EAAO,sBAAsB;GAC7C,WAAW,EACV,kCACA,GACE,kCAAkC,MAClC,EACF,GACA,CACD;GAEA,UAAA,kBAAC,QAAD;IAAM,WAAU;IAAiB,UAAA;GAAY,CAAA;EACxC,CAAA;CACH,CAAA;AAEN;AAEA,EAAyB,cAAc"}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { GLOBAL_NAVIGATION_BAR_LINK as e } from "../../utilities/constants.js";
|
|
2
|
-
import "react";
|
|
3
|
-
import t from "classnames";
|
|
4
|
-
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
5
|
-
import i from "lodash.isfunction";
|
|
6
|
-
//#region components/global-navigation-bar/link.tsx
|
|
7
|
-
var a = (e) => {
|
|
8
|
-
let { active: a, activeBackgroundColor: o, assistiveText: s = { activeDescriptor: "Current page:" }, className: c, dividerPosition: l, href: u = "#", id: d, label: f, onBlur: p, onClick: m, onFocus: h, onKeyDown: g, onKeyPress: _, onKeyUp: v, onMouseEnter: y, onMouseLeave: b, tabIndex: x } = e, S = a ? {
|
|
9
|
-
backgroundColor: o,
|
|
10
|
-
borderBottomColor: o
|
|
11
|
-
} : void 0;
|
|
12
|
-
function C(e) {
|
|
13
|
-
(i(m) || u === "#") && e.preventDefault(), i(m) && m(e, { href: u });
|
|
14
|
-
}
|
|
15
|
-
return /* @__PURE__ */ n("li", {
|
|
16
|
-
className: t("slds-context-bar__item", {
|
|
17
|
-
"slds-is-active": a,
|
|
18
|
-
[`slds-context-bar__item_divider-${l}`]: l
|
|
19
|
-
}),
|
|
20
|
-
id: d,
|
|
21
|
-
style: S,
|
|
22
|
-
children: /* @__PURE__ */ r("a", {
|
|
23
|
-
href: u,
|
|
24
|
-
className: t("slds-context-bar__label-action", c),
|
|
25
|
-
onBlur: p,
|
|
26
|
-
onClick: C,
|
|
27
|
-
onFocus: h,
|
|
28
|
-
onKeyDown: g,
|
|
29
|
-
onKeyPress: _,
|
|
30
|
-
onKeyUp: v,
|
|
31
|
-
onMouseEnter: y,
|
|
32
|
-
onMouseLeave: b,
|
|
33
|
-
tabIndex: x,
|
|
34
|
-
title: f,
|
|
35
|
-
children: [a ? /* @__PURE__ */ n("span", {
|
|
36
|
-
className: "slds-assistive-text",
|
|
37
|
-
children: s.activeDescriptor
|
|
38
|
-
}) : null, /* @__PURE__ */ n("span", {
|
|
39
|
-
className: "slds-truncate",
|
|
40
|
-
title: f,
|
|
41
|
-
children: f
|
|
42
|
-
})]
|
|
43
|
-
})
|
|
44
|
-
});
|
|
45
|
-
};
|
|
46
|
-
a.displayName = e;
|
|
47
|
-
//#endregion
|
|
48
|
-
export { a as default };
|
|
49
|
-
|
|
50
|
-
//# sourceMappingURL=link.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"link.js","names":[],"sources":["../../../../components/global-navigation-bar/link.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\n// # GlobalNavigationBar Link Component\n\n// ## Dependencies\n\n// ### React\nimport React from 'react';\n\n// ### classNames\nimport classNames from 'classnames';\n\n// ### isFunction\nimport isFunction from 'lodash.isfunction';\n\n// ## Constants\nimport { GLOBAL_NAVIGATION_BAR_LINK } from '../../utilities/constants';\n\nexport interface GlobalNavigationBarLinkAssistiveText {\n\tactiveDescriptor?: string;\n}\n\nexport interface GlobalNavigationBarLinkProps {\n\t/**\n\t * Whether the item is active or not.\n\t */\n\tactive?: boolean;\n\t/**\n\t * Allows alignment of active item with active application background color. If application background is dark, text color may need to be `#fff`. This can be done with the style prop.\n\t */\n\tactiveBackgroundColor?: string;\n\t/**\n\t * **Assistive text for accessibility.**\n\t * * `activeDescriptor`: The text that appears alongside a link that is currently active.\n\t */\n\tassistiveText?: GlobalNavigationBarLinkAssistiveText;\n\t/**\n\t * Class names to be added to the anchor element\n\t */\n\tclassName?: unknown[] | Record<string, unknown> | string;\n\t/**\n\t * Determines position of separating bar.\n\t */\n\tdividerPosition?: 'left' | 'right';\n\t/**\n\t * The `href` attribute of the link. Please pass in bookmarkable URLs from your routing library. Use `GlobalNavigationBarButton` if a \"real URL\" is not desired. If the `onClick` callback is specified this URL will still be prevented from changing the browser's location.\n\t */\n\thref?: string;\n\t/**\n\t * The `id` attribute is applied to the `li` tag. _This was recently changed from being on the anchor tag._\n\t */\n\tid?: string;\n\t/**\n\t * Text to show for link item.\n\t */\n\tlabel?: string;\n\t/**\n\t * Triggered when focus is removed.\n\t */\n\tonBlur?: React.FocusEventHandler<HTMLAnchorElement>;\n\t/**\n\t * `function (event, href)` - fires when the link is clicked. If set, the browser location change to the `href` specified will be ignored, but the `href` will be included in an additional parameter passed to the callback.\n\t */\n\tonClick?: (\n\t\tevent: React.MouseEvent<HTMLAnchorElement>,\n\t\tdata: { href?: string }\n\t) => void;\n\t/**\n\t * Triggered when component is focused.\n\t */\n\tonFocus?: React.FocusEventHandler<HTMLAnchorElement>;\n\t/**\n\t * Triggered when a key is pressed down\n\t */\n\tonKeyDown?: React.KeyboardEventHandler<HTMLAnchorElement>;\n\t/**\n\t * Triggered when a key is pressed and released\n\t */\n\tonKeyPress?: React.KeyboardEventHandler<HTMLAnchorElement>;\n\t/**\n\t * Triggered when a key is released\n\t */\n\tonKeyUp?: React.KeyboardEventHandler<HTMLAnchorElement>;\n\t/**\n\t * Triggered when a mouse arrow hovers\n\t */\n\tonMouseEnter?: React.MouseEventHandler<HTMLAnchorElement>;\n\t/**\n\t * Triggered when a mouse arrow no longer hovers\n\t */\n\tonMouseLeave?: React.MouseEventHandler<HTMLAnchorElement>;\n\t/**\n\t * Write \"-1\" if you don't want the user to tab to the button.\n\t */\n\ttabIndex?: string;\n}\n\n/**\n * Wraps a link in the proper markup to support use in the GlobalNavigationBar.\n */\nconst GlobalNavigationBarLink = (props: GlobalNavigationBarLinkProps) => {\n\t// Separate props we care about in order to pass others along passively to the `a` tag\n\tconst {\n\t\tactive,\n\t\tactiveBackgroundColor,\n\t\tassistiveText = {\n\t\t\tactiveDescriptor: 'Current page:',\n\t\t},\n\t\tclassName,\n\t\tdividerPosition,\n\t\thref = '#',\n\t\tid,\n\t\tlabel,\n\t\tonBlur,\n\t\tonClick,\n\t\tonFocus,\n\t\tonKeyDown,\n\t\tonKeyPress,\n\t\tonKeyUp,\n\t\tonMouseEnter,\n\t\tonMouseLeave,\n\t\ttabIndex,\n\t} = props;\n\n\tconst listItemstyle = active\n\t\t? {\n\t\t\t\tbackgroundColor: activeBackgroundColor,\n\t\t\t\tborderBottomColor: activeBackgroundColor,\n\t\t }\n\t\t: undefined;\n\n\tfunction handleOnClick(event: React.MouseEvent<HTMLAnchorElement>) {\n\t\tif (isFunction(onClick) || href === '#') {\n\t\t\tevent.preventDefault();\n\t\t}\n\n\t\tif (isFunction(onClick)) {\n\t\t\tonClick(event, { href });\n\t\t}\n\t}\n\n\treturn (\n\t\t<li\n\t\t\tclassName={classNames('slds-context-bar__item', {\n\t\t\t\t'slds-is-active': active,\n\t\t\t\t[`slds-context-bar__item_divider-${dividerPosition}`]: dividerPosition,\n\t\t\t})}\n\t\t\tid={id}\n\t\t\tstyle={listItemstyle}\n\t\t>\n\t\t\t<a\n\t\t\t\thref={href}\n\t\t\t\tclassName={classNames(\n\t\t\t\t\t'slds-context-bar__label-action',\n\t\t\t\t\tclassName as string\n\t\t\t\t)}\n\t\t\t\tonBlur={onBlur}\n\t\t\t\tonClick={handleOnClick}\n\t\t\t\tonFocus={onFocus}\n\t\t\t\tonKeyDown={onKeyDown}\n\t\t\t\tonKeyPress={onKeyPress}\n\t\t\t\tonKeyUp={onKeyUp}\n\t\t\t\tonMouseEnter={onMouseEnter}\n\t\t\t\tonMouseLeave={onMouseLeave}\n\t\t\t\ttabIndex={tabIndex as unknown as number}\n\t\t\t\ttitle={label}\n\t\t\t>\n\t\t\t\t{active ? (\n\t\t\t\t\t<span className=\"slds-assistive-text\">\n\t\t\t\t\t\t{assistiveText.activeDescriptor}\n\t\t\t\t\t</span>\n\t\t\t\t) : null}\n\t\t\t\t<span className=\"slds-truncate\" title={label}>\n\t\t\t\t\t{label}\n\t\t\t\t</span>\n\t\t\t</a>\n\t\t</li>\n\t);\n};\n\nGlobalNavigationBarLink.displayName = GLOBAL_NAVIGATION_BAR_LINK;\n\nexport default GlobalNavigationBarLink;\n"],"mappings":";;;;;;AAqGA,IAAM,KAA2B,MAAwC;CAExE,IAAM,EACL,WACA,0BACA,mBAAgB,EACf,kBAAkB,gBACnB,GACA,cACA,oBACA,UAAO,KACP,OACA,UACA,WACA,YACA,YACA,cACA,eACA,YACA,iBACA,iBACA,gBACG,GAEE,IAAgB,IACnB;EACA,iBAAiB;EACjB,mBAAmB;CACnB,IACA,KAAA;CAEH,SAAS,EAAc,GAA4C;EAKlE,CAJI,EAAW,CAAO,KAAK,MAAS,QACnC,EAAM,eAAe,GAGlB,EAAW,CAAO,KACrB,EAAQ,GAAO,EAAE,QAAK,CAAC;CAEzB;CAEA,OACC,kBAAC,MAAD;EACC,WAAW,EAAW,0BAA0B;GAC/C,kBAAkB;IACjB,kCAAkC,MAAoB;EACxD,CAAC;EACG;EACJ,OAAO;EAEP,UAAA,kBAAC,KAAD;GACO;GACN,WAAW,EACV,kCACA,CACD;GACQ;GACR,SAAS;GACA;GACE;GACC;GACH;GACK;GACA;GACJ;GACV,OAAO;GAfR,UAAA,CAiBE,IACA,kBAAC,QAAD;IAAM,WAAU;IACd,UAAA,EAAc;GACV,CAAA,IACH,MACJ,kBAAC,QAAD;IAAM,WAAU;IAAgB,OAAO;IACrC,UAAA;GACI,CAAA,CACJ;;CACA,CAAA;AAEN;AAEA,EAAwB,cAAc"}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { GLOBAL_NAVIGATION_BAR_REGION as e } from "../../utilities/constants.js";
|
|
2
|
-
import t from "react";
|
|
3
|
-
import n from "classnames";
|
|
4
|
-
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
-
//#region components/global-navigation-bar/region.tsx
|
|
6
|
-
var i = (e, t, i) => /* @__PURE__ */ r("div", {
|
|
7
|
-
className: n("slds-context-bar__primary", e, t),
|
|
8
|
-
children: i
|
|
9
|
-
}), a = (e, t, i, a) => {
|
|
10
|
-
let o;
|
|
11
|
-
return o = a ? /* @__PURE__ */ r("nav", {
|
|
12
|
-
className: n("slds-context-bar__secondary", e, t),
|
|
13
|
-
role: "navigation",
|
|
14
|
-
children: /* @__PURE__ */ r("ul", {
|
|
15
|
-
className: "slds-grid",
|
|
16
|
-
children: i
|
|
17
|
-
})
|
|
18
|
-
}) : /* @__PURE__ */ r("div", {
|
|
19
|
-
className: n("slds-context-bar__secondary", e, t),
|
|
20
|
-
children: /* @__PURE__ */ r("ul", {
|
|
21
|
-
className: "slds-grid",
|
|
22
|
-
children: i
|
|
23
|
-
})
|
|
24
|
-
}), o;
|
|
25
|
-
}, o = (e, t, i) => /* @__PURE__ */ r("div", {
|
|
26
|
-
className: n("slds-context-bar__tertiary", "slds-col_bump-left", e, t),
|
|
27
|
-
children: /* @__PURE__ */ r("ul", {
|
|
28
|
-
className: "slds-grid",
|
|
29
|
-
children: i
|
|
30
|
-
})
|
|
31
|
-
}), s = class extends t.Component {
|
|
32
|
-
static displayName = e;
|
|
33
|
-
render() {
|
|
34
|
-
let e, t = this.props.dividerPosition ? `slds-context-bar__item_divider-${this.props.dividerPosition}` : null;
|
|
35
|
-
switch (this.props.region) {
|
|
36
|
-
case "primary":
|
|
37
|
-
e = i(t, this.props.className, this.props.children);
|
|
38
|
-
break;
|
|
39
|
-
case "secondary":
|
|
40
|
-
e = a(t, this.props.className, this.props.children, this.props.navigation);
|
|
41
|
-
break;
|
|
42
|
-
case "tertiary": e = o(t, this.props.className, this.props.children);
|
|
43
|
-
}
|
|
44
|
-
return e;
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
//#endregion
|
|
48
|
-
export { s as default };
|
|
49
|
-
|
|
50
|
-
//# sourceMappingURL=region.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"region.js","names":[],"sources":["../../../../components/global-navigation-bar/region.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\n/* eslint-disable jsx-a11y/no-redundant-roles */\n\n// # Global Navigation Bar Region Component\n\n// ## Dependencies\n\n// ### React\nimport React, { type ReactNode } from 'react';\n\n// ### classNames\nimport classNames from 'classnames';\n\n// ## Constants\nimport { GLOBAL_NAVIGATION_BAR_REGION } from '../../utilities/constants';\n\ntype RegionClassName = unknown[] | Record<string, unknown> | string;\n\nexport interface RegionProps {\n\t/**\n\t * Contents of region. Expects `GlobalNavigationBarLink`, `GlobalNavigationBarDropdown`, `GlobalNavigationBarApplicationName`, `AppSwitcher`, but could be any component. This is the place to pass in an Object Switcher until that is supported.\n\t */\n\tchildren?: ReactNode;\n\t/**\n\t * Determines position of separating bar.\n\t */\n\tdividerPosition?: 'left' | 'right';\n\t/**\n\t * CSS classes to be added to the region\n\t */\n\tclassName?: RegionClassName;\n\t/**\n\t * Wraps the `secondary` region in a `nav` and adds a role attribute\n\t */\n\tnavigation?: boolean;\n\t/**\n\t * Region wrap children in styling specific to that region. When `tertiary`\n\t * region is used, secondary region only supports four list items.\n\t */\n\tregion: 'primary' | 'secondary' | 'tertiary';\n}\n\n// List regions for export\nconst regions = ['primary', 'secondary', 'tertiary'];\n\n/* eslint-disable react/display-name */\nconst renderPrimary = (\n\tdividerClass: string | null,\n\tclassName: RegionClassName | undefined,\n\tchildren: ReactNode\n) => (\n\t<div\n\t\tclassName={classNames(\n\t\t\t'slds-context-bar__primary',\n\t\t\tdividerClass,\n\t\t\tclassName as string\n\t\t)}\n\t>\n\t\t{children}\n\t</div>\n);\n\nconst renderSecondary = (\n\tdividerClass: string | null,\n\tclassName: RegionClassName | undefined,\n\tchildren: ReactNode,\n\tnavigation?: boolean\n) => {\n\tlet region;\n\n\tif (navigation) {\n\t\tregion = (\n\t\t\t<nav\n\t\t\t\tclassName={classNames(\n\t\t\t\t\t'slds-context-bar__secondary',\n\t\t\t\t\tdividerClass,\n\t\t\t\t\tclassName as string\n\t\t\t\t)}\n\t\t\t\trole=\"navigation\"\n\t\t\t>\n\t\t\t\t<ul className=\"slds-grid\">{children}</ul>\n\t\t\t</nav>\n\t\t);\n\t} else {\n\t\tregion = (\n\t\t\t<div\n\t\t\t\tclassName={classNames(\n\t\t\t\t\t'slds-context-bar__secondary',\n\t\t\t\t\tdividerClass,\n\t\t\t\t\tclassName as string\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t<ul className=\"slds-grid\">{children}</ul>\n\t\t\t</div>\n\t\t);\n\t}\n\treturn region;\n};\n\nconst renderTertiary = (\n\tdividerClass: string | null,\n\tclassName: RegionClassName | undefined,\n\tchildren: ReactNode\n) => (\n\t<div\n\t\tclassName={classNames(\n\t\t\t'slds-context-bar__tertiary',\n\t\t\t'slds-col_bump-left',\n\t\t\tdividerClass,\n\t\t\tclassName as string\n\t\t)}\n\t>\n\t\t<ul className=\"slds-grid\">{children}</ul>\n\t</div>\n);\n\n/* eslint-enable react/display-name */\n\n/**\n * Regions make up a GlobalNavigation Bar and typically contain links and dropdowns. The Primary region contains the AppSwitcher, Application Name, and Object Switcher. The secondary region typically has navigation betweens sections of the application. The tertiary region is aligned to the right side of the screen and contains shortcuts or actions.\n */\nclass Region extends React.Component<RegionProps> {\n\tstatic displayName = GLOBAL_NAVIGATION_BAR_REGION;\n\n\trender() {\n\t\tlet region;\n\t\tconst dividerClass = this.props.dividerPosition\n\t\t\t? `slds-context-bar__item_divider-${this.props.dividerPosition}`\n\t\t\t: null;\n\n\t\tswitch (this.props.region) {\n\t\t\tcase 'primary':\n\t\t\t\tregion = renderPrimary(\n\t\t\t\t\tdividerClass,\n\t\t\t\t\tthis.props.className,\n\t\t\t\t\tthis.props.children\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\tcase 'secondary':\n\t\t\t\tregion = renderSecondary(\n\t\t\t\t\tdividerClass,\n\t\t\t\t\tthis.props.className,\n\t\t\t\t\tthis.props.children,\n\t\t\t\t\tthis.props.navigation\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\tcase 'tertiary':\n\t\t\t\tregion = renderTertiary(\n\t\t\t\t\tdividerClass,\n\t\t\t\t\tthis.props.className,\n\t\t\t\t\tthis.props.children\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t// do nothing\n\t\t}\n\n\t\treturn region;\n\t}\n}\n\nexport default Region;\nexport { regions };\n"],"mappings":";;;;;AAgDA,IAAM,KACL,GACA,GACA,MAEA,kBAAC,OAAD;CACC,WAAW,EACV,6BACA,GACA,CACD;CAEC;AACG,CAAA,GAGA,KACL,GACA,GACA,GACA,MACI;CACJ,IAAI;CA4BJ,OA1BA,AAcC,IAdG,IAEF,kBAAC,OAAD;EACC,WAAW,EACV,+BACA,GACA,CACD;EACA,MAAK;EAEL,UAAA,kBAAC,MAAD;GAAI,WAAU;GAAa;EAAa,CAAA;CACpC,CAAA,IAIL,kBAAC,OAAD;EACC,WAAW,EACV,+BACA,GACA,CACD;EAEA,UAAA,kBAAC,MAAD;GAAI,WAAU;GAAa;EAAa,CAAA;CACpC,CAAA,GAGA;AACR,GAEM,KACL,GACA,GACA,MAEA,kBAAC,OAAD;CACC,WAAW,EACV,8BACA,sBACA,GACA,CACD;CAEA,UAAA,kBAAC,MAAD;EAAI,WAAU;EAAa;CAAa,CAAA;AACpC,CAAA,GAQA,IAAN,cAAqB,EAAM,UAAuB;CACjD,OAAO,cAAc;CAErB,SAAS;EACR,IAAI,GACE,IAAe,KAAK,MAAM,kBAC7B,kCAAkC,KAAK,MAAM,oBAC7C;EAEH,QAAQ,KAAK,MAAM,QAAnB;GACC,KAAK;IACJ,IAAS,EACR,GACA,KAAK,MAAM,WACX,KAAK,MAAM,QACZ;IACA;GACD,KAAK;IACJ,IAAS,EACR,GACA,KAAK,MAAM,WACX,KAAK,MAAM,UACX,KAAK,MAAM,UACZ;IACA;GACD,KAAK,YACJ,IAAS,EACR,GACA,KAAK,MAAM,WACX,KAAK,MAAM,QACZ;EAIF;EAEA,OAAO;CACR;AACD"}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { LOCATION_MAP as e } from "../../utilities/constants.js";
|
|
2
|
-
import t from "../icon/index.js";
|
|
3
|
-
import { useCallback as n, useId as r, useRef as i } from "react";
|
|
4
|
-
import a from "classnames";
|
|
5
|
-
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
6
|
-
//#region components/location-map/index.tsx
|
|
7
|
-
var c = { title: "Interactive Map" }, l = ({ className: e, classNameContainer: l, defaultLocation: u, googleAPIKey: d, id: f, labels: p, locations: m, onClickLocation: h, selection: g }) => {
|
|
8
|
-
let _ = r(), v = f || _, y = {
|
|
9
|
-
...c,
|
|
10
|
-
...p
|
|
11
|
-
}, b = i(null), x = n((e, t) => {
|
|
12
|
-
typeof h == "function" && h(e, m[t]), b.current && b.current.focus();
|
|
13
|
-
}, [h, m]), S = g?.address || u.address;
|
|
14
|
-
return /* @__PURE__ */ s("div", {
|
|
15
|
-
id: v,
|
|
16
|
-
className: a("slds-grid", { "slds-has-coordinates": m }, l),
|
|
17
|
-
children: [/* @__PURE__ */ o("div", {
|
|
18
|
-
className: "slds-map_container",
|
|
19
|
-
style: { padding: "4px" },
|
|
20
|
-
children: /* @__PURE__ */ o("div", {
|
|
21
|
-
className: a("slds-map", e),
|
|
22
|
-
ref: b,
|
|
23
|
-
tabIndex: 0,
|
|
24
|
-
title: y.title,
|
|
25
|
-
children: /* @__PURE__ */ o("iframe", {
|
|
26
|
-
id: `${v}-google-map`,
|
|
27
|
-
src: `https://www.google.com/maps/embed/v1/place?key=${d}&q=${encodeURIComponent(S)}`,
|
|
28
|
-
title: y.title
|
|
29
|
-
})
|
|
30
|
-
})
|
|
31
|
-
}), m.length > 1 ? /* @__PURE__ */ s("div", {
|
|
32
|
-
className: "slds-coordinates",
|
|
33
|
-
children: [/* @__PURE__ */ o("div", {
|
|
34
|
-
className: "slds-coordinates__header",
|
|
35
|
-
children: /* @__PURE__ */ o("h2", {
|
|
36
|
-
className: "slds-coordinates__title",
|
|
37
|
-
children: `${y.title} (${m.length})`
|
|
38
|
-
})
|
|
39
|
-
}), /* @__PURE__ */ o("ul", {
|
|
40
|
-
className: "slds-coordinates__list",
|
|
41
|
-
children: m.map((e, n) => /* @__PURE__ */ s("li", {
|
|
42
|
-
className: "slds-coordinates__item",
|
|
43
|
-
children: [/* @__PURE__ */ o("span", {
|
|
44
|
-
className: "slds-assistive-text",
|
|
45
|
-
"aria-live": "polite",
|
|
46
|
-
children: `${e.name} is currently selected`
|
|
47
|
-
}), /* @__PURE__ */ s("button", {
|
|
48
|
-
type: "button",
|
|
49
|
-
onClick: (e) => x(e, n),
|
|
50
|
-
className: "slds-coordinates__item-action slds-button_reset slds-media",
|
|
51
|
-
"aria-pressed": g?.id === e.id,
|
|
52
|
-
children: [/* @__PURE__ */ o("span", {
|
|
53
|
-
className: "slds-media__figure",
|
|
54
|
-
children: /* @__PURE__ */ o(t, {
|
|
55
|
-
category: "standard",
|
|
56
|
-
name: "account"
|
|
57
|
-
})
|
|
58
|
-
}), /* @__PURE__ */ s("span", {
|
|
59
|
-
className: "slds-media__body",
|
|
60
|
-
children: [/* @__PURE__ */ o("span", {
|
|
61
|
-
className: "slds-text-link",
|
|
62
|
-
children: e.name
|
|
63
|
-
}), /* @__PURE__ */ o("span", { children: e.address })]
|
|
64
|
-
})]
|
|
65
|
-
})]
|
|
66
|
-
}, e.id))
|
|
67
|
-
})]
|
|
68
|
-
}) : null]
|
|
69
|
-
});
|
|
70
|
-
};
|
|
71
|
-
l.displayName = e;
|
|
72
|
-
//#endregion
|
|
73
|
-
export { l as default };
|
|
74
|
-
|
|
75
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../components/location-map/index.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\nimport React, { useId, useRef, useCallback, type MouseEvent } from 'react';\nimport classNames from 'classnames';\nimport Icon from '../icon';\nimport { LOCATION_MAP } from '../../utilities/constants';\n\n/**\n * Location object for the map\n */\nexport interface LocationMapLocation {\n\t/** Unique identifier */\n\tid: string;\n\t/** Name of the location */\n\tname: string;\n\t/** Address of the location */\n\taddress: string;\n}\n\n/**\n * Labels for LocationMap\n */\nexport interface LocationMapLabels {\n\t/** Title for the map */\n\ttitle?: string;\n}\n\n/**\n * Props for the LocationMap component\n */\nexport interface LocationMapProps {\n\t/** CSS classes for the map */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** CSS classes for the container */\n\tclassNameContainer?: string | string[] | Record<string, boolean>;\n\t/** Default location to show */\n\tdefaultLocation: LocationMapLocation;\n\t/** Google Maps API key */\n\tgoogleAPIKey: string;\n\t/** HTML id */\n\tid?: string;\n\t/** Text labels */\n\tlabels?: LocationMapLabels;\n\t/** Array of locations */\n\tlocations: LocationMapLocation[];\n\t/** Callback when a location is clicked */\n\tonClickLocation?: (event: MouseEvent<HTMLButtonElement>, location: LocationMapLocation) => void;\n\t/** Currently selected location */\n\tselection?: LocationMapLocation;\n}\n\nconst defaultLabels: LocationMapLabels = {\n\ttitle: 'Interactive Map',\n};\n\n/**\n * A location map component is used to find and show locations.\n */\nconst LocationMap = ({\n\tclassName,\n\tclassNameContainer,\n\tdefaultLocation,\n\tgoogleAPIKey,\n\tid: propId,\n\tlabels: propLabels,\n\tlocations,\n\tonClickLocation,\n\tselection,\n}: LocationMapProps): React.ReactElement => {\n\tconst generatedId = useId();\n\tconst id = propId || generatedId;\n\tconst labels = { ...defaultLabels, ...propLabels };\n\tconst mapRef = useRef<HTMLDivElement>(null);\n\n\tconst handleClick = useCallback(\n\t\t(event: MouseEvent<HTMLButtonElement>, index: number) => {\n\t\t\tif (typeof onClickLocation === 'function') {\n\t\t\t\tonClickLocation(event, locations[index]);\n\t\t\t}\n\t\t\tif (mapRef.current) {\n\t\t\t\tmapRef.current.focus();\n\t\t\t}\n\t\t},\n\t\t[onClickLocation, locations]\n\t);\n\n\tconst currentAddress = selection?.address || defaultLocation.address;\n\n\treturn (\n\t\t<div\n\t\t\tid={id}\n\t\t\tclassName={classNames(\n\t\t\t\t'slds-grid',\n\t\t\t\t{ 'slds-has-coordinates': locations },\n\t\t\t\tclassNameContainer as string\n\t\t\t)}\n\t\t>\n\t\t\t<div className=\"slds-map_container\" style={{ padding: '4px' }}>\n\t\t\t\t<div\n\t\t\t\t\tclassName={classNames('slds-map', className as string)}\n\t\t\t\t\tref={mapRef}\n\t\t\t\t\ttabIndex={0}\n\t\t\t\t\ttitle={labels.title}\n\t\t\t\t>\n\t\t\t\t\t<iframe\n\t\t\t\t\t\tid={`${id}-google-map`}\n\t\t\t\t\t\tsrc={`https://www.google.com/maps/embed/v1/place?key=${googleAPIKey}&q=${encodeURIComponent(currentAddress)}`}\n\t\t\t\t\t\ttitle={labels.title}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t{locations.length > 1 ? (\n\t\t\t\t<div className=\"slds-coordinates\">\n\t\t\t\t\t<div className=\"slds-coordinates__header\">\n\t\t\t\t\t\t<h2 className=\"slds-coordinates__title\">\n\t\t\t\t\t\t\t{`${labels.title} (${locations.length})`}\n\t\t\t\t\t\t</h2>\n\t\t\t\t\t</div>\n\t\t\t\t\t<ul className=\"slds-coordinates__list\">\n\t\t\t\t\t\t{locations.map((location, i) => (\n\t\t\t\t\t\t\t<li key={location.id} className=\"slds-coordinates__item\">\n\t\t\t\t\t\t\t\t<span className=\"slds-assistive-text\" aria-live=\"polite\">\n\t\t\t\t\t\t\t\t\t{`${location.name} is currently selected`}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\tonClick={(event) => handleClick(event, i)}\n\t\t\t\t\t\t\t\t\tclassName=\"slds-coordinates__item-action slds-button_reset slds-media\"\n\t\t\t\t\t\t\t\t\taria-pressed={selection?.id === location.id}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<span className=\"slds-media__figure\">\n\t\t\t\t\t\t\t\t\t\t<Icon category=\"standard\" name=\"account\" />\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t<span className=\"slds-media__body\">\n\t\t\t\t\t\t\t\t\t\t<span className=\"slds-text-link\">{location.name}</span>\n\t\t\t\t\t\t\t\t\t\t<span>{location.address}</span>\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t) : null}\n\t\t</div>\n\t);\n};\n\nLocationMap.displayName = LOCATION_MAP;\n\nexport default LocationMap;\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"],"mappings":";;;;;;AAoDA,IAAM,IAAmC,EACxC,OAAO,kBACR,GAKM,KAAe,EACpB,cACA,uBACA,oBACA,iBACA,IAAI,GACJ,QAAQ,GACR,cACA,oBACA,mBAC2C;CAC3C,IAAM,IAAc,EAAM,GACpB,IAAK,KAAU,GACf,IAAS;EAAE,GAAG;EAAe,GAAG;CAAW,GAC3C,IAAS,EAAuB,IAAI,GAEpC,IAAc,GAClB,GAAsC,MAAkB;EAIxD,AAHI,OAAO,KAAoB,cAC9B,EAAgB,GAAO,EAAU,EAAM,GAEpC,EAAO,WACV,EAAO,QAAQ,MAAM;CAEvB,GACA,CAAC,GAAiB,CAAS,CAC5B,GAEM,IAAiB,GAAW,WAAW,EAAgB;CAE7D,OACC,kBAAC,OAAD;EACK;EACJ,WAAW,EACV,aACA,EAAE,wBAAwB,EAAU,GACpC,CACD;EAND,UAAA,CAQC,kBAAC,OAAD;GAAK,WAAU;GAAqB,OAAO,EAAE,SAAS,MAAM;GAC3D,UAAA,kBAAC,OAAD;IACC,WAAW,EAAW,YAAY,CAAmB;IACrD,KAAK;IACL,UAAU;IACV,OAAO,EAAO;IAEd,UAAA,kBAAC,UAAD;KACC,IAAI,GAAG,EAAG;KACV,KAAK,kDAAkD,EAAa,KAAK,mBAAmB,CAAc;KAC1G,OAAO,EAAO;IACd,CAAA;GACG,CAAA;EACD,CAAA,GACJ,EAAU,SAAS,IACnB,kBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACC,kBAAC,OAAD;IAAK,WAAU;IACd,UAAA,kBAAC,MAAD;KAAI,WAAU;KACZ,UAAA,GAAG,EAAO,MAAM,IAAI,EAAU,OAAO;IACnC,CAAA;GACA,CAAA,GACL,kBAAC,MAAD;IAAI,WAAU;IACZ,UAAA,EAAU,KAAK,GAAU,MACzB,kBAAC,MAAD;KAAsB,WAAU;KAAhC,UAAA,CACC,kBAAC,QAAD;MAAM,WAAU;MAAsB,aAAU;MAC9C,UAAA,GAAG,EAAS,KAAK;KACb,CAAA,GACN,kBAAC,UAAD;MACC,MAAK;MACL,UAAU,MAAU,EAAY,GAAO,CAAC;MACxC,WAAU;MACV,gBAAc,GAAW,OAAO,EAAS;MAJ1C,UAAA,CAMC,kBAAC,QAAD;OAAM,WAAU;OACf,UAAA,kBAAC,GAAD;QAAM,UAAS;QAAW,MAAK;OAAW,CAAA;MACrC,CAAA,GACN,kBAAC,QAAD;OAAM,WAAU;OAAhB,UAAA,CACC,kBAAC,QAAD;QAAM,WAAU;QAAkB,UAAA,EAAS;OAAW,CAAA,GACtD,kBAAC,QAAD,EAAA,UAAO,EAAS,QAAc,CAAA,CACzB;MACC,CAAA,CAAA;KACL,CAAA,CAAA;IAlBK,GAAA,EAAS,EAkBd,CACJ;GACE,CAAA,CACA;EACF,CAAA,IAAA,IACA;;AAEP;AAEA,EAAY,cAAc"}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { Component as e } from "react";
|
|
2
|
-
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
-
import r from "memoize-one";
|
|
4
|
-
//#region components/utilities/truncate/index.tsx
|
|
5
|
-
var i = typeof document < "u", a, o, s, c = () => 0;
|
|
6
|
-
i && (a = document.createElement("canvas"), a.getContext && (o = document.createDocumentFragment(), o.appendChild(a), s = a.getContext("2d"), c = r((e, t) => s ? (s.font = t, s.measureText(e).width) : 0)));
|
|
7
|
-
var l = class extends e {
|
|
8
|
-
static displayName = "TextTruncate";
|
|
9
|
-
static defaultProps = {
|
|
10
|
-
line: 1,
|
|
11
|
-
text: "",
|
|
12
|
-
truncateText: "…"
|
|
13
|
-
};
|
|
14
|
-
state = {};
|
|
15
|
-
scope = null;
|
|
16
|
-
componentDidMount() {
|
|
17
|
-
window.addEventListener("resize", this.onResize, !1);
|
|
18
|
-
}
|
|
19
|
-
componentDidUpdate(e) {
|
|
20
|
-
e.text !== this.props.text && this.update(e);
|
|
21
|
-
}
|
|
22
|
-
componentWillUnmount() {
|
|
23
|
-
window.removeEventListener("resize", this.onResize, !1);
|
|
24
|
-
}
|
|
25
|
-
onResize = () => {
|
|
26
|
-
this.update(this.props);
|
|
27
|
-
};
|
|
28
|
-
getRenderText = (e, t) => {
|
|
29
|
-
if (!e) return;
|
|
30
|
-
this.scope = e;
|
|
31
|
-
let r;
|
|
32
|
-
r = t || this.props;
|
|
33
|
-
let { containerClassName: i, line: a, prefix: o, suffix: s, text: l, textTruncateChild: u, truncateText: d, wrapper: f, ...p } = r, m = l ?? "", h = d ?? "…", g = a ?? 1, _ = this.scope.getBoundingClientRect().width, v = window.getComputedStyle(this.scope), y = [
|
|
34
|
-
v["font-weight"],
|
|
35
|
-
v["font-style"],
|
|
36
|
-
v["font-size"],
|
|
37
|
-
v["font-family"]
|
|
38
|
-
].join(" ");
|
|
39
|
-
if (_ === 0) {
|
|
40
|
-
this.setState({ renderText: null });
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
let b, x = m;
|
|
44
|
-
if (_ < c(m, y)) {
|
|
45
|
-
let e = 1, t = m.length, n = "", r = 0, i = 0, a = g, l = 0, d = !1, f = -1;
|
|
46
|
-
for (; a !== 0;) {
|
|
47
|
-
let u = "", p = 0;
|
|
48
|
-
for (o && a === g - 1 && (u += ` ${o}`, p = o.length * .66), a || (u += h, s && (u += ` ${s}`)); e <= t;) if (n = m.substr(i, e), l = c(n + u, y) + p, l < _) r = m.indexOf(" ", e + 1), r === -1 ? (e += 1, d = !1) : (d = !0, e = r);
|
|
49
|
-
else {
|
|
50
|
-
let t = 0;
|
|
51
|
-
do {
|
|
52
|
-
if (--e, n = m.substr(i, e), n[n.length - 1] === " " && (n = m.substr(i, e - 1)), d && (f = n.lastIndexOf(" "), f > -1 && (e = f, n = m.substr(i, e))), l = c(n + u, y) + p, l === t) {
|
|
53
|
-
e = 0;
|
|
54
|
-
break;
|
|
55
|
-
}
|
|
56
|
-
t = l;
|
|
57
|
-
} while (l >= _);
|
|
58
|
-
i += e;
|
|
59
|
-
break;
|
|
60
|
-
}
|
|
61
|
-
if (e >= t) {
|
|
62
|
-
i = t;
|
|
63
|
-
break;
|
|
64
|
-
}
|
|
65
|
-
--a;
|
|
66
|
-
}
|
|
67
|
-
i !== t && (x = `${m.substr(0, i)}${h} `, b = u);
|
|
68
|
-
}
|
|
69
|
-
let S;
|
|
70
|
-
S = f ? f(x, b) : /* @__PURE__ */ n("div", {
|
|
71
|
-
...p,
|
|
72
|
-
children: [x, b]
|
|
73
|
-
}), this.setState({ renderText: S });
|
|
74
|
-
};
|
|
75
|
-
update = (e) => {
|
|
76
|
-
this.getRenderText(this.scope, e);
|
|
77
|
-
};
|
|
78
|
-
render() {
|
|
79
|
-
let { containerClassName: e } = this.props;
|
|
80
|
-
return /* @__PURE__ */ t("div", {
|
|
81
|
-
ref: this.getRenderText,
|
|
82
|
-
className: e,
|
|
83
|
-
style: { overflow: "hidden" },
|
|
84
|
-
children: this.state.renderText
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
//#endregion
|
|
89
|
-
export { l as default };
|
|
90
|
-
|
|
91
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../../components/utilities/truncate/index.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\nimport { Component, type ReactNode } from 'react';\n\nimport memoize from 'memoize-one';\n\nconst documentDefined = typeof document !== 'undefined';\n\nlet canvas: HTMLCanvasElement | undefined;\nlet docFragment: DocumentFragment | undefined;\nlet canvasContext: CanvasRenderingContext2D | null;\nlet measureWidth: (text: string, font: string) => number = () => 0;\n\nif (documentDefined) {\n\tcanvas = document.createElement('canvas');\n\tif (canvas.getContext) {\n\t\tdocFragment = document.createDocumentFragment();\n\t\tdocFragment.appendChild(canvas);\n\t\tcanvasContext = canvas.getContext('2d');\n\t\tmeasureWidth = memoize((text: string, font: string) => {\n\t\t\tif (!canvasContext) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\tcanvasContext.font = font;\n\t\t\treturn canvasContext.measureText(text).width;\n\t\t});\n\t}\n}\n\nexport interface TruncateProps {\n\tcontainerClassName?: string;\n\tline?: number;\n\tprefix?: string;\n\tsuffix?: string;\n\ttext?: string;\n\ttextTruncateChild?: ReactNode;\n\ttruncateText?: string;\n\twrapper?: (outputText: string, child?: ReactNode) => ReactNode;\n\t// Any additional props are spread onto the rendered element.\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t[key: string]: any;\n}\n\ninterface TruncateState {\n\trenderText?: ReactNode;\n}\n\nclass TextTruncate extends Component<TruncateProps, TruncateState> {\n\tstatic displayName = 'TextTruncate';\n\n\tstatic defaultProps: Partial<TruncateProps> = {\n\t\tline: 1,\n\t\ttext: '',\n\t\ttruncateText: '…',\n\t};\n\n\tstate: TruncateState = {};\n\n\tscope: HTMLElement | null = null;\n\n\tcomponentDidMount() {\n\t\twindow.addEventListener('resize', this.onResize, false);\n\t}\n\n\tcomponentDidUpdate(nextProps: TruncateProps) {\n\t\tif (nextProps.text !== this.props.text) {\n\t\t\tthis.update(nextProps);\n\t\t}\n\t}\n\n\tcomponentWillUnmount() {\n\t\twindow.removeEventListener('resize', this.onResize, false);\n\t}\n\n\tonResize = () => {\n\t\tthis.update(this.props);\n\t};\n\n\tgetRenderText = (ref: HTMLElement | null, nextProps?: TruncateProps) => {\n\t\tif (!ref) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.scope = ref;\n\n\t\t// nextProps will be undefined for resize events, but will change if search or other props are changed\n\t\tlet propsToRender;\n\t\tif (nextProps) {\n\t\t\tpropsToRender = nextProps;\n\t\t} else {\n\t\t\tpropsToRender = this.props;\n\t\t}\n\n\t\tconst {\n\t\t\tcontainerClassName, // eslint-disable-line no-unused-vars, @typescript-eslint/no-unused-vars\n\t\t\tline,\n\t\t\tprefix,\n\t\t\tsuffix,\n\t\t\ttext,\n\t\t\ttextTruncateChild,\n\t\t\ttruncateText,\n\t\t\twrapper,\n\t\t\t...props\n\t\t} = propsToRender;\n\n\t\tconst resolvedText = text ?? '';\n\t\tconst resolvedTruncateText = truncateText ?? '…';\n\t\tconst resolvedLine = line ?? 1;\n\n\t\tconst scopeWidth = this.scope.getBoundingClientRect().width;\n\t\tconst style = window.getComputedStyle(this.scope);\n\t\tconst font = [\n\t\t\tstyle['font-weight' as keyof CSSStyleDeclaration],\n\t\t\tstyle['font-style' as keyof CSSStyleDeclaration],\n\t\t\tstyle['font-size' as keyof CSSStyleDeclaration],\n\t\t\tstyle['font-family' as keyof CSSStyleDeclaration],\n\t\t].join(' ');\n\n\t\t// return if display:none\n\t\tif (scopeWidth === 0) {\n\t\t\tthis.setState({ renderText: null });\n\t\t\treturn;\n\t\t}\n\n\t\tlet child: ReactNode;\n\t\tlet outputText = resolvedText;\n\n\t\t// return if all of text can be displayed\n\t\tif (scopeWidth < measureWidth(resolvedText, font)) {\n\t\t\tlet currentPos = 1;\n\t\t\tconst maxTextLength = resolvedText.length;\n\t\t\tlet truncatedText = '';\n\t\t\tlet splitPos = 0;\n\t\t\tlet startPos = 0;\n\t\t\tlet displayLine = resolvedLine;\n\t\t\tlet width = 0;\n\t\t\tlet lastIsEng = false;\n\t\t\tlet lastSpaceIndex = -1;\n\n\t\t\twhile (displayLine !== 0) {\n\t\t\t\tlet ext = '';\n\t\t\t\tlet extraWidthDueToPrefixStyle = 0;\n\n\t\t\t\tif (prefix && displayLine === resolvedLine - 1) {\n\t\t\t\t\text += ` ${prefix}`;\n\t\t\t\t\t// MAGIC NUMBER: (width at letter-spacing of 0.25rems - width at normal) / number of letters\n\t\t\t\t\textraWidthDueToPrefixStyle = prefix.length * 0.66;\n\t\t\t\t}\n\n\t\t\t\tif (!displayLine) {\n\t\t\t\t\text += resolvedTruncateText;\n\n\t\t\t\t\tif (suffix) {\n\t\t\t\t\t\text += ` ${suffix}`;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\twhile (currentPos <= maxTextLength) {\n\t\t\t\t\ttruncatedText = resolvedText.substr(startPos, currentPos);\n\t\t\t\t\twidth =\n\t\t\t\t\t\tmeasureWidth(truncatedText + ext, font) +\n\t\t\t\t\t\textraWidthDueToPrefixStyle;\n\n\t\t\t\t\tif (width < scopeWidth) {\n\t\t\t\t\t\tsplitPos = resolvedText.indexOf(' ', currentPos + 1);\n\t\t\t\t\t\tif (splitPos === -1) {\n\t\t\t\t\t\t\tcurrentPos += 1;\n\t\t\t\t\t\t\tlastIsEng = false;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tlastIsEng = true;\n\t\t\t\t\t\t\tcurrentPos = splitPos;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlet lastWidth = 0;\n\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\tcurrentPos -= 1;\n\t\t\t\t\t\t\ttruncatedText = resolvedText.substr(startPos, currentPos);\n\t\t\t\t\t\t\tif (truncatedText[truncatedText.length - 1] === ' ') {\n\t\t\t\t\t\t\t\ttruncatedText = resolvedText.substr(startPos, currentPos - 1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (lastIsEng) {\n\t\t\t\t\t\t\t\tlastSpaceIndex = truncatedText.lastIndexOf(' ');\n\t\t\t\t\t\t\t\tif (lastSpaceIndex > -1) {\n\t\t\t\t\t\t\t\t\tcurrentPos = lastSpaceIndex;\n\t\t\t\t\t\t\t\t\ttruncatedText = resolvedText.substr(startPos, currentPos);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\twidth =\n\t\t\t\t\t\t\t\tmeasureWidth(truncatedText + ext, font) +\n\t\t\t\t\t\t\t\textraWidthDueToPrefixStyle;\n\t\t\t\t\t\t\tif (width === lastWidth) {\n\t\t\t\t\t\t\t\tcurrentPos = 0;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tlastWidth = width;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} while (width >= scopeWidth);\n\t\t\t\t\t\tstartPos += currentPos;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (currentPos >= maxTextLength) {\n\t\t\t\t\tstartPos = maxTextLength;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tdisplayLine -= 1; // iterate\n\t\t\t}\n\n\t\t\tif (startPos !== maxTextLength) {\n\t\t\t\toutputText = `${resolvedText.substr(0, startPos)}${resolvedTruncateText} `;\n\t\t\t\tchild = textTruncateChild;\n\t\t\t}\n\t\t}\n\n\t\tlet renderText;\n\t\tif (wrapper) {\n\t\t\trenderText = wrapper(outputText, child);\n\t\t} else {\n\t\t\trenderText = (\n\t\t\t\t<div {...props}>\n\t\t\t\t\t{outputText}\n\t\t\t\t\t{child}\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\n\t\tthis.setState({ renderText });\n\t};\n\n\tupdate = (nextProps?: TruncateProps) => {\n\t\tthis.getRenderText(this.scope, nextProps);\n\t};\n\n\trender() {\n\t\tconst { containerClassName } = this.props;\n\n\t\t// inline style override\n\t\treturn (\n\t\t\t<div\n\t\t\t\tref={this.getRenderText}\n\t\t\t\tclassName={containerClassName}\n\t\t\t\tstyle={{ overflow: 'hidden' }}\n\t\t\t>\n\t\t\t\t{this.state.renderText}\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nexport default TextTruncate;\n"],"mappings":";;;;AAOA,IAAM,IAAkB,OAAO,WAAa,KAExC,GACA,GACA,GACA,UAA6D;AAE7D,MACH,IAAS,SAAS,cAAc,QAAQ,GACpC,EAAO,eACV,IAAc,SAAS,uBAAuB,GAC9C,EAAY,YAAY,CAAM,GAC9B,IAAgB,EAAO,WAAW,IAAI,GACtC,IAAe,GAAS,GAAc,MAChC,KAGL,EAAc,OAAO,GACd,EAAc,YAAY,CAAI,CAAC,CAAC,SAH/B,CAIR;AAsBH,IAAM,IAAN,cAA2B,EAAwC;CAClE,OAAO,cAAc;CAErB,OAAO,eAAuC;EAC7C,MAAM;EACN,MAAM;EACN,cAAc;CACf;CAEA,QAAuB,CAAC;CAExB,QAA4B;CAE5B,oBAAoB;EACnB,OAAO,iBAAiB,UAAU,KAAK,UAAU,EAAK;CACvD;CAEA,mBAAmB,GAA0B;EAC5C,AAAI,EAAU,SAAS,KAAK,MAAM,QACjC,KAAK,OAAO,CAAS;CAEvB;CAEA,uBAAuB;EACtB,OAAO,oBAAoB,UAAU,KAAK,UAAU,EAAK;CAC1D;CAEA,iBAAiB;EAChB,KAAK,OAAO,KAAK,KAAK;CACvB;CAEA,iBAAiB,GAAyB,MAA8B;EACvE,IAAI,CAAC,GACJ;EAGD,KAAK,QAAQ;EAGb,IAAI;EACJ,AAGC,IAHG,KAGa,KAAK;EAGtB,IAAM,EACL,uBACA,SACA,WACA,WACA,SACA,sBACA,iBACA,YACA,GAAG,MACA,GAEE,IAAe,KAAQ,IACvB,IAAuB,KAAgB,KACvC,IAAe,KAAQ,GAEvB,IAAa,KAAK,MAAM,sBAAsB,CAAC,CAAC,OAChD,IAAQ,OAAO,iBAAiB,KAAK,KAAK,GAC1C,IAAO;GACZ,EAAM;GACN,EAAM;GACN,EAAM;GACN,EAAM;EACP,CAAC,CAAC,KAAK,GAAG;EAGV,IAAI,MAAe,GAAG;GACrB,KAAK,SAAS,EAAE,YAAY,KAAK,CAAC;GAClC;EACD;EAEA,IAAI,GACA,IAAa;EAGjB,IAAI,IAAa,EAAa,GAAc,CAAI,GAAG;GAClD,IAAI,IAAa,GACX,IAAgB,EAAa,QAC/B,IAAgB,IAChB,IAAW,GACX,IAAW,GACX,IAAc,GACd,IAAQ,GACR,IAAY,IACZ,IAAiB;GAErB,OAAO,MAAgB,IAAG;IACzB,IAAI,IAAM,IACN,IAA6B;IAgBjC,KAdI,KAAU,MAAgB,IAAe,MAC5C,KAAO,IAAI,KAEX,IAA6B,EAAO,SAAS,MAGzC,MACJ,KAAO,GAEH,MACH,KAAO,IAAI,OAIN,KAAc,IAMpB,IALA,IAAgB,EAAa,OAAO,GAAU,CAAU,GACxD,IACC,EAAa,IAAgB,GAAK,CAAI,IACtC,GAEG,IAAQ,GAEX,AADA,IAAW,EAAa,QAAQ,KAAK,IAAa,CAAC,GAC/C,MAAa,MAChB,KAAc,GACd,IAAY,OAEZ,IAAY,IACZ,IAAa;SAER;KACN,IAAI,IAAY;KAChB,GAAG;MAgBF,IAfA,KACA,IAAgB,EAAa,OAAO,GAAU,CAAU,GACpD,EAAc,EAAc,SAAS,OAAO,QAC/C,IAAgB,EAAa,OAAO,GAAU,IAAa,CAAC,IAEzD,MACH,IAAiB,EAAc,YAAY,GAAG,GAC1C,IAAiB,OACpB,IAAa,GACb,IAAgB,EAAa,OAAO,GAAU,CAAU,KAG1D,IACC,EAAa,IAAgB,GAAK,CAAI,IACtC,GACG,MAAU,GAAW;OACxB,IAAa;OACb;MACD;MACC,IAAY;KAEd,SAAS,KAAS;KAClB,KAAY;KACZ;IACD;IAGD,IAAI,KAAc,GAAe;KAChC,IAAW;KACX;IACD;IAEA;GACD;GAEA,AAAI,MAAa,MAChB,IAAa,GAAG,EAAa,OAAO,GAAG,CAAQ,IAAI,EAAqB,IACxE,IAAQ;EAEV;EAEA,IAAI;EAYJ,AAXA,AAGC,IAHG,IACU,EAAQ,GAAY,CAAK,IAGrC,kBAAC,OAAD;GAAK,GAAI;GAAT,UAAA,CACE,GACA,CACG;MAIP,KAAK,SAAS,EAAE,cAAW,CAAC;CAC7B;CAEA,UAAU,MAA8B;EACvC,KAAK,cAAc,KAAK,OAAO,CAAS;CACzC;CAEA,SAAS;EACR,IAAM,EAAE,0BAAuB,KAAK;EAGpC,OACC,kBAAC,OAAD;GACC,KAAK,KAAK;GACV,WAAW;GACX,OAAO,EAAE,UAAU,SAAS;GAE3B,UAAA,KAAK,MAAM;EACR,CAAA;CAEP;AACD"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import e from "warning";
|
|
2
|
-
//#region utilities/warning/one-of-component.js
|
|
3
|
-
var t = function() {};
|
|
4
|
-
if (process.env.NODE_ENV !== "production") {
|
|
5
|
-
let n = {};
|
|
6
|
-
t = function(t, r, i, a, o, s) {
|
|
7
|
-
let c = o ? ` ${o}` : "", l;
|
|
8
|
-
l = s ? typeof s.type == "string" ? s.type : s.type.displayName : typeof r[i].type == "string" ? r[i].type : r[i].type.displayName, !(a.indexOf(l) > -1) && !n[t] && (e(!1, `[Design System React] ${t} requires that prop '${i}' is an instance of one of the following components: ${a.join(", ")}. An instance of '${l}' was given.${c}`), n[t] = !0);
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
var n = t;
|
|
12
|
-
//#endregion
|
|
13
|
-
export { n as default };
|
|
14
|
-
|
|
15
|
-
//# sourceMappingURL=one-of-component.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"one-of-component.js","names":[],"sources":["../../../../utilities/warning/one-of-component.js"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\n/* eslint-disable import/no-mutable-exports */\n\n// This function will deliver an error message to the browser console when all of the props passed in are undefined (falsey).\nimport warning from 'warning';\n\nlet oneOfComponent = function oneOfComponentFunction() {};\n\nif (process.env.NODE_ENV !== 'production') {\n\tconst hasWarned = {};\n\toneOfComponent = function oneOfComponentFunction(\n\t\tcontrol,\n\t\tprops,\n\t\tpropName,\n\t\tallowedComponents,\n\t\tcomment,\n\t\tspecificTest // if this is set, it will be checked instead of props[propName]\n\t) {\n\t\tconst additionalComment = comment ? ` ${comment}` : '';\n\n\t\tlet componentType;\n\n\t\tif (specificTest) {\n\t\t\tif (typeof specificTest.type === 'string') {\n\t\t\t\tcomponentType = specificTest.type;\n\t\t\t} else {\n\t\t\t\tcomponentType = specificTest.type.displayName;\n\t\t\t}\n\t\t} else if (typeof props[propName].type === 'string') {\n\t\t\tcomponentType = props[propName].type;\n\t\t} else {\n\t\t\tcomponentType = props[propName].type.displayName;\n\t\t}\n\n\t\tconst allowedComponentFound = allowedComponents.indexOf(componentType) > -1;\n\n\t\tif (!allowedComponentFound && !hasWarned[control]) {\n\t\t\t/* eslint-disable max-len */\n\t\t\twarning(\n\t\t\t\tfalse,\n\t\t\t\t`[Design System React] ${control} requires that prop '${propName}' is an instance of one of the following components: ${allowedComponents.join(\n\t\t\t\t\t', '\n\t\t\t\t)}. An instance of '${componentType}' was given.${additionalComment}`\n\t\t\t);\n\t\t\t/* eslint-enable max-len */\n\t\t\thasWarned[control] = true;\n\t\t}\n\t};\n}\n\nexport default oneOfComponent;\n"],"mappings":";;AAQA,IAAI,IAAiB,WAAkC,CAAC;AAExD,IAAA,QAAA,IAAA,aAA6B,cAAc;CAC1C,IAAM,IAAY,CAAC;CACnB,IAAiB,SAChB,GACA,GACA,GACA,GACA,GACA,GACC;EACD,IAAM,IAAoB,IAAU,IAAI,MAAY,IAEhD;EAgBJ,AAdA,AASC,IATG,IACC,OAAO,EAAa,QAAS,WAChB,EAAa,OAEb,EAAa,KAAK,cAEzB,OAAO,EAAM,EAAS,CAAC,QAAS,WAC1B,EAAM,EAAS,CAAC,OAEhB,EAAM,EAAS,CAAC,KAAK,aAKlC,EAF0B,EAAkB,QAAQ,CAAa,IAAI,OAE3C,CAAC,EAAU,OAExC,EACC,IACA,yBAAyB,EAAQ,uBAAuB,EAAS,uDAAuD,EAAkB,KACzI,IACD,EAAE,oBAAoB,EAAc,cAAc,GACnD,GAEA,EAAU,KAAW;CAEvB;AACD;AAEA,IAAA,IAAe"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"check-props.d.ts","sourceRoot":"","sources":["../../../../components/app-launcher/check-props.js"],"names":[],"mappings":"AAgBA,QAAA,IAAI,UAAU,YAAmC,CAAC;eAyDnC,UAAU"}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import React, { type MouseEvent, type ReactNode } from 'react';
|
|
2
|
-
export interface AppLauncherExpandableSectionAssistiveText {
|
|
3
|
-
/** Label for the icon that expands / collapses the section */
|
|
4
|
-
toggleSection?: string;
|
|
5
|
-
}
|
|
6
|
-
export interface AppLauncherExpandableSectionProps {
|
|
7
|
-
/**
|
|
8
|
-
* **Assistive text for accessibility.**
|
|
9
|
-
* * `toggleSection`: Label for the icon that expands / collapses the section
|
|
10
|
-
*/
|
|
11
|
-
assistiveText?: AppLauncherExpandableSectionAssistiveText;
|
|
12
|
-
/**
|
|
13
|
-
* Contents of the section
|
|
14
|
-
*/
|
|
15
|
-
children?: ReactNode;
|
|
16
|
-
/**
|
|
17
|
-
* Class names to be added to the `slds-section` classed node
|
|
18
|
-
*/
|
|
19
|
-
className?: unknown[] | Record<string, unknown> | string;
|
|
20
|
-
/**
|
|
21
|
-
* Unique identifier for the expandable section. The id is automatically generated if not provided
|
|
22
|
-
*/
|
|
23
|
-
id?: string;
|
|
24
|
-
/**
|
|
25
|
-
* Specifies whether the section is expanded or collapsed. If not provided, component will use its own state to manage this itself
|
|
26
|
-
*/
|
|
27
|
-
isOpen?: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* Specifies whether the section can be expanded or collapsed. Defaults to `false`
|
|
30
|
-
*/
|
|
31
|
-
nonCollapsible?: boolean;
|
|
32
|
-
/**
|
|
33
|
-
* Callback for when the section is expanded or collapsed. Passes event object and data object with `isOpen` bool.
|
|
34
|
-
*/
|
|
35
|
-
onToggleOpen?: (event: MouseEvent, data: {
|
|
36
|
-
isOpen: boolean;
|
|
37
|
-
}) => void;
|
|
38
|
-
/**
|
|
39
|
-
* The title for the section
|
|
40
|
-
*/
|
|
41
|
-
title: string;
|
|
42
|
-
}
|
|
43
|
-
interface AppLauncherExpandableSectionState {
|
|
44
|
-
isOpen: boolean;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* App Launcher Sections allow users to categorize App Tiles & Links as well as toggle their display. It is a superset of components/expandable-section with content formatting.
|
|
48
|
-
* All Expandable Section props are compatible with props passed to this component.
|
|
49
|
-
*/
|
|
50
|
-
declare class AppLauncherExpandableSection extends React.Component<AppLauncherExpandableSectionProps, AppLauncherExpandableSectionState> {
|
|
51
|
-
static displayName: string;
|
|
52
|
-
state: {
|
|
53
|
-
isOpen: boolean;
|
|
54
|
-
};
|
|
55
|
-
constructor(props: AppLauncherExpandableSectionProps);
|
|
56
|
-
toggleOpen: (event: MouseEvent, data: {
|
|
57
|
-
isOpen: boolean;
|
|
58
|
-
}) => void;
|
|
59
|
-
render(): React.JSX.Element;
|
|
60
|
-
}
|
|
61
|
-
export default AppLauncherExpandableSection;
|
|
62
|
-
//# sourceMappingURL=expandable-section.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"expandable-section.d.ts","sourceRoot":"","sources":["../../../../components/app-launcher/expandable-section.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,EAAE,KAAK,UAAU,EAAqB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAoBlF,MAAM,WAAW,yCAAyC;IACzD,8DAA8D;IAC9D,aAAa,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,iCAAiC;IACjD;;;OAGG;IACH,aAAa,CAAC,EAAE,yCAAyC,CAAC;IAC1D;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC;IACzD;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE;QAAE,MAAM,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAC;IACtE;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACd;AAED,UAAU,iCAAiC;IAC1C,MAAM,EAAE,OAAO,CAAC;CAChB;AAED;;;GAGG;AACH,cAAM,4BAA6B,SAAQ,KAAK,CAAC,SAAS,CACzD,iCAAiC,EACjC,iCAAiC,CACjC;IAGA,MAAM,CAAC,WAAW,SAAmC;IAErD,KAAK;QACJ,MAAM;MACL;IAEF,YAAY,KAAK,EAAE,iCAAiC,EAQnD;IAED,UAAU,UAAW,UAAU,QAAQ;QAAE,MAAM,EAAE,OAAO,CAAA;KAAE,UAQxD;IAEF,MAAM,sBAiDL;CACD;eAEc,4BAA4B"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import React, { type ReactNode, type MouseEvent } from 'react';
|
|
2
|
-
import { APP_LAUNCHER } from '../../utilities/constants';
|
|
3
|
-
/**
|
|
4
|
-
* Assistive text for AppLauncher
|
|
5
|
-
*/
|
|
6
|
-
export interface AppLauncherAssistiveText {
|
|
7
|
-
/** Assistive text for the trigger button */
|
|
8
|
-
trigger?: string;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Props for the AppLauncher component
|
|
12
|
-
*/
|
|
13
|
-
export interface AppLauncherProps {
|
|
14
|
-
/** Assistive text for accessibility */
|
|
15
|
-
assistiveText?: AppLauncherAssistiveText;
|
|
16
|
-
/** Whether to hide the app element when modal is open */
|
|
17
|
-
ariaHideApp?: boolean;
|
|
18
|
-
/** AppLauncherExpandableSection children */
|
|
19
|
-
children: ReactNode;
|
|
20
|
-
/** HTML id */
|
|
21
|
-
id?: string;
|
|
22
|
-
/** Control open/close state */
|
|
23
|
-
isOpen?: boolean;
|
|
24
|
-
/** CSS classes for modal */
|
|
25
|
-
modalClassName?: string | string[] | Record<string, boolean>;
|
|
26
|
-
/** Button in modal header */
|
|
27
|
-
modalHeaderButton?: ReactNode;
|
|
28
|
-
/** Allow longer names without truncation */
|
|
29
|
-
noTruncate?: boolean;
|
|
30
|
-
/** Callback when modal closes */
|
|
31
|
-
onClose?: (event: MouseEvent | React.KeyboardEvent, data: Record<string, never>) => void;
|
|
32
|
-
/** Search bar component */
|
|
33
|
-
search?: ReactNode;
|
|
34
|
-
/** Title text */
|
|
35
|
-
title?: string;
|
|
36
|
-
/** @deprecated Use assistiveText.trigger instead */
|
|
37
|
-
triggerAssistiveText?: string;
|
|
38
|
-
/** Name displayed next to trigger */
|
|
39
|
-
triggerName?: ReactNode;
|
|
40
|
-
/** Callback when trigger is clicked */
|
|
41
|
-
triggerOnClick?: (event: MouseEvent, data: Record<string, never>) => void;
|
|
42
|
-
}
|
|
43
|
-
declare function AppLauncher({ assistiveText: propAssistiveText, ariaHideApp, children, id: propId, isOpen: controlledIsOpen, modalClassName, modalHeaderButton, noTruncate, onClose, search, title, triggerAssistiveText: propTriggerAssistiveText, triggerName, triggerOnClick, }: AppLauncherProps): React.ReactElement;
|
|
44
|
-
declare namespace AppLauncher {
|
|
45
|
-
export { APP_LAUNCHER as displayName };
|
|
46
|
-
}
|
|
47
|
-
export default AppLauncher;
|
|
48
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/app-launcher/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,EAKb,KAAK,SAAS,EACd,KAAK,UAAU,EACf,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACxC,4CAA4C;IAC5C,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAChC,uCAAuC;IACvC,aAAa,CAAC,EAAE,wBAAwB,CAAC;IACzC,yDAAyD;IACzD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,4CAA4C;IAC5C,QAAQ,EAAE,SAAS,CAAC;IACpB,cAAc;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,+BAA+B;IAC/B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,4BAA4B;IAC5B,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC7D,6BAA6B;IAC7B,iBAAiB,CAAC,EAAE,SAAS,CAAC;IAC9B,4CAA4C;IAC5C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,iCAAiC;IACjC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,GAAG,KAAK,CAAC,aAAa,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,KAAK,IAAI,CAAC;IACzF,2BAA2B;IAC3B,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,iBAAiB;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oDAAoD;IACpD,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,qCAAqC;IACrC,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,uCAAuC;IACvC,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,KAAK,IAAI,CAAC;CAC1E;6BAWoB,EACpB,aAAa,EAAE,iBAAiB,EAChC,WAAkB,EAClB,QAAQ,EACR,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,gBAAgB,EACxB,cAAc,EACd,iBAAiB,EACjB,UAAkB,EAClB,OAAO,EACP,MAAM,EACN,KAAsB,EACtB,oBAAoB,EAAE,wBAAwB,EAC9C,WAAW,EACX,cAAc,GACd,EAAE,gBAAgB,GAAG,KAAK,CAAC,YAAY;;aAyId,YAAY;;eAEvB,WAAW"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import React, { type ReactNode } from 'react';
|
|
2
|
-
export interface AppLauncherLinkProps {
|
|
3
|
-
/**
|
|
4
|
-
* Contents of the link
|
|
5
|
-
*/
|
|
6
|
-
children?: ReactNode;
|
|
7
|
-
/**
|
|
8
|
-
* Classes to be applied to the link
|
|
9
|
-
*/
|
|
10
|
-
className?: unknown[] | Record<string, unknown> | string;
|
|
11
|
-
/**
|
|
12
|
-
* The `href` attribute of the link. If the `onClick` callback is specified this URL will be prevented from changing the browser's location.
|
|
13
|
-
*/
|
|
14
|
-
href?: string;
|
|
15
|
-
/**
|
|
16
|
-
* Callback for when the link is clicked. Passes back event and data object with href prop. Prevents click from changing browser's location if set.
|
|
17
|
-
*/
|
|
18
|
-
onClick?: (event: React.MouseEvent, data: {
|
|
19
|
-
href?: string;
|
|
20
|
-
}) => void;
|
|
21
|
-
/**
|
|
22
|
-
* Text used to highlight content in link
|
|
23
|
-
*/
|
|
24
|
-
search?: string;
|
|
25
|
-
/**
|
|
26
|
-
* The title for the link. If not provided it will attempt to use child content if that content is a string.
|
|
27
|
-
*/
|
|
28
|
-
title?: string;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* App Launcher Link component creates simple links to be used in "All Items" sections
|
|
32
|
-
*/
|
|
33
|
-
declare class AppLauncherLink extends React.Component<AppLauncherLinkProps> {
|
|
34
|
-
static displayName: string;
|
|
35
|
-
static defaultProps: Partial<AppLauncherLinkProps>;
|
|
36
|
-
render(): React.JSX.Element;
|
|
37
|
-
}
|
|
38
|
-
export default AppLauncherLink;
|
|
39
|
-
//# sourceMappingURL=link.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../../../components/app-launcher/link.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAa9C,MAAM,WAAW,oBAAoB;IACpC;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC;IACzD;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,EAAE,IAAI,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IACrE;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,cAAM,eAAgB,SAAQ,KAAK,CAAC,SAAS,CAAC,oBAAoB,CAAC;IAGlE,MAAM,CAAC,WAAW,SAAqB;IAGvC,MAAM,CAAC,YAAY,EAAE,OAAO,CAAC,oBAAoB,CAAC,CAEhD;IAEF,MAAM,sBA2BL;CACD;eAEc,eAAe"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import React, { type ReactNode } from 'react';
|
|
2
|
-
export interface AppLauncherSectionAssistiveText {
|
|
3
|
-
/** The assistive text for the section collapse icons. */
|
|
4
|
-
collapseSection?: string;
|
|
5
|
-
}
|
|
6
|
-
export interface AppLauncherSectionProps {
|
|
7
|
-
/**
|
|
8
|
-
* **Assistive text for accessibility.**
|
|
9
|
-
* This object is merged with the default props object on every render.
|
|
10
|
-
* * `collapseSection`: The assistive text for the section collapse icons.
|
|
11
|
-
*/
|
|
12
|
-
assistiveText?: AppLauncherSectionAssistiveText;
|
|
13
|
-
/**
|
|
14
|
-
* An array of applications to display
|
|
15
|
-
*/
|
|
16
|
-
children: ReactNode;
|
|
17
|
-
/**
|
|
18
|
-
* Deprecated assistive text for the collapse icon. Use `assistiveText.collapseSection`.
|
|
19
|
-
*/
|
|
20
|
-
collapseSectionAssistiveText?: string;
|
|
21
|
-
/**
|
|
22
|
-
* Controls the open/closed state of the section
|
|
23
|
-
*/
|
|
24
|
-
isOpen?: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* Callback for when section is toggled. Passes "isOpen" bool. Forces `toggleable` to true
|
|
27
|
-
*/
|
|
28
|
-
onToggleClick?: (event: React.MouseEvent, data: Record<string, unknown>) => void;
|
|
29
|
-
/**
|
|
30
|
-
* The title for this section of apps
|
|
31
|
-
*/
|
|
32
|
-
title: string;
|
|
33
|
-
/**
|
|
34
|
-
* Allows the user to show/hide the section
|
|
35
|
-
*/
|
|
36
|
-
toggleable?: boolean;
|
|
37
|
-
}
|
|
38
|
-
interface AppLauncherSectionState {
|
|
39
|
-
isOpen: boolean;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* App Launcher Sections allow users to categorize App Tiles as well as toggle their display
|
|
43
|
-
*/
|
|
44
|
-
declare class AppLauncherSection extends React.Component<AppLauncherSectionProps, AppLauncherSectionState> {
|
|
45
|
-
static displayName: string;
|
|
46
|
-
static defaultProps: Partial<AppLauncherSectionProps>;
|
|
47
|
-
state: {
|
|
48
|
-
isOpen: boolean;
|
|
49
|
-
};
|
|
50
|
-
constructor(props: AppLauncherSectionProps);
|
|
51
|
-
toggleOpen: (event: React.MouseEvent) => void;
|
|
52
|
-
render(): React.JSX.Element;
|
|
53
|
-
}
|
|
54
|
-
export default AppLauncherSection;
|
|
55
|
-
//# sourceMappingURL=section.d.ts.map
|