@omnia/tooling-vue 8.0.240-dev → 8.0.242-dev

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.
@@ -292,6 +292,7 @@ import wc6b7f04ba8fc4487ea496dd8e42b55dbd from '../../../../client/fx/ux/oxide/s
292
292
  import wc170e15fd849e41568ed9b48f88711527 from '../../../../client/fx/ux/oxide/splitpane/SplitpaneItem';
293
293
  import wc7cc2d4feecde4174badc5797ba6fb53e from '../../../../client/fx/ux/oxide/stepper/Stepper';
294
294
  import wca8c8ffd3d8ff46ee969d8fb6b9522104 from '../../../../client/fx/ux/oxide/stepper/StepperStep';
295
+ import wcfeb57f2e8a1e4cd1b7a59043738bf5e8 from '../../../../client/fx/ux/oxide/stickycontainer/StickyContainer';
295
296
  import wc31cc47b19e7d4c40b826f58d1c955a43 from '../../../../client/fx/ux/oxide/switch/Switch';
296
297
  import wc7345c491927b43438d9f5e14f51fbfad from '../../../../client/fx/ux/oxide/tab/Tabs';
297
298
  import wc8669930d609c497e8cde0c554621db88 from '../../../../client/fx/ux/oxide/tab/Tab';
@@ -1413,6 +1414,9 @@ declare global {
1413
1414
  "o-stepper-step": typeof wca8c8ffd3d8ff46ee969d8fb6b9522104 extends {
1414
1415
  propsDefinition: infer TProp;
1415
1416
  } ? (TProp & Omit<VueComponentBaseProps, keyof TProp>) : typeof wca8c8ffd3d8ff46ee969d8fb6b9522104 extends (...args: any[]) => any ? ExtractJsxProps<Pick<ReturnType<typeof wca8c8ffd3d8ff46ee969d8fb6b9522104>, "propsDefinition">> : never;
1417
+ "o-sticky-container": typeof wcfeb57f2e8a1e4cd1b7a59043738bf5e8 extends {
1418
+ propsDefinition: infer TProp;
1419
+ } ? (TProp & Omit<VueComponentBaseProps, keyof TProp>) : typeof wcfeb57f2e8a1e4cd1b7a59043738bf5e8 extends (...args: any[]) => any ? ExtractJsxProps<Pick<ReturnType<typeof wcfeb57f2e8a1e4cd1b7a59043738bf5e8>, "propsDefinition">> : never;
1416
1420
  "o-switch": typeof wc31cc47b19e7d4c40b826f58d1c955a43 extends {
1417
1421
  propsDefinition: infer TProp;
1418
1422
  } ? (TProp & Omit<VueComponentBaseProps, keyof TProp>) : typeof wc31cc47b19e7d4c40b826f58d1c955a43 extends (...args: any[]) => any ? ExtractJsxProps<Pick<ReturnType<typeof wc31cc47b19e7d4c40b826f58d1c955a43>, "propsDefinition">> : never;
@@ -6507,6 +6511,15 @@ declare global {
6507
6511
  $props: TProp & Omit<VueComponentBaseProps, keyof TProp>;
6508
6512
  };
6509
6513
  } : typeof wc7cc2d4feecde4174badc5797ba6fb53e;
6514
+ "sticky": {
6515
+ "container": typeof wcfeb57f2e8a1e4cd1b7a59043738bf5e8 extends {
6516
+ propsDefinition: infer TProp;
6517
+ } ? {
6518
+ new (...args: any[]): {
6519
+ $props: TProp & Omit<VueComponentBaseProps, keyof TProp>;
6520
+ };
6521
+ } : typeof wcfeb57f2e8a1e4cd1b7a59043738bf5e8;
6522
+ };
6510
6523
  "switch": typeof wc31cc47b19e7d4c40b826f58d1c955a43 extends {
6511
6524
  propsDefinition: infer TProp;
6512
6525
  } ? {
@@ -18,6 +18,7 @@ type ComponentPropInfo = {
18
18
  description?: string;
19
19
  required?: boolean;
20
20
  defaultValue?: any;
21
+ disableAutoEmit?: boolean;
21
22
  };
22
23
  type ComponentInfo = {
23
24
  functionSignature?: boolean;
@@ -201,12 +201,27 @@ function extractTypes(types, componentInfo) {
201
201
  // if(!type)console.log(filePath, name, params[1])
202
202
  const required = params.length > 2 ? extractTypeValue(params[2]) : false;
203
203
  const defaultValue = params.length > 3 ? extractTypeValue(params[3], true) : undefined;
204
- const description = params.length > 4 ? extractTypeValue(params[4]) : "";
204
+ let disableAutoEmit = false;
205
+ let description = "";
206
+ if (typeName === "DefineVModel") {
207
+ disableAutoEmit = params.length > 4 ? extractTypeValue(params[4]) : false;
208
+ description = params.length > 5 ? extractTypeValue(params[5]) : "";
209
+ }
210
+ else if (typeName === "DefineProp" && params.length > 4) {
211
+ description = extractTypeValue(params[4]);
212
+ }
205
213
  const info = {
206
214
  type: type,
207
- description: description,
208
- required: required.toString().toLowerCase() === "true" ? true : false
209
215
  };
216
+ if (description.length > 0) {
217
+ info.description = description;
218
+ }
219
+ if (required.toString().toLowerCase() === "true") {
220
+ info.required = true;
221
+ }
222
+ if (disableAutoEmit.toString().toLowerCase() === "true") {
223
+ info.disableAutoEmit = true;
224
+ }
210
225
  if (defaultValue !== undefined && defaultValue !== "null") {
211
226
  info.defaultValue = defaultValue;
212
227
  }
@@ -217,25 +232,22 @@ function extractTypes(types, componentInfo) {
217
232
  componentInfo.props[name] = info;
218
233
  }
219
234
  }
220
- else if (typeName === "DefineEmit") {
235
+ else if (typeName === "DefineEmit" || typeName === "DefineSlot") {
221
236
  const params = t.typeParams.params;
222
237
  const name = extractTypeValue(params[0]);
223
238
  const type = extractTypeValue(params[1]);
224
- const description = params.length > 2 ? extractTypeValue(params[2]) : "";
225
- componentInfo.emits[name] = {
226
- type: type,
227
- description: description,
228
- };
229
- }
230
- else if (typeName === "DefineSlot") {
231
- const params = t.typeParams.params;
232
- const name = extractTypeValue(params[0]);
233
- const type = extractTypeValue(params[1]);
234
- const description = params.length > 2 ? extractTypeValue(params[2]) : "";
235
- componentInfo.slots[name] = {
236
- type: type,
237
- description: description,
238
- };
239
+ const info = typeName === "DefineEmit" ? componentInfo.emits : componentInfo.slots;
240
+ if (params.length > 2) {
241
+ info[name] = {
242
+ type: type,
243
+ description: extractTypeValue(params[2]),
244
+ };
245
+ }
246
+ else {
247
+ info[name] = {
248
+ type: type
249
+ };
250
+ }
239
251
  }
240
252
  });
241
253
  }
@@ -253,7 +265,15 @@ function convertComponentOptionsToString(component) {
253
265
  result = `${result} ${name}:${component.props[name].defaultValue !== undefined && component.props[name].defaultValue !== "null" ? `{default: ${component.props[name].defaultValue}},` : "{},"}`;
254
266
  });
255
267
  Object.keys(component.models).forEach(name => {
256
- result = `${result} ${name}:${component.models[name].defaultValue !== undefined && component.models[name].defaultValue !== "null" ? `{default: ${component.models[name].defaultValue}},` : "{},"}`;
268
+ let propResult = "{";
269
+ if (component.models[name].defaultValue !== undefined && component.models[name].defaultValue !== "null") {
270
+ propResult = `${propResult}default: ${component.models[name].defaultValue},`;
271
+ }
272
+ if (component.models[name].disableAutoEmit) {
273
+ propResult = `${propResult}disableAutoEmit: true,`;
274
+ }
275
+ propResult = `${propResult}},`;
276
+ result = `${result} ${name}:${propResult}`;
257
277
  });
258
278
  return result;
259
279
  }