@mikezimm/fps-library-v2 1.0.14 → 1.0.16

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.
Files changed (137) hide show
  1. package/CHANGELOG.md +5 -2
  2. package/lib/banner/bannerX/BannerContent.d.ts +4 -0
  3. package/lib/banner/bannerX/BannerContent.d.ts.map +1 -0
  4. package/lib/banner/bannerX/BannerContent.js +151 -0
  5. package/lib/banner/bannerX/BannerContent.js.map +1 -0
  6. package/lib/banner/bannerX/FetchBannerX.d.ts +101 -0
  7. package/lib/banner/bannerX/FetchBannerX.d.ts.map +1 -0
  8. package/lib/banner/bannerX/FetchBannerX.js +340 -0
  9. package/lib/banner/bannerX/FetchBannerX.js.map +1 -0
  10. package/lib/banner/bannerX/FullPanel.d.ts +6 -0
  11. package/lib/banner/bannerX/FullPanel.d.ts.map +1 -0
  12. package/lib/banner/bannerX/FullPanel.js +154 -0
  13. package/lib/banner/bannerX/FullPanel.js.map +1 -0
  14. package/lib/banner/bannerX/InfoElement.d.ts +4 -0
  15. package/lib/banner/bannerX/InfoElement.d.ts.map +1 -0
  16. package/lib/banner/bannerX/InfoElement.js +39 -0
  17. package/lib/banner/bannerX/InfoElement.js.map +1 -0
  18. package/lib/banner/bannerX/MinPanel.d.ts +4 -0
  19. package/lib/banner/bannerX/MinPanel.d.ts.map +1 -0
  20. package/lib/banner/bannerX/MinPanel.js +14 -0
  21. package/lib/banner/bannerX/MinPanel.js.map +1 -0
  22. package/lib/banner/bannerX/Near/CheckNarrow.d.ts +3 -0
  23. package/lib/banner/bannerX/Near/CheckNarrow.d.ts.map +1 -0
  24. package/lib/banner/bannerX/Near/CheckNarrow.js +9 -0
  25. package/lib/banner/bannerX/Near/CheckNarrow.js.map +1 -0
  26. package/lib/banner/bannerX/Near/beAUserIcon.d.ts +4 -0
  27. package/lib/banner/bannerX/Near/beAUserIcon.d.ts.map +1 -0
  28. package/lib/banner/bannerX/Near/beAUserIcon.js +9 -0
  29. package/lib/banner/bannerX/Near/beAUserIcon.js.map +1 -0
  30. package/lib/banner/bannerX/Near/expandoIcon.d.ts +4 -0
  31. package/lib/banner/bannerX/Near/expandoIcon.d.ts.map +1 -0
  32. package/lib/banner/bannerX/Near/expandoIcon.js +10 -0
  33. package/lib/banner/bannerX/Near/expandoIcon.js.map +1 -0
  34. package/lib/banner/bannerX/Near/gearIcon.d.ts +4 -0
  35. package/lib/banner/bannerX/Near/gearIcon.d.ts.map +1 -0
  36. package/lib/banner/bannerX/Near/gearIcon.js +7 -0
  37. package/lib/banner/bannerX/Near/gearIcon.js.map +1 -0
  38. package/lib/banner/bannerX/Near/goHomeIcon.d.ts +4 -0
  39. package/lib/banner/bannerX/Near/goHomeIcon.d.ts.map +1 -0
  40. package/lib/banner/bannerX/Near/goHomeIcon.js +15 -0
  41. package/lib/banner/bannerX/Near/goHomeIcon.js.map +1 -0
  42. package/lib/banner/bannerX/Near/goParentIcon.d.ts +4 -0
  43. package/lib/banner/bannerX/Near/goParentIcon.d.ts.map +1 -0
  44. package/lib/banner/bannerX/Near/goParentIcon.js +14 -0
  45. package/lib/banner/bannerX/Near/goParentIcon.js.map +1 -0
  46. package/lib/banner/bannerX/Near/updateNearElements.d.ts +14 -0
  47. package/lib/banner/bannerX/Near/updateNearElements.d.ts.map +1 -0
  48. package/lib/banner/bannerX/Near/updateNearElements.js +27 -0
  49. package/lib/banner/bannerX/Near/updateNearElements.js.map +1 -0
  50. package/lib/banner/bannerX/PinFunctions.d.ts +14 -0
  51. package/lib/banner/bannerX/PinFunctions.d.ts.map +1 -0
  52. package/lib/banner/bannerX/PinFunctions.js +33 -0
  53. package/lib/banner/bannerX/PinFunctions.js.map +1 -0
  54. package/lib/banner/components/EasyPages/createEasyPagesSourceWPProps.d.ts +1 -1
  55. package/lib/banner/components/EasyPages/createEasyPagesSourceWPProps.d.ts.map +1 -1
  56. package/lib/banner/components/Gear/CreateKeySiteProps.d.ts +4 -0
  57. package/lib/banner/components/Gear/CreateKeySiteProps.d.ts.map +1 -0
  58. package/lib/banner/components/Gear/CreateKeySiteProps.js +14 -0
  59. package/lib/banner/components/Gear/CreateKeySiteProps.js.map +1 -0
  60. package/lib/banner/components/Gear/bannerGearFunctions.d.ts +2 -3
  61. package/lib/banner/components/Gear/bannerGearFunctions.d.ts.map +1 -1
  62. package/lib/banner/components/Gear/bannerGearFunctions.js +31 -24
  63. package/lib/banner/components/Gear/bannerGearFunctions.js.map +1 -1
  64. package/lib/banner/features/Expando/Interfaces.d.ts +2 -0
  65. package/lib/banner/features/Expando/Interfaces.d.ts.map +1 -1
  66. package/lib/banner/features/Expando/Interfaces.js.map +1 -1
  67. package/lib/banner/features/WebPartHistory/HistoryContent.d.ts +4 -0
  68. package/lib/banner/features/WebPartHistory/HistoryContent.d.ts.map +1 -0
  69. package/lib/banner/features/WebPartHistory/HistoryContent.js +42 -0
  70. package/lib/banner/features/WebPartHistory/HistoryContent.js.map +1 -0
  71. package/lib/banner/interfaces/MinWP/IMinWPBannerProps.d.ts +2 -1
  72. package/lib/banner/interfaces/MinWP/IMinWPBannerProps.d.ts.map +1 -1
  73. package/lib/banner/interfaces/MinWP/IMinWPBannerProps.js.map +1 -1
  74. package/lib/banner/mainReact/IWebpartBannerProps.d.ts +20 -12
  75. package/lib/banner/mainReact/IWebpartBannerProps.d.ts.map +1 -1
  76. package/lib/banner/mainReact/ReactComponentProps.d.ts +0 -13
  77. package/lib/banner/mainReact/ReactComponentProps.d.ts.map +1 -1
  78. package/lib/banner/mainReact/ReactComponentProps.js +10 -0
  79. package/lib/banner/mainReact/ReactComponentProps.js.map +1 -1
  80. package/lib/banner/render/{WebPartRenderBannerV2.d.ts → BuildBannerPropsX.d.ts} +4 -2
  81. package/lib/banner/render/BuildBannerPropsX.d.ts.map +1 -0
  82. package/lib/banner/render/{WebPartRenderBannerV2.js → BuildBannerPropsX.js} +36 -20
  83. package/lib/banner/render/BuildBannerPropsX.js.map +1 -0
  84. package/lib/banner/render/IBuildBannerSettings.d.ts +1 -1
  85. package/lib/banner/render/IBuildBannerSettings.d.ts.map +1 -1
  86. package/lib/banner/render/refreshPanel.js +1 -1
  87. package/lib/banner/render/refreshPanel.js.map +1 -1
  88. package/lib/banner/render/refreshPanelHTML.js +1 -1
  89. package/lib/banner/render/refreshPanelHTML.js.map +1 -1
  90. package/lib/common/PropPaneHelp/pages/PropPaneHelp.d.ts +4 -0
  91. package/lib/common/PropPaneHelp/pages/PropPaneHelp.d.ts.map +1 -0
  92. package/lib/common/PropPaneHelp/pages/PropPaneHelp.js +31 -0
  93. package/lib/common/PropPaneHelp/pages/PropPaneHelp.js.map +1 -0
  94. package/lib/common/PropPaneHelp/pages/SitePresetsInfo.d.ts +1 -1
  95. package/lib/common/PropPaneHelp/pages/SitePresetsInfo.d.ts.map +1 -1
  96. package/lib/common/PropPaneHelp/pages/SitePresetsInfo.js +4 -2
  97. package/lib/common/PropPaneHelp/pages/SitePresetsInfo.js.map +1 -1
  98. package/lib/common/commandStyles/makeYellow.d.ts +3 -0
  99. package/lib/common/commandStyles/makeYellow.d.ts.map +1 -0
  100. package/lib/common/commandStyles/makeYellow.js +16 -0
  101. package/lib/common/commandStyles/makeYellow.js.map +1 -0
  102. package/lib/common/interfaces/@msft/1.15.2/WebPartContext.d.ts +10 -0
  103. package/lib/common/interfaces/@msft/1.15.2/WebPartContext.d.ts.map +1 -1
  104. package/lib/common/interfaces/@msft/1.15.2/WebPartContext.js.map +1 -1
  105. package/lib/common/interfaces/fps/Window.d.ts +7 -0
  106. package/lib/common/interfaces/fps/Window.d.ts.map +1 -0
  107. package/lib/common/interfaces/fps/Window.js +2 -0
  108. package/lib/common/interfaces/fps/Window.js.map +1 -0
  109. package/lib/components/atoms/EasyIcons/createEasyIconsWPProps.js +1 -1
  110. package/lib/components/atoms/EasyIcons/createEasyIconsWPProps.js.map +1 -1
  111. package/lib/components/molecules/FieldPanel/IFieldPanelProps.d.ts +5 -0
  112. package/lib/components/molecules/FieldPanel/IFieldPanelProps.d.ts.map +1 -0
  113. package/lib/components/molecules/FieldPanel/IFieldPanelProps.js +2 -0
  114. package/lib/components/molecules/FieldPanel/IFieldPanelProps.js.map +1 -0
  115. package/lib/components/molecules/FieldPanel/PropPaneCols.d.ts +1 -0
  116. package/lib/components/molecules/FieldPanel/PropPaneCols.d.ts.map +1 -0
  117. package/lib/components/molecules/FieldPanel/PropPaneCols.js +130 -0
  118. package/lib/components/molecules/FieldPanel/PropPaneCols.js.map +1 -0
  119. package/lib/logic/Links/Navigation.d.ts +3 -3
  120. package/lib/logic/Links/Navigation.d.ts.map +1 -1
  121. package/lib/logic/Links/Navigation.js +8 -6
  122. package/lib/logic/Links/Navigation.js.map +1 -1
  123. package/lib/pnpjs/SourceItems/getSourceItems.js +1 -1
  124. package/lib/pnpjs/SourceItems/getSourceItems.js.map +1 -1
  125. package/lib/pnpjs/Users/logic/createIEnsureUserInfo.js +1 -1
  126. package/lib/pnpjs/Users/logic/createIEnsureUserInfo.js.map +1 -1
  127. package/package.json +1 -1
  128. package/lib/banner/banner/component.d.ts +0 -35
  129. package/lib/banner/banner/component.d.ts.map +0 -1
  130. package/lib/banner/banner/component.js +0 -537
  131. package/lib/banner/banner/component.js.map +0 -1
  132. package/lib/banner/render/WebPartRenderBannerV2.d.ts.map +0 -1
  133. package/lib/banner/render/WebPartRenderBannerV2.js.map +0 -1
  134. package/lib/banner/render/buildBannerPropsV1.d.ts +0 -34
  135. package/lib/banner/render/buildBannerPropsV1.d.ts.map +0 -1
  136. package/lib/banner/render/buildBannerPropsV1.js +0 -195
  137. package/lib/banner/render/buildBannerPropsV1.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -5,12 +5,15 @@ npm run build
5
5
  npm version major/minor/patch
6
6
  npm publish --access=public
7
7
 
8
- npm install @mikezimm/fps-library-v2@1.0.14
8
+ npm install @mikezimm/fps-library-v2@1.0.16
9
9
 
10
10
 
11
11
  # Changelog
12
12
 
13
- ## 1.0.14 - 2022-Dec-11
13
+ ## 1.0.16 - 2022-Dec-11
14
+ - clean up build errors - moved temp files back to npmFunctions so could build
15
+
16
+ ## 1.0.15 - 2022-Dec-11
14
17
  - More cleanup imports
15
18
 
16
19
  ## 1.0.13 - 2022-Dec-11
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IWebpartBannerProps } from '../mainReact/IWebpartBannerProps';
3
+ export declare function mainBannerContent(bannerProps: IWebpartBannerProps, forceNarrowStyles: boolean, nearBannerElementsArray: JSX.Element[], farBannerElementsArray: JSX.Element[], showSettings: boolean, _openPanel: any, _togglePropsHelp: any): JSX.Element;
4
+ //# sourceMappingURL=BannerContent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BannerContent.d.ts","sourceRoot":"","sources":["../../../src/banner/bannerX/BannerContent.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAMvE,wBAAgB,iBAAiB,CAAE,WAAW,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,OAAO,EAC3F,uBAAuB,EAAE,GAAG,CAAC,OAAO,EAAE,EAAE,sBAAsB,EAAE,GAAG,CAAC,OAAO,EAAE,EAC7E,YAAY,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,gBAAgB,EAAE,GAAG,eA0KhE"}
@@ -0,0 +1,151 @@
1
+ import * as React from 'react';
2
+ import { DisplayMode } from '../../common/interfaces/@msft/1.15.2/displayMode';
3
+ import { createStyleFromString } from '../../logic/Strings/reactCSS';
4
+ import * as links from '../../components/atoms/Links/LinksRepos';
5
+ import { makeInfoElement } from './InfoElement';
6
+ import { bannerSettingsContent } from '../components/Gear/bannerGearFunctions';
7
+ export function mainBannerContent(bannerProps, forceNarrowStyles, nearBannerElementsArray, farBannerElementsArray, showSettings, _openPanel, _togglePropsHelp) {
8
+ // const { showTricks, context, keySiteProps, bannerWidth } = bannerProps;
9
+ let settingsContent = null;
10
+ let settingsPage = null;
11
+ if (bannerProps.showBannerGear === true) {
12
+ settingsPage = bannerSettingsContent(bannerProps, forceNarrowStyles);
13
+ settingsContent = settingsPage.content;
14
+ }
15
+ const showSettingsAsPivot = forceNarrowStyles === true || (settingsPage === null || settingsPage === void 0 ? void 0 : settingsPage.showSettingsAsPivot) === true ? true : false;
16
+ /***
17
+ * .d8888. db db d88888b d88888b d888888b db db
18
+ * 88' YP 88 88 88' 88' `88' `8b d8'
19
+ * `8bo. 88 88 88ooo 88ooo 88 `8bd8'
20
+ * `Y8b. 88 88 88~~~ 88~~~ 88 .dPYb.
21
+ * db 8D 88b d88 88 88 .88. .8P Y8.
22
+ * `8888Y' ~Y8888P' YP YP Y888888P YP YP
23
+ *
24
+ *
25
+ */
26
+ const bannerSuffix = '';
27
+ //Exclude the props.bannerProps.title if the webpart is narrow to make more responsive
28
+ let bannerTitle = bannerProps.bannerWidth < 900 ? bannerProps.title : `${bannerProps.title} ${(bannerSuffix ? ' - ' + bannerSuffix : '')}`;
29
+ if (bannerTitle === '') {
30
+ bannerTitle = 'ignore';
31
+ }
32
+ if (bannerProps.displayMode === DisplayMode.Edit) {
33
+ bannerTitle += '';
34
+ }
35
+ /***
36
+ * d8888b. .d8b. d8b db .o88b. .d88b. d8b db d888888b d88888b d8b db d888888b
37
+ * 88 `8D d8' `8b 888o 88 d8P Y8 .8P Y8. 888o 88 `~~88~~' 88' 888o 88 `~~88~~'
38
+ * 88oooY' 88ooo88 88V8o 88 8P 88 88 88V8o 88 88 88ooooo 88V8o 88 88
39
+ * 88~~~b. 88~~~88 88 V8o88 8b 88 88 88 V8o88 88 88~~~~~ 88 V8o88 88
40
+ * 88 8D 88 88 88 V888 Y8b d8 `8b d8' 88 V888 88 88. 88 V888 88
41
+ * Y8888P' YP YP VP V8P `Y88P' `Y88P' VP V8P YP Y88888P VP V8P YP
42
+ *
43
+ *
44
+ */
45
+ // Estimated width pixels used by banner. Used to determine max size of the title component.
46
+ let usedWidth = 40; //20px padding on outside of all elements
47
+ usedWidth += nearBannerElementsArray.length * 43 + farBannerElementsArray.length * 43; //Add 45px per icon button
48
+ // usedWidth += 40; //Padding between near/far elements and the text part of heading
49
+ const remainingWidth = bannerProps.bannerWidth - usedWidth - 40;
50
+ let moreInfoText = bannerProps.infoElement ? bannerProps.infoElement : 'More Information';
51
+ let bannerTitleText = bannerTitle && bannerTitle.length > 0 ? bannerTitle.trim() : 'FPS Webpart';
52
+ const textWidth = (moreInfoText.length + bannerTitleText.length) * 19 + 40; //characters * 19px + 40 padding
53
+ if (bannerTitleText && ['hide', 'ignore', 'empty'].indexOf(bannerTitleText.toLowerCase()) >= 0) {
54
+ bannerTitleText = '';
55
+ }
56
+ // If space between < estimated space needed, apply ratio, else just leave large on both sides so the math works.
57
+ const moreInfoRatio = textWidth > remainingWidth ? moreInfoText.length / (moreInfoText.length + bannerTitleText.length) : .7;
58
+ const titleRatio = textWidth > remainingWidth ? 1 - moreInfoRatio : .7;
59
+ if (bannerProps.bannerWidth < 700 && moreInfoText.length > 5) {
60
+ moreInfoText = moreInfoText === 'More Information' ? 'Info' : moreInfoText.substring(0, 5) + '...';
61
+ }
62
+ // usedWidth += 18 * bannerTitleText.length; //Est 18px per character of title
63
+ const hasNear = nearBannerElementsArray.length > 0 ? true : false;
64
+ const hasFar = farBannerElementsArray.length > 0 ? true : false;
65
+ const hasNearOrFar = hasNear === true || hasFar === true ? true : false;
66
+ let bannerStyle = {};
67
+ if (bannerProps.bannerReactCSS) {
68
+ bannerStyle = bannerProps.bannerReactCSS;
69
+ }
70
+ else if (bannerProps.styleString) {
71
+ bannerStyle = createStyleFromString(bannerProps.styleString, { background: 'green' }, 'bannerStyle in banner/component.tsx ~ 81');
72
+ }
73
+ if (!bannerStyle.height) {
74
+ bannerStyle.height = '35px';
75
+ }
76
+ if (!bannerStyle.paddingLeft) {
77
+ bannerStyle.paddingLeft = '20px';
78
+ }
79
+ if (!bannerStyle.paddingRight) {
80
+ bannerStyle.paddingRight = '20px';
81
+ }
82
+ if (hasNearOrFar === false) {
83
+ bannerStyle.cursor = 'pointer';
84
+ }
85
+ const classNames = ['container', bannerProps.hoverEffect === true ? 'opacity' : null, 'flex-container'].join(' ');
86
+ // On clicks need to be defined like this and only put on specific elements in certain cases.
87
+ // OR ELSE they will all get fired messing up panel open
88
+ const bannerOnClick = hasNearOrFar !== true ? _openPanel : undefined;
89
+ const titleInfoOnClick = hasNearOrFar === true ? _openPanel : undefined;
90
+ const titleInfoCursor = hasNearOrFar === true ? 'pointer' : undefined;
91
+ const styleFlexElements = { padding: '10px', cursor: titleInfoCursor };
92
+ //Added for https://github.com/mikezimm/PageInfo/issues/30
93
+ const isPinned = bannerProps.domElement && bannerProps.domElement.offsetParent && bannerProps.domElement.offsetParent.classList.contains('pinMeWebPartDefault') ? true : false;
94
+ const isPageInfo = bannerProps.gitHubRepo.desc === links.gitRepoPageInfoSmall.desc ? true : false;
95
+ const maxWidth = isPinned === true || isPageInfo === true ? '200px' : titleRatio * remainingWidth;
96
+ const styleLeftTitle = { padding: '10px', cursor: titleInfoCursor, maxWidth: maxWidth, overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' };
97
+ const styleRightTitle = { padding: '10px', cursor: titleInfoCursor, maxWidth: moreInfoRatio * remainingWidth, overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' };
98
+ /***
99
+ * d888888b d8b db d88888b .d88b. d88888b db d88888b .88b d88. d88888b d8b db d888888b
100
+ * `88' 888o 88 88' .8P Y8. 88' 88 88' 88'YbdP`88 88' 888o 88 `~~88~~'
101
+ * 88 88V8o 88 88ooo 88 88 88ooooo 88 88ooooo 88 88 88 88ooooo 88V8o 88 88
102
+ * 88 88 V8o88 88~~~ 88 88 88~~~~~ 88 88~~~~~ 88 88 88 88~~~~~ 88 V8o88 88
103
+ * .88. 88 V888 88 `8b d8' 88. 88booo. 88. 88 88 88 88. 88 V888 88
104
+ * Y888888P VP V8P YP `Y88P' Y88888P Y88888P Y88888P YP YP YP Y88888P VP V8P YP
105
+ *
106
+ *
107
+ */
108
+ const infoElement = makeInfoElement(bannerProps, moreInfoText, styleRightTitle, titleInfoOnClick, _togglePropsHelp);
109
+ /***
110
+ * d8888b. db db d888888b db d8888b.
111
+ * 88 `8D 88 88 `88' 88 88 `8D
112
+ * 88oooY' 88 88 88 88 88 88
113
+ * 88~~~b. 88 88 88 88 88 88
114
+ * 88 8D 88b d88 .88. 88booo. 88 .8D
115
+ * Y8888P' ~Y8888P' Y888888P Y88888P Y8888D'
116
+ *
117
+ *
118
+ * db d88888b d88888b d888888b d8888b. d888888b d888b db db d888888b
119
+ * 88 88' 88' `~~88~~' 88 `8D `88' 88' Y8b 88 88 `~~88~~'
120
+ * 88 88ooooo 88ooo 88 88oobY' 88 88 88ooo88 88
121
+ * 88 88~~~~~ 88~~~ 88 88`8b 88 88 ooo 88~~~88 88
122
+ * 88booo. 88. 88 88 88 `88. .88. 88. ~8~ 88 88 88
123
+ * Y88888P Y88888P YP YP 88 YD Y888888P Y888P YP YP YP
124
+ *
125
+ *
126
+ */
127
+ const appendTitle = bannerProps.appendTitle ? bannerProps.appendTitle : '';
128
+ const bannerLeft = nearBannerElementsArray.length === 0 ? React.createElement("div", { style: styleFlexElements, onClick: titleInfoOnClick },
129
+ " ",
130
+ bannerTitleText,
131
+ " ") :
132
+ React.createElement("div", { className: 'flex-left-nowrap-start' },
133
+ nearBannerElementsArray,
134
+ React.createElement("div", { style: styleLeftTitle, onClick: titleInfoOnClick, title: bannerTitleText },
135
+ " ",
136
+ bannerTitleText,
137
+ " ",
138
+ appendTitle,
139
+ " "));
140
+ const bannerRight = farBannerElementsArray.length === 0 && infoElement.length === 0 ? React.createElement("div", { style: styleFlexElements, onClick: titleInfoOnClick }, moreInfoText) :
141
+ React.createElement("div", { className: 'flex-left-nowrap-start' }, [...farBannerElementsArray, ...infoElement,]);
142
+ let showSettingStyle = showSettingsAsPivot === true ? 'show-settings show-settings-pivot' : 'show-settings show-settings-flex';
143
+ console.log('showSettingStyle ~ 326', showSettingStyle);
144
+ let bannerContent = React.createElement("div", null,
145
+ React.createElement("div", { className: classNames, style: bannerStyle, onClick: bannerOnClick },
146
+ bannerLeft,
147
+ bannerRight),
148
+ React.createElement("div", { className: showSettings ? showSettingStyle : 'hide-settings', style: {} }, settingsContent));
149
+ return bannerContent;
150
+ }
151
+ //# sourceMappingURL=BannerContent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BannerContent.js","sourceRoot":"","sources":["../../../src/banner/bannerX/BannerContent.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,kDAAkD,CAAC;AAE/E,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAErE,OAAO,KAAK,KAAK,MAAM,yCAAyC,CAAC;AAGjE,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAE/E,MAAM,UAAU,iBAAiB,CAAE,WAAgC,EAAE,iBAA0B,EAC3F,uBAAsC,EAAE,sBAAqC,EAC7E,YAAqB,EAAE,UAAe,EAAE,gBAAqB;IAE/D,0EAA0E;IAE1E,IAAI,eAAe,GAAG,IAAI,CAAC;IAC3B,IAAI,YAAY,GAAG,IAAI,CAAC;IAExB,IAAK,WAAW,CAAC,cAAc,KAAK,IAAI,EAAG;QACzC,YAAY,GAAG,qBAAqB,CAAE,WAAW,EAAE,iBAAiB,CAAE,CAAC;QACvE,eAAe,GAAG,YAAY,CAAC,OAAO,CAAC;KACxC;IAED,MAAM,mBAAmB,GAAG,iBAAiB,KAAK,IAAI,IAAI,CAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,mBAAmB,MAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;IAEpH;;;;;;;;;KASC;IAGD,MAAM,YAAY,GAAG,EAAE,CAAC;IACxB,sFAAsF;IACtF,IA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K,CAAC,CAAC,CAAC,CAAC,6BAAK,KAAK,EAAG,iBAAiB,EAAG,OAAO,EAAK,gBAAgB,IAAK,YAAY,CAAO,CAAC,CAAC;QAC3K,6BAAK,SAAS,EAAG,wBAAwB,IACrC,CAAE,GAAG,sBAAsB,EAAE,GAAG,WAAW,EAAG,CAC5C,CAAC;IAIT,IAAI,gBAAgB,GAAG,mBAAmB,KAAK,IAAI,CAAC,CAAC,CAAC,mCAAmC,CAAC,CAAC,CAAC,kCAAkC,CAAC;IAC/H,OAAO,CAAC,GAAG,CAAC,wBAAwB,EAAE,gBAAgB,CAAE,CAAC;IAEzD,IAAI,aAAa,GACjB;QACE,6BAAK,SAAS,EAAG,UAAU,EAAG,KAAK,EAAG,WAAW,EAAG,OAAO,EAAK,aAAa;YACzE,UAAU;YACV,WAAW,CACT;QACN,6BAAK,SAAS,EAAG,YAAY,CAAC,CAAC,CAAC,gBAAgB,CAAA,CAAC,CAAC,eAAe,EAAG,KAAK,EAAG,EAAE,IAC1E,eAAe,CACb,CACF,CAAC;IAEP,OAAO,aAAa,CAAC;AAEvB,CAAC"}
@@ -0,0 +1,101 @@
1
+ import * as React from 'react';
2
+ /***
3
+ * d88888b d8888b. .d8888. d8888b. d8888b. d88888b .d8888. d88888b d888888b .d8888.
4
+ * 88' 88 `8D 88' YP 88 `8D 88 `8D 88' 88' YP 88' `~~88~~' 88' YP
5
+ * 88ooo 88oodD' `8bo. 88oodD' 88oobY' 88ooooo `8bo. 88ooooo 88 `8bo.
6
+ * 88~~~ 88~~~ `Y8b. 88~~~ 88`8b 88~~~~~ `Y8b. 88~~~~~ 88 `Y8b.
7
+ * 88 88 db 8D 88 88 `88. 88. db 8D 88. 88 db 8D
8
+ * YP 88 `8888Y' 88 88 YD Y88888P `8888Y' Y88888P YP `8888Y'
9
+ *
10
+ *
11
+ */
12
+ import { IPinMeState } from '../features/PinMe/Interfaces';
13
+ import { ILoadPerformance } from '../../components/molecules/Performance/IPerformance';
14
+ import { IBannerPages, IWebpartBannerProps } from '../mainReact/IWebpartBannerProps';
15
+ import { ISpecialMessage } from '../components/SpecialBanner/interface';
16
+ import { IFPSCorePinMeReactComponentState } from '../mainReact/ReactComponentState';
17
+ import { PanelType } from 'office-ui-fabric-react';
18
+ export interface IFetchBannerXProps {
19
+ bannerProps: IWebpartBannerProps;
20
+ parentState: IFPSCorePinMeReactComponentState;
21
+ appendTitle?: string | JSX.Element;
22
+ WebPartHelpPivots: JSX.Element[];
23
+ SpecialMessage?: ISpecialMessage;
24
+ contentPages: IBannerPages;
25
+ nearBannerElementsArray: Element[];
26
+ farBannerElementsArray: Element[];
27
+ updatePinState: any;
28
+ pinState: IPinMeState;
29
+ refreshId?: string;
30
+ replacePanelHTML?: JSX.Element;
31
+ bonusHTML1?: JSX.Element;
32
+ panelPerformance?: ILoadPerformance;
33
+ bonusHTML2?: any;
34
+ }
35
+ export interface IFetchBannerXState {
36
+ showPanel: boolean;
37
+ showSettings: boolean;
38
+ selectedKey: string;
39
+ showPropsHelp: boolean;
40
+ panelType: PanelType;
41
+ expandoramicMode: boolean;
42
+ }
43
+ export default class FetchBanner extends React.Component<IFetchBannerXProps, IFetchBannerXState> {
44
+ private _webPartHelpElement;
45
+ private makeLargerCmdStyles;
46
+ private pimMeCmdStyles;
47
+ /***
48
+ * d8b db d88888b .d8b. d8888b. d88888b .d8b. d8888b. d88888b db d88888b
49
+ * 888o 88 88' d8' `8b 88 `8D 88' d8' `8b 88 `8D 88' 88 88'
50
+ * 88V8o 88 88ooooo 88ooo88 88oobY' 88ooo 88ooo88 88oobY' 88ooooo 88 88ooooo
51
+ * 88 V8o88 88~~~~~ 88~~~88 88`8b 88~~~ 88~~~88 88`8b 88~~~~~ 88 88~~~~~
52
+ * 88 V888 88. 88 88 88 `88. 88 88 88 88 `88. 88. 88booo. 88.
53
+ * VP V8P Y88888P YP YP 88 YD YP YP YP 88 YD Y88888P Y88888P Y88888P
54
+ *
55
+ *
56
+ */
57
+ private nearBannerElements;
58
+ private buildNearBannerElements;
59
+ private buildFarBannerElements;
60
+ /***
61
+ * .o88b. .d88b. d8b db .d8888. d888888b d8888b. db db .o88b. d888888b .d88b. d8888b.
62
+ * d8P Y8 .8P Y8. 888o 88 88' YP `~~88~~' 88 `8D 88 88 d8P Y8 `~~88~~' .8P Y8. 88 `8D
63
+ * 8P 88 88 88V8o 88 `8bo. 88 88oobY' 88 88 8P 88 88 88 88oobY'
64
+ * 8b 88 88 88 V8o88 `Y8b. 88 88`8b 88 88 8b 88 88 88 88`8b
65
+ * Y8b d8 `8b d8' 88 V888 db 8D 88 88 `88. 88b d88 Y8b d8 88 `8b d8' 88 `88.
66
+ * `Y88P' `Y88P' VP V8P `8888Y' YP 88 YD ~Y8888P' `Y88P' YP `Y88P' 88 YD
67
+ *
68
+ *
69
+ */
70
+ constructor(props: IFetchBannerXProps);
71
+ componentDidMount(): void;
72
+ /***
73
+ * d8888b. d888888b d8888b. db db d8888b. d8888b. .d8b. d888888b d88888b
74
+ * 88 `8D `88' 88 `8D 88 88 88 `8D 88 `8D d8' `8b `~~88~~' 88'
75
+ * 88 88 88 88 88 88 88 88oodD' 88 88 88ooo88 88 88ooooo
76
+ * 88 88 88 88 88 88 88 88~~~ 88 88 88~~~88 88 88~~~~~
77
+ * 88 .8D .88. 88 .8D 88b d88 88 88 .8D 88 88 88 88.
78
+ * Y8888D' Y888888P Y8888D' ~Y8888P' 88 Y8888D' YP YP YP Y88888P
79
+ *
80
+ *
81
+ */
82
+ componentDidUpdate(prevProps: IFetchBannerXProps): boolean;
83
+ /***
84
+ * d8888b. d88888b d8b db d8888b. d88888b d8888b.
85
+ * 88 `8D 88' 888o 88 88 `8D 88' 88 `8D
86
+ * 88oobY' 88ooooo 88V8o 88 88 88 88ooooo 88oobY'
87
+ * 88`8b 88~~~~~ 88 V8o88 88 88 88~~~~~ 88`8b
88
+ * 88 `88. 88. 88 V888 88 .8D 88. 88 `88.
89
+ * 88 YD Y88888P VP V8P Y8888D' Y88888P 88 YD
90
+ *
91
+ *
92
+ */
93
+ render(): React.ReactElement<IFetchBannerXProps>;
94
+ private _toggleExpando;
95
+ private showSettings;
96
+ private _closePanel;
97
+ private _openPanel;
98
+ private _panelWidth;
99
+ private _togglePropsHelp;
100
+ }
101
+ //# sourceMappingURL=FetchBannerX.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FetchBannerX.d.ts","sourceRoot":"","sources":["../../../src/banner/bannerX/FetchBannerX.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B;;;;;;;;;GASG;AAGH,OAAO,EAAe,WAAW,EAAc,MAAM,8BAA8B,CAAC;AAEpF,OAAO,EAAE,gBAAgB,EAAE,MAAM,qDAAqD,CAAC;AAEvF,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAG,MAAM,kCAAkC,CAAC;AACtF,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAExE,OAAO,EAAE,gCAAgC,EAAE,MAAM,kCAAkC,CAAC;AAIpF,OAAO,EAAS,SAAS,EAAE,MAAM,wBAAwB,CAAC;AA6B1D,MAAM,WAAW,kBAAkB;IAE/B,WAAW,EAAK,mBAAmB,CAAC;IACpC,WAAW,EAAK,gCAAgC,CAAC;IAEjD,WAAW,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC;IACnC,iBAAiB,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC;IACjC,cAAc,CAAC,EAAE,eAAe,CAAC;IAEjC,YAAY,EAAG,YAAY,CAAC;IAE5B,uBAAuB,EAAE,OAAO,EAAE,CAAC;IACnC,sBAAsB,EAAE,OAAO,EAAE,CAAC;IAElC,cAAc,EAAE,GAAG,CAAC;IACpB,QAAQ,EAAE,WAAW,CAAC;IAEtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IAC/B,UAAU,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACzB,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,UAAU,CAAC,EAAE,GAAG,CAAC;CAEpB;AAED,MAAM,WAAW,kBAAkB;IAEjC,SAAS,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IAEpB,aAAa,EAAE,OAAO,CAAC;IAEvB,SAAS,EAAE,SAAS,CAAC;IAErB,gBAAgB,EAAE,OAAO,CAAC;CAG1B;AAED,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,KAAK,CAAC,SAAS,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;IAG9F,OAAO,CAAC,mBAAmB,CAAmF;IAE9G,OAAO,CAAC,mBAAmB;IAO3B,OAAO,CAAC,cAAc,CAAoC;IAG5D;;;;;;;;;OASG;IAED,OAAO,CAAC,kBAAkB,CAAkC;IAE5D,OAAO,CAAC,uBAAuB;IAK/B,OAAO,CAAC,sBAAsB;IAS9B;;;;;;;;;MASE;gBAGiB,KAAK,EAAC,kBAAkB;IAiBpC,iBAAiB;IAUtB;;;;;;;;;KASC;IAEI,kBAAkB,CAAC,SAAS,EAAE,kBAAkB;IAmCzD;;;;;;;;;OASG;IAGM,MAAM,IAAI,KAAK,CAAC,YAAY,CAAC,kBAAkB,CAAC;IA2NvD,OAAO,CAAC,cAAc;IAetB,OAAO,CAAC,YAAY;IAErB,OAAO,CAAC,WAAW;IAInB,OAAO,CAAC,UAAU;IASlB,OAAO,CAAC,WAAW;IAKnB,OAAO,CAAC,gBAAgB;CAKxB"}
@@ -0,0 +1,340 @@
1
+ import * as React from 'react';
2
+ import { DisplayMode } from '@microsoft/sp-core-library';
3
+ import { FPSPinMe, getDefaultFPSPinState, } from '../features/PinMe/FPSPinMenu';
4
+ import { updateFarElementsPinMe } from './PinFunctions';
5
+ import { getWebPartHelpElementX } from '../../common/PropPaneHelp/pages/PropPaneHelp';
6
+ import { createSpecialElement } from '../components/SpecialBanner/component';
7
+ import { Panel, PanelType } from 'office-ui-fabric-react';
8
+ import { getMinPanel } from './MinPanel';
9
+ import { getFullPanel, pivotHeading0, pivotHeadingX } from './FullPanel';
10
+ import { mainBannerContent } from './BannerContent';
11
+ import { getForceNarrow } from './Near/CheckNarrow';
12
+ import { updateNearElements } from './Near/updateNearElements';
13
+ import { setExpandoRamicMode } from '../features/Expando/functions';
14
+ // import { IFieldPanelProps } from '../../components/molecules/FieldPanel/IFieldPanelProps';
15
+ require('@mikezimm/fps-styles/dist/banner.css');
16
+ /***
17
+ * db .d88b. .o88b. .d8b. db
18
+ * 88 .8P Y8. d8P Y8 d8' `8b 88
19
+ * 88 88 88 8P 88ooo88 88
20
+ * 88 88 88 8b 88~~~88 88
21
+ * 88booo. `8b d8' Y8b d8 88 88 88booo.
22
+ * Y88888P `Y88P' `Y88P' YP YP Y88888P
23
+ *
24
+ *
25
+ */
26
+ //Use this to add more console.logs for this component
27
+ const consoleFunctions = true;
28
+ export default class FetchBanner extends React.Component {
29
+ makeLargerCmdStyles() {
30
+ const smaller = JSON.parse(JSON.stringify(this.props.bannerProps.bannerCmdReactCSS));
31
+ smaller.fontSize = 'larger';
32
+ smaller.marginRight = '';
33
+ return smaller;
34
+ }
35
+ buildNearBannerElements() {
36
+ const elements = this.props.nearBannerElementsArray ? this.props.nearBannerElementsArray : [];
37
+ return elements;
38
+ }
39
+ buildFarBannerElements() {
40
+ const farElements = this.props.farBannerElementsArray ? this.props.farBannerElementsArray : [];
41
+ if (this.props.bannerProps.showTricks === true) {
42
+ farElements.push(null);
43
+ }
44
+ return farElements;
45
+ }
46
+ /***
47
+ * .o88b. .d88b. d8b db .d8888. d888888b d8888b. db db .o88b. d888888b .d88b. d8888b.
48
+ * d8P Y8 .8P Y8. 888o 88 88' YP `~~88~~' 88 `8D 88 88 d8P Y8 `~~88~~' .8P Y8. 88 `8D
49
+ * 8P 88 88 88V8o 88 `8bo. 88 88oobY' 88 88 8P 88 88 88 88oobY'
50
+ * 8b 88 88 88 V8o88 `Y8b. 88 88`8b 88 88 8b 88 88 88 88`8b
51
+ * Y8b d8 `8b d8' 88 V888 db 8D 88 88 `88. 88b d88 Y8b d8 88 `8b d8' 88 `88.
52
+ * `Y88P' `Y88P' VP V8P `8888Y' YP 88 YD ~Y8888P' `Y88P' YP `Y88P' 88 YD
53
+ *
54
+ *
55
+ */
56
+ constructor(props) {
57
+ super(props);
58
+ this._webPartHelpElement = getWebPartHelpElementX(this.props.WebPartHelpPivots, this.props.bannerProps);
59
+ this.pimMeCmdStyles = null;
60
+ /***
61
+ * d8b db d88888b .d8b. d8888b. d88888b .d8b. d8888b. d88888b db d88888b
62
+ * 888o 88 88' d8' `8b 88 `8D 88' d8' `8b 88 `8D 88' 88 88'
63
+ * 88V8o 88 88ooooo 88ooo88 88oobY' 88ooo 88ooo88 88oobY' 88ooooo 88 88ooooo
64
+ * 88 V8o88 88~~~~~ 88~~~88 88`8b 88~~~ 88~~~88 88`8b 88~~~~~ 88 88~~~~~
65
+ * 88 V888 88. 88 88 88 `88. 88 88 88 88 `88. 88. 88booo. 88.
66
+ * VP V8P Y88888P YP YP 88 YD YP YP YP 88 YD Y88888P Y88888P Y88888P
67
+ *
68
+ *
69
+ */
70
+ this.nearBannerElements = this.buildNearBannerElements();
71
+ if (consoleFunctions === true)
72
+ console.log('FetchBannerElement ~ constructor');
73
+ const expandoProps = this.props.bannerProps.expandoProps;
74
+ this.state = {
75
+ showPanel: false,
76
+ // keySiteProps: keySiteProps,
77
+ selectedKey: this.props.replacePanelHTML ? pivotHeadingX : pivotHeading0,
78
+ panelType: PanelType.medium,
79
+ showSettings: false,
80
+ expandoramicMode: expandoProps.enableExpandoramic === true && expandoProps.expandoDefault === true ? true : false,
81
+ // renderCount: 0,
82
+ showPropsHelp: false,
83
+ };
84
+ }
85
+ componentDidMount() {
86
+ if (consoleFunctions === true)
87
+ console.log('FetchBannerElement ~ componentDidMount');
88
+ this.pimMeCmdStyles = this.makeLargerCmdStyles();
89
+ //Copied from FPSPageInfo.tsx componentDidMount
90
+ const { displayMode, fpsPinMenu } = this.props.bannerProps;
91
+ const tempPinState = displayMode === DisplayMode.Edit ? 'normal' : this.props.pinState;
92
+ FPSPinMe(fpsPinMenu.domElement, tempPinState, null, false, true, null, fpsPinMenu.pageLayout, displayMode);
93
+ }
94
+ //
95
+ /***
96
+ * d8888b. d888888b d8888b. db db d8888b. d8888b. .d8b. d888888b d88888b
97
+ * 88 `8D `88' 88 `8D 88 88 88 `8D 88 `8D d8' `8b `~~88~~' 88'
98
+ * 88 88 88 88 88 88 88 88oodD' 88 88 88ooo88 88 88ooooo
99
+ * 88 88 88 88 88 88 88 88~~~ 88 88 88~~~88 88 88~~~~~
100
+ * 88 .8D .88. 88 .8D 88b d88 88 88 .8D 88 88 88 88.
101
+ * Y8888D' Y888888P Y8888D' ~Y8888P' 88 Y8888D' YP YP YP Y88888P
102
+ *
103
+ *
104
+ */
105
+ componentDidUpdate(prevProps) {
106
+ if (consoleFunctions === true)
107
+ console.log('FetchBannerElement ~ componentDidUpdate');
108
+ const { displayMode, fpsPinMenu, } = this.props.bannerProps;
109
+ const pinStatus = getDefaultFPSPinState(prevProps.bannerProps.fpsPinMenu, fpsPinMenu, displayMode);
110
+ this.pimMeCmdStyles = this.makeLargerCmdStyles();
111
+ let refresh = false;
112
+ if (pinStatus.refresh === true) {
113
+ FPSPinMe(fpsPinMenu.domElement, pinStatus.defPinState, null, false, true, null, fpsPinMenu.pageLayout, displayMode);
114
+ }
115
+ if (JSON.stringify(prevProps.panelPerformance) !== JSON.stringify(this.props.panelPerformance)) {
116
+ refresh = true;
117
+ }
118
+ else if (prevProps.bonusHTML1 !== this.props.bonusHTML1) {
119
+ refresh = true;
120
+ }
121
+ else if (prevProps.bonusHTML2 !== this.props.bonusHTML2) {
122
+ refresh = true;
123
+ }
124
+ else if (typeof prevProps.appendTitle !== typeof this.props.appendTitle) {
125
+ refresh = true;
126
+ }
127
+ else if (typeof prevProps.appendTitle === 'string' && typeof this.props.appendTitle === 'string' && prevProps.appendTitle && this.props.appendTitle) {
128
+ refresh = true;
129
+ }
130
+ if (refresh === true)
131
+ this._webPartHelpElement = getWebPartHelpElementX(this.props.WebPartHelpPivots, this.props.bannerProps);
132
+ return refresh;
133
+ }
134
+ /***
135
+ * d8888b. d88888b d8b db d8888b. d88888b d8888b.
136
+ * 88 `8D 88' 888o 88 88 `8D 88' 88 `8D
137
+ * 88oobY' 88ooooo 88V8o 88 88 88 88ooooo 88oobY'
138
+ * 88`8b 88~~~~~ 88 V8o88 88 88 88~~~~~ 88`8b
139
+ * 88 `88. 88. 88 V888 88 .8D 88. 88 `88.
140
+ * 88 YD Y88888P VP V8P Y8888D' Y88888P 88 YD
141
+ *
142
+ *
143
+ */
144
+ render() {
145
+ if (consoleFunctions === true)
146
+ console.log('FetchBannerElement ~ render');
147
+ if (this.props.bannerProps.showBanner !== true) {
148
+ return (React.createElement("div", null));
149
+ }
150
+ else {
151
+ const { bannerProps, } = this.props;
152
+ const { displayMode, fpsPinMenu, } = this.props.bannerProps;
153
+ const { showBanner, showTricks, showRepoLinks } = this.props.bannerProps;
154
+ const showPanel = this.state.showPanel;
155
+ const showSettings = this.state.showSettings;
156
+ const forceNarrowStyles = getForceNarrow(this.props.pinState, this.props.updatePinState);
157
+ const farBannerElementsArray = updateFarElementsPinMe({ farBannerElementsArray: this.buildFarBannerElements(),
158
+ displayMode: displayMode, fpsPinMenu: fpsPinMenu, pinState: this.props.pinState, updatePinState: this.props.updatePinState, pimMeCmdStyles: this.pimMeCmdStyles });
159
+ const nearBannerElementsArray = updateNearElements(this.nearBannerElements, this.props.bannerProps, this.showSettings.bind(this), this._toggleExpando.bind(this));
160
+ /***
161
+ * d8888b. .d8b. d8b db d8b db d88888b d8888b. d88888b db d88888b .88b d88. d88888b d8b db d888888b
162
+ * 88 `8D d8' `8b 888o 88 888o 88 88' 88 `8D 88' 88 88' 88'YbdP`88 88' 888o 88 `~~88~~'
163
+ * 88oooY' 88ooo88 88V8o 88 88V8o 88 88ooooo 88oobY' 88ooooo 88 88ooooo 88 88 88 88ooooo 88V8o 88 88
164
+ * 88~~~b. 88~~~88 88 V8o88 88 V8o88 88~~~~~ 88`8b 88~~~~~ 88 88~~~~~ 88 88 88 88~~~~~ 88 V8o88 88
165
+ * 88 8D 88 88 88 V888 88 V888 88. 88 `88. 88. 88booo. 88. 88 88 88 88. 88 V888 88
166
+ * Y8888P' YP YP VP V8P VP V8P Y88888P 88 YD Y88888P Y88888P Y88888P YP YP YP Y88888P VP V8P YP
167
+ *
168
+ *
169
+ */
170
+ const bannerContent = mainBannerContent(bannerProps, forceNarrowStyles, nearBannerElementsArray, farBannerElementsArray, showSettings, this._openPanel.bind(this), this._togglePropsHelp.bind(this));
171
+ /***
172
+ * d888b d88888b d888888b .88b d88. d888888b d8b db d8888b. .d8b. d8b db d88888b db
173
+ * 88' Y8b 88' `~~88~~' 88'YbdP`88 `88' 888o 88 88 `8D d8' `8b 888o 88 88' 88
174
+ * 88 88ooooo 88 88 88 88 88 88V8o 88 88oodD' 88ooo88 88V8o 88 88ooooo 88
175
+ * 88 ooo 88~~~~~ 88 88 88 88 88 88 V8o88 88~~~ 88~~~88 88 V8o88 88~~~~~ 88
176
+ * 88. ~8~ 88. 88 88 88 88 .88. 88 V888 88 88 88 88 V888 88. 88booo.
177
+ * Y888P Y88888P YP YP YP YP Y888888P VP V8P 88 YP YP VP V8P Y88888P Y88888P
178
+ *
179
+ *
180
+ */
181
+ let panelContent = null;
182
+ if (showPanel === true && this.props.bannerProps.showFullPanel !== true) {
183
+ panelContent = getMinPanel(this.props.bannerProps);
184
+ /***
185
+ * d888b d88888b d888888b d88888b db db db db d8888b. .d8b. d8b db d88888b db
186
+ * 88' Y8b 88' `~~88~~' 88' 88 88 88 88 88 `8D d8' `8b 888o 88 88' 88
187
+ * 88 88ooooo 88 88ooo 88 88 88 88 88oodD' 88ooo88 88V8o 88 88ooooo 88
188
+ * 88 ooo 88~~~~~ 88 88~~~ 88 88 88 88 88~~~ 88~~~88 88 V8o88 88~~~~~ 88
189
+ * 88. ~8~ 88. 88 88 88b d88 88booo. 88booo. 88 88 88 88 V888 88. 88booo.
190
+ * Y888P Y88888P YP YP ~Y8888P' Y88888P Y88888P 88 YP YP VP V8P Y88888P Y88888P
191
+ *
192
+ *
193
+ */
194
+ }
195
+ else if (showPanel === true) {
196
+ panelContent = getFullPanel(this.props.bannerProps, this.state.selectedKey);
197
+ }
198
+ /***
199
+ * .o88b. .d88b. d8b db .d8888. d888888b d8888b. .d8b. d8b db d88888b db
200
+ * d8P Y8 .8P Y8. 888o 88 88' YP `~~88~~' 88 `8D d8' `8b 888o 88 88' 88
201
+ * 8P 88 88 88V8o 88 `8bo. 88 88oodD' 88ooo88 88V8o 88 88ooooo 88
202
+ * 8b 88 88 88 V8o88 `Y8b. 88 88~~~ 88~~~88 88 V8o88 88~~~~~ 88
203
+ * Y8b d8 `8b d8' 88 V888 db 8D 88 88 88 88 88 V888 88. 88booo.
204
+ * `Y88P' `Y88P' VP V8P `8888Y' YP 88 YP YP VP V8P Y88888P Y88888P
205
+ *
206
+ *
207
+ */
208
+ const bannerPanel = React.createElement("div", null,
209
+ React.createElement(Panel, { isOpen: showPanel,
210
+ // this prop makes the panel non-modal
211
+ isBlocking: true, onDismiss: this._closePanel.bind(this), closeButtonAriaLabel: "Close", type: this.state.panelType, isLightDismiss: true }, panelContent));
212
+ /***
213
+ * .d8888. d8888b. d88888b .o88b. d888888b .d8b. db
214
+ * 88' YP 88 `8D 88' d8P Y8 `88' d8' `8b 88
215
+ * `8bo. 88oodD' 88ooooo 8P 88 88ooo88 88
216
+ * `Y8b. 88~~~ 88~~~~~ 8b 88 88~~~88 88
217
+ * db 8D 88 88. Y8b d8 .88. 88 88 88booo.
218
+ * `8888Y' 88 Y88888P `Y88P' Y888888P YP YP Y88888P
219
+ *
220
+ *
221
+ */
222
+ let SpecialElement = this.props.SpecialMessage ? createSpecialElement(this.props.SpecialMessage) : undefined;
223
+ /***
224
+ * d8888b. d8888b. .d88b. d8888b. .d8888. db db d88888b db d8888b.
225
+ * 88 `8D 88 `8D .8P Y8. 88 `8D 88' YP 88 88 88' 88 88 `8D
226
+ * 88oodD' 88oobY' 88 88 88oodD' `8bo. 88ooo88 88ooooo 88 88oodD'
227
+ * 88~~~ 88`8b 88 88 88~~~ `Y8b. 88~~~88 88~~~~~ 88 88~~~
228
+ * 88 88 `88. `8b d8' 88 db 8D 88 88 88. 88booo. 88
229
+ * 88 88 YD `Y88P' 88 `8888Y' YP YP Y88888P Y88888P 88
230
+ *
231
+ *
232
+ */
233
+ let propsHelp = null;
234
+ if (this._webPartHelpElement) {
235
+ propsHelp = React.createElement("div", { className: this.state.showPropsHelp !== true ? 'fps-pph-hide' : 'fps-pph-show' }, this._webPartHelpElement ? this._webPartHelpElement : null);
236
+ }
237
+ /***
238
+ * d8888b. d88888b d888888b db db d8888b. d8b db
239
+ * 88 `8D 88' `~~88~~' 88 88 88 `8D 888o 88
240
+ * 88oobY' 88ooooo 88 88 88 88oobY' 88V8o 88
241
+ * 88`8b 88~~~~~ 88 88 88 88`8b 88 V8o88
242
+ * 88 `88. 88. 88 88b d88 88 `88. 88 V888
243
+ * 88 YD Y88888P YP ~Y8888P' 88 YD VP V8P
244
+ *
245
+ *
246
+ */
247
+ return (React.createElement("div", { className: 'banner-component' },
248
+ SpecialElement,
249
+ bannerContent,
250
+ propsHelp,
251
+ bannerPanel)
252
+ // //If refreshId={ this.props.parentState.refreshId } -- causes React minified error #85
253
+ // refreshId={ this.props.refreshId ? this.props.refreshId : '' }
254
+ // displayMode={ bannerProps.displayMode }
255
+ // WebPartHelpElement={ this.props.bannerProps.WebPartHelpElement }
256
+ // SpecialMessage={ this.props.SpecialMessage }
257
+ // forceNarrowStyles= { forceNarrowStyles }
258
+ // contentPages= { this.props.contentPages }
259
+ // feedbackEmail= { bannerProps.feedbackEmail }
260
+ // FPSUser={ bannerProps.FPSUser }
261
+ // exportProps={ bannerProps.exportProps }
262
+ // showBanner={ bannerProps.showBanner }
263
+ // // Adding this to adjust expected width for when prop pane could be opened
264
+ // bannerWidth={ ( bannerProps.bannerWidth ) }
265
+ // pageContext={ bannerProps.pageContext }
266
+ // pageLayout={ bannerProps.pageLayout }
267
+ // title ={ bannerTitle }
268
+ // appendTitle ={ this.props.appendTitle }
269
+ // panelTitle = { bannerProps.panelTitle }
270
+ // infoElement = { bannerProps.infoElement }
271
+ // bannerReactCSS={ bannerProps.bannerReactCSS }
272
+ // bannerCmdReactCSS={ bannerProps.bannerCmdReactCSS }
273
+ // showTricks={ bannerProps.showTricks }
274
+ // showGoToParent={ bannerProps.showGoToParent }
275
+ // showGoToHome={ bannerProps.showGoToHome }
276
+ // onHomePage={ bannerProps.onHomePage }
277
+ // webpartHistory={ bannerProps.webpartHistory }
278
+ // showBannerGear={ bannerProps.showBannerGear }
279
+ // showFullPanel={ bannerProps.showFullPanel }
280
+ // replacePanelHTML={ this.props.replacePanelHTML ? this.props.replacePanelHTML : bannerProps.replacePanelHTML }
281
+ // bonusHTML1={ this.props.bonusHTML1 ? this.props.bonusHTML1 : null }
282
+ // panelPerformance={ this.props.panelPerformance ? this.props.panelPerformance : null as any }
283
+ // bonusHTML2={ this.props.bonusHTML2 ? this.props.bonusHTML2 : null }
284
+ // replacePanelWarning={ bannerProps.replacePanelWarning }
285
+ // hoverEffect={ bannerProps.hoverEffect }
286
+ // gitHubRepo={ bannerProps.gitHubRepo }
287
+ // earyAccess={ bannerProps.earyAccess }
288
+ // wideToggle={ bannerProps.wideToggle }
289
+ // nearElements = { this.nearBannerElements }
290
+ // farElements = { farBannerElementsArray }
291
+ // showRepoLinks={ bannerProps.showRepoLinks }
292
+ // showExport={ bannerProps.showExport }
293
+ // //2022-02-17: Added these for expandoramic mode
294
+ // domElement = { bannerProps.domElement }
295
+ // enableExpandoramic = { bannerProps.enableExpandoramic }
296
+ // expandoDefault = { bannerProps.expandoDefault }
297
+ // expandoStyle = { bannerProps.expandoStyle}
298
+ // expandAlert = { bannerProps.expandAlert }
299
+ // expandConsole = { bannerProps.expandConsole }
300
+ // expandoPadding = { bannerProps.expandoPadding }
301
+ // beAUser = { bannerProps.beAUser }
302
+ // showBeAUserIcon = { bannerProps.showBeAUserIcon }
303
+ // beAUserFunction={ bannerProps.beAUserFunction }
304
+ );
305
+ }
306
+ }
307
+ _toggleExpando() {
308
+ const { domElement, pageLayout } = this.props.bannerProps;
309
+ const { expandoStyle, expandAlert, expandConsole, expandoPadding } = this.props.bannerProps.expandoProps;
310
+ const newMode = this.state.expandoramicMode === true ? false : true;
311
+ setExpandoRamicMode(domElement, newMode, expandoStyle, expandAlert, expandConsole, expandoPadding, pageLayout);
312
+ // if ( this.state.expandoramicMode === true ) {
313
+ this.setState({ expandoramicMode: newMode, });
314
+ // } else {
315
+ // this.setState({ showPanel: true,});
316
+ // }
317
+ }
318
+ showSettings() { this.setState({ showSettings: !this.state.showSettings }); }
319
+ _closePanel() {
320
+ this.setState({ showPanel: false, });
321
+ }
322
+ _openPanel(event) {
323
+ let textCallback = event.currentTarget.dataset.callback;
324
+ if (textCallback && textCallback.length > 0) {
325
+ //Do Nothing
326
+ }
327
+ else {
328
+ this.setState({ showPanel: true, });
329
+ }
330
+ }
331
+ _panelWidth() {
332
+ let newPanelType = this.state.panelType !== PanelType.medium ? PanelType.medium : PanelType.large;
333
+ this.setState({ panelType: newPanelType, });
334
+ }
335
+ _togglePropsHelp() {
336
+ let newState = this.state.showPropsHelp === true ? false : true;
337
+ this.setState({ showPropsHelp: newState });
338
+ }
339
+ }
340
+ //# sourceMappingURL=FetchBannerX.js.map