sas-ui 0.8.151 → 0.8.154
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/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{modules-c257e1ad.js → modules-58fcd375.js} +25 -7
- package/dist/cjs/sas-alert_22.cjs.entry.js +127 -323
- package/dist/cjs/sas-stepper.cjs.entry.js +0 -4
- package/dist/cjs/sas-ui.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +0 -3
- package/dist/collection/components/sas-alert/sas-alert.js +18 -1
- package/dist/collection/components/sas-checkbox/sas-checkbox.stories.js +2 -0
- package/dist/collection/components/sas-checkbox-group/sas-checkbox-group.stories.js +6 -0
- package/dist/collection/components/sas-chip/sas-chip.stories.js +2 -0
- package/dist/collection/components/sas-date-field/sas-date-field.stories.js +15 -4
- package/dist/collection/components/sas-details/sas-details.css +4 -0
- package/dist/collection/components/sas-details/sas-details.js +12 -11
- package/dist/collection/components/sas-details/sas-details.stories.js +13 -4
- package/dist/collection/components/sas-dialog/sas-dialog.js +176 -245
- package/dist/collection/components/sas-dropdown/sas-dropdown.stories.js +2 -0
- package/dist/collection/components/sas-icon/sas-icon.stories.js +9 -0
- package/dist/collection/components/sas-image/sas-image.stories.js +1 -15
- package/dist/collection/components/sas-radio-group/sas-radio-group.stories.js +10 -2
- package/dist/collection/components/sas-select/sas-select.stories.js +27 -0
- package/dist/collection/components/sas-stepper/sas-stepper.js +0 -22
- package/dist/collection/{global/toast.js → components/sas-toast/sas-toast.js} +1 -1
- package/dist/collection/components/sas-toast/sas-toast.stories.js +23 -0
- package/dist/collection/global/modules.js +2 -2
- package/dist/custom-elements/index.d.ts +0 -18
- package/dist/custom-elements/index.js +43 -649
- package/dist/esm/loader.js +2 -2
- package/dist/esm/{modules-117674f2.js → modules-f140f1a9.js} +25 -7
- package/dist/esm/sas-alert_22.entry.js +128 -324
- package/dist/esm/sas-stepper.entry.js +0 -4
- package/dist/esm/sas-ui.js +2 -2
- package/dist/sas-ui/p-85539054.entry.js +1 -0
- package/dist/sas-ui/{p-acd8f1dc.js → p-9f832546.js} +1 -1
- package/dist/sas-ui/p-df3d16bb.entry.js +1 -0
- package/dist/sas-ui/sas-ui.esm.js +1 -1
- package/dist/types/components/sas-alert/sas-alert.d.ts +5 -0
- package/dist/types/components/sas-details/sas-details.d.ts +1 -1
- package/dist/types/components/sas-stepper/sas-stepper.d.ts +0 -4
- package/dist/types/components.d.ts +6 -107
- package/package.json +6 -7
- package/dist/cjs/sas-details.cjs.entry.js +0 -131
- package/dist/cjs/sas-dialog.cjs.entry.js +0 -248
- package/dist/cjs/sas-file-upload.cjs.entry.js +0 -55
- package/dist/collection/assets/fa/fa-light-300.svg +0 -12420
- package/dist/collection/assets/fa/fa-regular-400.svg +0 -11318
- package/dist/collection/assets/fa/fa-solid-900.svg +0 -9647
- package/dist/collection/assets/svg/sort_asc.svg +0 -6
- package/dist/collection/assets/svg/sort_both.svg +0 -6
- package/dist/collection/assets/svg/sort_desc.svg +0 -6
- package/dist/collection/components/sas-autocomplete/sas-autocomplete.css +0 -13
- package/dist/collection/components/sas-autocomplete/sas-autocomplete.js +0 -504
- package/dist/collection/components/sas-dialog/sas-dialog.css +0 -0
- package/dist/collection/components/sas-file-upload/sas-file-upload.css +0 -36
- package/dist/collection/components/sas-file-upload/sas-file-upload.js +0 -63
- package/dist/collection/global/swal2.js +0 -159
- package/dist/esm/sas-details.entry.js +0 -127
- package/dist/esm/sas-dialog.entry.js +0 -244
- package/dist/esm/sas-file-upload.entry.js +0 -51
- package/dist/sas-ui/p-11f56a46.entry.js +0 -1
- package/dist/sas-ui/p-1b3946cc.entry.js +0 -1
- package/dist/sas-ui/p-bd6d57a0.entry.js +0 -1
- package/dist/sas-ui/p-c55abe9e.entry.js +0 -1
- package/dist/sas-ui/p-e4eb96ce.entry.js +0 -1
- package/dist/types/components/sas-autocomplete/sas-autocomplete.d.ts +0 -50
- package/dist/types/components/sas-dialog/sas-dialog.d.ts +0 -12
- package/dist/types/components/sas-file-upload/sas-file-upload.d.ts +0 -12
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-cd75521b.js');
|
|
6
|
-
require('./modules-
|
|
6
|
+
require('./modules-58fcd375.js');
|
|
7
7
|
require('./_commonjsHelpers-537d719a.js');
|
|
8
8
|
|
|
9
9
|
/*
|
|
@@ -16,7 +16,7 @@ const patchEsm = () => {
|
|
|
16
16
|
const defineCustomElements = (win, options) => {
|
|
17
17
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
18
18
|
return patchEsm().then(() => {
|
|
19
|
-
return index.bootstrapLazy(JSON.parse("[[\"sas-date-range.cjs\",[[1,\"sas-date-range\",{\"label\":[513],\"outside\":[516],\"name\":[513],\"min\":[513],\"max\":[513],\"from\":[1537],\"to\":[1537],\"required\":[516],\"disabled\":[516],\"position\":[513],\"validity\":[1040],\"validate\":[64],\"updateErrorStatus\":[64],\"resetErrorStatus\":[64]}]]],[\"sas-time-field.cjs\",[[1,\"sas-time-field\",{\"label\":[513],\"outside\":[516],\"required\":[516],\"name\":[513],\"value\":[1537],\"max\":[513],\"min\":[513],\"disabled\":[516],\"clear\":[516],\"position\":[513],\"validity\":[1040],\"message\":[1537],\"validate\":[64],\"updateErrorStatus\":[64],\"resetErrorStatus\":[64]},[[0,\"inputUpdate\",\"inputUpdateHandler\"],[0,\"inputContainerClick\",\"inputContainerClickHandler\"],[0,\"listItemClicked\",\"listItemClickedHandler\"]]]]],[\"sas-menu-bar.cjs\",[[1,\"sas-menu-bar\",{\"sticky\":[516]},[[0,\"selectUpdateEventUsedInternal\",\"selectUpdateEventUsedInternalHandler\"],[0,\"multiselectUpdateEventUsedInternal\",\"multiselectUpdateEventUsedInternalHandler\"],[0,\"dateFieldUpdateEventUsedInternal\",\"dateFieldUpdateEventUsedInternalHandler\"]]]]],[\"sas-user-card.cjs\",[[1,\"sas-user-card\",{\"block\":[516],\"name\":[513],\"position\":[513],\"status\":[1537],\"badge\":[516],\"attachment\":[516],\"src\":[513]},[[0,\"switchupdate\",\"switchUpdateHandler\"]]]]],[\"sas-navigation-top.cjs\",[[1,\"sas-navigation-top\",{\"name\":[513],\"user\":[513],\"src\":[513]}]]],[\"sas-stepper.cjs\",[[1,\"sas-stepper\",{\"type\":[513],\"total\":[514],\"current\":[1538],\"names\":[16]},[[0,\"buttonclicked\",\"buttonclickedHandler\"]]]]],[\"sas-pagination.cjs\",[[1,\"sas-pagination\",{\"totalPage\":[514,\"total-page\"],\"totalIndex\":[514,\"total-index\"],\"currentPage\":[1538,\"current-page\"]}]]],[\"sas-radio-group.cjs\",[[1,\"sas-radio-group\",{\"name\":[513],\"label\":[513],\"required\":[516],\"value\":[1032],\"defaultValue\":[520,\"default-value\"],\"text\":[1537],\"rawData\":[1032,\"raw-data\"],\"options\":[16],\"update\":[64]},[[0,\"radioupdate\",\"radioUpdateHandler\"]]]]],[\"sas-carousel.cjs\",[[1,\"sas-carousel\",{\"index\":[1538],\"slides\":[16]}]]],[\"sas-details.cjs\",[[1,\"sas-details\",{\"open\":[516],\"icon\":[513],\"autoGap\":[516,\"auto-gap\"],\"checkIsOpen\":[64]}]]],[\"sas-file-upload.cjs\",[[1,\"sas-file-upload\",{\"label\":[32]}]]],[\"sas-navigation.cjs\",[[1,\"sas-navigation\",{\"name\":[513]}]]],[\"sas-tooltip.cjs\",[[1,\"sas-tooltip\",{\"trigger\":[513],\"text\":[513],\"position\":[1537]}]]],[\"sas-avatar-group.cjs\",[[1,\"sas-avatar-group\"]]],[\"sas-breadcrumb.cjs\",[[1,\"sas-breadcrumb\",{\"items\":[16],\"showAll\":[32]}]]],[\"sas-button-group.cjs\",[[1,\"sas-button-group\",{\"values\":[1040],\"multiple\":[516]},[[0,\"buttonclicked\",\"buttonclickedHandler\"]]]]],[\"sas-dialog.cjs\",[[1,\"sas-dialog\"]]],[\"sas-form.cjs\",[[1,\"sas-form\",{\"method\":[513],\"url\":[513],\"reset\":[64],\"validate\":[64],\"submit\":[64]}]]],[\"sas-progress-bar.cjs\",[[1,\"sas-progress-bar\",{\"progress\":[514]}]]],[\"sas-tab.cjs\",[[1,\"sas-tab\",null,[[0,\"tabItemClicked\",\"tabItemClickedHandler\"]]]]],[\"sas-tab-item.cjs\",[[1,\"sas-tab-item\",{\"value\":[513],\"text\":[513]}]]],[\"sas-date-field.cjs\",[[1,\"sas-date-field\",{\"label\":[513],\"outside\":[516],\"required\":[516],\"name\":[513],\"value\":[1537],\"max\":[513],\"min\":[513],\"disabled\":[516],\"clear\":[516],\"icon\":[513],\"position\":[513],\"positionH\":[513,\"position-h\"],\"validity\":[1040],\"message\":[1537],\"localDate\":[32],\"update\":[64],\"validate\":[64],\"updateErrorStatus\":[64],\"resetErrorStatus\":[64]},[[0,\"inputUpdate\",\"inputUpdateHandler\"]]]]],[\"sas-radio.cjs\",[[1,\"sas-radio\",{\"name\":[513],\"value\":[8],\"text\":[513],\"textPosition\":[513,\"text-position\"],\"align\":[513],\"checked\":[1540],\"disabled\":[516],\"required\":[516],\"error\":[1540],\"validity\":[1040],\"message\":[1537],\"tabindexNumber\":[32],\"validate\":[64],\"updateErrorStatus\":[64],\"resetErrorStatus\":[64]}]]],[\"sas-badge.cjs\",[[1,\"sas-badge\",{\"type\":[513],\"status\":[513],\"number\":[514],\"inline\":[516]}]]],[\"sas-chat-bubble.cjs\",[[1,\"sas-chat-bubble\",{\"position\":[513]}]]],[\"sas-divider.cjs\",[[1,\"sas-divider\",{\"type\":[1]}]]],[\"sas-switch.cjs\",[[1,\"sas-switch\",{\"name\":[513],\"checked\":[1540],\"required\":[516],\"error\":[1540],\"validity\":[1040],\"message\":[1537],\"validate\":[64],\"updateErrorStatus\":[64],\"resetErrorStatus\":[64]}]]],[\"sas-alert_22.cjs\",[[1,\"sas-multiselect\",{\"type\":[513],\"search\":[516],\"noMatchTip\":[513,\"no-match-tip\"],\"label\":[513],\"outside\":[516],\"required\":[516],\"disabled\":[516],\"clear\":[516],\"placeholder\":[513],\"options\":[1040],\"name\":[513],\"values\":[1040],\"rawData\":[1040],\"min\":[514],\"max\":[514],\"maxChip\":[514,\"max-chip\"],\"selectAll\":[4,\"select-all\"],\"selectAllText\":[1,\"select-all-text\"],\"position\":[513],\"validity\":[1040],\"message\":[1537],\"value\":[32],\"update\":[64],\"validate\":[64],\"updateErrorStatus\":[64],\"resetErrorStatus\":[64]},[[0,\"checkboxgroupupdate\",\"checkboxUpdateHandler\"],[0,\"chipUpdate\",\"chipUpdateHandler\"],[0,\"inputContainerClick\",\"inputContainerClickHandler\"]]],[1,\"sas-autocomplete\",{\"label\":[513],\"required\":[516],\"disabled\":[516],\"placeholder\":[513],\"options\":[16],\"value\":[8],\"text\":[8],\"update\":[64]},[[0,\"inputUpdate\",\"inputUpdateHandler\"],[0,\"listUpdate\",\"listUpdateHandler\"]]],[1,\"sas-select\",{\"label\":[513],\"outside\":[516],\"required\":[516],\"type\":[513],\"noMatchTip\":[513,\"no-match-tip\"],\"placeholder\":[513],\"disabled\":[516],\"clear\":[516],\"options\":[1040],\"defaultValue\":[520,\"default-value\"],\"name\":[513],\"value\":[1032],\"rawData\":[1032,\"raw-data\"],\"text\":[1032],\"subtextPosition\":[513,\"subtext-position\"],\"position\":[513],\"validity\":[1040],\"message\":[1537],\"update\":[64],\"validate\":[64],\"updateErrorStatus\":[64],\"resetErrorStatus\":[64]},[[0,\"listItemClicked\",\"listItemClickedHandler\"],[0,\"listItemClickEventUsedInternal\",\"listItemClickEventUsedInternalHandler\"],[0,\"inputUpdate\",\"inputUpdateHandler\"],[0,\"inputClear\",\"inputClearHandler\"],[0,\"inputFocus\",\"inputFocusHandler\"],[0,\"inputBlur\",\"inputBlurHandler\"],[0,\"inputContainerClick\",\"inputContainerClickHandler\"]]],[1,\"sas-card\",{\"block\":[516],\"src\":[513],\"lazyImage\":[516,\"lazy-image\"],\"scale\":[513],\"repair\":[516],\"attachment\":[516],\"disabled\":[516],\"cardTitle\":[513,\"card-title\"]}],[1,\"sas-upload\",{\"compact\":[516],\"inputOutside\":[516,\"input-outside\"],\"fullImage\":[516,\"full-image\"],\"type\":[513],\"label\":[513],\"name\":[513],\"max\":[514],\"size\":[514],\"accept\":[513],\"files\":[1040],\"removedFiles\":[1040],\"method\":[513],\"url\":[513],\"required\":[516],\"disabled\":[516],\"error\":[1540],\"validity\":[1040],\"message\":[1537],\"validate\":[64],\"submit\":[64],\"updateErrorStatus\":[64],\"resetErrorStatus\":[64],\"getFormData\":[64],\"checkFileUpdate\":[64]}],[1,\"sas-alert\",{\"type\":[513],\"show\":[1540],\"close\":[516],\"alertTitle\":[1,\"alert-title\"],\"content\":[1]}],[1,\"sas-container\",{\"gridTemplateColumns\":[513,\"grid-template-columns\"],\"gridTemplateRows\":[513,\"grid-template-rows\"],\"justifyItems\":[513,\"justify-items\"],\"alignItems\":[513,\"align-items\"]}],[1,\"sas-checkbox-group\",{\"name\":[513],\"label\":[513],\"required\":[516],\"values\":[1040],\"rawData\":[1040],\"max\":[514],\"options\":[1040],\"selectAll\":[4,\"select-all\"],\"selectAllText\":[1,\"select-all-text\"],\"columns\":[514],\"update\":[64]},[[0,\"checkboxUpdate\",\"checkboxUpdateHandler\"]]],[1,\"sas-chip\",{\"type\":[513],\"status\":[513],\"outlined\":[516],\"close\":[516],\"inside\":[516],\"text\":[513],\"uppercase\":[516],\"bold\":[516]}],[1,\"sas-checkbox\",{\"name\":[513],\"value\":[8],\"text\":[513],\"index\":[514],\"textPosition\":[513,\"text-position\"],\"align\":[513],\"checked\":[1540],\"disabled\":[516],\"icon\":[513],\"error\":[1540],\"required\":[516],\"validity\":[1040],\"message\":[1537],\"exclusive\":[516],\"validate\":[64],\"updateErrorStatus\":[64],\"resetErrorStatus\":[64]}],[1,\"sas-checkbox-subgroup\",{\"value\":[8],\"text\":[513],\"checked\":[1540],\"disabled\":[516],\"icon\":[1025],\"status\":[1025]},[[0,\"checkboxUpdate\",\"checkboxUpdateHandler\"]]],[1,\"sas-image\",{\"imageObject\":[8,\"image-object\"],\"src\":[513],\"lazy\":[516]}],[1,\"sas-list\",{\"toggle\":[516],\"compact\":[516],\"border\":[516],\"subtextPosition\":[513,\"subtext-position\"],\"value\":[1544],\"rawData\":[1032,\"raw-data\"],\"text\":[1537],\"defaultValue\":[520,\"default-value\"],\"options\":[16],\"update\":[64]},[[0,\"listItemClicked\",\"listItemClickedHandler\"],[0,\"listItemClickEventUsedInternal\",\"listItemClickEventUsedInternalHandler\"]]],[1,\"sas-sublist\",{\"icon\":[513],\"value\":[8],\"text\":[513],\"subtext\":[513],\"iconRight\":[513,\"icon-right\"],\"toggle\":[516],\"compact\":[516],\"hideSub\":[1540,\"hide-sub\"],\"selected\":[1540]},[[0,\"listItemClickEventUsedInternal\",\"listItemClickEventUsedInternalHandler\"]]],[1,\"sas-dropdown\",{\"block\":[516],\"clickClose\":[516,\"click-close\"],\"positionV\":[1537,\"position-v\"],\"positionH\":[1537,\"position-h\"],\"close\":[64]},[[0,\"listItemClickEventUsedInternal\",\"listItemClickEventUsedInternalHandler\"]]],[1,\"sas-button\",{\"type\":[513],\"size\":[513],\"text\":[513],\"iconLeft\":[513,\"icon-left\"],\"icon\":[513],\"iconPosition\":[513,\"icon-position\"],\"iconRight\":[513,\"icon-right\"],\"block\":[516],\"loading\":[516],\"disabled\":[516],\"href\":[513],\"target\":[513],\"tabindexNumber\":[32]}],[1,\"sas-list-item\",{\"icon\":[513],\"value\":[8],\"text\":[513],\"subtext\":[513],\"subtextPosition\":[513,\"subtext-position\"],\"iconRight\":[513,\"icon-right\"],\"selected\":[516],\"disabled\":[516],\"index\":[514],\"href\":[513],\"target\":[513]}],[1,\"sas-form-input-template\",{\"label\":[513],\"outside\":[516],\"required\":[516],\"placeholder\":[1],\"type\":[1],\"value\":[1],\"max\":[513],\"min\":[513],\"iconRight\":[1,\"icon-right\"],\"readonly\":[4],\"error\":[516],\"disabled\":[516],\"clear\":[516],\"position\":[513],\"positionH\":[513,\"position-h\"],\"show\":[1540],\"clickClose\":[516,\"click-close\"]},[[0,\"listItemClickEventUsedInternal\",\"listItemClickEventUsedInternalHandler\"]]],[1,\"sas-input\",{\"type\":[513],\"placeholder\":[513],\"name\":[513],\"value\":[1537],\"label\":[513],\"outside\":[516],\"required\":[516],\"maxlength\":[514],\"minlength\":[514],\"max\":[513],\"min\":[513],\"iconLeft\":[513,\"icon-left\"],\"iconRight\":[513,\"icon-right\"],\"clear\":[516],\"readonly\":[516],\"disabled\":[516],\"validity\":[1032],\"error\":[1540],\"message\":[1537],\"country\":[1537],\"placeholderNumberType\":[513,\"placeholder-number-type\"],\"isValidNumber\":[1540,\"is-valid-number\"],\"update\":[64],\"validate\":[64],\"updateErrorStatus\":[64],\"resetErrorStatus\":[64],\"setCustomValidity\":[64]},[[0,\"inputTelUpdate\",\"inputTelUpdateHandler\"],[0,\"inputTextareaUpdate\",\"inputTextareaUpdateHandler\"]]],[1,\"sas-input-tel\",{\"getValidity\":[64],\"setCountry\":[64],\"setPlaceholder\":[64],\"update\":[64]}],[1,\"sas-input-textarea\",{\"placeholder\":[513],\"maxlength\":[514],\"minlength\":[514],\"value\":[513]}],[1,\"sas-icon\",{\"type\":[513],\"size\":[513],\"status\":[513],\"icon\":[513],\"index\":[2]}]]],[\"sas-avatar.cjs\",[[1,\"sas-avatar\",{\"type\":[513],\"name\":[513],\"src\":[513],\"disabled\":[516],\"group\":[516]}]]],[\"sas-table.cjs\",[[1,\"sas-table\",{\"headers\":[16],\"items\":[16],\"sortedItems\":[32]}]]]]"), options);
|
|
19
|
+
return index.bootstrapLazy(JSON.parse("[[\"sas-date-range.cjs\",[[1,\"sas-date-range\",{\"label\":[513],\"outside\":[516],\"name\":[513],\"min\":[513],\"max\":[513],\"from\":[1537],\"to\":[1537],\"required\":[516],\"disabled\":[516],\"position\":[513],\"validity\":[1040],\"validate\":[64],\"updateErrorStatus\":[64],\"resetErrorStatus\":[64]}]]],[\"sas-time-field.cjs\",[[1,\"sas-time-field\",{\"label\":[513],\"outside\":[516],\"required\":[516],\"name\":[513],\"value\":[1537],\"max\":[513],\"min\":[513],\"disabled\":[516],\"clear\":[516],\"position\":[513],\"validity\":[1040],\"message\":[1537],\"validate\":[64],\"updateErrorStatus\":[64],\"resetErrorStatus\":[64]},[[0,\"inputUpdate\",\"inputUpdateHandler\"],[0,\"inputContainerClick\",\"inputContainerClickHandler\"],[0,\"listItemClicked\",\"listItemClickedHandler\"]]]]],[\"sas-menu-bar.cjs\",[[1,\"sas-menu-bar\",{\"sticky\":[516]},[[0,\"selectUpdateEventUsedInternal\",\"selectUpdateEventUsedInternalHandler\"],[0,\"multiselectUpdateEventUsedInternal\",\"multiselectUpdateEventUsedInternalHandler\"],[0,\"dateFieldUpdateEventUsedInternal\",\"dateFieldUpdateEventUsedInternalHandler\"]]]]],[\"sas-user-card.cjs\",[[1,\"sas-user-card\",{\"block\":[516],\"name\":[513],\"position\":[513],\"status\":[1537],\"badge\":[516],\"attachment\":[516],\"src\":[513]},[[0,\"switchupdate\",\"switchUpdateHandler\"]]]]],[\"sas-navigation-top.cjs\",[[1,\"sas-navigation-top\",{\"name\":[513],\"user\":[513],\"src\":[513]}]]],[\"sas-stepper.cjs\",[[1,\"sas-stepper\",{\"total\":[514],\"current\":[1538],\"names\":[16]},[[0,\"buttonclicked\",\"buttonclickedHandler\"]]]]],[\"sas-pagination.cjs\",[[1,\"sas-pagination\",{\"totalPage\":[514,\"total-page\"],\"totalIndex\":[514,\"total-index\"],\"currentPage\":[1538,\"current-page\"]}]]],[\"sas-radio-group.cjs\",[[1,\"sas-radio-group\",{\"name\":[513],\"label\":[513],\"required\":[516],\"value\":[1032],\"defaultValue\":[520,\"default-value\"],\"text\":[1537],\"rawData\":[1032,\"raw-data\"],\"options\":[16],\"update\":[64]},[[0,\"radioupdate\",\"radioUpdateHandler\"]]]]],[\"sas-carousel.cjs\",[[1,\"sas-carousel\",{\"index\":[1538],\"slides\":[16]}]]],[\"sas-navigation.cjs\",[[1,\"sas-navigation\",{\"name\":[513]}]]],[\"sas-date-field.cjs\",[[1,\"sas-date-field\",{\"label\":[513],\"outside\":[516],\"required\":[516],\"name\":[513],\"value\":[1537],\"max\":[513],\"min\":[513],\"disabled\":[516],\"clear\":[516],\"icon\":[513],\"position\":[513],\"positionH\":[513,\"position-h\"],\"validity\":[1040],\"message\":[1537],\"localDate\":[32],\"update\":[64],\"validate\":[64],\"updateErrorStatus\":[64],\"resetErrorStatus\":[64]},[[0,\"inputUpdate\",\"inputUpdateHandler\"]]]]],[\"sas-radio.cjs\",[[1,\"sas-radio\",{\"name\":[513],\"value\":[8],\"text\":[513],\"textPosition\":[513,\"text-position\"],\"align\":[513],\"checked\":[1540],\"disabled\":[516],\"required\":[516],\"error\":[1540],\"validity\":[1040],\"message\":[1537],\"tabindexNumber\":[32],\"validate\":[64],\"updateErrorStatus\":[64],\"resetErrorStatus\":[64]}]]],[\"sas-chat-bubble.cjs\",[[1,\"sas-chat-bubble\",{\"position\":[513]}]]],[\"sas-tooltip.cjs\",[[1,\"sas-tooltip\",{\"trigger\":[513],\"text\":[513],\"position\":[1537]}]]],[\"sas-avatar-group.cjs\",[[1,\"sas-avatar-group\"]]],[\"sas-breadcrumb.cjs\",[[1,\"sas-breadcrumb\",{\"items\":[16],\"showAll\":[32]}]]],[\"sas-button-group.cjs\",[[1,\"sas-button-group\",{\"values\":[1040],\"multiple\":[516]},[[0,\"buttonclicked\",\"buttonclickedHandler\"]]]]],[\"sas-form.cjs\",[[1,\"sas-form\",{\"method\":[513],\"url\":[513],\"reset\":[64],\"validate\":[64],\"submit\":[64]}]]],[\"sas-progress-bar.cjs\",[[1,\"sas-progress-bar\",{\"progress\":[514]}]]],[\"sas-tab.cjs\",[[1,\"sas-tab\",null,[[0,\"tabItemClicked\",\"tabItemClickedHandler\"]]]]],[\"sas-tab-item.cjs\",[[1,\"sas-tab-item\",{\"value\":[513],\"text\":[513]}]]],[\"sas-badge.cjs\",[[1,\"sas-badge\",{\"type\":[513],\"status\":[513],\"number\":[514],\"inline\":[516]}]]],[\"sas-divider.cjs\",[[1,\"sas-divider\",{\"type\":[1]}]]],[\"sas-switch.cjs\",[[1,\"sas-switch\",{\"name\":[513],\"checked\":[1540],\"required\":[516],\"error\":[1540],\"validity\":[1040],\"message\":[1537],\"validate\":[64],\"updateErrorStatus\":[64],\"resetErrorStatus\":[64]}]]],[\"sas-alert_22.cjs\",[[1,\"sas-multiselect\",{\"type\":[513],\"search\":[516],\"noMatchTip\":[513,\"no-match-tip\"],\"label\":[513],\"outside\":[516],\"required\":[516],\"disabled\":[516],\"clear\":[516],\"placeholder\":[513],\"options\":[1040],\"name\":[513],\"values\":[1040],\"rawData\":[1040],\"min\":[514],\"max\":[514],\"maxChip\":[514,\"max-chip\"],\"selectAll\":[4,\"select-all\"],\"selectAllText\":[1,\"select-all-text\"],\"position\":[513],\"validity\":[1040],\"message\":[1537],\"value\":[32],\"update\":[64],\"validate\":[64],\"updateErrorStatus\":[64],\"resetErrorStatus\":[64]},[[0,\"checkboxgroupupdate\",\"checkboxUpdateHandler\"],[0,\"chipUpdate\",\"chipUpdateHandler\"],[0,\"inputContainerClick\",\"inputContainerClickHandler\"]]],[1,\"sas-select\",{\"label\":[513],\"outside\":[516],\"required\":[516],\"type\":[513],\"noMatchTip\":[513,\"no-match-tip\"],\"placeholder\":[513],\"disabled\":[516],\"clear\":[516],\"options\":[1040],\"defaultValue\":[520,\"default-value\"],\"name\":[513],\"value\":[1032],\"rawData\":[1032,\"raw-data\"],\"text\":[1032],\"subtextPosition\":[513,\"subtext-position\"],\"position\":[513],\"validity\":[1040],\"message\":[1537],\"update\":[64],\"validate\":[64],\"updateErrorStatus\":[64],\"resetErrorStatus\":[64]},[[0,\"listItemClicked\",\"listItemClickedHandler\"],[0,\"listItemClickEventUsedInternal\",\"listItemClickEventUsedInternalHandler\"],[0,\"inputUpdate\",\"inputUpdateHandler\"],[0,\"inputClear\",\"inputClearHandler\"],[0,\"inputFocus\",\"inputFocusHandler\"],[0,\"inputBlur\",\"inputBlurHandler\"],[0,\"inputContainerClick\",\"inputContainerClickHandler\"]]],[1,\"sas-card\",{\"block\":[516],\"src\":[513],\"lazyImage\":[516,\"lazy-image\"],\"scale\":[513],\"repair\":[516],\"attachment\":[516],\"disabled\":[516],\"cardTitle\":[513,\"card-title\"]}],[1,\"sas-upload\",{\"compact\":[516],\"inputOutside\":[516,\"input-outside\"],\"fullImage\":[516,\"full-image\"],\"type\":[513],\"label\":[513],\"name\":[513],\"max\":[514],\"size\":[514],\"accept\":[513],\"files\":[1040],\"removedFiles\":[1040],\"method\":[513],\"url\":[513],\"required\":[516],\"disabled\":[516],\"error\":[1540],\"validity\":[1040],\"message\":[1537],\"validate\":[64],\"submit\":[64],\"updateErrorStatus\":[64],\"resetErrorStatus\":[64],\"getFormData\":[64],\"checkFileUpdate\":[64]}],[1,\"sas-alert\",{\"type\":[513],\"show\":[1540],\"close\":[516],\"alertTitle\":[1,\"alert-title\"],\"content\":[1]}],[1,\"sas-details\",{\"open\":[516],\"icon\":[513],\"autoGap\":[516,\"auto-gap\"],\"checkIsOpen\":[64]}],[1,\"sas-container\",{\"gridTemplateColumns\":[513,\"grid-template-columns\"],\"gridTemplateRows\":[513,\"grid-template-rows\"],\"justifyItems\":[513,\"justify-items\"],\"alignItems\":[513,\"align-items\"]}],[1,\"sas-checkbox-group\",{\"name\":[513],\"label\":[513],\"required\":[516],\"values\":[1040],\"rawData\":[1040],\"max\":[514],\"options\":[1040],\"selectAll\":[4,\"select-all\"],\"selectAllText\":[1,\"select-all-text\"],\"columns\":[514],\"update\":[64]},[[0,\"checkboxUpdate\",\"checkboxUpdateHandler\"]]],[1,\"sas-chip\",{\"type\":[513],\"status\":[513],\"outlined\":[516],\"close\":[516],\"inside\":[516],\"text\":[513],\"uppercase\":[516],\"bold\":[516]}],[1,\"sas-list\",{\"toggle\":[516],\"compact\":[516],\"border\":[516],\"subtextPosition\":[513,\"subtext-position\"],\"value\":[1544],\"rawData\":[1032,\"raw-data\"],\"text\":[1537],\"defaultValue\":[520,\"default-value\"],\"options\":[16],\"update\":[64]},[[0,\"listItemClicked\",\"listItemClickedHandler\"],[0,\"listItemClickEventUsedInternal\",\"listItemClickEventUsedInternalHandler\"]]],[1,\"sas-checkbox\",{\"name\":[513],\"value\":[8],\"text\":[513],\"index\":[514],\"textPosition\":[513,\"text-position\"],\"align\":[513],\"checked\":[1540],\"disabled\":[516],\"icon\":[513],\"error\":[1540],\"required\":[516],\"validity\":[1040],\"message\":[1537],\"exclusive\":[516],\"validate\":[64],\"updateErrorStatus\":[64],\"resetErrorStatus\":[64]}],[1,\"sas-checkbox-subgroup\",{\"value\":[8],\"text\":[513],\"checked\":[1540],\"disabled\":[516],\"icon\":[1025],\"status\":[1025]},[[0,\"checkboxUpdate\",\"checkboxUpdateHandler\"]]],[1,\"sas-image\",{\"imageObject\":[8,\"image-object\"],\"src\":[513],\"lazy\":[516]}],[1,\"sas-sublist\",{\"icon\":[513],\"value\":[8],\"text\":[513],\"subtext\":[513],\"iconRight\":[513,\"icon-right\"],\"toggle\":[516],\"compact\":[516],\"hideSub\":[1540,\"hide-sub\"],\"selected\":[1540]},[[0,\"listItemClickEventUsedInternal\",\"listItemClickEventUsedInternalHandler\"]]],[1,\"sas-list-item\",{\"icon\":[513],\"value\":[8],\"text\":[513],\"subtext\":[513],\"subtextPosition\":[513,\"subtext-position\"],\"iconRight\":[513,\"icon-right\"],\"selected\":[516],\"disabled\":[516],\"index\":[514],\"href\":[513],\"target\":[513]}],[1,\"sas-dropdown\",{\"block\":[516],\"clickClose\":[516,\"click-close\"],\"positionV\":[1537,\"position-v\"],\"positionH\":[1537,\"position-h\"],\"close\":[64]},[[0,\"listItemClickEventUsedInternal\",\"listItemClickEventUsedInternalHandler\"]]],[1,\"sas-form-input-template\",{\"label\":[513],\"outside\":[516],\"required\":[516],\"placeholder\":[1],\"type\":[1],\"value\":[1],\"max\":[513],\"min\":[513],\"iconRight\":[1,\"icon-right\"],\"readonly\":[4],\"error\":[516],\"disabled\":[516],\"clear\":[516],\"position\":[513],\"positionH\":[513,\"position-h\"],\"show\":[1540],\"clickClose\":[516,\"click-close\"]},[[0,\"listItemClickEventUsedInternal\",\"listItemClickEventUsedInternalHandler\"]]],[1,\"sas-button\",{\"type\":[513],\"size\":[513],\"text\":[513],\"iconLeft\":[513,\"icon-left\"],\"icon\":[513],\"iconPosition\":[513,\"icon-position\"],\"iconRight\":[513,\"icon-right\"],\"block\":[516],\"loading\":[516],\"disabled\":[516],\"href\":[513],\"target\":[513],\"tabindexNumber\":[32]}],[1,\"sas-input\",{\"type\":[513],\"placeholder\":[513],\"name\":[513],\"value\":[1537],\"label\":[513],\"outside\":[516],\"required\":[516],\"maxlength\":[514],\"minlength\":[514],\"max\":[513],\"min\":[513],\"iconLeft\":[513,\"icon-left\"],\"iconRight\":[513,\"icon-right\"],\"clear\":[516],\"readonly\":[516],\"disabled\":[516],\"validity\":[1032],\"error\":[1540],\"message\":[1537],\"country\":[1537],\"placeholderNumberType\":[513,\"placeholder-number-type\"],\"isValidNumber\":[1540,\"is-valid-number\"],\"update\":[64],\"validate\":[64],\"updateErrorStatus\":[64],\"resetErrorStatus\":[64],\"setCustomValidity\":[64]},[[0,\"inputTelUpdate\",\"inputTelUpdateHandler\"],[0,\"inputTextareaUpdate\",\"inputTextareaUpdateHandler\"]]],[1,\"sas-input-tel\",{\"getValidity\":[64],\"setCountry\":[64],\"setPlaceholder\":[64],\"update\":[64]}],[1,\"sas-input-textarea\",{\"placeholder\":[513],\"maxlength\":[514],\"minlength\":[514],\"value\":[513]}],[1,\"sas-icon\",{\"type\":[513],\"size\":[513],\"status\":[513],\"icon\":[513],\"index\":[2]}]]],[\"sas-avatar.cjs\",[[1,\"sas-avatar\",{\"type\":[513],\"name\":[513],\"src\":[513],\"disabled\":[516],\"group\":[516]}]]],[\"sas-table.cjs\",[[1,\"sas-table\",{\"headers\":[16],\"items\":[16],\"sortedItems\":[32]}]]]]"), options);
|
|
20
20
|
});
|
|
21
21
|
};
|
|
22
22
|
|
|
@@ -3438,7 +3438,7 @@ function init$1(options) {
|
|
|
3438
3438
|
footer: 'sas-dialog-swal-custom-footer',
|
|
3439
3439
|
},
|
|
3440
3440
|
didOpen: () => {
|
|
3441
|
-
addListener();
|
|
3441
|
+
addListener(options);
|
|
3442
3442
|
preventKeyEvent();
|
|
3443
3443
|
}
|
|
3444
3444
|
});
|
|
@@ -3449,12 +3449,16 @@ function getTitleHTML(options) {
|
|
|
3449
3449
|
if (options.title) {
|
|
3450
3450
|
if (options.type === 'alert') {
|
|
3451
3451
|
const iconHTML = `<sas-icon data-status="${options.status}" icon="${getIcon(options.status)}" size="large"></sas-icon>`;
|
|
3452
|
-
const textHTML = `<span>${options.title}</span>`;
|
|
3452
|
+
const textHTML = `<span tabindex="0">${options.title}</span>`;
|
|
3453
3453
|
titleHTML = iconHTML + textHTML;
|
|
3454
3454
|
} else {
|
|
3455
|
-
titleHTML = `<span>${options.title}</span>`;
|
|
3455
|
+
titleHTML = `<span tabindex="0">${options.title}</span>`;
|
|
3456
3456
|
}
|
|
3457
3457
|
}
|
|
3458
|
+
if(options.showCloseIcon === true) {
|
|
3459
|
+
titleHTML += `<sas-icon id="sas-dialog-swal-cancel-icon" style="position: absolute; top: -15px; right: -25px;" icon="fas fa-times"></sas-icon>`;
|
|
3460
|
+
}
|
|
3461
|
+
|
|
3458
3462
|
return titleHTML;
|
|
3459
3463
|
}
|
|
3460
3464
|
|
|
@@ -3528,7 +3532,7 @@ function getButtonHTML(button, index) {
|
|
|
3528
3532
|
return `<sas-button type="${type}" text="${text}"></sas-button>`;
|
|
3529
3533
|
}
|
|
3530
3534
|
|
|
3531
|
-
function addListener() {
|
|
3535
|
+
function addListener(options) {
|
|
3532
3536
|
const buttonContainer = document.querySelector('.sas-dialog-swal-custom-footer');
|
|
3533
3537
|
buttonContainer.addEventListener('buttonClicked', (event) => {
|
|
3534
3538
|
event.stopPropagation();
|
|
@@ -3539,7 +3543,21 @@ function addListener() {
|
|
|
3539
3543
|
detail: buttonText,
|
|
3540
3544
|
});
|
|
3541
3545
|
buttonContainer.dispatchEvent(customEvent);
|
|
3542
|
-
});
|
|
3546
|
+
});
|
|
3547
|
+
|
|
3548
|
+
if(options.showCloseIcon === true) {
|
|
3549
|
+
const closeIcon = document.querySelector('#sas-dialog-swal-cancel-icon');
|
|
3550
|
+
closeIcon.addEventListener('click', (event) => {
|
|
3551
|
+
event.stopPropagation();
|
|
3552
|
+
|
|
3553
|
+
const customEvent = new CustomEvent('dialogCancelIconClicked', {
|
|
3554
|
+
bubbles: true,
|
|
3555
|
+
cancelable: true
|
|
3556
|
+
});
|
|
3557
|
+
|
|
3558
|
+
closeIcon.dispatchEvent(customEvent);
|
|
3559
|
+
});
|
|
3560
|
+
}
|
|
3543
3561
|
}
|
|
3544
3562
|
|
|
3545
3563
|
function preventKeyEvent() {
|
|
@@ -3575,7 +3593,7 @@ class SasDialog {
|
|
|
3575
3593
|
}
|
|
3576
3594
|
}
|
|
3577
3595
|
|
|
3578
|
-
|
|
3596
|
+
const init = (options) => {
|
|
3579
3597
|
let message = 'default toast messsage';
|
|
3580
3598
|
if ('message' in options) {
|
|
3581
3599
|
message = options.message;
|
|
@@ -3594,7 +3612,7 @@ function init(options) {
|
|
|
3594
3612
|
setTimeout(() => {
|
|
3595
3613
|
toastElement.remove();
|
|
3596
3614
|
}, delay);
|
|
3597
|
-
}
|
|
3615
|
+
};
|
|
3598
3616
|
|
|
3599
3617
|
class SasToast {
|
|
3600
3618
|
constructor(options = {}) {
|
|
@@ -11,6 +11,7 @@ const sasAlertCss = ":host{--icon-color:currentColor}:host .container{display:no
|
|
|
11
11
|
let SasAlert = class {
|
|
12
12
|
constructor(hostRef) {
|
|
13
13
|
index.registerInstance(this, hostRef);
|
|
14
|
+
this.closed = index.createEvent(this, "closed", 7);
|
|
14
15
|
/**
|
|
15
16
|
* Type
|
|
16
17
|
*/
|
|
@@ -33,6 +34,7 @@ let SasAlert = class {
|
|
|
33
34
|
this.content = '';
|
|
34
35
|
this.handleCloseIconClick = () => {
|
|
35
36
|
this.show = false;
|
|
37
|
+
this.closed.emit();
|
|
36
38
|
};
|
|
37
39
|
}
|
|
38
40
|
getTypeIcon() {
|
|
@@ -58,328 +60,6 @@ let SasAlert = class {
|
|
|
58
60
|
};
|
|
59
61
|
SasAlert.style = sasAlertCss;
|
|
60
62
|
|
|
61
|
-
const sasAutocompleteCss = ":host{display:block}:host sas-list-item{padding:0}:host sas-list{max-height:200px;overflow:auto}:host .hide{display:none}";
|
|
62
|
-
|
|
63
|
-
let SasAutocomplete = class {
|
|
64
|
-
constructor(hostRef) {
|
|
65
|
-
index.registerInstance(this, hostRef);
|
|
66
|
-
this.autocompleteUpdate = index.createEvent(this, "autocompleteUpdate", 7);
|
|
67
|
-
/**
|
|
68
|
-
* Label
|
|
69
|
-
*/
|
|
70
|
-
this.label = '';
|
|
71
|
-
/**
|
|
72
|
-
* Shows a star symbol behind label
|
|
73
|
-
*/
|
|
74
|
-
this.required = false;
|
|
75
|
-
/**
|
|
76
|
-
* Disabled
|
|
77
|
-
*/
|
|
78
|
-
this.disabled = false;
|
|
79
|
-
/**
|
|
80
|
-
* Placeholder
|
|
81
|
-
*/
|
|
82
|
-
this.placeholder = '';
|
|
83
|
-
/**
|
|
84
|
-
* Options
|
|
85
|
-
*/
|
|
86
|
-
this.options = [];
|
|
87
|
-
// {
|
|
88
|
-
// value: 'apple',
|
|
89
|
-
// text: 'Apple',
|
|
90
|
-
// },
|
|
91
|
-
// {
|
|
92
|
-
// value: 'orange',
|
|
93
|
-
// text: 'Orange',
|
|
94
|
-
// },
|
|
95
|
-
// {
|
|
96
|
-
// value: 'pineapple',
|
|
97
|
-
// text: 'Pineapple',
|
|
98
|
-
// },
|
|
99
|
-
// {
|
|
100
|
-
// value: 'banana',
|
|
101
|
-
// text: 'Banana',
|
|
102
|
-
// },
|
|
103
|
-
// ];
|
|
104
|
-
/**
|
|
105
|
-
* Value
|
|
106
|
-
*/
|
|
107
|
-
this.value = null;
|
|
108
|
-
/**
|
|
109
|
-
* Text
|
|
110
|
-
*/
|
|
111
|
-
this.text = null;
|
|
112
|
-
this.needFilter = false;
|
|
113
|
-
this.isOptionsUpdate = false;
|
|
114
|
-
}
|
|
115
|
-
watchHandler() {
|
|
116
|
-
this.needFilter = true;
|
|
117
|
-
this.isOptionsUpdate = true;
|
|
118
|
-
}
|
|
119
|
-
watchValueHandler() {
|
|
120
|
-
const listItems = this.getListItemElements();
|
|
121
|
-
// not validate when no options and list items, as in this case, options are not loaded
|
|
122
|
-
if (this.options.length !== 0 || listItems.length !== 0) {
|
|
123
|
-
// validate value
|
|
124
|
-
if (this.value !== null) {
|
|
125
|
-
const isValid = this.validateValue();
|
|
126
|
-
if (!isValid) {
|
|
127
|
-
// reset value and text
|
|
128
|
-
this.value = null;
|
|
129
|
-
this.text = null;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
const hasShadowDom = this.checkShadowDom();
|
|
134
|
-
if (!hasShadowDom) {
|
|
135
|
-
const listElement = this.getListElement();
|
|
136
|
-
listElement.value = this.value;
|
|
137
|
-
}
|
|
138
|
-
// update text
|
|
139
|
-
const currentText = this.getText();
|
|
140
|
-
if (this.text !== currentText) {
|
|
141
|
-
this.text = currentText;
|
|
142
|
-
}
|
|
143
|
-
// update list
|
|
144
|
-
this.filter();
|
|
145
|
-
}
|
|
146
|
-
componentWillLoad() {
|
|
147
|
-
const hasShadowDom = this.checkShadowDom();
|
|
148
|
-
if (!hasShadowDom) {
|
|
149
|
-
const listElement = this.el.querySelector('sas-list');
|
|
150
|
-
if (listElement) {
|
|
151
|
-
listElement.style.maxHeight = '200px';
|
|
152
|
-
listElement.style.overflowY = 'auto';
|
|
153
|
-
}
|
|
154
|
-
const selectedElement = this.getSelectedElement();
|
|
155
|
-
if (selectedElement) {
|
|
156
|
-
this.value = selectedElement.value;
|
|
157
|
-
this.text = selectedElement.text;
|
|
158
|
-
this.filter();
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
else {
|
|
162
|
-
if (this.value !== null) {
|
|
163
|
-
const result = this.options.find((option) => option.value === this.value);
|
|
164
|
-
if (result) {
|
|
165
|
-
this.text = result.text;
|
|
166
|
-
// filter after render as list item elements are not rendered now
|
|
167
|
-
this.needFilter = true;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
componentDidRender() {
|
|
173
|
-
if (this.needFilter) {
|
|
174
|
-
const currentValue = this.filter();
|
|
175
|
-
if (this.value !== currentValue) {
|
|
176
|
-
this.value = currentValue;
|
|
177
|
-
}
|
|
178
|
-
if (this.isOptionsUpdate && this.value === null) {
|
|
179
|
-
this.text = null;
|
|
180
|
-
this.filter();
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
this.needFilter = false;
|
|
184
|
-
this.isOptionsUpdate = false;
|
|
185
|
-
}
|
|
186
|
-
inputUpdateHandler(event) {
|
|
187
|
-
// update text
|
|
188
|
-
this.text = event.detail;
|
|
189
|
-
// update value
|
|
190
|
-
this.value = this.filter();
|
|
191
|
-
// emit event
|
|
192
|
-
const obj = {
|
|
193
|
-
value: this.value,
|
|
194
|
-
text: this.text,
|
|
195
|
-
};
|
|
196
|
-
this.autocompleteUpdate.emit(obj);
|
|
197
|
-
// show list
|
|
198
|
-
const inputTemplate = this.el.shadowRoot.querySelector('sas-form-input-template');
|
|
199
|
-
inputTemplate.show = true;
|
|
200
|
-
}
|
|
201
|
-
listUpdateHandler(event) {
|
|
202
|
-
// update value
|
|
203
|
-
this.value = event.detail.value;
|
|
204
|
-
// update text
|
|
205
|
-
this.text = event.detail.text;
|
|
206
|
-
// emit event
|
|
207
|
-
this.autocompleteUpdate.emit(event.detail);
|
|
208
|
-
}
|
|
209
|
-
async update() {
|
|
210
|
-
const eventObj = {
|
|
211
|
-
value: this.value,
|
|
212
|
-
text: this.text,
|
|
213
|
-
};
|
|
214
|
-
this.autocompleteUpdate.emit(eventObj);
|
|
215
|
-
}
|
|
216
|
-
validateValue() {
|
|
217
|
-
const hasShadowDom = this.checkShadowDom();
|
|
218
|
-
let isFound = false;
|
|
219
|
-
if (hasShadowDom) {
|
|
220
|
-
this.options.forEach((option) => {
|
|
221
|
-
if (option.value === this.value) {
|
|
222
|
-
isFound = true;
|
|
223
|
-
}
|
|
224
|
-
});
|
|
225
|
-
}
|
|
226
|
-
else {
|
|
227
|
-
const listItems = this.getListItemElements();
|
|
228
|
-
listItems.forEach((listItem) => {
|
|
229
|
-
if (listItem.value === this.value) {
|
|
230
|
-
isFound = true;
|
|
231
|
-
}
|
|
232
|
-
});
|
|
233
|
-
}
|
|
234
|
-
return isFound;
|
|
235
|
-
}
|
|
236
|
-
checkShadowDom() {
|
|
237
|
-
if (this.options.length > 0) {
|
|
238
|
-
return true;
|
|
239
|
-
}
|
|
240
|
-
return false;
|
|
241
|
-
}
|
|
242
|
-
getListItemElements() {
|
|
243
|
-
const hasShadowDom = this.checkShadowDom();
|
|
244
|
-
if (hasShadowDom) {
|
|
245
|
-
const listElement = this.getListElement();
|
|
246
|
-
if (listElement) {
|
|
247
|
-
return listElement.shadowRoot.querySelectorAll('sas-list-item');
|
|
248
|
-
}
|
|
249
|
-
return [];
|
|
250
|
-
}
|
|
251
|
-
else {
|
|
252
|
-
return this.el.querySelectorAll('sas-list-item');
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
getListElement() {
|
|
256
|
-
const hasShadowDom = this.checkShadowDom();
|
|
257
|
-
if (hasShadowDom) {
|
|
258
|
-
return this.el.shadowRoot.querySelector('sas-list');
|
|
259
|
-
}
|
|
260
|
-
return this.el.querySelector('sas-list');
|
|
261
|
-
}
|
|
262
|
-
getText() {
|
|
263
|
-
const hasShadowDom = this.checkShadowDom();
|
|
264
|
-
if (this.value === null) {
|
|
265
|
-
return this.text;
|
|
266
|
-
}
|
|
267
|
-
else {
|
|
268
|
-
if (hasShadowDom) {
|
|
269
|
-
const result = this.options.find((option) => option.value === this.value);
|
|
270
|
-
return result.text;
|
|
271
|
-
}
|
|
272
|
-
else {
|
|
273
|
-
const selectedElement = this.getSelectedElement();
|
|
274
|
-
return selectedElement.text;
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
getSelectedElement() {
|
|
279
|
-
const listItems = this.getListItemElements();
|
|
280
|
-
let selectedElement = null;
|
|
281
|
-
listItems.forEach((listItem) => {
|
|
282
|
-
if (listItem.value === this.value
|
|
283
|
-
|| listItem.selected) { // has pre-selected list item
|
|
284
|
-
selectedElement = listItem;
|
|
285
|
-
}
|
|
286
|
-
});
|
|
287
|
-
return selectedElement;
|
|
288
|
-
}
|
|
289
|
-
filter() {
|
|
290
|
-
const currentText = this.text;
|
|
291
|
-
let matchedValue = null;
|
|
292
|
-
let count = 0;
|
|
293
|
-
let listItems;
|
|
294
|
-
const hasShadowDom = this.checkShadowDom();
|
|
295
|
-
if (hasShadowDom) {
|
|
296
|
-
const listElement = this.getListElement();
|
|
297
|
-
if (listElement) {
|
|
298
|
-
listItems = listElement.shadowRoot.querySelectorAll('sas-list-item');
|
|
299
|
-
}
|
|
300
|
-
else {
|
|
301
|
-
listItems = [];
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
else {
|
|
305
|
-
listItems = this.el.querySelectorAll('sas-list-item');
|
|
306
|
-
}
|
|
307
|
-
listItems.forEach((listItem, index) => {
|
|
308
|
-
// set all items selected prop to false
|
|
309
|
-
listItem.selected = false;
|
|
310
|
-
let currentTextLowerCase;
|
|
311
|
-
if (currentText) {
|
|
312
|
-
currentTextLowerCase = currentText.toLowerCase();
|
|
313
|
-
}
|
|
314
|
-
else {
|
|
315
|
-
currentTextLowerCase = '';
|
|
316
|
-
}
|
|
317
|
-
let listItemTextLowserCase = null;
|
|
318
|
-
let listItemValue = null;
|
|
319
|
-
if (hasShadowDom) {
|
|
320
|
-
if (this.options[index]) {
|
|
321
|
-
listItemTextLowserCase = this.options[index].text.toLowerCase();
|
|
322
|
-
listItemValue = this.options[index].value;
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
else {
|
|
326
|
-
listItemTextLowserCase = listItem.text.toLowerCase();
|
|
327
|
-
listItemValue = listItem.value;
|
|
328
|
-
}
|
|
329
|
-
let isMatch = false;
|
|
330
|
-
if (listItemTextLowserCase) {
|
|
331
|
-
isMatch = listItemTextLowserCase.includes(currentTextLowerCase);
|
|
332
|
-
}
|
|
333
|
-
if (isMatch) {
|
|
334
|
-
count += 1;
|
|
335
|
-
if (hasShadowDom) {
|
|
336
|
-
listItem.classList.remove('hide');
|
|
337
|
-
}
|
|
338
|
-
else {
|
|
339
|
-
listItem.classList.remove('d-none');
|
|
340
|
-
}
|
|
341
|
-
// if exact match, get value
|
|
342
|
-
if (currentTextLowerCase === listItemTextLowserCase) {
|
|
343
|
-
matchedValue = listItemValue;
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
else {
|
|
347
|
-
if (hasShadowDom) {
|
|
348
|
-
listItem.classList.add('hide');
|
|
349
|
-
}
|
|
350
|
-
else {
|
|
351
|
-
listItem.classList.add('d-none');
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
});
|
|
355
|
-
// if only one option shows and exact match, hide list
|
|
356
|
-
if (count === 1 && matchedValue !== null) {
|
|
357
|
-
listItems.forEach((listItem) => {
|
|
358
|
-
if (hasShadowDom) {
|
|
359
|
-
listItem.classList.add('hide');
|
|
360
|
-
}
|
|
361
|
-
else {
|
|
362
|
-
listItem.classList.add('d-none');
|
|
363
|
-
}
|
|
364
|
-
});
|
|
365
|
-
}
|
|
366
|
-
return matchedValue;
|
|
367
|
-
}
|
|
368
|
-
render() {
|
|
369
|
-
return (index.h(index.Host, null, index.h("sas-form-input-template", { label: this.label,
|
|
370
|
-
// required = { this.required }
|
|
371
|
-
placeholder: this.placeholder, value: this.text, disabled: this.disabled }, this.options.length > 0
|
|
372
|
-
? index.h("sas-list", { slot: "container", options: this.options, value: this.value })
|
|
373
|
-
: index.h("slot", { slot: "container" }))));
|
|
374
|
-
}
|
|
375
|
-
get el() { return index.getElement(this); }
|
|
376
|
-
static get watchers() { return {
|
|
377
|
-
"options": ["watchHandler"],
|
|
378
|
-
"value": ["watchValueHandler"]
|
|
379
|
-
}; }
|
|
380
|
-
};
|
|
381
|
-
SasAutocomplete.style = sasAutocompleteCss;
|
|
382
|
-
|
|
383
63
|
const sasButtonCss = ":host{display:inline-block}:host .container{display:inline-flex;justify-content:space-between;align-items:center;box-sizing:border-box;font-weight:500;cursor:pointer;position:relative;border-radius:var(--button-border-radius, 5px);margin:var(--button-margin, 0);line-height:normal;width:var(--button-width, initial)}:host .container:before{content:\"\";position:absolute;top:-1px;left:-1px;width:calc(100% + 2px);height:calc(100% + 2px);border-radius:inherit;background-color:currentColor;opacity:0}:host .container:focus{outline:none}:host .container:hover:before,:host .container:focus:before{opacity:0.24}:host .anchor{position:absolute;left:0;top:0;height:100%;width:100%}:host .button-main-content{display:inline-flex;justify-content:center;align-items:center;flex-grow:1}:host .button-icon{margin:0 4px;--icon-color:currentColor}:host .button-text{margin:0 4px;white-space:nowrap}:host(:focus){outline:none}:host([tabindex=\"0\"]) .container:active:before{opacity:0.48}:host([size=exlarge]) .container{font-size:var(--button-font-size, 22px);padding:var(--button-padding, 0 20px);height:var(--button-height, 64px);--icon-background-width:var(--button-font-size, 22px);--icon-background-height:var(--button-font-size, 22px);--icon-size:var(--button-font-size, 22px)}:host([size=large]) .container{font-size:var(--button-font-size, 16px);padding:var(--button-padding, 0 20px);height:var(--button-height, 46px);--icon-background-width:var(--button-font-size, 16px);--icon-background-height:var(--button-font-size, 16px);--icon-size:var(--button-font-size, 16px)}:host([size=default]) .container{font-size:var(--button-font-size, 14px);padding:var(--button-padding, 0 20px);height:var(--button-height, 40px);--icon-background-width:var(--button-font-size, 14px);--icon-background-height:var(--button-font-size, 14px);--icon-size:var(--button-font-size, 14px)}:host([size=small]) .container{font-size:var(--button-font-size, 12px);padding:var(--button-padding, 0 10px);height:var(--button-height, 29px);--icon-background-width:var(--button-font-size, 12px);--icon-background-height:var(--button-font-size, 12px);--icon-size:var(--button-font-size, 12px)}:host([type=primary]) .container{background-color:var(--button-background-color, var(--primary));color:var(--button-color, white);border:var(--button-border, 1px solid var(--primary))}:host([type=secondary]) .container{background-color:var(--button-background-color, var(--s-200));color:var(--button-color, var(--secondary));border:var(--button-border, 1px solid var(--s-200))}:host([type=text]) .container{background-color:var(--button-background-color, white);color:var(--button-color, var(--secondary));border:var(--button-border, 1px solid var(--s-300))}:host([disabled]:not([disabled=false])){pointer-events:none}:host([disabled]:not([disabled=false])) .container{background-color:var(--button-background-color, var(--button-disabled-background));color:var(--button-color, var(--button-disabled-text));border:var(--button-border, 1px solid var(--button-disabled-background))}:host([type=text][disabled]:not([disabled=false])) .container{background-color:var(--button-background-color, var(--button-text-background));border:var(--button-border, 1px solid var(--button-text-disabled-border))}:host([block]:not([block=false])){width:100%}:host([block]:not([block=false])) .container{width:100%}:host([loading]:not([loading=false])) .container{pointer-events:none}:host([loading]:not([loading=false])) .loading-icon{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);--icon-color:currentColor}:host([loading]:not([loading=false])) .button-icon,:host([loading]:not([loading=false])) .button-text{opacity:0}";
|
|
384
64
|
|
|
385
65
|
let SasButton = class {
|
|
@@ -1259,6 +939,130 @@ let SasContainer = class {
|
|
|
1259
939
|
};
|
|
1260
940
|
SasContainer.style = sasContainerCss;
|
|
1261
941
|
|
|
942
|
+
const sasDetailsCss = ":host{display:block}:host .container{overflow:hidden}:host .summary-container{display:flex;align-items:baseline;cursor:pointer}:host .title{flex-grow:1}:host sas-icon{transition:0.25s transform ease}:host .hide-icon{width:0;height:0}:host .transform{transform:rotate(180deg)}:host .margin-bottom{margin-bottom:15px}:host([auto-gap=false]) .margin-bottom{margin-bottom:0}";
|
|
943
|
+
|
|
944
|
+
let SasDetails = class {
|
|
945
|
+
constructor(hostRef) {
|
|
946
|
+
index.registerInstance(this, hostRef);
|
|
947
|
+
this.detailsupdate = index.createEvent(this, "detailsupdate", 7);
|
|
948
|
+
/**
|
|
949
|
+
* Open
|
|
950
|
+
*/
|
|
951
|
+
this.open = false;
|
|
952
|
+
/**
|
|
953
|
+
* icon
|
|
954
|
+
*/
|
|
955
|
+
this.icon = 'fas fa-chevron-down';
|
|
956
|
+
/**
|
|
957
|
+
* add gap between summary and content automatically
|
|
958
|
+
*/
|
|
959
|
+
this.autoGap = true;
|
|
960
|
+
this.height = 0;
|
|
961
|
+
this.clickHandler = async () => {
|
|
962
|
+
this.toggleIcon();
|
|
963
|
+
this.toggleContent();
|
|
964
|
+
const isOpen = await this.checkIsOpen();
|
|
965
|
+
this.detailsupdate.emit(isOpen);
|
|
966
|
+
};
|
|
967
|
+
}
|
|
968
|
+
componentDidLoad() {
|
|
969
|
+
let summaryElement = this.el.querySelector('[slot="summary"]');
|
|
970
|
+
summaryElement.tabIndex = 0;
|
|
971
|
+
let contentElement = this.el.querySelector('[slot="content"]');
|
|
972
|
+
this.height = this.getHeight();
|
|
973
|
+
if (!this.open) {
|
|
974
|
+
contentElement.style.height = '0';
|
|
975
|
+
}
|
|
976
|
+
else {
|
|
977
|
+
let container = this.el.shadowRoot.querySelector('.container');
|
|
978
|
+
container.style.overflow = 'visible';
|
|
979
|
+
if (this.hasContent(contentElement)) {
|
|
980
|
+
this.addSummaryMarginBottom();
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
}
|
|
984
|
+
/**
|
|
985
|
+
* Check if content is open or not
|
|
986
|
+
*/
|
|
987
|
+
async checkIsOpen() {
|
|
988
|
+
const icon = this.el.shadowRoot.querySelector('sas-icon');
|
|
989
|
+
return icon.classList.contains('transform');
|
|
990
|
+
}
|
|
991
|
+
getHeight() {
|
|
992
|
+
let contentElement = this.el.querySelector('[slot="content"]');
|
|
993
|
+
return contentElement.getBoundingClientRect().height;
|
|
994
|
+
}
|
|
995
|
+
hasContent(contentElement) {
|
|
996
|
+
if (contentElement && contentElement.innerHTML) {
|
|
997
|
+
return true;
|
|
998
|
+
}
|
|
999
|
+
else {
|
|
1000
|
+
return false;
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
toggleIcon() {
|
|
1004
|
+
let icon = this.el.shadowRoot.querySelector('sas-icon');
|
|
1005
|
+
if (icon !== null) {
|
|
1006
|
+
icon.classList.toggle('transform');
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
async toggleContent() {
|
|
1010
|
+
let container = this.el.shadowRoot.querySelector('.container');
|
|
1011
|
+
let contentElement = this.el.querySelector('[slot="content"]');
|
|
1012
|
+
if (this.hasContent(contentElement)) {
|
|
1013
|
+
const shouldOpen = await this.checkIsOpen();
|
|
1014
|
+
const currentHeight = this.getHeight();
|
|
1015
|
+
this.height = currentHeight > 0 ? currentHeight : this.height;
|
|
1016
|
+
let drawFunction;
|
|
1017
|
+
if (shouldOpen) {
|
|
1018
|
+
drawFunction = (progress) => {
|
|
1019
|
+
contentElement.style.height = `${progress * this.height}px`;
|
|
1020
|
+
};
|
|
1021
|
+
}
|
|
1022
|
+
else {
|
|
1023
|
+
drawFunction = (progress) => {
|
|
1024
|
+
contentElement.style.height = `${(1 - progress) * this.height}px`;
|
|
1025
|
+
};
|
|
1026
|
+
}
|
|
1027
|
+
container.style.overflow = 'hidden';
|
|
1028
|
+
if (shouldOpen) {
|
|
1029
|
+
this.addSummaryMarginBottom();
|
|
1030
|
+
}
|
|
1031
|
+
await global.animate({
|
|
1032
|
+
duration: 250,
|
|
1033
|
+
timing: function (timeFraction) {
|
|
1034
|
+
return timeFraction;
|
|
1035
|
+
},
|
|
1036
|
+
draw: drawFunction,
|
|
1037
|
+
});
|
|
1038
|
+
if (shouldOpen) {
|
|
1039
|
+
contentElement.style.height = 'auto';
|
|
1040
|
+
container.style.overflow = 'visible';
|
|
1041
|
+
}
|
|
1042
|
+
else {
|
|
1043
|
+
this.removeSummaryMarginBottom();
|
|
1044
|
+
container.style.overflow = 'hidden';
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
1048
|
+
addSummaryMarginBottom() {
|
|
1049
|
+
let summaryContainer = this.el.shadowRoot.querySelector('.summary-container');
|
|
1050
|
+
summaryContainer.classList.add('margin-bottom');
|
|
1051
|
+
}
|
|
1052
|
+
removeSummaryMarginBottom() {
|
|
1053
|
+
let summaryContainer = this.el.shadowRoot.querySelector('.summary-container');
|
|
1054
|
+
summaryContainer.classList.remove('margin-bottom');
|
|
1055
|
+
}
|
|
1056
|
+
render() {
|
|
1057
|
+
return (index.h(index.Host, null, index.h("div", { class: "container" }, index.h("div", { class: "summary-container", onClick: this.clickHandler }, index.h("span", { class: "title" }, index.h("slot", { name: "summary" })), index.h("sas-icon", { class: `
|
|
1058
|
+
${this.open ? 'transform' : ''}
|
|
1059
|
+
${Boolean(this.icon) ? '' : 'hide-icon'}
|
|
1060
|
+
`, icon: this.icon })), index.h("slot", { name: "content" }))));
|
|
1061
|
+
}
|
|
1062
|
+
get el() { return index.getElement(this); }
|
|
1063
|
+
};
|
|
1064
|
+
SasDetails.style = sasDetailsCss;
|
|
1065
|
+
|
|
1262
1066
|
const sasDropdownCss = ":host{display:inline-flex}:host .container{display:inline-flex;position:relative}:host .control{cursor:pointer;flex-grow:1;display:flex;align-items:var(--dropdown-control-align-items, center)}:host .list{overflow-y:auto;position:absolute;background-color:white;height:0;z-index:-15;pointer-events:none}:host .hide{display:none}:host .top{bottom:calc(100% + 2px)}:host .bottom{top:calc(100% + 2px)}:host .left{right:0}:host .right{left:0}:host(:focus){outline:none}:host(:focus-within) .list{height:auto;overflow:visible;z-index:15;pointer-events:initial;border:1px solid var(--s-300);border-radius:5px;box-shadow:0px 5px 10px #0000001A}:host([block]:not([block=false])){width:100%}:host([block]:not([block=false])) .container{width:100%}::slotted([slot=control]){--icon-color:var(--s-400);pointer-events:none}";
|
|
1263
1067
|
|
|
1264
1068
|
let SasDropdown = class {
|
|
@@ -5731,7 +5535,6 @@ let SasUpload = class {
|
|
|
5731
5535
|
SasUpload.style = sasUploadCss;
|
|
5732
5536
|
|
|
5733
5537
|
exports.sas_alert = SasAlert;
|
|
5734
|
-
exports.sas_autocomplete = SasAutocomplete;
|
|
5735
5538
|
exports.sas_button = SasButton;
|
|
5736
5539
|
exports.sas_card = SasCard;
|
|
5737
5540
|
exports.sas_checkbox = SasCheckbox;
|
|
@@ -5739,6 +5542,7 @@ exports.sas_checkbox_group = SasCheckboxGroup;
|
|
|
5739
5542
|
exports.sas_checkbox_subgroup = SasCheckboxSubgroup;
|
|
5740
5543
|
exports.sas_chip = SasChip;
|
|
5741
5544
|
exports.sas_container = SasContainer;
|
|
5545
|
+
exports.sas_details = SasDetails;
|
|
5742
5546
|
exports.sas_dropdown = SasDropdown;
|
|
5743
5547
|
exports.sas_form_input_template = SasFormInputTemplate;
|
|
5744
5548
|
exports.sas_icon = SasIcon;
|