civicrm-core.git
3 years agoafform_html - Simplify; use auto-requires
Tim Otten [Fri, 18 Oct 2019 22:58:24 +0000 (15:58 -0700)]
afform_html - Simplify; use auto-requires

3 years agoafform_core: Declare exports for 'af-form', 'af-field', etc
Tim Otten [Fri, 18 Oct 2019 23:05:36 +0000 (16:05 -0700)]
afform_core: Declare exports for 'af-form', 'af-field', etc

3 years agoCivi\Afform\Symbols - Add unit test. Define behavior for Angular exprs.
Tim Otten [Sat, 19 Oct 2019 01:30:14 +0000 (18:30 -0700)]
Civi\Afform\Symbols - Add unit test. Define behavior for Angular exprs.

3 years agoAutomatically detect requirements in *.aff.html
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';
```

3 years agoafform_mock - Tweak example names/text
Tim Otten [Tue, 15 Oct 2019 14:35:23 +0000 (07:35 -0700)]
afform_mock - Tweak example names/text

3 years agoUnit tests - Update for api4 in core
Tim Otten [Sat, 19 Oct 2019 02:29:44 +0000 (19:29 -0700)]
Unit tests - Update for api4 in core

3 years agotestAfform.aff.html - Tweak example
Tim Otten [Tue, 15 Oct 2019 14:02:27 +0000 (07:02 -0700)]
testAfform.aff.html - Tweak example

3 years agoafHtmlList - Tweak layout
Tim Otten [Tue, 15 Oct 2019 14:02:05 +0000 (07:02 -0700)]
afHtmlList - Tweak layout

3 years agoDo not fatal on missing extensions
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

3 years agoRename `<af-model>` to `<af-entity>` to better match API terminology
Tim Otten [Sat, 14 Sep 2019 02:09:21 +0000 (22:09 -0400)]
Rename `<af-model>` to `<af-entity>` to better match API terminology

3 years ago<af-form> - By default, show an indicator of submission status
Tim Otten [Sat, 14 Sep 2019 02:02:27 +0000 (22:02 -0400)]
<af-form> - By default, show an indicator of submission status

3 years agoAfform.submit - Use an event to allow the mix of prioritized special-case save methods
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

3 years agoaf/Form.js - Get the form name implicitly (without a global)
Tim Otten [Sat, 14 Sep 2019 00:57:39 +0000 (20:57 -0400)]
af/Form.js - Get the form name implicitly (without a global)

3 years agoafex.aff.html - Slightly more contemporary markup
Tim Otten [Sat, 14 Sep 2019 00:43:49 +0000 (20:43 -0400)]
afex.aff.html - Slightly more contemporary markup

3 years agoaf/Form.js - Use the canonical name for API calls
Tim Otten [Sat, 14 Sep 2019 00:36:21 +0000 (20:36 -0400)]
af/Form.js - Use the canonical name for API calls

3 years agoFix login error due to stale constant in afform_html_civicrm_check()
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()

3 years agoAdd mock testAfform
Coleman Watts [Sat, 14 Sep 2019 00:03:35 +0000 (20:03 -0400)]
Add mock testAfform

3 years ago(CRM_Afform_ArrayHtml) Fix errant reference
Tim Otten [Fri, 13 Sep 2019 17:14:54 +0000 (13:14 -0400)]
(CRM_Afform_ArrayHtml) Fix errant reference

3 years agoRename `[af-name]` to `af-model[name]` and `af-fieldset[model]`
Tim Otten [Fri, 13 Sep 2019 17:13:44 +0000 (13:13 -0400)]
Rename `[af-name]` to `af-model[name]` and `af-fieldset[model]`

3 years ago(af-field) Rename "field-name" to "name"
Tim Otten [Fri, 13 Sep 2019 16:55:26 +0000 (12:55 -0400)]
(af-field) Rename "field-name" to "name"

3 years ago(af-field) Rename "field-defn" to "defn"
Tim Otten [Fri, 13 Sep 2019 16:43:09 +0000 (12:43 -0400)]
(af-field) Rename "field-defn" to "defn"

3 years agoRename speculative attributes af-api4-params and af-contact-relationship
Tim Otten [Fri, 13 Sep 2019 16:40:30 +0000 (12:40 -0400)]
Rename speculative attributes af-api4-params and af-contact-relationship

3 years ago(af-model) Rename "af-data" to "data"
Tim Otten [Fri, 13 Sep 2019 16:38:38 +0000 (12:38 -0400)]
(af-model) Rename "af-data" to "data"

3 years ago(af-model) Rename "af-autofill" to "autofill"
Tim Otten [Fri, 13 Sep 2019 16:36:06 +0000 (12:36 -0400)]
(af-model) Rename "af-autofill" to "autofill"

3 years ago(af-model) Rename af-label to label
Tim Otten [Fri, 13 Sep 2019 16:35:01 +0000 (12:35 -0400)]
(af-model) Rename af-label to label

3 years ago(docs) Finish renaming "af-type" to "type"
Tim Otten [Fri, 13 Sep 2019 16:33:31 +0000 (12:33 -0400)]
(docs) Finish renaming "af-type" to "type"

3 years agoRename `<af-will-be-model>` to its real name, `<af-model>`
Tim Otten [Fri, 13 Sep 2019 16:27:00 +0000 (12:27 -0400)]
Rename `<af-will-be-model>` to its real name, `<af-model>`

3 years agoRename <af-model> to <af-fieldset>
Tim Otten [Fri, 13 Sep 2019 16:21:26 +0000 (12:21 -0400)]
Rename <af-model> to <af-fieldset>

3 years agoTemporarily rename <af-model-prop> to <af-will-be-model> (so we can rename existing...
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)

3 years agoRename `<af-model-list>` to `<af-form>`
Tim Otten [Fri, 13 Sep 2019 16:14:21 +0000 (12:14 -0400)]
Rename `<af-model-list>` to `<af-form>`

3 years agoRename af-type to type
Tim Otten [Fri, 13 Sep 2019 02:07:56 +0000 (22:07 -0400)]
Rename af-type to type

3 years agoWIP Submit api
Coleman Watts [Thu, 12 Sep 2019 01:02:59 +0000 (21:02 -0400)]
WIP Submit api

3 years agoAdd afData property for predetermined data like contact_id
Coleman Watts [Tue, 27 Aug 2019 02:33:37 +0000 (22:33 -0400)]
Add afData property for predetermined data like contact_id

3 years agoMove modelProps to whitelist
Coleman Watts [Tue, 27 Aug 2019 02:10:45 +0000 (22:10 -0400)]
Move modelProps to whitelist

3 years agoAdd api for afform prefill
Coleman Watts [Sun, 25 Aug 2019 23:44:55 +0000 (19:44 -0400)]
Add api for afform prefill

3 years ago(NFC) Normalize trailing newlines
Tim Otten [Thu, 12 Sep 2019 23:36:40 +0000 (19:36 -0400)]
(NFC) Normalize trailing newlines

3 years agoaf-api4-action - Rename 'msg-' and 'on-' options
Tim Otten [Thu, 12 Sep 2019 23:07:59 +0000 (19:07 -0400)]
af-api4-action - Rename 'msg-' and 'on-' options

Here's the bash script...

```
for REGEX in \
        s/msg-start/af-api4-start-msg/g \
        s/msgStart/afApi4StartMsg/g \
        s/msg-error/af-api4-error-msg/g \
        s/msgError/afApi4ErrorMsg/g \
        s/msg-success/af-api4-success-msg/g \
        s/msgSuccess/afApi4SuccessMsg/g \
        s/on-success/af-api4-success/g \
        s/onSuccess/afApi4Success/g \
        s/on-error/af-api4-error/g \
        s/on-error/afApi4Error/g
do
  DIRS="core docs gui html mock auditor"
  echo "Processing regex [$REGEX] in [$DIRS]"
  find $DIRS -name '*.js' -o -name '*.html' -o -name '*.json' -o -name '*.md' \
    | grep -v /node_modules/ \
    | xargs -L1 sed -i.bak "$REGEX"
  find $DIRS -name '*.bak' -delete
done
```

3 years agoRename afformCore to afCore
Tim Otten [Thu, 12 Sep 2019 22:31:22 +0000 (18:31 -0400)]
Rename afformCore to afCore

3 years agodocs/embed.md - Use example prefix that doesn't conflict with built-ins
Tim Otten [Thu, 12 Sep 2019 22:26:19 +0000 (18:26 -0400)]
docs/embed.md - Use example prefix that doesn't conflict with built-ins

3 years agoRename `afformExamplepage` to `afExamplePage`
Tim Otten [Thu, 12 Sep 2019 22:21:03 +0000 (18:21 -0400)]
Rename `afformExamplepage` to `afExamplePage`

3 years agoRename afformApi3* to afApi3*
Tim Otten [Thu, 12 Sep 2019 22:13:07 +0000 (18:13 -0400)]
Rename afformApi3* to afApi3*

3 years agoinfo.xml - Align version numbers
Tim Otten [Thu, 12 Sep 2019 22:19:16 +0000 (18:19 -0400)]
info.xml - Align version numbers

3 years agoRename affApi4* to afApi4*
Tim Otten [Thu, 12 Sep 2019 22:10:36 +0000 (18:10 -0400)]
Rename affApi4* to afApi4*

3 years agoRename `afformHtml*` to `afHtml*`
Tim Otten [Thu, 12 Sep 2019 22:07:02 +0000 (18:07 -0400)]
Rename `afformHtml*` to `afHtml*`

3 years agoAdd docs/style.md
Tim Otten [Thu, 12 Sep 2019 21:57:16 +0000 (17:57 -0400)]
Add docs/style.md

3 years agolayoutFormat - Flip default from shallow to deep
Tim Otten [Wed, 11 Sep 2019 22:39:09 +0000 (18:39 -0400)]
layoutFormat - Flip default from shallow to deep

3 years agoAfformTest - Test two example documents thoroughly for consistent conversions
Tim Otten [Wed, 11 Sep 2019 22:27:38 +0000 (18:27 -0400)]
AfformTest - Test two example documents thoroughly for consistent conversions

3 years agoWIP ArrayHtml
Tim Otten [Wed, 11 Sep 2019 21:16:24 +0000 (17:16 -0400)]
WIP ArrayHtml

3 years agoWIP deep array format
Coleman Watts [Wed, 11 Sep 2019 20:32:28 +0000 (16:32 -0400)]
WIP deep array format

3 years agoLet's stop advertising 5.6 since we might break it at any moment
Eileen McNaughton [Wed, 28 Aug 2019 21:44:53 +0000 (09:44 +1200)]
Let's stop advertising 5.6 since we might break it at any moment

3 years agoAdd note as to what this does
Eileen McNaughton [Wed, 28 Aug 2019 21:43:40 +0000 (09:43 +1200)]
Add note as to what this does

Limited but  in the right direction

3 years agoinfo.xml - Normalize titles/descriptions
Tim Otten [Sat, 24 Aug 2019 02:55:23 +0000 (19:55 -0700)]
info.xml - Normalize titles/descriptions

3 years agoafformHtmlEditor - Expose 'title' property
Tim Otten [Sat, 24 Aug 2019 02:50:27 +0000 (19:50 -0700)]
afformHtmlEditor - Expose 'title' property

3 years agoRemove dependence on crmApp & add page title
Coleman Watts [Wed, 14 Aug 2019 03:59:51 +0000 (23:59 -0400)]
Remove dependence on crmApp & add page title

3 years agoSuppress warnings about nonstandard tag names
Coleman Watts [Tue, 13 Aug 2019 21:46:14 +0000 (17:46 -0400)]
Suppress warnings about nonstandard tag names

3 years agoCode cleanup
Coleman Watts [Tue, 13 Aug 2019 21:17:08 +0000 (17:17 -0400)]
Code cleanup

3 years agoSimplify variable assignment
Coleman Watts [Tue, 13 Aug 2019 21:10:29 +0000 (17:10 -0400)]
Simplify variable assignment

3 years agoafformHtmlEditor - Fix saving of server_route and description
Tim Otten [Wed, 7 Aug 2019 22:48:11 +0000 (15:48 -0700)]
afformHtmlEditor - Fix saving of server_route and description

3 years agoApi4Ctrl - Fix infinite reloads
Tim Otten [Wed, 7 Aug 2019 22:00:26 +0000 (15:00 -0700)]
Api4Ctrl - Fix infinite reloads

I noticed that the `afform-html` GUI is sending an infinite number requests to
reload its data.  After bisecting, I found that e7ebc633a had expanded the
scope the `watch()` so that it reloads on *any* change to `affApi4Ctrl` (not
just a change in params).  But the `affApi4Ctrl` includes the `.result` data
- as soon as the result data is returned, it re-triggers the watch and sends
the request again.  This becomes an infinite loop.

I don't think this was necessary for the goal of indexing - although maybe
the idea was that a change to `.index` should cause a reload, which seems
reasonable.  So I've whitelisted fields which deal with APIv4 inputs.

3 years agoafform_html - Remove unused page controller
Tim Otten [Wed, 7 Aug 2019 21:48:36 +0000 (14:48 -0700)]
afform_html - Remove unused page controller

Obsoleted by afform-based version of the page

3 years agoUpdate info.xml
Tim Otten [Wed, 24 Jul 2019 21:36:31 +0000 (14:36 -0700)]
Update info.xml

3 years agoAdd auditor/backlog.md
Tim Otten [Wed, 26 Jun 2019 22:04:00 +0000 (15:04 -0700)]
Add auditor/backlog.md

3 years agoLoad data from ids passed in url
Coleman Watts [Wed, 26 Jun 2019 01:42:29 +0000 (21:42 -0400)]
Load data from ids passed in url

3 years agoAdd field widgets
Coleman Watts [Wed, 26 Jun 2019 01:35:39 +0000 (21:35 -0400)]
Add field widgets

Add field widgets

3 years agoMerge existing field metadata
Coleman Watts [Wed, 26 Jun 2019 01:35:04 +0000 (21:35 -0400)]
Merge existing field metadata

3 years agoCivilint cleanup
Coleman Watts [Thu, 20 Jun 2019 21:11:35 +0000 (17:11 -0400)]
Civilint cleanup

3 years agoafform/core - When injecting APIv4 metadata, be more choosy
Tim Otten [Thu, 13 Jun 2019 17:06:22 +0000 (13:06 -0400)]
afform/core - When injecting APIv4 metadata, be more choosy

3 years agoafform/core - Inject APIv4 metadata on the `af-field` tags
Tim Otten [Thu, 13 Jun 2019 16:50:22 +0000 (12:50 -0400)]
afform/core - Inject APIv4 metadata on the `af-field` tags

3 years agoafform/core - Apply changesets to afform HTML
Tim Otten [Thu, 13 Jun 2019 16:49:59 +0000 (12:49 -0400)]
afform/core - Apply changesets to afform HTML

3 years agoafex.aff.html - Update example markup
Tim Otten [Thu, 13 Jun 2019 16:46:47 +0000 (12:46 -0400)]
afex.aff.html - Update example markup

3 years agoFix phpunit 6 support
eileen [Wed, 12 Jun 2019 10:37:11 +0000 (06:37 -0400)]
Fix phpunit 6 support

3 years agoAfform.update - If server_route changes, then clear menu/navigation system
Tim Otten [Tue, 11 Jun 2019 20:42:53 +0000 (16:42 -0400)]
Afform.update - If server_route changes, then clear menu/navigation system

3 years agoAdd basic table output on afform list page
Coleman Watts [Sun, 9 Jun 2019 13:10:11 +0000 (09:10 -0400)]
Add basic table output on afform list page

3 years agoAdd index to Api4Ctrl
Coleman Watts [Sun, 9 Jun 2019 13:10:06 +0000 (09:10 -0400)]
Add index to Api4Ctrl

3 years agoafform_html - Show more editable properaties
Tim Otten [Tue, 4 Jun 2019 01:37:00 +0000 (18:37 -0700)]
afform_html - Show more editable properaties

3 years agoafform_html - Declare dependency on afform core
Tim Otten [Tue, 4 Jun 2019 01:36:06 +0000 (18:36 -0700)]
afform_html - Declare dependency on afform core

3 years agoafformCore - Add crmUrl to default scopes for afforms
Tim Otten [Tue, 4 Jun 2019 01:35:48 +0000 (18:35 -0700)]
afformCore - Add crmUrl to default scopes for afforms

3 years agoafformHtmlEditor - Add "Save" button
Tim Otten [Sun, 5 May 2019 23:15:42 +0000 (16:15 -0700)]
afformHtmlEditor - Add "Save" button

3 years agoroadmap.md
Tim Otten [Sun, 5 May 2019 23:04:38 +0000 (16:04 -0700)]
roadmap.md

3 years agoafform_html - Split main screen into two smaller components
Tim Otten [Sun, 5 May 2019 22:54:24 +0000 (15:54 -0700)]
afform_html - Split main screen into two smaller components

* Before: `afformHtmlEditor` contains list and edit screens
* After: `afformHtmlEditor` contains just the edit screen
* After: `afforHtmlList` contains just the list screen
* After: `afforHtmlAdmin` delegates to `afforHtmlList` and `afformHtmlEditor`

3 years agoafMoncao - Better default sizing
Tim Otten [Sun, 5 May 2019 22:39:57 +0000 (15:39 -0700)]
afMoncao - Better default sizing

3 years agoafMoncao - While hovering on editor, 2-finger scroll should only affect editor
Tim Otten [Sun, 5 May 2019 22:26:50 +0000 (15:26 -0700)]
afMoncao - While hovering on editor, 2-finger scroll should only affect editor

3 years agoafformHtmlEditor - Show list-view if no `?name=` is set.
Tim Otten [Sun, 5 May 2019 07:07:26 +0000 (00:07 -0700)]
afformHtmlEditor - Show list-view if no `?name=` is set.

3 years agocore - Implement aff-api4-action directive
Tim Otten [Sun, 5 May 2019 07:05:07 +0000 (00:05 -0700)]
core - Implement aff-api4-action directive

This allows you to invoke APIv4 when a user clicks on a button or link.  It
is analogous to `ng-click`, except that the notation and messaging are
tweaked for APIv4.

3 years agoafMonaco - Use more conventional scrollbars
Tim Otten [Sun, 5 May 2019 04:31:14 +0000 (21:31 -0700)]
afMonaco - Use more conventional scrollbars

3 years agoafformCore - Expose crmApi4 and crmStatus in standard scopes
Tim Otten [Sun, 5 May 2019 04:30:40 +0000 (21:30 -0700)]
afformCore - Expose crmApi4 and crmStatus in standard scopes

3 years agoafform_html - Update monaco to 0.16.2
Tim Otten [Sun, 5 May 2019 04:30:06 +0000 (21:30 -0700)]
afform_html - Update monaco to 0.16.2

3 years agoafform_html - Skeletal page with Monaco (Angular-based; no saving)
Tim Otten [Sat, 4 May 2019 06:30:07 +0000 (23:30 -0700)]
afform_html - Skeletal page with Monaco (Angular-based; no saving)

Example URL: http://dmaster.bknix:8001/civicrm/admin/afform-html/#/?name=afformExamplepage

3 years agoafform_html - Add status-check for Monaco files
Tim Otten [Sat, 4 May 2019 04:51:51 +0000 (21:51 -0700)]
afform_html - Add status-check for Monaco files

3 years agoafform_html - Statically load Monaco editor
Tim Otten [Sat, 4 May 2019 04:51:17 +0000 (21:51 -0700)]
afform_html - Statically load Monaco editor

3 years agoafform_html - Add skeletal page civicrm/admin/afform/html
Tim Otten [Sat, 4 May 2019 03:59:04 +0000 (20:59 -0700)]
afform_html - Add skeletal page civicrm/admin/afform/html

3 years agoafform_html - Use package.json to download Monaco
Tim Otten [Sat, 4 May 2019 03:52:12 +0000 (20:52 -0700)]
afform_html - Use package.json to download Monaco

3 years agoImport afform_html skeleton
Tim Otten [Sat, 4 May 2019 03:48:45 +0000 (20:48 -0700)]
Import afform_html skeleton

3 years agoang/af*.ang.php - Remove elements that are unlikely to be used
Tim Otten [Fri, 3 May 2019 23:58:08 +0000 (16:58 -0700)]
ang/af*.ang.php - Remove elements that are unlikely to be used

3 years agoang/*.ang.php - Cleanup new files
Tim Otten [Fri, 3 May 2019 23:50:38 +0000 (16:50 -0700)]
ang/*.ang.php - Cleanup new files

3 years agoAdd example page `civicrm/afex` based on last note from planning-v0.3.md
Tim Otten [Fri, 3 May 2019 23:44:31 +0000 (16:44 -0700)]
Add example page `civicrm/afex` based on last note from planning-v0.3.md

3 years agoafModel*, afBlock*, afField - Add skeletal directives
Tim Otten [Fri, 3 May 2019 23:36:37 +0000 (16:36 -0700)]
afModel*, afBlock*, afField - Add skeletal directives

3 years agoAdd skeletal modules
Tim Otten [Fri, 3 May 2019 23:35:51 +0000 (16:35 -0700)]
Add skeletal modules

3 years agoArrayHtml - Mitigate crash on HTML comments
Tim Otten [Fri, 3 May 2019 23:44:17 +0000 (16:44 -0700)]
ArrayHtml - Mitigate crash on HTML comments

3 years agoAfform.{get,update} - Allow layout format to be array or string/HTML
Tim Otten [Sat, 4 May 2019 23:00:50 +0000 (16:00 -0700)]
Afform.{get,update} - Allow layout format to be array or string/HTML