okai 0.0.37 → 0.0.38

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/dist/icons.js CHANGED
@@ -173,7 +173,7 @@ export const IconMap = {
173
173
  Email: S('0 0 24 24', `<path fill='currentColor' d='M22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2zm-2 0l-8 5l-8-5zm0 12H4V8l8 5l8-5z'/>`),
174
174
  News: S('0 0 20 20', `<path fill='currentColor' d='M3 6c0-1.1.9-2 2-2h8l4-4h2v16h-2l-4-4H5a2 2 0 0 1-2-2H1V6zm8 9v5H8l-1.67-5H5v-2h8v2z'/>`),
175
175
  Search: S('0 0 24 24', `<path fill='currentColor' d='m19.6 21l-6.3-6.3q-.75.6-1.725.95T9.5 16q-2.725 0-4.612-1.888T3 9.5t1.888-4.612T9.5 3t4.613 1.888T16 9.5q0 1.1-.35 2.075T14.7 13.3l6.3 6.3zM9.5 14q1.875 0 3.188-1.312T14 9.5t-1.312-3.187T9.5 5T6.313 6.313T5 9.5t1.313 3.188T9.5 14'/>`),
176
- Save: S('0 0 24 24', `<path fill='currentColor' d='M7 19v-6h10v6h2V7.828L16.172 5H5v14zM4 3h13l4 4v13a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1m5 12v4h6v-4z'/></`),
176
+ Save: S('0 0 24 24', `<path fill='currentColor' d='M7 19v-6h10v6h2V7.828L16.172 5H5v14zM4 3h13l4 4v13a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1m5 12v4h6v-4z'/>`),
177
177
  /** Formatting */
178
178
  PlainText: S(`0 0 256 256`, `<path fill='currentColor' d='M212 56v32a12 12 0 0 1-24 0V68h-48v120h20a12 12 0 0 1 0 24H96a12 12 0 0 1 0-24h20V68H68v20a12 12 0 0 1-24 0V56a12 12 0 0 1 12-12h144a12 12 0 0 1 12 12Z'/>`),
179
179
  Markup: S(`0 0 24 24`, `<path fill='currentColor' d='M10 20q-.425 0-.713-.288T9 19v-5q-2.075 0-3.538-1.463T4 9q0-2.075 1.463-3.538T9 4h8q.425 0 .713.288T18 5q0 .425-.288.713T17 6h-1v13q0 .425-.288.713T15 20q-.425 0-.713-.288T14 19V6h-3v13q0 .425-.288.713T10 20Z'/>`),
package/dist/ui-mjs.js CHANGED
@@ -34,12 +34,24 @@ export class UiMjsGroupGenerator {
34
34
  ` group: "${groupLabel}",`,
35
35
  ` items: {`,
36
36
  ...ast.types.filter(x => !x.isEnum && !x.isInterface && !this.ignore.includes(x.name)).map(x => {
37
+ const template = x.inherits?.name == 'AuditBase' ? [
38
+ `<AutoQueryGrid :type="type"`,
39
+ ` selected-columns="${x.properties.map(x => toCamelCase(x.name)).join(',')}">`,
40
+ ` <template #formfooter="{ form, type, apis, model, id }">`,
41
+ ` <AuditEvents v-if="form === 'edit'" class="mt-4" :key="id" :type="type" :id="id" />`,
42
+ ` </template>`,
43
+ `</AutoQueryGrid>`
44
+ ] : [
45
+ `<AutoQueryGrid :type="type"`,
46
+ ` selected-columns="${x.properties.map(x => toCamelCase(x.name)).join(',')}" />`,
47
+ ];
37
48
  return [
38
49
  ` ${plural(x.name)}: {`,
39
50
  ` type: '${x.name}',`,
40
51
  ` component: {`,
41
- ` template:\`<AutoQueryGrid :type="type"`,
42
- ` selected-columns="${x.properties.map(x => toCamelCase(x.name)).join(',')}" />\`,`,
52
+ ` template:\``,
53
+ ...template.map(x => ` ${x}`),
54
+ ` \`,`,
43
55
  ` },`,
44
56
  ` },`,
45
57
  ].join('\n');
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "okai",
3
3
  "type": "module",
4
- "version": "0.0.37",
4
+ "version": "0.0.38",
5
5
  "bin": "./dist/okai.js",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",