@khester/create-dynamics-app 3.1.0 → 3.3.0

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 (64) hide show
  1. package/README.md +2 -2
  2. package/dist/artifacts/registry.d.ts.map +1 -1
  3. package/dist/artifacts/registry.js +23 -5
  4. package/dist/artifacts/registry.js.map +1 -1
  5. package/dist/index.js +31 -1
  6. package/dist/index.js.map +1 -1
  7. package/dist/injectDevTools.d.ts +2 -0
  8. package/dist/injectDevTools.d.ts.map +1 -1
  9. package/dist/injectDevTools.js +27 -1
  10. package/dist/injectDevTools.js.map +1 -1
  11. package/dist/utils/installDependencies.d.ts +15 -0
  12. package/dist/utils/installDependencies.d.ts.map +1 -1
  13. package/dist/utils/installDependencies.js +32 -2
  14. package/dist/utils/installDependencies.js.map +1 -1
  15. package/package.json +1 -1
  16. package/templates/_shared/dev-tools/auth/get-token.cjs +1 -1
  17. package/templates/_shared/dev-tools/metadata-sync/index.js +23 -11
  18. package/templates/_shared/dev-tools/smoke/test-retrieve.js +45 -16
  19. package/templates/grid-customizer/README.md +105 -15
  20. package/templates/grid-customizer/dev/harness/MockGrid.tsx +165 -0
  21. package/templates/grid-customizer/dev/harness/dataverse.ts +168 -0
  22. package/templates/grid-customizer/dev/index.html +20 -0
  23. package/templates/grid-customizer/dev/main.tsx +260 -0
  24. package/templates/grid-customizer/dev/vite-env.d.ts +1 -0
  25. package/templates/grid-customizer/env.local.example +24 -0
  26. package/templates/grid-customizer/eslintrc.json +11 -0
  27. package/templates/grid-customizer/featureconfig.json +3 -0
  28. package/templates/grid-customizer/gitignore +3 -0
  29. package/templates/grid-customizer/package.json +30 -16
  30. package/templates/grid-customizer/pcfconfig.json +3 -0
  31. package/templates/grid-customizer/tsconfig.dev.json +16 -0
  32. package/templates/grid-customizer/tsconfig.json +17 -10
  33. package/templates/grid-customizer/vite.config.ts +64 -0
  34. package/templates/grid-customizer/{{componentName}}/ControlManifest.Input.xml +63 -0
  35. package/templates/grid-customizer/{{componentName}}/customizers/CellEditorOverrides.tsx +38 -0
  36. package/templates/grid-customizer/{{componentName}}/customizers/CellRendererOverrides.tsx +109 -0
  37. package/templates/grid-customizer/{{componentName}}/customizers/cells.tsx +137 -0
  38. package/templates/grid-customizer/{{componentName}}/customizers/config.ts +84 -0
  39. package/templates/grid-customizer/{{componentName}}/index.ts +81 -0
  40. package/templates/grid-customizer/{{componentName}}/strings/{{componentName}}.1033.resx +56 -0
  41. package/templates/grid-customizer/{{componentName}}/types.ts +168 -0
  42. package/templates/pcf-dataset/dev/main.tsx +5 -1
  43. package/templates/pcf-dataset/{{componentName}}/ControlManifest.Input.xml +8 -1
  44. package/templates/pcf-field/dev/harness/dataverse.ts +71 -0
  45. package/templates/pcf-field/dev/index.html +20 -0
  46. package/templates/pcf-field/dev/main.tsx +212 -0
  47. package/templates/pcf-field/dev/vite-env.d.ts +1 -0
  48. package/templates/pcf-field/env.local.example +24 -0
  49. package/templates/pcf-field/gitignore +4 -0
  50. package/templates/pcf-field/package.json +10 -2
  51. package/templates/pcf-field/tsconfig.dev.json +15 -0
  52. package/templates/pcf-field/tsconfig.json +20 -4
  53. package/templates/pcf-field/vite.config.ts +60 -0
  54. package/templates/pcf-field/{{componentName}}/{{componentName}}Component.tsx +6 -1
  55. package/templates/static-web-app/api/local.settings.json +7 -0
  56. package/templates/static-web-app/frontend/vite.config.ts +9 -1
  57. package/templates/static-web-app/package.json +3 -1
  58. package/templates/static-web-app/staticwebapp.config.json +4 -1
  59. package/templates/grid-customizer/src/GridCustomizer.ts +0 -28
  60. package/templates/grid-customizer/src/cell-renderers.tsx +0 -35
  61. package/templates/grid-customizer/src/index.ts +0 -4
  62. package/templates/grid-customizer/src/types/grid-types.ts +0 -30
  63. package/templates/grid-customizer/src/utils/color-utils.ts +0 -24
  64. package/templates/grid-customizer/webpack.config.js +0 -17
@@ -1,24 +0,0 @@
1
- export function stringToColor(str: string): string {
2
- let hash = 0;
3
- for (let i = 0; i < str.length; i++) {
4
- hash = str.charCodeAt(i) + ((hash << 5) - hash);
5
- }
6
- const hue = hash % 360;
7
- return `hsl(${hue}, 65%, 45%)`;
8
- }
9
-
10
- export const STATUS_COLORS: Record<string, string> = {
11
- active: '#107c10',
12
- inactive: '#a19f9d',
13
- draft: '#0078d4',
14
- pending: '#ffaa44',
15
- approved: '#107c10',
16
- rejected: '#d13438',
17
- completed: '#107c10',
18
- cancelled: '#a19f9d',
19
- };
20
-
21
- export function getStatusColor(status: string): string {
22
- const normalized = status.toLowerCase().replace(/\s+/g, '');
23
- return STATUS_COLORS[normalized] || stringToColor(status);
24
- }
@@ -1,17 +0,0 @@
1
- const path = require('path');
2
-
3
- module.exports = {
4
- entry: './src/index.ts',
5
- output: {
6
- path: path.resolve(__dirname, 'dist'),
7
- filename: '{{projectName}}.js',
8
- library: { type: 'umd', name: '{{componentName}}' },
9
- clean: true,
10
- },
11
- resolve: { extensions: ['.ts', '.tsx', '.js'] },
12
- module: {
13
- rules: [{ test: /\.tsx?$/, use: 'ts-loader', exclude: /node_modules/ }],
14
- },
15
- // Provided by the grid host at runtime.
16
- externals: { react: 'React', 'react-dom': 'ReactDOM' },
17
- };