@bobbykim/manguito-cms-admin 0.4.0 → 0.4.2

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.
@@ -112,7 +112,7 @@ function renderField(field, indent) {
112
112
  return lines.join("\n");
113
113
  }
114
114
  function generateFormComponent(schema) {
115
- const { fields } = schema;
115
+ const fields = schema.fields.filter((f) => f.removed !== true);
116
116
  const neededComponents = /* @__PURE__ */ new Set();
117
117
  const paragraphRefs = [];
118
118
  const seenRefs = /* @__PURE__ */ new Set();
@@ -162,7 +162,9 @@ function generateFormComponent(schema) {
162
162
  for (const tab of schema.ui.tabs) {
163
163
  templateLines.push(` <Tab name="${escAttr(tab.name)}" label="${escAttr(tab.label)}">`);
164
164
  for (const fieldName of tab.fields) {
165
- templateLines.push(renderField(fieldByName.get(fieldName), " "));
165
+ const field = fieldByName.get(fieldName);
166
+ if (!field) continue;
167
+ templateLines.push(renderField(field, " "));
166
168
  }
167
169
  templateLines.push(" </Tab>");
168
170
  }
@@ -86,7 +86,7 @@ function renderField(field, indent) {
86
86
  return lines.join("\n");
87
87
  }
88
88
  function generateFormComponent(schema) {
89
- const { fields } = schema;
89
+ const fields = schema.fields.filter((f) => f.removed !== true);
90
90
  const neededComponents = /* @__PURE__ */ new Set();
91
91
  const paragraphRefs = [];
92
92
  const seenRefs = /* @__PURE__ */ new Set();
@@ -136,7 +136,9 @@ function generateFormComponent(schema) {
136
136
  for (const tab of schema.ui.tabs) {
137
137
  templateLines.push(` <Tab name="${escAttr(tab.name)}" label="${escAttr(tab.label)}">`);
138
138
  for (const fieldName of tab.fields) {
139
- templateLines.push(renderField(fieldByName.get(fieldName), " "));
139
+ const field = fieldByName.get(fieldName);
140
+ if (!field) continue;
141
+ templateLines.push(renderField(field, " "));
140
142
  }
141
143
  templateLines.push(" </Tab>");
142
144
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bobbykim/manguito-cms-admin",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "license": "MIT",
5
5
  "author": "Bobby Kim <bobby.sihun.kim@gmail.com>",
6
6
  "homepage": "https://github.com/bobbykim89/manguito-cms",
@@ -41,7 +41,7 @@
41
41
  "vite": "^8.1.3",
42
42
  "vue": "^3.5.39",
43
43
  "vue-router": "^4.6.4",
44
- "@bobbykim/manguito-cms-core": "0.3.0"
44
+ "@bobbykim/manguito-cms-core": "0.5.0"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@testing-library/vue": "^8.1.0",