@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.
- package/README.md +2 -2
- package/dist/artifacts/registry.d.ts.map +1 -1
- package/dist/artifacts/registry.js +23 -5
- package/dist/artifacts/registry.js.map +1 -1
- package/dist/index.js +31 -1
- package/dist/index.js.map +1 -1
- package/dist/injectDevTools.d.ts +2 -0
- package/dist/injectDevTools.d.ts.map +1 -1
- package/dist/injectDevTools.js +27 -1
- package/dist/injectDevTools.js.map +1 -1
- package/dist/utils/installDependencies.d.ts +15 -0
- package/dist/utils/installDependencies.d.ts.map +1 -1
- package/dist/utils/installDependencies.js +32 -2
- package/dist/utils/installDependencies.js.map +1 -1
- package/package.json +1 -1
- package/templates/_shared/dev-tools/auth/get-token.cjs +1 -1
- package/templates/_shared/dev-tools/metadata-sync/index.js +23 -11
- package/templates/_shared/dev-tools/smoke/test-retrieve.js +45 -16
- package/templates/grid-customizer/README.md +105 -15
- package/templates/grid-customizer/dev/harness/MockGrid.tsx +165 -0
- package/templates/grid-customizer/dev/harness/dataverse.ts +168 -0
- package/templates/grid-customizer/dev/index.html +20 -0
- package/templates/grid-customizer/dev/main.tsx +260 -0
- package/templates/grid-customizer/dev/vite-env.d.ts +1 -0
- package/templates/grid-customizer/env.local.example +24 -0
- package/templates/grid-customizer/eslintrc.json +11 -0
- package/templates/grid-customizer/featureconfig.json +3 -0
- package/templates/grid-customizer/gitignore +3 -0
- package/templates/grid-customizer/package.json +30 -16
- package/templates/grid-customizer/pcfconfig.json +3 -0
- package/templates/grid-customizer/tsconfig.dev.json +16 -0
- package/templates/grid-customizer/tsconfig.json +17 -10
- package/templates/grid-customizer/vite.config.ts +64 -0
- package/templates/grid-customizer/{{componentName}}/ControlManifest.Input.xml +63 -0
- package/templates/grid-customizer/{{componentName}}/customizers/CellEditorOverrides.tsx +38 -0
- package/templates/grid-customizer/{{componentName}}/customizers/CellRendererOverrides.tsx +109 -0
- package/templates/grid-customizer/{{componentName}}/customizers/cells.tsx +137 -0
- package/templates/grid-customizer/{{componentName}}/customizers/config.ts +84 -0
- package/templates/grid-customizer/{{componentName}}/index.ts +81 -0
- package/templates/grid-customizer/{{componentName}}/strings/{{componentName}}.1033.resx +56 -0
- package/templates/grid-customizer/{{componentName}}/types.ts +168 -0
- package/templates/pcf-dataset/dev/main.tsx +5 -1
- package/templates/pcf-dataset/{{componentName}}/ControlManifest.Input.xml +8 -1
- package/templates/pcf-field/dev/harness/dataverse.ts +71 -0
- package/templates/pcf-field/dev/index.html +20 -0
- package/templates/pcf-field/dev/main.tsx +212 -0
- package/templates/pcf-field/dev/vite-env.d.ts +1 -0
- package/templates/pcf-field/env.local.example +24 -0
- package/templates/pcf-field/gitignore +4 -0
- package/templates/pcf-field/package.json +10 -2
- package/templates/pcf-field/tsconfig.dev.json +15 -0
- package/templates/pcf-field/tsconfig.json +20 -4
- package/templates/pcf-field/vite.config.ts +60 -0
- package/templates/pcf-field/{{componentName}}/{{componentName}}Component.tsx +6 -1
- package/templates/static-web-app/api/local.settings.json +7 -0
- package/templates/static-web-app/frontend/vite.config.ts +9 -1
- package/templates/static-web-app/package.json +3 -1
- package/templates/static-web-app/staticwebapp.config.json +4 -1
- package/templates/grid-customizer/src/GridCustomizer.ts +0 -28
- package/templates/grid-customizer/src/cell-renderers.tsx +0 -35
- package/templates/grid-customizer/src/index.ts +0 -4
- package/templates/grid-customizer/src/types/grid-types.ts +0 -30
- package/templates/grid-customizer/src/utils/color-utils.ts +0 -24
- 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
|
-
};
|