@g1cloud/bluesea 5.0.0-beta.20 → 5.0.0-beta.22
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/{BSAlertModal-bXdRoQ4g.js → BSAlertModal-wZOms7hW.js} +1 -1
- package/dist/{BSGridColumnSettingModal-CnqefrIo.js → BSGridColumnSettingModal-QPbpMQD6.js} +1 -1
- package/dist/{BSRichTextMaximizedModal-Dc9sFpvh.js → BSRichTextMaximizedModal-zAuDLWZd.js} +1 -1
- package/dist/{BSYesNoModal-nTiw15vA.js → BSYesNoModal-sAn7m746.js} +1 -1
- package/dist/{BSYoutubeInputModal-DN55K-10.js → BSYoutubeInputModal-D2QX8vj7.js} +7 -2
- package/dist/{ImageInsertModal-999e_ass.js → ImageInsertModal-BI_tnz7L.js} +2 -2
- package/dist/{ImageProperties.vue_vue_type_script_setup_true_lang-Dk8Skxl0.js → ImageProperties.vue_vue_type_script_setup_true_lang-DV4Vgrxv.js} +1 -1
- package/dist/{ImagePropertiesModal-D6g2ZYpb.js → ImagePropertiesModal-3uMlK2_q.js} +2 -2
- package/dist/{LinkPropertiesModal-DUAsPJ5g.js → LinkPropertiesModal-qGuRtYdw.js} +1 -1
- package/dist/{TableInsertModal-DuK1nGxQ.js → TableInsertModal-DC5_KXTz.js} +1 -1
- package/dist/{TablePropertiesModal-Dn_ozHTt.js → TablePropertiesModal-CdyjtqBn.js} +1 -1
- package/dist/{VideoInsertModal-CjB8Vfny.js → VideoInsertModal-Cy7RPYNi.js} +2 -2
- package/dist/{VideoProperties.vue_vue_type_script_setup_true_lang-C41jIi69.js → VideoProperties.vue_vue_type_script_setup_true_lang-VdRfL7XC.js} +1 -1
- package/dist/{VideoPropertiesModal-CZyluT1C.js → VideoPropertiesModal-hhs0LT1m.js} +2 -2
- package/dist/{YoutubeInsertModal-C3VKZ3MM.js → YoutubeInsertModal-e5QVFl-I.js} +2 -2
- package/dist/{YoutubeProperties.vue_vue_type_script_setup_true_lang-D5zcnp25.js → YoutubeProperties.vue_vue_type_script_setup_true_lang-TOzUqs-D.js} +1 -1
- package/dist/{YoutubePropertiesModal-VGbyMXuR.js → YoutubePropertiesModal-CtMeo1sr.js} +2 -2
- package/dist/bluesea.js +218 -216
- package/dist/bluesea.umd.cjs +29 -9
- package/dist/component/input/BSPriceInput.vue.d.ts +2 -0
- package/dist/component/input/ImageUploadModel.d.ts +2 -0
- package/dist/{index-uI4FYMrx.js → index-C0RkF03d.js} +261 -246
- package/package.json +1 -1
package/dist/bluesea.umd.cjs
CHANGED
|
@@ -3558,6 +3558,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
3558
3558
|
modelValue: {},
|
|
3559
3559
|
currency: {},
|
|
3560
3560
|
prefix: { type: Boolean },
|
|
3561
|
+
suffix: {},
|
|
3561
3562
|
maxlength: {},
|
|
3562
3563
|
disabled: { type: Boolean },
|
|
3563
3564
|
viewMode: { type: Boolean },
|
|
@@ -3600,6 +3601,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
3600
3601
|
var _a2;
|
|
3601
3602
|
return ((_a2 = props.modelValue) == null ? void 0 : _a2.currency) || props.currency || blueseaConfig.defaultCurrencyCode;
|
|
3602
3603
|
});
|
|
3604
|
+
const suffixText = vue.computed(() => props.suffix !== void 0 ? props.suffix : currencyCode.value);
|
|
3603
3605
|
const fieldContext = useFieldContext();
|
|
3604
3606
|
const isValid = async (value, phase) => {
|
|
3605
3607
|
const errors2 = [];
|
|
@@ -3676,10 +3678,11 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
3676
3678
|
class: "price mr-4",
|
|
3677
3679
|
textContent: vue.toDisplayString(_ctx.formatInViewMode ? formattedStringValue.value : vue.unref(stringValue))
|
|
3678
3680
|
}, null, 8, _hoisted_2$1a),
|
|
3679
|
-
vue.
|
|
3681
|
+
suffixText.value ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
3682
|
+
key: 0,
|
|
3680
3683
|
class: "currency-code",
|
|
3681
|
-
textContent: vue.toDisplayString(
|
|
3682
|
-
}, null, 8, _hoisted_3$M)
|
|
3684
|
+
textContent: vue.toDisplayString(suffixText.value)
|
|
3685
|
+
}, null, 8, _hoisted_3$M)) : vue.createCommentVNode("", true)
|
|
3683
3686
|
])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$s, [
|
|
3684
3687
|
vue.withDirectives(vue.createElementVNode("input", vue.mergeProps({
|
|
3685
3688
|
id: _ctx.id,
|
|
@@ -3700,10 +3703,11 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
3700
3703
|
{ placeholder: true }
|
|
3701
3704
|
]
|
|
3702
3705
|
]),
|
|
3703
|
-
vue.
|
|
3706
|
+
suffixText.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
3707
|
+
key: 0,
|
|
3704
3708
|
class: "currency-code",
|
|
3705
|
-
textContent: vue.toDisplayString(
|
|
3706
|
-
}, null, 8, _hoisted_6$9)
|
|
3709
|
+
textContent: vue.toDisplayString(suffixText.value)
|
|
3710
|
+
}, null, 8, _hoisted_6$9)) : vue.createCommentVNode("", true)
|
|
3707
3711
|
])),
|
|
3708
3712
|
!_ctx.viewMode ? (vue.openBlock(), vue.createBlock(_sfc_main$1Z, {
|
|
3709
3713
|
key: 2,
|
|
@@ -34722,17 +34726,26 @@ img.ProseMirror-separator {
|
|
|
34722
34726
|
return "Image";
|
|
34723
34727
|
} else if ((_d = (_c = blueseaConfig.componentConfig.upload) == null ? void 0 : _c.videoFileExt) == null ? void 0 : _d.includes(ext)) {
|
|
34724
34728
|
return "Video";
|
|
34725
|
-
} else if (url.includes("youtube.com") || url.includes("youtu.be")) {
|
|
34729
|
+
} else if (url.includes("youtube.com") || url.includes("youtu.be") || url.includes("youtube-nocookie.com")) {
|
|
34726
34730
|
return "Youtube";
|
|
34727
34731
|
} else {
|
|
34728
34732
|
return "Unknown";
|
|
34729
34733
|
}
|
|
34730
34734
|
};
|
|
34731
34735
|
const extractYoutubeVideoId = (url) => {
|
|
34732
|
-
const regex = /(?:youtube\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|embed|shorts)\/|\S*?[?&]v=)|youtu\.be\/)([a-zA-Z0-9_-]{11})/;
|
|
34736
|
+
const regex = /(?:(?:youtube|youtube-nocookie)\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|embed|shorts)\/|\S*?[?&]v=)|youtu\.be\/)([a-zA-Z0-9_-]{11})/;
|
|
34733
34737
|
const match = url.match(regex);
|
|
34734
34738
|
return match ? match[1] : void 0;
|
|
34735
34739
|
};
|
|
34740
|
+
const isYoutubeNocookieUrl = (url) => {
|
|
34741
|
+
return url.includes("youtube-nocookie.com");
|
|
34742
|
+
};
|
|
34743
|
+
const buildYoutubeUrl = (videoId, nocookie) => {
|
|
34744
|
+
if (nocookie) {
|
|
34745
|
+
return `https://www.youtube-nocookie.com/embed/${videoId}`;
|
|
34746
|
+
}
|
|
34747
|
+
return `https://youtu.be/${videoId}`;
|
|
34748
|
+
};
|
|
34736
34749
|
class MediaObjectUrlStore {
|
|
34737
34750
|
constructor() {
|
|
34738
34751
|
__publicField(this, "createdObjectUrls", []);
|
|
@@ -72459,7 +72472,12 @@ img.ProseMirror-separator {
|
|
|
72459
72472
|
const modalHandle = useModalHandle();
|
|
72460
72473
|
const select = () => {
|
|
72461
72474
|
const videoId = extractYoutubeVideoId(url.value);
|
|
72462
|
-
|
|
72475
|
+
if (videoId) {
|
|
72476
|
+
const nocookie = isYoutubeNocookieUrl(url.value);
|
|
72477
|
+
modelValue.value = buildYoutubeUrl(videoId, nocookie);
|
|
72478
|
+
} else {
|
|
72479
|
+
modelValue.value = void 0;
|
|
72480
|
+
}
|
|
72463
72481
|
modalHandle.close();
|
|
72464
72482
|
};
|
|
72465
72483
|
const close2 = () => {
|
|
@@ -72787,6 +72805,7 @@ img.ProseMirror-separator {
|
|
|
72787
72805
|
exports2.betweenDateFilter = betweenDateFilter;
|
|
72788
72806
|
exports2.betweenFilter = betweenFilter;
|
|
72789
72807
|
exports2.blueseaConfig = blueseaConfig;
|
|
72808
|
+
exports2.buildYoutubeUrl = buildYoutubeUrl;
|
|
72790
72809
|
exports2.cancelProvidedSavePoint = cancelProvidedSavePoint;
|
|
72791
72810
|
exports2.closeAlarm = closeAlarm;
|
|
72792
72811
|
exports2.configureBluesea = configureBluesea;
|
|
@@ -72835,6 +72854,7 @@ img.ProseMirror-separator {
|
|
|
72835
72854
|
exports2.isNullFilter = isNullFilter;
|
|
72836
72855
|
exports2.isTooltipDisplayed = isTooltipDisplayed;
|
|
72837
72856
|
exports2.isValidationFailedError = isValidationFailedError;
|
|
72857
|
+
exports2.isYoutubeNocookieUrl = isYoutubeNocookieUrl;
|
|
72838
72858
|
exports2.likeFilter = likeFilter;
|
|
72839
72859
|
exports2.loadFieldValidator = loadFieldValidator;
|
|
72840
72860
|
exports2.localeBasedExtraItemValidationRules = localeBasedExtraItemValidationRules;
|
|
@@ -8,6 +8,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
8
8
|
modelValue?: Money | undefined;
|
|
9
9
|
currency?: string | undefined;
|
|
10
10
|
prefix?: false | undefined;
|
|
11
|
+
suffix?: string | undefined;
|
|
11
12
|
maxlength?: number | undefined;
|
|
12
13
|
disabled?: boolean | undefined;
|
|
13
14
|
viewMode?: boolean | undefined;
|
|
@@ -43,6 +44,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
43
44
|
modelValue?: Money | undefined;
|
|
44
45
|
currency?: string | undefined;
|
|
45
46
|
prefix?: false | undefined;
|
|
47
|
+
suffix?: string | undefined;
|
|
46
48
|
maxlength?: number | undefined;
|
|
47
49
|
disabled?: boolean | undefined;
|
|
48
50
|
viewMode?: boolean | undefined;
|
|
@@ -5,6 +5,8 @@ export type GuideMessage = Record<number, MultiLangText>;
|
|
|
5
5
|
export type MediaType = 'Image' | 'Video' | 'Youtube' | 'Unknown';
|
|
6
6
|
export declare const getMediaType: (url: string) => MediaType;
|
|
7
7
|
export declare const extractYoutubeVideoId: (url: string) => string | undefined;
|
|
8
|
+
export declare const isYoutubeNocookieUrl: (url: string) => boolean;
|
|
9
|
+
export declare const buildYoutubeUrl: (videoId: string, nocookie: boolean) => string;
|
|
8
10
|
export declare class MediaObjectUrlStore {
|
|
9
11
|
private createdObjectUrls;
|
|
10
12
|
addUrl(url: string): void;
|