├── wcomponents-i18n ├── dist │ ├── pot │ │ └── .touchfile │ └── README.txt ├── src │ └── main │ │ └── resources │ │ └── wc │ │ └── theme │ │ └── i18n │ │ └── en-US.json └── package.json ├── wcomponents-theme ├── src │ ├── main │ │ ├── sass │ │ │ ├── common │ │ │ │ ├── _disabled.scss │ │ │ │ ├── _image.scss │ │ │ │ ├── _draggable.scss │ │ │ │ ├── _typography.scss │ │ │ │ ├── _back-to-top.scss │ │ │ │ ├── _list.scss │ │ │ │ ├── README.md │ │ │ │ └── _icon.scss │ │ │ ├── _theme-phone.scss │ │ │ ├── fix │ │ │ │ ├── ie11 │ │ │ │ │ ├── _button.scss │ │ │ │ │ ├── _combo.scss │ │ │ │ │ ├── _wtabset.scss │ │ │ │ │ ├── _wtree.scss │ │ │ │ │ ├── _wmultifileupload.scss │ │ │ │ │ └── _wmenu.scss │ │ │ │ ├── uc │ │ │ │ │ ├── _wmessagebox.scss │ │ │ │ │ ├── _wfigure.scss │ │ │ │ │ ├── _multiformcomponent.scss │ │ │ │ │ ├── _wcollapsible.scss │ │ │ │ │ ├── _combo.scss │ │ │ │ │ ├── _wtabset.scss │ │ │ │ │ ├── _wtree.scss │ │ │ │ │ ├── _wtogglebutton.scss │ │ │ │ │ ├── _wtable.scss │ │ │ │ │ ├── _button.scss │ │ │ │ │ ├── _wmenu.scss │ │ │ │ │ └── _wdialog.scss │ │ │ │ └── edge │ │ │ │ │ └── _wtree.scss │ │ │ ├── _theme-vars.scss │ │ │ ├── respond │ │ │ │ └── phone │ │ │ │ │ ├── _checkableselect.scss │ │ │ │ │ ├── _wpanel.scss │ │ │ │ │ ├── _wtabset.scss │ │ │ │ │ ├── _wdefinitionlist.scss │ │ │ │ │ ├── _back-to-top.scss │ │ │ │ │ ├── _wdialog.scss │ │ │ │ │ ├── _image-edit.scss │ │ │ │ │ ├── _layout.scss │ │ │ │ │ └── _wmenu.scss │ │ │ ├── mixins │ │ │ │ ├── _respond.scss │ │ │ │ ├── _mandatory.scss │ │ │ │ └── _common.scss │ │ │ ├── components │ │ │ │ ├── _wdecoratedlabel.scss │ │ │ │ ├── _wheading.scss │ │ │ │ ├── _wlink.scss │ │ │ │ ├── _audiovideo.scss │ │ │ │ ├── _collapsibletoggle.scss │ │ │ │ ├── _clipboard.scss │ │ │ │ ├── _wtimeoutwarning.scss │ │ │ │ ├── _wselecttoggle.scss │ │ │ │ ├── _wshuffler.scss │ │ │ │ ├── _wskiplinks.scss │ │ │ │ └── _multiformcomponent.scss │ │ │ ├── wcdebug │ │ │ │ ├── _indicator.scss │ │ │ │ └── _script.scss │ │ │ ├── _libs.scss │ │ │ ├── _theme.scss │ │ │ ├── wc-edge.scss │ │ │ ├── wc-ie11.scss │ │ │ ├── wc-phone.scss │ │ │ ├── wc-uc.scss │ │ │ └── vars │ │ │ │ └── _section.scss │ │ ├── resource │ │ │ ├── favicon.ico │ │ │ └── fontawesome │ │ │ │ └── fonts │ │ │ │ ├── FontAwesome.otf │ │ │ │ ├── fontawesome-webfont.eot │ │ │ │ ├── fontawesome-webfont.ttf │ │ │ │ ├── fontawesome-webfont.woff │ │ │ │ └── fontawesome-webfont.woff2 │ │ ├── images │ │ │ └── loading-dark.gif │ │ └── js │ │ │ └── wc │ │ │ ├── dom │ │ │ ├── textContent.mjs │ │ │ ├── getEventOffset.mjs │ │ │ └── toDocFragment.mjs │ │ │ ├── debug │ │ │ ├── common.mjs │ │ │ └── indicator.mjs │ │ │ ├── isNumeric.mjs │ │ │ ├── has.mjs │ │ │ ├── string │ │ │ └── sprintf.mjs │ │ │ ├── array │ │ │ └── diff.mjs │ │ │ ├── ui │ │ │ ├── table.mjs │ │ │ ├── getForm.mjs │ │ │ ├── menu.mjs │ │ │ ├── validation │ │ │ │ └── all.mjs │ │ │ ├── dropdown.mjs │ │ │ └── disabledLink.mjs │ │ │ ├── date │ │ │ ├── isLeapYear.mjs │ │ │ ├── daysInMonth.mjs │ │ │ └── copy.mjs │ │ │ ├── key.mjs │ │ │ ├── fix │ │ │ └── width_uc.mjs │ │ │ ├── fixes.mjs │ │ │ ├── debounce.mjs │ │ │ └── xml │ │ │ └── xmlString.mjs │ └── test │ │ ├── resource │ │ ├── note.txt │ │ └── note.xml │ │ ├── intern │ │ └── resources │ │ │ ├── a8n.html │ │ │ ├── domAttribute.html │ │ │ ├── fileAccepted.html │ │ │ ├── ajaxTriggerManager.html │ │ │ ├── domConvertDynamicContent.html │ │ │ ├── myXml.xml │ │ │ ├── intern-chai.js │ │ │ ├── myXsl.xsl │ │ │ ├── domClassList.html │ │ │ ├── domGetStyle.html │ │ │ └── domCheckEnctype.html │ │ └── spec │ │ ├── wc.date.isLeapYear.test.mjs │ │ ├── wc.file.getFileSize.test.mjs │ │ ├── wc.debounce.test.mjs │ │ ├── wc.file.getMimeType.test.mjs │ │ ├── wc.dom.toDocFragment.test.mjs │ │ ├── wc.dom.uid.test.mjs │ │ ├── wc.dom.removeElement.test.mjs │ │ └── wc.string.escapeRe.test.mjs ├── scripts │ └── README.md ├── .eslintignore ├── .nycrc.json ├── jasmine.json ├── .babelrc.mjs └── tsconfig.json ├── wcomponents-core └── src │ ├── test │ ├── resources │ │ ├── templates │ │ │ ├── Test_Plain.txt │ │ │ ├── Test_Velocity.vm │ │ │ └── Test_Handlebars.hbs │ │ ├── i18n │ │ │ ├── theme.properties │ │ │ ├── test.properties │ │ │ └── test_fr_CA.properties │ │ ├── com │ │ │ └── github │ │ │ │ └── bordertech │ │ │ │ └── wcomponents │ │ │ │ ├── testapp │ │ │ │ ├── SearchResultRow.vm │ │ │ │ ├── SearchResultsPage.vm │ │ │ │ └── SearchCriteriaPage.vm │ │ │ │ ├── container │ │ │ │ ├── VelocityComponent_Test1.vm │ │ │ │ ├── VelocityComponent_Test2.vm │ │ │ │ └── VelocityComponent_Test3.vm │ │ │ │ └── velocity │ │ │ │ └── VelocityRenderer_Test.vm │ │ ├── image │ │ │ ├── x1.gif │ │ │ └── x2.gif │ │ ├── content │ │ │ ├── gif.gif │ │ │ ├── ogg.ogg │ │ │ ├── test.pdf │ │ │ ├── dodgy.pdf.tr5 │ │ │ └── test.tr5 │ │ ├── theme │ │ │ ├── wcomponents-theme │ │ │ │ ├── version.properties │ │ │ │ └── ThemeServlet_Testfile.xsl │ │ │ └── wcomponents-xslt │ │ │ │ └── xslt │ │ │ │ ├── all.xsl │ │ │ │ └── all_debug.xsl │ │ └── wcomponents-test.properties │ └── java │ │ └── com │ │ └── github │ │ └── bordertech │ │ └── wcomponents │ │ ├── testapp │ │ └── package-info.java │ │ ├── util │ │ └── package-info.java │ │ ├── subordinate │ │ ├── package-info.java │ │ └── builder │ │ │ ├── package-info.java │ │ │ └── SyntaxException_Test.java │ │ ├── package-info.java │ │ ├── registry │ │ └── package-info.java │ │ ├── autocomplete │ │ └── package-info.java │ │ ├── container │ │ ├── package-info.java │ │ └── TransformXMLTestHelper.java │ │ ├── layout │ │ └── package-info.java │ │ ├── monitor │ │ └── package-info.java │ │ ├── velocity │ │ └── package-info.java │ │ ├── validator │ │ └── package-info.java │ │ ├── validation │ │ └── package-info.java │ │ ├── servlet │ │ └── package-info.java │ │ ├── render │ │ └── webxml │ │ │ └── package-info.java │ │ ├── PerformanceTests.java │ │ ├── TestSampleException.java │ │ ├── MockContentStreamAccess.java │ │ ├── MockImage.java │ │ ├── WPrintButton_Test.java │ │ ├── WImageEditor_Test.java │ │ ├── BeanBoundComponentModel_Test.java │ │ ├── IntegrityException_Test.java │ │ ├── WNamingContext_Test.java │ │ ├── FatalErrorPageFactoryImpl_Test.java │ │ ├── BeanProviderBoundComponentModel_Test.java │ │ └── ActionEscape_Test.java │ └── main │ ├── resources │ ├── wcomponents-version.properties │ ├── icons │ │ └── thumbnails │ │ │ ├── misc.png │ │ │ ├── application-pdf.png │ │ │ ├── audio-x-generic.png │ │ │ ├── image-x-generic.png │ │ │ ├── text-x-generic.png │ │ │ ├── video-x-generic.png │ │ │ ├── application-msword.png │ │ │ ├── application-x-compress.png │ │ │ ├── application-vnd.ms-excel.png │ │ │ └── application-vnd.ms-powerpoint.png │ ├── com │ │ └── github │ │ │ └── bordertech │ │ │ └── wcomponents │ │ │ ├── velocity │ │ │ └── NoTemplateLayout.vm │ │ │ └── layout │ │ │ └── UIManager.properties │ ├── wcomponents.properties │ └── schema │ │ └── ui │ │ └── v1 │ │ ├── comment.xsd │ │ ├── version.xsd │ │ ├── session.xsd │ │ └── gaps.xsd │ └── java │ └── com │ └── github │ └── bordertech │ └── wcomponents │ ├── template │ └── package-info.java │ ├── file │ └── package-info.java │ ├── util │ ├── package-info.java │ ├── mock │ │ ├── package-info.java │ │ └── servlet │ │ │ └── package-info.java │ ├── thumbnail │ │ └── package-info.java │ ├── error │ │ ├── package-info.java │ │ ├── impl │ │ │ └── package-info.java │ │ └── SystemFailureMapper.java │ ├── visitor │ │ └── package-info.java │ ├── DeviceType.java │ ├── ComparableComparator.java │ └── ConfigurationLoader.java │ ├── package-info.java │ ├── registry │ └── package-info.java │ ├── container │ ├── package-info.java │ ├── TargetableIdException.java │ ├── SessionTokenException.java │ └── AjaxTriggerException.java │ ├── render │ ├── nil │ │ ├── package-info.java │ │ └── NullRenderContext.java │ └── webxml │ │ ├── package-info.java │ │ ├── WFieldWarningIndicatorRenderer.java │ │ ├── WFieldErrorIndicatorRenderer.java │ │ └── RadioButtonGroupRenderer.java │ ├── layout │ ├── package-info.java │ └── LayoutManager.java │ ├── autocomplete │ ├── package-info.java │ ├── type │ │ └── package-info.java │ ├── segment │ │ ├── package-info.java │ │ └── AutocompleteSegment.java │ ├── AutocompleteableNumeric.java │ └── AutocompleteablePassword.java │ ├── monitor │ └── package-info.java │ ├── portlet │ └── context │ │ └── package-info.java │ ├── servlet │ ├── package-info.java │ └── NoContextException.java │ ├── validator │ └── package-info.java │ ├── subordinate │ ├── package-info.java │ └── builder │ │ ├── package-info.java │ │ └── SyntaxException.java │ ├── validation │ └── package-info.java │ ├── velocity │ ├── package-info.java │ └── VelocityProperties.java │ ├── MenuItem.java │ ├── Labelable.java │ ├── WHorizontalRule.java │ ├── MultiInputComponent.java │ ├── ErrorPage.java │ ├── DialogOpenTrigger.java │ ├── AjaxInternalTrigger.java │ ├── DropZone.java │ ├── WBeanContainer.java │ ├── WSeparator.java │ ├── MessageContainer.java │ ├── WSkipLinks.java │ ├── Option.java │ ├── MenuItemGroup.java │ ├── SelectionToggleable.java │ ├── WebModel.java │ ├── IntegrityException.java │ ├── BeanTableDataModel.java │ ├── FatalErrorPageFactoryImpl.java │ ├── Diagnosable.java │ ├── AjaxTrigger.java │ ├── Audio.java │ ├── AjaxTarget.java │ ├── SubordinateTarget.java │ ├── SubordinateTrigger.java │ ├── Marginable.java │ ├── BeanBoundComponentModel.java │ ├── BeanProviderBoundComponentModel.java │ ├── Placeholderable.java │ ├── Image.java │ ├── Disableable.java │ ├── Mandatable.java │ ├── MenuContainer.java │ ├── WInvisibleContainer.java │ ├── FatalErrorPageFactory.java │ ├── ActionEscape.java │ ├── WPrintButton.java │ ├── Action.java │ ├── Video.java │ ├── WMessagesValidatingAction.java │ ├── RendererFactory.java │ └── Targetable.java ├── wcomponents-examples ├── src │ ├── main │ │ ├── resources │ │ │ ├── wcomponents-app.properties │ │ │ ├── wcomponents-examples-version.properties │ │ │ ├── audio │ │ │ │ ├── au.au │ │ │ │ ├── flac.flac │ │ │ │ ├── mp3.mp3 │ │ │ │ ├── ogg.ogg │ │ │ │ └── wav.wav │ │ │ ├── i18n │ │ │ │ ├── en.png │ │ │ │ ├── en_US.png │ │ │ │ ├── fr_CA.png │ │ │ │ ├── default.png │ │ │ │ ├── example.properties │ │ │ │ └── example_fr_CA.properties │ │ │ ├── image │ │ │ │ ├── error.png │ │ │ │ ├── flag.png │ │ │ │ ├── help.png │ │ │ │ ├── home.png │ │ │ │ ├── lock.png │ │ │ │ ├── tick.png │ │ │ │ ├── user.png │ │ │ │ ├── cancel.png │ │ │ │ ├── help-w.png │ │ │ │ ├── overlay.png │ │ │ │ ├── pencil.png │ │ │ │ ├── refresh.png │ │ │ │ ├── remove.png │ │ │ │ ├── success.png │ │ │ │ ├── wrench.png │ │ │ │ ├── attachment.png │ │ │ │ ├── cancel-old.png │ │ │ │ ├── cancel-w.png │ │ │ │ ├── mail-post.png │ │ │ │ ├── printer-w.png │ │ │ │ ├── refresh-w.png │ │ │ │ ├── search-w.png │ │ │ │ ├── settings.png │ │ │ │ ├── edit-undo-8.png │ │ │ │ ├── information.png │ │ │ │ ├── view-filter.png │ │ │ │ ├── document-print.png │ │ │ │ ├── document-save-5.png │ │ │ │ ├── text-x-source.png │ │ │ │ ├── user-properties.png │ │ │ │ ├── address-book-new.png │ │ │ │ ├── address-book-open.png │ │ │ │ └── open-in-browser-w.png │ │ │ ├── video │ │ │ │ ├── avi.avi │ │ │ │ ├── mp4.mp4 │ │ │ │ ├── mpg.mpg │ │ │ │ ├── ogv.ogv │ │ │ │ ├── webm.webm │ │ │ │ ├── wmv.wmv │ │ │ │ └── poster_image.png │ │ │ └── com │ │ │ │ └── github │ │ │ │ └── bordertech │ │ │ │ └── wcomponents │ │ │ │ └── examples │ │ │ │ ├── clientValidation.txt │ │ │ │ ├── iconStack.moustache │ │ │ │ ├── test.pdf │ │ │ │ ├── Einstein.jpg │ │ │ │ ├── TextDuplicator_Velocity2.vm │ │ │ │ ├── portlet-portrait.jpg │ │ │ │ ├── picker │ │ │ │ ├── wclogo_small.gif │ │ │ │ ├── TreePicker.vm │ │ │ │ └── sourceView.vm │ │ │ │ ├── petstore │ │ │ │ └── resources │ │ │ │ │ └── images │ │ │ │ │ ├── cat.gif │ │ │ │ │ ├── dog.gif │ │ │ │ │ ├── fish.gif │ │ │ │ │ ├── goat.gif │ │ │ │ │ ├── llama.gif │ │ │ │ │ └── rabbit.gif │ │ │ │ ├── ForwardExample.vm │ │ │ │ ├── TextDuplicator_VelocityImpl.vm │ │ │ │ ├── test.tr5 │ │ │ │ ├── repeater │ │ │ │ └── ProductItemRenderer.vm │ │ │ │ ├── WButtonExample.vm │ │ │ │ ├── syntaxHighlight.css │ │ │ │ ├── initImageEditExample.hbs │ │ │ │ └── hellobutton.js │ │ └── java │ │ │ └── com │ │ │ └── github │ │ │ └── bordertech │ │ │ └── wcomponents │ │ │ └── examples │ │ │ ├── menu │ │ │ ├── package-info.java │ │ │ └── StringTreeNode.java │ │ │ ├── picker │ │ │ └── package-info.java │ │ │ ├── table │ │ │ └── package-info.java │ │ │ ├── datatable │ │ │ └── package-info.java │ │ │ ├── layout │ │ │ └── package-info.java │ │ │ ├── othersys │ │ │ └── package-info.java │ │ │ ├── package-info.java │ │ │ ├── repeater │ │ │ ├── package-info.java │ │ │ └── link │ │ │ │ └── package-info.java │ │ │ ├── validation │ │ │ ├── basic │ │ │ │ ├── package-info.java │ │ │ │ └── BasicFieldsValidationExample.java │ │ │ ├── fields │ │ │ │ └── package-info.java │ │ │ ├── package-info.java │ │ │ └── repeater │ │ │ │ └── package-info.java │ │ │ ├── common │ │ │ ├── package-info.java │ │ │ └── ClientValidationTemplate.java │ │ │ ├── subordinate │ │ │ ├── package-info.java │ │ │ └── SubordinateControlSuite.java │ │ │ ├── theme │ │ │ ├── ajax │ │ │ │ └── package-info.java │ │ │ └── package-info.java │ │ │ ├── transientcontainer │ │ │ └── package-info.java │ │ │ ├── WHorizontalRuleExample.java │ │ │ ├── TextDuplicatorVelocity2.java │ │ │ ├── WImageCachedExample.java │ │ │ └── WTimeoutWarningDefaultExample.java │ └── test │ │ ├── java │ │ └── com │ │ │ └── github │ │ │ └── bordertech │ │ │ └── wcomponents │ │ │ └── examples │ │ │ ├── package-info.java │ │ │ └── SeleniumTests.java │ │ └── resources │ │ └── wcomponents-examples-test.properties ├── pmd-excludes.properties └── readme.txt ├── wcomponents-test-lib ├── src │ └── main │ │ ├── resources │ │ ├── wcomponents-app.properties │ │ └── wcomponents-test-lib-version.properties │ │ └── java │ │ └── com │ │ └── github │ │ └── bordertech │ │ └── wcomponents │ │ └── test │ │ ├── example │ │ ├── package-info.java │ │ └── ExampleMultiBrowserSeleniumTest.java │ │ ├── package-info.java │ │ └── selenium │ │ ├── element │ │ └── package-info.java │ │ ├── package-info.java │ │ ├── server │ │ └── package-info.java │ │ └── driver │ │ └── package-info.java └── spotbugs-exclude-filter.xml ├── wcomponents-lde ├── src │ ├── main │ │ ├── resources │ │ │ ├── wcomponents-lde-version.properties │ │ │ ├── wcomponents-app.properties │ │ │ ├── wcomponents-lde.properties │ │ │ └── com │ │ │ │ └── github │ │ │ │ └── bordertech │ │ │ │ └── wcomponents │ │ │ │ └── lde │ │ │ │ └── DevToolkit_footer.vm │ │ └── java │ │ │ └── com │ │ │ └── github │ │ │ └── bordertech │ │ │ └── wcomponents │ │ │ └── lde │ │ │ ├── examples │ │ │ └── package-info.java │ │ │ ├── package-info.java │ │ │ └── LdeLauncher.java │ └── test │ │ └── java │ │ └── com │ │ └── github │ │ └── bordertech │ │ └── wcomponents │ │ └── lde │ │ └── package-info.java └── spotbugs-exclude-filter.xml ├── wcomponents-examples-lde ├── src │ └── main │ │ ├── java │ │ └── com │ │ │ └── github │ │ │ └── bordertech │ │ │ └── wcomponents │ │ │ └── examples │ │ │ └── lde │ │ │ ├── package-info.java │ │ │ ├── StandaloneLauncherProxy.java │ │ │ └── PlainLauncherProxy.java │ │ └── resources │ │ └── wcomponents-app.properties └── checkstyle-exclude.xml ├── wcomponents-xslt └── src │ └── main │ └── xslt │ ├── wc.ui.skiplinks.xsl │ ├── wc.html.ie9minus.xsl │ ├── wc.ui.clipboard.xsl │ ├── wc.ui.version.xsl │ └── wc.ui.heading.xsl └── .editorconfig /wcomponents-i18n/dist/pot/.touchfile: -------------------------------------------------------------------------------- 1 | 2021-02-08 11:17:56 AM -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/common/_disabled.scss: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /wcomponents-theme/src/test/resource/note.txt: -------------------------------------------------------------------------------- 1 | pass the dutchie -------------------------------------------------------------------------------- /wcomponents-core/src/test/resources/templates/Test_Plain.txt: -------------------------------------------------------------------------------- 1 | Hello from plain text. -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/_theme-phone.scss: -------------------------------------------------------------------------------- 1 | // placeholder for theme use. 2 | -------------------------------------------------------------------------------- /wcomponents-core/src/test/resources/i18n/theme.properties: -------------------------------------------------------------------------------- 1 | some_i18n_key=yeah nah yeah 2 | -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/wcomponents-app.properties: -------------------------------------------------------------------------------- 1 | include=wcomponents-examples.properties 2 | -------------------------------------------------------------------------------- /wcomponents-test-lib/src/main/resources/wcomponents-app.properties: -------------------------------------------------------------------------------- 1 | include=wcomponents-test-lib.properties 2 | -------------------------------------------------------------------------------- /wcomponents-core/src/test/resources/i18n/test.properties: -------------------------------------------------------------------------------- 1 | SIMPLE_TEXT=default text 2 | PARAMETERISED_TEXT=default {0} -------------------------------------------------------------------------------- /wcomponents-core/src/test/resources/i18n/test_fr_CA.properties: -------------------------------------------------------------------------------- 1 | SIMPLE_TEXT=fr_CA text 2 | PARAMETERISED_TEXT=fr_CA {0} -------------------------------------------------------------------------------- /wcomponents-i18n/src/main/resources/wc/theme/i18n/en-US.json: -------------------------------------------------------------------------------- 1 | { 2 | "dialog_maxRestore": "Maximize/restore dialog" 3 | } 4 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/fix/ie11/_button.scss: -------------------------------------------------------------------------------- 1 | // TODO: move to themes 2 | 3 | button { 4 | cursor: default; 5 | } 6 | -------------------------------------------------------------------------------- /wcomponents-lde/src/main/resources/wcomponents-lde-version.properties: -------------------------------------------------------------------------------- 1 | # Current project version 2 | wcomponents-lde.version=${project.version} -------------------------------------------------------------------------------- /wcomponents-theme/src/test/intern/resources/a8n.html: -------------------------------------------------------------------------------- 1 |
hi
2 |
howdy
3 |
yo
-------------------------------------------------------------------------------- /wcomponents-core/src/main/resources/wcomponents-version.properties: -------------------------------------------------------------------------------- 1 | # Current project version 2 | bordertech.wcomponents.version=${project.version} -------------------------------------------------------------------------------- /wcomponents-examples/pmd-excludes.properties: -------------------------------------------------------------------------------- 1 | com.github.bordertech.wcomponents.examples.WComponentRenderPerfTest=DoNotCallGarbageCollectionExplicitly 2 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/resource/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-theme/src/main/resource/favicon.ico -------------------------------------------------------------------------------- /wcomponents-core/src/test/resources/com/github/bordertech/wcomponents/testapp/SearchResultRow.vm: -------------------------------------------------------------------------------- 1 | $name 2 | $country 3 | $happy 4 | -------------------------------------------------------------------------------- /wcomponents-core/src/test/resources/image/x1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-core/src/test/resources/image/x1.gif -------------------------------------------------------------------------------- /wcomponents-core/src/test/resources/image/x2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-core/src/test/resources/image/x2.gif -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/wcomponents-examples-version.properties: -------------------------------------------------------------------------------- 1 | # Current project version 2 | wcomponents-examples.version=${project.version} -------------------------------------------------------------------------------- /wcomponents-test-lib/src/main/resources/wcomponents-test-lib-version.properties: -------------------------------------------------------------------------------- 1 | # Current project version 2 | wcomponents-test-lib.version=${project.version} -------------------------------------------------------------------------------- /wcomponents-theme/src/main/images/loading-dark.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-theme/src/main/images/loading-dark.gif -------------------------------------------------------------------------------- /wcomponents-core/src/test/resources/com/github/bordertech/wcomponents/testapp/SearchResultsPage.vm: -------------------------------------------------------------------------------- 1 |

Search Results

2 | $resultsTable 3 | $newSearchButton -------------------------------------------------------------------------------- /wcomponents-core/src/test/resources/content/gif.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-core/src/test/resources/content/gif.gif -------------------------------------------------------------------------------- /wcomponents-core/src/test/resources/content/ogg.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-core/src/test/resources/content/ogg.ogg -------------------------------------------------------------------------------- /wcomponents-core/src/test/resources/content/test.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-core/src/test/resources/content/test.pdf -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/audio/au.au: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/audio/au.au -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/i18n/en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/i18n/en.png -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/audio/flac.flac: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/audio/flac.flac -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/audio/mp3.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/audio/mp3.mp3 -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/audio/ogg.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/audio/ogg.ogg -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/audio/wav.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/audio/wav.wav -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/i18n/en_US.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/i18n/en_US.png -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/i18n/fr_CA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/i18n/fr_CA.png -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/image/error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/image/error.png -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/image/flag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/image/flag.png -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/image/help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/image/help.png -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/image/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/image/home.png -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/image/lock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/image/lock.png -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/image/tick.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/image/tick.png -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/image/user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/image/user.png -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/video/avi.avi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/video/avi.avi -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/video/mp4.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/video/mp4.mp4 -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/video/mpg.mpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/video/mpg.mpg -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/video/ogv.ogv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/video/ogv.ogv -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/video/webm.webm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/video/webm.webm -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/video/wmv.wmv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/video/wmv.wmv -------------------------------------------------------------------------------- /wcomponents-core/src/test/resources/content/dodgy.pdf.tr5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-core/src/test/resources/content/dodgy.pdf.tr5 -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/i18n/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/i18n/default.png -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/image/cancel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/image/cancel.png -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/image/help-w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/image/help-w.png -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/image/overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/image/overlay.png -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/image/pencil.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/image/pencil.png -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/image/refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/image/refresh.png -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/image/remove.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/image/remove.png -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/image/success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/image/success.png -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/image/wrench.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/image/wrench.png -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/fix/ie11/_combo.scss: -------------------------------------------------------------------------------- 1 | dialog [role='combobox'][aria-expanded='true'] > [role='listbox'] { 2 | min-width: 0; 3 | width: auto; 4 | } 5 | -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/image/attachment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/image/attachment.png -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/image/cancel-old.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/image/cancel-old.png -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/image/cancel-w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/image/cancel-w.png -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/image/mail-post.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/image/mail-post.png -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/image/printer-w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/image/printer-w.png -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/image/refresh-w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/image/refresh-w.png -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/image/search-w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/image/search-w.png -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/image/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/image/settings.png -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/common/_image.scss: -------------------------------------------------------------------------------- 1 | 2 | img { 3 | border: 0; 4 | image-orientation: from-image; // no-brainer, browsers should do this by default 5 | } 6 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/resources/icons/thumbnails/misc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-core/src/main/resources/icons/thumbnails/misc.png -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/image/edit-undo-8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/image/edit-undo-8.png -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/image/information.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/image/information.png -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/image/view-filter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/image/view-filter.png -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/video/poster_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/video/poster_image.png -------------------------------------------------------------------------------- /wcomponents-theme/scripts/README.md: -------------------------------------------------------------------------------- 1 | # Build Helper Scripts 2 | 3 | This directory contains scripts that are part of the build but generally do not provide a useful entry point. 4 | -------------------------------------------------------------------------------- /wcomponents-core/src/test/resources/com/github/bordertech/wcomponents/testapp/SearchCriteriaPage.vm: -------------------------------------------------------------------------------- 1 |

Search Criteria

2 | $errorsBox 3 | $fieldLayout 4 | $searchButton $resetButton -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/image/document-print.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/image/document-print.png -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/image/document-save-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/image/document-save-5.png -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/image/text-x-source.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/image/text-x-source.png -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/image/user-properties.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/image/user-properties.png -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/fix/ie11/_wtabset.scss: -------------------------------------------------------------------------------- 1 | // IE11 does weird stuff with tabcontent if the tabset has a flex layout 2 | .wc-tabset-type-top { 3 | display: block; 4 | } 5 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/template/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Template renderers. 3 | */ 4 | package com.github.bordertech.wcomponents.template; 5 | -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/image/address-book-new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/image/address-book-new.png -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/image/address-book-open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/image/address-book-open.png -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/image/open-in-browser-w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/image/open-in-browser-w.png -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/_theme-vars.scss: -------------------------------------------------------------------------------- 1 | // Placeholder for theme use. 2 | // Override it in your theme to override default vars. 3 | // This is the first import in vars/_wc.scss. 4 | -------------------------------------------------------------------------------- /wcomponents-theme/.eslintignore: -------------------------------------------------------------------------------- 1 | # Only ignore third-party scripts 2 | **/lib/** 3 | # We are no longer using the intern tests, so ignore them until they are all dealt with 4 | src/test/intern/ 5 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/resource/fontawesome/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-theme/src/main/resource/fontawesome/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/respond/phone/_checkableselect.scss: -------------------------------------------------------------------------------- 1 | 2 | @if $wc-use-respond == true { 3 | [data-wc-colcount] { 4 | column-count: 1; 5 | column-gap: 0; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/resources/icons/thumbnails/application-pdf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-core/src/main/resources/icons/thumbnails/application-pdf.png -------------------------------------------------------------------------------- /wcomponents-core/src/main/resources/icons/thumbnails/audio-x-generic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-core/src/main/resources/icons/thumbnails/audio-x-generic.png -------------------------------------------------------------------------------- /wcomponents-core/src/main/resources/icons/thumbnails/image-x-generic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-core/src/main/resources/icons/thumbnails/image-x-generic.png -------------------------------------------------------------------------------- /wcomponents-core/src/main/resources/icons/thumbnails/text-x-generic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-core/src/main/resources/icons/thumbnails/text-x-generic.png -------------------------------------------------------------------------------- /wcomponents-core/src/main/resources/icons/thumbnails/video-x-generic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-core/src/main/resources/icons/thumbnails/video-x-generic.png -------------------------------------------------------------------------------- /wcomponents-core/src/test/resources/com/github/bordertech/wcomponents/container/VelocityComponent_Test1.vm: -------------------------------------------------------------------------------- 1 | ## Simple hello world - invokes toString on the test object 2 | $!{VelocityComponent_Test_key} -------------------------------------------------------------------------------- /wcomponents-lde/src/test/java/com/github/bordertech/wcomponents/lde/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains unit tests for the lde classes. 3 | */ 4 | package com.github.bordertech.wcomponents.lde; 5 | -------------------------------------------------------------------------------- /wcomponents-theme/src/test/intern/resources/domAttribute.html: -------------------------------------------------------------------------------- 1 |
2 | i don't know but i've been told 3 | 4 |
5 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/file/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains the classes used by file upload. 3 | */ 4 | package com.github.bordertech.wcomponents.file; 5 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains general WComponent utility classes. 3 | */ 4 | package com.github.bordertech.wcomponents.util; 5 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/resources/icons/thumbnails/application-msword.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-core/src/main/resources/icons/thumbnails/application-msword.png -------------------------------------------------------------------------------- /wcomponents-examples-lde/src/main/java/com/github/bordertech/wcomponents/examples/lde/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Proxy LDE Launchers. 3 | */ 4 | package com.github.bordertech.wcomponents.examples.lde; 5 | -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/com/github/bordertech/wcomponents/examples/clientValidation.txt: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains the core components of the WComponent framework. 3 | */ 4 | package com.github.bordertech.wcomponents; 5 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/mock/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains mock classes for unit testing. 3 | */ 4 | package com.github.bordertech.wcomponents.util.mock; 5 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/resource/fontawesome/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-theme/src/main/resource/fontawesome/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /wcomponents-theme/src/main/resource/fontawesome/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-theme/src/main/resource/fontawesome/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/fix/uc/_wmessagebox.scss: -------------------------------------------------------------------------------- 1 | 2 | 3 | @if $wc-use-respond == true { 4 | .wc-messagebox { 5 | > h1 > span { 6 | @include onscreen(1); 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /wcomponents-theme/src/test/resource/note.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Tove 4 | Jani 5 | Reminder 6 | Don't forget me this weekend! 7 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/registry/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Provides classes to register a component tree. 3 | */ 4 | package com.github.bordertech.wcomponents.registry; 5 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/resources/icons/thumbnails/application-x-compress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-core/src/main/resources/icons/thumbnails/application-x-compress.png -------------------------------------------------------------------------------- /wcomponents-core/src/test/java/com/github/bordertech/wcomponents/testapp/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains the classes for the test application. 3 | */ 4 | package com.github.bordertech.wcomponents.testapp; 5 | -------------------------------------------------------------------------------- /wcomponents-lde/src/main/java/com/github/bordertech/wcomponents/lde/examples/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains a Hello World Servlet example. 3 | */ 4 | package com.github.bordertech.wcomponents.lde.examples; 5 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/js/wc/dom/textContent.mjs: -------------------------------------------------------------------------------- 1 | // TODO don't need this anymore 2 | export default { 3 | get: element => element.textContent, 4 | set: (element, value) => element.textContent = value 5 | }; 6 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/resource/fontawesome/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-theme/src/main/resource/fontawesome/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /wcomponents-theme/src/main/resource/fontawesome/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-theme/src/main/resource/fontawesome/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /wcomponents-core/src/main/resources/icons/thumbnails/application-vnd.ms-excel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-core/src/main/resources/icons/thumbnails/application-vnd.ms-excel.png -------------------------------------------------------------------------------- /wcomponents-core/src/test/java/com/github/bordertech/wcomponents/util/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains unit tests for general WComponent utility classes. 3 | */ 4 | package com.github.bordertech.wcomponents.util; 5 | -------------------------------------------------------------------------------- /wcomponents-core/src/test/resources/theme/wcomponents-theme/version.properties: -------------------------------------------------------------------------------- 1 | ## Test build number 2 | build.number=TEST_BUILD_NUMBER 3 | 4 | ## Test wc project version 5 | wc.project.version=TEST_WC_PROJECT_VERSION 6 | -------------------------------------------------------------------------------- /wcomponents-test-lib/src/main/java/com/github/bordertech/wcomponents/test/example/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains example selenium test cases. 3 | */ 4 | package com.github.bordertech.wcomponents.test.example; 5 | -------------------------------------------------------------------------------- /wcomponents-test-lib/src/main/java/com/github/bordertech/wcomponents/test/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains classes that help test WComponent applications. 3 | */ 4 | package com.github.bordertech.wcomponents.test; 5 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/container/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains the interceptors used by the web containers. 3 | */ 4 | package com.github.bordertech.wcomponents.container; 5 | -------------------------------------------------------------------------------- /wcomponents-core/src/test/java/com/github/bordertech/wcomponents/subordinate/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains unit tests for the subordinate control. 3 | */ 4 | package com.github.bordertech.wcomponents.subordinate; 5 | -------------------------------------------------------------------------------- /wcomponents-core/src/test/resources/com/github/bordertech/wcomponents/container/VelocityComponent_Test2.vm: -------------------------------------------------------------------------------- 1 | ## Invokes a "bad" method on the test object 2 | $!{VelocityComponent_Test_key.badMethod()} 3 | 4 | Should not see this -------------------------------------------------------------------------------- /wcomponents-examples/readme.txt: -------------------------------------------------------------------------------- 1 | This example project contains a variety of WComponent examples 2 | 3 | Individual examples can be run using the Launcher. 4 | 5 | The kitchen sink example can also be deployed as a portlet. 6 | -------------------------------------------------------------------------------- /wcomponents-examples/src/test/java/com/github/bordertech/wcomponents/examples/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains unit tests for the WComponents examples. 3 | */ 4 | package com.github.bordertech.wcomponents.examples; 5 | -------------------------------------------------------------------------------- /wcomponents-theme/.nycrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "all": true, 3 | "include": [ 4 | "src/main/**/" 5 | ], 6 | "exclude": [ 7 | "src/test/**/" 8 | ], 9 | "reporter": "lcov", 10 | "report-dir": "target/coverage" 11 | } 12 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/fix/ie11/_wtree.scss: -------------------------------------------------------------------------------- 1 | 2 | 3 | // IE does not support max-content and width: auto is sub-optimal here. 4 | [role='tree'].wc_htree [role='group'] { 5 | min-width: 0; 6 | width: 10rem; 7 | } 8 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/nil/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Provides a null render output format for use in testing. 3 | */ 4 | package com.github.bordertech.wcomponents.render.nil; 5 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/thumbnail/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains classes for providing thumbnail images. 3 | */ 4 | package com.github.bordertech.wcomponents.util.thumbnail; 5 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/resources/icons/thumbnails/application-vnd.ms-powerpoint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-core/src/main/resources/icons/thumbnails/application-vnd.ms-powerpoint.png -------------------------------------------------------------------------------- /wcomponents-core/src/test/java/com/github/bordertech/wcomponents/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains the unit tests for the core components of the WComponent framework. 3 | */ 4 | package com.github.bordertech.wcomponents; 5 | -------------------------------------------------------------------------------- /wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/menu/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains examples of using the WMenu component. 3 | */ 4 | package com.github.bordertech.wcomponents.examples.menu; 5 | -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/com/github/bordertech/wcomponents/examples/iconStack.moustache: -------------------------------------------------------------------------------- 1 | 2 | {{lower}} 3 | {{upper}} 4 | 5 | -------------------------------------------------------------------------------- /wcomponents-lde/src/main/resources/wcomponents-app.properties: -------------------------------------------------------------------------------- 1 | include=wcomponents-lde.properties 2 | 3 | ## Testing properties -- only present in the class path when tests are being run. 4 | include=wcomponents-test.properties 5 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/fix/edge/_wtree.scss: -------------------------------------------------------------------------------- 1 | 2 | 3 | // Edge does not support max-content and width: auto is sub-optimal here. 4 | [role='tree'].wc_htree [role='group'] { 5 | min-width: 0; 6 | width: 10rem; 7 | } 8 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/layout/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Provides classes which are used to visually arrange components in a UI. 3 | */ 4 | package com.github.bordertech.wcomponents.layout; 5 | -------------------------------------------------------------------------------- /wcomponents-core/src/test/java/com/github/bordertech/wcomponents/registry/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Provides unit tests for classes used to register a component tree. 3 | */ 4 | package com.github.bordertech.wcomponents.registry; 5 | -------------------------------------------------------------------------------- /wcomponents-core/src/test/resources/templates/Test_Velocity.vm: -------------------------------------------------------------------------------- 1 | id=${wc.id} 2 | param=${mytest} 3 | firstName=${wc.bean.firstName} 4 | lastName=${wc.bean.lastName} 5 | child=${child1} 6 | not1=[$!{notexist}] 7 | not2=[$!{wc.notexist}] 8 | -------------------------------------------------------------------------------- /wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/picker/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains the classes used by the example picker. 3 | */ 4 | package com.github.bordertech.wcomponents.examples.picker; 5 | -------------------------------------------------------------------------------- /wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/table/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains examples of using the WTable component. 3 | */ 4 | package com.github.bordertech.wcomponents.examples.table; 5 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/fix/ie11/_wmultifileupload.scss: -------------------------------------------------------------------------------- 1 | .wc-multifileupload .wc-file { 2 | // IE11 cannot calc 100% - 1.333em and set a right pad in em at the same 3 | // time. Useless POS. 4 | padding-right: 3px; 5 | } 6 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/mixins/_respond.scss: -------------------------------------------------------------------------------- 1 | // Got rid of most of these as part of the simplification process. 2 | @mixin respond-phonelike { 3 | @media only screen and (max-width: 773px) { 4 | @content; 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/autocomplete/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains the autocomplete helpers for the WComponent framework. 3 | */ 4 | package com.github.bordertech.wcomponents.autocomplete; 5 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/monitor/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains the classes used for providing statics about the user context. 3 | */ 4 | package com.github.bordertech.wcomponents.monitor; 5 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/portlet/context/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains the classes used by a portlet context. 3 | * 4 | */ 5 | package com.github.bordertech.wcomponents.portlet.context; 6 | -------------------------------------------------------------------------------- /wcomponents-core/src/test/java/com/github/bordertech/wcomponents/autocomplete/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains the autocomplete helpers for the WComponent framework. 3 | */ 4 | package com.github.bordertech.wcomponents.autocomplete; 5 | -------------------------------------------------------------------------------- /wcomponents-core/src/test/java/com/github/bordertech/wcomponents/subordinate/builder/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains unit tests for the subordinate builder. 3 | */ 4 | package com.github.bordertech.wcomponents.subordinate.builder; 5 | -------------------------------------------------------------------------------- /wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/datatable/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains examples of the WDataTable component. 3 | */ 4 | package com.github.bordertech.wcomponents.examples.datatable; 5 | -------------------------------------------------------------------------------- /wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/layout/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains examples of using layouts in WComponents. 3 | */ 4 | package com.github.bordertech.wcomponents.examples.layout; 5 | -------------------------------------------------------------------------------- /wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/othersys/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains examples of using the WLink component. 3 | */ 4 | package com.github.bordertech.wcomponents.examples.othersys; 5 | -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/com/github/bordertech/wcomponents/examples/test.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/com/github/bordertech/wcomponents/examples/test.pdf -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/fix/uc/_wfigure.scss: -------------------------------------------------------------------------------- 1 | 2 | 3 | @if $wc-use-respond == true { 4 | figcaption { 5 | @include border-box; 6 | display: block; 7 | text-align: center; 8 | width: 100%; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/servlet/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Provides support for running a WComponent application in a Servlet container. 3 | */ 4 | package com.github.bordertech.wcomponents.servlet; 5 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/validator/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains the default validator implementations for validating user input. 3 | */ 4 | package com.github.bordertech.wcomponents.validator; 5 | -------------------------------------------------------------------------------- /wcomponents-core/src/test/java/com/github/bordertech/wcomponents/container/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains the unit tests for the interceptors used by the web containers. 3 | */ 4 | package com.github.bordertech.wcomponents.container; 5 | -------------------------------------------------------------------------------- /wcomponents-core/src/test/resources/templates/Test_Handlebars.hbs: -------------------------------------------------------------------------------- 1 | id={{wc.id}} 2 | param={{mytest}} 3 | firstName={{wc.bean.firstName}} 4 | lastName={{wc.bean.lastName}} 5 | child={{child1}} 6 | not1=[{{notexist}}] 7 | not2=[{{wc.notexist}}] 8 | -------------------------------------------------------------------------------- /wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains examples of the core components of the WComponent framework. 3 | */ 4 | package com.github.bordertech.wcomponents.examples; 5 | -------------------------------------------------------------------------------- /wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/repeater/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains examples of using the WRepeater component. 3 | */ 4 | package com.github.bordertech.wcomponents.examples.repeater; 5 | -------------------------------------------------------------------------------- /wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/validation/basic/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains examples of basic validation. 3 | */ 4 | package com.github.bordertech.wcomponents.examples.validation.basic; 5 | -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/com/github/bordertech/wcomponents/examples/Einstein.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/com/github/bordertech/wcomponents/examples/Einstein.jpg -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/com/github/bordertech/wcomponents/examples/TextDuplicator_Velocity2.vm: -------------------------------------------------------------------------------- 1 |

2 | $label 3 |

4 | 5 | $duplicateButton 6 | $clearButton 7 | 8 |
9 | $text 10 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/fix/uc/_multiformcomponent.scss: -------------------------------------------------------------------------------- 1 | 2 | 3 | @if $wc-use-respond == true { 4 | .wc_mfc { 5 | width: 100%; 6 | 7 | input, 8 | select { 9 | max-width: 90%; 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/subordinate/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Provides functionality for shifting some basic UI operations to the client. 3 | */ 4 | package com.github.bordertech.wcomponents.subordinate; 5 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/mock/servlet/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Provides mock Servlet API classes suitable for unit testing. 3 | */ 4 | package com.github.bordertech.wcomponents.util.mock.servlet; 5 | -------------------------------------------------------------------------------- /wcomponents-core/src/test/java/com/github/bordertech/wcomponents/layout/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Provides unit tests for classes which are used to visually arrange components in a UI. 3 | */ 4 | package com.github.bordertech.wcomponents.layout; 5 | -------------------------------------------------------------------------------- /wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/common/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains classes that are common to the WComponents examples. 3 | */ 4 | package com.github.bordertech.wcomponents.examples.common; 5 | -------------------------------------------------------------------------------- /wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/validation/fields/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains examples of validating fields. 3 | */ 4 | package com.github.bordertech.wcomponents.examples.validation.fields; 5 | -------------------------------------------------------------------------------- /wcomponents-theme/jasmine.json: -------------------------------------------------------------------------------- 1 | { 2 | "spec_dir": "src/test/", 3 | "spec_files": [ 4 | "spec/*[tT]est.*js" 5 | ], 6 | "helpers": [ 7 | "helpers/*.mjs" 8 | ], 9 | "stopSpecOnExpectationFailure": false, 10 | "random": false 11 | } 12 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/error/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains classes for mapping from system level exceptions to user friendly message. 3 | */ 4 | package com.github.bordertech.wcomponents.util.error; 5 | -------------------------------------------------------------------------------- /wcomponents-core/src/test/java/com/github/bordertech/wcomponents/monitor/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains the unit tests for classes used for providing statics about the user context. 3 | */ 4 | package com.github.bordertech.wcomponents.monitor; 5 | -------------------------------------------------------------------------------- /wcomponents-core/src/test/java/com/github/bordertech/wcomponents/velocity/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Provides the unit tests for WComponents using the Apache Velocity templating language. 3 | */ 4 | package com.github.bordertech.wcomponents.velocity; 5 | -------------------------------------------------------------------------------- /wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/validation/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains examples of using different types of validation. 3 | */ 4 | package com.github.bordertech.wcomponents.examples.validation; 5 | -------------------------------------------------------------------------------- /wcomponents-core/src/test/java/com/github/bordertech/wcomponents/validator/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains unit tests for the default validator implementations for validating user input. 3 | */ 4 | package com.github.bordertech.wcomponents.validator; 5 | -------------------------------------------------------------------------------- /wcomponents-examples-lde/src/main/resources/wcomponents-app.properties: -------------------------------------------------------------------------------- 1 | #Default component. See https://github.com/BorderTech/wcomponents/issues/1005 2 | bordertech.wcomponents.lde.component.to.launch=com.github.bordertech.wcomponents.examples.picker.ExamplePicker -------------------------------------------------------------------------------- /wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/subordinate/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains examples of using the WSubordinateControl component. 3 | */ 4 | package com.github.bordertech.wcomponents.examples.subordinate; 5 | -------------------------------------------------------------------------------- /wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/theme/ajax/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains examples of using AJAX in the WComponents UI framework. 3 | */ 4 | package com.github.bordertech.wcomponents.examples.theme.ajax; 5 | -------------------------------------------------------------------------------- /wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/theme/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains examples of the core components in the WComponents UI framework. 3 | */ 4 | package com.github.bordertech.wcomponents.examples.theme; 5 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/autocomplete/type/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains typed enums for the autocomplete helpers for the WComponent framework. 3 | */ 4 | package com.github.bordertech.wcomponents.autocomplete.type; 5 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/validation/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Provides classes which can be used for validating user input entered into a WComponent UI. 3 | */ 4 | package com.github.bordertech.wcomponents.validation; 5 | -------------------------------------------------------------------------------- /wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/repeater/link/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains examples of using the WRepeater component with WLink. 3 | */ 4 | package com.github.bordertech.wcomponents.examples.repeater.link; 5 | -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/com/github/bordertech/wcomponents/examples/portlet-portrait.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/com/github/bordertech/wcomponents/examples/portlet-portrait.jpg -------------------------------------------------------------------------------- /wcomponents-test-lib/src/main/java/com/github/bordertech/wcomponents/test/selenium/element/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Provides the WComponent specific WebElements for Selenium. 3 | * 4 | */ 5 | package com.github.bordertech.wcomponents.test.selenium.element; 6 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/fix/uc/_wcollapsible.scss: -------------------------------------------------------------------------------- 1 | 2 | 3 | @if $wc-use-respond == true { 4 | summary { 5 | > h1, 6 | > h2, 7 | > h3, 8 | > h4, 9 | > h5, 10 | > h6 { 11 | width: auto; 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/respond/phone/_wpanel.scss: -------------------------------------------------------------------------------- 1 | 2 | @if $wc-use-respond == true and $wc-respond-reduce-gap-when-narrow == true { 3 | .wc-panel-type-box, 4 | .wc-panel-type-feature, 5 | footer { 6 | padding: $wc-phone-gap-normal; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /wcomponents-theme/src/test/intern/resources/fileAccepted.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Provides a rendering format used to output a WComponent UI for use within a web-browser. 3 | */ 4 | package com.github.bordertech.wcomponents.render.webxml; 5 | -------------------------------------------------------------------------------- /wcomponents-core/src/test/java/com/github/bordertech/wcomponents/validation/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Provides unit tests for the classes used for validating user input entered into a WComponent UI. 3 | */ 4 | package com.github.bordertech.wcomponents.validation; 5 | -------------------------------------------------------------------------------- /wcomponents-core/src/test/resources/com/github/bordertech/wcomponents/container/VelocityComponent_Test3.vm: -------------------------------------------------------------------------------- 1 | ## Missing template include 2 | #if ($VelocityComponent_Test_key) 3 | #include("VelocityComponent_Test_Missing_Template.vm") 4 | #end 5 | 6 | Should not see this -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/com/github/bordertech/wcomponents/examples/picker/wclogo_small.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/com/github/bordertech/wcomponents/examples/picker/wclogo_small.gif -------------------------------------------------------------------------------- /wcomponents-test-lib/src/main/java/com/github/bordertech/wcomponents/test/selenium/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Provides a WComponent UI testing API using the Selenium 2.0 WebDriver framework. 3 | * 4 | */ 5 | package com.github.bordertech.wcomponents.test.selenium; 6 | -------------------------------------------------------------------------------- /wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/transientcontainer/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains examples of using the TransientDataContainer component. 3 | */ 4 | package com.github.bordertech.wcomponents.examples.transientcontainer; 5 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/fix/uc/_combo.scss: -------------------------------------------------------------------------------- 1 | 2 | 3 | @if $wc-use-respond == true { 4 | .wc_inputwidth > .wc-input > [role='combobox'] { 5 | &, 6 | > [type='text'], 7 | > [role='textbox'] { 8 | width: auto; 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/autocomplete/segment/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains text-segment enums for the autocomplete helpers for the WComponent framework. 3 | */ 4 | package com.github.bordertech.wcomponents.autocomplete.segment; 5 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/visitor/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains visitor classes that can be used by TreeUtil to search for components in the component tree. 3 | */ 4 | package com.github.bordertech.wcomponents.util.visitor; 5 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/velocity/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Provides the ability to render sections of WComponent UIs using the Apache Velocity 3 | * templating language. 4 | */ 5 | package com.github.bordertech.wcomponents.velocity; 6 | -------------------------------------------------------------------------------- /wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/validation/repeater/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains examples of using validation with the WRepeater component. 3 | */ 4 | package com.github.bordertech.wcomponents.examples.validation.repeater; 5 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/error/impl/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains classes for the default mapping from system level exceptions to user 3 | * friendly message. 4 | */ 5 | package com.github.bordertech.wcomponents.util.error.impl; 6 | -------------------------------------------------------------------------------- /wcomponents-core/src/test/java/com/github/bordertech/wcomponents/servlet/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Provides unit tests for the classes used to support running a WComponent application 3 | * in a Servlet container. 4 | */ 5 | package com.github.bordertech.wcomponents.servlet; 6 | -------------------------------------------------------------------------------- /wcomponents-test-lib/src/main/java/com/github/bordertech/wcomponents/test/selenium/server/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Provides the WComponent specific functionality for wrapping/starting a server. 3 | * 4 | */ 5 | package com.github.bordertech.wcomponents.test.selenium.server; 6 | -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/com/github/bordertech/wcomponents/examples/petstore/resources/images/cat.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/com/github/bordertech/wcomponents/examples/petstore/resources/images/cat.gif -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/com/github/bordertech/wcomponents/examples/petstore/resources/images/dog.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/com/github/bordertech/wcomponents/examples/petstore/resources/images/dog.gif -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/com/github/bordertech/wcomponents/examples/petstore/resources/images/fish.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/com/github/bordertech/wcomponents/examples/petstore/resources/images/fish.gif -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/com/github/bordertech/wcomponents/examples/petstore/resources/images/goat.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/com/github/bordertech/wcomponents/examples/petstore/resources/images/goat.gif -------------------------------------------------------------------------------- /wcomponents-lde/src/main/java/com/github/bordertech/wcomponents/lde/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Provides the ability to running a WComponent application in a Servlet container 3 | * directly from any development environment. 4 | */ 5 | package com.github.bordertech.wcomponents.lde; 6 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/fix/uc/_wtabset.scss: -------------------------------------------------------------------------------- 1 | 2 | 3 | @if $wc-use-respond == true { 4 | [role='tablist'] { 5 | &[aria-multiselectable] { 6 | > [role='tab'] { 7 | @include border-box; 8 | width: 100%; 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/com/github/bordertech/wcomponents/examples/petstore/resources/images/llama.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/com/github/bordertech/wcomponents/examples/petstore/resources/images/llama.gif -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/com/github/bordertech/wcomponents/examples/petstore/resources/images/rabbit.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BorderTech/wcomponents/HEAD/wcomponents-examples/src/main/resources/com/github/bordertech/wcomponents/examples/petstore/resources/images/rabbit.gif -------------------------------------------------------------------------------- /wcomponents-test-lib/src/main/java/com/github/bordertech/wcomponents/test/selenium/driver/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Provides the WComponent specific functionality for wrapping/creating Selenium WebDriver. 3 | * 4 | */ 5 | package com.github.bordertech.wcomponents.test.selenium.driver; 6 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/fix/ie11/_wmenu.scss: -------------------------------------------------------------------------------- 1 | // The opener iconography for WMenu type BAR, type FLYOUT, type COLUMN. 2 | 3 | 4 | .wc-submenu-o > .wc-decoratedlabel::after { 5 | .wc_menu_bar &, 6 | .wc-menu-type-column & { 7 | display: inline-block; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/common/_draggable.scss: -------------------------------------------------------------------------------- 1 | // Components which implement the wc/ui/draggable JavaScript pseudo-interface. 2 | // As at 1.4.0 these are WDialog, WMultiFileWidget's/WImage's image editor, 3 | // and WTree as htree. 4 | [data-wc-draggable='true'] { 5 | cursor: move; 6 | } 7 | -------------------------------------------------------------------------------- /wcomponents-theme/src/test/intern/resources/ajaxTriggerManager.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | 5 | 6 | 7 |
8 |
-------------------------------------------------------------------------------- /wcomponents-core/src/test/java/com/github/bordertech/wcomponents/render/webxml/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Provides the unit tests for the classes used in rendering format used to output a WComponent UI 3 | * for use within a web-browser. 4 | */ 5 | package com.github.bordertech.wcomponents.render.webxml; 6 | -------------------------------------------------------------------------------- /wcomponents-core/src/test/resources/theme/wcomponents-theme/ThemeServlet_Testfile.xsl: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/com/github/bordertech/wcomponents/examples/ForwardExample.vm: -------------------------------------------------------------------------------- 1 |

2 | This example demonstrates the use of the "forward" feature. 3 |

4 |

5 | Enter a URL in the entry field and then press the Forward button to go to that url. 6 |

7 | URL: $urlField $forwardBtn -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/respond/phone/_wtabset.scss: -------------------------------------------------------------------------------- 1 | 2 | @if $wc-use-respond == true and $wc-respond-reduce-gap-when-narrow == true { 3 | // Do not make role='tab' smaller because the padding is part of the hit zone. 4 | [role='tabpanel'] { 5 | padding: $wc-phone-gap-normal; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /wcomponents-core/src/test/resources/wcomponents-test.properties: -------------------------------------------------------------------------------- 1 | bordertech.wcomponents.factory.impl.com.github.bordertech.wcomponents.util.LookupTable=com.github.bordertech.wcomponents.TestLookupTable 2 | 3 | # Resource bundle base name for internationalisation tests 4 | bordertech.wcomponents.i18n.baseName=i18n/test 5 | -------------------------------------------------------------------------------- /wcomponents-test-lib/spotbugs-exclude-filter.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/resources/com/github/bordertech/wcomponents/velocity/NoTemplateLayout.vm: -------------------------------------------------------------------------------- 1 | 2 | #foreach ($key in $context.getKeys()) 3 | #if ($key != "context") 4 | 5 | 6 | 7 | 8 | #end 9 | #end 10 |
$!key$!{context.get($key).getClass().getName()}
11 | -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/com/github/bordertech/wcomponents/examples/TextDuplicator_VelocityImpl.vm: -------------------------------------------------------------------------------- 1 |

2 | $label 3 |

4 | 5 | 6 | 13 |
7 | 8 | $text 9 | $duplicateButton 10 | $clearButton 11 | 12 |
14 | 15 |
-------------------------------------------------------------------------------- /wcomponents-i18n/dist/README.txt: -------------------------------------------------------------------------------- 1 | # Pot files are automatically generated on every WComponents build by extracting i18n messages. 2 | # Do not edit them directly. 3 | # 4 | # If you update any i18n strings you will find the pot file is subsequently updated. 5 | # Please commit the updated pot file and push it to the git repository. 6 | 7 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/MenuItem.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | /** 4 | * A component that can be used as a menu item in a menu container. 5 | * 6 | * @author Jonathan Austin 7 | * @since 1.0.2 8 | */ 9 | public interface MenuItem extends WComponent { 10 | } 11 | -------------------------------------------------------------------------------- /wcomponents-examples-lde/checkstyle-exclude.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /wcomponents-theme/.babelrc.mjs: -------------------------------------------------------------------------------- 1 | /* eslint-env node, es2020 */ 2 | import { dirs } from "./scripts/build-util.mjs"; 3 | 4 | export default function (api) { 5 | api.cache(true); 6 | const presets = []; 7 | const plugins = [ 8 | ["transform-commonjs", {}] 9 | ]; 10 | 11 | return { 12 | presets, 13 | plugins 14 | }; 15 | } 16 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/respond/phone/_wdefinitionlist.scss: -------------------------------------------------------------------------------- 1 | 2 | @if $wc-use-respond == true { 3 | .wc-definitionlist-type-column { 4 | > dt, 5 | > dd { 6 | @include border-box; 7 | display: block; 8 | margin-left: 0; 9 | margin-right: 0; 10 | width: 100%; 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /wcomponents-theme/src/test/intern/resources/domConvertDynamicContent.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | something to be ignored 5 |
6 | 7 |
-------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/Labelable.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | /** 4 | * Expresses the notion that a WComponent can be labelled by a WLabel. 5 | * 6 | * @author Mark Reeves 7 | * @since 1.4.0 8 | */ 9 | public interface Labelable extends WComponent { 10 | 11 | } 12 | -------------------------------------------------------------------------------- /wcomponents-core/src/test/resources/content/test.tr5: -------------------------------------------------------------------------------- 1 | [TRIM Context Reference] 2 | Client=60144 3 | ClientName=Department of Silly Walks (DOSW) 4 | DB=AA 5 | DBName=TRIM Production 6 | Type=6 7 | TypeName=Record 8 | Items=1 9 | [Item1] 10 | URI=14210316 11 | Details=ADD2008/576489 12 | Extra=Systems Division Org Structure Chart - DRAFT 13 | -------------------------------------------------------------------------------- /wcomponents-lde/spotbugs-exclude-filter.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/respond/phone/_back-to-top.scss: -------------------------------------------------------------------------------- 1 | 2 | @if $wc-use-respond == true { 3 | .wc_btt { 4 | bottom: $wc-phone-gap-small; 5 | right: $wc-phone-gap-small; 6 | 7 | > .fa { 8 | &.fa-5x { 9 | &::before { 10 | font-size: 3rem; 11 | } 12 | } 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/subordinate/builder/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Provides an alternative syntax for creating and configuring 3 | * {@link com.github.bordertech.wcomponents.subordinate.WSubordinateControl subordinate controls}. 4 | */ 5 | package com.github.bordertech.wcomponents.subordinate.builder; 6 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WHorizontalRule.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | /** 4 | * WHorizontalRule is used to render a horizontal rule (line). 5 | * 6 | * @author Yiannis Paschalidis 7 | * @since 1.0.0 8 | */ 9 | public class WHorizontalRule extends AbstractWComponent { 10 | } 11 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/MultiInputComponent.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | /** 4 | * Expresses the notion that a WComponent is a group of inputs. 5 | * 6 | * @author Mark Reeves 7 | * @since 1.4.0 8 | */ 9 | public interface MultiInputComponent extends WComponent { 10 | 11 | } 12 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/ErrorPage.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | /** 4 | * An interface used to distinguish a concrete Error Page WComponent from other normal WComponents. 5 | * 6 | * @author Darian Bridge 7 | * @since 1.0.0 8 | */ 9 | public interface ErrorPage extends WComponent { 10 | } 11 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/DialogOpenTrigger.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | /** 4 | * This interface is used to mark components which can open a {@link WDialog} via AJAX. 5 | * 6 | * @author Jonathan Austin 7 | * @since 1.2.12 8 | */ 9 | public interface DialogOpenTrigger extends WComponent { 10 | } 11 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/js/wc/debug/common.mjs: -------------------------------------------------------------------------------- 1 | import hotReloadClient from "wc/debug/hotReloadClient.mjs"; 2 | import "wc/debug/consoleColor.mjs"; 3 | import "wc/debug/indicator.mjs"; 4 | import "wc/debug/i18n.mjs"; 5 | import "wc/debug/label.mjs"; 6 | import "wc/debug/heading.mjs"; 7 | 8 | console.log("Loaded debug modules"); 9 | hotReloadClient.getConnection(); 10 | -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/com/github/bordertech/wcomponents/examples/test.tr5: -------------------------------------------------------------------------------- 1 | [TRIM Context Reference] 2 | Client=60144 3 | ClientName=Department of Silly Walks (DOSW) 4 | DB=AA 5 | DBName=TRIM Production 6 | Type=6 7 | TypeName=Record 8 | Items=1 9 | [Item1] 10 | URI=14210316 11 | Details=ADD2008/576489 12 | Extra=Systems Division Org Structure Chart - DRAFT 13 | -------------------------------------------------------------------------------- /wcomponents-core/src/test/java/com/github/bordertech/wcomponents/PerformanceTests.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | /** 4 | * This is a JUnit4.8 {@link org.junit.experimental.categories.Category Category} for marking performance unit tests. 5 | * 6 | * @author Yiannis Paschalidis 7 | * @since 1.0.0 8 | */ 9 | public interface PerformanceTests { 10 | } 11 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/components/_wdecoratedlabel.scss: -------------------------------------------------------------------------------- 1 | // ############################################################################# 2 | // WDecoratedLabel 3 | // ############################################################################# 4 | .wc_dlbl_seg { 5 | display: inline-block; 6 | 7 | + .wc_dlbl_seg { 8 | margin-left: $wc-gap-small; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/components/_wheading.scss: -------------------------------------------------------------------------------- 1 | // ############################################################################# 2 | // WHeading 3 | // ############################################################################# 4 | 5 | // WHeading outputs h1, h2, h3, h4, h5 or h6 elements. It has a default class 6 | // name which includes wc-heading. There are no default styles. 7 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/fix/uc/_wtree.scss: -------------------------------------------------------------------------------- 1 | 2 | 3 | @if $wc-use-respond == true { 4 | [role='treeitem'] > .wc_leaf_vopener + button { 5 | width: auto; 6 | } 7 | 8 | [role='tree'].wc_htree { 9 | [role='group'] { 10 | min-width: 0; 11 | width: 10rem; 12 | } 13 | 14 | .wc_leaf_hopener { 15 | float: right; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/AjaxInternalTrigger.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | /** 4 | *

5 | * This interface is used to mark components which use AJAX to handle their internal state. 6 | * 7 | * @author Jonathan Austin 8 | * @since 1.1.0 9 | */ 10 | public interface AjaxInternalTrigger extends WComponent { 11 | } 12 | -------------------------------------------------------------------------------- /wcomponents-core/src/test/resources/com/github/bordertech/wcomponents/velocity/VelocityRenderer_Test.vm: -------------------------------------------------------------------------------- 1 | [this=$!{this}] 2 | [this.someProperty=$!{this.someProperty}] 3 | [uicontext=$!{uicontext}] 4 | [uic=$!{uic}] 5 | [children=$!{children}] 6 | [childA=$!{childA}] 7 | [childB=$!{childB}] 8 | [childC=$!{childC}] 9 | [velocityMapParam=$!{velocityMapParam}] 10 | [test_list=$!{test_list}] 11 | -------------------------------------------------------------------------------- /wcomponents-i18n/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "wcomponents-i18n", 3 | "version": "1.0.0", 4 | "description": "i18n utilities for WComponents", 5 | "main": "po2json.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "ricksbrown", 10 | "license": "LGPL-3.0", 11 | "dependencies": { 12 | "i18next-conv": "^3.0.3" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /wcomponents-examples/src/test/java/com/github/bordertech/wcomponents/examples/SeleniumTests.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents.examples; 2 | 3 | /** 4 | * This is a JUnit4.8 {@link org.junit.experimental.categories.Category Category} for marking Selenium unit tests. 5 | * 6 | * @author Yiannis Paschalidis 7 | * @since 1.0.0 8 | */ 9 | public interface SeleniumTests { 10 | } 11 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/components/_wlink.scss: -------------------------------------------------------------------------------- 1 | // CSS for WLink 2 | // ############################################################################# 3 | // Links which contain a positioned image must be forced to be inline block. 4 | .wc_a_ilb { 5 | display: inline-block; 6 | } 7 | 8 | 9 | a { 10 | &[aria-disabled = 'true'] { 11 | color: $wc-clr-disabled-fg; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/fix/uc/_wtogglebutton.scss: -------------------------------------------------------------------------------- 1 | 2 | 3 | @if $wc-use-respond == true { 4 | .wc-togglebutton { 5 | &[data-wc-component], 6 | > button { 7 | &::after { 8 | height: 100%; 9 | } 10 | } 11 | 12 | &.wc_ro_sel, 13 | > [aria-checked='true'] { 14 | &::after { 15 | left: 50%; 16 | } 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/com/github/bordertech/wcomponents/examples/repeater/ProductItemRenderer.vm: -------------------------------------------------------------------------------- 1 | #set( $data = $this.getData() ) 2 |

3 |

$data.getCategory()

4 | Name:$data.getName()
5 | Product Id:$data.getId()
6 | Description:$data.getDescription()
7 | Item available:$data.getItemAvailable()
8 | 9 |

-------------------------------------------------------------------------------- /wcomponents-examples/src/test/resources/wcomponents-examples-test.properties: -------------------------------------------------------------------------------- 1 | bordertech.wcomponents.factory.impl.com.github.bordertech.wcomponents.lde.LdeLauncher=com.github.bordertech.wcomponents.test.selenium.DynamicLauncher 2 | bordertech.wcomponents.test.selenium.launchServer=false 3 | bordertech.wcomponents.test.selenium.implicitWait=1 4 | bordertech.wcomponents.test.selenium.parallel.methods=true 5 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/respond/phone/_wdialog.scss: -------------------------------------------------------------------------------- 1 | 2 | @if $wc-use-respond == true and $wc-use-respond-dialog == true { 3 | dialog { 4 | max-height: 100%; 5 | max-width: 100%; 6 | min-height: 100%; 7 | min-width: 100%; 8 | 9 | > footer { 10 | display: none; 11 | } 12 | 13 | > header .wc_maxcont { 14 | display: none; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /wcomponents-theme/src/test/intern/resources/myXml.xml: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 8 |
-------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/DropZone.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | /** 4 | *

5 | * This interface is used to mark components which are able to respond to the user "dropping" items via drag and 6 | * drop.

7 | * 8 | * @author Rick Brown 9 | * @since 1.0.0 10 | */ 11 | public interface DropZone extends WComponent { 12 | } 13 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WBeanContainer.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | /** 4 | * An extension of WBeanComponent which supports children. 5 | * 6 | * @author Yiannis Paschalidis 7 | * @deprecated Use {@link WContainer} instead. 8 | */ 9 | @Deprecated 10 | public class WBeanContainer extends WContainer { 11 | // Deprecated 12 | } 13 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WSeparator.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | /** 4 | * WSeparator provides spacing between items in a WMenu or WSubMenu. It is not a general purpose component. 5 | * 6 | * @author Yiannis Paschalidis 7 | * @since 1.0.0 8 | */ 9 | public class WSeparator extends AbstractWComponent implements MenuItem { 10 | } 11 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/resources/wcomponents.properties: -------------------------------------------------------------------------------- 1 | ## Version properties 2 | include=wcomponents-version.properties 3 | 4 | ## Main WComponent properties 5 | include=com/github/bordertech/wcomponents/web.properties 6 | 7 | ## Testing properties -- only present in the class path when tests are being run. 8 | include=wcomponents-test.properties 9 | include=wcomponents-test-lib-test.properties 10 | -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/com/github/bordertech/wcomponents/examples/picker/TreePicker.vm: -------------------------------------------------------------------------------- 1 |
2 | $!logo 3 |
4 | $!selectOtherPanel 5 |
6 |
7 | 8 | $!messages 9 | $!mainPanel 10 | -------------------------------------------------------------------------------- /wcomponents-lde/src/main/resources/wcomponents-lde.properties: -------------------------------------------------------------------------------- 1 | ## Version properties 2 | include=wcomponents-lde-version.properties 3 | 4 | ## Load theme via WServlet 5 | bordertech.wcomponents.theme.content.path= 6 | 7 | ## Enable shutdown by default. 8 | bordertech.wcomponents.lde.shutdown.enabled=true 9 | ## do not cache templates in LDE 10 | bordertech.wcomponents.handlebars.cache.enabled=false 11 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/wcdebug/_indicator.scss: -------------------------------------------------------------------------------- 1 | // A mechanism to indicate the application is in debug mandatory-holder 2 | 3 | body { 4 | &::before { 5 | background-color: $wc-debug-indicator-bg; 6 | color: $wc-debug-indicator-fg; 7 | content: 'Client debug/diagnostic mode: document has ' attr(data-wc-nodeCount) ' elements.'; 8 | display: block; 9 | padding: .5rem; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /wcomponents-lde/src/main/resources/com/github/bordertech/wcomponents/lde/DevToolkit_footer.vm: -------------------------------------------------------------------------------- 1 | ## This velocity template is used by the com.github.bordertech.wcomponents.lde.DevToolkit class to output the 2 | ## controls necessary for the developer toolkit UI. It must not rely on any java WComponents or 3 | ## XML in the "ui" namespace. 4 | ## 5 | ## This template renders content after the wrapped WComponent UI. 6 | ## 7 | 8 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/layout/LayoutManager.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents.layout; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * The LayoutManager interfaces describes classes which can arrange components within a container. 7 | * 8 | * @author Yiannis Paschalidis 9 | * @since 1.0.0 10 | */ 11 | public interface LayoutManager extends Serializable { 12 | } 13 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/_libs.scss: -------------------------------------------------------------------------------- 1 | // ############################################################################# 2 | // The only purpose of this file is to include external libraries which for 3 | // whatever reason we have to build from source in WComponents. This file should 4 | // only include libraries which cannot be loaded asynchronously. 5 | // ############################################################################# 6 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/js/wc/isNumeric.mjs: -------------------------------------------------------------------------------- 1 | /** 2 | * Indicates if an input is numeric (eg "7" but not "seven"). 3 | * 4 | * @function module:wc/isNumeric 5 | * @param {*} [n] The input to test. 6 | * @returns {Boolean} true if n is numeric. 7 | */ 8 | function isNum(n) { 9 | let result = false; 10 | if (n !== null) { 11 | n *= 1; 12 | result = !isNaN(n); 13 | } 14 | return result; 15 | } 16 | export default isNum; 17 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/_theme.scss: -------------------------------------------------------------------------------- 1 | // ############################################################################# 2 | // Theme Placeholder. 3 | // ############################################################################# 4 | // Make a file with this name in your theme and use it to import your theme Sass 5 | // partials to use the old WComponents build mechanism to build a themed version 6 | // of the wcomponents default theme. 7 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/common/_typography.scss: -------------------------------------------------------------------------------- 1 | // ############################################################################# 2 | // FONTS. 3 | // ############################################################################# 4 | 5 | @if $wc-default-font != '' { 6 | body { 7 | font-family: $wc-default-font; 8 | } 9 | } 10 | 11 | @if $wc-mono-font != '' { 12 | pre { 13 | font-family: $wc-mono-font; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /wcomponents-xslt/src/main/xslt/wc.ui.skiplinks.xsl: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/common/_back-to-top.scss: -------------------------------------------------------------------------------- 1 | // The back to top of page link. 2 | // ############################################################################# 3 | // This CSS is unnecessary if the JavaScript module "wc/ui/backToTop" is not 4 | // included in your theme's "wc/common" meta-module. 5 | .wc_btt { 6 | bottom: $wc-gap-large; 7 | opacity: .5; 8 | position: fixed; 9 | right: $wc-gap-large; 10 | text-decoration: none; 11 | } 12 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/js/wc/has.mjs: -------------------------------------------------------------------------------- 1 | /* 2 | * This module is a remnant of a more fully featured has implementation. 3 | * See: https://dojotoolkit.org/reference-guide/1.10/dojo/sniff.html 4 | */ 5 | const n = globalThis.navigator, 6 | dua = n.userAgent; 7 | 8 | const features = { 9 | ff: /Gecko\/(\S+)/.test(dua), 10 | edge: /Edg.*\/(\S+)/.test(dua), 11 | webkit: /AppleWebKit\/(\S+)/.test(dua) 12 | }; 13 | export default feature => features[feature]; 14 | -------------------------------------------------------------------------------- /wcomponents-theme/src/test/intern/resources/intern-chai.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This module exists to provide AMD compatibility when moving from intern 3 to 4. 3 | */ 4 | define(function() { 5 | var chai; 6 | return { 7 | load: function (id, parentRequire, callback/* , config */) { 8 | chai = chai || intern.getPlugin("chai"); 9 | if (id === "assert") { 10 | callback(chai.assert); 11 | } else { 12 | callback(chai); 13 | } 14 | } 15 | }; 16 | }); 17 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/DeviceType.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents.util; 2 | 3 | /** 4 | * The user's device type. 5 | * 6 | * @author Jonathan Austin 7 | * @since 1.2.5 8 | */ 9 | public enum DeviceType { 10 | /** 11 | * Not a mobile or tablet device. 12 | */ 13 | NORMAL, 14 | /** 15 | * Is a mobile device. 16 | */ 17 | MOBILE, 18 | /** 19 | * Is a tablet. 20 | */ 21 | TABLET 22 | } 23 | -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/com/github/bordertech/wcomponents/examples/picker/sourceView.vm: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 |
 7 | $src
 8 | 
9 | 10 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/js/wc/string/sprintf.mjs: -------------------------------------------------------------------------------- 1 | /** 2 | * This module exists to abstract away the underlying printf implementation. 3 | * sprintf attaches itself to "window" if it can find nothing else. 4 | * It is not a native ES module. 5 | */ 6 | import "sprintf-js/src/sprintf.js"; 7 | 8 | /** 9 | * @param {any[]} args 10 | * @returns {string} 11 | */ 12 | export default function(...args) { 13 | // @ts-ignore 14 | return window.sprintf(...args); 15 | } 16 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/components/_audiovideo.scss: -------------------------------------------------------------------------------- 1 | // ############################################################################# 2 | // styles for WAudio and WVideo when the media is not able to be handled by the 3 | // user agent natively. 4 | // ############################################################################# 5 | 6 | .wc-src, 7 | .wc-track { 8 | display: inline-block; 9 | 10 | & + & { 11 | margin-left: $wc-gap-normal; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/MessageContainer.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | /** 4 | * MessageContainer - Interface for a {@link WComponent} that displays {@link WMessages}. 5 | * 6 | * @author Yiannis Paschalidis 7 | * @since 1.0.0 8 | */ 9 | public interface MessageContainer { 10 | 11 | /** 12 | * @return the WMessages contained by this MessageContainer. 13 | */ 14 | WMessages getMessages(); 15 | } 16 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WSkipLinks.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | /** 4 | * WSkipLinks is a component which has a heading and a list of internal links. These links will move the cursor point to 5 | * the first focusable element within a WPanel which has an accessKey set. 6 | * 7 | * @author Yiannis Paschalidis 8 | * @since 1.0.0 9 | */ 10 | public class WSkipLinks extends AbstractWComponent { 11 | } 12 | -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/i18n/example.properties: -------------------------------------------------------------------------------- 1 | # Developers should use distinct message ids rather than text. 2 | ENTER_NAME_PROMPT=Your name 3 | SUBMIT_FORM=Submit 4 | HELLO_NAME=Hello {0} 5 | Output=Output 6 | DATE_PROMPT=Date of birth 7 | CLIENT_SIDE_PROMPT=Use client side validation? 8 | 9 | # Alternatively, internationalisation can be implemented by simply providing a translation of default text 10 | Internationalisation\ example=Internationalisation example 11 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/components/_collapsibletoggle.scss: -------------------------------------------------------------------------------- 1 | // The expand and collapse all buttons and their wrapper. 2 | // Common for WCollapsibleToggle and WTable's RowExpansion's expandAll. 3 | .wc_coltog { 4 | @include tight-box; 5 | list-style-type: none; 6 | 7 | > li { 8 | display: inline-block; 9 | 10 | + li { 11 | margin-left: $wc-gap-normal; 12 | } 13 | } 14 | 15 | button > .fa::before { 16 | @include margin($pos: right); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/fix/uc/_wtable.scss: -------------------------------------------------------------------------------- 1 | 2 | 3 | @if $wc-use-respond == true { 4 | .wc_table_bottom_controls, 5 | .wc_table_top_controls { 6 | 7 | > div { 8 | display: block; 9 | } 10 | 11 | .wc_table_pag_cont { 12 | > span, 13 | > label { 14 | display: block; 15 | } 16 | } 17 | } 18 | 19 | @if $wc-use-respond-table == true { 20 | [sortable] > thead th > .fa { 21 | float: right; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/wc-edge.scss: -------------------------------------------------------------------------------- 1 | // Fixes for Microsoft Edge 2 | 3 | // IMPORTS of all required variables. 4 | // ############################################################################# 5 | // Import WComponent vars 6 | @import 'vars/wc'; 7 | // Import WComponent mixins once rather than per use. 8 | @import 'mixins/common'; 9 | 10 | // ############################################################################# 11 | // Edge specific files 12 | @import 'fix/edge/wtree'; 13 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/common/_list.scss: -------------------------------------------------------------------------------- 1 | // Styles applied to list output of many components. 2 | // See also ../components/_layout.scss for listlayout styles 3 | 4 | 5 | // represents a list with no bullets 6 | .wc_list_nb { 7 | @include tight-box; 8 | list-style-type: none; 9 | } 10 | 11 | // text mode option and optgroup emulation 12 | .wc_inoptgroup { 13 | text-indent: $wc-gap-large; 14 | } 15 | 16 | // opt group emulator 17 | .wc-optgroup { 18 | font-weight: bold; 19 | } 20 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WFieldWarningIndicatorRenderer.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents.render.webxml; 2 | 3 | import com.github.bordertech.wcomponents.validation.WFieldWarningIndicator; 4 | 5 | /** 6 | * Layout manager for the {@link WFieldWarningIndicator} component. 7 | * 8 | * @author Jonathan Austin 9 | * @since 1.0.0 10 | */ 11 | final class WFieldWarningIndicatorRenderer extends AbstractWFieldIndicatorRenderer { 12 | } 13 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/js/wc/array/diff.mjs: -------------------------------------------------------------------------------- 1 | /** 2 | * Returns the difference between two arrays. 3 | * @param arr1 The array to compare against. 4 | * @param arr2 The array to compare. 5 | * @returns {Array} The items found in arr1 but not in arr2. 6 | */ 7 | export default function diff(arr1, arr2) { 8 | if (arr1 && arr2 && Array.isArray(arr1) && Array.isArray(arr2)) { 9 | return arr1.filter(function(item) { 10 | return arr2.indexOf(item) < 0; 11 | }); 12 | } 13 | return []; 14 | } 15 | -------------------------------------------------------------------------------- /wcomponents-core/src/test/java/com/github/bordertech/wcomponents/TestSampleException.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | /** 4 | * This class assists in the unit testing of WComponents. 5 | * 6 | * @author Anthony O'Connor 7 | * @since 1.0.0 8 | */ 9 | public class TestSampleException extends Exception { 10 | 11 | /** 12 | * constructor. 13 | * 14 | * @param message sample message. 15 | */ 16 | public TestSampleException(final String message) { 17 | super(message); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/wcdebug/_script.scss: -------------------------------------------------------------------------------- 1 | // CSS to highlight console.warn and cosole.error output 2 | body { 3 | &.wc_loggedwarn { 4 | background-color: $wc-debug-color-warning; 5 | 6 | &::before { 7 | content: 'Warnings in the console, do not panic'; 8 | } 9 | } 10 | 11 | &.wc_loggederror { //the error style MUST TRUMP the warn style 12 | background-color: $wc-debug-color-error; 13 | 14 | &::before { 15 | content: 'Script error! Danger! Panic!'; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/Option.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | /** 4 | * Describes an option in a list-type control, e.g. {@link WDropdown}, {@link WMultiSelect} etc. 5 | * 6 | * @author Yiannis Paschalidis 7 | * @since 1.0.0 8 | */ 9 | public interface Option { 10 | 11 | /** 12 | * @return the code for this option. 13 | */ 14 | String getCode(); 15 | 16 | /** 17 | * @return the textual description of this option. 18 | */ 19 | String getDesc(); 20 | } 21 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/components/_clipboard.scss: -------------------------------------------------------------------------------- 1 | // ############################################################################# 2 | // clipboard 3 | // ############################################################################# 4 | 5 | button.wc-clipboard { 6 | margin-left: $wc-gap-normal; 7 | display: none; 8 | opacity: 50%; 9 | &:hover { 10 | opacity: 100%; 11 | } 12 | &:focus { 13 | opacity: 100%; 14 | } 15 | } 16 | 17 | body.wc-clipwrite button.wc-clipboard { 18 | display: inline-block; 19 | } 20 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/MenuItemGroup.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | /** 4 | * A menu item that can group other menu items. 5 | *

6 | * Even though MenuItemGroup extends MenuContainer, it is not allowed to have a nested MenuItemGroup. 7 | *

8 | * 9 | * @author Jonathan Austin 10 | * @since 1.0.2 11 | * @deprecated menu groups are not compatible with WCAG 2.0. 12 | */ 13 | @Deprecated 14 | public interface MenuItemGroup extends MenuItem, MenuContainer { 15 | } 16 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/SelectionToggleable.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | /** 4 | * Components that have a selection which can be toggled by {@link WSelectToggle} 5 | * must implement this interface. 6 | */ 7 | public interface SelectionToggleable { 8 | 9 | /** 10 | * Sets the selections for this component. 11 | * 12 | * @param selected if true, select everything. If false, deselect everything. 13 | */ 14 | void toggleSelection(boolean selected); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/servlet/NoContextException.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents.servlet; 2 | 3 | import com.github.bordertech.wcomponents.util.SystemException; 4 | 5 | /** 6 | * A request was received that expected a User Context to already exist. 7 | */ 8 | public class NoContextException extends SystemException { 9 | 10 | /** 11 | * @param message the error message 12 | */ 13 | public NoContextException(final String message) { 14 | super(message); 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/com/github/bordertech/wcomponents/examples/WButtonExample.vm: -------------------------------------------------------------------------------- 1 |

Examples of the various ways WButton can be configured.

2 | $plainBtn 3 |
4 | $linkBtn [this button has been set as the default button when you hit enter while in the text field] 5 |
6 | $imageBtn 7 |
8 | $iconBtn 9 |
10 | $disableBtn $dynamicChangeBtn 11 |
12 | $textFld [A text field to enter a value and check if the value is posted to the server when one of the buttons is pressed] 13 |
14 | $textAreaFld -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/com/github/bordertech/wcomponents/examples/syntaxHighlight.css: -------------------------------------------------------------------------------- 1 | .javaSourceKeyword, 2 | .javaSourceComment, 3 | .javaSourceJavadoc, 4 | .javaSourceString, 5 | .javaSourceText 6 | { 7 | font:12px/1.25 monospace; 8 | white-space:pre; 9 | } 10 | 11 | span.javaSourceKeyword { 12 | color: #009; 13 | font-weight: bold; 14 | } 15 | 16 | span.javaSourceComment { 17 | color: #060; 18 | } 19 | 20 | span.javaSourceJavadoc { 21 | color: #767676; 22 | } 23 | 24 | span.javaSourceString { 25 | color: #c00; 26 | } 27 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/container/TargetableIdException.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents.container; 2 | 3 | import com.github.bordertech.wcomponents.util.SystemException; 4 | 5 | /** 6 | * An invalid Targetable ID was provided on the request. 7 | */ 8 | public class TargetableIdException extends SystemException { 9 | 10 | /** 11 | * @param message the Targetable ID error message 12 | */ 13 | public TargetableIdException(final String message) { 14 | super(message); 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WFieldErrorIndicatorRenderer.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents.render.webxml; 2 | 3 | import com.github.bordertech.wcomponents.Renderer; 4 | import com.github.bordertech.wcomponents.validation.WFieldErrorIndicator; 5 | 6 | /** 7 | * {@link Renderer} for the {@link WFieldErrorIndicator} component. 8 | * 9 | * @author Jonathan Austin 10 | * @since 1.0.0 11 | */ 12 | final class WFieldErrorIndicatorRenderer extends AbstractWFieldIndicatorRenderer { 13 | } 14 | -------------------------------------------------------------------------------- /wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/WHorizontalRuleExample.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents.examples; 2 | 3 | import com.github.bordertech.wcomponents.WContainer; 4 | import com.github.bordertech.wcomponents.WHorizontalRule; 5 | 6 | /** 7 | * 8 | * @author Mark Reeves 9 | */ 10 | public class WHorizontalRuleExample extends WContainer { 11 | 12 | /** 13 | * Create a WHorzontalRuleExample. 14 | */ 15 | public WHorizontalRuleExample() { 16 | add(new WHorizontalRule()); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/js/wc/ui/table.mjs: -------------------------------------------------------------------------------- 1 | /** 2 | * Meta-module used to group all table functionality for ease of inclusion. You could explicitly include those table 3 | * aspects you use in your application but they are not big. You do not use this module directly - it is only used as a 4 | * faux-layer. 5 | */ 6 | 7 | import "wc/ui/table/action.mjs"; 8 | import "wc/ui/table/pagination.mjs"; 9 | import "wc/ui/rowAnalog.mjs"; 10 | import "wc/ui/table/rowExpansion.mjs"; 11 | import "wc/ui/table/sort.mjs"; 12 | import "wc/ui/selectToggle.mjs"; 13 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/resources/schema/ui/v1/comment.xsd: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/respond/phone/_image-edit.scss: -------------------------------------------------------------------------------- 1 | 2 | @if $wc-use-respond == true { 3 | .wc_img_editor { 4 | .wc-row > div { 5 | text-align: center; 6 | } 7 | 8 | .wc_img_controls { 9 | @include flex($wrap: wrap, $align-content: space-between); 10 | 11 | > div, 12 | > fieldset { 13 | margin: $wc-gap-small; 14 | 15 | &:first-child { 16 | margin-left: 0; 17 | } 18 | 19 | &:last-child { 20 | margin-right: 0; 21 | } 22 | } 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WebModel.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * The interface for objects that store user specific session state for web components. The WebComponent and WebModel 7 | * interfaces are not normally used directly, they just identify some common features between WComponents and 8 | * InterceptorComponents. 9 | * 10 | * @author Martin Shevchenko 11 | * @since 1.0.0 12 | */ 13 | public interface WebModel extends Serializable { 14 | 15 | } 16 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/IntegrityException.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | /** 4 | * An IntegrityException is usually thrown to indicate a misconfiguration of a WComponent. 5 | * 6 | * @author Martin Shevchenko. 7 | * @since 1.0.0 8 | */ 9 | public class IntegrityException extends IllegalStateException { 10 | 11 | /** 12 | * Creates an IntegrityException. 13 | * 14 | * @param message the message. 15 | */ 16 | public IntegrityException(final String message) { 17 | super(message); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /wcomponents-theme/src/test/intern/resources/myXsl.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/common/README.md: -------------------------------------------------------------------------------- 1 | # Common Sass source 2 | 3 | These files comprise Sass which generates CSS which is used by more than one type of WComponent. The 4 | partials are added from `../_common.scss`. The CSS in these files is _mostly_ structural so one 5 | probably doesn't want to override or exclude them. 6 | 7 | The files are broken up into common units so if one **knows** that the common CSS will never be 8 | used the import can be removed. This can be dangerous. 9 | 10 | Sass for individual WComponents is found in the source folder `../components/`. 11 | -------------------------------------------------------------------------------- /wcomponents-xslt/src/main/xslt/wc.html.ie9minus.xsl: -------------------------------------------------------------------------------- 1 | 5 | 10 | 11 | -------------------------------------------------------------------------------- /wcomponents-core/src/test/resources/theme/wcomponents-xslt/xslt/all.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/BeanTableDataModel.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | import com.github.bordertech.wcomponents.WTable.BeanBoundTableModel; 4 | 5 | /** 6 | * The BeanTableDataModel provides a link between a bean (bound to a table), and the table model API. 7 | * 8 | * @author Yiannis Paschalidis 9 | * @since 1.0.0 10 | * 11 | * @deprecated Use {@link WTable} and {@link BeanBoundTableModel} instead. 12 | */ 13 | @Deprecated 14 | public interface BeanTableDataModel extends TableDataModel, BeanProviderBound { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /wcomponents-core/src/test/resources/theme/wcomponents-xslt/xslt/all_debug.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/FatalErrorPageFactoryImpl.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | /** 4 | * Default implementation of {@link FatalErrorPageFactory}. 5 | * 6 | * @author Martin Shevchenko 7 | * @since 1.0.0 8 | */ 9 | public class FatalErrorPageFactoryImpl implements FatalErrorPageFactory { 10 | 11 | /** 12 | * {@inheritDoc} 13 | */ 14 | @Override 15 | public WComponent createErrorPage(final boolean developerFriendly, final Throwable throwable) { 16 | return new FatalErrorPage(developerFriendly, throwable); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/resources/schema/ui/v1/version.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/validation/basic/BasicFieldsValidationExample.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents.examples.validation.basic; 2 | 3 | import com.github.bordertech.wcomponents.examples.validation.ValidationContainer; 4 | 5 | /** 6 | * Basic field validation example. 7 | * 8 | * @author Martin Shevchenko 9 | */ 10 | public class BasicFieldsValidationExample extends ValidationContainer { 11 | 12 | /** 13 | * Construct example. 14 | */ 15 | public BasicFieldsValidationExample() { 16 | super(new BasicFields()); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/Diagnosable.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | import com.github.bordertech.wcomponents.validation.Diagnostic; 4 | import java.util.List; 5 | 6 | /** 7 | * Marks a component as being able to store diagnostic information. 8 | * @author Mark Reeves 9 | */ 10 | public interface Diagnosable extends WComponent { 11 | 12 | /** 13 | * @param severity the diagnostic level we are interested in 14 | * @return the list of diagnostics for the component. 15 | */ 16 | List getDiagnostics(final int severity); 17 | } 18 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/autocomplete/segment/AutocompleteSegment.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents.autocomplete.segment; 2 | 3 | /** 4 | * Provides a common interface for the enumerations of segments of an {@code autocomplete} attribute which is useful when a component exists in 5 | * several auto-fill control groups. 6 | * 7 | * @author Mark Reeves 8 | * @since 1.5.3 9 | */ 10 | public interface AutocompleteSegment { 11 | 12 | /** 13 | * @return the {@code autocomplete} attribute value for the enum member. 14 | */ 15 | String getValue(); 16 | } 17 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/components/_wtimeoutwarning.scss: -------------------------------------------------------------------------------- 1 | // ############################################################################# 2 | // WTimeoutWarning is an alert dialog used to inform of impending doom. 3 | // ############################################################################# 4 | 5 | // timeout warning container is generated and identified. 6 | // sass-lint:disable no-ids 7 | #wc_session_container { 8 | @include fit-content($fallback: 25rem); 9 | bottom: 0; 10 | max-width: 100%; 11 | position: fixed; 12 | right: 0; 13 | z-index: $wc-z-index-unloading-message; 14 | } 15 | -------------------------------------------------------------------------------- /wcomponents-theme/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "allowJs": true, 4 | "checkJs": true, 5 | "noEmit": true, 6 | "baseUrl": ".", 7 | "lib": ["es2019", "dom"], 8 | "target": "ES2020", 9 | "module": "NodeNext", 10 | "moduleResolution": "NodeNext", 11 | "esModuleInterop": true, 12 | "types": ["node", "jasmine", "dom", "@testing-library/jasmine-dom", "jasmine-ajax"], 13 | "typeRoots": [ 14 | "node_modules/@types" 15 | ], 16 | "allowSyntheticDefaultImports": true, 17 | "resolveJsonModule": true, 18 | "paths": { 19 | "wc/*": ["src/main/js/wc/*"] 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/nil/NullRenderContext.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents.render.nil; 2 | 3 | import com.github.bordertech.wcomponents.RenderContext; 4 | 5 | /** 6 | * The NullRenderContext produces no output and is useful for testing. 7 | * 8 | * @author Yiannis Paschalidis 9 | * @since 1.0.0 10 | */ 11 | public class NullRenderContext implements RenderContext { 12 | 13 | /** 14 | * {@inheritDoc} 15 | */ 16 | @Override 17 | public String getRenderPackage() { 18 | return "com.github.bordertech.wcomponents.render.nil"; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/js/wc/date/isLeapYear.mjs: -------------------------------------------------------------------------------- 1 | /** 2 | * Provides a means to determine if a particular year is a leap year. 3 | * 4 | * @function 5 | * @alias module:wc/date/isLeapYear 6 | * @param {Number} year The 4 digit year to check. To convert a 2 digit year into a 4 digit one see 7 | * {@link module:wc/date/expandYear}. 8 | * @returns {Boolean} true if year is a leap year. 9 | */ 10 | function isLeapYear (year) { 11 | const yearDivisibleBy4 = (year % 4 === 0); 12 | return yearDivisibleBy4 && ((year % 100 !== 0) || (year % 400 === 0)); 13 | } 14 | export default isLeapYear; 15 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/respond/phone/_layout.scss: -------------------------------------------------------------------------------- 1 | 2 | @if $wc-use-respond == true { 3 | // Default responsive design for rows and columns 4 | // opt-in for ColumnLayout by setting class "wc-respond" on its 5 | // containing WPanel. 6 | // opt in for WRow/WColumn by setting class "wc-respond" the WRow. 7 | .wc-row.wc-respond { 8 | display: block; 9 | 10 | > .wc-column { 11 | display: block; 12 | padding-left: 0; 13 | padding-right: 0; 14 | width: 100%; 15 | 16 | + .wc-column { 17 | margin-top: $wc-gap-small; 18 | } 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/js/wc/dom/getEventOffset.mjs: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Determine the left and top coordinates of a mouse event (click, mousedown etc.). 4 | * 5 | * @function 6 | * @alias module:wc/dom/getEventOffset 7 | * @param {MouseEvent} $event The event. 8 | * @returns {{ X: number, Y: number }} An object encapsulating the offset. 9 | */ 10 | function getOffset({ pageX, pageY, view, clientX, clientY }) { 11 | return { 12 | X: pageX || (clientX + view.document.documentElement.scrollLeft), 13 | Y: pageY || (clientY + view.document.documentElement.scrollTop) 14 | }; 15 | } 16 | export default getOffset; 17 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/js/wc/ui/getForm.mjs: -------------------------------------------------------------------------------- 1 | /** 2 | * Finds the form for this element. 3 | * @param {Element|HTMLInputElement} [el] Will find the form that contains this element. 4 | * If null, the first form in the DOM. 5 | * @param {boolean} [forceAncestor] Weird arg - if true, el is mandatory. 6 | * @return {HTMLFormElement|null} 7 | */ 8 | export default function(el, forceAncestor) { 9 | if (!el) { 10 | if (!forceAncestor) { 11 | return document.querySelector("form"); 12 | } 13 | return null; 14 | } 15 | if (el["form"]) { 16 | return el["form"]; 17 | } 18 | return el.closest("form"); 19 | } 20 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/ComparableComparator.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents.util; 2 | 3 | import java.io.Serializable; 4 | import java.util.Comparator; 5 | 6 | /** 7 | * A simple comparator which compares comparables. 8 | * 9 | * @author Yiannis Paschalidis 10 | */ 11 | public final class ComparableComparator implements Comparator>, Serializable { 12 | 13 | /** 14 | * {@inheritDoc} 15 | */ 16 | @Override 17 | public int compare(final Comparable obj1, final Comparable obj2) { 18 | return Util.compareAllowNull(obj1, obj2); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/AjaxTrigger.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | /** 4 | *

5 | * This interface is used to mark components which are able to trigger an AJAX request.

6 | * 7 | *

8 | * NOTE: Components must not implement this interface unless they already support client-side AJAX triggering. 9 | * Implementing this interface does 10 | * NOT automatically enable a component to be used an AJAX trigger.

11 | * 12 | * @author Yiannis Paschalidis 13 | * @since 1.0.0 14 | */ 15 | public interface AjaxTrigger extends WComponent { 16 | } 17 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/resources/schema/ui/v1/session.xsd: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/com/github/bordertech/wcomponents/examples/initImageEditExample.hbs: -------------------------------------------------------------------------------- 1 | 16 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/Audio.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | /** 4 | * Represents an audio clip. Implementations can choose whether to explicitly store the byte[] or fetch it from some 5 | * sort of streaming resource as needed to service the {@link #getBytes} and {@link #getStream} methods as needed. 6 | * 7 | * @author Yiannis Paschalidis 8 | * @since 1.0.0 9 | */ 10 | public interface Audio extends ContentStreamAccess { 11 | 12 | /** 13 | * @return the length of the video clip, in seconds, or <= 0 if unknown (e.g. streaming). 14 | */ 15 | int getDuration(); 16 | } 17 | -------------------------------------------------------------------------------- /wcomponents-theme/src/test/spec/wc.date.isLeapYear.test.mjs: -------------------------------------------------------------------------------- 1 | import isLeapYear from "wc/date/isLeapYear.mjs"; 2 | 3 | describe("wc/date/isLeapYear", function() { 4 | it("returns true for valid leap years", function () { 5 | let leapYears = [1904, 1988, 2000, 2024, 2160, 2596, 3996]; 6 | for (let i = 0; i < leapYears.length; i++) 7 | expect(isLeapYear(leapYears[i])).toBeTrue(); 8 | }); 9 | 10 | it("returns false for non-leap years", function () { 11 | let nonLeapYears = [1900, 1963, 2002, 2026, 2543, 2634, 3000]; 12 | for (let i = 0; i < nonLeapYears.length; i++) 13 | expect(isLeapYear(nonLeapYears[i])).toBeFalse(); 14 | }); 15 | }); 16 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/AjaxTarget.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | /** 4 | *

5 | * This interface is used to mark components which are to be individually targeted for replacement with AJAX.

6 | * 7 | *

8 | * NOTE: Components must not implement this interface unless they already support client-side AJAX targeting. 9 | * Implementing this interface does 10 | * NOT automatically enable a component to be used an AJAX target.

11 | * 12 | * @author Yiannis Paschalidis 13 | * @since 1.0.0 14 | */ 15 | public interface AjaxTarget extends WComponent { 16 | } 17 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/container/SessionTokenException.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents.container; 2 | 3 | import com.github.bordertech.wcomponents.util.SystemException; 4 | 5 | /** 6 | * An invalid session token was provided on the request. 7 | *

8 | * This usually occurs when a user interacts with a page and the session has expired. 9 | *

10 | */ 11 | public class SessionTokenException extends SystemException { 12 | 13 | /** 14 | * @param message the session token message 15 | */ 16 | public SessionTokenException(final String message) { 17 | super(message); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /wcomponents-xslt/src/main/xslt/wc.ui.clipboard.xsl: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/SubordinateTarget.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | /** 4 | *

5 | * This interface is used to mark components which can be targeted by a Subordinate control.

6 | * 7 | *

8 | * NOTE: Components must not implement this interface unless they already support client-side Subordinate 9 | * targeting. Implementing this interface does 10 | * NOT automatically enable a component to be used an Subordinate target.

11 | * 12 | * @author Yiannis Paschalidis 13 | * @since 1.0.0 14 | */ 15 | public interface SubordinateTarget extends WComponent { 16 | } 17 | -------------------------------------------------------------------------------- /wcomponents-core/src/test/java/com/github/bordertech/wcomponents/MockContentStreamAccess.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | import java.io.ByteArrayInputStream; 4 | import java.io.InputStream; 5 | 6 | /** 7 | * MockContentStreamAccess - a ContentStreamAccess useful for unit testing. 8 | * 9 | * @author Yiannis Paschalidis 10 | * @since 1.0.0 11 | */ 12 | public class MockContentStreamAccess extends MockContentAccess implements ContentStreamAccess { 13 | 14 | /** 15 | * @return a stream to the content. 16 | */ 17 | @Override 18 | public InputStream getStream() { 19 | return new ByteArrayInputStream(getBytes()); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/TextDuplicatorVelocity2.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents.examples; 2 | 3 | /** 4 | * An example extension of {@link TextDuplicatorVelocityImpl} to show how different a template can be specified. 5 | * 6 | * @author Martin Shevchenko 7 | * @since 1.0.0 8 | */ 9 | public class TextDuplicatorVelocity2 extends TextDuplicatorVelocityImpl { 10 | 11 | /** 12 | * Creates a TextDuplicator_Velocity2. 13 | */ 14 | public TextDuplicatorVelocity2() { 15 | super("com/github/bordertech/wcomponents/examples/TextDuplicator_Velocity2.vm", "Pretty Duplicator 2"); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig: http://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | [*] 7 | charset=utf-8 8 | end_of_line=lf 9 | insert_final_newline=true 10 | indent_style=tab 11 | indent_size=4 12 | 13 | [*.java] 14 | trim_trailing_whitespace=true 15 | 16 | [*.{js,mjs}] 17 | trim_trailing_whitespace=true 18 | 19 | [*.properties] 20 | trim_trailing_whitespace=false 21 | 22 | [*.{css,sass,scss}] 23 | indent_style=space 24 | indent_size=2 25 | trim_trailing_whitespace=true 26 | 27 | [*.{yml,yaml}] 28 | indent_style=space 29 | indent_size=2 30 | 31 | [*.md] 32 | indent_style=space 33 | indent_size=2 34 | trim_trailing_whitespace=true 35 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/mixins/_mandatory.scss: -------------------------------------------------------------------------------- 1 | // ############################################################################# 2 | // MANDATORY Indcator 3 | // ############################################################################# 4 | 5 | $wc-mandatory-size: .5em !default; 6 | $wc-mandatory-offset: $wc-gap-small !default; 7 | 8 | @mixin mandatory-indicator { 9 | display: none; 10 | @if $wc-mandatory-offset != 0 { 11 | margin-left: $wc-mandatory-offset; 12 | } 13 | 14 | @if $wc-mandatory-size != -1 $wc-mandatory-size != 0 and $wc-mandatory-size != inherit and $wc-mandatory-size != 1em { 15 | font-size: $wc-mandatory-size; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/SubordinateTrigger.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | /** 4 | *

5 | * This interface is used to mark components which are able to trigger a client-side Subordinate.

6 | * 7 | *

8 | * NOTE: Components must not implement this interface unless they already support triggering client-side 9 | * Subordinates. Implementing this interface does 10 | * NOT automatically enable a component to be used an Subordinate trigger.

11 | * 12 | * @author Yiannis Paschalidis 13 | * @since 1.0.0 14 | */ 15 | public interface SubordinateTrigger extends WComponent { 16 | } 17 | -------------------------------------------------------------------------------- /wcomponents-xslt/src/main/xslt/wc.ui.version.xsl: -------------------------------------------------------------------------------- 1 | 2 | 6 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/container/AjaxTriggerException.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents.container; 2 | 3 | import com.github.bordertech.wcomponents.util.SystemException; 4 | 5 | /** 6 | * An invalid AJAX trigger was provided on the request. 7 | *

8 | * This exception usually occurs when a trigger has become not visible due to other AJAX activity on the page 9 | *

10 | */ 11 | public class AjaxTriggerException extends SystemException { 12 | 13 | /** 14 | * @param message the AJAX trigger message 15 | */ 16 | public AjaxTriggerException(final String message) { 17 | super(message); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/fix/uc/_button.scss: -------------------------------------------------------------------------------- 1 | 2 | 3 | @if $wc-use-respond == true { 4 | // make north (before text) look like west 5 | .wc_btn_imgn { 6 | > img { 7 | @include margin(bottom, 0); 8 | @include margin(right); 9 | float: left; 10 | } 11 | } 12 | 13 | // make south (after text) look like east 14 | .wc_btn_imgs { 15 | > img { 16 | @include margin(top, 0); 17 | @include margin(left); 18 | float: right; 19 | } 20 | } 21 | 22 | .wc_btn_imge { 23 | > img { 24 | float: right; 25 | } 26 | } 27 | 28 | .wc_btn_imgw { 29 | > img { 30 | float: left; 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/Marginable.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | /** 4 | * WComponents that can have a margin. 5 | * 6 | * @author Jonathan Austin 7 | * @since 1.0.0 8 | */ 9 | public interface Marginable extends WComponent { 10 | 11 | /** 12 | * Set the margin for the component, or null for no margin. 13 | * 14 | * @param margin the margin for the component 15 | */ 16 | void setMargin(final Margin margin); 17 | 18 | /** 19 | * Get the margin for the component, or null if not set. 20 | * 21 | * @return the margin for the component, or null if not set 22 | */ 23 | Margin getMargin(); 24 | } 25 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/subordinate/builder/SyntaxException.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents.subordinate.builder; 2 | 3 | /** 4 | * Thrown to indicate that an expression is syntactically invalid. 5 | * 6 | * @author Yiannis Paschalidis 7 | * @since 1.0.0 8 | */ 9 | class SyntaxException extends RuntimeException { 10 | 11 | /** 12 | * Default serialisation identifier. 13 | */ 14 | private static final long serialVersionUID = 1L; 15 | 16 | /** 17 | * Creates a SyntaxException. 18 | * 19 | * @param message the detail message. 20 | */ 21 | SyntaxException(final String message) { 22 | super(message); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/js/wc/key.mjs: -------------------------------------------------------------------------------- 1 | /** 2 | * Module to provide key press information. 3 | * @module 4 | */ 5 | export default { 6 | /** 7 | * Determine if this is a "META" key. 8 | * @param {string|KeyboardEvent} key The pressed key (can be the KeyboardEvent itself or its `code` or `key` property). 9 | * @returns {Boolean} true if the key is either ALT, CTRL, META or SHIFT 10 | */ 11 | isMeta: function(key) { 12 | if (key) { 13 | const metas = ["Alt", "Control", "Meta", "Shift"]; 14 | /** @type string */ 15 | const keyName = key["key"] || key["code"] || key; 16 | return metas.some(meta => keyName.startsWith(meta)); 17 | } 18 | return false; 19 | } 20 | }; 21 | -------------------------------------------------------------------------------- /wcomponents-theme/src/test/spec/wc.file.getFileSize.test.mjs: -------------------------------------------------------------------------------- 1 | import getFileSize from "wc/file/getFileSize.mjs"; 2 | import {addFilesToInput, getInput} from "../helpers/specUtils.mjs"; 3 | describe("wc/file/getFileSize", () => { 4 | let testHolder; 5 | 6 | beforeEach(() => { 7 | testHolder = document.body.appendChild(document.createElement("div")); 8 | testHolder.innerHTML = ``; 9 | }); 10 | 11 | it("can get the file size", function() { 12 | const element = getInput(testHolder, "file1"); 13 | addFilesToInput(element, [{ value: "SixteenChars.gif", type: "image/gif" }]); 14 | expect(getFileSize(element)[0]).toBe(16); 15 | }); 16 | }); 17 | 18 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/components/_wselecttoggle.scss: -------------------------------------------------------------------------------- 1 | // ############################################################################# 2 | // WSelectToggle 3 | // ############################################################################# 4 | 5 | .wc_seltog { 6 | > button { 7 | margin-left: $wc-gap-normal; 8 | 9 | &:first-child { 10 | margin-left: 0; 11 | } 12 | } 13 | 14 | &[role='checkbox'] { 15 | + label { 16 | margin-left: $wc-gap-small; 17 | } 18 | 19 | > .fa { 20 | text-align: left; 21 | width: $wc-icon-size; 22 | } 23 | } 24 | 25 | &[data-wc-value][aria-checked='true'] { 26 | font-weight: bold; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/subordinate/SubordinateControlSuite.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents.examples.subordinate; 2 | 3 | import com.github.bordertech.wcomponents.WContainer; 4 | 5 | /** 6 | * This suite of examples is intended to keep UI Designers aware of what SubordinateControl components are available to 7 | * Developers. 8 | * 9 | * @author Martin Shevchenko 10 | * @since 1.0.0 11 | */ 12 | public class SubordinateControlSuite extends WContainer { 13 | 14 | /** 15 | * Creates a SubordinateControlSuite. 16 | */ 17 | public SubordinateControlSuite() { 18 | setTemplate(SubordinateControlSuite.class); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/BeanBoundComponentModel.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | /** 4 | * The {@link ComponentModel} for {@link BeanBound} components. 5 | * 6 | * @author Yiannis Paschalidis 7 | * @since 1.0.0 8 | */ 9 | public class BeanBoundComponentModel extends DataBoundComponentModel { 10 | 11 | /** 12 | * The associated bean. 13 | */ 14 | private Object bean; 15 | 16 | /** 17 | * @return the bean. 18 | */ 19 | protected Object getBean() { 20 | return bean; 21 | } 22 | 23 | /** 24 | * @param bean the bean to set. 25 | */ 26 | protected void setBean(final Object bean) { 27 | this.bean = bean; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/i18n/example_fr_CA.properties: -------------------------------------------------------------------------------- 1 | # You can implement internationalisation by simply providing a translation of the english text 2 | Internationalisation\ example=Par exemple l'internationalisation 3 | 4 | # Alternatively, you may wish to use distinct message ids rather than text 5 | ENTER_NAME_PROMPT=Entrez votre nom 6 | SUBMIT_FORM=Soumettre 7 | HELLO_NAME=Bonjour {0} 8 | Output=La sortie de cet exemple 9 | DATE_PROMPT=Date de naissance 10 | CLIENT_SIDE_PROMPT=Utiliser la validation dans le navigateur? 11 | 12 | # The following are internal WComponent messages which have been internationalised 13 | bordertech.wcomponents.message.fieldMandatory=S''il vous pla\u00eet entrez {0} -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/fix/uc/_wmenu.scss: -------------------------------------------------------------------------------- 1 | 2 | 3 | @if $wc-use-respond == true { 4 | .wc-submenu-o { 5 | > .wc-decoratedlabel { 6 | max-width: 90%; 7 | width: auto; 8 | } 9 | 10 | > .fa { 11 | float: right; 12 | } 13 | } 14 | 15 | .wc-menuitem { 16 | &.wc-icon-before, 17 | &.wc-icon-after { 18 | .wc-decoratedlabel { 19 | max-width: 90%; 20 | width: auto; 21 | } 22 | } 23 | } 24 | 25 | // full screen sub menus 26 | .wc-menu-type-column, 27 | .wc_menu_bar { 28 | .wc_closesubmenu { 29 | .wc-decoratedlabel { 30 | max-width: 90%; 31 | width: auto; 32 | } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/wc-ie11.scss: -------------------------------------------------------------------------------- 1 | // Fixes for IE 11 and before. 2 | // NOTE: nothing before IE11 will work anyway! 3 | 4 | // IMPORTS of all required variables. 5 | // ############################################################################# 6 | // Import WComponent vars 7 | @import 'vars/wc'; 8 | // Import WComponent mixins once rather than per use. 9 | @import 'mixins/common'; 10 | 11 | // ############################################################################# 12 | // IE specific files 13 | @import 'fix/ie11/button'; 14 | @import 'fix/ie11/combo'; 15 | @import 'fix/ie11/wmenu'; 16 | @import 'fix/ie11/wmultifileupload'; 17 | @import 'fix/ie11/wtabset'; 18 | @import 'fix/ie11/wtree'; 19 | -------------------------------------------------------------------------------- /wcomponents-core/src/test/java/com/github/bordertech/wcomponents/subordinate/builder/SyntaxException_Test.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents.subordinate.builder; 2 | 3 | import org.junit.Assert; 4 | import org.junit.Test; 5 | 6 | /** 7 | * JUnit tests for the {@link SyntaxException} class. 8 | * 9 | * @author Yiannis Paschalidis 10 | * @since 1.0.0 11 | */ 12 | public final class SyntaxException_Test { 13 | 14 | @Test 15 | public void testConstructor() { 16 | String message = "SyntaxException_Test.testConstructor.message"; 17 | SyntaxException exception = new SyntaxException(message); 18 | 19 | Assert.assertEquals("Incorrect message", message, exception.getMessage()); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/respond/phone/_wmenu.scss: -------------------------------------------------------------------------------- 1 | @if $wc-use-respond == true { 2 | // full screen sub menus 3 | .wc-menu-type-column, 4 | .wc_menu_bar { 5 | .wc_submenucontent { 6 | @include border-box; 7 | height: 100%; 8 | left: 0; 9 | overflow: auto; 10 | position: fixed; 11 | top: 0; 12 | white-space: normal; 13 | width: 100%; 14 | 15 | > [role] { 16 | font-size: $wc-menu-font-larger; 17 | } 18 | } 19 | 20 | .wc_closesubmenu { 21 | display: block; 22 | 23 | .wc-decoratedlabel { 24 | display: inline-table; 25 | max-width: calc(100% - #{$wc-gap-normal}); 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /wcomponents-examples-lde/src/main/java/com/github/bordertech/wcomponents/examples/lde/StandaloneLauncherProxy.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents.examples.lde; 2 | 3 | import com.github.bordertech.wcomponents.lde.StandaloneLauncher; 4 | 5 | /** 6 | * Acts as a proxy to the StandaloneLauncherProxy, intended use is the executable jar built by this module. 7 | * 8 | * @author Rick Brown 9 | */ 10 | public class StandaloneLauncherProxy { 11 | 12 | /** 13 | * The entry point to the launcher. 14 | * 15 | * @param args command-line arguments, ignored. 16 | * @throws Exception on error 17 | */ 18 | public static void main(final String args[]) throws Exception { 19 | StandaloneLauncher.main(args); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/js/wc/debug/indicator.mjs: -------------------------------------------------------------------------------- 1 | /** 2 | * Provides an indicator that debug mode is on. 3 | * 4 | * @module 5 | */ 6 | import initialise from "wc/dom/initialise.mjs"; 7 | import processResponse from "wc/ui/ajax/processResponse.mjs"; 8 | 9 | /** 10 | * Count the number of Element nodes in the current document and set it as the value of an attribute on 11 | * document.body. 12 | * @function 13 | * @private 14 | */ 15 | function countElements() { 16 | document.body.setAttribute("data-wc-nodeCount", String(document.getElementsByTagName("*").length)); 17 | } 18 | 19 | initialise.register({ 20 | postInit: () => { 21 | countElements(); 22 | processResponse.subscribe(countElements, true); 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/js/wc/dom/toDocFragment.mjs: -------------------------------------------------------------------------------- 1 | /** 2 | * "Safe" conversion of HTML to DocumentFragment. 3 | * @param {String} html the HTML to convert to a document fragment 4 | * TODO doubt we need this any more, deleted half of it already (also could use HTML templates) 5 | */ 6 | export default function toDocFragment(html) { 7 | const result = document.createDocumentFragment(); 8 | const tmpDF = document.createDocumentFragment(); 9 | const tmpElement = tmpDF.ownerDocument.createElement("div"); 10 | const tmpContainer = tmpDF.appendChild(tmpElement); 11 | tmpContainer.innerHTML = html; 12 | let next; 13 | while ((next = tmpContainer.firstChild)) { 14 | result.appendChild(next); 15 | } 16 | return result; 17 | } 18 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/BeanProviderBoundComponentModel.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | /** 4 | * The {@link ComponentModel} for {@link BeanProviderBound} components. 5 | * 6 | * @author Yiannis Paschalidis 7 | * @since 1.0.0 8 | */ 9 | public class BeanProviderBoundComponentModel extends DataBoundComponentModel { 10 | 11 | /** 12 | * The bean id. 13 | */ 14 | private Object beanId; 15 | 16 | /** 17 | * @return the bean id. 18 | */ 19 | protected Object getBeanId() { 20 | return beanId; 21 | } 22 | 23 | /** 24 | * @param beanId the bean id to set. 25 | */ 26 | protected void setBeanId(final Object beanId) { 27 | this.beanId = beanId; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/Placeholderable.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | /** 4 | * This is a marker interface to indicate that this component can take placeholder text. 5 | * @author Rick Brown 6 | * @since 1.4 7 | */ 8 | public interface Placeholderable extends WComponent { 9 | 10 | /** 11 | * Set placeholder text which will appear in the field if it is editable and has no content. 12 | * @param placeholder The text to set as the placeholder. 13 | */ 14 | void setPlaceholder(final String placeholder); 15 | 16 | /** 17 | * Get the placeholder text, if explicitly set. 18 | * @return The placeholder text, if set. 19 | */ 20 | String getPlaceholder(); 21 | } 22 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/Image.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | import java.awt.Dimension; 4 | 5 | /** 6 | * Represents an image. Implementations can choose whether to explicitly store the byte[] or fetch it from some sort of 7 | * streaming resource as needed to service the {@link #getBytes} method as needed. 8 | * 9 | * @author James Gifford, Martin Shevchenko 10 | * @since 1.0.0 11 | */ 12 | public interface Image extends ContentAccess { 13 | 14 | /** 15 | * @return the natural size of the image, or null if no natural size is known. If only one dimension is known, use a 16 | * negative value (eg, -1) for the other dimension. 17 | */ 18 | Dimension getSize(); 19 | } 20 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/Disableable.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | /** 4 | * Expresses the notion that a WComponent can handle the idea of being "enabled" or "disabled". 5 | * 6 | * @author James Gifford 7 | * @since 1.0.0 8 | */ 9 | public interface Disableable extends WComponent { 10 | 11 | /** 12 | * Indicates whether the Disableable is disabled. 13 | * 14 | * @return true if the Disableable is disabled, otherwise false. 15 | */ 16 | boolean isDisabled(); 17 | 18 | /** 19 | * Sets whether the Disableable is disabled. 20 | * 21 | * @param disabled if true, the Disableable is disabled. If false, it is enabled. 22 | */ 23 | void setDisabled(boolean disabled); 24 | } 25 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/Mandatable.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | /** 4 | * Expresses the notion that a WComponent can handle the idea of being "mandatory" or "optional". 5 | * 6 | * @author Jonathan Austin 7 | * @since 1.0.0 8 | */ 9 | public interface Mandatable extends WComponent { 10 | 11 | /** 12 | * Set whether or not this component is mandatory. 13 | * 14 | * @param mandatory true for mandatory, false for optional. 15 | */ 16 | void setMandatory(final boolean mandatory); 17 | 18 | /** 19 | * Indicates whether or not this component is mandatory. 20 | * 21 | * @return true if the input is mandatory, false otherwise. 22 | */ 23 | boolean isMandatory(); 24 | } 25 | -------------------------------------------------------------------------------- /wcomponents-core/src/test/java/com/github/bordertech/wcomponents/MockImage.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | import java.awt.Dimension; 4 | 5 | /** 6 | * MockImage - implementation of Image useful for unit testing. 7 | * 8 | * @author Yiannis Paschalidis 9 | * @since 1.0.0 10 | */ 11 | public class MockImage extends MockContentAccess implements Image { 12 | 13 | /** 14 | * The image size, in pixels. 15 | */ 16 | private Dimension size; 17 | 18 | /** 19 | * @return Returns the size. 20 | */ 21 | @Override 22 | public Dimension getSize() { 23 | return size; 24 | } 25 | 26 | /** 27 | * @param size The size to set. 28 | */ 29 | public void setSize(final Dimension size) { 30 | this.size = size; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /wcomponents-core/src/test/java/com/github/bordertech/wcomponents/WPrintButton_Test.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | import org.junit.Assert; 4 | import org.junit.Test; 5 | 6 | /** 7 | * WPrintButton_Test - Unit tests for {@link WPrintButton}. 8 | * 9 | * @author Yiannis Paschalidis 10 | * @since 1.0.0 11 | */ 12 | public class WPrintButton_Test { 13 | 14 | @Test 15 | public void testConstructors() { 16 | String text = "WPrintButton_Test.testConstructors"; 17 | 18 | WPrintButton button = new WPrintButton(); 19 | Assert.assertEquals("Incorrect button text", "Print", button.getText()); 20 | 21 | button = new WPrintButton(text); 22 | Assert.assertEquals("Incorrect button text", text, button.getText()); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/js/wc/date/daysInMonth.mjs: -------------------------------------------------------------------------------- 1 | /** 2 | * Get the number of days in a given month of a given year. 3 | * 4 | * @example var today = new Date(); 5 | * daysInMonth(today.getFullYear(), today.getMonth()+1); // month is not zero based (why not??)(because it isn't!!) 6 | * // will return the number of days in the current month. 7 | * 8 | * @function 9 | * @alias module:wc/date/daysInMonth 10 | * @param {number} year The 2 or 4 digit year to check. 11 | * @param {number} month The month - this NOT zero based, ie january = 1, december = 12 12 | * @returns {number} The number of days in the month if we can determine it. 13 | */ 14 | export default function daysInMonth(year, month) { 15 | return new Date(year, month, 0).getDate(); 16 | } 17 | -------------------------------------------------------------------------------- /wcomponents-core/src/test/java/com/github/bordertech/wcomponents/WImageEditor_Test.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | import java.awt.Dimension; 4 | import org.junit.Test; 5 | 6 | /** 7 | * Unit tests for {@link WImageEditor} 8 | */ 9 | public class WImageEditor_Test extends AbstractWComponentTestCase { 10 | 11 | @Test 12 | public void testDuplicateComponentModels() { 13 | WImageEditor imageEditor = new WImageEditor(); 14 | assertNoDuplicateComponentModels(imageEditor, "overlayUrl", "test"); 15 | assertNoDuplicateComponentModels(imageEditor, "useCamera", true); 16 | assertNoDuplicateComponentModels(imageEditor, "renderInline", true); 17 | assertNoDuplicateComponentModels(imageEditor, "size", new Dimension(100, 213)); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/MenuContainer.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * A component that can hold menu items. 7 | * 8 | * @author Jonathan Austin 9 | * @since 1.0.2 10 | */ 11 | public interface MenuContainer extends WComponent { 12 | 13 | /** 14 | * @param item the menu item to add 15 | */ 16 | void addMenuItem(final MenuItem item); 17 | 18 | /** 19 | * @param item the menu item to remove 20 | */ 21 | void removeMenuItem(final MenuItem item); 22 | 23 | /** 24 | * Remove all menu items. 25 | */ 26 | void removeAllMenuItems(); 27 | 28 | /** 29 | * @return the items of this menu container 30 | */ 31 | List getMenuItems(); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WInvisibleContainer.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | /** 4 | *

5 | * This container is used as a marker for some special cases, where we want to skip normal WComponent life-cycle 6 | * processes.

7 | * 8 | *

9 | * It is always invisible.

10 | * 11 | * @author Yiannis Paschalidis 12 | * @since 1.0.0 13 | */ 14 | public class WInvisibleContainer extends AbstractMutableContainer { 15 | 16 | /** 17 | * Override isVisible so that the container does not take part in normal event handling and painting. 18 | * 19 | * @return false - this component is always invisible. 20 | */ 21 | @Override 22 | public boolean isVisible() { 23 | return false; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /wcomponents-examples-lde/src/main/java/com/github/bordertech/wcomponents/examples/lde/PlainLauncherProxy.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents.examples.lde; 2 | 3 | import com.github.bordertech.wcomponents.lde.PlainLauncher; 4 | 5 | /** 6 | * Provides this project with a main class that can facilitate running from an IDE. This allows people to run the 7 | * examples "out of the box" with zero configuration. 8 | * 9 | * @author Rick Brown 10 | */ 11 | public class PlainLauncherProxy { 12 | 13 | /** 14 | * The entry point to the launcher. 15 | * 16 | * @param args command-line arguments, ignored. 17 | * @throws Exception on error 18 | */ 19 | public static void main(final String[] args) throws Exception { 20 | PlainLauncher.main(args); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/common/_icon.scss: -------------------------------------------------------------------------------- 1 | // Icon classes from the Java API. 2 | // ############################################################################# 3 | 4 | // The following class is to allow an icon to be placed directly into a compoent 5 | // without an element wrapper. 6 | // com.github.bordertech.wcomponents.util.HtmlClassProperties.ICON 7 | .wc-icon::before { 8 | @include fa-icon; 9 | } 10 | 11 | // ICON POSITIONING CLASSES. 12 | // com.github.bordertech.wcomponents.util.HtmlClassProperties.ICON_BEFORE 13 | .wc-icon-before::before { 14 | margin-right: $wc-gap-small; 15 | } 16 | 17 | // com.github.bordertech.wcomponents.util.HtmlClassProperties.ICON_AFTER 18 | .wc-icon-after::before { 19 | float: right; 20 | margin-left: $wc-gap-small; 21 | } 22 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/FatalErrorPageFactory.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | /** 4 | * This interface enables a plug in point for alternative error pages. 5 | * 6 | * @author Martin Shevchenko 7 | */ 8 | public interface FatalErrorPageFactory { 9 | 10 | /** 11 | * Create a WComponent to display as an error page. 12 | * 13 | * @param developerFriendly indicates whether developer-friendly information can be provided in the error page (eg a 14 | * stack trace). This should never be true in production. 15 | * @param error is the error that we are handling. 16 | * @return a WComponent to display as an error page. 17 | */ 18 | WComponent createErrorPage(boolean developerFriendly, Throwable error); 19 | } 20 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/ConfigurationLoader.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents.util; 2 | 3 | import org.apache.commons.configuration.Configuration; 4 | 5 | /** 6 | * SPI interface for classes that can load a custom configuration for WComponents. 7 | * 8 | * @author Joshua Barclay 9 | * @since 1.2.5 10 | */ 11 | public interface ConfigurationLoader { 12 | 13 | /** 14 | *

15 | * Provides the configuration for this loader. The result of this configuration will be added to a composite 16 | * configuration along with WComponents and the configuration from other ConfigurationLoaders.

17 | * 18 | * @return The custom configuration for this loader. 19 | */ 20 | Configuration getConfiguration(); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/js/wc/ui/menu.mjs: -------------------------------------------------------------------------------- 1 | /** 2 | * Meta-module used to group all menu functionality for ease of inclusion. 3 | * 4 | * You could explicitly include those menu types you use in your application, but they are not big (compared to 5 | * {@link module:wc/ui/menu.core}. 6 | * 7 | * Do not use this module directly - it is only used as a faux-layer. The module {@link module:wc/ui/navigationButton} 8 | * is included because it is required if there are any menu items which have a url attribute, and it is also used in many 9 | * other locations: it should be in your common.js. 10 | */ 11 | import "wc/ui/menu/bar.mjs"; 12 | import "wc/ui/menu/column.mjs"; 13 | import "wc/ui/menu/tree.mjs"; 14 | import "wc/ui/menu/treemenu.mjs"; 15 | import "wc/ui/navigationButton.mjs"; 16 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/components/_wshuffler.scss: -------------------------------------------------------------------------------- 1 | // ############################################################################# 2 | // WShuffler is a select element where the option order is able to be changed. 3 | // ############################################################################# 4 | // We have a bunch of buttons next to this component, we better make the select 5 | // at least as high as the button tower. 6 | .wc-shuffler select { 7 | min-height: 8em; 8 | } 9 | 10 | // The shuffle controls are also used by WMultiSelectPair 11 | // The container for the list shuffle controls. 12 | .wc_sortcont { 13 | display: inline-block; 14 | vertical-align: top; 15 | 16 | // Each individual shuffle control 17 | button { 18 | display: block; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/components/_wskiplinks.scss: -------------------------------------------------------------------------------- 1 | // ############################################################################# 2 | // WSkipLinks 3 | // Are these **still** a thing? Can't people just get their key maps right? 4 | // ############################################################################# 5 | 6 | .wc-skiplinks { 7 | height: 0; 8 | left: 0; 9 | position: absolute; 10 | text-align: center; 11 | top: 0; 12 | vertical-align: middle; 13 | width: 100%; 14 | 15 | a { 16 | @include offscreen; 17 | 18 | &:focus { 19 | @include onscreen; 20 | @include wc-opaque-box; 21 | display: inline-block; 22 | padding: $wc-gap-normal; 23 | z-index: $wc-z-index-common; // never found in dialogs. 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /wcomponents-theme/src/test/intern/resources/domClassList.html: -------------------------------------------------------------------------------- 1 |
2 |
    3 |
  • one 4 |
      5 |
    • two - one
    • 6 |
    • two - two
    • 7 |
    • two - three
    • 8 |
    9 |
  • 10 |
  • two
  • 11 |
  • 12 |
  • three 13 |
      14 |
    • three - one
    • 15 |
    • three - two
    • 16 |
    • three - three
    • 17 |
    18 |
  • 19 |
20 |

Some other stuff

21 | 22 |
-------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/ActionEscape.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | /** 4 | * Extensions of ActionEscape indicated that they must be handled during the action phase of processing. This is 5 | * important in a portal environment. 6 | * 7 | * @author Martin Shevchenko 8 | */ 9 | public class ActionEscape extends Escape { 10 | 11 | /** 12 | * Default constructor. 13 | */ 14 | public ActionEscape() { 15 | } 16 | 17 | /** 18 | * Constructor that allows a message and cause to be provided. 19 | * 20 | * @param message the exception message 21 | * @param cause the original cause 22 | */ 23 | protected ActionEscape(final String message, final Throwable cause) { 24 | super(message, cause); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /wcomponents-core/src/test/java/com/github/bordertech/wcomponents/BeanBoundComponentModel_Test.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | import org.junit.Assert; 4 | import org.junit.Test; 5 | 6 | /** 7 | * Unit tests for {@link BeanBoundComponentModel}. 8 | * 9 | * @author Anthony O'Connor 10 | * @since 1.0.0 11 | */ 12 | public class BeanBoundComponentModel_Test extends AbstractWComponentTestCase { 13 | 14 | @Test 15 | public void testSetBean() { 16 | String textIn = "BeanBoundComponentModel_Test.initialText.text1"; 17 | BeanBoundComponentModel boundBean = new BeanBoundComponentModel(); 18 | boundBean.setBean(textIn); 19 | 20 | Assert. 21 | assertEquals("Bean retrieved should be same as bean set", textIn, boundBean. 22 | getBean()); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WPrintButton.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | import com.github.bordertech.wcomponents.util.InternalMessages; 4 | 5 | /** 6 | * This button opens a client side browser print window. 7 | * 8 | * @author Martin Shevchenko 9 | * @since 1.0.0 10 | */ 11 | public class WPrintButton extends WButton { 12 | 13 | /** 14 | * Creates a WPrintButton with the default button text. 15 | */ 16 | public WPrintButton() { 17 | this(InternalMessages.DEFAULT_PRINT_BUTTON_TEXT); 18 | } 19 | 20 | /** 21 | * Creates a WPrintButton with the given button text. 22 | * 23 | * @param text the text to display on the button. 24 | */ 25 | public WPrintButton(final String text) { 26 | super(text); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/common/ClientValidationTemplate.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents.examples.common; 2 | 3 | import com.github.bordertech.wcomponents.WTemplate; 4 | import com.github.bordertech.wcomponents.template.TemplateRendererFactory; 5 | 6 | /** 7 | * Creates a simple template to include some JavaScript to enable client side validation. 8 | * 9 | * @author exbtma 10 | */ 11 | public class ClientValidationTemplate extends WTemplate { 12 | 13 | /** 14 | * Create a Client ValidationTemplate. 15 | */ 16 | public ClientValidationTemplate() { 17 | super("com/github/bordertech/wcomponents/examples/clientValidation.txt", TemplateRendererFactory.TemplateEngine.PLAINTEXT); 18 | setVisible(false); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /wcomponents-core/src/test/java/com/github/bordertech/wcomponents/IntegrityException_Test.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | import org.junit.Assert; 4 | import org.junit.Test; 5 | 6 | /** 7 | * IntegrityException_Test - unit tests for {@link IntegrityException}. 8 | * 9 | * @author Anthony O'Connor 10 | * @since 1.0.0 11 | */ 12 | public class IntegrityException_Test { 13 | 14 | /** 15 | * test message. 16 | */ 17 | private static final String TEST_MESSAGE = "test message for IntegrityException"; 18 | 19 | @Test 20 | public void testConstructor() { 21 | IntegrityException exception = new IntegrityException(TEST_MESSAGE); 22 | 23 | Assert.assertEquals("message should be message set in constructor", TEST_MESSAGE, exception. 24 | getMessage()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/Action.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * WComponents that trigger a form submit can be given an Action which will be executed as part of the submit. The 7 | * submit first causes the entire WComponent tree to be updated via their handleRequest methods. Next, the action will 8 | * be executed using the WComponent invokeLater concept. 9 | * 10 | * @author Martin Shevchenko 11 | * @since 1.0.0 12 | */ 13 | @FunctionalInterface 14 | public interface Action extends Serializable { 15 | 16 | /** 17 | * This method is invoked when an action occurs. 18 | * 19 | * @param event details about the event that occured. 20 | */ 21 | void execute(ActionEvent event); 22 | } 23 | -------------------------------------------------------------------------------- /wcomponents-theme/src/test/spec/wc.debounce.test.mjs: -------------------------------------------------------------------------------- 1 | import debounce from "wc/debounce.mjs"; 2 | 3 | describe("wc/debounce", () => { 4 | let testObj; 5 | const delay = 5; 6 | 7 | beforeEach(() => { 8 | testObj = { 9 | setTestVal: function(value) { 10 | this.testVal += value; 11 | }, 12 | testVal: 0 13 | }; 14 | testObj["setTestValDebounced"] = debounce(testObj.setTestVal, delay); 15 | }); 16 | 17 | it("Calls the underlying function only once, passing through args and 'this'", () => { 18 | return new Promise(win => { 19 | const total = 20; 20 | for (let i = 0; i < total; i++) { 21 | testObj.setTestValDebounced(i); 22 | } 23 | setTimeout(() => { 24 | expect(testObj.testVal).toBe(total - 1); 25 | win(); 26 | }, delay * 2); 27 | }); 28 | }); 29 | }); 30 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/error/SystemFailureMapper.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents.util.error; 2 | 3 | import com.github.bordertech.wcomponents.Message; 4 | 5 | /** 6 | * Interface that defines the mapping from system level exception to user friendly message. 7 | * 8 | * @author Binusha Perera 9 | * @since 1.0.0 10 | * 11 | * @see com.github.bordertech.wcomponents.util.error.impl.DefaultSystemFailureMapper 12 | */ 13 | public interface SystemFailureMapper { 14 | 15 | /** 16 | * Convert a system exception to a user friendly error message. 17 | * 18 | * @param throwable the exception to convert. 19 | * @return ErrorMessage object that captures the user friendly description. 20 | */ 21 | Message toMessage(Throwable throwable); 22 | } 23 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/resources/com/github/bordertech/wcomponents/layout/UIManager.properties: -------------------------------------------------------------------------------- 1 | # 2 | # These properties control the UIManager's provision of LayoutManagers for WComponents 3 | # 4 | 5 | # Although discouraged, you can specify application-specific LayoutManager overrides using the following syntax. 6 | # In the examples below, the MyWButtonLayout or WButton.vm Velocity layout will be used for WButtons, no matter what the layout is. 7 | # 8 | # NOTE: Application-specific LayoutManagers are likely to break when a new UI theme is introduced. 9 | # 10 | #bordertech.wcomponents.UIManager.layout.com.github.bordertech.wcomponents.WButton=com.github.myApp.layout.MyWButtonLayout 11 | #bordertech.wcomponents.UIManager.layout.com.github.bordertech.wcomponents.WButton=com/github/myApp/layout/WButton.vm 12 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/resources/schema/ui/v1/gaps.xsd: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/wc-phone.scss: -------------------------------------------------------------------------------- 1 | 2 | // Import WComponent vars 3 | @import 'vars/wc'; 4 | // Import WComponent mixins once rather than per use. 5 | @import 'mixins/common'; 6 | 7 | // CSS for small screen user agents. 8 | @import 'respond/phone/space'; 9 | @import 'respond/phone/back-to-top'; 10 | @import 'respond/phone/checkableselect'; 11 | @import 'respond/phone/image-edit'; 12 | @import 'respond/phone/layout'; 13 | @import 'respond/phone/section'; 14 | @import 'respond/phone/wdatefield'; 15 | @import 'respond/phone/wdefinitionlist'; 16 | @import 'respond/phone/wdialog'; 17 | @import 'respond/phone/wfieldlayout'; 18 | @import 'respond/phone/wmenu'; 19 | @import 'respond/phone/wpanel'; 20 | @import 'respond/phone/wtable'; 21 | @import 'respond/phone/wtabset'; 22 | 23 | @import 'theme-phone'; 24 | -------------------------------------------------------------------------------- /wcomponents-theme/src/test/spec/wc.file.getMimeType.test.mjs: -------------------------------------------------------------------------------- 1 | import getMimeType from "wc/file/getMimeType.mjs"; 2 | import domTesting from "@testing-library/dom"; 3 | import {addFilesToInput} from "../helpers/specUtils.mjs"; 4 | 5 | describe("wc/file/getMimeType", () => { 6 | const testId = "mary1"; 7 | const html = ``; 8 | 9 | beforeEach(() => { 10 | document.body.innerHTML = html; 11 | }); 12 | 13 | it("Can find the mime time from a file input", function() { 14 | const type = "text/plain"; 15 | const file = { value: "@HERE@\\resources\\note.txt", type }; 16 | const element = addFilesToInput(domTesting.getByTestId(document.body, testId), [file]); 17 | const result = getMimeType(element)[0]; 18 | expect(result.mime).toBe(type); 19 | }); 20 | }); 21 | -------------------------------------------------------------------------------- /wcomponents-test-lib/src/main/java/com/github/bordertech/wcomponents/test/example/ExampleMultiBrowserSeleniumTest.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents.test.example; 2 | 3 | import com.github.bordertech.wcomponents.test.selenium.MultiBrowserRunner; 4 | import org.junit.runner.RunWith; 5 | 6 | /** 7 | *

8 | * This class demonstrates running a test using multiple browsers. All that is necessary is the 9 | * "@RunWith(MultiBrowserRunner.class)" annotation at class level.

10 | * 11 | *

12 | * Note that this test class just inherits tests from the {@link ExampleSeleniumTest} example test case.

13 | * 14 | * @author Yiannis Paschalidis 15 | * @since 1.0.0 16 | */ 17 | @RunWith(MultiBrowserRunner.class) 18 | public class ExampleMultiBrowserSeleniumTest extends ExampleSeleniumTest { 19 | } 20 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/js/wc/ui/validation/all.mjs: -------------------------------------------------------------------------------- 1 | /* 2 | * This is a pseudo-layer used to include all validation JavaScript without feature testing. 3 | */ 4 | import "wc/ui/validation/checkBox.mjs"; 5 | import "wc/ui/validation/checkBoxSelect.mjs"; 6 | import "wc/ui/validation/dateField.mjs"; 7 | import "wc/ui/validation/dropdown.mjs"; 8 | import "wc/ui/validation/fieldset.mjs"; 9 | import "wc/ui/validation/fileUpload.mjs"; 10 | import "wc/ui/validation/multiFormComponent.mjs"; 11 | import "wc/ui/validation/multiSelectPair.mjs"; 12 | import "wc/ui/validation/numberField.mjs"; 13 | import "wc/ui/validation/radioButtonSelect.mjs"; 14 | import "wc/ui/validation/textArea.mjs"; 15 | import "wc/ui/validation/textField.mjs"; 16 | import "wc/ui/validation/required.mjs"; 17 | import "wc/ui/validation/cancelUpdate.mjs"; 18 | -------------------------------------------------------------------------------- /wcomponents-theme/src/test/intern/resources/domGetStyle.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | 5 | 6 | 7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
-------------------------------------------------------------------------------- /wcomponents-core/src/test/java/com/github/bordertech/wcomponents/WNamingContext_Test.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | import org.junit.Assert; 4 | import org.junit.Test; 5 | 6 | /** 7 | * Unit tests for {@link WNamingContext}. 8 | * 9 | * @author Jonathan Austin 10 | * @since 1.0.0 11 | */ 12 | public class WNamingContext_Test extends AbstractWComponentTestCase { 13 | 14 | @Test 15 | public void testIdNameAccessors() { 16 | assertAccessorsCorrect(new WNamingContext("TEST"), WNamingContext::getIdName, WNamingContext::setIdName, 17 | "TEST", "XX", "YY"); 18 | } 19 | 20 | @Test 21 | public void testNamingContextId() { 22 | WNamingContext context = new WNamingContext("TEST"); 23 | Assert.assertEquals("Incorrect naming context", "TEST", context.getNamingContextId()); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /wcomponents-theme/src/test/intern/resources/domCheckEnctype.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 |
5 | 8 |
9 | 10 | 11 |
12 |
13 | 14 | 15 |
16 | 19 |
20 | 21 | 22 | 23 |
-------------------------------------------------------------------------------- /wcomponents-theme/src/test/spec/wc.dom.toDocFragment.test.mjs: -------------------------------------------------------------------------------- 1 | import controller from "wc/dom/toDocFragment.mjs"; 2 | 3 | describe("wc/dom/toDocFragment", () => { 4 | const SIMPLE_HTML = "
this is some htmlhello
"; 5 | 6 | it("testReturnsDocFragment", function() { 7 | const df = controller(SIMPLE_HTML); 8 | expect(df.nodeType).toBe(Node.DOCUMENT_FRAGMENT_NODE); 9 | }); 10 | 11 | it("testNoMunge", function() { 12 | const df = controller(SIMPLE_HTML), 13 | container = document.createElement("div"); 14 | container.appendChild(df); 15 | expect(container.innerHTML).toBe(SIMPLE_HTML); 16 | }); 17 | 18 | it("testToDocFragNoElements", function() { 19 | const content = "text node", 20 | df = controller(content); 21 | expect(df.firstChild.nodeValue).toBe(content); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/Video.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | import java.awt.Dimension; 4 | 5 | /** 6 | * Represents a video. Implementations can choose whether to explicitly store the byte[] or fetch it from some sort of 7 | * streaming resource as needed to service the {@link #getBytes} and {@link #getStream} methods as needed. 8 | * 9 | * @author Yiannis Paschalidis 10 | * @since 1.0.0 11 | */ 12 | public interface Video extends ContentStreamAccess { 13 | 14 | /** 15 | * @return the natural size (in pixels) of the video, or null if no natural size is known. 16 | */ 17 | Dimension getSize(); 18 | 19 | /** 20 | * @return the length of the video clip, in seconds, or <= 0 if unknown (e.g. streaming). 21 | */ 22 | int getDuration(); 23 | } 24 | -------------------------------------------------------------------------------- /wcomponents-examples/src/main/resources/com/github/bordertech/wcomponents/examples/hellobutton.js: -------------------------------------------------------------------------------- 1 | 2 | Promise.all(["wc/dom/event.mjs", "wc/dom/initialise.mjs"].map(dep => import(dep))).then(([event, initialise]) => { 3 | // This script exists _only_ as an example to show use of WButton setClientCommandOnly(boolean); 4 | 5 | /** 6 | * If an element with class 'hellobutton' is clicked, pop up an alert dialog. 7 | * @param {MouseEvent} $event the wrapped click event 8 | */ 9 | function clickEvent($event) { 10 | const target = $event.target; 11 | 12 | if (target && target.classList.contains("hellobutton")) { 13 | alert("hello"); 14 | } 15 | } 16 | // add an event manager subscription for the click handler 17 | initialise.register({ postInit: () => event.add(document.body, "click", clickEvent) }); 18 | }); 19 | -------------------------------------------------------------------------------- /wcomponents-core/src/test/java/com/github/bordertech/wcomponents/FatalErrorPageFactoryImpl_Test.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | import org.junit.Assert; 4 | import org.junit.Test; 5 | 6 | /** 7 | * Unit tests for {@link FatalErrorPageFactoryImpl}. 8 | * 9 | * @author Anthony O'Connor 10 | * @since 1.0.0 11 | */ 12 | public class FatalErrorPageFactoryImpl_Test extends AbstractWComponentTestCase { 13 | 14 | @Test 15 | public void testCreateErrorPage() { 16 | FatalErrorPageFactoryImpl factory = new FatalErrorPageFactoryImpl(); 17 | TestSampleException exception = new TestSampleException("sample exception"); 18 | WComponent result = factory.createErrorPage(true, exception); 19 | 20 | Assert.assertTrue("result should be instance of FatalErrorPage", 21 | result instanceof FatalErrorPage); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /wcomponents-lde/src/main/java/com/github/bordertech/wcomponents/lde/LdeLauncher.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents.lde; 2 | 3 | /** 4 | * Interface for classes that can launch an LDE, e.g. Jetty. 5 | * 6 | * @author Joshua Barclay 7 | * @since 1.2.0 8 | */ 9 | public interface LdeLauncher { 10 | 11 | /** 12 | * Runs the server. 13 | * 14 | * @throws Exception if the LDE fails to start. 15 | */ 16 | void run() throws Exception; 17 | 18 | /** 19 | * Stops the server. 20 | * 21 | * @throws java.lang.InterruptedException an interrupted exception 22 | */ 23 | void stop() throws InterruptedException; 24 | 25 | /** 26 | * @return the URL of the server. 27 | */ 28 | String getUrl(); 29 | 30 | /** 31 | * @return true if the server is running, else false. 32 | */ 33 | boolean isRunning(); 34 | 35 | } 36 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/js/wc/fix/width_uc.mjs: -------------------------------------------------------------------------------- 1 | /* 2 | * UC Browser has trouble with width, min-width and max-width calculations. This fix 3 | * sets a pixel width on the FORM element (WApplication) which alleviates some of these 4 | * problems. 5 | */ 6 | 7 | import initialise from "wc/dom/initialise.mjs"; 8 | import getViewportSize from "wc/dom/getViewportSize.mjs"; 9 | import event from "wc/dom/event.mjs"; 10 | import debounce from "wc/debounce.mjs"; 11 | import getForm from "wc/ui/getForm.mjs"; 12 | 13 | function setWidth() { 14 | const form = getForm(); 15 | const vp = form ? getViewportSize() : null; 16 | if (vp) { 17 | form.style.width = `${vp.width}px`; 18 | } 19 | } 20 | 21 | initialise.register({ 22 | preInit: function() { 23 | setWidth(); 24 | event.add(window, "resize", debounce(setWidth, 100), 1); 25 | } 26 | }); 27 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/js/wc/ui/dropdown.mjs: -------------------------------------------------------------------------------- 1 | /** 2 | * Provides some extra functionality on single selectable SELECT elements (WDropdown). 3 | */ 4 | const instance = { 5 | /** 6 | * Allow an external component to set selection of a dropdown using a value. 7 | * @function module:wc/ui/dropdown.setSelectionByValue 8 | * @public 9 | * @param {HTMLSelectElement} element The dropdown. 10 | * @param {String} value the value of the option to select. 11 | */ 12 | setSelectionByValue: function(element, value) { 13 | if (element?.matches("select")) { 14 | const _group = Array.from(element.options); 15 | for (const option of _group) { 16 | if (option.value === value || option.text === value) { 17 | option.selected = true; 18 | break; 19 | } 20 | } 21 | } 22 | } 23 | }; 24 | 25 | export default instance; 26 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/mixins/_common.scss: -------------------------------------------------------------------------------- 1 | // ############################################################################# 2 | // Many common mixins. 3 | // ############################################################################# 4 | 5 | 6 | // ############################################################################# 7 | // NOTE: button and box require the border mixin so order _may_ matter. 8 | // better to keep border first. 9 | // ############################################################################# 10 | @import 'border'; 11 | @import 'box'; // box size and position control. 12 | @import 'button'; 13 | @import 'flex'; // flexbox mixins 14 | @import 'mandatory'; // mandatory indicator 15 | @import 'respond'; // responsive design media queries. 16 | @import '../lib/fa/mixins'; // font-awesome mixins - just in case 17 | -------------------------------------------------------------------------------- /wcomponents-theme/src/test/spec/wc.dom.uid.test.mjs: -------------------------------------------------------------------------------- 1 | import uid from "wc/dom/uid.mjs"; 2 | import unique from "wc/array/unique.mjs"; 3 | 4 | describe("wc/dom/uid", function() { 5 | const ids = [], len = 100; 6 | 7 | beforeAll(() => { 8 | let i = 0; 9 | while (i++ < len) { 10 | ids[ids.length] = uid(); 11 | } 12 | }); 13 | 14 | it("testPrecondition", function() { 15 | expect(ids.length).withContext("Test case not built correctly").toBe(len); 16 | }); 17 | 18 | it("testUniqueness", function() { 19 | let uniqueIds = unique(ids); 20 | expect(uniqueIds.length).withContext("Duplicate ids were generated by uid").toBe(len); 21 | }); 22 | 23 | it("testSortable", function() { 24 | for (let i= 1; i < ids.length; i++) { 25 | expect(ids[i - 1]).withContext("ids are not sortable").toBeLessThan(ids[i]); 26 | } 27 | }); 28 | }); 29 | -------------------------------------------------------------------------------- /wcomponents-core/src/test/java/com/github/bordertech/wcomponents/BeanProviderBoundComponentModel_Test.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | import org.junit.Assert; 4 | import org.junit.Test; 5 | 6 | /** 7 | * Unit tests for {@link BeanProviderBoundComponentModel}. 8 | * 9 | * @author Anthony O'Connor 10 | * @since 1.0.0 11 | */ 12 | public class BeanProviderBoundComponentModel_Test extends AbstractWComponentTestCase { 13 | 14 | @Test 15 | public void testIsSet() { 16 | String textIn = "BeanProviderBoundComponentModel_Test.initialText.text1"; 17 | BeanProviderBoundComponentModel providerBoundBean = new BeanProviderBoundComponentModel(); 18 | providerBoundBean.setBeanId(textIn); 19 | 20 | Assert.assertEquals("Bean retrieved should be same as bean set", textIn, providerBoundBean. 21 | getBeanId()); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/js/wc/date/copy.mjs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copy a date object. At first glance seems a bit of sledgehammer to crack a walnut but we have seen 3 | * noobs copy dates in parts which can lead to rollover problems. 4 | * 5 | * @example 6 | * var date = new Date("1999","5","25"), 7 | * clonedDate = copy(date); 8 | * console.log(clonedDate === date?'you will never get here':'you will always get here'); 9 | * console.log(clonedDate.getTime() === date.getTime()?'you will always get here':'you will never get here'); 10 | * 11 | * @function 12 | * @alias module:wc/date/copy 13 | * @param {Date} date The date to copy. 14 | * @returns {Date} A clone of the date. 15 | */ 16 | function copy(date) { 17 | const result = new Date(); 18 | result.setTime(date.getTime()); 19 | return result; 20 | } 21 | export default copy; 22 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/js/wc/fixes.mjs: -------------------------------------------------------------------------------- 1 | /* 2 | * This module determines which browser specific fixes we need to load. 3 | * Modules loaded here are different to those loaded in the compat module because they are not needed by the scripting 4 | * environment per se, but rather they are needed a little later - before the user interacts with the page (hopefully) 5 | * but after other modules have initialized. The return object of this module is an array of module name strings. This 6 | * module should not be used except in the environment set-up in XSLT. 7 | * 8 | * @module 9 | */ 10 | import has from "wc/has.mjs"; 11 | 12 | const result = []; 13 | 14 | if (has("webkit") && !has("edge")) { 15 | result.push("wc/fix/focus_webkit.mjs"); 16 | } else if (has("ff")) { 17 | result.push("wc/fix/shiftKey_ff.mjs"); 18 | } 19 | 20 | export default result; 21 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/js/wc/ui/disabledLink.mjs: -------------------------------------------------------------------------------- 1 | /** 2 | * Provides disable-ability to HTML `a` elements. 3 | */ 4 | 5 | import event from "wc/dom/event.mjs"; 6 | import initialise from "wc/dom/initialise.mjs"; 7 | import shed from "wc/dom/shed.mjs"; 8 | 9 | /** 10 | * Click event listener: prevent navigation if the link is "disabled". 11 | * 12 | * @function 13 | * @private 14 | * @param {MouseEvent & { target: HTMLElement }} $event A click event. 15 | */ 16 | function clickEvent($event) { 17 | const { target, defaultPrevented } = $event; 18 | if (defaultPrevented) { 19 | return; 20 | } 21 | const element = target.closest("a"); 22 | if (element && shed.isDisabled(element)) { 23 | $event.preventDefault(); 24 | } 25 | } 26 | 27 | initialise.register({ 28 | initialise: (element) => event.add(element, "click", clickEvent, -1) 29 | }); 30 | -------------------------------------------------------------------------------- /wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/menu/StringTreeNode.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents.examples.menu; 2 | 3 | import com.github.bordertech.wcomponents.util.AbstractTreeNode; 4 | 5 | /** 6 | * Trivial implementation of a tree node, in order to show how to transform a tree structure into a menu structure. 7 | * 8 | * @author Yiannis Paschalidis 9 | */ 10 | final class StringTreeNode extends AbstractTreeNode { 11 | 12 | /** 13 | * The data for this node. 14 | */ 15 | private final String data; 16 | 17 | /** 18 | * Creates a StringTreeNode. 19 | * 20 | * @param data the node data. 21 | */ 22 | StringTreeNode(final String data) { 23 | this.data = data; 24 | } 25 | 26 | /** 27 | * @return the node data. 28 | */ 29 | public String getData() { 30 | return data; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/components/_multiformcomponent.scss: -------------------------------------------------------------------------------- 1 | // ############################################################################# 2 | // WMultiTextField and WMultiDropdown 3 | // ############################################################################# 4 | 5 | // left and right padding of the combo button. 6 | $wc-mfc-button-padding-lr: $wc-gap-small !default; 7 | $wc-mfc-button-width-allowance: 2 * $wc-mfc-button-padding-lr + $wc-icon-size + $wc-gap-small; 8 | 9 | .wc_mfc { 10 | white-space: nowrap; 11 | 12 | input, 13 | select { 14 | max-width: calc(100% - #{$wc-mfc-button-width-allowance}); 15 | } 16 | 17 | button { 18 | @include border($pos: left, $width: 0); 19 | padding: 1px $wc-mfc-button-padding-lr; 20 | 21 | &::before { 22 | text-align: center; 23 | width: $wc-icon-size; 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/wc-uc.scss: -------------------------------------------------------------------------------- 1 | // Fixes for UC Browser 2 | 3 | // IMPORTS of all required variables. 4 | // ############################################################################# 5 | // Import WComponent vars 6 | @import 'vars/wc'; 7 | // Import WComponent mixins once rather than per use. 8 | @import 'mixins/common'; 9 | 10 | // ############################################################################# 11 | // UC Browser specific files 12 | @import 'fix/uc/button'; 13 | @import 'fix/uc/combo'; 14 | @import 'fix/uc/layout'; 15 | @import 'fix/uc/multiformcomponent'; 16 | @import 'fix/uc/wcollapsible'; 17 | @import 'fix/uc/wdialog'; 18 | @import 'fix/uc/wfigure'; 19 | @import 'fix/uc/wmenu'; 20 | @import 'fix/uc/wmessagebox'; 21 | @import 'fix/uc/wtable'; 22 | @import 'fix/uc/wtabset'; 23 | @import 'fix/uc/wtogglebutton'; 24 | @import 'fix/uc/wtree'; 25 | -------------------------------------------------------------------------------- /wcomponents-theme/src/test/spec/wc.dom.removeElement.test.mjs: -------------------------------------------------------------------------------- 1 | import removeElement from "wc/dom/removeElement.mjs"; 2 | 3 | describe("wc/dom/removeElement", () => { 4 | const testHolder = document.body, 5 | removeId = "removeelementtest-target", 6 | testContent = `content`; 7 | 8 | beforeEach(() => testHolder.innerHTML = testContent); 9 | afterEach(() => testHolder.innerHTML = ""); 10 | 11 | it("testRemoveElement_noId", function() { 12 | expect(document.getElementById(removeId)).toBeTruthy(); 13 | // @ts-ignore 14 | removeElement(); 15 | expect(document.getElementById(removeId)).toBeTruthy(); 16 | }); 17 | 18 | it("testRemoveElement", function() { 19 | expect(document.getElementById(removeId)).toBeTruthy(); 20 | removeElement(removeId); 21 | expect(document.getElementById(removeId)).toBeFalsy(); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/RadioButtonGroupRenderer.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents.render.webxml; 2 | 3 | import com.github.bordertech.wcomponents.WComponent; 4 | import com.github.bordertech.wcomponents.servlet.WebXmlRenderContext; 5 | 6 | /** 7 | * The Renderer for RadioButtonGroup. 8 | * 9 | * @author Yiannis Paschalidis 10 | * @since 1.0.0 11 | */ 12 | final class RadioButtonGroupRenderer extends AbstractWebXmlRenderer { 13 | 14 | /** 15 | * Paints the given RadioButtonGroup. 16 | * 17 | * @param component the RadioButtonGroup to paint. 18 | * @param renderContext the RenderContext to paint to. 19 | */ 20 | @Override 21 | public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { 22 | // We don't actually want to render anything in the HTML 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /wcomponents-theme/src/test/spec/wc.string.escapeRe.test.mjs: -------------------------------------------------------------------------------- 1 | import escapeRe from "wc/string/escapeRe.mjs"; 2 | 3 | describe("wc/string/escapeRe", function() { 4 | 5 | it("testEscapeReString", function() { 6 | const testString = "a.b|c*d?e+f(g)h{i}j[k]l^m$n\\o", // have to double escape backslashes, 7 | expected = "a\\.b\\|c\\*d\\?e\\+f\\(g\\)h\\{i\\}j\\[k\\]l\\^m\\$n\\\\o", // have to double escape backslashes, 8 | result = escapeRe(testString); 9 | expect(result).toBe(expected); 10 | }); 11 | 12 | it("testEscapeReStringWithWildcard", function() { 13 | const testString = "a.b|c*d?e+f(g)h{i}j[k]l^m$n\\o", // have to double escape backslashes, 14 | expected = "a\\.b\\|c.*d\\?e\\+f\\(g\\)h\\{i\\}j\\[k\\]l\\^m\\$n\\\\o", // have to double escape backslashes, 15 | result = escapeRe(testString, true); 16 | expect(result).toBe(expected); 17 | }); 18 | 19 | }); 20 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/js/wc/debounce.mjs: -------------------------------------------------------------------------------- 1 | import timers from "wc/timers.mjs"; 2 | 3 | /** 4 | * Returns a wrapper function which will invoke the wrapped function only 5 | * when it has not been called for `delay` milliseconds. 6 | * 7 | * @param func The function to debounce. 8 | * @param delay The period between last call and invocation. 9 | * @returns {Function} Essentially a debounced version of the function passed in as `func`. 10 | */ 11 | export default function debounce(func, delay) { 12 | let timer; 13 | return function debounceWrapper() { 14 | const $this = this, args = arguments; 15 | if (timer || timer === 0) { 16 | timers.clearTimeout(timer); 17 | } 18 | timer = timers.setTimeout(function() { 19 | try { 20 | func.apply($this, args); 21 | } catch (ex) { 22 | console.error("Error in debounced function", ex); 23 | } 24 | }, delay); 25 | }; 26 | } 27 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WMessagesValidatingAction.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | import com.github.bordertech.wcomponents.validation.ValidatingAction; 4 | 5 | /** 6 | * WMessagesValidatingAction - Convenience class that validates a component and uses WMessages to display the results. 7 | * If the component is not in a valid state, the action is not executed. 8 | * 9 | * @author Yiannis Paschalidis 10 | * @since 1.0.0 11 | */ 12 | public abstract class WMessagesValidatingAction extends ValidatingAction { 13 | 14 | /** 15 | * Creates a WMessagesValidatingAction for the given component. 16 | * 17 | * @param component the component to create the action for. 18 | */ 19 | public WMessagesValidatingAction(final WComponent component) { 20 | super(WMessages.getInstance(component).getValidationErrors(), component); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/WImageCachedExample.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents.examples; 2 | 3 | import com.github.bordertech.wcomponents.WImage; 4 | import com.github.bordertech.wcomponents.WPanel; 5 | 6 | /** 7 | * Demonstrate a cached and not cached dynamic image. 8 | * 9 | * @author Jonathan Austin 10 | * @since 1.0.0 11 | */ 12 | public class WImageCachedExample extends WPanel { 13 | 14 | /** 15 | * Construct example. 16 | */ 17 | public WImageCachedExample() { 18 | // Cached dynamic image (ie has cache key) 19 | WImage image = new WImage(); 20 | image.setCacheKey("CacheKeyDemo"); 21 | image.setImage(new DynamicImage("Cached")); 22 | add(image); 23 | 24 | // Dynamic image that is not cached 25 | image = new WImage(); 26 | image.setImage(new DynamicImage("No cache")); 27 | add(image); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/RendererFactory.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | /** 4 | * Describes a renderer factory for a given package. 5 | * 6 | * @author Yiannis Paschalidis 7 | * @since 1.0.0 8 | */ 9 | public interface RendererFactory { 10 | 11 | /** 12 | * Obtains a renderer for the given class. 13 | * 14 | * @param clazz the WComponent class to retrieve the renderer for. 15 | * @return the renderer for the given class, or null if there isn't a renderer in this package. 16 | */ 17 | Renderer getRenderer(Class clazz); 18 | 19 | /** 20 | * Obtains a renderer for the given template. 21 | * 22 | * @return a template renderer for the given template, or null if template rendering is not supported. 23 | * @deprecated Use {@link WTemplate} instead. 24 | */ 25 | @Deprecated 26 | Renderer getTemplateRenderer(); 27 | } 28 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/Targetable.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | /** 4 | * WComponents can be marked as targetable. This means they can be directly targeted via a url to return to the client 5 | * just their fragment of content, rather than the entire application. They can also be used to return content other 6 | * than html, such as images and PDFs. 7 | * 8 | * @author Martin Shevchenko 9 | * @since 1.0.0 10 | */ 11 | public interface Targetable extends WComponent { 12 | 13 | /** 14 | * The target id returned must be unique across all targetable WComponents within the application. In a portal 15 | * environment, the target ids must also be unique across portlets. Most components should just return their 16 | * component id. 17 | * 18 | * @return the target id for this targetable. 19 | */ 20 | String getTargetId(); 21 | } 22 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/vars/_section.scss: -------------------------------------------------------------------------------- 1 | 2 | // ############################################################################# 3 | // Section elements and their headers 4 | // ############################################################################# 5 | // the space between the section box and its content. This is reversed to "dock" 6 | // a menu. Must be > 0 to have any effect. 7 | $wc-section-space-normal: 0 !default; // $wc-gap-normal !default; 8 | // the padding around the title in the header. Must be > 0 to have any effect. 9 | // the space between the section box and its content on small viewports. This is 10 | // reversed to "dock" a menu. Not applied if $wc-use-respond != true or 11 | // $wc-respond-reduce-gap-when-narrow != true. 12 | $wc-section-space-reduced: -1 !default; // $wc-phone-gap-normal !default; 13 | // ############################################################################# 14 | -------------------------------------------------------------------------------- /wcomponents-core/src/test/java/com/github/bordertech/wcomponents/container/TransformXMLTestHelper.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents.container; 2 | 3 | /** 4 | * Helper class for tests using {@link TransformXMLInterceptor}. 5 | * 6 | * @author Jonathan Austin 7 | */ 8 | public final class TransformXMLTestHelper { 9 | 10 | /** 11 | * The input xml. 12 | */ 13 | public static final String TEST_XML = "is good for you"; 14 | 15 | /** 16 | * The expected HTML result. 17 | */ 18 | public static final String EXPECTED = "is good for you"; 19 | 20 | /** 21 | * Prevent instantiation. 22 | */ 23 | private TransformXMLTestHelper() { 24 | } 25 | 26 | /** 27 | * Use reflection the reinitialize the TransformXMLInterceptor class. 28 | */ 29 | public static void reloadTransformer() { 30 | TransformXMLInterceptor.initTemplates(); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /wcomponents-xslt/src/main/xslt/wc.ui.heading.xsl: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/autocomplete/AutocompleteableNumeric.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents.autocomplete; 2 | 3 | import com.github.bordertech.wcomponents.autocomplete.type.Numeric; 4 | 5 | /** 6 | * Provide valid {@code autocomplete} attribute values suitable for controls in the 7 | * numeric control group 8 | * such as {@link com.github.bordertech.wcomponents.WNumberField}. 9 | * 10 | * @author Mark Reeves 11 | * @since 1.5.3 12 | */ 13 | public interface AutocompleteableNumeric extends Autocompleteable { 14 | 15 | /** 16 | * Set the autocomplete attribute for a number field for a given numeric auto-fill value. 17 | * @param value the type of number for auto-fill 18 | */ 19 | void setAutocomplete(final Numeric value); 20 | 21 | } 22 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/velocity/VelocityProperties.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents.velocity; 2 | 3 | import java.util.Map; 4 | 5 | /** 6 | * Components which use the VelocityLayout may implement this interface, in which case the Map given in the 7 | * getVelocityMap function will be installed into the VelocityContext. 8 | * 9 | * @author James Gifford 10 | * @since 1.0.0 11 | */ 12 | public interface VelocityProperties { 13 | 14 | /** 15 | * Retrieves a map of key/value pairs to be installed into the VelocityContext. 16 | * 17 | * @return the map to be inserted into the velocity context. 18 | */ 19 | Map getVelocityMap(); 20 | 21 | /** 22 | * This method will be called after the VelocityLayout has painted the template. Implementations may clear the map 23 | * at this point, since Velocity has done its thing. 24 | */ 25 | void mapUsed(); 26 | } 27 | -------------------------------------------------------------------------------- /wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/WTimeoutWarningDefaultExample.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents.examples; 2 | 3 | import com.github.bordertech.wcomponents.WContainer; 4 | import com.github.bordertech.wcomponents.WTimeoutWarning; 5 | import com.github.bordertech.wcomponents.examples.common.ExplanatoryText; 6 | 7 | /** 8 | * Example of WTimeoutWarning. 9 | */ 10 | public class WTimeoutWarningDefaultExample extends WContainer { 11 | 12 | /** 13 | * Construct example. 14 | */ 15 | public WTimeoutWarningDefaultExample() { 16 | add(new ExplanatoryText( 17 | "This is a demonstration of the 'session timeout' warning. It will display a session timeout message based on the default timeout for the session. A warning message will be displayed before the session ends. It does not actually end your session.")); 18 | add(new WTimeoutWarning()); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/js/wc/xml/xmlString.mjs: -------------------------------------------------------------------------------- 1 | /** 2 | * Utility for serializing and deserializing XML. 3 | * @private 4 | */ 5 | 6 | let serializer; 7 | 8 | /** 9 | * Serialize an XML document. 10 | * 11 | * @function module:wc/xml/xmlString.to 12 | * @param {Document} node An XML DOM object 13 | * @returns {String} The serialized XML. 14 | */ 15 | function to(node) { 16 | if (node) { 17 | serializer = serializer || new XMLSerializer(); 18 | return serializer.serializeToString(node); 19 | } 20 | return null; 21 | } 22 | 23 | /** 24 | * Deserialize an XML string. 25 | * 26 | * @function module:wc/xml/xmlString.from 27 | * @param {String} xmlstring An XML string. 28 | * @returns {Document} An XML document. 29 | */ 30 | function from(xmlstring) { 31 | const domParser = new DOMParser(); 32 | return domParser.parseFromString(xmlstring?.trim(), "text/xml"); 33 | } 34 | 35 | export default { from, to }; 36 | -------------------------------------------------------------------------------- /wcomponents-theme/src/main/sass/fix/uc/_wdialog.scss: -------------------------------------------------------------------------------- 1 | 2 | 3 | @if $wc-use-respond == true { 4 | dialog { 5 | &[open] { 6 | display: block; 7 | } 8 | 9 | > header { 10 | display: block; 11 | 12 | > h1 { // the title 13 | display: inline-block; 14 | max-width: 90%; 15 | } 16 | 17 | > span { // the header control 'block' 18 | display: inline-block; 19 | float: right; 20 | } 21 | } 22 | 23 | > div { // dialog content container 24 | @include border-box; 25 | clear: both; 26 | display: block; 27 | height: 100%; 28 | overflow: auto; 29 | } 30 | 31 | > footer { 32 | display: block; 33 | } 34 | } 35 | 36 | @if $wc-use-respond-dialog == true { 37 | dialog { 38 | @include border-box; 39 | bottom: 0; 40 | padding-bottom: 1rem; 41 | right: 0; 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /wcomponents-core/src/main/java/com/github/bordertech/wcomponents/autocomplete/AutocompleteablePassword.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents.autocomplete; 2 | 3 | import com.github.bordertech.wcomponents.autocomplete.type.Password; 4 | 5 | /** 6 | * Specific {@code autocomplete} attribute values for controls in the 7 | * password control 8 | * group such as {@link com.github.bordertech.wcomponents.WPasswordField}. 9 | * 10 | * @author Mark Reeves 11 | * @since 1.5.3 12 | */ 13 | public interface AutocompleteablePassword extends Autocompleteable { 14 | 15 | /** 16 | * Set the {@code autocomplete} attribute of a password field to a given password auto-fill hint type. 17 | * @param value the type of password field to auto-fill 18 | */ 19 | void setAutocomplete(final Password value); 20 | } 21 | -------------------------------------------------------------------------------- /wcomponents-core/src/test/java/com/github/bordertech/wcomponents/ActionEscape_Test.java: -------------------------------------------------------------------------------- 1 | package com.github.bordertech.wcomponents; 2 | 3 | import org.junit.Assert; 4 | import org.junit.Test; 5 | 6 | /** 7 | * Unit tests for {@link ActionEscape}. 8 | */ 9 | public class ActionEscape_Test { 10 | 11 | @Test 12 | public void testConstructor1() { 13 | ActionEscape esc = new ActionEscape(); 14 | Assert.assertNull("Request should be null by default", esc.getRequest()); 15 | Assert.assertNull("Response should be null by default", esc.getResponse()); 16 | } 17 | 18 | @Test 19 | public void testConstructor2() { 20 | String msg = "Test message"; 21 | Throwable cause = new NullPointerException(); 22 | ActionEscape esc = new ActionEscape(msg, cause); 23 | Assert.assertEquals("Incorrect message returned", msg, esc.getMessage()); 24 | Assert.assertEquals("Incorrect cause returned", cause, esc.getCause()); 25 | } 26 | } 27 | --------------------------------------------------------------------------------