@social-mail/social-mail-client 1.2.133 → 1.2.134

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.
Files changed (27) hide show
  1. package/dist/admin/AdminAppIndex.pack.js +12 -109
  2. package/dist/admin/AdminAppIndex.pack.js.map +1 -1
  3. package/dist/admin/AdminAppIndex.pack.min.js +1 -1
  4. package/dist/admin/AdminAppIndex.pack.min.js.map +1 -1
  5. package/dist/site-editor/properties/controls/SizeEditorControl.d.ts +3 -23
  6. package/dist/site-editor/properties/controls/SizeEditorControl.d.ts.map +1 -1
  7. package/dist/site-editor/properties/controls/SizeEditorControl.js +6 -101
  8. package/dist/site-editor/properties/controls/SizeEditorControl.js.map +1 -1
  9. package/dist/site-editor/properties/groups/PositionGroupEditor.d.ts.map +1 -1
  10. package/dist/site-editor/properties/groups/PositionGroupEditor.js +6 -8
  11. package/dist/site-editor/properties/groups/PositionGroupEditor.js.map +1 -1
  12. package/dist/site-editor/properties/groups/SizeGroupEditor.d.ts.map +1 -1
  13. package/dist/site-editor/properties/groups/SizeGroupEditor.js.map +1 -1
  14. package/dist/site-editor/style-editor/StyleEditor.d.ts +2 -0
  15. package/dist/site-editor/style-editor/StyleEditor.d.ts.map +1 -0
  16. package/dist/site-editor/style-editor/StyleEditor.js +24 -0
  17. package/dist/site-editor/style-editor/StyleEditor.js.map +1 -0
  18. package/dist/tsconfig.tsbuildinfo +1 -1
  19. package/dist/web/AppIndex.pack.js +12 -109
  20. package/dist/web/AppIndex.pack.js.map +1 -1
  21. package/dist/web/AppIndex.pack.min.js +1 -1
  22. package/dist/web/AppIndex.pack.min.js.map +1 -1
  23. package/package.json +1 -1
  24. package/src/site-editor/properties/controls/SizeEditorControl.tsx +108 -104
  25. package/src/site-editor/properties/groups/PositionGroupEditor.tsx +21 -22
  26. package/src/site-editor/properties/groups/SizeGroupEditor.tsx +0 -1
  27. package/src/site-editor/style-editor/StyleEditor.tsx +22 -0
@@ -36870,112 +36870,17 @@ System.register(["@web-atoms/core/dist/core/XNode", "../controls/PropertyEditor"
36870
36870
 
36871
36871
  AmdLoader.instance.setup("@social-mail/social-mail-client/dist/site-editor/properties/groups/LayoutEditor");
36872
36872
 
36873
- System.register(["tslib", "@web-atoms/core/dist/core/BindableProperty", "@web-atoms/core/dist/web/controls/AtomControl", "@web-atoms/core/dist/core/XNode", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dist/core/AtomBinder"], function (_export, _context) {
36873
+ System.register(["./PropertyEditor"], function (_export, _context) {
36874
36874
  "use strict";
36875
36875
 
36876
- var __awaiter, __decorate, __metadata, BindableProperty, AtomControl, XNode, Bind, AtomBinder, SizeEditorControl, BindSizeEditor;
36877
- _export("default", void 0);
36876
+ var DropDownProperty, SizeEditorControl;
36878
36877
  return {
36879
- setters: [function (_tslib) {
36880
- __awaiter = _tslib.__awaiter;
36881
- __decorate = _tslib.__decorate;
36882
- __metadata = _tslib.__metadata;
36883
- }, function (_webAtomsCoreDistCoreBindableProperty) {
36884
- BindableProperty = _webAtomsCoreDistCoreBindableProperty.BindableProperty;
36885
- }, function (_webAtomsCoreDistWebControlsAtomControl) {
36886
- AtomControl = _webAtomsCoreDistWebControlsAtomControl.AtomControl;
36887
- }, function (_webAtomsCoreDistCoreXNode) {
36888
- XNode = _webAtomsCoreDistCoreXNode.default;
36889
- }, function (_webAtomsCoreDistCoreBind) {
36890
- Bind = _webAtomsCoreDistCoreBind.default;
36891
- }, function (_webAtomsCoreDistCoreAtomBinder) {
36892
- AtomBinder = _webAtomsCoreDistCoreAtomBinder.AtomBinder;
36878
+ setters: [function (_PropertyEditor) {
36879
+ DropDownProperty = _PropertyEditor.DropDownProperty;
36893
36880
  }],
36894
36881
  execute: function () {
36895
- _export("BindSizeEditor", BindSizeEditor = Bind.forControl());
36896
- _export("default", SizeEditorControl = class SizeEditorControl extends AtomControl {
36897
- constructor() {
36898
- super(...arguments);
36899
- this._value = "";
36900
- this._isChanging = false;
36901
- this._old = "";
36902
- }
36903
- get isCustom() {
36904
- return this.propertyValue === "custom";
36905
- }
36906
- set isCustom(v) {
36907
- if (v) {
36908
- this.propertyValue = "custom";
36909
- } else {
36910
- this.propertyValue = this._old;
36911
- }
36912
- }
36913
- get propertyValue() {
36914
- return this._value;
36915
- }
36916
- set propertyValue(v) {
36917
- if (this._isChanging) {
36918
- return;
36919
- }
36920
- this._isChanging = true;
36921
- this._old = v && v !== "custom" ? this._value : this._old;
36922
- this._value = v;
36923
- AtomBinder.refreshValue(this, "propertyValue");
36924
- AtomBinder.refreshValue(this, "valueAsNumber");
36925
- AtomBinder.refreshValue(this, "isCustom");
36926
- this._isChanging = false;
36927
- }
36928
- get valueAsNumber() {
36929
- var _a;
36930
- const v = this.propertyValue;
36931
- if (!v || v === "custom") {
36932
- return 0;
36933
- }
36934
- return (_a = this.values.findIndex(item => item.name === v)) !== null && _a !== void 0 ? _a : 0;
36935
- }
36936
- set valueAsNumber(v) {
36937
- var _a;
36938
- this.propertyValue = ((_a = this.values[v]) === null || _a === void 0 ? void 0 : _a.name) || this._old;
36939
- }
36940
- init() {
36941
- return __awaiter(this, void 0, void 0, function* () {
36942
- const parent = this.parent;
36943
- const pv = parent.selection.style(this.property.key);
36944
- this.values = this.property.values.filter(x => x.name !== "custom");
36945
- this.render(XNode.create("div", {
36946
- propertyValue: Bind.sourceTwoWays(pv, x => x.source.value),
36947
- custom: Bind.sourceTwoWays(pv, x => x.source.custom),
36948
- "data-element": "property-editor",
36949
- "data-display": "flex",
36950
- "data-justify-items": "stretch"
36951
- }, XNode.create("div", {
36952
- "data-layout": "row"
36953
- }, XNode.create("label", {
36954
- "data-font-size": "small",
36955
- text: Bind.oneWay(() => this.label)
36956
- }), XNode.create("input", {
36957
- type: "checkbox",
36958
- checked: Bind.twoWaysImmediate(() => this.isCustom)
36959
- })), XNode.create("div", null, XNode.create("input", {
36960
- "style-display": Bind.oneWay(() => !this.isCustom),
36961
- type: "range",
36962
- min: 0,
36963
- max: this.values.length - 2,
36964
- value: Bind.twoWays(() => this.valueAsNumber)
36965
- }), XNode.create("input", {
36966
- "style-display": Bind.oneWay(() => this.isCustom),
36967
- type: "text",
36968
- value: Bind.twoWaysImmediate(() => this.custom)
36969
- }))));
36970
- });
36971
- }
36972
- preCreate() {
36973
- this.runAfterInit(() => this.app.runAsync(() => this.init()));
36974
- }
36975
- });
36976
- __decorate([BindableProperty, __metadata("design:type", String)], SizeEditorControl.prototype, "label", void 0);
36977
- __decorate([BindableProperty, __metadata("design:type", Function)], SizeEditorControl.prototype, "property", void 0);
36978
- __decorate([BindableProperty, __metadata("design:type", String)], SizeEditorControl.prototype, "custom", void 0);
36882
+ SizeEditorControl = DropDownProperty;
36883
+ _export("default", SizeEditorControl);
36979
36884
  }
36980
36885
  };
36981
36886
  });
@@ -37205,43 +37110,41 @@ System.register(["@web-atoms/core/dist/core/XNode", "../controls/PropertyEditor"
37205
37110
  System.register(["@web-atoms/core/dist/core/XNode", "../controls/PropertyEditor", "../../styler/StylerSet", "../controls/SizeEditorControl"], function (_export, _context) {
37206
37111
  "use strict";
37207
37112
 
37208
- var XNode, DropDownProperty, ExpanderPropertyEditor, StylerSet, SizeEditorControl, BindSizeEditor, properties;
37113
+ var XNode, BindEditor, DropDownProperty, ExpanderPropertyEditor, StylerSet, SizeEditorControl, properties;
37209
37114
  function PositionGroupEditor() {
37210
37115
  return XNode.create(ExpanderPropertyEditor, {
37211
37116
  label: "Position"
37212
37117
  }, XNode.create(DropDownProperty, {
37213
37118
  label: "Position",
37214
37119
  property: properties.stylerPosition
37215
- }), XNode.create(SizeEditorControl, {
37120
+ }), XNode.create("section", {
37121
+ "style-display": BindEditor.oneWay(e => /relative|fixed|absolute|sticky/i.test(e.selection.currentStyle.position))
37122
+ }, XNode.create(SizeEditorControl, {
37216
37123
  label: "Left",
37217
- "style-display": BindSizeEditor.oneWay(e => /relative|fixed|absolute|sticky/i.test(e.parent.selection.currentStyle.position)),
37218
37124
  property: properties.stylerLeft
37219
37125
  }), XNode.create(SizeEditorControl, {
37220
37126
  label: "Top",
37221
- "style-display": BindSizeEditor.oneWay(e => /relative|fixed|absolute|sticky/i.test(e.parent.selection.currentStyle.position)),
37222
37127
  property: properties.stylerTop
37223
37128
  }), XNode.create(SizeEditorControl, {
37224
37129
  label: "Right",
37225
- "style-display": BindSizeEditor.oneWay(e => /relative|fixed|absolute|sticky/i.test(e.parent.selection.currentStyle.position)),
37226
37130
  property: properties.stylerRight
37227
37131
  }), XNode.create(SizeEditorControl, {
37228
37132
  label: "Bottom",
37229
- "style-display": BindSizeEditor.oneWay(e => /relative|fixed|absolute|sticky/i.test(e.parent.selection.currentStyle.position)),
37230
37133
  property: properties.stylerBottom
37231
- }));
37134
+ })));
37232
37135
  }
37233
37136
  _export("default", PositionGroupEditor);
37234
37137
  return {
37235
37138
  setters: [function (_webAtomsCoreDistCoreXNode) {
37236
37139
  XNode = _webAtomsCoreDistCoreXNode.default;
37237
37140
  }, function (_controlsPropertyEditor) {
37141
+ BindEditor = _controlsPropertyEditor.BindEditor;
37238
37142
  DropDownProperty = _controlsPropertyEditor.DropDownProperty;
37239
37143
  ExpanderPropertyEditor = _controlsPropertyEditor.ExpanderPropertyEditor;
37240
37144
  }, function (_stylerStylerSet) {
37241
37145
  StylerSet = _stylerStylerSet.StylerSet;
37242
37146
  }, function (_controlsSizeEditorControl) {
37243
37147
  SizeEditorControl = _controlsSizeEditorControl.default;
37244
- BindSizeEditor = _controlsSizeEditorControl.BindSizeEditor;
37245
37148
  }],
37246
37149
  execute: function () {
37247
37150
  ({