diff --git a/e2e/snapshots.js b/e2e/snapshots.js index 2b26e5007..b653bda50 100644 --- a/e2e/snapshots.js +++ b/e2e/snapshots.js @@ -14,61 +14,61 @@ module.exports = { }, "[demo] Test #nav-js": { "1": "

@records: 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20

", - "2": "", + "2": "", "3": "

@records:\n 21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40

", - "4": "", + "4": "", "5": "

@records:\n 41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60

", - "6": "", + "6": "", "7": "

@records:\n 981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000\n

", - "8": "", + "8": "", "9": "

@records:\n 961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980\n

", - "10": "" + "10": "" }, "[demo] Test #nav-js-responsive": { "1": "

@records: 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20

", - "2": "", + "2": "", "3": "

@records:\n 21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40

", - "4": "", + "4": "", "5": "

@records:\n 41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60

", - "6": "", + "6": "", "7": "

@records:\n 981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000\n

", - "8": "", + "8": "", "9": "

@records:\n 961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980\n

", - "10": "", + "10": "", "11": "

@records: 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20

", - "12": "", + "12": "", "13": "

@records:\n 21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40

", - "14": "", + "14": "", "15": "

@records:\n 41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60

", - "16": "", + "16": "", "17": "

@records:\n 981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000\n

", - "18": "", + "18": "", "19": "

@records:\n 961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980\n

", - "20": "", + "20": "", "21": "

@records: 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20

", - "22": "", + "22": "", "23": "

@records:\n 21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40

", - "24": "", + "24": "", "25": "

@records:\n 41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60

", - "26": "", + "26": "", "27": "

@records:\n 981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000\n

", - "28": "", + "28": "", "29": "

@records:\n 961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980\n

", - "30": "" + "30": "" }, "[demo] Test #combo-nav-js": { "1": "

@records: 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20

", - "2": "", + "2": "", "3": "

@records:\n 21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40

", - "4": "", + "4": "", "5": "

@records:\n 41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60

", - "6": "", + "6": "", "7": "

@records:\n 981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000\n

", - "8": "", + "8": "", "9": "

@records:\n 961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980\n

", - "10": "", + "10": "", "11": "

@records:\n 941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960\n

", - "12": "" + "12": "" }, "[demo] Test #pagy-info": { "1": "

@records: 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20

", @@ -80,29 +80,29 @@ module.exports = { }, "[demo] Test #limit-selector-js": { "1": "

@records: 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20

", - "2": "", + "2": "", "3": "

@records: 1,2,3,4,5,6,7,8,9,10

", - "4": "", + "4": "", "5": "

@records: 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17

", - "6": "", + "6": "", "7": "

@records: 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18

", - "8": "", + "8": "", "9": "

@records:\n 701,702,703,704,705,706,707,708,709,710,711,712,713,714,715,716,717,718,719,720\n

", - "10": "", + "10": "", "11": "

@records: 701,702,703,704,705,706,707,708,709,710

", - "12": "", + "12": "", "13": "

@records:\n 698,699,700,701,702,703,704,705,706,707,708,709,710,711,712,713,714

", - "14": "", + "14": "", "15": "

@records:\n 685,686,687,688,689,690,691,692,693,694,695,696,697,698,699,700,701,702

", - "16": "", + "16": "", "17": "

@records:\n 981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000\n

", - "18": "", + "18": "", "19": "

@records: 981,982,983,984,985,986,987,988,989,990

", - "20": "", + "20": "", "21": "

@records:\n 970,971,972,973,974,975,976,977,978,979,980,981,982,983,984,985,986

", - "22": "", + "22": "", "23": "

@records:\n 955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972

", - "24": "" + "24": "" } }, "[demo] Test /bootstrap helpers": { @@ -120,61 +120,61 @@ module.exports = { }, "[demo] Test #nav-js": { "1": "

@records: 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20

", - "2": "", + "2": "", "3": "

@records:\n 21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40

", - "4": "", + "4": "", "5": "

@records:\n 41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60

", - "6": "", + "6": "", "7": "

@records:\n 981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000\n

", - "8": "", + "8": "", "9": "

@records:\n 961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980\n

", - "10": "" + "10": "" }, "[demo] Test #nav-js-responsive": { "1": "

@records: 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20

", - "2": "", + "2": "", "3": "

@records:\n 21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40

", - "4": "", + "4": "", "5": "

@records:\n 41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60

", - "6": "", + "6": "", "7": "

@records:\n 981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000\n

", - "8": "", + "8": "", "9": "

@records:\n 961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980\n

", - "10": "", + "10": "", "11": "

@records: 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20

", - "12": "", + "12": "", "13": "

@records:\n 21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40

", - "14": "", + "14": "", "15": "

@records:\n 41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60

", - "16": "", + "16": "", "17": "

@records:\n 981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000\n

", - "18": "", + "18": "", "19": "

@records:\n 961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980\n

", - "20": "", + "20": "", "21": "

@records: 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20

", - "22": "", + "22": "", "23": "

@records:\n 21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40

", - "24": "", + "24": "", "25": "

@records:\n 41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60

", - "26": "", + "26": "", "27": "

@records:\n 981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000\n

", - "28": "", + "28": "", "29": "

@records:\n 961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980\n

", - "30": "" + "30": "" }, "[demo] Test #combo-nav-js": { "1": "

@records: 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20

", - "2": "", + "2": "", "3": "

@records:\n 21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40

", - "4": "", + "4": "", "5": "

@records:\n 41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60

", - "6": "", + "6": "", "7": "

@records:\n 981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000\n

", - "8": "", + "8": "", "9": "

@records:\n 961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980\n

", - "10": "", + "10": "", "11": "

@records:\n 941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960\n

", - "12": "" + "12": "" }, "[demo] Test #pagy-info": { "1": "

@records: 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20

", @@ -200,61 +200,61 @@ module.exports = { }, "[demo] Test #nav-js": { "1": "

@records: 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20

", - "2": "", + "2": "", "3": "

@records:\n 21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40

", - "4": "", + "4": "", "5": "

@records:\n 41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60

", - "6": "", + "6": "", "7": "

@records:\n 981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000\n

", - "8": "", + "8": "", "9": "

@records:\n 961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980\n

", - "10": "" + "10": "" }, "[demo] Test #nav-js-responsive": { "1": "

@records: 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20

", - "2": "", + "2": "", "3": "

@records:\n 21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40

", - "4": "", + "4": "", "5": "

@records:\n 41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60

", - "6": "", + "6": "", "7": "

@records:\n 981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000\n

", - "8": "", + "8": "", "9": "

@records:\n 961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980\n

", - "10": "", + "10": "", "11": "

@records: 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20

", - "12": "", + "12": "", "13": "

@records:\n 21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40

", - "14": "", + "14": "", "15": "

@records:\n 41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60

", - "16": "", + "16": "", "17": "

@records:\n 981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000\n

", - "18": "", + "18": "", "19": "

@records:\n 961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980\n

", - "20": "", + "20": "", "21": "

@records: 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20

", - "22": "", + "22": "", "23": "

@records:\n 21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40

", - "24": "", + "24": "", "25": "

@records:\n 41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60

", - "26": "", + "26": "", "27": "

@records:\n 981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000\n

", - "28": "", + "28": "", "29": "

@records:\n 961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980\n

", - "30": "" + "30": "" }, "[demo] Test #combo-nav-js": { "1": "

@records: 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20

", - "2": "", + "2": "", "3": "

@records:\n 21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40

", - "4": "", + "4": "", "5": "

@records:\n 41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60

", - "6": "", + "6": "", "7": "

@records:\n 981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000\n

", - "8": "", + "8": "", "9": "

@records:\n 961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980\n

", - "10": "", + "10": "", "11": "

@records:\n 941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960\n

", - "12": "" + "12": "" }, "[demo] Test #pagy-info": { "1": "

@records: 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20

", @@ -281,61 +281,61 @@ module.exports = { }, "[repro] Test #nav-js": { "1": "

@records: 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20

", - "2": "", + "2": "", "3": "

@records:\n 21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40

", - "4": "", + "4": "", "5": "

@records:\n 41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60

", - "6": "", + "6": "", "7": "

@records:\n 981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000\n

", - "8": "", + "8": "", "9": "

@records:\n 961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980\n

", - "10": "" + "10": "" }, "[repro] Test #nav-js-responsive": { "1": "

@records: 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20

", - "2": "", + "2": "", "3": "

@records:\n 21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40

", - "4": "", + "4": "", "5": "

@records:\n 41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60

", - "6": "", + "6": "", "7": "

@records:\n 981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000\n

", - "8": "", + "8": "", "9": "

@records:\n 961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980\n

", - "10": "", + "10": "", "11": "

@records: 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20

", - "12": "", + "12": "", "13": "

@records:\n 21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40

", - "14": "", + "14": "", "15": "

@records:\n 41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60

", - "16": "", + "16": "", "17": "

@records:\n 981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000\n

", - "18": "", + "18": "", "19": "

@records:\n 961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980\n

", - "20": "", + "20": "", "21": "

@records: 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20

", - "22": "", + "22": "", "23": "

@records:\n 21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40

", - "24": "", + "24": "", "25": "

@records:\n 41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60

", - "26": "", + "26": "", "27": "

@records:\n 981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000\n

", - "28": "", + "28": "", "29": "

@records:\n 961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980\n

", - "30": "" + "30": "" }, "[repro] Test #combo-nav-js": { "1": "

@records: 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20

", - "2": "", + "2": "", "3": "

@records:\n 21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40

", - "4": "", + "4": "", "5": "

@records:\n 41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60

", - "6": "", + "6": "", "7": "

@records:\n 981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000\n

", - "8": "", + "8": "", "9": "

@records:\n 961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980\n

", - "10": "", + "10": "", "11": "

@records:\n 941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960\n

", - "12": "" + "12": "" }, "[repro] Test #pagy-info": { "1": "

@records: 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20

", @@ -347,29 +347,29 @@ module.exports = { }, "[repro] Test #limit-selector-js": { "1": "

@records: 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20

", - "2": "", + "2": "", "3": "

@records: 1,2,3,4,5,6,7,8,9,10

", - "4": "", + "4": "", "5": "

@records: 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17

", - "6": "", + "6": "", "7": "

@records: 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18

", - "8": "", + "8": "", "9": "

@records:\n 701,702,703,704,705,706,707,708,709,710,711,712,713,714,715,716,717,718,719,720\n

", - "10": "", + "10": "", "11": "

@records: 701,702,703,704,705,706,707,708,709,710

", - "12": "", + "12": "", "13": "

@records:\n 698,699,700,701,702,703,704,705,706,707,708,709,710,711,712,713,714

", - "14": "", + "14": "", "15": "

@records:\n 685,686,687,688,689,690,691,692,693,694,695,696,697,698,699,700,701,702

", - "16": "", + "16": "", "17": "

@records:\n 981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000\n

", - "18": "", + "18": "", "19": "

@records: 981,982,983,984,985,986,987,988,989,990

", - "20": "", + "20": "", "21": "

@records:\n 970,971,972,973,974,975,976,977,978,979,980,981,982,983,984,985,986

", - "22": "", + "22": "", "23": "

@records:\n 955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972

", - "24": "" + "24": "" } }, "[rails] Test helpers": { @@ -385,53 +385,53 @@ module.exports = { }, "[rails] Test #nav-js": { "1": "
\n

Comment 1 to Post 1

\n

Comment 2 to Post 1

\n

Comment 1 to Post 2

\n

Comment 2 to Post 2

\n

Comment 1 to Post 3

\n

Comment 2 to Post 3

\n

Comment 1 to Post 4

\n

Comment 2 to Post 4

\n

Comment 1 to Post 5

\n

Comment 2 to Post 5

\n
", - "2": "", + "2": "", "3": "
\n

Comment 1 to Post 6

\n

Comment 2 to Post 6

\n

Comment 1 to Post 7

\n

Comment 2 to Post 7

\n

Comment 1 to Post 8

\n

Comment 2 to Post 8

\n

Comment 1 to Post 9

\n

Comment 2 to Post 9

\n

Comment 1 to Post 10

\n

Comment 2 to Post 10

\n
", - "4": "", + "4": "", "5": "
\n

Comment 1 to Post 11

\n

Comment 2 to Post 11

\n
", - "6": "", + "6": "", "7": "
\n

Comment 1 to Post 6

\n

Comment 2 to Post 6

\n

Comment 1 to Post 7

\n

Comment 2 to Post 7

\n

Comment 1 to Post 8

\n

Comment 2 to Post 8

\n

Comment 1 to Post 9

\n

Comment 2 to Post 9

\n

Comment 1 to Post 10

\n

Comment 2 to Post 10

\n
", - "8": "" + "8": "" }, "[rails] Test #combo-nav-js": { "1": "
\n

Comment 1 to Post 1

\n

Comment 2 to Post 1

\n

Comment 1 to Post 2

\n

Comment 2 to Post 2

\n

Comment 1 to Post 3

\n

Comment 2 to Post 3

\n

Comment 1 to Post 4

\n

Comment 2 to Post 4

\n

Comment 1 to Post 5

\n

Comment 2 to Post 5

\n
", - "2": "", + "2": "", "3": "
\n

Comment 1 to Post 6

\n

Comment 2 to Post 6

\n

Comment 1 to Post 7

\n

Comment 2 to Post 7

\n

Comment 1 to Post 8

\n

Comment 2 to Post 8

\n

Comment 1 to Post 9

\n

Comment 2 to Post 9

\n

Comment 1 to Post 10

\n

Comment 2 to Post 10

\n
", - "4": "", + "4": "", "5": "
\n

Comment 1 to Post 11

\n

Comment 2 to Post 11

\n
", - "6": "", + "6": "", "7": "
\n

Comment 1 to Post 11

\n

Comment 2 to Post 11

\n
", - "8": "", + "8": "", "9": "
\n

Comment 1 to Post 6

\n

Comment 2 to Post 6

\n

Comment 1 to Post 7

\n

Comment 2 to Post 7

\n

Comment 1 to Post 8

\n

Comment 2 to Post 8

\n

Comment 1 to Post 9

\n

Comment 2 to Post 9

\n

Comment 1 to Post 10

\n

Comment 2 to Post 10

\n
", - "10": "", + "10": "", "11": "
\n

Comment 1 to Post 1

\n

Comment 2 to Post 1

\n

Comment 1 to Post 2

\n

Comment 2 to Post 2

\n

Comment 1 to Post 3

\n

Comment 2 to Post 3

\n

Comment 1 to Post 4

\n

Comment 2 to Post 4

\n

Comment 1 to Post 5

\n

Comment 2 to Post 5

\n
", - "12": "" + "12": "" }, "[rails] Test #limit-selector-js": { "1": "
\n

Comment 1 to Post 1

\n

Comment 2 to Post 1

\n

Comment 1 to Post 2

\n

Comment 2 to Post 2

\n

Comment 1 to Post 3

\n

Comment 2 to Post 3

\n

Comment 1 to Post 4

\n

Comment 2 to Post 4

\n

Comment 1 to Post 5

\n

Comment 2 to Post 5

\n
", - "2": "", + "2": "", "3": "
\n

Comment 1 to Post 1

\n

Comment 2 to Post 1

\n

Comment 1 to Post 2

\n

Comment 2 to Post 2

\n

Comment 1 to Post 3

\n

Comment 2 to Post 3

\n

Comment 1 to Post 4

\n

Comment 2 to Post 4

\n

Comment 1 to Post 5

\n

Comment 2 to Post 5

\n
", - "4": "", + "4": "", "5": "
\n

Comment 1 to Post 1

\n

Comment 2 to Post 1

\n

Comment 1 to Post 2

\n

Comment 2 to Post 2

\n

Comment 1 to Post 3

\n

Comment 2 to Post 3

\n

Comment 1 to Post 4

\n

Comment 2 to Post 4

\n

Comment 1 to Post 5

\n

Comment 2 to Post 5

\n
", - "6": "", + "6": "", "7": "
\n

Comment 1 to Post 1

\n

Comment 2 to Post 1

\n

Comment 1 to Post 2

\n

Comment 2 to Post 2

\n

Comment 1 to Post 3

\n

Comment 2 to Post 3

\n

Comment 1 to Post 4

\n

Comment 2 to Post 4

\n

Comment 1 to Post 5

\n

Comment 2 to Post 5

\n

Comment 1 to Post 6

\n
", - "8": "", + "8": "", "9": "
\n
", - "10": "", + "10": "", "11": "
\n
", - "12": "", + "12": "", "13": "
\n
", - "14": "", + "14": "", "15": "
\n

Comment 1 to Post 1

\n

Comment 2 to Post 1

\n

Comment 1 to Post 2

\n

Comment 2 to Post 2

\n

Comment 1 to Post 3

\n

Comment 2 to Post 3

\n

Comment 1 to Post 4

\n

Comment 2 to Post 4

\n

Comment 1 to Post 5

\n

Comment 2 to Post 5

\n

Comment 1 to Post 6

\n
", - "16": "", + "16": "", "17": "
\n
", - "18": "", + "18": "", "19": "
\n
", - "20": "", + "20": "", "21": "
\n
", - "22": "", + "22": "", "23": "
\n

Comment 1 to Post 1

\n

Comment 2 to Post 1

\n

Comment 1 to Post 2

\n

Comment 2 to Post 2

\n

Comment 1 to Post 3

\n

Comment 2 to Post 3

\n

Comment 1 to Post 4

\n

Comment 2 to Post 4

\n

Comment 1 to Post 5

\n

Comment 2 to Post 5

\n

Comment 1 to Post 6

\n
", - "24": "" + "24": "" }, "[rails] Test #pagy-info": { "1": "
\n

Comment 1 to Post 1

\n

Comment 2 to Post 1

\n

Comment 1 to Post 2

\n

Comment 2 to Post 2

\n

Comment 1 to Post 3

\n

Comment 2 to Post 3

\n

Comment 1 to Post 4

\n

Comment 2 to Post 4

\n

Comment 1 to Post 5

\n

Comment 2 to Post 5

\n
", diff --git a/gem/javascripts/pagy.js b/gem/javascripts/pagy.js index 1ca5715e2..6497dff64 100644 --- a/gem/javascripts/pagy.js +++ b/gem/javascripts/pagy.js @@ -1,6 +1,6 @@ // pagy.ts window.Pagy = (() => { - const storageSupport = "sessionStorage" in window && "BroadcastChannel" in window; + const storageSupport = "sessionStorage" in window && "BroadcastChannel" in window, pageRe = " P "; let storage, sync, tabId; if (storageSupport) { storage = sessionStorage; @@ -10,17 +10,17 @@ window.Pagy = (() => { if (e.data.from) { const cutoffs = storage.getItem(e.data.key); if (cutoffs) { - sync.postMessage({ to: e.data.from, key: e.data.key, cutoffs }); + sync.postMessage({ to: e.data.from, key: e.data.key, str: cutoffs }); } } else if (e.data.to) { if (e.data.to == tabId) { - storage.setItem(e.data.key, e.data.cutoffs); + storage.setItem(e.data.key, e.data.str); } } }); } const rjsObserver = new ResizeObserver((entries) => entries.forEach((e) => { - e.target.querySelectorAll(".pagy-rjs").forEach((el) => el.pagyRender()); + e.target.querySelectorAll(".pagy-rjs").forEach((el) => el.init()); })); const B64Encode = (unicode) => btoa(String.fromCharCode(...new TextEncoder().encode(unicode))), B64Safe = (unsafe) => unsafe.replace(/=/g, "").replace(/[+/]/g, (match) => match == "+" ? "-" : "_"), B64SafeEncode = (unicode) => B64Safe(B64Encode(unicode)), B64Decode = (base64) => new TextDecoder().decode(Uint8Array.from(atob(base64), (c) => c.charCodeAt(0))); const initCutoffs = async (el, [pageSym, [storageKey, spliceArgs]]) => { @@ -53,30 +53,30 @@ window.Pagy = (() => { a.href = url.replace(re, `${pageSym}=${value}`); } }; - const initNavJs = (el, [tokens, sequels, labelSequels, cutoffArgs]) => { - const container = el.parentElement ?? el, widths = Object.keys(sequels).map((w) => parseInt(w)).sort((a, b) => b - a); + const initNavJs = (el, [[before, a, current, gap, after], sequels, labelSequels, cutoffArgs]) => { + const container = el.parentElement ?? el, widths = Object.keys(sequels).map((w) => parseInt(w)).sort((a2, b) => b - a2); let lastWidth = -1; - const fillIn = (a, page, label) => a.replace(/__pagy_page__/g, page).replace(/__pagy_label__/g, label); - (el.pagyRender = () => { + const fillIn = (a2, page, label) => a2.replace(pageRe, page).replace(">T<", `>${label}<`); + (el.init = () => { const width = widths.find((w) => w < container.clientWidth) || 0; if (width === lastWidth) { return; } - let html = tokens.before; + let html = before; const series = sequels[width.toString()], labels = labelSequels?.[width.toString()] ?? series.map((l) => l.toString()); series.forEach((item, i) => { const label = labels[i]; let filled; if (typeof item == "number") { - filled = fillIn(tokens.a, item.toString(), label); + filled = fillIn(a, item.toString(), label); } else if (item == "gap") { - filled = tokens.gap; + filled = gap; } else { - filled = fillIn(tokens.current, item, label); + filled = fillIn(current, item, label); } html += filled; }); - html += tokens.after; + html += after; el.innerHTML = ""; el.insertAdjacentHTML("afterbegin", html); lastWidth = width; @@ -88,11 +88,11 @@ window.Pagy = (() => { rjsObserver.observe(container); } }; - const initComboJs = (el, [url_token]) => initInput(el, (inputValue) => url_token.replace(/__pagy_page__/, inputValue)); + const initComboJs = (el, [url_token]) => initInput(el, (inputValue) => url_token.replace(pageRe, inputValue)); const initSelectorJs = (el, [from, url_token]) => { initInput(el, (inputValue) => { const page = Math.max(Math.ceil(from / parseInt(inputValue)), 1).toString(); - return url_token.replace(/__pagy_page__/, page).replace(/__pagy_limit__/, inputValue); + return url_token.replace(pageRe, page).replace(" L ", inputValue); }); }; const initInput = (el, getUrl) => { @@ -123,23 +123,23 @@ window.Pagy = (() => { const target = arg instanceof Element ? arg : document, elements = target.querySelectorAll("[data-pagy]"); for (const el of elements) { try { - const [keyword, ...args] = JSON.parse(B64Decode(el.getAttribute("data-pagy"))); - if (keyword == "nav") { + const [key, ...args] = JSON.parse(B64Decode(el.getAttribute("data-pagy"))); + if (key == "n") { initCutoffs(el, args); - } else if (keyword == "nav_js") { + } else if (key == "nj") { initNavJs(el, args); - } else if (keyword == "combo_js") { + } else if (key == "cj") { initComboJs(el, args); - } else if (keyword == "selector_js") { + } else if (key == "sj") { initSelectorJs(el, args); } } catch (err) { - console.warn("Pagy.init() error: %o\n%s", el, err); + console.warn("Pagy.init: %o\n%s", el, err); } } } }; })(); -//# debugId=0974C14BAD5BAB2A64756E2164756E21 +//# debugId=B852CF77041A955E64756E2164756E21 //# sourceMappingURL=pagy.js.map diff --git a/gem/javascripts/pagy.js.map b/gem/javascripts/pagy.js.map index 39936d011..f9e80fc8c 100644 --- a/gem/javascripts/pagy.js.map +++ b/gem/javascripts/pagy.js.map @@ -2,9 +2,9 @@ "version": 3, "sources": ["../../src/pagy.ts"], "sourcesContent": [ - "type InitArgs = [\"nav\", CutoffArgs] | [\"nav_js\", NavJsArgs] | [\"combo_js\", ComboJsArgs] | [\"selector_js\", SelectorJsArgs]\ntype CutoffArgs = readonly [pageSym:string, update:[storageKey:string, splice?:SpliceArgs]]\ntype SpliceArgs = readonly [start:number, deleteCount:number, ...items:Cutoff[]]\ntype Cutoff = readonly (string | number | boolean)[]\ntype CutoffsParams = [pagyId:string, storageKey:string, pageNumber:number, pages:number, prevCutoff?:Cutoff, pageCutoff?:Cutoff]\ntype NavJsArgs = readonly [Tokens, Sequels, LabelSequels, CutoffArgs]\ntype ComboJsArgs = readonly [urlToken:string]\ntype SelectorJsArgs = readonly [from:number, urlToken:string]\ninterface SyncData {\n from?: number\n to?: number\n key: string\n cutoffs?: string\n}\ninterface Tokens {\n readonly before: string\n readonly a: string\n readonly current: string\n readonly gap: string\n readonly after: string\n}\ninterface Sequels {readonly [width:string]:(string | number)[]}\ninterface LabelSequels {readonly [width:string]:string[]}\ninterface NavJsElement extends Element {pagyRender():void}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst Pagy = (() => {\n const storageSupport = 'sessionStorage' in window && 'BroadcastChannel' in window;\n let storage: Storage, sync: BroadcastChannel, tabId: number;\n if (storageSupport) {\n storage = sessionStorage; // shorten the .min.js\n sync = new BroadcastChannel(\"pagy\");\n tabId = Date.now();\n // Sync the sessionStorage keys for the cutoffs opened in a new tab/window\n sync.addEventListener(\"message\", (e:MessageEvent) => {\n if (e.data.from) { // request cutoffs\n const cutoffs = storage.getItem(e.data.key);\n if (cutoffs) {\n sync.postMessage({to: e.data.from, key: e.data.key, cutoffs: cutoffs});\n } // send response\n } else if (e.data.to) { // receive cutoffs\n if (e.data.to == tabId) {\n storage.setItem(e.data.key, e.data.cutoffs);\n }\n }\n });\n }\n // The observer instance for responsive navs\n const rjsObserver = new ResizeObserver(\n entries => entries.forEach(e => {\n e.target.querySelectorAll(\".pagy-rjs\").forEach(el => el.pagyRender());\n }));\n\n const B64Encode = (unicode:string) => btoa(String.fromCharCode(...(new TextEncoder).encode(unicode))),\n B64Safe = (unsafe:string) => unsafe.replace(/=/g, \"\").replace(/[+/]/g, (match) => match == \"+\" ? \"-\" : \"_\"),\n B64SafeEncode = (unicode:string) => B64Safe(B64Encode(unicode)),\n B64Decode = (base64:string) => (new TextDecoder()).decode(Uint8Array.from(atob(base64), c => c.charCodeAt(0)));\n // B64Unsafe = (safe:string) => safe.replace(/[-_]/g, (match) => match == \"-\" ? \"+\" : \"/\"),\n // B64SafeDecode = (base64:string) => B64Decode(B64Unsafe(base64))\n\n // Init the Cutoffs features\n const initCutoffs = async (el:Element, [pageSym, [storageKey, spliceArgs]]:CutoffArgs) => {\n if (!storageSupport) { return }\n\n let browserId = document.cookie.split(/;\\s+/) // it works even if malformed\n .find((row) => row.startsWith(\"pagy=\"))\n ?.split(\"=\")[1];\n if (!browserId) {\n document.cookie = \"pagy=\" + (browserId = Math.floor(Math.random() * 36 ** 3).toString(36));\n }\n if (storageKey && !(storageKey in storage)) {\n // Sync the sessiongStorage from other tabs/windows (e.g. open page in new tab/window)\n sync.postMessage({ from: tabId, key: storageKey });\n // Wait for the listener to copy the cutoffs in the current sessionStorage\n await new Promise((resolve) => setTimeout(() => resolve(\"\"), 100));\n }\n storageKey ||= \"pagy-\" + Date.now().toString(36);\n const data = storage.getItem(storageKey),\n cutoffs = (data ? JSON.parse(data) : [undefined]);\n if (spliceArgs) {\n cutoffs.splice(...spliceArgs);\n storage.setItem(storageKey, JSON.stringify(cutoffs));\n }\n // Augment the page param of each url\n for (const a of el.querySelectorAll('a[href]')) {\n const url = a.href,\n re = new RegExp(`(?<=\\\\?.*)\\\\b${pageSym}=([\\\\d]+)`), // find the numeric page\n pageNum = parseInt(url.match(re)?.[1]), // page=\\d+ is always in href\n value = B64SafeEncode(JSON.stringify([browserId,\n storageKey,\n pageNum,\n cutoffs.length, // pages\n cutoffs[pageNum - 1], // prevCutoff\n cutoffs[pageNum]])); // pageCutoff\n a.href = url.replace(re, `${pageSym}=${value}`);\n }\n };\n\n // Init the *_nav_js helpers\n const initNavJs = (el:NavJsElement, [tokens, sequels, labelSequels, cutoffArgs]:NavJsArgs) => {\n const container = el.parentElement ?? el,\n widths = Object.keys(sequels).map(w => parseInt(w)).sort((a, b) => b - a);\n let lastWidth = -1;\n const fillIn = (a:string, page:string, label:string) =>\n a.replace(/__pagy_page__/g, page).replace(/__pagy_label__/g, label);\n (el.pagyRender = () => {\n const width = widths.find(w => w < container.clientWidth) || 0;\n if (width === lastWidth) { return } // no change: abort\n\n let html = tokens.before;\n const series = sequels[width.toString()],\n labels = labelSequels?.[width.toString()] ?? series.map(l => l.toString());\n series.forEach((item, i) => {\n const label = labels[i];\n let filled;\n if (typeof item == \"number\") {\n filled = fillIn(tokens.a, item.toString(), label);\n } else if (item == \"gap\") {\n filled = tokens.gap;\n } else { // active page\n filled = fillIn(tokens.current, item, label);\n }\n html += filled;\n });\n html += tokens.after;\n\n el.innerHTML = \"\";\n el.insertAdjacentHTML(\"afterbegin\", html);\n lastWidth = width;\n if (cutoffArgs) { void initCutoffs(el, cutoffArgs) }\n })();\n if (el.classList.contains(\"pagy-rjs\")) { rjsObserver.observe(container) }\n };\n\n // Init the *_combo_nav_js helpers\n const initComboJs = (el:Element, [url_token]:ComboJsArgs) =>\n initInput(el, inputValue => url_token.replace(/__pagy_page__/, inputValue));\n\n // Init the limit_selector_js helper\n const initSelectorJs = (el:Element, [from, url_token]:SelectorJsArgs) => {\n initInput(el, inputValue => {\n const page = Math.max(Math.ceil(from / parseInt(inputValue)), 1).toString();\n return url_token.replace(/__pagy_page__/, page).replace(/__pagy_limit__/, inputValue);\n });\n };\n\n // Init the input element\n const initInput = (el:Element, getUrl:(v:string) => string) => {\n const input = el.querySelector(\"input\"),\n link = el.querySelector(\"a\"),\n initial = input.value,\n action = () => {\n if (input.value === initial) { return } // not changed\n const [min, val, max] = [input.min, input.value, input.max].map(n => parseInt(n) || 0);\n if (val < min || val > max) { // reset invalid/out-of-range\n input.value = initial;\n input.select();\n return;\n }\n link.href = getUrl(input.value);\n link.click();\n };\n [\"change\", \"focus\"].forEach(e => input.addEventListener(e, () => input.select())); // auto-select\n input.addEventListener(\"focusout\", action); // trigger action\n input.addEventListener(\"keypress\", e => { if (e.key == \"Enter\") { action() } }); // trigger action\n };\n\n // Public interface\n return {\n version: \"9.3.3\",\n\n // Scan for elements with a \"data-pagy\" attribute and call their init functions with the decoded args\n init(arg?:Element) {\n const target = arg instanceof Element ? arg : document,\n elements = target.querySelectorAll(\"[data-pagy]\");\n for (const el of elements) {\n try {\n const [keyword, ...args] = JSON.parse(B64Decode(el.getAttribute(\"data-pagy\")));\n if (keyword == \"nav\") {\n void initCutoffs(el, args);\n } else if (keyword == \"nav_js\") {\n initNavJs(el, args);\n } else if (keyword == \"combo_js\") {\n initComboJs(el, args);\n } else if (keyword == \"selector_js\") {\n initSelectorJs(el, args);\n }\n //else { console.warn(\"Pagy.init() error: %o\\nUnknown keyword '%s'\", el, keyword) }\n } catch (err) { console.warn(\"Pagy.init() error: %o\\n%s\", el, err) }\n }\n }\n };\n})();\n" + "interface SyncData {\n from?: number\n to?: number\n key: string\n str?: string\n}\ntype InitArgs = [\"n\", CutoffArgs] |\n [\"nj\", NavJsArgs] |\n [\"cj\", ComboJsArgs] |\n [\"sj\", SelectorJsArgs]\n\ntype CutoffArgs = readonly [pageSym: string,\n update: [storageKey: string, splice?: SpliceArgs]]\n\ntype SpliceArgs = readonly [start: number,\n deleteCount: number, // it would be optional, but ts complains\n ...items: Cutoff[]]\n\ntype Cutoff = readonly (string | number | boolean)[]\n\ntype CutoffsParams = [browserId: string,\n storageKey: string,\n pageNumber: number,\n pages: number,\n prevCutoff?: Cutoff,\n pageCutoff?: Cutoff]\n\ntype NavJsArgs = readonly [Tokens, Sequels, LabelSequels, CutoffArgs]\n\ntype ComboJsArgs = readonly [urlToken:string]\n\ntype SelectorJsArgs = readonly [from: number,\n urlToken: string]\n\ntype Tokens = readonly [before: string,\n a: string,\n current: string,\n gap: string,\n after: string]\ninterface Sequels {\n readonly [width:string]: (string | number)[]\n}\ninterface LabelSequels {\n readonly [width:string]: string[]\n}\ninterface NavJsElement extends Element {\n init(): void\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst Pagy = (() => {\n const storageSupport = 'sessionStorage' in window && 'BroadcastChannel' in window,\n pageRe = \" P \"; // shorten the compiled size\n let storage: Storage, sync: BroadcastChannel, tabId: number;\n if (storageSupport) {\n storage = sessionStorage; // shorten the compiled size\n sync = new BroadcastChannel(\"pagy\");\n tabId = Date.now();\n // Sync the sessionStorage keys for the cutoffs opened in a new tab/window\n sync.addEventListener(\"message\", (e:MessageEvent) => {\n if (e.data.from) { // request cutoffs\n const cutoffs = storage.getItem(e.data.key);\n if (cutoffs) {\n sync.postMessage({to: e.data.from, key: e.data.key, str: cutoffs});\n } // send response\n } else if (e.data.to) { // receive cutoffs\n if (e.data.to == tabId) {\n storage.setItem(e.data.key, e.data.str);\n }\n }\n });\n }\n // The observer instance for responsive navs\n const rjsObserver = new ResizeObserver(\n entries => entries.forEach(e => {\n e.target.querySelectorAll(\".pagy-rjs\").forEach(el => el.init());\n }));\n\n const B64Encode = (unicode:string) => btoa(String.fromCharCode(...(new TextEncoder).encode(unicode))),\n B64Safe = (unsafe:string) => unsafe.replace(/=/g, \"\").replace(/[+/]/g, (match) => match == \"+\" ? \"-\" : \"_\"),\n B64SafeEncode = (unicode:string) => B64Safe(B64Encode(unicode)),\n B64Decode = (base64:string) => (new TextDecoder()).decode(Uint8Array.from(atob(base64), c => c.charCodeAt(0)));\n // B64Unsafe = (safe:string) => safe.replace(/[-_]/g, (match) => match == \"-\" ? \"+\" : \"/\"),\n // B64SafeDecode = (base64:string) => B64Decode(B64Unsafe(base64))\n\n // Init the Cutoffs features\n const initCutoffs = async (el:Element, [pageSym, [storageKey, spliceArgs]]:CutoffArgs) => {\n if (!storageSupport) { return }\n\n let browserId = document.cookie.split(/;\\s+/) // it works even if malformed\n .find((row) => row.startsWith(\"pagy=\"))\n ?.split(\"=\")[1];\n if (!browserId) {\n document.cookie = \"pagy=\" + (browserId = Math.floor(Math.random() * 36 ** 3).toString(36));\n }\n if (storageKey && !(storageKey in storage)) {\n // Sync the sessiongStorage from other tabs/windows (e.g. open page in new tab/window)\n sync.postMessage({ from: tabId, key: storageKey });\n // Wait for the listener to copy the cutoffs in the current sessionStorage\n await new Promise((resolve) => setTimeout(() => resolve(\"\"), 100));\n }\n storageKey ||= \"pagy-\" + Date.now().toString(36);\n const data = storage.getItem(storageKey),\n cutoffs = (data ? JSON.parse(data) : [undefined]);\n if (spliceArgs) {\n cutoffs.splice(...spliceArgs);\n storage.setItem(storageKey, JSON.stringify(cutoffs));\n }\n // Augment the page param of each url\n for (const a of el.querySelectorAll('a[href]')) {\n const url = a.href,\n re = new RegExp(`(?<=\\\\?.*)\\\\b${pageSym}=([\\\\d]+)`), // find the numeric page\n pageNum = parseInt(url.match(re)?.[1]), // page=\\d+ is always in href\n value = B64SafeEncode(JSON.stringify([browserId,\n storageKey,\n pageNum,\n cutoffs.length, // pages/last\n cutoffs[pageNum - 1], // prevCutoff\n cutoffs[pageNum]])); // pageCutoff\n a.href = url.replace(re, `${pageSym}=${value}`);\n }\n };\n\n // Init the *_nav_js helpers\n const initNavJs = (el:NavJsElement, [[before, a, current, gap, after], sequels, labelSequels, cutoffArgs]:NavJsArgs) => {\n const container = el.parentElement ?? el,\n widths = Object.keys(sequels).map(w => parseInt(w)).sort((a, b) => b - a);\n let lastWidth = -1;\n const fillIn = (a:string, page:string, label:string) =>\n a.replace(pageRe, page).replace(\">T<\", `>${label}<`);\n (el.init = () => {\n const width = widths.find(w => w < container.clientWidth) || 0;\n if (width === lastWidth) { return } // no change: abort\n\n let html = before;\n const series = sequels[width.toString()],\n labels = labelSequels?.[width.toString()] ?? series.map(l => l.toString());\n series.forEach((item, i) => {\n const label = labels[i];\n let filled;\n if (typeof item == \"number\") {\n filled = fillIn(a, item.toString(), label);\n } else if (item == \"gap\") {\n filled = gap;\n } else { // active page\n filled = fillIn(current, item, label);\n }\n html += filled;\n });\n html += after;\n\n el.innerHTML = \"\";\n el.insertAdjacentHTML(\"afterbegin\", html);\n lastWidth = width;\n if (cutoffArgs) { void initCutoffs(el, cutoffArgs) }\n })();\n if (el.classList.contains(\"pagy-rjs\")) { rjsObserver.observe(container) }\n };\n\n // Init the *_combo_nav_js helpers\n const initComboJs = (el:Element, [url_token]:ComboJsArgs) =>\n initInput(el, inputValue => url_token.replace(pageRe, inputValue));\n\n // Init the limit_selector_js helper\n const initSelectorJs = (el:Element, [from, url_token]:SelectorJsArgs) => {\n initInput(el, inputValue => {\n const page = Math.max(Math.ceil(from / parseInt(inputValue)), 1).toString();\n return url_token.replace(pageRe, page).replace(' L ', inputValue);\n });\n };\n\n // Init the input element\n const initInput = (el:Element, getUrl:(v:string) => string) => {\n const input = el.querySelector(\"input\"),\n link = el.querySelector(\"a\"),\n initial = input.value,\n action = () => {\n if (input.value === initial) { return } // not changed\n const [min, val, max] = [input.min, input.value, input.max].map(n => parseInt(n) || 0);\n if (val < min || val > max) { // reset invalid/out-of-range\n input.value = initial;\n input.select();\n return;\n }\n link.href = getUrl(input.value);\n link.click();\n };\n [\"change\", \"focus\"].forEach(e => input.addEventListener(e, () => input.select())); // auto-select\n input.addEventListener(\"focusout\", action); // trigger action\n input.addEventListener(\"keypress\", e => { if (e.key == \"Enter\") { action() } }); // trigger action\n };\n\n // Public interface\n return {\n version: \"9.3.3\",\n\n // Scan for elements with a \"data-pagy\" attribute and call their init functions with the decoded args\n init(arg?:Element) {\n const target = arg instanceof Element ? arg : document,\n elements = target.querySelectorAll(\"[data-pagy]\");\n for (const el of elements) {\n try {\n const [key, ...args] = JSON.parse(B64Decode(el.getAttribute(\"data-pagy\")));\n if (key == \"n\") {\n void initCutoffs(el, args);\n } else if (key == \"nj\") {\n initNavJs(el, args);\n } else if (key == \"cj\") {\n initComboJs(el, args);\n } else if (key == \"sj\") {\n initSelectorJs(el, args);\n }\n //else { console.warn(\"Pagy.init: %o\\nUnknown key '%s'\", el, key) }\n } catch (err) { console.warn(\"Pagy.init: %o\\n%s\", el, err) }\n }\n }\n };\n})();\n" ], - "mappings": ";AA0BA,IAAM,QAAQ,MAAM;AAClB,QAAM,iBAAiB,oBAAoB,UAAU,sBAAsB;AAC3E,MAAI,SAAkB,MAAwB;AAC9C,MAAI,gBAAgB;AAClB,cAAU;AACV,WAAU,IAAI,iBAAiB,MAAM;AACrC,YAAU,KAAK,IAAI;AAEnB,SAAK,iBAAiB,WAAW,CAAC,MAA6B;AAC7D,UAAI,EAAE,KAAK,MAAM;AACf,cAAM,UAAU,QAAQ,QAAQ,EAAE,KAAK,GAAG;AAC1C,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.min.js index 61e892d35..ff4c59d4b 100644 --- a/gem/javascripts/pagy.min.js +++ b/gem/javascripts/pagy.min.js @@ -1 +1 @@ -window.Pagy=(()=>{const P="sessionStorage"in window&&"BroadcastChannel"in window;let $,x,O;if(P)$=sessionStorage,x=new BroadcastChannel("pagy"),O=Date.now(),x.addEventListener("message",(z)=>{if(z.data.from){const G=$.getItem(z.data.key);if(G)x.postMessage({to:z.data.from,key:z.data.key,cutoffs:G})}else if(z.data.to){if(z.data.to==O)$.setItem(z.data.key,z.data.cutoffs)}});const J=new ResizeObserver((z)=>z.forEach((G)=>{G.target.querySelectorAll(".pagy-rjs").forEach((F)=>F.pagyRender())})),U=(z)=>btoa(String.fromCharCode(...new TextEncoder().encode(z))),B=(z)=>z.replace(/=/g,"").replace(/[+/]/g,(G)=>G=="+"?"-":"_"),N=(z)=>B(U(z)),_=(z)=>new TextDecoder().decode(Uint8Array.from(atob(z),(G)=>G.charCodeAt(0))),E=async(z,[G,[F,L]])=>{if(!P)return;let H=document.cookie.split(/;\s+/).find((T)=>T.startsWith("pagy="))?.split("=")[1];if(!H)document.cookie="pagy="+(H=Math.floor(Math.random()*46656).toString(36));if(F&&!(F in $))x.postMessage({from:O,key:F}),await new Promise((T)=>setTimeout(()=>T(""),100));F||="pagy-"+Date.now().toString(36);const Q=$.getItem(F),R=Q?JSON.parse(Q):[void 0];if(L)R.splice(...L),$.setItem(F,JSON.stringify(R));for(let T of z.querySelectorAll("a[href]")){const Z=T.href,M=new RegExp(`(?<=\\?.*)\\b${G}=([\\d]+)`),X=parseInt(Z.match(M)?.[1]),j=N(JSON.stringify([H,F,X,R.length,R[X-1],R[X]]));T.href=Z.replace(M,`${G}=${j}`)}},q=(z,[G,F,L,H])=>{const Q=z.parentElement??z,R=Object.keys(F).map((M)=>parseInt(M)).sort((M,X)=>X-M);let T=-1;const Z=(M,X,j)=>M.replace(/__pagy_page__/g,X).replace(/__pagy_label__/g,j);if((z.pagyRender=()=>{const M=R.find((Y)=>YY.toString());if(j.forEach((Y,I)=>{const C=A[I];let D;if(typeof Y=="number")D=Z(G.a,Y.toString(),C);else if(Y=="gap")D=G.gap;else D=Z(G.current,Y,C);X+=D}),X+=G.after,z.innerHTML="",z.insertAdjacentHTML("afterbegin",X),T=M,H)E(z,H)})(),z.classList.contains("pagy-rjs"))J.observe(Q)},V=(z,[G])=>W(z,(F)=>G.replace(/__pagy_page__/,F)),v=(z,[G,F])=>{W(z,(L)=>{const H=Math.max(Math.ceil(G/parseInt(L)),1).toString();return F.replace(/__pagy_page__/,H).replace(/__pagy_limit__/,L)})},W=(z,G)=>{const F=z.querySelector("input"),L=z.querySelector("a"),H=F.value,Q=()=>{if(F.value===H)return;const[R,T,Z]=[F.min,F.value,F.max].map((M)=>parseInt(M)||0);if(TZ){F.value=H,F.select();return}L.href=G(F.value),L.click()};["change","focus"].forEach((R)=>F.addEventListener(R,()=>F.select())),F.addEventListener("focusout",Q),F.addEventListener("keypress",(R)=>{if(R.key=="Enter")Q()})};return{version:"9.3.3",init(z){const G=z instanceof Element?z:document,F=G.querySelectorAll("[data-pagy]");for(let L of F)try{const[H,...Q]=JSON.parse(_(L.getAttribute("data-pagy")));if(H=="nav")E(L,Q);else if(H=="nav_js")q(L,Q);else if(H=="combo_js")V(L,Q);else if(H=="selector_js")v(L,Q)}catch(H){console.warn("Pagy.init() error: %o\n%s",L,H)}}}})(); +window.Pagy=(()=>{const C="sessionStorage"in window&&"BroadcastChannel"in window;let j,D,W;if(C)j=sessionStorage,D=new BroadcastChannel("pagy"),W=Date.now(),D.addEventListener("message",(z)=>{if(z.data.from){const G=j.getItem(z.data.key);if(G)D.postMessage({to:z.data.from,key:z.data.key,str:G})}else if(z.data.to){if(z.data.to==W)j.setItem(z.data.key,z.data.str)}});const _=new ResizeObserver((z)=>z.forEach((G)=>{G.target.querySelectorAll(".pagy-rjs").forEach((F)=>F.init())})),q=(z)=>btoa(String.fromCharCode(...new TextEncoder().encode(z))),V=(z)=>z.replace(/=/g,"").replace(/[+/]/g,(G)=>G=="+"?"-":"_"),v=(z)=>V(q(z)),A=(z)=>new TextDecoder().decode(Uint8Array.from(atob(z),(G)=>G.charCodeAt(0))),J=async(z,[G,[F,H]])=>{if(!C)return;let L=document.cookie.split(/;\s+/).find((R)=>R.startsWith("pagy="))?.split("=")[1];if(!L)document.cookie="pagy="+(L=Math.floor(Math.random()*46656).toString(36));if(F&&!(F in j))D.postMessage({from:W,key:F}),await new Promise((R)=>setTimeout(()=>R(""),100));F||="pagy-"+Date.now().toString(36);const Q=j.getItem(F),M=Q?JSON.parse(Q):[void 0];if(H)M.splice(...H),j.setItem(F,JSON.stringify(M));for(let R of z.querySelectorAll("a[href]")){const Y=R.href,Z=new RegExp(`(?<=\\?.*)\\b${G}=([\\d]+)`),x=parseInt(Y.match(Z)?.[1]),O=v(JSON.stringify([L,F,x,M.length,M[x-1],M[x]]));R.href=Y.replace(Z,`${G}=${O}`)}},I=(z,[[G,F,H,L,Q],M,R,Y])=>{const Z=z.parentElement??z,x=Object.keys(M).map((T)=>parseInt(T)).sort((T,$)=>$-T);let O=-1;const B=(T,$,P)=>T.replace(" P ",$).replace(">T<",`>${P}<`);if((z.init=()=>{const T=x.find((X)=>XX.toString());if(P.forEach((X,K)=>{const N=k[K];let E;if(typeof X=="number")E=B(F,X.toString(),N);else if(X=="gap")E=L;else E=B(H,X,N);$+=E}),$+=Q,z.innerHTML="",z.insertAdjacentHTML("afterbegin",$),O=T,Y)J(z,Y)})(),z.classList.contains("pagy-rjs"))_.observe(Z)},S=(z,[G])=>U(z,(F)=>G.replace(" P ",F)),h=(z,[G,F])=>{U(z,(H)=>{const L=Math.max(Math.ceil(G/parseInt(H)),1).toString();return F.replace(" P ",L).replace(" L ",H)})},U=(z,G)=>{const F=z.querySelector("input"),H=z.querySelector("a"),L=F.value,Q=()=>{if(F.value===L)return;const[M,R,Y]=[F.min,F.value,F.max].map((Z)=>parseInt(Z)||0);if(RY){F.value=L,F.select();return}H.href=G(F.value),H.click()};["change","focus"].forEach((M)=>F.addEventListener(M,()=>F.select())),F.addEventListener("focusout",Q),F.addEventListener("keypress",(M)=>{if(M.key=="Enter")Q()})};return{version:"9.3.3",init(z){const G=z instanceof Element?z:document,F=G.querySelectorAll("[data-pagy]");for(let H of F)try{const[L,...Q]=JSON.parse(A(H.getAttribute("data-pagy")));if(L=="n")J(H,Q);else if(L=="nj")I(H,Q);else if(L=="cj")S(H,Q);else if(L=="sj")h(H,Q)}catch(L){console.warn("Pagy.init: %o\n%s",H,L)}}}})(); diff --git a/gem/javascripts/pagy.mjs b/gem/javascripts/pagy.mjs index 3b8924d98..aa0fb5d60 100644 --- a/gem/javascripts/pagy.mjs +++ b/gem/javascripts/pagy.mjs @@ -1,5 +1,5 @@ const Pagy = (() => { - const storageSupport = "sessionStorage" in window && "BroadcastChannel" in window; + const storageSupport = "sessionStorage" in window && "BroadcastChannel" in window, pageRe = " P "; let storage, sync, tabId; if (storageSupport) { storage = sessionStorage; @@ -9,17 +9,17 @@ const Pagy = (() => { if (e.data.from) { const cutoffs = storage.getItem(e.data.key); if (cutoffs) { - sync.postMessage({ to: e.data.from, key: e.data.key, cutoffs }); + sync.postMessage({ to: e.data.from, key: e.data.key, str: cutoffs }); } } else if (e.data.to) { if (e.data.to == tabId) { - storage.setItem(e.data.key, e.data.cutoffs); + storage.setItem(e.data.key, e.data.str); } } }); } const rjsObserver = new ResizeObserver((entries) => entries.forEach((e) => { - e.target.querySelectorAll(".pagy-rjs").forEach((el) => el.pagyRender()); + e.target.querySelectorAll(".pagy-rjs").forEach((el) => el.init()); })); const B64Encode = (unicode) => btoa(String.fromCharCode(...new TextEncoder().encode(unicode))), B64Safe = (unsafe) => unsafe.replace(/=/g, "").replace(/[+/]/g, (match) => match == "+" ? "-" : "_"), B64SafeEncode = (unicode) => B64Safe(B64Encode(unicode)), B64Decode = (base64) => new TextDecoder().decode(Uint8Array.from(atob(base64), (c) => c.charCodeAt(0))); const initCutoffs = async (el, [pageSym, [storageKey, spliceArgs]]) => { @@ -52,30 +52,30 @@ const Pagy = (() => { a.href = url.replace(re, `${pageSym}=${value}`); } }; - const initNavJs = (el, [tokens, sequels, labelSequels, cutoffArgs]) => { + const initNavJs = (el, [[before, a, current, gap, after], sequels, labelSequels, cutoffArgs]) => { const container = el.parentElement ?? el, widths = Object.keys(sequels).map((w) => parseInt(w)).sort((a, b) => b - a); let lastWidth = -1; - const fillIn = (a, page, label) => a.replace(/__pagy_page__/g, page).replace(/__pagy_label__/g, label); - (el.pagyRender = () => { + const fillIn = (a, page, label) => a.replace(pageRe, page).replace(">T<", `>${label}<`); + (el.init = () => { const width = widths.find((w) => w < container.clientWidth) || 0; if (width === lastWidth) { return; } - let html = tokens.before; + let html = before; const series = sequels[width.toString()], labels = labelSequels?.[width.toString()] ?? series.map((l) => l.toString()); series.forEach((item, i) => { const label = labels[i]; let filled; if (typeof item == "number") { - filled = fillIn(tokens.a, item.toString(), label); + filled = fillIn(a, item.toString(), label); } else if (item == "gap") { - filled = tokens.gap; + filled = gap; } else { - filled = fillIn(tokens.current, item, label); + filled = fillIn(current, item, label); } html += filled; }); - html += tokens.after; + html += after; el.innerHTML = ""; el.insertAdjacentHTML("afterbegin", html); lastWidth = width; @@ -87,11 +87,11 @@ const Pagy = (() => { rjsObserver.observe(container); } }; - const initComboJs = (el, [url_token]) => initInput(el, (inputValue) => url_token.replace(/__pagy_page__/, inputValue)); + const initComboJs = (el, [url_token]) => initInput(el, (inputValue) => url_token.replace(pageRe, inputValue)); const initSelectorJs = (el, [from, url_token]) => { initInput(el, (inputValue) => { const page = Math.max(Math.ceil(from / parseInt(inputValue)), 1).toString(); - return url_token.replace(/__pagy_page__/, page).replace(/__pagy_limit__/, inputValue); + return url_token.replace(pageRe, page).replace(" L ", inputValue); }); }; const initInput = (el, getUrl) => { @@ -122,18 +122,18 @@ const Pagy = (() => { const target = arg instanceof Element ? arg : document, elements = target.querySelectorAll("[data-pagy]"); for (const el of elements) { try { - const [keyword, ...args] = JSON.parse(B64Decode(el.getAttribute("data-pagy"))); - if (keyword == "nav") { + const [key, ...args] = JSON.parse(B64Decode(el.getAttribute("data-pagy"))); + if (key == "n") { initCutoffs(el, args); - } else if (keyword == "nav_js") { + } else if (key == "nj") { initNavJs(el, args); - } else if (keyword == "combo_js") { + } else if (key == "cj") { initComboJs(el, args); - } else if (keyword == "selector_js") { + } else if (key == "sj") { initSelectorJs(el, args); } } catch (err) { - console.warn("Pagy.init() error: %o\n%s", el, err); + console.warn("Pagy.init: %o\n%s", el, err); } } } diff --git a/gem/lib/pagy/extras/bootstrap.rb b/gem/lib/pagy/extras/bootstrap.rb index b23bd0af5..cac56fe63 100644 --- a/gem/lib/pagy/extras/bootstrap.rb +++ b/gem/lib/pagy/extras/bootstrap.rb @@ -11,7 +11,7 @@ module BootstrapExtra def pagy_bootstrap_nav(pagy, id: nil, classes: 'pagination', aria_label: nil, **vars) id = %( id="#{id}") if id a = pagy_anchor(pagy, **vars) - data = %( #{pagy_data(pagy, :nav)}) if defined?(::Pagy::KeysetForUI) && pagy.is_a?(KeysetForUI) + data = %( #{pagy_data(pagy, :n)}) if defined?(::Pagy::KeysetForUI) && pagy.is_a?(KeysetForUI) html = %(
    #{bootstrap_prev_html(pagy, a)}) @@ -37,16 +37,16 @@ def pagy_bootstrap_nav_js(pagy, id: nil, classes: 'pagination', aria_label: nil, id = %( id="#{id}") if id a = pagy_anchor(pagy, **vars) tokens = { before: %(
      #{bootstrap_prev_html(pagy, a)}), - a: %(
    • #{a.(PAGE_TOKEN, LABEL_TOKEN, classes: 'page-link')}
    • ), + a: %(
    • #{JST.token(a.('P', 'T', classes: 'page-link'), pagy.vars[:page_sym])}
    • ), current: %(
    • #{LABEL_TOKEN}
    • ), + %(aria-current="page" aria-disabled="true">T), gap: %(
    • #{ pagy_t('pagy.gap')}
    • ), after: %(#{bootstrap_next_html pagy, a}
    ) } %() end @@ -62,7 +62,7 @@ def pagy_bootstrap_combo_nav_js(pagy, id: nil, classes: 'pagination', aria_label %(
      #{ bootstrap_prev_html(pagy, a) }
    • 48
    • 49
    • 50
    - :keyset: -pagy/extras/bulma___pagy_bulma_nav_js_test_0001_renders_single_and_multiple_pages_when_used_with_Pagy__Countless: - :plain_1_0: - :extras_1_0: - :plain_2_23: - :extras_2_23: +pagy/extras/bulma___pagy_bulma_combo_nav_js_test_0001_renders_first,_intermediate_and_last_pages: + :plain_1: '' + :extras_1: '' + :plain_3: '' + :extras_3: '' + :plain_6: '' + :extras_6: '' pagy/extras/bulma___pagy_bulma_nav_js_test_0002_renders_first,_intermediate_and_last_pages_with_required_steps: :plain_1: + data-pagy="WyJuaiIsWyI8YSByb2xlPVwibGlua1wiIGNsYXNzPVwicGFnaW5hdGlvbi1wcmV2aW91c1wiIGRpc2FibGVkIGFyaWEtZGlzYWJsZWQ9XCJ0cnVlXCIgYXJpYS1sYWJlbD1cIlByZXZpb3VzXCI+Jmx0OzwvYT48YSBocmVmPVwiL2Zvbz9wYWdlPTJcIiBjbGFzcz1cInBhZ2luYXRpb24tbmV4dFwiIGFyaWEtbGFiZWw9XCJOZXh0XCI+Jmd0OzwvYT48dWwgY2xhc3M9XCJwYWdpbmF0aW9uLWxpc3RcIj4iLCI8bGk+PGEgaHJlZj1cIi9mb28/cGFnZT0gUCBcIiBjbGFzcz1cInBhZ2luYXRpb24tbGlua1wiPlQ8L2E+PC9saT4iLCI8bGk+PGEgcm9sZT1cImxpbmtcIiBjbGFzcz1cInBhZ2luYXRpb24tbGluayBpcy1jdXJyZW50XCIgYXJpYS1jdXJyZW50PVwicGFnZVwiIGFyaWEtZGlzYWJsZWQ9XCJ0cnVlXCI+VDwvYT48L2xpPiIsIjxsaT48c3BhbiBjbGFzcz1cInBhZ2luYXRpb24tZWxsaXBzaXNcIj4maGVsbGlwOzwvc3Bhbj48L2xpPiIsIjwvdWw+Il0seyIwIjpbIjEiLDIsMyw0LDUsImdhcCIsNTBdfSxudWxsXQ=="> :extras_1: + aria-label="Pages" data-pagy="WyJuaiIsWyI8YSByb2xlPVw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JwYWdpbmF0aW9uLW5leHRcIiBkaXNhYmxlZCBhcmlhLWRpc2FibGVkPVwidHJ1ZVwiIGFyaWEtbGFiZWw9XCJOZXh0XCI+Jmd0OzwvYT48dWwgY2xhc3M9XCJwYWdpbmF0aW9uLWxpc3RcIj4iLCI8bGk+PGEgYW5jaG9yX3N0cmluZyBocmVmPVwiL2Zvbz9wYWdlPSBQIFwiIGNsYXNzPVwicGFnaW5hdGlvbi1saW5rXCI+VDwvYT48L2xpPiIsIjxsaT48YSByb2xlPVwibGlua1wiIGNsYXNzPVwicGFnaW5hdGlvbi1saW5rIGlzLWN1cnJlbnRcIiBhcmlhLWN1cnJlbnQ9XCJwYWdlXCIgYXJpYS1kaXNhYmxlZD1cInRydWVcIj5UPC9hPjwvbGk+IiwiPGxpPjxzcGFuIGNsYXNzPVwicGFnaW5hdGlvbi1lbGxpcHNpc1wiPiZoZWxsaXA7PC9zcGFuPjwvbGk+IiwiPC91bD4iXSx7IjAiOls0Niw0Nyw0OCw0OSwiNTAiXSwiNjAwIjpbMSwiZ2FwIiw0Niw0Nyw0OCw0OSwiNTAiXX0sbnVsbF0="> +pagy/extras/bulma___pagy_bulma_nav_js_test_0001_renders_single_and_multiple_pages_when_used_with_Pagy__Countless: + :plain_1_0: + :extras_1_0: + :plain_2_23: + :extras_2_23: diff --git a/test/pagy/extras/js_tools_calendar_test.rb b/test/pagy/extras/js_tools_calendar_test.rb index f4f000c59..e1b76617d 100644 --- a/test/pagy/extras/js_tools_calendar_test.rb +++ b/test/pagy/extras/js_tools_calendar_test.rb @@ -12,12 +12,6 @@ describe 'pagy/extras/js_tools_json' do let(:app) { MockApp.new(params: {}) } - # describe '#pagy_data' do - # it 'uses json' do - # _(app.pagy_data(Pagy.new(count: 10), :test_function, 'some-string', 123, true)).must_rematch :data - # end - # end - describe 'Calendar sequels and label_sequels' do it 'generate the labels for the sequels' do steps = { 0 => 5, 600 => 7 } diff --git a/test/pagy/extras/limit_test.rb.yaml b/test/pagy/extras/limit_test.rb.yaml index 829b91c4c..7dfc17242 100644 --- a/test/pagy/extras/limit_test.rb.yaml +++ b/test/pagy/extras/limit_test.rb.yaml @@ -1,10 +1,10 @@ --- pagy/extras/limit__view_methods_test_0001_renders_limit_selector: - :selector_1: '