@kosdev-code/kos-nx-plugin 2.1.2 → 2.1.3
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/package.json +2 -2
- package/src/generators/kos-component/README.md +50 -29
- package/src/generators/kos-component/control-pour/__nameDashCase__.stories.tsx__template__ +1 -1
- package/src/generators/kos-component/cui/__nameDashCase__.stories.tsx__template__ +1 -1
- package/src/generators/kos-component/custom/__nameDashCase__.stories.tsx__template__ +31 -0
- package/src/generators/kos-component/custom/__nameDashCase__.tsx__template__ +53 -0
- package/src/generators/kos-component/custom/index.ts__template__ +1 -0
- package/src/generators/kos-component/generator.d.ts +3 -0
- package/src/generators/kos-component/generator.d.ts.map +1 -1
- package/src/generators/kos-component/generator.js +83 -282
- package/src/generators/kos-component/generator.js.map +1 -1
- package/src/generators/kos-component/index.d.ts +1 -1
- package/src/generators/kos-component/index.d.ts.map +1 -1
- package/src/generators/kos-component/index.js +4 -4
- package/src/generators/kos-component/index.js.map +1 -1
- package/src/generators/kos-component/nav/__nameDashCase__.stories.tsx__template__ +1 -1
- package/src/generators/kos-component/plugin-handlers/custom-handler.d.ts +11 -0
- package/src/generators/kos-component/plugin-handlers/custom-handler.d.ts.map +1 -0
- package/src/generators/kos-component/plugin-handlers/custom-handler.js +45 -0
- package/src/generators/kos-component/plugin-handlers/custom-handler.js.map +1 -0
- package/src/generators/kos-component/plugin-handlers/factory.d.ts.map +1 -1
- package/src/generators/kos-component/plugin-handlers/factory.js +2 -0
- package/src/generators/kos-component/plugin-handlers/factory.js.map +1 -1
- package/src/generators/kos-component/schema.d.ts +3 -1
- package/src/generators/kos-component/schema.json +12 -0
- package/src/generators/kos-component/setting/__nameDashCase__.stories.tsx__template__ +1 -1
- package/src/generators/kos-component/setup/__nameDashCase__.stories.tsx__template__ +1 -1
- package/src/generators/kos-component/trouble-action/__nameDashCase__.stories.tsx__template__ +1 -1
- package/src/generators/kos-component/types.d.ts +2 -0
- package/src/generators/kos-component/types.d.ts.map +1 -1
- package/src/generators/kos-component/types.js +3 -0
- package/src/generators/kos-component/types.js.map +1 -1
- package/src/generators/kos-component/utility/__nameDashCase__.stories.tsx__template__ +1 -1
- package/src/generators/kos-plugin-project/files/src/app/components/main-view/main-view.tsx.template +1 -1
- package/src/generators/kos-component/generator_refactored.d.ts +0 -8
- package/src/generators/kos-component/generator_refactored.d.ts.map +0 -1
- package/src/generators/kos-component/generator_refactored.js +0 -96
- package/src/generators/kos-component/generator_refactored.js.map +0 -1
|
@@ -5,295 +5,96 @@ const devkit_1 = require("@nx/devkit");
|
|
|
5
5
|
const path = require("path");
|
|
6
6
|
const project_utils_1 = require("../../utils/project-utils");
|
|
7
7
|
const normalize_options_1 = require("../kos-model/lib/normalize-options");
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
[PLUGIN_CUI]: "cui",
|
|
18
|
-
[PLUGIN_UTILITY]: "utility",
|
|
19
|
-
[PLUGIN_SETTING]: "setting",
|
|
20
|
-
[PLUGIN_NAV]: "nav",
|
|
21
|
-
[PLUGIN_TROUBLE_ACTION]: "trouble-action",
|
|
22
|
-
[PLUGIN_CONTROL_POUR]: "control-pour",
|
|
23
|
-
};
|
|
8
|
+
const types_1 = require("./types");
|
|
9
|
+
const factory_1 = require("./plugin-handlers/factory");
|
|
10
|
+
const file_generator_1 = require("./utils/file-generator");
|
|
11
|
+
const localization_1 = require("./utils/localization");
|
|
12
|
+
const kos_config_builder_1 = require("./utils/kos-config-builder");
|
|
13
|
+
const validation_1 = require("./utils/validation");
|
|
14
|
+
/**
|
|
15
|
+
* KOS Component Generator
|
|
16
|
+
*/
|
|
24
17
|
async function kosComponentGenerator(tree, options) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
const isCuiConfig = options.pluginType === "cui";
|
|
36
|
-
const isUtilityConfig = options.pluginType === "utility";
|
|
37
|
-
const isSetupConfig = options.pluginType === "setup";
|
|
38
|
-
const isSettingConfig = options.pluginType === "setting";
|
|
39
|
-
const isTroubleActionConfig = options.pluginType === "troubleAction";
|
|
40
|
-
const isNav = options.pluginType === "nav";
|
|
41
|
-
const isControlPour = options.pluginType === "controlPour";
|
|
42
|
-
const requiresLocalization = isCuiConfig ||
|
|
43
|
-
isUtilityConfig ||
|
|
44
|
-
isSetupConfig ||
|
|
45
|
-
isSettingConfig ||
|
|
46
|
-
isNav ||
|
|
47
|
-
isControlPour ||
|
|
48
|
-
isTroubleActionConfig;
|
|
49
|
-
const sourcePath = contributionMap[options.pluginType || ""] ?? "files";
|
|
50
|
-
if (projectRoot) {
|
|
51
|
-
(0, devkit_1.generateFiles)(tree, path.join(__dirname, sourcePath), path.join(projectRoot, options.appDirectory, options.type, normalized.nameDashCase), normalized);
|
|
52
|
-
if (options.useEmotionCss) {
|
|
53
|
-
const cssPath = path.join(projectRoot, options.appDirectory, contributionMap[options.type] || options.type, normalized.nameDashCase, `${normalized.nameDashCase}.css`);
|
|
54
|
-
tree.delete(cssPath);
|
|
18
|
+
try {
|
|
19
|
+
// Step 1: Validate options
|
|
20
|
+
(0, validation_1.validateOptions)(tree, options);
|
|
21
|
+
// Step 2: Normalize options
|
|
22
|
+
const normalized = await prepareOptions(tree, options);
|
|
23
|
+
// Step 3: Get project configuration
|
|
24
|
+
const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, normalized.appProject);
|
|
25
|
+
const projectRoot = projectConfig.sourceRoot;
|
|
26
|
+
if (!projectRoot) {
|
|
27
|
+
throw new Error(`No source root found for project ${normalized.appProject}`);
|
|
55
28
|
}
|
|
29
|
+
// Step 4: Generate component files
|
|
30
|
+
await generateFiles(tree, projectRoot, normalized);
|
|
31
|
+
// Step 5: Update plugin configuration if needed
|
|
56
32
|
if (options.pluginType) {
|
|
57
|
-
|
|
58
|
-
const kosConfig = {
|
|
59
|
-
cui: [],
|
|
60
|
-
};
|
|
61
|
-
const tabViewConfig = [];
|
|
62
|
-
const utilityViewConfig = {
|
|
63
|
-
utilities: [],
|
|
64
|
-
};
|
|
65
|
-
const troubleActionConfig = {
|
|
66
|
-
troubleActions: [],
|
|
67
|
-
};
|
|
68
|
-
const setupViewConfig = {
|
|
69
|
-
setupStep: [],
|
|
70
|
-
};
|
|
71
|
-
const settingViewConfig = {
|
|
72
|
-
settings: [],
|
|
73
|
-
};
|
|
74
|
-
const controlPourConfig = {
|
|
75
|
-
controlPour: [],
|
|
76
|
-
};
|
|
77
|
-
const navViewConfig = {
|
|
78
|
-
navViews: [],
|
|
79
|
-
};
|
|
80
|
-
const experiences = {};
|
|
81
|
-
const compPath = path.join(options.appDirectory, contributionMap[options.type] || options.type, normalized.nameDashCase, `${normalized.nameDashCase}.tsx`);
|
|
82
|
-
if (isCuiConfig) {
|
|
83
|
-
const configPrefix = `${normalized.appProject}.${normalized.nameCamelCase}`;
|
|
84
|
-
const experienceId = `${configPrefix}.cui.experience`;
|
|
85
|
-
kosConfig.cui = [
|
|
86
|
-
{
|
|
87
|
-
id: `${configPrefix}`,
|
|
88
|
-
title: `${configPrefix}.cui.title`,
|
|
89
|
-
namespace: normalized.appProject,
|
|
90
|
-
experienceId,
|
|
91
|
-
},
|
|
92
|
-
];
|
|
93
|
-
experiences[experienceId] = {
|
|
94
|
-
id: experienceId,
|
|
95
|
-
component: normalized.namePascalCase,
|
|
96
|
-
location: `./src/${compPath}`,
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
else if (isControlPour) {
|
|
100
|
-
const configPrefix = `${normalized.appProject}.${normalized.nameCamelCase}`;
|
|
101
|
-
const experienceId = `${configPrefix}.controlPour.experience`;
|
|
102
|
-
controlPourConfig.controlPour = [
|
|
103
|
-
{
|
|
104
|
-
id: `${configPrefix}.controlPour`,
|
|
105
|
-
title: `${configPrefix}.controlPour.title`,
|
|
106
|
-
namespace: normalized.appProject,
|
|
107
|
-
experienceId,
|
|
108
|
-
},
|
|
109
|
-
];
|
|
110
|
-
experiences[experienceId] = {
|
|
111
|
-
id: experienceId,
|
|
112
|
-
component: normalized.namePascalCase,
|
|
113
|
-
location: `./src/${compPath}`,
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
else if (isUtilityConfig) {
|
|
117
|
-
const configPrefix = `${normalized.appProject}.${normalized.nameCamelCase}`;
|
|
118
|
-
const experienceId = `${configPrefix}.util.experience`;
|
|
119
|
-
utilityViewConfig.utilities = [
|
|
120
|
-
{
|
|
121
|
-
id: `${configPrefix}.util`,
|
|
122
|
-
title: `${configPrefix}.utility.title`,
|
|
123
|
-
namespace: normalized.appProject,
|
|
124
|
-
utilDescriptor: normalized.nameCamelCase,
|
|
125
|
-
experienceId,
|
|
126
|
-
},
|
|
127
|
-
];
|
|
128
|
-
experiences[experienceId] = {
|
|
129
|
-
id: experienceId,
|
|
130
|
-
component: normalized.namePascalCase,
|
|
131
|
-
location: `./src/${compPath}`,
|
|
132
|
-
};
|
|
133
|
-
}
|
|
134
|
-
else if (isTroubleActionConfig) {
|
|
135
|
-
const configPrefix = `${normalized.appProject}.${normalized.nameCamelCase}`;
|
|
136
|
-
const experienceId = `${configPrefix}.troubleAction.experience`;
|
|
137
|
-
troubleActionConfig.troubleActions = [
|
|
138
|
-
{
|
|
139
|
-
id: `${configPrefix}.troubleAction`,
|
|
140
|
-
title: `${configPrefix}.troubleAction.title`,
|
|
141
|
-
namespace: normalized.appProject,
|
|
142
|
-
troubleType: normalized.nameCamelCase,
|
|
143
|
-
experienceId,
|
|
144
|
-
},
|
|
145
|
-
];
|
|
146
|
-
experiences[experienceId] = {
|
|
147
|
-
id: experienceId,
|
|
148
|
-
component: normalized.namePascalCase,
|
|
149
|
-
location: `./src/${compPath}`,
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
else if (isSetupConfig) {
|
|
153
|
-
const configPrefix = `${normalized.appProject}.${normalized.nameCamelCase}`;
|
|
154
|
-
const experienceId = `${configPrefix}.setup.experience`;
|
|
155
|
-
setupViewConfig.setupStep = [
|
|
156
|
-
{
|
|
157
|
-
id: `${configPrefix}.setup`,
|
|
158
|
-
title: `${configPrefix}.setup.title`,
|
|
159
|
-
namespace: normalized.appProject,
|
|
160
|
-
setupDescriptor: normalized.nameCamelCase,
|
|
161
|
-
experienceId,
|
|
162
|
-
},
|
|
163
|
-
];
|
|
164
|
-
experiences[experienceId] = {
|
|
165
|
-
id: experienceId,
|
|
166
|
-
component: normalized.namePascalCase,
|
|
167
|
-
location: `./src/${compPath}`,
|
|
168
|
-
};
|
|
169
|
-
}
|
|
170
|
-
else if (isSettingConfig) {
|
|
171
|
-
const configPrefix = `${normalized.appProject}.${normalized.nameCamelCase}`;
|
|
172
|
-
const experienceId = `${configPrefix}.settings.experience`;
|
|
173
|
-
settingViewConfig.settings = [
|
|
174
|
-
{
|
|
175
|
-
id: `${configPrefix}.setting`,
|
|
176
|
-
title: `${configPrefix}.setting.title`,
|
|
177
|
-
namespace: normalized.appProject,
|
|
178
|
-
settingsGroup: normalized.group,
|
|
179
|
-
experienceId,
|
|
180
|
-
},
|
|
181
|
-
];
|
|
182
|
-
experiences[experienceId] = {
|
|
183
|
-
id: experienceId,
|
|
184
|
-
component: normalized.namePascalCase,
|
|
185
|
-
location: `./src/${compPath}`,
|
|
186
|
-
};
|
|
187
|
-
}
|
|
188
|
-
else if (isNav) {
|
|
189
|
-
const configPrefix = `${normalized.appProject}.${normalized.nameCamelCase}`;
|
|
190
|
-
const experienceId = `${configPrefix}.nav.experience`;
|
|
191
|
-
navViewConfig.navViews = [
|
|
192
|
-
{
|
|
193
|
-
id: `${configPrefix}.nav`,
|
|
194
|
-
title: `${configPrefix}.nav.title`,
|
|
195
|
-
namespace: normalized.appProject,
|
|
196
|
-
navDescriptor: normalized.nameLowerCase,
|
|
197
|
-
experienceId,
|
|
198
|
-
},
|
|
199
|
-
];
|
|
200
|
-
experiences[experienceId] = {
|
|
201
|
-
id: experienceId,
|
|
202
|
-
component: normalized.namePascalCase,
|
|
203
|
-
location: `./src/${compPath}`,
|
|
204
|
-
};
|
|
205
|
-
}
|
|
206
|
-
else {
|
|
207
|
-
tabViewConfig.push({
|
|
208
|
-
id: `${normalized.appProject}.${normalized.nameCamelCase}`,
|
|
209
|
-
title: "ddk.ncui.config.title",
|
|
210
|
-
namespace: normalized.appProject,
|
|
211
|
-
component: normalized.namePascalCase,
|
|
212
|
-
location: `./src/${compPath}`,
|
|
213
|
-
});
|
|
214
|
-
}
|
|
215
|
-
const localePath = path.join(projectRoot, "assets", "locales", "en", `${normalized.appProject}.json`);
|
|
216
|
-
(0, devkit_1.updateJson)(tree, localePath, (json) => {
|
|
217
|
-
if (requiresLocalization) {
|
|
218
|
-
json[normalized.appProject] = json[normalized.appProject] || {};
|
|
219
|
-
json[normalized.appProject][normalized.nameCamelCase] =
|
|
220
|
-
json[normalized.appProject][normalized.nameCamelCase] || {};
|
|
221
|
-
json[normalized.appProject][normalized.nameCamelCase][sourcePath] = {
|
|
222
|
-
...json[normalized.appProject][normalized.nameCamelCase][sourcePath],
|
|
223
|
-
title: `${normalized.nameCamelCase}`,
|
|
224
|
-
};
|
|
225
|
-
}
|
|
226
|
-
return json;
|
|
227
|
-
});
|
|
228
|
-
(0, devkit_1.updateJson)(tree, kosConfigPath, (json) => {
|
|
229
|
-
json.kosdev = {
|
|
230
|
-
...json?.kosdev,
|
|
231
|
-
ddk: {
|
|
232
|
-
...json?.kosdev?.ddk,
|
|
233
|
-
ncui: {
|
|
234
|
-
...json?.kosdev?.ddk?.ncui,
|
|
235
|
-
plugin: {
|
|
236
|
-
...json?.kosdev?.ddk?.ncui?.plugin,
|
|
237
|
-
contributes: {
|
|
238
|
-
...json?.kosdev?.ddk?.ncui?.plugin?.contributes,
|
|
239
|
-
setupStep: [
|
|
240
|
-
...(json?.kosdev?.ddk?.ncui?.plugin?.contributes
|
|
241
|
-
?.setupStep || []),
|
|
242
|
-
...setupViewConfig.setupStep,
|
|
243
|
-
],
|
|
244
|
-
cui: [
|
|
245
|
-
...(json?.kosdev?.ddk?.ncui?.plugin?.contributes?.cui ||
|
|
246
|
-
[]),
|
|
247
|
-
...kosConfig.cui,
|
|
248
|
-
],
|
|
249
|
-
utilities: [
|
|
250
|
-
...(json?.kosdev?.ddk?.ncui?.plugin?.contributes
|
|
251
|
-
?.utilities || []),
|
|
252
|
-
...utilityViewConfig.utilities,
|
|
253
|
-
],
|
|
254
|
-
controlPour: [
|
|
255
|
-
...(json?.kosdev?.ddk?.ncui?.plugin?.contributes
|
|
256
|
-
?.controlPour || []),
|
|
257
|
-
...controlPourConfig.controlPour,
|
|
258
|
-
],
|
|
259
|
-
troubleActions: [
|
|
260
|
-
...(json?.kosdev?.ddk?.ncui?.plugin?.contributes
|
|
261
|
-
?.troubleActions || []),
|
|
262
|
-
...troubleActionConfig.troubleActions,
|
|
263
|
-
],
|
|
264
|
-
settings: [
|
|
265
|
-
...(json?.kosdev?.ddk?.ncui?.plugin?.contributes
|
|
266
|
-
?.settings || []),
|
|
267
|
-
...settingViewConfig.settings,
|
|
268
|
-
],
|
|
269
|
-
navViews: [
|
|
270
|
-
...(json?.kosdev?.ddk?.ncui?.plugin?.contributes
|
|
271
|
-
?.navViews || []),
|
|
272
|
-
...navViewConfig.navViews,
|
|
273
|
-
],
|
|
274
|
-
experiences: {
|
|
275
|
-
...json?.kosdev?.ddk?.ncui?.plugin?.contributes
|
|
276
|
-
?.experiences,
|
|
277
|
-
...experiences,
|
|
278
|
-
},
|
|
279
|
-
views: {
|
|
280
|
-
...json?.kosdev?.ddk?.ncui?.plugin?.contributes?.views,
|
|
281
|
-
"ddk.ncui.settings.tabView": [
|
|
282
|
-
...(json?.kosdev?.ddk?.ncui?.plugin?.contributes?.views["ddk.ncui.settings.tabView"] || []),
|
|
283
|
-
...tabViewConfig,
|
|
284
|
-
],
|
|
285
|
-
},
|
|
286
|
-
},
|
|
287
|
-
},
|
|
288
|
-
},
|
|
289
|
-
},
|
|
290
|
-
};
|
|
291
|
-
return json;
|
|
292
|
-
});
|
|
33
|
+
await updatePluginConfiguration(tree, projectConfig, normalized);
|
|
293
34
|
}
|
|
35
|
+
// Step 6: Format files
|
|
294
36
|
await (0, devkit_1.formatFiles)(tree);
|
|
295
37
|
}
|
|
38
|
+
catch (error) {
|
|
39
|
+
console.error("Error in kosComponentGenerator:", error);
|
|
40
|
+
throw error;
|
|
41
|
+
}
|
|
296
42
|
}
|
|
297
43
|
exports.kosComponentGenerator = kosComponentGenerator;
|
|
44
|
+
/**
|
|
45
|
+
* Prepares and normalizes options
|
|
46
|
+
*/
|
|
47
|
+
async function prepareOptions(tree, options) {
|
|
48
|
+
const normalized = (0, normalize_options_1.normalizeOptions)(tree, {
|
|
49
|
+
...options,
|
|
50
|
+
modelProject: "__NONE__",
|
|
51
|
+
});
|
|
52
|
+
// Get KOS configuration for component location
|
|
53
|
+
const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, normalized.appProject);
|
|
54
|
+
const kosConfig = (0, project_utils_1.getKosProjectConfiguration)(tree, projectConfig.name);
|
|
55
|
+
const componentLocation = kosConfig?.generator?.defaults?.component?.folder || "";
|
|
56
|
+
// Set component directory and type
|
|
57
|
+
normalized.appDirectory = options.appDirectory || componentLocation;
|
|
58
|
+
normalized.type =
|
|
59
|
+
types_1.CONTRIBUTION_TYPE_MAP[options.pluginType || ""] || options.type;
|
|
60
|
+
// Pass through contributionKey for custom plugin types
|
|
61
|
+
if (options.contributionKey) {
|
|
62
|
+
normalized.contributionKey = options.contributionKey;
|
|
63
|
+
}
|
|
64
|
+
return normalized;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Generates component files from templates
|
|
68
|
+
*/
|
|
69
|
+
async function generateFiles(tree, projectRoot, options) {
|
|
70
|
+
// Get appropriate handler
|
|
71
|
+
const handler = factory_1.PluginHandlerFactory.createHandler(options.pluginType);
|
|
72
|
+
const templatePath = handler.getTemplatePath();
|
|
73
|
+
// Determine target path
|
|
74
|
+
const targetPath = path.join(projectRoot, options.appDirectory, options.type, options.nameDashCase);
|
|
75
|
+
// Generate files
|
|
76
|
+
(0, file_generator_1.generateComponentFiles)(tree, templatePath, targetPath, options);
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Updates plugin configuration in .kos.json
|
|
80
|
+
*/
|
|
81
|
+
async function updatePluginConfiguration(tree, projectConfig, options) {
|
|
82
|
+
const kosConfigPath = path.join(projectConfig.root, ".kos.json");
|
|
83
|
+
if (!tree.exists(kosConfigPath)) {
|
|
84
|
+
console.warn(`No .kos.json found at ${kosConfigPath}`);
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
// Get handler and create configuration
|
|
88
|
+
const handler = factory_1.PluginHandlerFactory.createHandler(options.pluginType);
|
|
89
|
+
const pluginConfig = handler.createConfiguration(options);
|
|
90
|
+
// Update .kos.json using builder
|
|
91
|
+
const builder = kos_config_builder_1.KosConfigBuilder.create();
|
|
92
|
+
builder.addPluginConfiguration(pluginConfig);
|
|
93
|
+
builder.applyToFile(tree, kosConfigPath);
|
|
94
|
+
// Update localization if needed
|
|
95
|
+
if (handler.requiresLocalization() && projectConfig.sourceRoot) {
|
|
96
|
+
(0, localization_1.updateLocalization)(tree, projectConfig.sourceRoot, options, handler.getContributionKey());
|
|
97
|
+
}
|
|
98
|
+
}
|
|
298
99
|
exports.default = kosComponentGenerator;
|
|
299
100
|
//# sourceMappingURL=generator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/kos-nx-plugin/src/generators/kos-component/generator.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/kos-nx-plugin/src/generators/kos-component/generator.ts"],"names":[],"mappings":";;;AAAA,uCAAyE;AACz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ClB,OAA0B;IAE1B,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;IAEjE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC;QAChC,OAAO,CAAC,IAAI,CAAC,yBAAyB,aAAa,EAAE,CAAC,CAAC;QACvD,OAAO;IACT,CAAC;IAED,uCAAuC;IACvC,MAAM,OAAO,GAAG,8BAAoB,CAAC,aAAa,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IACvE,MAAM,YAAY,GAAG,OAAO,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC;IAE1D,iCAAiC;IACjC,MAAM,OAAO,GAAG,qCAAgB,CAAC,MAAM,EAAE,CAAC;IAC1C,OAAO,CAAC,sBAAsB,CAAC,YAAY,CAAC,CAAC;IAC7C,OAAO,CAAC,WAAW,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;IAEzC,gCAAgC;IAChC,IAAI,OAAO,CAAC,oBAAoB,EAAE,IAAI,aAAa,CAAC,UAAU,EAAE,CAAC;QAC/D,IAAA,iCAAkB,EAChB,IAAI,EACJ,aAAa,CAAC,UAAU,EACxB,OAAO,EACP,OAAO,CAAC,kBAAkB,EAAE,CAC7B,CAAC;IACJ,CAAC;AACH,CAAC;AAED,kBAAe,qBAAqB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { kosComponentGenerator as default, kosComponentGenerator, } from "./
|
|
1
|
+
export { kosComponentGenerator as default, kosComponentGenerator, } from "./generator";
|
|
2
2
|
export { PluginHandler } from "./plugin-handlers/base";
|
|
3
3
|
export { PluginHandlerFactory } from "./plugin-handlers/factory";
|
|
4
4
|
export * from "./types";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../packages/plugins/kos-nx-plugin/src/generators/kos-component/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,qBAAqB,IAAI,OAAO,EAChC,qBAAqB,GACtB,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../packages/plugins/kos-nx-plugin/src/generators/kos-component/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,qBAAqB,IAAI,OAAO,EAChC,qBAAqB,GACtB,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,cAAc,SAAS,CAAC"}
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PluginHandlerFactory = exports.kosComponentGenerator = exports.default = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
// Main export
|
|
6
|
-
var
|
|
7
|
-
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return
|
|
8
|
-
Object.defineProperty(exports, "kosComponentGenerator", { enumerable: true, get: function () { return
|
|
5
|
+
// Main export
|
|
6
|
+
var generator_1 = require("./generator");
|
|
7
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return generator_1.kosComponentGenerator; } });
|
|
8
|
+
Object.defineProperty(exports, "kosComponentGenerator", { enumerable: true, get: function () { return generator_1.kosComponentGenerator; } });
|
|
9
9
|
var factory_1 = require("./plugin-handlers/factory");
|
|
10
10
|
Object.defineProperty(exports, "PluginHandlerFactory", { enumerable: true, get: function () { return factory_1.PluginHandlerFactory; } });
|
|
11
11
|
tslib_1.__exportStar(require("./types"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/kos-nx-plugin/src/generators/kos-component/index.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/kos-nx-plugin/src/generators/kos-component/index.ts"],"names":[],"mappings":";;;;AAAA,cAAc;AACd,yCAGqB;AAFnB,oGAAA,qBAAqB,OAAW;AAChC,kHAAA,qBAAqB,OAAA;AAKvB,qDAAiE;AAAxD,+GAAA,oBAAoB,OAAA;AAC7B,kDAAwB"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Note: The plugin project Storybook configuration requires that the Studio
|
|
3
3
|
* Simulator is running in order to retrieve model data...
|
|
4
4
|
*/
|
|
5
|
-
import { NavStoryContainer } from "@kosdev-code/kos-ui-plugin
|
|
5
|
+
import { NavStoryContainer } from "@kosdev-code/kos-ui-plugin-dev";
|
|
6
6
|
import type { Meta, StoryObj } from "@storybook/react";
|
|
7
7
|
import { <%= namePascalCase %> } from "./<%= nameDashCase %>";
|
|
8
8
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { NormalizedOptions, PluginConfiguration } from "../types";
|
|
2
|
+
import { BasePluginHandler } from "./base";
|
|
3
|
+
export declare class CustomPluginHandler extends BasePluginHandler {
|
|
4
|
+
protected pluginType: "custom";
|
|
5
|
+
protected contributionKey: string;
|
|
6
|
+
protected requiresI18n: boolean;
|
|
7
|
+
createConfiguration(options: NormalizedOptions): PluginConfiguration;
|
|
8
|
+
getTemplatePath(): string;
|
|
9
|
+
protected getComponentPath(options: NormalizedOptions): string;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=custom-handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custom-handler.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/plugins/kos-nx-plugin/src/generators/kos-component/plugin-handlers/custom-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAgB,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAE3C,qBAAa,mBAAoB,SAAQ,iBAAiB;IACxD,SAAS,CAAC,UAAU,WAAuB;IAC3C,SAAS,CAAC,eAAe,SAAY;IACrC,SAAS,CAAC,YAAY,UAAQ;IAE9B,mBAAmB,CAAC,OAAO,EAAE,iBAAiB,GAAG,mBAAmB;IA+BpE,eAAe,IAAI,MAAM;IAKzB,SAAS,CAAC,gBAAgB,CAAC,OAAO,EAAE,iBAAiB,GAAG,MAAM;CAK/D"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CustomPluginHandler = void 0;
|
|
4
|
+
const types_1 = require("../types");
|
|
5
|
+
const base_1 = require("./base");
|
|
6
|
+
class CustomPluginHandler extends base_1.BasePluginHandler {
|
|
7
|
+
pluginType = types_1.PLUGIN_TYPES.CUSTOM;
|
|
8
|
+
contributionKey = "custom";
|
|
9
|
+
requiresI18n = true;
|
|
10
|
+
createConfiguration(options) {
|
|
11
|
+
const configPrefix = this.getConfigPrefix(options);
|
|
12
|
+
const experienceId = `${configPrefix}.${options.contributionKey || "custom"}.experience`;
|
|
13
|
+
// Get the user-specified contribution key or default to 'custom'
|
|
14
|
+
const userContributionKey = options.contributionKey || "custom";
|
|
15
|
+
const contribution = {
|
|
16
|
+
id: configPrefix,
|
|
17
|
+
title: `${configPrefix}.${userContributionKey}.title`,
|
|
18
|
+
namespace: options.appProject,
|
|
19
|
+
experienceId,
|
|
20
|
+
// Add comment for additional fields
|
|
21
|
+
// TODO: Add additional fields as required by the plugin-explorer specification
|
|
22
|
+
// Refer to the plugin-explorer documentation for your specific contribution type
|
|
23
|
+
};
|
|
24
|
+
const experience = this.createExperience(options, experienceId);
|
|
25
|
+
return {
|
|
26
|
+
contributions: {
|
|
27
|
+
[userContributionKey]: [contribution],
|
|
28
|
+
},
|
|
29
|
+
experiences: {
|
|
30
|
+
[experienceId]: experience,
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
getTemplatePath() {
|
|
35
|
+
// Use the generic 'custom' template path
|
|
36
|
+
return "custom";
|
|
37
|
+
}
|
|
38
|
+
getComponentPath(options) {
|
|
39
|
+
// Use the user-specified contribution key for the path if available
|
|
40
|
+
const pathKey = options.contributionKey || "custom";
|
|
41
|
+
return `${options.appDirectory}/${pathKey}/${options.nameDashCase}/${options.nameDashCase}.tsx`;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.CustomPluginHandler = CustomPluginHandler;
|
|
45
|
+
//# sourceMappingURL=custom-handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custom-handler.js","sourceRoot":"","sources":["../../../../../../../../packages/plugins/kos-nx-plugin/src/generators/kos-component/plugin-handlers/custom-handler.ts"],"names":[],"mappings":";;;AAAA,oCAAgF;AAChF,iCAA2C;AAE3C,MAAa,mBAAoB,SAAQ,wBAAiB;IAC9C,UAAU,GAAG,oBAAY,CAAC,MAAM,CAAC;IACjC,eAAe,GAAG,QAAQ,CAAC;IAC3B,YAAY,GAAG,IAAI,CAAC;IAE9B,mBAAmB,CAAC,OAA0B;QAC5C,MAAM,YAAY,GAAG,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;QACnD,MAAM,YAAY,GAAG,GAAG,YAAY,IAClC,OAAO,CAAC,eAAe,IAAI,QAC7B,aAAa,CAAC;QAEd,iEAAiE;QACjE,MAAM,mBAAmB,GAAG,OAAO,CAAC,eAAe,IAAI,QAAQ,CAAC;QAEhE,MAAM,YAAY,GAAG;YACnB,EAAE,EAAE,YAAY;YAChB,KAAK,EAAE,GAAG,YAAY,IAAI,mBAAmB,QAAQ;YACrD,SAAS,EAAE,OAAO,CAAC,UAAU;YAC7B,YAAY;YACZ,oCAAoC;YACpC,+EAA+E;YAC/E,iFAAiF;SAClF,CAAC;QAEF,MAAM,UAAU,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;QAEhE,OAAO;YACL,aAAa,EAAE;gBACb,CAAC,mBAAmB,CAAC,EAAE,CAAC,YAAY,CAAC;aACtC;YACD,WAAW,EAAE;gBACX,CAAC,YAAY,CAAC,EAAE,UAAU;aAC3B;SACF,CAAC;IACJ,CAAC;IAED,eAAe;QACb,yCAAyC;QACzC,OAAO,QAAQ,CAAC;IAClB,CAAC;IAES,gBAAgB,CAAC,OAA0B;QACnD,oEAAoE;QACpE,MAAM,OAAO,GAAG,OAAO,CAAC,eAAe,IAAI,QAAQ,CAAC;QACpD,OAAO,GAAG,OAAO,CAAC,YAAY,IAAI,OAAO,IAAI,OAAO,CAAC,YAAY,IAAI,OAAO,CAAC,YAAY,MAAM,CAAC;IAClG,CAAC;CACF;AA9CD,kDA8CC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/plugins/kos-nx-plugin/src/generators/kos-component/plugin-handlers/factory.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/plugins/kos-nx-plugin/src/generators/kos-component/plugin-handlers/factory.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAWvC;;GAEG;AACH,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAYpB;IAEH,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,aAAa;IAiBxD,MAAM,CAAC,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;CAGhD"}
|
|
@@ -4,6 +4,7 @@ exports.PluginHandlerFactory = void 0;
|
|
|
4
4
|
const types_1 = require("../types");
|
|
5
5
|
const control_pour_handler_1 = require("./control-pour-handler");
|
|
6
6
|
const cui_handler_1 = require("./cui-handler");
|
|
7
|
+
const custom_handler_1 = require("./custom-handler");
|
|
7
8
|
const default_handler_1 = require("./default-handler");
|
|
8
9
|
const nav_handler_1 = require("./nav-handler");
|
|
9
10
|
const setting_handler_1 = require("./setting-handler");
|
|
@@ -22,6 +23,7 @@ class PluginHandlerFactory {
|
|
|
22
23
|
[types_1.PLUGIN_TYPES.NAV, nav_handler_1.NavPluginHandler],
|
|
23
24
|
[types_1.PLUGIN_TYPES.CONTROL_POUR, control_pour_handler_1.ControlPourPluginHandler],
|
|
24
25
|
[types_1.PLUGIN_TYPES.TROUBLE_ACTION, trouble_action_handler_1.TroubleActionPluginHandler],
|
|
26
|
+
[types_1.PLUGIN_TYPES.CUSTOM, custom_handler_1.CustomPluginHandler],
|
|
25
27
|
]);
|
|
26
28
|
static createHandler(pluginType) {
|
|
27
29
|
if (!pluginType) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory.js","sourceRoot":"","sources":["../../../../../../../../packages/plugins/kos-nx-plugin/src/generators/kos-component/plugin-handlers/factory.ts"],"names":[],"mappings":";;;AAAA,oCAAwC;AAExC,iEAAkE;AAClE,+CAAiD;AACjD,uDAA4D;AAC5D,+CAAiD;AACjD,uDAAyD;AACzD,mDAAqD;AACrD,qEAAsE;AACtE,uDAAyD;AAEzD;;GAEG;AACH,MAAa,oBAAoB;IACvB,MAAM,CAAC,QAAQ,GAAyC,IAAI,GAAG,CAGrE;QACA,CAAC,oBAAY,CAAC,GAAG,EAAE,8BAAgB,CAAC;QACpC,CAAC,oBAAY,CAAC,OAAO,EAAE,sCAAoB,CAAC;QAC5C,CAAC,oBAAY,CAAC,OAAO,EAAE,sCAAoB,CAAC;QAC5C,CAAC,oBAAY,CAAC,KAAK,EAAE,kCAAkB,CAAC;QACxC,CAAC,oBAAY,CAAC,GAAG,EAAE,8BAAgB,CAAC;QACpC,CAAC,oBAAY,CAAC,YAAY,EAAE,+CAAwB,CAAC;QACrD,CAAC,oBAAY,CAAC,cAAc,EAAE,mDAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"factory.js","sourceRoot":"","sources":["../../../../../../../../packages/plug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IACjC,CAAC;;AAlCH,oDAmCC"}
|
|
@@ -74,6 +74,10 @@
|
|
|
74
74
|
{
|
|
75
75
|
"value": "nav",
|
|
76
76
|
"label": "NAV"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"value": "custom",
|
|
80
|
+
"label": "Custom (with user-specified contribution key)"
|
|
77
81
|
}
|
|
78
82
|
]
|
|
79
83
|
}
|
|
@@ -82,6 +86,14 @@
|
|
|
82
86
|
"type": "string",
|
|
83
87
|
"description": "The settings group",
|
|
84
88
|
"default": ""
|
|
89
|
+
},
|
|
90
|
+
"contributionKey": {
|
|
91
|
+
"type": "string",
|
|
92
|
+
"description": "The contribution key for custom plugin type (e.g., the key in .kos.json where the plugin info will be added)",
|
|
93
|
+
"x-prompt": {
|
|
94
|
+
"message": "What contribution key should be used in .kos.json? (e.g., 'menus', 'panels', etc.)",
|
|
95
|
+
"type": "input"
|
|
96
|
+
}
|
|
85
97
|
}
|
|
86
98
|
},
|
|
87
99
|
"required": ["name", "appProject"]
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Note: The plugin project Storybook configuration requires that the Studio
|
|
3
3
|
* Simulator is running in order to retrieve model data...
|
|
4
4
|
*/
|
|
5
|
-
import { SettingStoryContainer } from "@kosdev-code/kos-ui-plugin
|
|
5
|
+
import { SettingStoryContainer } from "@kosdev-code/kos-ui-plugin-dev";
|
|
6
6
|
import type { Meta, StoryObj } from "@storybook/react";
|
|
7
7
|
import { <%= namePascalCase %> } from "./<%= nameDashCase %>";
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Note: The plugin project Storybook configuration requires that the Studio
|
|
3
3
|
* Simulator is running in order to retrieve model data...
|
|
4
4
|
*/
|
|
5
|
-
import { SetupStepStoryContainer } from "@kosdev-code/kos-ui-plugin
|
|
5
|
+
import { SetupStepStoryContainer } from "@kosdev-code/kos-ui-plugin-dev";
|
|
6
6
|
import type { Meta, StoryObj } from "@storybook/react";
|
|
7
7
|
import { <%= namePascalCase %> } from "./<%= nameDashCase %>";
|
|
8
8
|
|
package/src/generators/kos-component/trouble-action/__nameDashCase__.stories.tsx__template__
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Note: The plugin project Storybook configuration requires that the Studio
|
|
3
3
|
* Simulator is running in order to retrieve model data...
|
|
4
4
|
*/
|
|
5
|
-
import { UtilityStoryContainer } from "@kosdev-code/kos-ui-plugin
|
|
5
|
+
import { UtilityStoryContainer } from "@kosdev-code/kos-ui-plugin-dev";
|
|
6
6
|
import type { Meta, StoryObj } from "@storybook/react";
|
|
7
7
|
import { <%= namePascalCase %> } from "./<%= nameDashCase %>";
|
|
8
8
|
|