vviinn-widgets 2.19.1 → 2.20.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/cjs/Campaign-13258569.js +18 -0
- package/dist/cjs/Handler-de64afa5.js +317 -0
- package/dist/cjs/cropper-handler.cjs.entry.js +28 -0
- package/dist/cjs/customized-slots-aee3f39d.js +54 -0
- package/dist/cjs/highlight-box_22.cjs.entry.js +800 -0
- package/dist/cjs/{index-48c94264.js → imageSearch.store-fbe0600a.js} +11848 -15375
- package/dist/cjs/{Campaign-a94a827a.js → index-610c6c1f.js} +0 -16
- package/dist/cjs/index-c4851793.js +3235 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/package-5466077a.js +5 -0
- package/dist/cjs/vviinn-button.cjs.entry.js +21 -0
- package/dist/cjs/{vviinn-carousel_2.cjs.entry.js → vviinn-carousel_3.cjs.entry.js} +338 -125
- package/dist/cjs/vviinn-error.cjs.entry.js +19 -0
- package/dist/cjs/vviinn-preloader.cjs.entry.js +26 -0
- package/dist/cjs/vviinn-recommendations-sidebar.cjs.entry.js +6 -2
- package/dist/cjs/vviinn-vpr-button.cjs.entry.js +6 -9
- package/dist/cjs/vviinn-vps-button.cjs.entry.js +68 -0
- package/dist/cjs/vviinn-vps-widget.cjs.entry.js +266 -0
- package/dist/cjs/vviinn-widgets.cjs.js +1 -1
- package/dist/collection/components/image-search/image-view/image-cropper/image-cropper.js +2 -2
- package/dist/collection/components/image-search/search-filters/search-filters.js +1 -1
- package/dist/collection/components/vviinn-carousel/vviinn-carousel.js +22 -1
- package/dist/collection/components/vviinn-example-images/vviinn-example-image/vviinn-example-image.js +3 -3
- package/dist/collection/components/vviinn-example-images/vviinn-example-images.js +3 -3
- package/dist/collection/components/vviinn-image-selector/vviinn-image-selector.js +3 -3
- package/dist/collection/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.js +1 -1
- package/dist/collection/components/vviinn-image-view/vviinn-image-view.js +1 -1
- package/dist/collection/components/vviinn-modal/vviinn-modal.js +23 -1
- package/dist/collection/components/vviinn-overlayed-modal/vviinn-overlayed-modal.js +22 -1
- package/dist/collection/components/vviinn-product-card/vviinn-product-card.js +22 -0
- package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.js +45 -2
- package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.js +11 -20
- package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-vidget.js +53 -3
- package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.js +6 -4
- package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +11 -6
- package/dist/esm/Campaign-90ba7e06.js +14 -0
- package/dist/esm/Handler-7bfee84f.js +294 -0
- package/dist/esm/cropper-handler.entry.js +24 -0
- package/dist/esm/customized-slots-b372eaed.js +51 -0
- package/dist/esm/{cropper-handler_29.entry.js → highlight-box_22.entry.js} +25 -636
- package/dist/esm/{index-976acf7e.js → imageSearch.store-cccd9b24.js} +12050 -15563
- package/dist/esm/{Campaign-4aa53f29.js → index-714e572a.js} +1 -14
- package/dist/esm/index-fdc32fbc.js +3224 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/package-a1bd1e95.js +3 -0
- package/dist/esm/vviinn-button.entry.js +17 -0
- package/dist/esm/{vviinn-carousel_2.entry.js → vviinn-carousel_3.entry.js} +294 -82
- package/dist/esm/vviinn-error.entry.js +15 -0
- package/dist/esm/vviinn-preloader.entry.js +22 -0
- package/dist/esm/vviinn-recommendations-sidebar.entry.js +6 -2
- package/dist/esm/vviinn-vpr-button.entry.js +5 -8
- package/dist/esm/vviinn-vps-button.entry.js +64 -0
- package/dist/esm/vviinn-vps-widget.entry.js +262 -0
- package/dist/esm/vviinn-widgets.js +1 -1
- package/dist/types/components/vviinn-carousel/vviinn-carousel.d.ts +2 -0
- package/dist/types/components/vviinn-modal/vviinn-modal.d.ts +2 -0
- package/dist/types/components/vviinn-overlayed-modal/vviinn-overlayed-modal.d.ts +2 -0
- package/dist/types/components/vviinn-product-card/vviinn-product-card.d.ts +2 -0
- package/dist/types/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.d.ts +4 -0
- package/dist/types/components/vviinn-vpr-button/vviinn-vpr-button.d.ts +1 -3
- package/dist/types/components/vviinn-vpr-widget/vviinn-vpr-vidget.d.ts +4 -0
- package/dist/types/components/vviinn-vps-button/vviinn-vps-button.d.ts +1 -1
- package/dist/types/components/vviinn-vps-widget/vviinn-vps-widget.d.ts +1 -0
- package/dist/types/components.d.ts +9 -12
- package/dist/types/recommendation/events.d.ts +1 -0
- package/dist/vviinn-widgets/p-0ef48c85.entry.js +1 -0
- package/dist/vviinn-widgets/p-18fd769b.js +1 -0
- package/dist/vviinn-widgets/p-2f7bf983.js +1 -0
- package/dist/vviinn-widgets/p-34b551fb.entry.js +1 -0
- package/dist/vviinn-widgets/p-3abc679c.js +1 -0
- package/dist/vviinn-widgets/p-3b99c62d.js +1 -0
- package/dist/vviinn-widgets/p-47b1b862.entry.js +1 -0
- package/dist/vviinn-widgets/p-53eacbe3.js +1 -0
- package/dist/vviinn-widgets/p-55eef9fc.entry.js +1 -0
- package/dist/vviinn-widgets/p-7d93f947.entry.js +1 -0
- package/dist/vviinn-widgets/p-8036a003.entry.js +1 -0
- package/dist/vviinn-widgets/p-80d38a22.entry.js +1 -0
- package/dist/vviinn-widgets/p-91822e21.js +1 -0
- package/dist/vviinn-widgets/p-b9f04a14.entry.js +1 -0
- package/dist/vviinn-widgets/p-bae2af67.entry.js +1 -0
- package/dist/vviinn-widgets/{p-d08ce429.js → p-c24caccd.js} +1 -1
- package/dist/vviinn-widgets/p-e3146599.entry.js +1 -0
- package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
- package/package.json +1 -1
- package/www/build/p-0ef48c85.entry.js +1 -0
- package/www/build/p-18fd769b.js +1 -0
- package/www/build/p-2f7bf983.js +1 -0
- package/www/build/p-34b551fb.entry.js +1 -0
- package/www/build/p-3abc679c.js +1 -0
- package/www/build/p-3b99c62d.js +1 -0
- package/www/build/p-47b1b862.entry.js +1 -0
- package/www/build/p-53eacbe3.js +1 -0
- package/www/build/p-55eef9fc.entry.js +1 -0
- package/www/build/p-7d93f947.entry.js +1 -0
- package/www/build/p-8036a003.entry.js +1 -0
- package/www/build/p-80d38a22.entry.js +1 -0
- package/www/build/p-91822e21.js +1 -0
- package/www/build/p-a67898be.css +1 -0
- package/www/build/p-b9f04a14.entry.js +1 -0
- package/www/build/p-bae2af67.entry.js +1 -0
- package/www/build/{p-d08ce429.js → p-c24caccd.js} +1 -1
- package/www/build/p-e296f9f6.js +1 -0
- package/www/build/p-e3146599.entry.js +1 -0
- package/www/build/vviinn-widgets.esm.js +1 -1
- package/www/index.html +2 -2
- package/dist/cjs/cropper-handler_29.cjs.entry.js +0 -1418
- package/dist/vviinn-widgets/p-312b0eb7.entry.js +0 -1
- package/dist/vviinn-widgets/p-414b2291.js +0 -1
- package/dist/vviinn-widgets/p-5b50c7e5.entry.js +0 -1
- package/dist/vviinn-widgets/p-8deaa5da.entry.js +0 -1
- package/dist/vviinn-widgets/p-c6209bc1.entry.js +0 -1
- package/www/build/p-312b0eb7.entry.js +0 -1
- package/www/build/p-414b2291.js +0 -1
- package/www/build/p-5b50c7e5.entry.js +0 -1
- package/www/build/p-8deaa5da.entry.js +0 -1
- package/www/build/p-c6209bc1.entry.js +0 -1
- package/www/build/p-d39b7d70.js +0 -161
- package/www/build/p-e0153ae2.css +0 -6
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const campaignTypeNames = {
|
|
4
|
+
VPR: "Similar Products",
|
|
5
|
+
VPS: "Visual Search",
|
|
6
|
+
VCS: "Products Cross-Selling",
|
|
7
|
+
};
|
|
8
|
+
const isVPR = (c) => c._tag === "VPR";
|
|
9
|
+
function fold(onVPR, onVCS) {
|
|
10
|
+
return (c) => (isVPR(c) ? onVPR() : onVCS());
|
|
11
|
+
}
|
|
12
|
+
function fromString(s) {
|
|
13
|
+
return s === "VPR" ? { _tag: "VPR" } : { _tag: "VCS" };
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
exports.campaignTypeNames = campaignTypeNames;
|
|
17
|
+
exports.fold = fold;
|
|
18
|
+
exports.fromString = fromString;
|
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from, pack) {
|
|
4
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
5
|
+
if (ar || !(i in from)) {
|
|
6
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
7
|
+
ar[i] = from[i];
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* @since 2.0.0
|
|
14
|
+
*/
|
|
15
|
+
function identity(a) {
|
|
16
|
+
return a;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* @since 2.0.0
|
|
20
|
+
*/
|
|
21
|
+
function tuple() {
|
|
22
|
+
var t = [];
|
|
23
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
24
|
+
t[_i] = arguments[_i];
|
|
25
|
+
}
|
|
26
|
+
return t;
|
|
27
|
+
}
|
|
28
|
+
function pipe(a, ab, bc, cd, de, ef, fg, gh, hi) {
|
|
29
|
+
switch (arguments.length) {
|
|
30
|
+
case 1:
|
|
31
|
+
return a;
|
|
32
|
+
case 2:
|
|
33
|
+
return ab(a);
|
|
34
|
+
case 3:
|
|
35
|
+
return bc(ab(a));
|
|
36
|
+
case 4:
|
|
37
|
+
return cd(bc(ab(a)));
|
|
38
|
+
case 5:
|
|
39
|
+
return de(cd(bc(ab(a))));
|
|
40
|
+
case 6:
|
|
41
|
+
return ef(de(cd(bc(ab(a)))));
|
|
42
|
+
case 7:
|
|
43
|
+
return fg(ef(de(cd(bc(ab(a))))));
|
|
44
|
+
case 8:
|
|
45
|
+
return gh(fg(ef(de(cd(bc(ab(a)))))));
|
|
46
|
+
case 9:
|
|
47
|
+
return hi(gh(fg(ef(de(cd(bc(ab(a))))))));
|
|
48
|
+
default: {
|
|
49
|
+
var ret = arguments[0];
|
|
50
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
51
|
+
ret = arguments[i](ret);
|
|
52
|
+
}
|
|
53
|
+
return ret;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
/** @internal */
|
|
58
|
+
var dual = function (arity, body) {
|
|
59
|
+
var isDataFirst = typeof arity === 'number' ? function (args) { return args.length >= arity; } : arity;
|
|
60
|
+
return function () {
|
|
61
|
+
var args = Array.from(arguments);
|
|
62
|
+
if (isDataFirst(arguments)) {
|
|
63
|
+
return body.apply(this, args);
|
|
64
|
+
}
|
|
65
|
+
return function (self) { return body.apply(void 0, __spreadArray([self], args, false)); };
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
// -------------------------------------------------------------------------------------
|
|
70
|
+
// Option
|
|
71
|
+
// -------------------------------------------------------------------------------------
|
|
72
|
+
/** @internal */
|
|
73
|
+
var isNone = function (fa) { return fa._tag === 'None'; };
|
|
74
|
+
/** @internal */
|
|
75
|
+
var isSome = function (fa) { return fa._tag === 'Some'; };
|
|
76
|
+
/** @internal */
|
|
77
|
+
var none = { _tag: 'None' };
|
|
78
|
+
/** @internal */
|
|
79
|
+
var some = function (a) { return ({ _tag: 'Some', value: a }); };
|
|
80
|
+
// -------------------------------------------------------------------------------------
|
|
81
|
+
// Either
|
|
82
|
+
// -------------------------------------------------------------------------------------
|
|
83
|
+
/** @internal */
|
|
84
|
+
var isLeft = function (ma) { return ma._tag === 'Left'; };
|
|
85
|
+
/** @internal */
|
|
86
|
+
var left = function (e) { return ({ _tag: 'Left', left: e }); };
|
|
87
|
+
/** @internal */
|
|
88
|
+
var right = function (a) { return ({ _tag: 'Right', right: a }); };
|
|
89
|
+
// -------------------------------------------------------------------------------------
|
|
90
|
+
// Record
|
|
91
|
+
// -------------------------------------------------------------------------------------
|
|
92
|
+
/** @internal */
|
|
93
|
+
var has = Object.prototype.hasOwnProperty;
|
|
94
|
+
/** @internal */
|
|
95
|
+
var flatMapTask = function (F, M) {
|
|
96
|
+
/*#__PURE__*/ return dual(2, function (self, f) {
|
|
97
|
+
return M.flatMap(self, function (a) { return F.fromTask(f(a)); });
|
|
98
|
+
});
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* If a type `A` can form a `Semigroup` it has an **associative** binary operation.
|
|
103
|
+
*
|
|
104
|
+
* ```ts
|
|
105
|
+
* interface Semigroup<A> {
|
|
106
|
+
* readonly concat: (x: A, y: A) => A
|
|
107
|
+
* }
|
|
108
|
+
* ```
|
|
109
|
+
*
|
|
110
|
+
* Associativity means the following equality must hold for any choice of `x`, `y`, and `z`.
|
|
111
|
+
*
|
|
112
|
+
* ```ts
|
|
113
|
+
* concat(x, concat(y, z)) = concat(concat(x, y), z)
|
|
114
|
+
* ```
|
|
115
|
+
*
|
|
116
|
+
* A common example of a semigroup is the type `string` with the operation `+`.
|
|
117
|
+
*
|
|
118
|
+
* ```ts
|
|
119
|
+
* import { Semigroup } from 'fp-ts/Semigroup'
|
|
120
|
+
*
|
|
121
|
+
* const semigroupString: Semigroup<string> = {
|
|
122
|
+
* concat: (x, y) => x + y
|
|
123
|
+
* }
|
|
124
|
+
*
|
|
125
|
+
* const x = 'x'
|
|
126
|
+
* const y = 'y'
|
|
127
|
+
* const z = 'z'
|
|
128
|
+
*
|
|
129
|
+
* semigroupString.concat(x, y) // 'xy'
|
|
130
|
+
*
|
|
131
|
+
* semigroupString.concat(x, semigroupString.concat(y, z)) // 'xyz'
|
|
132
|
+
*
|
|
133
|
+
* semigroupString.concat(semigroupString.concat(x, y), z) // 'xyz'
|
|
134
|
+
* ```
|
|
135
|
+
*
|
|
136
|
+
* *Adapted from https://typelevel.org/cats*
|
|
137
|
+
*
|
|
138
|
+
* @since 2.0.0
|
|
139
|
+
*/
|
|
140
|
+
/**
|
|
141
|
+
* Given a struct of semigroups returns a semigroup for the struct.
|
|
142
|
+
*
|
|
143
|
+
* @example
|
|
144
|
+
* import { struct } from 'fp-ts/Semigroup'
|
|
145
|
+
* import * as N from 'fp-ts/number'
|
|
146
|
+
*
|
|
147
|
+
* interface Point {
|
|
148
|
+
* readonly x: number
|
|
149
|
+
* readonly y: number
|
|
150
|
+
* }
|
|
151
|
+
*
|
|
152
|
+
* const S = struct<Point>({
|
|
153
|
+
* x: N.SemigroupSum,
|
|
154
|
+
* y: N.SemigroupSum
|
|
155
|
+
* })
|
|
156
|
+
*
|
|
157
|
+
* assert.deepStrictEqual(S.concat({ x: 1, y: 2 }, { x: 3, y: 4 }), { x: 4, y: 6 })
|
|
158
|
+
*
|
|
159
|
+
* @since 2.10.0
|
|
160
|
+
*/
|
|
161
|
+
var struct = function (semigroups) { return ({
|
|
162
|
+
concat: function (first, second) {
|
|
163
|
+
var r = {};
|
|
164
|
+
for (var k in semigroups) {
|
|
165
|
+
if (has.call(semigroups, k)) {
|
|
166
|
+
r[k] = semigroups[k].concat(first[k], second[k]);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
return r;
|
|
170
|
+
}
|
|
171
|
+
}); };
|
|
172
|
+
// -------------------------------------------------------------------------------------
|
|
173
|
+
// instances
|
|
174
|
+
// -------------------------------------------------------------------------------------
|
|
175
|
+
/**
|
|
176
|
+
* Always return the first argument.
|
|
177
|
+
*
|
|
178
|
+
* @example
|
|
179
|
+
* import * as S from 'fp-ts/Semigroup'
|
|
180
|
+
*
|
|
181
|
+
* assert.deepStrictEqual(S.first<number>().concat(1, 2), 1)
|
|
182
|
+
*
|
|
183
|
+
* @category instances
|
|
184
|
+
* @since 2.10.0
|
|
185
|
+
*/
|
|
186
|
+
var first = function () { return ({ concat: identity }); };
|
|
187
|
+
/**
|
|
188
|
+
* Always return the last argument.
|
|
189
|
+
*
|
|
190
|
+
* @example
|
|
191
|
+
* import * as S from 'fp-ts/Semigroup'
|
|
192
|
+
*
|
|
193
|
+
* assert.deepStrictEqual(S.last<number>().concat(1, 2), 2)
|
|
194
|
+
*
|
|
195
|
+
* @category instances
|
|
196
|
+
* @since 2.10.0
|
|
197
|
+
*/
|
|
198
|
+
var last = function () { return ({ concat: function (_, y) { return y; } }); };
|
|
199
|
+
/**
|
|
200
|
+
* Use [`SemigroupSum`](./number.ts.html#SemigroupSum) instead.
|
|
201
|
+
*
|
|
202
|
+
* @category zone of death
|
|
203
|
+
* @since 2.0.0
|
|
204
|
+
* @deprecated
|
|
205
|
+
*/
|
|
206
|
+
var semigroupSum = {
|
|
207
|
+
concat: function (x, y) { return x + y; }
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
const semigroupDiff = {
|
|
211
|
+
concat: (x, y) => x - y,
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
const fromRectangle$1 = ({ x, y }) => {
|
|
215
|
+
return {
|
|
216
|
+
x,
|
|
217
|
+
y,
|
|
218
|
+
};
|
|
219
|
+
};
|
|
220
|
+
const fromMouseEvent = ({ clientX, clientY }) => {
|
|
221
|
+
return {
|
|
222
|
+
x: clientX,
|
|
223
|
+
y: clientY,
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
const pointDiffSemigroup = struct({
|
|
227
|
+
x: semigroupDiff,
|
|
228
|
+
y: semigroupDiff,
|
|
229
|
+
});
|
|
230
|
+
const pointSumSemigroup = struct({
|
|
231
|
+
x: semigroupSum,
|
|
232
|
+
y: semigroupSum,
|
|
233
|
+
});
|
|
234
|
+
|
|
235
|
+
exports.HandlerDirection = void 0;
|
|
236
|
+
(function (HandlerDirection) {
|
|
237
|
+
HandlerDirection[HandlerDirection["East"] = 0] = "East";
|
|
238
|
+
HandlerDirection[HandlerDirection["North"] = 1] = "North";
|
|
239
|
+
HandlerDirection[HandlerDirection["NorthEast"] = 2] = "NorthEast";
|
|
240
|
+
HandlerDirection[HandlerDirection["NorthWest"] = 3] = "NorthWest";
|
|
241
|
+
HandlerDirection[HandlerDirection["South"] = 4] = "South";
|
|
242
|
+
HandlerDirection[HandlerDirection["SouthEast"] = 5] = "SouthEast";
|
|
243
|
+
HandlerDirection[HandlerDirection["SouthWest"] = 6] = "SouthWest";
|
|
244
|
+
HandlerDirection[HandlerDirection["West"] = 7] = "West";
|
|
245
|
+
})(exports.HandlerDirection || (exports.HandlerDirection = {}));
|
|
246
|
+
const getCursorValue = (direction) => {
|
|
247
|
+
switch (direction) {
|
|
248
|
+
case exports.HandlerDirection.East:
|
|
249
|
+
return "e-resize";
|
|
250
|
+
case exports.HandlerDirection.North:
|
|
251
|
+
return "n-resize";
|
|
252
|
+
case exports.HandlerDirection.NorthEast:
|
|
253
|
+
return "ne-resize";
|
|
254
|
+
case exports.HandlerDirection.NorthWest:
|
|
255
|
+
return "nw-resize";
|
|
256
|
+
case exports.HandlerDirection.South:
|
|
257
|
+
return "s-resize";
|
|
258
|
+
case exports.HandlerDirection.SouthEast:
|
|
259
|
+
return "se-resize";
|
|
260
|
+
case exports.HandlerDirection.SouthWest:
|
|
261
|
+
return "sw-resize";
|
|
262
|
+
case exports.HandlerDirection.West:
|
|
263
|
+
return "w-resize";
|
|
264
|
+
default:
|
|
265
|
+
return "pointer";
|
|
266
|
+
}
|
|
267
|
+
};
|
|
268
|
+
const fromRectangle = (r) => [
|
|
269
|
+
{
|
|
270
|
+
position: fromRectangle$1(r),
|
|
271
|
+
direction: exports.HandlerDirection.NorthWest,
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
position: pointSumSemigroup.concat(fromRectangle$1(r), {
|
|
275
|
+
x: r.width,
|
|
276
|
+
y: 0,
|
|
277
|
+
}),
|
|
278
|
+
direction: exports.HandlerDirection.NorthEast,
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
position: pointSumSemigroup.concat(fromRectangle$1(r), {
|
|
282
|
+
x: 0,
|
|
283
|
+
y: r.height,
|
|
284
|
+
}),
|
|
285
|
+
direction: exports.HandlerDirection.SouthWest,
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
position: pointSumSemigroup.concat(fromRectangle$1(r), {
|
|
289
|
+
x: r.width,
|
|
290
|
+
y: r.height,
|
|
291
|
+
}),
|
|
292
|
+
direction: exports.HandlerDirection.SouthEast,
|
|
293
|
+
},
|
|
294
|
+
];
|
|
295
|
+
|
|
296
|
+
exports.dual = dual;
|
|
297
|
+
exports.first = first;
|
|
298
|
+
exports.flatMapTask = flatMapTask;
|
|
299
|
+
exports.fromMouseEvent = fromMouseEvent;
|
|
300
|
+
exports.fromRectangle = fromRectangle$1;
|
|
301
|
+
exports.fromRectangle$1 = fromRectangle;
|
|
302
|
+
exports.getCursorValue = getCursorValue;
|
|
303
|
+
exports.has = has;
|
|
304
|
+
exports.identity = identity;
|
|
305
|
+
exports.isLeft = isLeft;
|
|
306
|
+
exports.isNone = isNone;
|
|
307
|
+
exports.isSome = isSome;
|
|
308
|
+
exports.last = last;
|
|
309
|
+
exports.left = left;
|
|
310
|
+
exports.none = none;
|
|
311
|
+
exports.pipe = pipe;
|
|
312
|
+
exports.pointDiffSemigroup = pointDiffSemigroup;
|
|
313
|
+
exports.pointSumSemigroup = pointSumSemigroup;
|
|
314
|
+
exports.right = right;
|
|
315
|
+
exports.some = some;
|
|
316
|
+
exports.struct = struct;
|
|
317
|
+
exports.tuple = tuple;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-a4becaff.js');
|
|
6
|
+
const Handler = require('./Handler-de64afa5.js');
|
|
7
|
+
|
|
8
|
+
const cropperHandlerCss = ":host{--size:20px;background:transparent;border:4px solid white;box-sizing:content-box;display:block;height:var(--size);touch-action:none;position:absolute;width:var(--size);z-index:4;-webkit-user-select:none;-moz-user-select:none;user-select:none}:host(.disabled){opacity:0.25}:host(.nw-resize){border-bottom:none;border-right:none;top:0;left:0}:host(.ne-resize){border-left:none;border-bottom:none;right:0;top:0}:host(.sw-resize){border-right:none;border-top:none;left:0;bottom:0}:host(.se-resize){border-left:none;border-top:none;bottom:0;right:0}";
|
|
9
|
+
|
|
10
|
+
const CropperHandler = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
index.registerInstance(this, hostRef);
|
|
13
|
+
this.handler = undefined;
|
|
14
|
+
this.disabled = false;
|
|
15
|
+
}
|
|
16
|
+
render() {
|
|
17
|
+
return (index.h(index.Host, { part: `handle ${Handler.getCursorValue(this.handler.direction)}`, class: {
|
|
18
|
+
disabled: this.disabled,
|
|
19
|
+
[Handler.getCursorValue(this.handler.direction)]: true,
|
|
20
|
+
}, style: {
|
|
21
|
+
"--size": "20px",
|
|
22
|
+
cursor: Handler.getCursorValue(this.handler.direction),
|
|
23
|
+
}, draggable: false }));
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
CropperHandler.style = cropperHandlerCss;
|
|
27
|
+
|
|
28
|
+
exports.cropper_handler = CropperHandler;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const index = require('./index-a4becaff.js');
|
|
4
|
+
|
|
5
|
+
const defaultSlotsNames = [
|
|
6
|
+
"vviinn-onboarding-title",
|
|
7
|
+
"onboarding-card-1-icon",
|
|
8
|
+
"onboarding-card-1-text",
|
|
9
|
+
"onboarding-card-2-icon",
|
|
10
|
+
"onboarding-card-2-text",
|
|
11
|
+
"onboarding-card-3-icon",
|
|
12
|
+
"onboarding-card-3-text",
|
|
13
|
+
"vviinn-example-images-title",
|
|
14
|
+
"vviinn-example-images-1",
|
|
15
|
+
"vviinn-example-images-2",
|
|
16
|
+
"vviinn-example-images-3",
|
|
17
|
+
"vviinn-example-images-4",
|
|
18
|
+
"vviinn-teaser-text",
|
|
19
|
+
"vviinn-image-upload-button-text",
|
|
20
|
+
"vviinn-privacy-badge-text",
|
|
21
|
+
"vviinn-image-search-modal-title",
|
|
22
|
+
];
|
|
23
|
+
const renderNamedSlot = (name) => index.h("slot", { name: name });
|
|
24
|
+
const SlotSkeleton = () => defaultSlotsNames.map(renderNamedSlot);
|
|
25
|
+
const getSlots = (element) => Array.from(element.shadowRoot.querySelectorAll("slot"));
|
|
26
|
+
const getNameAttribute = (element) => element.getAttribute("name");
|
|
27
|
+
const getSlotAttribute = (element) => element.getAttribute("slot");
|
|
28
|
+
const elementContainSlot = (slot) => (container) => {
|
|
29
|
+
const name1 = getNameAttribute(slot);
|
|
30
|
+
const name2 = getSlotAttribute(container);
|
|
31
|
+
return name1 === name2;
|
|
32
|
+
};
|
|
33
|
+
const getContentToReplace = (targets) => (acc, content) => {
|
|
34
|
+
const replaceCandidate = targets.find(elementContainSlot(content));
|
|
35
|
+
if (replaceCandidate) {
|
|
36
|
+
acc.set(content, replaceCandidate);
|
|
37
|
+
}
|
|
38
|
+
return acc;
|
|
39
|
+
};
|
|
40
|
+
const replaceSlotContent = (content, target) => {
|
|
41
|
+
target.innerHTML = content.outerHTML;
|
|
42
|
+
};
|
|
43
|
+
const slotChangeListener = (component, element) => {
|
|
44
|
+
component.connectedCallback = function () {
|
|
45
|
+
document.addEventListener("globalSlotsChanged", ({ detail }) => {
|
|
46
|
+
const slotsToReplace = getSlots(element).reduce(getContentToReplace(detail), new Map());
|
|
47
|
+
slotsToReplace.forEach(replaceSlotContent);
|
|
48
|
+
}, true);
|
|
49
|
+
};
|
|
50
|
+
component.connectedCallback.call(component);
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
exports.SlotSkeleton = SlotSkeleton;
|
|
54
|
+
exports.slotChangeListener = slotChangeListener;
|