@italia/video 0.1.0-alpha.2 → 1.0.0-alpha.5
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/README.md +2 -2
- package/custom-elements.json +7 -23
- package/dist/src/it-video.d.ts.map +1 -1
- package/dist/src/it-video.js +195 -80
- package/dist/src/it-video.js.map +1 -1
- package/package.json +13 -8
package/dist/src/it-video.js
CHANGED
|
@@ -543,8 +543,12 @@ function requireDomElement () {
|
|
|
543
543
|
|
|
544
544
|
DOMElement.prototype.removeAttributeNS =
|
|
545
545
|
function _Element_removeAttributeNS(namespace, name) {
|
|
546
|
+
// Prevent prototype pollution by checking if namespace is a direct property
|
|
547
|
+
if (!Object.prototype.hasOwnProperty.call(this._attributes, namespace)) {
|
|
548
|
+
return;
|
|
549
|
+
}
|
|
546
550
|
var attributes = this._attributes[namespace];
|
|
547
|
-
if (attributes) {
|
|
551
|
+
if (attributes && Object.prototype.hasOwnProperty.call(attributes, name)) {
|
|
548
552
|
delete attributes[name];
|
|
549
553
|
}
|
|
550
554
|
};
|
|
@@ -7175,6 +7179,9 @@ function requireDom () {
|
|
|
7175
7179
|
}
|
|
7176
7180
|
do{
|
|
7177
7181
|
newFirst.parentNode = parent;
|
|
7182
|
+
// Update ownerDocument for each node being inserted
|
|
7183
|
+
var targetDoc = parent.ownerDocument || parent;
|
|
7184
|
+
_updateOwnerDocument(newFirst, targetDoc);
|
|
7178
7185
|
}while(newFirst !== newLast && (newFirst= newFirst.nextSibling))
|
|
7179
7186
|
_onUpdateChild(parent.ownerDocument||parent, parent);
|
|
7180
7187
|
//console.log(parent.lastChild.nextSibling == null)
|
|
@@ -7184,6 +7191,37 @@ function requireDom () {
|
|
|
7184
7191
|
return node;
|
|
7185
7192
|
}
|
|
7186
7193
|
|
|
7194
|
+
/**
|
|
7195
|
+
* Recursively updates the ownerDocument property for a node and all its descendants
|
|
7196
|
+
* @param {Node} node
|
|
7197
|
+
* @param {Document} newOwnerDocument
|
|
7198
|
+
* @private
|
|
7199
|
+
*/
|
|
7200
|
+
function _updateOwnerDocument(node, newOwnerDocument) {
|
|
7201
|
+
if (node.ownerDocument === newOwnerDocument) {
|
|
7202
|
+
return;
|
|
7203
|
+
}
|
|
7204
|
+
|
|
7205
|
+
node.ownerDocument = newOwnerDocument;
|
|
7206
|
+
|
|
7207
|
+
// Update attributes if this is an element
|
|
7208
|
+
if (node.nodeType === ELEMENT_NODE && node.attributes) {
|
|
7209
|
+
for (var i = 0; i < node.attributes.length; i++) {
|
|
7210
|
+
var attr = node.attributes.item(i);
|
|
7211
|
+
if (attr) {
|
|
7212
|
+
attr.ownerDocument = newOwnerDocument;
|
|
7213
|
+
}
|
|
7214
|
+
}
|
|
7215
|
+
}
|
|
7216
|
+
|
|
7217
|
+
// Recursively update child nodes
|
|
7218
|
+
var child = node.firstChild;
|
|
7219
|
+
while (child) {
|
|
7220
|
+
_updateOwnerDocument(child, newOwnerDocument);
|
|
7221
|
+
child = child.nextSibling;
|
|
7222
|
+
}
|
|
7223
|
+
}
|
|
7224
|
+
|
|
7187
7225
|
/**
|
|
7188
7226
|
* Appends `newChild` to `parentNode`.
|
|
7189
7227
|
* If `newChild` is already connected to a `parentNode` it is first removed from it.
|
|
@@ -7209,6 +7247,11 @@ function requireDom () {
|
|
|
7209
7247
|
}
|
|
7210
7248
|
parentNode.lastChild = newChild;
|
|
7211
7249
|
_onUpdateChild(parentNode.ownerDocument, parentNode, newChild);
|
|
7250
|
+
|
|
7251
|
+
// Update ownerDocument for the new child and all its descendants
|
|
7252
|
+
var targetDoc = parentNode.ownerDocument || parentNode;
|
|
7253
|
+
_updateOwnerDocument(newChild, targetDoc);
|
|
7254
|
+
|
|
7212
7255
|
return newChild;
|
|
7213
7256
|
}
|
|
7214
7257
|
|
|
@@ -7237,7 +7280,7 @@ function requireDom () {
|
|
|
7237
7280
|
return newChild;
|
|
7238
7281
|
}
|
|
7239
7282
|
_insertBefore(this, newChild, refChild);
|
|
7240
|
-
newChild
|
|
7283
|
+
_updateOwnerDocument(newChild, this);
|
|
7241
7284
|
if (this.documentElement === null && newChild.nodeType === ELEMENT_NODE) {
|
|
7242
7285
|
this.documentElement = newChild;
|
|
7243
7286
|
}
|
|
@@ -7253,7 +7296,7 @@ function requireDom () {
|
|
|
7253
7296
|
replaceChild: function (newChild, oldChild) {
|
|
7254
7297
|
//raises
|
|
7255
7298
|
_insertBefore(this, newChild, oldChild, assertPreReplacementValidityInDocument);
|
|
7256
|
-
newChild
|
|
7299
|
+
_updateOwnerDocument(newChild, this);
|
|
7257
7300
|
if (oldChild) {
|
|
7258
7301
|
this.removeChild(oldChild);
|
|
7259
7302
|
}
|
|
@@ -8033,7 +8076,7 @@ var hasRequiredEntities;
|
|
|
8033
8076
|
function requireEntities () {
|
|
8034
8077
|
if (hasRequiredEntities) return entities;
|
|
8035
8078
|
hasRequiredEntities = 1;
|
|
8036
|
-
(function (exports) {
|
|
8079
|
+
(function (exports$1) {
|
|
8037
8080
|
|
|
8038
8081
|
var freeze = requireConventions().freeze;
|
|
8039
8082
|
|
|
@@ -8044,7 +8087,7 @@ function requireEntities () {
|
|
|
8044
8087
|
* @see https://www.w3.org/TR/2008/REC-xml-20081126/#sec-predefined-ent W3C XML 1.0
|
|
8045
8088
|
* @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Predefined_entities_in_XML Wikipedia
|
|
8046
8089
|
*/
|
|
8047
|
-
exports.XML_ENTITIES = freeze({
|
|
8090
|
+
exports$1.XML_ENTITIES = freeze({
|
|
8048
8091
|
amp: '&',
|
|
8049
8092
|
apos: "'",
|
|
8050
8093
|
gt: '>',
|
|
@@ -8066,7 +8109,7 @@ function requireEntities () {
|
|
|
8066
8109
|
* @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Character_entity_references_in_HTML Wikipedia (HTML)
|
|
8067
8110
|
* @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Entities_representing_special_characters_in_XHTML Wikpedia (XHTML)
|
|
8068
8111
|
*/
|
|
8069
|
-
exports.HTML_ENTITIES = freeze({
|
|
8112
|
+
exports$1.HTML_ENTITIES = freeze({
|
|
8070
8113
|
Aacute: '\u00C1',
|
|
8071
8114
|
aacute: '\u00E1',
|
|
8072
8115
|
Abreve: '\u0102',
|
|
@@ -10198,7 +10241,7 @@ function requireEntities () {
|
|
|
10198
10241
|
* @deprecated use `HTML_ENTITIES` instead
|
|
10199
10242
|
* @see HTML_ENTITIES
|
|
10200
10243
|
*/
|
|
10201
|
-
exports.entityMap = exports.HTML_ENTITIES;
|
|
10244
|
+
exports$1.entityMap = exports$1.HTML_ENTITIES;
|
|
10202
10245
|
} (entities));
|
|
10203
10246
|
return entities;
|
|
10204
10247
|
}
|
|
@@ -70397,6 +70440,7 @@ const interactions = new WeakMap();
|
|
|
70397
70440
|
/** A reactive controller to allow form controls to participate in form submission, validation, etc. */
|
|
70398
70441
|
class FormControlController {
|
|
70399
70442
|
constructor(host, options) {
|
|
70443
|
+
this.submittedOnce = false;
|
|
70400
70444
|
this.handleFormData = (event) => {
|
|
70401
70445
|
// console.log('handleFormData');
|
|
70402
70446
|
const disabled = this.options.disabled(this.host);
|
|
@@ -70418,6 +70462,17 @@ class FormControlController {
|
|
|
70418
70462
|
event.formData.append(name, value);
|
|
70419
70463
|
}
|
|
70420
70464
|
break;
|
|
70465
|
+
case 'it-checkbox':
|
|
70466
|
+
if (this.host.checked) {
|
|
70467
|
+
if (event.formData.getAll(name).indexOf(value) < 0) {
|
|
70468
|
+
// handle group checkbox
|
|
70469
|
+
event.formData.append(name, value);
|
|
70470
|
+
}
|
|
70471
|
+
}
|
|
70472
|
+
break;
|
|
70473
|
+
case 'it-checkbox-group':
|
|
70474
|
+
// non settare valori in formData, perchè ogni singola checkbox setta il suo valore
|
|
70475
|
+
break;
|
|
70421
70476
|
default:
|
|
70422
70477
|
if (Array.isArray(value)) {
|
|
70423
70478
|
value.forEach((val) => {
|
|
@@ -70439,13 +70494,30 @@ class FormControlController {
|
|
|
70439
70494
|
this.setUserInteracted(control, true);
|
|
70440
70495
|
});
|
|
70441
70496
|
}
|
|
70442
|
-
|
|
70497
|
+
const resReportValidity = reportValidity(this.host);
|
|
70498
|
+
if (this.form && !this.form.noValidate && !disabled && !resReportValidity) {
|
|
70443
70499
|
event.preventDefault();
|
|
70444
70500
|
// event.stopImmediatePropagation(); // se lo attiviamo, valida un campo alla volta
|
|
70501
|
+
// Scroll al primo controllo non valido
|
|
70502
|
+
const formControls = formCollections.get(this.form);
|
|
70503
|
+
if (formControls) {
|
|
70504
|
+
for (const control of formControls) {
|
|
70505
|
+
if (!control.validity?.valid) {
|
|
70506
|
+
// Scroll smooth verso il controllo non valido
|
|
70507
|
+
control.scrollIntoView({
|
|
70508
|
+
behavior: 'smooth',
|
|
70509
|
+
block: 'center',
|
|
70510
|
+
});
|
|
70511
|
+
break;
|
|
70512
|
+
}
|
|
70513
|
+
}
|
|
70514
|
+
}
|
|
70445
70515
|
}
|
|
70516
|
+
this.submittedOnce = true;
|
|
70446
70517
|
};
|
|
70447
70518
|
this.handleFormReset = () => {
|
|
70448
70519
|
this.options.setValue(this.host, '');
|
|
70520
|
+
this.submittedOnce = false;
|
|
70449
70521
|
this.setUserInteracted(this.host, false);
|
|
70450
70522
|
interactions.set(this.host, []);
|
|
70451
70523
|
};
|
|
@@ -70610,6 +70682,7 @@ class FormControlController {
|
|
|
70610
70682
|
if (!formCollection) {
|
|
70611
70683
|
return;
|
|
70612
70684
|
}
|
|
70685
|
+
this.submittedOnce = false;
|
|
70613
70686
|
// Remove this host from the form's collection
|
|
70614
70687
|
formCollection.delete(this.host);
|
|
70615
70688
|
// Check to make sure there's no other form controls in the collection. If we do this
|
|
@@ -70706,6 +70779,10 @@ class FormControlController {
|
|
|
70706
70779
|
host.toggleAttribute('data-user-invalid', !isValid && hasInteracted);
|
|
70707
70780
|
host.toggleAttribute('data-user-valid', isValid && hasInteracted);
|
|
70708
70781
|
}
|
|
70782
|
+
userInteracted() {
|
|
70783
|
+
const hasInteracted = Boolean(userInteractedControls.has(this.host));
|
|
70784
|
+
return hasInteracted;
|
|
70785
|
+
}
|
|
70709
70786
|
/**
|
|
70710
70787
|
* Updates the form control's validity based on the current value of `host.validity.valid`. Call this when anything
|
|
70711
70788
|
* that affects constraint validation changes so the component receives the correct validity states.
|
|
@@ -70742,6 +70819,7 @@ const translation$2 = {
|
|
|
70742
70819
|
$name: 'Italiano',
|
|
70743
70820
|
$dir: 'ltr',
|
|
70744
70821
|
validityRequired: 'Questo campo è obbligatorio.',
|
|
70822
|
+
validityGroupRequired: "Scegli almeno un'opzione",
|
|
70745
70823
|
validityPattern: 'Il valore non corrisponde al formato richiesto.',
|
|
70746
70824
|
validityMinlength: 'Il valore deve essere lungo almeno {minlength} caratteri.',
|
|
70747
70825
|
validityMaxlength: 'Il valore deve essere lungo al massimo {maxlength} caratteri.',
|
|
@@ -70786,24 +70864,27 @@ class FormControl extends BaseLocalizedComponent {
|
|
|
70786
70864
|
this.maxlength = -1;
|
|
70787
70865
|
/** If the input is required. */
|
|
70788
70866
|
this.required = false;
|
|
70867
|
+
/* For grouped input, like checkbox-group */
|
|
70868
|
+
this.isInGroup = false;
|
|
70789
70869
|
this.validationMessage = '';
|
|
70790
70870
|
}
|
|
70791
70871
|
/** Gets the validity state object */
|
|
70792
70872
|
get validity() {
|
|
70793
70873
|
return this.inputElement?.validity;
|
|
70794
70874
|
}
|
|
70875
|
+
/** Gets the associated form, if one exists. */
|
|
70876
|
+
getForm() {
|
|
70877
|
+
return this.formControlController.getForm();
|
|
70878
|
+
}
|
|
70795
70879
|
// Form validation methods
|
|
70796
70880
|
checkValidity() {
|
|
70797
70881
|
const inputValid = this.inputElement?.checkValidity() ?? true; // this.inputElement.checkValidity() è la validazione del browser
|
|
70798
70882
|
return inputValid;
|
|
70799
70883
|
}
|
|
70800
|
-
/** Gets the associated form, if one exists. */
|
|
70801
|
-
getForm() {
|
|
70802
|
-
return this.formControlController.getForm();
|
|
70803
|
-
}
|
|
70804
70884
|
/** Checks for validity and shows the browser's validation message if the control is invalid. */
|
|
70805
70885
|
reportValidity() {
|
|
70806
|
-
const ret = this.inputElement.checkValidity();
|
|
70886
|
+
// const ret = this.inputElement.checkValidity();
|
|
70887
|
+
const ret = this.checkValidity(); // chiama la checkValidity, che se è stata overridata chiama quella
|
|
70807
70888
|
this.handleValidationMessages();
|
|
70808
70889
|
return ret; // this.inputElement.reportValidity();
|
|
70809
70890
|
}
|
|
@@ -70848,7 +70929,8 @@ class FormControl extends BaseLocalizedComponent {
|
|
|
70848
70929
|
handleValidationMessages() {
|
|
70849
70930
|
if (!this.customValidation) {
|
|
70850
70931
|
const _v = this.inputElement.validity;
|
|
70851
|
-
|
|
70932
|
+
const isRequiredHandledByGroup = this.isInGroup === true;
|
|
70933
|
+
if (_v.valueMissing && !isRequiredHandledByGroup) {
|
|
70852
70934
|
this.setCustomValidity(this.$t('validityRequired'));
|
|
70853
70935
|
}
|
|
70854
70936
|
else if (_v.patternMismatch) {
|
|
@@ -70919,7 +71001,7 @@ class FormControl extends BaseLocalizedComponent {
|
|
|
70919
71001
|
if (this.customValidation) {
|
|
70920
71002
|
this.setCustomValidity(this.validationText ?? '');
|
|
70921
71003
|
}
|
|
70922
|
-
else {
|
|
71004
|
+
else if (this.formControlController.userInteracted()) {
|
|
70923
71005
|
this.formControlController.updateValidity();
|
|
70924
71006
|
}
|
|
70925
71007
|
}
|
|
@@ -70987,6 +71069,10 @@ __decorate([
|
|
|
70987
71069
|
,
|
|
70988
71070
|
__metadata("design:type", Object)
|
|
70989
71071
|
], FormControl.prototype, "required", void 0);
|
|
71072
|
+
__decorate([
|
|
71073
|
+
property({ type: Boolean }),
|
|
71074
|
+
__metadata("design:type", Object)
|
|
71075
|
+
], FormControl.prototype, "isInGroup", void 0);
|
|
70990
71076
|
__decorate([
|
|
70991
71077
|
state(),
|
|
70992
71078
|
__metadata("design:type", Object)
|
|
@@ -71022,6 +71108,14 @@ const cookies = {
|
|
|
71022
71108
|
clearAllRememberedChoices,
|
|
71023
71109
|
};
|
|
71024
71110
|
|
|
71111
|
+
if (typeof window !== 'undefined') {
|
|
71112
|
+
window._itAnalytics = window._itAnalytics || {};
|
|
71113
|
+
window._itAnalytics = {
|
|
71114
|
+
...window._itAnalytics,
|
|
71115
|
+
version: '1.0.0-alpha.5',
|
|
71116
|
+
};
|
|
71117
|
+
}
|
|
71118
|
+
|
|
71025
71119
|
/* eslint-disable class-methods-use-this */
|
|
71026
71120
|
/* eslint-disable prefer-destructuring */
|
|
71027
71121
|
/* eslint-disable dot-notation */
|
|
@@ -73951,14 +74045,14 @@ video::-webkit-media-text-track-display {
|
|
|
73951
74045
|
|
|
73952
74046
|
/* stylelint-enable */
|
|
73953
74047
|
.vjs-theme-bootstrap-italia {
|
|
73954
|
-
--
|
|
73955
|
-
--
|
|
74048
|
+
--bsi-videoplayer-button-background: var(--bsi-color-background-primary);
|
|
74049
|
+
--bsi-videoplayer-control-background: var(--bsi-color-background-primary);
|
|
73956
74050
|
}
|
|
73957
74051
|
.vjs-theme-bootstrap-italia .vjs-big-play-button, .vjs-theme-bootstrap-italia:hover .vjs-big-play-button, .vjs-theme-bootstrap-italia.vjs-big-play-button:focus {
|
|
73958
|
-
background-color: var(--
|
|
74052
|
+
background-color: var(--bsi-videoplayer-button-background);
|
|
73959
74053
|
}
|
|
73960
74054
|
.vjs-theme-bootstrap-italia .vjs-control-bar {
|
|
73961
|
-
background-color: var(--
|
|
74055
|
+
background-color: var(--bsi-videoplayer-control-background);
|
|
73962
74056
|
font-size: 1rem;
|
|
73963
74057
|
}
|
|
73964
74058
|
@media (min-width: 992px) {
|
|
@@ -74006,18 +74100,21 @@ video::-webkit-media-text-track-display {
|
|
|
74006
74100
|
}
|
|
74007
74101
|
}
|
|
74008
74102
|
.acceptoverlay {
|
|
74009
|
-
--
|
|
74010
|
-
--
|
|
74011
|
-
--
|
|
74012
|
-
--
|
|
74013
|
-
--
|
|
74014
|
-
--
|
|
74015
|
-
--
|
|
74016
|
-
--
|
|
74017
|
-
--
|
|
74018
|
-
--
|
|
74019
|
-
--
|
|
74020
|
-
|
|
74103
|
+
--bsi-acceptoverlay-color-background: var(--bsi-color-background-inverse);
|
|
74104
|
+
--bsi-acceptoverlay-color-text: var(--bsi-color-text);
|
|
74105
|
+
--bsi-acceptoverlay-label-color: var(--bsi-color-text-secondary);
|
|
74106
|
+
--bsi-acceptoverlay-label-border-color: var(--bsi-color-border-subtle);
|
|
74107
|
+
--bsi-acceptoverlay-opacity: 0.9;
|
|
74108
|
+
--bsi-acceptoverlay-spacing-inset: var(--bsi-spacing-s);
|
|
74109
|
+
--bsi-acceptoverlay-primary-opacity: 0.95;
|
|
74110
|
+
--bsi-acceptoverlay-inner-width: 600px;
|
|
74111
|
+
--bsi-acceptoverlay-icon-spacing: var(--bsi-spacing-s);
|
|
74112
|
+
--bsi-acceptoverlay-icon-fill: var(--bsi-icon-primary);
|
|
74113
|
+
--bsi-acceptoverlay-buttons-spacing: var(--bsi-spacing-s);
|
|
74114
|
+
}
|
|
74115
|
+
|
|
74116
|
+
/* stylelint-disable-next-line no-duplicate-selectors */
|
|
74117
|
+
.acceptoverlay {
|
|
74021
74118
|
position: absolute;
|
|
74022
74119
|
top: 0;
|
|
74023
74120
|
right: 0;
|
|
@@ -74028,13 +74125,13 @@ video::-webkit-media-text-track-display {
|
|
|
74028
74125
|
flex-wrap: wrap;
|
|
74029
74126
|
align-items: flex-start;
|
|
74030
74127
|
justify-content: center;
|
|
74031
|
-
padding: var(--
|
|
74032
|
-
opacity: var(--
|
|
74033
|
-
background-color: var(--
|
|
74128
|
+
padding: var(--bsi-acceptoverlay-spacing-inset);
|
|
74129
|
+
opacity: var(--bsi-acceptoverlay-opacity);
|
|
74130
|
+
background-color: var(--bsi-acceptoverlay-background-color);
|
|
74034
74131
|
}
|
|
74035
74132
|
@media (min-width: 768px) {
|
|
74036
74133
|
.acceptoverlay {
|
|
74037
|
-
--
|
|
74134
|
+
--bsi-acceptoverlay-spacing-inset: var(--bsi-spacing-m);
|
|
74038
74135
|
}
|
|
74039
74136
|
}
|
|
74040
74137
|
@media (min-width: 992px) {
|
|
@@ -74043,19 +74140,19 @@ video::-webkit-media-text-track-display {
|
|
|
74043
74140
|
}
|
|
74044
74141
|
}
|
|
74045
74142
|
.acceptoverlay label {
|
|
74046
|
-
color: var(--
|
|
74143
|
+
color: var(--bsi-acceptoverlay-label-color);
|
|
74047
74144
|
}
|
|
74048
74145
|
.acceptoverlay label::after {
|
|
74049
|
-
border-color: var(--
|
|
74146
|
+
border-color: var(--bsi-acceptoverlay-label-border-color) !important;
|
|
74050
74147
|
}
|
|
74051
74148
|
.acceptoverlay[aria-hidden=true] {
|
|
74052
74149
|
display: none;
|
|
74053
74150
|
}
|
|
74054
74151
|
.acceptoverlay.acceptoverlay-primary {
|
|
74055
|
-
--
|
|
74152
|
+
--bsi-acceptoverlay-background-color: var(--bsi-color-background-primary);
|
|
74056
74153
|
}
|
|
74057
74154
|
.acceptoverlay.acceptoverlay-primary.show {
|
|
74058
|
-
opacity: var(--
|
|
74155
|
+
opacity: var(--bsi-acceptoverlay-primary-opacity);
|
|
74059
74156
|
}
|
|
74060
74157
|
.acceptoverlay h1,
|
|
74061
74158
|
.acceptoverlay h2,
|
|
@@ -74065,7 +74162,7 @@ video::-webkit-media-text-track-display {
|
|
|
74065
74162
|
.acceptoverlay h6,
|
|
74066
74163
|
.acceptoverlay p {
|
|
74067
74164
|
margin-bottom: 0;
|
|
74068
|
-
color: var(--
|
|
74165
|
+
color: var(--bsi-acceptoverlay-color-text);
|
|
74069
74166
|
}
|
|
74070
74167
|
.acceptoverlay h4 {
|
|
74071
74168
|
text-align: center;
|
|
@@ -74075,19 +74172,19 @@ video::-webkit-media-text-track-display {
|
|
|
74075
74172
|
}
|
|
74076
74173
|
.acceptoverlay .acceptoverlay-inner {
|
|
74077
74174
|
width: 100%;
|
|
74078
|
-
max-width: var(--
|
|
74175
|
+
max-width: var(--bsi-acceptoverlay-inner-width);
|
|
74079
74176
|
}
|
|
74080
74177
|
.acceptoverlay .acceptoverlay-icon {
|
|
74081
|
-
margin-bottom: var(--
|
|
74178
|
+
margin-bottom: var(--bsi-acceptoverlay-icon-spacing);
|
|
74082
74179
|
text-align: center;
|
|
74083
74180
|
}
|
|
74084
74181
|
@media (min-width: 768px) {
|
|
74085
74182
|
.acceptoverlay .acceptoverlay-icon {
|
|
74086
|
-
--
|
|
74183
|
+
--bsi-acceptoverlay-icon-margin-bottom: var(--bsi-spacing-xxl);
|
|
74087
74184
|
}
|
|
74088
74185
|
}
|
|
74089
74186
|
.acceptoverlay .acceptoverlay-icon .icon {
|
|
74090
|
-
fill: var(--
|
|
74187
|
+
fill: var(--bsi-acceptoverlay-icon-fill);
|
|
74091
74188
|
}
|
|
74092
74189
|
.acceptoverlay .acceptoverlay-buttons {
|
|
74093
74190
|
display: flex;
|
|
@@ -74095,14 +74192,14 @@ video::-webkit-media-text-track-display {
|
|
|
74095
74192
|
gap: 1rem;
|
|
74096
74193
|
flex-wrap: wrap;
|
|
74097
74194
|
justify-content: space-between;
|
|
74098
|
-
margin-top: var(--
|
|
74195
|
+
margin-top: var(--bsi-acceptoverlay-buttons-spacing);
|
|
74099
74196
|
background-color: transparent !important;
|
|
74100
74197
|
}
|
|
74101
74198
|
.acceptoverlay .acceptoverlay-buttons button {
|
|
74102
74199
|
width: 100%;
|
|
74103
74200
|
}
|
|
74104
74201
|
.acceptoverlay .acceptoverlay-buttons button:last-child {
|
|
74105
|
-
--
|
|
74202
|
+
--bsi-acceptoverlay-buttons-spacing: var(--bsi-spacing-xxs);
|
|
74106
74203
|
}
|
|
74107
74204
|
.acceptoverlay .acceptoverlay-buttons.single-button button {
|
|
74108
74205
|
margin-top: 0;
|
|
@@ -74117,7 +74214,7 @@ video::-webkit-media-text-track-display {
|
|
|
74117
74214
|
margin-top: 0 !important;
|
|
74118
74215
|
}
|
|
74119
74216
|
.acceptoverlay-buttons button:last-child {
|
|
74120
|
-
margin-left: var(--
|
|
74217
|
+
margin-left: var(--bsi-spacing-m);
|
|
74121
74218
|
}
|
|
74122
74219
|
.acceptoverlay-buttons.single-button button {
|
|
74123
74220
|
width: auto;
|
|
@@ -74132,24 +74229,30 @@ video::-webkit-media-text-track-display {
|
|
|
74132
74229
|
min-height: 450px;
|
|
74133
74230
|
}
|
|
74134
74231
|
|
|
74232
|
+
.acceptoverlayable {
|
|
74233
|
+
aspect-ratio: 16 / 9;
|
|
74234
|
+
}
|
|
74235
|
+
|
|
74135
74236
|
.acceptoverlay {
|
|
74136
|
-
--
|
|
74237
|
+
--bsi-acceptoverlay-color-text: #fff;
|
|
74238
|
+
--bsi-form-control-label-color: #fff;
|
|
74239
|
+
--bsi-form-checkbox-border-color: #fff;
|
|
74137
74240
|
}
|
|
74138
74241
|
.acceptoverlay a {
|
|
74139
|
-
color: var(--
|
|
74242
|
+
color: var(--bsi-acceptoverlay-color-text);
|
|
74140
74243
|
}
|
|
74141
74244
|
.acceptoverlay .bg-dark it-button::part(primary) {
|
|
74142
|
-
--
|
|
74143
|
-
--
|
|
74245
|
+
--bsi-btn-text-color: var(--bsi-color-background-primary);
|
|
74246
|
+
--bsi-btn-background: var(--bsi-color-background-inverse);
|
|
74144
74247
|
}
|
|
74145
74248
|
.acceptoverlay .bg-dark it-button::part(primary):hover {
|
|
74146
|
-
--
|
|
74249
|
+
--bsi-btn-text-color: var(--bsi-color-text);
|
|
74147
74250
|
}
|
|
74148
74251
|
.acceptoverlay .acceptoverlay-buttons it-button {
|
|
74149
74252
|
width: 100%;
|
|
74150
74253
|
}
|
|
74151
74254
|
.acceptoverlay .acceptoverlay-buttons it-button:last-child {
|
|
74152
|
-
--
|
|
74255
|
+
--bsi-acceptoverlay-buttons-spacing: var(--bsi-spacing-xxs);
|
|
74153
74256
|
}
|
|
74154
74257
|
@media (min-width: 768px) {
|
|
74155
74258
|
.acceptoverlay .acceptoverlay-buttons {
|
|
@@ -74159,7 +74262,7 @@ video::-webkit-media-text-track-display {
|
|
|
74159
74262
|
width: 50%;
|
|
74160
74263
|
}
|
|
74161
74264
|
.acceptoverlay .acceptoverlay-buttons it-button:last-child {
|
|
74162
|
-
margin-left: var(--
|
|
74265
|
+
margin-left: var(--bsi-spacing-m);
|
|
74163
74266
|
}
|
|
74164
74267
|
.acceptoverlay .acceptoverlay-buttons.single-button it-button {
|
|
74165
74268
|
width: auto;
|
|
@@ -74184,9 +74287,15 @@ video:not([width]) {
|
|
|
74184
74287
|
width: var(--it-videojs-default-width);
|
|
74185
74288
|
height: var(--it-videojs-default-height);
|
|
74186
74289
|
}
|
|
74187
|
-
|
|
74188
|
-
|
|
74189
|
-
|
|
74290
|
+
.video-js .vjs-tech {
|
|
74291
|
+
position: inherit !important;
|
|
74292
|
+
height: auto !important;
|
|
74293
|
+
}
|
|
74294
|
+
.video-js.vjs-youtube .vjs-tech {
|
|
74295
|
+
aspect-ratio: 16 / 9;
|
|
74296
|
+
}
|
|
74297
|
+
.video-js:not(.vjs-audio-only-mode).vjs-fluid, .video-js:not(.vjs-audio-only-mode).vjs-16-9, .video-js:not(.vjs-audio-only-mode).vjs-4-3, .video-js:not(.vjs-audio-only-mode).vjs-9-16, .video-js:not(.vjs-audio-only-mode).vjs-1-1, .video-js:not(.vjs-audio-only-mode).vjs-youtube {
|
|
74298
|
+
height: auto;
|
|
74190
74299
|
}`;
|
|
74191
74300
|
|
|
74192
74301
|
registerTranslation(translation);
|
|
@@ -74320,26 +74429,28 @@ let ItVideo = class ItVideo extends BaseLocalizedComponent {
|
|
|
74320
74429
|
initYoutubePlugin(videojsFn);
|
|
74321
74430
|
}
|
|
74322
74431
|
this.initPluginsFn?.(videojsFn); // se passata una funzione di init di ulteriori plugin, la chiama.
|
|
74323
|
-
|
|
74324
|
-
this.
|
|
74325
|
-
|
|
74326
|
-
|
|
74327
|
-
|
|
74328
|
-
|
|
74329
|
-
|
|
74330
|
-
|
|
74331
|
-
|
|
74332
|
-
|
|
74333
|
-
|
|
74334
|
-
|
|
74335
|
-
|
|
74336
|
-
|
|
74337
|
-
|
|
74338
|
-
|
|
74339
|
-
playButton
|
|
74432
|
+
if (this.videoElement) {
|
|
74433
|
+
this.player = videojsFn(this.videoElement, mergedOptions, function onPlayerReady() {
|
|
74434
|
+
this.addClass('vjs-theme-bootstrap-italia');
|
|
74435
|
+
this.addClass('vjs-big-play-centered');
|
|
74436
|
+
// Aggiungi i track manualmente
|
|
74437
|
+
tracks.forEach((t) => {
|
|
74438
|
+
this.addRemoteTextTrack({
|
|
74439
|
+
kind: t.kind,
|
|
74440
|
+
src: t.src,
|
|
74441
|
+
srclang: t.srclang || this.language,
|
|
74442
|
+
label: t.label,
|
|
74443
|
+
default: !!t.default,
|
|
74444
|
+
}, false);
|
|
74445
|
+
});
|
|
74446
|
+
if (focusPlayButton) {
|
|
74447
|
+
const playButton = this.el()?.querySelector('.vjs-big-play-button');
|
|
74448
|
+
if (playButton) {
|
|
74449
|
+
playButton.focus();
|
|
74450
|
+
}
|
|
74340
74451
|
}
|
|
74341
|
-
}
|
|
74342
|
-
}
|
|
74452
|
+
});
|
|
74453
|
+
}
|
|
74343
74454
|
}
|
|
74344
74455
|
}
|
|
74345
74456
|
/*
|
|
@@ -74375,10 +74486,14 @@ let ItVideo = class ItVideo extends BaseLocalizedComponent {
|
|
|
74375
74486
|
${this.$t('video_consent_accept')}
|
|
74376
74487
|
</it-button>
|
|
74377
74488
|
|
|
74378
|
-
<
|
|
74379
|
-
|
|
74380
|
-
|
|
74381
|
-
|
|
74489
|
+
<it-checkbox
|
|
74490
|
+
@click=${(e) => {
|
|
74491
|
+
e.preventDefault();
|
|
74492
|
+
e.stopPropagation();
|
|
74493
|
+
this.acceptConsent(true);
|
|
74494
|
+
}}
|
|
74495
|
+
><span slot="label">${this.$t('video_consent_remember')}</span></it-checkbox
|
|
74496
|
+
>
|
|
74382
74497
|
</div>
|
|
74383
74498
|
</div>
|
|
74384
74499
|
</div>
|