@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,229 @@
1
+ import * as React from 'react';
2
+ import { useState } from 'react';
3
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
4
+ // import { IGrouping, IViewField } from "@pnp/spfx-controls-react/lib/ListView";
5
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
6
+ import { FieldTypes } from "@pnp/sp/presets/all";
7
+ import { TextField, } from 'office-ui-fabric-react/lib/TextField';
8
+ import { Icon, } from 'office-ui-fabric-react/lib/Icon';
9
+ import Accordion from '../../../Accordion/Accordion';
10
+ import SelectedItemPanelHook from "../FieldPanel";
11
+ import SampleDesignHook from "./SampleDesign";
12
+ import ReactJson from 'react-json-view';
13
+ // import { filter } from 'lodash';
14
+ // import { IActionProps } from '@pnp/spfx-controls-react';
15
+ import { ChoiceFieldActionIcons, UserFieldActionIcons, YesNoFieldActionIcons, } from './IAccordion';
16
+ import { DateFieldActionIcons, TextFieldActionIcons, NoteFieldActionIcons, } from './IAccordion';
17
+ import { AllActions, ChoiceActions, YesNoActions, UserActions, } from './IAccordion';
18
+ import { DateActions, TextActions, NoteActions } from './IAccordion';
19
+ import { createFieldTableRows } from './tableRows';
20
+ import { buildQuickCommands } from './createLogic';
21
+ require('@mikezimm/fps-styles/dist/PPCcommandAccordion.css');
22
+ // export function createCommandBuilder( selected: IMinField[], onCmdFieldClick : any = null, expanded: boolean, showFieldPanel: any, onExpandRight: any = null ) : JSX.Element { //onCmdFieldClick: any
23
+ const CommandBuilderHook = (props) => {
24
+ const { selected, expanded, onExpandRight, updateSelected, tryCallback, saveCallback } = props;
25
+ // const { selected, expanded, onExpandRight } = props;
26
+ const [showCurrent, setShowCurrent] = useState(false);
27
+ const [showTotal, setShowTotal] = useState(false);
28
+ const [panelItem, setPanelItem] = useState(null);
29
+ const [label, setLabel] = useState('');
30
+ const [secondary, setSecondary] = useState('');
31
+ const [CommandDesign, setCommandDesign] = useState({
32
+ buttons: [],
33
+ summary: [],
34
+ fields: [],
35
+ });
36
+ // const hideSamplePanel = ( ) : void => {
37
+ // setShowCurrent( false );
38
+ // setShowTotal( false );
39
+ // }
40
+ // const updateShowCurrent = ( ) : void => {
41
+ // setShowCurrent( showCurrent !== true ? true : false );
42
+ // }
43
+ // const updateShowTotal = ( ) : void => {
44
+ // setShowTotal( showTotal !== true ? true : false );
45
+ // }
46
+ const updateSecondary = (v) => {
47
+ setSecondary(v);
48
+ };
49
+ const updateLabel = (v) => {
50
+ setLabel(v);
51
+ };
52
+ const showFieldPanel = (item) => {
53
+ setPanelItem(item);
54
+ };
55
+ const onClosePanel = () => {
56
+ setPanelItem(null);
57
+ };
58
+ const onCmdFieldClick = (ev) => {
59
+ const newSelected = updateSelectedCommands(ev, selected);
60
+ // setSelected( newSelected );
61
+ updateSelected(newSelected);
62
+ };
63
+ // const onLabelUpdate = ( input: any, text: string = '' ): void => {
64
+ // const labelText : string = typeof input === 'string' ? input : input && input.target && input.target.value ? input.target.value : '';
65
+ // setLabel( labelText );
66
+ // }
67
+ // const sorted: IMinField[] = sortObjectArrayByStringKey( selected, 'asc', 'Title' );
68
+ const choiceFields = selected.filter(field => field.FieldTypeKind === FieldTypes.Choice);
69
+ const ChoiceTable = createFieldTableRows(null, 'Choice fields', choiceFields, ChoiceFieldActionIcons, onCmdFieldClick, showFieldPanel);
70
+ const userFields = selected.filter(field => field.FieldTypeKind === FieldTypes.User);
71
+ const UserTable = createFieldTableRows(null, 'User fields', userFields, UserFieldActionIcons, onCmdFieldClick, showFieldPanel);
72
+ const yesNoFields = selected.filter(field => field.FieldTypeKind === FieldTypes.Boolean);
73
+ const YesNoTable = createFieldTableRows(null, 'Boolean fields', yesNoFields, YesNoFieldActionIcons, onCmdFieldClick, showFieldPanel);
74
+ // filter out ReadOnlyFields because all functions apply to the field itself which can't be done.
75
+ const dateFields = selected.filter(field => field.FieldTypeKind === FieldTypes.DateTime);
76
+ const DateTable = createFieldTableRows(null, 'Date fields', dateFields, DateFieldActionIcons, onCmdFieldClick, showFieldPanel);
77
+ // filter out ReadOnlyFields because all functions apply to the field itself which can't be done.
78
+ const textFields = selected.filter(field => field.FieldTypeKind === FieldTypes.Text);
79
+ const TextTable = createFieldTableRows(null, 'Text fields', textFields, TextFieldActionIcons, onCmdFieldClick, showFieldPanel);
80
+ // filter out ReadOnlyFields because all functions apply to the field itself which can't be done.
81
+ const noteFields = selected.filter(field => field.FieldTypeKind === FieldTypes.Note);
82
+ const NoteTable = createFieldTableRows(null, 'Note fields', noteFields, NoteFieldActionIcons, onCmdFieldClick, showFieldPanel);
83
+ const expandRightIcon = React.createElement(Icon, { iconName: 'TransitionPop', title: 'Expand right to see button object', style: { float: 'right' }, "data-fieldtype": 'Commands', onClick: onExpandRight, className: 'type-filter-icon' });
84
+ const QuickCommands = buildQuickCommands(selected, label, secondary);
85
+ const addCommandSet = (add) => {
86
+ const TotalCommands = {
87
+ buttons: add === true ? [...CommandDesign.buttons, ...QuickCommands.buttons] : [],
88
+ summary: add === true ? [...CommandDesign.summary, ...QuickCommands.summary] : [],
89
+ fields: add === true ? [...CommandDesign.fields, ...QuickCommands.fields] : [],
90
+ };
91
+ setCommandDesign(TotalCommands);
92
+ };
93
+ // Using this way caused error 310
94
+ // const SampleCommand = showCurrent !== true ? undefined : SampleDesignHook({ CommandDesign: QuickCommands, onClosePanel: updateShowCurrent } ) ;
95
+ // const SampleDesign = showTotal !== true ? undefined : SampleDesignHook({ CommandDesign: CommandDesign, onClosePanel: updateShowTotal } ) ;
96
+ // This fixes error 310 when always calling the SampleDesignHook
97
+ const SampleCommand = SampleDesignHook({ CommandDesign: QuickCommands, onClosePanel: setShowCurrent, showPanel: showCurrent });
98
+ const SampleDesign = SampleDesignHook({ CommandDesign: CommandDesign, onClosePanel: setShowTotal, showPanel: showTotal });
99
+ const showTry = tryCallback && CommandDesign.summary.length > 0 ? true : false;
100
+ const showSave = saveCallback && CommandDesign.summary.length > 0 ? true : false;
101
+ const RightSide = React.createElement("div", { className: 'accordion-design', style: {} },
102
+ React.createElement("div", { className: 'current-title' },
103
+ React.createElement("h2", null, "Command Set Title goes here"),
104
+ React.createElement(TextField, { value: label, description: 'Add label to save this as group of buttons',
105
+ //Modeled after https://github.com/pnp/sp-dev-fx-webparts/blob/b139ba199cb57363a88f070dd9814e5af4fc3cbd/samples/react-teams-personal-app-settings/src/webparts/personalAppSettings/components/settingsPanel/SettingsPanel.tsx#L67
106
+ onChange: (e, v) => { updateLabel(v); } }),
107
+ React.createElement(TextField, { value: secondary, description: 'Additional text in smaller font',
108
+ //Modeled after https://github.com/pnp/sp-dev-fx-webparts/blob/b139ba199cb57363a88f070dd9814e5af4fc3cbd/samples/react-teams-personal-app-settings/src/webparts/personalAppSettings/components/settingsPanel/SettingsPanel.tsx#L67
109
+ onChange: (e, v) => { updateSecondary(v); } })),
110
+ React.createElement("div", { className: 'total-object' },
111
+ React.createElement("div", null,
112
+ React.createElement(Icon, { iconName: "EntryView", className: 'type-filter-icon', onClick: () => setShowCurrent(true), title: 'See sample panel', style: { float: 'right' } }),
113
+ React.createElement("div", null,
114
+ "Dividers: ",
115
+ QuickCommands.summary.filter((summary) => summary.type === 'divider').length),
116
+ React.createElement("div", null,
117
+ "Choice buttons: ",
118
+ QuickCommands.summary.filter((summary) => summary.type === 'choice').length),
119
+ React.createElement("div", null,
120
+ "Regular buttons: ",
121
+ QuickCommands.summary.filter((summary) => summary.type === 'button').length)),
122
+ React.createElement(ReactJson, { src: QuickCommands, name: 'Current', collapsed: false, displayDataTypes: false, displayObjectSize: false, enableClipboard: true, style: { padding: '20px 0px' }, theme: 'rjv-default', indentWidth: 2 })),
123
+ React.createElement("div", { className: 'total-title' },
124
+ React.createElement("div", null,
125
+ React.createElement("h2", null, "Total Command Set"),
126
+ React.createElement(Icon, { iconName: "Download", className: 'type-filter-icon', onClick: () => addCommandSet(true), title: 'Add Command Set here' }),
127
+ React.createElement(Icon, { iconName: "Delete", className: 'type-filter-icon', onClick: () => addCommandSet(false), title: 'Clear Command Set' }),
128
+ React.createElement(Icon, { iconName: "Save", className: 'type-filter-icon', onClick: showSave === true ? () => saveCallback(CommandDesign) : undefined, title: 'Save Command Set', style: { display: showSave === true ? '' : 'none' } }),
129
+ React.createElement(Icon, { iconName: "TestImpactSolid", className: 'type-filter-icon', onClick: showTry === true ? () => tryCallback(CommandDesign) : undefined, title: 'Try Command Set', style: { display: showTry === true ? '' : 'none' } }))),
130
+ React.createElement("div", { className: 'total-object' },
131
+ React.createElement("div", null,
132
+ React.createElement(Icon, { iconName: "EntryView", className: 'type-filter-icon', onClick: () => setShowTotal(true), title: 'See sample panel', style: { float: 'right' } }),
133
+ React.createElement("div", null,
134
+ "Dividers: ",
135
+ CommandDesign.summary.filter((summary) => summary.type === 'divider').length),
136
+ React.createElement("div", null,
137
+ "Choice buttons: ",
138
+ CommandDesign.summary.filter((summary) => summary.type === 'choice').length),
139
+ React.createElement("div", null,
140
+ "Regular buttons: ",
141
+ CommandDesign.summary.filter((summary) => summary.type === 'button').length)),
142
+ React.createElement(ReactJson, { src: CommandDesign, name: 'CommandDesign', collapsed: false, displayDataTypes: false, displayObjectSize: false, enableClipboard: true, style: { padding: '20px 0px' }, theme: 'rjv-default', indentWidth: 2 })));
143
+ const commandElement = React.createElement("div", { className: 'command-tables' },
144
+ React.createElement(SelectedItemPanelHook, { panelItem: panelItem, searchText: '', onClosePanel: onClosePanel.bind(this) }),
145
+ React.createElement("div", { className: 'left-command' },
146
+ expandRightIcon,
147
+ ChoiceTable,
148
+ YesNoTable,
149
+ UserTable,
150
+ DateTable,
151
+ TextTable,
152
+ NoteTable),
153
+ React.createElement("div", { className: expanded === true ? 'right-command' : 'collapse-command' }, RightSide),
154
+ SampleCommand,
155
+ SampleDesign);
156
+ const commandTitle = `Build Commands`;
157
+ const DesignCommands = React.createElement(Accordion, { title: commandTitle, showAccordion: false, animation: 'TopDown', contentStyles: { height: '' }, content: commandElement, componentStyles: { marginBottom: '15px', border: '4px solid #d1d1d1', background: '#f5f5f5', padding: '10px' } });
158
+ return (DesignCommands);
159
+ };
160
+ export function updateSelectedCommands(ev, selected) {
161
+ const target = ev.target;
162
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
163
+ const { altKey, ctrlKey, shiftKey, type } = ev; // type is like 'click'
164
+ const itemName = target.dataset.fieldname;
165
+ const role = target.dataset.role;
166
+ // let thisSelected : IMinField = null;
167
+ const newSelected = [];
168
+ selected.map((field) => {
169
+ if (field.InternalName === itemName) {
170
+ if (AllActions.indexOf(role) > -1) {
171
+ let commands = field.commands;
172
+ const newVal = commands[role] === true ? false : true;
173
+ if (DateActions.indexOf(role) > -1) {
174
+ commands = updateCommandSet(commands, role, newVal, DateFieldActionIcons);
175
+ }
176
+ else if (UserActions.indexOf(role) > -1) {
177
+ commands = updateCommandSet(commands, role, newVal, UserFieldActionIcons);
178
+ }
179
+ else if (TextActions.indexOf(role) > -1) {
180
+ commands = updateCommandSet(commands, role, newVal, TextFieldActionIcons);
181
+ }
182
+ else if (NoteActions.indexOf(role) > -1) {
183
+ commands = updateCommandSet(commands, role, newVal, NoteFieldActionIcons);
184
+ }
185
+ else if (YesNoActions.indexOf(role) > -1) {
186
+ commands = updateCommandSet(commands, role, newVal, YesNoFieldActionIcons);
187
+ /**
188
+ * Put other types above this one since CHOICE HAS SPECIAL CODING LOOP
189
+ * This allows for the UI to only have one field selected for a given command (like can not have more than one perChoice field selected)
190
+ */
191
+ }
192
+ else if (ChoiceActions.indexOf(role) > -1) {
193
+ commands = updateCommandSet(commands, role, newVal, ChoiceFieldActionIcons);
194
+ const ThisAction = ChoiceFieldActionIcons.filter(icon => { return icon.cmd === role; });
195
+ if (ThisAction[0].oneField === true) {
196
+ selected.map((checkField) => {
197
+ if (field.TypeAsString === checkField.TypeAsString && field.InternalName !== checkField.InternalName) {
198
+ checkField.commands[role] = false;
199
+ }
200
+ });
201
+ }
202
+ }
203
+ else {
204
+ commands[role] = newVal;
205
+ }
206
+ field.commands = commands;
207
+ }
208
+ else {
209
+ alert('Opps! Field updating field.commands ~ 166');
210
+ }
211
+ }
212
+ newSelected.push(field);
213
+ });
214
+ return newSelected;
215
+ }
216
+ export function updateCommandSet(commands, role, newVal, FieldActionIcons) {
217
+ //Should get the action for current button press
218
+ const ThisAction = FieldActionIcons.filter(icon => { return icon.cmd === role; });
219
+ FieldActionIcons.map(action => {
220
+ //Loop through all actions in the same group.
221
+ if (action.group === ThisAction[0].group) {
222
+ commands[action.cmd] = false;
223
+ }
224
+ commands[role] = newVal;
225
+ });
226
+ return commands;
227
+ }
228
+ export default CommandBuilderHook;
229
+ //# sourceMappingURL=Accordion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Accordion.js","sourceRoot":"","sources":["../../../../../../src/components/molecules/PropPaneCols/components/command/Accordion.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAa,MAAM,OAAO,CAAC;AAE5C,6DAA6D;AAC7D,iFAAiF;AACjF,6DAA6D;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,UAAU,gBAAgB,CAAE,QAAuB,EAAE,IAAqB,EAAE,MAAe,EAAE,gBAAiC;IAEhI,gDAAgD;IAChD,MAAM,UAAU,GAAoB,gBAAgB,CAAC,MAAM,CAAE,IAAI,CAAC,EAAE,GAAG,OAAO,IAAI,CAAC,GAAG,KAAK,IAAI,CAAA,CAAC,CAAC,CAAE,CAAC;IACpG,gBAAgB,CAAC,GAAG,CAAE,MAAM,CAAC,EAAE;QAE7B,6CAA6C;QAC7C,IAAK,MAAM,CAAC,KAAK,KAAK,UAAU,CAAC,CAAC,CAAC,CAAC,KAAK,EAAG;YAC1C,QAAQ,CAAE,MAAM,CAAC,GAAG,CAAE,GAAG,KAAK,CAAC;SAChC;QACD,QAAQ,CAAE,IAAI,CAAE,GAAG,MAAM,CAAC;IAC5B,CAAC,CAAC,CAAC;IACH,OAAO,QAAQ,CAAC;AAEpB,CAAC;AAGD,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,69 @@
1
+ import { IQuickButton, IQuickCommands, IQuickField } from "../../../../indexes";
2
+ export type IButtonPurpose = 'button' | 'divider' | 'choice';
3
+ export interface IButtonSummary {
4
+ type: IButtonPurpose;
5
+ label: string;
6
+ updates: string[];
7
+ filters: string[];
8
+ fields: string[];
9
+ }
10
+ export interface IButtonsSummary {
11
+ buttons: IButtonSummary[];
12
+ }
13
+ export interface IQuickCommandsDesign extends IQuickCommands {
14
+ summary: IButtonSummary[];
15
+ buttons: IQuickButton[][];
16
+ fields: IQuickField[][];
17
+ }
18
+ /**
19
+ * MEMO TO SELF... THESE TYPES ARE TIED DIRECTLY TO THE keys in the IMinFieldCmds Interface.
20
+ *
21
+ * If you add one here, you need to also update that interface by hand.
22
+ *
23
+ */
24
+ export type IChoiceActionTypes = 'perChoice' | 'promoteChoice' | 'demoteChoice' | 'bracketChoice' | 'rejectLast';
25
+ export type IYesNoActionTypes = 'showOnTrue' | 'showOnFalse' | 'showOnNull' | 'setTrue' | 'setFalse' | 'setToggle';
26
+ export type IUserActionTypes = 'showToUser' | 'hideFromUser' | 'setUser' | 'addUser' | 'removeUser' | 'clearUsers';
27
+ export type IDateActionTypes = 'setToday' | 'set1Week' | 'set1Month' | 'clearDate' | 'depends' | 'showIfPast' | 'showIfFuture';
28
+ export type ITextActionTypes = 'replaceText' | 'promptText' | 'captcha';
29
+ export type INoteActionTypes = 'appendNote' | 'replaceNote';
30
+ export type IAllActionTypes = IChoiceActionTypes | IYesNoActionTypes | IUserActionTypes | IDateActionTypes | ITextActionTypes | INoteActionTypes;
31
+ export type IActionExecType = 'filter' | 'update' | 'special';
32
+ export interface IIconTableRow {
33
+ cmd: IAllActionTypes;
34
+ icon: string;
35
+ head: string;
36
+ title: string;
37
+ type: IActionExecType;
38
+ ignore?: string;
39
+ group?: string;
40
+ oneField?: boolean;
41
+ disabled?: boolean;
42
+ }
43
+ /**
44
+ * Other options for choices in group2
45
+ * filter to only show if current status is one status earlier than button... ie it move's up.
46
+ * So for instance, if the button choices is 2. In Process, only show when status is in 1. Plan
47
+ * This means that you can not go backwards via a button.
48
+ *
49
+ * Alternatively, make button visible if the status is either one above or one below
50
+ *
51
+ * Maybe options are: Promote ( up ), Demote ( down ), Promote/Demote ( up/down )
52
+ */
53
+ export declare const ChoiceFieldActionIcons: IIconTableRow[];
54
+ export declare const ChoiceActions: IAllActionTypes[];
55
+ export declare const YesNoFieldActionIcons: IIconTableRow[];
56
+ export declare const YesNoActions: IAllActionTypes[];
57
+ export declare const UserFieldActionIcons: IIconTableRow[];
58
+ export declare const UserActions: IAllActionTypes[];
59
+ export declare const DateFieldActionIcons: IIconTableRow[];
60
+ export declare const DateActions: IAllActionTypes[];
61
+ export declare const TextFieldActionIcons: IIconTableRow[];
62
+ export declare const TextActions: IAllActionTypes[];
63
+ export declare const NoteFieldActionIcons: IIconTableRow[];
64
+ export declare const NoteActions: IAllActionTypes[];
65
+ export declare const AllFieldActions: IIconTableRow[];
66
+ export declare const AllUpdateActions: IIconTableRow[];
67
+ export declare const AllUpdateActionCmds: IAllActionTypes[];
68
+ export declare const AllActions: IAllActionTypes[];
69
+ //# sourceMappingURL=IAccordion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IAccordion.d.ts","sourceRoot":"","sources":["../../../../../../src/components/molecules/PropPaneCols/components/command/IAccordion.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAShF,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAE;AAE9D,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,cAAc,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,cAAc,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,oBAAqB,SAAQ,cAAc;IAC1D,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,OAAO,EAAE,YAAY,EAAE,EAAE,CAAC;IAC1B,MAAM,EAAE,WAAW,EAAE,EAAE,CAAC;CAEzB;AAED;;;;;GAKG;AAEF,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG,eAAe,GAAG,cAAc,GAAG,eAAe,GAAG,YAAY,CAAE;AAElH,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG,aAAa,GAAG,YAAY,GAAG,SAAS,GAAG,UAAU,GAAG,WAAW,CAAE;AAEpH,MAAM,MAAM,gBAAgB,GAAG,YAAY,GAAG,cAAc,GAAG,SAAS,GAAG,SAAS,GAAG,YAAY,GAAG,YAAY,CAAE;AAEpH,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,UAAU,GAAG,WAAW,GAAG,WAAW,GAAG,SAAS,GAAG,YAAY,GAAG,cAAc,CAAC;AAE/H,MAAM,MAA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E5L,eAAO,MAAM,gBAAgB,iBAAuE,CAAC;AACrG,eAAO,MAAM,mBAAmB,mBAAuD,CAAC;AAGxF,eAAO,MAAM,UAAU,mBAA4E,CAAC"}
@@ -0,0 +1,73 @@
1
+ // import { IWeb, Web, } from "@pnp/sp/presets/all";
2
+ // import { IMinField, IMinListProps, IsEditable, IFieldPanelFetchState } from "../IPropPaneColsProps";
3
+ // import { IQuickCommands, } from '@mikezimm/fps-library-v2/lib/components/interfaces/QuickCommands/IQuickCommands';
4
+ // // eslint-disable-next-line @typescript-eslint/no-unused-vars
5
+ // import { IGrouping, IViewField } from "@pnp/spfx-controls-react/lib/ListView";
6
+ // // eslint-disable-next-line @typescript-eslint/no-unused-vars
7
+ // import { IFieldInfo, FieldTypes } from "@pnp/sp/presets/all";
8
+ // // eslint-disable-next-line @typescript-eslint/no-unused-vars
9
+ // import { Toggle, } from 'office-ui-fabric-react/lib/Toggle';
10
+ /**
11
+ * Other options for choices in group2
12
+ * filter to only show if current status is one status earlier than button... ie it move's up.
13
+ * So for instance, if the button choices is 2. In Process, only show when status is in 1. Plan
14
+ * This means that you can not go backwards via a button.
15
+ *
16
+ * Alternatively, make button visible if the status is either one above or one below
17
+ *
18
+ * Maybe options are: Promote ( up ), Demote ( down ), Promote/Demote ( up/down )
19
+ */
20
+ export const ChoiceFieldActionIcons = [
21
+ { group: '1', type: 'special', cmd: 'perChoice', icon: 'Stack', head: 'Per', title: 'Create one button to set every choice', oneField: true },
22
+ { group: '2', type: 'filter', cmd: 'promoteChoice', icon: 'Upload', head: 'Promote', title: 'Show button on Previous status - Able to only Promote' },
23
+ { group: '2', type: 'filter', cmd: 'demoteChoice', icon: 'Download', head: 'Demote', title: 'Show button on Higher status - Able to only Demote' },
24
+ { group: '2', type: 'filter', cmd: 'bracketChoice', icon: 'Sort', head: 'Both', title: 'Show button on Previous/Higher status - Able to only Promote/Demote' },
25
+ { group: '3', type: 'filter', cmd: 'rejectLast', icon: 'ReleaseGateError', head: 'Cancel', title: 'Always show last choice - aka Canceled' },
26
+ // { cmd: '', icon: '', head: '', title: '' },
27
+ ];
28
+ export const ChoiceActions = ChoiceFieldActionIcons.map((action) => { return action.cmd; });
29
+ export const YesNoFieldActionIcons = [
30
+ { group: '1', type: 'filter', cmd: 'showOnTrue', icon: 'AcceptMedium', head: 'onYes', title: 'Show if Field = Yes', },
31
+ { group: '1', type: 'filter', cmd: 'showOnFalse', icon: 'Cancel', head: 'onNo', title: 'Show if Field = No', },
32
+ { group: '1', type: 'filter', cmd: 'showOnNull', icon: 'Checkbox', head: 'onEmpty', title: 'Show if Field = Empty', },
33
+ { group: '2', type: 'update', cmd: 'setTrue', icon: 'CheckboxCompositeReversed', head: 'SetYes', title: 'Set Field to Yes', ignore: 'field.ReadOnlyField === true', },
34
+ { group: '2', type: 'update', cmd: 'setFalse', icon: 'BoxMultiplySolid', head: 'SetNo', title: 'Set Field to No', ignore: 'field.ReadOnlyField === true', },
35
+ { group: '2', type: 'update', cmd: 'setToggle', icon: 'ToggleRight', head: 'Toggle', title: 'Toggle value', ignore: 'field.ReadOnlyField === true', disabled: true }, //, disabled: true
36
+ ];
37
+ export const YesNoActions = YesNoFieldActionIcons.map((action) => { return action.cmd; });
38
+ export const UserFieldActionIcons = [
39
+ { group: '1', type: 'filter', cmd: 'showToUser', icon: 'View', head: 'Show', title: 'Show buttons to these users' },
40
+ { group: '1', type: 'filter', cmd: 'hideFromUser', icon: 'Hide3', head: 'Hide', title: 'Hide buttons for these users, Show takes precedance' },
41
+ { group: '2', type: 'update', cmd: 'setUser', icon: 'Contact', head: 'Set', title: 'Set Field as current user', ignore: 'field.ReadOnlyField === true' },
42
+ { group: '2', type: 'update', cmd: 'addUser', icon: 'AddFriend', head: 'Add', title: 'Add User to field if Multi-Select', ignore: 'field.ReadOnlyField === true' },
43
+ { group: '2', type: 'update', cmd: 'removeUser', icon: 'UserRemove', head: 'Remove', title: 'Remove current User from field', ignore: 'field.ReadOnlyField === true' },
44
+ { group: '2', type: 'update', cmd: 'clearUsers', icon: 'Delete', head: 'Clear', title: 'Clear User field', ignore: 'field.ReadOnlyField === true' },
45
+ ];
46
+ export const UserActions = UserFieldActionIcons.map((action) => { return action.cmd; });
47
+ export const DateFieldActionIcons = [
48
+ { group: '1', type: 'update', cmd: 'setToday', icon: 'EventDate', head: 'Today', title: 'Set Field to today', ignore: 'field.ReadOnlyField === true' },
49
+ { group: '1', type: 'update', cmd: 'set1Week', icon: 'CalendarWorkWeek', head: '+1Wk', title: 'Set Field to + 7 days', ignore: 'field.ReadOnlyField === true' },
50
+ { group: '1', type: 'update', cmd: 'set1Month', icon: 'Calendar', head: '+1Mo', title: 'Set Field to + 1 month', ignore: 'field.ReadOnlyField === true' },
51
+ // { group: '1', type: 'update', cmd: 'captcha', icon: 'InputAddress', head: 'Cap', title: 'Prompt to enter field value', ignore: 'field.ReadOnlyField === true' },
52
+ { group: '1', type: 'update', cmd: 'depends', icon: 'BranchFork2', head: 'Depends', title: 'Value depends on JS eval - UPDATE Final Logic', ignore: 'field.ReadOnlyField === true' },
53
+ { group: '1', type: 'update', cmd: 'clearDate', icon: 'Delete', head: 'Clear', title: 'Clear Date field', ignore: 'field.ReadOnlyField === true' },
54
+ { group: '2', type: 'filter', cmd: 'showIfPast', icon: 'Filter', head: '<Now', title: 'Show if Date is in past', ignore: 'field.ReadOnlyField === true', disabled: true },
55
+ { group: '2', type: 'filter', cmd: 'showIfFuture', icon: 'Filter', head: '>Now', title: 'Show if Date is in future', ignore: 'field.ReadOnlyField === true', disabled: true },
56
+ ];
57
+ export const DateActions = DateFieldActionIcons.map((action) => { return action.cmd; });
58
+ export const TextFieldActionIcons = [
59
+ { group: '1', type: 'update', cmd: 'replaceText', icon: 'ActionCenter', head: 'Replace', title: 'Replace Text with your own - must update in props yourself', ignore: 'field.ReadOnlyField === true' },
60
+ { group: '1', type: 'update', cmd: 'promptText', icon: 'Comment', head: 'Prompt', title: 'Prompt to update column', ignore: 'field.ReadOnlyField === true' },
61
+ { group: '1', type: 'update', cmd: 'captcha', icon: 'InputAddress', head: 'Captcha', title: 'Prompt to enter field value - UPDATE Final Logic', ignore: 'field.ReadOnlyField === true' },
62
+ ];
63
+ export const TextActions = TextFieldActionIcons.map((action) => { return action.cmd; });
64
+ export const NoteFieldActionIcons = [
65
+ { group: '1', type: 'update', cmd: 'appendNote', icon: 'CommentAdd', head: 'Append', title: 'Prompt to Append comment to column', ignore: 'field.ReadOnlyField === true' },
66
+ { group: '1', type: 'update', cmd: 'replaceNote', icon: 'Comment', head: 'Replace', title: 'Prompt to Replace column text', ignore: 'field.ReadOnlyField === true' },
67
+ ];
68
+ export const NoteActions = NoteFieldActionIcons.map((action) => { return action.cmd; });
69
+ export const AllFieldActions = [...ChoiceFieldActionIcons, ...YesNoFieldActionIcons, ...UserFieldActionIcons, ...DateFieldActionIcons, ...TextFieldActionIcons, ...NoteFieldActionIcons];
70
+ export const AllUpdateActions = AllFieldActions.filter(field => { return field.type === 'update'; });
71
+ export const AllUpdateActionCmds = AllUpdateActions.map(field => { return field.cmd; });
72
+ export const AllActions = AllFieldActions.map((action) => { return action.cmd; });
73
+ //# sourceMappingURL=IAccordion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IAccordion.js","sourceRoot":"","sources":["../../../../../../src/components/molecules/PropPaneCols/components/command/IAccordion.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,uGAAuG;AACvG,qHAAqH;AACrH,gEAAgE;AAChE,iFAAiF;AACjF,gEAAgE;AAChE,gEAAgE;AAChE,gEAAgE;AAChE,+DAA+D;AAoE9D;;;;;;;;;GASG;AACF,MAAM,CAAC,MAAM,sBAAsB,GAAoB;IACtD,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,uCAAuC,EAAE,QAAQ,EAAE,IAAI,EAAE;IAC7I,EAAE,KAAK,EAA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AAM,WAAW,GAAG,oBAAoB,CAAC,GAAG,CAAE,CAAE,MAAqB,EAAG,EAAE,GAAG,OAAO,MAAM,CAAC,GAAG,CAAA,CAAC,CAAC,CAAE,CAAC;AAE3G,MAAM,CAAC,MAAM,eAAe,GAAG,CAAE,GAAG,sBAAsB,EAAE,GAAG,qBAAqB,EAAE,GAAG,oBAAoB,EAAG,GAAG,oBAAoB,EAAE,GAAG,oBAAoB,EAAE,GAAG,oBAAoB,CAAE,CAAC;AAE5L,MAAM,CAAC,MAAM,gBAAgB,GAAG,eAAe,CAAC,MAAM,CAAE,KAAK,CAAC,EAAE,GAAG,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,CAAA,CAAC,CAAC,CAAC,CAAC;AACrG,MAAM,CAAC,MAAM,mBAAmB,GAAG,gBAAgB,CAAC,GAAG,CAAE,KAAK,CAAC,EAAE,GAAG,OAAO,KAAK,CAAC,GAAG,CAAA,CAAC,CAAC,CAAC,CAAC;AAGxF,MAAM,CAAC,MAAM,UAAU,GAAG,eAAe,CAAC,GAAG,CAAE,CAAE,MAAqB,EAAG,EAAE,GAAG,OAAO,MAAM,CAAC,GAAG,CAAA,CAAC,CAAC,CAAE,CAAC"}
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ import { IQuickCommandsDesign } from './IAccordion';
3
+ export interface IPanelItemProps {
4
+ CommandDesign: IQuickCommandsDesign;
5
+ onClosePanel: any;
6
+ }
7
+ declare const SampleDesignHook: React.FC<IPanelItemProps>;
8
+ export default SampleDesignHook;
9
+ //# sourceMappingURL=SampleDesign%20copy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SampleDesign copy.d.ts","sourceRoot":"","sources":["../../../../../../src/components/molecules/PropPaneCols/components/command/SampleDesign copy.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,OAAO,EAAkB,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAGpE,MAAM,WAAW,eAAe;IAC9B,aAAa,EAAE,oBAAoB,CAAC;IACpC,YAAY,EAAE,GAAG,CAAC;CACnB;AAMD,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA2F/C,CAAA;AAED,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,61 @@
1
+ import * as React from 'react';
2
+ import { useState } from 'react';
3
+ import { Panel, PanelType } from 'office-ui-fabric-react/lib/Panel';
4
+ import { Icon, } from 'office-ui-fabric-react/lib/Icon';
5
+ const ConstIcon = React.createElement(Icon, { iconName: 'Stack', title: 'Is a choice button', style: {}, "data-fieldtype": 'Choice', className: 'type-filter-icon' });
6
+ // export function getSampleDesign( panelItem: IMinField, onClosePanel: any, searchText: string ) : JSX.Element {
7
+ const SampleDesignHook = (props) => {
8
+ const { CommandDesign } = props;
9
+ //No matter what I do here, I seem to get error 310 whenever trying to do anything with state.
10
+ const [label, setLabel] = useState('');
11
+ const clickSummary = (idx) => {
12
+ console.log('clicked', idx);
13
+ };
14
+ function createButtonRow(button, idx) {
15
+ if (button.type !== 'choice') {
16
+ const text = button.label.split('||');
17
+ // return <div className={ button.type } style={{ position: idx === 0 ? 'relative' : 'absolute' }}>
18
+ return React.createElement("div", { className: button.type, style: null, onClick: () => clickSummary(idx) },
19
+ React.createElement("div", null, text[0]),
20
+ React.createElement("div", null, text.length === 1 ? null : text[1]));
21
+ //ERROR READING TYPE HERE
22
+ }
23
+ else if (idx === 0 || (button.type === 'choice' && CommandDesign.summary[idx - 1].type !== 'choice')) {
24
+ return createChoiceStack(idx); //
25
+ }
26
+ }
27
+ function createChoiceStack(idx) {
28
+ const ChoiceButtonArray = [];
29
+ let i = idx + 0;
30
+ let offset = 0;
31
+ while (i < CommandDesign.summary.length && CommandDesign.summary[i].type === 'choice') {
32
+ ChoiceButtonArray.push(React.createElement("div", { className: 'choice', style: { position: 'absolute', top: `${offset}px`, left: `${offset}px` }, onClick: () => clickSummary(i) },
33
+ React.createElement("div", null, CommandDesign.summary[i].label)));
34
+ i++;
35
+ offset = (i - idx) * 20;
36
+ }
37
+ return React.createElement("div", { className: 'choice-stack', style: { marginBottom: `${offset + 10}px` } }, ChoiceButtonArray);
38
+ }
39
+ // function getClickedButtonFromSummary( idx: number ) : IQuickButton {
40
+ // if ( idx > -1 ) {
41
+ // let equivilantSummary = -1;
42
+ // let ActualButton: IQuickButton = null;
43
+ // CommandDesign.buttons.map( ( buttonRow: IQuickButton[] ) => {
44
+ // buttonRow.map( ( button: IQuickButton ) => {
45
+ // equivilantSummary ++;
46
+ // if ( idx === equivilantSummary ) ActualButton = button ;
47
+ // });
48
+ // } );
49
+ // return ActualButton;
50
+ // } else return null;
51
+ // }
52
+ // const clickedSummary = 999;
53
+ // const ActionCommand: IQuickButton = getClickedButtonFromSummary( clickedSummary );
54
+ const AttachPanel = React.createElement(Panel, { isOpen: CommandDesign.buttons.length > 0 ? true : false, type: PanelType.medium,
55
+ // onDismiss={ onClosePanel }
56
+ onDismiss: () => props.onClosePanel(), headerText: `Sample Button Sett`, closeButtonAriaLabel: "Close", isLightDismiss: true },
57
+ React.createElement("div", { className: 'sample-panel' }, CommandDesign.summary.map((summary, idx) => createButtonRow(summary, idx))));
58
+ return (AttachPanel);
59
+ };
60
+ export default SampleDesignHook;
61
+ //# sourceMappingURL=SampleDesign%20copy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SampleDesign copy.js","sourceRoot":"","sources":["../../../../../../src/components/molecules/PropPaneCols/components/command/SampleDesign copy.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAa,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,IAAI,GAAG,MAAM,iCAAiC,CAAC;AAYxD,MAAM,SAAS,GAAG,oBAAC,IAAI,IAAC,QAAQ,EAAG,OAAO,EAAG,KAAK,EA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,SAAS,EAAG,GAAG,EAAE,CAAC,KAAK,CAAC,YAAY,EAAE,EACtC,UAAU,EAAG,oBAAoB,EACjC,oBAAoB,EAAC,OAAO,EAC5B,cAAc,EAAG,IAAI;QAEvB,6BAAK,SAAS,EAAC,cAAc,IACzB,aAAa,CAAC,OAAO,CAAC,GAAG,CAAE,CAAE,OAAuB,EAAE,GAAW,EAAG,EAAE,CAAC,eAAe,CAAG,OAAO,EAAE,GAAG,CAAE,CAAE,CAQvG,CAIF,CAAC;IAEX,OAAO,CAAE,WAAW,CAAE,CAAC;AAEzB,CAAC,CAAA;AAED,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ import { IQuickCommandsDesign } from './IAccordion';
3
+ export interface IPanelItemProps {
4
+ CommandDesign: IQuickCommandsDesign;
5
+ onClosePanel: any;
6
+ showPanel: boolean;
7
+ }
8
+ declare const SampleDesignHook: React.FC<IPanelItemProps>;
9
+ export default SampleDesignHook;
10
+ //# sourceMappingURL=SampleDesign.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SampleDesign.d.ts","sourceRoot":"","sources":["../../../../../../src/components/molecules/PropPaneCols/components/command/SampleDesign.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,EAAkB,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAIpE,MAAM,WAAW,eAAe;IAC9B,aAAa,EAAE,oBAAoB,CAAC;IACpC,YAAY,EAAE,GAAG,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;CACpB;AAMD,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAsF/C,CAAA;AAED,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,66 @@
1
+ import * as React from 'react';
2
+ import { useState } from 'react';
3
+ import { Panel, PanelType } from 'office-ui-fabric-react/lib/Panel';
4
+ import { panelActionToggles } from '../common';
5
+ // const ConstIcon = <Icon iconName={ 'Stack' } title={ 'Is a choice button' } style={{ }}
6
+ // data-fieldtype= 'Choice' className={ 'type-filter-icon' } />
7
+ // export function getSampleDesign( panelItem: IMinField, onClosePanel: any, searchText: string ) : JSX.Element {
8
+ const SampleDesignHook = (props) => {
9
+ const { CommandDesign, showPanel } = props;
10
+ // Setting state in any way causes react error 310.
11
+ // https://github.com/mikezimm/Pnpjs-v2-Upgrade-sample/issues/36
12
+ const [type, setSide] = useState(PanelType.custom);
13
+ const [blocking, setBlock] = useState(true);
14
+ // For https://github.com/mikezimm/Pnpjs-v2-Upgrade-sample/issues/36
15
+ const clickSummary = (idx) => {
16
+ console.log('clicked', idx);
17
+ if (idx > -1) {
18
+ let equivilantSummary = -1;
19
+ let ActualButton = null;
20
+ CommandDesign.buttons.map((buttonRow) => {
21
+ buttonRow.map((button) => {
22
+ equivilantSummary++;
23
+ if (idx === equivilantSummary)
24
+ ActualButton = button;
25
+ });
26
+ });
27
+ console.log('ActualButton', ActualButton);
28
+ alert(`Clicked ${ActualButton.label.replace(`{str1}`, ActualButton.str1)}, Check console for details.`);
29
+ }
30
+ };
31
+ function createButtonRow(button, idx) {
32
+ if (button.type !== 'choice') {
33
+ const text = button.label.split('||');
34
+ // return <div className={ button.type } style={{ position: idx === 0 ? 'relative' : 'absolute' }}>
35
+ return React.createElement("div", { className: button.type, style: null, onClick: () => clickSummary(idx) },
36
+ React.createElement("div", null, text[0]),
37
+ React.createElement("div", null, text.length === 1 ? null : text[1]));
38
+ //ERROR READING TYPE HERE
39
+ }
40
+ else if (idx === 0 || (button.type === 'choice' && CommandDesign.summary[idx - 1].type !== 'choice')) {
41
+ return createChoiceStack(idx); //
42
+ }
43
+ }
44
+ function createChoiceStack(idx) {
45
+ const ChoiceButtonArray = [];
46
+ let i = idx + 0;
47
+ let offset = 0;
48
+ while (i < CommandDesign.summary.length && CommandDesign.summary[i].type === 'choice') {
49
+ const whileIndex = i + 0; // Had to create this or the clickSummary( ) would always just show the last index.
50
+ ChoiceButtonArray.push(React.createElement("div", { className: 'choice', style: { position: 'absolute', top: `${offset}px`, left: `${offset}px` }, onClick: () => clickSummary(whileIndex) },
51
+ React.createElement("div", null, CommandDesign.summary[i].label)));
52
+ i++;
53
+ offset = (i - idx) * 20;
54
+ }
55
+ return React.createElement("div", { className: 'choice-stack', style: { marginBottom: `${offset + 10}px` } }, ChoiceButtonArray);
56
+ }
57
+ // const IconStyles: React.CSSProperties = { cursor: 'pointer', fontSize: 'x-large', marginLeft: '20px' };
58
+ const AttachPanel = showPanel !== true ? null : React.createElement(Panel, { isOpen: CommandDesign.buttons.length > 0 ? true : false, type: type, isBlocking: blocking,
59
+ // onDismiss={ onClosePanel }
60
+ onDismiss: () => props.onClosePanel(false), headerText: `Sample Button Set`, closeButtonAriaLabel: "Close", isLightDismiss: true, customWidth: '700px' },
61
+ panelActionToggles(type, blocking, setSide, null),
62
+ React.createElement("div", { className: 'sample-panel' }, CommandDesign.summary.map((summary, idx) => createButtonRow(summary, idx))));
63
+ return (AttachPanel);
64
+ };
65
+ export default SampleDesignHook;
66
+ //# sourceMappingURL=SampleDesign.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SampleDesign.js","sourceRoot":"","sources":["../../../../../../src/components/molecules/PropPaneCols/components/command/SampleDesign.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAa,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAKpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAQ/C,2FAA2F;AAC3F,mEAAmE;AAEnE,iHAAiH;AACjH,MAAM,gBAAgB,GAA8B,CAAE,KAAK,EAAG,EAAE;IAE9D,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IAE3C,mDAAmD;IACnD,gEAAgE;IAEhE,MAAM,CAAE,I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AAE,YAAY,EAAE,GAAG,MAAM,GAAG,EAAG,IAAI,EAAE,IACjF,iBAAiB,CACf,CAAC;IACT,CAAC;IAED,0GAA0G;IAC1G,MAAM,WAAW,GAAgB,SAAS,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,oBAAC,KAAK,IAC3D,MAAM,EAAG,aAAa,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,EACxD,IAAI,EAAG,IAAI,EACX,UAAU,EAAG,QAAQ;QACrB,6BAA6B;QAC7B,SAAS,EAAG,GAAG,EAAE,CAAC,KAAK,CAAC,YAAY,CAAE,KAAK,CAAE,EAC7C,UAAU,EAAG,mBAAmB,EAChC,oBAAoB,EAAC,OAAO,EAC5B,cAAc,EAAG,IAAI,EACrB,WAAW,EAAG,OAAO;QAErB,kBAAkB,CAAG,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,CAAE;QACtD,6BAAK,SAAS,EAAC,cAAc,IACzB,aAAa,CAAC,OAAO,CAAC,GAAG,CAAE,CAAE,OAAuB,EAAE,GAAW,EAAG,EAAE,CAAC,eAAe,CAAG,OAAO,EAAE,GAAG,CAAE,CAAE,CACvG,CAEF,CAAC;IAEX,OAAO,CAAE,WAAW,CAAE,CAAC;AAEzB,CAAC,CAAA;AAED,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { IMinField } from "../IPropPaneColsProps";
2
+ import { IQuickCommandsDesign } from './IAccordion';
3
+ export declare function buildQuickCommands(selected: IMinField[], title: string, description: string): IQuickCommandsDesign;
4
+ /**
5
+ * This will take the eval string and add a new eval to it including having the operator and adding surround braces when required.
6
+ * @param showWhenEvalTrue
7
+ * @param operator
8
+ * @param miniEval
9
+ * @param surround
10
+ * @returns
11
+ */
12
+ export declare function bumpEval(showWhenEvalTrue: string, operator: '||' | '&&', miniEval: string, surround: boolean): string;
13
+ //# sourceMappingURL=createLogic.d.ts.map