@tailor-cms/ce-brightcove-video-edit 0.0.1 → 0.0.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.
- package/dist/index.cjs +37 -78
- package/dist/index.js +37 -78
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -7,7 +7,11 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
7
7
|
const vue = require("vue");
|
|
8
8
|
var type = "BRIGHTCOVE_VIDEO";
|
|
9
9
|
var name = "Brightcove Video";
|
|
10
|
-
var initState = () => ({
|
|
10
|
+
var initState = () => ({
|
|
11
|
+
accountId: "",
|
|
12
|
+
playerId: "",
|
|
13
|
+
videoId: ""
|
|
14
|
+
});
|
|
11
15
|
var ui = {
|
|
12
16
|
// Display icon, https://pictogrammers.com/library/mdi/
|
|
13
17
|
icon: "mdi-video",
|
|
@@ -5504,14 +5508,13 @@ function requireIsEqual() {
|
|
|
5504
5508
|
if (hasRequiredIsEqual) return isEqual_1;
|
|
5505
5509
|
hasRequiredIsEqual = 1;
|
|
5506
5510
|
var baseIsEqual = require_baseIsEqual();
|
|
5507
|
-
function
|
|
5511
|
+
function isEqual(value, other) {
|
|
5508
5512
|
return baseIsEqual(value, other);
|
|
5509
5513
|
}
|
|
5510
|
-
isEqual_1 =
|
|
5514
|
+
isEqual_1 = isEqual;
|
|
5511
5515
|
return isEqual_1;
|
|
5512
5516
|
}
|
|
5513
|
-
|
|
5514
|
-
const isEqual = /* @__PURE__ */ getDefaultExportFromCjs(isEqualExports);
|
|
5517
|
+
requireIsEqual();
|
|
5515
5518
|
var last_1;
|
|
5516
5519
|
var hasRequiredLast;
|
|
5517
5520
|
function requireLast() {
|
|
@@ -18733,8 +18736,8 @@ Extension.create({
|
|
|
18733
18736
|
if (empty2 || !allWasSelected) {
|
|
18734
18737
|
return;
|
|
18735
18738
|
}
|
|
18736
|
-
const
|
|
18737
|
-
if (!
|
|
18739
|
+
const isEmpty = isNodeEmpty(newState.doc);
|
|
18740
|
+
if (!isEmpty) {
|
|
18738
18741
|
return;
|
|
18739
18742
|
}
|
|
18740
18743
|
const tr = newState.tr;
|
|
@@ -21216,7 +21219,7 @@ const _hoisted_1$2 = {
|
|
|
21216
21219
|
key: 0,
|
|
21217
21220
|
class: "text-grey-darken-2 text-subtitle-1"
|
|
21218
21221
|
};
|
|
21219
|
-
const _sfc_main$
|
|
21222
|
+
const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
21220
21223
|
__name: "ElementPlaceholder",
|
|
21221
21224
|
props: {
|
|
21222
21225
|
icon: {},
|
|
@@ -30040,7 +30043,7 @@ function requireLodash() {
|
|
|
30040
30043
|
function isElement(value) {
|
|
30041
30044
|
return isObjectLike(value) && value.nodeType === 1 && !isPlainObject2(value);
|
|
30042
30045
|
}
|
|
30043
|
-
function
|
|
30046
|
+
function isEmpty(value) {
|
|
30044
30047
|
if (value == null) {
|
|
30045
30048
|
return true;
|
|
30046
30049
|
}
|
|
@@ -30061,7 +30064,7 @@ function requireLodash() {
|
|
|
30061
30064
|
}
|
|
30062
30065
|
return true;
|
|
30063
30066
|
}
|
|
30064
|
-
function
|
|
30067
|
+
function isEqual(value, other) {
|
|
30065
30068
|
return baseIsEqual(value, other);
|
|
30066
30069
|
}
|
|
30067
30070
|
function isEqualWith(value, other, customizer) {
|
|
@@ -31173,8 +31176,8 @@ function requireLodash() {
|
|
|
31173
31176
|
lodash2.isBuffer = isBuffer2;
|
|
31174
31177
|
lodash2.isDate = isDate2;
|
|
31175
31178
|
lodash2.isElement = isElement;
|
|
31176
|
-
lodash2.isEmpty =
|
|
31177
|
-
lodash2.isEqual =
|
|
31179
|
+
lodash2.isEmpty = isEmpty;
|
|
31180
|
+
lodash2.isEqual = isEqual;
|
|
31178
31181
|
lodash2.isEqualWith = isEqualWith;
|
|
31179
31182
|
lodash2.isError = isError;
|
|
31180
31183
|
lodash2.isFinite = isFinite2;
|
|
@@ -31685,7 +31688,7 @@ function urlJoin() {
|
|
|
31685
31688
|
}
|
|
31686
31689
|
const _hoisted_1$1 = { class: "brightcove-player" };
|
|
31687
31690
|
const BASE_URL = "//players.brightcove.net/";
|
|
31688
|
-
const _sfc_main$
|
|
31691
|
+
const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
31689
31692
|
__name: "BrightcovePlayer",
|
|
31690
31693
|
props: {
|
|
31691
31694
|
accountId: {},
|
|
@@ -31824,9 +31827,9 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
31824
31827
|
};
|
|
31825
31828
|
}
|
|
31826
31829
|
});
|
|
31827
|
-
const BrightcovePlayer = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
31830
|
+
const BrightcovePlayer = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-dd41e47c"]]);
|
|
31828
31831
|
const _hoisted_1 = { class: "tce-video" };
|
|
31829
|
-
const _sfc_main$
|
|
31832
|
+
const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
31830
31833
|
__name: "Edit",
|
|
31831
31834
|
props: {
|
|
31832
31835
|
element: {},
|
|
@@ -31857,7 +31860,7 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
31857
31860
|
"player-id": config.value.playerId,
|
|
31858
31861
|
"video-id": config.value.videoId,
|
|
31859
31862
|
class: "player"
|
|
31860
|
-
}, null, 8, ["account-id", "player-id", "video-id"])) : (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$
|
|
31863
|
+
}, null, 8, ["account-id", "player-id", "video-id"])) : (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$3), {
|
|
31861
31864
|
key: 1,
|
|
31862
31865
|
icon: vue.unref(index_default).ui.icon,
|
|
31863
31866
|
"is-disabled": _ctx.isDisabled,
|
|
@@ -31870,57 +31873,7 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
31870
31873
|
};
|
|
31871
31874
|
}
|
|
31872
31875
|
});
|
|
31873
|
-
const Edit = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
31874
|
-
const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
31875
|
-
__name: "SideToolbar",
|
|
31876
|
-
props: {
|
|
31877
|
-
element: {}
|
|
31878
|
-
},
|
|
31879
|
-
emits: ["save"],
|
|
31880
|
-
setup(__props) {
|
|
31881
|
-
return (_ctx, _cache) => {
|
|
31882
|
-
var _a;
|
|
31883
|
-
return vue.openBlock(), vue.createElementBlock("div", null, [
|
|
31884
|
-
vue.createElementVNode("p", null, "Edit element side toolbar " + vue.toDisplayString((_a = _ctx.element) == null ? void 0 : _a.id), 1)
|
|
31885
|
-
]);
|
|
31886
|
-
};
|
|
31887
|
-
}
|
|
31888
|
-
});
|
|
31889
|
-
var isEmpty_1;
|
|
31890
|
-
var hasRequiredIsEmpty;
|
|
31891
|
-
function requireIsEmpty() {
|
|
31892
|
-
if (hasRequiredIsEmpty) return isEmpty_1;
|
|
31893
|
-
hasRequiredIsEmpty = 1;
|
|
31894
|
-
var baseKeys = require_baseKeys(), getTag = require_getTag(), isArguments = requireIsArguments(), isArray2 = requireIsArray(), isArrayLike = requireIsArrayLike(), isBuffer2 = requireIsBuffer(), isPrototype = require_isPrototype(), isTypedArray = requireIsTypedArray();
|
|
31895
|
-
var mapTag = "[object Map]", setTag = "[object Set]";
|
|
31896
|
-
var objectProto = Object.prototype;
|
|
31897
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
31898
|
-
function isEmpty2(value) {
|
|
31899
|
-
if (value == null) {
|
|
31900
|
-
return true;
|
|
31901
|
-
}
|
|
31902
|
-
if (isArrayLike(value) && (isArray2(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer2(value) || isTypedArray(value) || isArguments(value))) {
|
|
31903
|
-
return !value.length;
|
|
31904
|
-
}
|
|
31905
|
-
var tag = getTag(value);
|
|
31906
|
-
if (tag == mapTag || tag == setTag) {
|
|
31907
|
-
return !value.size;
|
|
31908
|
-
}
|
|
31909
|
-
if (isPrototype(value)) {
|
|
31910
|
-
return !baseKeys(value).length;
|
|
31911
|
-
}
|
|
31912
|
-
for (var key in value) {
|
|
31913
|
-
if (hasOwnProperty.call(value, key)) {
|
|
31914
|
-
return false;
|
|
31915
|
-
}
|
|
31916
|
-
}
|
|
31917
|
-
return true;
|
|
31918
|
-
}
|
|
31919
|
-
isEmpty_1 = isEmpty2;
|
|
31920
|
-
return isEmpty_1;
|
|
31921
|
-
}
|
|
31922
|
-
var isEmptyExports = requireIsEmpty();
|
|
31923
|
-
const isEmpty = /* @__PURE__ */ getDefaultExportFromCjs(isEmptyExports);
|
|
31876
|
+
const Edit = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-bdedb9a9"]]);
|
|
31924
31877
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
31925
31878
|
__name: "TopToolbar",
|
|
31926
31879
|
props: {
|
|
@@ -31934,9 +31887,15 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
31934
31887
|
const props2 = __props;
|
|
31935
31888
|
const emit2 = __emit;
|
|
31936
31889
|
const elementData = vue.reactive(cloneDeep(props2.element.data));
|
|
31937
|
-
const
|
|
31890
|
+
const isEmpty = vue.computed(
|
|
31891
|
+
() => !elementData.accountId || !elementData.playerId || !elementData.videoId
|
|
31892
|
+
);
|
|
31893
|
+
const isEditing = vue.ref(isEmpty.value);
|
|
31938
31894
|
const form = vue.ref();
|
|
31939
|
-
const isDirty = vue.computed(() =>
|
|
31895
|
+
const isDirty = vue.computed(() => {
|
|
31896
|
+
const { accountId, playerId, videoId } = props2.element.data;
|
|
31897
|
+
return accountId !== elementData.accountId || playerId !== elementData.playerId || videoId !== elementData.videoId;
|
|
31898
|
+
});
|
|
31940
31899
|
const save2 = async () => {
|
|
31941
31900
|
var _a;
|
|
31942
31901
|
const { valid } = await ((_a = form.value) == null ? void 0 : _a.validate());
|
|
@@ -31946,7 +31905,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
31946
31905
|
};
|
|
31947
31906
|
const cancel = () => {
|
|
31948
31907
|
var _a;
|
|
31949
|
-
|
|
31908
|
+
elementData.accountId = props2.element.data.accountId;
|
|
31909
|
+
elementData.playerId = props2.element.data.playerId;
|
|
31910
|
+
elementData.videoId = props2.element.data.videoId;
|
|
31950
31911
|
(_a = form.value) == null ? void 0 : _a.resetValidation();
|
|
31951
31912
|
isEditing.value = false;
|
|
31952
31913
|
};
|
|
@@ -31969,7 +31930,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
31969
31930
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => elementData.accountId = $event),
|
|
31970
31931
|
disabled: !isEditing.value,
|
|
31971
31932
|
rules: [rules.required],
|
|
31972
|
-
class: "required
|
|
31933
|
+
class: "required",
|
|
31973
31934
|
"hide-details": "auto",
|
|
31974
31935
|
label: "Account Id",
|
|
31975
31936
|
"min-width": "150",
|
|
@@ -31980,10 +31941,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
31980
31941
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => elementData.playerId = $event),
|
|
31981
31942
|
disabled: !isEditing.value,
|
|
31982
31943
|
rules: [rules.required],
|
|
31983
|
-
class: "required
|
|
31944
|
+
class: "required",
|
|
31984
31945
|
"hide-details": "auto",
|
|
31985
31946
|
label: "Player Id",
|
|
31986
|
-
"min-width": "
|
|
31947
|
+
"min-width": "150",
|
|
31987
31948
|
variant: "outlined"
|
|
31988
31949
|
}, null, 8, ["modelValue", "disabled", "rules"]),
|
|
31989
31950
|
vue.createVNode(_component_VTextField, {
|
|
@@ -31991,7 +31952,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
31991
31952
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => elementData.videoId = $event),
|
|
31992
31953
|
disabled: !isEditing.value,
|
|
31993
31954
|
rules: [rules.required],
|
|
31994
|
-
class: "required
|
|
31955
|
+
class: "required",
|
|
31995
31956
|
"hide-details": "auto",
|
|
31996
31957
|
label: "Video Id",
|
|
31997
31958
|
"min-width": "150",
|
|
@@ -32015,12 +31976,12 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
32015
31976
|
])),
|
|
32016
31977
|
_: 1
|
|
32017
31978
|
})) : vue.createCommentVNode("", true),
|
|
32018
|
-
isDirty.value || !
|
|
31979
|
+
isDirty.value || !isEmpty.value ? (vue.openBlock(), vue.createBlock(_component_VBtn, {
|
|
32019
31980
|
key: 1,
|
|
32020
31981
|
onClick: cancel
|
|
32021
31982
|
}, {
|
|
32022
31983
|
default: vue.withCtx(() => _cache[6] || (_cache[6] = [
|
|
32023
|
-
vue.createTextVNode("
|
|
31984
|
+
vue.createTextVNode("Cancel")
|
|
32024
31985
|
])),
|
|
32025
31986
|
_: 1
|
|
32026
31987
|
})) : vue.createCommentVNode("", true)
|
|
@@ -32037,10 +31998,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
32037
31998
|
const manifest = {
|
|
32038
31999
|
...index_default,
|
|
32039
32000
|
Edit,
|
|
32040
|
-
SideToolbar: _sfc_main$1,
|
|
32041
32001
|
TopToolbar: _sfc_main
|
|
32042
32002
|
};
|
|
32043
32003
|
exports.Edit = Edit;
|
|
32044
|
-
exports.SideToolbar = _sfc_main$1;
|
|
32045
32004
|
exports.TopToolbar = _sfc_main;
|
|
32046
32005
|
exports.default = manifest;
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,11 @@ import "./index.css";
|
|
|
5
5
|
import { inject, resolveComponent, TransitionGroup, defineComponent, nextTick, h, ref, watch, createElementBlock, createCommentVNode, openBlock, Fragment as Fragment$1, createBlock, unref, withCtx, createVNode, createTextVNode, toDisplayString, computed, normalizeClass, createElementVNode, onMounted, onBeforeUnmount, withDirectives, vShow, reactive, withModifiers } from "vue";
|
|
6
6
|
var type = "BRIGHTCOVE_VIDEO";
|
|
7
7
|
var name = "Brightcove Video";
|
|
8
|
-
var initState = () => ({
|
|
8
|
+
var initState = () => ({
|
|
9
|
+
accountId: "",
|
|
10
|
+
playerId: "",
|
|
11
|
+
videoId: ""
|
|
12
|
+
});
|
|
9
13
|
var ui = {
|
|
10
14
|
// Display icon, https://pictogrammers.com/library/mdi/
|
|
11
15
|
icon: "mdi-video",
|
|
@@ -5502,14 +5506,13 @@ function requireIsEqual() {
|
|
|
5502
5506
|
if (hasRequiredIsEqual) return isEqual_1;
|
|
5503
5507
|
hasRequiredIsEqual = 1;
|
|
5504
5508
|
var baseIsEqual = require_baseIsEqual();
|
|
5505
|
-
function
|
|
5509
|
+
function isEqual(value, other) {
|
|
5506
5510
|
return baseIsEqual(value, other);
|
|
5507
5511
|
}
|
|
5508
|
-
isEqual_1 =
|
|
5512
|
+
isEqual_1 = isEqual;
|
|
5509
5513
|
return isEqual_1;
|
|
5510
5514
|
}
|
|
5511
|
-
|
|
5512
|
-
const isEqual = /* @__PURE__ */ getDefaultExportFromCjs(isEqualExports);
|
|
5515
|
+
requireIsEqual();
|
|
5513
5516
|
var last_1;
|
|
5514
5517
|
var hasRequiredLast;
|
|
5515
5518
|
function requireLast() {
|
|
@@ -18731,8 +18734,8 @@ Extension.create({
|
|
|
18731
18734
|
if (empty2 || !allWasSelected) {
|
|
18732
18735
|
return;
|
|
18733
18736
|
}
|
|
18734
|
-
const
|
|
18735
|
-
if (!
|
|
18737
|
+
const isEmpty = isNodeEmpty(newState.doc);
|
|
18738
|
+
if (!isEmpty) {
|
|
18736
18739
|
return;
|
|
18737
18740
|
}
|
|
18738
18741
|
const tr = newState.tr;
|
|
@@ -21214,7 +21217,7 @@ const _hoisted_1$2 = {
|
|
|
21214
21217
|
key: 0,
|
|
21215
21218
|
class: "text-grey-darken-2 text-subtitle-1"
|
|
21216
21219
|
};
|
|
21217
|
-
const _sfc_main$
|
|
21220
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
21218
21221
|
__name: "ElementPlaceholder",
|
|
21219
21222
|
props: {
|
|
21220
21223
|
icon: {},
|
|
@@ -30038,7 +30041,7 @@ function requireLodash() {
|
|
|
30038
30041
|
function isElement(value) {
|
|
30039
30042
|
return isObjectLike(value) && value.nodeType === 1 && !isPlainObject2(value);
|
|
30040
30043
|
}
|
|
30041
|
-
function
|
|
30044
|
+
function isEmpty(value) {
|
|
30042
30045
|
if (value == null) {
|
|
30043
30046
|
return true;
|
|
30044
30047
|
}
|
|
@@ -30059,7 +30062,7 @@ function requireLodash() {
|
|
|
30059
30062
|
}
|
|
30060
30063
|
return true;
|
|
30061
30064
|
}
|
|
30062
|
-
function
|
|
30065
|
+
function isEqual(value, other) {
|
|
30063
30066
|
return baseIsEqual(value, other);
|
|
30064
30067
|
}
|
|
30065
30068
|
function isEqualWith(value, other, customizer) {
|
|
@@ -31171,8 +31174,8 @@ function requireLodash() {
|
|
|
31171
31174
|
lodash2.isBuffer = isBuffer2;
|
|
31172
31175
|
lodash2.isDate = isDate2;
|
|
31173
31176
|
lodash2.isElement = isElement;
|
|
31174
|
-
lodash2.isEmpty =
|
|
31175
|
-
lodash2.isEqual =
|
|
31177
|
+
lodash2.isEmpty = isEmpty;
|
|
31178
|
+
lodash2.isEqual = isEqual;
|
|
31176
31179
|
lodash2.isEqualWith = isEqualWith;
|
|
31177
31180
|
lodash2.isError = isError;
|
|
31178
31181
|
lodash2.isFinite = isFinite2;
|
|
@@ -31683,7 +31686,7 @@ function urlJoin() {
|
|
|
31683
31686
|
}
|
|
31684
31687
|
const _hoisted_1$1 = { class: "brightcove-player" };
|
|
31685
31688
|
const BASE_URL = "//players.brightcove.net/";
|
|
31686
|
-
const _sfc_main$
|
|
31689
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
31687
31690
|
__name: "BrightcovePlayer",
|
|
31688
31691
|
props: {
|
|
31689
31692
|
accountId: {},
|
|
@@ -31822,9 +31825,9 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
31822
31825
|
};
|
|
31823
31826
|
}
|
|
31824
31827
|
});
|
|
31825
|
-
const BrightcovePlayer = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
31828
|
+
const BrightcovePlayer = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-dd41e47c"]]);
|
|
31826
31829
|
const _hoisted_1 = { class: "tce-video" };
|
|
31827
|
-
const _sfc_main$
|
|
31830
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
31828
31831
|
__name: "Edit",
|
|
31829
31832
|
props: {
|
|
31830
31833
|
element: {},
|
|
@@ -31855,7 +31858,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
31855
31858
|
"player-id": config.value.playerId,
|
|
31856
31859
|
"video-id": config.value.videoId,
|
|
31857
31860
|
class: "player"
|
|
31858
|
-
}, null, 8, ["account-id", "player-id", "video-id"])) : (openBlock(), createBlock(unref(_sfc_main$
|
|
31861
|
+
}, null, 8, ["account-id", "player-id", "video-id"])) : (openBlock(), createBlock(unref(_sfc_main$3), {
|
|
31859
31862
|
key: 1,
|
|
31860
31863
|
icon: unref(index_default).ui.icon,
|
|
31861
31864
|
"is-disabled": _ctx.isDisabled,
|
|
@@ -31868,57 +31871,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
31868
31871
|
};
|
|
31869
31872
|
}
|
|
31870
31873
|
});
|
|
31871
|
-
const Edit = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
31872
|
-
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
31873
|
-
__name: "SideToolbar",
|
|
31874
|
-
props: {
|
|
31875
|
-
element: {}
|
|
31876
|
-
},
|
|
31877
|
-
emits: ["save"],
|
|
31878
|
-
setup(__props) {
|
|
31879
|
-
return (_ctx, _cache) => {
|
|
31880
|
-
var _a;
|
|
31881
|
-
return openBlock(), createElementBlock("div", null, [
|
|
31882
|
-
createElementVNode("p", null, "Edit element side toolbar " + toDisplayString((_a = _ctx.element) == null ? void 0 : _a.id), 1)
|
|
31883
|
-
]);
|
|
31884
|
-
};
|
|
31885
|
-
}
|
|
31886
|
-
});
|
|
31887
|
-
var isEmpty_1;
|
|
31888
|
-
var hasRequiredIsEmpty;
|
|
31889
|
-
function requireIsEmpty() {
|
|
31890
|
-
if (hasRequiredIsEmpty) return isEmpty_1;
|
|
31891
|
-
hasRequiredIsEmpty = 1;
|
|
31892
|
-
var baseKeys = require_baseKeys(), getTag = require_getTag(), isArguments = requireIsArguments(), isArray2 = requireIsArray(), isArrayLike = requireIsArrayLike(), isBuffer2 = requireIsBuffer(), isPrototype = require_isPrototype(), isTypedArray = requireIsTypedArray();
|
|
31893
|
-
var mapTag = "[object Map]", setTag = "[object Set]";
|
|
31894
|
-
var objectProto = Object.prototype;
|
|
31895
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
31896
|
-
function isEmpty2(value) {
|
|
31897
|
-
if (value == null) {
|
|
31898
|
-
return true;
|
|
31899
|
-
}
|
|
31900
|
-
if (isArrayLike(value) && (isArray2(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer2(value) || isTypedArray(value) || isArguments(value))) {
|
|
31901
|
-
return !value.length;
|
|
31902
|
-
}
|
|
31903
|
-
var tag = getTag(value);
|
|
31904
|
-
if (tag == mapTag || tag == setTag) {
|
|
31905
|
-
return !value.size;
|
|
31906
|
-
}
|
|
31907
|
-
if (isPrototype(value)) {
|
|
31908
|
-
return !baseKeys(value).length;
|
|
31909
|
-
}
|
|
31910
|
-
for (var key in value) {
|
|
31911
|
-
if (hasOwnProperty.call(value, key)) {
|
|
31912
|
-
return false;
|
|
31913
|
-
}
|
|
31914
|
-
}
|
|
31915
|
-
return true;
|
|
31916
|
-
}
|
|
31917
|
-
isEmpty_1 = isEmpty2;
|
|
31918
|
-
return isEmpty_1;
|
|
31919
|
-
}
|
|
31920
|
-
var isEmptyExports = requireIsEmpty();
|
|
31921
|
-
const isEmpty = /* @__PURE__ */ getDefaultExportFromCjs(isEmptyExports);
|
|
31874
|
+
const Edit = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-bdedb9a9"]]);
|
|
31922
31875
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
31923
31876
|
__name: "TopToolbar",
|
|
31924
31877
|
props: {
|
|
@@ -31932,9 +31885,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
31932
31885
|
const props2 = __props;
|
|
31933
31886
|
const emit2 = __emit;
|
|
31934
31887
|
const elementData = reactive(cloneDeep(props2.element.data));
|
|
31935
|
-
const
|
|
31888
|
+
const isEmpty = computed(
|
|
31889
|
+
() => !elementData.accountId || !elementData.playerId || !elementData.videoId
|
|
31890
|
+
);
|
|
31891
|
+
const isEditing = ref(isEmpty.value);
|
|
31936
31892
|
const form = ref();
|
|
31937
|
-
const isDirty = computed(() =>
|
|
31893
|
+
const isDirty = computed(() => {
|
|
31894
|
+
const { accountId, playerId, videoId } = props2.element.data;
|
|
31895
|
+
return accountId !== elementData.accountId || playerId !== elementData.playerId || videoId !== elementData.videoId;
|
|
31896
|
+
});
|
|
31938
31897
|
const save2 = async () => {
|
|
31939
31898
|
var _a;
|
|
31940
31899
|
const { valid } = await ((_a = form.value) == null ? void 0 : _a.validate());
|
|
@@ -31944,7 +31903,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
31944
31903
|
};
|
|
31945
31904
|
const cancel = () => {
|
|
31946
31905
|
var _a;
|
|
31947
|
-
|
|
31906
|
+
elementData.accountId = props2.element.data.accountId;
|
|
31907
|
+
elementData.playerId = props2.element.data.playerId;
|
|
31908
|
+
elementData.videoId = props2.element.data.videoId;
|
|
31948
31909
|
(_a = form.value) == null ? void 0 : _a.resetValidation();
|
|
31949
31910
|
isEditing.value = false;
|
|
31950
31911
|
};
|
|
@@ -31967,7 +31928,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
31967
31928
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => elementData.accountId = $event),
|
|
31968
31929
|
disabled: !isEditing.value,
|
|
31969
31930
|
rules: [rules.required],
|
|
31970
|
-
class: "required
|
|
31931
|
+
class: "required",
|
|
31971
31932
|
"hide-details": "auto",
|
|
31972
31933
|
label: "Account Id",
|
|
31973
31934
|
"min-width": "150",
|
|
@@ -31978,10 +31939,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
31978
31939
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => elementData.playerId = $event),
|
|
31979
31940
|
disabled: !isEditing.value,
|
|
31980
31941
|
rules: [rules.required],
|
|
31981
|
-
class: "required
|
|
31942
|
+
class: "required",
|
|
31982
31943
|
"hide-details": "auto",
|
|
31983
31944
|
label: "Player Id",
|
|
31984
|
-
"min-width": "
|
|
31945
|
+
"min-width": "150",
|
|
31985
31946
|
variant: "outlined"
|
|
31986
31947
|
}, null, 8, ["modelValue", "disabled", "rules"]),
|
|
31987
31948
|
createVNode(_component_VTextField, {
|
|
@@ -31989,7 +31950,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
31989
31950
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => elementData.videoId = $event),
|
|
31990
31951
|
disabled: !isEditing.value,
|
|
31991
31952
|
rules: [rules.required],
|
|
31992
|
-
class: "required
|
|
31953
|
+
class: "required",
|
|
31993
31954
|
"hide-details": "auto",
|
|
31994
31955
|
label: "Video Id",
|
|
31995
31956
|
"min-width": "150",
|
|
@@ -32013,12 +31974,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
32013
31974
|
])),
|
|
32014
31975
|
_: 1
|
|
32015
31976
|
})) : createCommentVNode("", true),
|
|
32016
|
-
isDirty.value || !
|
|
31977
|
+
isDirty.value || !isEmpty.value ? (openBlock(), createBlock(_component_VBtn, {
|
|
32017
31978
|
key: 1,
|
|
32018
31979
|
onClick: cancel
|
|
32019
31980
|
}, {
|
|
32020
31981
|
default: withCtx(() => _cache[6] || (_cache[6] = [
|
|
32021
|
-
createTextVNode("
|
|
31982
|
+
createTextVNode("Cancel")
|
|
32022
31983
|
])),
|
|
32023
31984
|
_: 1
|
|
32024
31985
|
})) : createCommentVNode("", true)
|
|
@@ -32035,12 +31996,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
32035
31996
|
const manifest = {
|
|
32036
31997
|
...index_default,
|
|
32037
31998
|
Edit,
|
|
32038
|
-
SideToolbar: _sfc_main$1,
|
|
32039
31999
|
TopToolbar: _sfc_main
|
|
32040
32000
|
};
|
|
32041
32001
|
export {
|
|
32042
32002
|
Edit,
|
|
32043
|
-
_sfc_main$1 as SideToolbar,
|
|
32044
32003
|
_sfc_main as TopToolbar,
|
|
32045
32004
|
manifest as default
|
|
32046
32005
|
};
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Tailor CMS Brightcove video authoring component",
|
|
4
4
|
"author": "Studion <info@gostudion.com> (https://github.com/tailor-cms)",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"version": "0.0.
|
|
6
|
+
"version": "0.0.2",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": {
|
|
9
9
|
"import": "./dist/index.js",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"typescript": "^5.7.3",
|
|
25
25
|
"vite": "^6.1.0",
|
|
26
26
|
"vue-tsc": "^2.2.0",
|
|
27
|
-
"@tailor-cms/ce-brightcove-video-manifest": "0.0.
|
|
27
|
+
"@tailor-cms/ce-brightcove-video-manifest": "0.0.2"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@tailor-cms/core-components": "^1.0.26",
|