Skip to content

Commit

Permalink
Merge pull request #81 from charcoalphp/joel/feature/tabulator-input
Browse files Browse the repository at this point in the history
Add Tabulator Input + Add Translatable Value + Improve Structure Properties

### Admin

* Add support for ES6 in the asset build.
* Add `AbstractPropertyInput::getInputValOptions()` to allow input sub-classes to define their own set of options to parse input values.
* Add input that integrates [Tabulator](https://tabulator.info/) for tabular data editing.
* Improve handling of JSON values with `TabulatorInput`, `JsonEditorInput`, and `TextareaInput`.
* Prioritize `form_group` over `default_form_group` in `StructureFormGroup` to allow for custom one-off form groups.

### Property

* Validate models in `ModelStructureProperty`.

### Translator

* Rework the translation system to standardize translatable values with new `TranslatableInterface` and add a new `TranslatableValue` to dissociate from `Translation` which is tied with the `Translator` and `LocalesManager`.
* Add awareness of `TranslatableValue` to Property package.

-----

## Changes :

### Features

* **admin:** Add custom dialog titles for Selectize input ([ffc3382](ffc3382))
* **admin:** Add JS debounce factory ([7a25409](7a25409))
* **admin:** Add support to customize form widget used by Selectize input ([b407dfb](b407dfb)), closes [#88](#88)
* **admin:** Add validation message to TinyMCE on save ([46af62b](46af62b))
* **admin:** Change default options of TinyMCE Basic Input ([26018e9](26018e9))
* **admin:** Improve Selectize LoadAction controller ([21057b7](21057b7)), closes [#85](#85)
* **admin:** Improve structure property metadata filtering ([8eb96cb](8eb96cb))
* **admin:** Improve Tabulator Input ([fc33ab0](fc33ab0))
* **admin:** Improve validation/requirements in Tabulator Input ([13b33d4](13b33d4))
* **admin:** Sort admin secondary and system menu items ([e6c3493](e6c3493))
* **admin:** Use Bootstrap 4 theme for Tabulator Input ([b93cd5d](b93cd5d))
* **input:** add getInputValOptions to allow input classes to define their own set of options. ([8d3ce52](8d3ce52))
* **model-structure-property:** improve ModelStructureProperty.php ([47c1ae0](47c1ae0))
* **module:** Improve module app config loader ([8871115](8871115))
* **property:** Add support for dynamic type field to Object Property ([d153868](d153868)), closes [#86](#86)
* **structure-form-group:** improve StructureFormGroup.php ([c2f385e](c2f385e))
* **structure:** add TranslatableValue.php awareness to AbstractProperty.php ([ca67612](ca67612))
* **tabulator:** add tabulator front-end lib and templates ([b2cda4a](b2cda4a))
* **tabulator:** add TabulatorInput.php ([bbccfc6](bbccfc6))
* **tabulator:** implement tabulator.js as Charcoal js module ([0626c61](0626c61))
* **translator:** rework the translator and translation systems to standardize translatables with TranslatableInterface.php and add a new TranslatableValue.php enabling dissociating translation from the core translator ([a29d0f3](a29d0f3))


### Bug Fixes

* **abstract-selectable:** add check for `is_object` before calling `method_exists` on potential integer value ([42876e3](42876e3))
* **admin:** Add fallback layout for form group properties ([04169c8](04169c8))
* **admin:** Change Object UpdateAction ([d2aba67](d2aba67))
* **admin:** Fix admin template menu building ([1221167](1221167))
* **admin:** Fix appearance of Selectize List ([6ec39df](6ec39df))
* **admin:** Fix block comments of Tabulator input ([d86a2b7](d86a2b7))
* **admin:** Fix handling of property type metadata in CollectionContainerTrait ([aa465e7](aa465e7))
* **admin:** Fix margins for switch and file inputs ([e582431](e582431))
* **admin:** Fix quick forms, form tabs, and L10N inputs ([cd65f2c](cd65f2c))
* **admin:** Fix referenced version of Tabulator in NPM manifest ([cf506d4](cf506d4))
* **admin:** Improve error handling in ObjectContainerTrait ([5e00185](5e00185))
* **admin:** Improve structure card header ([2e0c6a7](2e0c6a7))
* **admin:** Improve styles and logic of Tabulator Input ([b3971c0](b3971c0))
* **admin:** Localize Tabulator Input ([f7e1666](f7e1666))
* **bin:** Search working directory for Composer autoloader ([4226199](4226199))
* **cache:** Ignore broken cache drivers in tests ([1316be1](1316be1))
* **json-editor:** use inputVal instead of jsonVal for json-editor.mustache since it's no longer needed following changes to TranslatableValue and AbstractProperty/Input([013573b](013573b))
* **property:** Fix handling of `l10nVal()` on Structure Property ([d3c71b9](d3c71b9))
* **translatable:** make TranslatableValue.php ArrayAccess compliant ([4c40ea0](4c40ea0))
* **translatable:** update the `TranslatableInterface` to change the `trans` method signature and update `TranslatableValue` with said method and deprecate `each` and `sanitize` for future version of charcoal ([a728e07](a728e07))
* **translation:** revert construct to use manager and trans method no longer relay to `translator->translate()` ([6723433](6723433))
* **translator:** Revert `trans()` method of `TranslatableInterface` ([81393f6](81393f6))
  • Loading branch information
JoelAlphonso authored Mar 13, 2024
2 parents 8bd2487 + b3971c0 commit 458cf06
Show file tree
Hide file tree
Showing 75 changed files with 31,893 additions and 762 deletions.
12 changes: 9 additions & 3 deletions bin/charcoal
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,20 @@ if (PHP_SAPI !== 'cli') {
}

// Find Composer autoloader
$autoloaderPath = [
$autoloaderPaths = [
__DIR__ . '/../../../../vendor/autoload.php',
__DIR__ . '/../vendor/autoload.php',
__DIR__ . '/../autoload.php',
];

$cwd = getcwd();
if (is_string($cwd)) {
// Check the current working directory.
array_unshift($autoloaderPaths, $cwd . '/vendor/autoload.php');
}

$autoloaderFound = false;
foreach ($autoloaderPath as $file) {
foreach ($autoloaderPaths as $file) {
if (file_exists($file)) {
$autoloaderFound = true;
include $file;
Expand Down Expand Up @@ -53,7 +59,7 @@ if (!file_exists($confFile)) {
}

$config = new AppConfig([
'base_path' => $baseDir,
'base_path' => $baseDir,
]);
$config->addFile($confFile);
// Create container and configure it (with charcoal-config)
Expand Down
6 changes: 5 additions & 1 deletion packages/admin/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
{
"root": true,
"parserOptions": {
"ecmaVersion": "latest"
},
"env": {
"amd": true,
"browser": true
"browser": true,
"es6": true
},
"globals": {
"$": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/admin/.nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.17
16
Loading

0 comments on commit 458cf06

Please sign in to comment.