@streamscloud/embeddable 3.2.1 → 3.2.3
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/core/enums.d.ts +2 -0
- package/dist/core/enums.js +2 -0
- package/dist/core/graphql.d.ts +1 -3
- package/dist/core/graphql.js +3 -12
- package/dist/core/utils/html-helper.d.ts +0 -1
- package/dist/core/utils/html-helper.js +0 -4
- package/dist/products/price-helper.js +1 -1
- package/dist/short-videos/short-video-viewer/cmp.attachments-inline.svelte +1 -1
- package/dist/short-videos/short-video-viewer/cmp.attachments.svelte +2 -2
- package/dist/short-videos/short-video-viewer/cmp.attachments.svelte.d.ts +2 -3
- package/dist/short-videos/short-video-viewer/cmp.product.svelte +1 -1
- package/dist/short-videos/short-video-viewer/cmp.product.svelte.d.ts +2 -3
- package/dist/short-videos/short-video-viewer/cmp.short-video-details.svelte +1 -1
- package/dist/short-videos/short-video-viewer/cmp.short-video-details.svelte.d.ts +2 -3
- package/dist/short-videos/short-video-viewer/cmp.short-video-heading.svelte +2 -6
- package/dist/short-videos/short-video-viewer/cmp.short-video-heading.svelte.d.ts +1 -1
- package/dist/short-videos/short-video-viewer/cmp.short-video-viewer.svelte +1 -1
- package/dist/short-videos/short-video-viewer/cmp.short-video-viewer.svelte.d.ts +2 -3
- package/dist/short-videos/short-video-viewer/description.svelte +0 -5
- package/dist/short-videos/short-video-viewer/description.svelte.d.ts +1 -1
- package/dist/short-videos/short-video-viewer/index.d.ts +2 -4
- package/dist/short-videos/short-video-viewer/index.js +0 -1
- package/dist/short-videos/short-video-viewer/mapper.js +1 -5
- package/dist/short-videos/short-video-viewer/operations.generated.d.ts +0 -4
- package/dist/short-videos/short-video-viewer/operations.generated.js +0 -6
- package/dist/short-videos/short-video-viewer/operations.graphql +0 -4
- package/dist/short-videos/short-video-viewer/{short-video-attachments-localization.d.ts → short-video-attachments-localization.svelte.d.ts} +4 -5
- package/dist/short-videos/short-video-viewer/short-video-attachments-localization.svelte.js +10 -0
- package/dist/short-videos/short-video-viewer/{short-video-details-localization.d.ts → short-video-details-localization.svelte.d.ts} +6 -7
- package/dist/short-videos/short-video-viewer/short-video-details-localization.svelte.js +10 -0
- package/dist/short-videos/short-video-viewer/{short-video-product-localization.d.ts → short-video-product-localization.svelte.d.ts} +1 -2
- package/dist/short-videos/short-video-viewer/short-video-product-localization.svelte.js +11 -0
- package/dist/short-videos/short-video-viewer/short-video-viewer-localization.svelte.d.ts +13 -0
- package/dist/short-videos/short-video-viewer/short-video-viewer-localization.svelte.js +10 -0
- package/dist/short-videos/short-video-viewer/types.d.ts +0 -4
- package/dist/short-videos/short-videos-player/cmp.short-videos-player.svelte +11 -88
- package/dist/short-videos/short-videos-player/cmp.short-videos-player.svelte.d.ts +5 -5
- package/dist/short-videos/short-videos-player/controls.svelte +2 -2
- package/dist/short-videos/short-videos-player/controls.svelte.d.ts +1 -1
- package/dist/short-videos/short-videos-player/index.d.ts +14 -51
- package/dist/short-videos/short-videos-player/index.js +12 -83
- package/dist/short-videos/short-videos-player/short-videos-player-localization.svelte.d.ts +8 -0
- package/dist/short-videos/short-videos-player/short-videos-player-localization.svelte.js +6 -0
- package/dist/streams/layout/cmp.layout.svelte.d.ts +2 -4
- package/dist/streams/layout/cmp.slot-content.svelte +4 -4
- package/dist/streams/layout/cmp.slot-content.svelte.d.ts +1 -2
- package/dist/streams/layout/cmp.slot.svelte.d.ts +2 -7
- package/dist/streams/layout/component.d.ts +0 -2
- package/dist/streams/layout/element-views/cmp.container-stream-element.svelte +1 -1
- package/dist/streams/layout/element-views/cmp.container-stream-element.svelte.d.ts +3 -4
- package/dist/streams/layout/element-views/cmp.image-ref-stream-element.svelte +2 -15
- package/dist/streams/layout/element-views/cmp.image-ref-stream-element.svelte.d.ts +3 -7
- package/dist/streams/layout/element-views/cmp.images-stream-element.svelte +2 -2
- package/dist/streams/layout/element-views/cmp.price-stream-element.svelte +89 -15
- package/dist/streams/layout/element-views/cmp.price-stream-element.svelte.d.ts +4 -5
- package/dist/streams/layout/element-views/cmp.short-video-stream-element.svelte +2 -4
- package/dist/streams/layout/element-views/cmp.short-video-stream-element.svelte.d.ts +0 -3
- package/dist/streams/layout/element-views/cmp.stream-element.svelte +17 -24
- package/dist/streams/layout/element-views/cmp.stream-element.svelte.d.ts +3 -4
- package/dist/streams/layout/element-views/cmp.text-ref-stream-element.svelte.d.ts +2 -2
- package/dist/streams/layout/element-views/cmp.text-stream-element.svelte +2 -6
- package/dist/streams/layout/element-views/cmp.text-stream-element.svelte.d.ts +0 -2
- package/dist/streams/layout/element-views/data-by-key-accessor.d.ts +3 -3
- package/dist/streams/layout/element-views/index.d.ts +11 -16
- package/dist/streams/layout/element-views/index.js +9 -12
- package/dist/streams/layout/element-views/price-stream-element-localization.svelte.d.ts +9 -0
- package/dist/streams/layout/element-views/price-stream-element-localization.svelte.js +8 -0
- package/dist/streams/layout/element-views/stream-element-localization.svelte.d.ts +8 -0
- package/dist/streams/layout/element-views/stream-element-localization.svelte.js +6 -0
- package/dist/streams/layout/elements.d.ts +12 -47
- package/dist/streams/layout/elements.js +1 -1
- package/dist/streams/layout/enums.d.ts +3 -34
- package/dist/streams/layout/enums.js +7 -46
- package/dist/streams/layout/index.d.ts +10 -3
- package/dist/streams/layout/index.js +2 -3
- package/dist/streams/layout/layout.d.ts +1 -2
- package/dist/streams/layout/models/index.d.ts +1 -1
- package/dist/streams/layout/models/mapper.js +1 -5
- package/dist/streams/layout/models/stream-layout-media-item-model.d.ts +1 -1
- package/dist/streams/layout/models/stream-layout-media-item-model.js +1 -1
- package/dist/streams/layout/models/stream-layout-post-header-model.d.ts +1 -1
- package/dist/streams/layout/models/stream-layout-product-model.d.ts +2 -1
- package/dist/streams/layout/models/stream-layout-short-video-model.d.ts +0 -4
- package/dist/streams/layout/serializer.d.ts +3 -0
- package/dist/streams/layout/serializer.js +6 -0
- package/dist/streams/layout/slot.d.ts +0 -2
- package/dist/streams/layout/styles-transformer.d.ts +2 -3
- package/dist/streams/layout/styles-transformer.js +30 -54
- package/dist/streams/layout/styles.d.ts +14 -24
- package/dist/streams/layout/type-guards.d.ts +0 -31
- package/dist/streams/layout/type-guards.js +1 -13
- package/dist/streams/stream-page-viewer/cmp.stream-page-viewer.svelte +2 -4
- package/dist/streams/stream-page-viewer/cmp.stream-page-viewer.svelte.d.ts +0 -3
- package/dist/streams/stream-page-viewer/index.d.ts +0 -1
- package/dist/streams/stream-page-viewer/stream-page-viewer-localization.svelte.d.ts +13 -0
- package/dist/streams/stream-page-viewer/stream-page-viewer-localization.svelte.js +10 -0
- package/dist/streams/stream-player/cmp.stream-player.svelte +7 -47
- package/dist/streams/stream-player/cmp.stream-player.svelte.d.ts +4 -6
- package/dist/streams/stream-player/controls.svelte +3 -46
- package/dist/streams/stream-player/controls.svelte.d.ts +1 -1
- package/dist/streams/stream-player/index.d.ts +4 -6
- package/dist/streams/stream-player/index.js +28 -15
- package/dist/streams/stream-player/operations.generated.d.ts +1 -1
- package/dist/streams/stream-player/operations.generated.js +3 -5
- package/dist/streams/stream-player/operations.graphql +3 -3
- package/dist/streams/stream-player/stream-overview.svelte +2 -2
- package/dist/streams/stream-player/stream-overview.svelte.d.ts +1 -1
- package/dist/streams/stream-player/stream-player-buffer.svelte.js +2 -2
- package/dist/streams/stream-player/stream-player-localization.svelte.d.ts +12 -0
- package/dist/streams/stream-player/stream-player-localization.svelte.js +10 -0
- package/dist/ui/icon/cmp.icon.svelte +26 -13
- package/dist/ui/line-clamp/cmp.line-clamp.svelte +2 -2
- package/dist/ui/line-clamp/cmp.line-clamp.svelte.d.ts +2 -3
- package/dist/ui/line-clamp/index.d.ts +1 -1
- package/dist/ui/line-clamp/index.js +1 -1
- package/dist/ui/line-clamp/{line-clamp-localization.d.ts → line-clamp-localization.svelte.d.ts} +1 -2
- package/dist/ui/line-clamp/line-clamp-localization.svelte.js +15 -0
- package/dist/ui/shadow-dom/shadow-host.d.ts +5 -1
- package/dist/ui/shadow-dom/shadow-host.js +14 -1
- package/dist/ui/time-ago/cmp.time-ago.svelte +1 -1
- package/dist/ui/time-ago/cmp.time-ago.svelte.d.ts +2 -3
- package/dist/ui/time-ago/index.d.ts +1 -1
- package/dist/ui/time-ago/{time-ago-localization.d.ts → time-ago-localization.svelte.d.ts} +1 -2
- package/dist/ui/time-ago/time-ago-localization.svelte.js +39 -0
- package/dist/ui/video/cmp.video.svelte +18 -42
- package/package.json +1 -1
- package/dist/core/analytics.profile-id.d.ts +0 -5
- package/dist/core/analytics.profile-id.js +0 -17
- package/dist/core/document.event-handlers.d.ts +0 -1
- package/dist/core/document.event-handlers.js +0 -5
- package/dist/core/locale.d.ts +0 -6
- package/dist/core/locale.js +0 -24
- package/dist/short-videos/short-video-viewer/short-video-attachments-localization.js +0 -21
- package/dist/short-videos/short-video-viewer/short-video-details-localization.js +0 -17
- package/dist/short-videos/short-video-viewer/short-video-product-localization.js +0 -13
- package/dist/short-videos/short-video-viewer/short-video-viewer-localization.d.ts +0 -14
- package/dist/short-videos/short-video-viewer/short-video-viewer-localization.js +0 -17
- package/dist/short-videos/short-videos-player/operations.generated.d.ts +0 -68
- package/dist/short-videos/short-videos-player/operations.generated.js +0 -199
- package/dist/short-videos/short-videos-player/operations.graphql +0 -8
- package/dist/short-videos/short-videos-player/short-videos-player-localization.d.ts +0 -16
- package/dist/short-videos/short-videos-player/short-videos-player-localization.js +0 -13
- package/dist/short-videos/short-videos-player/types.d.ts +0 -36
- package/dist/short-videos/short-videos-player/types.js +0 -6
- package/dist/streams/layout/element-views/cmp.annotation-stream-element.svelte +0 -16
- package/dist/streams/layout/element-views/cmp.annotation-stream-element.svelte.d.ts +0 -7
- package/dist/streams/layout/element-views/cmp.stock-stream-element.svelte +0 -74
- package/dist/streams/layout/element-views/cmp.stock-stream-element.svelte.d.ts +0 -11
- package/dist/streams/layout/element-views/cmp.web-view-stream-element.svelte +0 -37
- package/dist/streams/layout/element-views/cmp.web-view-stream-element.svelte.d.ts +0 -7
- package/dist/streams/layout/element-views/price-element-view.svelte +0 -168
- package/dist/streams/layout/element-views/price-element-view.svelte.d.ts +0 -15
- package/dist/streams/layout/element-views/price-stream-element-localization.d.ts +0 -13
- package/dist/streams/layout/element-views/price-stream-element-localization.js +0 -21
- package/dist/streams/layout/element-views/short-video-stream-element-localization.d.ts +0 -9
- package/dist/streams/layout/element-views/short-video-stream-element-localization.js +0 -7
- package/dist/streams/layout/element-views/stock-stream-element-localization.d.ts +0 -8
- package/dist/streams/layout/element-views/stock-stream-element-localization.js +0 -26
- package/dist/streams/layout/element-views/stream-element-localization.d.ts +0 -15
- package/dist/streams/layout/element-views/stream-element-localization.js +0 -11
- package/dist/streams/layout/serializer.svelte.d.ts +0 -29
- package/dist/streams/layout/serializer.svelte.js +0 -93
- package/dist/streams/layout/slot-data-ref.d.ts +0 -13
- package/dist/streams/layout/slot-data-ref.js +0 -1
- package/dist/streams/layout/svg-attributes.d.ts +0 -7
- package/dist/streams/layout/svg-attributes.js +0 -8
- package/dist/streams/stream-page-viewer/stream-page-viewer-localization.d.ts +0 -9
- package/dist/streams/stream-page-viewer/stream-page-viewer-localization.js +0 -7
- package/dist/streams/stream-player/stream-player-localization.d.ts +0 -26
- package/dist/streams/stream-player/stream-player-localization.js +0 -31
- package/dist/ui/line-clamp/line-clamp-localization.js +0 -19
- package/dist/ui/swipe-indicator/cmp.swipe-indicator.svelte +0 -125
- package/dist/ui/swipe-indicator/cmp.swipe-indicator.svelte.d.ts +0 -9
- package/dist/ui/swipe-indicator/index.d.ts +0 -2
- package/dist/ui/swipe-indicator/index.js +0 -1
- package/dist/ui/swipe-indicator/swipe-indicator-localization.d.ts +0 -8
- package/dist/ui/swipe-indicator/swipe-indicator-localization.js +0 -13
- package/dist/ui/time-ago/time-ago-localization.js +0 -55
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
<script lang="ts">var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
import { Utils } from '../../../core/utils';
|
|
11
|
-
import { toPriceRepresentation } from '../../../products/price-helper';
|
|
12
|
-
import { LineClamp } from '../../../ui/line-clamp';
|
|
13
|
-
import { PriceStreamElementLocalization } from './price-stream-element-localization';
|
|
14
|
-
import { default as StockElementView } from './cmp.stock-stream-element.svelte';
|
|
15
|
-
import { mapFlexJustifyContent, mapFontFamily, mapFontWeight, transformColorValue, transformFontSizeValue, transformNumericValue } from '../styles-transformer';
|
|
16
|
-
let { maxElementHeight, model, data, localization, on } = $props();
|
|
17
|
-
let priceElementRef = $state.raw(null);
|
|
18
|
-
let priceContainerRef = $state.raw(null);
|
|
19
|
-
const minElementHeight = 16;
|
|
20
|
-
let adjustedHeight = $derived(maxElementHeight);
|
|
21
|
-
const lineHeight = 1.2;
|
|
22
|
-
const elementHeight = $derived(adjustedHeight);
|
|
23
|
-
const priceHeight = $derived(model.stock ? elementHeight * 0.68 : elementHeight);
|
|
24
|
-
const adjustableHeight = $derived(!!(on === null || on === void 0 ? void 0 : on.heightAdjusted));
|
|
25
|
-
const currentPrice = $derived.by(() => {
|
|
26
|
-
if (data.salePrice) {
|
|
27
|
-
return toPriceRepresentation(data.salePrice, data.currency, model.includeCurrency || false);
|
|
28
|
-
}
|
|
29
|
-
return toPriceRepresentation(data.price, data.currency, model.includeCurrency || false);
|
|
30
|
-
});
|
|
31
|
-
const saveValue = $derived.by(() => {
|
|
32
|
-
if (data.salePrice) {
|
|
33
|
-
return toPriceRepresentation(data.price - data.salePrice, data.currency, model.includeCurrency || false);
|
|
34
|
-
}
|
|
35
|
-
return 0;
|
|
36
|
-
});
|
|
37
|
-
const beforeValue = $derived.by(() => {
|
|
38
|
-
return toPriceRepresentation(data.price, data.currency, model.includeCurrency || false);
|
|
39
|
-
});
|
|
40
|
-
const elementContainerStyles = $derived.by(() => {
|
|
41
|
-
var _a, _b;
|
|
42
|
-
const values = [
|
|
43
|
-
'display: flex;',
|
|
44
|
-
'flex-direction: column;',
|
|
45
|
-
'justify-content: space-between;',
|
|
46
|
-
`align-items: ${mapFlexJustifyContent((_a = model.styles) === null || _a === void 0 ? void 0 : _a.horizontalAlign)};`,
|
|
47
|
-
`font-family: ${mapFontFamily((_b = model.styles) === null || _b === void 0 ? void 0 : _b.fontFamily)};`,
|
|
48
|
-
`height: ${transformNumericValue(elementHeight)};`
|
|
49
|
-
];
|
|
50
|
-
return values.join('');
|
|
51
|
-
});
|
|
52
|
-
const priceContainerStyles = $derived.by(() => {
|
|
53
|
-
const values = ['display: flex;', `height: ${transformNumericValue(priceHeight)};`, `align-items: center;`, 'gap: 3cqi;'];
|
|
54
|
-
return values.join('');
|
|
55
|
-
});
|
|
56
|
-
const priceCustomStyles = $derived.by(() => {
|
|
57
|
-
var _a, _b, _c;
|
|
58
|
-
const values = [
|
|
59
|
-
`font-size: ${transformFontSizeValue(priceHeight / lineHeight)};`,
|
|
60
|
-
`line-height: ${lineHeight};`,
|
|
61
|
-
`font-weight: ${mapFontWeight((_a = model.styles) === null || _a === void 0 ? void 0 : _a.fontWeight)};`,
|
|
62
|
-
`color: ${transformColorValue(data.salePrice ? (_b = model.styles) === null || _b === void 0 ? void 0 : _b.salePriceColor : (_c = model.styles) === null || _c === void 0 ? void 0 : _c.regularPriceColor)};`
|
|
63
|
-
];
|
|
64
|
-
return values.join('');
|
|
65
|
-
});
|
|
66
|
-
const saveValueCustomStyles = $derived.by(() => {
|
|
67
|
-
var _a, _b;
|
|
68
|
-
const values = [
|
|
69
|
-
`margin-top: ${transformNumericValue((priceHeight - priceHeight / lineHeight) / 2)};`,
|
|
70
|
-
`font-size: ${transformFontSizeValue(priceHeight / 4)};`,
|
|
71
|
-
`font-weight: 500;`,
|
|
72
|
-
`padding: ${transformNumericValue(priceHeight / 8)} ${transformNumericValue(priceHeight / 4)};`,
|
|
73
|
-
`border-radius: ${transformNumericValue(priceHeight / 8)};`,
|
|
74
|
-
`background-color: ${transformColorValue((_a = model.styles) === null || _a === void 0 ? void 0 : _a.saveValueBackgroundColor)};`,
|
|
75
|
-
`color: ${transformColorValue((_b = model.styles) === null || _b === void 0 ? void 0 : _b.saveValueColor)};`
|
|
76
|
-
];
|
|
77
|
-
return values.join('');
|
|
78
|
-
});
|
|
79
|
-
const beforeValueCustomStyles = $derived.by(() => {
|
|
80
|
-
var _a;
|
|
81
|
-
const values = [
|
|
82
|
-
`font-size: ${transformFontSizeValue(priceHeight / 5)};`,
|
|
83
|
-
`font-weight: 500;`,
|
|
84
|
-
`color: ${transformColorValue((_a = model.styles) === null || _a === void 0 ? void 0 : _a.beforeValueColor)};`
|
|
85
|
-
];
|
|
86
|
-
return values.join('');
|
|
87
|
-
});
|
|
88
|
-
const textAfterCustomStyles = $derived.by(() => {
|
|
89
|
-
const values = [`font-size: ${transformFontSizeValue(priceHeight / lineHeight / 2)};`, `font-weight: 500;`, 'align-self: flex-end;'];
|
|
90
|
-
return values.join('');
|
|
91
|
-
});
|
|
92
|
-
const stockElementHeight = $derived(elementHeight * 0.23);
|
|
93
|
-
const adjustHeightToFit = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
94
|
-
if (!priceContainerRef || !priceElementRef || !adjustableHeight) {
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
yield new Promise((resolve) => requestAnimationFrame(resolve));
|
|
98
|
-
let currentHeight = maxElementHeight;
|
|
99
|
-
while (currentHeight > minElementHeight) {
|
|
100
|
-
adjustedHeight = currentHeight;
|
|
101
|
-
yield new Promise((resolve) => requestAnimationFrame(resolve));
|
|
102
|
-
let hasOverflow = priceElementRef.clientWidth < priceContainerRef.clientWidth;
|
|
103
|
-
if (!hasOverflow) {
|
|
104
|
-
break;
|
|
105
|
-
}
|
|
106
|
-
currentHeight -= 1;
|
|
107
|
-
}
|
|
108
|
-
on === null || on === void 0 ? void 0 : on.heightAdjusted(currentHeight);
|
|
109
|
-
});
|
|
110
|
-
const debouncedAdjustHeightToFit = Utils.debounce(adjustHeightToFit, 400);
|
|
111
|
-
$effect(() => {
|
|
112
|
-
const references = [maxElementHeight, currentPrice, saveValue, beforeValue, model.textAfter, model.includeCurrency, model.excludeBeforePrice];
|
|
113
|
-
void references;
|
|
114
|
-
debouncedAdjustHeightToFit();
|
|
115
|
-
});
|
|
116
|
-
</script>
|
|
117
|
-
|
|
118
|
-
<div class="price-stream-element" class:price-stream-element--adjustable={adjustableHeight} style={elementContainerStyles} bind:this={priceElementRef}>
|
|
119
|
-
<div class="price-stream-element__price-container" style={priceContainerStyles} bind:this={priceContainerRef}>
|
|
120
|
-
<div class="price-stream-element__price" style={priceCustomStyles}>
|
|
121
|
-
{currentPrice}
|
|
122
|
-
</div>
|
|
123
|
-
{#if data.salePrice && !model.excludeBeforePrice}
|
|
124
|
-
<div class="price-stream-element__sale-price">
|
|
125
|
-
<div class="price-stream-element__save" style={saveValueCustomStyles}>
|
|
126
|
-
{localization.saveValue(saveValue)}
|
|
127
|
-
</div>
|
|
128
|
-
<div class="price-stream-element__before-price" style={beforeValueCustomStyles}>
|
|
129
|
-
{localization.beforeValue(beforeValue)}
|
|
130
|
-
</div>
|
|
131
|
-
</div>
|
|
132
|
-
{/if}
|
|
133
|
-
{#if model.textAfter}
|
|
134
|
-
<div class="price-stream-element__text-after" style={textAfterCustomStyles}>
|
|
135
|
-
<LineClamp value={model.textAfter} maxLines={1} />
|
|
136
|
-
</div>
|
|
137
|
-
{/if}
|
|
138
|
-
</div>
|
|
139
|
-
{#if model.stock}
|
|
140
|
-
<StockElementView model={model.stock} heightOverrideDdu={stockElementHeight} localization={localization.stockLocalization} />
|
|
141
|
-
{/if}
|
|
142
|
-
</div>
|
|
143
|
-
|
|
144
|
-
<style>@keyframes fadeIn {
|
|
145
|
-
0% {
|
|
146
|
-
opacity: 1;
|
|
147
|
-
}
|
|
148
|
-
50% {
|
|
149
|
-
opacity: 0.4;
|
|
150
|
-
}
|
|
151
|
-
100% {
|
|
152
|
-
opacity: 1;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
.price-stream-element--adjustable {
|
|
156
|
-
position: absolute;
|
|
157
|
-
visibility: hidden;
|
|
158
|
-
width: 100%;
|
|
159
|
-
}
|
|
160
|
-
.price-stream-element__sale-price {
|
|
161
|
-
display: flex;
|
|
162
|
-
height: 100%;
|
|
163
|
-
flex-direction: column;
|
|
164
|
-
justify-content: space-between;
|
|
165
|
-
}
|
|
166
|
-
.price-stream-element__price, .price-stream-element__save, .price-stream-element__before-price {
|
|
167
|
-
white-space: nowrap;
|
|
168
|
-
}</style>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { PriceStreamElementLocalization } from './price-stream-element-localization';
|
|
2
|
-
import type { PriceStreamElementModel } from '../elements';
|
|
3
|
-
import type { StreamLayoutProductPriceModel } from '../models';
|
|
4
|
-
type Props = {
|
|
5
|
-
maxElementHeight: number;
|
|
6
|
-
model: PriceStreamElementModel;
|
|
7
|
-
data: StreamLayoutProductPriceModel;
|
|
8
|
-
localization: PriceStreamElementLocalization;
|
|
9
|
-
on?: {
|
|
10
|
-
heightAdjusted: (height: number) => void;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
declare const PriceElementView: import("svelte").Component<Props, {}, "">;
|
|
14
|
-
type PriceElementView = ReturnType<typeof PriceElementView>;
|
|
15
|
-
export default PriceElementView;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { type Locale } from '../../../core/locale';
|
|
2
|
-
import type { IStockStreamElementLocalization } from './stock-stream-element-localization';
|
|
3
|
-
export interface IPriceStreamElementLocalization {
|
|
4
|
-
saveValue?: (value: string | number) => string;
|
|
5
|
-
beforeValue?: (value: string) => string;
|
|
6
|
-
stockLocalization?: IStockStreamElementLocalization | Locale;
|
|
7
|
-
}
|
|
8
|
-
export declare class PriceStreamElementLocalization {
|
|
9
|
-
saveValue: (value: string | number) => string;
|
|
10
|
-
beforeValue: (value: string) => string;
|
|
11
|
-
stockLocalization: IStockStreamElementLocalization | Locale;
|
|
12
|
-
constructor(init: IPriceStreamElementLocalization | Locale);
|
|
13
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { isLocale } from '../../../core/locale';
|
|
2
|
-
export class PriceStreamElementLocalization {
|
|
3
|
-
saveValue;
|
|
4
|
-
beforeValue;
|
|
5
|
-
stockLocalization;
|
|
6
|
-
constructor(init) {
|
|
7
|
-
this.saveValue = isLocale(init) ? loc.saveValue[init] : init.saveValue || loc.saveValue.en;
|
|
8
|
-
this.beforeValue = isLocale(init) ? loc.beforeValue[init] : init.beforeValue || loc.beforeValue.en;
|
|
9
|
-
this.stockLocalization = isLocale(init) ? init : init.stockLocalization || 'en';
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
const loc = {
|
|
13
|
-
saveValue: {
|
|
14
|
-
en: (value) => `Save ${value}`,
|
|
15
|
-
no: (value) => `Lagre ${value}`
|
|
16
|
-
},
|
|
17
|
-
beforeValue: {
|
|
18
|
-
en: (value) => `Before ${value}`,
|
|
19
|
-
no: (value) => `Før ${value}`
|
|
20
|
-
}
|
|
21
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { type Locale } from '../../../core/locale';
|
|
2
|
-
import type { IShortVideoViewerLocalization } from '../../../short-videos/short-video-viewer';
|
|
3
|
-
export interface IShortVideoStreamElementLocalization {
|
|
4
|
-
shortVideoViewerLocalization?: IShortVideoViewerLocalization | Locale;
|
|
5
|
-
}
|
|
6
|
-
export declare class ShortVideoStreamElementLocalization {
|
|
7
|
-
shortVideoViewerLocalization: IShortVideoViewerLocalization | Locale;
|
|
8
|
-
constructor(init: IShortVideoStreamElementLocalization | Locale);
|
|
9
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { isLocale } from '../../../core/locale';
|
|
2
|
-
export class ShortVideoStreamElementLocalization {
|
|
3
|
-
shortVideoViewerLocalization;
|
|
4
|
-
constructor(init) {
|
|
5
|
-
this.shortVideoViewerLocalization = isLocale(init) ? init : init.shortVideoViewerLocalization || 'en';
|
|
6
|
-
}
|
|
7
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type Locale } from '../../../core/locale';
|
|
2
|
-
export interface IStockStreamElementLocalization {
|
|
3
|
-
quantity?: (value: number, low: boolean) => string;
|
|
4
|
-
}
|
|
5
|
-
export declare class StockStreamElementLocalization {
|
|
6
|
-
quantity: (value: number, low: boolean) => string;
|
|
7
|
-
constructor(init: IStockStreamElementLocalization | Locale);
|
|
8
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { isLocale } from '../../../core/locale';
|
|
2
|
-
export class StockStreamElementLocalization {
|
|
3
|
-
quantity;
|
|
4
|
-
constructor(init) {
|
|
5
|
-
this.quantity = isLocale(init) ? loc.quantity[init] : init.quantity || loc.quantity.en;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
const loc = {
|
|
9
|
-
quantity: {
|
|
10
|
-
en: (value, low) => {
|
|
11
|
-
if (value === 0) {
|
|
12
|
-
return 'Out of stock';
|
|
13
|
-
}
|
|
14
|
-
const plusMark = low || value < 2 ? '' : '+';
|
|
15
|
-
const unit = value === 1 ? 'pc' : 'pcs';
|
|
16
|
-
return `${value}${plusMark} ${unit} in stock`;
|
|
17
|
-
},
|
|
18
|
-
no: (value, low) => {
|
|
19
|
-
if (value === 0) {
|
|
20
|
-
return 'Ikke på lager';
|
|
21
|
-
}
|
|
22
|
-
const plusMark = low || value < 2 ? '' : '+';
|
|
23
|
-
return `${value}${plusMark} stk. på lager`;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { type Locale } from '../../../core/locale';
|
|
2
|
-
import type { IPriceStreamElementLocalization } from './price-stream-element-localization';
|
|
3
|
-
import type { IShortVideoStreamElementLocalization } from './short-video-stream-element-localization';
|
|
4
|
-
import type { IStockStreamElementLocalization } from './stock-stream-element-localization';
|
|
5
|
-
export interface IStreamElementLocalization {
|
|
6
|
-
priceElementLocalization?: IPriceStreamElementLocalization | Locale;
|
|
7
|
-
stockElementLocalization?: IStockStreamElementLocalization | Locale;
|
|
8
|
-
shortVideoElementLocalization?: IShortVideoStreamElementLocalization | Locale;
|
|
9
|
-
}
|
|
10
|
-
export declare class StreamElementLocalization {
|
|
11
|
-
priceElementLocalization: IPriceStreamElementLocalization | Locale;
|
|
12
|
-
stockElementLocalization: IStockStreamElementLocalization | Locale;
|
|
13
|
-
shortVideoElementLocalization: IShortVideoStreamElementLocalization | Locale;
|
|
14
|
-
constructor(init: IStreamElementLocalization | Locale);
|
|
15
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { isLocale } from '../../../core/locale';
|
|
2
|
-
export class StreamElementLocalization {
|
|
3
|
-
priceElementLocalization;
|
|
4
|
-
stockElementLocalization;
|
|
5
|
-
shortVideoElementLocalization;
|
|
6
|
-
constructor(init) {
|
|
7
|
-
this.priceElementLocalization = isLocale(init) ? init : init.priceElementLocalization || 'en';
|
|
8
|
-
this.stockElementLocalization = isLocale(init) ? init : init.stockElementLocalization || 'en';
|
|
9
|
-
this.shortVideoElementLocalization = isLocale(init) ? init : init.shortVideoElementLocalization || 'en';
|
|
10
|
-
}
|
|
11
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { StreamElementModel } from './elements';
|
|
2
|
-
import type { StreamLayout, StreamLayoutTemplate } from './layout';
|
|
3
|
-
export declare const parseToStreamLayout: (value: string) => StreamLayout;
|
|
4
|
-
export declare const parseToStreamLayoutTemplate: (value: string) => StreamLayoutTemplate;
|
|
5
|
-
export declare const stringifyToStreamLayoutInput: (layout: StreamLayout | StreamLayoutTemplate) => string;
|
|
6
|
-
export declare class IdPopulator {
|
|
7
|
-
static populateLayoutIds(layout: {
|
|
8
|
-
$id: string;
|
|
9
|
-
slots: {
|
|
10
|
-
$id: string;
|
|
11
|
-
components: {
|
|
12
|
-
$id: string;
|
|
13
|
-
elements: StreamElementModel[];
|
|
14
|
-
}[];
|
|
15
|
-
}[];
|
|
16
|
-
}): void;
|
|
17
|
-
static populateSlotIds(slot: {
|
|
18
|
-
$id: string;
|
|
19
|
-
components: {
|
|
20
|
-
$id: string;
|
|
21
|
-
elements: StreamElementModel[];
|
|
22
|
-
}[];
|
|
23
|
-
}): void;
|
|
24
|
-
static populateComponentIds(component: {
|
|
25
|
-
$id: string;
|
|
26
|
-
elements: StreamElementModel[];
|
|
27
|
-
}): void;
|
|
28
|
-
static populateElementId(element: StreamElementModel): void;
|
|
29
|
-
}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { Utils } from '../../core/utils';
|
|
2
|
-
import { StreamComponentDataType, StreamElementType } from './enums';
|
|
3
|
-
import { nanoid } from 'nanoid';
|
|
4
|
-
export const parseToStreamLayout = (value) => {
|
|
5
|
-
const layout = JSON.parse(value);
|
|
6
|
-
IdPopulator.populateLayoutIds(layout);
|
|
7
|
-
return layout;
|
|
8
|
-
};
|
|
9
|
-
export const parseToStreamLayoutTemplate = (value) => {
|
|
10
|
-
const layout = JSON.parse(value);
|
|
11
|
-
IdPopulator.populateLayoutIds(layout);
|
|
12
|
-
return layout;
|
|
13
|
-
};
|
|
14
|
-
export const stringifyToStreamLayoutInput = (layout) => {
|
|
15
|
-
const clone = structuredClone($state.snapshot(layout));
|
|
16
|
-
// @ts-expect-error - clearing local data before sending to the server - clearing local data before sending to the server
|
|
17
|
-
delete clone.$id;
|
|
18
|
-
if (clone.slots) {
|
|
19
|
-
clone.slots.forEach((slot) => {
|
|
20
|
-
// @ts-expect-error - clearing local data before sending to the server
|
|
21
|
-
delete slot.$id;
|
|
22
|
-
slot.components.forEach((component) => {
|
|
23
|
-
// @ts-expect-error - clearing local data before sending to the server
|
|
24
|
-
delete component.$id;
|
|
25
|
-
component.elements.forEach(removeElementIdRecursive);
|
|
26
|
-
});
|
|
27
|
-
if ('data' in slot && slot.data) {
|
|
28
|
-
const data = slot.data;
|
|
29
|
-
switch (data.type) {
|
|
30
|
-
case StreamComponentDataType.Images:
|
|
31
|
-
// @ts-expect-error - clearing local data before sending to the server
|
|
32
|
-
delete data.items;
|
|
33
|
-
break;
|
|
34
|
-
case StreamComponentDataType.ShortVideo:
|
|
35
|
-
// @ts-expect-error - clearing local data before sending to the server
|
|
36
|
-
delete data.shortVideo;
|
|
37
|
-
break;
|
|
38
|
-
case StreamComponentDataType.Product:
|
|
39
|
-
// @ts-expect-error - clearing local data before sending to the server
|
|
40
|
-
delete data.product;
|
|
41
|
-
break;
|
|
42
|
-
default:
|
|
43
|
-
Utils.assertUnreachable(data);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
return JSON.stringify(clone);
|
|
49
|
-
};
|
|
50
|
-
const removeElementIdRecursive = (element) => {
|
|
51
|
-
// @ts-expect-error - clearing local data before sending to the server
|
|
52
|
-
delete element.$id;
|
|
53
|
-
if (element.type === StreamElementType.Container && Array.isArray(element.elements)) {
|
|
54
|
-
element.elements.forEach(removeElementIdRecursive);
|
|
55
|
-
}
|
|
56
|
-
if (element.type === StreamElementType.ImageRef && Array.isArray(element.annotations)) {
|
|
57
|
-
element.annotations.forEach((annotation) => {
|
|
58
|
-
// @ts-expect-error - clearing local data before sending to the server
|
|
59
|
-
delete annotation.$id;
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
if (element.type === StreamElementType.Price && element.stock) {
|
|
63
|
-
// @ts-expect-error - clearing local data before sending to the server
|
|
64
|
-
delete element.stock.$id;
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
export class IdPopulator {
|
|
68
|
-
static populateLayoutIds(layout) {
|
|
69
|
-
layout.$id = nanoid(10);
|
|
70
|
-
layout.slots.forEach((slot) => IdPopulator.populateSlotIds(slot));
|
|
71
|
-
}
|
|
72
|
-
static populateSlotIds(slot) {
|
|
73
|
-
slot.$id = nanoid(10);
|
|
74
|
-
slot.components.forEach((component) => IdPopulator.populateComponentIds(component));
|
|
75
|
-
}
|
|
76
|
-
static populateComponentIds(component) {
|
|
77
|
-
component.$id = nanoid(10);
|
|
78
|
-
component.elements.forEach((element) => IdPopulator.populateElementId(element));
|
|
79
|
-
}
|
|
80
|
-
static populateElementId(element) {
|
|
81
|
-
element.$id = nanoid(10);
|
|
82
|
-
// Рекурсивно обрабатываем дочерние элементы
|
|
83
|
-
if (element.type === StreamElementType.Container && element.elements) {
|
|
84
|
-
element.elements.forEach((element) => IdPopulator.populateElementId(element));
|
|
85
|
-
}
|
|
86
|
-
if (element.type === StreamElementType.ImageRef && element.annotations) {
|
|
87
|
-
element.annotations.forEach((element) => IdPopulator.populateElementId(element));
|
|
88
|
-
}
|
|
89
|
-
if (element.type === StreamElementType.Price && element.stock) {
|
|
90
|
-
IdPopulator.populateElementId(element.stock);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { ImagesStreamSlotData, ProductStreamSlotData, ShortVideoStreamSlotData } from './slot-data';
|
|
2
|
-
export type StreamSlotDataRef = Partial<Pick<ImagesStreamSlotData, 'items'>> & Partial<Pick<ProductStreamSlotData, 'product'>> & Partial<Pick<ShortVideoStreamSlotData, 'shortVideo'>>;
|
|
3
|
-
type Prev = [never, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, ...0[]];
|
|
4
|
-
type Join<K, P> = K extends string | number ? (P extends string | number ? `${K}${'' extends P ? '' : '.'}${P}` : never) : never;
|
|
5
|
-
type IsPrimitive<T> = T extends string | number | boolean | null | undefined ? true : false;
|
|
6
|
-
type ExcludeBuiltins<T> = {
|
|
7
|
-
[K in keyof T as K extends keyof any[] ? never : K extends symbol ? never : T[K] extends (...args: any[]) => any ? never : T[K] extends any[] ? never : K]: T[K];
|
|
8
|
-
};
|
|
9
|
-
type Paths<T, D extends number = 4> = [D] extends [never] ? never : T extends object ? {
|
|
10
|
-
[K in keyof ExcludeBuiltins<T>]: K extends string | number ? IsPrimitive<ExcludeBuiltins<T>[K]> extends true ? `${K}` : ExcludeBuiltins<T>[K] extends object | null ? ExcludeBuiltins<T>[K] extends null ? never : Join<K, Paths<ExcludeBuiltins<NonNullable<T[K]>>, Prev[D]>> : never : never;
|
|
11
|
-
}[keyof ExcludeBuiltins<T>] : '';
|
|
12
|
-
export type StreamSlotDataRefPaths = `#${Paths<Required<StreamSlotDataRef>>}`;
|
|
13
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare enum SvgAttributes {
|
|
2
|
-
customizableElement = "data-streams--customizable",
|
|
3
|
-
textElementValueType = "data-streams--text--value-type",
|
|
4
|
-
textElementCustomValue = "data-streams--text--custom-value",
|
|
5
|
-
textElementValueBefore = "data-streams--text--value-before",
|
|
6
|
-
textElementValueAfter = "data-streams--text--value-after"
|
|
7
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export var SvgAttributes;
|
|
2
|
-
(function (SvgAttributes) {
|
|
3
|
-
SvgAttributes["customizableElement"] = "data-streams--customizable";
|
|
4
|
-
SvgAttributes["textElementValueType"] = "data-streams--text--value-type";
|
|
5
|
-
SvgAttributes["textElementCustomValue"] = "data-streams--text--custom-value";
|
|
6
|
-
SvgAttributes["textElementValueBefore"] = "data-streams--text--value-before";
|
|
7
|
-
SvgAttributes["textElementValueAfter"] = "data-streams--text--value-after";
|
|
8
|
-
})(SvgAttributes || (SvgAttributes = {}));
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { type Locale } from '../../core/locale';
|
|
2
|
-
import type { IStreamElementLocalization } from '../layout/element-views';
|
|
3
|
-
export interface IStreamPageViewerLocalization {
|
|
4
|
-
elementsLocalization?: IStreamElementLocalization | Locale;
|
|
5
|
-
}
|
|
6
|
-
export declare class StreamPageViewerLocalization {
|
|
7
|
-
elementsLocalization: IStreamElementLocalization | Locale;
|
|
8
|
-
constructor(init: IStreamPageViewerLocalization | Locale);
|
|
9
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { type Locale } from '../../core/locale';
|
|
2
|
-
import type { IShortVideoAttachmentsLocalization, IShortVideoDetailsLocalization, IShortVideoViewerLocalization } from '../../short-videos/short-video-viewer';
|
|
3
|
-
import type { IStreamPageViewerLocalization } from '../stream-page-viewer';
|
|
4
|
-
import type { ISwipeIndicatorLocalization } from '../../ui/swipe-indicator';
|
|
5
|
-
import type { ITimeAgoLocalization } from '../../ui/time-ago';
|
|
6
|
-
export interface IStreamPlayerLocalization {
|
|
7
|
-
streamNotFound?: string;
|
|
8
|
-
pagesCount?: (count: number) => string;
|
|
9
|
-
timeAgoLocalization?: ITimeAgoLocalization | Locale;
|
|
10
|
-
streamPageViewerLocalization?: IStreamPageViewerLocalization | Locale;
|
|
11
|
-
shortVideoAttachmentsLocalization?: IShortVideoAttachmentsLocalization | Locale;
|
|
12
|
-
shortVideoDetailsLocalization?: IShortVideoDetailsLocalization | Locale;
|
|
13
|
-
shortVideoViewerLocalization?: IShortVideoViewerLocalization | Locale;
|
|
14
|
-
swipeIndicatorLocalization?: ISwipeIndicatorLocalization | Locale;
|
|
15
|
-
}
|
|
16
|
-
export declare class StreamPlayerLocalization {
|
|
17
|
-
streamNotFound: string;
|
|
18
|
-
pagesCount: (count: number) => string;
|
|
19
|
-
timeAgoLocalization: ITimeAgoLocalization | Locale;
|
|
20
|
-
streamPageViewerLocalization: IStreamPageViewerLocalization | Locale;
|
|
21
|
-
shortVideoAttachmentsLocalization: IShortVideoAttachmentsLocalization | Locale;
|
|
22
|
-
shortVideoDetailsLocalization: IShortVideoDetailsLocalization | Locale;
|
|
23
|
-
shortVideoViewerLocalization: IShortVideoViewerLocalization | Locale;
|
|
24
|
-
swipeIndicatorLocalization: ISwipeIndicatorLocalization | Locale;
|
|
25
|
-
constructor(init: IStreamPlayerLocalization | Locale);
|
|
26
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { isLocale } from '../../core/locale';
|
|
2
|
-
export class StreamPlayerLocalization {
|
|
3
|
-
streamNotFound;
|
|
4
|
-
pagesCount;
|
|
5
|
-
timeAgoLocalization;
|
|
6
|
-
streamPageViewerLocalization;
|
|
7
|
-
shortVideoAttachmentsLocalization;
|
|
8
|
-
shortVideoDetailsLocalization;
|
|
9
|
-
shortVideoViewerLocalization;
|
|
10
|
-
swipeIndicatorLocalization;
|
|
11
|
-
constructor(init) {
|
|
12
|
-
this.streamNotFound = isLocale(init) ? loc.streamNotFound[init] : init?.streamNotFound || loc.streamNotFound.en;
|
|
13
|
-
this.pagesCount = isLocale(init) ? loc.pagesCount[init] : init?.pagesCount || loc.pagesCount.en;
|
|
14
|
-
this.timeAgoLocalization = isLocale(init) ? init : init.timeAgoLocalization || 'en';
|
|
15
|
-
this.streamPageViewerLocalization = isLocale(init) ? init : init.streamPageViewerLocalization || 'en';
|
|
16
|
-
this.shortVideoAttachmentsLocalization = isLocale(init) ? init : init.shortVideoAttachmentsLocalization || 'en';
|
|
17
|
-
this.shortVideoDetailsLocalization = isLocale(init) ? init : init.shortVideoDetailsLocalization || 'en';
|
|
18
|
-
this.shortVideoViewerLocalization = isLocale(init) ? init : init.shortVideoViewerLocalization || 'en';
|
|
19
|
-
this.swipeIndicatorLocalization = isLocale(init) ? init : init.swipeIndicatorLocalization || 'en';
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
const loc = {
|
|
23
|
-
streamNotFound: {
|
|
24
|
-
en: 'Stream not found',
|
|
25
|
-
no: 'Stream ikke funnet'
|
|
26
|
-
},
|
|
27
|
-
pagesCount: {
|
|
28
|
-
en: (count) => (count === 1 ? '1 page' : `${count} pages`),
|
|
29
|
-
no: (count) => (count === 1 ? '1 side' : `${count} sider`)
|
|
30
|
-
}
|
|
31
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { isLocale } from '../../core/locale';
|
|
2
|
-
export class LineClampLocalization {
|
|
3
|
-
showLess;
|
|
4
|
-
showMore;
|
|
5
|
-
constructor(init) {
|
|
6
|
-
this.showLess = isLocale(init) ? loc.showLess[init] : init.showLess || loc.showLess.en;
|
|
7
|
-
this.showMore = isLocale(init) ? loc.showMore[init] : init.showMore || loc.showMore.en;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
const loc = {
|
|
11
|
-
showLess: {
|
|
12
|
-
en: 'Show less',
|
|
13
|
-
no: 'Vis mindre'
|
|
14
|
-
},
|
|
15
|
-
showMore: {
|
|
16
|
-
en: 'Show more',
|
|
17
|
-
no: 'Vis mer'
|
|
18
|
-
}
|
|
19
|
-
};
|