All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Verify signed data in right ordering to prevent false positive tests
- Allow admin component to define
acl_resourcefor added security - Make ACL optional in admin controller and try to inherit from posted value
- Workaround for when HTML elements change tagName via AJAX
- Rename
script ref="initialData"todatafor browser compliance - Add new PHP Attribute
#[JsProperty]for usage in ComponentViewModels
- Autorefresh
form_keyin admin-pages - Rewrite admin controller to interface and apply custom CSRF
- Fix for missing form key in admin
- Change Alpine.store('LokiComponents').formKey yet again to MageCookies
- Replace LokiComponentFormKey with Alpine.store form key
- Autorefresh form key via AJAX calls
- When a CSRF exception occurs, display it as a regular error message
- Allow for lazy-loading by simply setting
lazy_loadin the block arguments
- Implement tight security filtering by default
- Implement recursionDepth limit (10) in filters and validators
- Render a maximum number of targets of 100 by default (DI-configurable)
- Sign AJAX queue
handles,pageHandlesandrequestproperties to prevent client-side tampering - Double-check that component/block name in AJAX call is a string
- Restrict targets and handles to be valid strings
- Add pageHandles to AJAX calls
- Allow for empty component update to be passing validation
- Additional Playwright tests
- Throw a exception when form key is not valid
- Do not allow GET requests anymore
- Make sure PositiveNumber filter always returns number
- Fix loading custom page layouts in AJAX calls
- Optimize layout loader (isolated vs singleton)
- Remove obsolete proxies
- Allow component update to load different XML layout handles
- Offer a DI-type for other modules to change layout handles before using them
- Trigger an event
loki-components.ajax.donewhen done with queue
- Move layout proxy from frontend to global DI
- Add
getLayout()method to ComponentInterface - Make sure layout-singleton is lazy-loaded to prevent premature updates
- Unfortunately, we can never 100% guarantee that block is loaded into ViewModel
- Do not use
staticsingleton - Only skip AJAX if flag
skipAjaxis set - Make no AJAX call when there are only component updates with value
false
- Allow for better UI of help-toggling
- Non-
Loki_Componentsicons were not rendering
- Prevent type-error when LengthValidator is populated from XML layout
- Extract messages into separate
loki_messageshandler for usage elsewhere
- Simplify modal behaviour without reactivity
- Issue with input[type=number] and selectionStart
- When activeElement is not an input, set it to false
- When focusing upon activeElement, jump to end of input value
- Add
remove_spacesfilter - Move references to modal to nextClick just to be sure
- Allow ImageRenderer::icon() to be passed full asset ID
- Skip HTML attributes that wrongfully have an array-value
- Add message to RedirectException
- Make sure LengthValidator also reads from
minandmax - Allow setting
allow_renderingvia XML layout - Allow for
icon()to be passed HTML properties for SVG
- Merge all JS attributes of Address into Location
- Add ReturnTypeWillChange to jsonSerialize to fix 2.4.5 compile issue
- Move TransferableAncestorBlockProperties from components to base
- Split up BusinessHours into smaller entities Day and DayPart
- Sanitize ValueObjects like Address, BusinessHours, Location
- Allow properties of ancestor block to populate child block
- Do not set
flexCSS class on loader when it is hidden (fixing Breeze issue)
- Skip activeElement for focussing if it does not exist
- Improve autofocus behaviour
- Allow for more translations
- Make sure to read
polling_intervalfrom block - Rewrite email validator logic to be more readable
- Do not set an interval but a timeout for lazyUpdateTimeout
- Set default lazyUpdateTimeout of 0 in JS as well
- Make sure that modalOpen is used when closing modal via ESC
- Add optional polling behaviour
- Allow for component to skip queue
- Allow lazy updates to be submitted after timeout
- Add simple helper functions for matching strings in body
- Allow older versions of psr/log
- Lower requirement of Laminas to laminas/laminas-http
- Allow required error-message to be configured via block arg
required_error_message - Allow monitoring the AJAX queue via event
loki-components.ajax.loading
- Add re-usable ComponentContextMock for unit tests
- Surpress required-errors on next step
- Fix PHPStan issue and PHP unit test
- Add
#[\ReturnTypeWillChange]to allow for removal ofmixedtype hint
- Set skipValidation = false for any component by default
- Do not show required-errors if address is reset after country change
- Issue with removed modal giving JS warning
- Add missing methods addSuccess(), addWarning(), addNotice()
- Move component context parentContexts outside of deps
- Do not escape Unicode and slashes while building the x-ref script-block
- Refactor modal component-partial to have more sensible API
- Allow for parsing an address before usage via DI type
- Add oneline renderer to AddressRenderer
- Add numerous fields to Address-object
- Allow for one ComponentContext to inherit from multiple others
- Heavily refactor Location, Address and Marker objects and factories
- If TemplateRenderer renders new block that already exists, reset template
- Allow PHP Config to read from current store level
- Allow LokiLoader components to be registered in LokiComponents store too
- Add template non-visible.phtml
- Add isVisible() component flag to skip rendering entirely
- Rewrite to composable AbstractComponentContext
- Remove unused structure
- Make sure GitHub Actions PHPStan uses right sources
- Rename Address::render() to Address::getInnerHtml()
- Add getViewModel() in repository directly
- Update MODULE.json with PHPStan level 3
- Remove final word
- Make create()
$dataargument optional - Allow ViewModelFactory::create() and get()
- Implement lazy updating of components
- Implement
lazy_updateas component property - Allow overriding
lazy_loadandlazy_updatevia XML layout - Based AlpineJS elementId upon
GetElementIdlogic - Unify element IDs based on blocks
- Fix integration tests
- Add new GitHub Action workflows
- Check for AlpineJS loader block instead of module being enabled
- Try fix PHPStan issues
- Fixes
- Lower PHPStan level from 3 to 2
- A type-hinting for PHPStan
- Copy generic CI/CD files
- Copy generic CI/CD files
- Only load Alpine if
MageOS_AlpineLoader isdisabled
- Order component targets by XML layout
render_order(if there at all) - Allow blocks without proper DOM DI to be shipped with DOM ID anyway
- Fix bug when component has empty output like
<div></div>
- Fix InvalidCharacterError because of
@in HTML root element - First tag match was never used
- Move dependency ComponentViewModelInterface from
Loki_BasetoLoki_Components
- Move childRenderer class from
Loki_ComponentstoLoki_Base - Do not convert HTML attributes like
@tox-onwhen updating HTML - Pass layout to
loki_components_repository_post_dispatch - Convert update error into ComponentUpdate value object
- Pass updates to event
loki_components_repository_post_dispatchto give context - Add debug message to component update
- Trigger
loki_components_repository_post_dispatchevent after repository updates are done
- Replace
@withx-on:and:withx-bind:when updating HTML attributes - Properly switch HTML attributes of root node when updating via AJAX
- Make sure generated element ID contains only alphanumeric plus dash
- Move AJAX check towards RequiredValidator class
- Move Integration Test assertion away from setUp into separate assertion method
- Replace
$block->getChildHtml()with$childRenderer->all()including better sorting
- Add FilterScope to every Filter
- Add component and scope args to FilterInterface::filter()
- Undo removal of M2.4.5 workarounds, use patch instead
- Make components visible by default
- Rename LokiMessageStore to Message
- Fix unit tests
- Make sure required numerical value is valid when zero
- Fix typo
- Apply new dispatching to admin controller too
- Update composer keywords
- Fetch component by blockId via
Alpine.store('components').getComponentByBlockId() - Cleanup of debugging statements
- Fix broken test
- Allow target to be any block, not just components
- Add component repository repository so when bulking, country is saved first
- Simplify request data via AJAX and fix issue with edit URL
- New container to allow for CSS prop and child sorting
- Prevent
preg_replacefrom removing slashes in x-loki-init script - Do not escape
$css()withescapeHtmlAttr()butescapeHtml() - Skin down LokiHtmlReplacer a bit
- Add LokiComponentExtender.addMixin()
- Add LokiComponentExtender for mixins and other modifications
- Newlines
- Optimize AJAX queue and HTML updater
- Move LokiHtmlUpdater from LokiCheckout to
Loki_Components - Move all MX logic to separate module
Loki_EmailMxValidator - Allow overriding SVG attributes if they already exist
- Formatting
- Automatically assign template vars to any template starting with Loki module-prefix
- Allow any Loki-driven block to use Loki template variables
- Apply proper ARIA attributes to tab components
- Add dev-mode warning when rendering of sorted childeren fails
- Allow sorting of children via block argument "sort_order"
- Allow any component to have a :cssClass
- Support icons passed as asset ID
- Register activeTabId when switching
- Make sure required values that are empty are validated
- Remove option "validate_on_ajax" and simply allow empty required values on-load
- Wrap CSS classes in
$css() - Add disabled state for active tab
- Improve image rendering
- Restructure of methods of imageRenderer to make more sense
- Add
x-ignoreto SVG output
- Fix wrong escaping
- Fix wrong escaping
- Fix wrong escaping in JS
- Fix wrong escaping in JS
- Optimize image rendering
- Prevent child renderer exception when child is empty
- Fix PHPStan issue with setTemplate() being called
- Add Loki Component exception as complex message
- Output SVG with given XML attributes properly
- New ImageRenderer::icon() method
- Add new block variable "imageRenderer"
- Move new login component to
LokiCheckout_Coreand beautify
- Enhance modals under Luma a bit
- Remove redundant CSS classes from icon containers
- Fix block rendering of static blocks
- Move messages timeout configuration from
Loki_ComponentstoLoki_Base - Fuse observers to avoid ordering conflict
- Implement new blockRenderer and childRenderer arguments
- Remove block argument from templateRenderer
- Configure block prefixes via DI type
- Only allow Loki block variables on block starting with "loki"
- Rename loki.script from container to block to allow caching
- Change containers into blocks to allow for caching
- Rename Alpine stores
- Add
.preventmodifier to@clickevent handler - Rename Alpine store checkout to LokiCheckout, components to LokiComponents
- Rewrite transfer of global messages from components to be a lot simpler
- Allow steps to have no block yet (outside of checkout)
- Fix new JSON strucure of component updates in admin controller
- Make showLoaderTimeout in components configurable
- Make AJAX queue interval configurable via XML layout
- Remove duplicate targets in AJAX queue
- Simplify messaging in LokiCheckout components
- Add todo
- Refresh stored messages when global components are refreshed
- Move LokiComponents global messages to regular messages template
- Add new Loki_Base as dependency and move over common logic
- Move AJAX behaviour into separate LokiAjaxQueue
- Rename loki-components.alpinejs to loki.alpinejs
- Add x-title only in Developer Mode
- Simplify active tab selection
- Create generic PHTML template for tab-buttons
- Fix strlen issue
- Allow a component to send validation messages globally via dispatch_local_messages=false
- Simplify security filter because the loop is taken care off by the Filter class
- Fix merge conflict
- Cleanup event listener
- Remove LengthBehaviourInterface
- Fix unit test
- Add MagentoVersion util for later usage
- Move LokiFieldViewModelImageOutput to LokiComponentsUtilImageOutput to remove circular dependency
- Copy generic CI/CD files
- Refactor hard-coded field attributes to FieldViewModel::getFieldAttributes()
- Remove LengthBehaviourInterface entirely
- Add usage instructions to README
- Add dep
- Add recurring setup to check for modules to enable
- Make sure modal does not cause issue if there is no modal element
- Convert all DOM classes and IDs to lowercase; Only validate components once
- Add comment with global message
- Make sure to log exceptions although they are caught
- New ViewModel
AppMode - Remove obsolete call to LokiComponentsFocusListener
- Move scripts from top of body to bottom of body
- Remove old
focus-listener - Add dep with
Loki_CssUtils - Import right CssClass util
- Fix newlines after comments
- Declare used PHP namespaces
- Add escaping of template code
- Add missing
strict_typesdeclaration - Move CssClass and CssStyle to separate package
- Use
xmark.svgto close global messages
- Allow for PHP 8.1 compatibility
- Lower requirements to PHP 8.1
- Option to limit cart items in sidebar but collapse to entire list
- Rename tab in Store Config from "Yireo" to "Loki"
- Add new
$style()variable in PHTML templates - Move config from Yireo tab to Loki tab
- Add data-valid attribute to fields
- Add addLocalMessage helpers
- Move loading features into separate component and component partial
- Lift up to PHPStan level 3
- Add escaping to templates
- Lift up to PHPStan level 2
- Prevent null HTML in transport from breaking AddHtmlAttributesToComponentBlock observer
- Move initMethods and destroyMethods into component partials
- Rename LokiDataLoaderComponentPartial to LokiLoadDataComponentPartial
- Implement
aria-errormessagetogether with existingaria-invalid - Do not display container of local messages, if there are no local messages
- Set message area default to local
- Allow XML layout to set message area to make component messages global or local
- Lower PHP requirement to PHP 8.2+
- Add CSS wrapper in various templates
- Make sure child block counter is used by all renderers
- Move modal close button into separate PHTML
- Trim HTML before trying to detect HTML elements within
- Special characters should not be converted to HTML chars
- Move logic to helper methods
- Implement better abort handling for AJAX requests
- Cancel existing AJAX calls on subsequent requests
- Remove ugly PHPUnit 10 work-around of getTestResultObject()
- Add router for increased performance
- Allow closing modal by clicking outside of modal
- Rename PHP namespace from
Yireo_LokiComponentstoLoki_Components - Rename composer from
yireo/magento2-loki-componentstoloki/magento2-components
- Add helper methods for adding notices, warnings, errors and success messages
- Add addGlobalError helper method to base component
- Do not convert special chars in field values (example
's Hertogenbosch)
- Add details/summary to popup message
- WIP on maps integration
- Remove echo from controller output, just make debug message more readable
- Enhance workflow of errors during final stage
- Reuse currentUri in AJAX request
- Fix z-index of messages
- Add simple LokiForm component
- Update admin settings with tooltip and regenerate new MODULE.json
- Fix possible warning
- Fix possible warning
- Add allFunctionsCalledOnLoad
- CSP issue with closing messages
- Move data loading into separate component partial
- Rewrite Alpine from initActions object to methods starting with init
- Allow for plugins to be loaded right before main Alpine
- Improve styling of messages in admin
- Move Loki messages in admin to page.messages container
- Add admin controller
- Support security for complex values
- Modules should NOT determine the page layout for reusable handles
- Allow everything to happen in backend as well
- Allow PHP 8.4 in CI
- Fix issue with LokiCheckoutMollie DI type overriding core validators
- Check for integration test containing string, not full match
- Add
setValue()method - CSP fixes
- Major version to promote stability, because it works!
- Intercept unwanted exceptions while rendering
- Move from
x-init-datato separatetext/x-loki-initscript to prevent possible escaping issues - Fix possible issue when LokiCheckout config is used outside of checkout
- Allow for
jsDatato be set from block as well - Fix CSP issue with new
x-jsondirective - Do not mark
ComponentUtilas a whole as deprecated - Move all field behaviour to FieldComponentType
- Move tabs into new component partial
- Make loader icon in fields depend on Alpine and activate only after configurable timeout
- Chop up modal into regular component, Loki Component and component partial
- Move scripts from "before.body.end" to new "loki-scripts" container
- Complete modal functionality
- Use
js_component_namefrom block by default
- Simplify reloading of this component
- Simplify loading state of target components
- Remove select-icon when loading select-field
- Reset HTML attributes when reloading component
- Allow for specific exceptions to redirect back to checkout/cart
- Refactor to ignore non-existing target rendering
- Rename default CSS class from "inline" to "default"
- Only show HTML hints for failing blocks in Developer Mode
- Refactor way that loading is handled a bit
- First batch of Playwright functional tests
- Add new MODULE.json with meta-information
- Fix test for components that are disallowed rendering
- Add proper styling of messages under Luma
- Turn Phrases into strings automatically
- Add validators
dateandpast_date - Reorganize tests
- Add module dependencies
- Huge refactoring to move logic into new LokiFieldComponents module
- Intercept non-existing target error
- Apply
document.getElementByIdafter nextTick - Improve handling of AJAX errors
- Make sure to remove loader when fatal errors occurs on server
- Remove wrong scope in CSS
- Add various integration tests
- Add TargetRenderer test
- Cleanup layout loader and add test
- Fix integration test of translation strings
- Abstract ViewModel methods for length behaviour
- Move EmailValidatorTest
- Add missing Dutch translations
- Properly translate validation messages
- Move email availability in separate validator
email_available - Rename
block loki-checkout.defaults.xtoloki-components.defaults.x - Rename
loki-checkout.css_classestoloki-components.css_classes - Config option for MX lookup was using wrong path
- Rewrite
Alpine.store()APIs
- Standardize JS event names
- Rename yireo-loki-checkout.component-change to loki-components.component.update
- Add generic LokiComponentsLogger
- StepForwardButton not activated after component updates ($nextTick is now used)
- Hide entire global messages div if empty
- Remove obsolete NoBlockFoundException
- Setting for disabling MX lookup for email validator
- Destroy components before updating their HTML
- Allow multiple destroy actions
- Remove old hasChanges method
- Do not display NoComponentFoundException on frontend
- Improve autofill mechanism
- Default target definitions were dropped when cache was refreshed from non-frontend
- Add little hint about microseconds
- Listen to autofill changes
- Add support default value
- Implement focus listener in a better way
- Allow stack trace to be shown as global message while debugging
- Position global messages fixed in top
- Add new setting for timeout of global messages
- Only add trace to exceptions if debugging is enabled
- Do not switch back to originalValue, preventing AJAX loop
- Only validate AJAX calls by default
- Fix issue with HTML attributes for nested components
- Prevent duplicate HTML attributes
- Re-add getFilters and getValidators differently
- Only validate AJAX calls setting
- Rewrite updating of HTML and component props
- Remove duplicate newlines for easier debugging
- Add failsafe checks
- Add debug config option
- Friendlier message for unknown email domain in validator
- Refactor LocalMessageRegistry methods
- Remove obsolete ViewModel methods getFilters and getValidators
- Fix rendering of global messages
- Fix issue in refreshing other targets
- Fix autofocus after HTML updates
- Redirect to cart when AJAX fails with empty quote
- Fix
preg_matchissue - Allow for default core messages to be used as Loki GlobalMessages
- Fix message location for Luma
- Improve logic of AJAX handling
- Pass original request through to layout
- Move CssClass to LokiComponents
- Remove dependency between validators and component object
- Initial release