@chayns-components/core 5.0.0-beta.891 → 5.0.0-beta.893
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/lib/cjs/components/accordion/accordion-head/AccordionHead.js +3 -1
- package/lib/cjs/components/accordion/accordion-head/AccordionHead.js.map +1 -1
- package/lib/cjs/components/accordion/accordion-head/AccordionHead.styles.js +4 -0
- package/lib/cjs/components/accordion/accordion-head/AccordionHead.styles.js.map +1 -1
- package/lib/cjs/components/combobox/ComboBox.js +19 -8
- package/lib/cjs/components/combobox/ComboBox.js.map +1 -1
- package/lib/cjs/components/context-menu/ContextMenu.js +19 -5
- package/lib/cjs/components/context-menu/ContextMenu.js.map +1 -1
- package/lib/cjs/components/popup/Popup.js +14 -3
- package/lib/cjs/components/popup/Popup.js.map +1 -1
- package/lib/cjs/components/search-box/SearchBox.js +14 -3
- package/lib/cjs/components/search-box/SearchBox.js.map +1 -1
- package/lib/cjs/components/select-button/SelectButton.js +3 -1
- package/lib/cjs/components/select-button/SelectButton.js.map +1 -1
- package/lib/cjs/utils/accordion.js +18 -1
- package/lib/cjs/utils/accordion.js.map +1 -1
- package/lib/esm/components/accordion/accordion-head/AccordionHead.js +4 -2
- package/lib/esm/components/accordion/accordion-head/AccordionHead.js.map +1 -1
- package/lib/esm/components/accordion/accordion-head/AccordionHead.styles.js +13 -6
- package/lib/esm/components/accordion/accordion-head/AccordionHead.styles.js.map +1 -1
- package/lib/esm/components/combobox/ComboBox.js +19 -8
- package/lib/esm/components/combobox/ComboBox.js.map +1 -1
- package/lib/esm/components/context-menu/ContextMenu.js +19 -5
- package/lib/esm/components/context-menu/ContextMenu.js.map +1 -1
- package/lib/esm/components/popup/Popup.js +14 -3
- package/lib/esm/components/popup/Popup.js.map +1 -1
- package/lib/esm/components/search-box/SearchBox.js +14 -3
- package/lib/esm/components/search-box/SearchBox.js.map +1 -1
- package/lib/esm/components/select-button/SelectButton.js +3 -1
- package/lib/esm/components/select-button/SelectButton.js.map +1 -1
- package/lib/esm/utils/accordion.js +16 -0
- package/lib/esm/utils/accordion.js.map +1 -1
- package/lib/types/components/select-button/SelectButton.d.ts +4 -0
- package/lib/types/utils/accordion.d.ts +2 -0
- package/package.json +2 -2
|
@@ -12,6 +12,7 @@ const SelectButton = _ref => {
|
|
|
12
12
|
shouldAllowMultiSelect,
|
|
13
13
|
shouldShowButtonTextWithSelection,
|
|
14
14
|
shouldShowSearch,
|
|
15
|
+
selectAllText,
|
|
15
16
|
title
|
|
16
17
|
} = _ref;
|
|
17
18
|
const itemList = useMemo(() => {
|
|
@@ -58,7 +59,8 @@ const SelectButton = _ref => {
|
|
|
58
59
|
type: DialogType.SELECT,
|
|
59
60
|
list: itemList,
|
|
60
61
|
multiselect: shouldAllowMultiSelect,
|
|
61
|
-
quickfind: shouldShowSearch
|
|
62
|
+
quickfind: shouldShowSearch,
|
|
63
|
+
selectAllCheckbox: selectAllText
|
|
62
64
|
}).open().then(result => {
|
|
63
65
|
// Ignore because there is no type
|
|
64
66
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectButton.js","names":["createDialog","DialogType","React","useMemo","Button","StyledSelectButton","SelectButton","_ref","buttonText","isDisabled","list","onSelect","selectedItemIds","shouldAllowMultiSelect","shouldShowButtonTextWithSelection","shouldShowSearch","title","itemList","items","forEach","_ref2","text","id","isSelected","includes","push","name","internalButtonText","length","addedCount","newText","additionalCount","_ref3","handleClick","undefined","type","SELECT","multiselect","quickfind","open","then","result","buttonType","map","Number","createElement","onClick","isSecondary","shouldShowTextAsRobotoMedium","displayName"],"sources":["../../../../src/components/select-button/SelectButton.tsx"],"sourcesContent":["import { createDialog, DialogType, type DialogSelectListItemType } from 'chayns-api';\nimport React, { useMemo, type FC } from 'react';\nimport type { SelectButtonItem } from '../../types/selectButton';\nimport Button from '../button/Button';\nimport { StyledSelectButton } from './SelectButton.styles';\n\nexport type SelectButtonProps = {\n /**\n * The text that should be displayed inside the button.\n */\n buttonText: string;\n /**\n * Whether the button should be disabled.\n */\n isDisabled?: boolean;\n /**\n * A list of item that could be selected.\n */\n list: SelectButtonItem[];\n /**\n * Function to be executed after an item is selected.\n */\n onSelect?: (ids: number[]) => void;\n /**\n * The id of an item that should be preselected.\n */\n selectedItemIds?: number[];\n /**\n * Whether more than one item should be selectable.\n */\n shouldAllowMultiSelect?: boolean;\n /**\n * Whether the button text should be displayed also if items are selected.\n */\n shouldShowButtonTextWithSelection?: boolean;\n /**\n * Whether the search should be displayed inside the dialog.\n */\n shouldShowSearch?: boolean;\n /**\n * The title of the dialog.\n */\n title?: string;\n};\n\nconst SelectButton: FC<SelectButtonProps> = ({\n buttonText,\n isDisabled,\n list,\n onSelect,\n selectedItemIds,\n shouldAllowMultiSelect,\n shouldShowButtonTextWithSelection,\n shouldShowSearch,\n title,\n}) => {\n const itemList = useMemo(() => {\n const items: DialogSelectListItemType[] = [];\n\n list.forEach(({ text, id }) => {\n const isSelected = selectedItemIds ? selectedItemIds.includes(id) : false;\n\n items.push({\n name: text,\n id,\n isSelected,\n });\n });\n\n return items;\n }, [list, selectedItemIds]);\n\n const internalButtonText = useMemo(() => {\n if (shouldShowButtonTextWithSelection || !selectedItemIds || selectedItemIds.length === 0) {\n return buttonText;\n }\n\n let addedCount = 0;\n let newText = '';\n\n const additionalCount = selectedItemIds.length - 2;\n\n list.forEach(({ text, id }) => {\n if ((addedCount < 2 || additionalCount <= 1) && selectedItemIds?.includes(id)) {\n addedCount += 1;\n newText += newText.length === 0 ? `${text}` : `, ${text}`;\n }\n });\n\n if (additionalCount > 1) {\n newText += `, ${additionalCount} weitere`;\n }\n\n return newText;\n }, [buttonText, list, selectedItemIds, shouldShowButtonTextWithSelection]);\n\n const handleClick = () => {\n void createDialog({\n text: title ? `[h1]${title}[/h1]` : undefined,\n type: DialogType.SELECT,\n list: itemList,\n multiselect: shouldAllowMultiSelect,\n quickfind: shouldShowSearch,\n })\n .open()\n .then((result) => {\n // Ignore because there is no type\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n if (result && result.buttonType === 1 && typeof onSelect === 'function') {\n // Ignore because there is no type\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n onSelect((result.result as string[]).map(Number));\n }\n });\n };\n\n return (\n <StyledSelectButton>\n <Button\n onClick={handleClick}\n isDisabled={isDisabled}\n isSecondary\n shouldShowTextAsRobotoMedium={false}\n >\n {internalButtonText}\n </Button>\n </StyledSelectButton>\n );\n};\n\nSelectButton.displayName = 'SelectButton';\n\nexport default SelectButton;\n"],"mappings":"AAAA,SAASA,YAAY,EAAEC,UAAU,QAAuC,YAAY;AACpF,OAAOC,KAAK,IAAIC,OAAO,QAAiB,OAAO;AAE/C,OAAOC,MAAM,MAAM,kBAAkB;AACrC,SAASC,kBAAkB,QAAQ,uBAAuB;
|
|
1
|
+
{"version":3,"file":"SelectButton.js","names":["createDialog","DialogType","React","useMemo","Button","StyledSelectButton","SelectButton","_ref","buttonText","isDisabled","list","onSelect","selectedItemIds","shouldAllowMultiSelect","shouldShowButtonTextWithSelection","shouldShowSearch","selectAllText","title","itemList","items","forEach","_ref2","text","id","isSelected","includes","push","name","internalButtonText","length","addedCount","newText","additionalCount","_ref3","handleClick","undefined","type","SELECT","multiselect","quickfind","selectAllCheckbox","open","then","result","buttonType","map","Number","createElement","onClick","isSecondary","shouldShowTextAsRobotoMedium","displayName"],"sources":["../../../../src/components/select-button/SelectButton.tsx"],"sourcesContent":["import { createDialog, DialogType, type DialogSelectListItemType } from 'chayns-api';\nimport React, { useMemo, type FC } from 'react';\nimport type { SelectButtonItem } from '../../types/selectButton';\nimport Button from '../button/Button';\nimport { StyledSelectButton } from './SelectButton.styles';\n\nexport type SelectButtonProps = {\n /**\n * The text that should be displayed inside the button.\n */\n buttonText: string;\n /**\n * Whether the button should be disabled.\n */\n isDisabled?: boolean;\n /**\n * A list of item that could be selected.\n */\n list: SelectButtonItem[];\n /**\n * Function to be executed after an item is selected.\n */\n onSelect?: (ids: number[]) => void;\n /**\n * If a string is given and `shouldAllowMultiSelect` is true, the dialog displays a checkbox to select all items at once.\n */\n selectAllText?: string;\n /**\n * The id of an item that should be preselected.\n */\n selectedItemIds?: number[];\n /**\n * Whether more than one item should be selectable.\n */\n shouldAllowMultiSelect?: boolean;\n /**\n * Whether the button text should be displayed also if items are selected.\n */\n shouldShowButtonTextWithSelection?: boolean;\n /**\n * Whether the search should be displayed inside the dialog.\n */\n shouldShowSearch?: boolean;\n /**\n * The title of the dialog.\n */\n title?: string;\n};\n\nconst SelectButton: FC<SelectButtonProps> = ({\n buttonText,\n isDisabled,\n list,\n onSelect,\n selectedItemIds,\n shouldAllowMultiSelect,\n shouldShowButtonTextWithSelection,\n shouldShowSearch,\n selectAllText,\n title,\n}) => {\n const itemList = useMemo(() => {\n const items: DialogSelectListItemType[] = [];\n\n list.forEach(({ text, id }) => {\n const isSelected = selectedItemIds ? selectedItemIds.includes(id) : false;\n\n items.push({\n name: text,\n id,\n isSelected,\n });\n });\n\n return items;\n }, [list, selectedItemIds]);\n\n const internalButtonText = useMemo(() => {\n if (shouldShowButtonTextWithSelection || !selectedItemIds || selectedItemIds.length === 0) {\n return buttonText;\n }\n\n let addedCount = 0;\n let newText = '';\n\n const additionalCount = selectedItemIds.length - 2;\n\n list.forEach(({ text, id }) => {\n if ((addedCount < 2 || additionalCount <= 1) && selectedItemIds?.includes(id)) {\n addedCount += 1;\n newText += newText.length === 0 ? `${text}` : `, ${text}`;\n }\n });\n\n if (additionalCount > 1) {\n newText += `, ${additionalCount} weitere`;\n }\n\n return newText;\n }, [buttonText, list, selectedItemIds, shouldShowButtonTextWithSelection]);\n\n const handleClick = () => {\n void createDialog({\n text: title ? `[h1]${title}[/h1]` : undefined,\n type: DialogType.SELECT,\n list: itemList,\n multiselect: shouldAllowMultiSelect,\n quickfind: shouldShowSearch,\n selectAllCheckbox: selectAllText,\n })\n .open()\n .then((result) => {\n // Ignore because there is no type\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n if (result && result.buttonType === 1 && typeof onSelect === 'function') {\n // Ignore because there is no type\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n onSelect((result.result as string[]).map(Number));\n }\n });\n };\n\n return (\n <StyledSelectButton>\n <Button\n onClick={handleClick}\n isDisabled={isDisabled}\n isSecondary\n shouldShowTextAsRobotoMedium={false}\n >\n {internalButtonText}\n </Button>\n </StyledSelectButton>\n );\n};\n\nSelectButton.displayName = 'SelectButton';\n\nexport default SelectButton;\n"],"mappings":"AAAA,SAASA,YAAY,EAAEC,UAAU,QAAuC,YAAY;AACpF,OAAOC,KAAK,IAAIC,OAAO,QAAiB,OAAO;AAE/C,OAAOC,MAAM,MAAM,kBAAkB;AACrC,SAASC,kBAAkB,QAAQ,uBAAuB;AA6C1D,MAAMC,YAAmC,GAAGC,IAAA,IAWtC;EAAA,IAXuC;IACzCC,UAAU;IACVC,UAAU;IACVC,IAAI;IACJC,QAAQ;IACRC,eAAe;IACfC,sBAAsB;IACtBC,iCAAiC;IACjCC,gBAAgB;IAChBC,aAAa;IACbC;EACJ,CAAC,GAAAV,IAAA;EACG,MAAMW,QAAQ,GAAGf,OAAO,CAAC,MAAM;IAC3B,MAAMgB,KAAiC,GAAG,EAAE;IAE5CT,IAAI,CAACU,OAAO,CAACC,KAAA,IAAkB;MAAA,IAAjB;QAAEC,IAAI;QAAEC;MAAG,CAAC,GAAAF,KAAA;MACtB,MAAMG,UAAU,GAAGZ,eAAe,GAAGA,eAAe,CAACa,QAAQ,CAACF,EAAE,CAAC,GAAG,KAAK;MAEzEJ,KAAK,CAACO,IAAI,CAAC;QACPC,IAAI,EAAEL,IAAI;QACVC,EAAE;QACFC;MACJ,CAAC,CAAC;IACN,CAAC,CAAC;IAEF,OAAOL,KAAK;EAChB,CAAC,EAAE,CAACT,IAAI,EAAEE,eAAe,CAAC,CAAC;EAE3B,MAAM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AIA,MAAM,CAACC,UAAU,KAAK,CAAC,IAAI,OAAOjC,QAAQ,KAAK,UAAU,EAAE;QACrE;QACA;QACA;QACAA,QAAQ,CAAEgC,MAAM,CAACA,MAAM,CAAcE,GAAG,CAACC,MAAM,CAAC,CAAC;MACrD;IACJ,CAAC,CAAC;EACV,CAAC;EAED,oBACI5C,KAAA,CAAA6C,aAAA,CAAC1C,kBAAkB,qBACfH,KAAA,CAAA6C,aAAA,CAAC3C,MAAM;IACH4C,OAAO,EAAEd,WAAY;IACrBzB,UAAU,EAAEA,UAAW;IACvBwC,WAAW;IACXC,4BAA4B,EAAE;EAAM,GAEnCtB,kBACG,CACQ,CAAC;AAE7B,CAAC;AAEDtB,YAAY,CAAC6C,WAAW,GAAG,cAAc;AAEzC,eAAe7C,YAAY","ignoreList":[]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Children, isValidElement } from 'react';
|
|
1
2
|
export const getAccordionHeadHeight = _ref => {
|
|
2
3
|
let {
|
|
3
4
|
isWrapped,
|
|
@@ -28,4 +29,19 @@ export const getAccordionHeadHeight = _ref => {
|
|
|
28
29
|
open: openHeight
|
|
29
30
|
};
|
|
30
31
|
};
|
|
32
|
+
export const getElementClickEvent = element => {
|
|
33
|
+
let hasClickHandler = false;
|
|
34
|
+
const checkForClickHandler = el => {
|
|
35
|
+
if (! /*#__PURE__*/isValidElement(el)) return;
|
|
36
|
+
if (el.props.onClick) {
|
|
37
|
+
hasClickHandler = true;
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
if (el.props.children) {
|
|
41
|
+
Children.forEach(el.props.children, checkForClickHandler);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
checkForClickHandler(element);
|
|
45
|
+
return hasClickHandler;
|
|
46
|
+
};
|
|
31
47
|
//# sourceMappingURL=accordion.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accordion.js","names":["getAccordionHeadHeight","_ref","isWrapped","title","width","hasSearch","element","document","createElement","style","fontSize","opacity","pointerEvents","whiteSpace","innerText","body","appendChild","closedHeight","Math","max","clientHeight","fontWeight","openHeight","removeChild","closed","open"],"sources":["../../../src/utils/accordion.ts"],"sourcesContent":["import type { AccordionHeadProps } from '../components/accordion/accordion-head/AccordionHead';\n\ntype GetAccordionHeadHeightOptions = Pick<AccordionHeadProps, 'isWrapped' | 'title'> & {\n width: number;\n hasSearch: boolean;\n};\n\ninterface GetAccordionHeadHeightResult {\n closed: number;\n open: number;\n}\n\nexport const getAccordionHeadHeight = ({\n isWrapped,\n title,\n width,\n hasSearch,\n}: GetAccordionHeadHeightOptions): GetAccordionHeadHeightResult => {\n const element = document.createElement('div');\n\n element.style.fontSize = '1rem';\n element.style.opacity = '0';\n element.style.pointerEvents = 'none';\n element.style.whiteSpace = 'nowrap';\n element.style.width = `${width}px`;\n\n element.innerText = title;\n\n document.body.appendChild(element);\n\n const closedHeight = Math.max(element.clientHeight + 8, isWrapped ? 40 : 33);\n\n if (isWrapped) {\n element.style.fontWeight = 'bold';\n element.style.whiteSpace = 'nowrap';\n } else {\n element.style.fontSize = '1.3rem';\n element.style.whiteSpace = hasSearch ? 'nowrap' : 'normal';\n }\n\n const openHeight = Math.max(element.clientHeight + 8, isWrapped ? 40 : 33);\n\n document.body.removeChild(element);\n\n return { closed: closedHeight, open: openHeight };\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"accordion.js","names":["Children","isValidElement","getAccordionHeadHeight","_ref","isWrapped","title","width","hasSearch","element","document","createElement","style","fontSize","opacity","pointerEvents","whiteSpace","innerText","body","appendChild","closedHeight","Math","max","clientHeight","fontWeight","openHeight","removeChild","closed","open","getElementClickEvent","hasClickHandler","checkForClickHandler","el","props","onClick","children","forEach"],"sources":["../../../src/utils/accordion.ts"],"sourcesContent":["import type { AccordionHeadProps } from '../components/accordion/accordion-head/AccordionHead';\nimport { Children, isValidElement, ReactNode } from 'react';\n\ntype GetAccordionHeadHeightOptions = Pick<AccordionHeadProps, 'isWrapped' | 'title'> & {\n width: number;\n hasSearch: boolean;\n};\n\ninterface GetAccordionHeadHeightResult {\n closed: number;\n open: number;\n}\n\nexport const getAccordionHeadHeight = ({\n isWrapped,\n title,\n width,\n hasSearch,\n}: GetAccordionHeadHeightOptions): GetAccordionHeadHeightResult => {\n const element = document.createElement('div');\n\n element.style.fontSize = '1rem';\n element.style.opacity = '0';\n element.style.pointerEvents = 'none';\n element.style.whiteSpace = 'nowrap';\n element.style.width = `${width}px`;\n\n element.innerText = title;\n\n document.body.appendChild(element);\n\n const closedHeight = Math.max(element.clientHeight + 8, isWrapped ? 40 : 33);\n\n if (isWrapped) {\n element.style.fontWeight = 'bold';\n element.style.whiteSpace = 'nowrap';\n } else {\n element.style.fontSize = '1.3rem';\n element.style.whiteSpace = hasSearch ? 'nowrap' : 'normal';\n }\n\n const openHeight = Math.max(element.clientHeight + 8, isWrapped ? 40 : 33);\n\n document.body.removeChild(element);\n\n return { closed: closedHeight, open: openHeight };\n};\n\nexport const getElementClickEvent = (element: ReactNode) => {\n let hasClickHandler = false;\n\n const checkForClickHandler = (el: ReactNode) => {\n if (!isValidElement(el)) return;\n\n if (el.props.onClick) {\n hasClickHandler = true;\n\n return;\n }\n\n if (el.props.children) {\n Children.forEach(el.props.children, checkForClickHandler);\n }\n };\n\n checkForClickHandler(element);\n\n return hasClickHandler;\n};\n"],"mappings":"AACA,SAASA,QAAQ,EAAEC,cAAc,QAAmB,OAAO;AAY3D,OAAO,MAAMC,sBAAsB,GAAGC,IAAA,IAK6B;EAAA,IAL5B;IACnCC,SAAS;IACTC,KAAK;IACLC,KAAK;IACLC;EAC2B,CAAC,GAAAJ,IAAA;EAC5B,MAAMK,OAAO,GAAGC,QAAQ,CAACC,aAAa,CAAC,KAAK,CAAC;EAE7CF,OAAO,CAACG,KAAK,CAACC,QAAQ,GAAG,MAAM;EAC/BJ,OAAO,CAACG,KAAK,CAACE,OAAO,GAAG,GAAG;EAC3BL,OAAO,CAACG,KAAK,CAACG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,QAAQ,CAACmC,OAAO,CAACJ,EAAE,CAACC,KAAK,CAACE,QAAQ,EAAEJ,oBAAoB,CAAC;IAC7D;EACJ,CAAC;EAEDA,oBAAoB,CAACtB,OAAO,CAAC;EAE7B,OAAOqB,eAAe;AAC1B,CAAC","ignoreList":[]}
|
|
@@ -17,6 +17,10 @@ export type SelectButtonProps = {
|
|
|
17
17
|
* Function to be executed after an item is selected.
|
|
18
18
|
*/
|
|
19
19
|
onSelect?: (ids: number[]) => void;
|
|
20
|
+
/**
|
|
21
|
+
* If a string is given and `shouldAllowMultiSelect` is true, the dialog displays a checkbox to select all items at once.
|
|
22
|
+
*/
|
|
23
|
+
selectAllText?: string;
|
|
20
24
|
/**
|
|
21
25
|
* The id of an item that should be preselected.
|
|
22
26
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AccordionHeadProps } from '../components/accordion/accordion-head/AccordionHead';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
2
3
|
type GetAccordionHeadHeightOptions = Pick<AccordionHeadProps, 'isWrapped' | 'title'> & {
|
|
3
4
|
width: number;
|
|
4
5
|
hasSearch: boolean;
|
|
@@ -8,4 +9,5 @@ interface GetAccordionHeadHeightResult {
|
|
|
8
9
|
open: number;
|
|
9
10
|
}
|
|
10
11
|
export declare const getAccordionHeadHeight: ({ isWrapped, title, width, hasSearch, }: GetAccordionHeadHeightOptions) => GetAccordionHeadHeightResult;
|
|
12
|
+
export declare const getElementClickEvent: (element: ReactNode) => boolean;
|
|
11
13
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chayns-components/core",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.893",
|
|
4
4
|
"description": "A set of beautiful React components for developing your own applications with chayns.",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"browserslist": [
|
|
@@ -87,5 +87,5 @@
|
|
|
87
87
|
"publishConfig": {
|
|
88
88
|
"access": "public"
|
|
89
89
|
},
|
|
90
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "ea9e5c9ac4a59b2dc175dedc9561a91192595ca0"
|
|
91
91
|
}
|