-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'development' into release
- Loading branch information
Showing
596 changed files
with
70,534 additions
and
4,211 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: test-js | ||
|
||
on: | ||
push: | ||
paths: | ||
- '**.js' | ||
- '**.ts' | ||
- '**.json' | ||
pull_request: | ||
paths: | ||
- '**.js' | ||
- '**.ts' | ||
- '**.json' | ||
|
||
jobs: | ||
build: | ||
if: ${{ github.ref != 'refs/heads/l10n_development' }} | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install NPM deps | ||
run: npm ci | ||
|
||
- name: Run TypeScript type checking | ||
run: npm run ts:lint | ||
|
||
- name: Run JavaScript tests | ||
run: npm run test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
/node_modules | ||
/.vscode | ||
/composer | ||
/coverage | ||
Homestead.yaml | ||
.env | ||
.idea | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
namespace BookStack\Access; | ||
|
||
use Exception; | ||
|
||
class UserInviteException extends Exception | ||
{ | ||
// | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
|
||
namespace BookStack\Entities\Tools; | ||
|
||
use BookStack\Entities\Models\Page; | ||
|
||
enum PageEditorType: string | ||
{ | ||
case WysiwygTinymce = 'wysiwyg'; | ||
case WysiwygLexical = 'wysiwyg2024'; | ||
case Markdown = 'markdown'; | ||
|
||
public function isHtmlBased(): bool | ||
{ | ||
return match ($this) { | ||
self::WysiwygTinymce, self::WysiwygLexical => true, | ||
self::Markdown => false, | ||
}; | ||
} | ||
|
||
public static function fromRequestValue(string $value): static|null | ||
{ | ||
$editor = explode('-', $value)[0]; | ||
return static::tryFrom($editor); | ||
} | ||
|
||
public static function forPage(Page $page): static|null | ||
{ | ||
return static::tryFrom($page->editor); | ||
} | ||
|
||
public static function getSystemDefault(): static | ||
{ | ||
$setting = setting('app-editor'); | ||
return static::tryFrom($setting) ?? static::WysiwygTinymce; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
namespace BookStack\Search\Options; | ||
|
||
class ExactSearchOption extends SearchOption | ||
{ | ||
public function toString(): string | ||
{ | ||
$escaped = str_replace('\\', '\\\\', $this->value); | ||
$escaped = str_replace('"', '\"', $escaped); | ||
return ($this->negated ? '-' : '') . '"' . $escaped . '"'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
|
||
namespace BookStack\Search\Options; | ||
|
||
class FilterSearchOption extends SearchOption | ||
{ | ||
protected string $name; | ||
|
||
public function __construct( | ||
string $value, | ||
string $name, | ||
bool $negated = false, | ||
) { | ||
parent::__construct($value, $negated); | ||
$this->name = $name; | ||
} | ||
|
||
public function toString(): string | ||
{ | ||
$valueText = ($this->value ? ':' . $this->value : ''); | ||
$filterBrace = '{' . $this->name . $valueText . '}'; | ||
return ($this->negated ? '-' : '') . $filterBrace; | ||
} | ||
|
||
public function getKey(): string | ||
{ | ||
return $this->name; | ||
} | ||
|
||
public static function fromContentString(string $value, bool $negated = false): self | ||
{ | ||
$explodedFilter = explode(':', $value, 2); | ||
$filterValue = (count($explodedFilter) > 1) ? $explodedFilter[1] : ''; | ||
$filterName = $explodedFilter[0]; | ||
return new self($filterValue, $filterName, $negated); | ||
} | ||
} |
Oops, something went wrong.