Skip to content

Commit

Permalink
NEW LinkFieldController to handle FormSchema
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Oct 31, 2023
1 parent f0a3b25 commit 36a75bf
Show file tree
Hide file tree
Showing 40 changed files with 1,389 additions and 930 deletions.
1 change: 0 additions & 1 deletion _config.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@

// Avoid creating global variables
call_user_func(function () {

});
19 changes: 1 addition & 18 deletions _config/config.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,6 @@
---
Name: linkfield
---

SilverStripe\Admin\LeftAndMain:
extensions:
- SilverStripe\LinkField\Extensions\LeftAndMain

SilverStripe\Admin\ModalController:
extensions:
- SilverStripe\LinkField\Extensions\ModalController

SilverStripe\Forms\TreeDropdownField:
extensions:
- SilverStripe\LinkField\Extensions\AjaxField

SilverStripe\CMS\Forms\AnchorSelectorField:
extensions:
- SilverStripe\LinkField\Extensions\AjaxField

SilverStripe\LinkField\Form\FormFactory:
extensions:
- SilverStripe\LinkField\Extensions\FormFactoryExtension
- SilverStripe\LinkField\Extensions\LeftAndMainExtension
1 change: 0 additions & 1 deletion _config/types.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
Name: linkfield-types
---

SilverStripe\LinkField\Type\Registry:
types:
cms:
Expand Down
3 changes: 0 additions & 3 deletions _graphql/queries.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
'readLinkDescription(dataStr: String!)':
type: LinkDescription
resolver: ['SilverStripe\LinkField\GraphQL\LinkDescriptionResolver', 'resolve']
'readLinkTypes(keys: [ID])':
type: '[LinkType]'
resolver: ['SilverStripe\LinkField\GraphQL\LinkTypeResolver', 'resolve']
6 changes: 0 additions & 6 deletions _graphql/types.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
LinkDescription:
description: Given some Link data, computes the matching description
fields:
description: String

LinkType:
description: Describe a Type of Link that can be managed by a LinkField
fields:
key: ID
handlerName: String!
title: String!
787 changes: 786 additions & 1 deletion client/dist/js/bundle.js

Large diffs are not rendered by default.

69 changes: 68 additions & 1 deletion client/dist/styles/bundle.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions client/src/boot/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/* global document */
/* eslint-disable */
import Config from 'lib/Config';
import registerReducers from './registerReducers';
import registerComponents from './registerComponents';
import registerQueries from './registerQueries';

Expand All @@ -10,5 +8,4 @@ document.addEventListener('DOMContentLoaded', () => {

registerQueries();

registerReducers();
});
3 changes: 0 additions & 3 deletions client/src/boot/registerComponents.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,12 @@ import Injector from 'lib/Injector';
import LinkPicker from 'components/LinkPicker/LinkPicker';
import LinkField from 'components/LinkField/LinkField';
import LinkModal from 'components/LinkModal/LinkModal';
import FileLinkModal from 'components/LinkModal/FileLinkModal';


const registerComponents = () => {
Injector.component.registerMany({
LinkPicker,
LinkField,
'LinkModal.FormBuilderModal': LinkModal,
'LinkModal.InsertMediaModal': FileLinkModal
});
};

Expand Down
2 changes: 0 additions & 2 deletions client/src/boot/registerQueries.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/* eslint-disable */
import Injector from 'lib/Injector';
import readLinkTypes from 'state/linkTypes/readLinkTypes';
import readLinkDescription from 'state/linkDescription/readLinkDescription';

const registerQueries = () => {
Injector.query.register('readLinkTypes', readLinkTypes);
Injector.query.register('readLinkDescription', readLinkDescription);
};
export default registerQueries;
26 changes: 0 additions & 26 deletions client/src/boot/registerReducers.js

This file was deleted.

Loading

0 comments on commit 36a75bf

Please sign in to comment.