@mohsinonxrm/pptb-fetchxml-studio 1.0.0 → 1.0.1

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 (77) hide show
  1. package/LICENSE +661 -0
  2. package/dist/assets/index-DD9fzkbz.js +232 -0
  3. package/dist/index.html +70 -0
  4. package/index.html +0 -1
  5. package/npm-shrinkwrap.json +6329 -0
  6. package/package.json +95 -51
  7. package/CHANGELOG.md +0 -120
  8. package/eslint.config.js +0 -23
  9. package/public/vite.svg +0 -1
  10. package/src/app/AppShell.tsx +0 -1733
  11. package/src/assets/20px-Microsoft_Office_Excel_(2025/342/200/223present).svg.png +0 -0
  12. package/src/assets/react.svg +0 -1
  13. package/src/features/fetchxml/api/dataverseMetadata.ts +0 -192
  14. package/src/features/fetchxml/api/excelExport.ts +0 -318
  15. package/src/features/fetchxml/api/formattedValues.ts +0 -107
  16. package/src/features/fetchxml/api/pptbClient.ts +0 -2635
  17. package/src/features/fetchxml/model/displaySettings.ts +0 -18
  18. package/src/features/fetchxml/model/fetchxml.ts +0 -346
  19. package/src/features/fetchxml/model/fetchxmlIntellisense.ts +0 -583
  20. package/src/features/fetchxml/model/fetchxmlParser.ts +0 -708
  21. package/src/features/fetchxml/model/layoutxml.ts +0 -372
  22. package/src/features/fetchxml/model/nodes.ts +0 -255
  23. package/src/features/fetchxml/model/operators.ts +0 -624
  24. package/src/features/fetchxml/model/treeUtils.ts +0 -174
  25. package/src/features/fetchxml/state/builderStore.tsx +0 -1160
  26. package/src/features/fetchxml/state/cache.ts +0 -393
  27. package/src/features/fetchxml/ui/Dialogs/BulkDeleteDialog.tsx +0 -352
  28. package/src/features/fetchxml/ui/Dialogs/DeleteConfirmDialog.tsx +0 -396
  29. package/src/features/fetchxml/ui/Dialogs/SaveViewDialog.tsx +0 -612
  30. package/src/features/fetchxml/ui/Dialogs/SolutionPicker.tsx +0 -114
  31. package/src/features/fetchxml/ui/Dialogs/WorkflowPickerDialog.tsx +0 -437
  32. package/src/features/fetchxml/ui/LeftPane/PropertiesPanel/editors/AttributeEditor.tsx +0 -214
  33. package/src/features/fetchxml/ui/LeftPane/PropertiesPanel/editors/ConditionEditor.tsx +0 -533
  34. package/src/features/fetchxml/ui/LeftPane/PropertiesPanel/editors/FetchOptionsEditor.tsx +0 -296
  35. package/src/features/fetchxml/ui/LeftPane/PropertiesPanel/editors/FilterEditor.tsx +0 -106
  36. package/src/features/fetchxml/ui/LeftPane/PropertiesPanel/editors/LinkEntityEditor.tsx +0 -433
  37. package/src/features/fetchxml/ui/LeftPane/PropertiesPanel/editors/OrderEditor.tsx +0 -161
  38. package/src/features/fetchxml/ui/LeftPane/PropertiesPanel/editors/ValueOfPicker.tsx +0 -194
  39. package/src/features/fetchxml/ui/LeftPane/PropertiesPanel.tsx +0 -225
  40. package/src/features/fetchxml/ui/LeftPane/TreeView.tsx +0 -604
  41. package/src/features/fetchxml/ui/RightPane/AddColumnsPanel.tsx +0 -800
  42. package/src/features/fetchxml/ui/RightPane/ColumnConfigDialog.tsx +0 -170
  43. package/src/features/fetchxml/ui/RightPane/DataGridCellRenderers.tsx +0 -356
  44. package/src/features/fetchxml/ui/RightPane/EditColumnsPanel.tsx +0 -372
  45. package/src/features/fetchxml/ui/RightPane/FetchXmlEditor.tsx +0 -399
  46. package/src/features/fetchxml/ui/RightPane/FormattedValueUtils.ts +0 -189
  47. package/src/features/fetchxml/ui/RightPane/LayoutXmlViewer.tsx +0 -171
  48. package/src/features/fetchxml/ui/RightPane/PreviewTabs.tsx +0 -471
  49. package/src/features/fetchxml/ui/RightPane/ResultsCommandBar.tsx +0 -430
  50. package/src/features/fetchxml/ui/RightPane/ResultsGrid.tsx +0 -983
  51. package/src/features/fetchxml/ui/RightPane/XmlTextArea.tsx +0 -65
  52. package/src/features/fetchxml/ui/Settings/SettingsDrawer.tsx +0 -175
  53. package/src/features/fetchxml/ui/Toolbar/EntitySelector.tsx +0 -788
  54. package/src/features/fetchxml/ui/Toolbar/LoadViewPicker.tsx +0 -274
  55. package/src/features/fetchxml/ui/Toolbar/SaveViewButton.tsx +0 -174
  56. package/src/main.tsx +0 -11
  57. package/src/shared/components/AttributePicker.tsx +0 -138
  58. package/src/shared/components/BetweenInputPicker.tsx +0 -120
  59. package/src/shared/components/BooleanValuePicker.tsx +0 -165
  60. package/src/shared/components/DateTimeInputPicker.tsx +0 -170
  61. package/src/shared/components/DynamicValueList.tsx +0 -128
  62. package/src/shared/components/ExcelIcon.tsx +0 -30
  63. package/src/shared/components/MultiValuePicker.tsx +0 -178
  64. package/src/shared/components/NumericInputPicker.tsx +0 -156
  65. package/src/shared/components/OptionSetValuePicker.tsx +0 -150
  66. package/src/shared/components/RelationshipPicker.tsx +0 -268
  67. package/src/shared/contexts/ThemeContext.tsx +0 -19
  68. package/src/shared/hooks/useAccessMode.ts +0 -77
  69. package/src/shared/hooks/useLazyMetadata.ts +0 -132
  70. package/src/shared/hooks/usePptbContext.ts +0 -170
  71. package/src/shared/hooks/usePublisherFilter.ts +0 -214
  72. package/src/shared/hooks/useSolutionFilter.ts +0 -162
  73. package/src/shared/utils/debug.ts +0 -87
  74. package/tsconfig.app.json +0 -28
  75. package/tsconfig.json +0 -7
  76. package/tsconfig.node.json +0 -26
  77. package/vite.config.ts +0 -7
@@ -1,65 +0,0 @@
1
- /**
2
- * Simple XML text area viewer (fallback when Monaco fails due to CSP)
3
- */
4
-
5
- import { Button, makeStyles, Tooltip, Textarea } from "@fluentui/react-components";
6
- import { Copy24Regular } from "@fluentui/react-icons";
7
-
8
- const useStyles = makeStyles({
9
- container: {
10
- display: "flex",
11
- flexDirection: "column",
12
- height: "100%",
13
- position: "relative",
14
- padding: "8px",
15
- },
16
- textarea: {
17
- flex: 1,
18
- fontFamily: "'Consolas', 'Monaco', 'Courier New', monospace",
19
- fontSize: "13px",
20
- lineHeight: "1.5",
21
- minHeight: 0, // Important for flex child
22
- },
23
- copyButton: {
24
- position: "absolute",
25
- top: "16px",
26
- right: "16px",
27
- zIndex: 10,
28
- },
29
- });
30
-
31
- interface XmlTextAreaProps {
32
- xml: string;
33
- }
34
-
35
- export function XmlTextArea({ xml }: XmlTextAreaProps) {
36
- const styles = useStyles();
37
-
38
- const handleCopy = async () => {
39
- try {
40
- await navigator.clipboard.writeText(xml);
41
- } catch (err) {
42
- console.error("Failed to copy:", err);
43
- }
44
- };
45
-
46
- return (
47
- <div className={styles.container}>
48
- <Tooltip content="Copy FetchXML to clipboard" relationship="label">
49
- <Button
50
- className={styles.copyButton}
51
- appearance="subtle"
52
- icon={<Copy24Regular />}
53
- onClick={handleCopy}
54
- />
55
- </Tooltip>
56
- <Textarea
57
- className={styles.textarea}
58
- value={xml}
59
- readOnly
60
- resize="none"
61
- style={{ height: "100%" }}
62
- />
63
- </div>
64
- );
65
- }
@@ -1,175 +0,0 @@
1
- /**
2
- * Settings Drawer
3
- * Contains display preferences for FetchXML Studio
4
- */
5
-
6
- import { useCallback } from "react";
7
- import {
8
- DrawerBody,
9
- DrawerHeader,
10
- DrawerHeaderTitle,
11
- OverlayDrawer,
12
- Button,
13
- makeStyles,
14
- tokens,
15
- Text,
16
- Switch,
17
- Dropdown,
18
- Option,
19
- Divider,
20
- } from "@fluentui/react-components";
21
- import { Dismiss24Regular, Settings20Regular } from "@fluentui/react-icons";
22
- import type { DisplaySettings, ValueDisplayMode } from "../../model/displaySettings";
23
-
24
- const useStyles = makeStyles({
25
- drawer: {
26
- width: "360px",
27
- },
28
- section: {
29
- marginBottom: tokens.spacingVerticalL,
30
- },
31
- sectionTitle: {
32
- fontSize: tokens.fontSizeBase400,
33
- fontWeight: tokens.fontWeightSemibold,
34
- marginBottom: tokens.spacingVerticalM,
35
- display: "flex",
36
- alignItems: "center",
37
- gap: tokens.spacingHorizontalS,
38
- },
39
- settingItem: {
40
- display: "flex",
41
- flexDirection: "column",
42
- gap: tokens.spacingVerticalXS,
43
- marginBottom: tokens.spacingVerticalM,
44
- },
45
- settingRow: {
46
- display: "flex",
47
- justifyContent: "space-between",
48
- alignItems: "center",
49
- },
50
- settingLabel: {
51
- fontWeight: tokens.fontWeightSemibold,
52
- },
53
- settingDescription: {
54
- fontSize: tokens.fontSizeBase200,
55
- color: tokens.colorNeutralForeground3,
56
- },
57
- dropdown: {
58
- minWidth: "160px",
59
- },
60
- });
61
-
62
- export interface SettingsDrawerProps {
63
- /** Whether the drawer is open */
64
- open: boolean;
65
- /** Current display settings */
66
- settings: DisplaySettings;
67
- /** Called when drawer should close */
68
- onClose: () => void;
69
- /** Called when settings change */
70
- onSettingsChange: (settings: DisplaySettings) => void;
71
- }
72
-
73
- export function SettingsDrawer({ open, settings, onClose, onSettingsChange }: SettingsDrawerProps) {
74
- const styles = useStyles();
75
-
76
- const handleLogicalNamesChange = useCallback(
77
- (checked: boolean) => {
78
- onSettingsChange({
79
- ...settings,
80
- useLogicalNames: checked,
81
- });
82
- },
83
- [settings, onSettingsChange]
84
- );
85
-
86
- const handleValueDisplayModeChange = useCallback(
87
- (mode: ValueDisplayMode) => {
88
- onSettingsChange({
89
- ...settings,
90
- valueDisplayMode: mode,
91
- });
92
- },
93
- [settings, onSettingsChange]
94
- );
95
-
96
- return (
97
- <OverlayDrawer
98
- open={open}
99
- onOpenChange={(_e, data) => !data.open && onClose()}
100
- position="end"
101
- size="small"
102
- className={styles.drawer}
103
- >
104
- <DrawerHeader>
105
- <DrawerHeaderTitle
106
- action={
107
- <Button
108
- appearance="subtle"
109
- aria-label="Close"
110
- icon={<Dismiss24Regular />}
111
- onClick={onClose}
112
- />
113
- }
114
- >
115
- <Settings20Regular style={{ marginRight: tokens.spacingHorizontalS }} />
116
- Settings
117
- </DrawerHeaderTitle>
118
- </DrawerHeader>
119
- <DrawerBody>
120
- {/* Display Settings Section */}
121
- <div className={styles.section}>
122
- <Text className={styles.sectionTitle}>Display Settings</Text>
123
-
124
- {/* Logical Names Toggle */}
125
- <div className={styles.settingItem}>
126
- <div className={styles.settingRow}>
127
- <div>
128
- <Text className={styles.settingLabel}>Use Logical Names</Text>
129
- <Text className={styles.settingDescription} block>
130
- Show attribute logical names in column headers instead of display names
131
- </Text>
132
- </div>
133
- <Switch
134
- checked={settings.useLogicalNames}
135
- onChange={(_e, data) => handleLogicalNamesChange(data.checked)}
136
- />
137
- </div>
138
- </div>
139
-
140
- {/* Value Display Mode */}
141
- <div className={styles.settingItem}>
142
- <Text className={styles.settingLabel}>Value Display Mode</Text>
143
- <Text className={styles.settingDescription} block>
144
- How to display cell values in the results grid
145
- </Text>
146
- <Dropdown
147
- className={styles.dropdown}
148
- value={
149
- settings.valueDisplayMode === "formatted"
150
- ? "Formatted"
151
- : settings.valueDisplayMode === "raw"
152
- ? "Raw"
153
- : "Both"
154
- }
155
- selectedOptions={[settings.valueDisplayMode]}
156
- onOptionSelect={(_e, data) =>
157
- handleValueDisplayModeChange(data.optionValue as ValueDisplayMode)
158
- }
159
- >
160
- <Option value="formatted">Formatted</Option>
161
- <Option value="raw">Raw</Option>
162
- <Option value="both">Both (2 columns per attribute)</Option>
163
- </Dropdown>
164
- </div>
165
- </div>
166
-
167
- <Divider />
168
-
169
- {/* Future: More settings sections can go here */}
170
- {/* Solution filtering for attributes/views */}
171
- {/* App filtering */}
172
- </DrawerBody>
173
- </OverlayDrawer>
174
- );
175
- }