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MAAMlB,EAAS,IAAIpH,OAAOwI,gBAAgBN,EAAIO,QAG9C,OAFArB,EAAOsB,IAAIV,EAAWC,GACtBC,EAAIO,OAASE,mBAAmBvB,EAAOwB,YAChCV,EAAIU,aA5ObrF,GAAGF,EAAAA,EAAAA,IAAA,CADRC,EAAAA,IACKC,GAgPN,8ECpRA,MAeA,EAfyCrC,IACrC,MAAM,QAAEyC,EAAO,aAAEgD,EAAY,WAAEO,EAAU,YAAEH,GAAgB7F,EAC3D,OAAKA,EAAMyC,SAAYzC,EAAMgG,YAAehG,EAAM6F,YAK9C/F,EAAAA,cAAC6H,EAAAA,OAAMC,OAAAC,OAAA,GAAKpC,GACR3F,EAAAA,cAACgI,EAAAA,KAAIF,OAAAC,OAAA,GAAK7H,EAAM0F,eAAgBjD,GAChC3C,EAAAA,cAACgI,EAAAA,KAAIF,OAAAC,OAAA,GAAK7H,EAAM2F,aAAcK,GAC9BlG,EAAAA,cAACgI,EAAAA,KAAIF,OAAAC,OAAA,GAAK7H,EAAM4F,kBAAmBC,KAPvC7F,EAAMkD,QAAQ6E,UAAUC,MAAM,4CACvB,cCdfC,EAAOC,QAAUpI,cCAjBmI,EAAOC,QAAUC","sources":["webpack://bju-press/./lib/tab/module-registration.js?a17c","webpack://bju-press/./src/data-actions/tab-state-data-action.ts?09b4","webpack://bju-press/./src/modules/tab-item/tab-item.tsx?b1b8","webpack://bju-press/./src/modules/tab/tab.tsx?9ac6","webpack://bju-press/./src/modules/tab/tab.view.tsx?a99d","webpack://bju-press/external var \"React\"?0d3b","webpack://bju-press/external var \"ReactDOM\"?853b"],"sourcesContent":["const binding = { modules: {}, dataActions: {} };\n\n const registerActionId = (actionPath) => {\n if (binding.dataActions[actionPath] &&\n binding.dataActions[actionPath].default &&\n binding.dataActions[actionPath].default.prototype &&\n binding.dataActions[actionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[actionPath].default.prototype.id] = binding.dataActions[actionPath];\n } else {\n Object.keys(binding.dataActions[actionPath] || {}).forEach(exportName => {\n if (binding.dataActions[actionPath][exportName] &&\n binding.dataActions[actionPath][exportName].prototype &&\n binding.dataActions[actionPath][exportName].prototype.Action) {\n binding.dataActions[binding.dataActions[actionPath][exportName].prototype.id] = binding.dataActions[actionPath][exportName];\n }\n })\n }\n };\n\n const registerSanitizedActionPath = (sanitizedActionPath, dataAction) => {\n if (process.env.NODE_ENV === 'development') {\n if (!dataAction.default) {\n throw new Error('Data action path does not have a default export');\n }\n if (!(dataAction.default.prototype.id && binding.dataActions[dataAction.default.prototype.id]) || !binding.dataActions[sanitizedActionPath]) {\n binding.dataActions[sanitizedActionPath] = dataAction;\n }\n } else {\n binding.dataActions[sanitizedActionPath] = dataAction;\n if (!binding.dataActions[sanitizedActionPath].default) {\n throw new Error('Data action path ' + sanitizedActionPath + ' does not have a default export');\n }\n binding.dataActions[sanitizedActionPath].default.prototype.RegistrationId = sanitizedActionPath;\n if (binding.dataActions[sanitizedActionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[sanitizedActionPath].default.prototype.id] = sanitizedActionPath;\n }\n }\n };\n \n\n (binding.modules['tab'] = {\n c: () => require('@msdyn365-commerce-modules/tab/dist/lib/modules/tab/tab'),\n $type: 'moduleDefinition',\n da: [{name:'activeTabState', path:'@msdyn365-commerce-modules/tab/dist/lib/data-actions/tab-state-data-action', runOn: 0}],\n \n iNM: true,\n ns: '@msdyn365-commerce-modules',\n n: 'tab',\n p: 'tab',\n \n pdp: '',\n \n \n md: 'node_modules/@msdyn365-commerce-modules/tab/dist/lib/modules/tab'\n });\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/tab/dist/lib/data-actions/tab-state-data-action';\n let dataAction = require('@msdyn365-commerce-modules/tab/dist/lib/data-actions/tab-state-data-action');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n \n window.__bindings__ = window.__bindings__ || {};\n window.__bindings__.modules = {\n ...window.__bindings__.modules || {},\n ...binding.modules\n };\n \n window.__bindings__.dataActions = {\n ...window.__bindings__.dataActions || {},\n ...binding.dataActions\n };\n export const viewDictionary = {};\n viewDictionary['@msdyn365-commerce-modules|tab|modules|tab|tab'] = {\n c: () => require('@msdyn365-commerce-modules/tab/dist/lib/modules/tab/tab.view.js'),\n cn: '@msdyn365-commerce-modules-tab-tab'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { createObservableDataAction, IAction, IActionInput } from '@msdyn365-commerce/core';\nimport { GenericInput, getGenericAction } from '@msdyn365-commerce-modules/retail-actions';\n\nimport { IActiveTabState } from './tab-state';\n\nexport function createTabStateInput(result: IActiveTabState): GenericInput {\n return new GenericInput('activeTabState', result, 'IActiveTabState');\n}\n\nconst createTabStateInputInternal = (): IActionInput => {\n return createTabStateInput({});\n};\n\nexport const getGenericActionDataAction = createObservableDataAction({\n action: >getGenericAction,\n input: createTabStateInputInternal\n});\n\nexport default getGenericActionDataAction;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IModuleProps, INodeProps, NodeTag } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { ITabItemData } from './tab-item.data';\nimport { ITabItemProps } from './tab-item.props.autogenerated';\n\nexport interface ITabItemViewProps {\n TabContentContainer: IModuleProps;\n TabHeaderContainer: IModuleProps;\n tabSlots: INodeProps;\n TabItemContent: INodeProps;\n tabItemType?: TabItemType;\n tabHeader: React.ReactNode;\n}\n\nexport interface ITabItemExtentedProps extends ITabItemProps {\n tabItemType?: TabItemType;\n isSelected?: boolean;\n itemIndex?: number;\n tabId?: string;\n}\n\nexport enum TabItemType {\n TabHeader,\n TabContent\n}\n\n/**\n *\n * TabItem component.\n * @extends {React.Component}\n */\n@observer\nclass TabItem extends React.PureComponent {\n private readonly moduleContentClassName: string = 'ms-tab-item-content';\n\n private readonly moduleHeaderClassName: string = 'ms-tab-item-header';\n\n constructor(props: ITabItemProps) {\n super(props);\n this._renderTabHeader = this._renderTabHeader.bind(this);\n }\n\n public render(): JSX.Element {\n const { slots, renderView, config, data, isSelected, itemIndex } = this.props;\n const index = itemIndex || 0;\n const contentID = getContentID(index, this.props.tabId || '');\n const activeContentIDResult = data && data.activeTabState && data.activeTabState.result;\n const shown =\n activeContentIDResult &&\n activeContentIDResult.tabId === this.props.tabId &&\n activeContentIDResult.activeContentIndex !== undefined\n ? activeContentIDResult.activeContentIndex === index\n : isSelected || false;\n const viewProps = {\n ...this.props,\n TabContentContainer: {\n moduleProps: this.props,\n className: classnames(this.moduleContentClassName, config.className)\n },\n TabHeaderContainer: {\n moduleProps: this.props,\n className: classnames(this.moduleHeaderClassName, config.className)\n },\n TabItemContent: {\n className: 'ms-tab-item-content__content',\n tag: 'section' as NodeTag,\n 'aria-hidden': !shown,\n role: 'tabpanel',\n tabIndex: shown ? 0 : -1,\n id: contentID\n },\n tabHeader: this._renderTabHeader(),\n tabSlots: slots\n };\n return renderView(viewProps) as React.ReactElement;\n }\n\n private _renderTabHeader(): React.ReactNode {\n return <>{this.props.config.tabItemTitle};\n }\n}\n\nexport const getContentID = (index: number, id: string) => {\n return `tab-item-content-${id}-${index}`;\n};\n\nexport default TabItem;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as MsDyn365 from '@msdyn365-commerce/core';\nimport { IModuleProps, INodeProps, NodeTag } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { createTabStateInput, getContentID, TabItemType } from '../..';\nimport { ITabData } from './tab.data';\nimport { ITabProps } from './tab.props.autogenerated';\n\n/**\n *\n * Tab component.\n * @extends {React.PureComponent>}\n */\n\nexport interface ICallToActionProps {\n link: INodeProps[];\n}\n\nexport interface ITabViewProps extends ITabProps<{}> {\n heading?: React.ReactNode;\n TabContainer: IModuleProps;\n headerSection: INodeProps;\n tabHeaderSection: INodeProps;\n tabsSection: INodeProps;\n tabItemContainer: INodeProps;\n tabHeaders: React.ReactNode;\n tabContents: React.ReactNode;\n}\n\nexport interface ITabViewStates {\n currentTabIndex: number;\n}\n\n/**\n *\n * Tab component.\n * @extends {React.Component>}\n */\n@observer\nclass Tab extends React.Component, ITabViewStates> {\n public readonly tabIndexQuery: string = 'activeTab';\n\n private activeLink: HTMLLIElement | null;\n\n constructor(props: ITabProps) {\n super(props);\n const { defaultTabIndex } = this.props.config;\n const { slots } = this.props;\n const slotLength = (slots && slots.tabItems && slots.tabItems.length) || 0;\n let initialIndex = defaultTabIndex && defaultTabIndex <= slotLength && defaultTabIndex > 0 ? defaultTabIndex - 1 : 0;\n const queryString: string =\n (this.props.context &&\n this.props.context.request &&\n this.props.context.request.query &&\n this.props.context.request.query.activeTab) ||\n '';\n let queryTabIndex: number = 0;\n if (queryString.indexOf(':') > 0) {\n const arr = queryString.split(':');\n const moduleId = arr[0];\n if (moduleId === this.props.id) {\n queryTabIndex = Number.parseInt(arr[1], 10);\n }\n }\n initialIndex = queryTabIndex > 0 && queryTabIndex <= slotLength ? queryTabIndex - 1 : initialIndex;\n this.state = { currentTabIndex: initialIndex };\n\n this._getTabHeader = this._getTabHeader.bind(this);\n this._getTabContent = this._getTabContent.bind(this);\n this._onClick = this._onClick.bind(this);\n this._onKeyDown = this._onKeyDown.bind(this);\n this._setGetParameter = this._setGetParameter.bind(this);\n this.activeLink = null;\n }\n\n public shouldComponentUpdate(nextProps: ITabProps, nextState: ITabViewStates): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element {\n const { slots } = this.props;\n const { heading, className } = this.props.config;\n\n const headingComponent = heading && (\n \n );\n const slotLength = (slots && slots.tabItems && slots.tabItems.length) || 0;\n\n // Const queryTabIndex = this.props.context && this.props.context.request && this.props.context.request.query && +this.props.context.request.query.activeTabIndex || 0;\n // let activeIndex = defaultTabIndex && defaultTabIndex <= slotLength && defaultTabIndex > 0 ? defaultTabIndex - 1 : 0;\n // activeIndex = queryTabIndex > 0 && queryTabIndex <= slotLength ? queryTabIndex - 1 : activeIndex;\n\n const tabViewProps = {\n ...this.props,\n TabContainer: {\n moduleProps: this.props,\n className: classnames('ms-tab', className)\n },\n headerSection: { className: 'ms-tab-header-section' },\n tabsSection: { className: 'ms-tab-tabs-section', tag: 'ul' as NodeTag, role: 'tablist' },\n heading: headingComponent,\n config: this.props && this.props.config,\n tabItemContainer: {\n tag: 'div' as NodeTag,\n className: 'ms-tab-content-section'\n },\n tabContents: slotLength > 0 && slots.tabItems.map((item: React.ReactNode, index: number) => this._getTabContent(item, index)),\n tabHeaders: slotLength > 0 && slots.tabItems.map((item: React.ReactNode, index: number) => this._getTabHeader(item, index))\n };\n return this.props.renderView(tabViewProps) as React.ReactElement;\n }\n\n public handleHeadingChange = (event: MsDyn365.ContentEditableEvent) => (this.props.config.heading!.text = event.target.value);\n\n public componentDidUpdate(): void {\n const { data } = this.props;\n if (!this.props.context.request.params.isEditor) {\n const dataActionTabId = data && data.activeTabState && data.activeTabState.result && data.activeTabState.result.tabId;\n if (dataActionTabId) {\n if (this.props.id === dataActionTabId) {\n this.activeLink && this.activeLink.focus();\n }\n } else {\n const queryString: string =\n (this.props.context &&\n this.props.context.request &&\n this.props.context.request.query &&\n this.props.context.request.query.activeTab) ||\n '';\n if (queryString.indexOf(':') > 0) {\n const arr = queryString.split(':');\n const moduleId = arr[0];\n if (moduleId === this.props.id) {\n this.activeLink && this.activeLink.focus();\n }\n }\n }\n }\n }\n\n /**\n *Set the activate link value on tab click.\n * @param link -Ref link value.\n */\n private readonly _refHandler = (link: HTMLLIElement | null) => {\n this.activeLink = link;\n };\n\n private _getTabHeader(item: React.ReactNode, index: number): React.ReactNode {\n const { data } = this.props;\n const activeContentIndex =\n data && data.activeTabState && data.activeTabState.result && data.activeTabState.result.activeContentIndex;\n const dataActionTabId = data && data.activeTabState && data.activeTabState.result && data.activeTabState.result.tabId;\n const selected =\n activeContentIndex !== undefined && dataActionTabId === this.props.id\n ? activeContentIndex === index\n : this.state.currentTabIndex === index;\n const contentID = getContentID(index, this.props.id);\n\n return (\n \n \n {React.cloneElement(item as React.ReactElement, {\n tabItemType: TabItemType.TabHeader,\n isSelected: index === this.state.currentTabIndex,\n itemIndex: index,\n tabId: this.props.id\n })}\n \n \n );\n }\n\n private readonly _onClick = (index: number, id: string) => (e: React.MouseEvent) => {\n const activeTabState = { activeContentIndex: index, tabId: id };\n this.props.context.actionContext.update(createTabStateInput(activeTabState), activeTabState);\n this.setState({ currentTabIndex: index });\n\n // Update query paramter\n const requestContext = this.props.context.request;\n const newUrl = this._setGetParameter(requestContext, this.tabIndexQuery, `${this.props.id}:${String(index + 1)}`);\n requestContext && window.history.pushState({ path: newUrl }, '', newUrl);\n };\n\n private readonly _onKeyDown = (index: number, id: string) => (e: React.KeyboardEvent) => {\n if (e.keyCode === 13) {\n const activeTabState = { activeContentIndex: index, tabId: id };\n this.props.context.actionContext.update(createTabStateInput(activeTabState), activeTabState);\n this.setState({ currentTabIndex: index });\n\n // Update query paramter\n const requestContext = this.props.context.request;\n const newUrl = this._setGetParameter(requestContext, this.tabIndexQuery, `${this.props.id}:${String(index + 1)}`);\n requestContext && window.history.pushState({ path: newUrl }, '', newUrl);\n }\n\n if (e.keyCode === 39 || e.keyCode === 37) {\n const { slots } = this.props;\n const slotLength = (slots && slots.tabItems && slots.tabItems.length) || 0;\n\n if (e.keyCode === 39) {\n // If we're at the end, go to the start\n if (index + 1 === slotLength) {\n index = -1;\n }\n const activeTabState = { activeContentIndex: index + 1, tabId: id };\n this.props.context.actionContext.update(createTabStateInput(activeTabState), activeTabState);\n this.setState({ currentTabIndex: index + 1 });\n\n // Update query paramter\n const requestContext = this.props.context.request;\n const newUrl = this._setGetParameter(requestContext, this.tabIndexQuery, `${this.props.id}:${String(index + 2)}`);\n requestContext && window.history.pushState({ path: newUrl }, '', newUrl);\n\n // Move left\n } else if (e.keyCode === 37) {\n // If we're at the start, move to the end\n if (index === 0) {\n index = slotLength;\n }\n const activeTabState = { activeContentIndex: index - 1, tabId: id };\n this.props.context.actionContext.update(createTabStateInput(activeTabState), activeTabState);\n this.setState({ currentTabIndex: index - 1 });\n\n // Update query paramter\n const requestContext = this.props.context.request;\n const newUrl = this._setGetParameter(requestContext, this.tabIndexQuery, `${this.props.id}:${String(index)}`);\n requestContext && window.history.pushState({ path: newUrl }, '', newUrl);\n }\n }\n };\n\n private _getTabContent(item: React.ReactNode, index: number): React.ReactNode {\n return (\n \n {React.cloneElement(item as React.ReactElement, {\n tabItemType: TabItemType.TabContent,\n isSelected: index === this.state.currentTabIndex,\n itemIndex: index,\n tabId: this.props.id\n })}\n \n );\n }\n\n private _setGetParameter(requestContext: MsDyn365.IRequestContext, paramName: string, paramValue: string): string {\n let url;\n\n if (MsDyn365.msdyn365Commerce.isBrowser) {\n url = new URL(window.location.href);\n } else {\n url = new URL(requestContext.url.requestUrl.href);\n }\n\n const params = new window.URLSearchParams(url.search);\n params.set(paramName, paramValue);\n url.search = decodeURIComponent(params.toString());\n return url.toString();\n }\n}\n\nexport default Tab;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ITabViewProps } from './tab';\n\nconst tabView: React.FC = props => {\n const { heading, TabContainer, tabHeaders, tabContents } = props;\n if (!props.heading && !props.tabHeaders && !props.tabContents) {\n props.context.telemetry.error('Tab content is empty, module wont render');\n return null;\n }\n return (\n \n {heading}\n {tabHeaders}\n {tabContents}\n \n );\n};\n\nexport default tabView;\n","module.exports = React;","module.exports = ReactDOM;"],"names":["binding","modules","dataActions","c","require","$type","da","name","path","runOn","iNM","ns","n","p","pdp","md","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","Error","prototype","RegistrationId","id","window","__bindings__","_objectSpread","viewDictionary","cn","createTabStateInput","result","GenericInput","getGenericActionDataAction","createObservableDataAction","action","getGenericAction","input","createTabStateInputInternal","TabItemType","TabItem","React","constructor","props","super","moduleContentClassName","moduleHeaderClassName","this","_renderTabHeader","bind","render","slots","renderView","config","data","isSelected","itemIndex","index","contentID","getContentID","tabId","activeContentIDResult","activeTabState","shown","undefined","activeContentIndex","TabContentContainer","moduleProps","className","classnames","TabHeaderContainer","TabItemContent","tag","role","tabIndex","tabHeader","tabSlots","tabItemTitle","__decorate","observer","Tab","tabIndexQuery","handleHeadingChange","event","heading","text","target","value","_refHandler","link","activeLink","_onClick","e","context","actionContext","update","setState","currentTabIndex","requestContext","request","newUrl","_setGetParameter","String","history","pushState","_onKeyDown","keyCode","slotLength","tabItems","length","defaultTabIndex","initialIndex","queryString","query","activeTab","queryTabIndex","indexOf","arr","split","Number","parseInt","state","_getTabHeader","_getTabContent","shouldComponentUpdate","nextProps","nextState","headingComponent","MsDyn365","editProps","onEdit","tabViewProps","TabContainer","headerSection","tabsSection","tabItemContainer","tabContents","map","item","tabHeaders","componentDidUpdate","params","isEditor","dataActionTabId","focus","selected","key","onClick","onKeyDown","ref","tabItemType","TabHeader","TabContent","paramName","paramValue","url","isBrowser","URL","location","href","requestUrl","URLSearchParams","search","set","decodeURIComponent","toString","Module","Object","assign","Node","telemetry","error","module","exports","ReactDOM"],"sourceRoot":""}