@mikezimm/fps-library-v2 1.0.65 → 1.0.67

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 (50) hide show
  1. package/CHANGELOG.md +15 -3
  2. package/lib/banner/bannerX/MinPanel.js +1 -1
  3. package/lib/banner/bannerX/MinPanel.js.map +1 -1
  4. package/lib/components/indexes/OLD_index.d.ts +1 -0
  5. package/lib/components/indexes/OLD_index.d.ts.map +1 -0
  6. package/lib/components/indexes/OLD_index.js +4 -0
  7. package/lib/components/indexes/OLD_index.js.map +1 -0
  8. package/lib/components/interfaces/Views/IListViews.d.ts +5 -3
  9. package/lib/components/interfaces/Views/IListViews.d.ts.map +1 -1
  10. package/lib/components/molecules/ReactListV1/component/IReactListItemsProps.d.ts +2 -2
  11. package/lib/components/molecules/ReactListV1/component/IReactListItemsProps.d.ts.map +1 -1
  12. package/lib/components/molecules/ReactListV1/component/IReactListItemsState.d.ts +2 -1
  13. package/lib/components/molecules/ReactListV1/component/IReactListItemsState.d.ts.map +1 -1
  14. package/lib/components/molecules/ReactListV1/component/reactListView.d.ts +2 -3
  15. package/lib/components/molecules/ReactListV1/component/reactListView.d.ts.map +1 -1
  16. package/lib/components/molecules/ReactListV1/component/reactListView.js +31 -272
  17. package/lib/components/molecules/ReactListV1/component/reactListView.js.map +1 -1
  18. package/lib/components/molecules/ReactListV1/functions/richHeight.d.ts +5 -1
  19. package/lib/components/molecules/ReactListV1/functions/richHeight.d.ts.map +1 -1
  20. package/lib/components/molecules/ReactListV1/functions/richHeight.js +17 -2
  21. package/lib/components/molecules/ReactListV1/functions/richHeight.js.map +1 -1
  22. package/lib/index.d.ts +0 -1
  23. package/lib/index.d.ts.map +1 -1
  24. package/lib/index.js +1 -1
  25. package/lib/index.js.map +1 -1
  26. package/lib/logic/indexes/OLD_index.d.ts +1 -0
  27. package/lib/logic/indexes/OLD_index.d.ts.map +1 -0
  28. package/lib/logic/indexes/OLD_index.js +21 -0
  29. package/lib/logic/indexes/OLD_index.js.map +1 -0
  30. package/lib/pnpjs/Attachments/fetchAttachments.d.ts +16 -0
  31. package/lib/pnpjs/Attachments/fetchAttachments.d.ts.map +1 -0
  32. package/lib/pnpjs/Attachments/fetchAttachments.js +39 -0
  33. package/lib/pnpjs/Attachments/fetchAttachments.js.map +1 -0
  34. package/lib/pnpjs/Common/CheckItemsResults.d.ts +15 -0
  35. package/lib/pnpjs/Common/CheckItemsResults.d.ts.map +1 -0
  36. package/lib/pnpjs/Common/CheckItemsResults.js +25 -0
  37. package/lib/pnpjs/Common/CheckItemsResults.js.map +1 -0
  38. package/lib/pnpjs/Logging/interfaces.d.ts +1 -1
  39. package/lib/pnpjs/Logging/interfaces.d.ts.map +1 -1
  40. package/lib/pnpjs/Logging/saveAnalytics.js +1 -1
  41. package/lib/pnpjs/Logging/saveAnalytics.js.map +1 -1
  42. package/package.json +2 -2
  43. package/lib/components/indexes/index.d.ts +0 -4
  44. package/lib/components/indexes/index.d.ts.map +0 -1
  45. package/lib/components/indexes/index.js +0 -4
  46. package/lib/components/indexes/index.js.map +0 -1
  47. package/lib/logic/indexes/index.d.ts +0 -20
  48. package/lib/logic/indexes/index.d.ts.map +0 -1
  49. package/lib/logic/indexes/index.js +0 -21
  50. package/lib/logic/indexes/index.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -5,14 +5,26 @@ 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.65
8
+ npm install @mikezimm/fps-library-v2@1.0.67
9
9
 
10
10
  # Changelog
11
11
 
12
+
13
+ # FOR COMMANDS DEBUGGING: - add way to eval each part of each button and show what results are
14
+ const newStr = x.replaceAll('(','~=').replaceAll(')','~=').replaceAll('||','~=').replaceAll('&&','~=').split('~=');
15
+ const testEvals = [];
16
+ newStr.map( s => { if ( s.trim().length > 0 ) testEvals.push(s.trim()) })
17
+
18
+
12
19
  NOTE: TURN BACK ON STRICT NULL CHECKS - turned off for PropPaneCols
13
20
 
14
- ## 1.0.65 - 2022-Dec-19: analytics
15
- - update saveAnalytics: use saveThisLogItemAsync
21
+ ## 1.0.67 - 2022-Dec-19: reactListView
22
+ - bring richTextHeight from Drilldown directly into reactListView
23
+ - move fetchAttachments function into separate functions under pnpjs folder
24
+ - fix some imports that were to general pulling in more than neccessary
25
+
26
+ ## 1.0.66 - 2022-Dec-19: analytics
27
+ - update saveAnalytics: use saveThisLogItemAsync with await, add RuleBreak to IFPSResultStatus again
16
28
 
17
29
  ## 1.0.63 - 2022-Dec-19: analytics
18
30
  - update saveAnalytics: alert & console.log error to show friendly error when gulping
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { createPerformanceTableVisitor } from '../../components/indexes';
2
+ import { createPerformanceTableVisitor } from '../../components/molecules/Performance/tables';
3
3
  export function getMinPanel(bannerProps) {
4
4
  const bonusHTML1 = bannerProps.bonusHTML1 ? bannerProps.bonusHTML1 : null;
5
5
  const panelPerformance = bannerProps.panelPerformance ? createPerformanceTableVisitor(bannerProps.panelPerformance, []) : null;
@@ -1 +1 @@
1
- {"version":3,"file":"MinPanel.js","sourceRoot":"","sources":["../../../src/banner/bannerX/MinPanel.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,6BAA6B,EAAE,MAAM,0BAA0B,CAAC;AAGzE,MAAM,UAAU,WAAW,CAAE,WAAgC;IAEzD,MAAM,UAAU,GAAQ,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC;IAC/E,MAAM,gBAAgB,GAAG,WAAW,CAAC,gBAAgB,CAAC,CAAC,CAAC,6BAA6B,CAAE,WAAW,CAAC,gBAAgB,EAAE,EAAE,CAAE,CAAA,CAAC,CAAC,IAAI,CAAC;IAChI,MAAM,UAAU,GAAQ,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC;IAE/E,MAAM,YAAY,GAAG;QACjB,WAAW,CAAC,gBAAgB;QAC5B,UAAU,CAAC,CAAC,CAAC,iCAAO,UAAU,CAAQ,CAAC,CAAC,CAAC,IAAI;QAC7C,gBAAgB,CAAC,CAAC,CAAC,iCAAO,gBAAgB,CAAQ,CAAC,CAAC,CAAC,IAAI;QACzD,UAAU,CAAC,CAAC,CAAC,iCAAO,UAAU,CAAQ,CAAC,CAAC,CAAC,IAAI,CAC3C,CAAC;IAET,OAAO,YAAY,CAAC;AAEtB,CAAC"}
1
+ {"version":3,"file":"MinPanel.js","sourceRoot":"","sources":["../../../src/banner/bannerX/MinPanel.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,6BAA6B,EAAE,MAAM,+CAA+C,CAAC;AAG9F,MAAM,UAAU,WAAW,CAAE,WAAgC;IAEzD,MAAM,UAAU,GAAQ,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC;IAC/E,MAAM,gBAAgB,GAAG,WAAW,CAAC,gBAAgB,CAAC,CAAC,CAAC,6BAA6B,CAAE,WAAW,CAAC,gBAAgB,EAAE,EAAE,CAAE,CAAA,CAAC,CAAC,IAAI,CAAC;IAChI,MAAM,UAAU,GAAQ,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC;IAE/E,MAAM,YAAY,GAAG;QACjB,WAAW,CAAC,gBAAgB;QAC5B,UAAU,CAAC,CAAC,CAAC,iCAAO,UAAU,CAAQ,CAAC,CAAC,CAAC,IAAI;QAC7C,gBAAgB,CAAC,CAAC,CAAC,iCAAO,gBAAgB,CAAQ,CAAC,CAAC,CAAC,IAAI;QACzD,UAAU,CAAC,CAAC,CAAC,iCAAO,UAAU,CAAQ,CAAC,CAAC,CAAC,IAAI,CAC3C,CAAC;IAET,OAAO,YAAY,CAAC;AAEtB,CAAC"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=OLD_index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OLD_index.d.ts","sourceRoot":"","sources":["../../../src/components/indexes/OLD_index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ // export * from '../interfaces/indexes/index'
2
+ // export * from './FPSAgeSlider';
3
+ // export * from './Performance';
4
+ //# sourceMappingURL=OLD_index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OLD_index.js","sourceRoot":"","sources":["../../../src/components/indexes/OLD_index.ts"],"names":[],"mappings":"AACA,8CAA8C;AAE9C,kCAAkC;AAClC,iCAAiC"}
@@ -2,6 +2,11 @@ import { IGrouping, IViewField } from '../../../common/interfaces/openSource/spf
2
2
  import { IUser } from '../../../logic/Users/IUserInterfaces';
3
3
  import { IQuickCommands } from '../QuickCommands/IQuickCommands';
4
4
  export type ICustViewDefKeys = 'includeDetails' | 'includeAttach' | 'includeListLink' | 'createItemLink';
5
+ /**
6
+ * This mirrors the 3 groups in property pane.
7
+ * Although it adds the 4 keys in ICustViewDefKeys.
8
+ * Currently the keys would the the same on all 3 views
9
+ */
5
10
  export interface ICustViewDef {
6
11
  minWidth: number;
7
12
  viewFields: IViewField[];
@@ -12,17 +17,14 @@ export interface ICustViewDef {
12
17
  createItemLink: boolean;
13
18
  }
14
19
  export interface IListViewDD {
15
- parentListFieldTitles: string;
16
20
  webURL: string;
17
21
  parentListURL: string;
18
22
  listName: string;
19
- togOtherListview: boolean;
20
23
  viewDefs: ICustViewDef[];
21
24
  viewFields: IViewField[];
22
25
  groupByFields?: IGrouping[];
23
26
  quickCommands?: IQuickCommands;
24
27
  items: any[];
25
- breadCrumb: string[];
26
28
  contextUserInfo: IUser;
27
29
  sourceUserInfo: IUser;
28
30
  }
@@ -1 +1 @@
1
- {"version":3,"file":"IListViews.d.ts","sourceRoot":"","sources":["../../../../src/components/interfaces/Views/IListViews.ts"],"names":[],"mappings":"AAKC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,2EAA2E,CAAC;AAClH,OAAO,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAGjE,MAAM,MAAM,gBAAgB,GAAG,gBAAgB,GAAG,eAAe,GAAG,iBAAiB,GAAG,gBAAgB,CAAC;AAEzG,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,UAAU,EAAE,CAAC;IACzB,aAAa,CAAC,EAAE,SAAS,EAAE,CAAC;IAC5B,cAAc,EAAE,OAAO,CAAC;IACxB,aAAa,EAAE,OAAO,CAAC;IACvB,eAAe,EAAE,OAAO,CAAC;IACzB,cAAc,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,WAAW,WAAW;IAE1B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAG,MAAM,CAAC;IACvB,QAAQ,EAAG,MAAM,CAAC;IAClB,gBAAgB,EAAE,OAAO,CAAC;IAE1B,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,UAAU,EAAE,UAAU,EAAE,CAAC;IACzB,aAAa,CAAC,EAAE,SAAS,EAAE,CAAC;IAE5B,aAAa,CAAC,EAAE,cAAc,CAAC;IAE/B,KAAK,EAAG,GAAG,EAAE,CAAC;IACd,UAAU,EAAE,MAAM,EAAE,CAAC;IAErB,eAAe,EAAE,KAAK,CAAC;IACvB,cAAc,EAAE,KAAK,CAAC;CAEvB"}
1
+ {"version":3,"file":"IListViews.d.ts","sourceRoot":"","sources":["../../../../src/components/interfaces/Views/IListViews.ts"],"names":[],"mappings":"AAKC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,2EAA2E,CAAC;AAClH,OAAO,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAGjE,MAAM,MAAM,gBAAgB,GAAG,gBAAgB,GAAG,eAAe,GAAG,iBAAiB,GAAG,gBAAgB,CAAC;AAEzG;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,UAAU,EAAE,CAAC;IACzB,aAAa,CAAC,EAAE,SAAS,EAAE,CAAC;IAC5B,cAAc,EAAE,OAAO,CAAC;IACxB,aAAa,EAAE,OAAO,CAAC;IACvB,eAAe,EAAE,OAAO,CAAC;IACzB,cAAc,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,WAAW,WAAW;IAG1B,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAG,MAAM,CAAC;IACvB,QAAQ,EAAG,MAAM,CAAC;IAGlB,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,UAAU,EAAE,UAAU,EAAE,CAAC;IACzB,aAAa,CAAC,EAAE,SAAS,EAAE,CAAC;IAE5B,aAAa,CAAC,EAAE,cAAc,CAAC;IAE/B,KAAK,EAAG,GAAG,EAAE,CAAC;IAGd,eAAe,EAAE,KAAK,CAAC;IACvB,cAAc,EAAE,KAAK,CAAC;CAEvB"}
@@ -11,7 +11,8 @@ export interface IReactListItemsProps extends IPageArrowsParentProps {
11
11
  maxChars?: number;
12
12
  items: IDrillItemInfo[];
13
13
  richColumns: string[];
14
- richHeight: string;
14
+ richHeights: number[];
15
+ autoRichHeight: string;
15
16
  updateRichHeightProps: any;
16
17
  resetArrows?: string;
17
18
  webURL: string;
@@ -24,7 +25,6 @@ export interface IReactListItemsProps extends IPageArrowsParentProps {
24
25
  blueBarTitleText?: string;
25
26
  showIDs?: boolean;
26
27
  showDesc?: boolean;
27
- parentListFieldTitles?: string;
28
28
  viewFields?: IViewFieldDD[];
29
29
  groupByFields?: IGrouping[];
30
30
  includeDetails: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"IReactListItemsProps.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/ReactListV1/component/IReactListItemsProps.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,8EAA8E,CAAC;AACzG,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC1E,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gDAAgD,CAAC;AACtF,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,MAAM,WAAW,oBAAqB,SAAQ,sBAAsB;IAClE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,qBAAqB,EAAE,GAAG,CAAC;IAE3B,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC;IAEnB,eAAe,EAAE,KAAK,CAAC;IACvB,cAAc,EAAE,KAAK,CAAC;IAEtB,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,UAAU,CAAC,EAAE,YAAY,EAAE,CAAC;IAE5B,aAAa,CAAC,EAAE,SAAS,EAAE,CAAC;IAC5B,cAAc,EAAE,OAAO,CAAC;IACxB,aAAa,EAAE,OAAO,CAAC;IACvB,eAAe,EAAE,OAAO,CAAC;IACzB,cAAc,EAAE,OAAO,CAAC;IAExB,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAE7B,aAAa,CAAC,EAAE,oBAAoB,CAAC;CAEtC"}
1
+ {"version":3,"file":"IReactListItemsProps.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/ReactListV1/component/IReactListItemsProps.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,8EAA8E,CAAC;AACzG,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC1E,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gDAAgD,CAAC;AACtF,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,MAAM,WAAW,oBAAqB,SAAQ,sBAAsB;IAClE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,WAAW,EAAE,MAAM,EAAE,CAAC;IAEtB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IAEvB,qBAAqB,EAAE,GAAG,CAAC;IAE3B,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC;IAEnB,eAAe,EAAE,KAAK,CAAC;IACvB,cAAc,EAAE,KAAK,CAAC;IAEtB,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAGnB,UAAU,CAAC,EAAE,YAAY,EAAE,CAAC;IAE5B,aAAa,CAAC,EAAE,SAAS,EAAE,CAAC;IAC5B,cAAc,EAAE,OAAO,CAAC;IACxB,aAAa,EAAE,OAAO,CAAC;IACvB,eAAe,EAAE,OAAO,CAAC;IACzB,cAAc,EAAE,OAAO,CAAC;IAExB,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAE7B,aAAa,CAAC,EAAE,oBAAoB,CAAC;CAEtC"}
@@ -8,7 +8,6 @@ import { IViewFieldDD } from '../interfaces/IViewFieldDD';
8
8
  import { IUpdateCommandItemReturn } from '../../../../pnpjs/CommandItems/updateItem';
9
9
  export interface IReactListItemsState extends IMinPageArrowsState {
10
10
  maxChars?: number;
11
- parentListFieldTitles: any;
12
11
  viewFields: IViewFieldDD[];
13
12
  groupByFields?: IGrouping[];
14
13
  showPanel: boolean;
@@ -16,6 +15,8 @@ export interface IReactListItemsState extends IMinPageArrowsState {
16
15
  showAttach: boolean;
17
16
  clickedAttach: boolean;
18
17
  fontSize: any;
18
+ richHeightStr: string;
19
+ richHeightNum: number;
19
20
  panelId: number;
20
21
  lastPanelId: number;
21
22
  panelItem: IDrillItemInfo;
@@ -1 +1 @@
1
- {"version":3,"file":"IReactListItemsState.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/ReactListV1/component/IReactListItemsState.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,8EAA8E,CAAC;AACzG,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,MAAM,kDAAkD,CAAC;AAChF,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC1E,OAAO,EAAE,mBAAmB,EAAG,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AAErF,MAAM,WAAW,oBAAqB,SAAQ,mBAAmB;IAC/D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qBAAqB,EAAE,GAAG,CAAC;IAC3B,UAAU,EAAE,YAAY,EAAE,CAAC;IAC3B,aAAa,CAAC,EAAE,SAAS,EAAE,CAAC;IAE5B,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,SAAS,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,OAAO,CAAC;IAEvB,QAAQ,EAAE,GAAG,CAAC;IAEd,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,cAAc,CAAC;IAC1B,gBAAgB,EAAE,GAAG,EAAE,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,GAAG,CAAC;IAEnB,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,aAAa,CAAC,EAAE,YAAY,CAAC;IAE7B,aAAa,EAAE,wBAAwB,CAAC;IACxC,YAAY,EAAE,OAAO,CAAC;CAEvB"}
1
+ {"version":3,"file":"IReactListItemsState.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/ReactListV1/component/IReactListItemsState.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,8EAA8E,CAAC;AACzG,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,MAAM,kDAAkD,CAAC;AAChF,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC1E,OAAO,EAAE,mBAAmB,EAAG,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AAErF,MAAM,WAAW,oBAAqB,SAAQ,mBAAmB;IAC/D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,UAAU,EAAE,YAAY,EAAE,CAAC;IAC3B,aAAa,CAAC,EAAE,SAAS,EAAE,CAAC;IAE5B,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,SAAS,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,OAAO,CAAC;IAEvB,QAAQ,EAAE,GAAG,CAAC;IAEd,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IAEtB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,cAAc,CAAC;IAC1B,gBAAgB,EAAE,GAAG,EAAE,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,GAAG,CAAC;IAEnB,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,aAAa,CAAC,EAAE,YAAY,CAAC;IAE7B,aAAa,EAAE,wBAAwB,CAAC;IACxC,YAAY,EAAE,OAAO,CAAC;CAEvB"}
@@ -3,15 +3,13 @@ import { IReactListItemsProps } from './IReactListItemsProps';
3
3
  import { IReactListItemsState } from './IReactListItemsState';
4
4
  export default class ReactListItems extends React.Component<IReactListItemsProps, IReactListItemsState> {
5
5
  private _componentWidth;
6
- private createAttachPanel;
7
6
  /**
8
7
  * createPanelAttachments is identical on ActionNews and Drilldown7 except panelItem interface
9
8
  * @param thisId
10
9
  * @param panelItem
11
10
  */
12
- private createPanelAttachments;
11
+ private _createPanelAttachments;
13
12
  private delim;
14
- private covertFieldInfoToIViewFields;
15
13
  private handleExpandedFieldInfoToIViewFields;
16
14
  private createBlankDialog;
17
15
  /***
@@ -59,6 +57,7 @@ export default class ReactListItems extends React.Component<IReactListItemsProps
59
57
  *
60
58
  *
61
59
  */
60
+ private _updateRichHeightState;
62
61
  private _onGoToList;
63
62
  private _CreateNewItem;
64
63
  private _updateStateOnPropsChange;
@@ -1 +1 @@
1
- {"version":3,"file":"reactListView.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/ReactListV1/component/reactListView.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAsD/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAwB9D,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,KAAK,CAAC,SAAS,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;IAErG,OAAO,CAAC,eAAe,CAAgB;IAErC,OAAO,CAAC,iBAAiB;IAIzB;;;;OAIG;YAEW,sBAAsB;IAkCpC,OAAO,CAAC,KAAK,CAAS;IAoItB,OAAO,CAAC,4BAA4B;IAmCpC,OAAO,CAAC,oCAAoC;IAY5C,OAAO,CAAC,iBAAiB;IAgBzB;;;;;;;;;GASD;IAEE,OAAO,CAAC,kBAAkB,CAAyE;gBAExF,KAAK,EAAE,oBAAoB;IA8ChC,iBAAiB;IAK5B;;;;;;;;;OASG;IAEQ,kBAAkB,CAAC,SAAS,EAAE,oBAAoB,EAAE,SAAS,EAAE,oBAAoB,GAAG,IAAI;IA0CrG;;;;;;;;;OASG;IAEQ,MAAM,IAAI,KAAK,CAAC,YAAY,CAAC,oBAAoB,CAAC;IAmTzD;;;;;;;;;GASD;IAIC,OAAO,CAAC,WAAW,CAclB;IAED,OAAO,CAAC,cAAc,CAWrB;IAED,OAAO,CAAC,yBAAyB;IA0BrC;;;;;;;;;OASG;YAyBe,qBAAqB;IAmBnC;;OAEG;YAEW,oBAAoB;IAclC,OAAO,CAAC,eAAe;YAST,qBAAqB;YAyGrB,uBAAuB;IA4CrC;;OAEG;IACH,OAAO,CAAC,YAAY,CAInB;IAGL;;;;;;;;;OASG;YAEe,YAAY;IA4D1B,OAAO,CAAC,cAAc;IAWtB,OAAO,CAAC,aAAa,CAMlB;IAGP;;;;;;;;;OASG;IAEG;;;;OAIG;IACL,OAAO,CAAC,sBAAsB,CAW7B;IAGD;;;;;;;;;OASG;IAEH,OAAO,CAAC,cAAc;IA+BtB,OAAO,CAAC,gBAAgB;IAMxB,OAAO,CAAC,uBAAuB;CAOlC"}
1
+ {"version":3,"file":"reactListView.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/ReactListV1/component/reactListView.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAiB/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAoB9D,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,KAAK,CAAC,SAAS,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;IAErG,OAAO,CAAC,eAAe,CAAgB;IAErC;;;;OAIG;YAEW,uBAAuB;IAUrC,OAAO,CAAC,KAAK,CAAS;IAGtB,OAAO,CAAC,oCAAoC;IAY5C,OAAO,CAAC,iBAAiB;IAgBzB;;;;;;;;;GASD;IAEE,OAAO,CAAC,kBAAkB,CAAyE;gBAExF,KAAK,EAAE,oBAAoB;IA4ChC,iBAAiB;IAK5B;;;;;;;;;OASG;IAEQ,kBAAkB,CAAC,SAAS,EAAE,oBAAoB,EAAE,SAAS,EAAE,oBAAoB,GAAG,IAAI;IAyCrG;;;;;;;;;OASG;IAEQ,MAAM,IAAI,KAAK,CAAC,YAAY,CAAC,oBAAoB,CAAC;IA2SzD;;;;;;;;;GASD;IAEC,OAAO,CAAC,sBAAsB;IAW9B,OAAO,CAAC,WAAW,CAclB;IAED,OAAO,CAAC,cAAc,CAWrB;IAED,OAAO,CAAC,yBAAyB;IAuBrC;;;;;;;;;OASG;YAEe,qBAAqB;IAmBnC;;OAEG;YAEW,oBAAoB;IAclC,OAAO,CAAC,eAAe;YAST,qBAAqB;YAmDrB,uBAAuB;IA4CrC;;OAEG;IACH,OAAO,CAAC,YAAY,CAInB;IAGL;;;;;;;;;OASG;YAEe,YAAY;IA4D1B,OAAO,CAAC,cAAc;IAWtB,OAAO,CAAC,aAAa,CAMlB;IAGP;;;;;;;;;OASG;IAEG;;;;OAIG;IACL,OAAO,CAAC,sBAAsB,CAW7B;IAGD;;;;;;;;;OASG;IAEH,OAAO,CAAC,cAAc;IA+BtB,OAAO,CAAC,gBAAgB;IAMxB,OAAO,CAAC,uBAAuB;CAOlC"}
@@ -1,210 +1,35 @@
1
1
  import * as React from 'react';
2
- import { Icon } from 'office-ui-fabric-react/lib/Icon';
3
- // import { Icon, IIconProps } from 'office-ui-fabric-react';
4
- import { Web, } from "@pnp/sp/presets/all";
5
- import { Link, } from 'office-ui-fabric-react';
2
+ import { Icon, } from 'office-ui-fabric-react/lib/Icon';
6
3
  import { Pivot, PivotItem, } from 'office-ui-fabric-react/lib/Pivot';
7
4
  import ReactJson from "react-json-view";
8
- // import { IUser } from '../../fpsReferences';
9
- // import { IQuickButton, IQuickCommands } from '@mikezimm/npmfunctions/dist/QuickCommands/IQuickCommands';
10
- // import { IDrillItemInfo } from '../../fpsReferences';
11
- // import { autoDetailsList } from '../../../../services/hoverCardService';
12
- // import { doesObjectExistInArray } from '../../fpsReferences';
13
- // import { findParentElementPropLikeThis } from '@mikezimm/npmfunctions/dist/Elements/functions';
14
- // import { getHelpfullError } from '../../fpsReferences';
15
- // import { buildConfirmDialogBig, IMyBigDialogProps } from '@mikezimm/npmfunctions/dist/Elements/dialogBox';
16
- // import stylesL from '../ListView/listView.module.scss';
5
+ import { getMaxRichHeightNum } from '../functions/richHeight';
17
6
  import { ListView, SelectionMode, } from "@pnp/spfx-controls-react/lib/ListView";
18
7
  import { Panel, PanelType } from 'office-ui-fabric-react/lib/Panel';
19
8
  import { PrimaryButton, DefaultButton } from 'office-ui-fabric-react/lib/Button';
20
- // import { Dialog, DialogType, DialogFooter, IDialogProps } from 'office-ui-fabric-react/lib/Dialog';
21
- // import { Button, ButtonType, } from 'office-ui-fabric-react/lib/Button';
22
- // import { Label } from 'office-ui-fabric-react/lib/Label';
23
- // import { updateReactListItem } from './listFunctions';
24
- // import { IContentsToggles, makeToggles } from '../fields/toggleFieldBuilder';
25
- // import styles from '../Contents/listView.module.scss';
26
- // import stylesRLV from './reactListView.module.scss';
27
- // import stylesInfo from './InfoPane.module.scss';
28
9
  import PageArrows from '../../Arrows/PageArrows';
29
10
  import { replaceHandleBarsValues } from '../../../../logic/Strings/handleBarsSub';
30
- import { getHelpfullError } from '../../../../logic/Errors/friendly';
31
11
  import { buildConfirmDialogBig } from '../../../atoms/Elements/confirmDialogBig';
32
12
  import { makeToggles } from '../atoms/toggleFieldBuilder';
33
13
  import { autoDetailsList } from '../atoms/detailsList';
34
14
  import { findParentElementPropLikeThis } from '../../../../logic/DOM/Search/domSearch';
35
15
  import { updateReactListItem } from '../functions/updateReactListItem';
36
16
  import { doesObjectExistInArray } from '../../../../logic/Arrays/searching/objectfind';
37
- // import { createPanelButtonsV1 } from '../atoms/createPanelButtonsV1';
38
17
  import { createPanelButtonsV2 } from '../atoms/createPanelButtonsV2';
18
+ import { createPanelAttachmentElements } from '../../../../pnpjs/Attachments/fetchAttachments';
39
19
  require('@mikezimm/fps-styles/dist/reactListView.css');
40
20
  export default class ReactListItems extends React.Component {
41
- createAttachPanel() {
42
- return null;
43
- }
44
21
  /**
45
22
  * createPanelAttachments is identical on ActionNews and Drilldown7 except panelItem interface
46
23
  * @param thisId
47
24
  * @param panelItem
48
25
  */
49
- async createPanelAttachments(thisId, panelItem) {
50
- const thisListWeb = Web(this.props.webURL);
51
- const thisListObject = thisListWeb.lists.getByTitle(this.props.listName);
52
- let allItems = [];
53
- let errMessage = null;
54
- const attachments = [];
55
- if (panelItem.Attachments && panelItem.Attachments === true) {
56
- try {
57
- allItems = await thisListObject.items.getById(thisId).attachmentFiles();
58
- if (allItems.length > 0) {
59
- attachments.push(React.createElement("h2", null,
60
- "(",
61
- allItems.length,
62
- ") Attachments"));
63
- attachments.push(React.createElement("div", { style: { paddingBottom: "10px" } },
64
- React.createElement("b", null, "CTRL-Click"),
65
- " to open in new window"));
66
- allItems.map(a => {
67
- let attachmentItem = React.createElement("div", null,
68
- React.createElement(Link, { target: "_blank", href: a.ServerRelativeUrl },
69
- " ",
70
- a.FileName));
71
- attachments.push(attachmentItem);
72
- });
73
- }
74
- }
75
- catch (e) {
76
- errMessage = getHelpfullError(e, true, true); // eslint-disable-line @typescript-eslint/no-unused-vars
77
- }
78
- }
26
+ async _createPanelAttachments(thisId, panelItem) {
27
+ const attachments = await createPanelAttachmentElements(this.props.webURL, this.props.listName, panelItem);
79
28
  this.setState({
80
29
  panelAttachments: attachments,
81
30
  lastAttachId: thisId,
82
31
  });
83
32
  }
84
- // /**
85
- // *
86
- // * @param quickCommands
87
- // * @param item
88
- // * @param sourceUserInfo //This is just passed in in order to allow for user targeted b.showWhenEvalTrue checks
89
- // */
90
- // private createPanelButtons ( quickCommands: IQuickCommandsDesign, item: IDrillItemInfo , sourceUserInfo: IUser ) {
91
- // let allButtonRows : any[] = [];
92
- // //Adjusted per: https://github.com/mikezimm/drilldown7/issues/211
93
- // if ( !quickCommands || !quickCommands.buttons || quickCommands.buttons.length === 0 ) {
94
- // return NoCommandsInfo;
95
- // } else {
96
- // let buildAllButtonsTest = true;
97
- // if ( quickCommands.showWhenEvalTrue && quickCommands.showWhenEvalTrue.length > 0 ) {
98
- // //2022-01-18: Added Try catch when testing and found my typed in quick command had error.
99
- // try {
100
- // buildAllButtonsTest = eval( quickCommands.showWhenEvalTrue );
101
- // if ( buildAllButtonsTest === true ) {
102
- // //build all the buttons ( subject to individual button checks )
103
- // } else { buildAllButtonsTest = false; }
104
- // } catch (e) {
105
- // buildAllButtonsTest = false;
106
- // let errMessage = getHelpfullError(e, false, false);
107
- // console.log(`ERROR: createPanelButtons: quickCommands.showWhenEvalTrue !!!`, quickCommands.showWhenEvalTrue);
108
- // console.log(`ERROR: createPanelButtons: quickCommands.showWhenEvalTrue Error Details`, errMessage);
109
- // alert(`createPanelButtons: quickCommands.showWhenEvalTrue error !!! Check the console for details: ${quickCommands.showWhenEvalTrue}`);
110
- // }
111
- // }
112
- // if ( buildAllButtonsTest === true ) {
113
- // quickCommands.buttons.map( (buttonRow, r) => {
114
- // if ( buttonRow && buttonRow.length > 0 ) {
115
- // let rowResult : any = null;
116
- // const buttons : any[] = [];
117
- // buttonRow.map( (b: IQuickButton,i: number) => {
118
- // let buildThisButton = true;
119
- // /**
120
- // * showWhenEvalTrue must be run in the context of this section of code to be valid.
121
- // */
122
- // if ( b.showWhenEvalTrue && b.showWhenEvalTrue.length > 0 ) {
123
- // //2022-01-18: Added Try catch when testing and found my typed in quick command had error.
124
- // try {
125
- // const buildButtonTest = eval( b.showWhenEvalTrue );
126
- // if ( buildButtonTest === true ) {
127
- // //build all the buttons
128
- // } else { buildThisButton = false; }
129
- // } catch (e) {
130
- // const errMessage = getHelpfullError(e, false, false);
131
- // console.log(`createPanelButtons: b[${i}].showWhenEvalTrue error !!!`, b.showWhenEvalTrue);
132
- // console.log(`createPanelButtons: b[${i}].showWhenEvalTrue Error Details`, errMessage);
133
- // alert(`createPanelButtons: quickCommands.showWhenEvalTrue error !!! Check the console for details: ${quickCommands.showWhenEvalTrue}`);
134
- // }
135
- // }
136
- // if ( buildThisButton === true ) {
137
- // const buttonStyles: React.CSSProperties = b.styleButton ? b.styleButton as React.CSSProperties : { minWidth: buttonRow.length === 1 ? '350px' : '', padding: '25px', marginBottom: '10px', fontSize: 'larger' };
138
- // //Tried adding
139
- // // const IconElement = b.icon ? <Icon iconName= { 'Emoji2' } style={ defaultBannerCommandStyles }/> : undefined;
140
- // const buttonID = ['ButtonID', r, i , item.Id].join(this.delim);
141
- // const buttonTitle = b.label;
142
- // // const iconName: string = b.icon;
143
- // const buttonIcon : IIconProps = { iconName: b.icon, style: defaultBannerCommandStyles }
144
- // const thisButton = b.primary === true ?
145
- // //Tried adding iconName into Primary Button, does not work,
146
- // //Tried adding IconElement into icon Props, can't see it.
147
- // //Tried adding Icon Element into the div next to Primary button and could see it.
148
- // //
149
- // <div id={ buttonID } title={ buttonTitle } >
150
- // <PrimaryButton style= { buttonStyles } iconProps= { buttonIcon } text={b.label} onClick={this._panelButtonClicked.bind(this)} disabled={b.disabled} checked={b.checked} /></div>:
151
- // <div id={ buttonID } title={ buttonTitle } >
152
- // <DefaultButton style= { buttonStyles } iconProps= { buttonIcon } text={b.label} onClick={this._panelButtonClicked.bind(this)} disabled={b.disabled} checked={b.checked} /></div>;
153
- // buttons.push( thisButton );
154
- // }
155
- // }); //END buttonRow.map( (b,i) => {
156
- // const stackQuickCommands: IStackTokens = { childrenGap: 10 };
157
- // rowResult = <Stack horizontal={ true } tokens={stackQuickCommands}>
158
- // {buttons}
159
- // </Stack>;
160
- // const styleRows: any = {paddingBottom: 10};
161
- // if ( quickCommands.styleRow ) {
162
- // try {
163
- // Object.keys(quickCommands.styleRow).map( k => {
164
- // styleRows[k] = quickCommands.styleRow[k];
165
- // });
166
- // } catch (e) {
167
- // alert( `quickCommands.styleRow is not valid JSON... please fix: ${quickCommands.styleRow}` );
168
- // }
169
- // }
170
- // allButtonRows.push( <div style={ styleRows }> { rowResult } </div> );
171
- // } //END if ( buttonRow && buttonRow.length > 0 ) {
172
- // }); //END quickCommands.buttons.map( (buttonRow, r) => {
173
- // allButtonRows.push( <Icon iconName= { 'Emoji2' } style={ { fontSize: '24px', } }/> );
174
- // } //END if ( buildAllButtonsTest === true ) {
175
- // }
176
- // return allButtonRows;
177
- // }
178
- covertFieldInfoToIViewFields(parentListFieldTitles, fieldsToShow) {
179
- /**
180
- * This is the export format required:
181
- export const initials : IViewField = {
182
- name: "userInitials",
183
- displayName: "User",
184
- isResizable: true,
185
- sorting: true,
186
- minWidth: 10,
187
- maxWidth: 30
188
- };
189
- */
190
- let viewFields = [];
191
- if (fieldsToShow.length === 0) { //Do all in order of fieldInfo
192
- if (parentListFieldTitles.length > 0) { //Do all in order of fieldInfo
193
- parentListFieldTitles.map(f => {
194
- viewFields.push({
195
- name: f[0],
196
- displayName: f[1],
197
- isResizable: true,
198
- sorting: true,
199
- minWidth: 50,
200
- maxWidth: 100
201
- });
202
- });
203
- }
204
- }
205
- console.log('covertFieldInfoToIViewFields - viewFields', viewFields);
206
- return viewFields;
207
- }
208
33
  handleExpandedFieldInfoToIViewFields(viewFields) {
209
34
  //Before this line was added, I think it was mutating props causing double render
210
35
  viewFields = JSON.parse(JSON.stringify(viewFields));
@@ -240,16 +65,6 @@ export default class ReactListItems extends React.Component {
240
65
  *
241
66
  */
242
67
  this._ListViewFontSizes = [`default-font-size`, `larger-font-size`, `large-font-size`];
243
- /***
244
- * db db d8888b. d8888b. .d8b. d888888b d88888b .d8888. d888888b .d8b. d888888b d88888b
245
- * 88 88 88 `8D 88 `8D d8' `8b `~~88~~' 88' 88' YP `~~88~~' d8' `8b `~~88~~' 88'
246
- * 88 88 88oodD' 88 88 88ooo88 88 88ooooo `8bo. 88 88ooo88 88 88ooooo
247
- * 88 88 88~~~ 88 88 88~~~88 88 88~~~~~ `Y8b. 88 88~~~88 88 88~~~~~
248
- * 88b d88 88 88 .8D 88 88 88 88. db 8D 88 88 88 88 88.
249
- * ~Y8888P' 88 Y8888D' YP YP YP Y88888P `8888Y' YP YP YP YP Y88888P
250
- *
251
- *
252
- */
253
68
  this._onGoToList = () => {
254
69
  if (!this.props.parentListURL || this.props.parentListURL === null || this.props.parentListURL === undefined || this.props.parentListURL.length === 0) {
255
70
  return; // Do nothing
@@ -306,25 +121,20 @@ export default class ReactListItems extends React.Component {
306
121
  React.createElement(DefaultButton, { onClick: this._onClosePanel }, "Cancel")));
307
122
  };
308
123
  console.log('listView PROPS: ', this.props);
309
- const parentListFieldTitles = this.props.parentListFieldTitles ? JSON.parse(this.props.parentListFieldTitles) : '';
310
- // console.log( 'parentListFieldTitles', parentListFieldTitles );
311
124
  let viewFields = [];
312
125
  if (this.props.viewFields.length > 0) {
313
126
  viewFields = this.handleExpandedFieldInfoToIViewFields(this.props.viewFields);
314
127
  }
315
- else {
316
- viewFields = this.covertFieldInfoToIViewFields(parentListFieldTitles, []);
317
- }
318
128
  let groupByFields = [];
319
129
  if (this.props.groupByFields && this.props.groupByFields.length > 0) {
320
130
  //Added this reparse to prevent mutating props
321
131
  groupByFields = JSON.parse(JSON.stringify(this.props.groupByFields));
322
132
  groupByFields.map(gF => { gF.name = gF.name.replace(/\//g, ''); });
323
133
  }
134
+ const richHeightNum = getMaxRichHeightNum(this.props.autoRichHeight, this.props.richHeights[0], this.props.items);
324
135
  this.state = {
325
136
  fontSize: this._ListViewFontSizes[0],
326
137
  maxChars: this.props.maxChars ? this.props.maxChars : 50,
327
- parentListFieldTitles: parentListFieldTitles,
328
138
  viewFields: viewFields,
329
139
  groupByFields: groupByFields,
330
140
  showPanel: false,
@@ -338,6 +148,8 @@ export default class ReactListItems extends React.Component {
338
148
  myDialog: this.createBlankDialog(),
339
149
  pickedCommand: null,
340
150
  panelWidth: PanelType.medium,
151
+ richHeightNum: richHeightNum,
152
+ richHeightStr: `${richHeightNum}em`,
341
153
  firstVisible: 0,
342
154
  lastVisible: this.props.itemsPerPage - 1,
343
155
  commandResult: null,
@@ -378,7 +190,7 @@ export default class ReactListItems extends React.Component {
378
190
  lastVisible: this.props.itemsPerPage - 1,
379
191
  });
380
192
  }
381
- if (prevProps.richHeight !== this.props.richHeight) {
193
+ if (prevProps.richHeights.join('') !== this.props.richHeights.join('')) {
382
194
  updateViewFields = true;
383
195
  redraw = true;
384
196
  }
@@ -388,9 +200,6 @@ export default class ReactListItems extends React.Component {
388
200
  if (prevProps.parentListURL !== this.props.parentListURL) {
389
201
  redraw = true;
390
202
  }
391
- if (prevProps.richHeight !== this.props.richHeight) {
392
- redraw = true;
393
- }
394
203
  /* eslint-enable @typescript-eslint/no-unused-vars */
395
204
  this._updateStateOnPropsChange(updateViewFields);
396
205
  }
@@ -490,7 +299,7 @@ export default class ReactListItems extends React.Component {
490
299
  showRichHeightButton = true;
491
300
  const fieldStyles = [`list-view-rt`];
492
301
  // fieldStyles.push( this._RichTextRowHeight[ this.state.richHeight ] );
493
- field.render = (item, index) => { return React.createElement("div", { style: { maxHeight: this.props.richHeight }, className: fieldStyles.join(' '), dangerouslySetInnerHTML: { __html: item[field.name] } }); };
302
+ field.render = (item, index) => { return React.createElement("div", { style: { maxHeight: this.state.richHeightStr }, className: fieldStyles.join(' '), dangerouslySetInnerHTML: { __html: item[field.name] } }); };
494
303
  // field.render = ( item, index ) => { this._renderRich( item, field.name ) }
495
304
  }
496
305
  else if (field.linkSubstitute || field.textSubstitute) {
@@ -521,7 +330,7 @@ export default class ReactListItems extends React.Component {
521
330
  }); // close: viewFields.map ( field => {
522
331
  //=>> address: https://github.com/mikezimm/drilldown7/issues/270
523
332
  const changeRichHeight = showRichHeightButton !== true ? null :
524
- React.createElement("div", { title: `Change row height from ${this.props.richHeight}`, onClick: this.props.updateRichHeightProps, style: { fontSize: 'larger', fontWeight: 'bolder', width: '25px', textAlign: 'center', cursor: 'pointer' } },
333
+ React.createElement("div", { title: `Change row height from ${this.state.richHeightStr}`, onClick: this._updateRichHeightState.bind(this), style: { fontSize: 'larger', fontWeight: 'bolder', width: '25px', textAlign: 'center', cursor: 'pointer' } },
525
334
  React.createElement(Icon, { iconName: 'CollapseMenu' }));
526
335
  //=>> address: https://github.com/mikezimm/drilldown7/issues/169
527
336
  const changeFont = React.createElement("div", { title: "Change font size", onClick: this._changeFontSize.bind(this), style: { fontSize: 'larger', fontWeight: 'bolder', width: '25px', textAlign: 'center', cursor: 'pointer' } },
@@ -561,8 +370,9 @@ export default class ReactListItems extends React.Component {
561
370
  listLink));
562
371
  /**
563
372
  * Brought this in directly from Drilldown web part
373
+ * added quickCommands && due to testing on spfx-v2-tester
564
374
  */
565
- const createFooter = quickCommands.successBanner > 0 ? true : false; //CommandItemNotUpdatedMessage
375
+ const createFooter = quickCommands && quickCommands.successBanner > 0 ? true : false; //CommandItemNotUpdatedMessage
566
376
  const footerEleClasses = ['quickCommandFooterStyles', commandResult ? 'quickCommandShow' : 'quickCommandHide'];
567
377
  if (!commandResult) {
568
378
  //Do nothing if no result
@@ -599,25 +409,30 @@ export default class ReactListItems extends React.Component {
599
409
  footerElement,
600
410
  listView)));
601
411
  }
602
- // } else {
603
- // <div className={ styles.container }></div>
604
- // return (
605
- // <div className={ styles.logListView }>
606
- // { thisLog }
607
- // </div>
608
- // );
609
- // }
610
412
  } //if ( this.props.items != null && this.props.items.length > 0 ) {
611
413
  } // Render
414
+ /***
415
+ * db db d8888b. d8888b. .d8b. d888888b d88888b .d8888. d888888b .d8b. d888888b d88888b
416
+ * 88 88 88 `8D 88 `8D d8' `8b `~~88~~' 88' 88' YP `~~88~~' d8' `8b `~~88~~' 88'
417
+ * 88 88 88oodD' 88 88 88ooo88 88 88ooooo `8bo. 88 88ooo88 88 88ooooo
418
+ * 88 88 88~~~ 88 88 88~~~88 88 88~~~~~ `Y8b. 88 88~~~88 88 88~~~~~
419
+ * 88b d88 88 88 .8D 88 88 88 88. db 8D 88 88 88 88 88.
420
+ * ~Y8888P' 88 Y8888D' YP YP YP Y88888P `8888Y' YP YP YP YP Y88888P
421
+ *
422
+ *
423
+ */
424
+ _updateRichHeightState() {
425
+ const oldValue = this.state.richHeightNum;
426
+ const oldIdx = this.props.richHeights.indexOf(oldValue);
427
+ const nextIdx = oldIdx === this.props.richHeights.length - 1 ? 0 : oldIdx + 1;
428
+ const richHeightNum = this.props.richHeights[nextIdx];
429
+ this.setState({ richHeightNum: richHeightNum, richHeightStr: `${richHeightNum}em` });
430
+ }
612
431
  _updateStateOnPropsChange(pushViewFieldsToState) {
613
432
  let viewFields = [];
614
- let parentListFieldTitles = this.props.parentListFieldTitles ? JSON.parse(this.props.parentListFieldTitles) : '';
615
433
  if (this.props.viewFields.length > 0) {
616
434
  viewFields = this.handleExpandedFieldInfoToIViewFields(this.props.viewFields);
617
435
  }
618
- else {
619
- viewFields = this.covertFieldInfoToIViewFields(parentListFieldTitles, []);
620
- }
621
436
  let groupByFields = [];
622
437
  if (this.props.groupByFields && this.props.groupByFields.length > 0) {
623
438
  groupByFields = JSON.parse(JSON.stringify(this.props.groupByFields));
@@ -640,21 +455,6 @@ export default class ReactListItems extends React.Component {
640
455
  *
641
456
  *
642
457
  */
643
- //private async ensureTrackTimeList(myListName: string, myListDesc: string, ProjectOrTime: string): Promise<boolean> {
644
- // private async _panelButtonClicked ( item: any ): Promise<void> {
645
- // let e: any = event;
646
- // let thisID = findParentElementPropLikeThis(e.target, 'id', 'ButtonID', 5, 'begins');
647
- // if ( !thisID ) {
648
- // alert('Whoops! Can not find ID of _panelButtonClicked!');
649
- // return null;
650
- // } else {
651
- // try {
652
- // await this.startThisQuickUpdate( thisID );
653
- // } catch (ev) {
654
- // console.log('_panelButtonClicked error:', ev );
655
- // }
656
- // }
657
- // }
658
458
  async _panelButtonClickedv2(b, item) {
659
459
  console.log('_panelButtonClickedv2', item);
660
460
  if (!item) {
@@ -734,47 +534,6 @@ export default class ReactListItems extends React.Component {
734
534
  }
735
535
  }
736
536
  }
737
- // private async startThisQuickUpdate ( thisID: string ): Promise<void>{
738
- // const buttonID = thisID.split(this.delim);
739
- // //let buttonID = ['ButtonID', r, i , item.Id].join(this.delim);
740
- // const buttonRow: any = buttonID[1];
741
- // const buttonIndex: any = buttonID[2];
742
- // const itemId = buttonID[3];
743
- // const thisButtonObject : IQuickButton = this.props.quickCommands.buttons[ buttonRow ][ buttonIndex ];
744
- // if ( !thisButtonObject ) {
745
- // alert('_panelButtonClicked - can not find thisButtonObject - ' + thisID );
746
- // } else {
747
- // if ( thisButtonObject.updateItem ) {
748
- // let readyToUpdate = true;
749
- // if ( !this.props.webURL ) { alert('Missing listWebUrl for quickCommands') ; readyToUpdate = false ; }
750
- // if ( !this.props.listName ) { alert('Missing listName for quickCommands') ; readyToUpdate = false ; }
751
- // if ( readyToUpdate === true ) {
752
- // //Attempt to update item:
753
- // if ( thisButtonObject.confirm && thisButtonObject.confirm.length > 0 ) {
754
- // let myDialog: IMyBigDialogProps = this.createBlankDialog();
755
- // myDialog.title = "Are you sure you want to make this update?";
756
- // myDialog.dialogMessage = thisButtonObject.confirm + '';
757
- // myDialog.confirmButton = thisButtonObject.label + '';
758
- // myDialog.showDialog = true;
759
- // myDialog.maxWidth = 600;
760
- // this.setState({
761
- // pickedCommand: thisButtonObject,
762
- // myDialog: myDialog as IMyBigDialogProps,
763
- // });
764
- // } else {
765
- // await this.completeThisQuickUpdate ( itemId, thisButtonObject );
766
- // }
767
- // } else {
768
- // //Don't update item:
769
- // }
770
- // }
771
- // if ( thisButtonObject.panelMessage ) {
772
- // this.setState({
773
- // panelMessage: thisButtonObject.panelMessage,
774
- // });
775
- // }
776
- // }
777
- // }
778
537
  async completeThisQuickUpdate(itemId, thisButtonObject) {
779
538
  const result = await updateReactListItem(this.props.webURL, this.props.listName, parseInt(itemId), thisButtonObject, this.props.sourceUserInfo, this.state.panelItem);
780
539
  //If success (result is error message and null by default )
@@ -858,7 +617,7 @@ export default class ReactListItems extends React.Component {
858
617
  if (e.srcElement.dataset && e.srcElement.dataset.iconName === 'Attach') {
859
618
  clickedAttach = true;
860
619
  }
861
- await this.createPanelAttachments(thisID, panelItem);
620
+ await this._createPanelAttachments(thisID, panelItem);
862
621
  let canShowAPanel = thisID === null || thisID === undefined || panelItem === null ? false : true;
863
622
  let showFullPanel = canShowAPanel === true && clickedAttach !== true ? true : false;
864
623
  // 2020-10-13: The last check in this row just didn't seem right... was && this.props.includeListLink === true ? true : false;