@servicenow/ui-renderer-snabbdom
Version:
Snabbdom renderer for UI Framework on Next Experience
52 lines (51 loc) • 4.1 kB
JavaScript
/**
* Copyright (c) 2020 ServiceNow, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.NON_CUSTOM_ELEMENT_ATTRIBUTES = exports.CUSTOM_ELEMENT_ATTRIBUTES = exports.BASE_ATTRIBUTES = exports.APPEND_TO_META = exports.APPEND_TO_PAYLOAD = exports.ACRONYM_PROPS = exports.MODULES = exports.EVENT_PREFIX = exports.HOOK_PREFIX = exports.DATA_PREFIX = exports.ATTR_PREFIX = exports.ARIA_PREFIX = void 0;
var ARIA_PREFIX = 'aria';
exports.ARIA_PREFIX = ARIA_PREFIX;
var ATTR_PREFIX = 'attr';
exports.ATTR_PREFIX = ATTR_PREFIX;
var DATA_PREFIX = 'data';
exports.DATA_PREFIX = DATA_PREFIX;
var HOOK_PREFIX = 'hook';
exports.HOOK_PREFIX = HOOK_PREFIX;
var EVENT_PREFIX = 'on';
exports.EVENT_PREFIX = EVENT_PREFIX;
var MODULES = ['hook', 'ref', 'now-aria-ref', 'on', 'style', 'class', 'attrs', 'props', 'dataset'];
exports.MODULES = MODULES;
var ACRONYM_PROPS = ['innerHTML', 'outerHTML'];
exports.ACRONYM_PROPS = ACRONYM_PROPS;
var APPEND_TO_PAYLOAD = 'append-to-payload';
exports.APPEND_TO_PAYLOAD = APPEND_TO_PAYLOAD;
var APPEND_TO_META = 'append-to-meta';
exports.APPEND_TO_META = APPEND_TO_META;
var BASE_ATTRIBUTES = ['path', 'context', 'context-modifier', 'key', 'alt', 'async', 'autocomplete', 'autofocus', 'autoplay', 'capture', 'checked', 'default', 'defer', 'disabled', 'draggable', 'dropzone', 'hidden', 'href', 'hreflang', 'http-equiv', 'icon', 'id', 'is', 'maxlength', 'minlength', 'media', 'method', 'multiple', 'name', 'placeholder', 'readonly', 'rel', 'required', 'reversed', 'role', 'rows', 'rowspan', 'selected', 'slot', 'src', 'tabindex', 'target', 'title', 'type', 'value'];
exports.BASE_ATTRIBUTES = BASE_ATTRIBUTES;
var CUSTOM_ELEMENT_ATTRIBUTES = [].concat(BASE_ATTRIBUTES, ['component-id', 'listen-to', 'dangerouslySetInnerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning']);
exports.CUSTOM_ELEMENT_ATTRIBUTES = CUSTOM_ELEMENT_ATTRIBUTES;
var NON_CUSTOM_ELEMENT_ATTRIBUTES = [].concat(BASE_ATTRIBUTES, ['accept', 'accept-charset', 'accesskey', 'action', 'align', 'allow', 'autocapitalize', 'background', 'bgcolor', 'border', 'buffered', 'challenge', 'charset', 'cite', 'code', 'codebase', 'color', 'cols', 'colspan', 'content', 'contenteditable', 'contextmenu', 'controls', 'coords', 'crossorigin', 'datetime', 'decoding', 'dir', 'dirname', 'download', 'enctype', 'for', 'form', 'formaction', 'formenctype', 'formmethod', 'formnovalidate', 'formtarget', 'headers', 'height', 'high', 'integrity', 'intrinsicsize', 'inputmode', 'ismap', 'itemprop', 'keytype', 'kind', 'label', 'lang', 'language', 'list', 'loop', 'low', 'manifest', 'max', 'min', 'muted', 'novalidate', 'open', 'optimum', 'pattern', 'ping', 'poster', 'preload', 'radiogroup', 'referrerpolicy', 'sandbox', 'scope', 'scoped', 'shape', 'size', 'sizes', 'span', 'spellcheck', 'srcdoc', 'srclang', 'srcset', 'start', 'step', 'summary', 'translate', 'usemap', 'width', 'wrap']);
exports.NON_CUSTOM_ELEMENT_ATTRIBUTES = NON_CUSTOM_ELEMENT_ATTRIBUTES;
//# sourceMappingURL=index.js.map