@mikezimm/fps-library-v2 1.0.32 → 1.0.34

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 (114) hide show
  1. package/CHANGELOG.md +11 -1
  2. package/lib/banner/components/EasyPages/functions.d.ts +1 -1
  3. package/lib/banner/components/EasyPages/functions.d.ts.map +1 -1
  4. package/lib/banner/components/SpecialBanner/component.d.ts +1 -1
  5. package/lib/banner/components/SpecialBanner/component.d.ts.map +1 -1
  6. package/lib/banner/features/Expando/functions.d.ts +1 -1
  7. package/lib/banner/features/Expando/functions.d.ts.map +1 -1
  8. package/lib/banner/features/PageStyle/minimzeToolbar.d.ts +2 -2
  9. package/lib/banner/features/PageStyle/minimzeToolbar.d.ts.map +1 -1
  10. package/lib/banner/features/PageStyle/setAllSectionStyles.d.ts +1 -1
  11. package/lib/banner/features/PageStyle/setAllSectionStyles.d.ts.map +1 -1
  12. package/lib/banner/features/PinMe/FPSPinMenu.d.ts +1 -1
  13. package/lib/banner/features/PinMe/FPSPinMenu.d.ts.map +1 -1
  14. package/lib/banner/propPane/controls.d.ts +1 -1
  15. package/lib/banner/propPane/controls.d.ts.map +1 -1
  16. package/lib/common/interfaces/openSource/spfxControlsReact/@3.7.2/IViewField.d.ts +139 -0
  17. package/lib/common/interfaces/openSource/spfxControlsReact/@3.7.2/IViewField.d.ts.map +1 -0
  18. package/lib/common/interfaces/openSource/spfxControlsReact/@3.7.2/IViewField.js +2 -0
  19. package/lib/common/interfaces/openSource/spfxControlsReact/@3.7.2/IViewField.js.map +1 -0
  20. package/lib/components/atoms/Elements/basic.d.ts +1 -1
  21. package/lib/components/atoms/Elements/basic.d.ts.map +1 -1
  22. package/lib/components/molecules/Performance/tables.d.ts +1 -1
  23. package/lib/components/molecules/Performance/tables.d.ts.map +1 -1
  24. package/lib/components/molecules/PropPaneCols/PropPaneCols.module.scss.d.ts +3 -0
  25. package/lib/components/molecules/PropPaneCols/PropPaneCols.module.scss.d.ts.map +1 -0
  26. package/lib/components/molecules/PropPaneCols/PropPaneCols.module.scss.js +6 -0
  27. package/lib/components/molecules/PropPaneCols/PropPaneCols.module.scss.js.map +1 -0
  28. package/lib/components/molecules/PropPaneCols/PropPaneColsClass.d.ts +42 -0
  29. package/lib/components/molecules/PropPaneCols/PropPaneColsClass.d.ts.map +1 -0
  30. package/lib/components/molecules/PropPaneCols/PropPaneColsClass.js +240 -0
  31. package/lib/components/molecules/PropPaneCols/PropPaneColsClass.js.map +1 -0
  32. package/lib/components/molecules/PropPaneCols/PropPaneColsHook.d.ts +1 -0
  33. package/lib/components/molecules/PropPaneCols/PropPaneColsHook.d.ts.map +1 -0
  34. package/lib/components/molecules/PropPaneCols/PropPaneColsHook.js +135 -0
  35. package/lib/components/molecules/PropPaneCols/PropPaneColsHook.js.map +1 -0
  36. package/lib/components/molecules/PropPaneCols/components/FieldPanel.d.ts +10 -0
  37. package/lib/components/molecules/PropPaneCols/components/FieldPanel.d.ts.map +1 -0
  38. package/lib/components/molecules/PropPaneCols/components/FieldPanel.js +43 -0
  39. package/lib/components/molecules/PropPaneCols/components/FieldPanel.js.map +1 -0
  40. package/lib/components/molecules/PropPaneCols/components/IPropPaneColsProps.d.ts +87 -0
  41. package/lib/components/molecules/PropPaneCols/components/IPropPaneColsProps.d.ts.map +1 -0
  42. package/lib/components/molecules/PropPaneCols/components/IPropPaneColsProps.js +2 -0
  43. package/lib/components/molecules/PropPaneCols/components/IPropPaneColsProps.js.map +1 -0
  44. package/lib/components/molecules/PropPaneCols/components/OnClickHelpers.d.ts +18 -0
  45. package/lib/components/molecules/PropPaneCols/components/OnClickHelpers.d.ts.map +1 -0
  46. package/lib/components/molecules/PropPaneCols/components/OnClickHelpers.js +120 -0
  47. package/lib/components/molecules/PropPaneCols/components/OnClickHelpers.js.map +1 -0
  48. package/lib/components/molecules/PropPaneCols/components/command/Accordion.d.ts +17 -0
  49. package/lib/components/molecules/PropPaneCols/components/command/Accordion.d.ts.map +1 -0
  50. package/lib/components/molecules/PropPaneCols/components/command/Accordion.js +229 -0
  51. package/lib/components/molecules/PropPaneCols/components/command/Accordion.js.map +1 -0
  52. package/lib/components/molecules/PropPaneCols/components/command/IAccordion.d.ts +69 -0
  53. package/lib/components/molecules/PropPaneCols/components/command/IAccordion.d.ts.map +1 -0
  54. package/lib/components/molecules/PropPaneCols/components/command/IAccordion.js +73 -0
  55. package/lib/components/molecules/PropPaneCols/components/command/IAccordion.js.map +1 -0
  56. package/lib/components/molecules/PropPaneCols/components/command/SampleDesign copy.d.ts +9 -0
  57. package/lib/components/molecules/PropPaneCols/components/command/SampleDesign copy.d.ts.map +1 -0
  58. package/lib/components/molecules/PropPaneCols/components/command/SampleDesign copy.js +61 -0
  59. package/lib/components/molecules/PropPaneCols/components/command/SampleDesign copy.js.map +1 -0
  60. package/lib/components/molecules/PropPaneCols/components/command/SampleDesign.d.ts +10 -0
  61. package/lib/components/molecules/PropPaneCols/components/command/SampleDesign.d.ts.map +1 -0
  62. package/lib/components/molecules/PropPaneCols/components/command/SampleDesign.js +66 -0
  63. package/lib/components/molecules/PropPaneCols/components/command/SampleDesign.js.map +1 -0
  64. package/lib/components/molecules/PropPaneCols/components/command/createLogic.d.ts +13 -0
  65. package/lib/components/molecules/PropPaneCols/components/command/createLogic.d.ts.map +1 -0
  66. package/lib/components/molecules/PropPaneCols/components/command/createLogic.js +397 -0
  67. package/lib/components/molecules/PropPaneCols/components/command/createLogic.js.map +1 -0
  68. package/lib/components/molecules/PropPaneCols/components/command/helpers.d.ts +2 -0
  69. package/lib/components/molecules/PropPaneCols/components/command/helpers.d.ts.map +1 -0
  70. package/lib/components/molecules/PropPaneCols/components/command/helpers.js +2 -0
  71. package/lib/components/molecules/PropPaneCols/components/command/helpers.js.map +1 -0
  72. package/lib/components/molecules/PropPaneCols/components/command/tableRows.d.ts +5 -0
  73. package/lib/components/molecules/PropPaneCols/components/command/tableRows.d.ts.map +1 -0
  74. package/lib/components/molecules/PropPaneCols/components/command/tableRows.js +25 -0
  75. package/lib/components/molecules/PropPaneCols/components/command/tableRows.js.map +1 -0
  76. package/lib/components/molecules/PropPaneCols/components/common.d.ts +4 -0
  77. package/lib/components/molecules/PropPaneCols/components/common.d.ts.map +1 -0
  78. package/lib/components/molecules/PropPaneCols/components/common.js +16 -0
  79. package/lib/components/molecules/PropPaneCols/components/common.js.map +1 -0
  80. package/lib/components/molecules/PropPaneCols/components/fetch/Pane.d.ts +11 -0
  81. package/lib/components/molecules/PropPaneCols/components/fetch/Pane.d.ts.map +1 -0
  82. package/lib/components/molecules/PropPaneCols/components/fetch/Pane.js +51 -0
  83. package/lib/components/molecules/PropPaneCols/components/fetch/Pane.js.map +1 -0
  84. package/lib/components/molecules/PropPaneCols/components/fetch/funcions.d.ts +3 -0
  85. package/lib/components/molecules/PropPaneCols/components/fetch/funcions.d.ts.map +1 -0
  86. package/lib/components/molecules/PropPaneCols/components/fetch/funcions.js +96 -0
  87. package/lib/components/molecules/PropPaneCols/components/fetch/funcions.js.map +1 -0
  88. package/lib/components/molecules/PropPaneCols/components/main/FieldTable.d.ts +14 -0
  89. package/lib/components/molecules/PropPaneCols/components/main/FieldTable.d.ts.map +1 -0
  90. package/lib/components/molecules/PropPaneCols/components/main/FieldTable.js +68 -0
  91. package/lib/components/molecules/PropPaneCols/components/main/FieldTable.js.map +1 -0
  92. package/lib/components/molecules/PropPaneCols/components/main/Pane.d.ts +13 -0
  93. package/lib/components/molecules/PropPaneCols/components/main/Pane.d.ts.map +1 -0
  94. package/lib/components/molecules/PropPaneCols/components/main/Pane.js +87 -0
  95. package/lib/components/molecules/PropPaneCols/components/main/Pane.js.map +1 -0
  96. package/lib/components/molecules/PropPaneCols/components/selected/TableHook.d.ts +9 -0
  97. package/lib/components/molecules/PropPaneCols/components/selected/TableHook.d.ts.map +1 -0
  98. package/lib/components/molecules/PropPaneCols/components/selected/TableHook.js +63 -0
  99. package/lib/components/molecules/PropPaneCols/components/selected/TableHook.js.map +1 -0
  100. package/lib/components/molecules/PropPaneCols/components/selected/functions.d.ts +5 -0
  101. package/lib/components/molecules/PropPaneCols/components/selected/functions.d.ts.map +1 -0
  102. package/lib/components/molecules/PropPaneCols/components/selected/functions.js +59 -0
  103. package/lib/components/molecules/PropPaneCols/components/selected/functions.js.map +1 -0
  104. package/lib/components/molecules/PropPaneCols/components/views/Accordion.d.ts +12 -0
  105. package/lib/components/molecules/PropPaneCols/components/views/Accordion.d.ts.map +1 -0
  106. package/lib/components/molecules/PropPaneCols/components/views/Accordion.js +29 -0
  107. package/lib/components/molecules/PropPaneCols/components/views/Accordion.js.map +1 -0
  108. package/lib/components/molecules/PropPaneCols/components/views/functions.d.ts +5 -0
  109. package/lib/components/molecules/PropPaneCols/components/views/functions.d.ts.map +1 -0
  110. package/lib/components/molecules/PropPaneCols/components/views/functions.js +133 -0
  111. package/lib/components/molecules/PropPaneCols/components/views/functions.js.map +1 -0
  112. package/lib/logic/Errors/friendly.d.ts +1 -1
  113. package/lib/logic/Errors/friendly.d.ts.map +1 -1
  114. package/package.json +2 -2
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createLogic.d.ts","sourceRoot":"","sources":["../../../../../../src/components/molecules/PropPaneCols/components/command/createLogic.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,SAAS,EAAiB,MAAM,uBAAuB,CAAC;AAMjE,OAAO,EAAiB,oBAAoB,EAAmB,MAAM,cAAc,CAAA;AAgEnF,wBAAgB,kBAAkB,CAAG,QAAQ,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAI,oBAAoB,CAsTrH;AAED;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAE,gBAAgB,EAAE,MAAM,EAAG,QAAQ,EAAE,IAAI,GAAG,IAAI,EAAG,QAAQ,EAAE,MAAM,EAAG,QAAQ,EAAE,OAAO,GAAI,MAAM,CAe1H"}
@@ -0,0 +1,397 @@
1
+ import { AllUpdateActions, } from './IAccordion';
2
+ const ChoicePerButton = {
3
+ strPrev: "",
4
+ str1: "",
5
+ strNext: "",
6
+ label: "Set to {str1}",
7
+ primary: false,
8
+ confirm: "Are you sure you want to Set to {str1}",
9
+ // alert: "We made our updates!",
10
+ console: "Updated item to {str1}",
11
+ panelMessage: "Updated item to {str1}",
12
+ // icon: "User",
13
+ updateItem: {
14
+ // DueDate: "[today+14]",
15
+ // AssignedToId: "[Me]",
16
+ // Status: "{str1}",
17
+ // ReviewDays: 99,
18
+ // Body: "Hi! It's [Today+3] and I'm $MyName$",
19
+ // Comments: "{{append rich stamp}}"
20
+ },
21
+ showWhenEvalTrue: "", //item.AssignedToTitle !== sourceUserInfo.Title
22
+ };
23
+ const SingleButtonTitle = "Update Button Title";
24
+ const EmptyButton = {
25
+ str1: SingleButtonTitle,
26
+ label: "{str1}",
27
+ primary: false,
28
+ confirm: "Are you sure you want: {str1}",
29
+ // alert: "We made our updates!",
30
+ console: "Updated item: {str1}",
31
+ panelMessage: "Updated item: {str1}",
32
+ // icon: "User",
33
+ updateItem: {
34
+ // DueDate: "[today+14]",
35
+ // AssignedToId: "[Me]",
36
+ // Status: "{str1}",
37
+ // ReviewDays: 99,
38
+ // Body: "Hi! It's [Today+3] and I'm $MyName$",
39
+ // Comments: "{{append rich stamp}}"
40
+ },
41
+ showWhenEvalTrue: "", //item.AssignedToTitle !== sourceUserInfo.Title
42
+ };
43
+ //IQuickCommands
44
+ // export function buildQuickCommands( selected: IMinField[], title: string, description: string ): IQuickCommandsDesign {
45
+ // const QuickDesign: IQuickCommandsDesign = buildQuickButtons( selected, title, description );
46
+ // return QuickDesign;
47
+ // }
48
+ export function buildQuickCommands(selected, title, description) {
49
+ const buttons = [];
50
+ const summary = [];
51
+ //Do all choice column settings first because it can create multiple buttons
52
+ selected.map((field) => {
53
+ if (field.commands.perChoice === true) {
54
+ const filterButton = field.commands.demoteChoice === true ? 'demote' : field.commands.promoteChoice === true ? 'promote' : field.commands.bracketChoice === true ? 'bracket' : 'none';
55
+ const catchNullEmpty = `!item.${field.InternalName}`;
56
+ field.Choices.map((choice, idx) => {
57
+ const buttonSummary = {
58
+ label: '',
59
+ type: 'choice',
60
+ updates: [],
61
+ filters: [],
62
+ fields: [field.InternalName],
63
+ };
64
+ let skipSummary = false; //Used later to push to buttonSummary if the button does get created. true === skip pushing
65
+ const buttonIndex = idx === 0 ? 'first' : idx === field.Choices.length - 1 ? 'last' : 'middle';
66
+ const thisButton = JSON.parse(JSON.stringify(ChoicePerButton));
67
+ if (buttonIndex === 'last' && field.commands.rejectLast === true) {
68
+ // Always show this button - EXCEPT if this choice is already set
69
+ thisButton.str1 = choice;
70
+ // Just don't show button when the status is the current one.
71
+ thisButton.showWhenEvalTrue = `item.${field.InternalName} !== '${choice}'`;
72
+ thisButton.updateItem[field.InternalName] = `{str1}`;
73
+ buttons.push(thisButton);
74
+ }
75
+ else if (buttonIndex === 'first' && filterButton === 'promote') {
76
+ //Skip this button since you can not demote the item any further
77
+ thisButton.str1 = choice;
78
+ thisButton.showWhenEvalTrue = catchNullEmpty;
79
+ thisButton.updateItem[field.InternalName] = `{str1}`;
80
+ buttons.push(thisButton);
81
+ }
82
+ else if (buttonIndex === 'last' && filterButton === 'demote') {
83
+ //Skip this button since you can not promote the item any further
84
+ skipSummary = true;
85
+ }
86
+ else {
87
+ const promoteFilter = idx === 0 ? '' : field.Choices[idx - 1];
88
+ const demoteFilter = idx === field.Choices.length - 1 ? '' : field.Choices[idx + 1];
89
+ //This will enable the first button if the choice column is ever null/empty
90
+ thisButton.showWhenEvalTrue = buttonIndex === 'first' ? catchNullEmpty : '';
91
+ thisButton.str1 = choice;
92
+ if (promoteFilter && (filterButton === 'promote' || filterButton === 'bracket')) {
93
+ thisButton.strPrev = promoteFilter; // for https://github.com/mikezimm/Pnpjs-v2-Upgrade-sample/issues/25
94
+ // thisButton.showWhenEvalTrue = bumpEval( thisButton.showWhenEvalTrue, '||', `item.${field.InternalName} === '${promoteFilter}'` , false );
95
+ thisButton.showWhenEvalTrue = bumpEval(thisButton.showWhenEvalTrue, '||', `item.${field.InternalName} === {strPrev}`, false);
96
+ // thisButton.showWhenEvalTrue += thisButton.showWhenEvalTrue ? ' || ' : '';
97
+ // thisButton.showWhenEvalTrue += `item.${field.InternalName} === ${promoteFilter}`;
98
+ }
99
+ if (demoteFilter && (filterButton === 'demote' || filterButton === 'bracket')) {
100
+ thisButton.strNext = demoteFilter; // for https://github.com/mikezimm/Pnpjs-v2-Upgrade-sample/issues/25
101
+ // thisButton.showWhenEvalTrue = bumpEval( thisButton.showWhenEvalTrue, '||', `item.${field.InternalName} === '${demoteFilter}'` , false );
102
+ thisButton.showWhenEvalTrue = bumpEval(thisButton.showWhenEvalTrue, '||', `item.${field.InternalName} === {strNext}`, false);
103
+ // thisButton.showWhenEvalTrue += thisButton.showWhenEvalTrue ? ' || ' : '';
104
+ // thisButton.showWhenEvalTrue += `item.${field.InternalName} === ${demoteFilter}`;
105
+ }
106
+ if (filterButton === 'none') {
107
+ //Just don't show button when the status is the current one.
108
+ thisButton.showWhenEvalTrue = `item.${field.InternalName} !== '{str1}'`;
109
+ }
110
+ else { // Always exclude from showing when it's the current choice. No need to set it to itself.
111
+ //Don't think this is needed since the other filters take care of it UNLESS
112
+ // thisButton.showWhenEvalTrue = `item.${field.InternalName} !== ${choice} ${ !thisButton.showWhenEvalTrue ? '' : ` && ( ${thisButton.showWhenEvalTrue} )` }`;
113
+ }
114
+ thisButton.updateItem[field.InternalName] = `{str1}`;
115
+ buttons.push(thisButton);
116
+ }
117
+ buttonSummary.label = thisButton.str1;
118
+ if (skipSummary === false)
119
+ summary.push(buttonSummary);
120
+ });
121
+ }
122
+ });
123
+ if (buttons.length === 0) {
124
+ buttons.push(JSON.parse(JSON.stringify(EmptyButton)));
125
+ summary.push({
126
+ label: EmptyButton.label,
127
+ type: 'button',
128
+ updates: [],
129
+ filters: [],
130
+ fields: [],
131
+ });
132
+ }
133
+ //Get filtered fields
134
+ const eqUserFields = [];
135
+ const neUserFields = [];
136
+ //Get filtered fields
137
+ const YesNoFields = [];
138
+ //Get filtered fields
139
+ const gtTodayFields = []; //Currently not supported in Drilldown functions
140
+ const ltTodayFields = []; //Currently not supported in Drilldown functions
141
+ const filteredFields = [];
142
+ selected.map((field) => {
143
+ //Find any field that has a filter command
144
+ //If filter command contains show, add to eqFields array else if contains hide, add to neFields array
145
+ Object.keys(field.commands).map((command) => {
146
+ if (field.commands[command] === true) {
147
+ // if ( command.indexOf('show') === 0 ) {
148
+ // if ( command === 'showToUser' ) { eqUserFields.push( field.InternalName ) ; }
149
+ // else if ( command === 'hideFromUser' ) { neUserFields.push( field.InternalName ) ; }
150
+ if (command === 'showToUser' && field.TypeAsString === 'User') {
151
+ eqUserFields.push(`item.${field.InternalName}Id === sourceUserInfo.Id`);
152
+ filteredFields.push(field.InternalName);
153
+ }
154
+ else if (command === 'showToUser' && field.TypeAsString === 'UserMulti') {
155
+ eqUserFields.push(`item.${field.InternalName}Id.indexOf( sourceUserInfo.Id ) > -1`);
156
+ filteredFields.push(field.InternalName);
157
+ }
158
+ else if (command === 'hideFromUser' && field.TypeAsString === 'User') {
159
+ neUserFields.push(`item.${field.InternalName}Id !== sourceUserInfo.Id`);
160
+ filteredFields.push(field.InternalName);
161
+ }
162
+ else if (command === 'hideFromUser' && field.TypeAsString === 'UserMulti') {
163
+ neUserFields.push(`item.${field.InternalName}Id.indexOf( sourceUserInfo.Id ) === -1`);
164
+ filteredFields.push(field.InternalName);
165
+ }
166
+ // else if ( command === 'promoteChoice' ) { eqTextFields.push( field.InternalName ) ; }
167
+ // else if ( command === 'demoteChoice' ) { eqTextFields.push( field.InternalName ) ; }
168
+ // else if ( command === 'bracketChoice' ) { eqTextFields.push( field.InternalName ) ; }
169
+ //export type IYesNoActionTypes = 'showOnTrue' | 'showOnFalse' | 'showOnNull' | 'setTrue' | 'setFalse' | 'setToggle' ;
170
+ else if (command === 'showOnTrue') {
171
+ YesNoFields.push(`item.${field.InternalName} === true`);
172
+ filteredFields.push(field.InternalName);
173
+ }
174
+ else if (command === 'showOnFalse') {
175
+ YesNoFields.push(`item.${field.InternalName} === false`);
176
+ filteredFields.push(field.InternalName);
177
+ }
178
+ else if (command === 'showOnNull') {
179
+ YesNoFields.push(`item.${field.InternalName} === null`);
180
+ filteredFields.push(field.InternalName);
181
+ }
182
+ else if (command === 'showIfFuture') {
183
+ gtTodayFields.push(field.InternalName);
184
+ filteredFields.push(field.InternalName);
185
+ }
186
+ else if (command === 'showIfPast') {
187
+ ltTodayFields.push(field.InternalName);
188
+ filteredFields.push(field.InternalName);
189
+ }
190
+ // } if ( command.indexOf('hide') === 0 ) { neUserFields.push( field.InternalName ) ; }
191
+ }
192
+ });
193
+ });
194
+ const FilterStrings = [...eqUserFields, ...neUserFields, ...YesNoFields, ...gtTodayFields, ...ltTodayFields];
195
+ /**
196
+ * This applies user filters defined above
197
+ */
198
+ const AllDetectedFilters = [...eqUserFields, ...neUserFields];
199
+ const UserEvalFilters = AllDetectedFilters.length === 0 ? '' : `( ${AllDetectedFilters.join(' && ')} )`;
200
+ const YesNoEvalFilters = YesNoFields.length === 0 ? '' : `( ${YesNoFields.join(' && ')} )`;
201
+ if (UserEvalFilters) {
202
+ buttons.map((button, idx) => {
203
+ button.showWhenEvalTrue = bumpEval(button.showWhenEvalTrue, '&&', UserEvalFilters, false);
204
+ });
205
+ }
206
+ if (YesNoEvalFilters) {
207
+ buttons.map((button) => {
208
+ button.showWhenEvalTrue = bumpEval(button.showWhenEvalTrue, '&&', YesNoEvalFilters, false);
209
+ });
210
+ }
211
+ const updateObject = {};
212
+ // const today = new Date();
213
+ const updatedFields = [];
214
+ const updatedLabels = [];
215
+ selected.map((field) => {
216
+ //Find any field that has a filter command
217
+ const IntName = field.InternalName;
218
+ const IntNameId = `${IntName}Id`;
219
+ const Title = field.Title;
220
+ const TypeAsString = field.TypeAsString;
221
+ //Go through all possible update actions
222
+ AllUpdateActions.map((action) => {
223
+ if (field.commands[action.cmd] === true) {
224
+ updatedFields.push(field);
225
+ /**
226
+ * NEED TO ADD ANY CHOICE SETTINGS NOT ALREADY DONE.
227
+ */
228
+ if (action.cmd === 'setToday') {
229
+ updateObject[IntName] = '[Today]';
230
+ updatedLabels.push(`Set ${Title} to Today`);
231
+ }
232
+ else if (action.cmd === 'set1Week') {
233
+ updateObject[IntName] = '[Today+7]';
234
+ updatedLabels.push(`Set ${Title} to next Week`);
235
+ }
236
+ else if (action.cmd === 'set1Month') {
237
+ updateObject[IntName] = '[Today+30]';
238
+ updatedLabels.push(`Set ${Title} to next Month`);
239
+ }
240
+ else if (action.cmd === 'clearDate') {
241
+ updateObject[IntName] = null;
242
+ updatedLabels.push(`Clear ${Title}`);
243
+ }
244
+ else if (action.cmd === 'replaceText') {
245
+ updateObject[IntName] = `Hello world! It is [Today] and my name is [MyName] - and I clicked '{str1}'`;
246
+ updatedLabels.push(`Updated : ${Title}`);
247
+ }
248
+ else if (action.cmd === 'promptText') {
249
+ updateObject[IntName] = '{{stamp}}';
250
+ updatedLabels.push(`Update comment for: ${Title}`);
251
+ }
252
+ else if (action.cmd === 'depends' && TypeAsString === 'DateTime') {
253
+ updateObject[IntName] = 'eval( item.TESTCOLUMN===`{str1}` ? `[Today]` : item.TESTCOLUMN===`{strNext}` ? null : item.TESTCOLUMN )';
254
+ updatedLabels.push(`Depends on item.TESTCOLUMN`);
255
+ }
256
+ // else if ( action.cmd === 'captcha' && TypeAsString === 'DateTime' ) { updateObject[ IntName ] = '{{captcha=Created?Verify Created Date}}' ; updatedLabels.push( `Verify Created Date: ${Title}` ); }
257
+ else if (action.cmd === 'captcha' && TypeAsString === 'Text') {
258
+ updateObject[IntName] = '{{captcha=Author/Title?Verify Created By Name}}';
259
+ updatedLabels.push(`Verify Created By Name: ${Title}`);
260
+ }
261
+ else if (action.cmd === 'appendNote') {
262
+ updateObject[IntName] = '{{append rich stamp}}';
263
+ updatedLabels.push(`Add comment to: ${Title}`);
264
+ }
265
+ else if (action.cmd === 'replaceNote') {
266
+ updateObject[IntName] = '{{rich stamp}}';
267
+ updatedLabels.push(`Replace comment in: ${Title}`);
268
+ }
269
+ //These are all the user variants
270
+ else if (action.cmd === 'setUser' && TypeAsString === 'UserMulti') {
271
+ updateObject[IntNameId] = '{Me}';
272
+ updatedLabels.push(`Set ${Title} to me`);
273
+ }
274
+ else if (action.cmd === 'setUser' && TypeAsString === 'User') {
275
+ updateObject[IntNameId] = '[Me]';
276
+ updatedLabels.push(`Set ${Title} to me`);
277
+ }
278
+ else if (action.cmd === 'addUser' && TypeAsString === 'UserMulti') {
279
+ updateObject[IntNameId] = '{+Me}';
280
+ updatedLabels.push(`Add me to ${Title}`);
281
+ }
282
+ else if (action.cmd === 'addUser' && TypeAsString === 'User') {
283
+ updateObject[IntNameId] = '[Me]';
284
+ updatedLabels.push(`Add me to ${Title}`);
285
+ }
286
+ else if (action.cmd === 'removeUser' && TypeAsString === 'UserMulti') {
287
+ updateObject[IntNameId] = '{-Me}';
288
+ updatedLabels.push(`Remove me from ${Title}`);
289
+ }
290
+ else if (action.cmd === 'removeUser' && TypeAsString === 'User') {
291
+ updateObject[IntNameId] = '[-Me]';
292
+ updatedLabels.push(`Remove me from ${Title}`);
293
+ }
294
+ else if (action.cmd === 'clearUsers' && TypeAsString === 'UserMulti') {
295
+ updateObject[IntNameId] = '[]';
296
+ updatedLabels.push(`Clear ${Title}`);
297
+ }
298
+ else if (action.cmd === 'clearUsers' && TypeAsString === 'User') {
299
+ updateObject[IntNameId] = '[]';
300
+ updatedLabels.push(`Clear ${Title}`);
301
+ }
302
+ ///export type IYesNoActionTypes = 'showOnTrue' | 'showOnFalse' | 'showOnNull' | 'setTrue' | 'setFalse' | 'setToggle' ;
303
+ else if (action.cmd === 'setTrue') {
304
+ updateObject[IntName] = true;
305
+ updatedLabels.push(`Set ${Title} to Yes`);
306
+ }
307
+ else if (action.cmd === 'setFalse') {
308
+ updateObject[IntName] = false;
309
+ updatedLabels.push(`Set ${Title} to No`);
310
+ }
311
+ // else if ( action.cmd === 'setToggle' ) { updateObject[ IntName ] = '[]' ; }
312
+ }
313
+ });
314
+ });
315
+ console.log('updateObject: ', updateObject);
316
+ if (buttons.length === 1) {
317
+ if (buttons[0].str1 === SingleButtonTitle) {
318
+ if (Object.keys(updateObject).length === 1) {
319
+ buttons[0].str1 = updatedLabels[0];
320
+ }
321
+ else if (Object.keys(updateObject).length > 1) {
322
+ buttons[0].str1 = `Update ${updatedFields.map(field => field.Title).join(', ')}`;
323
+ }
324
+ else {
325
+ buttons[0].str1 = 'Have NO IDEA What you did :(';
326
+ }
327
+ }
328
+ }
329
+ // Merge updateObject to all buttons
330
+ buttons.map((button) => {
331
+ // https://www.javascripttutorial.net/object/javascript-merge-objects/
332
+ button.updateItem = { ...button.updateItem, ...updateObject };
333
+ });
334
+ //This loop just adds all the fields that impact this button
335
+ buttons.map((button, idx) => {
336
+ //Get filtered fields
337
+ filteredFields.map((internalName) => {
338
+ if (summary[idx].filters.indexOf(internalName) === -1)
339
+ summary[idx].filters.push(internalName);
340
+ if (summary[idx].fields.indexOf(internalName) === -1)
341
+ summary[idx].fields.push(internalName);
342
+ });
343
+ Object.keys(button.updateItem).map((key) => {
344
+ if (summary[idx].updates.indexOf(key) === -1)
345
+ summary[idx].updates.push(key);
346
+ if (summary[idx].fields.indexOf(key) === -1)
347
+ summary[idx].fields.push(key);
348
+ });
349
+ });
350
+ // Now add the divider button/object when neccessary:
351
+ if (title) {
352
+ summary.unshift({
353
+ label: !description ? title : [title, description].join('||'),
354
+ type: 'divider',
355
+ updates: [],
356
+ filters: [],
357
+ fields: [],
358
+ });
359
+ buttons.unshift({
360
+ label: title,
361
+ secondary: description,
362
+ styleButton: '',
363
+ primary: false,
364
+ updateItem: null,
365
+ });
366
+ }
367
+ //now go through and do updates
368
+ const QuickDesign = {
369
+ buttons: [buttons],
370
+ summary: summary,
371
+ fields: [],
372
+ };
373
+ console.log('QuickDesign: IQuickCommandsDesign = ', QuickDesign);
374
+ return QuickDesign;
375
+ }
376
+ /**
377
+ * This will take the eval string and add a new eval to it including having the operator and adding surround braces when required.
378
+ * @param showWhenEvalTrue
379
+ * @param operator
380
+ * @param miniEval
381
+ * @param surround
382
+ * @returns
383
+ */
384
+ export function bumpEval(showWhenEvalTrue, operator, miniEval, surround) {
385
+ //
386
+ if (!miniEval)
387
+ return showWhenEvalTrue;
388
+ showWhenEvalTrue += showWhenEvalTrue ? ` ${operator} ` : '';
389
+ if (surround === true) {
390
+ showWhenEvalTrue += `( ${miniEval} )`;
391
+ }
392
+ else {
393
+ showWhenEvalTrue += miniEval;
394
+ }
395
+ return showWhenEvalTrue;
396
+ }
397
+ //# sourceMappingURL=createLogic.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createLogic.js","sourceRoot":"","sources":["../../../../../../src/components/molecules/PropPaneCols/components/command/createLogic.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,gBAAgB,GAAI,MAAM,cAAc,CAAA;AAajD,MAAM,eAAe,GAAkB;IACrC,OAAO,EAAE,EAAE;IACX,IAAI,EAAE,EAAE;IACR,OAAO,EAAE,EAAE;IACX,KAAK,EAAE,eAAe;IACtB,OAAO,EAAE,KAAK;IACd,OAAO,EAAE,wCAAwC;IACjD,iCAAiC;IACjC,OAAO,EAAE,wBAAwB;IACjC,YAAY,EAAE,wBAAwB;IACtC,gBAAgB;IAChB,UAAU,EAAE;IACV,yBAAyB;IACzB,wBAAwB;IACxB,oBAAoB;IACpB,kBAAkB;IAClB,+CAA+C;IAC/C,oCAAoC;KACrC;IACD,gBAAgB,EAAE,EAAE,EAAE,+CAA+C;CACtE,CAAA;AAED,MAAM,iBAAiB,GAAW,qBAAqB,CAAC;AAExD,MAAM,WAAW,GAAkB;IACjC,IAAI,EAAE,iBAAiB;IACvB,KAAK,EAAE,QAAQ;IACf,OAAO,EAAE,KAAK;IACd,OAAO,EAAE,+BAA+B;IACxC,iCAAiC;IACjC,OAAO,EAAE,sBAAsB;IAC/B,YAAY,EAAE,sBAAsB;IACpC,gBAAgB;IAChB,UAAU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;;GAOG;AACH,MAAM,UAAU,QAAQ,CAAE,gBAAwB,EAAG,QAAqB,EAAG,QAAgB,EAAG,QAAiB;IAE/G,EAAE;IACF,IAAK,CAAC,QAAQ;QAAG,OAAO,gBAAgB,CAAC;IAEzC,gBAAgB,IAAI,gBAAgB,CAAC,CAAC,CAAC,IAAI,QAAQ,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;IAC5D,IAAK,QAAQ,KAAK,IAAI,EAAG;QACvB,gBAAgB,IAAI,KAAK,QAAQ,IAAI,CAAC;KAEvC;SAAM;QACL,gBAAgB,IAAI,QAAQ,CAAC;KAC9B;IAED,OAAO,gBAAgB,CAAC;AAE1B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../../src/components/molecules/PropPaneCols/components/command/helpers.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../src/components/molecules/PropPaneCols/components/command/helpers.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import { IMinField } from "../IPropPaneColsProps";
3
+ import { IIconTableRow } from './IAccordion';
4
+ export declare function createFieldTableRows(heading: JSX.Element, firstColumnHeading: string, fields: IMinField[], FieldActionIcons: IIconTableRow[], onCmdFieldClick: any, showFieldPanel: any): JSX.Element;
5
+ //# sourceMappingURL=tableRows.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tableRows.d.ts","sourceRoot":"","sources":["../../../../../../src/components/molecules/PropPaneCols/components/command/tableRows.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,SAAS,EAAiB,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAG7C,wBAAgB,oBAAoB,CAAE,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE,kBAAkB,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,gBAAgB,EAAE,aAAa,EAAE,EAAE,eAAe,EAAE,GAAG,EAAE,cAAc,EAAE,GAAG,GAAI,GAAG,CAAC,OAAO,CAyBvM"}
@@ -0,0 +1,25 @@
1
+ import * as React from 'react';
2
+ import { Icon, } from 'office-ui-fabric-react/lib/Icon';
3
+ export function createFieldTableRows(heading, firstColumnHeading, fields, FieldActionIcons, onCmdFieldClick, showFieldPanel) {
4
+ const TableRows = [];
5
+ TableRows.push(React.createElement("tr", { key: 'TableHeader' },
6
+ React.createElement("th", null, firstColumnHeading),
7
+ " ",
8
+ FieldActionIcons.map(h => { return React.createElement("th", { key: h.head }, h.head); }),
9
+ " "));
10
+ fields.map((field) => {
11
+ TableRows.push(React.createElement("tr", { key: field.InternalName },
12
+ React.createElement("td", { title: field.InternalName, onClick: () => showFieldPanel(field) }, field.Title),
13
+ FieldActionIcons.map(icon => {
14
+ // eslint-disable-next-line no-eval
15
+ const ignore = icon.ignore && eval(icon.ignore) === true ? true : false;
16
+ return ignore === true ? React.createElement("td", null, " ") : React.createElement("td", { key: icon.cmd },
17
+ React.createElement(Icon, { iconName: field.commands[icon.cmd] === true ? icon.icon : 'StatusCircleBlock2', title: icon.disabled === true ? `Disabled: ${icon.title}` : icon.title, "data-fieldname": field.InternalName, "data-role": icon.cmd, onClick: icon.disabled === true ? null : onCmdFieldClick, className: 'command-icon', style: { color: icon.disabled === true ? 'red' : '' } }));
18
+ })));
19
+ });
20
+ const table = TableRows.length === 1 ? null : React.createElement("div", null,
21
+ heading,
22
+ React.createElement("table", null, TableRows));
23
+ return table;
24
+ }
25
+ //# sourceMappingURL=tableRows.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tableRows.js","sourceRoot":"","sources":["../../../../../../src/components/molecules/PropPaneCols/components/command/tableRows.tsx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CAAC,IAAI,CAAE,CAAC,CAAC,oBAAoB,EAAG,KAAK,EAAG,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,aAAa,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,oBAC5M,KAAK,CAAC,YAAY,eAAgB,IAAI,CAAC,GAAG,EAAG,OAAO,EAAI,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,eAAe,EAAG,SAAS,EAAG,cAAc,EAAG,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,GAAG,CAAK,CAAC;YACxN,CAAC,CAAC,CACC,CAAE,CAAC;IACV,CAAC,CAAC,CAAC;IAEH,MAAM,KAAK,GAAG,SAAS,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;QACxC,OAAO;QACT,mCACI,SAAS,CACL,CACJ,CAAA;IAER,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { PanelType } from 'office-ui-fabric-react/lib/Panel';
3
+ export declare function panelActionToggles(type: PanelType, blocking: boolean, shiftSide: any, changeBlocking: any): JSX.Element;
4
+ //# sourceMappingURL=common.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/PropPaneCols/components/common.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAG7D,wBAAgB,kBAAkB,CAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,cAAc,EAAE,GAAG,GAAI,GAAG,CAAC,OAAO,CAkBzH"}
@@ -0,0 +1,16 @@
1
+ import * as React from 'react';
2
+ import { PanelType } from 'office-ui-fabric-react/lib/Panel';
3
+ import { Icon, } from 'office-ui-fabric-react/lib/Icon';
4
+ export function panelActionToggles(type, blocking, shiftSide, changeBlocking) {
5
+ const shiftIcon = type === PanelType.custom ? 'OpenPane' : 'OpenPaneMirrored';
6
+ const blockIcon = blocking === true ? 'F12DevTools' : 'DeviceOff';
7
+ const shiftTitle = type === PanelType.custom ? 'Left Panel' : 'Right Panel';
8
+ const blockTitle = blocking === true ? 'Disable Blocking' : 'Enable Blocking';
9
+ const ShiftCallbackParam = type === PanelType.customNear ? PanelType.custom : PanelType.customNear;
10
+ const BlockCallbackParam = blocking === true ? false : true;
11
+ const Toggles = React.createElement("div", { className: 'panel-action-toggles', style: null },
12
+ !shiftSide ? null : React.createElement(Icon, { title: shiftTitle, iconName: shiftIcon, className: null, style: null, onClick: () => shiftSide(ShiftCallbackParam) }),
13
+ !changeBlocking ? null : React.createElement(Icon, { title: blockTitle, iconName: blockIcon, className: null, style: null, onClick: () => changeBlocking(BlockCallbackParam) }));
14
+ return Toggles;
15
+ }
16
+ //# sourceMappingURL=common.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../../src/components/molecules/PropPaneCols/components/common.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC7D,OAAO,EAAE,IAAI,GAAG,MAAM,iCAAiC,CAAC;AAExD,MAAM,UAAU,kBAAkB,CAAE,IAAe,EAAE,QAAiB,EAAE,SAAc,EAAE,cAAmB;IAEzG,MAAM,SAAS,GAAG,IAAI,KAAK,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,kBAAkB,CAAC;IAC9E,MAAM,SAAS,GAAG,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,WAAW,CAAC;IAElE,MAAM,UAAU,GAAG,IAAI,KAAK,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,aAAa,CAAC;IAC5E,MAAM,UAAU,GAAG,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,iBAAiB,CAAC;IAE9E,MAAM,kBAAkB,GAAG,IAAI,KAAK,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC;IACnG,MAAM,kBAAkB,GAAG,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;IAE5D,MAAM,OAAO,GAAG,6BAAK,SAAS,EAAG,sBAAsB,EAAG,KAAK,EAAG,IAAI;QAClE,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,oBAAC,IAAI,IAAC,KAAK,EAAG,UAAU,EAAG,QAAQ,EAAG,SAAS,EAAG,SAAS,EAAG,IAAI,EAAG,KAAK,EAAG,IAAI,EAAG,OAAO,EAAI,GAAG,EAAE,CAAC,SAAS,CAAE,kBAAkB,CAAE,GAAI;QAC5J,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,oBAAC,IAAI,IAAC,KAAK,EAAG,UAAU,EAAG,QAAQ,EAAG,SAAS,EAAG,SAAS,EAAG,IAAI,EAAG,KAAK,EAAG,IAAI,EAAG,OAAO,EAAI,GAAG,EAAE,CAAC,cAAc,CAAE,kBAAkB,CAAE,GAAI,CACpK,CAAA;IAEN,OAAO,OAAO,CAAC;AAEjB,CAAC"}
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import { ILoadPerformance } from '../../../../molecules/Performance/IPerformance';
3
+ export declare function fetchErrorPanel(fetchPane: JSX.Element, errMessage: string, webURL: string, listTitle: string): JSX.Element;
4
+ export interface IFetchPaneProps {
5
+ onClickFetchFields: any;
6
+ designMode: boolean;
7
+ performance: ILoadPerformance;
8
+ status: string;
9
+ }
10
+ export declare function FetchPane(props: IFetchPaneProps): JSX.Element;
11
+ //# sourceMappingURL=Pane.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Pane.d.ts","sourceRoot":"","sources":["../../../../../../src/components/molecules/PropPaneCols/components/fetch/Pane.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,gBAAgB,EAAkB,MAAM,gDAAgD,CAAC;AASlG,wBAAgB,eAAe,CAAE,SAAS,EAAE,GAAG,CAAC,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAI,GAAG,CAAC,OAAO,CAgB5H;AAGD,MAAM,WAAW,eAAe;IAE9B,kBAAkB,EAAE,GAAG,CAAC;IAIxB,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAG,gBAAgB,CAAC;IAC/B,MAAM,EAAE,MAAM,CAAC;CAEhB;AAED,wBAAgB,SAAS,CAAG,KAAK,EAAE,eAAe,GAAI,GAAG,CAAC,OAAO,CA6ChE"}
@@ -0,0 +1,51 @@
1
+ import * as React from 'react';
2
+ // import styles from '../PropPaneCols.module.scss';
3
+ import ReactJson from 'react-json-view';
4
+ import { mainSiteLink } from '../main/Pane';
5
+ // import { fetchFields } from './FetchFuncion';
6
+ export function fetchErrorPanel(fetchPane, errMessage, webURL, listTitle) {
7
+ const siteLink = mainSiteLink(webURL);
8
+ const messages = errMessage.split('-- FULL ERROR MESSAGE:');
9
+ return (React.createElement("div", { className: 'prop-pane-cols' },
10
+ fetchPane,
11
+ React.createElement("div", { className: 'right-side' },
12
+ React.createElement("h2", null, "There was an error trying to fetch fields for this list:"),
13
+ React.createElement("h3", { style: { marginTop: '0px' } }, `Fields from '${listTitle}'`),
14
+ siteLink,
15
+ React.createElement("p", { style: { fontWeight: 'bold' } }, messages[0]),
16
+ React.createElement("p", { style: { fontWeight: 'bold', color: 'red' } }, messages[1]))));
17
+ }
18
+ export function FetchPane(props) {
19
+ // const { list, setState, updatePerformance } = props;
20
+ const { performance, designMode, status, onClickFetchFields } = props;
21
+ const fetch4 = performance.ops.fetch4;
22
+ const fetchPerformance = !fetch4 ? null : React.createElement("div", null, ['label', 'startStr', 'ms', 'c', 'a',].map((key, idx) => {
23
+ /**
24
+ * Get this error when using this shorthand syntax:
25
+ * <div>{key}: { fetch4[ key ] }</div>
26
+
27
+ Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'IPerformanceOp'.
28
+ No index signature with a parameter of type 'string' was found on type 'IPerformanceOp'.ts(7053)
29
+
30
+ Need to turn this one-line of code....
31
+ <div>{key}: { fetch4[ key ] }</div>
32
+ into the 2 lines of code below :()
33
+ */
34
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
35
+ const fetch4Any = fetch4;
36
+ return React.createElement("div", { className: 'performance-row', key: idx },
37
+ React.createElement("div", null, key),
38
+ " ",
39
+ React.createElement("div", null, fetch4Any[key]));
40
+ }));
41
+ //This works when I pass in this._onClick...bind(this)
42
+ // const fetchButton: JSX.Element = <div className={ 'button } onClick={ () => onClickFetchFields() } >Fetch</div>;
43
+ // This also works when I pass in this._onClick...bind(this)
44
+ const fetchButton = React.createElement("div", { className: 'button', onClick: onClickFetchFields }, "Fetch");
45
+ return (React.createElement("div", { className: ['fetch-pane', designMode === true ? 'hide-left' : 'show-left'].join(' ') },
46
+ fetchButton,
47
+ React.createElement("div", { style: { margin: '20px', fontWeight: 'bolder', color: status.indexOf('Success') > -1 ? 'darkgreen' : status.indexOf('Failed') > -1 ? 'red' : '' } }, status),
48
+ React.createElement("div", { style: { margin: '20px' } }, fetchPerformance),
49
+ React.createElement(ReactJson, { src: performance, name: 'performance', collapsed: true, displayDataTypes: false, displayObjectSize: false, enableClipboard: true, style: { padding: '20px 0px' }, theme: 'rjv-default', indentWidth: 2 })));
50
+ }
51
+ //# sourceMappingURL=Pane.js.map
@@ -0,0 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AAK,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,KAAK,EAAI,aAAa,EAAG,WAAW,EAAG,CAAC,GAAG,CACpG,CACP,CAAC;AAEJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { IMinListProps, IFieldPanelFetchState } from "../IPropPaneColsProps";
2
+ export declare function fetchFields(list: IMinListProps): Promise<IFieldPanelFetchState>;
3
+ //# sourceMappingURL=funcions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"funcions.d.ts","sourceRoot":"","sources":["../../../../../../src/components/molecules/PropPaneCols/components/fetch/funcions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAa,aAAa,EAAc,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAIpG,wBAAsB,WAAW,CAAG,IAAI,EAAE,aAAa,GAAK,OAAO,CAAC,qBAAqB,CAAC,CAsGzF"}