word-games-theme 2.3.3 → 2.3.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0d1aa37e1b56599c5ddf7b82726c06478589ab8915f9413c66fecf5cee5058b0
4
- data.tar.gz: 6b3c720de507d4901041908f0b1ff208c3cbff2467b7bc663652a5c30742e61d
3
+ metadata.gz: 5334cedd32cddb95a419b149103716a2739346c73f3066ba00850af8871433c8
4
+ data.tar.gz: fed74d08d8bd302c3f34c8ce2aa00cfdda4f3312450952a0e4fb02cd7c7559ba
5
5
  SHA512:
6
- metadata.gz: 468b14ff0618716f34cbea76bbc3c82f5260fc41957934b2550c32bb5fa7d66a330c2405c88b3429b18b45a4db767c3aeb18f9fab747e86b957b504ca16cddcd
7
- data.tar.gz: c429661317eeaf9a38c28bbe3399bde286f08e3ae50e19481da3cebe83889094b574cb5937e7e01101a4cf4b69d8b5d7ce4b9d4b2c812a17e7273046d5ac4e74
6
+ metadata.gz: bd7f6c75f4da994e597c27faa197c2fcfe792dfd6f38ebebf40c32ae8efc1ab8761ba20c5e1ac72a75e87be2a42fafb141b5e59d640db4351e8bba0f3684aaef
7
+ data.tar.gz: f93da47af91b0fbf72241ed5bbb14943dcc2da0a254e840dbfdae2b1c79f9f3d602f5c439f77f1246d685ba54749bd47f635394fac1d04b0e5a259f943b678bb
@@ -15,7 +15,7 @@
15
15
  </div>
16
16
  </div>
17
17
  <div class="wordLength same">
18
- <input autocomplete="off" type="text" class="filter_val" id="wordLength" placeholder="Length" name="length"
18
+ <input autocomplete="off" type="number" class="filter_val" id="wordLength" placeholder="Length" name="length"
19
19
  value="">
20
20
 
21
21
  <div class="filter-tooltip" data-toggle="tooltip" data-placement="top"
@@ -25,7 +25,7 @@
25
25
  </div>
26
26
  <div class="inculdeWith">
27
27
  <input class="filter_val" autocomplete="off" type="text" id="inculdeWith" placeholder="Inculde" value=""
28
- name="inculde">
28
+ name="include">
29
29
  <div class="filter-tooltip" data-toggle="tooltip" data-placement="top"
30
30
  data-tip="Only words that contain the letters you enter here" id="Only words that contain the letters you enter here">
31
31
  <img width="30px" height="30px" src="/assets/images/questionmark.svg" alt="Question Mark" />
@@ -42,7 +42,7 @@
42
42
 
43
43
  <div class="exculdeWith">
44
44
  <input class="filter_val" autocomplete="off" type="text" id="exculdeWith" placeholder="Exculde" value=""
45
- name="exculde">
45
+ name="exclude">
46
46
  <div class="filter-tooltip" data-toggle="tooltip" data-placement="top"
47
47
  data-tip="Only words that not contain the letters you enter here" id="Only words that not contain the letters you enter here">
48
48
  <img width="30px" height="30px" src="/assets/images/questionmark.svg" alt="Question Mark" />
@@ -105,7 +105,7 @@
105
105
  </div>
106
106
  <div class="wordLength same">
107
107
  <label for="wordLength">Word Length </label>
108
- <input type="text" class="filter_val" id="wordLength" placeholder="Length" name="length"
108
+ <input type="number" class="filter_val" id="wordLength" placeholder="Length" name="length"
109
109
  value="">
110
110
  </div>
111
111
 
@@ -17,6 +17,22 @@
17
17
  right: 5px;
18
18
  }
19
19
 
20
+ input[type="number"]::-webkit-inner-spin-button,
21
+ input[type="number"]::-webkit-outer-spin-button {
22
+ -webkit-appearance: none;
23
+ margin: 0;
24
+ }
25
+
26
+ input[type="number"] {
27
+ -moz-appearance: textfield; /* Firefox */
28
+ }
29
+
30
+ /* Hide the decimal points */
31
+ input[type="number"] {
32
+ -moz-appearance: textfield; /* Firefox */
33
+ appearance: none;
34
+ -webkit-appearance: none;
35
+ }
20
36
 
21
37
 
22
38
  /* headings css */
@@ -15,7 +15,7 @@ let serachValue = params.get("search").toLowerCase();
15
15
  let prefixValue = params.get("prefix");
16
16
  let containsValue = params.get("contains");
17
17
  let suffixValue = params.get("suffix");
18
- let exculdeValue = params.get("exculde");
18
+ let exculdeValue = params.get("exclude");
19
19
  let includeValue = params.get("include");
20
20
  let lengthValue = params.get("length");
21
21
  let dictonary = params.get("dictionary");
@@ -108,13 +108,13 @@ Array.from(filterInputs).forEach((item) => {
108
108
  const imgElement = parentElement.querySelector('img');
109
109
  const tooltipElement = parentElement.querySelector('.filter-tooltip');
110
110
 
111
- if(inputValue == ""){
111
+ if (inputValue == "") {
112
112
  imgElement.src = "/assets/images/questionmark.svg"
113
113
  item.nextElementSibling.setAttribute("data-tip", item.nextElementSibling.id)
114
114
  tooltipElement.style.setProperty('--tooltip-padding', '0.5rem');
115
115
  tooltipElement.style.setProperty('--tooltip-border-style', 'soild');
116
-
117
- }else{
116
+
117
+ } else {
118
118
  item.nextElementSibling.removeAttribute("data-tip")
119
119
  imgElement.src = "/assets/images/close-btn.svg"
120
120
  tooltipElement.style.setProperty('--tooltip-padding', '0');
@@ -128,7 +128,47 @@ Array.from(filterInputs).forEach((item) => {
128
128
  tooltipElement.style.setProperty('--tooltip-border-style', 'soild');
129
129
  })
130
130
  })
131
- })
131
+ })
132
+
133
+
134
+ function handleFilterInput(e) {
135
+ const inputValue = e.target.value;
136
+ const parentElement = e.target.parentElement;
137
+ const imgElement = parentElement.querySelector('img');
138
+ const tooltipElement = parentElement.querySelector('.filter-tooltip');
139
+
140
+ if (inputValue == "") {
141
+ imgElement.src = "/assets/images/questionmark.svg"
142
+ e.target.nextElementSibling.setAttribute("data-tip", e.target.nextElementSibling.id)
143
+ tooltipElement.style.setProperty('--tooltip-padding', '0.5rem');
144
+ tooltipElement.style.setProperty('--tooltip-border-style', 'solid');
145
+ } else {
146
+ e.target.nextElementSibling.removeAttribute("data-tip")
147
+ imgElement.src = "/assets/images/close-btn.svg"
148
+ tooltipElement.style.setProperty('--tooltip-padding', '0');
149
+ tooltipElement.style.setProperty('--tooltip-border-style', 'none');
150
+ }
151
+
152
+ e.target.nextElementSibling.addEventListener("click", () => {
153
+ e.target.value = ""
154
+ imgElement.src = "/assets/images/questionmark.svg"
155
+ e.target.nextElementSibling.setAttribute("data-tip", e.target.nextElementSibling.id)
156
+ tooltipElement.style.setProperty('--tooltip-padding', '0.5rem');
157
+ tooltipElement.style.setProperty('--tooltip-border-style', 'solid');
158
+ });
159
+ }
160
+
161
+ document.addEventListener("DOMContentLoaded", () => {
162
+ const filterInputs = document.querySelectorAll('.filter_val');
163
+ Array.from(filterInputs).forEach((item) => {
164
+ // Call the function on load
165
+ handleFilterInput({ target: item });
166
+ item.addEventListener("input", handleFilterInput);
167
+ });
168
+ });
169
+
170
+
171
+
132
172
 
133
173
  let theSelect = document.getElementById("select_dropDown");
134
174
 
@@ -239,7 +279,7 @@ if (lengthValue === "1") {
239
279
  "=" +
240
280
  endsWith.value +
241
281
  "&" +
242
- "exculde" +
282
+ "exclude" +
243
283
  "=" +
244
284
  exculdeWith.value +
245
285
  "&" +
@@ -257,7 +297,7 @@ if (lengthValue === "1") {
257
297
  prefixValue = params.get("prefix");
258
298
  containsValue = params.get("contains");
259
299
  suffixValue = params.get("suffix");
260
- exculdeValue = params.get("exculde");
300
+ exculdeValue = params.get("exclude");
261
301
  includeValue = params.get("include");
262
302
  lengthValue = params.get("length");
263
303
  dictonary = params.get("dictionary");
@@ -307,6 +347,7 @@ function getWords(data) {
307
347
  newdata = newdata.filter((item) =>
308
348
  item.includes(containsValue.toLowerCase())
309
349
  );
350
+ mustInclude.nextElementSibling.querySelector("img").src = "/assets/images/close-btn.svg"
310
351
  mustInclude.classList.add("tick");
311
352
  mustInclude.value = containsValue;
312
353
  } else {
@@ -316,6 +357,7 @@ function getWords(data) {
316
357
  newdata = newdata.filter((item) =>
317
358
  item.endsWith(suffixValue.toLowerCase())
318
359
  );
360
+ endsWith.nextElementSibling.querySelector("img").src = "/assets/images/close-btn.svg"
319
361
  endsWith.classList.add("tick");
320
362
  endsWith.value = suffixValue;
321
363
  } else {
@@ -338,6 +380,7 @@ function getWords(data) {
338
380
  data.push(item);
339
381
  }
340
382
  });
383
+ exculdeWith.nextElementSibling.querySelector("img").src = "/assets/images/close-btn.svg"
341
384
  exculdeWith.classList.add("tick");
342
385
  exculdeWith.value = exculdeValue;
343
386
  newdata = data;
@@ -361,6 +404,7 @@ function getWords(data) {
361
404
  data.push(item);
362
405
  }
363
406
  });
407
+ inculdeWith.nextElementSibling.querySelector("img").src = "/assets/images/close-btn.svg"
364
408
  inculdeWith.classList.add("tick");
365
409
  inculdeWith.value = includeValue;
366
410
  newdata = data;
@@ -369,6 +413,7 @@ function getWords(data) {
369
413
  }
370
414
  if (lengthValue) {
371
415
  newdata = newdata.filter((item) => item.length == lengthValue);
416
+ wordLength.nextElementSibling.querySelector("img").src = "/assets/images/close-btn.svg"
372
417
  wordLength.classList.add("tick");
373
418
  wordLength.value = lengthValue;
374
419
  } else {
@@ -428,15 +473,15 @@ function getWords(data) {
428
473
  var option = document.createElement("option");
429
474
  option.text = `${i} Letter`;
430
475
  option.value = i;
431
- lengthSelect.setAttribute("onchange",`Filtering(${i})`)
476
+ lengthSelect.setAttribute("onchange", `Filtering(${i})`)
432
477
  lengthSelect.add(option);
433
478
 
434
- // tab_container.innerHTML += `
435
- // <input type="button" id="Tab_${i}" onclick="Filtering(${i})" value="${i} Letter"
436
- // class="tab_link cursorPointer" />
437
- // `;
438
- // let tabs = document.getElementsByClassName("tab_link");
439
- // tabs[0] ? tabs[0].classList.add("active-tab") : "";
479
+ // tab_container.innerHTML += `
480
+ // <input type="button" id="Tab_${i}" onclick="Filtering(${i})" value="${i} Letter"
481
+ // class="tab_link cursorPointer" />
482
+ // `;
483
+ // let tabs = document.getElementsByClassName("tab_link");
484
+ // tabs[0] ? tabs[0].classList.add("active-tab") : "";
440
485
  main.innerHTML += `
441
486
  <div class="allGroupWords wordlistContainer" id="alpha_${i}">
442
487
  <div class="wordListHeading">
@@ -110,6 +110,74 @@ if (ablank) {
110
110
 
111
111
 
112
112
 
113
+ const filterInputs = document.querySelectorAll('.filter_val');
114
+ Array.from(filterInputs).forEach((item) => {
115
+ item.addEventListener("input", (e) => {
116
+ const inputValue = e.target.value;
117
+ const parentElement = e.target.parentElement;
118
+ const imgElement = parentElement.querySelector('img');
119
+ const tooltipElement = parentElement.querySelector('.filter-tooltip');
120
+
121
+ if (inputValue == "") {
122
+ imgElement.src = "/assets/images/questionmark.svg"
123
+ item.nextElementSibling.setAttribute("data-tip", item.nextElementSibling.id)
124
+ tooltipElement.style.setProperty('--tooltip-padding', '0.5rem');
125
+ tooltipElement.style.setProperty('--tooltip-border-style', 'soild');
126
+
127
+ } else {
128
+ item.nextElementSibling.removeAttribute("data-tip")
129
+ imgElement.src = "/assets/images/close-btn.svg"
130
+ tooltipElement.style.setProperty('--tooltip-padding', '0');
131
+ tooltipElement.style.setProperty('--tooltip-border-style', 'none');
132
+ }
133
+ item.nextElementSibling.addEventListener("click", () => {
134
+ e.target.value = ""
135
+ imgElement.src = "/assets/images/questionmark.svg"
136
+ item.nextElementSibling.setAttribute("data-tip", item.nextElementSibling.id)
137
+ tooltipElement.style.setProperty('--tooltip-padding', '0.5rem');
138
+ tooltipElement.style.setProperty('--tooltip-border-style', 'soild');
139
+ })
140
+ })
141
+ })
142
+
143
+
144
+ function handleFilterInput(e) {
145
+ const inputValue = e.target.value;
146
+ const parentElement = e.target.parentElement;
147
+ const imgElement = parentElement.querySelector('img');
148
+ const tooltipElement = parentElement.querySelector('.filter-tooltip');
149
+
150
+ if (inputValue == "") {
151
+ imgElement.src = "/assets/images/questionmark.svg"
152
+ e.target.nextElementSibling.setAttribute("data-tip", e.target.nextElementSibling.id)
153
+ tooltipElement.style.setProperty('--tooltip-padding', '0.5rem');
154
+ tooltipElement.style.setProperty('--tooltip-border-style', 'solid');
155
+ } else {
156
+ e.target.nextElementSibling.removeAttribute("data-tip")
157
+ imgElement.src = "/assets/images/close-btn.svg"
158
+ tooltipElement.style.setProperty('--tooltip-padding', '0');
159
+ tooltipElement.style.setProperty('--tooltip-border-style', 'none');
160
+ }
161
+
162
+ e.target.nextElementSibling.addEventListener("click", () => {
163
+ e.target.value = ""
164
+ imgElement.src = "/assets/images/questionmark.svg"
165
+ e.target.nextElementSibling.setAttribute("data-tip", e.target.nextElementSibling.id)
166
+ tooltipElement.style.setProperty('--tooltip-padding', '0.5rem');
167
+ tooltipElement.style.setProperty('--tooltip-border-style', 'solid');
168
+ });
169
+ }
170
+
171
+ document.addEventListener("DOMContentLoaded", () => {
172
+ const filterInputs = document.querySelectorAll('.filter_val');
173
+ Array.from(filterInputs).forEach((item) => {
174
+ // Call the function on load
175
+ handleFilterInput({ target: item });
176
+ item.addEventListener("input", handleFilterInput);
177
+ });
178
+ });
179
+
180
+
113
181
 
114
182
 
115
183
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: word-games-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.3
4
+ version: 2.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - manpreet-appscms