@xplortech/apollo-core 1.0.0-beta.4 → 1.0.0-beta.6
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/build/style.css +1 -1
- package/dist/apollo-core/apollo-core.esm.js +1 -1
- package/dist/apollo-core/p-25f84d39.entry.js +1 -0
- package/dist/apollo-core/{p-13e7d3ea.entry.js → p-ee16942f.entry.js} +1 -1
- package/dist/cjs/apollo-core.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/xpl-application-shell.cjs.entry.js +7 -1
- package/dist/cjs/xpl-avatar_12.cjs.entry.js +23 -17
- package/dist/cjs/xpl-dropdown-group_3.cjs.entry.js +4 -1
- package/dist/cjs/xpl-dropdown_2.cjs.entry.js +1 -2
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/xpl-application-shell/xpl-application-shell.js +31 -2
- package/dist/collection/components/xpl-choicelist/choice.js +1 -0
- package/dist/collection/components/xpl-choicelist/xpl-choicelist.js +3 -3
- package/dist/collection/components/xpl-dropdown/dropdownoption.js +1 -0
- package/dist/collection/components/xpl-dropdown/xpl-dropdown-group/xpl-dropdown-group.js +2 -1
- package/dist/collection/components/xpl-dropdown/xpl-dropdown-option/xpl-dropdown-option.js +4 -1
- package/dist/collection/components/xpl-dropdown/xpl-dropdown.js +16 -8
- package/dist/collection/components/xpl-list/listitem.js +1 -0
- package/dist/collection/components/xpl-list/xpl-list.js +2 -2
- package/dist/collection/components/xpl-select/selectchoice.js +1 -0
- package/dist/collection/components/xpl-select/xpl-select.js +2 -1
- package/dist/collection/components/xpl-table/xpl-table.js +17 -17
- package/dist/collection/components/xpl-utility-bar/xpl-utility-bar.js +27 -1
- package/dist/custom-elements/index.js +37 -23
- package/dist/esm/apollo-core.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/xpl-application-shell.entry.js +7 -1
- package/dist/esm/xpl-avatar_12.entry.js +23 -17
- package/dist/esm/xpl-dropdown-group_3.entry.js +4 -1
- package/dist/esm/xpl-dropdown_2.entry.js +1 -2
- package/dist/stories/application-shell.stories.js +17 -8
- package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/application-shell.stories.d.ts +14 -5
- package/dist/types/components/xpl-application-shell/xpl-application-shell.d.ts +6 -1
- package/dist/types/components/xpl-choicelist/choice.d.ts +5 -5
- package/dist/types/components/xpl-choicelist/xpl-choicelist.d.ts +2 -1
- package/dist/types/components/xpl-dropdown/dropdownoption.d.ts +8 -10
- package/dist/types/components/xpl-dropdown/xpl-dropdown-group/xpl-dropdown-group.d.ts +1 -0
- package/dist/types/components/xpl-dropdown/xpl-dropdown.d.ts +6 -4
- package/dist/types/components/xpl-list/listitem.d.ts +15 -19
- package/dist/types/components/xpl-list/xpl-list.d.ts +1 -0
- package/dist/types/components/xpl-select/selectchoice.d.ts +3 -2
- package/dist/types/components/xpl-select/xpl-select.d.ts +1 -0
- package/dist/types/components/xpl-table/xpl-table.d.ts +5 -6
- package/dist/types/components/xpl-utility-bar/xpl-utility-bar.d.ts +5 -0
- package/dist/types/components.d.ts +35 -6
- package/package.json +2 -2
- package/dist/apollo-core/p-97bdb450.entry.js +0 -1
- /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/avatar.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/backdrop.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/badge.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/breadcrumbs.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/button-row.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/button.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/checkbox.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/choicelist.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/content-area.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/divider.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/dropdown.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/grid.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/input.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/list.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/main-nav.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/pagination.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/radio.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/secondary-nav.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/select.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/table.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/tabs.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/toggle.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/utility-bar.stories.d.ts +0 -0
|
@@ -18,7 +18,7 @@ const XplApplicationShell$1 = class extends HTMLElement {
|
|
|
18
18
|
*/
|
|
19
19
|
this.navWidth = 'default';
|
|
20
20
|
/**
|
|
21
|
-
* @state {boolean} - Whether or not the main nav is open, updates when the nav-open
|
|
21
|
+
* @state {boolean} - Whether or not the main nav is open, updates when the nav-open event is emitted.
|
|
22
22
|
*/
|
|
23
23
|
this.navOpen = true;
|
|
24
24
|
}
|
|
@@ -39,6 +39,12 @@ const XplApplicationShell$1 = class extends HTMLElement {
|
|
|
39
39
|
connectedCallback() {
|
|
40
40
|
this.closeNavOnMobile();
|
|
41
41
|
}
|
|
42
|
+
componentWillLoad() {
|
|
43
|
+
this.navOpen =
|
|
44
|
+
this.isNavOpenAtStartup !== undefined
|
|
45
|
+
? this.isNavOpenAtStartup
|
|
46
|
+
: this.navOpen;
|
|
47
|
+
}
|
|
42
48
|
render() {
|
|
43
49
|
let applicationShellClasses = 'xpl-application-shell';
|
|
44
50
|
if (this.withUtility)
|
|
@@ -379,7 +385,6 @@ const XplDropdown$1 = class extends HTMLElement {
|
|
|
379
385
|
super();
|
|
380
386
|
this.__registerHost();
|
|
381
387
|
/** text to display as heading */
|
|
382
|
-
// eslint-disable-next-line @stencil/strict-mutable
|
|
383
388
|
this.isOpen = false;
|
|
384
389
|
/** options that are listed */
|
|
385
390
|
this.closeOnSelect = true;
|
|
@@ -396,7 +401,7 @@ const XplDropdown$1 = class extends HTMLElement {
|
|
|
396
401
|
};
|
|
397
402
|
}
|
|
398
403
|
/**
|
|
399
|
-
* called on dropdown option click and keydown events
|
|
404
|
+
* called on dropdown option click and keydown events to update isSelected states
|
|
400
405
|
*/
|
|
401
406
|
async handleSelect(e, { component }) {
|
|
402
407
|
const { hostElement, mode, options, update } = this;
|
|
@@ -531,7 +536,10 @@ const XplDropdownOption$1 = class extends HTMLElement {
|
|
|
531
536
|
const { closeOnSelect, mode, selectOnFocus } = this.dropdown;
|
|
532
537
|
if (selectOnFocus && navigationKeys.includes(ev.key)) {
|
|
533
538
|
const hostElement = document.activeElement.closest('xpl-dropdown-option');
|
|
534
|
-
|
|
539
|
+
const component = {
|
|
540
|
+
component: { hostElement },
|
|
541
|
+
};
|
|
542
|
+
dropdown.handleSelect(ev, component);
|
|
535
543
|
if (mode === 'single' && closeOnSelect)
|
|
536
544
|
this.dropdown.isOpen = false;
|
|
537
545
|
return;
|
|
@@ -20034,24 +20042,24 @@ const XplTable$1 = class extends HTMLElement {
|
|
|
20034
20042
|
this.onScroll = () => {
|
|
20035
20043
|
this.hasScrolled = this.container.scrollLeft > 0;
|
|
20036
20044
|
};
|
|
20037
|
-
/**
|
|
20038
|
-
* TODO: Need to figure out how this interplays with data
|
|
20039
|
-
* received from an API/server
|
|
20040
|
-
*/
|
|
20041
|
-
this.sortBy = (col, ascending = true) => {
|
|
20042
|
-
this.rowData.sort((a, b) => {
|
|
20043
|
-
const A = a[col];
|
|
20044
|
-
const B = b[col];
|
|
20045
|
-
if (typeof A === 'number' && typeof B === 'number') {
|
|
20046
|
-
const f = ascending ? 1 : -1;
|
|
20047
|
-
return A > B ? f : -f;
|
|
20048
|
-
}
|
|
20049
|
-
return -1;
|
|
20050
|
-
});
|
|
20051
|
-
this.rowData = Array.from(this.rowData);
|
|
20052
|
-
this.render();
|
|
20053
|
-
};
|
|
20054
20045
|
}
|
|
20046
|
+
/**
|
|
20047
|
+
* TODO: Need to figure out how this interplays with data
|
|
20048
|
+
* received from an API/server
|
|
20049
|
+
*/
|
|
20050
|
+
// private sortBy = (col: number, ascending = true) => {
|
|
20051
|
+
// this.rowData.sort((a, b) => {
|
|
20052
|
+
// const A = a[col];
|
|
20053
|
+
// const B = b[col];
|
|
20054
|
+
// if (typeof A === 'number' && typeof B === 'number') {
|
|
20055
|
+
// const f = ascending ? 1 : -1;
|
|
20056
|
+
// return A > B ? f : -f;
|
|
20057
|
+
// }
|
|
20058
|
+
// return -1;
|
|
20059
|
+
// });
|
|
20060
|
+
// this.rowData = Array.from(this.rowData);
|
|
20061
|
+
// this.render();
|
|
20062
|
+
// };
|
|
20055
20063
|
componentWillLoad() {
|
|
20056
20064
|
this.areAllSelected = false;
|
|
20057
20065
|
this.rowData = this.data !== undefined ? Array.from(this.data) : [];
|
|
@@ -20145,12 +20153,18 @@ const XplUtilityBar$1 = class extends HTMLElement {
|
|
|
20145
20153
|
this.open = !this.open;
|
|
20146
20154
|
this.navOpen.emit(this.open);
|
|
20147
20155
|
}
|
|
20156
|
+
componentWillLoad() {
|
|
20157
|
+
this.open =
|
|
20158
|
+
this.isNavOpenAtStartup !== undefined
|
|
20159
|
+
? this.isNavOpenAtStartup
|
|
20160
|
+
: this.open;
|
|
20161
|
+
}
|
|
20148
20162
|
render() {
|
|
20149
20163
|
return (h(Host, null, h("nav", { "aria-label": "utility navigation bar", class: "xpl-utility-bar" }, this.navControl ? (h("div", null, h("button", { class: "xpl-utility-bar__nav-control", onClick: () => this.onNavToggle(), innerHTML: `${this.bars}` }), h("slot", { name: "aside" }))) : (h("slot", { name: "aside" })), h("slot", { name: "main" }))));
|
|
20150
20164
|
}
|
|
20151
20165
|
};
|
|
20152
20166
|
|
|
20153
|
-
const XplApplicationShell = /*@__PURE__*/proxyCustomElement(XplApplicationShell$1, [4,"xpl-application-shell",{"withSubnav":[4,"with-subnav"],"withUtility":[4,"with-utility"],"navWidth":[1,"nav-width"],"navOpen":[32]},[[0,"navOpen","navToggleHandler"],[0,"navWidth","navWithHandler"],[9,"resize","onWindowResize"]]]);
|
|
20167
|
+
const XplApplicationShell = /*@__PURE__*/proxyCustomElement(XplApplicationShell$1, [4,"xpl-application-shell",{"withSubnav":[4,"with-subnav"],"withUtility":[4,"with-utility"],"navWidth":[1,"nav-width"],"isNavOpenAtStartup":[4,"is-nav-open-at-startup"],"navOpen":[32]},[[0,"navOpen","navToggleHandler"],[0,"navWidth","navWithHandler"],[9,"resize","onWindowResize"]]]);
|
|
20154
20168
|
const XplAvatar = /*@__PURE__*/proxyCustomElement(XplAvatar$1, [4,"xpl-avatar",{"color":[1],"disabled":[4],"href":[1],"name":[1],"size":[1],"src":[1],"status":[1],"target":[1]}]);
|
|
20155
20169
|
const XplBackdrop = /*@__PURE__*/proxyCustomElement(XplBackdrop$1, [0,"xpl-backdrop",{"relative":[4]}]);
|
|
20156
20170
|
const XplBadge = /*@__PURE__*/proxyCustomElement(XplBadge$1, [4,"xpl-badge",{"dot":[4],"variant":[1]}]);
|
|
@@ -20179,7 +20193,7 @@ const XplSelect = /*@__PURE__*/proxyCustomElement(XplSelect$1, [0,"xpl-select",{
|
|
|
20179
20193
|
const XplTable = /*@__PURE__*/proxyCustomElement(XplTable$1, [0,"xpl-table",{"columns":[16],"data":[16],"freeze":[4],"multiselect":[4],"striped":[4],"areAllSelected":[32],"rowData":[32],"hasScrolled":[32],"selected":[32]}]);
|
|
20180
20194
|
const XplTag = /*@__PURE__*/proxyCustomElement(XplTag$1, [4,"xpl-tag"]);
|
|
20181
20195
|
const XplToggle = /*@__PURE__*/proxyCustomElement(XplToggle$1, [0,"xpl-toggle",{"checked":[4],"description":[1],"disabled":[4],"heading":[1],"label":[1],"name":[1],"variant":[1],"id":[32]}]);
|
|
20182
|
-
const XplUtilityBar = /*@__PURE__*/proxyCustomElement(XplUtilityBar$1, [4,"xpl-utility-bar",{"navControl":[4,"nav-control"],"open":[32]}]);
|
|
20196
|
+
const XplUtilityBar = /*@__PURE__*/proxyCustomElement(XplUtilityBar$1, [4,"xpl-utility-bar",{"navControl":[4,"nav-control"],"isNavOpenAtStartup":[4,"is-nav-open-at-startup"],"open":[32]}]);
|
|
20183
20197
|
const defineCustomElements = (opts) => {
|
|
20184
20198
|
if (typeof customElements !== 'undefined') {
|
|
20185
20199
|
[
|
package/dist/esm/apollo-core.js
CHANGED
|
@@ -13,5 +13,5 @@ const patchBrowser = () => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
patchBrowser().then(options => {
|
|
16
|
-
return bootstrapLazy([["xpl-select",[[0,"xpl-select",{"choices":[16],"description":[1],"disabled":[4],"error":[1],"label":[1],"mode":[1],"placeholder":[1],"truncate":[4],"active":[32],"id":[32],"keepFocus":[32],"selected":[32],"value":[32],"displayValue":[32],"visibleChoices":[32]}]]],["xpl-application-shell",[[4,"xpl-application-shell",{"withSubnav":[4,"with-subnav"],"withUtility":[4,"with-utility"],"navWidth":[1,"nav-width"],"navOpen":[32]},[[0,"navOpen","navToggleHandler"],[0,"navWidth","navWithHandler"],[9,"resize","onWindowResize"]]]]],["xpl-avatar_12",[[4,"xpl-breadcrumb-item"],[4,"xpl-breadcrumbs"],[4,"xpl-content-area",{"size":[1]}],[4,"xpl-nav-item",{"navControl":[4,"nav-control"]}],[4,"xpl-secondary-nav"],[0,"xpl-table",{"columns":[16],"data":[16],"freeze":[4],"multiselect":[4],"striped":[4],"areAllSelected":[32],"rowData":[32],"hasScrolled":[32],"selected":[32]}],[4,"xpl-utility-bar",{"navControl":[4,"nav-control"],"open":[32]}],[4,"xpl-avatar",{"color":[1],"disabled":[4],"href":[1],"name":[1],"size":[1],"src":[1],"status":[1],"target":[1]}],[4,"xpl-badge",{"dot":[4],"variant":[1]}],[4,"xpl-button",{"disabled":[4],"link":[4],"iconOnly":[4,"icon-only"],"fullWidth":[4,"full-width"],"name":[1],"size":[1],"type":[1],"value":[1],"variant":[1],"state":[1]}],[4,"xpl-checkbox",{"checked":[4],"description":[1],"disabled":[4],"indeterminate":[4],"name":[1],"required":[4],"styled":[4],"value":[1],"id":[32]}],[4,"xpl-radio",{"checked":[4],"description":[1],"disabled":[4],"name":[1],"required":[4],"styled":[4],"value":[1],"id":[32]}]]],["xpl-choicelist",[[0,"xpl-choicelist",{"choices":[16],"description":[1],"heading":[1],"multi":[4],"name":[1],"styled":[4],"selected":[32]}]]],["xpl-list",[[0,"xpl-list",{"items":[16]}]]],["xpl-button-row",[[0,"xpl-button-row",{"primary":[1],"secondary":[1],"tertiary":[1]}]]],["xpl-divider",[[4,"xpl-divider",{"tier":[2]}]]],["xpl-grid",[[0,"xpl-grid"]]],["xpl-grid-item",[[4,"xpl-grid-item",{"xs":[2],"sm":[2],"md":[2],"lg":[2]}]]],["xpl-input",[[0,"xpl-input",{"_id":[1],"autocomplete":[1],"dateFormat":[1,"date-format"],"description":[1],"disabled":[4],"error":[1],"label":[1],"max":[8],"maxCharacterCount":[2,"max-character-count"],"min":[8],"mode":[1],"multiline":[4],"name":[1],"placeholder":[1],"post":[1],"pre":[1],"readonly":[4],"required":[4],"step":[2],"type":[1],"value":[1],"characterCount":[32],"passwordVisible":[32]}]]],["xpl-main-nav",[[4,"xpl-main-nav",{"width":[1]}]]],["xpl-pagination",[[0,"xpl-pagination",{"total":[2],"perPage":[2,"per-page"],"waitForCallback":[4,"wait-for-callback"],"current":[32],"goto":[64]}]]],["xpl-toggle",[[0,"xpl-toggle",{"checked":[4],"description":[1],"disabled":[4],"heading":[1],"label":[1],"name":[1],"variant":[1],"id":[32]}]]],["xpl-backdrop",[[0,"xpl-backdrop",{"relative":[4]}]]],["xpl-dropdown-group_3",[[4,"xpl-dropdown-group",{"groupName":[1,"label"],"options":[16]}],[4,"xpl-dropdown-heading",{"label":[1]}],[4,"xpl-dropdown-option",{"isDisabled":[516,"disabled"],"label":[1],"isSelected":[1540,"selected"]}]]],["xpl-dropdown_2",[[4,"xpl-dropdown",{"isOpen":[1540,"open"],"closeOnSelect":[4,"close-on-select"],"mode":[1],"options":[16],"selectOnFocus":[4,"select-on-focus"],"triggerId":[1,"trigger-id"],"update":[16],"handleSelect":[64]}],[4,"xpl-tag"]]]], options);
|
|
16
|
+
return bootstrapLazy([["xpl-select",[[0,"xpl-select",{"choices":[16],"description":[1],"disabled":[4],"error":[1],"label":[1],"mode":[1],"placeholder":[1],"truncate":[4],"active":[32],"id":[32],"keepFocus":[32],"selected":[32],"value":[32],"displayValue":[32],"visibleChoices":[32]}]]],["xpl-application-shell",[[4,"xpl-application-shell",{"withSubnav":[4,"with-subnav"],"withUtility":[4,"with-utility"],"navWidth":[1,"nav-width"],"isNavOpenAtStartup":[4,"is-nav-open-at-startup"],"navOpen":[32]},[[0,"navOpen","navToggleHandler"],[0,"navWidth","navWithHandler"],[9,"resize","onWindowResize"]]]]],["xpl-avatar_12",[[4,"xpl-breadcrumb-item"],[4,"xpl-breadcrumbs"],[4,"xpl-content-area",{"size":[1]}],[4,"xpl-nav-item",{"navControl":[4,"nav-control"]}],[4,"xpl-secondary-nav"],[0,"xpl-table",{"columns":[16],"data":[16],"freeze":[4],"multiselect":[4],"striped":[4],"areAllSelected":[32],"rowData":[32],"hasScrolled":[32],"selected":[32]}],[4,"xpl-utility-bar",{"navControl":[4,"nav-control"],"isNavOpenAtStartup":[4,"is-nav-open-at-startup"],"open":[32]}],[4,"xpl-avatar",{"color":[1],"disabled":[4],"href":[1],"name":[1],"size":[1],"src":[1],"status":[1],"target":[1]}],[4,"xpl-badge",{"dot":[4],"variant":[1]}],[4,"xpl-button",{"disabled":[4],"link":[4],"iconOnly":[4,"icon-only"],"fullWidth":[4,"full-width"],"name":[1],"size":[1],"type":[1],"value":[1],"variant":[1],"state":[1]}],[4,"xpl-checkbox",{"checked":[4],"description":[1],"disabled":[4],"indeterminate":[4],"name":[1],"required":[4],"styled":[4],"value":[1],"id":[32]}],[4,"xpl-radio",{"checked":[4],"description":[1],"disabled":[4],"name":[1],"required":[4],"styled":[4],"value":[1],"id":[32]}]]],["xpl-choicelist",[[0,"xpl-choicelist",{"choices":[16],"description":[1],"heading":[1],"multi":[4],"name":[1],"styled":[4],"selected":[32]}]]],["xpl-list",[[0,"xpl-list",{"items":[16]}]]],["xpl-button-row",[[0,"xpl-button-row",{"primary":[1],"secondary":[1],"tertiary":[1]}]]],["xpl-divider",[[4,"xpl-divider",{"tier":[2]}]]],["xpl-grid",[[0,"xpl-grid"]]],["xpl-grid-item",[[4,"xpl-grid-item",{"xs":[2],"sm":[2],"md":[2],"lg":[2]}]]],["xpl-input",[[0,"xpl-input",{"_id":[1],"autocomplete":[1],"dateFormat":[1,"date-format"],"description":[1],"disabled":[4],"error":[1],"label":[1],"max":[8],"maxCharacterCount":[2,"max-character-count"],"min":[8],"mode":[1],"multiline":[4],"name":[1],"placeholder":[1],"post":[1],"pre":[1],"readonly":[4],"required":[4],"step":[2],"type":[1],"value":[1],"characterCount":[32],"passwordVisible":[32]}]]],["xpl-main-nav",[[4,"xpl-main-nav",{"width":[1]}]]],["xpl-pagination",[[0,"xpl-pagination",{"total":[2],"perPage":[2,"per-page"],"waitForCallback":[4,"wait-for-callback"],"current":[32],"goto":[64]}]]],["xpl-toggle",[[0,"xpl-toggle",{"checked":[4],"description":[1],"disabled":[4],"heading":[1],"label":[1],"name":[1],"variant":[1],"id":[32]}]]],["xpl-backdrop",[[0,"xpl-backdrop",{"relative":[4]}]]],["xpl-dropdown-group_3",[[4,"xpl-dropdown-group",{"groupName":[1,"label"],"options":[16]}],[4,"xpl-dropdown-heading",{"label":[1]}],[4,"xpl-dropdown-option",{"isDisabled":[516,"disabled"],"label":[1],"isSelected":[1540,"selected"]}]]],["xpl-dropdown_2",[[4,"xpl-dropdown",{"isOpen":[1540,"open"],"closeOnSelect":[4,"close-on-select"],"mode":[1],"options":[16],"selectOnFocus":[4,"select-on-focus"],"triggerId":[1,"trigger-id"],"update":[16],"handleSelect":[64]}],[4,"xpl-tag"]]]], options);
|
|
17
17
|
});
|
package/dist/esm/loader.js
CHANGED
|
@@ -10,7 +10,7 @@ const patchEsm = () => {
|
|
|
10
10
|
const defineCustomElements = (win, options) => {
|
|
11
11
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
12
12
|
return patchEsm().then(() => {
|
|
13
|
-
return bootstrapLazy([["xpl-select",[[0,"xpl-select",{"choices":[16],"description":[1],"disabled":[4],"error":[1],"label":[1],"mode":[1],"placeholder":[1],"truncate":[4],"active":[32],"id":[32],"keepFocus":[32],"selected":[32],"value":[32],"displayValue":[32],"visibleChoices":[32]}]]],["xpl-application-shell",[[4,"xpl-application-shell",{"withSubnav":[4,"with-subnav"],"withUtility":[4,"with-utility"],"navWidth":[1,"nav-width"],"navOpen":[32]},[[0,"navOpen","navToggleHandler"],[0,"navWidth","navWithHandler"],[9,"resize","onWindowResize"]]]]],["xpl-avatar_12",[[4,"xpl-breadcrumb-item"],[4,"xpl-breadcrumbs"],[4,"xpl-content-area",{"size":[1]}],[4,"xpl-nav-item",{"navControl":[4,"nav-control"]}],[4,"xpl-secondary-nav"],[0,"xpl-table",{"columns":[16],"data":[16],"freeze":[4],"multiselect":[4],"striped":[4],"areAllSelected":[32],"rowData":[32],"hasScrolled":[32],"selected":[32]}],[4,"xpl-utility-bar",{"navControl":[4,"nav-control"],"open":[32]}],[4,"xpl-avatar",{"color":[1],"disabled":[4],"href":[1],"name":[1],"size":[1],"src":[1],"status":[1],"target":[1]}],[4,"xpl-badge",{"dot":[4],"variant":[1]}],[4,"xpl-button",{"disabled":[4],"link":[4],"iconOnly":[4,"icon-only"],"fullWidth":[4,"full-width"],"name":[1],"size":[1],"type":[1],"value":[1],"variant":[1],"state":[1]}],[4,"xpl-checkbox",{"checked":[4],"description":[1],"disabled":[4],"indeterminate":[4],"name":[1],"required":[4],"styled":[4],"value":[1],"id":[32]}],[4,"xpl-radio",{"checked":[4],"description":[1],"disabled":[4],"name":[1],"required":[4],"styled":[4],"value":[1],"id":[32]}]]],["xpl-choicelist",[[0,"xpl-choicelist",{"choices":[16],"description":[1],"heading":[1],"multi":[4],"name":[1],"styled":[4],"selected":[32]}]]],["xpl-list",[[0,"xpl-list",{"items":[16]}]]],["xpl-button-row",[[0,"xpl-button-row",{"primary":[1],"secondary":[1],"tertiary":[1]}]]],["xpl-divider",[[4,"xpl-divider",{"tier":[2]}]]],["xpl-grid",[[0,"xpl-grid"]]],["xpl-grid-item",[[4,"xpl-grid-item",{"xs":[2],"sm":[2],"md":[2],"lg":[2]}]]],["xpl-input",[[0,"xpl-input",{"_id":[1],"autocomplete":[1],"dateFormat":[1,"date-format"],"description":[1],"disabled":[4],"error":[1],"label":[1],"max":[8],"maxCharacterCount":[2,"max-character-count"],"min":[8],"mode":[1],"multiline":[4],"name":[1],"placeholder":[1],"post":[1],"pre":[1],"readonly":[4],"required":[4],"step":[2],"type":[1],"value":[1],"characterCount":[32],"passwordVisible":[32]}]]],["xpl-main-nav",[[4,"xpl-main-nav",{"width":[1]}]]],["xpl-pagination",[[0,"xpl-pagination",{"total":[2],"perPage":[2,"per-page"],"waitForCallback":[4,"wait-for-callback"],"current":[32],"goto":[64]}]]],["xpl-toggle",[[0,"xpl-toggle",{"checked":[4],"description":[1],"disabled":[4],"heading":[1],"label":[1],"name":[1],"variant":[1],"id":[32]}]]],["xpl-backdrop",[[0,"xpl-backdrop",{"relative":[4]}]]],["xpl-dropdown-group_3",[[4,"xpl-dropdown-group",{"groupName":[1,"label"],"options":[16]}],[4,"xpl-dropdown-heading",{"label":[1]}],[4,"xpl-dropdown-option",{"isDisabled":[516,"disabled"],"label":[1],"isSelected":[1540,"selected"]}]]],["xpl-dropdown_2",[[4,"xpl-dropdown",{"isOpen":[1540,"open"],"closeOnSelect":[4,"close-on-select"],"mode":[1],"options":[16],"selectOnFocus":[4,"select-on-focus"],"triggerId":[1,"trigger-id"],"update":[16],"handleSelect":[64]}],[4,"xpl-tag"]]]], options);
|
|
13
|
+
return bootstrapLazy([["xpl-select",[[0,"xpl-select",{"choices":[16],"description":[1],"disabled":[4],"error":[1],"label":[1],"mode":[1],"placeholder":[1],"truncate":[4],"active":[32],"id":[32],"keepFocus":[32],"selected":[32],"value":[32],"displayValue":[32],"visibleChoices":[32]}]]],["xpl-application-shell",[[4,"xpl-application-shell",{"withSubnav":[4,"with-subnav"],"withUtility":[4,"with-utility"],"navWidth":[1,"nav-width"],"isNavOpenAtStartup":[4,"is-nav-open-at-startup"],"navOpen":[32]},[[0,"navOpen","navToggleHandler"],[0,"navWidth","navWithHandler"],[9,"resize","onWindowResize"]]]]],["xpl-avatar_12",[[4,"xpl-breadcrumb-item"],[4,"xpl-breadcrumbs"],[4,"xpl-content-area",{"size":[1]}],[4,"xpl-nav-item",{"navControl":[4,"nav-control"]}],[4,"xpl-secondary-nav"],[0,"xpl-table",{"columns":[16],"data":[16],"freeze":[4],"multiselect":[4],"striped":[4],"areAllSelected":[32],"rowData":[32],"hasScrolled":[32],"selected":[32]}],[4,"xpl-utility-bar",{"navControl":[4,"nav-control"],"isNavOpenAtStartup":[4,"is-nav-open-at-startup"],"open":[32]}],[4,"xpl-avatar",{"color":[1],"disabled":[4],"href":[1],"name":[1],"size":[1],"src":[1],"status":[1],"target":[1]}],[4,"xpl-badge",{"dot":[4],"variant":[1]}],[4,"xpl-button",{"disabled":[4],"link":[4],"iconOnly":[4,"icon-only"],"fullWidth":[4,"full-width"],"name":[1],"size":[1],"type":[1],"value":[1],"variant":[1],"state":[1]}],[4,"xpl-checkbox",{"checked":[4],"description":[1],"disabled":[4],"indeterminate":[4],"name":[1],"required":[4],"styled":[4],"value":[1],"id":[32]}],[4,"xpl-radio",{"checked":[4],"description":[1],"disabled":[4],"name":[1],"required":[4],"styled":[4],"value":[1],"id":[32]}]]],["xpl-choicelist",[[0,"xpl-choicelist",{"choices":[16],"description":[1],"heading":[1],"multi":[4],"name":[1],"styled":[4],"selected":[32]}]]],["xpl-list",[[0,"xpl-list",{"items":[16]}]]],["xpl-button-row",[[0,"xpl-button-row",{"primary":[1],"secondary":[1],"tertiary":[1]}]]],["xpl-divider",[[4,"xpl-divider",{"tier":[2]}]]],["xpl-grid",[[0,"xpl-grid"]]],["xpl-grid-item",[[4,"xpl-grid-item",{"xs":[2],"sm":[2],"md":[2],"lg":[2]}]]],["xpl-input",[[0,"xpl-input",{"_id":[1],"autocomplete":[1],"dateFormat":[1,"date-format"],"description":[1],"disabled":[4],"error":[1],"label":[1],"max":[8],"maxCharacterCount":[2,"max-character-count"],"min":[8],"mode":[1],"multiline":[4],"name":[1],"placeholder":[1],"post":[1],"pre":[1],"readonly":[4],"required":[4],"step":[2],"type":[1],"value":[1],"characterCount":[32],"passwordVisible":[32]}]]],["xpl-main-nav",[[4,"xpl-main-nav",{"width":[1]}]]],["xpl-pagination",[[0,"xpl-pagination",{"total":[2],"perPage":[2,"per-page"],"waitForCallback":[4,"wait-for-callback"],"current":[32],"goto":[64]}]]],["xpl-toggle",[[0,"xpl-toggle",{"checked":[4],"description":[1],"disabled":[4],"heading":[1],"label":[1],"name":[1],"variant":[1],"id":[32]}]]],["xpl-backdrop",[[0,"xpl-backdrop",{"relative":[4]}]]],["xpl-dropdown-group_3",[[4,"xpl-dropdown-group",{"groupName":[1,"label"],"options":[16]}],[4,"xpl-dropdown-heading",{"label":[1]}],[4,"xpl-dropdown-option",{"isDisabled":[516,"disabled"],"label":[1],"isSelected":[1540,"selected"]}]]],["xpl-dropdown_2",[[4,"xpl-dropdown",{"isOpen":[1540,"open"],"closeOnSelect":[4,"close-on-select"],"mode":[1],"options":[16],"selectOnFocus":[4,"select-on-focus"],"triggerId":[1,"trigger-id"],"update":[16],"handleSelect":[64]}],[4,"xpl-tag"]]]], options);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -16,7 +16,7 @@ const XplApplicationShell = class {
|
|
|
16
16
|
*/
|
|
17
17
|
this.navWidth = 'default';
|
|
18
18
|
/**
|
|
19
|
-
* @state {boolean} - Whether or not the main nav is open, updates when the nav-open
|
|
19
|
+
* @state {boolean} - Whether or not the main nav is open, updates when the nav-open event is emitted.
|
|
20
20
|
*/
|
|
21
21
|
this.navOpen = true;
|
|
22
22
|
}
|
|
@@ -37,6 +37,12 @@ const XplApplicationShell = class {
|
|
|
37
37
|
connectedCallback() {
|
|
38
38
|
this.closeNavOnMobile();
|
|
39
39
|
}
|
|
40
|
+
componentWillLoad() {
|
|
41
|
+
this.navOpen =
|
|
42
|
+
this.isNavOpenAtStartup !== undefined
|
|
43
|
+
? this.isNavOpenAtStartup
|
|
44
|
+
: this.navOpen;
|
|
45
|
+
}
|
|
40
46
|
render() {
|
|
41
47
|
let applicationShellClasses = 'xpl-application-shell';
|
|
42
48
|
if (this.withUtility)
|
|
@@ -231,24 +231,24 @@ const XplTable = class {
|
|
|
231
231
|
this.onScroll = () => {
|
|
232
232
|
this.hasScrolled = this.container.scrollLeft > 0;
|
|
233
233
|
};
|
|
234
|
-
/**
|
|
235
|
-
* TODO: Need to figure out how this interplays with data
|
|
236
|
-
* received from an API/server
|
|
237
|
-
*/
|
|
238
|
-
this.sortBy = (col, ascending = true) => {
|
|
239
|
-
this.rowData.sort((a, b) => {
|
|
240
|
-
const A = a[col];
|
|
241
|
-
const B = b[col];
|
|
242
|
-
if (typeof A === 'number' && typeof B === 'number') {
|
|
243
|
-
const f = ascending ? 1 : -1;
|
|
244
|
-
return A > B ? f : -f;
|
|
245
|
-
}
|
|
246
|
-
return -1;
|
|
247
|
-
});
|
|
248
|
-
this.rowData = Array.from(this.rowData);
|
|
249
|
-
this.render();
|
|
250
|
-
};
|
|
251
234
|
}
|
|
235
|
+
/**
|
|
236
|
+
* TODO: Need to figure out how this interplays with data
|
|
237
|
+
* received from an API/server
|
|
238
|
+
*/
|
|
239
|
+
// private sortBy = (col: number, ascending = true) => {
|
|
240
|
+
// this.rowData.sort((a, b) => {
|
|
241
|
+
// const A = a[col];
|
|
242
|
+
// const B = b[col];
|
|
243
|
+
// if (typeof A === 'number' && typeof B === 'number') {
|
|
244
|
+
// const f = ascending ? 1 : -1;
|
|
245
|
+
// return A > B ? f : -f;
|
|
246
|
+
// }
|
|
247
|
+
// return -1;
|
|
248
|
+
// });
|
|
249
|
+
// this.rowData = Array.from(this.rowData);
|
|
250
|
+
// this.render();
|
|
251
|
+
// };
|
|
252
252
|
componentWillLoad() {
|
|
253
253
|
this.areAllSelected = false;
|
|
254
254
|
this.rowData = this.data !== undefined ? Array.from(this.data) : [];
|
|
@@ -299,6 +299,12 @@ const XplUtilityBar = class {
|
|
|
299
299
|
this.open = !this.open;
|
|
300
300
|
this.navOpen.emit(this.open);
|
|
301
301
|
}
|
|
302
|
+
componentWillLoad() {
|
|
303
|
+
this.open =
|
|
304
|
+
this.isNavOpenAtStartup !== undefined
|
|
305
|
+
? this.isNavOpenAtStartup
|
|
306
|
+
: this.open;
|
|
307
|
+
}
|
|
302
308
|
render() {
|
|
303
309
|
return (h(Host, null, h("nav", { "aria-label": "utility navigation bar", class: "xpl-utility-bar" }, this.navControl ? (h("div", null, h("button", { class: "xpl-utility-bar__nav-control", onClick: () => this.onNavToggle(), innerHTML: `${this.bars}` }), h("slot", { name: "aside" }))) : (h("slot", { name: "aside" })), h("slot", { name: "main" }))));
|
|
304
310
|
}
|
|
@@ -64,7 +64,10 @@ const XplDropdownOption = class {
|
|
|
64
64
|
const { closeOnSelect, mode, selectOnFocus } = this.dropdown;
|
|
65
65
|
if (selectOnFocus && navigationKeys.includes(ev.key)) {
|
|
66
66
|
const hostElement = document.activeElement.closest('xpl-dropdown-option');
|
|
67
|
-
|
|
67
|
+
const component = {
|
|
68
|
+
component: { hostElement },
|
|
69
|
+
};
|
|
70
|
+
dropdown.handleSelect(ev, component);
|
|
68
71
|
if (mode === 'single' && closeOnSelect)
|
|
69
72
|
this.dropdown.isOpen = false;
|
|
70
73
|
return;
|
|
@@ -16,7 +16,6 @@ const XplDropdown = class {
|
|
|
16
16
|
constructor(hostRef) {
|
|
17
17
|
registerInstance(this, hostRef);
|
|
18
18
|
/** text to display as heading */
|
|
19
|
-
// eslint-disable-next-line @stencil/strict-mutable
|
|
20
19
|
this.isOpen = false;
|
|
21
20
|
/** options that are listed */
|
|
22
21
|
this.closeOnSelect = true;
|
|
@@ -33,7 +32,7 @@ const XplDropdown = class {
|
|
|
33
32
|
};
|
|
34
33
|
}
|
|
35
34
|
/**
|
|
36
|
-
* called on dropdown option click and keydown events
|
|
35
|
+
* called on dropdown option click and keydown events to update isSelected states
|
|
37
36
|
*/
|
|
38
37
|
async handleSelect(e, { component }) {
|
|
39
38
|
const { hostElement, mode, options, update } = this;
|
|
@@ -23,11 +23,17 @@ export default {
|
|
|
23
23
|
type: 'select',
|
|
24
24
|
},
|
|
25
25
|
},
|
|
26
|
+
isNavOpenAtStartup: {
|
|
27
|
+
options: [true, false],
|
|
28
|
+
control: {
|
|
29
|
+
type: 'boolean',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
26
32
|
},
|
|
27
33
|
};
|
|
28
34
|
const renderBlock = (showBlock, block) => showBlock ? block : '';
|
|
29
|
-
const utilityBar = `
|
|
30
|
-
<xpl-utility-bar slot="utility" nav-control>
|
|
35
|
+
const utilityBar = (isNavOpenAtStartup) => `
|
|
36
|
+
<xpl-utility-bar slot="utility" nav-control is-nav-open-at-startup=${isNavOpenAtStartup}>
|
|
31
37
|
<xpl-breadcrumbs slot="aside">
|
|
32
38
|
<xpl-breadcrumb-item>
|
|
33
39
|
<a href="javascript:;">Locations</a>
|
|
@@ -82,10 +88,11 @@ const secondaryNav = `
|
|
|
82
88
|
</ul>
|
|
83
89
|
</xpl-secondary-nav>
|
|
84
90
|
`;
|
|
85
|
-
export const ApplicationShell = ({ navWidth, showSecondaryNav, showUtilityBar,
|
|
91
|
+
export const ApplicationShell = ({ contentSize, isNavOpenAtStartup, navWidth, showSecondaryNav, showUtilityBar, }) => {
|
|
86
92
|
return `
|
|
87
93
|
<xpl-application-shell
|
|
88
94
|
${showSecondaryNav ? 'with-subnav' : ''}
|
|
95
|
+
is-nav-open-at-startup=${isNavOpenAtStartup}
|
|
89
96
|
>
|
|
90
97
|
<xpl-main-nav slot="nav" width="${navWidth}">
|
|
91
98
|
<svg
|
|
@@ -223,7 +230,7 @@ export const ApplicationShell = ({ navWidth, showSecondaryNav, showUtilityBar, c
|
|
|
223
230
|
</xpl-nav-item>
|
|
224
231
|
</ul>
|
|
225
232
|
</xpl-main-nav>
|
|
226
|
-
${renderBlock(showUtilityBar, utilityBar)}
|
|
233
|
+
${renderBlock(showUtilityBar, utilityBar(isNavOpenAtStartup))}
|
|
227
234
|
${renderBlock(showSecondaryNav, secondaryNav)}
|
|
228
235
|
<xpl-content-area slot="content" size="${contentSize}">
|
|
229
236
|
<div>
|
|
@@ -338,10 +345,10 @@ export const ApplicationShell = ({ navWidth, showSecondaryNav, showUtilityBar, c
|
|
|
338
345
|
ApplicationShell.parameters = {
|
|
339
346
|
layout: 'fullscreen',
|
|
340
347
|
'web-component': {
|
|
341
|
-
render: ({ navWidth, showSecondaryNav, showUtilityBar, contentSize, }) => {
|
|
348
|
+
render: ({ navWidth, showSecondaryNav, showUtilityBar, contentSize, isNavOpenAtStartup, }) => {
|
|
342
349
|
const renderBlock = (showBlock, block) => showBlock ? block : '';
|
|
343
350
|
const utilityBar = `
|
|
344
|
-
<xpl-utility-bar slot="utility" nav-control>
|
|
351
|
+
<xpl-utility-bar slot="utility" nav-control is-nav-open-at-startup=${isNavOpenAtStartup}>
|
|
345
352
|
<xpl-breadcrumbs slot="aside">
|
|
346
353
|
<xpl-breadcrumb-item>
|
|
347
354
|
<a href="javascript:;">Locations</a>
|
|
@@ -398,6 +405,7 @@ ApplicationShell.parameters = {
|
|
|
398
405
|
return `
|
|
399
406
|
<xpl-application-shell
|
|
400
407
|
${showSecondaryNav ? 'with-subnav' : ''}
|
|
408
|
+
is-nav-open-at-startup=${isNavOpenAtStartup}
|
|
401
409
|
>
|
|
402
410
|
<xpl-main-nav slot="nav" width="${navWidth}">
|
|
403
411
|
<svg
|
|
@@ -760,8 +768,9 @@ ApplicationShell.parameters = {
|
|
|
760
768
|
},
|
|
761
769
|
};
|
|
762
770
|
ApplicationShell.args = {
|
|
771
|
+
contentSize: 'wide',
|
|
772
|
+
isNavOpenAtStartup: true,
|
|
763
773
|
navWidth: 'default',
|
|
764
|
-
showUtilityBar: true,
|
|
765
774
|
showSecondaryNav: true,
|
|
766
|
-
|
|
775
|
+
showUtilityBar: true,
|
|
767
776
|
};
|
|
@@ -23,25 +23,33 @@ declare const _default: {
|
|
|
23
23
|
type: string;
|
|
24
24
|
};
|
|
25
25
|
};
|
|
26
|
+
isNavOpenAtStartup: {
|
|
27
|
+
options: boolean[];
|
|
28
|
+
control: {
|
|
29
|
+
type: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
26
32
|
};
|
|
27
33
|
};
|
|
28
34
|
export default _default;
|
|
29
35
|
interface ApplicationShellProps {
|
|
36
|
+
contentSize: string;
|
|
37
|
+
isNavOpenAtStartup: boolean;
|
|
30
38
|
navWidth: string;
|
|
31
39
|
showSecondaryNav: boolean;
|
|
32
40
|
showUtilityBar: boolean;
|
|
33
|
-
contentSize: string;
|
|
34
41
|
}
|
|
35
42
|
export declare const ApplicationShell: {
|
|
36
|
-
({ navWidth, showSecondaryNav, showUtilityBar,
|
|
43
|
+
({ contentSize, isNavOpenAtStartup, navWidth, showSecondaryNav, showUtilityBar, }: ApplicationShellProps): string;
|
|
37
44
|
parameters: {
|
|
38
45
|
layout: string;
|
|
39
46
|
'web-component': {
|
|
40
|
-
render: ({ navWidth, showSecondaryNav, showUtilityBar, contentSize, }: {
|
|
47
|
+
render: ({ navWidth, showSecondaryNav, showUtilityBar, contentSize, isNavOpenAtStartup, }: {
|
|
41
48
|
navWidth: any;
|
|
42
49
|
showSecondaryNav: any;
|
|
43
50
|
showUtilityBar: any;
|
|
44
51
|
contentSize: any;
|
|
52
|
+
isNavOpenAtStartup: any;
|
|
45
53
|
}) => string;
|
|
46
54
|
};
|
|
47
55
|
html: {
|
|
@@ -54,9 +62,10 @@ export declare const ApplicationShell: {
|
|
|
54
62
|
};
|
|
55
63
|
};
|
|
56
64
|
args: {
|
|
65
|
+
contentSize: string;
|
|
66
|
+
isNavOpenAtStartup: boolean;
|
|
57
67
|
navWidth: string;
|
|
58
|
-
showUtilityBar: boolean;
|
|
59
68
|
showSecondaryNav: boolean;
|
|
60
|
-
|
|
69
|
+
showUtilityBar: boolean;
|
|
61
70
|
};
|
|
62
71
|
};
|
|
@@ -13,12 +13,17 @@ export declare class XplApplicationShell {
|
|
|
13
13
|
*/
|
|
14
14
|
navWidth: string;
|
|
15
15
|
/**
|
|
16
|
-
* @
|
|
16
|
+
* @property {boolean} - * @property {boolean} - Optional property that defines whether or not the main nav is open at startup.
|
|
17
|
+
*/
|
|
18
|
+
isNavOpenAtStartup: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* @state {boolean} - Whether or not the main nav is open, updates when the nav-open event is emitted.
|
|
17
21
|
*/
|
|
18
22
|
navOpen: boolean;
|
|
19
23
|
navToggleHandler(): void;
|
|
20
24
|
navWithHandler(event: any): void;
|
|
21
25
|
onWindowResize(): void;
|
|
22
26
|
connectedCallback(): void;
|
|
27
|
+
componentWillLoad(): void;
|
|
23
28
|
render(): any;
|
|
24
29
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
interface Choice {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
export interface Choice {
|
|
2
|
+
checked?: boolean;
|
|
3
|
+
children?: Choice[];
|
|
4
|
+
description?: string;
|
|
5
|
+
label?: string;
|
|
6
6
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { Choice } from './choice';
|
|
1
2
|
export declare class XplChoicelist {
|
|
2
3
|
/**
|
|
3
4
|
* An array of choices to be displayed in the list.
|
|
4
5
|
* Each choice should be an object with keys:
|
|
5
|
-
* - `checked` [boolean] - whether to
|
|
6
|
+
* - `checked` [boolean] - whether to pre-check or not
|
|
6
7
|
* - `children` [Choice[]] - an array of child choices (recursive)
|
|
7
8
|
* - `description` [string]
|
|
8
9
|
* - `label` [string]
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
interface DropdownOption {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
export interface DropdownOption {
|
|
2
|
+
label: string;
|
|
3
|
+
isSelected?: boolean;
|
|
4
|
+
isDisabled?: boolean;
|
|
5
5
|
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
groupName: string;
|
|
11
|
-
options: DropdownItem[];
|
|
6
|
+
export declare type DropdownItem = Partial<DropdownOption & DropdownOptionGroup>;
|
|
7
|
+
export interface DropdownOptionGroup {
|
|
8
|
+
groupName: string;
|
|
9
|
+
options: DropdownItem[];
|
|
12
10
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { DropdownItem } from './dropdownoption';
|
|
2
|
+
import type { XplDropdownOption } from './xpl-dropdown-option/xpl-dropdown-option';
|
|
1
3
|
export declare class XplDropdown {
|
|
2
4
|
/** text to display as heading */
|
|
3
5
|
isOpen: boolean;
|
|
@@ -17,15 +19,15 @@ export declare class XplDropdown {
|
|
|
17
19
|
* @param {Object} options - component
|
|
18
20
|
*/
|
|
19
21
|
/** call back function invoked when a selection is made */
|
|
20
|
-
update?: (e: Event, { component
|
|
21
|
-
component:
|
|
22
|
+
update?: (e: Event, { component }: {
|
|
23
|
+
component: XplDropdown;
|
|
22
24
|
}) => void;
|
|
23
25
|
hostElement: HTMLXplDropdownElement;
|
|
24
26
|
/**
|
|
25
|
-
* called on dropdown option click and keydown events
|
|
27
|
+
* called on dropdown option click and keydown events to update isSelected states
|
|
26
28
|
*/
|
|
27
29
|
handleSelect(e: Event, { component }: {
|
|
28
|
-
component:
|
|
30
|
+
component: XplDropdownOption;
|
|
29
31
|
}): Promise<void>;
|
|
30
32
|
private handleClickOutside;
|
|
31
33
|
componentWillLoad(): void;
|
|
@@ -1,20 +1,16 @@
|
|
|
1
|
-
interface ListItem {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
icon: string;
|
|
17
|
-
text: string;
|
|
18
|
-
}[];
|
|
19
|
-
subtext?: string;
|
|
1
|
+
export interface ListItem {
|
|
2
|
+
avatar?: string;
|
|
3
|
+
avatars?: string[];
|
|
4
|
+
badges?: string[] | {
|
|
5
|
+
dot?: boolean;
|
|
6
|
+
text: string;
|
|
7
|
+
variant?: string;
|
|
8
|
+
}[];
|
|
9
|
+
href?: string;
|
|
10
|
+
title: string;
|
|
11
|
+
metadata?: string[] | {
|
|
12
|
+
icon: string;
|
|
13
|
+
text: string;
|
|
14
|
+
}[];
|
|
15
|
+
subtext?: string;
|
|
20
16
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
2
|
export declare class XplTable {
|
|
3
3
|
columns?: string[];
|
|
4
4
|
data?: string[][];
|
|
@@ -11,15 +11,14 @@ export declare class XplTable {
|
|
|
11
11
|
selected: boolean[];
|
|
12
12
|
tableSelect: EventEmitter;
|
|
13
13
|
private container;
|
|
14
|
-
selectAll
|
|
15
|
-
selectOne
|
|
16
|
-
onChange
|
|
17
|
-
onScroll
|
|
14
|
+
private selectAll;
|
|
15
|
+
private selectOne;
|
|
16
|
+
private onChange;
|
|
17
|
+
private onScroll;
|
|
18
18
|
/**
|
|
19
19
|
* TODO: Need to figure out how this interplays with data
|
|
20
20
|
* received from an API/server
|
|
21
21
|
*/
|
|
22
|
-
sortBy: (col: number, ascending?: boolean) => void;
|
|
23
22
|
componentWillLoad(): void;
|
|
24
23
|
render(): any;
|
|
25
24
|
}
|
|
@@ -8,8 +8,13 @@ export declare class XplUtilityBar {
|
|
|
8
8
|
* @property {boolean} - whether or not to show the bars to control the state of the navigation bar (open/close)
|
|
9
9
|
*/
|
|
10
10
|
navControl?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* @property {boolean} - Optional property that defines whether or not the main nav is open at startup.
|
|
13
|
+
*/
|
|
14
|
+
isNavOpenAtStartup?: boolean;
|
|
11
15
|
open: boolean;
|
|
12
16
|
private onNavToggle;
|
|
13
17
|
private bars;
|
|
18
|
+
componentWillLoad(): void;
|
|
14
19
|
render(): any;
|
|
15
20
|
}
|