@spectrum-web-components/base 0.7.6-overlay.62 → 0.30.0
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/package.json +6 -2
- package/src/Base.js.map +1 -1
- package/src/define-element.d.ts +5 -0
- package/src/define-element.dev.js +14 -0
- package/src/define-element.dev.js.map +7 -0
- package/src/define-element.js +2 -0
- package/src/define-element.js.map +7 -0
- package/test/define-element.test.js +129 -0
- package/test/define-element.test.js.map +7 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spectrum-web-components/base",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.30.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -37,6 +37,10 @@
|
|
|
37
37
|
"development": "./src/decorators.dev.js",
|
|
38
38
|
"default": "./src/decorators.js"
|
|
39
39
|
},
|
|
40
|
+
"./src/define-element.js": {
|
|
41
|
+
"development": "./src/define-element.dev.js",
|
|
42
|
+
"default": "./src/define-element.js"
|
|
43
|
+
},
|
|
40
44
|
"./src/directives.js": {
|
|
41
45
|
"development": "./src/directives.dev.js",
|
|
42
46
|
"default": "./src/directives.js"
|
|
@@ -103,5 +107,5 @@
|
|
|
103
107
|
"sideEffects": [
|
|
104
108
|
"./**/*.dev.js"
|
|
105
109
|
],
|
|
106
|
-
"gitHead": "
|
|
110
|
+
"gitHead": "e34a26bf2bbea5f60a5e415e0f12c97654f0e20d"
|
|
107
111
|
}
|
package/src/Base.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["Base.ts"],
|
|
4
4
|
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport { LitElement, ReactiveElement } from 'lit';\ntype ThemeRoot = HTMLElement & {\n startManagingContentDirection: (el: HTMLElement) => void;\n stopManagingContentDirection: (el: HTMLElement) => void;\n};\n\ntype Constructor<T = Record<string, unknown>> = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n new (...args: any[]): T;\n prototype: T;\n};\n\nexport interface SpectrumInterface {\n shadowRoot: ShadowRoot;\n isLTR: boolean;\n hasVisibleFocusInTree(): boolean;\n dir: 'ltr' | 'rtl';\n}\n\nconst observedForElements: Set<HTMLElement> = new Set();\n\nconst updateRTL = (): void => {\n const dir =\n document.documentElement.dir === 'rtl'\n ? document.documentElement.dir\n : 'ltr';\n observedForElements.forEach((el) => {\n el.setAttribute('dir', dir);\n });\n};\n\nconst rtlObserver = new MutationObserver(updateRTL);\n\nrtlObserver.observe(document.documentElement, {\n attributes: true,\n attributeFilter: ['dir'],\n});\n\ntype ContentDirectionManager = HTMLElement & {\n startManagingContentDirection?(): void;\n};\n\nconst canManageContentDirection = (el: ContentDirectionManager): boolean =>\n typeof el.startManagingContentDirection !== 'undefined' ||\n el.tagName === 'SP-THEME';\n\nexport function SpectrumMixin<T extends Constructor<ReactiveElement>>(\n constructor: T\n): T & Constructor<SpectrumInterface> {\n class SpectrumMixinElement extends constructor {\n /**\n * @private\n */\n public override shadowRoot!: ShadowRoot;\n private _dirParent?: HTMLElement;\n\n /**\n * @private\n */\n public override dir!: 'ltr' | 'rtl';\n\n /**\n * @private\n */\n public get isLTR(): boolean {\n return this.dir === 'ltr';\n }\n\n public hasVisibleFocusInTree(): boolean {\n const activeElement = (this.getRootNode() as Document)\n .activeElement as HTMLElement;\n if (!activeElement) {\n return false;\n }\n // Browsers without support for the `:focus-visible`\n // selector will throw on the following test (Safari, older things).\n // Some won't throw, but will be focusing item rather than the menu and\n // will rely on the polyfill to know whether focus is \"visible\" or not.\n try {\n return (\n activeElement.matches(':focus-visible') ||\n activeElement.matches('.focus-visible')\n );\n /* c8 ignore next 3 */\n } catch (error) {\n return activeElement.matches('.focus-visible');\n }\n }\n\n public override connectedCallback(): void {\n if (!this.hasAttribute('dir')) {\n let dirParent = ((this as HTMLElement).assignedSlot ||\n this.parentNode) as HTMLElement;\n while (\n dirParent !== document.documentElement &&\n !canManageContentDirection(\n dirParent as ContentDirectionManager\n )\n ) {\n dirParent = ((dirParent as HTMLElement).assignedSlot || // step into the shadow DOM of the parent of a slotted node\n dirParent.parentNode || // DOM Element detected\n (dirParent as unknown as ShadowRoot)\n .host) as HTMLElement;\n }\n this.dir =\n dirParent.dir === 'rtl' ? dirParent.dir : this.dir || 'ltr';\n if (dirParent === document.documentElement) {\n observedForElements.add(this);\n } else {\n const { localName } = dirParent;\n if (\n localName.search('-') > -1 &&\n !customElements.get(localName)\n ) {\n customElements.whenDefined(localName).then(() => {\n (\n dirParent as ThemeRoot\n ).startManagingContentDirection(this);\n });\n } else {\n (dirParent as ThemeRoot).startManagingContentDirection(\n this\n );\n }\n }\n this._dirParent = dirParent as HTMLElement;\n }\n super.connectedCallback();\n }\n\n public override disconnectedCallback(): void {\n super.disconnectedCallback();\n if (this._dirParent) {\n if (this._dirParent === document.documentElement) {\n observedForElements.delete(this);\n } else {\n (this._dirParent as ThemeRoot).stopManagingContentDirection(\n this\n );\n }\n this.removeAttribute('dir');\n }\n }\n }\n return SpectrumMixinElement;\n}\n\nexport class SpectrumElement extends SpectrumMixin(LitElement) {}\n\nif (window.__swc.DEBUG) {\n const ignoreWarningTypes = {\n default: false,\n accessibility: false,\n api: false,\n };\n const ignoreWarningLevels = {\n default: false,\n low: false,\n medium: false,\n high: false,\n deprecation: false,\n };\n window.__swc = {\n ...window.__swc,\n ignoreWarningLocalNames: {\n ...(window.__swc?.ignoreWarningLocalNames || {}),\n },\n ignoreWarningTypes: {\n ...ignoreWarningTypes,\n ...(window.__swc?.ignoreWarningTypes || {}),\n },\n ignoreWarningLevels: {\n ...ignoreWarningLevels,\n ...(window.__swc?.ignoreWarningLevels || {}),\n },\n issuedWarnings: new Set(),\n warn: (\n element,\n message,\n url,\n { type = 'api', level = 'default', issues } = {}\n ): void => {\n const { localName = 'base' } = element || {};\n const id = `${localName}:${type}:${level}` as BrandedSWCWarningID;\n if (!window.__swc.verbose && window.__swc.issuedWarnings.has(id))\n return;\n /* c8 ignore next 3 */\n if (window.__swc.ignoreWarningLocalNames[localName]) return;\n if (window.__swc.ignoreWarningTypes[type]) return;\n if (window.__swc.ignoreWarningLevels[level]) return;\n window.__swc.issuedWarnings.add(id);\n let listedIssues = '';\n if (issues && issues.length) {\n issues.unshift('');\n listedIssues = issues.join('\\n - ') + '\\n';\n }\n const intro = level === 'deprecation' ? 'DEPRECATION NOTICE: ' : '';\n const inspectElement = element\n ? '\\nInspect this issue in the follow element:'\n : '';\n const displayURL = (element ? '\\n\\n' : '\\n') + url + '\\n';\n const messages: unknown[] = [];\n messages.push(\n intro + message + '\\n' + listedIssues + inspectElement\n );\n if (element) {\n messages.push(element);\n }\n messages.push(displayURL, {\n data: {\n localName,\n type,\n level,\n },\n });\n console.warn(...messages);\n },\n };\n\n window.__swc.warn(\n undefined,\n 'Spectrum Web Components is in dev mode. Not recommended for production!',\n 'https://opensource.adobe.com/spectrum-web-components/dev-mode/',\n { type: 'default' }\n );\n}\n"],
|
|
5
|
-
"mappings": "aAYA,OAAS,cAAAA,MAAmC,MAmB5C,MAAMC,EAAwC,IAAI,IAE5CC,EAAY,IAAY,CAC1B,MAAMC,EACF,SAAS,gBAAgB,MAAQ,MAC3B,SAAS,gBAAgB,IACzB,MACVF,EAAoB,QAASG,GAAO,CAChCA,EAAG,aAAa,MAAOD,CAAG,CAC9B,CAAC,CACL,EAEME,EAAc,IAAI,iBAAiBH,CAAS,EAElDG,EAAY,QAAQ,SAAS,gBAAiB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AElC,CACJ,CACA,OAAOO,CACX,CAEO,aAAM,wBAAwB,cAAcR,CAAU,CAAE,CAAC",
|
|
6
6
|
"names": ["LitElement", "observedForElements", "updateRTL", "dir", "el", "rtlObserver", "canManageContentDirection", "constructor", "SpectrumMixinElement", "activeElement", "error", "dirParent", "localName"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
export function defineElement(name, constructor) {
|
|
3
|
+
if (window.__swc && true) {
|
|
4
|
+
if (customElements.get(name)) {
|
|
5
|
+
window.__swc.warn(
|
|
6
|
+
void 0,
|
|
7
|
+
`Attempted to redefine <${name}>. This usually indicates that multiple versions of the same web component were loaded onto a single page.`,
|
|
8
|
+
"https://opensource.adobe.com/spectrum-web-components/registry-conflicts"
|
|
9
|
+
);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
customElements.define(name, constructor);
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=define-element.dev.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["define-element.ts"],
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\ninterface CustomElementConstructor {\n new (...params: unknown[]): HTMLElement;\n}\n\nexport function defineElement(\n name: string,\n constructor: CustomElementConstructor\n): void {\n if (window.__swc && window.__swc.DEBUG) {\n if (customElements.get(name)) {\n window.__swc.warn(\n undefined,\n `Attempted to redefine <${name}>. This usually indicates that multiple versions of the same web component were loaded onto a single page.`,\n 'https://opensource.adobe.com/spectrum-web-components/registry-conflicts'\n );\n }\n }\n customElements.define(name, constructor);\n}\n"],
|
|
5
|
+
"mappings": ";AAgBO,gBAAS,cACZ,MACA,aACI;AACJ,MAAI,OAAO,SAAS,MAAoB;AACpC,QAAI,eAAe,IAAI,IAAI,GAAG;AAC1B,aAAO,MAAM;AAAA,QACT;AAAA,QACA,0BAA0B;AAAA,QAC1B;AAAA,MACJ;AAAA,IACJ;AAAA,EACJ;AACA,iBAAe,OAAO,MAAM,WAAW;AAC3C;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["define-element.ts"],
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\ninterface CustomElementConstructor {\n new (...params: unknown[]): HTMLElement;\n}\n\nexport function defineElement(\n name: string,\n constructor: CustomElementConstructor\n): void {\n if (window.__swc && window.__swc.DEBUG) {\n if (customElements.get(name)) {\n window.__swc.warn(\n undefined,\n `Attempted to redefine <${name}>. This usually indicates that multiple versions of the same web component were loaded onto a single page.`,\n 'https://opensource.adobe.com/spectrum-web-components/registry-conflicts'\n );\n }\n }\n customElements.define(name, constructor);\n}\n"],
|
|
5
|
+
"mappings": "aAgBO,gBAAS,cACZA,EACAC,EACI,CACA,OAAO,MASX,eAAe,OAAOD,EAAMC,CAAW,CAC3C",
|
|
6
|
+
"names": ["name", "constructor"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
import { expect } from "@open-wc/testing";
|
|
3
|
+
import { stub } from "sinon";
|
|
4
|
+
import {
|
|
5
|
+
isFirefox,
|
|
6
|
+
isWebKit
|
|
7
|
+
} from "@spectrum-web-components/shared/src/platform.js";
|
|
8
|
+
import "@spectrum-web-components/base";
|
|
9
|
+
const elements = {
|
|
10
|
+
"sp-accordion-item": () => import("@spectrum-web-components/accordion/sp-accordion-item.js"),
|
|
11
|
+
"sp-accordion": () => import("@spectrum-web-components/accordion/sp-accordion.js"),
|
|
12
|
+
"sp-action-bar": () => import("@spectrum-web-components/action-bar/sp-action-bar.js"),
|
|
13
|
+
"sp-action-menu": () => import("@spectrum-web-components/action-menu/sp-action-menu.js"),
|
|
14
|
+
"sp-action-button": () => import("@spectrum-web-components/action-button/sp-action-button.js"),
|
|
15
|
+
"sp-action-group": () => import("@spectrum-web-components/action-group/sp-action-group.js"),
|
|
16
|
+
"sp-card": () => import("@spectrum-web-components/card/sp-card.js"),
|
|
17
|
+
"sp-asset": () => import("@spectrum-web-components/asset/sp-asset.js"),
|
|
18
|
+
"sp-avatar": () => import("@spectrum-web-components/avatar/sp-avatar.js"),
|
|
19
|
+
"sp-badge": () => import("@spectrum-web-components/badge/sp-badge.js"),
|
|
20
|
+
"sp-banner": () => import("@spectrum-web-components/banner/sp-banner.js"),
|
|
21
|
+
"sp-dialog-wrapper": () => import("@spectrum-web-components/dialog/sp-dialog-wrapper.js"),
|
|
22
|
+
"sp-dialog": () => import("@spectrum-web-components/dialog/sp-dialog.js"),
|
|
23
|
+
"sp-dialog-base": () => import("@spectrum-web-components/dialog/sp-dialog-base.js"),
|
|
24
|
+
"sp-button": () => import("@spectrum-web-components/button/sp-button.js"),
|
|
25
|
+
"sp-button-group": () => import("@spectrum-web-components/button-group/sp-button-group.js"),
|
|
26
|
+
"sp-checkbox": () => import("@spectrum-web-components/checkbox/sp-checkbox.js"),
|
|
27
|
+
"sp-coachmark": () => import("@spectrum-web-components/coachmark/sp-coachmark.js"),
|
|
28
|
+
"sp-color-area": () => import("@spectrum-web-components/color-area/sp-color-area.js"),
|
|
29
|
+
"sp-color-handle": () => import("@spectrum-web-components/color-handle/sp-color-handle.js"),
|
|
30
|
+
"sp-color-loupe": () => import("@spectrum-web-components/color-loupe/sp-color-loupe.js"),
|
|
31
|
+
"sp-color-slider": () => import("@spectrum-web-components/color-slider/sp-color-slider.js"),
|
|
32
|
+
"sp-color-wheel": () => import("@spectrum-web-components/color-wheel/sp-color-wheel.js"),
|
|
33
|
+
"sp-divider": () => import("@spectrum-web-components/divider/sp-divider.js"),
|
|
34
|
+
"sp-dropzone": () => import("@spectrum-web-components/dropzone/sp-dropzone.js"),
|
|
35
|
+
"sp-meter": () => import("@spectrum-web-components/meter/sp-meter.js"),
|
|
36
|
+
"sp-field-group": () => import("@spectrum-web-components/field-group/sp-field-group.js"),
|
|
37
|
+
"sp-field-label": () => import("@spectrum-web-components/field-label/sp-field-label.js"),
|
|
38
|
+
"sp-help-text": () => import("@spectrum-web-components/help-text/sp-help-text.js"),
|
|
39
|
+
"sp-icon": () => import("@spectrum-web-components/icon/sp-icon.js"),
|
|
40
|
+
"sp-icons-medium": () => import("@spectrum-web-components/icons/sp-icons-medium.js"),
|
|
41
|
+
"sp-icons-large": () => import("@spectrum-web-components/icons/sp-icons-large.js"),
|
|
42
|
+
"sp-illustrated-message": () => import("@spectrum-web-components/illustrated-message/sp-illustrated-message.js"),
|
|
43
|
+
"sp-link": () => import("@spectrum-web-components/link/sp-link.js"),
|
|
44
|
+
"sp-menu-group": () => import("@spectrum-web-components/menu/sp-menu-group.js"),
|
|
45
|
+
"sp-menu-item": () => import("@spectrum-web-components/menu/sp-menu-item.js"),
|
|
46
|
+
"sp-menu": () => import("@spectrum-web-components/menu/sp-menu.js"),
|
|
47
|
+
"overlay-trigger": () => import("@spectrum-web-components/overlay/overlay-trigger.js"),
|
|
48
|
+
"active-overlay": () => import("@spectrum-web-components/overlay/active-overlay.js"),
|
|
49
|
+
"sp-picker": () => import("@spectrum-web-components/picker/sp-picker.js"),
|
|
50
|
+
"sp-picker-button": () => import("@spectrum-web-components/picker-button/sp-picker-button.js"),
|
|
51
|
+
"sp-popover": () => import("@spectrum-web-components/popover/sp-popover.js"),
|
|
52
|
+
"sp-progress-bar": () => import("@spectrum-web-components/progress-bar/sp-progress-bar.js"),
|
|
53
|
+
"sp-progress-circle": () => import("@spectrum-web-components/progress-circle/sp-progress-circle.js"),
|
|
54
|
+
"sp-quick-actions": () => import("@spectrum-web-components/quick-actions/sp-quick-actions.js"),
|
|
55
|
+
"sp-radio-group": () => import("@spectrum-web-components/radio/sp-radio-group.js"),
|
|
56
|
+
"sp-radio": () => import("@spectrum-web-components/radio/sp-radio.js"),
|
|
57
|
+
"sp-search": () => import("@spectrum-web-components/search/sp-search.js"),
|
|
58
|
+
"sp-sidenav-item": () => import("@spectrum-web-components/sidenav/sp-sidenav-item.js"),
|
|
59
|
+
"sp-sidenav": () => import("@spectrum-web-components/sidenav/sp-sidenav.js"),
|
|
60
|
+
"sp-slider": () => import("@spectrum-web-components/slider/sp-slider.js"),
|
|
61
|
+
"sp-slider-handle": () => import("@spectrum-web-components/slider/sp-slider-handle.js"),
|
|
62
|
+
"sp-split-button": () => import("@spectrum-web-components/split-button/sp-split-button.js"),
|
|
63
|
+
"sp-split-view": () => import("@spectrum-web-components/split-view/sp-split-view.js"),
|
|
64
|
+
"sp-status-light": () => import("@spectrum-web-components/status-light/sp-status-light.js"),
|
|
65
|
+
"sp-swatch-group": () => import("@spectrum-web-components/swatch/sp-swatch-group.js"),
|
|
66
|
+
"sp-swatch": () => import("@spectrum-web-components/swatch/sp-swatch.js"),
|
|
67
|
+
"sp-switch": () => import("@spectrum-web-components/switch/sp-switch.js"),
|
|
68
|
+
"sp-table": () => import("@spectrum-web-components/table/sp-table.js"),
|
|
69
|
+
"sp-table-body": () => import("@spectrum-web-components/table/sp-table-body.js"),
|
|
70
|
+
"sp-table-cell": () => import("@spectrum-web-components/table/sp-table-cell.js"),
|
|
71
|
+
"sp-table-head": () => import("@spectrum-web-components/table/sp-table-head.js"),
|
|
72
|
+
"sp-table-checkbox-cell": () => import("@spectrum-web-components/table/sp-table-checkbox-cell.js"),
|
|
73
|
+
"sp-table-head-cell": () => import("@spectrum-web-components/table/sp-table-head-cell.js"),
|
|
74
|
+
"sp-table-row": () => import("@spectrum-web-components/table/sp-table-row.js"),
|
|
75
|
+
"sp-tab": () => import("@spectrum-web-components/tabs/sp-tab.js"),
|
|
76
|
+
"sp-tabs": () => import("@spectrum-web-components/tabs/sp-tabs.js"),
|
|
77
|
+
"sp-tabs-overflow": () => import("@spectrum-web-components/tabs/sp-tabs-overflow.js"),
|
|
78
|
+
"sp-tag": () => import("@spectrum-web-components/tags/sp-tag.js"),
|
|
79
|
+
"sp-tags": () => import("@spectrum-web-components/tags/sp-tags.js"),
|
|
80
|
+
"sp-textfield": () => import("@spectrum-web-components/textfield/sp-textfield.js"),
|
|
81
|
+
"sp-thumbnail": () => import("@spectrum-web-components/thumbnail/sp-thumbnail.js"),
|
|
82
|
+
"sp-toast": () => import("@spectrum-web-components/toast/sp-toast.js"),
|
|
83
|
+
"sp-tooltip": () => import("@spectrum-web-components/tooltip/sp-tooltip.js"),
|
|
84
|
+
"sp-top-nav": () => import("@spectrum-web-components/top-nav/sp-top-nav.js"),
|
|
85
|
+
"sp-tray": () => import("@spectrum-web-components/tray/sp-tray.js"),
|
|
86
|
+
"sp-underlay": () => import("@spectrum-web-components/underlay/sp-underlay.js")
|
|
87
|
+
};
|
|
88
|
+
const browser = isWebKit() ? "webkit" : isFirefox() ? "firefox" : "chromium";
|
|
89
|
+
describe("define-element", function() {
|
|
90
|
+
this.retries(0);
|
|
91
|
+
beforeEach(function() {
|
|
92
|
+
window.__swc.verbose = true;
|
|
93
|
+
this.warn = stub(console, "warn");
|
|
94
|
+
});
|
|
95
|
+
afterEach(function() {
|
|
96
|
+
this.warn.resetHistory();
|
|
97
|
+
window.__swc.verbose = false;
|
|
98
|
+
this.warn.restore();
|
|
99
|
+
});
|
|
100
|
+
Object.entries(elements).forEach(
|
|
101
|
+
([name, register]) => it(`'${name}' warns on redefinition`, async function() {
|
|
102
|
+
var _a;
|
|
103
|
+
if (customElements.get(name)) {
|
|
104
|
+
this.skip();
|
|
105
|
+
}
|
|
106
|
+
const error = {
|
|
107
|
+
webkit: "Cannot define multiple custom elements with the same tag name",
|
|
108
|
+
firefox: `'${name}' has already been defined`,
|
|
109
|
+
chromium: `"${name}" has already been used with this registry`
|
|
110
|
+
}[browser];
|
|
111
|
+
let caughtError;
|
|
112
|
+
customElements.define(name, class extends HTMLElement {
|
|
113
|
+
});
|
|
114
|
+
try {
|
|
115
|
+
await register();
|
|
116
|
+
} catch (error2) {
|
|
117
|
+
caughtError = error2;
|
|
118
|
+
}
|
|
119
|
+
expect((_a = caughtError == null ? void 0 : caughtError.message) != null ? _a : "").to.include(error);
|
|
120
|
+
expect(this.warn.called, "should call console.warn()").to.be.true;
|
|
121
|
+
const spyCall = this.warn.getCall(0);
|
|
122
|
+
expect(
|
|
123
|
+
spyCall.args.at(0).includes("redefine"),
|
|
124
|
+
"message should warn about redefining an element"
|
|
125
|
+
).to.be.true;
|
|
126
|
+
})
|
|
127
|
+
);
|
|
128
|
+
});
|
|
129
|
+
//# sourceMappingURL=define-element.test.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["define-element.test.ts"],
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport { expect } from '@open-wc/testing';\nimport { stub } from 'sinon';\nimport {\n isFirefox,\n isWebKit,\n} from '@spectrum-web-components/shared/src/platform.js';\n\n// for window.__swc\nimport '@spectrum-web-components/base';\n\n// mostly alphabetical,\n// but reordered to put dependents above dependencies,\n// in order to avoid transitive dependency conflicts (eg card -> asset)\nconst elements = {\n 'sp-accordion-item': () =>\n import('@spectrum-web-components/accordion/sp-accordion-item.js'),\n 'sp-accordion': () =>\n import('@spectrum-web-components/accordion/sp-accordion.js'),\n 'sp-action-bar': () =>\n import('@spectrum-web-components/action-bar/sp-action-bar.js'),\n 'sp-action-menu': () =>\n import('@spectrum-web-components/action-menu/sp-action-menu.js'),\n 'sp-action-button': () =>\n import('@spectrum-web-components/action-button/sp-action-button.js'),\n 'sp-action-group': () =>\n import('@spectrum-web-components/action-group/sp-action-group.js'),\n 'sp-card': () => import('@spectrum-web-components/card/sp-card.js'),\n 'sp-asset': () => import('@spectrum-web-components/asset/sp-asset.js'),\n 'sp-avatar': () => import('@spectrum-web-components/avatar/sp-avatar.js'),\n 'sp-badge': () => import('@spectrum-web-components/badge/sp-badge.js'),\n 'sp-banner': () => import('@spectrum-web-components/banner/sp-banner.js'),\n 'sp-dialog-wrapper': () =>\n import('@spectrum-web-components/dialog/sp-dialog-wrapper.js'),\n 'sp-dialog': () => import('@spectrum-web-components/dialog/sp-dialog.js'),\n 'sp-dialog-base': () =>\n import('@spectrum-web-components/dialog/sp-dialog-base.js'),\n 'sp-button': () => import('@spectrum-web-components/button/sp-button.js'),\n 'sp-button-group': () =>\n import('@spectrum-web-components/button-group/sp-button-group.js'),\n 'sp-checkbox': () =>\n import('@spectrum-web-components/checkbox/sp-checkbox.js'),\n 'sp-coachmark': () =>\n import('@spectrum-web-components/coachmark/sp-coachmark.js'),\n 'sp-color-area': () =>\n import('@spectrum-web-components/color-area/sp-color-area.js'),\n 'sp-color-handle': () =>\n import('@spectrum-web-components/color-handle/sp-color-handle.js'),\n 'sp-color-loupe': () =>\n import('@spectrum-web-components/color-loupe/sp-color-loupe.js'),\n 'sp-color-slider': () =>\n import('@spectrum-web-components/color-slider/sp-color-slider.js'),\n 'sp-color-wheel': () =>\n import('@spectrum-web-components/color-wheel/sp-color-wheel.js'),\n 'sp-divider': () =>\n import('@spectrum-web-components/divider/sp-divider.js'),\n 'sp-dropzone': () =>\n import('@spectrum-web-components/dropzone/sp-dropzone.js'),\n 'sp-meter': () => import('@spectrum-web-components/meter/sp-meter.js'),\n 'sp-field-group': () =>\n import('@spectrum-web-components/field-group/sp-field-group.js'),\n 'sp-field-label': () =>\n import('@spectrum-web-components/field-label/sp-field-label.js'),\n 'sp-help-text': () =>\n import('@spectrum-web-components/help-text/sp-help-text.js'),\n 'sp-icon': () => import('@spectrum-web-components/icon/sp-icon.js'),\n 'sp-icons-medium': () =>\n import('@spectrum-web-components/icons/sp-icons-medium.js'),\n 'sp-icons-large': () =>\n import('@spectrum-web-components/icons/sp-icons-large.js'),\n 'sp-illustrated-message': () =>\n import(\n '@spectrum-web-components/illustrated-message/sp-illustrated-message.js'\n ),\n 'sp-link': () => import('@spectrum-web-components/link/sp-link.js'),\n 'sp-menu-group': () =>\n import('@spectrum-web-components/menu/sp-menu-group.js'),\n 'sp-menu-item': () =>\n import('@spectrum-web-components/menu/sp-menu-item.js'),\n 'sp-menu': () => import('@spectrum-web-components/menu/sp-menu.js'),\n 'overlay-trigger': () =>\n import('@spectrum-web-components/overlay/overlay-trigger.js'),\n 'active-overlay': () =>\n import('@spectrum-web-components/overlay/active-overlay.js'),\n 'sp-picker': () => import('@spectrum-web-components/picker/sp-picker.js'),\n 'sp-picker-button': () =>\n import('@spectrum-web-components/picker-button/sp-picker-button.js'),\n 'sp-popover': () =>\n import('@spectrum-web-components/popover/sp-popover.js'),\n 'sp-progress-bar': () =>\n import('@spectrum-web-components/progress-bar/sp-progress-bar.js'),\n 'sp-progress-circle': () =>\n import(\n '@spectrum-web-components/progress-circle/sp-progress-circle.js'\n ),\n 'sp-quick-actions': () =>\n import('@spectrum-web-components/quick-actions/sp-quick-actions.js'),\n 'sp-radio-group': () =>\n import('@spectrum-web-components/radio/sp-radio-group.js'),\n 'sp-radio': () => import('@spectrum-web-components/radio/sp-radio.js'),\n 'sp-search': () => import('@spectrum-web-components/search/sp-search.js'),\n 'sp-sidenav-item': () =>\n import('@spectrum-web-components/sidenav/sp-sidenav-item.js'),\n 'sp-sidenav': () =>\n import('@spectrum-web-components/sidenav/sp-sidenav.js'),\n 'sp-slider': () => import('@spectrum-web-components/slider/sp-slider.js'),\n 'sp-slider-handle': () =>\n import('@spectrum-web-components/slider/sp-slider-handle.js'),\n 'sp-split-button': () =>\n import('@spectrum-web-components/split-button/sp-split-button.js'),\n 'sp-split-view': () =>\n import('@spectrum-web-components/split-view/sp-split-view.js'),\n 'sp-status-light': () =>\n import('@spectrum-web-components/status-light/sp-status-light.js'),\n 'sp-swatch-group': () =>\n import('@spectrum-web-components/swatch/sp-swatch-group.js'),\n 'sp-swatch': () => import('@spectrum-web-components/swatch/sp-swatch.js'),\n 'sp-switch': () => import('@spectrum-web-components/switch/sp-switch.js'),\n 'sp-table': () => import('@spectrum-web-components/table/sp-table.js'),\n 'sp-table-body': () =>\n import('@spectrum-web-components/table/sp-table-body.js'),\n 'sp-table-cell': () =>\n import('@spectrum-web-components/table/sp-table-cell.js'),\n 'sp-table-head': () =>\n import('@spectrum-web-components/table/sp-table-head.js'),\n 'sp-table-checkbox-cell': () =>\n import('@spectrum-web-components/table/sp-table-checkbox-cell.js'),\n 'sp-table-head-cell': () =>\n import('@spectrum-web-components/table/sp-table-head-cell.js'),\n 'sp-table-row': () =>\n import('@spectrum-web-components/table/sp-table-row.js'),\n 'sp-tab': () => import('@spectrum-web-components/tabs/sp-tab.js'),\n 'sp-tabs': () => import('@spectrum-web-components/tabs/sp-tabs.js'),\n 'sp-tabs-overflow': () =>\n import('@spectrum-web-components/tabs/sp-tabs-overflow.js'),\n 'sp-tag': () => import('@spectrum-web-components/tags/sp-tag.js'),\n 'sp-tags': () => import('@spectrum-web-components/tags/sp-tags.js'),\n 'sp-textfield': () =>\n import('@spectrum-web-components/textfield/sp-textfield.js'),\n 'sp-thumbnail': () =>\n import('@spectrum-web-components/thumbnail/sp-thumbnail.js'),\n 'sp-toast': () => import('@spectrum-web-components/toast/sp-toast.js'),\n 'sp-tooltip': () =>\n import('@spectrum-web-components/tooltip/sp-tooltip.js'),\n 'sp-top-nav': () =>\n import('@spectrum-web-components/top-nav/sp-top-nav.js'),\n 'sp-tray': () => import('@spectrum-web-components/tray/sp-tray.js'),\n 'sp-underlay': () =>\n import('@spectrum-web-components/underlay/sp-underlay.js'),\n};\n\nconst browser: 'webkit' | 'firefox' | 'chromium' = isWebKit()\n ? 'webkit'\n : isFirefox()\n ? 'firefox'\n : 'chromium';\n\ndescribe('define-element', function () {\n // registrations are globally-unique, so retries will always fail\n this.retries(0);\n\n beforeEach(function () {\n window.__swc.verbose = true;\n this.warn = stub(console, 'warn');\n });\n\n afterEach(function () {\n this.warn.resetHistory();\n window.__swc.verbose = false;\n this.warn.restore();\n });\n\n Object.entries(elements).forEach(([name, register]) =>\n it(`'${name}' warns on redefinition`, async function () {\n // classes already-defined via transitive dependencies can't be tested this way\n if (customElements.get(name)) {\n this.skip();\n }\n const error = {\n webkit: 'Cannot define multiple custom elements with the same tag name',\n firefox: `'${name}' has already been defined`,\n chromium: `\"${name}\" has already been used with this registry`,\n }[browser];\n let caughtError: Error | undefined;\n\n customElements.define(name, class extends HTMLElement {});\n try {\n await register();\n } catch (error) {\n caughtError = error as Error;\n }\n\n expect(caughtError?.message ?? '').to.include(error);\n expect(this.warn.called, 'should call console.warn()').to.be.true;\n const spyCall = this.warn.getCall(0);\n expect(\n (spyCall.args.at(0) as string).includes('redefine'),\n 'message should warn about redefining an element'\n ).to.be.true;\n })\n );\n});\n"],
|
|
5
|
+
"mappings": ";AAYA,SAAS,cAAc;AACvB,SAAS,YAAY;AACrB;AAAA,EACI;AAAA,EACA;AAAA,OACG;AAGP,OAAO;AAKP,M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