@elliemae/ds-global-header 3.0.0-next.4 → 3.0.0-next.8
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.
|
@@ -69,7 +69,6 @@ const ToolbarItems = () => {
|
|
|
69
69
|
props: { toolbar },
|
|
70
70
|
instanceUID
|
|
71
71
|
} = (0, import_react.useContext)(import_GlobalHeaderContext.GlobalHeaderContext);
|
|
72
|
-
console.log(`toolbar`, toolbar);
|
|
73
72
|
const itemsList = (0, import_react.useMemo)(() => toolbar?.map((item) => {
|
|
74
73
|
const _a = item, { Icon, type, onClick, componentProps, label, onKeyPress, id, CustomComponent } = _a, otherProps = __objRest(_a, ["Icon", "type", "onClick", "componentProps", "label", "onKeyPress", "id", "CustomComponent"]);
|
|
75
74
|
switch (type) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/components/Toolbar/ToolbarItems.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable no-case-declarations */\nimport React, { useContext, useMemo } from 'react';\nimport { AppPicker, PopupMenu, SearchToggle } from '../../outOfTheBox';\nimport { Button } from './styles';\nimport { GlobalHeaderContext } from '../../GlobalHeaderContext';\nimport { getDataProps } from '@elliemae/ds-props-helpers';\n\nexport const ToolbarItems = (): JSX.Element => {\n const {\n props: { toolbar },\n instanceUID,\n } = useContext(GlobalHeaderContext);\n\n
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAA2C;AAC3C,yBAAmD;AACnD,oBAAuB;AACvB,iCAAoC;AACpC,8BAA6B;AAEtB,MAAM,eAAe,MAAmB;AAC7C,QAAM;AAAA,IACJ,OAAO,EAAE;AAAA,IACT;AAAA,MACE,6BAAW;AAEf,
|
|
4
|
+
"sourcesContent": ["/* eslint-disable no-case-declarations */\nimport React, { useContext, useMemo } from 'react';\nimport { AppPicker, PopupMenu, SearchToggle } from '../../outOfTheBox';\nimport { Button } from './styles';\nimport { GlobalHeaderContext } from '../../GlobalHeaderContext';\nimport { getDataProps } from '@elliemae/ds-props-helpers';\n\nexport const ToolbarItems = (): JSX.Element => {\n const {\n props: { toolbar },\n instanceUID,\n } = useContext(GlobalHeaderContext);\n\n const itemsList = useMemo(\n () =>\n toolbar?.map((item) => {\n const { Icon, type, onClick, componentProps, label, onKeyPress, id, CustomComponent, ...otherProps } = item;\n\n switch (type) {\n case 'ds-popup-menu':\n return (\n <PopupMenu\n title={label}\n Icon={Icon}\n onClick={onClick}\n onKeyPress={onKeyPress}\n id={id}\n key={`${instanceUID}-ds-popup-menu-${label}`}\n {...otherProps}\n componentProps={componentProps}\n />\n );\n case 'ds-app-picker':\n return (\n <AppPicker\n label={label}\n key={`${instanceUID}-ds-app-picker-${label}`}\n id={id}\n componentProps={componentProps}\n {...otherProps}\n />\n );\n case 'ds-search-toggle':\n return (\n <SearchToggle\n key={`${instanceUID}-ds-search-toggle-${id}`}\n id={id}\n componentProps={componentProps}\n {...otherProps}\n />\n );\n case 'custom':\n if (CustomComponent) return <CustomComponent item={item} />;\n return null;\n default:\n return (\n <Button\n onClick={onClick}\n key={`${instanceUID}-ds-toolbar-button-${label}`}\n title={label}\n data-testid=\"gh-toolbar-item\"\n id={id}\n {...getDataProps(otherProps)}\n >\n <Icon fill=\"#FFF\" size=\"m\" />\n </Button>\n );\n }\n }),\n [toolbar, instanceUID],\n );\n\n return <>{itemsList}</>;\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAA2C;AAC3C,yBAAmD;AACnD,oBAAuB;AACvB,iCAAoC;AACpC,8BAA6B;AAEtB,MAAM,eAAe,MAAmB;AAC7C,QAAM;AAAA,IACJ,OAAO,EAAE;AAAA,IACT;AAAA,MACE,6BAAW;AAEf,QAAM,YAAY,0BAChB,MACE,SAAS,IAAI,CAAC,SAAS;AACrB,UAAuG,WAA/F,QAAM,MAAM,SAAS,gBAAgB,OAAO,YAAY,IAAI,oBAAmC,IAAf,uBAAe,IAAf,CAAhF,QAAM,QAAM,WAAS,kBAAgB,SAAO,cAAY,MAAI;AAEpE,YAAQ;AAAA,WACD;AACH,eACE,mDAAC,8BAAD;AAAA,UACE,OAAO;AAAA,UACP;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA,KAAK,GAAG,6BAA6B;AAAA,WACjC,aAPN;AAAA,UAQE;AAAA;AAAA,WAGD;AACH,eACE,mDAAC,8BAAD;AAAA,UACE;AAAA,UACA,KAAK,GAAG,6BAA6B;AAAA,UACrC;AAAA,UACA;AAAA,WACI;AAAA,WAGL;AACH,eACE,mDAAC,iCAAD;AAAA,UACE,KAAK,GAAG,gCAAgC;AAAA,UACxC;AAAA,UACA;AAAA,WACI;AAAA,WAGL;AACH,YAAI;AAAiB,iBAAO,mDAAC,iBAAD;AAAA,YAAiB;AAAA;AAC7C,eAAO;AAAA;AAEP,eACE,mDAAC,sBAAD;AAAA,UACE;AAAA,UACA,KAAK,GAAG,iCAAiC;AAAA,UACzC,OAAO;AAAA,UACP,eAAY;AAAA,UACZ;AAAA,WACI,0CAAa,cAEjB,mDAAC,MAAD;AAAA,UAAM,MAAK;AAAA,UAAO,MAAK;AAAA;AAAA;AAAA,MAKnC,CAAC,SAAS;AAGZ,SAAO,wFAAG;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -40,7 +40,6 @@ const ToolbarItems = () => {
|
|
|
40
40
|
props: { toolbar },
|
|
41
41
|
instanceUID
|
|
42
42
|
} = useContext(GlobalHeaderContext);
|
|
43
|
-
console.log(`toolbar`, toolbar);
|
|
44
43
|
const itemsList = useMemo(() => toolbar?.map((item) => {
|
|
45
44
|
const _a = item, { Icon, type, onClick, componentProps, label, onKeyPress, id, CustomComponent } = _a, otherProps = __objRest(_a, ["Icon", "type", "onClick", "componentProps", "label", "onKeyPress", "id", "CustomComponent"]);
|
|
46
45
|
switch (type) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/Toolbar/ToolbarItems.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable no-case-declarations */\nimport React, { useContext, useMemo } from 'react';\nimport { AppPicker, PopupMenu, SearchToggle } from '../../outOfTheBox';\nimport { Button } from './styles';\nimport { GlobalHeaderContext } from '../../GlobalHeaderContext';\nimport { getDataProps } from '@elliemae/ds-props-helpers';\n\nexport const ToolbarItems = (): JSX.Element => {\n const {\n props: { toolbar },\n instanceUID,\n } = useContext(GlobalHeaderContext);\n\n
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;ACCA;AACA;AACA;AACA;AACA;AAEO,MAAM,eAAe,MAAmB;AAC7C,QAAM;AAAA,IACJ,OAAO,EAAE;AAAA,IACT;AAAA,MACE,WAAW;AAEf,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable no-case-declarations */\nimport React, { useContext, useMemo } from 'react';\nimport { AppPicker, PopupMenu, SearchToggle } from '../../outOfTheBox';\nimport { Button } from './styles';\nimport { GlobalHeaderContext } from '../../GlobalHeaderContext';\nimport { getDataProps } from '@elliemae/ds-props-helpers';\n\nexport const ToolbarItems = (): JSX.Element => {\n const {\n props: { toolbar },\n instanceUID,\n } = useContext(GlobalHeaderContext);\n\n const itemsList = useMemo(\n () =>\n toolbar?.map((item) => {\n const { Icon, type, onClick, componentProps, label, onKeyPress, id, CustomComponent, ...otherProps } = item;\n\n switch (type) {\n case 'ds-popup-menu':\n return (\n <PopupMenu\n title={label}\n Icon={Icon}\n onClick={onClick}\n onKeyPress={onKeyPress}\n id={id}\n key={`${instanceUID}-ds-popup-menu-${label}`}\n {...otherProps}\n componentProps={componentProps}\n />\n );\n case 'ds-app-picker':\n return (\n <AppPicker\n label={label}\n key={`${instanceUID}-ds-app-picker-${label}`}\n id={id}\n componentProps={componentProps}\n {...otherProps}\n />\n );\n case 'ds-search-toggle':\n return (\n <SearchToggle\n key={`${instanceUID}-ds-search-toggle-${id}`}\n id={id}\n componentProps={componentProps}\n {...otherProps}\n />\n );\n case 'custom':\n if (CustomComponent) return <CustomComponent item={item} />;\n return null;\n default:\n return (\n <Button\n onClick={onClick}\n key={`${instanceUID}-ds-toolbar-button-${label}`}\n title={label}\n data-testid=\"gh-toolbar-item\"\n id={id}\n {...getDataProps(otherProps)}\n >\n <Icon fill=\"#FFF\" size=\"m\" />\n </Button>\n );\n }\n }),\n [toolbar, instanceUID],\n );\n\n return <>{itemsList}</>;\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;ACCA;AACA;AACA;AACA;AACA;AAEO,MAAM,eAAe,MAAmB;AAC7C,QAAM;AAAA,IACJ,OAAO,EAAE;AAAA,IACT;AAAA,MACE,WAAW;AAEf,QAAM,YAAY,QAChB,MACE,SAAS,IAAI,CAAC,SAAS;AACrB,UAAuG,WAA/F,QAAM,MAAM,SAAS,gBAAgB,OAAO,YAAY,IAAI,oBAAmC,IAAf,uBAAe,IAAf,CAAhF,QAAM,QAAM,WAAS,kBAAgB,SAAO,cAAY,MAAI;AAEpE,YAAQ;AAAA,WACD;AACH,eACE,qCAAC,WAAD;AAAA,UACE,OAAO;AAAA,UACP;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA,KAAK,GAAG,6BAA6B;AAAA,WACjC,aAPN;AAAA,UAQE;AAAA;AAAA,WAGD;AACH,eACE,qCAAC,WAAD;AAAA,UACE;AAAA,UACA,KAAK,GAAG,6BAA6B;AAAA,UACrC;AAAA,UACA;AAAA,WACI;AAAA,WAGL;AACH,eACE,qCAAC,cAAD;AAAA,UACE,KAAK,GAAG,gCAAgC;AAAA,UACxC;AAAA,UACA;AAAA,WACI;AAAA,WAGL;AACH,YAAI;AAAiB,iBAAO,qCAAC,iBAAD;AAAA,YAAiB;AAAA;AAC7C,eAAO;AAAA;AAEP,eACE,qCAAC,QAAD;AAAA,UACE;AAAA,UACA,KAAK,GAAG,iCAAiC;AAAA,UACzC,OAAO;AAAA,UACP,eAAY;AAAA,UACZ;AAAA,WACI,aAAa,cAEjB,qCAAC,MAAD;AAAA,UAAM,MAAK;AAAA,UAAO,MAAK;AAAA;AAAA;AAAA,MAKnC,CAAC,SAAS;AAGZ,SAAO,4DAAG;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-global-header",
|
|
3
|
-
"version": "3.0.0-next.
|
|
3
|
+
"version": "3.0.0-next.8",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Global Header",
|
|
6
6
|
"files": [
|
|
@@ -135,14 +135,14 @@
|
|
|
135
135
|
"indent": 4
|
|
136
136
|
},
|
|
137
137
|
"dependencies": {
|
|
138
|
-
"@elliemae/ds-app-picker": "3.0.0-next.
|
|
139
|
-
"@elliemae/ds-form": "3.0.0-next.
|
|
140
|
-
"@elliemae/ds-grid": "3.0.0-next.
|
|
141
|
-
"@elliemae/ds-icon": "3.0.0-next.
|
|
142
|
-
"@elliemae/ds-icons": "3.0.0-next.
|
|
143
|
-
"@elliemae/ds-popperjs": "3.0.0-next.
|
|
144
|
-
"@elliemae/ds-props-helpers": "3.0.0-next.
|
|
145
|
-
"@elliemae/ds-utilities": "3.0.0-next.
|
|
138
|
+
"@elliemae/ds-app-picker": "3.0.0-next.8",
|
|
139
|
+
"@elliemae/ds-form": "3.0.0-next.8",
|
|
140
|
+
"@elliemae/ds-grid": "3.0.0-next.8",
|
|
141
|
+
"@elliemae/ds-icon": "3.0.0-next.8",
|
|
142
|
+
"@elliemae/ds-icons": "3.0.0-next.8",
|
|
143
|
+
"@elliemae/ds-popperjs": "3.0.0-next.8",
|
|
144
|
+
"@elliemae/ds-props-helpers": "3.0.0-next.8",
|
|
145
|
+
"@elliemae/ds-utilities": "3.0.0-next.8",
|
|
146
146
|
"react-desc": "~4.1.3",
|
|
147
147
|
"uid": "~2.0.0"
|
|
148
148
|
},
|