@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.
- package/CHANGELOG.md +5 -2
- package/lib/banner/bannerX/BannerContent.d.ts +4 -0
- package/lib/banner/bannerX/BannerContent.d.ts.map +1 -0
- package/lib/banner/bannerX/BannerContent.js +151 -0
- package/lib/banner/bannerX/BannerContent.js.map +1 -0
- package/lib/banner/bannerX/FetchBannerX.d.ts +101 -0
- package/lib/banner/bannerX/FetchBannerX.d.ts.map +1 -0
- package/lib/banner/bannerX/FetchBannerX.js +340 -0
- package/lib/banner/bannerX/FetchBannerX.js.map +1 -0
- package/lib/banner/bannerX/FullPanel.d.ts +6 -0
- package/lib/banner/bannerX/FullPanel.d.ts.map +1 -0
- package/lib/banner/bannerX/FullPanel.js +154 -0
- package/lib/banner/bannerX/FullPanel.js.map +1 -0
- package/lib/banner/bannerX/InfoElement.d.ts +4 -0
- package/lib/banner/bannerX/InfoElement.d.ts.map +1 -0
- package/lib/banner/bannerX/InfoElement.js +39 -0
- package/lib/banner/bannerX/InfoElement.js.map +1 -0
- package/lib/banner/bannerX/MinPanel.d.ts +4 -0
- package/lib/banner/bannerX/MinPanel.d.ts.map +1 -0
- package/lib/banner/bannerX/MinPanel.js +14 -0
- package/lib/banner/bannerX/MinPanel.js.map +1 -0
- package/lib/banner/bannerX/Near/CheckNarrow.d.ts +3 -0
- package/lib/banner/bannerX/Near/CheckNarrow.d.ts.map +1 -0
- package/lib/banner/bannerX/Near/CheckNarrow.js +9 -0
- package/lib/banner/bannerX/Near/CheckNarrow.js.map +1 -0
- package/lib/banner/bannerX/Near/beAUserIcon.d.ts +4 -0
- package/lib/banner/bannerX/Near/beAUserIcon.d.ts.map +1 -0
- package/lib/banner/bannerX/Near/beAUserIcon.js +9 -0
- package/lib/banner/bannerX/Near/beAUserIcon.js.map +1 -0
- package/lib/banner/bannerX/Near/expandoIcon.d.ts +4 -0
- package/lib/banner/bannerX/Near/expandoIcon.d.ts.map +1 -0
- package/lib/banner/bannerX/Near/expandoIcon.js +10 -0
- package/lib/banner/bannerX/Near/expandoIcon.js.map +1 -0
- package/lib/banner/bannerX/Near/gearIcon.d.ts +4 -0
- package/lib/banner/bannerX/Near/gearIcon.d.ts.map +1 -0
- package/lib/banner/bannerX/Near/gearIcon.js +7 -0
- package/lib/banner/bannerX/Near/gearIcon.js.map +1 -0
- package/lib/banner/bannerX/Near/goHomeIcon.d.ts +4 -0
- package/lib/banner/bannerX/Near/goHomeIcon.d.ts.map +1 -0
- package/lib/banner/bannerX/Near/goHomeIcon.js +15 -0
- package/lib/banner/bannerX/Near/goHomeIcon.js.map +1 -0
- package/lib/banner/bannerX/Near/goParentIcon.d.ts +4 -0
- package/lib/banner/bannerX/Near/goParentIcon.d.ts.map +1 -0
- package/lib/banner/bannerX/Near/goParentIcon.js +14 -0
- package/lib/banner/bannerX/Near/goParentIcon.js.map +1 -0
- package/lib/banner/bannerX/Near/updateNearElements.d.ts +14 -0
- package/lib/banner/bannerX/Near/updateNearElements.d.ts.map +1 -0
- package/lib/banner/bannerX/Near/updateNearElements.js +27 -0
- package/lib/banner/bannerX/Near/updateNearElements.js.map +1 -0
- package/lib/banner/bannerX/PinFunctions.d.ts +14 -0
- package/lib/banner/bannerX/PinFunctions.d.ts.map +1 -0
- package/lib/banner/bannerX/PinFunctions.js +33 -0
- package/lib/banner/bannerX/PinFunctions.js.map +1 -0
- package/lib/banner/components/EasyPages/createEasyPagesSourceWPProps.d.ts +1 -1
- package/lib/banner/components/EasyPages/createEasyPagesSourceWPProps.d.ts.map +1 -1
- package/lib/banner/components/Gear/CreateKeySiteProps.d.ts +4 -0
- package/lib/banner/components/Gear/CreateKeySiteProps.d.ts.map +1 -0
- package/lib/banner/components/Gear/CreateKeySiteProps.js +14 -0
- package/lib/banner/components/Gear/CreateKeySiteProps.js.map +1 -0
- package/lib/banner/components/Gear/bannerGearFunctions.d.ts +2 -3
- package/lib/banner/components/Gear/bannerGearFunctions.d.ts.map +1 -1
- package/lib/banner/components/Gear/bannerGearFunctions.js +31 -24
- package/lib/banner/components/Gear/bannerGearFunctions.js.map +1 -1
- package/lib/banner/features/Expando/Interfaces.d.ts +2 -0
- package/lib/banner/features/Expando/Interfaces.d.ts.map +1 -1
- package/lib/banner/features/Expando/Interfaces.js.map +1 -1
- package/lib/banner/features/WebPartHistory/HistoryContent.d.ts +4 -0
- package/lib/banner/features/WebPartHistory/HistoryContent.d.ts.map +1 -0
- package/lib/banner/features/WebPartHistory/HistoryContent.js +42 -0
- package/lib/banner/features/WebPartHistory/HistoryContent.js.map +1 -0
- package/lib/banner/interfaces/MinWP/IMinWPBannerProps.d.ts +2 -1
- package/lib/banner/interfaces/MinWP/IMinWPBannerProps.d.ts.map +1 -1
- package/lib/banner/interfaces/MinWP/IMinWPBannerProps.js.map +1 -1
- package/lib/banner/mainReact/IWebpartBannerProps.d.ts +20 -12
- package/lib/banner/mainReact/IWebpartBannerProps.d.ts.map +1 -1
- package/lib/banner/mainReact/ReactComponentProps.d.ts +0 -13
- package/lib/banner/mainReact/ReactComponentProps.d.ts.map +1 -1
- package/lib/banner/mainReact/ReactComponentProps.js +10 -0
- package/lib/banner/mainReact/ReactComponentProps.js.map +1 -1
- package/lib/banner/render/{WebPartRenderBannerV2.d.ts → BuildBannerPropsX.d.ts} +4 -2
- package/lib/banner/render/BuildBannerPropsX.d.ts.map +1 -0
- package/lib/banner/render/{WebPartRenderBannerV2.js → BuildBannerPropsX.js} +36 -20
- package/lib/banner/render/BuildBannerPropsX.js.map +1 -0
- package/lib/banner/render/IBuildBannerSettings.d.ts +1 -1
- package/lib/banner/render/IBuildBannerSettings.d.ts.map +1 -1
- package/lib/banner/render/refreshPanel.js +1 -1
- package/lib/banner/render/refreshPanel.js.map +1 -1
- package/lib/banner/render/refreshPanelHTML.js +1 -1
- package/lib/banner/render/refreshPanelHTML.js.map +1 -1
- package/lib/common/PropPaneHelp/pages/PropPaneHelp.d.ts +4 -0
- package/lib/common/PropPaneHelp/pages/PropPaneHelp.d.ts.map +1 -0
- package/lib/common/PropPaneHelp/pages/PropPaneHelp.js +31 -0
- package/lib/common/PropPaneHelp/pages/PropPaneHelp.js.map +1 -0
- package/lib/common/PropPaneHelp/pages/SitePresetsInfo.d.ts +1 -1
- package/lib/common/PropPaneHelp/pages/SitePresetsInfo.d.ts.map +1 -1
- package/lib/common/PropPaneHelp/pages/SitePresetsInfo.js +4 -2
- package/lib/common/PropPaneHelp/pages/SitePresetsInfo.js.map +1 -1
- package/lib/common/commandStyles/makeYellow.d.ts +3 -0
- package/lib/common/commandStyles/makeYellow.d.ts.map +1 -0
- package/lib/common/commandStyles/makeYellow.js +16 -0
- package/lib/common/commandStyles/makeYellow.js.map +1 -0
- package/lib/common/interfaces/@msft/1.15.2/WebPartContext.d.ts +10 -0
- package/lib/common/interfaces/@msft/1.15.2/WebPartContext.d.ts.map +1 -1
- package/lib/common/interfaces/@msft/1.15.2/WebPartContext.js.map +1 -1
- package/lib/common/interfaces/fps/Window.d.ts +7 -0
- package/lib/common/interfaces/fps/Window.d.ts.map +1 -0
- package/lib/common/interfaces/fps/Window.js +2 -0
- package/lib/common/interfaces/fps/Window.js.map +1 -0
- package/lib/components/atoms/EasyIcons/createEasyIconsWPProps.js +1 -1
- package/lib/components/atoms/EasyIcons/createEasyIconsWPProps.js.map +1 -1
- package/lib/components/molecules/FieldPanel/IFieldPanelProps.d.ts +5 -0
- package/lib/components/molecules/FieldPanel/IFieldPanelProps.d.ts.map +1 -0
- package/lib/components/molecules/FieldPanel/IFieldPanelProps.js +2 -0
- package/lib/components/molecules/FieldPanel/IFieldPanelProps.js.map +1 -0
- package/lib/components/molecules/FieldPanel/PropPaneCols.d.ts +1 -0
- package/lib/components/molecules/FieldPanel/PropPaneCols.d.ts.map +1 -0
- package/lib/components/molecules/FieldPanel/PropPaneCols.js +130 -0
- package/lib/components/molecules/FieldPanel/PropPaneCols.js.map +1 -0
- package/lib/logic/Links/Navigation.d.ts +3 -3
- package/lib/logic/Links/Navigation.d.ts.map +1 -1
- package/lib/logic/Links/Navigation.js +8 -6
- package/lib/logic/Links/Navigation.js.map +1 -1
- package/lib/pnpjs/SourceItems/getSourceItems.js +1 -1
- package/lib/pnpjs/SourceItems/getSourceItems.js.map +1 -1
- package/lib/pnpjs/Users/logic/createIEnsureUserInfo.js +1 -1
- package/lib/pnpjs/Users/logic/createIEnsureUserInfo.js.map +1 -1
- package/package.json +1 -1
- package/lib/banner/banner/component.d.ts +0 -35
- package/lib/banner/banner/component.d.ts.map +0 -1
- package/lib/banner/banner/component.js +0 -537
- package/lib/banner/banner/component.js.map +0 -1
- package/lib/banner/render/WebPartRenderBannerV2.d.ts.map +0 -1
- package/lib/banner/render/WebPartRenderBannerV2.js.map +0 -1
- package/lib/banner/render/buildBannerPropsV1.d.ts +0 -34
- package/lib/banner/render/buildBannerPropsV1.d.ts.map +0 -1
- package/lib/banner/render/buildBannerPropsV1.js +0 -195
- package/lib/banner/render/buildBannerPropsV1.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Navigation.js","sourceRoot":"","sources":["../../../src/logic/Links/Navigation.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,cAAc,CAAE,
|
|
1
|
+
{"version":3,"file":"Navigation.js","sourceRoot":"","sources":["../../../src/logic/Links/Navigation.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,cAAc,CAAE,WAAiC;IAC/D,sBAAsB;IACtB,0CAA0C;IAE1C,6EAA6E;IAC7E,IAAI,MAAM,GAAG,QAAQ,CAAC;IACtB,IAAI,SAAS,GAAG,WAAW,CAAC,GAAG,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,EAAE,WAAW,CAAC,GAAG,CAAC,WAAW,CAAC,WAAW,CAAC,GAAG,CAAC,CAAE,CAAC;IACrG,MAAM,CAAC,IAAI,CAAE,SAAS,EAAE,MAAM,CAAE,CAAC;AAEnC,CAAC;AAED,MAAM,UAAW,YAAY,CAAE,WAAiC;IAC9D,sBAAsB;IACtB,uCAAuC;IAEvC,6EAA6E;IAC7E,IAAI,MAAM,GAAG,QAAQ,CAAC;IACtB,IAAI,SAAS,GAAG,WAAW,CAAC,GAAG,CAAC,WAAW,CAAC;IAC5C,MAAM,CAAC,IAAI,CAAE,SAAS,EAAE,MAAM,CAAE,CAAC;AAEnC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { convertHelpfullError } from '../../logic/indexes/HelpfullErrors';
|
|
2
2
|
import { fetchSourceItems } from "@mikezimm/fps-pnp2/lib/services/sp/fetch/items/fetchSourceItems";
|
|
3
|
-
import { check4Gulp } from '@mikezimm/fps-pnp2';
|
|
3
|
+
import { check4Gulp } from '@mikezimm/fps-pnp2/lib/services/sp/CheckGulping';
|
|
4
4
|
import { saveErrorToLog } from '../Logging';
|
|
5
5
|
/**
|
|
6
6
|
* getSourceItems calls the Pnp function to get the results which returns the raw error.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSourceItems.js","sourceRoot":"","sources":["../../../src/pnpjs/SourceItems/getSourceItems.ts"],"names":[],"mappings":"AACA,OAAO,EAAmC,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAE3G,OAAO,EAAE,gBAAgB,EAAE,MAAM,iEAAiE,CAAC;AAEnG,OAAO,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"getSourceItems.js","sourceRoot":"","sources":["../../../src/pnpjs/SourceItems/getSourceItems.ts"],"names":[],"mappings":"AACA,OAAO,EAAmC,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAE3G,OAAO,EAAE,gBAAgB,EAAE,MAAM,iEAAiE,CAAC;AAEnG,OAAO,EAAE,UAAU,EAAE,MAAM,iDAAiD,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAE,WAAyB,EAAE,OAA4B,EAAE,UAA+B;IAE5H,MAAM,aAAa,GAAG,MAAM,gBAAgB,CAAE,WAAW,EAAE,OAAO,EAAE,UAAU,CAAE,CAAC;IAEjF,MAAM,MAAM,GAAgB;QAC1B,KAAK,EAAE,aAAa,CAAC,KAAK;QAC1B,SAAS,EAAE,IAAW;KACvB,CAAC;IAEF,2DAA2D;IAC3D,IAAK,aAAa,CAAC,CAAC,EAAG;QACrB,MAAM,UAAU,GAAmB,EAAE,CAAC,EAAE,aAAa,CAAC,CAAC,EAAE,OAAO,EAAC,OAAO,EAAG,UAAU,EAAE,UAAU,EAAG,WAAW,EAAE,qBAAqB,EAAG,SAAS,EAAC,IAAI,EAAE,CAAC;QAC1J,MAAM,SAAS,GAAoB,oBAAoB,CAAE,UAAU,CAAE,CAAC;QACtE,MAAM,CAAC,SAAS,GAAG,SAAS,CAAC;QAE7B,cAAc,CAAE,MAAM,CAAC,SAAS,EAAE,UAAU,CAAE,CAAC;KAChD;IAED,IAAK,UAAU,EAAE,KAAK,IAAI,EAAG;QAAE,OAAO,CAAC,GAAG,CAAE,+CAA+C,EAAE,MAAM,CAAE,CAAA;KAAE;IAAA,CAAC;IAExG,OAAO,MAAM,CAAC;AAEhB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { convertHelpfullError } from '../../../logic/indexes';
|
|
1
|
+
import { convertHelpfullError } from '../../../logic/indexes/HelpfullErrors';
|
|
2
2
|
import { BaseErrorTrace } from '../../../PackageConst';
|
|
3
3
|
import { saveErrorToLog } from '../../Logging';
|
|
4
4
|
import { createIUserFromUser } from './createIUserFromUser';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createIEnsureUserInfo.js","sourceRoot":"","sources":["../../../../src/pnpjs/Users/logic/createIEnsureUserInfo.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAmC,MAAM,
|
|
1
|
+
{"version":3,"file":"createIEnsureUserInfo.js","sourceRoot":"","sources":["../../../../src/pnpjs/Users/logic/createIEnsureUserInfo.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAmC,MAAM,uCAAuC,CAAC;AAC9G,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;;;;;;;;GASG;AACH;;;GAGG;AAEH,MAAM,UAAU,qBAAqB,CAAC,MAAc,EAAE,UAA8B,EAAE,MAAc,EAAE,KAAa,EAAE,OAAgB,EAAG,UAAmB,EAAE,SAAkB;IAE7K,IAAI,eAAe,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC3D,MAAM,WAAW,GAAW,CAAC,cAAc,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACvF,MAAM,UAAU,GAAmB,EAAE,CAAC,EAAE,UAAU,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC;IAEjJ,MAAM,MAAM,GAAoB;QAC9B,IAAI,EAAE,mBAAmB,CAAC,UAAU,CAAC,IAAW,EAAE,MAAM,EAAE,IAAI,CAAQ;QACtE,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAW;QACxE,UAAU,EAAE,UAAU;QACtB,MAAM,EAAE,UAAU,CAAC,MAAM;KAC1B,CAAC;IAEF,cAAc,CAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,UAA4B,CAAE,CAAC;IAExE,OAAO,MAAM,CAAC;AAEhB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { IWebpartBannerProps, IWebpartBannerState } from "../mainReact/IWebpartBannerProps";
|
|
3
|
-
export default class WebpartBanner extends React.Component<IWebpartBannerProps, IWebpartBannerState> {
|
|
4
|
-
private getRandomTip;
|
|
5
|
-
private hoverEffect;
|
|
6
|
-
private dev;
|
|
7
|
-
private wideToggle;
|
|
8
|
-
private hasNear;
|
|
9
|
-
private hasFar;
|
|
10
|
-
private hasNearOrFar;
|
|
11
|
-
private nearElements;
|
|
12
|
-
private showSettings;
|
|
13
|
-
private showSettingsAsPivot;
|
|
14
|
-
private settingsContent;
|
|
15
|
-
private isShowTricks;
|
|
16
|
-
private isSiteAdmin;
|
|
17
|
-
private isSiteOwner;
|
|
18
|
-
private makeYellowStyles;
|
|
19
|
-
private PropPaneCmdStyles;
|
|
20
|
-
private createHistoryItem;
|
|
21
|
-
private jumpToParentSite;
|
|
22
|
-
private jumpToHomePage;
|
|
23
|
-
private updateNearElements;
|
|
24
|
-
constructor(props: IWebpartBannerProps);
|
|
25
|
-
componentDidUpdate(prevProps: IWebpartBannerProps): void;
|
|
26
|
-
render(): React.ReactElement<IWebpartBannerProps>;
|
|
27
|
-
_selectedIndex: (item: any) => void;
|
|
28
|
-
private _toggleExpando;
|
|
29
|
-
private _closePanel;
|
|
30
|
-
private _openPanel;
|
|
31
|
-
private _panelWidth;
|
|
32
|
-
private togglePropsHelp;
|
|
33
|
-
private sendFeedback;
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=component.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/banner/banner/component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAqC/B,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAoC5F,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,KAAK,CAAC,SAAS,CAAC,mBAAmB,EAAE,mBAAmB,CAAE;IAEpG,OAAO,CAAC,YAAY;IAMpB,OAAO,CAAC,WAAW,CAAmD;IAEtE,OAAO,CAAC,GAAG,CAAmB;IAE9B,OAAO,CAAC,UAAU,CAAyG;IAE3H,OAAO,CAAC,OAAO,CAAqD;IACpE,OAAO,CAAC,MAAM,CAAoD;IAClE,OAAO,CAAC,YAAY,CAAgE;IAEpF,OAAO,CAAC,YAAY,CAAa;IACjC,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,mBAAmB,CAAS;IAEpC,OAAO,CAAC,eAAe,CAAa;IACpC,OAAO,CAAC,YAAY,CAAyB;IAC7C,OAAO,CAAC,WAAW,CAAwD;IAC3E,OAAO,CAAC,WAAW,CAA2F;IAE9G,OAAO,CAAC,gBAAgB;IAiBxB,OAAO,CAAC,iBAAiB,CAA+E;IAExG,OAAO,CAAC,iBAAiB;IAczB,OAAO,CAAC,gBAAgB;IAKxB,OAAO,CAAE,cAAc;IAKvB,OAAO,CAAC,kBAAkB;gBAyDX,KAAK,EAAE,mBAAmB;IAmDjC,kBAAkB,CAAC,SAAS,EAAE,mBAAmB;IAoCjD,MAAM,IAAI,KAAK,CAAC,YAAY,CAAC,mBAAmB,CAAC;IAgWlD,cAAc,SAAU,GAAG,KAAI,IAAI,CAQzC;IAED,OAAO,CAAC,cAAc;IAYtB,OAAO,CAAC,WAAW;IAInB,OAAO,CAAC,UAAU;IASlB,OAAO,CAAC,WAAW;IAKnB,OAAO,CAAC,eAAe;IAKvB,OAAO,CAAC,YAAY;CAgBpB"}
|
|
@@ -1,537 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { Panel, PanelType } from 'office-ui-fabric-react/lib/Panel';
|
|
3
|
-
import { Pivot, PivotItem, PivotLinkFormat, PivotLinkSize, } from 'office-ui-fabric-react/lib/Pivot';
|
|
4
|
-
import { MessageBar, MessageBarType } from 'office-ui-fabric-react/lib/MessageBar';
|
|
5
|
-
import { DisplayMode, } from '@microsoft/sp-core-library';
|
|
6
|
-
import { Icon, } from 'office-ui-fabric-react/lib/Icon';
|
|
7
|
-
// import { getHelpfullErrorV2 } from "../../../Services/Logging/ErrorHandler";
|
|
8
|
-
// import { createStyleFromString, } from "../../../Services/PropPane/StringToReactCSS";
|
|
9
|
-
// import { IWebpartHistoryItem2, } from "../../../Services/PropPane/WebPartHistory_/Interface";
|
|
10
|
-
// import { bannerSettingsContent } from './bannerGearFunctions_';
|
|
11
|
-
// import { checkDeepProperty } from "../../../Services/Objects_/properties";
|
|
12
|
-
// import { goToParentSite, goToHomePage } from "../../../Services/Navigation/site";
|
|
13
|
-
// import { setExpandoRamicMode } from '../../../Services/DOM_/Expando_/FPSExpandoramic';
|
|
14
|
-
// import { defaultBannerCommandStyles, } from "../../onNpm/defaults_";
|
|
15
|
-
// import { IWebpartBannerProps, IWebpartBannerState, } from '../../../HelpPanelOnNPM/onNpm/bannerProps';
|
|
16
|
-
// import { IKeySiteProps } from '../../onNpm/Moved_/interfaces_';
|
|
17
|
-
import * as links from '../../components/atoms/Links/LinksRepos';
|
|
18
|
-
import WebPartLinks from '../components/WebPartLinks/WebPartLinks';
|
|
19
|
-
import SinglePage from '../components/SingleHelpPage/SinglePage';
|
|
20
|
-
import ReactJson from "react-json-view";
|
|
21
|
-
import { goToHomePage, goToParentSite } from "../../logic/Links/Navigation";
|
|
22
|
-
import { checkDeepProperty } from "../../logic/indexes";
|
|
23
|
-
import { createStyleFromString } from "../../logic/Strings/reactCSS";
|
|
24
|
-
import { createPerformanceTableVisitor } from "../../components/indexes";
|
|
25
|
-
import { createSpecialElement } from "../components/SpecialBanner/component";
|
|
26
|
-
import { setExpandoRamicMode } from "../features/Expando/functions";
|
|
27
|
-
import { bannerSettingsContent } from "../components/Gear/bannerGearFunctions";
|
|
28
|
-
import { defaultBannerCommandStyles } from "../../common/commandStyles/defaults";
|
|
29
|
-
require('./banner.css');
|
|
30
|
-
const pivotStyles = {
|
|
31
|
-
root: {
|
|
32
|
-
whiteSpace: "normal",
|
|
33
|
-
// textAlign: "center"
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
const pivotHeadingX = ''; //2022-01-31: Added Pivot Tiles
|
|
37
|
-
const pivotHeading0 = 'Why'; //2022-01-31: Added Pivot Tiles
|
|
38
|
-
const pivotHeading1 = 'Getting started'; //Templates
|
|
39
|
-
const pivotHeading2 = 'Basics'; //Templates
|
|
40
|
-
const pivotHeading3 = 'Advanced'; //Templates
|
|
41
|
-
const pivotHeading4 = 'Future'; //Templates
|
|
42
|
-
const pivotHeading5 = 'Dev'; //Templates
|
|
43
|
-
const pivotHeading6 = 'Errors'; //Templates
|
|
44
|
-
const pivotHeading7 = 'Tricks'; //Templates
|
|
45
|
-
const pivotHeading8 = 'About'; //Templates
|
|
46
|
-
const pivotHeading9 = 'Export'; //Templates
|
|
47
|
-
const pivotHeadingA = 'History'; //Templates
|
|
48
|
-
const pivotHeadingB = 'Health'; //Templates
|
|
49
|
-
export default class WebpartBanner extends React.Component {
|
|
50
|
-
getRandomTip(webParTipsX) {
|
|
51
|
-
return webParTipsX[Math.floor(Math.random() * webParTipsX.length)];
|
|
52
|
-
}
|
|
53
|
-
showSettings() { this.setState({ showSettings: !this.state.showSettings }); }
|
|
54
|
-
makeYellowStyles(defStyles) {
|
|
55
|
-
if (!defStyles) {
|
|
56
|
-
return {};
|
|
57
|
-
}
|
|
58
|
-
else {
|
|
59
|
-
let newStyle = JSON.parse(JSON.stringify(defStyles));
|
|
60
|
-
newStyle.color = 'black';
|
|
61
|
-
newStyle.background = 'yellow';
|
|
62
|
-
newStyle.fontSize = '20px';
|
|
63
|
-
newStyle.fontWeight = 400;
|
|
64
|
-
newStyle.padding = '7px';
|
|
65
|
-
newStyle.marginLeft = '10px';
|
|
66
|
-
return newStyle;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
createHistoryItem(item) {
|
|
70
|
-
if (item.changes.length === 0) {
|
|
71
|
-
return null;
|
|
72
|
-
}
|
|
73
|
-
const changes = item.changes.map((change, idx) => {
|
|
74
|
-
return React.createElement("tr", null,
|
|
75
|
-
React.createElement("td", null,
|
|
76
|
-
change.prop,
|
|
77
|
-
" : "),
|
|
78
|
-
React.createElement("td", { title: change.value }, change.value ? change.value : 'Empty'));
|
|
79
|
-
});
|
|
80
|
-
return React.createElement("div", { className: 'history-item' },
|
|
81
|
-
React.createElement("div", null,
|
|
82
|
-
item.user,
|
|
83
|
-
" : ",
|
|
84
|
-
new Date(item.time).toLocaleString()),
|
|
85
|
-
React.createElement("table", null, changes));
|
|
86
|
-
}
|
|
87
|
-
jumpToParentSite() {
|
|
88
|
-
let e = event;
|
|
89
|
-
goToParentSite(e, this.props.pageContext);
|
|
90
|
-
}
|
|
91
|
-
jumpToHomePage() {
|
|
92
|
-
let e = event;
|
|
93
|
-
goToHomePage(e, this.props.pageContext);
|
|
94
|
-
}
|
|
95
|
-
updateNearElements(keySiteProps) {
|
|
96
|
-
this.nearElements = [];
|
|
97
|
-
if (this.props.showBeAUserIcon === true && this.props.beAUserFunction) {
|
|
98
|
-
this.nearElements.push(React.createElement(Icon, { iconName: 'Glasses', onClick: this.props.beAUserFunction, style: this.props.bannerCmdReactCSS, title: "Simulate a typical visitor experience" }));
|
|
99
|
-
this.hasNear = true;
|
|
100
|
-
this.hasNearOrFar = true;
|
|
101
|
-
}
|
|
102
|
-
if (this.props.showBannerGear === true) {
|
|
103
|
-
this.nearElements.push(React.createElement(Icon, { iconName: 'PlayerSettings', onClick: this.showSettings.bind(this), style: this.props.bannerCmdReactCSS, title: "Show Settings quick links and info" }));
|
|
104
|
-
this.hasNear = true;
|
|
105
|
-
this.hasNearOrFar = true;
|
|
106
|
-
// (property) pageContext: PageContext
|
|
107
|
-
// Argument of type 'import("C:/Users/dev/Documents/GitHub/ALVFinMan7/node_modules/@mikezimm/npmfunctions/node_modules/@microsoft/sp-page-context/dist/index-internal").PageContext' is not assignable to parameter of type 'import("C:/Users/dev/Documents/GitHub/ALVFinMan7/node_modules/@microsoft/sp-page-context/dist/index-internal").PageContext'.
|
|
108
|
-
// Type 'PageContext' is missing the following properties from type 'PageContext': _searchData, _getUrlParser, _isQueryStringParamsKSActivatedts(2345)
|
|
109
|
-
//2022-04-19: Had to add as any to pageContext due to error
|
|
110
|
-
let bannerContent = bannerSettingsContent(this.props.showTricks, this.props.pageContext, keySiteProps, defaultBannerCommandStyles, this.props.bannerWidth, this.props.forceNarrowStyles);
|
|
111
|
-
this.settingsContent = bannerContent.content;
|
|
112
|
-
// console.log('b4 showSettingsAsPivot, forceNarrowStyles', this.showSettingsAsPivot, this.props.forceNarrowStyles );
|
|
113
|
-
this.showSettingsAsPivot = this.props.forceNarrowStyles === true ? true : bannerContent.showSettingsAsPivot;
|
|
114
|
-
// console.log('af showSettingsAsPivot, forceNarrowStyles', this.showSettingsAsPivot, this.props.forceNarrowStyles );
|
|
115
|
-
}
|
|
116
|
-
if (this.props.enableExpandoramic === true) {
|
|
117
|
-
let thisIcon = this.props.expandoDefault === true ? 'BackToWindow' : 'ChromeFullScreen';
|
|
118
|
-
this.nearElements.push(React.createElement(Icon, { iconName: 'ChromeFullScreen', onClick: this._toggleExpando.bind(this), style: this.props.bannerCmdReactCSS, title: "Toggle Expandoramic Mode" }));
|
|
119
|
-
this.hasNear = true;
|
|
120
|
-
this.hasNearOrFar = true;
|
|
121
|
-
}
|
|
122
|
-
if (this.props.onHomePage !== true && this.props.showGoToHome === true) {
|
|
123
|
-
let titleHome = 'Go to Home Page of current site';
|
|
124
|
-
this.hasNear = true;
|
|
125
|
-
this.hasNearOrFar = true;
|
|
126
|
-
//This is the easy fix that assumes the page is not in a folder in site pages.
|
|
127
|
-
this.nearElements.push(React.createElement("div", { style: { paddingRight: undefined }, className: '', title: titleHome },
|
|
128
|
-
React.createElement(Icon, { iconName: 'Home', onClick: this.jumpToHomePage.bind(this), style: this.props.bannerCmdReactCSS })));
|
|
129
|
-
}
|
|
130
|
-
if (this.props.showGoToParent === true && this.props.pageContext.site.absoluteUrl !== this.props.pageContext.web.absoluteUrl) {
|
|
131
|
-
let title = 'Go to parent site';
|
|
132
|
-
this.hasNear = true;
|
|
133
|
-
this.hasNearOrFar = true;
|
|
134
|
-
this.nearElements.push(React.createElement("div", { style: { paddingRight: undefined }, className: '', title: title },
|
|
135
|
-
React.createElement(Icon, { iconName: 'Up', onClick: this.jumpToParentSite.bind(this), style: this.props.bannerCmdReactCSS })));
|
|
136
|
-
}
|
|
137
|
-
this.nearElements.push(...this.props.nearElements);
|
|
138
|
-
}
|
|
139
|
-
constructor(props) {
|
|
140
|
-
super(props);
|
|
141
|
-
this.hoverEffect = this.props.hoverEffect === false ? false : true;
|
|
142
|
-
this.dev = undefined; //devTable( ); https://github.com/mikezimm/ALVFinMan/issues/171
|
|
143
|
-
this.wideToggle = this.props.wideToggle === null || this.props.wideToggle === undefined ? true : this.props.wideToggle;
|
|
144
|
-
this.hasNear = this.props.nearElements.length > 0 ? true : false;
|
|
145
|
-
this.hasFar = this.props.farElements.length > 0 ? true : false;
|
|
146
|
-
this.hasNearOrFar = this.hasNear === true || this.hasFar === true ? true : false;
|
|
147
|
-
this.nearElements = [];
|
|
148
|
-
this.showSettingsAsPivot = false;
|
|
149
|
-
this.settingsContent = null;
|
|
150
|
-
this.isShowTricks = this.props.showTricks;
|
|
151
|
-
this.isSiteAdmin = this.props.pageContext.legacyPageContext.isSiteAdmin;
|
|
152
|
-
this.isSiteOwner = this.isSiteAdmin === true ? true : this.props.pageContext.legacyPageContext.isSiteOwner;
|
|
153
|
-
this.PropPaneCmdStyles = this.makeYellowStyles(this.props.bannerCmdReactCSS);
|
|
154
|
-
this._selectedIndex = (item) => {
|
|
155
|
-
//This sends back the correct pivot category which matches the category on the tile.
|
|
156
|
-
let e = event;
|
|
157
|
-
let itemKey = item.props.itemKey;
|
|
158
|
-
this.setState({ selectedKey: itemKey });
|
|
159
|
-
};
|
|
160
|
-
let pageContext = this.props.pageContext;
|
|
161
|
-
let LimtedDowload = null;
|
|
162
|
-
let spFeatures = pageContext.spFeatureInfo && pageContext.spFeatureInfo.features && pageContext.spFeatureInfo.features.length > 0 ? pageContext.spFeatureInfo.features : null;
|
|
163
|
-
if (spFeatures) {
|
|
164
|
-
spFeatures.map((feature) => {
|
|
165
|
-
if (feature.key === 'FollowingContent') {
|
|
166
|
-
if (feature.value && feature.value.enabled === true) {
|
|
167
|
-
}
|
|
168
|
-
if (feature.value && feature.value.version === 2) {
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
});
|
|
172
|
-
}
|
|
173
|
-
let keySiteProps = {
|
|
174
|
-
SiteLogoUrl: pageContext.web.logoUrl,
|
|
175
|
-
LimitedDownload: null,
|
|
176
|
-
WebTimezone: checkDeepProperty(pageContext, ['web', 'timeZoneInfo', 'description'], 'ShortError'),
|
|
177
|
-
WebLanguage: `${checkDeepProperty(pageContext, ['cultureInfo', 'currentCultureName'], 'ShortError')} - ${checkDeepProperty(pageContext, ['web', 'language'], 'ShortError')}`,
|
|
178
|
-
UserTimezone: checkDeepProperty(pageContext, ['user', 'timeZoneInfo', 'description'], 'ShortError'),
|
|
179
|
-
UserTimePref: checkDeepProperty(pageContext, ['user', 'preferUserTimeZone'], 'ShortError'),
|
|
180
|
-
BrokenPermissions: null, // TBD
|
|
181
|
-
};
|
|
182
|
-
this.updateNearElements(keySiteProps);
|
|
183
|
-
this.state = {
|
|
184
|
-
keySiteProps: keySiteProps,
|
|
185
|
-
showPanel: false,
|
|
186
|
-
selectedKey: this.props.replacePanelHTML ? pivotHeadingX : pivotHeading0,
|
|
187
|
-
panelType: PanelType.medium,
|
|
188
|
-
showSettings: false,
|
|
189
|
-
expandoramicMode: this.props.enableExpandoramic === true && this.props.expandoDefault === true ? true : false,
|
|
190
|
-
renderCount: 0,
|
|
191
|
-
showPropsHelp: false,
|
|
192
|
-
};
|
|
193
|
-
}
|
|
194
|
-
// Tried this to get it to update when prop pane was changed but it does
|
|
195
|
-
componentDidUpdate(prevProps) {
|
|
196
|
-
let rebuildNearElements = JSON.stringify(this.props.bannerCmdReactCSS) !== JSON.stringify(prevProps.bannerCmdReactCSS) ? true : false;
|
|
197
|
-
if (this.props.webpartHistory.thisInstance && (JSON.stringify(this.props.webpartHistory.thisInstance.changes) !==
|
|
198
|
-
JSON.stringify(prevProps.webpartHistory.thisInstance.changes))) {
|
|
199
|
-
rebuildNearElements = true;
|
|
200
|
-
}
|
|
201
|
-
if (this.props.beAUser != prevProps.beAUser) {
|
|
202
|
-
rebuildNearElements = true;
|
|
203
|
-
}
|
|
204
|
-
if (this.props.infoElement != prevProps.infoElement) {
|
|
205
|
-
rebuildNearElements = true;
|
|
206
|
-
}
|
|
207
|
-
if (this.props.hoverEffect != prevProps.hoverEffect) {
|
|
208
|
-
rebuildNearElements = true;
|
|
209
|
-
this.hoverEffect = this.props.hoverEffect === false ? false : true;
|
|
210
|
-
}
|
|
211
|
-
if (this.props.forceNarrowStyles != prevProps.forceNarrowStyles) {
|
|
212
|
-
rebuildNearElements = true;
|
|
213
|
-
}
|
|
214
|
-
//Check if cmd style props changed and update EditPropPane styles
|
|
215
|
-
if (JSON.stringify(this.props.bannerCmdReactCSS) != JSON.stringify(prevProps.bannerCmdReactCSS)) {
|
|
216
|
-
this.PropPaneCmdStyles = this.makeYellowStyles(this.props.bannerCmdReactCSS);
|
|
217
|
-
rebuildNearElements = true;
|
|
218
|
-
}
|
|
219
|
-
if (prevProps.refreshId !== this.props.refreshId) {
|
|
220
|
-
rebuildNearElements = true;
|
|
221
|
-
}
|
|
222
|
-
if (rebuildNearElements) {
|
|
223
|
-
this.updateNearElements(this.state.keySiteProps);
|
|
224
|
-
rebuildNearElements = true;
|
|
225
|
-
let renderCount = this.state.renderCount + 1;
|
|
226
|
-
this.setState({ renderCount: renderCount });
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
render() {
|
|
230
|
-
const { showBanner, showTricks, showRepoLinks } = this.props;
|
|
231
|
-
const showPanel = this.state.showPanel;
|
|
232
|
-
if (showBanner !== true) {
|
|
233
|
-
return (React.createElement("div", null));
|
|
234
|
-
}
|
|
235
|
-
else {
|
|
236
|
-
let propsHelp = null;
|
|
237
|
-
if (this.props.WebPartHelpElement) {
|
|
238
|
-
propsHelp = React.createElement("div", { className: this.state.showPropsHelp !== true ? 'fps-pph-hide' : 'fps-pph-show' }, this.props.WebPartHelpElement ? this.props.WebPartHelpElement : null);
|
|
239
|
-
}
|
|
240
|
-
// Estimated width pixels used by banner. Used to determine max size of the title component.
|
|
241
|
-
let usedWidth = 40; //20px padding on outside of all elements
|
|
242
|
-
usedWidth += this.nearElements.length * 43 + this.props.farElements.length * 43; //Add 45px per icon button
|
|
243
|
-
// usedWidth += 40; //Padding between near/far elements and the text part of heading
|
|
244
|
-
const remainingWidth = this.props.bannerWidth - usedWidth - 40;
|
|
245
|
-
let moreInfoText = this.props.infoElement ? this.props.infoElement : 'More Information';
|
|
246
|
-
let bannerTitleText = this.props.title && this.props.title.length > 0 ? this.props.title.trim() : 'FPS Webpart';
|
|
247
|
-
const textWidth = (moreInfoText.length + bannerTitleText.length) * 19 + 40; //characters * 19px + 40 padding
|
|
248
|
-
if (bannerTitleText && ['hide', 'ignore', 'empty'].indexOf(bannerTitleText.toLowerCase()) >= 0) {
|
|
249
|
-
bannerTitleText = '';
|
|
250
|
-
}
|
|
251
|
-
// If space between < estimated space needed, apply ratio, else just leave large on both sides so the math works.
|
|
252
|
-
const moreInfoRatio = textWidth > remainingWidth ? moreInfoText.length / (moreInfoText.length + bannerTitleText.length) : .7;
|
|
253
|
-
const titleRatio = textWidth > remainingWidth ? 1 - moreInfoRatio : .7;
|
|
254
|
-
if (this.props.bannerWidth < 700 && moreInfoText.length > 5) {
|
|
255
|
-
moreInfoText = moreInfoText === 'More Information' ? 'Info' : moreInfoText.substring(0, 5) + '...';
|
|
256
|
-
}
|
|
257
|
-
// usedWidth += 18 * bannerTitleText.length; //Est 18px per character of title
|
|
258
|
-
let bannerStyle = {};
|
|
259
|
-
if (this.props.bannerReactCSS) {
|
|
260
|
-
bannerStyle = this.props.bannerReactCSS;
|
|
261
|
-
}
|
|
262
|
-
else if (this.props.styleString) {
|
|
263
|
-
bannerStyle = createStyleFromString(this.props.styleString, { background: 'green' }, 'bannerStyle in banner/component.tsx ~ 81');
|
|
264
|
-
}
|
|
265
|
-
if (!bannerStyle.height) {
|
|
266
|
-
bannerStyle.height = '35px';
|
|
267
|
-
}
|
|
268
|
-
if (!bannerStyle.paddingLeft) {
|
|
269
|
-
bannerStyle.paddingLeft = '20px';
|
|
270
|
-
}
|
|
271
|
-
if (!bannerStyle.paddingRight) {
|
|
272
|
-
bannerStyle.paddingRight = '20px';
|
|
273
|
-
}
|
|
274
|
-
if (this.hasNearOrFar === false) {
|
|
275
|
-
bannerStyle.cursor = 'pointer';
|
|
276
|
-
}
|
|
277
|
-
const classNames = ['container', this.hoverEffect === true ? 'opacity' : null, 'flex-container'].join(' ');
|
|
278
|
-
// On clicks need to be defined like this and only put on specific elements in certain cases.
|
|
279
|
-
// OR ELSE they will all get fired messing up panel open
|
|
280
|
-
const bannerOnClick = this.hasNearOrFar !== true ? this._openPanel.bind(this) : undefined;
|
|
281
|
-
const titleInfoOnClick = this.hasNearOrFar === true ? this._openPanel.bind(this) : undefined;
|
|
282
|
-
const titleInfoCursor = this.hasNearOrFar === true ? 'pointer' : undefined;
|
|
283
|
-
const styleFlexElements = { padding: '10px', cursor: titleInfoCursor };
|
|
284
|
-
//Added for https://github.com/mikezimm/PageInfo/issues/30
|
|
285
|
-
const isPinned = this.props.domElement && this.props.domElement.offsetParent && this.props.domElement.offsetParent.classList.contains('pinMeWebPartDefault') ? true : false;
|
|
286
|
-
const isPageInfo = this.props.gitHubRepo.desc === links.gitRepoPageInfoSmall.desc ? true : false;
|
|
287
|
-
const maxWidth = isPinned === true || isPageInfo === true ? '200px' : titleRatio * remainingWidth;
|
|
288
|
-
const styleLeftTitle = { padding: '10px', cursor: titleInfoCursor, maxWidth: maxWidth, overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' };
|
|
289
|
-
const styleRightTitle = { padding: '10px', cursor: titleInfoCursor, maxWidth: moreInfoRatio * remainingWidth, overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' };
|
|
290
|
-
const isMoreInfoButton = typeof this.props.infoElement === 'string' && this.props.infoElement.toLowerCase().indexOf('iconname=') === 0 ? true : false;
|
|
291
|
-
const infoElement = [];
|
|
292
|
-
if (this.props.feedbackEmail) {
|
|
293
|
-
infoElement.push(React.createElement(Icon, { title: 'Submit Feedback', iconName: 'Feedback', onClick: this.sendFeedback.bind(this), style: this.props.bannerCmdReactCSS }));
|
|
294
|
-
}
|
|
295
|
-
;
|
|
296
|
-
if (isMoreInfoButton === true) {
|
|
297
|
-
let iconName = this.props.infoElement.split('=')[1];
|
|
298
|
-
infoElement.push(React.createElement(Icon, { iconName: iconName, onClick: titleInfoOnClick, style: this.props.bannerCmdReactCSS, title: "More Information on webpart" }));
|
|
299
|
-
}
|
|
300
|
-
else {
|
|
301
|
-
infoElement.push(React.createElement("div", { style: styleRightTitle, onClick: titleInfoOnClick, title: 'More Information on webpart' }, moreInfoText));
|
|
302
|
-
}
|
|
303
|
-
if (this.props.displayMode === DisplayMode.Edit && this.props.WebPartHelpElement) {
|
|
304
|
-
infoElement.push(
|
|
305
|
-
//Found I had to makeYellowStyles every render to make this work.
|
|
306
|
-
React.createElement(Icon, { iconName: 'OpenEnrollment', onClick: this.togglePropsHelp.bind(this), style: this.makeYellowStyles(this.props.bannerCmdReactCSS), title: 'Property Pane Help' }));
|
|
307
|
-
}
|
|
308
|
-
const appendTitle = this.props.appendTitle ? this.props.appendTitle : '';
|
|
309
|
-
const bannerLeft = this.nearElements.length === 0 ? React.createElement("div", { style: styleFlexElements, onClick: titleInfoOnClick },
|
|
310
|
-
" ",
|
|
311
|
-
bannerTitleText,
|
|
312
|
-
" ") :
|
|
313
|
-
React.createElement("div", { className: 'flex-left-nowrap-start' },
|
|
314
|
-
this.nearElements,
|
|
315
|
-
React.createElement("div", { style: styleLeftTitle, onClick: titleInfoOnClick, title: bannerTitleText },
|
|
316
|
-
" ",
|
|
317
|
-
bannerTitleText,
|
|
318
|
-
" ",
|
|
319
|
-
appendTitle,
|
|
320
|
-
" "));
|
|
321
|
-
const bannerRight = this.props.farElements.length === 0 && infoElement.length === 0 ? React.createElement("div", { style: styleFlexElements, onClick: titleInfoOnClick }, moreInfoText) :
|
|
322
|
-
React.createElement("div", { className: 'flex-left-nowrap-start' }, [...this.props.farElements, ...infoElement,]);
|
|
323
|
-
let showSettingStyle = this.showSettingsAsPivot === true ? 'show-settings show-settings-pivot' : 'show-settings show-settings-flex';
|
|
324
|
-
console.log('showSettingStyle ~ 326', showSettingStyle);
|
|
325
|
-
let bannerContent = React.createElement("div", null,
|
|
326
|
-
React.createElement("div", { className: classNames, style: bannerStyle, onClick: bannerOnClick },
|
|
327
|
-
bannerLeft,
|
|
328
|
-
bannerRight),
|
|
329
|
-
React.createElement("div", { className: this.state.showSettings ? showSettingStyle : 'hide-settings', style: {} }, this.settingsContent));
|
|
330
|
-
let thisPage = null;
|
|
331
|
-
let panelContent = null;
|
|
332
|
-
if (showPanel === true && this.props.showFullPanel !== true) {
|
|
333
|
-
const bonusHTML1 = this.props.bonusHTML1 ? this.props.bonusHTML1 : null;
|
|
334
|
-
const panelPerformance = this.props.panelPerformance ? createPerformanceTableVisitor(this.props.panelPerformance, []) : null;
|
|
335
|
-
const bonusHTML2 = this.props.bonusHTML2 ? this.props.bonusHTML2 : null;
|
|
336
|
-
panelContent = React.createElement("div", null,
|
|
337
|
-
this.props.replacePanelHTML,
|
|
338
|
-
bonusHTML1 ? React.createElement("div", null, bonusHTML1) : null,
|
|
339
|
-
panelPerformance ? React.createElement("div", null, panelPerformance) : null,
|
|
340
|
-
bonusHTML2 ? React.createElement("div", null, bonusHTML2) : null);
|
|
341
|
-
}
|
|
342
|
-
else if (showPanel === true) {
|
|
343
|
-
const webPartLinks = React.createElement(WebPartLinks, { parentListURL: '', childListURL: '', parentListName: '', childListName: '', repoObject: this.props.gitHubRepo, showRepoLinks: this.props.showRepoLinks });
|
|
344
|
-
const thisWindow = window;
|
|
345
|
-
let content = null;
|
|
346
|
-
// let showMedical = this.isShowTricks && ( thisWindow.FPSUser || thisWindow.FPSOptions ) ? true : false;
|
|
347
|
-
let showMedical = this.isShowTricks === true && (thisWindow.FPSUser || thisWindow.FPSOptions) ? true : false;
|
|
348
|
-
const bonusHTML1 = this.props.bonusHTML1 ? this.props.bonusHTML1 : null;
|
|
349
|
-
const panelPerformance = this.props.panelPerformance ? createPerformanceTableVisitor(this.props.panelPerformance, []) : null;
|
|
350
|
-
const bonusHTML2 = this.props.bonusHTML2 ? this.props.bonusHTML2 : null;
|
|
351
|
-
if (this.state.selectedKey === pivotHeadingX) {
|
|
352
|
-
console.log('Banner component -build content');
|
|
353
|
-
content = React.createElement("div", null,
|
|
354
|
-
React.createElement("div", { style: { padding: '10px 20px 20px 20px', background: 'yellow', marginTop: '20px' } }, this.props.replacePanelWarning),
|
|
355
|
-
React.createElement("div", null, this.props.replacePanelHTML),
|
|
356
|
-
bonusHTML1 ? React.createElement("div", null, bonusHTML1) : null,
|
|
357
|
-
panelPerformance ? React.createElement("div", null, panelPerformance) : null,
|
|
358
|
-
bonusHTML2 ? React.createElement("div", null, bonusHTML2) : null);
|
|
359
|
-
// import { whyContent } from './HelpPanel/Content/Whyme';
|
|
360
|
-
// import { aboutTable } from './HelpPanel/Content/About';
|
|
361
|
-
// import { gettingStartedContent } from './HelpPanel/Content/GettingStarted';
|
|
362
|
-
// import { errorsContent } from './HelpPanel/Content/Errors';
|
|
363
|
-
// import { advancedContent } from './HelpPanel/Content/Advanced';
|
|
364
|
-
// import { futureContent } from './HelpPanel/Content/FuturePlans';
|
|
365
|
-
// import { basicsContent } from './HelpPanel/Content/Basics';
|
|
366
|
-
// import { tricksTable } from './HelpPanel/Content/Tricks';
|
|
367
|
-
// import { webParTips } from './HelpPanel/Content/Tips';
|
|
368
|
-
}
|
|
369
|
-
else if (this.state.selectedKey === pivotHeading1) {
|
|
370
|
-
content = this.props.contentPages.gettingStartedContent;
|
|
371
|
-
}
|
|
372
|
-
else if (this.state.selectedKey === pivotHeading2) {
|
|
373
|
-
content = this.props.contentPages.basicsContent;
|
|
374
|
-
}
|
|
375
|
-
else if (this.state.selectedKey === pivotHeading3) {
|
|
376
|
-
content = this.props.contentPages.advancedContent;
|
|
377
|
-
}
|
|
378
|
-
else if (this.state.selectedKey === pivotHeading4) {
|
|
379
|
-
content = this.props.contentPages.futureContent;
|
|
380
|
-
}
|
|
381
|
-
else if (this.state.selectedKey === pivotHeading5) {
|
|
382
|
-
content = this.dev;
|
|
383
|
-
}
|
|
384
|
-
else if (this.state.selectedKey === pivotHeading6) {
|
|
385
|
-
content = this.props.contentPages.errorsContent;
|
|
386
|
-
}
|
|
387
|
-
else if (this.state.selectedKey === pivotHeading7) {
|
|
388
|
-
content = this.props.contentPages.tricksTable;
|
|
389
|
-
}
|
|
390
|
-
else if (this.state.selectedKey === pivotHeading8) {
|
|
391
|
-
content = this.props.contentPages.aboutTable;
|
|
392
|
-
}
|
|
393
|
-
else if (this.state.selectedKey === pivotHeading0) { //2022-01-31: Added Pivot Tiles
|
|
394
|
-
content = this.props.contentPages.whyContent;
|
|
395
|
-
}
|
|
396
|
-
else if (this.state.selectedKey === pivotHeading9) { //2022-01-31: Added Pivot Tiles
|
|
397
|
-
content = React.createElement("div", { id: "CommandsJSONPanel", style: { paddingTop: '20px' } },
|
|
398
|
-
React.createElement("h3", null, "Summary of Exportable Properties"),
|
|
399
|
-
React.createElement(ReactJson, { src: this.props.exportProps, name: 'Export Properties', collapsed: false, displayDataTypes: true, displayObjectSize: true, enableClipboard: true, style: { padding: '10px 0px' } }),
|
|
400
|
-
React.createElement(ReactJson, { src: this.props.webpartHistory, name: 'Webpart History', collapsed: true, displayDataTypes: true, displayObjectSize: true, enableClipboard: true, style: { padding: '10px 0px' } }));
|
|
401
|
-
}
|
|
402
|
-
else if (this.state.selectedKey === pivotHeadingA) { //2022-01-31: Added Pivot Tiles
|
|
403
|
-
const thisInstance = this.createHistoryItem(this.props.webpartHistory.thisInstance);
|
|
404
|
-
let thisInstanceChanges = this.props.webpartHistory.thisInstance.changes.length === 0 ? null : React.createElement("div", null,
|
|
405
|
-
React.createElement("div", { style: { fontSize: 'large', textDecoration: 'underline' } }, "This edit session"),
|
|
406
|
-
thisInstance);
|
|
407
|
-
let priorHistoryChanges = null;
|
|
408
|
-
if (this.props.webpartHistory.history && this.props.webpartHistory.history.length > 0) {
|
|
409
|
-
let priorHistory = [];
|
|
410
|
-
this.props.webpartHistory.history.map((item) => {
|
|
411
|
-
if (this.props.webpartHistory.thisInstance.time !== item.time) {
|
|
412
|
-
priorHistory.push(this.createHistoryItem(item));
|
|
413
|
-
}
|
|
414
|
-
});
|
|
415
|
-
priorHistoryChanges = React.createElement("div", null,
|
|
416
|
-
React.createElement("div", { style: { fontSize: 'large', textDecoration: 'underline' } }, "Previous edit sessions"),
|
|
417
|
-
priorHistory);
|
|
418
|
-
}
|
|
419
|
-
content = React.createElement("div", { id: "HistoryPanel", style: { paddingTop: '20px' } },
|
|
420
|
-
thisInstanceChanges,
|
|
421
|
-
priorHistoryChanges);
|
|
422
|
-
}
|
|
423
|
-
else if (this.state.selectedKey === pivotHeadingB) { //2022-01-31: Added Pivot Tiles
|
|
424
|
-
if (showMedical === true) {
|
|
425
|
-
let medicalElements = [];
|
|
426
|
-
if (thisWindow.FPSUser) {
|
|
427
|
-
medicalElements.push(React.createElement(ReactJson, { src: thisWindow.FPSUser, name: 'FPSUser', collapsed: true, displayDataTypes: true, displayObjectSize: true, enableClipboard: false, style: { padding: '10px 0px' } }));
|
|
428
|
-
}
|
|
429
|
-
if (thisWindow.FPSUser) {
|
|
430
|
-
medicalElements.push(React.createElement(ReactJson, { src: thisWindow.FPSOptions, name: 'FPSOptions', collapsed: false, displayDataTypes: true, displayObjectSize: true, enableClipboard: false, style: { padding: '10px 0px' } }));
|
|
431
|
-
}
|
|
432
|
-
content = React.createElement("div", { id: "MedicalPanel", style: { paddingTop: '20px' } }, medicalElements);
|
|
433
|
-
}
|
|
434
|
-
}
|
|
435
|
-
if (this.state.selectedKey === pivotHeading9 || this.state.selectedKey === pivotHeadingA || this.state.selectedKey === pivotHeadingB || this.state.selectedKey === pivotHeadingX) {
|
|
436
|
-
thisPage = content;
|
|
437
|
-
}
|
|
438
|
-
else {
|
|
439
|
-
thisPage = content === undefined ? undefined : React.createElement(SinglePage, { allLoaded: true, showInfo: true, content: content });
|
|
440
|
-
}
|
|
441
|
-
const tipHeaderStyle = { paddingRight: '10px', textAlign: 'left' };
|
|
442
|
-
const tipsTable = React.createElement("table", null,
|
|
443
|
-
React.createElement("tr", null,
|
|
444
|
-
React.createElement("th", { style: tipHeaderStyle }, "Do this"),
|
|
445
|
-
React.createElement("th", { style: tipHeaderStyle }, "Where"),
|
|
446
|
-
React.createElement("th", { style: { textAlign: 'left' } }, "Result")),
|
|
447
|
-
this.getRandomTip(this.props.contentPages.webParTips));
|
|
448
|
-
const tips = this.props.contentPages.webParTips.length === 0 ? null :
|
|
449
|
-
React.createElement(MessageBar, { messageBarType: MessageBarType.warning },
|
|
450
|
-
React.createElement("div", { style: { fontWeight: 600, fontSize: 'large', marginBottom: '12px' } }, "Pro TIP:"),
|
|
451
|
-
React.createElement("div", { style: { minHeight: '30px' } }, tipsTable));
|
|
452
|
-
const wideIcon = this.wideToggle !== true ? null : React.createElement(Icon, { iconName: this.state.panelType === PanelType.medium ? 'MaximumValue' : 'MinimumValue', style: { fontSize: 'xx-large', cursor: 'pointer' }, onClick: this._panelWidth.bind(this) });
|
|
453
|
-
const showExport = this.props.showExport === true && this.props.exportProps !== null ? true : false;
|
|
454
|
-
const showHistory = this.props.webpartHistory ? true : false;
|
|
455
|
-
let panelTitle = this.props.panelTitle;
|
|
456
|
-
if (panelTitle && ['hide', 'ignore', 'empty'].indexOf(panelTitle.toLowerCase()) >= 0) {
|
|
457
|
-
panelTitle = this.props.gitHubRepo.desc;
|
|
458
|
-
}
|
|
459
|
-
panelContent = React.createElement("div", { style: { paddingBottom: '50px' } },
|
|
460
|
-
tips,
|
|
461
|
-
webPartLinks,
|
|
462
|
-
React.createElement("div", { style: { display: 'flex', flexWrap: 'nowrap', justifyContent: 'space-between', alignItems: 'center' } },
|
|
463
|
-
React.createElement("h3", null,
|
|
464
|
-
" ",
|
|
465
|
-
panelTitle),
|
|
466
|
-
React.createElement("div", { title: this.state.panelType === PanelType.medium ? 'Make panel wider' : 'Make panel narrower' }, wideIcon)),
|
|
467
|
-
React.createElement(Pivot, { linkFormat: PivotLinkFormat.links, linkSize: PivotLinkSize.normal, onLinkClick: this._selectedIndex.bind(this) },
|
|
468
|
-
this.props.replacePanelHTML == '' ? undefined : React.createElement(PivotItem, { headerText: pivotHeadingX, ariaLabel: pivotHeadingX, title: pivotHeadingX, itemKey: pivotHeadingX, itemIcon: 'SunQuestionMark' }),
|
|
469
|
-
this.props.contentPages.whyContent === undefined ? undefined : React.createElement(PivotItem, { headerText: pivotHeading0, ariaLabel: pivotHeading0, title: pivotHeading0, itemKey: pivotHeading0, itemIcon: 'QandA' }),
|
|
470
|
-
this.props.contentPages.gettingStartedContent === undefined ? undefined : React.createElement(PivotItem, { headerText: pivotHeading1, ariaLabel: pivotHeading1, title: pivotHeading1, itemKey: pivotHeading1, itemIcon: undefined }),
|
|
471
|
-
this.props.contentPages.basicsContent === undefined ? undefined : React.createElement(PivotItem, { headerText: pivotHeading2, ariaLabel: pivotHeading2, title: pivotHeading2, itemKey: pivotHeading2, itemIcon: undefined }),
|
|
472
|
-
this.props.contentPages.advancedContent === undefined ? undefined : React.createElement(PivotItem, { headerText: pivotHeading3, ariaLabel: pivotHeading3, title: pivotHeading3, itemKey: pivotHeading3, itemIcon: undefined }),
|
|
473
|
-
this.props.contentPages.futureContent === undefined ? undefined : React.createElement(PivotItem, { headerText: pivotHeading4, ariaLabel: pivotHeading4, title: pivotHeading4, itemKey: pivotHeading4, itemIcon: 'RenewalFuture' }),
|
|
474
|
-
this.props.contentPages.errorsContent === undefined ? undefined : React.createElement(PivotItem, { headerText: pivotHeading6, ariaLabel: pivotHeading6, title: pivotHeading6, itemKey: pivotHeading6, itemIcon: 'Warning12' }),
|
|
475
|
-
this.dev === undefined ? undefined : React.createElement(PivotItem, { headerText: undefined, ariaLabel: pivotHeading5, title: pivotHeading5, itemKey: pivotHeading5, itemIcon: 'TestAutoSolid' }),
|
|
476
|
-
showTricks !== true || this.props.contentPages.tricksTable === undefined ? undefined : React.createElement(PivotItem, { headerText: undefined, ariaLabel: pivotHeading7, title: pivotHeading7, itemKey: pivotHeading7, itemIcon: 'AutoEnhanceOn' }),
|
|
477
|
-
this.props.contentPages.aboutTable === undefined ? undefined : React.createElement(PivotItem, { headerText: undefined, ariaLabel: pivotHeading8, title: pivotHeading8, itemKey: pivotHeading8, itemIcon: 'Info' }),
|
|
478
|
-
showExport !== true ? null : React.createElement(PivotItem, { headerText: undefined, ariaLabel: pivotHeading9, title: pivotHeading9, itemKey: pivotHeading9, itemIcon: 'Export' }),
|
|
479
|
-
showHistory !== true ? null : React.createElement(PivotItem, { headerText: undefined, ariaLabel: pivotHeadingA, title: pivotHeadingA, itemKey: pivotHeadingA, itemIcon: 'FullHistory' }),
|
|
480
|
-
showMedical !== true ? null : React.createElement(PivotItem, { headerText: undefined, ariaLabel: pivotHeadingB, title: pivotHeadingB, itemKey: pivotHeadingB, itemIcon: 'Medical' })),
|
|
481
|
-
thisPage);
|
|
482
|
-
}
|
|
483
|
-
const bannerPanel = React.createElement("div", null,
|
|
484
|
-
React.createElement(Panel, { isOpen: showPanel,
|
|
485
|
-
// this prop makes the panel non-modal
|
|
486
|
-
isBlocking: true, onDismiss: this._closePanel.bind(this), closeButtonAriaLabel: "Close", type: this.state.panelType, isLightDismiss: true }, panelContent));
|
|
487
|
-
let SpecialElement = this.props.SpecialMessage ? createSpecialElement(this.props.SpecialMessage) : undefined;
|
|
488
|
-
return (React.createElement("div", { className: 'banner-component' },
|
|
489
|
-
SpecialElement,
|
|
490
|
-
bannerContent,
|
|
491
|
-
propsHelp,
|
|
492
|
-
bannerPanel));
|
|
493
|
-
}
|
|
494
|
-
}
|
|
495
|
-
_toggleExpando() {
|
|
496
|
-
const newMode = this.state.expandoramicMode === true ? false : true;
|
|
497
|
-
setExpandoRamicMode(this.props.domElement, newMode, this.props.expandoStyle, this.props.expandAlert, this.props.expandConsole, this.props.expandoPadding, this.props.pageLayout);
|
|
498
|
-
// if ( this.state.expandoramicMode === true ) {
|
|
499
|
-
this.setState({ expandoramicMode: newMode, });
|
|
500
|
-
// } else {
|
|
501
|
-
// this.setState({ showPanel: true,});
|
|
502
|
-
// }
|
|
503
|
-
}
|
|
504
|
-
_closePanel() {
|
|
505
|
-
this.setState({ showPanel: false, });
|
|
506
|
-
}
|
|
507
|
-
_openPanel(event) {
|
|
508
|
-
let textCallback = event.currentTarget.dataset.callback;
|
|
509
|
-
if (textCallback && textCallback.length > 0) {
|
|
510
|
-
//Do Nothing
|
|
511
|
-
}
|
|
512
|
-
else {
|
|
513
|
-
this.setState({ showPanel: true, });
|
|
514
|
-
}
|
|
515
|
-
}
|
|
516
|
-
_panelWidth() {
|
|
517
|
-
let newPanelType = this.state.panelType !== PanelType.medium ? PanelType.medium : PanelType.large;
|
|
518
|
-
this.setState({ panelType: newPanelType, });
|
|
519
|
-
}
|
|
520
|
-
togglePropsHelp() {
|
|
521
|
-
let newState = this.state.showPropsHelp === true ? false : true;
|
|
522
|
-
this.setState({ showPropsHelp: newState });
|
|
523
|
-
}
|
|
524
|
-
sendFeedback() {
|
|
525
|
-
const lbreak = '%0D%0A';
|
|
526
|
-
let pageName = window.location.pathname.substring(window.location.pathname.lastIndexOf("/") + 1);
|
|
527
|
-
let mailTemplate = `mailto:${this.props.feedbackEmail}`;
|
|
528
|
-
// let mailTemplate = `mailto:${`UpdateEmail@someday.com`}`;
|
|
529
|
-
mailTemplate += `?subject=${this.props.gitHubRepo.desc} Webpart Question or Issue on PAGE: ${pageName}`;
|
|
530
|
-
mailTemplate += `&body=Add your question or comment here: ${lbreak}${lbreak}${lbreak}`;
|
|
531
|
-
mailTemplate += `Page Name: ${pageName}${lbreak}${lbreak}`;
|
|
532
|
-
mailTemplate += `Link to page:${lbreak}${window.location.href}${lbreak}${lbreak}`;
|
|
533
|
-
mailTemplate += `Best Regards, ${lbreak}${lbreak}`;
|
|
534
|
-
window.open(mailTemplate);
|
|
535
|
-
}
|
|
536
|
-
}
|
|
537
|
-
//# sourceMappingURL=component.js.map
|