@dooboostore/simple-web-component 1.0.5 → 1.0.7
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/README.md +151 -58
- package/dist/cjs/decorators/addEventListener.js +3 -2
- package/dist/cjs/decorators/addEventListener.js.map +2 -2
- package/dist/cjs/decorators/attribute.js +79 -0
- package/dist/cjs/decorators/attribute.js.map +7 -0
- package/dist/cjs/decorators/elementDefine.js +261 -106
- package/dist/cjs/decorators/elementDefine.js.map +2 -2
- package/dist/cjs/decorators/emitCustomEvent.js +60 -0
- package/dist/cjs/decorators/emitCustomEvent.js.map +7 -0
- package/dist/cjs/decorators/lifecycles.js +38 -0
- package/dist/cjs/decorators/lifecycles.js.map +2 -2
- package/dist/cjs/decorators/query.js +27 -5
- package/dist/cjs/decorators/query.js.map +2 -2
- package/dist/cjs/decorators/queryAll.js +27 -5
- package/dist/cjs/decorators/queryAll.js.map +2 -2
- package/dist/cjs/decorators/state.js +50 -0
- package/dist/cjs/decorators/state.js.map +7 -0
- package/dist/cjs/elements/SwcChoose.js.map +2 -2
- package/dist/cjs/elements/SwcForOf.js +3 -1
- package/dist/cjs/elements/SwcForOf.js.map +2 -2
- package/dist/cjs/elements/SwcObject.js +8 -6
- package/dist/cjs/elements/SwcObject.js.map +2 -2
- package/dist/cjs/index.js +6 -7
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/is/SwcChooseAnchor.js.map +2 -2
- package/dist/cjs/is/SwcChooseArea.js.map +2 -2
- package/dist/cjs/is/SwcChooseAudio.js.map +2 -2
- package/dist/cjs/is/SwcChooseBase.js.map +2 -2
- package/dist/cjs/is/SwcChooseButton.js.map +2 -2
- package/dist/cjs/is/SwcChooseCanvas.js.map +2 -2
- package/dist/cjs/is/SwcChooseData.js.map +2 -2
- package/dist/cjs/is/SwcChooseDataList.js.map +2 -2
- package/dist/cjs/is/SwcChooseDetails.js.map +2 -2
- package/dist/cjs/is/SwcChooseDialog.js.map +2 -2
- package/dist/cjs/is/SwcChooseDiv.js.map +2 -2
- package/dist/cjs/is/SwcChooseDl.js.map +2 -2
- package/dist/cjs/is/SwcChooseEmbed.js.map +2 -2
- package/dist/cjs/is/SwcChooseFieldSet.js.map +2 -2
- package/dist/cjs/is/SwcChooseForm.js.map +2 -2
- package/dist/cjs/is/SwcChooseHeading.js.map +2 -2
- package/dist/cjs/is/SwcChooseHr.js.map +2 -2
- package/dist/cjs/is/SwcChooseIFrame.js.map +2 -2
- package/dist/cjs/is/SwcChooseImage.js.map +2 -2
- package/dist/cjs/is/SwcChooseInput.js.map +2 -2
- package/dist/cjs/is/SwcChooseLabel.js.map +2 -2
- package/dist/cjs/is/SwcChooseLegend.js.map +2 -2
- package/dist/cjs/is/SwcChooseLi.js.map +2 -2
- package/dist/cjs/is/SwcChooseLink.js.map +2 -2
- package/dist/cjs/is/SwcChooseMap.js.map +2 -2
- package/dist/cjs/is/SwcChooseMeta.js.map +2 -2
- package/dist/cjs/is/SwcChooseMeter.js.map +2 -2
- package/dist/cjs/is/SwcChooseMod.js.map +2 -2
- package/dist/cjs/is/SwcChooseObject.js.map +2 -2
- package/dist/cjs/is/SwcChooseOl.js.map +2 -2
- package/dist/cjs/is/SwcChooseOptGroup.js.map +2 -2
- package/dist/cjs/is/SwcChooseOption.js.map +2 -2
- package/dist/cjs/is/SwcChooseOutput.js.map +2 -2
- package/dist/cjs/is/SwcChooseParagraph.js.map +2 -2
- package/dist/cjs/is/SwcChooseParam.js.map +2 -2
- package/dist/cjs/is/SwcChoosePicture.js.map +2 -2
- package/dist/cjs/is/SwcChoosePre.js.map +2 -2
- package/dist/cjs/is/SwcChooseProgress.js.map +2 -2
- package/dist/cjs/is/SwcChooseQuote.js.map +2 -2
- package/dist/cjs/is/SwcChooseScript.js.map +2 -2
- package/dist/cjs/is/SwcChooseSelect.js.map +2 -2
- package/dist/cjs/is/SwcChooseSlot.js.map +2 -2
- package/dist/cjs/is/SwcChooseSource.js.map +2 -2
- package/dist/cjs/is/SwcChooseSpan.js.map +2 -2
- package/dist/cjs/is/SwcChooseStyle.js.map +2 -2
- package/dist/cjs/is/SwcChooseTable.js.map +2 -2
- package/dist/cjs/is/SwcChooseTableCell.js.map +2 -2
- package/dist/cjs/is/SwcChooseTableRow.js.map +2 -2
- package/dist/cjs/is/SwcChooseTableSection.js.map +2 -2
- package/dist/cjs/is/SwcChooseTemplate.js.map +2 -2
- package/dist/cjs/is/SwcChooseTextArea.js.map +2 -2
- package/dist/cjs/is/SwcChooseTime.js.map +2 -2
- package/dist/cjs/is/SwcChooseTitle.js.map +2 -2
- package/dist/cjs/is/SwcChooseTrack.js.map +2 -2
- package/dist/cjs/is/SwcChooseUl.js.map +2 -2
- package/dist/cjs/is/SwcChooseVideo.js.map +2 -2
- package/dist/cjs/is/SwcIfAnchor.js.map +2 -2
- package/dist/cjs/is/SwcIfArea.js.map +2 -2
- package/dist/cjs/is/SwcIfAudio.js.map +2 -2
- package/dist/cjs/is/SwcIfBase.js.map +2 -2
- package/dist/cjs/is/SwcIfButton.js.map +2 -2
- package/dist/cjs/is/SwcIfCanvas.js.map +2 -2
- package/dist/cjs/is/SwcIfData.js.map +2 -2
- package/dist/cjs/is/SwcIfDataList.js.map +2 -2
- package/dist/cjs/is/SwcIfDetails.js.map +2 -2
- package/dist/cjs/is/SwcIfDialog.js.map +2 -2
- package/dist/cjs/is/SwcIfDiv.js.map +2 -2
- package/dist/cjs/is/SwcIfDl.js.map +2 -2
- package/dist/cjs/is/SwcIfEmbed.js.map +2 -2
- package/dist/cjs/is/SwcIfFieldSet.js.map +2 -2
- package/dist/cjs/is/SwcIfForm.js.map +2 -2
- package/dist/cjs/is/SwcIfHeading.js.map +2 -2
- package/dist/cjs/is/SwcIfHr.js.map +2 -2
- package/dist/cjs/is/SwcIfIFrame.js.map +2 -2
- package/dist/cjs/is/SwcIfImage.js.map +2 -2
- package/dist/cjs/is/SwcIfInput.js.map +2 -2
- package/dist/cjs/is/SwcIfLabel.js.map +2 -2
- package/dist/cjs/is/SwcIfLegend.js.map +2 -2
- package/dist/cjs/is/SwcIfLi.js.map +2 -2
- package/dist/cjs/is/SwcIfLink.js.map +2 -2
- package/dist/cjs/is/SwcIfMap.js.map +2 -2
- package/dist/cjs/is/SwcIfMeta.js.map +2 -2
- package/dist/cjs/is/SwcIfMeter.js.map +2 -2
- package/dist/cjs/is/SwcIfMod.js.map +2 -2
- package/dist/cjs/is/SwcIfObject.js.map +2 -2
- package/dist/cjs/is/SwcIfOl.js.map +2 -2
- package/dist/cjs/is/SwcIfOptGroup.js.map +2 -2
- package/dist/cjs/is/SwcIfOption.js.map +2 -2
- package/dist/cjs/is/SwcIfOutput.js.map +2 -2
- package/dist/cjs/is/SwcIfParagraph.js.map +2 -2
- package/dist/cjs/is/SwcIfParam.js.map +2 -2
- package/dist/cjs/is/SwcIfPicture.js.map +2 -2
- package/dist/cjs/is/SwcIfPre.js.map +2 -2
- package/dist/cjs/is/SwcIfProgress.js.map +2 -2
- package/dist/cjs/is/SwcIfQuote.js.map +2 -2
- package/dist/cjs/is/SwcIfScript.js.map +2 -2
- package/dist/cjs/is/SwcIfSelect.js.map +2 -2
- package/dist/cjs/is/SwcIfSlot.js.map +2 -2
- package/dist/cjs/is/SwcIfSource.js.map +2 -2
- package/dist/cjs/is/SwcIfSpan.js.map +2 -2
- package/dist/cjs/is/SwcIfStyle.js.map +2 -2
- package/dist/cjs/is/SwcIfTable.js.map +2 -2
- package/dist/cjs/is/SwcIfTableCell.js.map +2 -2
- package/dist/cjs/is/SwcIfTableRow.js.map +2 -2
- package/dist/cjs/is/SwcIfTableSection.js.map +2 -2
- package/dist/cjs/is/SwcIfTemplate.js.map +2 -2
- package/dist/cjs/is/SwcIfTextArea.js.map +2 -2
- package/dist/cjs/is/SwcIfTime.js.map +2 -2
- package/dist/cjs/is/SwcIfTitle.js.map +2 -2
- package/dist/cjs/is/SwcIfTrack.js.map +2 -2
- package/dist/cjs/is/SwcIfUl.js.map +2 -2
- package/dist/cjs/is/SwcIfVideo.js.map +2 -2
- package/dist/cjs/is/SwcOtherAnchor.js.map +2 -2
- package/dist/cjs/is/SwcOtherArea.js.map +2 -2
- package/dist/cjs/is/SwcOtherAudio.js.map +2 -2
- package/dist/cjs/is/SwcOtherBase.js.map +2 -2
- package/dist/cjs/is/SwcOtherButton.js.map +2 -2
- package/dist/cjs/is/SwcOtherCanvas.js.map +2 -2
- package/dist/cjs/is/SwcOtherData.js.map +2 -2
- package/dist/cjs/is/SwcOtherDataList.js.map +2 -2
- package/dist/cjs/is/SwcOtherDetails.js.map +2 -2
- package/dist/cjs/is/SwcOtherDialog.js.map +2 -2
- package/dist/cjs/is/SwcOtherDiv.js.map +2 -2
- package/dist/cjs/is/SwcOtherDl.js.map +2 -2
- package/dist/cjs/is/SwcOtherEmbed.js.map +2 -2
- package/dist/cjs/is/SwcOtherFieldSet.js.map +2 -2
- package/dist/cjs/is/SwcOtherForm.js.map +2 -2
- package/dist/cjs/is/SwcOtherHeading.js.map +2 -2
- package/dist/cjs/is/SwcOtherHr.js.map +2 -2
- package/dist/cjs/is/SwcOtherIFrame.js.map +2 -2
- package/dist/cjs/is/SwcOtherImage.js.map +2 -2
- package/dist/cjs/is/SwcOtherInput.js.map +2 -2
- package/dist/cjs/is/SwcOtherLabel.js.map +2 -2
- package/dist/cjs/is/SwcOtherLegend.js.map +2 -2
- package/dist/cjs/is/SwcOtherLi.js.map +2 -2
- package/dist/cjs/is/SwcOtherLink.js.map +2 -2
- package/dist/cjs/is/SwcOtherMap.js.map +2 -2
- package/dist/cjs/is/SwcOtherMeta.js.map +2 -2
- package/dist/cjs/is/SwcOtherMeter.js.map +2 -2
- package/dist/cjs/is/SwcOtherMod.js.map +2 -2
- package/dist/cjs/is/SwcOtherObject.js.map +2 -2
- package/dist/cjs/is/SwcOtherOl.js.map +2 -2
- package/dist/cjs/is/SwcOtherOptGroup.js.map +2 -2
- package/dist/cjs/is/SwcOtherOption.js.map +2 -2
- package/dist/cjs/is/SwcOtherOutput.js.map +2 -2
- package/dist/cjs/is/SwcOtherParagraph.js.map +2 -2
- package/dist/cjs/is/SwcOtherParam.js.map +2 -2
- package/dist/cjs/is/SwcOtherPicture.js.map +2 -2
- package/dist/cjs/is/SwcOtherPre.js.map +2 -2
- package/dist/cjs/is/SwcOtherProgress.js.map +2 -2
- package/dist/cjs/is/SwcOtherQuote.js.map +2 -2
- package/dist/cjs/is/SwcOtherScript.js.map +2 -2
- package/dist/cjs/is/SwcOtherSelect.js.map +2 -2
- package/dist/cjs/is/SwcOtherSlot.js.map +2 -2
- package/dist/cjs/is/SwcOtherSource.js.map +2 -2
- package/dist/cjs/is/SwcOtherSpan.js.map +2 -2
- package/dist/cjs/is/SwcOtherStyle.js.map +2 -2
- package/dist/cjs/is/SwcOtherTable.js.map +2 -2
- package/dist/cjs/is/SwcOtherTableCell.js.map +2 -2
- package/dist/cjs/is/SwcOtherTableRow.js.map +2 -2
- package/dist/cjs/is/SwcOtherTableSection.js.map +2 -2
- package/dist/cjs/is/SwcOtherTemplate.js.map +2 -2
- package/dist/cjs/is/SwcOtherTextArea.js.map +2 -2
- package/dist/cjs/is/SwcOtherTime.js.map +2 -2
- package/dist/cjs/is/SwcOtherTitle.js.map +2 -2
- package/dist/cjs/is/SwcOtherTrack.js.map +2 -2
- package/dist/cjs/is/SwcOtherUl.js.map +2 -2
- package/dist/cjs/is/SwcOtherVideo.js.map +2 -2
- package/dist/cjs/is/SwcWhenAnchor.js.map +2 -2
- package/dist/cjs/is/SwcWhenArea.js.map +2 -2
- package/dist/cjs/is/SwcWhenAudio.js.map +2 -2
- package/dist/cjs/is/SwcWhenBase.js.map +2 -2
- package/dist/cjs/is/SwcWhenButton.js.map +2 -2
- package/dist/cjs/is/SwcWhenCanvas.js.map +2 -2
- package/dist/cjs/is/SwcWhenData.js.map +2 -2
- package/dist/cjs/is/SwcWhenDataList.js.map +2 -2
- package/dist/cjs/is/SwcWhenDetails.js.map +2 -2
- package/dist/cjs/is/SwcWhenDialog.js.map +2 -2
- package/dist/cjs/is/SwcWhenDiv.js.map +2 -2
- package/dist/cjs/is/SwcWhenDl.js.map +2 -2
- package/dist/cjs/is/SwcWhenEmbed.js.map +2 -2
- package/dist/cjs/is/SwcWhenFieldSet.js.map +2 -2
- package/dist/cjs/is/SwcWhenForm.js.map +2 -2
- package/dist/cjs/is/SwcWhenHeading.js.map +2 -2
- package/dist/cjs/is/SwcWhenHr.js.map +2 -2
- package/dist/cjs/is/SwcWhenIFrame.js.map +2 -2
- package/dist/cjs/is/SwcWhenImage.js.map +2 -2
- package/dist/cjs/is/SwcWhenInput.js.map +2 -2
- package/dist/cjs/is/SwcWhenLabel.js.map +2 -2
- package/dist/cjs/is/SwcWhenLegend.js.map +2 -2
- package/dist/cjs/is/SwcWhenLi.js.map +2 -2
- package/dist/cjs/is/SwcWhenLink.js.map +2 -2
- package/dist/cjs/is/SwcWhenMap.js.map +2 -2
- package/dist/cjs/is/SwcWhenMeta.js.map +2 -2
- package/dist/cjs/is/SwcWhenMeter.js.map +2 -2
- package/dist/cjs/is/SwcWhenMod.js.map +2 -2
- package/dist/cjs/is/SwcWhenObject.js.map +2 -2
- package/dist/cjs/is/SwcWhenOl.js.map +2 -2
- package/dist/cjs/is/SwcWhenOptGroup.js.map +2 -2
- package/dist/cjs/is/SwcWhenOption.js.map +2 -2
- package/dist/cjs/is/SwcWhenOutput.js.map +2 -2
- package/dist/cjs/is/SwcWhenParagraph.js.map +2 -2
- package/dist/cjs/is/SwcWhenParam.js.map +2 -2
- package/dist/cjs/is/SwcWhenPicture.js.map +2 -2
- package/dist/cjs/is/SwcWhenPre.js.map +2 -2
- package/dist/cjs/is/SwcWhenProgress.js.map +2 -2
- package/dist/cjs/is/SwcWhenQuote.js.map +2 -2
- package/dist/cjs/is/SwcWhenScript.js.map +2 -2
- package/dist/cjs/is/SwcWhenSelect.js.map +2 -2
- package/dist/cjs/is/SwcWhenSlot.js.map +2 -2
- package/dist/cjs/is/SwcWhenSource.js.map +2 -2
- package/dist/cjs/is/SwcWhenSpan.js.map +2 -2
- package/dist/cjs/is/SwcWhenStyle.js.map +2 -2
- package/dist/cjs/is/SwcWhenTable.js.map +2 -2
- package/dist/cjs/is/SwcWhenTableCell.js.map +2 -2
- package/dist/cjs/is/SwcWhenTableRow.js.map +2 -2
- package/dist/cjs/is/SwcWhenTableSection.js.map +2 -2
- package/dist/cjs/is/SwcWhenTemplate.js.map +2 -2
- package/dist/cjs/is/SwcWhenTextArea.js.map +2 -2
- package/dist/cjs/is/SwcWhenTime.js.map +2 -2
- package/dist/cjs/is/SwcWhenTitle.js.map +2 -2
- package/dist/cjs/is/SwcWhenTrack.js.map +2 -2
- package/dist/cjs/is/SwcWhenUl.js.map +2 -2
- package/dist/cjs/is/SwcWhenVideo.js.map +2 -2
- package/dist/cjs/utils/Utils.js +49 -17
- package/dist/cjs/utils/Utils.js.map +2 -2
- package/dist/esm/decorators/addEventListener.js +3 -2
- package/dist/esm/decorators/addEventListener.js.map +2 -2
- package/dist/esm/decorators/attribute.js +60 -0
- package/dist/esm/decorators/attribute.js.map +7 -0
- package/dist/esm/decorators/elementDefine.js +262 -107
- package/dist/esm/decorators/elementDefine.js.map +2 -2
- package/dist/esm/decorators/emitCustomEvent.js +41 -0
- package/dist/esm/decorators/emitCustomEvent.js.map +7 -0
- package/dist/esm/decorators/lifecycles.js +38 -0
- package/dist/esm/decorators/lifecycles.js.map +2 -2
- package/dist/esm/decorators/query.js +27 -5
- package/dist/esm/decorators/query.js.map +2 -2
- package/dist/esm/decorators/queryAll.js +27 -5
- package/dist/esm/decorators/queryAll.js.map +2 -2
- package/dist/esm/decorators/state.js +31 -0
- package/dist/esm/decorators/state.js.map +7 -0
- package/dist/esm/elements/SwcChoose.js.map +2 -2
- package/dist/esm/elements/SwcForOf.js +3 -1
- package/dist/esm/elements/SwcForOf.js.map +2 -2
- package/dist/esm/elements/SwcObject.js +8 -6
- package/dist/esm/elements/SwcObject.js.map +2 -2
- package/dist/esm/index.js +6 -7
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/is/SwcChooseAnchor.js.map +2 -2
- package/dist/esm/is/SwcChooseArea.js.map +2 -2
- package/dist/esm/is/SwcChooseAudio.js.map +2 -2
- package/dist/esm/is/SwcChooseBase.js.map +2 -2
- package/dist/esm/is/SwcChooseButton.js.map +2 -2
- package/dist/esm/is/SwcChooseCanvas.js.map +2 -2
- package/dist/esm/is/SwcChooseData.js.map +2 -2
- package/dist/esm/is/SwcChooseDataList.js.map +2 -2
- package/dist/esm/is/SwcChooseDetails.js.map +2 -2
- package/dist/esm/is/SwcChooseDialog.js.map +2 -2
- package/dist/esm/is/SwcChooseDiv.js.map +2 -2
- package/dist/esm/is/SwcChooseDl.js.map +2 -2
- package/dist/esm/is/SwcChooseEmbed.js.map +2 -2
- package/dist/esm/is/SwcChooseFieldSet.js.map +2 -2
- package/dist/esm/is/SwcChooseForm.js.map +2 -2
- package/dist/esm/is/SwcChooseHeading.js.map +2 -2
- package/dist/esm/is/SwcChooseHr.js.map +2 -2
- package/dist/esm/is/SwcChooseIFrame.js.map +2 -2
- package/dist/esm/is/SwcChooseImage.js.map +2 -2
- package/dist/esm/is/SwcChooseInput.js.map +2 -2
- package/dist/esm/is/SwcChooseLabel.js.map +2 -2
- package/dist/esm/is/SwcChooseLegend.js.map +2 -2
- package/dist/esm/is/SwcChooseLi.js.map +2 -2
- package/dist/esm/is/SwcChooseLink.js.map +2 -2
- package/dist/esm/is/SwcChooseMap.js.map +2 -2
- package/dist/esm/is/SwcChooseMeta.js.map +2 -2
- package/dist/esm/is/SwcChooseMeter.js.map +2 -2
- package/dist/esm/is/SwcChooseMod.js.map +2 -2
- package/dist/esm/is/SwcChooseObject.js.map +2 -2
- package/dist/esm/is/SwcChooseOl.js.map +2 -2
- package/dist/esm/is/SwcChooseOptGroup.js.map +2 -2
- package/dist/esm/is/SwcChooseOption.js.map +2 -2
- package/dist/esm/is/SwcChooseOutput.js.map +2 -2
- package/dist/esm/is/SwcChooseParagraph.js.map +2 -2
- package/dist/esm/is/SwcChooseParam.js.map +2 -2
- package/dist/esm/is/SwcChoosePicture.js.map +2 -2
- package/dist/esm/is/SwcChoosePre.js.map +2 -2
- package/dist/esm/is/SwcChooseProgress.js.map +2 -2
- package/dist/esm/is/SwcChooseQuote.js.map +2 -2
- package/dist/esm/is/SwcChooseScript.js.map +2 -2
- package/dist/esm/is/SwcChooseSelect.js.map +2 -2
- package/dist/esm/is/SwcChooseSlot.js.map +2 -2
- package/dist/esm/is/SwcChooseSource.js.map +2 -2
- package/dist/esm/is/SwcChooseSpan.js.map +2 -2
- package/dist/esm/is/SwcChooseStyle.js.map +2 -2
- package/dist/esm/is/SwcChooseTable.js.map +2 -2
- package/dist/esm/is/SwcChooseTableCell.js.map +2 -2
- package/dist/esm/is/SwcChooseTableRow.js.map +2 -2
- package/dist/esm/is/SwcChooseTableSection.js.map +2 -2
- package/dist/esm/is/SwcChooseTemplate.js.map +2 -2
- package/dist/esm/is/SwcChooseTextArea.js.map +2 -2
- package/dist/esm/is/SwcChooseTime.js.map +2 -2
- package/dist/esm/is/SwcChooseTitle.js.map +2 -2
- package/dist/esm/is/SwcChooseTrack.js.map +2 -2
- package/dist/esm/is/SwcChooseUl.js.map +2 -2
- package/dist/esm/is/SwcChooseVideo.js.map +2 -2
- package/dist/esm/is/SwcIfAnchor.js.map +2 -2
- package/dist/esm/is/SwcIfArea.js.map +2 -2
- package/dist/esm/is/SwcIfAudio.js.map +2 -2
- package/dist/esm/is/SwcIfBase.js.map +2 -2
- package/dist/esm/is/SwcIfButton.js.map +2 -2
- package/dist/esm/is/SwcIfCanvas.js.map +2 -2
- package/dist/esm/is/SwcIfData.js.map +2 -2
- package/dist/esm/is/SwcIfDataList.js.map +2 -2
- package/dist/esm/is/SwcIfDetails.js.map +2 -2
- package/dist/esm/is/SwcIfDialog.js.map +2 -2
- package/dist/esm/is/SwcIfDiv.js.map +2 -2
- package/dist/esm/is/SwcIfDl.js.map +2 -2
- package/dist/esm/is/SwcIfEmbed.js.map +2 -2
- package/dist/esm/is/SwcIfFieldSet.js.map +2 -2
- package/dist/esm/is/SwcIfForm.js.map +2 -2
- package/dist/esm/is/SwcIfHeading.js.map +2 -2
- package/dist/esm/is/SwcIfHr.js.map +2 -2
- package/dist/esm/is/SwcIfIFrame.js.map +2 -2
- package/dist/esm/is/SwcIfImage.js.map +2 -2
- package/dist/esm/is/SwcIfInput.js.map +2 -2
- package/dist/esm/is/SwcIfLabel.js.map +2 -2
- package/dist/esm/is/SwcIfLegend.js.map +2 -2
- package/dist/esm/is/SwcIfLi.js.map +2 -2
- package/dist/esm/is/SwcIfLink.js.map +2 -2
- package/dist/esm/is/SwcIfMap.js.map +2 -2
- package/dist/esm/is/SwcIfMeta.js.map +2 -2
- package/dist/esm/is/SwcIfMeter.js.map +2 -2
- package/dist/esm/is/SwcIfMod.js.map +2 -2
- package/dist/esm/is/SwcIfObject.js.map +2 -2
- package/dist/esm/is/SwcIfOl.js.map +2 -2
- package/dist/esm/is/SwcIfOptGroup.js.map +2 -2
- package/dist/esm/is/SwcIfOption.js.map +2 -2
- package/dist/esm/is/SwcIfOutput.js.map +2 -2
- package/dist/esm/is/SwcIfParagraph.js.map +2 -2
- package/dist/esm/is/SwcIfParam.js.map +2 -2
- package/dist/esm/is/SwcIfPicture.js.map +2 -2
- package/dist/esm/is/SwcIfPre.js.map +2 -2
- package/dist/esm/is/SwcIfProgress.js.map +2 -2
- package/dist/esm/is/SwcIfQuote.js.map +2 -2
- package/dist/esm/is/SwcIfScript.js.map +2 -2
- package/dist/esm/is/SwcIfSelect.js.map +2 -2
- package/dist/esm/is/SwcIfSlot.js.map +2 -2
- package/dist/esm/is/SwcIfSource.js.map +2 -2
- package/dist/esm/is/SwcIfSpan.js.map +2 -2
- package/dist/esm/is/SwcIfStyle.js.map +2 -2
- package/dist/esm/is/SwcIfTable.js.map +2 -2
- package/dist/esm/is/SwcIfTableCell.js.map +2 -2
- package/dist/esm/is/SwcIfTableRow.js.map +2 -2
- package/dist/esm/is/SwcIfTableSection.js.map +2 -2
- package/dist/esm/is/SwcIfTemplate.js.map +2 -2
- package/dist/esm/is/SwcIfTextArea.js.map +2 -2
- package/dist/esm/is/SwcIfTime.js.map +2 -2
- package/dist/esm/is/SwcIfTitle.js.map +2 -2
- package/dist/esm/is/SwcIfTrack.js.map +2 -2
- package/dist/esm/is/SwcIfUl.js.map +2 -2
- package/dist/esm/is/SwcIfVideo.js.map +2 -2
- package/dist/esm/is/SwcOtherAnchor.js.map +2 -2
- package/dist/esm/is/SwcOtherArea.js.map +2 -2
- package/dist/esm/is/SwcOtherAudio.js.map +2 -2
- package/dist/esm/is/SwcOtherBase.js.map +2 -2
- package/dist/esm/is/SwcOtherButton.js.map +2 -2
- package/dist/esm/is/SwcOtherCanvas.js.map +2 -2
- package/dist/esm/is/SwcOtherData.js.map +2 -2
- package/dist/esm/is/SwcOtherDataList.js.map +2 -2
- package/dist/esm/is/SwcOtherDetails.js.map +2 -2
- package/dist/esm/is/SwcOtherDialog.js.map +2 -2
- package/dist/esm/is/SwcOtherDiv.js.map +2 -2
- package/dist/esm/is/SwcOtherDl.js.map +2 -2
- package/dist/esm/is/SwcOtherEmbed.js.map +2 -2
- package/dist/esm/is/SwcOtherFieldSet.js.map +2 -2
- package/dist/esm/is/SwcOtherForm.js.map +2 -2
- package/dist/esm/is/SwcOtherHeading.js.map +2 -2
- package/dist/esm/is/SwcOtherHr.js.map +2 -2
- package/dist/esm/is/SwcOtherIFrame.js.map +2 -2
- package/dist/esm/is/SwcOtherImage.js.map +2 -2
- package/dist/esm/is/SwcOtherInput.js.map +2 -2
- package/dist/esm/is/SwcOtherLabel.js.map +2 -2
- package/dist/esm/is/SwcOtherLegend.js.map +2 -2
- package/dist/esm/is/SwcOtherLi.js.map +2 -2
- package/dist/esm/is/SwcOtherLink.js.map +2 -2
- package/dist/esm/is/SwcOtherMap.js.map +2 -2
- package/dist/esm/is/SwcOtherMeta.js.map +2 -2
- package/dist/esm/is/SwcOtherMeter.js.map +2 -2
- package/dist/esm/is/SwcOtherMod.js.map +2 -2
- package/dist/esm/is/SwcOtherObject.js.map +2 -2
- package/dist/esm/is/SwcOtherOl.js.map +2 -2
- package/dist/esm/is/SwcOtherOptGroup.js.map +2 -2
- package/dist/esm/is/SwcOtherOption.js.map +2 -2
- package/dist/esm/is/SwcOtherOutput.js.map +2 -2
- package/dist/esm/is/SwcOtherParagraph.js.map +2 -2
- package/dist/esm/is/SwcOtherParam.js.map +2 -2
- package/dist/esm/is/SwcOtherPicture.js.map +2 -2
- package/dist/esm/is/SwcOtherPre.js.map +2 -2
- package/dist/esm/is/SwcOtherProgress.js.map +2 -2
- package/dist/esm/is/SwcOtherQuote.js.map +2 -2
- package/dist/esm/is/SwcOtherScript.js.map +2 -2
- package/dist/esm/is/SwcOtherSelect.js.map +2 -2
- package/dist/esm/is/SwcOtherSlot.js.map +2 -2
- package/dist/esm/is/SwcOtherSource.js.map +2 -2
- package/dist/esm/is/SwcOtherSpan.js.map +2 -2
- package/dist/esm/is/SwcOtherStyle.js.map +2 -2
- package/dist/esm/is/SwcOtherTable.js.map +2 -2
- package/dist/esm/is/SwcOtherTableCell.js.map +2 -2
- package/dist/esm/is/SwcOtherTableRow.js.map +2 -2
- package/dist/esm/is/SwcOtherTableSection.js.map +2 -2
- package/dist/esm/is/SwcOtherTemplate.js.map +2 -2
- package/dist/esm/is/SwcOtherTextArea.js.map +2 -2
- package/dist/esm/is/SwcOtherTime.js.map +2 -2
- package/dist/esm/is/SwcOtherTitle.js.map +2 -2
- package/dist/esm/is/SwcOtherTrack.js.map +2 -2
- package/dist/esm/is/SwcOtherUl.js.map +2 -2
- package/dist/esm/is/SwcOtherVideo.js.map +2 -2
- package/dist/esm/is/SwcWhenAnchor.js.map +2 -2
- package/dist/esm/is/SwcWhenArea.js.map +2 -2
- package/dist/esm/is/SwcWhenAudio.js.map +2 -2
- package/dist/esm/is/SwcWhenBase.js.map +2 -2
- package/dist/esm/is/SwcWhenButton.js.map +2 -2
- package/dist/esm/is/SwcWhenCanvas.js.map +2 -2
- package/dist/esm/is/SwcWhenData.js.map +2 -2
- package/dist/esm/is/SwcWhenDataList.js.map +2 -2
- package/dist/esm/is/SwcWhenDetails.js.map +2 -2
- package/dist/esm/is/SwcWhenDialog.js.map +2 -2
- package/dist/esm/is/SwcWhenDiv.js.map +2 -2
- package/dist/esm/is/SwcWhenDl.js.map +2 -2
- package/dist/esm/is/SwcWhenEmbed.js.map +2 -2
- package/dist/esm/is/SwcWhenFieldSet.js.map +2 -2
- package/dist/esm/is/SwcWhenForm.js.map +2 -2
- package/dist/esm/is/SwcWhenHeading.js.map +2 -2
- package/dist/esm/is/SwcWhenHr.js.map +2 -2
- package/dist/esm/is/SwcWhenIFrame.js.map +2 -2
- package/dist/esm/is/SwcWhenImage.js.map +2 -2
- package/dist/esm/is/SwcWhenInput.js.map +2 -2
- package/dist/esm/is/SwcWhenLabel.js.map +2 -2
- package/dist/esm/is/SwcWhenLegend.js.map +2 -2
- package/dist/esm/is/SwcWhenLi.js.map +2 -2
- package/dist/esm/is/SwcWhenLink.js.map +2 -2
- package/dist/esm/is/SwcWhenMap.js.map +2 -2
- package/dist/esm/is/SwcWhenMeta.js.map +2 -2
- package/dist/esm/is/SwcWhenMeter.js.map +2 -2
- package/dist/esm/is/SwcWhenMod.js.map +2 -2
- package/dist/esm/is/SwcWhenObject.js.map +2 -2
- package/dist/esm/is/SwcWhenOl.js.map +2 -2
- package/dist/esm/is/SwcWhenOptGroup.js.map +2 -2
- package/dist/esm/is/SwcWhenOption.js.map +2 -2
- package/dist/esm/is/SwcWhenOutput.js.map +2 -2
- package/dist/esm/is/SwcWhenParagraph.js.map +2 -2
- package/dist/esm/is/SwcWhenParam.js.map +2 -2
- package/dist/esm/is/SwcWhenPicture.js.map +2 -2
- package/dist/esm/is/SwcWhenPre.js.map +2 -2
- package/dist/esm/is/SwcWhenProgress.js.map +2 -2
- package/dist/esm/is/SwcWhenQuote.js.map +2 -2
- package/dist/esm/is/SwcWhenScript.js.map +2 -2
- package/dist/esm/is/SwcWhenSelect.js.map +2 -2
- package/dist/esm/is/SwcWhenSlot.js.map +2 -2
- package/dist/esm/is/SwcWhenSource.js.map +2 -2
- package/dist/esm/is/SwcWhenSpan.js.map +2 -2
- package/dist/esm/is/SwcWhenStyle.js.map +2 -2
- package/dist/esm/is/SwcWhenTable.js.map +2 -2
- package/dist/esm/is/SwcWhenTableCell.js.map +2 -2
- package/dist/esm/is/SwcWhenTableRow.js.map +2 -2
- package/dist/esm/is/SwcWhenTableSection.js.map +2 -2
- package/dist/esm/is/SwcWhenTemplate.js.map +2 -2
- package/dist/esm/is/SwcWhenTextArea.js.map +2 -2
- package/dist/esm/is/SwcWhenTime.js.map +2 -2
- package/dist/esm/is/SwcWhenTitle.js.map +2 -2
- package/dist/esm/is/SwcWhenTrack.js.map +2 -2
- package/dist/esm/is/SwcWhenUl.js.map +2 -2
- package/dist/esm/is/SwcWhenVideo.js.map +2 -2
- package/dist/esm/utils/Utils.js +49 -17
- package/dist/esm/utils/Utils.js.map +2 -2
- package/dist/esm-bundle/dooboostore-simple-web-component.esm.js +2344 -2136
- package/dist/esm-bundle/dooboostore-simple-web-component.esm.js.map +4 -4
- package/dist/types/decorators/addEventListener.d.ts +8 -4
- package/dist/types/decorators/addEventListener.d.ts.map +1 -1
- package/dist/types/decorators/attribute.d.ts +13 -0
- package/dist/types/decorators/attribute.d.ts.map +1 -0
- package/dist/types/decorators/elementDefine.d.ts +2 -0
- package/dist/types/decorators/elementDefine.d.ts.map +1 -1
- package/dist/types/decorators/emitCustomEvent.d.ts +15 -0
- package/dist/types/decorators/emitCustomEvent.d.ts.map +1 -0
- package/dist/types/decorators/lifecycles.d.ts +7 -1
- package/dist/types/decorators/lifecycles.d.ts.map +1 -1
- package/dist/types/decorators/query.d.ts +5 -2
- package/dist/types/decorators/query.d.ts.map +1 -1
- package/dist/types/decorators/queryAll.d.ts +5 -2
- package/dist/types/decorators/queryAll.d.ts.map +1 -1
- package/dist/types/decorators/state.d.ts +12 -0
- package/dist/types/decorators/state.d.ts.map +1 -0
- package/dist/types/elements/SwcChoose.d.ts.map +1 -1
- package/dist/types/elements/SwcForOf.d.ts.map +1 -1
- package/dist/types/elements/SwcObject.d.ts.map +1 -1
- package/dist/types/index.d.ts +6 -7
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/is/SwcChooseAnchor.d.ts.map +1 -1
- package/dist/types/is/SwcChooseArea.d.ts.map +1 -1
- package/dist/types/is/SwcChooseAudio.d.ts.map +1 -1
- package/dist/types/is/SwcChooseBase.d.ts.map +1 -1
- package/dist/types/is/SwcChooseButton.d.ts.map +1 -1
- package/dist/types/is/SwcChooseCanvas.d.ts.map +1 -1
- package/dist/types/is/SwcChooseData.d.ts.map +1 -1
- package/dist/types/is/SwcChooseDataList.d.ts.map +1 -1
- package/dist/types/is/SwcChooseDetails.d.ts.map +1 -1
- package/dist/types/is/SwcChooseDialog.d.ts.map +1 -1
- package/dist/types/is/SwcChooseDiv.d.ts.map +1 -1
- package/dist/types/is/SwcChooseDl.d.ts.map +1 -1
- package/dist/types/is/SwcChooseEmbed.d.ts.map +1 -1
- package/dist/types/is/SwcChooseFieldSet.d.ts.map +1 -1
- package/dist/types/is/SwcChooseForm.d.ts.map +1 -1
- package/dist/types/is/SwcChooseHeading.d.ts.map +1 -1
- package/dist/types/is/SwcChooseHr.d.ts.map +1 -1
- package/dist/types/is/SwcChooseIFrame.d.ts.map +1 -1
- package/dist/types/is/SwcChooseImage.d.ts.map +1 -1
- package/dist/types/is/SwcChooseInput.d.ts.map +1 -1
- package/dist/types/is/SwcChooseLabel.d.ts.map +1 -1
- package/dist/types/is/SwcChooseLegend.d.ts.map +1 -1
- package/dist/types/is/SwcChooseLi.d.ts.map +1 -1
- package/dist/types/is/SwcChooseLink.d.ts.map +1 -1
- package/dist/types/is/SwcChooseMap.d.ts.map +1 -1
- package/dist/types/is/SwcChooseMeta.d.ts.map +1 -1
- package/dist/types/is/SwcChooseMeter.d.ts.map +1 -1
- package/dist/types/is/SwcChooseMod.d.ts.map +1 -1
- package/dist/types/is/SwcChooseObject.d.ts.map +1 -1
- package/dist/types/is/SwcChooseOl.d.ts.map +1 -1
- package/dist/types/is/SwcChooseOptGroup.d.ts.map +1 -1
- package/dist/types/is/SwcChooseOption.d.ts.map +1 -1
- package/dist/types/is/SwcChooseOutput.d.ts.map +1 -1
- package/dist/types/is/SwcChooseParagraph.d.ts.map +1 -1
- package/dist/types/is/SwcChooseParam.d.ts.map +1 -1
- package/dist/types/is/SwcChoosePicture.d.ts.map +1 -1
- package/dist/types/is/SwcChoosePre.d.ts.map +1 -1
- package/dist/types/is/SwcChooseProgress.d.ts.map +1 -1
- package/dist/types/is/SwcChooseQuote.d.ts.map +1 -1
- package/dist/types/is/SwcChooseScript.d.ts.map +1 -1
- package/dist/types/is/SwcChooseSelect.d.ts.map +1 -1
- package/dist/types/is/SwcChooseSlot.d.ts.map +1 -1
- package/dist/types/is/SwcChooseSource.d.ts.map +1 -1
- package/dist/types/is/SwcChooseSpan.d.ts.map +1 -1
- package/dist/types/is/SwcChooseStyle.d.ts.map +1 -1
- package/dist/types/is/SwcChooseTable.d.ts.map +1 -1
- package/dist/types/is/SwcChooseTableCell.d.ts.map +1 -1
- package/dist/types/is/SwcChooseTableRow.d.ts.map +1 -1
- package/dist/types/is/SwcChooseTableSection.d.ts.map +1 -1
- package/dist/types/is/SwcChooseTemplate.d.ts.map +1 -1
- package/dist/types/is/SwcChooseTextArea.d.ts.map +1 -1
- package/dist/types/is/SwcChooseTime.d.ts.map +1 -1
- package/dist/types/is/SwcChooseTitle.d.ts.map +1 -1
- package/dist/types/is/SwcChooseTrack.d.ts.map +1 -1
- package/dist/types/is/SwcChooseUl.d.ts.map +1 -1
- package/dist/types/is/SwcChooseVideo.d.ts.map +1 -1
- package/dist/types/is/SwcIfAnchor.d.ts.map +1 -1
- package/dist/types/is/SwcIfArea.d.ts.map +1 -1
- package/dist/types/is/SwcIfAudio.d.ts.map +1 -1
- package/dist/types/is/SwcIfBase.d.ts.map +1 -1
- package/dist/types/is/SwcIfButton.d.ts.map +1 -1
- package/dist/types/is/SwcIfCanvas.d.ts.map +1 -1
- package/dist/types/is/SwcIfData.d.ts.map +1 -1
- package/dist/types/is/SwcIfDataList.d.ts.map +1 -1
- package/dist/types/is/SwcIfDetails.d.ts.map +1 -1
- package/dist/types/is/SwcIfDialog.d.ts.map +1 -1
- package/dist/types/is/SwcIfDiv.d.ts.map +1 -1
- package/dist/types/is/SwcIfDl.d.ts.map +1 -1
- package/dist/types/is/SwcIfEmbed.d.ts.map +1 -1
- package/dist/types/is/SwcIfFieldSet.d.ts.map +1 -1
- package/dist/types/is/SwcIfForm.d.ts.map +1 -1
- package/dist/types/is/SwcIfHeading.d.ts.map +1 -1
- package/dist/types/is/SwcIfHr.d.ts.map +1 -1
- package/dist/types/is/SwcIfIFrame.d.ts.map +1 -1
- package/dist/types/is/SwcIfImage.d.ts.map +1 -1
- package/dist/types/is/SwcIfInput.d.ts.map +1 -1
- package/dist/types/is/SwcIfLabel.d.ts.map +1 -1
- package/dist/types/is/SwcIfLegend.d.ts.map +1 -1
- package/dist/types/is/SwcIfLi.d.ts.map +1 -1
- package/dist/types/is/SwcIfLink.d.ts.map +1 -1
- package/dist/types/is/SwcIfMap.d.ts.map +1 -1
- package/dist/types/is/SwcIfMeta.d.ts.map +1 -1
- package/dist/types/is/SwcIfMeter.d.ts.map +1 -1
- package/dist/types/is/SwcIfMod.d.ts.map +1 -1
- package/dist/types/is/SwcIfObject.d.ts.map +1 -1
- package/dist/types/is/SwcIfOl.d.ts.map +1 -1
- package/dist/types/is/SwcIfOptGroup.d.ts.map +1 -1
- package/dist/types/is/SwcIfOption.d.ts.map +1 -1
- package/dist/types/is/SwcIfOutput.d.ts.map +1 -1
- package/dist/types/is/SwcIfParagraph.d.ts.map +1 -1
- package/dist/types/is/SwcIfParam.d.ts.map +1 -1
- package/dist/types/is/SwcIfPicture.d.ts.map +1 -1
- package/dist/types/is/SwcIfPre.d.ts.map +1 -1
- package/dist/types/is/SwcIfProgress.d.ts.map +1 -1
- package/dist/types/is/SwcIfQuote.d.ts.map +1 -1
- package/dist/types/is/SwcIfScript.d.ts.map +1 -1
- package/dist/types/is/SwcIfSelect.d.ts.map +1 -1
- package/dist/types/is/SwcIfSlot.d.ts.map +1 -1
- package/dist/types/is/SwcIfSource.d.ts.map +1 -1
- package/dist/types/is/SwcIfSpan.d.ts.map +1 -1
- package/dist/types/is/SwcIfStyle.d.ts.map +1 -1
- package/dist/types/is/SwcIfTable.d.ts.map +1 -1
- package/dist/types/is/SwcIfTableCell.d.ts.map +1 -1
- package/dist/types/is/SwcIfTableRow.d.ts.map +1 -1
- package/dist/types/is/SwcIfTableSection.d.ts.map +1 -1
- package/dist/types/is/SwcIfTemplate.d.ts.map +1 -1
- package/dist/types/is/SwcIfTextArea.d.ts.map +1 -1
- package/dist/types/is/SwcIfTime.d.ts.map +1 -1
- package/dist/types/is/SwcIfTitle.d.ts.map +1 -1
- package/dist/types/is/SwcIfTrack.d.ts.map +1 -1
- package/dist/types/is/SwcIfUl.d.ts.map +1 -1
- package/dist/types/is/SwcIfVideo.d.ts.map +1 -1
- package/dist/types/is/SwcWhenAnchor.d.ts.map +1 -1
- package/dist/types/is/SwcWhenArea.d.ts.map +1 -1
- package/dist/types/is/SwcWhenAudio.d.ts.map +1 -1
- package/dist/types/is/SwcWhenBase.d.ts.map +1 -1
- package/dist/types/is/SwcWhenButton.d.ts.map +1 -1
- package/dist/types/is/SwcWhenCanvas.d.ts.map +1 -1
- package/dist/types/is/SwcWhenData.d.ts.map +1 -1
- package/dist/types/is/SwcWhenDataList.d.ts.map +1 -1
- package/dist/types/is/SwcWhenDetails.d.ts.map +1 -1
- package/dist/types/is/SwcWhenDialog.d.ts.map +1 -1
- package/dist/types/is/SwcWhenDiv.d.ts.map +1 -1
- package/dist/types/is/SwcWhenDl.d.ts.map +1 -1
- package/dist/types/is/SwcWhenEmbed.d.ts.map +1 -1
- package/dist/types/is/SwcWhenFieldSet.d.ts.map +1 -1
- package/dist/types/is/SwcWhenForm.d.ts.map +1 -1
- package/dist/types/is/SwcWhenHeading.d.ts.map +1 -1
- package/dist/types/is/SwcWhenHr.d.ts.map +1 -1
- package/dist/types/is/SwcWhenIFrame.d.ts.map +1 -1
- package/dist/types/is/SwcWhenImage.d.ts.map +1 -1
- package/dist/types/is/SwcWhenInput.d.ts.map +1 -1
- package/dist/types/is/SwcWhenLabel.d.ts.map +1 -1
- package/dist/types/is/SwcWhenLegend.d.ts.map +1 -1
- package/dist/types/is/SwcWhenLi.d.ts.map +1 -1
- package/dist/types/is/SwcWhenLink.d.ts.map +1 -1
- package/dist/types/is/SwcWhenMap.d.ts.map +1 -1
- package/dist/types/is/SwcWhenMeta.d.ts.map +1 -1
- package/dist/types/is/SwcWhenMeter.d.ts.map +1 -1
- package/dist/types/is/SwcWhenMod.d.ts.map +1 -1
- package/dist/types/is/SwcWhenObject.d.ts.map +1 -1
- package/dist/types/is/SwcWhenOl.d.ts.map +1 -1
- package/dist/types/is/SwcWhenOptGroup.d.ts.map +1 -1
- package/dist/types/is/SwcWhenOption.d.ts.map +1 -1
- package/dist/types/is/SwcWhenOutput.d.ts.map +1 -1
- package/dist/types/is/SwcWhenParagraph.d.ts.map +1 -1
- package/dist/types/is/SwcWhenParam.d.ts.map +1 -1
- package/dist/types/is/SwcWhenPicture.d.ts.map +1 -1
- package/dist/types/is/SwcWhenPre.d.ts.map +1 -1
- package/dist/types/is/SwcWhenProgress.d.ts.map +1 -1
- package/dist/types/is/SwcWhenQuote.d.ts.map +1 -1
- package/dist/types/is/SwcWhenScript.d.ts.map +1 -1
- package/dist/types/is/SwcWhenSelect.d.ts.map +1 -1
- package/dist/types/is/SwcWhenSlot.d.ts.map +1 -1
- package/dist/types/is/SwcWhenSource.d.ts.map +1 -1
- package/dist/types/is/SwcWhenSpan.d.ts.map +1 -1
- package/dist/types/is/SwcWhenStyle.d.ts.map +1 -1
- package/dist/types/is/SwcWhenTable.d.ts.map +1 -1
- package/dist/types/is/SwcWhenTableCell.d.ts.map +1 -1
- package/dist/types/is/SwcWhenTableRow.d.ts.map +1 -1
- package/dist/types/is/SwcWhenTableSection.d.ts.map +1 -1
- package/dist/types/is/SwcWhenTemplate.d.ts.map +1 -1
- package/dist/types/is/SwcWhenTextArea.d.ts.map +1 -1
- package/dist/types/is/SwcWhenTime.d.ts.map +1 -1
- package/dist/types/is/SwcWhenTitle.d.ts.map +1 -1
- package/dist/types/is/SwcWhenTrack.d.ts.map +1 -1
- package/dist/types/is/SwcWhenUl.d.ts.map +1 -1
- package/dist/types/is/SwcWhenVideo.d.ts.map +1 -1
- package/dist/types/utils/Utils.d.ts.map +1 -1
- package/dist/umd-bundle/dooboostore-simple-web-component.umd.js +2344 -2136
- package/dist/umd-bundle/dooboostore-simple-web-component.umd.js.map +4 -4
- package/package.json +4 -4
- package/src/decorators/addEventListener.ts +11 -5
- package/src/decorators/attribute.ts +77 -0
- package/src/decorators/elementDefine.ts +269 -149
- package/src/decorators/emitCustomEvent.ts +57 -0
- package/src/decorators/lifecycles.ts +44 -4
- package/src/decorators/query.ts +35 -8
- package/src/decorators/queryAll.ts +35 -8
- package/src/decorators/state.ts +44 -0
- package/src/elements/SwcChoose.ts +1 -5
- package/src/elements/SwcForOf.ts +2 -1
- package/src/elements/SwcObject.ts +8 -6
- package/src/index.ts +6 -7
- package/src/is/SwcChooseAnchor.ts +0 -1
- package/src/is/SwcChooseArea.ts +0 -1
- package/src/is/SwcChooseAudio.ts +0 -1
- package/src/is/SwcChooseBase.ts +0 -1
- package/src/is/SwcChooseButton.ts +0 -1
- package/src/is/SwcChooseCanvas.ts +0 -1
- package/src/is/SwcChooseData.ts +0 -1
- package/src/is/SwcChooseDataList.ts +0 -1
- package/src/is/SwcChooseDetails.ts +0 -1
- package/src/is/SwcChooseDialog.ts +0 -1
- package/src/is/SwcChooseDiv.ts +0 -1
- package/src/is/SwcChooseDl.ts +0 -1
- package/src/is/SwcChooseEmbed.ts +0 -1
- package/src/is/SwcChooseFieldSet.ts +0 -1
- package/src/is/SwcChooseForm.ts +0 -1
- package/src/is/SwcChooseHeading.ts +0 -1
- package/src/is/SwcChooseHr.ts +0 -1
- package/src/is/SwcChooseIFrame.ts +0 -1
- package/src/is/SwcChooseImage.ts +0 -1
- package/src/is/SwcChooseInput.ts +0 -1
- package/src/is/SwcChooseLabel.ts +0 -1
- package/src/is/SwcChooseLegend.ts +0 -1
- package/src/is/SwcChooseLi.ts +0 -1
- package/src/is/SwcChooseLink.ts +0 -1
- package/src/is/SwcChooseMap.ts +0 -1
- package/src/is/SwcChooseMeta.ts +0 -1
- package/src/is/SwcChooseMeter.ts +0 -1
- package/src/is/SwcChooseMod.ts +0 -1
- package/src/is/SwcChooseObject.ts +0 -1
- package/src/is/SwcChooseOl.ts +0 -1
- package/src/is/SwcChooseOptGroup.ts +0 -1
- package/src/is/SwcChooseOption.ts +0 -1
- package/src/is/SwcChooseOutput.ts +0 -1
- package/src/is/SwcChooseParagraph.ts +0 -1
- package/src/is/SwcChooseParam.ts +0 -1
- package/src/is/SwcChoosePicture.ts +0 -1
- package/src/is/SwcChoosePre.ts +0 -1
- package/src/is/SwcChooseProgress.ts +0 -1
- package/src/is/SwcChooseQuote.ts +0 -1
- package/src/is/SwcChooseScript.ts +0 -1
- package/src/is/SwcChooseSelect.ts +0 -1
- package/src/is/SwcChooseSlot.ts +0 -1
- package/src/is/SwcChooseSource.ts +0 -1
- package/src/is/SwcChooseSpan.ts +0 -1
- package/src/is/SwcChooseStyle.ts +0 -1
- package/src/is/SwcChooseTable.ts +0 -1
- package/src/is/SwcChooseTableCell.ts +0 -1
- package/src/is/SwcChooseTableRow.ts +0 -1
- package/src/is/SwcChooseTableSection.ts +0 -1
- package/src/is/SwcChooseTemplate.ts +0 -1
- package/src/is/SwcChooseTextArea.ts +0 -1
- package/src/is/SwcChooseTime.ts +0 -1
- package/src/is/SwcChooseTitle.ts +0 -1
- package/src/is/SwcChooseTrack.ts +0 -1
- package/src/is/SwcChooseUl.ts +0 -1
- package/src/is/SwcChooseVideo.ts +0 -1
- package/src/is/SwcIfAnchor.ts +0 -1
- package/src/is/SwcIfArea.ts +0 -1
- package/src/is/SwcIfAudio.ts +0 -1
- package/src/is/SwcIfBase.ts +0 -1
- package/src/is/SwcIfButton.ts +0 -1
- package/src/is/SwcIfCanvas.ts +0 -1
- package/src/is/SwcIfData.ts +0 -1
- package/src/is/SwcIfDataList.ts +0 -1
- package/src/is/SwcIfDetails.ts +0 -1
- package/src/is/SwcIfDialog.ts +0 -1
- package/src/is/SwcIfDiv.ts +0 -1
- package/src/is/SwcIfDl.ts +0 -1
- package/src/is/SwcIfEmbed.ts +0 -1
- package/src/is/SwcIfFieldSet.ts +0 -1
- package/src/is/SwcIfForm.ts +0 -1
- package/src/is/SwcIfHeading.ts +0 -1
- package/src/is/SwcIfHr.ts +0 -1
- package/src/is/SwcIfIFrame.ts +0 -1
- package/src/is/SwcIfImage.ts +0 -1
- package/src/is/SwcIfInput.ts +0 -1
- package/src/is/SwcIfLabel.ts +0 -1
- package/src/is/SwcIfLegend.ts +0 -1
- package/src/is/SwcIfLi.ts +0 -1
- package/src/is/SwcIfLink.ts +0 -1
- package/src/is/SwcIfMap.ts +0 -1
- package/src/is/SwcIfMeta.ts +0 -1
- package/src/is/SwcIfMeter.ts +0 -1
- package/src/is/SwcIfMod.ts +0 -1
- package/src/is/SwcIfObject.ts +0 -1
- package/src/is/SwcIfOl.ts +0 -1
- package/src/is/SwcIfOptGroup.ts +0 -1
- package/src/is/SwcIfOption.ts +0 -1
- package/src/is/SwcIfOutput.ts +0 -1
- package/src/is/SwcIfParagraph.ts +0 -1
- package/src/is/SwcIfParam.ts +0 -1
- package/src/is/SwcIfPicture.ts +0 -1
- package/src/is/SwcIfPre.ts +0 -1
- package/src/is/SwcIfProgress.ts +0 -1
- package/src/is/SwcIfQuote.ts +0 -1
- package/src/is/SwcIfScript.ts +0 -1
- package/src/is/SwcIfSelect.ts +0 -1
- package/src/is/SwcIfSlot.ts +0 -1
- package/src/is/SwcIfSource.ts +0 -1
- package/src/is/SwcIfSpan.ts +0 -1
- package/src/is/SwcIfStyle.ts +0 -1
- package/src/is/SwcIfTable.ts +0 -1
- package/src/is/SwcIfTableCell.ts +0 -1
- package/src/is/SwcIfTableRow.ts +0 -1
- package/src/is/SwcIfTableSection.ts +0 -1
- package/src/is/SwcIfTemplate.ts +0 -1
- package/src/is/SwcIfTextArea.ts +0 -1
- package/src/is/SwcIfTime.ts +0 -1
- package/src/is/SwcIfTitle.ts +0 -1
- package/src/is/SwcIfTrack.ts +0 -1
- package/src/is/SwcIfUl.ts +0 -1
- package/src/is/SwcIfVideo.ts +0 -1
- package/src/is/SwcOtherAnchor.ts +1 -1
- package/src/is/SwcOtherArea.ts +1 -1
- package/src/is/SwcOtherAudio.ts +1 -1
- package/src/is/SwcOtherBase.ts +1 -1
- package/src/is/SwcOtherButton.ts +1 -1
- package/src/is/SwcOtherCanvas.ts +1 -1
- package/src/is/SwcOtherData.ts +1 -1
- package/src/is/SwcOtherDataList.ts +1 -1
- package/src/is/SwcOtherDetails.ts +1 -1
- package/src/is/SwcOtherDialog.ts +1 -1
- package/src/is/SwcOtherDiv.ts +1 -1
- package/src/is/SwcOtherDl.ts +1 -1
- package/src/is/SwcOtherEmbed.ts +1 -1
- package/src/is/SwcOtherFieldSet.ts +1 -1
- package/src/is/SwcOtherForm.ts +1 -1
- package/src/is/SwcOtherHeading.ts +1 -1
- package/src/is/SwcOtherHr.ts +1 -1
- package/src/is/SwcOtherIFrame.ts +1 -1
- package/src/is/SwcOtherImage.ts +1 -1
- package/src/is/SwcOtherInput.ts +1 -1
- package/src/is/SwcOtherLabel.ts +1 -1
- package/src/is/SwcOtherLegend.ts +1 -1
- package/src/is/SwcOtherLi.ts +1 -1
- package/src/is/SwcOtherLink.ts +1 -1
- package/src/is/SwcOtherMap.ts +1 -1
- package/src/is/SwcOtherMeta.ts +1 -1
- package/src/is/SwcOtherMeter.ts +1 -1
- package/src/is/SwcOtherMod.ts +1 -1
- package/src/is/SwcOtherObject.ts +1 -1
- package/src/is/SwcOtherOl.ts +1 -1
- package/src/is/SwcOtherOptGroup.ts +1 -1
- package/src/is/SwcOtherOption.ts +1 -1
- package/src/is/SwcOtherOutput.ts +1 -1
- package/src/is/SwcOtherParagraph.ts +1 -1
- package/src/is/SwcOtherParam.ts +1 -1
- package/src/is/SwcOtherPicture.ts +1 -1
- package/src/is/SwcOtherPre.ts +1 -1
- package/src/is/SwcOtherProgress.ts +1 -1
- package/src/is/SwcOtherQuote.ts +1 -1
- package/src/is/SwcOtherScript.ts +1 -1
- package/src/is/SwcOtherSelect.ts +1 -1
- package/src/is/SwcOtherSlot.ts +1 -1
- package/src/is/SwcOtherSource.ts +1 -1
- package/src/is/SwcOtherSpan.ts +1 -1
- package/src/is/SwcOtherStyle.ts +1 -1
- package/src/is/SwcOtherTable.ts +1 -1
- package/src/is/SwcOtherTableCell.ts +1 -1
- package/src/is/SwcOtherTableRow.ts +1 -1
- package/src/is/SwcOtherTableSection.ts +1 -1
- package/src/is/SwcOtherTemplate.ts +1 -1
- package/src/is/SwcOtherTextArea.ts +1 -1
- package/src/is/SwcOtherTime.ts +1 -1
- package/src/is/SwcOtherTitle.ts +1 -1
- package/src/is/SwcOtherTrack.ts +1 -1
- package/src/is/SwcOtherUl.ts +1 -1
- package/src/is/SwcOtherVideo.ts +1 -1
- package/src/is/SwcWhenAnchor.ts +1 -3
- package/src/is/SwcWhenArea.ts +1 -3
- package/src/is/SwcWhenAudio.ts +1 -3
- package/src/is/SwcWhenBase.ts +1 -3
- package/src/is/SwcWhenButton.ts +1 -3
- package/src/is/SwcWhenCanvas.ts +1 -3
- package/src/is/SwcWhenData.ts +1 -3
- package/src/is/SwcWhenDataList.ts +1 -3
- package/src/is/SwcWhenDetails.ts +1 -3
- package/src/is/SwcWhenDialog.ts +1 -3
- package/src/is/SwcWhenDiv.ts +1 -3
- package/src/is/SwcWhenDl.ts +1 -3
- package/src/is/SwcWhenEmbed.ts +1 -3
- package/src/is/SwcWhenFieldSet.ts +1 -3
- package/src/is/SwcWhenForm.ts +1 -3
- package/src/is/SwcWhenHeading.ts +1 -3
- package/src/is/SwcWhenHr.ts +1 -3
- package/src/is/SwcWhenIFrame.ts +1 -3
- package/src/is/SwcWhenImage.ts +1 -3
- package/src/is/SwcWhenInput.ts +1 -3
- package/src/is/SwcWhenLabel.ts +1 -3
- package/src/is/SwcWhenLegend.ts +1 -3
- package/src/is/SwcWhenLi.ts +1 -3
- package/src/is/SwcWhenLink.ts +1 -3
- package/src/is/SwcWhenMap.ts +1 -3
- package/src/is/SwcWhenMeta.ts +1 -3
- package/src/is/SwcWhenMeter.ts +1 -3
- package/src/is/SwcWhenMod.ts +1 -3
- package/src/is/SwcWhenObject.ts +1 -3
- package/src/is/SwcWhenOl.ts +1 -3
- package/src/is/SwcWhenOptGroup.ts +1 -3
- package/src/is/SwcWhenOption.ts +1 -3
- package/src/is/SwcWhenOutput.ts +1 -3
- package/src/is/SwcWhenParagraph.ts +1 -3
- package/src/is/SwcWhenParam.ts +1 -3
- package/src/is/SwcWhenPicture.ts +1 -3
- package/src/is/SwcWhenPre.ts +1 -3
- package/src/is/SwcWhenProgress.ts +1 -3
- package/src/is/SwcWhenQuote.ts +1 -3
- package/src/is/SwcWhenScript.ts +1 -3
- package/src/is/SwcWhenSelect.ts +1 -3
- package/src/is/SwcWhenSlot.ts +1 -3
- package/src/is/SwcWhenSource.ts +1 -3
- package/src/is/SwcWhenSpan.ts +1 -3
- package/src/is/SwcWhenStyle.ts +1 -3
- package/src/is/SwcWhenTable.ts +1 -3
- package/src/is/SwcWhenTableCell.ts +1 -3
- package/src/is/SwcWhenTableRow.ts +1 -3
- package/src/is/SwcWhenTableSection.ts +1 -3
- package/src/is/SwcWhenTemplate.ts +1 -3
- package/src/is/SwcWhenTextArea.ts +1 -3
- package/src/is/SwcWhenTime.ts +1 -3
- package/src/is/SwcWhenTitle.ts +1 -3
- package/src/is/SwcWhenTrack.ts +1 -3
- package/src/is/SwcWhenUl.ts +1 -3
- package/src/is/SwcWhenVideo.ts +1 -3
- package/src/utils/Utils.ts +65 -22
- package/dist/cjs/decorators/attributeChanged.js +0 -62
- package/dist/cjs/decorators/attributeChanged.js.map +0 -7
- package/dist/esm/decorators/attributeChanged.js +0 -43
- package/dist/esm/decorators/attributeChanged.js.map +0 -7
- package/dist/types/decorators/attributeChanged.d.ts +0 -6
- package/dist/types/decorators/attributeChanged.d.ts.map +0 -1
- package/src/decorators/attributeChanged.ts +0 -43
package/dist/esm/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["import 'reflect-metadata';\nexport * from './decorators/elementDefine';\nexport * from './decorators/innerHtml';\nexport * from './decorators/attributeChanged';\nexport * from './decorators/lifecycles';\nexport * from './decorators/query';\nexport * from './decorators/queryAll';\nexport * from './decorators/addEventListener';\nexport * from './elements/SwcForOf';\nexport * from './elements/SwcIf';\nexport * from './elements/SwcChoose';\nexport * from './elements/SwcWhen';\nexport * from './elements/SwcOther';\nexport * from './elements/SwcObject';\nexport * from './elements/SwcHTMLElementBase';\nexport * from './utils/Utils';\nexport * from './is/SwcHTMLAnchorElementBase';\nexport * from './is/SwcForOfAnchor';\nexport * from './is/SwcIfAnchor';\nexport * from './is/SwcObjectAnchor';\nexport * from './is/SwcChooseAnchor';\nexport * from './is/SwcWhenAnchor';\nexport * from './is/SwcOtherAnchor';\nexport * from './is/SwcHTMLAreaElementBase';\nexport * from './is/SwcForOfArea';\nexport * from './is/SwcIfArea';\nexport * from './is/SwcObjectArea';\nexport * from './is/SwcChooseArea';\nexport * from './is/SwcWhenArea';\nexport * from './is/SwcOtherArea';\nexport * from './is/SwcHTMLAudioElementBase';\nexport * from './is/SwcForOfAudio';\nexport * from './is/SwcIfAudio';\nexport * from './is/SwcObjectAudio';\nexport * from './is/SwcChooseAudio';\nexport * from './is/SwcWhenAudio';\nexport * from './is/SwcOtherAudio';\nexport * from './is/SwcHTMLBaseElementBase';\nexport * from './is/SwcForOfBase';\nexport * from './is/SwcIfBase';\nexport * from './is/SwcObjectBase';\nexport * from './is/SwcChooseBase';\nexport * from './is/SwcWhenBase';\nexport * from './is/SwcOtherBase';\nexport * from './is/SwcHTMLButtonElementBase';\nexport * from './is/SwcForOfButton';\nexport * from './is/SwcIfButton';\nexport * from './is/SwcObjectButton';\nexport * from './is/SwcChooseButton';\nexport * from './is/SwcWhenButton';\nexport * from './is/SwcOtherButton';\nexport * from './is/SwcHTMLCanvasElementBase';\nexport * from './is/SwcForOfCanvas';\nexport * from './is/SwcIfCanvas';\nexport * from './is/SwcObjectCanvas';\nexport * from './is/SwcChooseCanvas';\nexport * from './is/SwcWhenCanvas';\nexport * from './is/SwcOtherCanvas';\nexport * from './is/SwcHTMLDataElementBase';\nexport * from './is/SwcForOfData';\nexport * from './is/SwcIfData';\nexport * from './is/SwcObjectData';\nexport * from './is/SwcChooseData';\nexport * from './is/SwcWhenData';\nexport * from './is/SwcOtherData';\nexport * from './is/SwcHTMLDataListElementBase';\nexport * from './is/SwcForOfDataList';\nexport * from './is/SwcIfDataList';\nexport * from './is/SwcObjectDataList';\nexport * from './is/SwcChooseDataList';\nexport * from './is/SwcWhenDataList';\nexport * from './is/SwcOtherDataList';\nexport * from './is/SwcHTMLDetailsElementBase';\nexport * from './is/SwcForOfDetails';\nexport * from './is/SwcIfDetails';\nexport * from './is/SwcObjectDetails';\nexport * from './is/SwcChooseDetails';\nexport * from './is/SwcWhenDetails';\nexport * from './is/SwcOtherDetails';\nexport * from './is/SwcHTMLDialogElementBase';\nexport * from './is/SwcForOfDialog';\nexport * from './is/SwcIfDialog';\nexport * from './is/SwcObjectDialog';\nexport * from './is/SwcChooseDialog';\nexport * from './is/SwcWhenDialog';\nexport * from './is/SwcOtherDialog';\nexport * from './is/SwcHTMLDivElementBase';\nexport * from './is/SwcForOfDiv';\nexport * from './is/SwcIfDiv';\nexport * from './is/SwcObjectDiv';\nexport * from './is/SwcChooseDiv';\nexport * from './is/SwcWhenDiv';\nexport * from './is/SwcOtherDiv';\nexport * from './is/SwcHTMLDListElementBase';\nexport * from './is/SwcForOfDl';\nexport * from './is/SwcIfDl';\nexport * from './is/SwcObjectDl';\nexport * from './is/SwcChooseDl';\nexport * from './is/SwcWhenDl';\nexport * from './is/SwcOtherDl';\nexport * from './is/SwcHTMLEmbedElementBase';\nexport * from './is/SwcForOfEmbed';\nexport * from './is/SwcIfEmbed';\nexport * from './is/SwcObjectEmbed';\nexport * from './is/SwcChooseEmbed';\nexport * from './is/SwcWhenEmbed';\nexport * from './is/SwcOtherEmbed';\nexport * from './is/SwcHTMLFieldSetElementBase';\nexport * from './is/SwcForOfFieldSet';\nexport * from './is/SwcIfFieldSet';\nexport * from './is/SwcObjectFieldSet';\nexport * from './is/SwcChooseFieldSet';\nexport * from './is/SwcWhenFieldSet';\nexport * from './is/SwcOtherFieldSet';\nexport * from './is/SwcHTMLFormElementBase';\nexport * from './is/SwcForOfForm';\nexport * from './is/SwcIfForm';\nexport * from './is/SwcObjectForm';\nexport * from './is/SwcChooseForm';\nexport * from './is/SwcWhenForm';\nexport * from './is/SwcOtherForm';\nexport * from './is/SwcHTMLHRElementBase';\nexport * from './is/SwcForOfHr';\nexport * from './is/SwcIfHr';\nexport * from './is/SwcObjectHr';\nexport * from './is/SwcChooseHr';\nexport * from './is/SwcWhenHr';\nexport * from './is/SwcOtherHr';\nexport * from './is/SwcHTMLIFrameElementBase';\nexport * from './is/SwcForOfIFrame';\nexport * from './is/SwcIfIFrame';\nexport * from './is/SwcObjectIFrame';\nexport * from './is/SwcChooseIFrame';\nexport * from './is/SwcWhenIFrame';\nexport * from './is/SwcOtherIFrame';\nexport * from './is/SwcHTMLImageElementBase';\nexport * from './is/SwcForOfImage';\nexport * from './is/SwcIfImage';\nexport * from './is/SwcObjectImage';\nexport * from './is/SwcChooseImage';\nexport * from './is/SwcWhenImage';\nexport * from './is/SwcOtherImage';\nexport * from './is/SwcHTMLInputElementBase';\nexport * from './is/SwcForOfInput';\nexport * from './is/SwcIfInput';\nexport * from './is/SwcObjectInput';\nexport * from './is/SwcChooseInput';\nexport * from './is/SwcWhenInput';\nexport * from './is/SwcOtherInput';\nexport * from './is/SwcHTMLLabelElementBase';\nexport * from './is/SwcForOfLabel';\nexport * from './is/SwcIfLabel';\nexport * from './is/SwcObjectLabel';\nexport * from './is/SwcChooseLabel';\nexport * from './is/SwcWhenLabel';\nexport * from './is/SwcOtherLabel';\nexport * from './is/SwcHTMLLegendElementBase';\nexport * from './is/SwcForOfLegend';\nexport * from './is/SwcIfLegend';\nexport * from './is/SwcObjectLegend';\nexport * from './is/SwcChooseLegend';\nexport * from './is/SwcWhenLegend';\nexport * from './is/SwcOtherLegend';\nexport * from './is/SwcHTMLLIElementBase';\nexport * from './is/SwcForOfLi';\nexport * from './is/SwcIfLi';\nexport * from './is/SwcObjectLi';\nexport * from './is/SwcChooseLi';\nexport * from './is/SwcWhenLi';\nexport * from './is/SwcOtherLi';\nexport * from './is/SwcHTMLLinkElementBase';\nexport * from './is/SwcForOfLink';\nexport * from './is/SwcIfLink';\nexport * from './is/SwcObjectLink';\nexport * from './is/SwcChooseLink';\nexport * from './is/SwcWhenLink';\nexport * from './is/SwcOtherLink';\nexport * from './is/SwcHTMLMapElementBase';\nexport * from './is/SwcForOfMap';\nexport * from './is/SwcIfMap';\nexport * from './is/SwcObjectMap';\nexport * from './is/SwcChooseMap';\nexport * from './is/SwcWhenMap';\nexport * from './is/SwcOtherMap';\nexport * from './is/SwcHTMLMetaElementBase';\nexport * from './is/SwcForOfMeta';\nexport * from './is/SwcIfMeta';\nexport * from './is/SwcObjectMeta';\nexport * from './is/SwcChooseMeta';\nexport * from './is/SwcWhenMeta';\nexport * from './is/SwcOtherMeta';\nexport * from './is/SwcHTMLMeterElementBase';\nexport * from './is/SwcForOfMeter';\nexport * from './is/SwcIfMeter';\nexport * from './is/SwcObjectMeter';\nexport * from './is/SwcChooseMeter';\nexport * from './is/SwcWhenMeter';\nexport * from './is/SwcOtherMeter';\nexport * from './is/SwcHTMLModElementBase';\nexport * from './is/SwcForOfMod';\nexport * from './is/SwcIfMod';\nexport * from './is/SwcObjectMod';\nexport * from './is/SwcChooseMod';\nexport * from './is/SwcWhenMod';\nexport * from './is/SwcOtherMod';\nexport * from './is/SwcHTMLObjectElementBase';\nexport * from './is/SwcForOfObject';\nexport * from './is/SwcIfObject';\nexport * from './is/SwcObjectObject';\nexport * from './is/SwcChooseObject';\nexport * from './is/SwcWhenObject';\nexport * from './is/SwcOtherObject';\nexport * from './is/SwcHTMLOListElementBase';\nexport * from './is/SwcForOfOl';\nexport * from './is/SwcIfOl';\nexport * from './is/SwcObjectOl';\nexport * from './is/SwcChooseOl';\nexport * from './is/SwcWhenOl';\nexport * from './is/SwcOtherOl';\nexport * from './is/SwcHTMLOptGroupElementBase';\nexport * from './is/SwcForOfOptGroup';\nexport * from './is/SwcIfOptGroup';\nexport * from './is/SwcObjectOptGroup';\nexport * from './is/SwcChooseOptGroup';\nexport * from './is/SwcWhenOptGroup';\nexport * from './is/SwcOtherOptGroup';\nexport * from './is/SwcHTMLOptionElementBase';\nexport * from './is/SwcForOfOption';\nexport * from './is/SwcIfOption';\nexport * from './is/SwcObjectOption';\nexport * from './is/SwcChooseOption';\nexport * from './is/SwcWhenOption';\nexport * from './is/SwcOtherOption';\nexport * from './is/SwcHTMLOutputElementBase';\nexport * from './is/SwcForOfOutput';\nexport * from './is/SwcIfOutput';\nexport * from './is/SwcObjectOutput';\nexport * from './is/SwcChooseOutput';\nexport * from './is/SwcWhenOutput';\nexport * from './is/SwcOtherOutput';\nexport * from './is/SwcHTMLParagraphElementBase';\nexport * from './is/SwcForOfParagraph';\nexport * from './is/SwcIfParagraph';\nexport * from './is/SwcObjectParagraph';\nexport * from './is/SwcChooseParagraph';\nexport * from './is/SwcWhenParagraph';\nexport * from './is/SwcOtherParagraph';\nexport * from './is/SwcHTMLParamElementBase';\nexport * from './is/SwcForOfParam';\nexport * from './is/SwcIfParam';\nexport * from './is/SwcObjectParam';\nexport * from './is/SwcChooseParam';\nexport * from './is/SwcWhenParam';\nexport * from './is/SwcOtherParam';\nexport * from './is/SwcHTMLPictureElementBase';\nexport * from './is/SwcForOfPicture';\nexport * from './is/SwcIfPicture';\nexport * from './is/SwcObjectPicture';\nexport * from './is/SwcChoosePicture';\nexport * from './is/SwcWhenPicture';\nexport * from './is/SwcOtherPicture';\nexport * from './is/SwcHTMLPreElementBase';\nexport * from './is/SwcForOfPre';\nexport * from './is/SwcIfPre';\nexport * from './is/SwcObjectPre';\nexport * from './is/SwcChoosePre';\nexport * from './is/SwcWhenPre';\nexport * from './is/SwcOtherPre';\nexport * from './is/SwcHTMLProgressElementBase';\nexport * from './is/SwcForOfProgress';\nexport * from './is/SwcIfProgress';\nexport * from './is/SwcObjectProgress';\nexport * from './is/SwcChooseProgress';\nexport * from './is/SwcWhenProgress';\nexport * from './is/SwcOtherProgress';\nexport * from './is/SwcHTMLQuoteElementBase';\nexport * from './is/SwcForOfQuote';\nexport * from './is/SwcIfQuote';\nexport * from './is/SwcObjectQuote';\nexport * from './is/SwcChooseQuote';\nexport * from './is/SwcWhenQuote';\nexport * from './is/SwcOtherQuote';\nexport * from './is/SwcHTMLScriptElementBase';\nexport * from './is/SwcForOfScript';\nexport * from './is/SwcIfScript';\nexport * from './is/SwcObjectScript';\nexport * from './is/SwcChooseScript';\nexport * from './is/SwcWhenScript';\nexport * from './is/SwcOtherScript';\nexport * from './is/SwcHTMLSelectElementBase';\nexport * from './is/SwcForOfSelect';\nexport * from './is/SwcIfSelect';\nexport * from './is/SwcObjectSelect';\nexport * from './is/SwcChooseSelect';\nexport * from './is/SwcWhenSelect';\nexport * from './is/SwcOtherSelect';\nexport * from './is/SwcHTMLSlotElementBase';\nexport * from './is/SwcForOfSlot';\nexport * from './is/SwcIfSlot';\nexport * from './is/SwcObjectSlot';\nexport * from './is/SwcChooseSlot';\nexport * from './is/SwcWhenSlot';\nexport * from './is/SwcOtherSlot';\nexport * from './is/SwcHTMLSourceElementBase';\nexport * from './is/SwcForOfSource';\nexport * from './is/SwcIfSource';\nexport * from './is/SwcObjectSource';\nexport * from './is/SwcChooseSource';\nexport * from './is/SwcWhenSource';\nexport * from './is/SwcOtherSource';\nexport * from './is/SwcHTMLSpanElementBase';\nexport * from './is/SwcForOfSpan';\nexport * from './is/SwcIfSpan';\nexport * from './is/SwcObjectSpan';\nexport * from './is/SwcChooseSpan';\nexport * from './is/SwcWhenSpan';\nexport * from './is/SwcOtherSpan';\nexport * from './is/SwcHTMLStyleElementBase';\nexport * from './is/SwcForOfStyle';\nexport * from './is/SwcIfStyle';\nexport * from './is/SwcObjectStyle';\nexport * from './is/SwcChooseStyle';\nexport * from './is/SwcWhenStyle';\nexport * from './is/SwcOtherStyle';\nexport * from './is/SwcHTMLTableElementBase';\nexport * from './is/SwcForOfTable';\nexport * from './is/SwcIfTable';\nexport * from './is/SwcObjectTable';\nexport * from './is/SwcChooseTable';\nexport * from './is/SwcWhenTable';\nexport * from './is/SwcOtherTable';\nexport * from './is/SwcHTMLTableSectionElementBase';\nexport * from './is/SwcForOfTableSection';\nexport * from './is/SwcIfTableSection';\nexport * from './is/SwcObjectTableSection';\nexport * from './is/SwcChooseTableSection';\nexport * from './is/SwcWhenTableSection';\nexport * from './is/SwcOtherTableSection';\nexport * from './is/SwcHTMLTableCellElementBase';\nexport * from './is/SwcForOfTableCell';\nexport * from './is/SwcIfTableCell';\nexport * from './is/SwcObjectTableCell';\nexport * from './is/SwcChooseTableCell';\nexport * from './is/SwcWhenTableCell';\nexport * from './is/SwcOtherTableCell';\nexport * from './is/SwcHTMLTemplateElementBase';\nexport * from './is/SwcForOfTemplate';\nexport * from './is/SwcIfTemplate';\nexport * from './is/SwcObjectTemplate';\nexport * from './is/SwcChooseTemplate';\nexport * from './is/SwcWhenTemplate';\nexport * from './is/SwcOtherTemplate';\nexport * from './is/SwcHTMLTextAreaElementBase';\nexport * from './is/SwcForOfTextArea';\nexport * from './is/SwcIfTextArea';\nexport * from './is/SwcObjectTextArea';\nexport * from './is/SwcChooseTextArea';\nexport * from './is/SwcWhenTextArea';\nexport * from './is/SwcOtherTextArea';\nexport * from './is/SwcHTMLTimeElementBase';\nexport * from './is/SwcForOfTime';\nexport * from './is/SwcIfTime';\nexport * from './is/SwcObjectTime';\nexport * from './is/SwcChooseTime';\nexport * from './is/SwcWhenTime';\nexport * from './is/SwcOtherTime';\nexport * from './is/SwcHTMLTitleElementBase';\nexport * from './is/SwcForOfTitle';\nexport * from './is/SwcIfTitle';\nexport * from './is/SwcObjectTitle';\nexport * from './is/SwcChooseTitle';\nexport * from './is/SwcWhenTitle';\nexport * from './is/SwcOtherTitle';\nexport * from './is/SwcHTMLTableRowElementBase';\nexport * from './is/SwcForOfTableRow';\nexport * from './is/SwcIfTableRow';\nexport * from './is/SwcObjectTableRow';\nexport * from './is/SwcChooseTableRow';\nexport * from './is/SwcWhenTableRow';\nexport * from './is/SwcOtherTableRow';\nexport * from './is/SwcHTMLTrackElementBase';\nexport * from './is/SwcForOfTrack';\nexport * from './is/SwcIfTrack';\nexport * from './is/SwcObjectTrack';\nexport * from './is/SwcChooseTrack';\nexport * from './is/SwcWhenTrack';\nexport * from './is/SwcOtherTrack';\nexport * from './is/SwcHTMLUListElementBase';\nexport * from './is/SwcForOfUl';\nexport * from './is/SwcIfUl';\nexport * from './is/SwcObjectUl';\nexport * from './is/SwcChooseUl';\nexport * from './is/SwcWhenUl';\nexport * from './is/SwcOtherUl';\nexport * from './is/SwcHTMLVideoElementBase';\nexport * from './is/SwcForOfVideo';\nexport * from './is/SwcIfVideo';\nexport * from './is/SwcObjectVideo';\nexport * from './is/SwcChooseVideo';\nexport * from './is/SwcWhenVideo';\nexport * from './is/SwcOtherVideo';\nexport * from './is/SwcHTMLHeadingElementBase';\nexport * from './is/SwcForOfHeading';\nexport * from './is/SwcIfHeading';\nexport * from './is/SwcObjectHeading';\nexport * from './is/SwcChooseHeading';\nexport * from './is/SwcWhenHeading';\nexport * from './is/SwcOtherHeading';\n"],
|
|
5
|
-
"mappings": "AAAA,OAAO;AACP,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;
|
|
4
|
+
"sourcesContent": ["import 'reflect-metadata';\nexport * from './decorators/elementDefine';\nexport * from './decorators/innerHtml';\nexport * from './decorators/attribute';\nexport * from './decorators/state';\nexport * from './decorators/emitCustomEvent';\nexport * from './decorators/lifecycles';\nexport * from './decorators/query';\nexport * from './decorators/queryAll';\nexport * from './decorators/addEventListener';\nexport * from './elements/SwcHTMLElementBase';\nexport * from './elements/SwcObject';\nexport * from './elements/SwcIf';\nexport * from './elements/SwcForOf';\nexport * from './utils/Utils';\nexport * from './is/SwcHTMLAnchorElementBase';\nexport * from './is/SwcForOfAnchor';\nexport * from './is/SwcIfAnchor';\nexport * from './is/SwcObjectAnchor';\nexport * from './is/SwcChooseAnchor';\nexport * from './is/SwcWhenAnchor';\nexport * from './is/SwcOtherAnchor';\nexport * from './is/SwcHTMLAreaElementBase';\nexport * from './is/SwcForOfArea';\nexport * from './is/SwcIfArea';\nexport * from './is/SwcObjectArea';\nexport * from './is/SwcChooseArea';\nexport * from './is/SwcWhenArea';\nexport * from './is/SwcOtherArea';\nexport * from './is/SwcHTMLAudioElementBase';\nexport * from './is/SwcForOfAudio';\nexport * from './is/SwcIfAudio';\nexport * from './is/SwcObjectAudio';\nexport * from './is/SwcChooseAudio';\nexport * from './is/SwcWhenAudio';\nexport * from './is/SwcOtherAudio';\nexport * from './is/SwcHTMLBaseElementBase';\nexport * from './is/SwcForOfBase';\nexport * from './is/SwcIfBase';\nexport * from './is/SwcObjectBase';\nexport * from './is/SwcChooseBase';\nexport * from './is/SwcWhenBase';\nexport * from './is/SwcOtherBase';\nexport * from './is/SwcHTMLButtonElementBase';\nexport * from './is/SwcForOfButton';\nexport * from './is/SwcIfButton';\nexport * from './is/SwcObjectButton';\nexport * from './is/SwcChooseButton';\nexport * from './is/SwcWhenButton';\nexport * from './is/SwcOtherButton';\nexport * from './is/SwcHTMLCanvasElementBase';\nexport * from './is/SwcForOfCanvas';\nexport * from './is/SwcIfCanvas';\nexport * from './is/SwcObjectCanvas';\nexport * from './is/SwcChooseCanvas';\nexport * from './is/SwcWhenCanvas';\nexport * from './is/SwcOtherCanvas';\nexport * from './is/SwcHTMLDataElementBase';\nexport * from './is/SwcForOfData';\nexport * from './is/SwcIfData';\nexport * from './is/SwcObjectData';\nexport * from './is/SwcChooseData';\nexport * from './is/SwcWhenData';\nexport * from './is/SwcOtherData';\nexport * from './is/SwcHTMLDataListElementBase';\nexport * from './is/SwcForOfDataList';\nexport * from './is/SwcIfDataList';\nexport * from './is/SwcObjectDataList';\nexport * from './is/SwcChooseDataList';\nexport * from './is/SwcWhenDataList';\nexport * from './is/SwcOtherDataList';\nexport * from './is/SwcHTMLDetailsElementBase';\nexport * from './is/SwcForOfDetails';\nexport * from './is/SwcIfDetails';\nexport * from './is/SwcObjectDetails';\nexport * from './is/SwcChooseDetails';\nexport * from './is/SwcWhenDetails';\nexport * from './is/SwcOtherDetails';\nexport * from './is/SwcHTMLDialogElementBase';\nexport * from './is/SwcForOfDialog';\nexport * from './is/SwcIfDialog';\nexport * from './is/SwcObjectDialog';\nexport * from './is/SwcChooseDialog';\nexport * from './is/SwcWhenDialog';\nexport * from './is/SwcOtherDialog';\nexport * from './is/SwcHTMLDivElementBase';\nexport * from './is/SwcForOfDiv';\nexport * from './is/SwcIfDiv';\nexport * from './is/SwcObjectDiv';\nexport * from './is/SwcChooseDiv';\nexport * from './is/SwcWhenDiv';\nexport * from './is/SwcOtherDiv';\nexport * from './is/SwcHTMLDListElementBase';\nexport * from './is/SwcForOfDl';\nexport * from './is/SwcIfDl';\nexport * from './is/SwcObjectDl';\nexport * from './is/SwcChooseDl';\nexport * from './is/SwcWhenDl';\nexport * from './is/SwcOtherDl';\nexport * from './is/SwcHTMLEmbedElementBase';\nexport * from './is/SwcForOfEmbed';\nexport * from './is/SwcIfEmbed';\nexport * from './is/SwcObjectEmbed';\nexport * from './is/SwcChooseEmbed';\nexport * from './is/SwcWhenEmbed';\nexport * from './is/SwcOtherEmbed';\nexport * from './is/SwcHTMLFieldSetElementBase';\nexport * from './is/SwcForOfFieldSet';\nexport * from './is/SwcIfFieldSet';\nexport * from './is/SwcObjectFieldSet';\nexport * from './is/SwcChooseFieldSet';\nexport * from './is/SwcWhenFieldSet';\nexport * from './is/SwcOtherFieldSet';\nexport * from './is/SwcHTMLFormElementBase';\nexport * from './is/SwcForOfForm';\nexport * from './is/SwcIfForm';\nexport * from './is/SwcObjectForm';\nexport * from './is/SwcChooseForm';\nexport * from './is/SwcWhenForm';\nexport * from './is/SwcOtherForm';\nexport * from './is/SwcHTMLHRElementBase';\nexport * from './is/SwcForOfHr';\nexport * from './is/SwcIfHr';\nexport * from './is/SwcObjectHr';\nexport * from './is/SwcChooseHr';\nexport * from './is/SwcWhenHr';\nexport * from './is/SwcOtherHr';\nexport * from './is/SwcHTMLIFrameElementBase';\nexport * from './is/SwcForOfIFrame';\nexport * from './is/SwcIfIFrame';\nexport * from './is/SwcObjectIFrame';\nexport * from './is/SwcChooseIFrame';\nexport * from './is/SwcWhenIFrame';\nexport * from './is/SwcOtherIFrame';\nexport * from './is/SwcHTMLImageElementBase';\nexport * from './is/SwcForOfImage';\nexport * from './is/SwcIfImage';\nexport * from './is/SwcObjectImage';\nexport * from './is/SwcChooseImage';\nexport * from './is/SwcWhenImage';\nexport * from './is/SwcOtherImage';\nexport * from './is/SwcHTMLInputElementBase';\nexport * from './is/SwcForOfInput';\nexport * from './is/SwcIfInput';\nexport * from './is/SwcObjectInput';\nexport * from './is/SwcChooseInput';\nexport * from './is/SwcWhenInput';\nexport * from './is/SwcOtherInput';\nexport * from './is/SwcHTMLLabelElementBase';\nexport * from './is/SwcForOfLabel';\nexport * from './is/SwcIfLabel';\nexport * from './is/SwcObjectLabel';\nexport * from './is/SwcChooseLabel';\nexport * from './is/SwcWhenLabel';\nexport * from './is/SwcOtherLabel';\nexport * from './is/SwcHTMLLegendElementBase';\nexport * from './is/SwcForOfLegend';\nexport * from './is/SwcIfLegend';\nexport * from './is/SwcObjectLegend';\nexport * from './is/SwcChooseLegend';\nexport * from './is/SwcWhenLegend';\nexport * from './is/SwcOtherLegend';\nexport * from './is/SwcHTMLLIElementBase';\nexport * from './is/SwcForOfLi';\nexport * from './is/SwcIfLi';\nexport * from './is/SwcObjectLi';\nexport * from './is/SwcChooseLi';\nexport * from './is/SwcWhenLi';\nexport * from './is/SwcOtherLi';\nexport * from './is/SwcHTMLLinkElementBase';\nexport * from './is/SwcForOfLink';\nexport * from './is/SwcIfLink';\nexport * from './is/SwcObjectLink';\nexport * from './is/SwcChooseLink';\nexport * from './is/SwcWhenLink';\nexport * from './is/SwcOtherLink';\nexport * from './is/SwcHTMLMapElementBase';\nexport * from './is/SwcForOfMap';\nexport * from './is/SwcIfMap';\nexport * from './is/SwcObjectMap';\nexport * from './is/SwcChooseMap';\nexport * from './is/SwcWhenMap';\nexport * from './is/SwcOtherMap';\nexport * from './is/SwcHTMLMetaElementBase';\nexport * from './is/SwcForOfMeta';\nexport * from './is/SwcIfMeta';\nexport * from './is/SwcObjectMeta';\nexport * from './is/SwcChooseMeta';\nexport * from './is/SwcWhenMeta';\nexport * from './is/SwcOtherMeta';\nexport * from './is/SwcHTMLMeterElementBase';\nexport * from './is/SwcForOfMeter';\nexport * from './is/SwcIfMeter';\nexport * from './is/SwcObjectMeter';\nexport * from './is/SwcChooseMeter';\nexport * from './is/SwcWhenMeter';\nexport * from './is/SwcOtherMeter';\nexport * from './is/SwcHTMLModElementBase';\nexport * from './is/SwcForOfMod';\nexport * from './is/SwcIfMod';\nexport * from './is/SwcObjectMod';\nexport * from './is/SwcChooseMod';\nexport * from './is/SwcWhenMod';\nexport * from './is/SwcOtherMod';\nexport * from './is/SwcHTMLObjectElementBase';\nexport * from './is/SwcForOfObject';\nexport * from './is/SwcIfObject';\nexport * from './is/SwcObjectObject';\nexport * from './is/SwcChooseObject';\nexport * from './is/SwcWhenObject';\nexport * from './is/SwcOtherObject';\nexport * from './is/SwcHTMLOListElementBase';\nexport * from './is/SwcForOfOl';\nexport * from './is/SwcIfOl';\nexport * from './is/SwcObjectOl';\nexport * from './is/SwcChooseOl';\nexport * from './is/SwcWhenOl';\nexport * from './is/SwcOtherOl';\nexport * from './is/SwcHTMLOptGroupElementBase';\nexport * from './is/SwcForOfOptGroup';\nexport * from './is/SwcIfOptGroup';\nexport * from './is/SwcObjectOptGroup';\nexport * from './is/SwcChooseOptGroup';\nexport * from './is/SwcWhenOptGroup';\nexport * from './is/SwcOtherOptGroup';\nexport * from './is/SwcHTMLOptionElementBase';\nexport * from './is/SwcForOfOption';\nexport * from './is/SwcIfOption';\nexport * from './is/SwcObjectOption';\nexport * from './is/SwcChooseOption';\nexport * from './is/SwcWhenOption';\nexport * from './is/SwcOtherOption';\nexport * from './is/SwcHTMLOutputElementBase';\nexport * from './is/SwcForOfOutput';\nexport * from './is/SwcIfOutput';\nexport * from './is/SwcObjectOutput';\nexport * from './is/SwcChooseOutput';\nexport * from './is/SwcWhenOutput';\nexport * from './is/SwcOtherOutput';\nexport * from './is/SwcHTMLParagraphElementBase';\nexport * from './is/SwcForOfParagraph';\nexport * from './is/SwcIfParagraph';\nexport * from './is/SwcObjectParagraph';\nexport * from './is/SwcChooseParagraph';\nexport * from './is/SwcWhenParagraph';\nexport * from './is/SwcOtherParagraph';\nexport * from './is/SwcHTMLParamElementBase';\nexport * from './is/SwcForOfParam';\nexport * from './is/SwcIfParam';\nexport * from './is/SwcObjectParam';\nexport * from './is/SwcChooseParam';\nexport * from './is/SwcWhenParam';\nexport * from './is/SwcOtherParam';\nexport * from './is/SwcHTMLPictureElementBase';\nexport * from './is/SwcForOfPicture';\nexport * from './is/SwcIfPicture';\nexport * from './is/SwcObjectPicture';\nexport * from './is/SwcChoosePicture';\nexport * from './is/SwcWhenPicture';\nexport * from './is/SwcOtherPicture';\nexport * from './is/SwcHTMLPreElementBase';\nexport * from './is/SwcForOfPre';\nexport * from './is/SwcIfPre';\nexport * from './is/SwcObjectPre';\nexport * from './is/SwcChoosePre';\nexport * from './is/SwcWhenPre';\nexport * from './is/SwcOtherPre';\nexport * from './is/SwcHTMLProgressElementBase';\nexport * from './is/SwcForOfProgress';\nexport * from './is/SwcIfProgress';\nexport * from './is/SwcObjectProgress';\nexport * from './is/SwcChooseProgress';\nexport * from './is/SwcWhenProgress';\nexport * from './is/SwcOtherProgress';\nexport * from './is/SwcHTMLQuoteElementBase';\nexport * from './is/SwcForOfQuote';\nexport * from './is/SwcIfQuote';\nexport * from './is/SwcObjectQuote';\nexport * from './is/SwcChooseQuote';\nexport * from './is/SwcWhenQuote';\nexport * from './is/SwcOtherQuote';\nexport * from './is/SwcHTMLScriptElementBase';\nexport * from './is/SwcForOfScript';\nexport * from './is/SwcIfScript';\nexport * from './is/SwcObjectScript';\nexport * from './is/SwcChooseScript';\nexport * from './is/SwcWhenScript';\nexport * from './is/SwcOtherScript';\nexport * from './is/SwcHTMLSelectElementBase';\nexport * from './is/SwcForOfSelect';\nexport * from './is/SwcIfSelect';\nexport * from './is/SwcObjectSelect';\nexport * from './is/SwcChooseSelect';\nexport * from './is/SwcWhenSelect';\nexport * from './is/SwcOtherSelect';\nexport * from './is/SwcHTMLSlotElementBase';\nexport * from './is/SwcForOfSlot';\nexport * from './is/SwcIfSlot';\nexport * from './is/SwcObjectSlot';\nexport * from './is/SwcChooseSlot';\nexport * from './is/SwcWhenSlot';\nexport * from './is/SwcOtherSlot';\nexport * from './is/SwcHTMLSourceElementBase';\nexport * from './is/SwcForOfSource';\nexport * from './is/SwcIfSource';\nexport * from './is/SwcObjectSource';\nexport * from './is/SwcChooseSource';\nexport * from './is/SwcWhenSource';\nexport * from './is/SwcOtherSource';\nexport * from './is/SwcHTMLSpanElementBase';\nexport * from './is/SwcForOfSpan';\nexport * from './is/SwcIfSpan';\nexport * from './is/SwcObjectSpan';\nexport * from './is/SwcChooseSpan';\nexport * from './is/SwcWhenSpan';\nexport * from './is/SwcOtherSpan';\nexport * from './is/SwcHTMLStyleElementBase';\nexport * from './is/SwcForOfStyle';\nexport * from './is/SwcIfStyle';\nexport * from './is/SwcObjectStyle';\nexport * from './is/SwcChooseStyle';\nexport * from './is/SwcWhenStyle';\nexport * from './is/SwcOtherStyle';\nexport * from './is/SwcHTMLTableElementBase';\nexport * from './is/SwcForOfTable';\nexport * from './is/SwcIfTable';\nexport * from './is/SwcObjectTable';\nexport * from './is/SwcChooseTable';\nexport * from './is/SwcWhenTable';\nexport * from './is/SwcOtherTable';\nexport * from './is/SwcHTMLTableSectionElementBase';\nexport * from './is/SwcForOfTableSection';\nexport * from './is/SwcIfTableSection';\nexport * from './is/SwcObjectTableSection';\nexport * from './is/SwcChooseTableSection';\nexport * from './is/SwcWhenTableSection';\nexport * from './is/SwcOtherTableSection';\nexport * from './is/SwcHTMLTableCellElementBase';\nexport * from './is/SwcForOfTableCell';\nexport * from './is/SwcIfTableCell';\nexport * from './is/SwcObjectTableCell';\nexport * from './is/SwcChooseTableCell';\nexport * from './is/SwcWhenTableCell';\nexport * from './is/SwcOtherTableCell';\nexport * from './is/SwcHTMLTemplateElementBase';\nexport * from './is/SwcForOfTemplate';\nexport * from './is/SwcIfTemplate';\nexport * from './is/SwcObjectTemplate';\nexport * from './is/SwcChooseTemplate';\nexport * from './is/SwcWhenTemplate';\nexport * from './is/SwcOtherTemplate';\nexport * from './is/SwcHTMLTextAreaElementBase';\nexport * from './is/SwcForOfTextArea';\nexport * from './is/SwcIfTextArea';\nexport * from './is/SwcObjectTextArea';\nexport * from './is/SwcChooseTextArea';\nexport * from './is/SwcWhenTextArea';\nexport * from './is/SwcOtherTextArea';\nexport * from './is/SwcHTMLTimeElementBase';\nexport * from './is/SwcForOfTime';\nexport * from './is/SwcIfTime';\nexport * from './is/SwcObjectTime';\nexport * from './is/SwcChooseTime';\nexport * from './is/SwcWhenTime';\nexport * from './is/SwcOtherTime';\nexport * from './is/SwcHTMLTitleElementBase';\nexport * from './is/SwcForOfTitle';\nexport * from './is/SwcIfTitle';\nexport * from './is/SwcObjectTitle';\nexport * from './is/SwcChooseTitle';\nexport * from './is/SwcWhenTitle';\nexport * from './is/SwcOtherTitle';\nexport * from './is/SwcHTMLTableRowElementBase';\nexport * from './is/SwcForOfTableRow';\nexport * from './is/SwcIfTableRow';\nexport * from './is/SwcObjectTableRow';\nexport * from './is/SwcChooseTableRow';\nexport * from './is/SwcWhenTableRow';\nexport * from './is/SwcOtherTableRow';\nexport * from './is/SwcHTMLTrackElementBase';\nexport * from './is/SwcForOfTrack';\nexport * from './is/SwcIfTrack';\nexport * from './is/SwcObjectTrack';\nexport * from './is/SwcChooseTrack';\nexport * from './is/SwcWhenTrack';\nexport * from './is/SwcOtherTrack';\nexport * from './is/SwcHTMLUListElementBase';\nexport * from './is/SwcForOfUl';\nexport * from './is/SwcIfUl';\nexport * from './is/SwcObjectUl';\nexport * from './is/SwcChooseUl';\nexport * from './is/SwcWhenUl';\nexport * from './is/SwcOtherUl';\nexport * from './is/SwcHTMLVideoElementBase';\nexport * from './is/SwcForOfVideo';\nexport * from './is/SwcIfVideo';\nexport * from './is/SwcObjectVideo';\nexport * from './is/SwcChooseVideo';\nexport * from './is/SwcWhenVideo';\nexport * from './is/SwcOtherVideo';\nexport * from './is/SwcHTMLHeadingElementBase';\nexport * from './is/SwcForOfHeading';\nexport * from './is/SwcIfHeading';\nexport * from './is/SwcObjectHeading';\nexport * from './is/SwcChooseHeading';\nexport * from './is/SwcWhenHeading';\nexport * from './is/SwcOtherHeading';\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO;AACP,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/is/SwcChooseAnchor.ts"],
|
|
4
|
-
"sourcesContent": ["import { elementDefine } from '../index';\nimport { SwcHTMLAnchorElementBase } from './SwcHTMLAnchorElementBase';\n\ninterface Branch {\n tpl: HTMLElement;\n test: string | null;\n}\n\n@elementDefine({ name: 'swc-choose-a', extends: 'a' })\nexport class SwcChooseAnchor extends SwcHTMLAnchorElementBase {\n private _observer: MutationObserver | null = null;\n private _swcValue: any = undefined;\n private _branches: Branch[] = [];\n private _otherBranch: Branch | null = null;\n private _isInitialized = false;\n\n set swcValue(val: any) { this._swcValue = val; this.evaluate(); }\n get swcValue() { return this._swcValue; }\n\n connectedCallback() {\n this.style.display = 'contents';\n this._initBranches();\n this._observer = new MutationObserver(() => this.evaluate());\n this._observer.observe(this, { attributes: true });\n this.evaluate();\n }\n\n private _initBranches() {\n if (this._isInitialized) return;\n const children = Array.from(this.children);\n children.forEach(c => {\n const isWhen = c.localName === 'swc-when' || c.getAttribute('is')?.startsWith('swc-when-');\n const isOther = c.localName === 'swc-other' || c.getAttribute('is')?.startsWith('swc-other-');\n const branch: Branch = {\n tpl: c.cloneNode(true) as HTMLElement,\n test: c.getAttribute('test')\n };\n if (isWhen) this._branches.push(branch);\n else if (isOther) this._otherBranch = branch;\n });\n this.innerHTML = '';\n this._isInitialized = true;\n }\n\n disconnectedCallback() { this._observer?.disconnect(); }\n\n private evaluate() {\n if (!this._isInitialized) return;\n let matched = false;\n const chooseValue = this.getAttribute('swc-value') ?? this.getAttribute('value') ?? this._swcValue;\n this.innerHTML = '';\n\n for (const branch of this._branches) {\n if (matched) break;\n const testAttr = branch.test;\n if (testAttr === null || testAttr.includes('{{')) continue;\n let isMet = false;\n if (chooseValue !== undefined && chooseValue !== null) { isMet = String(chooseValue) === String(testAttr); }\n else { try { if (testAttr === 'true') isMet = true; else if (testAttr === 'false') isMet = false; else isMet = !!new Function('return ' + testAttr)(); } catch (e) { isMet = false; } }\n\n if (isMet) {\n this._renderBranch(branch);\n matched = true;\n }\n }\n\n if (!matched && this._otherBranch) { this._renderBranch(this._otherBranch); }\n }\n\n private _renderBranch(branch: Branch) {\n const clone = branch.tpl.cloneNode(true) as HTMLElement;\n
|
|
5
|
-
"mappings": ";;;;;;AAAA,SAAS,qBAAqB;AAC9B,SAAS,gCAAgC;AAQlC,IAAM,kBAAN,MAAMA,yBAAwB,yBAAwB;EAAtD,cAAA;;AACG,SAAA,YAAqC;AACrC,SAAA,YAAiB;AACjB,SAAA,YAAsB,CAAA;AACtB,SAAA,eAA8B;AAC9B,SAAA,iBAAiB;
|
|
4
|
+
"sourcesContent": ["import { elementDefine } from '../index';\nimport { SwcHTMLAnchorElementBase } from './SwcHTMLAnchorElementBase';\n\ninterface Branch {\n tpl: HTMLElement;\n test: string | null;\n}\n\n@elementDefine({ name: 'swc-choose-a', extends: 'a' })\nexport class SwcChooseAnchor extends SwcHTMLAnchorElementBase {\n private _observer: MutationObserver | null = null;\n private _swcValue: any = undefined;\n private _branches: Branch[] = [];\n private _otherBranch: Branch | null = null;\n private _isInitialized = false;\n\n set swcValue(val: any) { this._swcValue = val; this.evaluate(); }\n get swcValue() { return this._swcValue; }\n\n connectedCallback() {\n this.style.display = 'contents';\n this._initBranches();\n this._observer = new MutationObserver(() => this.evaluate());\n this._observer.observe(this, { attributes: true });\n this.evaluate();\n }\n\n private _initBranches() {\n if (this._isInitialized) return;\n const children = Array.from(this.children);\n children.forEach(c => {\n const isWhen = c.localName === 'swc-when' || c.getAttribute('is')?.startsWith('swc-when-');\n const isOther = c.localName === 'swc-other' || c.getAttribute('is')?.startsWith('swc-other-');\n const branch: Branch = {\n tpl: c.cloneNode(true) as HTMLElement,\n test: c.getAttribute('test')\n };\n if (isWhen) this._branches.push(branch);\n else if (isOther) this._otherBranch = branch;\n });\n this.innerHTML = '';\n this._isInitialized = true;\n }\n\n disconnectedCallback() { this._observer?.disconnect(); }\n\n private evaluate() {\n if (!this._isInitialized) return;\n let matched = false;\n const chooseValue = this.getAttribute('swc-value') ?? this.getAttribute('value') ?? this._swcValue;\n this.innerHTML = '';\n\n for (const branch of this._branches) {\n if (matched) break;\n const testAttr = branch.test;\n if (testAttr === null || testAttr.includes('{{')) continue;\n let isMet = false;\n if (chooseValue !== undefined && chooseValue !== null) { isMet = String(chooseValue) === String(testAttr); }\n else { try { if (testAttr === 'true') isMet = true; else if (testAttr === 'false') isMet = false; else isMet = !!new Function('return ' + testAttr)(); } catch (e) { isMet = false; } }\n\n if (isMet) {\n this._renderBranch(branch);\n matched = true;\n }\n }\n\n if (!matched && this._otherBranch) { this._renderBranch(this._otherBranch); }\n }\n\n private _renderBranch(branch: Branch) {\n const clone = branch.tpl.cloneNode(true) as HTMLElement;\n clone.style.display = 'contents';\n this.appendChild(clone);\n this.applyData(clone, this._swcValue);\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;AAAA,SAAS,qBAAqB;AAC9B,SAAS,gCAAgC;AAQlC,IAAM,kBAAN,MAAMA,yBAAwB,yBAAwB;EAAtD,cAAA;;AACG,SAAA,YAAqC;AACrC,SAAA,YAAiB;AACjB,SAAA,YAAsB,CAAA;AACtB,SAAA,eAA8B;AAC9B,SAAA,iBAAiB;EA6D3B;EA3DE,IAAI,SAAS,KAAQ;AAAI,SAAK,YAAY;AAAK,SAAK,SAAQ;EAAI;EAChE,IAAI,WAAQ;AAAK,WAAO,KAAK;EAAW;EAExC,oBAAiB;AACf,SAAK,MAAM,UAAU;AACrB,SAAK,cAAa;AAClB,SAAK,YAAY,IAAI,iBAAiB,MAAM,KAAK,SAAQ,CAAE;AAC3D,SAAK,UAAU,QAAQ,MAAM,EAAE,YAAY,KAAI,CAAE;AACjD,SAAK,SAAQ;EACf;EAEQ,gBAAa;AACnB,QAAI,KAAK;AAAgB;AACzB,UAAM,WAAW,MAAM,KAAK,KAAK,QAAQ;AACzC,aAAS,QAAQ,OAA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AK,UAAU,OAAO,KAAK,SAAS;EACtC;;AAjEW,kBAAe,WAAA;EAD3B,cAAc,EAAE,MAAM,gBAAgB,SAAS,IAAG,CAAE;GACxC,eAAe;",
|
|
6
6
|
"names": ["SwcChooseAnchor"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/is/SwcChooseArea.ts"],
|
|
4
|
-
"sourcesContent": ["import { elementDefine } from '../index';\nimport { SwcHTMLAreaElementBase } from './SwcHTMLAreaElementBase';\n\ninterface Branch {\n tpl: HTMLElement;\n test: string | null;\n}\n\n@elementDefine({ name: 'swc-choose-area', extends: 'area' })\nexport class SwcChooseArea extends SwcHTMLAreaElementBase {\n private _observer: MutationObserver | null = null;\n private _swcValue: any = undefined;\n private _branches: Branch[] = [];\n private _otherBranch: Branch | null = null;\n private _isInitialized = false;\n\n set swcValue(val: any) { this._swcValue = val; this.evaluate(); }\n get swcValue() { return this._swcValue; }\n\n connectedCallback() {\n this.style.display = 'contents';\n this._initBranches();\n this._observer = new MutationObserver(() => this.evaluate());\n this._observer.observe(this, { attributes: true });\n this.evaluate();\n }\n\n private _initBranches() {\n if (this._isInitialized) return;\n const children = Array.from(this.children);\n children.forEach(c => {\n const isWhen = c.localName === 'swc-when' || c.getAttribute('is')?.startsWith('swc-when-');\n const isOther = c.localName === 'swc-other' || c.getAttribute('is')?.startsWith('swc-other-');\n const branch: Branch = {\n tpl: c.cloneNode(true) as HTMLElement,\n test: c.getAttribute('test')\n };\n if (isWhen) this._branches.push(branch);\n else if (isOther) this._otherBranch = branch;\n });\n this.innerHTML = '';\n this._isInitialized = true;\n }\n\n disconnectedCallback() { this._observer?.disconnect(); }\n\n private evaluate() {\n if (!this._isInitialized) return;\n let matched = false;\n const chooseValue = this.getAttribute('swc-value') ?? this.getAttribute('value') ?? this._swcValue;\n this.innerHTML = '';\n\n for (const branch of this._branches) {\n if (matched) break;\n const testAttr = branch.test;\n if (testAttr === null || testAttr.includes('{{')) continue;\n let isMet = false;\n if (chooseValue !== undefined && chooseValue !== null) { isMet = String(chooseValue) === String(testAttr); }\n else { try { if (testAttr === 'true') isMet = true; else if (testAttr === 'false') isMet = false; else isMet = !!new Function('return ' + testAttr)(); } catch (e) { isMet = false; } }\n\n if (isMet) {\n this._renderBranch(branch);\n matched = true;\n }\n }\n\n if (!matched && this._otherBranch) { this._renderBranch(this._otherBranch); }\n }\n\n private _renderBranch(branch: Branch) {\n const clone = branch.tpl.cloneNode(true) as HTMLElement;\n
|
|
5
|
-
"mappings": ";;;;;;AAAA,SAAS,qBAAqB;AAC9B,SAAS,8BAA8B;AAQhC,IAAM,gBAAN,MAAMA,uBAAsB,uBAAsB;EAAlD,cAAA;;AACG,SAAA,YAAqC;AACrC,SAAA,YAAiB;AACjB,SAAA,YAAsB,CAAA;AACtB,SAAA,eAA8B;AAC9B,SAAA,iBAAiB;
|
|
4
|
+
"sourcesContent": ["import { elementDefine } from '../index';\nimport { SwcHTMLAreaElementBase } from './SwcHTMLAreaElementBase';\n\ninterface Branch {\n tpl: HTMLElement;\n test: string | null;\n}\n\n@elementDefine({ name: 'swc-choose-area', extends: 'area' })\nexport class SwcChooseArea extends SwcHTMLAreaElementBase {\n private _observer: MutationObserver | null = null;\n private _swcValue: any = undefined;\n private _branches: Branch[] = [];\n private _otherBranch: Branch | null = null;\n private _isInitialized = false;\n\n set swcValue(val: any) { this._swcValue = val; this.evaluate(); }\n get swcValue() { return this._swcValue; }\n\n connectedCallback() {\n this.style.display = 'contents';\n this._initBranches();\n this._observer = new MutationObserver(() => this.evaluate());\n this._observer.observe(this, { attributes: true });\n this.evaluate();\n }\n\n private _initBranches() {\n if (this._isInitialized) return;\n const children = Array.from(this.children);\n children.forEach(c => {\n const isWhen = c.localName === 'swc-when' || c.getAttribute('is')?.startsWith('swc-when-');\n const isOther = c.localName === 'swc-other' || c.getAttribute('is')?.startsWith('swc-other-');\n const branch: Branch = {\n tpl: c.cloneNode(true) as HTMLElement,\n test: c.getAttribute('test')\n };\n if (isWhen) this._branches.push(branch);\n else if (isOther) this._otherBranch = branch;\n });\n this.innerHTML = '';\n this._isInitialized = true;\n }\n\n disconnectedCallback() { this._observer?.disconnect(); }\n\n private evaluate() {\n if (!this._isInitialized) return;\n let matched = false;\n const chooseValue = this.getAttribute('swc-value') ?? this.getAttribute('value') ?? this._swcValue;\n this.innerHTML = '';\n\n for (const branch of this._branches) {\n if (matched) break;\n const testAttr = branch.test;\n if (testAttr === null || testAttr.includes('{{')) continue;\n let isMet = false;\n if (chooseValue !== undefined && chooseValue !== null) { isMet = String(chooseValue) === String(testAttr); }\n else { try { if (testAttr === 'true') isMet = true; else if (testAttr === 'false') isMet = false; else isMet = !!new Function('return ' + testAttr)(); } catch (e) { isMet = false; } }\n\n if (isMet) {\n this._renderBranch(branch);\n matched = true;\n }\n }\n\n if (!matched && this._otherBranch) { this._renderBranch(this._otherBranch); }\n }\n\n private _renderBranch(branch: Branch) {\n const clone = branch.tpl.cloneNode(true) as HTMLElement;\n clone.style.display = 'contents';\n this.appendChild(clone);\n this.applyData(clone, this._swcValue);\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;AAAA,SAAS,qBAAqB;AAC9B,SAAS,8BAA8B;AAQhC,IAAM,gBAAN,MAAMA,uBAAsB,uBAAsB;EAAlD,cAAA;;AACG,SAAA,YAAqC;AACrC,SAAA,YAAiB;AACjB,SAAA,YAAsB,CAAA;AACtB,SAAA,eAA8B;AAC9B,SAAA,iBAAiB;EA6D3B;EA3DE,IAAI,SAAS,KAAQ;AAAI,SAAK,YAAY;AAAK,SAAK,SAAQ;EAAI;EAChE,IAAI,WAAQ;AAAK,WAAO,KAAK;EAAW;EAExC,oBAAiB;AACf,SAAK,MAAM,UAAU;AACrB,SAAK,cAAa;AAClB,SAAK,YAAY,IAAI,iBAAiB,MAAM,KAAK,SAAQ,CAAE;AAC3D,SAAK,UAAU,QAAQ,MAAM,EAAE,YAAY,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AK,YAAY;IAAG;EAC9E;EAEQ,cAAc,QAAc;AAClC,UAAM,QAAQ,OAAO,IAAI,UAAU,IAAI;AACvC,UAAM,MAAM,UAAU;AACtB,SAAK,YAAY,KAAK;AACtB,SAAK,UAAU,OAAO,KAAK,SAAS;EACtC;;AAjEW,gBAAa,WAAA;EADzB,cAAc,EAAE,MAAM,mBAAmB,SAAS,OAAM,CAAE;GAC9C,aAAa;",
|
|
6
6
|
"names": ["SwcChooseArea"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/is/SwcChooseAudio.ts"],
|
|
4
|
-
"sourcesContent": ["import { elementDefine } from '../index';\nimport { SwcHTMLAudioElementBase } from './SwcHTMLAudioElementBase';\n\ninterface Branch {\n tpl: HTMLElement;\n test: string | null;\n}\n\n@elementDefine({ name: 'swc-choose-audio', extends: 'audio' })\nexport class SwcChooseAudio extends SwcHTMLAudioElementBase {\n private _observer: MutationObserver | null = null;\n private _swcValue: any = undefined;\n private _branches: Branch[] = [];\n private _otherBranch: Branch | null = null;\n private _isInitialized = false;\n\n set swcValue(val: any) { this._swcValue = val; this.evaluate(); }\n get swcValue() { return this._swcValue; }\n\n connectedCallback() {\n this.style.display = 'contents';\n this._initBranches();\n this._observer = new MutationObserver(() => this.evaluate());\n this._observer.observe(this, { attributes: true });\n this.evaluate();\n }\n\n private _initBranches() {\n if (this._isInitialized) return;\n const children = Array.from(this.children);\n children.forEach(c => {\n const isWhen = c.localName === 'swc-when' || c.getAttribute('is')?.startsWith('swc-when-');\n const isOther = c.localName === 'swc-other' || c.getAttribute('is')?.startsWith('swc-other-');\n const branch: Branch = {\n tpl: c.cloneNode(true) as HTMLElement,\n test: c.getAttribute('test')\n };\n if (isWhen) this._branches.push(branch);\n else if (isOther) this._otherBranch = branch;\n });\n this.innerHTML = '';\n this._isInitialized = true;\n }\n\n disconnectedCallback() { this._observer?.disconnect(); }\n\n private evaluate() {\n if (!this._isInitialized) return;\n let matched = false;\n const chooseValue = this.getAttribute('swc-value') ?? this.getAttribute('value') ?? this._swcValue;\n this.innerHTML = '';\n\n for (const branch of this._branches) {\n if (matched) break;\n const testAttr = branch.test;\n if (testAttr === null || testAttr.includes('{{')) continue;\n let isMet = false;\n if (chooseValue !== undefined && chooseValue !== null) { isMet = String(chooseValue) === String(testAttr); }\n else { try { if (testAttr === 'true') isMet = true; else if (testAttr === 'false') isMet = false; else isMet = !!new Function('return ' + testAttr)(); } catch (e) { isMet = false; } }\n\n if (isMet) {\n this._renderBranch(branch);\n matched = true;\n }\n }\n\n if (!matched && this._otherBranch) { this._renderBranch(this._otherBranch); }\n }\n\n private _renderBranch(branch: Branch) {\n const clone = branch.tpl.cloneNode(true) as HTMLElement;\n
|
|
5
|
-
"mappings": ";;;;;;AAAA,SAAS,qBAAqB;AAC9B,SAAS,+BAA+B;AAQjC,IAAM,iBAAN,MAAMA,wBAAuB,wBAAuB;EAApD,cAAA;;AACG,SAAA,YAAqC;AACrC,SAAA,YAAiB;AACjB,SAAA,YAAsB,CAAA;AACtB,SAAA,eAA8B;AAC9B,SAAA,iBAAiB;
|
|
4
|
+
"sourcesContent": ["import { elementDefine } from '../index';\nimport { SwcHTMLAudioElementBase } from './SwcHTMLAudioElementBase';\n\ninterface Branch {\n tpl: HTMLElement;\n test: string | null;\n}\n\n@elementDefine({ name: 'swc-choose-audio', extends: 'audio' })\nexport class SwcChooseAudio extends SwcHTMLAudioElementBase {\n private _observer: MutationObserver | null = null;\n private _swcValue: any = undefined;\n private _branches: Branch[] = [];\n private _otherBranch: Branch | null = null;\n private _isInitialized = false;\n\n set swcValue(val: any) { this._swcValue = val; this.evaluate(); }\n get swcValue() { return this._swcValue; }\n\n connectedCallback() {\n this.style.display = 'contents';\n this._initBranches();\n this._observer = new MutationObserver(() => this.evaluate());\n this._observer.observe(this, { attributes: true });\n this.evaluate();\n }\n\n private _initBranches() {\n if (this._isInitialized) return;\n const children = Array.from(this.children);\n children.forEach(c => {\n const isWhen = c.localName === 'swc-when' || c.getAttribute('is')?.startsWith('swc-when-');\n const isOther = c.localName === 'swc-other' || c.getAttribute('is')?.startsWith('swc-other-');\n const branch: Branch = {\n tpl: c.cloneNode(true) as HTMLElement,\n test: c.getAttribute('test')\n };\n if (isWhen) this._branches.push(branch);\n else if (isOther) this._otherBranch = branch;\n });\n this.innerHTML = '';\n this._isInitialized = true;\n }\n\n disconnectedCallback() { this._observer?.disconnect(); }\n\n private evaluate() {\n if (!this._isInitialized) return;\n let matched = false;\n const chooseValue = this.getAttribute('swc-value') ?? this.getAttribute('value') ?? this._swcValue;\n this.innerHTML = '';\n\n for (const branch of this._branches) {\n if (matched) break;\n const testAttr = branch.test;\n if (testAttr === null || testAttr.includes('{{')) continue;\n let isMet = false;\n if (chooseValue !== undefined && chooseValue !== null) { isMet = String(chooseValue) === String(testAttr); }\n else { try { if (testAttr === 'true') isMet = true; else if (testAttr === 'false') isMet = false; else isMet = !!new Function('return ' + testAttr)(); } catch (e) { isMet = false; } }\n\n if (isMet) {\n this._renderBranch(branch);\n matched = true;\n }\n }\n\n if (!matched && this._otherBranch) { this._renderBranch(this._otherBranch); }\n }\n\n private _renderBranch(branch: Branch) {\n const clone = branch.tpl.cloneNode(true) as HTMLElement;\n clone.style.display = 'contents';\n this.appendChild(clone);\n this.applyData(clone, this._swcValue);\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;AAAA,SAAS,qBAAqB;AAC9B,SAAS,+BAA+B;AAQjC,IAAM,iBAAN,MAAMA,wBAAuB,wBAAuB;EAApD,cAAA;;AACG,SAAA,YAAqC;AACrC,SAAA,YAAiB;AACjB,SAAA,YAAsB,CAAA;AACtB,SAAA,eAA8B;AAC9B,SAAA,iBAAiB;EA6D3B;EA3DE,IAAI,SAAS,KAAQ;AAAI,SAAK,YAAY;AAAK,SAAK,SAAQ;EAAI;EAChE,IAAI,WAAQ;AAAK,WAAO,KAAK;EAAW;EAExC,oBAAi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E,kBAAQ;QAAO;MAAE;AAEtL,UAAI,OAAO;AACT,aAAK,cAAc,MAAM;AACzB,kBAAU;MACZ;IACF;AAEA,QAAI,CAAC,WAAW,KAAK,cAAc;AAAE,WAAK,cAAc,KAAK,YAAY;IAAG;EAC9E;EAEQ,cAAc,QAAc;AAClC,UAAM,QAAQ,OAAO,IAAI,UAAU,IAAI;AACvC,UAAM,MAAM,UAAU;AACtB,SAAK,YAAY,KAAK;AACtB,SAAK,UAAU,OAAO,KAAK,SAAS;EACtC;;AAjEW,iBAAc,WAAA;EAD1B,cAAc,EAAE,MAAM,oBAAoB,SAAS,QAAO,CAAE;GAChD,cAAc;",
|
|
6
6
|
"names": ["SwcChooseAudio"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/is/SwcChooseBase.ts"],
|
|
4
|
-
"sourcesContent": ["import { elementDefine } from '../index';\nimport { SwcHTMLBaseElementBase } from './SwcHTMLBaseElementBase';\n\ninterface Branch {\n tpl: HTMLElement;\n test: string | null;\n}\n\n@elementDefine({ name: 'swc-choose-base', extends: 'base' })\nexport class SwcChooseBase extends SwcHTMLBaseElementBase {\n private _observer: MutationObserver | null = null;\n private _swcValue: any = undefined;\n private _branches: Branch[] = [];\n private _otherBranch: Branch | null = null;\n private _isInitialized = false;\n\n set swcValue(val: any) { this._swcValue = val; this.evaluate(); }\n get swcValue() { return this._swcValue; }\n\n connectedCallback() {\n this.style.display = 'contents';\n this._initBranches();\n this._observer = new MutationObserver(() => this.evaluate());\n this._observer.observe(this, { attributes: true });\n this.evaluate();\n }\n\n private _initBranches() {\n if (this._isInitialized) return;\n const children = Array.from(this.children);\n children.forEach(c => {\n const isWhen = c.localName === 'swc-when' || c.getAttribute('is')?.startsWith('swc-when-');\n const isOther = c.localName === 'swc-other' || c.getAttribute('is')?.startsWith('swc-other-');\n const branch: Branch = {\n tpl: c.cloneNode(true) as HTMLElement,\n test: c.getAttribute('test')\n };\n if (isWhen) this._branches.push(branch);\n else if (isOther) this._otherBranch = branch;\n });\n this.innerHTML = '';\n this._isInitialized = true;\n }\n\n disconnectedCallback() { this._observer?.disconnect(); }\n\n private evaluate() {\n if (!this._isInitialized) return;\n let matched = false;\n const chooseValue = this.getAttribute('swc-value') ?? this.getAttribute('value') ?? this._swcValue;\n this.innerHTML = '';\n\n for (const branch of this._branches) {\n if (matched) break;\n const testAttr = branch.test;\n if (testAttr === null || testAttr.includes('{{')) continue;\n let isMet = false;\n if (chooseValue !== undefined && chooseValue !== null) { isMet = String(chooseValue) === String(testAttr); }\n else { try { if (testAttr === 'true') isMet = true; else if (testAttr === 'false') isMet = false; else isMet = !!new Function('return ' + testAttr)(); } catch (e) { isMet = false; } }\n\n if (isMet) {\n this._renderBranch(branch);\n matched = true;\n }\n }\n\n if (!matched && this._otherBranch) { this._renderBranch(this._otherBranch); }\n }\n\n private _renderBranch(branch: Branch) {\n const clone = branch.tpl.cloneNode(true) as HTMLElement;\n
|
|
5
|
-
"mappings": ";;;;;;AAAA,SAAS,qBAAqB;AAC9B,SAAS,8BAA8B;AAQhC,IAAM,gBAAN,MAAMA,uBAAsB,uBAAsB;EAAlD,cAAA;;AACG,SAAA,YAAqC;AACrC,SAAA,YAAiB;AACjB,SAAA,YAAsB,CAAA;AACtB,SAAA,eAA8B;AAC9B,SAAA,iBAAiB;
|
|
4
|
+
"sourcesContent": ["import { elementDefine } from '../index';\nimport { SwcHTMLBaseElementBase } from './SwcHTMLBaseElementBase';\n\ninterface Branch {\n tpl: HTMLElement;\n test: string | null;\n}\n\n@elementDefine({ name: 'swc-choose-base', extends: 'base' })\nexport class SwcChooseBase extends SwcHTMLBaseElementBase {\n private _observer: MutationObserver | null = null;\n private _swcValue: any = undefined;\n private _branches: Branch[] = [];\n private _otherBranch: Branch | null = null;\n private _isInitialized = false;\n\n set swcValue(val: any) { this._swcValue = val; this.evaluate(); }\n get swcValue() { return this._swcValue; }\n\n connectedCallback() {\n this.style.display = 'contents';\n this._initBranches();\n this._observer = new MutationObserver(() => this.evaluate());\n this._observer.observe(this, { attributes: true });\n this.evaluate();\n }\n\n private _initBranches() {\n if (this._isInitialized) return;\n const children = Array.from(this.children);\n children.forEach(c => {\n const isWhen = c.localName === 'swc-when' || c.getAttribute('is')?.startsWith('swc-when-');\n const isOther = c.localName === 'swc-other' || c.getAttribute('is')?.startsWith('swc-other-');\n const branch: Branch = {\n tpl: c.cloneNode(true) as HTMLElement,\n test: c.getAttribute('test')\n };\n if (isWhen) this._branches.push(branch);\n else if (isOther) this._otherBranch = branch;\n });\n this.innerHTML = '';\n this._isInitialized = true;\n }\n\n disconnectedCallback() { this._observer?.disconnect(); }\n\n private evaluate() {\n if (!this._isInitialized) return;\n let matched = false;\n const chooseValue = this.getAttribute('swc-value') ?? this.getAttribute('value') ?? this._swcValue;\n this.innerHTML = '';\n\n for (const branch of this._branches) {\n if (matched) break;\n const testAttr = branch.test;\n if (testAttr === null || testAttr.includes('{{')) continue;\n let isMet = false;\n if (chooseValue !== undefined && chooseValue !== null) { isMet = String(chooseValue) === String(testAttr); }\n else { try { if (testAttr === 'true') isMet = true; else if (testAttr === 'false') isMet = false; else isMet = !!new Function('return ' + testAttr)(); } catch (e) { isMet = false; } }\n\n if (isMet) {\n this._renderBranch(branch);\n matched = true;\n }\n }\n\n if (!matched && this._otherBranch) { this._renderBranch(this._otherBranch); }\n }\n\n private _renderBranch(branch: Branch) {\n const clone = branch.tpl.cloneNode(true) as HTMLElement;\n clone.style.display = 'contents';\n this.appendChild(clone);\n this.applyData(clone, this._swcValue);\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;AAAA,SAAS,qBAAqB;AAC9B,SAAS,8BAA8B;AAQhC,IAAM,gBAAN,MAAMA,uBAAsB,uBAAsB;EAAlD,cAAA;;AACG,SAAA,YAAqC;AACrC,SAAA,YAAiB;AACjB,SAAA,YAAsB,CAAA;AACtB,SAAA,eAA8B;AAC9B,SAAA,i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AAE,cAAI,aAAa;AAAQ,oBAAQ;mBAAe,aAAa;AAAS,oBAAQ;;AAAY,oBAAQ,CAAC,CAAC,IAAI,SAAS,YAAY,QAAQ,EAAC;QAAI,SAAS,GAAG;AAAE,kBAAQ;QAAO;MAAE;AAEtL,UAAI,OAAO;AACT,aAAK,cAAc,MAAM;AACzB,kBAAU;MACZ;IACF;AAEA,QAAI,CAAC,WAAW,KAAK,cAAc;AAAE,WAAK,cAAc,KAAK,YAAY;IAAG;EAC9E;EAEQ,cAAc,QAAc;AAClC,UAAM,QAAQ,OAAO,IAAI,UAAU,IAAI;AACvC,UAAM,MAAM,UAAU;AACtB,SAAK,YAAY,KAAK;AACtB,SAAK,UAAU,OAAO,KAAK,SAAS;EACtC;;AAjEW,gBAAa,WAAA;EADzB,cAAc,EAAE,MAAM,mBAAmB,SAAS,OAAM,CAAE;GAC9C,aAAa;",
|
|
6
6
|
"names": ["SwcChooseBase"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/is/SwcChooseButton.ts"],
|
|
4
|
-
"sourcesContent": ["import { elementDefine } from '../index';\nimport { SwcHTMLButtonElementBase } from './SwcHTMLButtonElementBase';\n\ninterface Branch {\n tpl: HTMLElement;\n test: string | null;\n}\n\n@elementDefine({ name: 'swc-choose-button', extends: 'button' })\nexport class SwcChooseButton extends SwcHTMLButtonElementBase {\n private _observer: MutationObserver | null = null;\n private _swcValue: any = undefined;\n private _branches: Branch[] = [];\n private _otherBranch: Branch | null = null;\n private _isInitialized = false;\n\n set swcValue(val: any) { this._swcValue = val; this.evaluate(); }\n get swcValue() { return this._swcValue; }\n\n connectedCallback() {\n this.style.display = 'contents';\n this._initBranches();\n this._observer = new MutationObserver(() => this.evaluate());\n this._observer.observe(this, { attributes: true });\n this.evaluate();\n }\n\n private _initBranches() {\n if (this._isInitialized) return;\n const children = Array.from(this.children);\n children.forEach(c => {\n const isWhen = c.localName === 'swc-when' || c.getAttribute('is')?.startsWith('swc-when-');\n const isOther = c.localName === 'swc-other' || c.getAttribute('is')?.startsWith('swc-other-');\n const branch: Branch = {\n tpl: c.cloneNode(true) as HTMLElement,\n test: c.getAttribute('test')\n };\n if (isWhen) this._branches.push(branch);\n else if (isOther) this._otherBranch = branch;\n });\n this.innerHTML = '';\n this._isInitialized = true;\n }\n\n disconnectedCallback() { this._observer?.disconnect(); }\n\n private evaluate() {\n if (!this._isInitialized) return;\n let matched = false;\n const chooseValue = this.getAttribute('swc-value') ?? this.getAttribute('value') ?? this._swcValue;\n this.innerHTML = '';\n\n for (const branch of this._branches) {\n if (matched) break;\n const testAttr = branch.test;\n if (testAttr === null || testAttr.includes('{{')) continue;\n let isMet = false;\n if (chooseValue !== undefined && chooseValue !== null) { isMet = String(chooseValue) === String(testAttr); }\n else { try { if (testAttr === 'true') isMet = true; else if (testAttr === 'false') isMet = false; else isMet = !!new Function('return ' + testAttr)(); } catch (e) { isMet = false; } }\n\n if (isMet) {\n this._renderBranch(branch);\n matched = true;\n }\n }\n\n if (!matched && this._otherBranch) { this._renderBranch(this._otherBranch); }\n }\n\n private _renderBranch(branch: Branch) {\n const clone = branch.tpl.cloneNode(true) as HTMLElement;\n
|
|
5
|
-
"mappings": ";;;;;;AAAA,SAAS,qBAAqB;AAC9B,SAAS,gCAAgC;AAQlC,IAAM,kBAAN,MAAMA,yBAAwB,yBAAwB;EAAtD,cAAA;;AACG,SAAA,YAAqC;AACrC,SAAA,YAAiB;AACjB,SAAA,YAAsB,CAAA;AACtB,SAAA,eAA8B;AAC9B,SAAA,iBAAiB;
|
|
4
|
+
"sourcesContent": ["import { elementDefine } from '../index';\nimport { SwcHTMLButtonElementBase } from './SwcHTMLButtonElementBase';\n\ninterface Branch {\n tpl: HTMLElement;\n test: string | null;\n}\n\n@elementDefine({ name: 'swc-choose-button', extends: 'button' })\nexport class SwcChooseButton extends SwcHTMLButtonElementBase {\n private _observer: MutationObserver | null = null;\n private _swcValue: any = undefined;\n private _branches: Branch[] = [];\n private _otherBranch: Branch | null = null;\n private _isInitialized = false;\n\n set swcValue(val: any) { this._swcValue = val; this.evaluate(); }\n get swcValue() { return this._swcValue; }\n\n connectedCallback() {\n this.style.display = 'contents';\n this._initBranches();\n this._observer = new MutationObserver(() => this.evaluate());\n this._observer.observe(this, { attributes: true });\n this.evaluate();\n }\n\n private _initBranches() {\n if (this._isInitialized) return;\n const children = Array.from(this.children);\n children.forEach(c => {\n const isWhen = c.localName === 'swc-when' || c.getAttribute('is')?.startsWith('swc-when-');\n const isOther = c.localName === 'swc-other' || c.getAttribute('is')?.startsWith('swc-other-');\n const branch: Branch = {\n tpl: c.cloneNode(true) as HTMLElement,\n test: c.getAttribute('test')\n };\n if (isWhen) this._branches.push(branch);\n else if (isOther) this._otherBranch = branch;\n });\n this.innerHTML = '';\n this._isInitialized = true;\n }\n\n disconnectedCallback() { this._observer?.disconnect(); }\n\n private evaluate() {\n if (!this._isInitialized) return;\n let matched = false;\n const chooseValue = this.getAttribute('swc-value') ?? this.getAttribute('value') ?? this._swcValue;\n this.innerHTML = '';\n\n for (const branch of this._branches) {\n if (matched) break;\n const testAttr = branch.test;\n if (testAttr === null || testAttr.includes('{{')) continue;\n let isMet = false;\n if (chooseValue !== undefined && chooseValue !== null) { isMet = String(chooseValue) === String(testAttr); }\n else { try { if (testAttr === 'true') isMet = true; else if (testAttr === 'false') isMet = false; else isMet = !!new Function('return ' + testAttr)(); } catch (e) { isMet = false; } }\n\n if (isMet) {\n this._renderBranch(branch);\n matched = true;\n }\n }\n\n if (!matched && this._otherBranch) { this._renderBranch(this._otherBranch); }\n }\n\n private _renderBranch(branch: Branch) {\n const clone = branch.tpl.cloneNode(true) as HTMLElement;\n clone.style.display = 'contents';\n this.appendChild(clone);\n this.applyData(clone, this._swcValue);\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;AAAA,SAAS,qBAAqB;AAC9B,SAAS,gCAAgC;AAQlC,IAAM,kB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I;AAAG;AAClD,UAAI,QAAQ;AACZ,UAAI,gBAAgB,UAAa,gBAAgB,MAAM;AAAE,gBAAQ,OAAO,WAAW,MAAM,OAAO,QAAQ;MAAG,OACtG;AAAE,YAAI;AAAE,cAAI,aAAa;AAAQ,oBAAQ;mBAAe,aAAa;AAAS,oBAAQ;;AAAY,oBAAQ,CAAC,CAAC,IAAI,SAAS,YAAY,QAAQ,EAAC;QAAI,SAAS,GAAG;AAAE,kBAAQ;QAAO;MAAE;AAEtL,UAAI,OAAO;AACT,aAAK,cAAc,MAAM;AACzB,kBAAU;MACZ;IACF;AAEA,QAAI,CAAC,WAAW,KAAK,cAAc;AAAE,WAAK,cAAc,KAAK,YAAY;IAAG;EAC9E;EAEQ,cAAc,QAAc;AAClC,UAAM,QAAQ,OAAO,IAAI,UAAU,IAAI;AACvC,UAAM,MAAM,UAAU;AACtB,SAAK,YAAY,KAAK;AACtB,SAAK,UAAU,OAAO,KAAK,SAAS;EACtC;;AAjEW,kBAAe,WAAA;EAD3B,cAAc,EAAE,MAAM,qBAAqB,SAAS,SAAQ,CAAE;GAClD,eAAe;",
|
|
6
6
|
"names": ["SwcChooseButton"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/is/SwcChooseCanvas.ts"],
|
|
4
|
-
"sourcesContent": ["import { elementDefine } from '../index';\nimport { SwcHTMLCanvasElementBase } from './SwcHTMLCanvasElementBase';\n\ninterface Branch {\n tpl: HTMLElement;\n test: string | null;\n}\n\n@elementDefine({ name: 'swc-choose-canvas', extends: 'canvas' })\nexport class SwcChooseCanvas extends SwcHTMLCanvasElementBase {\n private _observer: MutationObserver | null = null;\n private _swcValue: any = undefined;\n private _branches: Branch[] = [];\n private _otherBranch: Branch | null = null;\n private _isInitialized = false;\n\n set swcValue(val: any) { this._swcValue = val; this.evaluate(); }\n get swcValue() { return this._swcValue; }\n\n connectedCallback() {\n this.style.display = 'contents';\n this._initBranches();\n this._observer = new MutationObserver(() => this.evaluate());\n this._observer.observe(this, { attributes: true });\n this.evaluate();\n }\n\n private _initBranches() {\n if (this._isInitialized) return;\n const children = Array.from(this.children);\n children.forEach(c => {\n const isWhen = c.localName === 'swc-when' || c.getAttribute('is')?.startsWith('swc-when-');\n const isOther = c.localName === 'swc-other' || c.getAttribute('is')?.startsWith('swc-other-');\n const branch: Branch = {\n tpl: c.cloneNode(true) as HTMLElement,\n test: c.getAttribute('test')\n };\n if (isWhen) this._branches.push(branch);\n else if (isOther) this._otherBranch = branch;\n });\n this.innerHTML = '';\n this._isInitialized = true;\n }\n\n disconnectedCallback() { this._observer?.disconnect(); }\n\n private evaluate() {\n if (!this._isInitialized) return;\n let matched = false;\n const chooseValue = this.getAttribute('swc-value') ?? this.getAttribute('value') ?? this._swcValue;\n this.innerHTML = '';\n\n for (const branch of this._branches) {\n if (matched) break;\n const testAttr = branch.test;\n if (testAttr === null || testAttr.includes('{{')) continue;\n let isMet = false;\n if (chooseValue !== undefined && chooseValue !== null) { isMet = String(chooseValue) === String(testAttr); }\n else { try { if (testAttr === 'true') isMet = true; else if (testAttr === 'false') isMet = false; else isMet = !!new Function('return ' + testAttr)(); } catch (e) { isMet = false; } }\n\n if (isMet) {\n this._renderBranch(branch);\n matched = true;\n }\n }\n\n if (!matched && this._otherBranch) { this._renderBranch(this._otherBranch); }\n }\n\n private _renderBranch(branch: Branch) {\n const clone = branch.tpl.cloneNode(true) as HTMLElement;\n
|
|
5
|
-
"mappings": ";;;;;;AAAA,SAAS,qBAAqB;AAC9B,SAAS,gCAAgC;AAQlC,IAAM,kBAAN,MAAMA,yBAAwB,yBAAwB;EAAtD,cAAA;;AACG,SAAA,YAAqC;AACrC,SAAA,YAAiB;AACjB,SAAA,YAAsB,CAAA;AACtB,SAAA,eAA8B;AAC9B,SAAA,iBAAiB;
|
|
4
|
+
"sourcesContent": ["import { elementDefine } from '../index';\nimport { SwcHTMLCanvasElementBase } from './SwcHTMLCanvasElementBase';\n\ninterface Branch {\n tpl: HTMLElement;\n test: string | null;\n}\n\n@elementDefine({ name: 'swc-choose-canvas', extends: 'canvas' })\nexport class SwcChooseCanvas extends SwcHTMLCanvasElementBase {\n private _observer: MutationObserver | null = null;\n private _swcValue: any = undefined;\n private _branches: Branch[] = [];\n private _otherBranch: Branch | null = null;\n private _isInitialized = false;\n\n set swcValue(val: any) { this._swcValue = val; this.evaluate(); }\n get swcValue() { return this._swcValue; }\n\n connectedCallback() {\n this.style.display = 'contents';\n this._initBranches();\n this._observer = new MutationObserver(() => this.evaluate());\n this._observer.observe(this, { attributes: true });\n this.evaluate();\n }\n\n private _initBranches() {\n if (this._isInitialized) return;\n const children = Array.from(this.children);\n children.forEach(c => {\n const isWhen = c.localName === 'swc-when' || c.getAttribute('is')?.startsWith('swc-when-');\n const isOther = c.localName === 'swc-other' || c.getAttribute('is')?.startsWith('swc-other-');\n const branch: Branch = {\n tpl: c.cloneNode(true) as HTMLElement,\n test: c.getAttribute('test')\n };\n if (isWhen) this._branches.push(branch);\n else if (isOther) this._otherBranch = branch;\n });\n this.innerHTML = '';\n this._isInitialized = true;\n }\n\n disconnectedCallback() { this._observer?.disconnect(); }\n\n private evaluate() {\n if (!this._isInitialized) return;\n let matched = false;\n const chooseValue = this.getAttribute('swc-value') ?? this.getAttribute('value') ?? this._swcValue;\n this.innerHTML = '';\n\n for (const branch of this._branches) {\n if (matched) break;\n const testAttr = branch.test;\n if (testAttr === null || testAttr.includes('{{')) continue;\n let isMet = false;\n if (chooseValue !== undefined && chooseValue !== null) { isMet = String(chooseValue) === String(testAttr); }\n else { try { if (testAttr === 'true') isMet = true; else if (testAttr === 'false') isMet = false; else isMet = !!new Function('return ' + testAttr)(); } catch (e) { isMet = false; } }\n\n if (isMet) {\n this._renderBranch(branch);\n matched = true;\n }\n }\n\n if (!matched && this._otherBranch) { this._renderBranch(this._otherBranch); }\n }\n\n private _renderBranch(branch: Branch) {\n const clone = branch.tpl.cloneN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AK,KAAK,aAAa,OAAO,KAAK,KAAK;AACzF,SAAK,YAAY;AAEjB,eAAW,UAAU,KAAK,WAAW;AACnC,UAAI;AAAS;AACb,YAAM,WAAW,OAAO;AACxB,UAAI,aAAa,QAAQ,SAAS,SAAS,IAAI;AAAG;AAClD,UAAI,QAAQ;AACZ,UAAI,gBAAgB,UAAa,gBAAgB,MAAM;AAAE,gBAAQ,OAAO,WAAW,MAAM,OAAO,QAAQ;MAAG,OACtG;AAAE,YAAI;AAAE,cAAI,aAAa;AAAQ,oBAAQ;mBAAe,aAAa;AAAS,oBAAQ;;AAAY,oBAAQ,CAAC,CAAC,IAAI,SAAS,YAAY,QAAQ,EAAC;QAAI,SAAS,GAAG;AAAE,kBAAQ;QAAO;MAAE;AAEtL,UAAI,OAAO;AACT,aAAK,cAAc,MAAM;AACzB,kBAAU;MACZ;IACF;AAEA,QAAI,CAAC,WAAW,KAAK,cAAc;AAAE,WAAK,cAAc,KAAK,YAAY;IAAG;EAC9E;EAEQ,cAAc,QAAc;AAClC,UAAM,QAAQ,OAAO,IAAI,UAAU,IAAI;AACvC,UAAM,MAAM,UAAU;AACtB,SAAK,YAAY,KAAK;AACtB,SAAK,UAAU,OAAO,KAAK,SAAS;EACtC;;AAjEW,kBAAe,WAAA;EAD3B,cAAc,EAAE,MAAM,qBAAqB,SAAS,SAAQ,CAAE;GAClD,eAAe;",
|
|
6
6
|
"names": ["SwcChooseCanvas"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/is/SwcChooseData.ts"],
|
|
4
|
-
"sourcesContent": ["import { elementDefine } from '../index';\nimport { SwcHTMLDataElementBase } from './SwcHTMLDataElementBase';\n\ninterface Branch {\n tpl: HTMLElement;\n test: string | null;\n}\n\n@elementDefine({ name: 'swc-choose-data', extends: 'data' })\nexport class SwcChooseData extends SwcHTMLDataElementBase {\n private _observer: MutationObserver | null = null;\n private _swcValue: any = undefined;\n private _branches: Branch[] = [];\n private _otherBranch: Branch | null = null;\n private _isInitialized = false;\n\n set swcValue(val: any) { this._swcValue = val; this.evaluate(); }\n get swcValue() { return this._swcValue; }\n\n connectedCallback() {\n this.style.display = 'contents';\n this._initBranches();\n this._observer = new MutationObserver(() => this.evaluate());\n this._observer.observe(this, { attributes: true });\n this.evaluate();\n }\n\n private _initBranches() {\n if (this._isInitialized) return;\n const children = Array.from(this.children);\n children.forEach(c => {\n const isWhen = c.localName === 'swc-when' || c.getAttribute('is')?.startsWith('swc-when-');\n const isOther = c.localName === 'swc-other' || c.getAttribute('is')?.startsWith('swc-other-');\n const branch: Branch = {\n tpl: c.cloneNode(true) as HTMLElement,\n test: c.getAttribute('test')\n };\n if (isWhen) this._branches.push(branch);\n else if (isOther) this._otherBranch = branch;\n });\n this.innerHTML = '';\n this._isInitialized = true;\n }\n\n disconnectedCallback() { this._observer?.disconnect(); }\n\n private evaluate() {\n if (!this._isInitialized) return;\n let matched = false;\n const chooseValue = this.getAttribute('swc-value') ?? this.getAttribute('value') ?? this._swcValue;\n this.innerHTML = '';\n\n for (const branch of this._branches) {\n if (matched) break;\n const testAttr = branch.test;\n if (testAttr === null || testAttr.includes('{{')) continue;\n let isMet = false;\n if (chooseValue !== undefined && chooseValue !== null) { isMet = String(chooseValue) === String(testAttr); }\n else { try { if (testAttr === 'true') isMet = true; else if (testAttr === 'false') isMet = false; else isMet = !!new Function('return ' + testAttr)(); } catch (e) { isMet = false; } }\n\n if (isMet) {\n this._renderBranch(branch);\n matched = true;\n }\n }\n\n if (!matched && this._otherBranch) { this._renderBranch(this._otherBranch); }\n }\n\n private _renderBranch(branch: Branch) {\n const clone = branch.tpl.cloneNode(true) as HTMLElement;\n
|
|
5
|
-
"mappings": ";;;;;;AAAA,SAAS,qBAAqB;AAC9B,SAAS,8BAA8B;AAQhC,IAAM,gBAAN,MAAMA,uBAAsB,uBAAsB;EAAlD,cAAA;;AACG,SAAA,YAAqC;AACrC,SAAA,YAAiB;AACjB,SAAA,YAAsB,CAAA;AACtB,SAAA,eAA8B;AAC9B,SAAA,iBAAiB;
|
|
4
|
+
"sourcesContent": ["import { elementDefine } from '../index';\nimport { SwcHTMLDataElementBase } from './SwcHTMLDataElementBase';\n\ninterface Branch {\n tpl: HTMLElement;\n test: string | null;\n}\n\n@elementDefine({ name: 'swc-choose-data', extends: 'data' })\nexport class SwcChooseData extends SwcHTMLDataElementBase {\n private _observer: MutationObserver | null = null;\n private _swcValue: any = undefined;\n private _branches: Branch[] = [];\n private _otherBranch: Branch | null = null;\n private _isInitialized = false;\n\n set swcValue(val: any) { this._swcValue = val; this.evaluate(); }\n get swcValue() { return this._swcValue; }\n\n connectedCallback() {\n this.style.display = 'contents';\n this._initBranches();\n this._observer = new MutationObserver(() => this.evaluate());\n this._observer.observe(this, { attributes: true });\n this.evaluate();\n }\n\n private _initBranches() {\n if (this._isInitialized) return;\n const children = Array.from(this.children);\n children.forEach(c => {\n const isWhen = c.localName === 'swc-when' || c.getAttribute('is')?.startsWith('swc-when-');\n const isOther = c.localName === 'swc-other' || c.getAttribute('is')?.startsWith('swc-other-');\n const branch: Branch = {\n tpl: c.cloneNode(true) as HTMLElement,\n test: c.getAttribute('test')\n };\n if (isWhen) this._branches.push(branch);\n else if (isOther) this._otherBranch = branch;\n });\n this.innerHTML = '';\n this._isInitialized = true;\n }\n\n disconnectedCallback() { this._observer?.disconnect(); }\n\n private evaluate() {\n if (!this._isInitialized) return;\n let matched = false;\n const chooseValue = this.getAttribute('swc-value') ?? this.getAttribute('value') ?? this._swcValue;\n this.innerHTML = '';\n\n for (const branch of this._branches) {\n if (matched) break;\n const testAttr = branch.test;\n if (testAttr === null || testAttr.includes('{{')) continue;\n let isMet = false;\n if (chooseValue !== undefined && chooseValue !== null) { isMet = String(chooseValue) === String(testAttr); }\n else { try { if (testAttr === 'true') isMet = true; else if (testAttr === 'false') isMet = false; else isMet = !!new Function('return ' + testAttr)(); } catch (e) { isMet = false; } }\n\n if (isMet) {\n this._renderBranch(branch);\n matched = true;\n }\n }\n\n if (!matched && this._otherBranch) { this._renderBranch(this._otherBranch); }\n }\n\n private _renderBranch(branch: Branch) {\n const clone = branch.tpl.cloneNode(true) as HTMLElement;\n clone.style.display = 'contents';\n this.appendChild(clone);\n this.applyData(clone, this._swcValue);\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;AAAA,SAAS,qBAAqB;AAC9B,SAAS,8BAA8B;AAQhC,IAAM,gBAAN,MAAMA,uBAAsB,uBAAsB;EAAlD,cAAA;;AACG,SAAA,YAAqC;AACrC,SAAA,YAAiB;AACjB,SAAA,YAAsB,CAAA;AACtB,SAAA,eAA8B;AAC9B,SAAA,iBAAiB;EA6D3B;EA3DE,IAAI,SAAS,KAAQ;AAAI,SAAK,YAAY;AAAK,SAAK,SAAQ;EAAI;EAChE,IAAI,WAAQ;AAAK,WAAO,KAAK;EAAW;EAExC,oBAAiB;AACf,SAAK,MAAM,UAAU;AACrB,SAAK,cAAa;AAClB,SAAK,YAAY,IAAI,iBAAiB,MAAM,KAAK,SAAQ,CAAE;AAC3D,SAAK,UAAU,QAAQ,MAAM,EAAE,YAAY,KAAI,CAAE;AACjD,SAAK,SAAQ;EACf;EAEQ,gBAAa;AACnB,QAAI,KAAK;AAAgB;AACzB,UAAM,WAAW,MAAM,KAAK,KAAK,QAAQ;AACzC,aAAS,QAAQ,OAAI;AACnB,YAAM,SAAS,EAAE,cAAc,cAAc,EAAE,aAAa,IAAI,GAAG,WAAW,WAAW;AACzF,YAAM,UAAU,EAAE,cAAc,eAAe,EAAE,aAAa,IAAI,GAAG,WAAW,YAAY;AAC5F,YAAM,SAAiB;QACrB,KAAK,EAAE,UAAU,IAAI;QACrB,MAAM,EAAE,aAAa,MAAM;;AAE7B,UAAI;AAAQ,aAAK,UAAU,KAAK,MAAM;eAC7B;AAAS,aAAK,eAAe;IACxC,CAAC;AACD,SAAK,YAAY;AACjB,SAAK,iBAAiB;EACxB;EAEA,uBAAoB;AAAK,SAAK,WAAW,WAAU;EAAI;EAE/C,WAAQ;AACd,QAAI,CAAC,KAAK;AAAgB;AAC1B,QAAI,UAAU;AACd,UAAM,cAAc,KAAK,aAAa,WAAW,KAAK,KAAK,aAAa,OAAO,KAAK,KAAK;AACzF,SAAK,YAAY;AAEjB,eAAW,UAAU,KAAK,WAAW;AACnC,UAAI;AAAS;AACb,YAAM,WAAW,OAAO;AACxB,UAAI,aAAa,QAAQ,SAAS,SAAS,IAAI;AAAG;AAClD,UAAI,QAAQ;AACZ,UAAI,gBAAgB,UAAa,gBAAgB,MAAM;AAAE,gBAAQ,OAAO,WAAW,MAAM,OAAO,QAAQ;MAAG,OACtG;AAAE,YAAI;AAAE,cAAI,aAAa;AAAQ,oBAAQ;mBAAe,aAAa;AAAS,oBAAQ;;AAAY,oBAAQ,CAAC,CAAC,IAAI,SAAS,YAAY,QAAQ,EAAC;QAAI,SAAS,GAAG;AAAE,kBAAQ;QAAO;MAAE;AAEtL,UAAI,OAAO;AACT,aAAK,cAAc,MAAM;AACzB,kBAAU;MACZ;IACF;AAEA,QAAI,CAAC,WAAW,KAAK,cAAc;AAAE,WAAK,cAAc,KAAK,YAAY;IAAG;EAC9E;EAEQ,cAAc,QAAc;AAClC,UAAM,QAAQ,OAAO,IAAI,UAAU,IAAI;AACvC,UAAM,MAAM,UAAU;AACtB,SAAK,YAAY,KAAK;AACtB,SAAK,UAAU,OAAO,KAAK,SAAS;EACtC;;AAjEW,gBAAa,WAAA;EADzB,cAAc,EAAE,MAAM,mBAAmB,SAAS,OAAM,CAAE;GAC9C,aAAa;",
|
|
6
6
|
"names": ["SwcChooseData"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/is/SwcChooseDataList.ts"],
|
|
4
|
-
"sourcesContent": ["import { elementDefine } from '../index';\nimport { SwcHTMLDataListElementBase } from './SwcHTMLDataListElementBase';\n\ninterface Branch {\n tpl: HTMLElement;\n test: string | null;\n}\n\n@elementDefine({ name: 'swc-choose-datalist', extends: 'datalist' })\nexport class SwcChooseDataList extends SwcHTMLDataListElementBase {\n private _observer: MutationObserver | null = null;\n private _swcValue: any = undefined;\n private _branches: Branch[] = [];\n private _otherBranch: Branch | null = null;\n private _isInitialized = false;\n\n set swcValue(val: any) { this._swcValue = val; this.evaluate(); }\n get swcValue() { return this._swcValue; }\n\n connectedCallback() {\n this.style.display = 'contents';\n this._initBranches();\n this._observer = new MutationObserver(() => this.evaluate());\n this._observer.observe(this, { attributes: true });\n this.evaluate();\n }\n\n private _initBranches() {\n if (this._isInitialized) return;\n const children = Array.from(this.children);\n children.forEach(c => {\n const isWhen = c.localName === 'swc-when' || c.getAttribute('is')?.startsWith('swc-when-');\n const isOther = c.localName === 'swc-other' || c.getAttribute('is')?.startsWith('swc-other-');\n const branch: Branch = {\n tpl: c.cloneNode(true) as HTMLElement,\n test: c.getAttribute('test')\n };\n if (isWhen) this._branches.push(branch);\n else if (isOther) this._otherBranch = branch;\n });\n this.innerHTML = '';\n this._isInitialized = true;\n }\n\n disconnectedCallback() { this._observer?.disconnect(); }\n\n private evaluate() {\n if (!this._isInitialized) return;\n let matched = false;\n const chooseValue = this.getAttribute('swc-value') ?? this.getAttribute('value') ?? this._swcValue;\n this.innerHTML = '';\n\n for (const branch of this._branches) {\n if (matched) break;\n const testAttr = branch.test;\n if (testAttr === null || testAttr.includes('{{')) continue;\n let isMet = false;\n if (chooseValue !== undefined && chooseValue !== null) { isMet = String(chooseValue) === String(testAttr); }\n else { try { if (testAttr === 'true') isMet = true; else if (testAttr === 'false') isMet = false; else isMet = !!new Function('return ' + testAttr)(); } catch (e) { isMet = false; } }\n\n if (isMet) {\n this._renderBranch(branch);\n matched = true;\n }\n }\n\n if (!matched && this._otherBranch) { this._renderBranch(this._otherBranch); }\n }\n\n private _renderBranch(branch: Branch) {\n const clone = branch.tpl.cloneNode(true) as HTMLElement;\n
|
|
5
|
-
"mappings": ";;;;;;AAAA,SAAS,qBAAqB;AAC9B,SAAS,kCAAkC;AAQpC,IAAM,oBAAN,MAAMA,2BAA0B,2BAA0B;EAA1D,cAAA;;AACG,SAAA,YAAqC;AACrC,SAAA,YAAiB;AACjB,SAAA,YAAsB,CAAA;AACtB,SAAA,eAA8B;AAC9B,SAAA,iBAAiB;
|
|
4
|
+
"sourcesContent": ["import { elementDefine } from '../index';\nimport { SwcHTMLDataListElementBase } from './SwcHTMLDataListElementBase';\n\ninterface Branch {\n tpl: HTMLElement;\n test: string | null;\n}\n\n@elementDefine({ name: 'swc-choose-datalist', extends: 'datalist' })\nexport class SwcChooseDataList extends SwcHTMLDataListElementBase {\n private _observer: MutationObserver | null = null;\n private _swcValue: any = undefined;\n private _branches: Branch[] = [];\n private _otherBranch: Branch | null = null;\n private _isInitialized = false;\n\n set swcValue(val: any) { this._swcValue = val; this.evaluate(); }\n get swcValue() { return this._swcValue; }\n\n connectedCallback() {\n this.style.display = 'contents';\n this._initBranches();\n this._observer = new MutationObserver(() => this.evaluate());\n this._observer.observe(this, { attributes: true });\n this.evaluate();\n }\n\n private _initBranches() {\n if (this._isInitialized) return;\n const children = Array.from(this.children);\n children.forEach(c => {\n const isWhen = c.localName === 'swc-when' || c.getAttribute('is')?.startsWith('swc-when-');\n const isOther = c.localName === 'swc-other' || c.getAttribute('is')?.startsWith('swc-other-');\n const branch: Branch = {\n tpl: c.cloneNode(true) as HTMLElement,\n test: c.getAttribute('test')\n };\n if (isWhen) this._branches.push(branch);\n else if (isOther) this._otherBranch = branch;\n });\n this.innerHTML = '';\n this._isInitialized = true;\n }\n\n disconnectedCallback() { this._observer?.disconnect(); }\n\n private evaluate() {\n if (!this._isInitialized) return;\n let matched = false;\n const chooseValue = this.getAttribute('swc-value') ?? this.getAttribute('value') ?? this._swcValue;\n this.innerHTML = '';\n\n for (const branch of this._branches) {\n if (matched) break;\n const testAttr = branch.test;\n if (testAttr === null || testAttr.includes('{{')) continue;\n let isMet = false;\n if (chooseValue !== undefined && chooseValue !== null) { isMet = String(chooseValue) === String(testAttr); }\n else { try { if (testAttr === 'true') isMet = true; else if (testAttr === 'false') isMet = false; else isMet = !!new Function('return ' + testAttr)(); } catch (e) { isMet = false; } }\n\n if (isMet) {\n this._renderBranch(branch);\n matched = true;\n }\n }\n\n if (!matched && this._otherBranch) { this._renderBranch(this._otherBranch); }\n }\n\n private _renderBranch(branch: Branch) {\n const clone = branch.tpl.cloneNode(true) as HTMLElement;\n clone.style.display = 'contents';\n this.appendChild(clone);\n this.applyData(clone, this._swcValue);\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;AAAA,SAAS,qBAAqB;AAC9B,SAAS,kCAAkC;AAQpC,IAAM,oBAAN,MAAMA,2BAA0B,2BAA0B;EAA1D,cAAA;;AACG,SAAA,YAAqC;AACrC,SAAA,YAAiB;AACjB,SAAA,YAAsB,CAAA;AACtB,SAAA,eAA8B;AAC9B,SAAA,iBAAiB;EA6D3B;EA3DE,IAAI,SAAS,KAAQ;AAAI,SAAK,YAAY;AAAK,SAAK,SAAQ;EAAI;EAChE,IAAI,WAAQ;AAAK,WAAO,KAAK;EAAW;EAExC,oBAAiB;AACf,SAAK,MAAM,UAAU;AACrB,SAAK,cAAa;AAClB,SAAK,YAAY,IAAI,iBAAiB,MAAM,KAAK,SAAQ,CAAE;AAC3D,SAAK,UAAU,QAAQ,MAAM,EAAE,YAAY,KAAI,CAAE;AACjD,SAAK,SAAQ;EACf;EAEQ,gBAAa;AACnB,QAAI,KAAK;AAAgB;AACzB,UAAM,WAAW,MAAM,KAAK,KAAK,QAAQ;AACzC,aAAS,QAAQ,OAAI;AACnB,YAAM,SAAS,EAAE,cAAc,cAAc,EAAE,aAAa,IAAI,GAAG,WAAW,WAAW;AACzF,YAAM,UAAU,EAAE,cAAc,eAAe,EAAE,aAAa,IAAI,GAAG,WAAW,YAAY;AAC5F,YAAM,SAAiB;QACrB,KAAK,EAAE,UAAU,IAAI;QACrB,MAAM,EAAE,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|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/is/SwcChooseDetails.ts"],
|
|
4
|
-
"sourcesContent": ["import { elementDefine } from '../index';\nimport { SwcHTMLDetailsElementBase } from './SwcHTMLDetailsElementBase';\n\ninterface Branch {\n tpl: HTMLElement;\n test: string | null;\n}\n\n@elementDefine({ name: 'swc-choose-details', extends: 'details' })\nexport class SwcChooseDetails extends SwcHTMLDetailsElementBase {\n private _observer: MutationObserver | null = null;\n private _swcValue: any = undefined;\n private _branches: Branch[] = [];\n private _otherBranch: Branch | null = null;\n private _isInitialized = false;\n\n set swcValue(val: any) { this._swcValue = val; this.evaluate(); }\n get swcValue() { return this._swcValue; }\n\n connectedCallback() {\n this.style.display = 'contents';\n this._initBranches();\n this._observer = new MutationObserver(() => this.evaluate());\n this._observer.observe(this, { attributes: true });\n this.evaluate();\n }\n\n private _initBranches() {\n if (this._isInitialized) return;\n const children = Array.from(this.children);\n children.forEach(c => {\n const isWhen = c.localName === 'swc-when' || c.getAttribute('is')?.startsWith('swc-when-');\n const isOther = c.localName === 'swc-other' || c.getAttribute('is')?.startsWith('swc-other-');\n const branch: Branch = {\n tpl: c.cloneNode(true) as HTMLElement,\n test: c.getAttribute('test')\n };\n if (isWhen) this._branches.push(branch);\n else if (isOther) this._otherBranch = branch;\n });\n this.innerHTML = '';\n this._isInitialized = true;\n }\n\n disconnectedCallback() { this._observer?.disconnect(); }\n\n private evaluate() {\n if (!this._isInitialized) return;\n let matched = false;\n const chooseValue = this.getAttribute('swc-value') ?? this.getAttribute('value') ?? this._swcValue;\n this.innerHTML = '';\n\n for (const branch of this._branches) {\n if (matched) break;\n const testAttr = branch.test;\n if (testAttr === null || testAttr.includes('{{')) continue;\n let isMet = false;\n if (chooseValue !== undefined && chooseValue !== null) { isMet = String(chooseValue) === String(testAttr); }\n else { try { if (testAttr === 'true') isMet = true; else if (testAttr === 'false') isMet = false; else isMet = !!new Function('return ' + testAttr)(); } catch (e) { isMet = false; } }\n\n if (isMet) {\n this._renderBranch(branch);\n matched = true;\n }\n }\n\n if (!matched && this._otherBranch) { this._renderBranch(this._otherBranch); }\n }\n\n private _renderBranch(branch: Branch) {\n const clone = branch.tpl.cloneNode(true) as HTMLElement;\n
|
|
5
|
-
"mappings": ";;;;;;AAAA,SAAS,qBAAqB;AAC9B,SAAS,iCAAiC;AAQnC,IAAM,mBAAN,MAAMA,0BAAyB,0BAAyB;EAAxD,cAAA;;AACG,SAAA,YAAqC;AACrC,SAAA,YAAiB;AACjB,SAAA,YAAsB,CAAA;AACtB,SAAA,eAA8B;AAC9B,SAAA,iBAAiB;
|
|
4
|
+
"sourcesContent": ["import { elementDefine } from '../index';\nimport { SwcHTMLDetailsElementBase } from './SwcHTMLDetailsElementBase';\n\ninterface Branch {\n tpl: HTMLElement;\n test: string | null;\n}\n\n@elementDefine({ name: 'swc-choose-details', extends: 'details' })\nexport class SwcChooseDetails extends SwcHTMLDetailsElementBase {\n private _observer: MutationObserver | null = null;\n private _swcValue: any = undefined;\n private _branches: Branch[] = [];\n private _otherBranch: Branch | null = null;\n private _isInitialized = false;\n\n set swcValue(val: any) { this._swcValue = val; this.evaluate(); }\n get swcValue() { return this._swcValue; }\n\n connectedCallback() {\n this.style.display = 'contents';\n this._initBranches();\n this._observer = new MutationObserver(() => this.evaluate());\n this._observer.observe(this, { attributes: true });\n this.evaluate();\n }\n\n private _initBranches() {\n if (this._isInitialized) return;\n const children = Array.from(this.children);\n children.forEach(c => {\n const isWhen = c.localName === 'swc-when' || c.getAttribute('is')?.startsWith('swc-when-');\n const isOther = c.localName === 'swc-other' || c.getAttribute('is')?.startsWith('swc-other-');\n const branch: Branch = {\n tpl: c.cloneNode(true) as HTMLElement,\n test: c.getAttribute('test')\n };\n if (isWhen) this._branches.push(branch);\n else if (isOther) this._otherBranch = branch;\n });\n this.innerHTML = '';\n this._isInitialized = true;\n }\n\n disconnectedCallback() { this._observer?.disconnect(); }\n\n private evaluate() {\n if (!this._isInitialized) return;\n let matched = false;\n const chooseValue = this.getAttribute('swc-value') ?? this.getAttribute('value') ?? this._swcValue;\n this.innerHTML = '';\n\n for (const branch of this._branches) {\n if (matched) break;\n const testAttr = branch.test;\n if (testAttr === null || testAttr.includes('{{')) continue;\n let isMet = false;\n if (chooseValue !== undefined && chooseValue !== null) { isMet = String(chooseValue) === String(testAttr); }\n else { try { if (testAttr === 'true') isMet = true; else if (testAttr === 'false') isMet = false; else isMet = !!new Function('return ' + testAttr)(); } catch (e) { isMet = false; } }\n\n if (isMet) {\n this._renderBranch(branch);\n matched = true;\n }\n }\n\n if (!matched && this._otherBranch) { this._renderBranch(this._otherBranch); }\n }\n\n private _renderBranch(branch: Branch) {\n const clone = branch.tpl.cloneNode(true) as HTMLElement;\n clone.style.display = 'contents';\n this.appendChild(clone);\n this.applyData(clone, this._swcValue);\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;AAAA,SAAS,qBAAqB;AAC9B,SAAS,iCAAiC;AAQnC,IAAM,mBAAN,MAAMA,0BAAyB,0BAAyB;EAAxD,cAAA;;AACG,SAAA,YAAqC;AACrC,SAAA,YAAiB;AACjB,SAAA,YAAsB,CAAA;AACtB,SAAA,eAA8B;AAC9B,SAAA,iBAAiB;EA6D3B;EA3DE,IAAI,SAAS,KAAQ;AAAI,SAAK,YAAY;AAAK,SAAK,SAAQ;EAAI;EAChE,IAAI,WAAQ;AAAK,WAAO,KAAK;EAAW;EAExC,oBAAiB;AACf,SAAK,MAAM,UAAU;AACrB,SAAK,cAAa;AAClB,SAAK,YAAY,IAAI,iBAAiB,MAAM,KAAK,SAAQ,CAAE;AAC3D,SAAK,UAAU,QAAQ,MAAM,EAAE,YAAY,KAAI,CAAE;AACjD,SAAK,SAAQ;EACf;EAEQ,gBAAa;AACnB,QAAI,KAAK;AAAgB;AACzB,UAAM,WAAW,MAAM,KAAK,KAAK,QAAQ;AACzC,aAAS,QAAQ,OAAI;AACnB,YAAM,SAAS,EAAE,cAAc,cAAc,EAAE,aAAa,IAAI,GAA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5B,cAAc,EAAE,MAAM,sBAAsB,SAAS,UAAS,CAAE;GACpD,gBAAgB;",
|
|
6
6
|
"names": ["SwcChooseDetails"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/is/SwcChooseDialog.ts"],
|
|
4
|
-
"sourcesContent": ["import { elementDefine } from '../index';\nimport { SwcHTMLDialogElementBase } from './SwcHTMLDialogElementBase';\n\ninterface Branch {\n tpl: HTMLElement;\n test: string | null;\n}\n\n@elementDefine({ name: 'swc-choose-dialog', extends: 'dialog' })\nexport class SwcChooseDialog extends SwcHTMLDialogElementBase {\n private _observer: MutationObserver | null = null;\n private _swcValue: any = undefined;\n private _branches: Branch[] = [];\n private _otherBranch: Branch | null = null;\n private _isInitialized = false;\n\n set swcValue(val: any) { this._swcValue = val; this.evaluate(); }\n get swcValue() { return this._swcValue; }\n\n connectedCallback() {\n this.style.display = 'contents';\n this._initBranches();\n this._observer = new MutationObserver(() => this.evaluate());\n this._observer.observe(this, { attributes: true });\n this.evaluate();\n }\n\n private _initBranches() {\n if (this._isInitialized) return;\n const children = Array.from(this.children);\n children.forEach(c => {\n const isWhen = c.localName === 'swc-when' || c.getAttribute('is')?.startsWith('swc-when-');\n const isOther = c.localName === 'swc-other' || c.getAttribute('is')?.startsWith('swc-other-');\n const branch: Branch = {\n tpl: c.cloneNode(true) as HTMLElement,\n test: c.getAttribute('test')\n };\n if (isWhen) this._branches.push(branch);\n else if (isOther) this._otherBranch = branch;\n });\n this.innerHTML = '';\n this._isInitialized = true;\n }\n\n disconnectedCallback() { this._observer?.disconnect(); }\n\n private evaluate() {\n if (!this._isInitialized) return;\n let matched = false;\n const chooseValue = this.getAttribute('swc-value') ?? this.getAttribute('value') ?? this._swcValue;\n this.innerHTML = '';\n\n for (const branch of this._branches) {\n if (matched) break;\n const testAttr = branch.test;\n if (testAttr === null || testAttr.includes('{{')) continue;\n let isMet = false;\n if (chooseValue !== undefined && chooseValue !== null) { isMet = String(chooseValue) === String(testAttr); }\n else { try { if (testAttr === 'true') isMet = true; else if (testAttr === 'false') isMet = false; else isMet = !!new Function('return ' + testAttr)(); } catch (e) { isMet = false; } }\n\n if (isMet) {\n this._renderBranch(branch);\n matched = true;\n }\n }\n\n if (!matched && this._otherBranch) { this._renderBranch(this._otherBranch); }\n }\n\n private _renderBranch(branch: Branch) {\n const clone = branch.tpl.cloneNode(true) as HTMLElement;\n
|
|
5
|
-
"mappings": ";;;;;;AAAA,SAAS,qBAAqB;AAC9B,SAAS,gCAAgC;AAQlC,IAAM,kBAAN,MAAMA,yBAAwB,yBAAwB;EAAtD,cAAA;;AACG,SAAA,YAAqC;AACrC,SAAA,YAAiB;AACjB,SAAA,YAAsB,CAAA;AACtB,SAAA,eAA8B;AAC9B,SAAA,iBAAiB;
|
|
4
|
+
"sourcesContent": ["import { elementDefine } from '../index';\nimport { SwcHTMLDialogElementBase } from './SwcHTMLDialogElementBase';\n\ninterface Branch {\n tpl: HTMLElement;\n test: string | null;\n}\n\n@elementDefine({ name: 'swc-choose-dialog', extends: 'dialog' })\nexport class SwcChooseDialog extends SwcHTMLDialogElementBase {\n private _observer: MutationObserver | null = null;\n private _swcValue: any = undefined;\n private _branches: Branch[] = [];\n private _otherBranch: Branch | null = null;\n private _isInitialized = false;\n\n set swcValue(val: any) { this._swcValue = val; this.evaluate(); }\n get swcValue() { return this._swcValue; }\n\n connectedCallback() {\n this.style.display = 'contents';\n this._initBranches();\n this._observer = new MutationObserver(() => this.evaluate());\n this._observer.observe(this, { attributes: true });\n this.evaluate();\n }\n\n private _initBranches() {\n if (this._isInitialized) return;\n const children = Array.from(this.children);\n children.forEach(c => {\n const isWhen = c.localName === 'swc-when' || c.getAttribute('is')?.startsWith('swc-when-');\n const isOther = c.localName === 'swc-other' || c.getAttribute('is')?.startsWith('swc-other-');\n const branch: Branch = {\n tpl: c.cloneNode(true) as HTMLElement,\n test: c.getAttribute('test')\n };\n if (isWhen) this._branches.push(branch);\n else if (isOther) this._otherBranch = branch;\n });\n this.innerHTML = '';\n this._isInitialized = true;\n }\n\n disconnectedCallback() { this._observer?.disconnect(); }\n\n private evaluate() {\n if (!this._isInitialized) return;\n let matched = false;\n const chooseValue = this.getAttribute('swc-value') ?? this.getAttribute('value') ?? this._swcValue;\n this.innerHTML = '';\n\n for (const branch of this._branches) {\n if (matched) break;\n const testAttr = branch.test;\n if (testAttr === null || testAttr.includes('{{')) continue;\n let isMet = false;\n if (chooseValue !== undefined && chooseValue !== null) { isMet = String(chooseValue) === String(testAttr); }\n else { try { if (testAttr === 'true') isMet = true; else if (testAttr === 'false') isMet = false; else isMet = !!new Function('return ' + testAttr)(); } catch (e) { isMet = false; } }\n\n if (isMet) {\n this._renderBranch(branch);\n matched = true;\n }\n }\n\n if (!matched && this._otherBranch) { this._renderBranch(this._otherBranch); }\n }\n\n private _renderBranch(branch: Branch) {\n const clone = branch.tpl.cloneNode(true) as HTMLElement;\n clone.style.display = 'contents';\n this.appendChild(clone);\n this.applyData(clone, this._swcValue);\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;AAAA,SAAS,qBAAqB;AAC9B,SAAS,gCAAgC;AAQlC,IAAM,kBAAN,MAAMA,yBAAwB,yBAAwB;EAAtD,cAAA;;AACG,SAAA,YAAqC;AACrC,SAAA,YAAiB;AACjB,SAAA,YAAsB,CAAA;AACtB,SAAA,eAA8B;AAC9B,SAAA,iBAAiB;EA6D3B;EA3DE,IAAI,SAAS,KAAQ;AAAI,SAAK,YAAY;AAAK,SAAK,SAAQ;EAAI;EAChE,IAAI,WAAQ;AAAK,WAAO,KAAK;EAAW;EAExC,oBAAiB;AACf,SAAK,MAAM,UAAU;AACrB,SAAK,cAAa;AAClB,SAAK,YAAY,IAAI,iBAAiB,MAAM,KAAK,SAAQ,CAAE;AAC3D,SAAK,UAAU,QAAQ,MAAM,EAAE,YAAY,KAAI,CAAE;AACjD,SAAK,SAAQ;EACf;EAEQ,g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ClC,UAAM,QAAQ,OAAO,IAAI,UAAU,IAAI;AACvC,UAAM,MAAM,UAAU;AACtB,SAAK,YAAY,KAAK;AACtB,SAAK,UAAU,OAAO,KAAK,SAAS;EACtC;;AAjEW,kBAAe,WAAA;EAD3B,cAAc,EAAE,MAAM,qBAAqB,SAAS,SAAQ,CAAE;GAClD,eAAe;",
|
|
6
6
|
"names": ["SwcChooseDialog"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/is/SwcChooseDiv.ts"],
|
|
4
|
-
"sourcesContent": ["import { elementDefine } from '../index';\nimport { SwcHTMLDivElementBase } from './SwcHTMLDivElementBase';\n\ninterface Branch {\n tpl: HTMLElement;\n test: string | null;\n}\n\n@elementDefine({ name: 'swc-choose-div', extends: 'div' })\nexport class SwcChooseDiv extends SwcHTMLDivElementBase {\n private _observer: MutationObserver | null = null;\n private _swcValue: any = undefined;\n private _branches: Branch[] = [];\n private _otherBranch: Branch | null = null;\n private _isInitialized = false;\n\n set swcValue(val: any) { this._swcValue = val; this.evaluate(); }\n get swcValue() { return this._swcValue; }\n\n connectedCallback() {\n this.style.display = 'contents';\n this._initBranches();\n this._observer = new MutationObserver(() => this.evaluate());\n this._observer.observe(this, { attributes: true });\n this.evaluate();\n }\n\n private _initBranches() {\n if (this._isInitialized) return;\n const children = Array.from(this.children);\n children.forEach(c => {\n const isWhen = c.localName === 'swc-when' || c.getAttribute('is')?.startsWith('swc-when-');\n const isOther = c.localName === 'swc-other' || c.getAttribute('is')?.startsWith('swc-other-');\n const branch: Branch = {\n tpl: c.cloneNode(true) as HTMLElement,\n test: c.getAttribute('test')\n };\n if (isWhen) this._branches.push(branch);\n else if (isOther) this._otherBranch = branch;\n });\n this.innerHTML = '';\n this._isInitialized = true;\n }\n\n disconnectedCallback() { this._observer?.disconnect(); }\n\n private evaluate() {\n if (!this._isInitialized) return;\n let matched = false;\n const chooseValue = this.getAttribute('swc-value') ?? this.getAttribute('value') ?? this._swcValue;\n this.innerHTML = '';\n\n for (const branch of this._branches) {\n if (matched) break;\n const testAttr = branch.test;\n if (testAttr === null || testAttr.includes('{{')) continue;\n let isMet = false;\n if (chooseValue !== undefined && chooseValue !== null) { isMet = String(chooseValue) === String(testAttr); }\n else { try { if (testAttr === 'true') isMet = true; else if (testAttr === 'false') isMet = false; else isMet = !!new Function('return ' + testAttr)(); } catch (e) { isMet = false; } }\n\n if (isMet) {\n this._renderBranch(branch);\n matched = true;\n }\n }\n\n if (!matched && this._otherBranch) { this._renderBranch(this._otherBranch); }\n }\n\n private _renderBranch(branch: Branch) {\n const clone = branch.tpl.cloneNode(true) as HTMLElement;\n
|
|
5
|
-
"mappings": ";;;;;;AAAA,SAAS,qBAAqB;AAC9B,SAAS,6BAA6B;AAQ/B,IAAM,eAAN,MAAMA,sBAAqB,sBAAqB;EAAhD,cAAA;;AACG,SAAA,YAAqC;AACrC,SAAA,YAAiB;AACjB,SAAA,YAAsB,CAAA;AACtB,SAAA,eAA8B;AAC9B,SAAA,iBAAiB;
|
|
4
|
+
"sourcesContent": ["import { elementDefine } from '../index';\nimport { SwcHTMLDivElementBase } from './SwcHTMLDivElementBase';\n\ninterface Branch {\n tpl: HTMLElement;\n test: string | null;\n}\n\n@elementDefine({ name: 'swc-choose-div', extends: 'div' })\nexport class SwcChooseDiv extends SwcHTMLDivElementBase {\n private _observer: MutationObserver | null = null;\n private _swcValue: any = undefined;\n private _branches: Branch[] = [];\n private _otherBranch: Branch | null = null;\n private _isInitialized = false;\n\n set swcValue(val: any) { this._swcValue = val; this.evaluate(); }\n get swcValue() { return this._swcValue; }\n\n connectedCallback() {\n this.style.display = 'contents';\n this._initBranches();\n this._observer = new MutationObserver(() => this.evaluate());\n this._observer.observe(this, { attributes: true });\n this.evaluate();\n }\n\n private _initBranches() {\n if (this._isInitialized) return;\n const children = Array.from(this.children);\n children.forEach(c => {\n const isWhen = c.localName === 'swc-when' || c.getAttribute('is')?.startsWith('swc-when-');\n const isOther = c.localName === 'swc-other' || c.getAttribute('is')?.startsWith('swc-other-');\n const branch: Branch = {\n tpl: c.cloneNode(true) as HTMLElement,\n test: c.getAttribute('test')\n };\n if (isWhen) this._branches.push(branch);\n else if (isOther) this._otherBranch = branch;\n });\n this.innerHTML = '';\n this._isInitialized = true;\n }\n\n disconnectedCallback() { this._observer?.disconnect(); }\n\n private evaluate() {\n if (!this._isInitialized) return;\n let matched = false;\n const chooseValue = this.getAttribute('swc-value') ?? this.getAttribute('value') ?? this._swcValue;\n this.innerHTML = '';\n\n for (const branch of this._branches) {\n if (matched) break;\n const testAttr = branch.test;\n if (testAttr === null || testAttr.includes('{{')) continue;\n let isMet = false;\n if (chooseValue !== undefined && chooseValue !== null) { isMet = String(chooseValue) === String(testAttr); }\n else { try { if (testAttr === 'true') isMet = true; else if (testAttr === 'false') isMet = false; else isMet = !!new Function('return ' + testAttr)(); } catch (e) { isMet = false; } }\n\n if (isMet) {\n this._renderBranch(branch);\n matched = true;\n }\n }\n\n if (!matched && this._otherBranch) { this._renderBranch(this._otherBranch); }\n }\n\n private _renderBranch(branch: Branch) {\n const clone = branch.tpl.cloneNode(true) as HTMLElement;\n clone.style.display = 'contents';\n this.appendChild(clone);\n this.applyData(clone, this._swcValue);\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;AAAA,SAAS,qBAAqB;AAC9B,SAAS,6BAA6B;AAQ/B,IAAM,eAAN,MAAMA,sBAAqB,sBAAqB;EAAhD,cAAA;;AACG,SAAA,YAAqC;AACrC,SAAA,YAAiB;AACjB,SAAA,YAAsB,CAAA;AACtB,SAAA,eAA8B;AAC9B,SAAA,iBAAiB;EA6D3B;EA3DE,IAAI,SAAS,KAAQ;AAAI,SAAK,YAAY;AAAK,SAAK,SAAQ;EAAI;EAChE,IAAI,WAAQ;AAAK,WAAO,KAAK;EAAW;EAExC,oBAAiB;AACf,SAAK,MAAM,UAAU;AACrB,SAAK,cAAa;AAClB,SA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,cAAc,MAAM;AACzB,kBAAU;MACZ;IACF;AAEA,QAAI,CAAC,WAAW,KAAK,cAAc;AAAE,WAAK,cAAc,KAAK,YAAY;IAAG;EAC9E;EAEQ,cAAc,QAAc;AAClC,UAAM,QAAQ,OAAO,IAAI,UAAU,IAAI;AACvC,UAAM,MAAM,UAAU;AACtB,SAAK,YAAY,KAAK;AACtB,SAAK,UAAU,OAAO,KAAK,SAAS;EACtC;;AAjEW,eAAY,WAAA;EADxB,cAAc,EAAE,MAAM,kBAAkB,SAAS,MAAK,CAAE;GAC5C,YAAY;",
|
|
6
6
|
"names": ["SwcChooseDiv"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/is/SwcChooseDl.ts"],
|
|
4
|
-
"sourcesContent": ["import { elementDefine } from '../index';\nimport { SwcHTMLDListElementBase } from './SwcHTMLDListElementBase';\n\ninterface Branch {\n tpl: HTMLElement;\n test: string | null;\n}\n\n@elementDefine({ name: 'swc-choose-dl', extends: 'dl' })\nexport class SwcChooseDl extends SwcHTMLDListElementBase {\n private _observer: MutationObserver | null = null;\n private _swcValue: any = undefined;\n private _branches: Branch[] = [];\n private _otherBranch: Branch | null = null;\n private _isInitialized = false;\n\n set swcValue(val: any) { this._swcValue = val; this.evaluate(); }\n get swcValue() { return this._swcValue; }\n\n connectedCallback() {\n this.style.display = 'contents';\n this._initBranches();\n this._observer = new MutationObserver(() => this.evaluate());\n this._observer.observe(this, { attributes: true });\n this.evaluate();\n }\n\n private _initBranches() {\n if (this._isInitialized) return;\n const children = Array.from(this.children);\n children.forEach(c => {\n const isWhen = c.localName === 'swc-when' || c.getAttribute('is')?.startsWith('swc-when-');\n const isOther = c.localName === 'swc-other' || c.getAttribute('is')?.startsWith('swc-other-');\n const branch: Branch = {\n tpl: c.cloneNode(true) as HTMLElement,\n test: c.getAttribute('test')\n };\n if (isWhen) this._branches.push(branch);\n else if (isOther) this._otherBranch = branch;\n });\n this.innerHTML = '';\n this._isInitialized = true;\n }\n\n disconnectedCallback() { this._observer?.disconnect(); }\n\n private evaluate() {\n if (!this._isInitialized) return;\n let matched = false;\n const chooseValue = this.getAttribute('swc-value') ?? this.getAttribute('value') ?? this._swcValue;\n this.innerHTML = '';\n\n for (const branch of this._branches) {\n if (matched) break;\n const testAttr = branch.test;\n if (testAttr === null || testAttr.includes('{{')) continue;\n let isMet = false;\n if (chooseValue !== undefined && chooseValue !== null) { isMet = String(chooseValue) === String(testAttr); }\n else { try { if (testAttr === 'true') isMet = true; else if (testAttr === 'false') isMet = false; else isMet = !!new Function('return ' + testAttr)(); } catch (e) { isMet = false; } }\n\n if (isMet) {\n this._renderBranch(branch);\n matched = true;\n }\n }\n\n if (!matched && this._otherBranch) { this._renderBranch(this._otherBranch); }\n }\n\n private _renderBranch(branch: Branch) {\n const clone = branch.tpl.cloneNode(true) as HTMLElement;\n
|
|
5
|
-
"mappings": ";;;;;;AAAA,SAAS,qBAAqB;AAC9B,SAAS,+BAA+B;AAQjC,IAAM,cAAN,MAAMA,qBAAoB,wBAAuB;EAAjD,cAAA;;AACG,SAAA,YAAqC;AACrC,SAAA,YAAiB;AACjB,SAAA,YAAsB,CAAA;AACtB,SAAA,eAA8B;AAC9B,SAAA,iBAAiB;
|
|
4
|
+
"sourcesContent": ["import { elementDefine } from '../index';\nimport { SwcHTMLDListElementBase } from './SwcHTMLDListElementBase';\n\ninterface Branch {\n tpl: HTMLElement;\n test: string | null;\n}\n\n@elementDefine({ name: 'swc-choose-dl', extends: 'dl' })\nexport class SwcChooseDl extends SwcHTMLDListElementBase {\n private _observer: MutationObserver | null = null;\n private _swcValue: any = undefined;\n private _branches: Branch[] = [];\n private _otherBranch: Branch | null = null;\n private _isInitialized = false;\n\n set swcValue(val: any) { this._swcValue = val; this.evaluate(); }\n get swcValue() { return this._swcValue; }\n\n connectedCallback() {\n this.style.display = 'contents';\n this._initBranches();\n this._observer = new MutationObserver(() => this.evaluate());\n this._observer.observe(this, { attributes: true });\n this.evaluate();\n }\n\n private _initBranches() {\n if (this._isInitialized) return;\n const children = Array.from(this.children);\n children.forEach(c => {\n const isWhen = c.localName === 'swc-when' || c.getAttribute('is')?.startsWith('swc-when-');\n const isOther = c.localName === 'swc-other' || c.getAttribute('is')?.startsWith('swc-other-');\n const branch: Branch = {\n tpl: c.cloneNode(true) as HTMLElement,\n test: c.getAttribute('test')\n };\n if (isWhen) this._branches.push(branch);\n else if (isOther) this._otherBranch = branch;\n });\n this.innerHTML = '';\n this._isInitialized = true;\n }\n\n disconnectedCallback() { this._observer?.disconnect(); }\n\n private evaluate() {\n if (!this._isInitialized) return;\n let matched = false;\n const chooseValue = this.getAttribute('swc-value') ?? this.getAttribute('value') ?? this._swcValue;\n this.innerHTML = '';\n\n for (const branch of this._branches) {\n if (matched) break;\n const testAttr = branch.test;\n if (testAttr === null || testAttr.includes('{{')) continue;\n let isMet = false;\n if (chooseValue !== undefined && chooseValue !== null) { isMet = String(chooseValue) === String(testAttr); }\n else { try { if (testAttr === 'true') isMet = true; else if (testAttr === 'false') isMet = false; else isMet = !!new Function('return ' + testAttr)(); } catch (e) { isMet = false; } }\n\n if (isMet) {\n this._renderBranch(branch);\n matched = true;\n }\n }\n\n if (!matched && this._otherBranch) { this._renderBranch(this._otherBranch); }\n }\n\n private _renderBranch(branch: Branch) {\n const clone = branch.tpl.cloneNode(true) as HTMLElement;\n clone.style.display = 'contents';\n this.appendChild(clone);\n this.applyData(clone, this._swcValue);\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;AAAA,SAAS,qBAAqB;AAC9B,SAAS,+BAA+B;AAQjC,IAAM,cAAN,MAAMA,qBAAoB,wBAAuB;EAAjD,cAAA;;AACG,SAAA,YAAqC;AACrC,SAAA,YAAiB;AACjB,SAAA,YAAsB,CAAA;AACtB,SAAA,eAA8B;AAC9B,SAAA,iBAAiB;EA6D3B;EA3DE,IAAI,SAAS,KAAQ;AAAI,SAAK,YAA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;;AAAY,oBAAQ,CAAC,CAAC,IAAI,SAAS,YAAY,QAAQ,EAAC;QAAI,SAAS,GAAG;AAAE,kBAAQ;QAAO;MAAE;AAEtL,UAAI,OAAO;AACT,aAAK,cAAc,MAAM;AACzB,kBAAU;MACZ;IACF;AAEA,QAAI,CAAC,WAAW,KAAK,cAAc;AAAE,WAAK,cAAc,KAAK,YAAY;IAAG;EAC9E;EAEQ,cAAc,QAAc;AAClC,UAAM,QAAQ,OAAO,IAAI,UAAU,IAAI;AACvC,UAAM,MAAM,UAAU;AACtB,SAAK,YAAY,KAAK;AACtB,SAAK,UAAU,OAAO,KAAK,SAAS;EACtC;;AAjEW,cAAW,WAAA;EADvB,cAAc,EAAE,MAAM,iBAAiB,SAAS,KAAI,CAAE;GAC1C,WAAW;",
|
|
6
6
|
"names": ["SwcChooseDl"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/is/SwcChooseEmbed.ts"],
|
|
4
|
-
"sourcesContent": ["import { elementDefine } from '../index';\nimport { SwcHTMLEmbedElementBase } from './SwcHTMLEmbedElementBase';\n\ninterface Branch {\n tpl: HTMLElement;\n test: string | null;\n}\n\n@elementDefine({ name: 'swc-choose-embed', extends: 'embed' })\nexport class SwcChooseEmbed extends SwcHTMLEmbedElementBase {\n private _observer: MutationObserver | null = null;\n private _swcValue: any = undefined;\n private _branches: Branch[] = [];\n private _otherBranch: Branch | null = null;\n private _isInitialized = false;\n\n set swcValue(val: any) { this._swcValue = val; this.evaluate(); }\n get swcValue() { return this._swcValue; }\n\n connectedCallback() {\n this.style.display = 'contents';\n this._initBranches();\n this._observer = new MutationObserver(() => this.evaluate());\n this._observer.observe(this, { attributes: true });\n this.evaluate();\n }\n\n private _initBranches() {\n if (this._isInitialized) return;\n const children = Array.from(this.children);\n children.forEach(c => {\n const isWhen = c.localName === 'swc-when' || c.getAttribute('is')?.startsWith('swc-when-');\n const isOther = c.localName === 'swc-other' || c.getAttribute('is')?.startsWith('swc-other-');\n const branch: Branch = {\n tpl: c.cloneNode(true) as HTMLElement,\n test: c.getAttribute('test')\n };\n if (isWhen) this._branches.push(branch);\n else if (isOther) this._otherBranch = branch;\n });\n this.innerHTML = '';\n this._isInitialized = true;\n }\n\n disconnectedCallback() { this._observer?.disconnect(); }\n\n private evaluate() {\n if (!this._isInitialized) return;\n let matched = false;\n const chooseValue = this.getAttribute('swc-value') ?? this.getAttribute('value') ?? this._swcValue;\n this.innerHTML = '';\n\n for (const branch of this._branches) {\n if (matched) break;\n const testAttr = branch.test;\n if (testAttr === null || testAttr.includes('{{')) continue;\n let isMet = false;\n if (chooseValue !== undefined && chooseValue !== null) { isMet = String(chooseValue) === String(testAttr); }\n else { try { if (testAttr === 'true') isMet = true; else if (testAttr === 'false') isMet = false; else isMet = !!new Function('return ' + testAttr)(); } catch (e) { isMet = false; } }\n\n if (isMet) {\n this._renderBranch(branch);\n matched = true;\n }\n }\n\n if (!matched && this._otherBranch) { this._renderBranch(this._otherBranch); }\n }\n\n private _renderBranch(branch: Branch) {\n const clone = branch.tpl.cloneNode(true) as HTMLElement;\n
|
|
5
|
-
"mappings": ";;;;;;AAAA,SAAS,qBAAqB;AAC9B,SAAS,+BAA+B;AAQjC,IAAM,iBAAN,MAAMA,wBAAuB,wBAAuB;EAApD,cAAA;;AACG,SAAA,YAAqC;AACrC,SAAA,YAAiB;AACjB,SAAA,YAAsB,CAAA;AACtB,SAAA,eAA8B;AAC9B,SAAA,iBAAiB;
|
|
4
|
+
"sourcesContent": ["import { elementDefine } from '../index';\nimport { SwcHTMLEmbedElementBase } from './SwcHTMLEmbedElementBase';\n\ninterface Branch {\n tpl: HTMLElement;\n test: string | null;\n}\n\n@elementDefine({ name: 'swc-choose-embed', extends: 'embed' })\nexport class SwcChooseEmbed extends SwcHTMLEmbedElementBase {\n private _observer: MutationObserver | null = null;\n private _swcValue: any = undefined;\n private _branches: Branch[] = [];\n private _otherBranch: Branch | null = null;\n private _isInitialized = false;\n\n set swcValue(val: any) { this._swcValue = val; this.evaluate(); }\n get swcValue() { return this._swcValue; }\n\n connectedCallback() {\n this.style.display = 'contents';\n this._initBranches();\n this._observer = new MutationObserver(() => this.evaluate());\n this._observer.observe(this, { attributes: true });\n this.evaluate();\n }\n\n private _initBranches() {\n if (this._isInitialized) return;\n const children = Array.from(this.children);\n children.forEach(c => {\n const isWhen = c.localName === 'swc-when' || c.getAttribute('is')?.startsWith('swc-when-');\n const isOther = c.localName === 'swc-other' || c.getAttribute('is')?.startsWith('swc-other-');\n const branch: Branch = {\n tpl: c.cloneNode(true) as HTMLElement,\n test: c.getAttribute('test')\n };\n if (isWhen) this._branches.push(branch);\n else if (isOther) this._otherBranch = branch;\n });\n this.innerHTML = '';\n this._isInitialized = true;\n }\n\n disconnectedCallback() { this._observer?.disconnect(); }\n\n private evaluate() {\n if (!this._isInitialized) return;\n let matched = false;\n const chooseValue = this.getAttribute('swc-value') ?? this.getAttribute('value') ?? this._swcValue;\n this.innerHTML = '';\n\n for (const branch of this._branches) {\n if (matched) break;\n const testAttr = branch.test;\n if (testAttr === null || testAttr.includes('{{')) continue;\n let isMet = false;\n if (chooseValue !== undefined && chooseValue !== null) { isMet = String(chooseValue) === String(testAttr); }\n else { try { if (testAttr === 'true') isMet = true; else if (testAttr === 'false') isMet = false; else isMet = !!new Function('return ' + testAttr)(); } catch (e) { isMet = false; } }\n\n if (isMet) {\n this._renderBranch(branch);\n matched = true;\n }\n }\n\n if (!matched && this._otherBranch) { this._renderBranch(this._otherBranch); }\n }\n\n private _renderBranch(branch: Branch) {\n const clone = branch.tpl.cloneNode(true) as HTMLElement;\n clone.style.display = 'contents';\n this.appendChild(clone);\n this.applyData(clone, this._swcValue);\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;AAAA,SAAS,qBAAqB;AAC9B,SAAS,+BAA+B;AAQjC,IAAM,iBAAN,MAAMA,wBAAuB,wBAAuB;EAApD,cAAA;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AAgB,UAAa,gBAAgB,MAAM;AAAE,gBAAQ,OAAO,WAAW,MAAM,OAAO,QAAQ;MAAG,OACtG;AAAE,YAAI;AAAE,cAAI,aAAa;AAAQ,oBAAQ;mBAAe,aAAa;AAAS,oBAAQ;;AAAY,oBAAQ,CAAC,CAAC,IAAI,SAAS,YAAY,QAAQ,EAAC;QAAI,SAAS,GAAG;AAAE,kBAAQ;QAAO;MAAE;AAEtL,UAAI,OAAO;AACT,aAAK,cAAc,MAAM;AACzB,kBAAU;MACZ;IACF;AAEA,QAAI,CAAC,WAAW,KAAK,cAAc;AAAE,WAAK,cAAc,KAAK,YAAY;IAAG;EAC9E;EAEQ,cAAc,QAAc;AAClC,UAAM,QAAQ,OAAO,IAAI,UAAU,IAAI;AACvC,UAAM,MAAM,UAAU;AACtB,SAAK,YAAY,KAAK;AACtB,SAAK,UAAU,OAAO,KAAK,SAAS;EACtC;;AAjEW,iBAAc,WAAA;EAD1B,cAAc,EAAE,MAAM,oBAAoB,SAAS,QAAO,CAAE;GAChD,cAAc;",
|
|
6
6
|
"names": ["SwcChooseEmbed"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/is/SwcChooseFieldSet.ts"],
|
|
4
|
-
"sourcesContent": ["import { elementDefine } from '../index';\nimport { SwcHTMLFieldSetElementBase } from './SwcHTMLFieldSetElementBase';\n\ninterface Branch {\n tpl: HTMLElement;\n test: string | null;\n}\n\n@elementDefine({ name: 'swc-choose-fieldset', extends: 'fieldset' })\nexport class SwcChooseFieldSet extends SwcHTMLFieldSetElementBase {\n private _observer: MutationObserver | null = null;\n private _swcValue: any = undefined;\n private _branches: Branch[] = [];\n private _otherBranch: Branch | null = null;\n private _isInitialized = false;\n\n set swcValue(val: any) { this._swcValue = val; this.evaluate(); }\n get swcValue() { return this._swcValue; }\n\n connectedCallback() {\n this.style.display = 'contents';\n this._initBranches();\n this._observer = new MutationObserver(() => this.evaluate());\n this._observer.observe(this, { attributes: true });\n this.evaluate();\n }\n\n private _initBranches() {\n if (this._isInitialized) return;\n const children = Array.from(this.children);\n children.forEach(c => {\n const isWhen = c.localName === 'swc-when' || c.getAttribute('is')?.startsWith('swc-when-');\n const isOther = c.localName === 'swc-other' || c.getAttribute('is')?.startsWith('swc-other-');\n const branch: Branch = {\n tpl: c.cloneNode(true) as HTMLElement,\n test: c.getAttribute('test')\n };\n if (isWhen) this._branches.push(branch);\n else if (isOther) this._otherBranch = branch;\n });\n this.innerHTML = '';\n this._isInitialized = true;\n }\n\n disconnectedCallback() { this._observer?.disconnect(); }\n\n private evaluate() {\n if (!this._isInitialized) return;\n let matched = false;\n const chooseValue = this.getAttribute('swc-value') ?? this.getAttribute('value') ?? this._swcValue;\n this.innerHTML = '';\n\n for (const branch of this._branches) {\n if (matched) break;\n const testAttr = branch.test;\n if (testAttr === null || testAttr.includes('{{')) continue;\n let isMet = false;\n if (chooseValue !== undefined && chooseValue !== null) { isMet = String(chooseValue) === String(testAttr); }\n else { try { if (testAttr === 'true') isMet = true; else if (testAttr === 'false') isMet = false; else isMet = !!new Function('return ' + testAttr)(); } catch (e) { isMet = false; } }\n\n if (isMet) {\n this._renderBranch(branch);\n matched = true;\n }\n }\n\n if (!matched && this._otherBranch) { this._renderBranch(this._otherBranch); }\n }\n\n private _renderBranch(branch: Branch) {\n const clone = branch.tpl.cloneNode(true) as HTMLElement;\n
|
|
5
|
-
"mappings": ";;;;;;AAAA,SAAS,qBAAqB;AAC9B,SAAS,kCAAkC;AAQpC,IAAM,oBAAN,MAAMA,2BAA0B,2BAA0B;EAA1D,cAAA;;AACG,SAAA,YAAqC;AACrC,SAAA,YAAiB;AACjB,SAAA,YAAsB,CAAA;AACtB,SAAA,eAA8B;AAC9B,SAAA,iBAAiB;
|
|
4
|
+
"sourcesContent": ["import { elementDefine } from '../index';\nimport { SwcHTMLFieldSetElementBase } from './SwcHTMLFieldSetElementBase';\n\ninterface Branch {\n tpl: HTMLElement;\n test: string | null;\n}\n\n@elementDefine({ name: 'swc-choose-fieldset', extends: 'fieldset' })\nexport class SwcChooseFieldSet extends SwcHTMLFieldSetElementBase {\n private _observer: MutationObserver | null = null;\n private _swcValue: any = undefined;\n private _branches: Branch[] = [];\n private _otherBranch: Branch | null = null;\n private _isInitialized = false;\n\n set swcValue(val: any) { this._swcValue = val; this.evaluate(); }\n get swcValue() { return this._swcValue; }\n\n connectedCallback() {\n this.style.display = 'contents';\n this._initBranches();\n this._observer = new MutationObserver(() => this.evaluate());\n this._observer.observe(this, { attributes: true });\n this.evaluate();\n }\n\n private _initBranches() {\n if (this._isInitialized) return;\n const children = Array.from(this.children);\n children.forEach(c => {\n const isWhen = c.localName === 'swc-when' || c.getAttribute('is')?.startsWith('swc-when-');\n const isOther = c.localName === 'swc-other' || c.getAttribute('is')?.startsWith('swc-other-');\n const branch: Branch = {\n tpl: c.cloneNode(true) as HTMLElement,\n test: c.getAttribute('test')\n };\n if (isWhen) this._branches.push(branch);\n else if (isOther) this._otherBranch = branch;\n });\n this.innerHTML = '';\n this._isInitialized = true;\n }\n\n disconnectedCallback() { this._observer?.disconnect(); }\n\n private evaluate() {\n if (!this._isInitialized) return;\n let matched = false;\n const chooseValue = this.getAttribute('swc-value') ?? this.getAttribute('value') ?? this._swcValue;\n this.innerHTML = '';\n\n for (const branch of this._branches) {\n if (matched) break;\n const testAttr = branch.test;\n if (testAttr === null || testAttr.includes('{{')) continue;\n let isMet = false;\n if (chooseValue !== undefined && chooseValue !== null) { isMet = String(chooseValue) === String(testAttr); }\n else { try { if (testAttr === 'true') isMet = true; else if (testAttr === 'false') isMet = false; else isMet = !!new Function('return ' + testAttr)(); } catch (e) { isMet = false; } }\n\n if (isMet) {\n this._renderBranch(branch);\n matched = true;\n }\n }\n\n if (!matched && this._otherBranch) { this._renderBranch(this._otherBranch); }\n }\n\n private _renderBranch(branch: Branch) {\n const clone = branch.tpl.cloneNode(true) as HTMLElement;\n clone.style.display =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