@optionfactory/fml 9.0.0-rc8 → 9.0.0-rc9

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.
package/dist/ful.mjs CHANGED
@@ -4924,7 +4924,7 @@ class Dialog extends ParsedElement {
4924
4924
  <section data-ref="error" role="alert" hidden></section>
4925
4925
  <div data-ref="body" class="ful-dialog-body">{{{{ slots.default }}}}</div>
4926
4926
  <footer class="ful-dialog-footer">
4927
- <button type="button" data-ref="acknowledge" data-result="acknowledged" data-tpl-if="!slots.buttons" data-tpl-aria-label="#l10n:t('dialog.acknowledge')">{{ #l10n:t('dialog.acknowledge') }}</button>
4927
+ <button type="button" data-ref="acknowledge" data-result="acknowledged" data-tpl-if="!slots.buttons && !closeOnSubmit" data-tpl-aria-label="#l10n:t('dialog.acknowledge')">{{ #l10n:t('dialog.acknowledge') }}</button>
4928
4928
  {{{{ slots.buttons }}}}
4929
4929
  </footer>
4930
4930
  </dialog>
@@ -4942,8 +4942,9 @@ class Dialog extends ParsedElement {
4942
4942
  #answer = null;
4943
4943
  render({ slots }) {
4944
4944
  const requiresAnswer = this.declared('requires-answer');
4945
+ const closeOnSubmit = this.declared('close-on-submit');
4945
4946
  const fragment = this.template()
4946
- .withOverlay({ slots, header: this.declared('header') ?? '', requiresAnswer })
4947
+ .withOverlay({ slots, header: this.declared('header') ?? '', requiresAnswer, closeOnSubmit })
4947
4948
  .render();
4948
4949
  this.#dialog = fragment.querySelector('[data-ref=dialog]');
4949
4950
  this.#body = fragment.querySelector('[data-ref=body]');
@@ -4966,7 +4967,7 @@ class Dialog extends ParsedElement {
4966
4967
  fragment
4967
4968
  .querySelector('[data-ref=close]')
4968
4969
  ?.addEventListener('click', () => this.#dialog.close(''));
4969
- if (this.declared('close-on-submit')) {
4970
+ if (closeOnSubmit) {
4970
4971
  //delegated on the body rather than bound to the form, so a body
4971
4972
  //delivered later by update() is covered by the same listener. The
4972
4973
  //form must be the body's own: a ful-table wraps its filters in a