Files

31 lines
974 B
Plaintext
Raw Permalink Normal View History

{
"UmbNewLitElement": {
"prefix": "new umb element",
"scope": "typescript",
"body": [
"import { css, customElement, html } from '@umbraco-cms/backoffice/external/lit';",
2024-02-09 22:43:57 +01:00
"import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';",
"import { UmbTextStyles } from '@umbraco-cms/backoffice/style';",
"",
"@customElement('umb-${TM_FILENAME_BASE/(.*)\\..+$/$1/}')",
V15: New dropzone component available for the Backoffice (#18753) * create a symlink between local Client .vscode snippets and global snippets for ease of use * fix: no need to specify `Element` in the snippet as that is pulled from the filename Because of our convention with `x.element.ts` you would have ended up with `UmbXElementElement` * feat: adds new component `umb-input-dropzone` * docs(storybook): more stories * feat: construct the temporary files centrally along with an `AbortController` and use its signal * feat: makes UmbInputDropzone form aware * feat: introduces a change event * chore: temporary changes before changing upload field * feat: adds default slot * docs: adds jsdocs * feat: adds more properties * feat: adds dashed styling * feat: adds multiple support * feat: allows to cancel file * feat: separate **cancel** and **remove** * fix stylibg * move dropzone element * move input-dropzone into dropzone package * feat: introduces a 'dropzone' package * import for backward compatibility * remove ambigious export * reexport everything from dropzone * fix import * cleanup test files * use correct import paths * test: make sure folder exists before writing to it * adds export for modals * adds entrypoint for dropzone package * use the AbortController directly on the temporary file object * uses correct icon name * feat: adds ability to remove all files and cancel the request * feat: adds styling for the uploader and enables it to work in multiple mode with classes over id's * do not let the content exceed its boundaries * feat: formats progress with 2 decimals * feat: formats with 0 decimals * fix: returns cancel error * fix: maps cancel errors back to the uploadable item * fix: do not proceed with media items if the request was cancelled * chore: mark exports from media <- dropzone as deprecated * fix: use correct attribute and remove a todo with localizations * fix: use correct attribute and remove a todo with localizations * fix: allow to specify parent through attribute * feat: align attribute `disableFolderUpload` between dropzone components
2025-03-24 14:17:48 +01:00
"export class Umb${TM_FILENAME_BASE/(.*)$/${1:/pascalcase}/} extends UmbLitElement {",
"\toverride render() {",
"\t\treturn html`$0`;",
"\t}",
2023-04-25 20:56:34 +12:00
"",
"\tstatic override readonly styles = [UmbTextStyles, css``];",
"}",
"",
V15: New dropzone component available for the Backoffice (#18753) * create a symlink between local Client .vscode snippets and global snippets for ease of use * fix: no need to specify `Element` in the snippet as that is pulled from the filename Because of our convention with `x.element.ts` you would have ended up with `UmbXElementElement` * feat: adds new component `umb-input-dropzone` * docs(storybook): more stories * feat: construct the temporary files centrally along with an `AbortController` and use its signal * feat: makes UmbInputDropzone form aware * feat: introduces a change event * chore: temporary changes before changing upload field * feat: adds default slot * docs: adds jsdocs * feat: adds more properties * feat: adds dashed styling * feat: adds multiple support * feat: allows to cancel file * feat: separate **cancel** and **remove** * fix stylibg * move dropzone element * move input-dropzone into dropzone package * feat: introduces a 'dropzone' package * import for backward compatibility * remove ambigious export * reexport everything from dropzone * fix import * cleanup test files * use correct import paths * test: make sure folder exists before writing to it * adds export for modals * adds entrypoint for dropzone package * use the AbortController directly on the temporary file object * uses correct icon name * feat: adds ability to remove all files and cancel the request * feat: adds styling for the uploader and enables it to work in multiple mode with classes over id's * do not let the content exceed its boundaries * feat: formats progress with 2 decimals * feat: formats with 0 decimals * fix: returns cancel error * fix: maps cancel errors back to the uploadable item * fix: do not proceed with media items if the request was cancelled * chore: mark exports from media <- dropzone as deprecated * fix: use correct attribute and remove a todo with localizations * fix: use correct attribute and remove a todo with localizations * fix: allow to specify parent through attribute * feat: align attribute `disableFolderUpload` between dropzone components
2025-03-24 14:17:48 +01:00
"export { Umb${TM_FILENAME_BASE/(.*)$/${1:/pascalcase}/} as element };",
2023-04-25 20:56:34 +12:00
"",
"declare global {",
"\tinterface HTMLElementTagNameMap {",
V15: New dropzone component available for the Backoffice (#18753) * create a symlink between local Client .vscode snippets and global snippets for ease of use * fix: no need to specify `Element` in the snippet as that is pulled from the filename Because of our convention with `x.element.ts` you would have ended up with `UmbXElementElement` * feat: adds new component `umb-input-dropzone` * docs(storybook): more stories * feat: construct the temporary files centrally along with an `AbortController` and use its signal * feat: makes UmbInputDropzone form aware * feat: introduces a change event * chore: temporary changes before changing upload field * feat: adds default slot * docs: adds jsdocs * feat: adds more properties * feat: adds dashed styling * feat: adds multiple support * feat: allows to cancel file * feat: separate **cancel** and **remove** * fix stylibg * move dropzone element * move input-dropzone into dropzone package * feat: introduces a 'dropzone' package * import for backward compatibility * remove ambigious export * reexport everything from dropzone * fix import * cleanup test files * use correct import paths * test: make sure folder exists before writing to it * adds export for modals * adds entrypoint for dropzone package * use the AbortController directly on the temporary file object * uses correct icon name * feat: adds ability to remove all files and cancel the request * feat: adds styling for the uploader and enables it to work in multiple mode with classes over id's * do not let the content exceed its boundaries * feat: formats progress with 2 decimals * feat: formats with 0 decimals * fix: returns cancel error * fix: maps cancel errors back to the uploadable item * fix: do not proceed with media items if the request was cancelled * chore: mark exports from media <- dropzone as deprecated * fix: use correct attribute and remove a todo with localizations * fix: use correct attribute and remove a todo with localizations * fix: allow to specify parent through attribute * feat: align attribute `disableFolderUpload` between dropzone components
2025-03-24 14:17:48 +01:00
"\t\t'umb-${TM_FILENAME_BASE/(.*)\\..+$/$1/}': Umb${TM_FILENAME_BASE/(.*)$/${1:/pascalcase}/};",
"\t}",
"}",
"",
],
"description": "Create a new Umbraco Lit element",
},
}