move event files from shared into core
This commit is contained in:
@@ -49,14 +49,22 @@ export class UmbCollectionSelectionActionsElement extends UmbLitElement {
|
||||
if (!this._collectionContext) return;
|
||||
|
||||
// TODO: Make sure it only updates on length change.
|
||||
this.observe(this._collectionContext.items, (mediaItems) => {
|
||||
this._nodesLength = mediaItems.length;
|
||||
}, 'observeItem');
|
||||
this.observe(
|
||||
this._collectionContext.items,
|
||||
(mediaItems) => {
|
||||
this._nodesLength = mediaItems.length;
|
||||
},
|
||||
'observeItem',
|
||||
);
|
||||
|
||||
this.observe(this._collectionContext.selection, (selection) => {
|
||||
this._selectionLength = selection.length;
|
||||
this._selection = selection;
|
||||
}, 'observeSelection');
|
||||
this.observe(
|
||||
this._collectionContext.selection,
|
||||
(selection) => {
|
||||
this._selectionLength = selection.length;
|
||||
this._selection = selection;
|
||||
},
|
||||
'observeSelection',
|
||||
);
|
||||
}
|
||||
|
||||
private _renderSelectionCount() {
|
||||
@@ -69,12 +77,12 @@ export class UmbCollectionSelectionActionsElement extends UmbLitElement {
|
||||
umbExtensionsRegistry.extensionsOfType('entityBulkAction').pipe(
|
||||
map((extensions) => {
|
||||
return extensions.filter((extension) => extension.conditions.entityType === this.#entityType);
|
||||
})
|
||||
}),
|
||||
),
|
||||
(bulkActions) => {
|
||||
this._entityBulkActions = bulkActions;
|
||||
}
|
||||
, 'observeEntityBulkActions'
|
||||
},
|
||||
'observeEntityBulkActions',
|
||||
);
|
||||
}
|
||||
|
||||
@@ -103,7 +111,7 @@ export class UmbCollectionSelectionActionsElement extends UmbLitElement {
|
||||
html`<umb-entity-bulk-action
|
||||
@executed=${this.#onActionExecuted}
|
||||
.selection=${this._selection}
|
||||
.manifest=${manifest}></umb-entity-bulk-action>`
|
||||
.manifest=${manifest}></umb-entity-bulk-action>`,
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -41,7 +41,7 @@ export class UmbTemplateModalElement extends UmbModalBaseElement<UmbTemplateModa
|
||||
async #saveTemplate() {
|
||||
const { error } = await tryExecuteAndNotify(
|
||||
this,
|
||||
TemplateResource.putTemplateById({ id: this._id, requestBody: this._template })
|
||||
TemplateResource.putTemplateById({ id: this._id, requestBody: this._template }),
|
||||
);
|
||||
if (!error) {
|
||||
console.log(`template (${this._id}) saved successfully`);
|
||||
|
||||
@@ -37,7 +37,7 @@ export class UmbPickerInputContext<ItemType extends ItemResponseModelBaseModel>
|
||||
host: UmbControllerHostElement,
|
||||
repositoryAlias: string,
|
||||
modalAlias: string | UmbModalToken,
|
||||
getUniqueMethod?: (entry: ItemType) => string | undefined
|
||||
getUniqueMethod?: (entry: ItemType) => string | undefined,
|
||||
) {
|
||||
this.host = host;
|
||||
this.modalAlias = modalAlias;
|
||||
|
||||
@@ -86,12 +86,12 @@ export class UmbInputMultipleTextStringElement extends FormControlMixin(UmbLitEl
|
||||
this.addValidator(
|
||||
'rangeUnderflow',
|
||||
() => this.minMessage,
|
||||
() => !!this.min && this._items.length < this.min
|
||||
() => !!this.min && this._items.length < this.min,
|
||||
);
|
||||
this.addValidator(
|
||||
'rangeOverflow',
|
||||
() => this.maxMessage,
|
||||
() => !!this.max && this._items.length > this.max
|
||||
() => !!this.max && this._items.length > this.max,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ export class UmbInputMultipleTextStringElement extends FormControlMixin(UmbLitEl
|
||||
async #focusNewItem() {
|
||||
await this.updateComplete;
|
||||
const items = this.shadowRoot?.querySelectorAll(
|
||||
'umb-input-multiple-text-string-item'
|
||||
'umb-input-multiple-text-string-item',
|
||||
) as NodeListOf<UmbInputMultipleTextStringItemElement>;
|
||||
const newItem = items[items.length - 1];
|
||||
newItem.focus();
|
||||
@@ -173,7 +173,7 @@ export class UmbInputMultipleTextStringElement extends FormControlMixin(UmbLitEl
|
||||
?disabled=${this.disabled}
|
||||
?readonly=${this.readonly}
|
||||
required
|
||||
required-message="Item ${index + 1} is missing a value"></umb-input-multiple-text-string-item>`
|
||||
required-message="Item ${index + 1} is missing a value"></umb-input-multiple-text-string-item>`,
|
||||
)}
|
||||
`;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { UmbTextStyles } from "@umbraco-cms/backoffice/style";
|
||||
import { UmbTextStyles } from '@umbraco-cms/backoffice/style';
|
||||
import { css, html, customElement, state } from '@umbraco-cms/backoffice/external/lit';
|
||||
import { UmbExecutedEvent } from '@umbraco-cms/backoffice/events';
|
||||
import { UmbLitElement } from '@umbraco-cms/internal/lit-element';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { UmbWorkspaceAction } from './index.js';
|
||||
import { css, html, customElement, property, state, query } from '@umbraco-cms/backoffice/external/lit';
|
||||
import { UmbTextStyles } from "@umbraco-cms/backoffice/style";
|
||||
import type { UUIButtonElement, UUIButtonState } from '@umbraco-cms/backoffice/external/uui';
|
||||
import { css, html, customElement, property, state } from '@umbraco-cms/backoffice/external/lit';
|
||||
import { UmbTextStyles } from '@umbraco-cms/backoffice/style';
|
||||
import type { UUIButtonState } from '@umbraco-cms/backoffice/external/uui';
|
||||
import { UmbExecutedEvent } from '@umbraco-cms/backoffice/events';
|
||||
import { UmbLitElement } from '@umbraco-cms/internal/lit-element';
|
||||
import type { ManifestWorkspaceAction } from '@umbraco-cms/backoffice/extension-registry';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { UmbInputCultureSelectElement } from '@umbraco-cms/backoffice/culture';
|
||||
import { UMB_LANGUAGE_WORKSPACE_CONTEXT } from '../../language-workspace.context.js';
|
||||
import type { UmbInputLanguagePickerElement } from '../../../../components/input-language-picker/input-language-picker.element.js';
|
||||
import type { UmbInputCultureSelectElement } from '@umbraco-cms/backoffice/culture';
|
||||
import { UUIBooleanInputEvent, UUIToggleElement } from '@umbraco-cms/backoffice/external/uui';
|
||||
import { css, html, nothing, customElement, state, ifDefined } from '@umbraco-cms/backoffice/external/lit';
|
||||
import { UmbChangeEvent } from '@umbraco-cms/backoffice/events';
|
||||
|
||||
@@ -222,7 +222,7 @@ export class UmbCodeEditorController {
|
||||
if (selections?.length > 0) {
|
||||
this.#editor.executeEdits(
|
||||
null,
|
||||
selections.map((selection) => ({ range: selection, text }))
|
||||
selections.map((selection) => ({ range: selection, text })),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -236,7 +236,7 @@ export class UmbCodeEditorController {
|
||||
*/
|
||||
find(
|
||||
searchString: string,
|
||||
searchOptions: CodeEditorSearchOptions = <CodeEditorSearchOptions>{}
|
||||
searchOptions: CodeEditorSearchOptions = <CodeEditorSearchOptions>{},
|
||||
): UmbCodeEditorRange[] {
|
||||
if (!this.#editor) throw new Error('Editor object not found');
|
||||
const defaultOptions = {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { UmbTextStyles } from "@umbraco-cms/backoffice/style";
|
||||
import { UmbTextStyles } from '@umbraco-cms/backoffice/style';
|
||||
import { css, customElement, html, property } from '@umbraco-cms/backoffice/external/lit';
|
||||
import { UmbLitElement } from '@umbraco-cms/internal/lit-element';
|
||||
import { UmbChangeEvent } from '@umbraco-cms/backoffice/events';
|
||||
@@ -11,8 +11,8 @@ export class UmbTemplateAliasInputElement extends UmbLitElement {
|
||||
<uui-symbol-lock .open=${this.isOpen} ></uui-symbol-lock>
|
||||
</uui-button>
|
||||
<input placeholder="Enter alias..." .value=${this.value} ?disabled=${!this.isOpen} @input=${
|
||||
this.#setValue
|
||||
}></input>
|
||||
this.#setValue
|
||||
}></input>
|
||||
|
||||
`;
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
// SHARED
|
||||
"@umbraco-cms/backoffice/auth": ["src/shared/auth"],
|
||||
"@umbraco-cms/backoffice/events": ["src/shared/umb-events"],
|
||||
"@umbraco-cms/backoffice/events": ["src/packages/core/umb-events"],
|
||||
"@umbraco-cms/backoffice/icon": ["src/shared/icon-registry"],
|
||||
"@umbraco-cms/backoffice/models": ["src/shared/models"],
|
||||
"@umbraco-cms/backoffice/repository": ["src/shared/repository"],
|
||||
|
||||
Reference in New Issue
Block a user