Coleman Watts [Fri, 22 Nov 2019 17:49:17 +0000 (12:49 -0500)]
Display improvements
Coleman Watts [Thu, 21 Nov 2019 22:11:37 +0000 (17:11 -0500)]
GUI: Improve adding/removing entities in correct order
Coleman Watts [Tue, 19 Nov 2019 21:22:02 +0000 (16:22 -0500)]
GUI: use strict
Coleman Watts [Tue, 19 Nov 2019 21:05:12 +0000 (16:05 -0500)]
GUI: Fix entity values selector
Coleman Watts [Tue, 19 Nov 2019 14:50:09 +0000 (09:50 -0500)]
GUI: Better widget for editing input type select
Coleman Watts [Tue, 19 Nov 2019 13:42:51 +0000 (08:42 -0500)]
GUI Add controls for text color, block border & block background color
Coleman Watts [Mon, 18 Nov 2019 13:22:37 +0000 (08:22 -0500)]
GUI: Cleanup menus
Coleman Watts [Sun, 17 Nov 2019 15:19:12 +0000 (10:19 -0500)]
GUI Validate drag-n-drop actions
Prevent fields from being moved outside their entity fieldset(s)
Prevent fieldsets from being dragged into other fieldsets
Coleman Watts [Sun, 17 Nov 2019 15:17:48 +0000 (10:17 -0500)]
GUI Fix number field style
Coleman Watts [Thu, 14 Nov 2019 19:07:37 +0000 (14:07 -0500)]
Edit option lists
Coleman Watts [Tue, 12 Nov 2019 21:58:55 +0000 (16:58 -0500)]
GUI: Config fields
Coleman Watts [Wed, 13 Nov 2019 15:28:00 +0000 (10:28 -0500)]
Perform deep merge on fieldDefn.input_attrs
Coleman Watts [Tue, 12 Nov 2019 12:30:54 +0000 (07:30 -0500)]
Core: Set breadcrumb as well as title
Coleman Watts [Tue, 12 Nov 2019 03:20:12 +0000 (22:20 -0500)]
GUI: Entity config
Coleman Watts [Sat, 9 Nov 2019 14:07:14 +0000 (09:07 -0500)]
GUI: Entity tab style improvements
Coleman Watts [Fri, 8 Nov 2019 18:04:21 +0000 (13:04 -0500)]
GUI: Add/remove block buttons
Coleman Watts [Fri, 8 Nov 2019 15:03:28 +0000 (10:03 -0500)]
GUI: Refactor entity panel to directive & add field search
Coleman Watts [Thu, 7 Nov 2019 16:41:08 +0000 (11:41 -0500)]
GUI configure form buttons
Coleman Watts [Thu, 7 Nov 2019 00:07:20 +0000 (19:07 -0500)]
Don't write field defn unless changed
Coleman Watts [Wed, 6 Nov 2019 13:31:11 +0000 (08:31 -0500)]
GUI: Bare bones field style
Coleman Watts [Wed, 6 Nov 2019 13:29:09 +0000 (08:29 -0500)]
GUI: Add block button
Coleman Watts [Wed, 6 Nov 2019 12:25:35 +0000 (07:25 -0500)]
Improve admin bar style
Coleman Watts [Wed, 6 Nov 2019 02:35:02 +0000 (21:35 -0500)]
Save button for gui + api
Coleman Watts [Mon, 4 Nov 2019 21:47:44 +0000 (16:47 -0500)]
Clarify docblock
Coleman Watts [Mon, 4 Nov 2019 14:40:20 +0000 (09:40 -0500)]
Configure layout style of blocks
Coleman Watts [Mon, 4 Nov 2019 13:02:23 +0000 (08:02 -0500)]
Dynamic option lists for select elements
This should respond better to changes in the model.
Coleman Watts [Sun, 3 Nov 2019 00:14:47 +0000 (20:14 -0400)]
Add forms, add/remove entities
Coleman Watts [Sat, 2 Nov 2019 00:57:27 +0000 (20:57 -0400)]
Fixes #4 - html encode injected properties and enable test
Coleman Watts [Fri, 1 Nov 2019 19:15:59 +0000 (15:15 -0400)]
Fields drag n drop
Coleman Watts [Thu, 31 Oct 2019 00:08:47 +0000 (20:08 -0400)]
WIP canvas
Coleman Watts [Wed, 30 Oct 2019 22:18:31 +0000 (18:18 -0400)]
Remove convertTextNodes
The api now returns them as an array so we don't need to worry about this on the client side.
Coleman Watts [Tue, 29 Oct 2019 21:30:23 +0000 (17:30 -0400)]
WIP fields
Coleman Watts [Mon, 28 Oct 2019 01:52:14 +0000 (21:52 -0400)]
Config forms - values section
Coleman Watts [Fri, 25 Oct 2019 16:01:48 +0000 (12:01 -0400)]
Horizontal tabs
Coleman Watts [Fri, 25 Oct 2019 14:32:24 +0000 (10:32 -0400)]
Add some metadata
Coleman Watts [Thu, 24 Oct 2019 17:05:19 +0000 (13:05 -0400)]
WIP beginning work on GUI
Tim Otten [Fri, 1 Nov 2019 20:27:46 +0000 (13:27 -0700)]
(REF) AHQ::makeRoot() - Extract helper from FormDataModel
Tim Otten [Fri, 1 Nov 2019 20:14:33 +0000 (13:14 -0700)]
FilterTest - Add basic unit test for the 'defn="..."` injection
Tim Otten [Fri, 1 Nov 2019 19:45:15 +0000 (12:45 -0700)]
(REF) _afform_html_filter() - Extract method for unit-testing
Tim Otten [Fri, 1 Nov 2019 19:41:35 +0000 (12:41 -0700)]
(NFC) Small cleanup
Tim Otten [Fri, 1 Nov 2019 19:40:56 +0000 (12:40 -0700)]
(REF) AfformScanner::getLayout() - Extract new method
Coleman Watts [Fri, 1 Nov 2019 13:57:25 +0000 (09:57 -0400)]
Fix parser to work with nested fields
Fields should be allowed to be inside other tags as long as they're
contained in an af-fieldset.
Tim Otten [Fri, 1 Nov 2019 05:20:26 +0000 (22:20 -0700)]
Add bin/test-all.sh
Tim Otten [Fri, 1 Nov 2019 04:53:44 +0000 (21:53 -0700)]
Fix warnings for `#text` format
Tim Otten [Fri, 1 Nov 2019 04:53:24 +0000 (21:53 -0700)]
af-fieldset - More updates for switching E=>A
Coleman Watts [Thu, 31 Oct 2019 00:33:26 +0000 (20:33 -0400)]
Restrict af-fieldset directive to A not E
The af-fieldset directive was ambiguiously set to restrict: "AE"
but only "E" was supported. I want to pick one and stick with it, and
I prefer "A" because the fieldset is also a container, so div or fieldset
seem like the appropriate tag names.
Coleman Watts [Wed, 30 Oct 2019 20:53:19 +0000 (16:53 -0400)]
ArrayHtml - Change text node format from string to array
Everything in the arrayHtml is associative exept text nodes were just strings.
That made it difficult to loop through the whole thing in javascript, so
this updates the format to be consistent with everything else.
Tim Otten [Tue, 29 Oct 2019 23:11:10 +0000 (16:11 -0700)]
ArrayHtml - Treat `<af-entity/>` and `<af-field/>` as self-closing tags
Tim Otten [Tue, 29 Oct 2019 23:07:12 +0000 (16:07 -0700)]
ArrayHtml - Encode self-closing HTML tags (`<img />`, `<br />`) normally
Tim Otten [Tue, 29 Oct 2019 22:31:06 +0000 (15:31 -0700)]
ArrayHtml - Support comments
Before
------
HTML comments appear in the array as NULL values
After
-----
HTML comments appear in the array as `['#comment' => '...']`
Technical Notes
---------------
* Considered using `['#tag' => 'comment', '#children' => '...'], but this is ambiguous when you
have a node/tag named '<comment>'
* Considered using `['#tag' => 'comment', '#children' => '...'], but it's needlessly difficult to
extract the comment text from under `'#children'`.
Coleman Watts [Mon, 28 Oct 2019 17:38:22 +0000 (13:38 -0400)]
Fix forms autofill with new dataModel
The formDataModel is now an object rather than an array.
This also changes the array key to match what's used in testAfform.aff.html:
url-autofill instead of af-url-autofill
Tim Otten [Sat, 26 Oct 2019 00:14:30 +0000 (17:14 -0700)]
(BC Break) Change shallow+deep formats to begin with an array of elements
Before: In the shallow+deep representations of `layout`, the root array
has a `#tag` and `#children`.
After: The root array is just list a list of children.
Comment: This is a more accufrate representation of how HTML partials are
often written.
Tim Otten [Sat, 26 Oct 2019 01:51:07 +0000 (18:51 -0700)]
FormDataModel::parseFields() - Rename param for clarity
This function uses a recursive algorithm to scan subtrees. Each call to the
algorithm is a particular HTML element.
Tim Otten [Sat, 26 Oct 2019 01:31:22 +0000 (18:31 -0700)]
FormDataModel - Define behavior for more edgy HTML documents
Tim Otten [Sat, 26 Oct 2019 01:21:40 +0000 (18:21 -0700)]
Split "Utils" into "AHQ" and "FormDataModel"
Tim Otten [Sat, 26 Oct 2019 00:45:40 +0000 (17:45 -0700)]
(NFC) Civi/Afform/Symbols.php - Docblock
Tim Otten [Sat, 26 Oct 2019 00:40:08 +0000 (17:40 -0700)]
Civi/Afform/Utils - Small cleanups
Tim Otten [Thu, 24 Oct 2019 20:15:03 +0000 (13:15 -0700)]
Unit tests - Fix test-run on 5.19.beta
The conditional incorrectly tries to activate `api4` when running on 5.19.beta.
Coleman Watts [Thu, 24 Oct 2019 12:15:27 +0000 (08:15 -0400)]
Use helper for checking items to get by name
Tim Otten [Thu, 24 Oct 2019 00:35:24 +0000 (17:35 -0700)]
afform/mock - Update extension boilerplate
Tim Otten [Thu, 24 Oct 2019 00:35:18 +0000 (17:35 -0700)]
afform/gui - Update extension boilerplate
Tim Otten [Thu, 24 Oct 2019 00:35:12 +0000 (17:35 -0700)]
afform/html - Update extension boilerplate
Tim Otten [Thu, 24 Oct 2019 00:34:54 +0000 (17:34 -0700)]
afform/core - Update extension boilerplate
Coleman Watts [Wed, 23 Oct 2019 13:47:04 +0000 (09:47 -0400)]
Delete unused files
Tim Otten [Sat, 19 Oct 2019 03:49:28 +0000 (20:49 -0700)]
afform_html - Fix typo in module name ("afMoncao"/"afMonaco")
Tim Otten [Sat, 19 Oct 2019 03:46:17 +0000 (20:46 -0700)]
'exports' - Specify symbols in notation more like Angular directives ("A", "AE", etc)
Tim Otten [Sat, 19 Oct 2019 03:16:14 +0000 (20:16 -0700)]
afform_mock - Add test-coverage for auto-requires functionality
Tim Otten [Fri, 18 Oct 2019 23:09:07 +0000 (16:09 -0700)]
afform_mock - Simplify; use auto-requires
Tim Otten [Fri, 18 Oct 2019 22:58:24 +0000 (15:58 -0700)]
afform_html - Simplify; use auto-requires
Tim Otten [Fri, 18 Oct 2019 23:05:36 +0000 (16:05 -0700)]
afform_core: Declare exports for 'af-form', 'af-field', etc
Tim Otten [Sat, 19 Oct 2019 01:30:14 +0000 (18:30 -0700)]
Civi\Afform\Symbols - Add unit test. Define behavior for Angular exprs.
Tim Otten [Fri, 18 Oct 2019 22:05:22 +0000 (15:05 -0700)]
Automatically detect requirements in *.aff.html
PART A: EXPORT LIST
Suppose you create a form `downstreamForm.aff.html`.
The metadata for `downstreamForm` will indicate that it exports an element `<downstream-form/>`:
```php
$angularModules['downstreamForm']['exports']['el'] = ['downstream-form'];
```
PART B: AUTO-REQUIRES
Suppose that:
1. he form `downstreamForm.aff.html` uses element `<upstream-el/>`.
2. The `$angularModules['upsteamMod']['exports']['el']` defines an exported element `upstream-el`.
Then the `downstreamForm` module will automatically requires the `upstreamMod`, as in
```php
$angularModules['downstreamForm']['requires'][] = 'upstreamMod';
```
Tim Otten [Tue, 15 Oct 2019 14:35:23 +0000 (07:35 -0700)]
afform_mock - Tweak example names/text
Tim Otten [Sat, 19 Oct 2019 02:29:44 +0000 (19:29 -0700)]
Unit tests - Update for api4 in core
Tim Otten [Tue, 15 Oct 2019 14:02:27 +0000 (07:02 -0700)]
testAfform.aff.html - Tweak example
Tim Otten [Tue, 15 Oct 2019 14:02:05 +0000 (07:02 -0700)]
afHtmlList - Tweak layout
eileen [Sat, 5 Oct 2019 09:11:54 +0000 (11:11 +0200)]
Do not fatal on missing extensions
Currently a missing extension will lead to a complete fatal on afforms. We can ignore these in the
extensions, missing extensions are otherwise notified in corre
Tim Otten [Sat, 14 Sep 2019 02:09:21 +0000 (22:09 -0400)]
Rename `<af-model>` to `<af-entity>` to better match API terminology
Tim Otten [Sat, 14 Sep 2019 02:02:27 +0000 (22:02 -0400)]
<af-form> - By default, show an indicator of submission status
Tim Otten [Sat, 14 Sep 2019 01:59:06 +0000 (21:59 -0400)]
Afform.submit - Use an event to allow the mix of prioritized special-case save methods
Tim Otten [Sat, 14 Sep 2019 00:57:39 +0000 (20:57 -0400)]
af/Form.js - Get the form name implicitly (without a global)
Tim Otten [Sat, 14 Sep 2019 00:43:49 +0000 (20:43 -0400)]
afex.aff.html - Slightly more contemporary markup
Tim Otten [Sat, 14 Sep 2019 00:36:21 +0000 (20:36 -0400)]
af/Form.js - Use the canonical name for API calls
Tim Otten [Sat, 14 Sep 2019 00:23:16 +0000 (20:23 -0400)]
Fix login error due to stale constant in afform_html_civicrm_check()
Coleman Watts [Sat, 14 Sep 2019 00:03:35 +0000 (20:03 -0400)]
Add mock testAfform
Tim Otten [Fri, 13 Sep 2019 17:14:54 +0000 (13:14 -0400)]
(CRM_Afform_ArrayHtml) Fix errant reference
Tim Otten [Fri, 13 Sep 2019 17:13:44 +0000 (13:13 -0400)]
Rename `[af-name]` to `af-model[name]` and `af-fieldset[model]`
Tim Otten [Fri, 13 Sep 2019 16:55:26 +0000 (12:55 -0400)]
(af-field) Rename "field-name" to "name"
Tim Otten [Fri, 13 Sep 2019 16:43:09 +0000 (12:43 -0400)]
(af-field) Rename "field-defn" to "defn"
Tim Otten [Fri, 13 Sep 2019 16:40:30 +0000 (12:40 -0400)]
Rename speculative attributes af-api4-params and af-contact-relationship
Tim Otten [Fri, 13 Sep 2019 16:38:38 +0000 (12:38 -0400)]
(af-model) Rename "af-data" to "data"
Tim Otten [Fri, 13 Sep 2019 16:36:06 +0000 (12:36 -0400)]
(af-model) Rename "af-autofill" to "autofill"
Tim Otten [Fri, 13 Sep 2019 16:35:01 +0000 (12:35 -0400)]
(af-model) Rename af-label to label
Tim Otten [Fri, 13 Sep 2019 16:33:31 +0000 (12:33 -0400)]
(docs) Finish renaming "af-type" to "type"
Tim Otten [Fri, 13 Sep 2019 16:27:00 +0000 (12:27 -0400)]
Rename `<af-will-be-model>` to its real name, `<af-model>`
Tim Otten [Fri, 13 Sep 2019 16:21:26 +0000 (12:21 -0400)]
Rename <af-model> to <af-fieldset>
Tim Otten [Fri, 13 Sep 2019 16:18:01 +0000 (12:18 -0400)]
Temporarily rename <af-model-prop> to <af-will-be-model> (so we can rename existing <af-model> easily)
Tim Otten [Fri, 13 Sep 2019 16:14:21 +0000 (12:14 -0400)]
Rename `<af-model-list>` to `<af-form>`
Tim Otten [Fri, 13 Sep 2019 02:07:56 +0000 (22:07 -0400)]
Rename af-type to type
Coleman Watts [Thu, 12 Sep 2019 01:02:59 +0000 (21:02 -0400)]
WIP Submit api