@everymatrix/player-profile-info 0.0.168 → 0.0.169

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/player-profile-info",
3
- "version": "0.0.168",
3
+ "version": "0.0.169",
4
4
  "main": "dist/player-profile-info.js",
5
5
  "svelte": "src/index.ts",
6
6
  "scripts": {
@@ -36,5 +36,5 @@
36
36
  "publishConfig": {
37
37
  "access": "public"
38
38
  },
39
- "gitHead": "b469834fd49f47995c17424b33a59fabad03a2b6"
39
+ "gitHead": "af650b9f13be3c59e5b5dadc5880299d3f892d8e"
40
40
  }
@@ -11259,8 +11259,19 @@
11259
11259
  setTimeout(() => {showConfirmSave = false;}, 3000);
11260
11260
  }
11261
11261
 
11262
+ let isValid:Boolean = false;
11263
+
11264
+ const checkIsValid = () => {
11265
+ if (playerQuestion.length <= 0 || playerAnswer.length <= 0 || !playerCity.value || !playerAddress.value || !playerPostalCode.value || playerMobileNumber.length <= 0) {
11266
+ isValid = false;
11267
+ }
11268
+ else {
11269
+ isValid = true;
11270
+ }
11271
+ }
11272
+
11262
11273
  const updatePlayerInfo = () => {
11263
- if (differencesExist == true) {
11274
+ if (differencesExist == true && isValid == true) {
11264
11275
  window.postMessage({ type: 'UpdatePlayerInfo', provisionalArray }, window.location.href);
11265
11276
  }
11266
11277
  }
@@ -11284,6 +11295,7 @@
11284
11295
  }
11285
11296
 
11286
11297
  checkEquality(provisionalArray, initialValuesArray);
11298
+ checkIsValid();
11287
11299
  }
11288
11300
 
11289
11301
  const resetPlayerInfo = () => {
@@ -11389,7 +11401,7 @@
11389
11401
  <input type="text" class="FieldDisabled" value={currency} readonly />
11390
11402
  </div>
11391
11403
  <div class="PlayerInfoBox">
11392
- <label>Gender:</label>
11404
+ <label>Title:</label>
11393
11405
  <input type="text" class="FieldDisabled" value={gender} readonly />
11394
11406
  </div>
11395
11407
  </section>
@@ -11436,8 +11448,7 @@
11436
11448
  </div>
11437
11449
  </section>
11438
11450
  <section class="PlayerDetailsButtonsArea {isMobile ? 'PlayerDetailsButtonsAreaMobile' : ''}">
11439
- <div class="PlayerDetailsSaveButton {differencesExist ? '' : 'PlayerButtonDisabled'}" on:click={() => updatePlayerInfo()}>Save Changes</div>
11440
- <div class="PlayerDetailsCancelButton {differencesExist ? '' : 'PlayerButtonDisabled'}" on:click={() => resetPlayerInfo()}>Cancel</div>
11451
+ <div class="PlayerDetailsSaveButton {differencesExist && isValid ? '' : 'PlayerButtonDisabled'}" on:click={() => updatePlayerInfo()}>Save Changes</div>
11441
11452
  </section>
11442
11453
  {#if showConfirmSave}
11443
11454
  <section class="PlayerDetailsConfirmSave">
@@ -11501,6 +11512,7 @@
11501
11512
  display: inline-flex;
11502
11513
  align-items: center;
11503
11514
  column-gap: 10px;
11515
+ margin-bottom: 10px;
11504
11516
  }
11505
11517
 
11506
11518
  .PlayerInfoBox {
@@ -11621,7 +11633,7 @@
11621
11633
  display: grid;
11622
11634
  grid-column-gap: ttp(0.625);
11623
11635
  grid-template-rows: auto;
11624
- grid-template-columns: 2fr 1fr;
11636
+ grid-template-columns: 1fr;
11625
11637
  margin-top: ttp(1.25);
11626
11638
  width: 50%;
11627
11639