@formio/js 5.1.0-dev.6151.5c28053 → 5.1.0-dev.6154.73887de

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2375,14 +2375,12 @@ class Component extends Element_1.default {
2375
2375
  ckeditor: {
2376
2376
  image: {
2377
2377
  toolbar: [
2378
- 'toggleImageCaption',
2379
2378
  'imageTextAlternative',
2380
2379
  '|',
2381
- 'imageStyle:inline',
2382
- 'imageStyle:wrapText',
2383
- 'imageStyle:breakText',
2384
- '|',
2385
- 'resizeImage'
2380
+ 'imageStyle:full',
2381
+ 'imageStyle:alignLeft',
2382
+ 'imageStyle:alignCenter',
2383
+ 'imageStyle:alignRight'
2386
2384
  ],
2387
2385
  styles: [
2388
2386
  'full',
@@ -2404,10 +2402,7 @@ class Component extends Element_1.default {
2404
2402
  if (this.component.isUploadEnabled) {
2405
2403
  settings.extraPlugins.push((0, uploadAdapter_1.getFormioUploadAdapterPlugin)(this.fileService, this));
2406
2404
  }
2407
- Formio_1.Formio.requireLibrary(`ckeditor-css`, isIEBrowser ? 'CKEDITOR' : 'ClassicEditor', [
2408
- { type: 'styles', src: `${Formio_1.Formio.cdn.ckeditor}/ckeditor.css` }
2409
- ], true);
2410
- return Formio_1.Formio.requireLibrary('ckeditor', isIEBrowser ? 'CKEDITOR' : 'ClassicEditor', lodash_1.default.get(this.options, 'editors.ckeditor.src', `${Formio_1.Formio.cdn.ckeditor}/ckeditor.umd.js`), true)
2405
+ return Formio_1.Formio.requireLibrary('ckeditor', isIEBrowser ? 'CKEDITOR' : 'ClassicEditor', lodash_1.default.get(this.options, 'editors.ckeditor.src', `${Formio_1.Formio.cdn.ckeditor}/ckeditor.js`), true)
2411
2406
  .then(() => {
2412
2407
  if (!element.parentNode) {
2413
2408
  return Promise.reject();
@@ -7,7 +7,7 @@ export default class ButtonComponent extends Field {
7
7
  weight: number;
8
8
  schema: any;
9
9
  };
10
- static savedValueTypes(schema: any): any;
10
+ static savedValueTypes(schema: any): string[];
11
11
  constructor(component: any, options: any, data: any);
12
12
  filesUploading: number;
13
13
  get inputInfo(): any;
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const lodash_1 = __importDefault(require("lodash"));
7
7
  const Field_1 = __importDefault(require("../_classes/field/Field"));
8
8
  const Input_1 = __importDefault(require("../_classes/input/Input"));
9
- const formUtils_1 = require("../../utils/formUtils");
9
+ const utils_1 = require("../../utils");
10
10
  class ButtonComponent extends Field_1.default {
11
11
  static schema(...extend) {
12
12
  return Input_1.default.schema({
@@ -35,7 +35,7 @@ class ButtonComponent extends Field_1.default {
35
35
  };
36
36
  }
37
37
  static savedValueTypes(schema) {
38
- return (0, formUtils_1.getComponentSavedTypes)(schema) || [formUtils_1.componentValueTypes.boolean];
38
+ return (0, utils_1.getComponentSavedTypes)(schema) || [utils_1.componentValueTypes.boolean];
39
39
  }
40
40
  constructor(component, options, data) {
41
41
  super(component, options, data);
@@ -306,7 +306,7 @@ class ButtonComponent extends Field_1.default {
306
306
  const form = this.getRoot();
307
307
  const flattened = {};
308
308
  const components = {};
309
- (0, formUtils_1.eachComponent)(form.components, (componentWrapper, path) => {
309
+ (0, utils_1.eachComponent)(form.components, (componentWrapper, path) => {
310
310
  const component = componentWrapper.component || componentWrapper;
311
311
  flattened[path] = component;
312
312
  components[component.key] = component;
@@ -447,7 +447,7 @@ class ButtonComponent extends Field_1.default {
447
447
  }, 100);
448
448
  }
449
449
  get oauthComponentPath() {
450
- const pathArray = (0, formUtils_1.getArrayFromComponentPath)(this.path);
450
+ const pathArray = (0, utils_1.getArrayFromComponentPath)(this.path);
451
451
  return lodash_1.default.chain(pathArray).filter(pathPart => !lodash_1.default.isNumber(pathPart)).join('.').value();
452
452
  }
453
453
  focus() {
@@ -193,12 +193,7 @@ class TextAreaComponent extends TextField_1.default {
193
193
  const editorHeight = (numRows * 31) + 14;
194
194
  editor.ui.view.editable.editableElement.style.height = `${(editorHeight)}px`;
195
195
  }
196
- if (isReadOnly) {
197
- editor.enableReadOnlyMode(this.id);
198
- }
199
- else {
200
- editor.disableReadOnlyMode(this.id);
201
- }
196
+ editor.isReadOnly = isReadOnly;
202
197
  editor.data.set(value);
203
198
  }
204
199
  editorReady(editor);
@@ -2364,14 +2364,12 @@ export default class Component extends Element {
2364
2364
  ckeditor: {
2365
2365
  image: {
2366
2366
  toolbar: [
2367
- 'toggleImageCaption',
2368
2367
  'imageTextAlternative',
2369
2368
  '|',
2370
- 'imageStyle:inline',
2371
- 'imageStyle:wrapText',
2372
- 'imageStyle:breakText',
2373
- '|',
2374
- 'resizeImage'
2369
+ 'imageStyle:full',
2370
+ 'imageStyle:alignLeft',
2371
+ 'imageStyle:alignCenter',
2372
+ 'imageStyle:alignRight'
2375
2373
  ],
2376
2374
  styles: [
2377
2375
  'full',
@@ -2393,10 +2391,7 @@ export default class Component extends Element {
2393
2391
  if (this.component.isUploadEnabled) {
2394
2392
  settings.extraPlugins.push(getFormioUploadAdapterPlugin(this.fileService, this));
2395
2393
  }
2396
- Formio.requireLibrary(`ckeditor-css`, isIEBrowser ? 'CKEDITOR' : 'ClassicEditor', [
2397
- { type: 'styles', src: `${Formio.cdn.ckeditor}/ckeditor.css` }
2398
- ], true);
2399
- return Formio.requireLibrary('ckeditor', isIEBrowser ? 'CKEDITOR' : 'ClassicEditor', _.get(this.options, 'editors.ckeditor.src', `${Formio.cdn.ckeditor}/ckeditor.umd.js`), true)
2394
+ return Formio.requireLibrary('ckeditor', isIEBrowser ? 'CKEDITOR' : 'ClassicEditor', _.get(this.options, 'editors.ckeditor.src', `${Formio.cdn.ckeditor}/ckeditor.js`), true)
2400
2395
  .then(() => {
2401
2396
  if (!element.parentNode) {
2402
2397
  return Promise.reject();
@@ -7,7 +7,7 @@ export default class ButtonComponent extends Field {
7
7
  weight: number;
8
8
  schema: any;
9
9
  };
10
- static savedValueTypes(schema: any): any;
10
+ static savedValueTypes(schema: any): string[];
11
11
  constructor(component: any, options: any, data: any);
12
12
  filesUploading: number;
13
13
  get inputInfo(): any;
@@ -1,7 +1,7 @@
1
1
  import _ from 'lodash';
2
2
  import Field from '../_classes/field/Field';
3
3
  import Input from '../_classes/input/Input';
4
- import { componentValueTypes, eachComponent, getArrayFromComponentPath, getComponentSavedTypes } from '../../utils/formUtils';
4
+ import { componentValueTypes, eachComponent, getArrayFromComponentPath, getComponentSavedTypes } from '../../utils';
5
5
  export default class ButtonComponent extends Field {
6
6
  static schema(...extend) {
7
7
  return Input.schema({
@@ -188,12 +188,7 @@ export default class TextAreaComponent extends TextFieldComponent {
188
188
  const editorHeight = (numRows * 31) + 14;
189
189
  editor.ui.view.editable.editableElement.style.height = `${(editorHeight)}px`;
190
190
  }
191
- if (isReadOnly) {
192
- editor.enableReadOnlyMode(this.id);
193
- }
194
- else {
195
- editor.disableReadOnlyMode(this.id);
196
- }
191
+ editor.isReadOnly = isReadOnly;
197
192
  editor.data.set(value);
198
193
  }
199
194
  editorReady(editor);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formio/js",
3
- "version": "5.1.0-dev.6151.5c28053",
3
+ "version": "5.1.0-dev.6154.73887de",
4
4
  "description": "JavaScript powered Forms with JSON Form Builder",
5
5
  "main": "lib/cjs/index.js",
6
6
  "exports": {