Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
4a85ff1
chore(deps): update safe dependencies
ryanaidilp Dec 30, 2025
f9f02b9
feat(api): add new createFormGear API with TypeScript enums
ryanaidilp Dec 30, 2025
4139cab
feat(stores): add store factory and context for isolation
ryanaidilp Dec 30, 2025
014a667
feat(bridge): add native bridge abstraction for Android/iOS/Flutter
ryanaidilp Dec 30, 2025
9a81b32
feat(utils): add utility modules for expression evaluation and format…
ryanaidilp Dec 30, 2025
7ba4c4b
build: optimize library build for mobile WebView compatibility
ryanaidilp Dec 30, 2025
a6403d7
refactor: replace all eval() calls with safe expression evaluators
ryanaidilp Dec 30, 2025
fc9a09a
feat(stores): integrate StoreProvider into FormGear renders
ryanaidilp Dec 30, 2025
9619d92
refactor(stores): migrate 10 leaf components to context hooks
ryanaidilp Dec 30, 2025
bfd8d94
refactor(stores): migrate PhotoInput to context hooks
ryanaidilp Dec 30, 2025
9f789d8
refactor(stores): migrate FormInput to context hooks
ryanaidilp Dec 30, 2025
7b30e36
refactor(stores): migrate Form component to context hooks
ryanaidilp Dec 30, 2025
49f39ee
refactor(types): enable incremental TypeScript strictness
ryanaidilp Dec 30, 2025
b791f2e
feat(v2): finalize FormGear 2.0 release
ryanaidilp Dec 31, 2025
0d67a4a
fix: initialize component maps for enable cascade
ryanaidilp Dec 31, 2025
f1c7d86
fix(nested): resolve variable dependencies in nested components
ryanaidilp Dec 31, 2025
007b167
fix(components): add optional chaining for validationMessage
ryanaidilp Dec 31, 2025
92c1ae8
chore: misc cleanup and config updates
ryanaidilp Dec 31, 2025
e9cc0f8
docs: add template builder and migration guide sections
ryanaidilp Dec 31, 2025
20e1831
refactor: read gearVersion from package.json at build time
ryanaidilp Dec 31, 2025
2e01d00
refactor: remove legacy FormGear constructor
ryanaidilp Dec 31, 2025
54fac83
fix(ui): improve spacing for form input components
ryanaidilp Jan 1, 2026
05c34dc
fix(ui): prevent remark button overlapping on mobile
ryanaidilp Jan 1, 2026
ddb232f
fix(ui): display template and validation versions in sidebar
ryanaidilp Jan 1, 2026
3e58129
chore: clean up gitignore after history rewrite
ryanaidilp Jan 1, 2026
34ba4c4
fix(nested): correct index hierarchy for second-level nested sidebar
ryanaidilp Jan 1, 2026
1d7b26f
fix(ui): improve modal dialogs and input layouts
ryanaidilp Jan 1, 2026
34d655e
feat(bridge): add Flutter adapter for MobileHandlers integration
ryanaidilp Jan 1, 2026
f4db0c6
chore(deps): update example dependencies for Tailwind v4
ryanaidilp Jan 1, 2026
5913cdd
fix(ui): resolve sidebar z-index and Montserrat font issues
ryanaidilp Jan 2, 2026
5af2755
refactor(logging): replace console.log with dev-only logger utility
ryanaidilp Jan 2, 2026
c861baf
test: add comprehensive test suite for FormGear v2
ryanaidilp Jan 2, 2026
fca21da
chore: add test infrastructure and CI workflow
ryanaidilp Jan 2, 2026
8c23b83
fix(types): resolve all TypeScript type check errors
ryanaidilp Jan 2, 2026
0d20677
fix(imports): add explicit index paths for bundler module resolution
ryanaidilp Jan 2, 2026
7c470cb
fix(ci): update Node version to 22 and use direct file imports
ryanaidilp Jan 2, 2026
53275ee
fix(fonts): inline Montserrat fonts in CSS bundle
ryanaidilp Jan 2, 2026
07585e4
fix(ui): improve mobile sidebar and Tailwind safelist for dynamic HTML
ryanaidilp Jan 2, 2026
5800aa6
fix(types): use named imports for PAPI components
ryanaidilp Jan 2, 2026
c8e9757
fix(types): import PAPI components directly instead of from index
ryanaidilp Jan 2, 2026
f769273
test(InnerHTML): update tests for Shadow DOM wrapper div
ryanaidilp Jan 2, 2026
0f33146
ci: drop Node 18, skip duplicate feature/* pushes
ryanaidilp Jan 2, 2026
c4136ce
feat(ui): add modal animations and use Google Fonts CDN
ryanaidilp Jan 2, 2026
686bd9d
refactor(form): extract components and improve architecture
ryanaidilp Jan 3, 2026
9fabfa7
fix(ui): improve modal pagination design
ryanaidilp Jan 3, 2026
b032b0e
fix(ui): simplify save, warning toast position, border color
ryanaidilp Jan 3, 2026
db9a1ae
Merge pull request #1 from ryanaidilp/feature/v2-rewrite
ryanaidilp Jan 29, 2026
d23134d
feat(nav): integrate browser history API for section navigation
ryanaidilp Feb 20, 2026
380fc77
Merge pull request #2 from ryanaidilp/feature/browser-history-navigation
ryanaidilp Feb 21, 2026
6114c0f
feat(ui): add ActionButton and RemarkButton shared primitives
ryanaidilp Feb 21, 2026
6f3039c
feat(ui): add DateCalendar component with year/month/day views
ryanaidilp Feb 21, 2026
64662ed
feat(types): register audio, video, barcode and file input types
ryanaidilp Feb 21, 2026
7a99503
feat(components): add AudioInput component
ryanaidilp Feb 21, 2026
508ccb9
feat(components): add VideoInput component
ryanaidilp Feb 21, 2026
70bacf9
feat(components): add BarcodeInput component
ryanaidilp Feb 21, 2026
34cc2eb
feat(components): add FileInput component
ryanaidilp Feb 21, 2026
73fc458
refactor(components): replace inline remark buttons with RemarkButton
ryanaidilp Feb 21, 2026
b6bfc3a
refactor(components): replace inline action and remark buttons with A…
ryanaidilp Feb 21, 2026
a9a36a4
chore(example): update example data
ryanaidilp Feb 21, 2026
692730a
Merge pull request #3 from ryanaidilp/feature/shared-ui-components
ryanaidilp Feb 21, 2026
c0a4a41
docs(readme): add new input types to control type table
ryanaidilp Feb 21, 2026
6c934cb
Merge pull request #4 from ryanaidilp/feature/shared-ui-components
ryanaidilp Feb 21, 2026
e7a1c26
chore(deps): upgrade dependencies to latest
ryanaidilp Feb 22, 2026
9192bd2
Merge pull request #5 from ryanaidilp/feature/upgrade-dependencies
ryanaidilp Feb 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
186 changes: 186 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
name: CI

on:
push:
branches: [main, develop, 'release/**', 'hotfix/**']
pull_request:
branches: [main, develop]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
lint-and-typecheck:
name: Lint & Type Check
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Type check
run: npm run type-check

test:
name: Test
runs-on: ubuntu-latest
needs: lint-and-typecheck

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Run tests with coverage
run: npm run test:coverage

- name: Extract coverage data
id: coverage
run: |
if [ -f coverage/coverage-summary.json ]; then
LINES=$(jq -r '.total.lines.pct' coverage/coverage-summary.json)
BRANCHES=$(jq -r '.total.branches.pct' coverage/coverage-summary.json)
FUNCTIONS=$(jq -r '.total.functions.pct' coverage/coverage-summary.json)
STATEMENTS=$(jq -r '.total.statements.pct' coverage/coverage-summary.json)
else
LINES="N/A"
BRANCHES="N/A"
FUNCTIONS="N/A"
STATEMENTS="N/A"
fi

echo "lines=$LINES" >> $GITHUB_OUTPUT
echo "branches=$BRANCHES" >> $GITHUB_OUTPUT
echo "functions=$FUNCTIONS" >> $GITHUB_OUTPUT
echo "statements=$STATEMENTS" >> $GITHUB_OUTPUT

- name: Post coverage comment on PR
if: github.event_name == 'pull_request'
uses: actions/github-script@v7
with:
script: |
const lines = '${{ steps.coverage.outputs.lines }}';
const branches = '${{ steps.coverage.outputs.branches }}';
const functions = '${{ steps.coverage.outputs.functions }}';
const statements = '${{ steps.coverage.outputs.statements }}';

const getEmoji = (pct) => {
const num = parseFloat(pct);
if (isNaN(num)) return '❓';
if (num >= 80) return '✅';
if (num >= 60) return '🟡';
return '🔴';
};

const body = `## 📊 Test Coverage Report

| Metric | Coverage | Status |
|--------|----------|--------|
| Lines | ${lines}% | ${getEmoji(lines)} |
| Branches | ${branches}% | ${getEmoji(branches)} |
| Functions | ${functions}% | ${getEmoji(functions)} |
| Statements | ${statements}% | ${getEmoji(statements)} |

> Coverage thresholds: 🔴 < 60% | 🟡 60-79% | ✅ >= 80%
`;

// Find existing comment
const { data: comments } = await github.rest.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
});

const botComment = comments.find(comment =>
comment.user.type === 'Bot' &&
comment.body.includes('📊 Test Coverage Report')
);

if (botComment) {
await github.rest.issues.updateComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: botComment.id,
body: body,
});
} else {
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: body,
});
}

build:
name: Build
runs-on: ubuntu-latest
needs: test

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Build library
run: npm run build

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
retention-days: 7

test-matrix:
name: Test on Node ${{ matrix.node-version }}
runs-on: ubuntu-latest
needs: lint-and-typecheck

strategy:
matrix:
# Node 18 is not supported - Vite 7 and Vitest 4 require Node 20+
node-version: ['20', '22']
fail-fast: false

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Run tests
run: npm run test:run
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
node_modules
dist
coverage
client/capi/data
client/cawi/data
src/data/*
Expand Down
62 changes: 40 additions & 22 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,49 @@
# Changelog

## FormGear | Ver. 2.0.0 - FormGear is now running independently. 🎉
## FormGear | Ver. 2.0.0 - Major Architecture Refactoring

> September 02, 2022
> December 31, 2025

### Breaking Changes

- **New Factory API**: Use `createFormGear()` instead of direct `FormGear` component
- **Store Isolation**: Each form instance now has its own isolated store context
- **TypeScript Strict Mode**: Full TypeScript strict mode enabled with proper types

### Added

- `createFormGear()` factory function for creating isolated form instances
- `FormGearProvider` component for store context management
- Native bridge abstraction layer supporting Android, iOS, Flutter, and Web platforms
- TypeScript declaration files (`.d.ts`) included in package
- Modular event handlers (`Focus`, `KeyDown`) with proper exports
- Platform-specific bridge implementations with type-safe interfaces

### Changed

- Migrated from single global store to per-instance isolated stores
- Updated all dependencies to latest versions (Vite 7.3, TypeScript 5.9, SolidJS 1.9)
- Build target changed to ES2015 for better mobile WebView compatibility
- Utilities refactored into modular structure (`/utils` directory)
- SolidJS components now use proper `class` attribute instead of `className`
- Improved type safety across all components with strict TypeScript

### Removed

- Legacy global `FormGear` component export (use `createFormGear()` instead)
- Deprecated utility functions replaced with modern implementations

### Migration

See [MIGRATION.md](./MIGRATION.md) for detailed upgrade instructions.

---

## FormGear | Ver. 1.1.2 - Legacy Release

> September 02, 2022

- Reformat `sourceSelect` to `sourceAPI` for select option from API
```json
{
"label": "User",
"dataKey": "user_jsonplaceholder",
"typeOption": 2,
"type": 27,
"sourceAPI": [
{
"baseUrl": "https://jsonplaceholder.typicode.com/users",
"headers": {
"Content-Type": "application/json"
},
"data": "",
"value": "id",
"label": "name"
}
]
}
```
### Fixed
- Fix summary calculation filtration for undefined answer component


Expand Down
Loading