@yoobic/yobi 8.5.0-76 → 8.5.0-77
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/cjs/design-system.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{swiper-9f95d970.js → swiper-14a9aa6e.js} +1 -1
- package/dist/cjs/yoo-form-capture.cjs.entry.js +1 -1
- package/dist/cjs/yoo-form-image-tagging.cjs.entry.js +12 -15
- package/dist/cjs/yoo-form-phone-number.cjs.entry.js +1 -1
- package/dist/cjs/yoo-form-todo-mission.cjs.entry.js +21 -18
- package/dist/cjs/yoo-form-todo.cjs.entry.js +1 -1
- package/dist/cjs/yoo-ion-scroll.cjs.entry.js +0 -7
- package/dist/cjs/{yoo-ion-slides-91aed68c.js → yoo-ion-slides-ac7389aa.js} +3 -3
- package/dist/cjs/yoo-ion-slides.cjs.entry.js +1 -1
- package/dist/cjs/yoo-mission-todo.cjs.entry.js +2 -2
- package/dist/collection/components/2.molecules/scroll/scroll.js +0 -12
- package/dist/collection/components/2.molecules/slide/slide.css +2 -2
- package/dist/collection/components/2.molecules/slides/slides.css +2 -2
- package/dist/collection/components/form/form-capture/form-capture.js +1 -1
- package/dist/collection/components/form/form-image-tagging/form-image-tagging.css +16 -28
- package/dist/collection/components/form/form-image-tagging/form-image-tagging.js +12 -15
- package/dist/collection/components/form/form-todo/form-todo.js +1 -1
- package/dist/collection/components/form/form-todo-mission/form-todo-mission.js +39 -19
- package/dist/collection/feature-operate/mission/mission-todo/mission-todo.js +3 -3
- package/dist/design-system/design-system.esm.js +1 -1
- package/dist/{esm/swiper-c4c9ef69.js → design-system/swiper-98ab4ffc.js} +2 -2
- package/dist/design-system/yoo-form-capture.entry.js +2 -2
- package/dist/design-system/yoo-form-image-tagging.entry.js +12 -15
- package/dist/design-system/yoo-form-phone-number.entry.js +1 -1
- package/dist/design-system/yoo-form-todo-mission.entry.js +21 -18
- package/dist/design-system/yoo-form-todo.entry.js +1 -1
- package/dist/design-system/yoo-ion-scroll.entry.js +0 -7
- package/dist/{esm/yoo-ion-slides-1c623349.js → design-system/yoo-ion-slides-fb2b42e7.js} +3 -3
- package/dist/design-system/yoo-ion-slides.entry.js +1 -1
- package/dist/design-system/yoo-mission-todo.entry.js +2 -2
- package/dist/esm/design-system.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/{design-system/swiper-c4c9ef69.js → esm/swiper-98ab4ffc.js} +2 -2
- package/dist/esm/yoo-form-capture.entry.js +2 -2
- package/dist/esm/yoo-form-image-tagging.entry.js +12 -15
- package/dist/esm/yoo-form-phone-number.entry.js +1 -1
- package/dist/esm/yoo-form-todo-mission.entry.js +21 -18
- package/dist/esm/yoo-form-todo.entry.js +1 -1
- package/dist/esm/yoo-ion-scroll.entry.js +0 -7
- package/dist/{design-system/yoo-ion-slides-1c623349.js → esm/yoo-ion-slides-fb2b42e7.js} +3 -3
- package/dist/esm/yoo-ion-slides.entry.js +1 -1
- package/dist/esm/yoo-mission-todo.entry.js +2 -2
- package/dist/types/components/2.molecules/scroll/scroll.d.ts +0 -1
- package/dist/types/components/form/form-image-tagging/form-image-tagging.d.ts +1 -1
- package/dist/types/components/form/form-todo-mission/form-todo-mission.d.ts +3 -1
- package/dist/types/components.d.ts +6 -4
- package/dist/types/feature-operate/mission/mission-todo/mission-todo.d.ts +1 -1
- package/package.json +1 -1
@@ -281,7 +281,7 @@ const YooFormCaptureComponent = class {
|
|
281
281
|
}
|
282
282
|
allowCrop(data) {
|
283
283
|
var _a;
|
284
|
-
return index.isWeb(this.host) && (((_a = this.cropperOptions) === null || _a === void 0 ? void 0 : _a.cropRatio) > 0 || this.showCropper) && (index.isImage(data) || index.isBase64(data)
|
284
|
+
return index.isWeb(this.host) && !index.isGif(data) && (((_a = this.cropperOptions) === null || _a === void 0 ? void 0 : _a.cropRatio) > 0 || this.showCropper) && (index.isImage(data) || index.isBase64(data) || index.isUnsplashUrl(data));
|
285
285
|
}
|
286
286
|
removeAllCapture() {
|
287
287
|
this.value = [];
|
@@ -16,7 +16,7 @@ require('./index-cb8276bc.js');
|
|
16
16
|
require('./common-helpers-7988a004.js');
|
17
17
|
require('./_commonjsHelpers-94df2ea7.js');
|
18
18
|
|
19
|
-
const formImageTaggingCss = "svg:not(:root){overflow:hidden}:host{display:block}:host yoo-banner{height:0}:host yoo-tag{position:relative;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}:host #image{
|
19
|
+
const formImageTaggingCss = "svg:not(:root){overflow:hidden}:host{display:block}:host yoo-banner{height:0}:host yoo-tag{position:relative;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}:host #image{position:relative}:host #image #overlay,:host #image yoo-img{border-radius:var(--border-radius-08, 0.5rem)}:host #image .dropzone{position:absolute;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:var(--spacing-32, 2rem);height:var(--spacing-32, 2rem);background-color:var(--light, #ffffff);border-radius:50%;-webkit-box-shadow:var(--shadow-02, 0 0.25rem 0.5rem 0 rgba(0, 0, 0, 0.1));box-shadow:var(--shadow-02, 0 0.25rem 0.5rem 0 rgba(0, 0, 0, 0.1))}:host(:not([readonly])) main::-webkit-scrollbar{display:none}:host(:not([readonly])) #image #overlay{position:absolute;top:0;width:100%;height:100%;background-color:var(--dark-10, rgba(0, 0, 0, 0.1));opacity:0;-webkit-transition:opacity 350ms ease-in-out;transition:opacity 350ms ease-in-out}:host(:not([readonly])) #image .dropzone[hit]{background-color:var(--app-color, #5a30f4)}:host(:not([readonly])) #instructions{margin:var(--spacing-16, 1rem) 0 0;padding:var(--spacing-08, 0.5rem);color:var(--stable, #adadad)}:host(:not([readonly])) #zone-tags{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-line-pack:baseline;align-content:baseline;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;min-height:5rem;padding:var(--spacing-08, 0.5rem);white-space:nowrap;border:var(--border-width-01, 0.0625rem) solid transparent;border-radius:var(--border-radius-08, 0.5rem)}:host(:not([readonly])) #zone-tags[hit]{background-color:var(--stable-ultralight, #fafafa);border:var(--border-width-01, 0.0625rem) solid var(--stable-light, #f1f1f1)}:host(:not([readonly])) #zone-tags yoo-tag{margin-right:var(--spacing-08, 0.5rem);margin-bottom:var(--spacing-08, 0.5rem)}:host([animated]) yoo-img{-webkit-animation:scale-up 0.35s ease-in-out 0.35s;animation:scale-up 0.35s ease-in-out 0.35s}@-webkit-keyframes scale-up{from{-webkit-transform:scale(0.85);transform:scale(0.85)}to{-webkit-transform:scale(1);transform:scale(1)}}@keyframes scale-up{from{-webkit-transform:scale(0.85);transform:scale(0.85)}to{-webkit-transform:scale(1);transform:scale(1)}}:host([animated]) .dropzone{-webkit-transition:all 250ms linear;transition:all 250ms linear}:host([animated]) .dropzone[hidden]{-webkit-transform:scale(0);transform:scale(0)}";
|
20
20
|
|
21
21
|
const YooFormImageTaggingComponent = class {
|
22
22
|
constructor(hostRef) {
|
@@ -26,13 +26,14 @@ const YooFormImageTaggingComponent = class {
|
|
26
26
|
this.animated = true;
|
27
27
|
this.value = [];
|
28
28
|
this.placeholder = 'DRAGDROPTAGS';
|
29
|
-
this.
|
29
|
+
this.revealDropzones = false;
|
30
30
|
}
|
31
31
|
async onImageChanged(newImage, oldImage) {
|
32
32
|
if (!lodash.isEqual(newImage, oldImage)) {
|
33
33
|
await this.prepareImage();
|
34
|
-
|
34
|
+
this.revealDropzones = false;
|
35
35
|
this.init();
|
36
|
+
index.forceUpdate(this);
|
36
37
|
}
|
37
38
|
}
|
38
39
|
onRequireChanged() {
|
@@ -50,8 +51,9 @@ const YooFormImageTaggingComponent = class {
|
|
50
51
|
var _a;
|
51
52
|
if (this.isVisible) {
|
52
53
|
(_a = this.tags) === null || _a === void 0 ? void 0 : _a.animate();
|
53
|
-
this.
|
54
|
+
this.revealDropzones = false;
|
54
55
|
this.init();
|
56
|
+
index.forceUpdate(this);
|
55
57
|
}
|
56
58
|
}
|
57
59
|
async isValid() {
|
@@ -91,7 +93,6 @@ const YooFormImageTaggingComponent = class {
|
|
91
93
|
clickToDrop: true,
|
92
94
|
dragAndScroll: true,
|
93
95
|
getColorTag,
|
94
|
-
onFirstTagAnimationFinished: () => this.flipImage = false,
|
95
96
|
pressTagExtraAction: () => showImageOverlay(),
|
96
97
|
releaseTagExtraAction: onReleaseTag,
|
97
98
|
resetTagExtraAction: onReleaseTag
|
@@ -107,6 +108,7 @@ const YooFormImageTaggingComponent = class {
|
|
107
108
|
}
|
108
109
|
async componentWillLoad() {
|
109
110
|
await this.prepareImage();
|
111
|
+
this.revealDropzones = !this.animated;
|
110
112
|
}
|
111
113
|
componentDidLoad() {
|
112
114
|
this.init();
|
@@ -114,33 +116,28 @@ const YooFormImageTaggingComponent = class {
|
|
114
116
|
async prepareImage() {
|
115
117
|
var _a;
|
116
118
|
this.imageSrc = await index$1.getMedia((await localForage.getFromOfflineStorage((_a = this.image) === null || _a === void 0 ? void 0 : _a._downloadURL)), { forceCookieUrlParam: true });
|
117
|
-
this.flipImage = !!this.imageSrc;
|
118
119
|
}
|
119
120
|
init() {
|
120
|
-
|
121
|
-
|
122
|
-
var _a, _b;
|
123
|
-
!((_b = (_a = this.tags) === null || _a === void 0 ? void 0 : _a.tags) === null || _b === void 0 ? void 0 : _b.length) && (this.tags = index$2.initTags(this.tagConfig, this.zonesConfig));
|
124
|
-
this.flipImage = false;
|
125
|
-
}, 500);
|
121
|
+
var _a, _b;
|
122
|
+
!((_b = (_a = this.tags) === null || _a === void 0 ? void 0 : _a.tags) === null || _b === void 0 ? void 0 : _b.length) && (this.tags = index$2.initTags(this.tagConfig, this.zonesConfig));
|
126
123
|
}
|
127
124
|
renderImageOverlay() {
|
128
125
|
return !this.readonly && index.h("div", { id: "overlay", ref: (element) => (this.imageOverlayElement = element) });
|
129
126
|
}
|
130
127
|
renderImage() {
|
131
|
-
return
|
128
|
+
return !!this.imageSrc && index.h("section", { id: "image" }, index.h("yoo-img", { instant: true, src: this.imageSrc, ignoreHeight: true, ignoreWidth: true, disableAspectRatioCalc: true, allowCloudinary: false, onAnimationEnd: () => this.revealDropzones = true }), this.renderImageOverlay(), this.renderDropzones());
|
132
129
|
}
|
133
130
|
renderDropzones() {
|
134
131
|
var _a, _b;
|
135
132
|
return (_b = (_a = draggableTagsHelpers.filterDuplicateEntries(this.annotations, 'text')) === null || _a === void 0 ? void 0 : _a.map(a => ({ ...a, type: 'dot' }))) === null || _b === void 0 ? void 0 : _b.map((a, i) => {
|
136
|
-
return !!a && index.h("div", { class: "dropzone", id: `zone-${i}`, style: annotationsHelpers.getPercentPositionStyle(a), hidden: this.animated && !this.readonly && this.
|
133
|
+
return !!a && index.h("div", { class: "dropzone", id: `zone-${i}`, style: annotationsHelpers.getPercentPositionStyle(a), hidden: this.animated && !this.readonly && !this.revealDropzones });
|
137
134
|
});
|
138
135
|
}
|
139
136
|
renderInstruction() {
|
140
137
|
return index.h("section", { id: "instructions" }, index$1.translate(this.placeholder));
|
141
138
|
}
|
142
139
|
renderTagsZone() {
|
143
|
-
return index.h("section", { class: "dropzone", id: "zone-tags" });
|
140
|
+
return index.h("section", { class: "dropzone", id: "zone-tags", key: "zone-tags" });
|
144
141
|
}
|
145
142
|
renderBanner() {
|
146
143
|
return this.livePreview && !this.readonly && index.h("yoo-banner", null, index.h("p", { slot: "content" }));
|