@tailor-cms/ce-file-edit 2.0.0 → 2.0.1

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/index.cjs CHANGED
@@ -137,7 +137,7 @@ var TopToolbar_default = /* @__PURE__ */ (0, vue.defineComponent)({
137
137
  const EXTENSIONS = [];
138
138
  const props = __props;
139
139
  const emit = __emit;
140
- const onUpload = ({ url, publicUrl, name }) => {
140
+ const save = ({ url, publicUrl, name }) => {
141
141
  const assets = { url };
142
142
  emit("save", {
143
143
  ...props.element.data,
@@ -146,13 +146,6 @@ var TopToolbar_default = /* @__PURE__ */ (0, vue.defineComponent)({
146
146
  assets
147
147
  });
148
148
  };
149
- const onInput = (payload) => {
150
- if (!payload) return;
151
- emit("save", {
152
- ...props.element.data,
153
- url: payload.publicUrl
154
- });
155
- };
156
149
  const onDelete = () => {
157
150
  emit("save", {
158
151
  ...props.element.data,
@@ -168,8 +161,8 @@ var TopToolbar_default = /* @__PURE__ */ (0, vue.defineComponent)({
168
161
  class: "mx-auto",
169
162
  "allow-url-source": "",
170
163
  onDelete,
171
- onInput,
172
- onUpload
164
+ onInput: save,
165
+ onUpload: save
173
166
  }, null, 8, ["file-key"])]);
174
167
  };
175
168
  }
package/dist/index.js CHANGED
@@ -133,7 +133,7 @@ var TopToolbar_default = /* @__PURE__ */ defineComponent({
133
133
  const EXTENSIONS = [];
134
134
  const props = __props;
135
135
  const emit = __emit;
136
- const onUpload = ({ url, publicUrl, name }) => {
136
+ const save = ({ url, publicUrl, name }) => {
137
137
  const assets = { url };
138
138
  emit("save", {
139
139
  ...props.element.data,
@@ -142,13 +142,6 @@ var TopToolbar_default = /* @__PURE__ */ defineComponent({
142
142
  assets
143
143
  });
144
144
  };
145
- const onInput = (payload) => {
146
- if (!payload) return;
147
- emit("save", {
148
- ...props.element.data,
149
- url: payload.publicUrl
150
- });
151
- };
152
145
  const onDelete = () => {
153
146
  emit("save", {
154
147
  ...props.element.data,
@@ -164,8 +157,8 @@ var TopToolbar_default = /* @__PURE__ */ defineComponent({
164
157
  class: "mx-auto",
165
158
  "allow-url-source": "",
166
159
  onDelete,
167
- onInput,
168
- onUpload
160
+ onInput: save,
161
+ onUpload: save
169
162
  }, null, 8, ["file-key"])]);
170
163
  };
171
164
  }
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Tailor CMS file authoring component",
4
4
  "author": "Studion <info@gostudion.com> (https://github.com/tailor-cms)",
5
5
  "type": "module",
6
- "version": "2.0.0",
6
+ "version": "2.0.1",
7
7
  "exports": {
8
8
  ".": {
9
9
  "import": "./dist/index.js",
@@ -27,7 +27,7 @@
27
27
  "vite-plugin-lib-inject-css": "^2.2.2",
28
28
  "vue-tsc": "^3.2.7",
29
29
  "vuetify": "^4.0.6",
30
- "@tailor-cms/ce-file-manifest": "2.0.0"
30
+ "@tailor-cms/ce-file-manifest": "2.0.1"
31
31
  },
32
32
  "dependencies": {
33
33
  "@tailor-cms/cek-common": "2.0.1",