Skip to content

Commit

Permalink
Merge pull request #6 from qld-gov-au/add-external-library
Browse files Browse the repository at this point in the history
add external libraries
duttonw authored Mar 17, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents 8a5e5bc + 5a7991d commit 00360ce
Showing 13 changed files with 13,113 additions and 7 deletions.
4 changes: 3 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -2,4 +2,6 @@ node_modules/
dist/
builder/
!.storybook/
storybook-static/
storybook-static/
binary-repo/
lib/
4 changes: 2 additions & 2 deletions .github/workflows/compile.js.yml
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ '14']
node: [ '16']
name: Lint test on Node ${{ matrix.node }}
steps:
- run: echo ${{github.ref}}
@@ -40,7 +40,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ '14' ]
node: [ '16' ]
name: Build and Deploy on Node ${{ matrix.node }}
steps:
- uses: actions/checkout@v2
4 changes: 4 additions & 0 deletions .github/workflows/storybook-deploy.js.yml
Original file line number Diff line number Diff line change
@@ -10,6 +10,10 @@ jobs:
deploy:
concurrency: deploy-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession.
runs-on: ubuntu-latest
strategy:
matrix:
node: [ '16' ]
name: Deploy with Node ${{ matrix.node }}
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v2
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -19,3 +19,4 @@ storybook-static/
dist/

.idea
/node
6 changes: 3 additions & 3 deletions binary-repo/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
This is the file that will be deployed to binary repo
# Queensland Government Form.io custom component library - Binary Repo

the workflow in this binary-repo is used to make the 'sematic's versions' everything in one repo
This repository provides a bundled JS custom component library to form.io builder / form.io renderer / Squiz Matrix form application.

- this should only be triggered on tag push.
See https://qld-gov-au.github.io/formio/ for source repository
12,819 changes: 12,819 additions & 0 deletions lib/formio.full.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions lib/formio.full.min.js

Large diffs are not rendered by default.

149 changes: 149 additions & 0 deletions lib/premium.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
.formio-sketchpad-toolbar-input {
height: 24px;
margin-top: -5px;
margin-bottom: -5px;
width: 40px;
margin-left: 5px; }

.btn.formio-sketchpad-toolbar-button {
overflow: visible; }
.btn.formio-sketchpad-toolbar-button:hover {
background: #e6e6e6; }
.btn.formio-sketchpad-toolbar-button.active, .btn.formio-sketchpad-toolbar-button:active {
outline: 0;
box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); }

.formio-sketchpad-toolbar-group {
background: #f2f2f2;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
margin-right: 3px; }

.formio-sketchpad-toolbar {
margin: 0 auto 3px auto;
display: flex;
justify-content: center;
position: relative;
z-index: 3; }

.formio-sketchpad-svg,
.formio-sketchpad-background svg {
border: 1px dashed #999; }

.formio-sketchpad-background svg {
background: #ffffff; }

.formio-sketchpad-body {
text-align: left;
max-width: 100%; }

.formio-sketchpad-meta-info {
text-align: right; }

.formio-sketchpad-container,
.formio-sketchpad-modal-preview-container {
position: relative;
z-index: 1;
overflow: auto; }

.formio-sketchpad-background,
.formio-sketchpad-modal-preview-background {
text-align: center;
width: 100%; }

.formio-sketchpad-canvas,
.formio-sketchpad-modal-preview-drawing {
width: 100%;
height: 100%; }

.formio-sketchpad-canvas,
.formio-sketchpad-modal-preview-container .formio-sketchpad-modal-preview-drawing {
position: absolute;
z-index: 2;
text-align: center;
top: 0;
left: 0; }

.formio-component-modal-wrapper .component-rendering-hidden .formio-sketchpad-body, .formio-component-modal-wrapper .component-rendering-hidden .formio-tagpad-container {
display: none; }

.formio-tagpad-image-container {
float: left;
width: 50%;
z-index: 1;
position: relative;
border: 1px dashed #999;
border-radius: 3px; }

.formio-tagpad-form-container {
width: 50%;
float: left; }

.formio-tagpad-canvas {
cursor: crosshair;
position: absolute;
z-index: 2;
height: 100%;
width: 100%;
top: 0; }

.formio-disabled-input .formio-tagpad-canvas {
cursor: not-allowed; }

.formio-disabled-input .formio-tagpad-image-container {
background-color: #eee; }

.formio-tagpad-background svg {
width: 100%; }

.formio-tagpad-form {
padding-left: 5px;
padding-right: 5px; }

.formio-tagpad-all-data {
white-space: pre-wrap; }

.formio-tagpad-dot,
.formio-tagpad-dot-index {
cursor: pointer; }

.formio-tagpad-save-button,
.formio-tagpad-remove-button {
margin-right: 5px;
margin-bottom: 5px; }

.formio-tagpad-form-title {
font-size: 1.7em; }

.formio-codereader-video-container {
position: fixed;
display: flex;
left: 0;
top: 0;
height: 100vh;
width: 100vw;
z-index: 3000;
background: #000; }
.formio-codereader-video-container .formio-codereader-video-close {
position: absolute;
left: 30px;
top: 15px;
color: #fff;
cursor: pointer; }
.formio-codereader-video-container .formio-codereader-video-switch {
position: absolute;
right: 30px;
top: 15px;
color: #fff;
cursor: pointer; }
.formio-codereader-video-container .formio-codereader-video-source {
height: 100vh;
width: 100vw; }
.formio-codereader-video-container .formio-codereader-unsupport {
color: #fff;
position: absolute;
top: 150px;
font-size: 2rem;
width: 100%;
text-align: center; }
30 changes: 30 additions & 0 deletions lib/premium.min.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions lib/versions.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
formiojs@4.14.3/dist/formio.full.min.js
formiojs@4.14.3/dist/formio.full.js
__data/assets/js_file/0020/132932/premium.min.js
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -29,7 +29,8 @@
"lint": "eslint --fix --ext .js,.md,.mdx,.json .",
"build": "webpack",
"test": "jest",
"validate": "npm run lint && npm run test"
"validate": "npm run lint && npm run test",
"build-all": "npm run build && npm run build-storybook"
},
"devDependencies": {
"@babel/core": "^7.17.5",
91 changes: 91 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>


<groupId>au.gov.qld.ssq</groupId>
<version>1.0.0-SNAPSHOT</version>
<artifactId>formio-qld</artifactId>
<packaging>pom</packaging>

<properties>
<frontend-maven-plugin.version>1.12.1</frontend-maven-plugin.version>
<node.version>v16.13.1</node.version>
<npm.version>8.1.2</npm.version>
</properties>

<build>
<plugins>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>${frontend-maven-plugin.version}</version>
<executions>
<execution>
<id>install node and npm</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<configuration>
<nodeVersion>${node.version}</nodeVersion>
<npmVersion>${npm.version}</npmVersion>
</configuration>
</execution>
<execution>
<id>npm install</id>
<goals>
<goal>npm</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<arguments>install</arguments>
</configuration>
</execution>
<execution>
<id>npm lint</id>
<goals>
<goal>npm</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<arguments>run lint</arguments>
</configuration>
</execution>
<execution>
<id>npm test</id>
<goals>
<goal>npm</goal>
</goals>
<phase>test</phase>
<configuration>
<arguments>run test</arguments>
</configuration>
</execution>

<!-- <execution>-->
<!-- <id>npm integration</id>-->
<!-- <goals>-->
<!-- <goal>npm</goal>-->
<!-- </goals>-->
<!-- <phase>integration-test</phase>-->
<!-- <configuration>-->
<!-- <arguments>run test:e2e</arguments>-->
<!-- </configuration>-->
<!-- </execution>-->
<execution>
<id>npm package</id>
<goals>
<goal>npm</goal>
</goals>
<phase>package</phase>
<configuration>
<arguments>run build-all</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
4 changes: 4 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const path = require("path");
const ESLintPlugin = require("eslint-webpack-plugin");
const CopyPlugin = require("copy-webpack-plugin");

module.exports = {
entry: path.resolve(__dirname, "src/index.js"),
@@ -29,6 +30,9 @@ module.exports = {
},
plugins: [
new ESLintPlugin(),
new CopyPlugin({
patterns: [{ from: "lib", info: { minimized: true } }],
}),
// new CopyPlugin({
// patterns: [{ from: "src/assets" }],
// }),

0 comments on commit 00360ce

Please sign in to comment.